@okta/odyssey-react-mui 1.71.0 → 1.72.0
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 +6 -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 +10 -3
- package/dist/cjs/Dialog.cjs.map +1 -1
- package/dist/cjs/Drawer.cjs +13 -3
- package/dist/cjs/Drawer.cjs.map +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 +17 -13
- package/dist/cjs/FullScreenOverlay.cjs.map +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +19 -1
- package/dist/cjs/FullScreenOverlayContext.cjs.map +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 -2
- package/dist/cjs/ToastStack.cjs.map +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Typography.cjs +12 -12
- package/dist/cjs/backdropStack.cjs +75 -0
- package/dist/cjs/backdropStack.cjs.map +1 -0
- 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/charts/utils/useStableValue.cjs +5 -3
- package/dist/cjs/charts/utils/useStableValue.cjs.map +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 +407 -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/isDeepEqual.cjs +93 -0
- package/dist/cjs/isDeepEqual.cjs.map +1 -0
- 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 +6 -3
- package/dist/cjs/labs/DataView/DataView.cjs.map +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_cs.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +6 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +6 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +7 -3
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +6 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +6 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +9 -5
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.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/properties/ts/odyssey-react-mui_pl.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +10 -6
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/theme/components/Backdrop.cjs +2 -1
- package/dist/cjs/theme/components/Backdrop.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/useStackedBackdropProps.cjs +40 -0
- package/dist/cjs/useStackedBackdropProps.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 +6 -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 +10 -3
- package/dist/esm/Dialog.js.map +1 -1
- package/dist/esm/Drawer.js +13 -3
- package/dist/esm/Drawer.js.map +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 +18 -12
- package/dist/esm/FullScreenOverlay.js.map +1 -1
- package/dist/esm/FullScreenOverlayContext.js +19 -1
- package/dist/esm/FullScreenOverlayContext.js.map +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 -2
- package/dist/esm/ToastStack.js.map +1 -1
- package/dist/esm/Tooltip.js +1 -1
- package/dist/esm/Typography.js +12 -12
- package/dist/esm/backdropStack.js +68 -0
- package/dist/esm/backdropStack.js.map +1 -0
- 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/charts/utils/useStableValue.js +5 -2
- package/dist/esm/charts/utils/useStableValue.js.map +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 +404 -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/isDeepEqual.js +86 -0
- package/dist/esm/isDeepEqual.js.map +1 -0
- 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 +6 -3
- package/dist/esm/labs/DataView/DataView.js.map +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_cs.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +6 -2
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +6 -2
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +7 -3
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +6 -2
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +6 -2
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +9 -5
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.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/properties/ts/odyssey-react-mui_pl.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +10 -6
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/theme/components/Backdrop.js +2 -1
- package/dist/esm/theme/components/Backdrop.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/useStackedBackdropProps.js +35 -0
- package/dist/esm/useStackedBackdropProps.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 +6 -2
- package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
- package/dist/types/Dialog.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/FullScreenOverlay.d.ts +4 -1
- package/dist/types/FullScreenOverlay.d.ts.map +1 -1
- package/dist/types/FullScreenOverlayContext.d.ts +5 -0
- package/dist/types/FullScreenOverlayContext.d.ts.map +1 -1
- package/dist/types/backdropStack.d.ts +41 -0
- package/dist/types/backdropStack.d.ts.map +1 -0
- package/dist/types/charts/utils/useStableValue.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 +154 -30
- 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/isDeepEqual.d.ts +22 -0
- package/dist/types/isDeepEqual.d.ts.map +1 -0
- package/dist/types/labs/DataView/DataView.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_cs.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +6 -2
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +6 -2
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +7 -3
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +6 -2
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +6 -2
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +9 -5
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.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/properties/ts/odyssey-react-mui_pl.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +10 -6
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/theme/components/Backdrop.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/useStackedBackdropProps.d.ts +36 -0
- package/dist/types/useStackedBackdropProps.d.ts.map +1 -0
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +20 -25
- package/src/properties/odyssey-react-mui.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_cs.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_da.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_de.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_el.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_es.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_eu.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_fi.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_fr.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ht.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_hu.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_id.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_it.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ja.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ko.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ms.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_nb.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_nl_NL.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ok_PL.properties +147 -0
- package/src/properties/translations/odyssey-react-mui_ok_SK.properties +147 -0
- package/src/properties/translations/odyssey-react-mui_pl.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_pt_BR.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ro.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_ru.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_sv.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_th.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_tr.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_uk.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_vi.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_zh_CN.properties +156 -0
- package/src/properties/translations/odyssey-react-mui_zh_TW.properties +156 -0
- package/src/properties/ts/odyssey-react-mui.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_cs.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_da.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_de.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_el.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_es.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_eu.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_fi.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_fr.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ht.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_hu.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_id.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_it.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ja.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ko.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ms.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_nb.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ok_PL.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ok_SK.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_pl.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ro.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_ru.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_sv.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_th.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_tr.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_uk.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_vi.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -0
- package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -0
- 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
package/README.md
CHANGED
|
@@ -143,6 +143,132 @@ Components are published in an ESM format transpiled for the modern browsers wit
|
|
|
143
143
|
|
|
144
144
|
[1]: https://help.okta.com/en/prod/Content/Topics/Miscellaneous/Platforms_Browser_OS_Support.htm
|
|
145
145
|
|
|
146
|
+
## Message bus
|
|
147
|
+
|
|
148
|
+
`@okta/odyssey-react-mui/message-bus` sends typed, versioned messages between Odyssey apps and Unified UI Shell when each one bundles its own copy of Odyssey. The apps on a page share only `window`, so messages travel over `window.postMessage` and every received message is checked. Nothing on this subpath imports React or MUI, so an app not built with React can use it.
|
|
149
|
+
|
|
150
|
+
Odyssey's fullscreen components and Unified UI Shell use it under the hood. Import it directly only to define a channel of your own, or to run the fullscreen host in an app without UI Shell.
|
|
151
|
+
|
|
152
|
+
### Messages
|
|
153
|
+
|
|
154
|
+
Every message is a `{ type, payload }` object, the same shape Redux uses. `type` is `"<domain>/<event>"`, such as `"fullscreen/enterRequested"`.
|
|
155
|
+
|
|
156
|
+
On the wire, each message is wrapped in an envelope:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"channelName": "odyssey-fullscreen",
|
|
161
|
+
"message": {
|
|
162
|
+
"payload": { "fullscreenId": "…" },
|
|
163
|
+
"type": "fullscreen/enterRequested"
|
|
164
|
+
},
|
|
165
|
+
"protocolVersion": 1
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
A receiver drops a message when any of these is true:
|
|
170
|
+
|
|
171
|
+
- It came from another origin.
|
|
172
|
+
- It's on another channel.
|
|
173
|
+
- It's from another `protocolVersion`.
|
|
174
|
+
- Its payload doesn't pass the channel's check.
|
|
175
|
+
|
|
176
|
+
#### Versions
|
|
177
|
+
|
|
178
|
+
Apps and UI Shell move to new Odyssey versions on their own schedules, so a page often runs several versions at once. Each channel has a whole-number `protocolVersion`.
|
|
179
|
+
|
|
180
|
+
| Change | Breaking? | What to do |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| Add a message type | No | Nothing. Older receivers ignore types they don't know. |
|
|
183
|
+
| Add an optional payload field | No | Nothing. Older receivers ignore fields they don't know. |
|
|
184
|
+
| Rename, remove, or change the meaning of a type or field | Yes | Raise `protocolVersion`, and keep sending the old version until every receiver understands the new one. |
|
|
185
|
+
|
|
186
|
+
Never change a channel's messages in place. Its definition is a contract with code you don't control.
|
|
187
|
+
|
|
188
|
+
#### Defining a channel
|
|
189
|
+
|
|
190
|
+
`createMessageChannel` turns one set of payload checks into the TypeScript types, the runtime check, and a typed creator for each message:
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
import {
|
|
194
|
+
createBrowserMessageBus,
|
|
195
|
+
createMessageChannel,
|
|
196
|
+
} from "@okta/odyssey-react-mui/message-bus";
|
|
197
|
+
|
|
198
|
+
const toastMessageChannel = createMessageChannel({
|
|
199
|
+
channelName: "my-app-toasts",
|
|
200
|
+
messageDomain: "toast",
|
|
201
|
+
payloadGuards: {
|
|
202
|
+
shown: (payload: unknown): payload is { text: string } =>
|
|
203
|
+
typeof payload === "object" &&
|
|
204
|
+
payload !== null &&
|
|
205
|
+
"text" in payload &&
|
|
206
|
+
typeof payload.text === "string",
|
|
207
|
+
},
|
|
208
|
+
protocolVersion: 1,
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
const toastMessageBus = createBrowserMessageBus({
|
|
212
|
+
messageChannel: toastMessageChannel,
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
toastMessageBus.subscribe((toastMessage) => {
|
|
216
|
+
// toastMessage is { payload: { text: string }; type: "toast/shown" }
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
toastMessageBus.publish(
|
|
220
|
+
toastMessageChannel.messageCreators.shown({ text: "Saved" }),
|
|
221
|
+
);
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Messages arrive asynchronously, and the sender receives its own messages too. A message is copied with the structured clone algorithm, so it can't hold functions, symbols, or DOM elements.
|
|
225
|
+
|
|
226
|
+
### Fullscreen
|
|
227
|
+
|
|
228
|
+
The page keeps one **stack** of fullscreen ids. The id on top is the region shown in fullscreen. The ones under it are covered, and each is shown again as the one above it exits.
|
|
229
|
+
|
|
230
|
+
One **host** owns the stack: `createFullscreenModeHost`. Unified UI Shell runs it, because only one shell renders on a page while any number of apps can. Each app makes a `createFullscreenModeMessageBus`, which only asks the host for changes and reports the stacks the host sends back.
|
|
231
|
+
|
|
232
|
+
| Message | Sent by | What it does |
|
|
233
|
+
| --- | --- | --- |
|
|
234
|
+
| `fullscreen/enterRequested` | app | Puts an id on top. An id already in the stack moves to the top. |
|
|
235
|
+
| `fullscreen/exitRequested` | app, or the host on Escape | Removes an id, wherever it is. |
|
|
236
|
+
| `fullscreen/exitAllRequested` | app | Empties the stack. |
|
|
237
|
+
| `fullscreen/stateRequested` | app or host, on start | Asks the host for the current stack. |
|
|
238
|
+
| `fullscreen/stateChanged` | host | The whole stack, bottom first. Sent after every change and in reply to `stateRequested`. |
|
|
239
|
+
|
|
240
|
+
An app that starts late gets the same `stateChanged` snapshot every other app got. It never sees an `entered` replayed, so animations tied to entering can't run twice.
|
|
241
|
+
|
|
242
|
+
Without a host on the page, requests go unanswered and the stack stays empty. An app that renders without UI Shell has to call `createFullscreenModeHost()` itself, and prefer `renderUiShell` instead: the shell gives it more than fullscreen.
|
|
243
|
+
|
|
244
|
+
#### Two different questions
|
|
245
|
+
|
|
246
|
+
| Helper | `true` when | Use it for |
|
|
247
|
+
| --- | --- | --- |
|
|
248
|
+
| `getIsFullscreen` | **this** id is on top of the stack | what only the visible region does: focus, `inert`, announcements |
|
|
249
|
+
| `getIsInFullscreenStack` | this id is **anywhere** in the stack | what lasts until it exits: staying fixed, a pressed button |
|
|
250
|
+
| `getHasActiveFullscreen` | **anything** on the page is in fullscreen | page chrome, such as UI Shell hiding its navigation |
|
|
251
|
+
|
|
252
|
+
#### Escape
|
|
253
|
+
|
|
254
|
+
The host exits the top id when the user presses Escape, so each press goes back one step.
|
|
255
|
+
|
|
256
|
+
- A dialog, menu, or popover that handles Escape first wins, and fullscreen stays.
|
|
257
|
+
- Two hosts on one page, such as two shells on a Storybook docs page, act on the same press once between them.
|
|
258
|
+
- Screen reader users in browse mode don't send Escape to the page, so fullscreen never exits under them by surprise. The fullscreen button is how they leave.
|
|
259
|
+
|
|
260
|
+
#### Elements that leave the page
|
|
261
|
+
|
|
262
|
+
`watchElementDisconnection` calls back once an element leaves the document, including from inside a shadow root. `FullscreenRegion` uses it to exit when a host page removes its container without unmounting it, such as a Backbone view's `.remove()`. Without that, UI Shell's navigation would stay hidden with nothing on screen to bring it back.
|
|
263
|
+
|
|
264
|
+
An element moved in the same task, such as a reorder, isn't treated as leaving.
|
|
265
|
+
|
|
266
|
+
### Frames
|
|
267
|
+
|
|
268
|
+
Every bus publishes and listens on the **top** window when it's on the same origin, from `getTopMessageWindow`. An app in a same-origin iframe then reaches UI Shell in the page around it. A bus in an iframe also stops listening when its iframe unloads, so a reloaded iframe never leaves a listener behind on the top window.
|
|
269
|
+
|
|
270
|
+
Only messages from the page's own origin are delivered. An app in an iframe on another origin can't reach the top window, so it stays on its own window and can't use the shell's fullscreen yet.
|
|
271
|
+
|
|
146
272
|
## Running odyssey-react-mui for local development
|
|
147
273
|
|
|
148
274
|
Follow these steps for local [Odyssey development](https://odyssey-storybook.okta.design/?path=/docs/contributing-odyssey-development--docs)
|
package/dist/cjs/Accordion.cjs
CHANGED
|
@@ -65,5 +65,5 @@ const Accordion = ({
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
const MemoizedAccordion = exports.Accordion = (0, _react.memo)(Accordion);
|
|
68
|
-
MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.
|
|
68
|
+
MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.72.0";
|
|
69
69
|
//# sourceMappingURL=Accordion.cjs.map
|
|
@@ -36,7 +36,7 @@ const AnimationProvider = ({
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
const MemoizedAnimationProvider = exports.AnimationProvider = (0, _react.memo)(AnimationProvider);
|
|
39
|
-
MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.
|
|
39
|
+
MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.72.0";
|
|
40
40
|
const useAnimation = () => (0, _react.useContext)(AnimationContext).hasAnimations;
|
|
41
41
|
exports.useAnimation = useAnimation;
|
|
42
42
|
//# sourceMappingURL=AnimationContext.cjs.map
|
|
@@ -112,5 +112,5 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
114
|
const MemoizedAutocomplete = exports.Autocomplete = (0, _react.memo)(Autocomplete);
|
|
115
|
-
MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.
|
|
115
|
+
MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.72.0";
|
|
116
116
|
//# sourceMappingURL=Autocomplete.cjs.map
|
package/dist/cjs/Badge.cjs
CHANGED
|
@@ -79,5 +79,5 @@ const Badge = ({
|
|
|
79
79
|
return renderBadge;
|
|
80
80
|
};
|
|
81
81
|
const MemoizedBadge = exports.Badge = (0, _react.memo)(Badge);
|
|
82
|
-
MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.
|
|
82
|
+
MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.72.0";
|
|
83
83
|
//# sourceMappingURL=Badge.cjs.map
|
package/dist/cjs/Banner.cjs
CHANGED
|
@@ -66,5 +66,5 @@ const Banner = ({
|
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
68
|
const MemoizedBanner = exports.Banner = (0, _react.memo)(Banner);
|
|
69
|
-
MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.
|
|
69
|
+
MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.72.0";
|
|
70
70
|
//# sourceMappingURL=Banner.cjs.map
|
package/dist/cjs/Box.cjs
CHANGED
|
@@ -37,5 +37,5 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
37
37
|
translate: translate
|
|
38
38
|
}));
|
|
39
39
|
const MemoizedBox = exports.Box = (0, _react.memo)(Box);
|
|
40
|
-
MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.
|
|
40
|
+
MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.72.0";
|
|
41
41
|
//# sourceMappingURL=Box.cjs.map
|
package/dist/cjs/Breadcrumbs.cjs
CHANGED
|
@@ -183,5 +183,5 @@ const BreadcrumbList = ({
|
|
|
183
183
|
});
|
|
184
184
|
};
|
|
185
185
|
const MemoizedBreadcrumbList = exports.BreadcrumbList = (0, _react.memo)(BreadcrumbList);
|
|
186
|
-
MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.
|
|
186
|
+
MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.72.0";
|
|
187
187
|
//# sourceMappingURL=Breadcrumbs.cjs.map
|
|
@@ -35,9 +35,11 @@ const BaseButton = ({
|
|
|
35
35
|
ariaHasPopup,
|
|
36
36
|
ariaLabel,
|
|
37
37
|
ariaLabelledBy,
|
|
38
|
+
ariaPressed,
|
|
38
39
|
buttonRef,
|
|
39
40
|
children,
|
|
40
41
|
endIcon,
|
|
42
|
+
formId,
|
|
41
43
|
href,
|
|
42
44
|
id,
|
|
43
45
|
isDisabled,
|
|
@@ -89,8 +91,10 @@ const BaseButton = ({
|
|
|
89
91
|
"aria-haspopup": ariaHasPopup,
|
|
90
92
|
"aria-label": ariaLabel,
|
|
91
93
|
"aria-labelledby": ariaLabelledBy,
|
|
94
|
+
"aria-pressed": ariaPressed,
|
|
92
95
|
"data-se": testId,
|
|
93
96
|
endIcon: endIcon,
|
|
97
|
+
form: formId,
|
|
94
98
|
fullWidth: isFullWidth,
|
|
95
99
|
href: href,
|
|
96
100
|
id: id,
|
|
@@ -109,7 +113,7 @@ const BaseButton = ({
|
|
|
109
113
|
variant: variant,
|
|
110
114
|
children: buttonContent
|
|
111
115
|
});
|
|
112
|
-
}, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, buttonContent, endIcon, handleClick, href, id, isDisabled, isFullWidth, isLoading, loadingIndicator, size, startIcon, tabIndex, testId, translate, type, variant]);
|
|
116
|
+
}, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, ariaPressed, buttonContent, endIcon, formId, handleClick, href, id, isDisabled, isFullWidth, isLoading, loadingIndicator, size, startIcon, tabIndex, testId, translate, type, variant]);
|
|
113
117
|
if (tooltipText) {
|
|
114
118
|
return (0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
115
119
|
ariaType: "description",
|
|
@@ -123,5 +127,5 @@ const BaseButton = ({
|
|
|
123
127
|
return renderButton(muiProps);
|
|
124
128
|
};
|
|
125
129
|
const MemoizedBaseButton = exports.BaseButton = (0, _react.memo)(BaseButton);
|
|
126
|
-
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.
|
|
130
|
+
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.72.0";
|
|
127
131
|
//# sourceMappingURL=BaseButton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.cjs","names":["_react","require","_MuiPropsContext","_OdysseyDesignTokensContext","_Tooltip","_ButtonContext","_jsxRuntime","_interopRequireDefault","e","__esModule","default","buttonSizeValues","exports","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","children","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","isLoading","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","useMuiProps","localButtonRef","useRef","buttonContext","useButton","odysseyDesignTokens","useOdysseyDesignTokens","useMemo","buttonContent","loadingIndicator","jsx","_CircularProgress2","color","Spacing4","handleClick","useCallback","event","preventDefault","useImperativeHandle","focus","current","renderButton","_Button2","fullWidth","ref","element","Tooltip","ariaType","placement","text","MuiPropsContext","Consumer","MemoizedBaseButton","memo","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport {\n Button as MuiButton,\n CircularProgress as MuiCircularProgress,\n} from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * Ref attached to the underlying button element, exposing a `focus()` handle.\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set, label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * If `true`, the button is disabled and cannot be activated.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the button expands to fill its container's full width.\n */\n isFullWidth?: boolean;\n /**\n * If `true`, the button shows a progress spinner in place of its start icon and stops responding to clicks, while keeping the background and border of its default state. To reword the button while it works (for example `\"Saving…\"`), swap `label` alongside this.\n */\n isLoading?: boolean;\n /**\n * The text content of the Button.\n * @default \"\"\n */\n label?: string;\n /**\n * Called when the button is clicked.\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button.\n * @default \"medium\"\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /** The tab order of the Button relative to other focusable elements. */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The HTML button type attribute.\n * - If `'button'`, no default form behavior.\n * - If `'submit'`, submits the nearest form.\n * - If `'reset'`, resets the nearest form to its initial values.\n * @default \"button\"\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * Controls the visual hierarchy and intent of the button.\n * - If `'primary'`, high-emphasis action; use for the single most important action on a page.\n * - If `'secondary'`, medium-emphasis action; use for secondary actions alongside a primary.\n * - If `'danger'`, high-emphasis destructive action.\n * - If `'dangerSecondary'`, medium-emphasis destructive action.\n * - If `'floating'`, low-emphasis action without a border or background.\n * - If `'floatingAction'`, icon-only floating action, typically fixed-positioned.\n * - If `'tertiary'`, deprecated low-emphasis style; use `'floating'` instead.\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will want to omit children, which they cannot do from the combined union type. Instead, they should omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\n/**\n * The internal base button primitive used by all Odyssey button variants. Handles icon placement, full-width layout, tooltip wrapping, focus handle forwarding, and MUI prop context integration.\n */\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n children,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n isLoading,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n const buttonContent = children ?? label;\n\n const loadingIndicator = useMemo(\n () => (\n // Design specifies each variant's spinner color as that variant's own label color, so `color=\"inherit\"` keeps the two in step instead of restating the palette per variant. MUI's CircularProgress is used directly because Odyssey's wrapper deliberately exposes neither a size nor a color prop, and design asked for the 16px sizing to stay internal to Button. Stroke weight comes from the shared theme default, which holds a 1:12 stroke-to-diameter ratio at any size.\n <MuiCircularProgress\n aria-hidden\n color=\"inherit\"\n size={odysseyDesignTokens.Spacing4}\n />\n ),\n [odysseyDesignTokens],\n );\n\n // An inert button keeps its `href` so it stays focusable and keeps its link role, which leaves the browser's own activation as the thing to stop: `pointer-events: none` from the theme only blocks the mouse, and because `aria-disabled` is advisory, Enter still dispatches a click that would follow the link or submit the form. Preventing the default on that click covers every input method without swapping the element out.\n const handleClick = useCallback<NonNullable<MuiButtonProps[\"onClick\"]>>(\n (event) => {\n if (isLoading || isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n },\n [isDisabled, isLoading, onClick],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-busy={isLoading}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isLoading || isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={handleClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={isLoading ? loadingIndicator : startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {buttonContent}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonContent,\n endIcon,\n handleClick,\n href,\n id,\n isDisabled,\n isFullWidth,\n isLoading,\n loadingIndicator,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";;;;;;;;AAkBA,IAAAA,MAAA,GAAAC,OAAA;AAeA,IAAAC,gBAAA,GAAAD,OAAA;AAKA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAxC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCO,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AAC9D,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AAC/D,MAAMC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,GAAG,CACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,gBAAgB,CACR;AAiGV,MAAMC,UAAU,GAAGA,CAAC;EAClBC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,cAAc;EACdC,SAAS;EACTC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JC,EAAE,EACFC,UAAU,EACVC,WAAW,EACXE,SAAS,EACTsB,gBAAgB,EAChBnB,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNE,SAAS,EACTC,IAAI,EACJC,OAAO,CAEX,CAAC;EAED,IAAIH,WAAW,EAAE;IACf,OACE,IAAA/B,WAAA,CAAA+C,GAAA,EAACjD,QAAA,CAAAiE,OAAO;MAACC,QAAQ,EAAC,aAAa;MAACC,SAAS,EAAC,KAAK;MAACC,IAAI,EAAEnC,WAAY;MAAAd,QAAA,EAChE,IAAAjB,WAAA,CAAA+C,GAAA,EAACnD,gBAAA,CAAAuE,eAAe,CAACC,QAAQ;QAAAnD,QAAA,EAAEyC;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACtB,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMiC,kBAAkB,GAAA/D,OAAA,CAAAG,UAAA,GAAG,IAAA6D,WAAI,EAAC7D,UAAU,CAAC;AAC3C4D,kBAAkB,CAACE,WAAW,4CAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"BaseButton.cjs","names":["_react","require","_MuiPropsContext","_OdysseyDesignTokensContext","_Tooltip","_ButtonContext","_jsxRuntime","_interopRequireDefault","e","__esModule","default","buttonSizeValues","exports","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","ariaPressed","buttonRef","children","endIcon","formId","href","id","isDisabled","isFullWidth","isFullWidthProp","isLoading","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","useMuiProps","localButtonRef","useRef","buttonContext","useButton","odysseyDesignTokens","useOdysseyDesignTokens","useMemo","buttonContent","loadingIndicator","jsx","_CircularProgress2","color","Spacing4","handleClick","useCallback","event","preventDefault","useImperativeHandle","focus","current","renderButton","_Button2","form","fullWidth","ref","element","Tooltip","ariaType","placement","text","MuiPropsContext","Consumer","MemoizedBaseButton","memo","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport {\n Button as MuiButton,\n CircularProgress as MuiCircularProgress,\n} from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * Ref attached to the underlying button element, exposing a `focus()` handle.\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set, label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The ID of the form the Button belongs to. Use it to submit or reset a form from a Button outside that form, such as a `Dialog` footer action. Has no effect when `href` is set.\n */\n formId?: string;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * If `true`, the button is disabled and cannot be activated.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the button expands to fill its container's full width.\n */\n isFullWidth?: boolean;\n /**\n * If `true`, the button shows a progress spinner in place of its start icon and stops responding to clicks, while keeping the background and border of its default state. To reword the button while it works (for example `\"Saving…\"`), swap `label` alongside this.\n */\n isLoading?: boolean;\n /**\n * The text content of the Button.\n * @default \"\"\n */\n label?: string;\n /**\n * Called when the button is clicked.\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button.\n * @default \"medium\"\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /** The tab order of the Button relative to other focusable elements. */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The HTML button type attribute.\n * - If `'button'`, no default form behavior.\n * - If `'submit'`, submits the nearest form.\n * - If `'reset'`, resets the nearest form to its initial values.\n * @default \"button\"\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * Controls the visual hierarchy and intent of the button.\n * - If `'primary'`, high-emphasis action; use for the single most important action on a page.\n * - If `'secondary'`, medium-emphasis action; use for secondary actions alongside a primary.\n * - If `'danger'`, high-emphasis destructive action.\n * - If `'dangerSecondary'`, medium-emphasis destructive action.\n * - If `'floating'`, low-emphasis action without a border or background.\n * - If `'floatingAction'`, icon-only floating action, typically fixed-positioned.\n * - If `'tertiary'`, deprecated low-emphasis style; use `'floating'` instead.\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will want to omit children, which they cannot do from the combined union type. Instead, they should omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"ariaPressed\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\n/**\n * The internal base button primitive used by all Odyssey button variants. Handles icon placement, full-width layout, tooltip wrapping, focus handle forwarding, and MUI prop context integration.\n */\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n ariaPressed,\n buttonRef,\n children,\n endIcon,\n formId,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n isLoading,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n const buttonContent = children ?? label;\n\n const loadingIndicator = useMemo(\n () => (\n // Design specifies each variant's spinner color as that variant's own label color, so `color=\"inherit\"` keeps the two in step instead of restating the palette per variant. MUI's CircularProgress is used directly because Odyssey's wrapper deliberately exposes neither a size nor a color prop, and design asked for the 16px sizing to stay internal to Button. Stroke weight comes from the shared theme default, which holds a 1:12 stroke-to-diameter ratio at any size.\n <MuiCircularProgress\n aria-hidden\n color=\"inherit\"\n size={odysseyDesignTokens.Spacing4}\n />\n ),\n [odysseyDesignTokens],\n );\n\n // An inert button keeps its `href` so it stays focusable and keeps its link role, which leaves the browser's own activation as the thing to stop: `pointer-events: none` from the theme only blocks the mouse, and because `aria-disabled` is advisory, Enter still dispatches a click that would follow the link or submit the form. Preventing the default on that click covers every input method without swapping the element out.\n const handleClick = useCallback<NonNullable<MuiButtonProps[\"onClick\"]>>(\n (event) => {\n if (isLoading || isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n },\n [isDisabled, isLoading, onClick],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-busy={isLoading}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isLoading || isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-pressed={ariaPressed}\n data-se={testId}\n endIcon={endIcon}\n form={formId}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={handleClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={isLoading ? loadingIndicator : startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {buttonContent}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n ariaPressed,\n buttonContent,\n endIcon,\n formId,\n handleClick,\n href,\n id,\n isDisabled,\n isFullWidth,\n isLoading,\n loadingIndicator,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";;;;;;;;AAkBA,IAAAA,MAAA,GAAAC,OAAA;AAeA,IAAAC,gBAAA,GAAAD,OAAA;AAKA,IAAAE,2BAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAxC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCO,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AAC9D,MAAME,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AAC/D,MAAMC,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,GAAG,CACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,gBAAgB,CACR;AAsGV,MAAMC,UAAU,GAAGA,CAAC;EAClBC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,cAAc;EACdC,WAAW;EACXC,SAAS;EACTC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,IAAI;EACJC,EAAE;EACFC,UAAU;EACVC,WAAW,EAAEC,eAAe;EAC5BC,SAAS;EACTC,KAAK,GAAG,EAAE;EACVC,OAAO;EACPC,IAAI,GAAG,QAAQ;EACfC,SAAS;EACTC,QAAQ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AAM,EACNE,SAAS,EACTC,IAAI,EACJC,OAAO,CAEX,CAAC;EAED,IAAIH,WAAW,EAAE;IACf,OACE,IAAAjC,WAAA,CAAAiD,GAAA,EAACnD,QAAA,CAAAoE,OAAO;MAACC,QAAQ,EAAC,aAAa;MAACC,SAAS,EAAC,KAAK;MAACC,IAAI,EAAEpC,WAAY;MAAAf,QAAA,EAChE,IAAAlB,WAAA,CAAAiD,GAAA,EAACrD,gBAAA,CAAA0E,eAAe,CAACC,QAAQ;QAAArD,QAAA,EAAE0C;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACtB,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMkC,kBAAkB,GAAAlE,OAAA,CAAAG,UAAA,GAAG,IAAAgE,WAAI,EAAChE,UAAU,CAAC;AAC3C+D,kBAAkB,CAACE,WAAW,4CAAe","ignoreList":[]}
|
|
@@ -172,5 +172,5 @@ const BaseMenuButton = ({
|
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
174
|
const MemoizedBaseMenuButton = exports.BaseMenuButton = (0, _react.memo)(BaseMenuButton);
|
|
175
|
-
MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.
|
|
175
|
+
MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.72.0";
|
|
176
176
|
//# sourceMappingURL=BaseMenuButton.cjs.map
|
|
@@ -23,5 +23,5 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
const MemoizedButton = exports.Button = (0, _react.memo)(Button);
|
|
26
|
-
MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.
|
|
26
|
+
MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.72.0";
|
|
27
27
|
//# sourceMappingURL=Button.cjs.map
|
|
@@ -23,5 +23,5 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
const MemoizedMenuButton = exports.MenuButton = (0, _react.memo)(MenuButton);
|
|
26
|
-
MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.
|
|
26
|
+
MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.72.0";
|
|
27
27
|
//# sourceMappingURL=MenuButton.cjs.map
|
|
@@ -55,5 +55,5 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
const MemoizedMenuItem = exports.MenuItem = (0, _react.memo)(MenuItem);
|
|
58
|
-
MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.
|
|
58
|
+
MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.72.0";
|
|
59
59
|
//# sourceMappingURL=MenuItem.cjs.map
|
package/dist/cjs/Callout.cjs
CHANGED
|
@@ -86,5 +86,5 @@ const Callout = ({
|
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
const MemoizedCallout = exports.Callout = (0, _react.memo)(Callout);
|
|
89
|
-
MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.
|
|
89
|
+
MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.72.0";
|
|
90
90
|
//# sourceMappingURL=Callout.cjs.map
|
package/dist/cjs/Card.cjs
CHANGED
|
@@ -337,5 +337,5 @@ const Card = ({
|
|
|
337
337
|
});
|
|
338
338
|
};
|
|
339
339
|
const MemoizedCard = exports.Card = (0, _react.memo)(Card);
|
|
340
|
-
MemoizedCard.displayName = "Card::pkg=odyssey&odysseyV=1.
|
|
340
|
+
MemoizedCard.displayName = "Card::pkg=odyssey&odysseyV=1.72.0";
|
|
341
341
|
//# sourceMappingURL=Card.cjs.map
|
|
@@ -29,5 +29,5 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
29
29
|
variant: value ? "determinate" : "indeterminate"
|
|
30
30
|
});
|
|
31
31
|
const MemoizedCircularProgress = exports.CircularProgress = (0, _react.memo)(CircularProgress);
|
|
32
|
-
MemoizedCircularProgress.displayName = "CircularProgress::pkg=odyssey&odysseyV=1.
|
|
32
|
+
MemoizedCircularProgress.displayName = "CircularProgress::pkg=odyssey&odysseyV=1.72.0";
|
|
33
33
|
//# sourceMappingURL=CircularProgress.cjs.map
|
|
@@ -26,5 +26,5 @@ const ConditionalWrapper = ({
|
|
|
26
26
|
children: children
|
|
27
27
|
});
|
|
28
28
|
const MemoizedConditionalWrapper = exports.ConditionalWrapper = (0, _react.memo)(ConditionalWrapper);
|
|
29
|
-
MemoizedConditionalWrapper.displayName = "ConditionalWrapper::pkg=odyssey&odysseyV=1.
|
|
29
|
+
MemoizedConditionalWrapper.displayName = "ConditionalWrapper::pkg=odyssey&odysseyV=1.72.0";
|
|
30
30
|
//# sourceMappingURL=ConditionalWrapper.cjs.map
|
|
@@ -581,5 +581,5 @@ const DataTable = ({
|
|
|
581
581
|
});
|
|
582
582
|
};
|
|
583
583
|
const MemoizedDataTable = exports.DataTable = (0, _react.memo)(DataTable);
|
|
584
|
-
MemoizedDataTable.displayName = "DataTable::pkg=odyssey&odysseyV=1.
|
|
584
|
+
MemoizedDataTable.displayName = "DataTable::pkg=odyssey&odysseyV=1.72.0";
|
|
585
585
|
//# sourceMappingURL=DataTable.cjs.map
|
|
@@ -108,5 +108,5 @@ const DataTableRowActions = ({
|
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
const MemoizedDataTableRowActions = exports.DataTableRowActions = (0, _react.memo)(DataTableRowActions);
|
|
111
|
-
MemoizedDataTableRowActions.displayName = "DataTableRowActions::pkg=odyssey&odysseyV=1.
|
|
111
|
+
MemoizedDataTableRowActions.displayName = "DataTableRowActions::pkg=odyssey&odysseyV=1.72.0";
|
|
112
112
|
//# sourceMappingURL=DataTableRowActions.cjs.map
|
|
@@ -85,5 +85,5 @@ const DataTableSettings = ({
|
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
const MemoizedDataTableSettings = exports.DataTableSettings = (0, _react.memo)(DataTableSettings);
|
|
88
|
-
MemoizedDataTableSettings.displayName = "DataTableSettings::pkg=odyssey&odysseyV=1.
|
|
88
|
+
MemoizedDataTableSettings.displayName = "DataTableSettings::pkg=odyssey&odysseyV=1.72.0";
|
|
89
89
|
//# sourceMappingURL=DataTableSettings.cjs.map
|
|
@@ -169,5 +169,5 @@ const DateField = ({
|
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
171
|
const MemoizedDateField = exports.DateField = (0, _react.memo)(DateField);
|
|
172
|
-
MemoizedDateField.displayName = "DateField::pkg=odyssey&odysseyV=1.
|
|
172
|
+
MemoizedDateField.displayName = "DateField::pkg=odyssey&odysseyV=1.72.0";
|
|
173
173
|
//# sourceMappingURL=DateField.cjs.map
|
|
@@ -57,5 +57,5 @@ const DateFieldActionBar = ({
|
|
|
57
57
|
return null;
|
|
58
58
|
};
|
|
59
59
|
const MemoizedDateFieldActionBar = exports.DateFieldActionBar = (0, _react.memo)(DateFieldActionBar);
|
|
60
|
-
MemoizedDateFieldActionBar.displayName = "DateFieldActionBar::pkg=odyssey&odysseyV=1.
|
|
60
|
+
MemoizedDateFieldActionBar.displayName = "DateFieldActionBar::pkg=odyssey&odysseyV=1.72.0";
|
|
61
61
|
//# sourceMappingURL=DateFieldActionBar.cjs.map
|
|
@@ -33,5 +33,5 @@ const DateFieldLocalizationProvider = ({
|
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
const MemoizedDateFieldLocalizationProvider = exports.DateFieldLocalizationProvider = (0, _react.memo)(DateFieldLocalizationProvider);
|
|
36
|
-
MemoizedDateFieldLocalizationProvider.displayName = "DateFieldLocalizationProvider::pkg=odyssey&odysseyV=1.
|
|
36
|
+
MemoizedDateFieldLocalizationProvider.displayName = "DateFieldLocalizationProvider::pkg=odyssey&odysseyV=1.72.0";
|
|
37
37
|
//# sourceMappingURL=DateFieldLocalizationProvider.cjs.map
|
|
@@ -232,5 +232,5 @@ const DatePicker = ({
|
|
|
232
232
|
});
|
|
233
233
|
};
|
|
234
234
|
const MemoizedDatePicker = exports.DatePicker = (0, _react.memo)(DatePicker);
|
|
235
|
-
MemoizedDatePicker.displayName = "DatePicker::pkg=odyssey&odysseyV=1.
|
|
235
|
+
MemoizedDatePicker.displayName = "DatePicker::pkg=odyssey&odysseyV=1.72.0";
|
|
236
236
|
//# sourceMappingURL=DatePicker.cjs.map
|
|
@@ -36,5 +36,5 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
const MemoizedTimeZonePicker = exports.TimeZonePicker = (0, _react.memo)(TimeZonePicker);
|
|
39
|
-
MemoizedTimeZonePicker.displayName = "TimeZonePicker::pkg=odyssey&odysseyV=1.
|
|
39
|
+
MemoizedTimeZonePicker.displayName = "TimeZonePicker::pkg=odyssey&odysseyV=1.72.0";
|
|
40
40
|
//# sourceMappingURL=TimeZonePicker.cjs.map
|
package/dist/cjs/Dialog.cjs
CHANGED
|
@@ -10,6 +10,7 @@ var _DialogContent2 = _interopRequireDefault(require("@mui/material/DialogConten
|
|
|
10
10
|
var _DialogTitle2 = _interopRequireDefault(require("@mui/material/DialogTitle"));
|
|
11
11
|
var _DialogContentText2 = _interopRequireDefault(require("@mui/material/DialogContentText"));
|
|
12
12
|
var _Button = require("@mui/material/Button");
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
13
14
|
var _react = require("react");
|
|
14
15
|
var _Button2 = require("./Buttons/Button.cjs");
|
|
15
16
|
var _createOdysseyStyledComponent = require("./createOdysseyStyledComponent.cjs");
|
|
@@ -17,6 +18,7 @@ var _FullScreenOverlay = require("./FullScreenOverlay.cjs");
|
|
|
17
18
|
var _i18n = require("./i18n.generated/i18n.cjs");
|
|
18
19
|
var _index = require("./icons.generated/index.cjs");
|
|
19
20
|
var _useMediaQuery = require("./theme/useMediaQuery.cjs");
|
|
21
|
+
var _useStackedBackdropProps = require("./useStackedBackdropProps.cjs");
|
|
20
22
|
var _useUniqueId = require("./useUniqueId.cjs");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
24
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -95,16 +97,21 @@ const Dialog = ({
|
|
|
95
97
|
}) : children;
|
|
96
98
|
const actionButtons = [tertiaryCallToActionComponent || callToActionLastComponent, secondaryCallToActionComponent || callToActionSecondComponent, primaryCallToActionComponent || callToActionFirstComponent].filter(Boolean);
|
|
97
99
|
const handleCloseButtonClick = (0, _react.useCallback)(event => onClose(event, "closeButtonClick"), [onClose]);
|
|
100
|
+
const muiTheme = (0, _styles.useTheme)();
|
|
101
|
+
const stackedBackdropProps = (0, _useStackedBackdropProps.useStackedBackdropProps)({
|
|
102
|
+
isOpen,
|
|
103
|
+
layer: muiTheme.zIndex.modal
|
|
104
|
+
});
|
|
98
105
|
const slotProps = (0, _react.useMemo)(() => ({
|
|
99
106
|
backdrop: {
|
|
107
|
+
...stackedBackdropProps,
|
|
100
108
|
variant: variant
|
|
101
109
|
}
|
|
102
|
-
}), [variant]);
|
|
110
|
+
}), [stackedBackdropProps, variant]);
|
|
103
111
|
const {
|
|
104
112
|
isWithinCompactWidthOrHeight
|
|
105
113
|
} = (0, _useMediaQuery.useCompactViewportMatches)();
|
|
106
114
|
return (0, _jsxRuntime.jsx)(_FullScreenOverlay.FullScreenOverlay, {
|
|
107
|
-
overlayType: "dialog",
|
|
108
115
|
children: (0, _jsxRuntime.jsxs)(_Dialog2.default, {
|
|
109
116
|
"aria-labelledby": dialogLabelId,
|
|
110
117
|
"data-se": testId,
|
|
@@ -141,5 +148,5 @@ const Dialog = ({
|
|
|
141
148
|
});
|
|
142
149
|
};
|
|
143
150
|
const MemoizedDialog = exports.Dialog = (0, _react.memo)(Dialog);
|
|
144
|
-
MemoizedDialog.displayName = "Dialog::pkg=odyssey&odysseyV=1.
|
|
151
|
+
MemoizedDialog.displayName = "Dialog::pkg=odyssey&odysseyV=1.72.0";
|
|
145
152
|
//# sourceMappingURL=Dialog.cjs.map
|
package/dist/cjs/Dialog.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.cjs","names":["_Button","require","_react","_Button2","_createOdysseyStyledComponent","_FullScreenOverlay","_i18n","_index","_useMediaQuery","_useUniqueId","_jsxRuntime","_interopRequireDefault","e","__esModule","default","DialogTitleContainer","createOdysseyStyledComponent","tag","odysseyDesignTokens","display","justifyContent","alignItems","marginBlockEnd","padding","paddingBlockStart","Spacing5","paddingBlockEnd","Spacing4","paddingInline","Spacing6","fontFamily","TypographyFamilyHeading","buttonClasses","root","alignSelf","marginInlineEnd","Spacing3","flexShrink","Dialog","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","callToActionFirstComponent","callToActionSecondComponent","callToActionLastComponent","children","isOpen","onClose","testId","title","translate","variant","t","useTranslation","isContentScrollable","setIsContentScrollable","useState","dialogContentRef","useRef","dialogLabelId","useUniqueId","useEffect","frameId","handleContentScroll","dialogContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","content","jsx","_DialogContentText2","actionButtons","filter","Boolean","handleCloseButtonClick","useCallback","event","slotProps","useMemo","backdrop","isWithinCompactWidthOrHeight","useCompactViewportMatches","FullScreenOverlay","overlayType","jsxs","_Dialog2","fullScreen","open","scroll","_DialogTitle2","id","Button","ariaLabel","onClick","size","startIcon","CloseIcon","_DialogContent2","tabIndex","dividers","ref","length","_DialogActions2","map","actionButton","index","cloneElement","key","MemoizedDialog","exports","memo","displayName"],"sources":["../../src/Dialog.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 Dialog as MuiDialog,\n DialogActions as MuiDialogActions,\n DialogContent as MuiDialogContent,\n DialogContentText as MuiDialogContentText,\n DialogProps as MuiDialogProps,\n DialogTitle as MuiDialogTitle,\n} from \"@mui/material\";\nimport { buttonClasses } from \"@mui/material/Button\";\nimport {\n cloneElement,\n memo,\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { Button, ButtonProps } from \"./Buttons/Button.js\";\nimport { createOdysseyStyledComponent } from \"./createOdysseyStyledComponent.js\";\nimport { FullScreenOverlay } from \"./FullScreenOverlay.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport { useCompactViewportMatches } from \"./theme/useMediaQuery.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\ntype MuiOnCloseEvent = Parameters<Required<MuiDialogProps>[\"onClose\"]>[0];\ntype MuiOnCloseReason = Parameters<Required<MuiDialogProps>[\"onClose\"]>[1];\nexport type DialogOnCloseReason = MuiOnCloseReason | \"closeButtonClick\";\n\nexport type DialogProps = {\n /**\n * @deprecated `aria-label` for close button comes from translation file\n */\n ariaLabel?: string;\n\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `primaryCallToActionComponent` instead.\n */\n callToActionFirstComponent?: ReactElement<typeof Button>;\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `tertiaryCallToActionComponent` instead.\n */\n callToActionLastComponent?: ReactElement<typeof Button>;\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `secondaryCallToActionComponent` instead.\n */\n callToActionSecondComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children: ReactNode;\n /**\n * If `true`, the dialog is visible.\n */\n isOpen: boolean;\n /**\n * Called when the dialog is dismissed. Receives the event and the reason for closing.\n */\n onClose: (event: MuiOnCloseEvent, reason: DialogOnCloseReason) => void;\n /**\n * An optional Button object to be situated in the Dialog footer as the primary call to action.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer as the secondary call to action, alongside the `primaryCallToActionComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n\n /**\n * An optional Button object to be situated in the Dialog footer as the tertiary call to action, alongside the other `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n\n /**\n * The title of the Dialog.\n */\n title: string;\n\n /**\n * Controls the opacity of the Dialog backdrop.\n * - If `'default'`, semi-transparent backdrop.\n * - If `'security'`, fully opaque backdrop, used for security-sensitive dialogs.\n * @default \"default\"\n */\n variant?: \"default\" | \"security\";\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst DialogTitleContainer = createOdysseyStyledComponent({ tag: \"div\" })(\n ({ odysseyDesignTokens }) => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginBlockEnd: 0,\n padding: 0,\n paddingBlockStart: odysseyDesignTokens.Spacing5,\n paddingBlockEnd: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing6,\n fontFamily: odysseyDesignTokens.TypographyFamilyHeading,\n\n [`& > .${buttonClasses.root}`]: {\n alignSelf: \"baseline\",\n // Pull close button by inline padding amount\n marginInlineEnd: `-${odysseyDesignTokens.Spacing3}`,\n flexShrink: 0,\n },\n }),\n);\n\n/**\n * A modal overlay that interrupts the user to present critical information, collect input, or require confirmation before proceeding.\n */\nconst Dialog = ({\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n callToActionFirstComponent,\n callToActionSecondComponent,\n callToActionLastComponent,\n children,\n isOpen,\n onClose,\n testId,\n title,\n translate,\n variant = \"default\",\n}: DialogProps) => {\n const { t } = useTranslation();\n\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n const dialogLabelId = useUniqueId();\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const dialogContentElement = dialogContentRef.current;\n if (dialogContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n dialogContentElement.scrollHeight > dialogContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const content =\n typeof children === \"string\" ? (\n <MuiDialogContentText>{children}</MuiDialogContentText>\n ) : (\n children\n );\n\n // Prioritize new action button format (|| used as a fallback)\n const actionButtons = [\n tertiaryCallToActionComponent || callToActionLastComponent,\n secondaryCallToActionComponent || callToActionSecondComponent,\n primaryCallToActionComponent || callToActionFirstComponent,\n ].filter(Boolean);\n\n const handleCloseButtonClick = useCallback<\n NonNullable<ButtonProps[\"onClick\"]>\n >((event) => onClose(event, \"closeButtonClick\"), [onClose]);\n\n const slotProps = useMemo<MuiDialogProps[\"slotProps\"]>(\n () => ({\n backdrop: { variant: variant },\n }),\n [variant],\n );\n\n const { isWithinCompactWidthOrHeight } = useCompactViewportMatches();\n\n return (\n <FullScreenOverlay overlayType=\"dialog\">\n <MuiDialog\n aria-labelledby={dialogLabelId}\n data-se={testId}\n fullScreen={isWithinCompactWidthOrHeight}\n onClose={onClose}\n open={isOpen}\n scroll={isWithinCompactWidthOrHeight ? \"body\" : \"paper\"}\n slotProps={slotProps}\n >\n <DialogTitleContainer>\n <MuiDialogTitle id={dialogLabelId} translate={translate}>\n {title}\n </MuiDialogTitle>\n <Button\n ariaLabel={t(\"close.text\")}\n onClick={handleCloseButtonClick}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DialogTitleContainer>\n\n <MuiDialogContent\n {...(isContentScrollable && {\n // Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n dividers={isContentScrollable}\n ref={dialogContentRef}\n >\n {content}\n </MuiDialogContent>\n\n {actionButtons.length > 0 && (\n <MuiDialogActions>\n {actionButtons.map((actionButton, index) =>\n actionButton ? cloneElement(actionButton, { key: index }) : null,\n )}\n </MuiDialogActions>\n )}\n </MuiDialog>\n </FullScreenOverlay>\n );\n};\n\nconst MemoizedDialog = memo(Dialog);\nMemoizedDialog.displayName = \"Dialog\";\n\nexport { MemoizedDialog as Dialog };\n"],"mappings":";;;;;;;;;;;AAoBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAcA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AAA+C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAU,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAzC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+FA,MAAMG,oBAAoB,GAAG,IAAAC,0DAA4B,EAAC;EAAEC,GAAG,EAAE;AAAM,CAAC,CAAC,CACvE,CAAC;EAAEC;AAAoB,CAAC,MAAM;EAC5BC,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,eAAe;EAC/BC,UAAU,EAAE,QAAQ;EACpBC,cAAc,EAAE,CAAC;EACjBC,OAAO,EAAE,CAAC;EACVC,iBAAiB,EAAEN,mBAAmB,CAACO,QAAQ;EAC/CC,eAAe,EAAER,m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","require","_styles","_react","_Button2","_createOdysseyStyledComponent","_FullScreenOverlay","_i18n","_index","_useMediaQuery","_useStackedBackdropProps","_useUniqueId","_jsxRuntime","_interopRequireDefault","e","__esModule","default","DialogTitleContainer","createOdysseyStyledComponent","tag","odysseyDesignTokens","display","justifyContent","alignItems","marginBlockEnd","padding","paddingBlockStart","Spacing5","paddingBlockEnd","Spacing4","paddingInline","Spacing6","fontFamily","TypographyFamilyHeading","buttonClasses","root","alignSelf","marginInlineEnd","Spacing3","flexShrink","Dialog","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","callToActionFirstComponent","callToActionSecondComponent","callToActionLastComponent","children","isOpen","onClose","testId","title","translate","variant","t","useTranslation","isContentScrollable","setIsContentScrollable","useState","dialogContentRef","useRef","dialogLabelId","useUniqueId","useEffect","frameId","handleContentScroll","dialogContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","content","jsx","_DialogContentText2","actionButtons","filter","Boolean","handleCloseButtonClick","useCallback","event","muiTheme","useTheme","stackedBackdropProps","useStackedBackdropProps","layer","zIndex","modal","slotProps","useMemo","backdrop","isWithinCompactWidthOrHeight","useCompactViewportMatches","FullScreenOverlay","jsxs","_Dialog2","fullScreen","open","scroll","_DialogTitle2","id","Button","ariaLabel","onClick","size","startIcon","CloseIcon","_DialogContent2","tabIndex","dividers","ref","length","_DialogActions2","map","actionButton","index","cloneElement","key","MemoizedDialog","exports","memo","displayName"],"sources":["../../src/Dialog.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 Dialog as MuiDialog,\n DialogActions as MuiDialogActions,\n DialogContent as MuiDialogContent,\n DialogContentText as MuiDialogContentText,\n DialogProps as MuiDialogProps,\n DialogTitle as MuiDialogTitle,\n} from \"@mui/material\";\nimport { buttonClasses } from \"@mui/material/Button\";\nimport { useTheme } from \"@mui/material/styles\";\nimport {\n cloneElement,\n memo,\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { Button, ButtonProps } from \"./Buttons/Button.js\";\nimport { createOdysseyStyledComponent } from \"./createOdysseyStyledComponent.js\";\nimport { FullScreenOverlay } from \"./FullScreenOverlay.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { CloseIcon } from \"./icons.generated/index.js\";\nimport { useCompactViewportMatches } from \"./theme/useMediaQuery.js\";\nimport { useStackedBackdropProps } from \"./useStackedBackdropProps.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\ntype MuiOnCloseEvent = Parameters<Required<MuiDialogProps>[\"onClose\"]>[0];\ntype MuiOnCloseReason = Parameters<Required<MuiDialogProps>[\"onClose\"]>[1];\nexport type DialogOnCloseReason = MuiOnCloseReason | \"closeButtonClick\";\n\nexport type DialogProps = {\n /**\n * @deprecated `aria-label` for close button comes from translation file\n */\n ariaLabel?: string;\n\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `primaryCallToActionComponent` instead.\n */\n callToActionFirstComponent?: ReactElement<typeof Button>;\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `tertiaryCallToActionComponent` instead.\n */\n callToActionLastComponent?: ReactElement<typeof Button>;\n /**\n * @deprecated Will be removed in a future Odyssey version. Use `secondaryCallToActionComponent` instead.\n */\n callToActionSecondComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children: ReactNode;\n /**\n * If `true`, the dialog is visible.\n */\n isOpen: boolean;\n /**\n * Called when the dialog is dismissed. Receives the event and the reason for closing.\n */\n onClose: (event: MuiOnCloseEvent, reason: DialogOnCloseReason) => void;\n /**\n * An optional Button object to be situated in the Dialog footer as the primary call to action.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer as the secondary call to action, alongside the `primaryCallToActionComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n\n /**\n * An optional Button object to be situated in the Dialog footer as the tertiary call to action, alongside the other `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n\n /**\n * The title of the Dialog.\n */\n title: string;\n\n /**\n * Controls the opacity of the Dialog backdrop.\n * - If `'default'`, semi-transparent backdrop.\n * - If `'security'`, fully opaque backdrop, used for security-sensitive dialogs.\n * @default \"default\"\n */\n variant?: \"default\" | \"security\";\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst DialogTitleContainer = createOdysseyStyledComponent({ tag: \"div\" })(\n ({ odysseyDesignTokens }) => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginBlockEnd: 0,\n padding: 0,\n paddingBlockStart: odysseyDesignTokens.Spacing5,\n paddingBlockEnd: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing6,\n fontFamily: odysseyDesignTokens.TypographyFamilyHeading,\n\n [`& > .${buttonClasses.root}`]: {\n alignSelf: \"baseline\",\n // Pull close button by inline padding amount\n marginInlineEnd: `-${odysseyDesignTokens.Spacing3}`,\n flexShrink: 0,\n },\n }),\n);\n\n/**\n * A modal overlay that interrupts the user to present critical information, collect input, or require confirmation before proceeding.\n */\nconst Dialog = ({\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n callToActionFirstComponent,\n callToActionSecondComponent,\n callToActionLastComponent,\n children,\n isOpen,\n onClose,\n testId,\n title,\n translate,\n variant = \"default\",\n}: DialogProps) => {\n const { t } = useTranslation();\n\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n const dialogLabelId = useUniqueId();\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const dialogContentElement = dialogContentRef.current;\n if (dialogContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n dialogContentElement.scrollHeight > dialogContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const content =\n typeof children === \"string\" ? (\n <MuiDialogContentText>{children}</MuiDialogContentText>\n ) : (\n children\n );\n\n // Prioritize new action button format (|| used as a fallback)\n const actionButtons = [\n tertiaryCallToActionComponent || callToActionLastComponent,\n secondaryCallToActionComponent || callToActionSecondComponent,\n primaryCallToActionComponent || callToActionFirstComponent,\n ].filter(Boolean);\n\n const handleCloseButtonClick = useCallback<\n NonNullable<ButtonProps[\"onClick\"]>\n >((event) => onClose(event, \"closeButtonClick\"), [onClose]);\n\n const muiTheme = useTheme();\n\n const stackedBackdropProps = useStackedBackdropProps({\n isOpen,\n layer: muiTheme.zIndex.modal,\n });\n\n const slotProps = useMemo<MuiDialogProps[\"slotProps\"]>(\n () => ({\n backdrop: { ...stackedBackdropProps, variant: variant },\n }),\n [stackedBackdropProps, variant],\n );\n\n const { isWithinCompactWidthOrHeight } = useCompactViewportMatches();\n\n return (\n <FullScreenOverlay>\n <MuiDialog\n aria-labelledby={dialogLabelId}\n data-se={testId}\n fullScreen={isWithinCompactWidthOrHeight}\n onClose={onClose}\n open={isOpen}\n scroll={isWithinCompactWidthOrHeight ? \"body\" : \"paper\"}\n slotProps={slotProps}\n >\n <DialogTitleContainer>\n <MuiDialogTitle id={dialogLabelId} translate={translate}>\n {title}\n </MuiDialogTitle>\n <Button\n ariaLabel={t(\"close.text\")}\n onClick={handleCloseButtonClick}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DialogTitleContainer>\n\n <MuiDialogContent\n {...(isContentScrollable && {\n // Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n dividers={isContentScrollable}\n ref={dialogContentRef}\n >\n {content}\n </MuiDialogContent>\n\n {actionButtons.length > 0 && (\n <MuiDialogActions>\n {actionButtons.map((actionButton, index) =>\n actionButton ? cloneElement(actionButton, { key: index }) : null,\n )}\n </MuiDialogActions>\n )}\n </MuiDialog>\n </FullScreenOverlay>\n );\n};\n\nconst MemoizedDialog = memo(Dialog);\nMemoizedDialog.displayName = \"Dialog\";\n\nexport { MemoizedDialog as Dialog };\n"],"mappings":";;;;;;;;;;;AAoBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAcA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,6BAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,wBAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAA+C,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAY,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA3C/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiGA,MAAMG,oBAAoB,GAAG,IAAAC,0DAA4B,EAAC;EAAEC,GAAG,EAAE;AAAM,CAAC,CAAC,CACvE,CAAC;EAAEC;AAAoB,CAAC,MAAM;EAC5BC,OAAO,EAAE,MAAM;EACfC,cAAc,EAAE,eAAe;EAC/BC,UAAU,EAAE,QAA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AG,IAAAE,mBAAY,EAACF,YAAY,EAAE;UAAEG,GAAG,EAAEF;QAAM,CAAC,CAAC,GAAG,IAC9D;MAAC,CACe,CACnB;IAAA,CACQ;EAAC,CACK,CAAC;AAExB,CAAC;AAED,MAAMG,cAAc,GAAAC,OAAA,CAAA/E,MAAA,GAAG,IAAAgF,WAAI,EAAChF,MAAM,CAAC;AACnC8E,cAAc,CAACG,WAAW,wCAAW","ignoreList":[]}
|
package/dist/cjs/Drawer.cjs
CHANGED
|
@@ -7,6 +7,7 @@ exports.variantValues = exports.Drawer = void 0;
|
|
|
7
7
|
var _Drawer2 = _interopRequireDefault(require("@mui/material/Drawer"));
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _Button = require("@mui/material/Button");
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
10
11
|
var _Typography = require("@mui/material/Typography");
|
|
11
12
|
var _react = require("react");
|
|
12
13
|
var _Button2 = require("./Buttons/Button.cjs");
|
|
@@ -15,6 +16,7 @@ var _i18n = require("./i18n.generated/i18n.cjs");
|
|
|
15
16
|
var _index = require("./icons.generated/index.cjs");
|
|
16
17
|
var _OdysseyDesignTokensContext = require("./OdysseyDesignTokensContext.cjs");
|
|
17
18
|
var _Typography2 = require("./Typography.cjs");
|
|
19
|
+
var _useStackedBackdropProps = require("./useStackedBackdropProps.cjs");
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
22
|
/*!
|
|
@@ -160,11 +162,20 @@ const Drawer = ({
|
|
|
160
162
|
}, [hasDividers, isContentScrollable]);
|
|
161
163
|
const hasFooter = (0, _react.useMemo)(() => primaryCallToActionComponent || secondaryCallToActionComponent || tertiaryCallToActionComponent, [primaryCallToActionComponent, secondaryCallToActionComponent, tertiaryCallToActionComponent]);
|
|
162
164
|
const handleCloseButtonClick = (0, _react.useCallback)(event => onClose(event, "closeButtonClick"), [onClose]);
|
|
165
|
+
const muiTheme = (0, _styles.useTheme)();
|
|
166
|
+
const stackedBackdropProps = (0, _useStackedBackdropProps.useStackedBackdropProps)({
|
|
167
|
+
isOpen: Boolean(isOpen) && variant === "temporary",
|
|
168
|
+
layer: muiTheme.zIndex.drawer
|
|
169
|
+
});
|
|
170
|
+
const slotProps = (0, _react.useMemo)(() => ({
|
|
171
|
+
backdrop: stackedBackdropProps
|
|
172
|
+
}), [stackedBackdropProps]);
|
|
163
173
|
const muiDrawerComponent = (0, _react.useMemo)(() => (0, _jsxRuntime.jsx)(_Drawer2.default, {
|
|
164
174
|
anchor: anchorDirection,
|
|
165
175
|
"data-se": testId,
|
|
166
176
|
onClose: onClose,
|
|
167
177
|
open: isOpen,
|
|
178
|
+
slotProps: slotProps,
|
|
168
179
|
sx: {
|
|
169
180
|
...(variant === "persistent" && {
|
|
170
181
|
"& .MuiDrawer-paper": {
|
|
@@ -202,12 +213,11 @@ const Drawer = ({
|
|
|
202
213
|
children: [tertiaryCallToActionComponent, secondaryCallToActionComponent, primaryCallToActionComponent]
|
|
203
214
|
})]
|
|
204
215
|
})
|
|
205
|
-
}), [anchorDirection, ariaLabel, children, dividersVisible, handleCloseButtonClick, hasFooter, isContentScrollable, isOpen, odysseyDesignTokens, onClose, primaryCallToActionComponent, secondaryCallToActionComponent, t, tertiaryCallToActionComponent, testId, title, translate, variant]);
|
|
216
|
+
}), [anchorDirection, ariaLabel, children, dividersVisible, handleCloseButtonClick, hasFooter, isContentScrollable, isOpen, odysseyDesignTokens, onClose, primaryCallToActionComponent, secondaryCallToActionComponent, slotProps, t, tertiaryCallToActionComponent, testId, title, translate, variant]);
|
|
206
217
|
return variant === "temporary" ? (0, _jsxRuntime.jsx)(_FullScreenOverlay.FullScreenOverlay, {
|
|
207
|
-
overlayType: "drawer",
|
|
208
218
|
children: muiDrawerComponent
|
|
209
219
|
}) : muiDrawerComponent;
|
|
210
220
|
};
|
|
211
221
|
const MemoizedDrawer = exports.Drawer = (0, _react.memo)(Drawer);
|
|
212
|
-
MemoizedDrawer.displayName = "Drawer::pkg=odyssey&odysseyV=1.
|
|
222
|
+
MemoizedDrawer.displayName = "Drawer::pkg=odyssey&odysseyV=1.72.0";
|
|
213
223
|
//# sourceMappingURL=Drawer.cjs.map
|