@okta/odyssey-react-mui 1.71.0 → 1.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -0
- package/dist/cjs/Accordion.cjs +1 -1
- package/dist/cjs/AnimationContext.cjs +1 -1
- package/dist/cjs/Autocomplete.cjs +1 -1
- package/dist/cjs/Badge.cjs +1 -1
- package/dist/cjs/Banner.cjs +1 -1
- package/dist/cjs/Box.cjs +1 -1
- package/dist/cjs/Breadcrumbs.cjs +1 -1
- package/dist/cjs/Buttons/BaseButton.cjs +4 -2
- package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
- package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
- package/dist/cjs/Buttons/Button.cjs +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs +1 -1
- package/dist/cjs/Callout.cjs +1 -1
- package/dist/cjs/Card.cjs +1 -1
- package/dist/cjs/CircularProgress.cjs +1 -1
- package/dist/cjs/ConditionalWrapper.cjs +1 -1
- package/dist/cjs/DataTable/DataTable.cjs +1 -1
- package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
- package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
- package/dist/cjs/DatePickers/DateField.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
- package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
- package/dist/cjs/Dialog.cjs +1 -1
- package/dist/cjs/Drawer.cjs +1 -1
- package/dist/cjs/EmptyState.cjs +1 -1
- package/dist/cjs/ErrorMessageList.cjs +1 -1
- package/dist/cjs/Field.cjs +1 -1
- package/dist/cjs/FieldError.cjs +1 -1
- package/dist/cjs/FieldHint.cjs +1 -1
- package/dist/cjs/FieldLabel.cjs +1 -1
- package/dist/cjs/Fields/Checkbox.cjs +1 -1
- package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
- package/dist/cjs/Fields/Radio.cjs +1 -1
- package/dist/cjs/Fields/RadioGroup.cjs +1 -1
- package/dist/cjs/Fieldset.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploadIllustration.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploadPreview.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploader.cjs +1 -1
- package/dist/cjs/Form.cjs +1 -1
- package/dist/cjs/FullScreenOverlay.cjs +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
- package/dist/cjs/HintLink.cjs +1 -1
- package/dist/cjs/IconWithTooltip.cjs +1 -1
- package/dist/cjs/Link.cjs +1 -1
- package/dist/cjs/MuiPropsChild.cjs +1 -1
- package/dist/cjs/NativeSelect.cjs +1 -1
- package/dist/cjs/OdysseyCacheProvider.cjs +1 -1
- package/dist/cjs/OdysseyProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +1 -1
- package/dist/cjs/PasswordField.cjs +1 -1
- package/dist/cjs/ScreenReaderText.cjs +1 -1
- package/dist/cjs/SearchField.cjs +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Stack.cjs +1 -1
- package/dist/cjs/Status.cjs +1 -1
- package/dist/cjs/Surface.cjs +1 -1
- package/dist/cjs/Switch.cjs +2 -2
- package/dist/cjs/Tabs.cjs +1 -1
- package/dist/cjs/Tag.cjs +1 -1
- package/dist/cjs/TagList.cjs +1 -1
- package/dist/cjs/TextField.cjs +1 -1
- package/dist/cjs/Toast.cjs +1 -1
- package/dist/cjs/ToastStack.cjs +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Typography.cjs +12 -12
- package/dist/cjs/charts/BarChart.cjs +1 -1
- package/dist/cjs/charts/LineChart.cjs +1 -1
- package/dist/cjs/charts/components/ChartError.cjs +1 -1
- package/dist/cjs/charts/components/ChartFrame.cjs +1 -1
- package/dist/cjs/charts/components/ChartPopoverContent.cjs +1 -1
- package/dist/cjs/fullscreen/FullscreenButton.cjs +55 -0
- package/dist/cjs/fullscreen/FullscreenButton.cjs.map +1 -0
- package/dist/cjs/fullscreen/FullscreenRegion.cjs +405 -0
- package/dist/cjs/fullscreen/FullscreenRegion.cjs.map +1 -0
- package/dist/cjs/fullscreen/easeFullscreenTransition.cjs +19 -0
- package/dist/cjs/fullscreen/easeFullscreenTransition.cjs.map +1 -0
- package/dist/cjs/fullscreen/getBackgroundColorBehindElement.cjs +60 -0
- package/dist/cjs/fullscreen/getBackgroundColorBehindElement.cjs.map +1 -0
- package/dist/cjs/fullscreen/useFullscreen.cjs +116 -0
- package/dist/cjs/fullscreen/useFullscreen.cjs.map +1 -0
- package/dist/cjs/fullscreen/useFullscreenId.cjs +21 -0
- package/dist/cjs/fullscreen/useFullscreenId.cjs.map +1 -0
- package/dist/cjs/icons.generated/Add.cjs +1 -1
- package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
- package/dist/cjs/icons.generated/Apps.cjs +1 -1
- package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
- package/dist/cjs/icons.generated/Bug.cjs +1 -1
- package/dist/cjs/icons.generated/Calendar.cjs +1 -1
- package/dist/cjs/icons.generated/Call.cjs +1 -1
- package/dist/cjs/icons.generated/Chat.cjs +1 -1
- package/dist/cjs/icons.generated/Check.cjs +1 -1
- package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
- package/dist/cjs/icons.generated/Clock.cjs +1 -1
- package/dist/cjs/icons.generated/Close.cjs +1 -1
- package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
- package/dist/cjs/icons.generated/Copy.cjs +1 -1
- package/dist/cjs/icons.generated/Customizations.cjs +1 -1
- package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Delete.cjs +1 -1
- package/dist/cjs/icons.generated/Deny.cjs +1 -1
- package/dist/cjs/icons.generated/Devices.cjs +1 -1
- package/dist/cjs/icons.generated/Directory.cjs +1 -1
- package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
- package/dist/cjs/icons.generated/Documentation.cjs +1 -1
- package/dist/cjs/icons.generated/Download.cjs +1 -1
- package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
- package/dist/cjs/icons.generated/Edit.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
- package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
- package/dist/cjs/icons.generated/Filter.cjs +1 -1
- package/dist/cjs/icons.generated/Folder.cjs +1 -1
- package/dist/cjs/icons.generated/FullscreenEnter.cjs +39 -0
- package/dist/cjs/icons.generated/FullscreenEnter.cjs.map +1 -0
- package/dist/cjs/icons.generated/FullscreenExit.cjs +39 -0
- package/dist/cjs/icons.generated/FullscreenExit.cjs.map +1 -0
- package/dist/cjs/icons.generated/Globe.cjs +1 -1
- package/dist/cjs/icons.generated/Grid.cjs +1 -1
- package/dist/cjs/icons.generated/Group.cjs +1 -1
- package/dist/cjs/icons.generated/Happy.cjs +1 -1
- package/dist/cjs/icons.generated/Hide.cjs +1 -1
- package/dist/cjs/icons.generated/Home.cjs +1 -1
- package/dist/cjs/icons.generated/HomeSelected.cjs +1 -1
- package/dist/cjs/icons.generated/IdentityGovernance.cjs +1 -1
- package/dist/cjs/icons.generated/IdentityGovernanceSelected.cjs +1 -1
- package/dist/cjs/icons.generated/InformationCircle.cjs +1 -1
- package/dist/cjs/icons.generated/InformationCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Link.cjs +1 -1
- package/dist/cjs/icons.generated/List.cjs +1 -1
- package/dist/cjs/icons.generated/Lock.cjs +1 -1
- package/dist/cjs/icons.generated/Menu.cjs +1 -1
- package/dist/cjs/icons.generated/More.cjs +1 -1
- package/dist/cjs/icons.generated/Neutral.cjs +1 -1
- package/dist/cjs/icons.generated/Notification.cjs +1 -1
- package/dist/cjs/icons.generated/Pause.cjs +1 -1
- package/dist/cjs/icons.generated/QuestionCircle.cjs +1 -1
- package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Refresh.cjs +1 -1
- package/dist/cjs/icons.generated/Reports.cjs +1 -1
- package/dist/cjs/icons.generated/ReportsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/Reset.cjs +1 -1
- package/dist/cjs/icons.generated/Resume.cjs +1 -1
- package/dist/cjs/icons.generated/Sad.cjs +1 -1
- package/dist/cjs/icons.generated/Same.cjs +1 -1
- package/dist/cjs/icons.generated/Search.cjs +1 -1
- package/dist/cjs/icons.generated/Security.cjs +1 -1
- package/dist/cjs/icons.generated/SecuritySelected.cjs +1 -1
- package/dist/cjs/icons.generated/Send.cjs +1 -1
- package/dist/cjs/icons.generated/Server.cjs +1 -1
- package/dist/cjs/icons.generated/Settings.cjs +1 -1
- package/dist/cjs/icons.generated/SettingsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/Show.cjs +1 -1
- package/dist/cjs/icons.generated/Sparkle.cjs +1 -1
- package/dist/cjs/icons.generated/Subtract.cjs +1 -1
- package/dist/cjs/icons.generated/Sync.cjs +1 -1
- package/dist/cjs/icons.generated/ThumbsDown.cjs +1 -1
- package/dist/cjs/icons.generated/ThumbsUp.cjs +1 -1
- package/dist/cjs/icons.generated/Unlock.cjs +1 -1
- package/dist/cjs/icons.generated/Upload.cjs +1 -1
- package/dist/cjs/icons.generated/User.cjs +1 -1
- package/dist/cjs/icons.generated/Video.cjs +1 -1
- package/dist/cjs/icons.generated/Warning.cjs +1 -1
- package/dist/cjs/icons.generated/WarningFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Workflows.cjs +1 -1
- package/dist/cjs/icons.generated/WorkflowsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/index.cjs +22 -0
- package/dist/cjs/icons.generated/index.cjs.map +1 -1
- package/dist/cjs/icons.generated/lazyIconDictionary.cjs +6 -0
- package/dist/cjs/icons.generated/lazyIconDictionary.cjs.map +1 -1
- package/dist/cjs/icons.generated/names.cjs +1 -1
- package/dist/cjs/icons.generated/names.cjs.map +1 -1
- package/dist/cjs/index.cjs +47 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/labs/AppTile.cjs +1 -1
- package/dist/cjs/labs/DataFilters.cjs +2 -2
- package/dist/cjs/labs/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataTablePagination.cjs +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
- package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +1 -1
- package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
- package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
- package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
- package/dist/cjs/labs/PaginatedTable.cjs +1 -1
- package/dist/cjs/labs/StaticTable.cjs +1 -1
- package/dist/cjs/labs/UserProfile.cjs +1 -1
- package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
- package/dist/cjs/logos.generated/Duo.cjs +1 -1
- package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
- package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
- package/dist/cjs/logos.generated/Persona.cjs +1 -1
- package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
- package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
- package/dist/cjs/message-bus/createBrowserMessageBus.cjs +78 -0
- package/dist/cjs/message-bus/createBrowserMessageBus.cjs.map +1 -0
- package/dist/cjs/message-bus/createMessageChannel.cjs +38 -0
- package/dist/cjs/message-bus/createMessageChannel.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenId.cjs +24 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenId.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeHost.cjs +99 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeHost.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeMessageBus.cjs +76 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeMessageBus.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenMessageChannel.cjs +35 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenMessageChannel.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenState.cjs +60 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenState.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/watchElementDisconnection.cjs +51 -0
- package/dist/cjs/message-bus/fullscreen/watchElementDisconnection.cjs.map +1 -0
- package/dist/cjs/message-bus/index.cjs +111 -0
- package/dist/cjs/message-bus/index.cjs.map +1 -0
- package/dist/cjs/message-bus/messageGuards.cjs +23 -0
- package/dist/cjs/message-bus/messageGuards.cjs.map +1 -0
- package/dist/cjs/pendingDesignTokens/fullscreenTransitionTokens.cjs +21 -0
- package/dist/cjs/pendingDesignTokens/fullscreenTransitionTokens.cjs.map +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
- package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +1 -1
- package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +32 -2
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +2 -2
- package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
- package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +11 -1
- package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +40 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/createUiShellFullscreenState.cjs +66 -0
- package/dist/cjs/ui-shell/createUiShellFullscreenState.cjs.map +1 -0
- package/dist/cjs/ui-shell/renderUiShell.cjs +23 -0
- package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
- package/dist/cjs/ui-shell/useFullscreenChromeCollapse.cjs +74 -0
- package/dist/cjs/ui-shell/useFullscreenChromeCollapse.cjs.map +1 -0
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/esm/Accordion.js +1 -1
- package/dist/esm/AnimationContext.js +1 -1
- package/dist/esm/Autocomplete.js +1 -1
- package/dist/esm/Badge.js +1 -1
- package/dist/esm/Banner.js +1 -1
- package/dist/esm/Box.js +1 -1
- package/dist/esm/Breadcrumbs.js +1 -1
- package/dist/esm/Buttons/BaseButton.js +4 -2
- package/dist/esm/Buttons/BaseButton.js.map +1 -1
- package/dist/esm/Buttons/BaseMenuButton.js +1 -1
- package/dist/esm/Buttons/Button.js +1 -1
- package/dist/esm/Buttons/MenuButton.js +1 -1
- package/dist/esm/Buttons/MenuItem.js +1 -1
- package/dist/esm/Callout.js +1 -1
- package/dist/esm/Card.js +1 -1
- package/dist/esm/CircularProgress.js +1 -1
- package/dist/esm/ConditionalWrapper.js +1 -1
- package/dist/esm/DataTable/DataTable.js +1 -1
- package/dist/esm/DataTable/DataTableRowActions.js +1 -1
- package/dist/esm/DataTable/DataTableSettings.js +1 -1
- package/dist/esm/DatePickers/DateField.js +1 -1
- package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
- package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
- package/dist/esm/DatePickers/DatePicker.js +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drawer.js +1 -1
- package/dist/esm/EmptyState.js +1 -1
- package/dist/esm/ErrorMessageList.js +1 -1
- package/dist/esm/Field.js +1 -1
- package/dist/esm/FieldError.js +1 -1
- package/dist/esm/FieldHint.js +1 -1
- package/dist/esm/FieldLabel.js +1 -1
- package/dist/esm/Fields/Checkbox.js +1 -1
- package/dist/esm/Fields/CheckboxGroup.js +1 -1
- package/dist/esm/Fields/Radio.js +1 -1
- package/dist/esm/Fields/RadioGroup.js +1 -1
- package/dist/esm/Fieldset.js +1 -1
- package/dist/esm/FileUploader/FileUploadIllustration.js +1 -1
- package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
- package/dist/esm/FileUploader/FileUploader.js +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FullScreenOverlay.js +1 -1
- package/dist/esm/FullScreenOverlayContext.js +1 -1
- package/dist/esm/HintLink.js +1 -1
- package/dist/esm/IconWithTooltip.js +1 -1
- package/dist/esm/Link.js +1 -1
- package/dist/esm/MuiPropsChild.js +1 -1
- package/dist/esm/NativeSelect.js +1 -1
- package/dist/esm/OdysseyCacheProvider.js +1 -1
- package/dist/esm/OdysseyProvider.js +1 -1
- package/dist/esm/OdysseyThemeProvider.js +1 -1
- package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
- package/dist/esm/Pagination/Pagination.js +1 -1
- package/dist/esm/PasswordField.js +1 -1
- package/dist/esm/ScreenReaderText.js +1 -1
- package/dist/esm/SearchField.js +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/Stack.js +1 -1
- package/dist/esm/Status.js +1 -1
- package/dist/esm/Surface.js +1 -1
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TagList.js +1 -1
- package/dist/esm/TextField.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/ToastStack.js +1 -1
- package/dist/esm/Tooltip.js +1 -1
- package/dist/esm/Typography.js +12 -12
- package/dist/esm/charts/BarChart.js +1 -1
- package/dist/esm/charts/LineChart.js +1 -1
- package/dist/esm/charts/components/ChartError.js +1 -1
- package/dist/esm/charts/components/ChartFrame.js +1 -1
- package/dist/esm/charts/components/ChartPopoverContent.js +1 -1
- package/dist/esm/fullscreen/FullscreenButton.js +52 -0
- package/dist/esm/fullscreen/FullscreenButton.js.map +1 -0
- package/dist/esm/fullscreen/FullscreenRegion.js +402 -0
- package/dist/esm/fullscreen/FullscreenRegion.js.map +1 -0
- package/dist/esm/fullscreen/easeFullscreenTransition.js +12 -0
- package/dist/esm/fullscreen/easeFullscreenTransition.js.map +1 -0
- package/dist/esm/fullscreen/getBackgroundColorBehindElement.js +53 -0
- package/dist/esm/fullscreen/getBackgroundColorBehindElement.js.map +1 -0
- package/dist/esm/fullscreen/useFullscreen.js +110 -0
- package/dist/esm/fullscreen/useFullscreen.js.map +1 -0
- package/dist/esm/fullscreen/useFullscreenId.js +16 -0
- package/dist/esm/fullscreen/useFullscreenId.js.map +1 -0
- package/dist/esm/icons.generated/Add.js +1 -1
- package/dist/esm/icons.generated/AddCircle.js +1 -1
- package/dist/esm/icons.generated/Apps.js +1 -1
- package/dist/esm/icons.generated/AppsSelected.js +1 -1
- package/dist/esm/icons.generated/ArrowBottom.js +1 -1
- package/dist/esm/icons.generated/ArrowDown.js +1 -1
- package/dist/esm/icons.generated/ArrowLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
- package/dist/esm/icons.generated/ArrowRight.js +1 -1
- package/dist/esm/icons.generated/ArrowTop.js +1 -1
- package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
- package/dist/esm/icons.generated/ArrowUp.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
- package/dist/esm/icons.generated/Bug.js +1 -1
- package/dist/esm/icons.generated/Calendar.js +1 -1
- package/dist/esm/icons.generated/Call.js +1 -1
- package/dist/esm/icons.generated/Chat.js +1 -1
- package/dist/esm/icons.generated/Check.js +1 -1
- package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
- package/dist/esm/icons.generated/ChevronDown.js +1 -1
- package/dist/esm/icons.generated/ChevronLeft.js +1 -1
- package/dist/esm/icons.generated/ChevronRight.js +1 -1
- package/dist/esm/icons.generated/ChevronUp.js +1 -1
- package/dist/esm/icons.generated/Clock.js +1 -1
- package/dist/esm/icons.generated/Close.js +1 -1
- package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
- package/dist/esm/icons.generated/CollapseLeft.js +1 -1
- package/dist/esm/icons.generated/CollapseRight.js +1 -1
- package/dist/esm/icons.generated/Copy.js +1 -1
- package/dist/esm/icons.generated/Customizations.js +1 -1
- package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
- package/dist/esm/icons.generated/DangerDiamond.js +1 -1
- package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
- package/dist/esm/icons.generated/Delete.js +1 -1
- package/dist/esm/icons.generated/Deny.js +1 -1
- package/dist/esm/icons.generated/Devices.js +1 -1
- package/dist/esm/icons.generated/Directory.js +1 -1
- package/dist/esm/icons.generated/DirectorySelected.js +1 -1
- package/dist/esm/icons.generated/Documentation.js +1 -1
- package/dist/esm/icons.generated/Download.js +1 -1
- package/dist/esm/icons.generated/DragIndicator.js +1 -1
- package/dist/esm/icons.generated/Edit.js +1 -1
- package/dist/esm/icons.generated/ExpandLeft.js +1 -1
- package/dist/esm/icons.generated/ExpandRight.js +1 -1
- package/dist/esm/icons.generated/ExternalLink.js +1 -1
- package/dist/esm/icons.generated/Filter.js +1 -1
- package/dist/esm/icons.generated/Folder.js +1 -1
- package/dist/esm/icons.generated/FullscreenEnter.js +34 -0
- package/dist/esm/icons.generated/FullscreenEnter.js.map +1 -0
- package/dist/esm/icons.generated/FullscreenExit.js +34 -0
- package/dist/esm/icons.generated/FullscreenExit.js.map +1 -0
- package/dist/esm/icons.generated/Globe.js +1 -1
- package/dist/esm/icons.generated/Grid.js +1 -1
- package/dist/esm/icons.generated/Group.js +1 -1
- package/dist/esm/icons.generated/Happy.js +1 -1
- package/dist/esm/icons.generated/Hide.js +1 -1
- package/dist/esm/icons.generated/Home.js +1 -1
- package/dist/esm/icons.generated/HomeSelected.js +1 -1
- package/dist/esm/icons.generated/IdentityGovernance.js +1 -1
- package/dist/esm/icons.generated/IdentityGovernanceSelected.js +1 -1
- package/dist/esm/icons.generated/InformationCircle.js +1 -1
- package/dist/esm/icons.generated/InformationCircleFilled.js +1 -1
- package/dist/esm/icons.generated/Link.js +1 -1
- package/dist/esm/icons.generated/List.js +1 -1
- package/dist/esm/icons.generated/Lock.js +1 -1
- package/dist/esm/icons.generated/Menu.js +1 -1
- package/dist/esm/icons.generated/More.js +1 -1
- package/dist/esm/icons.generated/Neutral.js +1 -1
- package/dist/esm/icons.generated/Notification.js +1 -1
- package/dist/esm/icons.generated/Pause.js +1 -1
- package/dist/esm/icons.generated/QuestionCircle.js +1 -1
- package/dist/esm/icons.generated/QuestionCircleFilled.js +1 -1
- package/dist/esm/icons.generated/Refresh.js +1 -1
- package/dist/esm/icons.generated/Reports.js +1 -1
- package/dist/esm/icons.generated/ReportsSelected.js +1 -1
- package/dist/esm/icons.generated/Reset.js +1 -1
- package/dist/esm/icons.generated/Resume.js +1 -1
- package/dist/esm/icons.generated/Sad.js +1 -1
- package/dist/esm/icons.generated/Same.js +1 -1
- package/dist/esm/icons.generated/Search.js +1 -1
- package/dist/esm/icons.generated/Security.js +1 -1
- package/dist/esm/icons.generated/SecuritySelected.js +1 -1
- package/dist/esm/icons.generated/Send.js +1 -1
- package/dist/esm/icons.generated/Server.js +1 -1
- package/dist/esm/icons.generated/Settings.js +1 -1
- package/dist/esm/icons.generated/SettingsSelected.js +1 -1
- package/dist/esm/icons.generated/Show.js +1 -1
- package/dist/esm/icons.generated/Sparkle.js +1 -1
- package/dist/esm/icons.generated/Subtract.js +1 -1
- package/dist/esm/icons.generated/Sync.js +1 -1
- package/dist/esm/icons.generated/ThumbsDown.js +1 -1
- package/dist/esm/icons.generated/ThumbsUp.js +1 -1
- package/dist/esm/icons.generated/Unlock.js +1 -1
- package/dist/esm/icons.generated/Upload.js +1 -1
- package/dist/esm/icons.generated/User.js +1 -1
- package/dist/esm/icons.generated/Video.js +1 -1
- package/dist/esm/icons.generated/Warning.js +1 -1
- package/dist/esm/icons.generated/WarningFilled.js +1 -1
- package/dist/esm/icons.generated/Workflows.js +1 -1
- package/dist/esm/icons.generated/WorkflowsSelected.js +1 -1
- package/dist/esm/icons.generated/index.js +2 -0
- package/dist/esm/icons.generated/index.js.map +1 -1
- package/dist/esm/icons.generated/lazyIconDictionary.js +6 -0
- package/dist/esm/icons.generated/lazyIconDictionary.js.map +1 -1
- package/dist/esm/icons.generated/names.js +1 -1
- package/dist/esm/icons.generated/names.js.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/labs/AppTile.js +1 -1
- package/dist/esm/labs/DataFilters.js +2 -2
- package/dist/esm/labs/DataTable.js +1 -1
- package/dist/esm/labs/DataTablePagination.js +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
- package/dist/esm/labs/DataView/DataCard.js +1 -1
- package/dist/esm/labs/DataView/DataTable.js +1 -1
- package/dist/esm/labs/DataView/DataView.js +1 -1
- package/dist/esm/labs/DataView/DetailPanel.js +1 -1
- package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
- package/dist/esm/labs/DataView/RowActions.js +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/esm/labs/DataView/TableSettings.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimePicker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
- package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +1 -1
- package/dist/esm/labs/PageTemplate/DocumentationLink.js +1 -1
- package/dist/esm/labs/PageTemplate/Layout.js +1 -1
- package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
- package/dist/esm/labs/PaginatedTable.js +1 -1
- package/dist/esm/labs/StaticTable.js +1 -1
- package/dist/esm/labs/UserProfile.js +1 -1
- package/dist/esm/labs/UserProfileMenuButton.js +1 -1
- package/dist/esm/logos.generated/Duo.js +1 -1
- package/dist/esm/logos.generated/GoogleAuth.js +1 -1
- package/dist/esm/logos.generated/OktaVerify.js +1 -1
- package/dist/esm/logos.generated/Persona.js +1 -1
- package/dist/esm/logos.generated/SymantecVip.js +1 -1
- package/dist/esm/logos.generated/Yubikey.js +1 -1
- package/dist/esm/message-bus/createBrowserMessageBus.js +72 -0
- package/dist/esm/message-bus/createBrowserMessageBus.js.map +1 -0
- package/dist/esm/message-bus/createMessageChannel.js +33 -0
- package/dist/esm/message-bus/createMessageChannel.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenId.js +18 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenId.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeHost.js +92 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeHost.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeMessageBus.js +69 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeMessageBus.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/fullscreenMessageChannel.js +29 -0
- package/dist/esm/message-bus/fullscreen/fullscreenMessageChannel.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/fullscreenState.js +46 -0
- package/dist/esm/message-bus/fullscreen/fullscreenState.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/watchElementDisconnection.js +44 -0
- package/dist/esm/message-bus/fullscreen/watchElementDisconnection.js.map +1 -0
- package/dist/esm/message-bus/index.js +22 -0
- package/dist/esm/message-bus/index.js.map +1 -0
- package/dist/esm/message-bus/messageGuards.js +14 -0
- package/dist/esm/message-bus/messageGuards.js.map +1 -0
- package/dist/esm/pendingDesignTokens/fullscreenTransitionTokens.js +15 -0
- package/dist/esm/pendingDesignTokens/fullscreenTransitionTokens.js.map +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/esm/ui-shell/InnerAppContainer.js +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +32 -2
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +2 -2
- package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -2
- package/dist/esm/ui-shell/SkipToContent.js +1 -1
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavListItem.js +1 -1
- package/dist/esm/ui-shell/UiShell.js +11 -1
- package/dist/esm/ui-shell/UiShell.js.map +1 -1
- package/dist/esm/ui-shell/UiShellLogo.js +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +40 -1
- package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/createUiShellFullscreenState.js +61 -0
- package/dist/esm/ui-shell/createUiShellFullscreenState.js.map +1 -0
- package/dist/esm/ui-shell/renderUiShell.js +23 -0
- package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
- package/dist/esm/ui-shell/useFullscreenChromeCollapse.js +69 -0
- package/dist/esm/ui-shell/useFullscreenChromeCollapse.js.map +1 -0
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Buttons/BaseButton.d.ts +2 -2
- package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
- package/dist/types/fullscreen/FullscreenButton.d.ts +26 -0
- package/dist/types/fullscreen/FullscreenButton.d.ts.map +1 -0
- package/dist/types/fullscreen/FullscreenRegion.d.ts +25 -0
- package/dist/types/fullscreen/FullscreenRegion.d.ts.map +1 -0
- package/dist/types/fullscreen/easeFullscreenTransition.d.ts +14 -0
- package/dist/types/fullscreen/easeFullscreenTransition.d.ts.map +1 -0
- package/dist/types/fullscreen/getBackgroundColorBehindElement.d.ts +22 -0
- package/dist/types/fullscreen/getBackgroundColorBehindElement.d.ts.map +1 -0
- package/dist/types/fullscreen/useFullscreen.d.ts +68 -0
- package/dist/types/fullscreen/useFullscreen.d.ts.map +1 -0
- package/dist/types/fullscreen/useFullscreenId.d.ts +18 -0
- package/dist/types/fullscreen/useFullscreenId.d.ts.map +1 -0
- package/dist/types/i18n.generated/i18n.d.ts +8 -0
- package/dist/types/i18n.generated/i18n.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.resources.d.ts +12 -0
- package/dist/types/i18n.generated/i18n.resources.d.ts.map +1 -1
- package/dist/types/icons.generated/FullscreenEnter.d.ts +16 -0
- package/dist/types/icons.generated/FullscreenEnter.d.ts.map +1 -0
- package/dist/types/icons.generated/FullscreenExit.d.ts +16 -0
- package/dist/types/icons.generated/FullscreenExit.d.ts.map +1 -0
- package/dist/types/icons.generated/index.d.ts +2 -0
- package/dist/types/icons.generated/index.d.ts.map +1 -1
- package/dist/types/icons.generated/lazyIconDictionary.d.ts.map +1 -1
- package/dist/types/icons.generated/names.d.ts +1 -1
- package/dist/types/icons.generated/names.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/message-bus/createBrowserMessageBus.d.ts +56 -0
- package/dist/types/message-bus/createBrowserMessageBus.d.ts.map +1 -0
- package/dist/types/message-bus/createMessageChannel.d.ts +81 -0
- package/dist/types/message-bus/createMessageChannel.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenId.d.ts +22 -0
- package/dist/types/message-bus/fullscreen/createFullscreenId.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeHost.d.ts +44 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeHost.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeMessageBus.d.ts +55 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeMessageBus.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/fullscreenMessageChannel.d.ts +49 -0
- package/dist/types/message-bus/fullscreen/fullscreenMessageChannel.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/fullscreenState.d.ts +66 -0
- package/dist/types/message-bus/fullscreen/fullscreenState.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/watchElementDisconnection.d.ts +31 -0
- package/dist/types/message-bus/fullscreen/watchElementDisconnection.d.ts.map +1 -0
- package/dist/types/message-bus/index.d.ts +21 -0
- package/dist/types/message-bus/index.d.ts.map +1 -0
- package/dist/types/message-bus/messageGuards.d.ts +24 -0
- package/dist/types/message-bus/messageGuards.d.ts.map +1 -0
- package/dist/types/pendingDesignTokens/fullscreenTransitionTokens.d.ts +21 -0
- package/dist/types/pendingDesignTokens/fullscreenTransitionTokens.d.ts.map +1 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShell.d.ts +7 -1
- package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/createUiShellFullscreenState.d.ts +50 -0
- package/dist/types/ui-shell/createUiShellFullscreenState.d.ts.map +1 -0
- package/dist/types/ui-shell/renderUiShell.d.ts +25 -0
- package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/useFullscreenChromeCollapse.d.ts +29 -0
- package/dist/types/ui-shell/useFullscreenChromeCollapse.d.ts.map +1 -0
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +17 -7
- package/dist/cjs/tools/createBrowserMessageBus.cjs +0 -48
- package/dist/cjs/tools/createBrowserMessageBus.cjs.map +0 -1
- package/dist/esm/tools/createBrowserMessageBus.js +0 -41
- package/dist/esm/tools/createBrowserMessageBus.js.map +0 -1
- package/dist/types/tools/createBrowserMessageBus.d.ts +0 -45
- package/dist/types/tools/createBrowserMessageBus.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","useOdysseyDesignTokens","AppSwitcher","InnerAppContainer","SideNav","SkipToContent","TopNav","TURN_OFF_APP_SWITCHER","useUiShellContext","emptySideNavItems","useMatchAppElementToUiShellAppArea","useScrollState","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","appIcons","isLoading","selectedAppName","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","MemoizedWideUiShellContent","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcher } from \"./AppSwitcher/AppSwitcher.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { SkipToContent } from \"./SkipToContent.js\";\nimport { TopNav } from \"./TopNav/TopNav.js\";\nimport {\n TURN_OFF_APP_SWITCHER,\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <SkipToContent appElement={appElement} />\n\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && appSwitcherProps !== TURN_OFF_APP_SWITCHER && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAAS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D,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAM0B,0BAA0B,GAAGhF,IAAI,CAACwC,kBAAkB,CAAC;AAC3DwC,0BAA0B,CAACC,WAAW,oDAAuB;AAE7D,SAASD,0BAA0B,IAAIxC,kBAAkB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","useHasActiveFullscreen","useOdysseyDesignTokens","AppSwitcher","InnerAppContainer","SideNav","SkipToContent","TopNav","TURN_OFF_APP_SWITCHER","useUiShellContext","emptySideNavItems","useFullscreenChromeCollapse","useMatchAppElementToUiShellAppArea","useScrollState","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","hasActiveFullscreen","isContentScrolled","appSwitcherContainerRef","bannersContainerRef","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","isChromeHidden","isAppSwitcherHidden","chromeElementRef","collapsedDimension","isCollapsed","isBannersHidden","isSideNavHidden","isTopNavHidden","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","hidden","banners","includes","fallback","appIcons","isLoading","selectedAppName","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","MemoizedWideUiShellContent","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { useHasActiveFullscreen } from \"../fullscreen/useFullscreen.js\";\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcher } from \"./AppSwitcher/AppSwitcher.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { SkipToContent } from \"./SkipToContent.js\";\nimport { TopNav } from \"./TopNav/TopNav.js\";\nimport {\n TURN_OFF_APP_SWITCHER,\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useFullscreenChromeCollapse } from \"./useFullscreenChromeCollapse.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n const hasActiveFullscreen = useHasActiveFullscreen();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const appSwitcherContainerRef = useRef<HTMLDivElement>(null);\n const bannersContainerRef = useRef<HTMLDivElement>(null);\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const { isChromeHidden: isAppSwitcherHidden } = useFullscreenChromeCollapse({\n chromeElementRef: appSwitcherContainerRef,\n collapsedDimension: \"width\",\n isCollapsed: hasActiveFullscreen,\n });\n\n const { isChromeHidden: isBannersHidden } = useFullscreenChromeCollapse({\n chromeElementRef: bannersContainerRef,\n collapsedDimension: \"height\",\n isCollapsed: hasActiveFullscreen,\n });\n\n const { isChromeHidden: isSideNavHidden } = useFullscreenChromeCollapse({\n chromeElementRef: sideNavContainerRef,\n collapsedDimension: \"width\",\n isCollapsed: hasActiveFullscreen,\n });\n\n const { isChromeHidden: isTopNavHidden } = useFullscreenChromeCollapse({\n chromeElementRef: topNavContainerRef,\n collapsedDimension: \"height\",\n isCollapsed: hasActiveFullscreen,\n });\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <SkipToContent appElement={appElement} />\n\n <StyledBannersContainer\n hidden={isBannersHidden}\n ref={bannersContainerRef}\n >\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer\n hidden={isAppSwitcherHidden}\n ref={appSwitcherContainerRef}\n >\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && appSwitcherProps !== TURN_OFF_APP_SWITCHER && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer\n hidden={isSideNavHidden}\n ref={sideNavContainerRef}\n >\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer hidden={isTopNavHidden} ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"Wide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AAkB,EAAE+B,cAAc,EAAE/B,kBAAmB;MACvDkD,GAAG,EAAEZ,iBAAkB;MACvB+B,QAAQ,EAAE,CAAE;MAAAlB,QAAA,EAEZ1D,IAAA,CAACX,iBAAiB;QAACmD,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAMqC,0BAA0B,GAAG9F,IAAI,CAAC0C,kBAAkB,CAAC;AAC3DoD,0BAA0B,CAACC,WAAW,oDAAuB;AAE7D,SAASD,0BAA0B,IAAIpD,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { createFullscreenId, createFullscreenModeMessageBus as defaultCreateFullscreenModeMessageBus, emptyFullscreenState, getHasActiveFullscreen } from "../message-bus/index.js";
|
|
14
|
+
import { createMessageBus } from "../tools/createMessageBus.js";
|
|
15
|
+
import { createStore } from "../tools/createStore.js";
|
|
16
|
+
export const createUiShellFullscreenState = ({
|
|
17
|
+
createFullscreenModeMessageBus = defaultCreateFullscreenModeMessageBus
|
|
18
|
+
} = {}) => {
|
|
19
|
+
const appFullscreenId = createFullscreenId();
|
|
20
|
+
const store = createStore({
|
|
21
|
+
connection: {}
|
|
22
|
+
});
|
|
23
|
+
const fullscreenStateBus = createMessageBus();
|
|
24
|
+
const getFullscreenModeMessageBus = () => store.getState("connection")?.fullscreenModeMessageBus;
|
|
25
|
+
const getFullscreenState = () => getFullscreenModeMessageBus()?.getFullscreenState() ?? emptyFullscreenState;
|
|
26
|
+
const exitAppFullscreen = () => {
|
|
27
|
+
getFullscreenModeMessageBus()?.exitFullscreen({
|
|
28
|
+
fullscreenId: appFullscreenId
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const connect = () => {
|
|
32
|
+
const fullscreenModeMessageBus = createFullscreenModeMessageBus();
|
|
33
|
+
const unsubscribeFromFullscreenState = fullscreenModeMessageBus.subscribeToFullscreenState(fullscreenStateBus.publish);
|
|
34
|
+
store.setState("connection", {
|
|
35
|
+
fullscreenModeMessageBus
|
|
36
|
+
});
|
|
37
|
+
fullscreenModeMessageBus.requestFullscreenState();
|
|
38
|
+
return () => {
|
|
39
|
+
exitAppFullscreen();
|
|
40
|
+
unsubscribeFromFullscreenState();
|
|
41
|
+
const hasUnreportedFullscreen = getHasActiveFullscreen(fullscreenModeMessageBus.getFullscreenState());
|
|
42
|
+
fullscreenModeMessageBus.destroy();
|
|
43
|
+
store.setState("connection", {});
|
|
44
|
+
if (hasUnreportedFullscreen) {
|
|
45
|
+
fullscreenStateBus.publish(emptyFullscreenState);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
connect,
|
|
51
|
+
enterAppFullscreen: () => {
|
|
52
|
+
getFullscreenModeMessageBus()?.enterFullscreen({
|
|
53
|
+
fullscreenId: appFullscreenId
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
exitAppFullscreen,
|
|
57
|
+
getFullscreenState,
|
|
58
|
+
subscribeToFullscreenState: fullscreenStateBus.subscribe
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=createUiShellFullscreenState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUiShellFullscreenState.js","names":["createFullscreenId","createFullscreenModeMessageBus","defaultCreateFullscreenModeMessageBus","emptyFullscreenState","getHasActiveFullscreen","createMessageBus","createStore","createUiShellFullscreenState","appFullscreenId","store","connection","fullscreenStateBus","getFullscreenModeMessageBus","getState","fullscreenModeMessageBus","getFullscreenState","exitAppFullscreen","exitFullscreen","fullscreenId","connect","unsubscribeFromFullscreenState","subscribeToFullscreenState","publish","setState","requestFullscreenState","hasUnreportedFullscreen","destroy","enterAppFullscreen","enterFullscreen","subscribe"],"sources":["../../../src/ui-shell/createUiShellFullscreenState.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n createFullscreenId,\n createFullscreenModeMessageBus as defaultCreateFullscreenModeMessageBus,\n emptyFullscreenState,\n type FullscreenModeMessageBus,\n type FullscreenState,\n getHasActiveFullscreen,\n} from \"../message-bus/index.js\";\nimport { createMessageBus } from \"../tools/createMessageBus.js\";\nimport { createStore } from \"../tools/createStore.js\";\n\nexport type DisconnectUiShellFullscreenState = () => void;\n\nexport type UiShellFullscreenState = {\n /**\n * Start listening for the page's fullscreen stack. UI Shell calls this when it mounts, and the function it returns when it unmounts, so the shell never leaves a listener on the page after it's gone.\n *\n * Disconnecting takes the app area out of fullscreen and reports an empty stack, since nothing is listening anymore.\n */\n connect: () => DisconnectUiShellFullscreenState;\n /**\n * Put the whole app area in fullscreen. UI Shell hides its top nav, side nav, and banners so the app fills the page. Does nothing while disconnected.\n */\n enterAppFullscreen: () => void;\n /**\n * Take the app area out of fullscreen. A `FullscreenRegion` that entered on top of it stays in fullscreen.\n */\n exitAppFullscreen: () => void;\n getFullscreenState: FullscreenModeMessageBus[\"getFullscreenState\"];\n /**\n * Listen for fullscreen changes. Listeners stay subscribed while UI Shell is removed and added back.\n */\n subscribeToFullscreenState: FullscreenModeMessageBus[\"subscribeToFullscreenState\"];\n};\n\nexport type CreateUiShellFullscreenStateArgs = {\n /**\n * Creates the message bus that reads and changes the page's fullscreen stack.\n * @default createFullscreenModeMessageBus\n */\n createFullscreenModeMessageBus?: () => FullscreenModeMessageBus;\n};\n\n/**\n * Create the fullscreen mode instance `renderUiShell` hands to apps not built with Odyssey's React components, so a non-React app can put its whole app area in fullscreen.\n *\n * The app area is one more id in the page's fullscreen stack, so a `FullscreenRegion` can still enter on top of it and Escape goes back one step at a time.\n *\n * It only listens to the page while connected. `renderUiShell` has no dispose call, so the shell's own mount and unmount are the only reliable signal that it's gone.\n */\nexport const createUiShellFullscreenState = ({\n createFullscreenModeMessageBus = defaultCreateFullscreenModeMessageBus,\n}: CreateUiShellFullscreenStateArgs = {}): UiShellFullscreenState => {\n const appFullscreenId = createFullscreenId();\n\n const store = createStore<{\n connection: { fullscreenModeMessageBus?: FullscreenModeMessageBus };\n }>({ connection: {} });\n\n // Listeners subscribe here rather than on the connection, so they outlive a shell removed and added back.\n const fullscreenStateBus = createMessageBus<FullscreenState>();\n\n const getFullscreenModeMessageBus = () =>\n store.getState(\"connection\")?.fullscreenModeMessageBus;\n\n const getFullscreenState = (): FullscreenState =>\n getFullscreenModeMessageBus()?.getFullscreenState() ?? emptyFullscreenState;\n\n const exitAppFullscreen = () => {\n getFullscreenModeMessageBus()?.exitFullscreen({\n fullscreenId: appFullscreenId,\n });\n };\n\n const connect = () => {\n const fullscreenModeMessageBus = createFullscreenModeMessageBus();\n\n const unsubscribeFromFullscreenState =\n fullscreenModeMessageBus.subscribeToFullscreenState(\n fullscreenStateBus.publish,\n );\n\n store.setState(\"connection\", { fullscreenModeMessageBus });\n fullscreenModeMessageBus.requestFullscreenState();\n\n return () => {\n exitAppFullscreen();\n unsubscribeFromFullscreenState();\n\n const hasUnreportedFullscreen = getHasActiveFullscreen(\n fullscreenModeMessageBus.getFullscreenState(),\n );\n\n fullscreenModeMessageBus.destroy();\n store.setState(\"connection\", {});\n\n // The host's next snapshot can't reach a bus that's already closed, so listeners hear the empty stack from here.\n if (hasUnreportedFullscreen) {\n fullscreenStateBus.publish(emptyFullscreenState);\n }\n };\n };\n\n return {\n connect,\n enterAppFullscreen: () => {\n getFullscreenModeMessageBus()?.enterFullscreen({\n fullscreenId: appFullscreenId,\n });\n },\n exitAppFullscreen,\n getFullscreenState,\n subscribeToFullscreenState: fullscreenStateBus.subscribe,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,kBAAkB,EAClBC,8BAA8B,IAAIC,qCAAqC,EACvEC,oBAAoB,EAGpBC,sBAAsB,QACjB,yBAAyB;AAChC,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,SAASC,WAAW,QAAQ,yBAAyB;AAyCrD,OAAO,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CN,8BAA8B,GAAGC;AACD,CAAC,GAAG,CAAC,CAAC,KAA6B;EACnE,MAAMM,eAAe,GAAGR,kBAAkB,CAAC,CAAC;EAE5C,MAAMS,KAAK,GAAGH,WAAW,CAEtB;IAAEI,UAAU,EAAE,CAAC;EAAE,CAAC,CAAC;EAGtB,MAAMC,kBAAkB,GAAGN,gBAAgB,CAAkB,CAAC;EAE9D,MAAMO,2BAA2B,GAAGA,CAAA,KAClCH,KAAK,CAACI,QAAQ,CAAC,YAAY,CAAC,EAAEC,wBAAwB;EAExD,MAAMC,kBAAkB,GAAGA,CAAA,KACzBH,2BAA2B,CAAC,CAAC,EAAEG,kBAAkB,CAAC,CAAC,IAAIZ,oBAAoB;EAE7E,MAAMa,iBAAiB,GAAGA,CAAA,KAAM;IAC9BJ,2BAA2B,CAAC,CAAC,EAAEK,cAAc,CAAC;MAC5CC,YAAY,EAAEV;IAChB,CAAC,CAAC;EACJ,CAAC;EAED,MAAMW,OAAO,GAAGA,CAAA,KAAM;IACpB,MAAML,wBAAwB,GAAGb,8BAA8B,CAAC,CAAC;IAEjE,MAAMmB,8BAA8B,GAClCN,wBAAwB,CAACO,0BAA0B,CACjDV,kBAAkB,CAACW,OACrB,CAAC;IAEHb,KAAK,CAACc,QAAQ,CAAC,YAAY,EAAE;MAAET;IAAyB,CAAC,CAAC;IAC1DA,wBAAwB,CAACU,sBAAsB,CAAC,CAAC;IAEjD,OAAO,MAAM;MACXR,iBAAiB,CAAC,CAAC;MACnBI,8BAA8B,CAAC,CAAC;MAEhC,MAAMK,uBAAuB,GAAGrB,sBAAsB,CACpDU,wBAAwB,CAACC,kBAAkB,CAAC,CAC9C,CAAC;MAEDD,wBAAwB,CAACY,OAAO,CAAC,CAAC;MAClCjB,KAAK,CAACc,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;MAGhC,IAAIE,uBAAuB,EAAE;QAC3Bd,kBAAkB,CAACW,OAAO,CAACnB,oBAAoB,CAAC;MAClD;IACF,CAAC;EACH,CAAC;EAED,OAAO;IACLgB,OAAO;IACPQ,kBAAkB,EAAEA,CAAA,KAAM;MACxBf,2BAA2B,CAAC,CAAC,EAAEgB,eAAe,CAAC;QAC7CV,YAAY,EAAEV;MAChB,CAAC,CAAC;IACJ,CAAC;IACDQ,iBAAiB;IACjBD,kBAAkB;IAClBM,0BAA0B,EAAEV,kBAAkB,CAACkB;EACjD,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ import { ErrorBoundary } from "react-error-boundary";
|
|
|
14
14
|
import { bufferLatest } from "../tools/bufferLatest.js";
|
|
15
15
|
import { createMessageBus } from "../tools/createMessageBus.js";
|
|
16
16
|
import { renderReactInWebComponent } from "../web-component/renderReactInWebComponent.js";
|
|
17
|
+
import { createUiShellFullscreenState } from "./createUiShellFullscreenState.js";
|
|
17
18
|
import { UiShell } from "./UiShell.js";
|
|
18
19
|
import { uiShellDataAttribute } from "./useHasUiShell.js";
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -76,6 +77,19 @@ export const renderUiShell = ({
|
|
|
76
77
|
publish: closeSideNavMenu,
|
|
77
78
|
subscribe: subscribeToCloseSideNavMenu
|
|
78
79
|
} = createMessageBus();
|
|
80
|
+
const {
|
|
81
|
+
connect: connectFullscreenState,
|
|
82
|
+
enterAppFullscreen: enterAppFullscreenNow,
|
|
83
|
+
exitAppFullscreen: exitAppFullscreenNow,
|
|
84
|
+
getFullscreenState,
|
|
85
|
+
subscribeToFullscreenState
|
|
86
|
+
} = createUiShellFullscreenState();
|
|
87
|
+
const requestAfterReactAppReady = bufferLatest({
|
|
88
|
+
publish: sendFullscreenRequest => sendFullscreenRequest(),
|
|
89
|
+
subscribe: subscribeToReactAppSubscribed
|
|
90
|
+
});
|
|
91
|
+
const enterAppFullscreen = () => requestAfterReactAppReady(enterAppFullscreenNow);
|
|
92
|
+
const exitAppFullscreen = () => requestAfterReactAppReady(exitAppFullscreenNow);
|
|
79
93
|
const slottedElements = Object.fromEntries(Object.entries(optionalComponentSlotNames).map(([optionalComponentKey, slotName]) => {
|
|
80
94
|
const element = document.createElement("div");
|
|
81
95
|
element.setAttribute("slot", slotName);
|
|
@@ -95,6 +109,7 @@ export const renderUiShell = ({
|
|
|
95
109
|
appElementScrollingMode: appElementScrollingMode,
|
|
96
110
|
breakpointConfig: breakpointConfig,
|
|
97
111
|
closeSideNavMenu: closeSideNavMenu,
|
|
112
|
+
connectFullscreenState: connectFullscreenState,
|
|
98
113
|
hasStandardAppContentPadding: hasStandardAppContentPadding,
|
|
99
114
|
initialVisibleSections: initialVisibleSections,
|
|
100
115
|
onError: onError,
|
|
@@ -123,9 +138,13 @@ export const renderUiShell = ({
|
|
|
123
138
|
appElement,
|
|
124
139
|
closeRightSideMenu,
|
|
125
140
|
closeSideNavMenu,
|
|
141
|
+
enterAppFullscreen,
|
|
142
|
+
exitAppFullscreen,
|
|
143
|
+
getFullscreenState,
|
|
126
144
|
setComponentProps: publishAfterReactAppReadyForProps,
|
|
127
145
|
setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,
|
|
128
146
|
slottedElements,
|
|
147
|
+
subscribeToFullscreenState,
|
|
129
148
|
uiShellElement
|
|
130
149
|
});
|
|
131
150
|
});
|
|
@@ -134,9 +153,13 @@ export const renderUiShell = ({
|
|
|
134
153
|
appElement,
|
|
135
154
|
closeRightSideMenu,
|
|
136
155
|
closeSideNavMenu,
|
|
156
|
+
enterAppFullscreen,
|
|
157
|
+
exitAppFullscreen,
|
|
158
|
+
getFullscreenState,
|
|
137
159
|
setComponentProps: publishAfterReactAppReadyForProps,
|
|
138
160
|
setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,
|
|
139
161
|
slottedElements,
|
|
162
|
+
subscribeToFullscreenState,
|
|
140
163
|
uiShellElement
|
|
141
164
|
};
|
|
142
165
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","languageCode","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","translationOverrides","nonce","window","cspNonce","document","createElement","setAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","publishAfterReactAppReadyForTranslationSettings","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","getReactComponent","reactRootElements","fallback","children","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","setTranslationSettings","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport {\n UiShell,\n UiShellProps,\n UiShellTranslationSettings,\n} from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n /**\n * Update the shell's translation settings (`languageCode`, `translationOverrides`) at runtime.\n *\n * Call this after the consumer's locale changes to re-localize shell-rendered chrome (skip-to-content link, top nav icons, side nav toggle) without re-rendering UI Shell.\n *\n * Accepts a React `SetStateAction`: passing a plain object **replaces** the entire settings value (so omitting `translationOverrides` clears it). Pass an updater function — `(previous) => ({ ...previous, languageCode: \"es\" })` — to merge with\n * the previous value.\n */\n setTranslationSettings: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellTranslationSettings>>\n >;\n slottedElements: SlottedElements;\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n languageCode,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n translationOverrides,\n nonce = window.cspNonce,\n}: {\n /**\n * Optional nonce for CSP compliance.\n */\n nonce?: string;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<UiShellTranslationSettings> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishTranslationSettings,\n subscribe: subscribeToTranslationSettings,\n } = createMessageBus<SetStateAction<UiShellTranslationSettings>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const publishAfterReactAppReadyForTranslationSettings = bufferLatest({\n publish: publishTranslationSettings,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n publishAfterReactAppReadyForTranslationSettings({\n languageCode,\n translationOverrides,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n breakpointConfig={breakpointConfig}\n closeSideNavMenu={closeSideNavMenu}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n subscribeToTranslationSettings={subscribeToTranslationSettings}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n nonce,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA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BAAiB,EAAE9B,iCAAiC;IACpD+B,sBAAsB,EAAE9B,+CAA+C;IACvEK,eAAe;IACfU;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","createUiShellFullscreenState","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","languageCode","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","translationOverrides","nonce","window","cspNonce","document","createElement","setAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","publishAfterReactAppReadyForTranslationSettings","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","connect","connectFullscreenState","enterAppFullscreen","enterAppFullscreenNow","exitAppFullscreen","exitAppFullscreenNow","getFullscreenState","subscribeToFullscreenState","requestAfterReactAppReady","sendFullscreenRequest","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","getReactComponent","reactRootElements","fallback","children","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","setTranslationSettings","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { type FullscreenModeMessageBus } from \"../message-bus/index.js\";\nimport { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { createUiShellFullscreenState } from \"./createUiShellFullscreenState.js\";\nimport {\n UiShell,\n UiShellProps,\n UiShellTranslationSettings,\n} from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n /**\n * Put the whole app area in fullscreen. UI Shell hides its top nav, side nav, and banners so the app fills the page.\n *\n * Use this when your app isn't built with Odyssey's `FullscreenButton`, for example a non-React app.\n *\n * The app area is one more entry in the page's fullscreen stack, so a `FullscreenRegion` can enter on top of it, and Escape goes back one step at a time. Removing `uiShellElement` from the page clears the stack.\n */\n enterAppFullscreen: () => void;\n /**\n * Take the app area out of fullscreen. A `FullscreenRegion` that entered on top of it stays in fullscreen.\n */\n exitAppFullscreen: () => void;\n /**\n * The page's current fullscreen state.\n */\n getFullscreenState: FullscreenModeMessageBus[\"getFullscreenState\"];\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n /**\n * Update the shell's translation settings (`languageCode`, `translationOverrides`) at runtime.\n *\n * Call this after the consumer's locale changes to re-localize shell-rendered chrome (skip-to-content link, top nav icons, side nav toggle) without re-rendering UI Shell.\n *\n * Accepts a React `SetStateAction`: passing a plain object **replaces** the entire settings value (so omitting `translationOverrides` clears it). Pass an updater function — `(previous) => ({ ...previous, languageCode: \"es\" })` — to merge with\n * the previous value.\n */\n setTranslationSettings: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellTranslationSettings>>\n >;\n slottedElements: SlottedElements;\n /**\n * Listen for fullscreen changes anywhere on the page, including ones from other apps. Returns a function that stops listening.\n */\n subscribeToFullscreenState: FullscreenModeMessageBus[\"subscribeToFullscreenState\"];\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n languageCode,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n translationOverrides,\n nonce = window.cspNonce,\n}: {\n /**\n * Optional nonce for CSP compliance.\n */\n nonce?: string;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<UiShellTranslationSettings> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishTranslationSettings,\n subscribe: subscribeToTranslationSettings,\n } = createMessageBus<SetStateAction<UiShellTranslationSettings>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const publishAfterReactAppReadyForTranslationSettings = bufferLatest({\n publish: publishTranslationSettings,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n publishAfterReactAppReadyForTranslationSettings({\n languageCode,\n translationOverrides,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const {\n connect: connectFullscreenState,\n enterAppFullscreen: enterAppFullscreenNow,\n exitAppFullscreen: exitAppFullscreenNow,\n getFullscreenState,\n subscribeToFullscreenState,\n } = createUiShellFullscreenState();\n\n // The page's fullscreen host starts when UI Shell's React tree renders, so a request made before then would reach no one. Like props, only the latest request is kept, so an enter followed by an exit leaves the app where it was.\n const requestAfterReactAppReady = bufferLatest<() => void>({\n publish: (sendFullscreenRequest) => sendFullscreenRequest(),\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const enterAppFullscreen = () =>\n requestAfterReactAppReady(enterAppFullscreenNow);\n\n const exitAppFullscreen = () =>\n requestAfterReactAppReady(exitAppFullscreenNow);\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n breakpointConfig={breakpointConfig}\n closeSideNavMenu={closeSideNavMenu}\n connectFullscreenState={connectFullscreenState}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n subscribeToTranslationSettings={subscribeToTranslationSettings}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n nonce,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n } satisfies RenderedUiShell;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,sBAAsB;AAGpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,gBAAgB,QAAwB,8BAA8B;AAC/E,SAASC,yBAAyB,QAAQ,+CAA+C;AACzF,SAASC,4BAA4B,QAAQ,mCAAmC;AAChF,SACEC,OAAO,QAGF,cAAc;AAErB,SAASC,oBAAoB,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1D,OAAO,MAAMC,0BAGZ,GAAG;EACFC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AAyDD,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;E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,WAAW,CAACxE,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACVgC,kBAAkB;IAClBE,gBAAgB;IAChBI,kBAAkB;IAClBE,iBAAiB;IACjBE,kBAAkB;IAClB4B,iBAAiB,EAAExC,iCAAiC;IACpDyC,sBAAsB,EAAExC,+CAA+C;IACvEe,eAAe;IACfH,0BAA0B;IAC1Ba;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
14
|
+
import { useAnimation } from "../AnimationContext.js";
|
|
15
|
+
import { fullscreenTransitionTokens } from "../pendingDesignTokens/fullscreenTransitionTokens.js";
|
|
16
|
+
export const useFullscreenChromeCollapse = ({
|
|
17
|
+
chromeElementRef,
|
|
18
|
+
collapsedDimension,
|
|
19
|
+
isCollapsed
|
|
20
|
+
}) => {
|
|
21
|
+
const hasAnimations = useAnimation();
|
|
22
|
+
const [hasFinishedCollapsing, setHasFinishedCollapsing] = useState(isCollapsed);
|
|
23
|
+
const previousIsCollapsedRef = useRef(isCollapsed);
|
|
24
|
+
const interruptedSizeRef = useRef(undefined);
|
|
25
|
+
useLayoutEffect(() => {
|
|
26
|
+
const hasCollapseChanged = previousIsCollapsedRef.current !== isCollapsed;
|
|
27
|
+
previousIsCollapsedRef.current = isCollapsed;
|
|
28
|
+
if (!isCollapsed) {
|
|
29
|
+
setHasFinishedCollapsing(false);
|
|
30
|
+
}
|
|
31
|
+
const chromeElement = chromeElementRef.current;
|
|
32
|
+
if (!hasCollapseChanged || !hasAnimations || !chromeElement) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const expandedKeyframe = {
|
|
36
|
+
[collapsedDimension]: `${chromeElement.getBoundingClientRect()[collapsedDimension]}px`,
|
|
37
|
+
overflow: "hidden"
|
|
38
|
+
};
|
|
39
|
+
const collapsedKeyframe = {
|
|
40
|
+
[collapsedDimension]: "0px",
|
|
41
|
+
overflow: "hidden"
|
|
42
|
+
};
|
|
43
|
+
const interruptedSize = interruptedSizeRef.current;
|
|
44
|
+
interruptedSizeRef.current = undefined;
|
|
45
|
+
const restingStartKeyframe = isCollapsed ? expandedKeyframe : collapsedKeyframe;
|
|
46
|
+
const startKeyframe = interruptedSize === undefined ? restingStartKeyframe : {
|
|
47
|
+
[collapsedDimension]: `${interruptedSize}px`,
|
|
48
|
+
overflow: "hidden"
|
|
49
|
+
};
|
|
50
|
+
const chromeAnimation = chromeElement.animate(isCollapsed ? [startKeyframe, collapsedKeyframe] : [startKeyframe, expandedKeyframe], {
|
|
51
|
+
duration: fullscreenTransitionTokens.durationMilliseconds,
|
|
52
|
+
easing: fullscreenTransitionTokens.easing,
|
|
53
|
+
fill: isCollapsed ? "forwards" : "none"
|
|
54
|
+
});
|
|
55
|
+
if (isCollapsed) {
|
|
56
|
+
chromeAnimation.addEventListener("finish", () => {
|
|
57
|
+
setHasFinishedCollapsing(true);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return () => {
|
|
61
|
+
interruptedSizeRef.current = chromeAnimation.playState === "running" ? chromeElement.getBoundingClientRect()[collapsedDimension] : undefined;
|
|
62
|
+
chromeAnimation.cancel();
|
|
63
|
+
};
|
|
64
|
+
}, [chromeElementRef, collapsedDimension, hasAnimations, isCollapsed]);
|
|
65
|
+
return {
|
|
66
|
+
isChromeHidden: isCollapsed && (hasFinishedCollapsing || !hasAnimations)
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=useFullscreenChromeCollapse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFullscreenChromeCollapse.js","names":["useLayoutEffect","useRef","useState","useAnimation","fullscreenTransitionTokens","useFullscreenChromeCollapse","chromeElementRef","collapsedDimension","isCollapsed","hasAnimations","hasFinishedCollapsing","setHasFinishedCollapsing","previousIsCollapsedRef","interruptedSizeRef","undefined","hasCollapseChanged","current","chromeElement","expandedKeyframe","getBoundingClientRect","overflow","collapsedKeyframe","interruptedSize","restingStartKeyframe","startKeyframe","chromeAnimation","animate","duration","durationMilliseconds","easing","fill","addEventListener","playState","cancel","isChromeHidden"],"sources":["../../../src/ui-shell/useFullscreenChromeCollapse.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type RefObject, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { useAnimation } from \"../AnimationContext.js\";\nimport { fullscreenTransitionTokens } from \"../pendingDesignTokens/fullscreenTransitionTokens.js\";\n\nexport type UseFullscreenChromeCollapseArgs = {\n /** The part of the shell that shrinks away while fullscreen is active. */\n chromeElementRef: RefObject<HTMLElement | null>;\n /** The side that shrinks: `height` for a bar across the shell, `width` for a column beside the app. */\n collapsedDimension: \"height\" | \"width\";\n /** If `true`, fullscreen is active and the chrome collapses. */\n isCollapsed: boolean;\n};\n\n/**\n * Shrinks a part of the shell to nothing when fullscreen starts, and grows it back when fullscreen ends, so the user can see where the navigation went.\n *\n * Returns `isChromeHidden`, which turns `true` only once the collapse has finished.\n */\nexport const useFullscreenChromeCollapse = ({\n chromeElementRef,\n collapsedDimension,\n isCollapsed,\n}: UseFullscreenChromeCollapseArgs) => {\n const hasAnimations = useAnimation();\n const [hasFinishedCollapsing, setHasFinishedCollapsing] =\n useState(isCollapsed);\n const previousIsCollapsedRef = useRef(isCollapsed);\n const interruptedSizeRef = useRef<number>(undefined);\n\n // A layout effect, so the first keyframe applies before the browser paints the new state.\n useLayoutEffect(() => {\n const hasCollapseChanged = previousIsCollapsedRef.current !== isCollapsed;\n previousIsCollapsedRef.current = isCollapsed;\n\n if (!isCollapsed) {\n setHasFinishedCollapsing(false);\n }\n\n const chromeElement = chromeElementRef.current;\n\n if (!hasCollapseChanged || !hasAnimations || !chromeElement) {\n return;\n }\n\n const expandedKeyframe = {\n [collapsedDimension]: `${chromeElement.getBoundingClientRect()[collapsedDimension]}px`,\n overflow: \"hidden\",\n };\n const collapsedKeyframe = {\n [collapsedDimension]: \"0px\",\n overflow: \"hidden\",\n };\n // Fullscreen can end before the collapse finishes. Starting from the size the chrome had reached keeps it from snapping shut before it grows back.\n const interruptedSize = interruptedSizeRef.current;\n interruptedSizeRef.current = undefined;\n const restingStartKeyframe = isCollapsed\n ? expandedKeyframe\n : collapsedKeyframe;\n const startKeyframe =\n interruptedSize === undefined\n ? restingStartKeyframe\n : { [collapsedDimension]: `${interruptedSize}px`, overflow: \"hidden\" };\n\n const chromeAnimation = chromeElement.animate(\n isCollapsed\n ? [startKeyframe, collapsedKeyframe]\n : [startKeyframe, expandedKeyframe],\n {\n duration: fullscreenTransitionTokens.durationMilliseconds,\n easing: fullscreenTransitionTokens.easing,\n // Holds the collapsed size until React hides the element. Without it, the chrome springs back to full size for a frame after the animation ends.\n fill: isCollapsed ? \"forwards\" : \"none\",\n },\n );\n\n if (isCollapsed) {\n chromeAnimation.addEventListener(\"finish\", () => {\n setHasFinishedCollapsing(true);\n });\n }\n\n return () => {\n // Read before cancelling, while the animation still holds the in-between size.\n interruptedSizeRef.current =\n chromeAnimation.playState === \"running\"\n ? chromeElement.getBoundingClientRect()[collapsedDimension]\n : undefined;\n chromeAnimation.cancel();\n };\n }, [chromeElementRef, collapsedDimension, hasAnimations, isCollapsed]);\n\n return {\n isChromeHidden: isCollapsed && (hasFinishedCollapsing || !hasAnimations),\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAyBA,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAEzE,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,0BAA0B,QAAQ,sDAAsD;AAgBjG,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC1CC,gBAAgB;EAChBC,kBAAkB;EAClBC;AAC+B,CAAC,KAAK;EACrC,MAAMC,aAAa,GAAGN,YAAY,CAAC,CAAC;EACpC,MAAM,CAACO,qBAAqB,EAAEC,wBAAwB,CAAC,GACrDT,QAAQ,CAACM,WAAW,CAAC;EACvB,MAAMI,sBAAsB,GAAGX,MAAM,CAACO,WAAW,CAAC;EAClD,MAAMK,kBAAkB,GAAGZ,MAAM,CAASa,SAAS,CAAC;EAGpDd,eAAe,CAAC,MAAM;IACpB,MAAMe,kBAAkB,GAAGH,sBAAsB,CAACI,OAAO,KAAKR,WAAW;IACzEI,sBAAsB,CAACI,OAAO,GAAGR,WAAW;IAE5C,IAAI,CAACA,WAAW,EAAE;MAChBG,wBAAwB,CAAC,KAAK,CAAC;IACjC;IAEA,MAAMM,aAAa,GAAGX,gBAAgB,CAACU,OAAO;IAE9C,IAAI,CAACD,kBAAkB,IAAI,CAACN,aAAa,IAAI,CAACQ,aAAa,EAAE;MAC3D;IACF;IAEA,MAAMC,gBAAgB,GAAG;MACvB,CAACX,kBAAkB,GAAG,GAAGU,aAAa,CAACE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AAE1B,WAAW,KAAKE,qBAAqB,IAAI,CAACD,aAAa;EACzE,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/export default "1-71-
|
|
11
|
+
*/export default "1-71-1";
|
|
12
12
|
//# sourceMappingURL=odysseyWebComponentVersion.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-71-
|
|
1
|
+
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-71-1\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
|