/*! * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and limitations under the License. */ import { PropsWithChildren } from "react"; import { ContrastColors } from "../createContrastColors.js"; import { MessageBus } from "../tools/createMessageBus.js"; import { ContrastMode } from "../useContrastMode.js"; export declare const defaultCloseSideNavMessageBus: MessageBus; export declare const defaultSubscribeToCloseRightSideMenu: () => () => void; export type UiShellColors = { /** * Custom background color for the app content area. */ appBackgroundColor: string; /** * Custom background color for the side nav area. */ sideNavBackgroundColor: string; /** * Custom color for fonts and other contrasted colors in the side nav area. Other contrast colors are derived from this one. * * If not passed, it gets computed from Odyssey. */ sideNavBackgroundContrastColor?: string; sideNavContrastColors?: ContrastColors; /** * Custom background color for the top nav area. */ topNavBackgroundColor: string; }; export type UiShellContext = { /** * This is a callback that publishes a change to all subscribers listening for when to close the side nav. */ closeSideNavMenu: MessageBus["publish"]; /** * This is a callback that provides a subscriber callback to listen for changes to state. It allows UI Shell to listen for a publisher that asks us to close the right-side menu. */ subscribeToCloseRightSideMenu: MessageBus["subscribe"]; /** * This is a callback that provides a subscriber callback to listen for changes to state. It allows UI Shell to listen for a publisher that asks us to close the side nav. */ subscribeToCloseSideNavMenu: MessageBus["subscribe"]; } & UiShellColors; export declare const useUiShellContext: () => UiShellContext | undefined; export type UiShellProviderProps = { /** * Sets either a gray or white background color for the app content area. */ appBackgroundContrastMode?: ContrastMode; } & Partial; declare const MemoizedUiShellProvider: import("react").MemoExoticComponent<({ appBackgroundColor, appBackgroundContrastMode, children, closeSideNavMenu, sideNavBackgroundColor, sideNavBackgroundContrastColor, subscribeToCloseRightSideMenu, subscribeToCloseSideNavMenu, topNavBackgroundColor, }: PropsWithChildren) => import("@emotion/react/jsx-runtime").JSX.Element>; export { MemoizedUiShellProvider as UiShellProvider }; //# sourceMappingURL=UiShellProvider.d.ts.map