@okta/odyssey-react-mui 1.70.1 → 1.71.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -20
- package/dist/cjs/@types/react-augment.d.cjs.map +1 -1
- package/dist/cjs/Accordion.cjs +1 -1
- package/dist/cjs/Accordion.cjs.map +1 -1
- package/dist/cjs/AnimationContext.cjs +1 -1
- package/dist/cjs/Autocomplete.cjs +1 -1
- package/dist/cjs/Autocomplete.cjs.map +1 -1
- package/dist/cjs/Badge.cjs +1 -1
- package/dist/cjs/Badge.cjs.map +1 -1
- package/dist/cjs/Banner.cjs +1 -1
- package/dist/cjs/Banner.cjs.map +1 -1
- package/dist/cjs/Box.cjs +1 -1
- package/dist/cjs/Box.cjs.map +1 -1
- package/dist/cjs/Breadcrumbs.cjs +1 -1
- package/dist/cjs/Breadcrumbs.cjs.map +1 -1
- package/dist/cjs/Buttons/BaseButton.cjs +4 -2
- package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
- package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
- package/dist/cjs/Buttons/BaseMenuButton.cjs.map +1 -1
- package/dist/cjs/Buttons/Button.cjs +1 -1
- package/dist/cjs/Buttons/Button.cjs.map +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs.map +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs.map +1 -1
- package/dist/cjs/Callout.cjs +1 -1
- package/dist/cjs/Callout.cjs.map +1 -1
- package/dist/cjs/Card.cjs +1 -1
- package/dist/cjs/Card.cjs.map +1 -1
- package/dist/cjs/CircularProgress.cjs +1 -1
- package/dist/cjs/CircularProgress.cjs.map +1 -1
- package/dist/cjs/ConditionalWrapper.cjs +1 -1
- package/dist/cjs/ConditionalWrapper.cjs.map +1 -1
- package/dist/cjs/CssBaseline.cjs.map +1 -1
- package/dist/cjs/DataTable/DataTable.cjs +1 -1
- package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
- package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
- package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
- package/dist/cjs/DataTable/useRowReordering.cjs.map +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/DatePicker.cjs.map +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs.map +1 -1
- package/dist/cjs/DatePickers/datePickerTheme.cjs +57 -27
- package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
- package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
- package/dist/cjs/Dialog.cjs +1 -1
- package/dist/cjs/Dialog.cjs.map +1 -1
- package/dist/cjs/Drawer.cjs +1 -1
- package/dist/cjs/Drawer.cjs.map +1 -1
- package/dist/cjs/EmptyState.cjs +1 -1
- package/dist/cjs/EmptyState.cjs.map +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/Checkbox.cjs.map +1 -1
- package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
- package/dist/cjs/Fields/CheckboxGroup.cjs.map +1 -1
- package/dist/cjs/Fields/Hint.cjs.map +1 -1
- package/dist/cjs/Fields/Radio.cjs +1 -1
- package/dist/cjs/Fields/RadioGroup.cjs +1 -1
- package/dist/cjs/Fields/RadioGroup.cjs.map +1 -1
- package/dist/cjs/Fieldset.cjs +1 -1
- package/dist/cjs/Fieldset.cjs.map +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/FileUploader/FileUploader.cjs.map +1 -1
- package/dist/cjs/Form.cjs +1 -1
- package/dist/cjs/Form.cjs.map +1 -1
- package/dist/cjs/FormCheckedProps.cjs.map +1 -1
- package/dist/cjs/FullScreenOverlay.cjs +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
- package/dist/cjs/HintLink.cjs +1 -1
- package/dist/cjs/IconWithTooltip.cjs +1 -1
- package/dist/cjs/IconWithTooltip.cjs.map +1 -1
- package/dist/cjs/Link.cjs +1 -1
- package/dist/cjs/Link.cjs.map +1 -1
- package/dist/cjs/MuiPropsChild.cjs +1 -1
- package/dist/cjs/NativeSelect.cjs +1 -1
- package/dist/cjs/NativeSelect.cjs.map +1 -1
- package/dist/cjs/OdysseyCacheProvider.cjs +1 -1
- package/dist/cjs/OdysseyCacheProvider.cjs.map +1 -1
- package/dist/cjs/OdysseyDesignTokensContext.cjs.map +1 -1
- package/dist/cjs/OdysseyProvider.cjs +1 -1
- package/dist/cjs/OdysseyProvider.cjs.map +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
- package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
- package/dist/cjs/PasswordField.cjs +1 -1
- package/dist/cjs/PasswordField.cjs.map +1 -1
- package/dist/cjs/ScreenReaderText.cjs +1 -1
- package/dist/cjs/ScreenReaderText.cjs.map +1 -1
- package/dist/cjs/SearchField.cjs +1 -1
- package/dist/cjs/SearchField.cjs.map +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Select.cjs.map +1 -1
- package/dist/cjs/Stack.cjs +1 -1
- package/dist/cjs/Stack.cjs.map +1 -1
- package/dist/cjs/Status.cjs +1 -1
- package/dist/cjs/Status.cjs.map +1 -1
- package/dist/cjs/Surface.cjs +1 -1
- package/dist/cjs/Surface.cjs.map +1 -1
- package/dist/cjs/Switch.cjs +2 -2
- package/dist/cjs/Switch.cjs.map +1 -1
- package/dist/cjs/Tabs.cjs +1 -1
- package/dist/cjs/Tabs.cjs.map +1 -1
- package/dist/cjs/Tag.cjs +1 -1
- package/dist/cjs/Tag.cjs.map +1 -1
- package/dist/cjs/TagList.cjs +1 -1
- package/dist/cjs/TagList.cjs.map +1 -1
- package/dist/cjs/TextField.cjs +1 -1
- package/dist/cjs/TextField.cjs.map +1 -1
- package/dist/cjs/Toast.cjs +1 -1
- package/dist/cjs/Toast.cjs.map +1 -1
- package/dist/cjs/ToastStack.cjs +1 -1
- package/dist/cjs/ToastStack.cjs.map +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Tooltip.cjs.map +1 -1
- package/dist/cjs/Typography.cjs +12 -12
- package/dist/cjs/Typography.cjs.map +1 -1
- package/dist/cjs/__internal.cjs.map +1 -1
- package/dist/cjs/charts/BarChart.cjs +1 -1
- package/dist/cjs/charts/BarChart.cjs.map +1 -1
- package/dist/cjs/charts/LineChart.cjs +1 -1
- package/dist/cjs/charts/LineChart.cjs.map +1 -1
- package/dist/cjs/charts/components/ChartContainer.cjs.map +1 -1
- package/dist/cjs/charts/components/ChartError.cjs +1 -1
- package/dist/cjs/charts/components/ChartError.cjs.map +1 -1
- package/dist/cjs/charts/components/ChartFrame.cjs +1 -1
- package/dist/cjs/charts/components/ChartFrame.cjs.map +1 -1
- package/dist/cjs/charts/components/ChartPopoverContent.cjs +1 -1
- package/dist/cjs/charts/components/ChartPopoverContent.cjs.map +1 -1
- package/dist/cjs/charts/utils/chartTokens.cjs.map +1 -1
- package/dist/cjs/charts/utils/chartTypes.cjs.map +1 -1
- package/dist/cjs/charts/utils/formatChartValue.cjs.map +1 -1
- package/dist/cjs/charts/utils/getChartSeriesPointData.cjs.map +1 -1
- package/dist/cjs/charts/utils/hasDuplicateSeries.cjs.map +1 -1
- package/dist/cjs/charts/utils/resolveChartLocale.cjs.map +1 -1
- package/dist/cjs/charts/utils/useChartValueFormatter.cjs.map +1 -1
- package/dist/cjs/charts/utils/useStableValue.cjs.map +1 -1
- package/dist/cjs/createContrastColors.cjs.map +1 -1
- package/dist/cjs/createOdysseyStyledComponent.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 +405 -0
- package/dist/cjs/fullscreen/FullscreenRegion.cjs.map +1 -0
- package/dist/cjs/fullscreen/easeFullscreenTransition.cjs +19 -0
- package/dist/cjs/fullscreen/easeFullscreenTransition.cjs.map +1 -0
- package/dist/cjs/fullscreen/getBackgroundColorBehindElement.cjs +60 -0
- package/dist/cjs/fullscreen/getBackgroundColorBehindElement.cjs.map +1 -0
- package/dist/cjs/fullscreen/useFullscreen.cjs +116 -0
- package/dist/cjs/fullscreen/useFullscreen.cjs.map +1 -0
- package/dist/cjs/fullscreen/useFullscreenId.cjs +21 -0
- package/dist/cjs/fullscreen/useFullscreenId.cjs.map +1 -0
- package/dist/cjs/getLogicalBoundaries.cjs.map +1 -1
- 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/inputUtils.cjs.map +1 -1
- package/dist/cjs/labs/AppTile.cjs +1 -1
- package/dist/cjs/labs/AppTile.cjs.map +1 -1
- package/dist/cjs/labs/DataFilters.cjs +2 -2
- package/dist/cjs/labs/DataFilters.cjs.map +1 -1
- package/dist/cjs/labs/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataTable.cjs.map +1 -1
- package/dist/cjs/labs/DataTablePagination.cjs +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
- package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +1 -1
- 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/RowActions.cjs.map +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs.map +1 -1
- package/dist/cjs/labs/DataView/componentTypes.cjs.map +1 -1
- package/dist/cjs/labs/DataView/tableConstants.cjs.map +1 -1
- package/dist/cjs/labs/DataView/testSupportData.cjs.map +1 -1
- package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
- package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +2 -2
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
- package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs +4 -4
- package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs.map +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/PickerVirtualizationListBox.cjs.map +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/Layout.cjs.map +1 -1
- package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
- package/dist/cjs/labs/PaginatedTable.cjs +1 -1
- package/dist/cjs/labs/StaticTable.cjs +1 -1
- package/dist/cjs/labs/UserProfile.cjs +1 -1
- package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
- package/dist/cjs/logos.generated/Duo.cjs +1 -1
- package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
- package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
- package/dist/cjs/logos.generated/Persona.cjs +1 -1
- package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
- package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
- package/dist/cjs/message-bus/createBrowserMessageBus.cjs +78 -0
- package/dist/cjs/message-bus/createBrowserMessageBus.cjs.map +1 -0
- package/dist/cjs/message-bus/createMessageChannel.cjs +38 -0
- package/dist/cjs/message-bus/createMessageChannel.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenId.cjs +24 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenId.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeHost.cjs +99 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeHost.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeMessageBus.cjs +76 -0
- package/dist/cjs/message-bus/fullscreen/createFullscreenModeMessageBus.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenMessageChannel.cjs +35 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenMessageChannel.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenState.cjs +60 -0
- package/dist/cjs/message-bus/fullscreen/fullscreenState.cjs.map +1 -0
- package/dist/cjs/message-bus/fullscreen/watchElementDisconnection.cjs +51 -0
- package/dist/cjs/message-bus/fullscreen/watchElementDisconnection.cjs.map +1 -0
- package/dist/cjs/message-bus/index.cjs +111 -0
- package/dist/cjs/message-bus/index.cjs.map +1 -0
- package/dist/cjs/message-bus/messageGuards.cjs +23 -0
- package/dist/cjs/message-bus/messageGuards.cjs.map +1 -0
- package/dist/cjs/pendingDesignTokens/fullscreenTransitionTokens.cjs +21 -0
- package/dist/cjs/pendingDesignTokens/fullscreenTransitionTokens.cjs.map +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
- package/dist/cjs/test-utils/appendToSandbox.cjs.map +1 -1
- package/dist/cjs/test-utils/getControlledElement.cjs.map +1 -1
- package/dist/cjs/test-utils/renderWithOdysseyProvider.cjs.map +1 -1
- package/dist/cjs/test-utils/viewportTestSizes.cjs.map +1 -1
- package/dist/cjs/theme/components/Autocomplete.cjs.map +1 -1
- package/dist/cjs/theme/components/Button.cjs.map +1 -1
- package/dist/cjs/theme/components/CircularProgress.cjs.map +1 -1
- package/dist/cjs/theme/components/Drawer.cjs.map +1 -1
- package/dist/cjs/theme/components/Form.cjs.map +1 -1
- package/dist/cjs/theme/components/Input.cjs.map +1 -1
- package/dist/cjs/theme/components/Table.cjs.map +1 -1
- package/dist/cjs/theme/useAppElementContainerQuery.cjs.map +1 -1
- package/dist/cjs/theme/useContainerQuery.cjs.map +1 -1
- package/dist/cjs/theme/useMediaQuery.cjs.map +1 -1
- package/dist/cjs/tools/addSpecificity.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/SideNav.cjs.map +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/SideNavItemContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContentContext.cjs.map +1 -1
- 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/SideNav/SideNavToggleButton.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableOverlay.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
- package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
- package/dist/cjs/ui-shell/SkipToContent.cjs.map +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/TopNav/TopNavListItem.cjs.map +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/UiShellProvider.cjs.map +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/uiShellContentTypes.cjs.map +1 -1
- package/dist/cjs/ui-shell/uiShellSharedConstants.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/useContrastMode.cjs.map +1 -1
- package/dist/cjs/useStableCallback.cjs.map +1 -1
- package/dist/cjs/useThemeCache.cjs.map +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
- package/dist/esm/@types/react-augment.d.js.map +1 -1
- package/dist/esm/Accordion.js +1 -1
- package/dist/esm/Accordion.js.map +1 -1
- package/dist/esm/AnimationContext.js +1 -1
- package/dist/esm/Autocomplete.js +1 -1
- package/dist/esm/Autocomplete.js.map +1 -1
- package/dist/esm/Badge.js +1 -1
- package/dist/esm/Badge.js.map +1 -1
- package/dist/esm/Banner.js +1 -1
- package/dist/esm/Banner.js.map +1 -1
- package/dist/esm/Box.js +1 -1
- package/dist/esm/Box.js.map +1 -1
- package/dist/esm/Breadcrumbs.js +1 -1
- package/dist/esm/Breadcrumbs.js.map +1 -1
- package/dist/esm/Buttons/BaseButton.js +4 -2
- package/dist/esm/Buttons/BaseButton.js.map +1 -1
- package/dist/esm/Buttons/BaseMenuButton.js +1 -1
- package/dist/esm/Buttons/BaseMenuButton.js.map +1 -1
- package/dist/esm/Buttons/Button.js +1 -1
- package/dist/esm/Buttons/Button.js.map +1 -1
- package/dist/esm/Buttons/MenuButton.js +1 -1
- package/dist/esm/Buttons/MenuButton.js.map +1 -1
- package/dist/esm/Buttons/MenuItem.js +1 -1
- package/dist/esm/Buttons/MenuItem.js.map +1 -1
- package/dist/esm/Callout.js +1 -1
- package/dist/esm/Callout.js.map +1 -1
- package/dist/esm/Card.js +1 -1
- package/dist/esm/Card.js.map +1 -1
- package/dist/esm/CircularProgress.js +1 -1
- package/dist/esm/CircularProgress.js.map +1 -1
- package/dist/esm/ConditionalWrapper.js +1 -1
- package/dist/esm/ConditionalWrapper.js.map +1 -1
- package/dist/esm/CssBaseline.js.map +1 -1
- package/dist/esm/DataTable/DataTable.js +1 -1
- package/dist/esm/DataTable/DataTable.js.map +1 -1
- package/dist/esm/DataTable/DataTableRowActions.js +1 -1
- package/dist/esm/DataTable/DataTableSettings.js +1 -1
- package/dist/esm/DataTable/useRowReordering.js.map +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/DatePicker.js.map +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js.map +1 -1
- package/dist/esm/DatePickers/datePickerTheme.js +57 -27
- package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
- package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Dialog.js.map +1 -1
- package/dist/esm/Drawer.js +1 -1
- package/dist/esm/Drawer.js.map +1 -1
- package/dist/esm/EmptyState.js +1 -1
- package/dist/esm/EmptyState.js.map +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/Checkbox.js.map +1 -1
- package/dist/esm/Fields/CheckboxGroup.js +1 -1
- package/dist/esm/Fields/CheckboxGroup.js.map +1 -1
- package/dist/esm/Fields/Hint.js.map +1 -1
- package/dist/esm/Fields/Radio.js +1 -1
- package/dist/esm/Fields/RadioGroup.js +1 -1
- package/dist/esm/Fields/RadioGroup.js.map +1 -1
- package/dist/esm/Fieldset.js +1 -1
- package/dist/esm/Fieldset.js.map +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/FileUploader/FileUploader.js.map +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/Form.js.map +1 -1
- package/dist/esm/FormCheckedProps.js.map +1 -1
- package/dist/esm/FullScreenOverlay.js +1 -1
- package/dist/esm/FullScreenOverlayContext.js +1 -1
- package/dist/esm/HintLink.js +1 -1
- package/dist/esm/IconWithTooltip.js +1 -1
- package/dist/esm/IconWithTooltip.js.map +1 -1
- package/dist/esm/Link.js +1 -1
- package/dist/esm/Link.js.map +1 -1
- package/dist/esm/MuiPropsChild.js +1 -1
- package/dist/esm/NativeSelect.js +1 -1
- package/dist/esm/NativeSelect.js.map +1 -1
- package/dist/esm/OdysseyCacheProvider.js +1 -1
- package/dist/esm/OdysseyCacheProvider.js.map +1 -1
- package/dist/esm/OdysseyDesignTokensContext.js.map +1 -1
- package/dist/esm/OdysseyProvider.js +1 -1
- package/dist/esm/OdysseyProvider.js.map +1 -1
- package/dist/esm/OdysseyThemeProvider.js +1 -1
- package/dist/esm/OdysseyThemeProvider.js.map +1 -1
- package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
- package/dist/esm/Pagination/Pagination.js +1 -1
- package/dist/esm/Pagination/Pagination.js.map +1 -1
- package/dist/esm/PasswordField.js +1 -1
- package/dist/esm/PasswordField.js.map +1 -1
- package/dist/esm/ScreenReaderText.js +1 -1
- package/dist/esm/ScreenReaderText.js.map +1 -1
- package/dist/esm/SearchField.js +1 -1
- package/dist/esm/SearchField.js.map +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/Select.js.map +1 -1
- package/dist/esm/Stack.js +1 -1
- package/dist/esm/Stack.js.map +1 -1
- package/dist/esm/Status.js +1 -1
- package/dist/esm/Status.js.map +1 -1
- package/dist/esm/Surface.js +1 -1
- package/dist/esm/Surface.js.map +1 -1
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/Switch.js.map +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tabs.js.map +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/Tag.js.map +1 -1
- package/dist/esm/TagList.js +1 -1
- package/dist/esm/TagList.js.map +1 -1
- package/dist/esm/TextField.js +1 -1
- package/dist/esm/TextField.js.map +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Toast.js.map +1 -1
- package/dist/esm/ToastStack.js +1 -1
- package/dist/esm/ToastStack.js.map +1 -1
- package/dist/esm/Tooltip.js +1 -1
- package/dist/esm/Tooltip.js.map +1 -1
- package/dist/esm/Typography.js +12 -12
- package/dist/esm/Typography.js.map +1 -1
- package/dist/esm/__internal.js.map +1 -1
- package/dist/esm/charts/BarChart.js +1 -1
- package/dist/esm/charts/BarChart.js.map +1 -1
- package/dist/esm/charts/LineChart.js +1 -1
- package/dist/esm/charts/LineChart.js.map +1 -1
- package/dist/esm/charts/components/ChartContainer.js.map +1 -1
- package/dist/esm/charts/components/ChartError.js +1 -1
- package/dist/esm/charts/components/ChartError.js.map +1 -1
- package/dist/esm/charts/components/ChartFrame.js +1 -1
- package/dist/esm/charts/components/ChartFrame.js.map +1 -1
- package/dist/esm/charts/components/ChartPopoverContent.js +1 -1
- package/dist/esm/charts/components/ChartPopoverContent.js.map +1 -1
- package/dist/esm/charts/utils/chartTokens.js.map +1 -1
- package/dist/esm/charts/utils/chartTypes.js.map +1 -1
- package/dist/esm/charts/utils/formatChartValue.js.map +1 -1
- package/dist/esm/charts/utils/getChartSeriesPointData.js.map +1 -1
- package/dist/esm/charts/utils/hasDuplicateSeries.js.map +1 -1
- package/dist/esm/charts/utils/resolveChartLocale.js.map +1 -1
- package/dist/esm/charts/utils/useChartValueFormatter.js.map +1 -1
- package/dist/esm/charts/utils/useStableValue.js.map +1 -1
- package/dist/esm/createContrastColors.js.map +1 -1
- package/dist/esm/createOdysseyStyledComponent.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 +402 -0
- package/dist/esm/fullscreen/FullscreenRegion.js.map +1 -0
- package/dist/esm/fullscreen/easeFullscreenTransition.js +12 -0
- package/dist/esm/fullscreen/easeFullscreenTransition.js.map +1 -0
- package/dist/esm/fullscreen/getBackgroundColorBehindElement.js +53 -0
- package/dist/esm/fullscreen/getBackgroundColorBehindElement.js.map +1 -0
- package/dist/esm/fullscreen/useFullscreen.js +110 -0
- package/dist/esm/fullscreen/useFullscreen.js.map +1 -0
- package/dist/esm/fullscreen/useFullscreenId.js +16 -0
- package/dist/esm/fullscreen/useFullscreenId.js.map +1 -0
- package/dist/esm/getLogicalBoundaries.js.map +1 -1
- 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/inputUtils.js.map +1 -1
- package/dist/esm/labs/AppTile.js +1 -1
- package/dist/esm/labs/AppTile.js.map +1 -1
- package/dist/esm/labs/DataFilters.js +2 -2
- package/dist/esm/labs/DataFilters.js.map +1 -1
- package/dist/esm/labs/DataTable.js +1 -1
- package/dist/esm/labs/DataTable.js.map +1 -1
- package/dist/esm/labs/DataTablePagination.js +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
- package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
- package/dist/esm/labs/DataView/DataCard.js +1 -1
- package/dist/esm/labs/DataView/DataCard.js.map +1 -1
- package/dist/esm/labs/DataView/DataTable.js +1 -1
- package/dist/esm/labs/DataView/DataTable.js.map +1 -1
- package/dist/esm/labs/DataView/DataView.js +1 -1
- 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/RowActions.js.map +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
- package/dist/esm/labs/DataView/TableSettings.js +1 -1
- package/dist/esm/labs/DataView/TableSettings.js.map +1 -1
- package/dist/esm/labs/DataView/componentTypes.js.map +1 -1
- package/dist/esm/labs/DataView/tableConstants.js.map +1 -1
- package/dist/esm/labs/DataView/testSupportData.js.map +1 -1
- package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
- package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimePicker.js +2 -2
- package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
- package/dist/esm/labs/DatePickers/dateTimePickerTheme.js +4 -4
- package/dist/esm/labs/DatePickers/dateTimePickerTheme.js.map +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/PickerVirtualizationListBox.js.map +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/Layout.js.map +1 -1
- package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
- package/dist/esm/labs/PaginatedTable.js +1 -1
- package/dist/esm/labs/StaticTable.js +1 -1
- package/dist/esm/labs/UserProfile.js +1 -1
- package/dist/esm/labs/UserProfileMenuButton.js +1 -1
- package/dist/esm/logos.generated/Duo.js +1 -1
- package/dist/esm/logos.generated/GoogleAuth.js +1 -1
- package/dist/esm/logos.generated/OktaVerify.js +1 -1
- package/dist/esm/logos.generated/Persona.js +1 -1
- package/dist/esm/logos.generated/SymantecVip.js +1 -1
- package/dist/esm/logos.generated/Yubikey.js +1 -1
- package/dist/esm/message-bus/createBrowserMessageBus.js +72 -0
- package/dist/esm/message-bus/createBrowserMessageBus.js.map +1 -0
- package/dist/esm/message-bus/createMessageChannel.js +33 -0
- package/dist/esm/message-bus/createMessageChannel.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenId.js +18 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenId.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeHost.js +92 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeHost.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeMessageBus.js +69 -0
- package/dist/esm/message-bus/fullscreen/createFullscreenModeMessageBus.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/fullscreenMessageChannel.js +29 -0
- package/dist/esm/message-bus/fullscreen/fullscreenMessageChannel.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/fullscreenState.js +46 -0
- package/dist/esm/message-bus/fullscreen/fullscreenState.js.map +1 -0
- package/dist/esm/message-bus/fullscreen/watchElementDisconnection.js +44 -0
- package/dist/esm/message-bus/fullscreen/watchElementDisconnection.js.map +1 -0
- package/dist/esm/message-bus/index.js +22 -0
- package/dist/esm/message-bus/index.js.map +1 -0
- package/dist/esm/message-bus/messageGuards.js +14 -0
- package/dist/esm/message-bus/messageGuards.js.map +1 -0
- package/dist/esm/pendingDesignTokens/fullscreenTransitionTokens.js +15 -0
- package/dist/esm/pendingDesignTokens/fullscreenTransitionTokens.js.map +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/esm/test-utils/appendToSandbox.js.map +1 -1
- package/dist/esm/test-utils/getControlledElement.js.map +1 -1
- package/dist/esm/test-utils/renderWithOdysseyProvider.js.map +1 -1
- package/dist/esm/test-utils/viewportTestSizes.js.map +1 -1
- package/dist/esm/theme/components/Autocomplete.js.map +1 -1
- package/dist/esm/theme/components/Button.js.map +1 -1
- package/dist/esm/theme/components/CircularProgress.js.map +1 -1
- package/dist/esm/theme/components/Drawer.js.map +1 -1
- package/dist/esm/theme/components/Form.js.map +1 -1
- package/dist/esm/theme/components/Input.js.map +1 -1
- package/dist/esm/theme/components/Table.js.map +1 -1
- package/dist/esm/theme/useAppElementContainerQuery.js.map +1 -1
- package/dist/esm/theme/useContainerQuery.js.map +1 -1
- package/dist/esm/theme/useMediaQuery.js.map +1 -1
- package/dist/esm/tools/addSpecificity.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/SideNav.js.map +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/SideNavItemContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContentContext.js.map +1 -1
- 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/SideNav/SideNavToggleButton.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableOverlay.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
- package/dist/esm/ui-shell/SkipToContent.js +1 -1
- package/dist/esm/ui-shell/SkipToContent.js.map +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/TopNav/TopNavListItem.js.map +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/UiShellProvider.js.map +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/uiShellContentTypes.js.map +1 -1
- package/dist/esm/ui-shell/uiShellSharedConstants.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/useContrastMode.js.map +1 -1
- package/dist/esm/useStableCallback.js.map +1 -1
- package/dist/esm/useThemeCache.js.map +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Accordion.d.ts.map +1 -1
- package/dist/types/Autocomplete.d.ts +5 -17
- package/dist/types/Autocomplete.d.ts.map +1 -1
- package/dist/types/Badge.d.ts.map +1 -1
- package/dist/types/Banner.d.ts.map +1 -1
- package/dist/types/Box.d.ts.map +1 -1
- package/dist/types/Breadcrumbs.d.ts +4 -8
- package/dist/types/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/Buttons/BaseButton.d.ts +4 -8
- package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
- package/dist/types/Buttons/BaseMenuButton.d.ts +1 -2
- package/dist/types/Buttons/BaseMenuButton.d.ts.map +1 -1
- package/dist/types/Buttons/Button.d.ts.map +1 -1
- package/dist/types/Buttons/MenuButton.d.ts.map +1 -1
- package/dist/types/Buttons/MenuItem.d.ts.map +1 -1
- package/dist/types/Callout.d.ts.map +1 -1
- package/dist/types/Card.d.ts.map +1 -1
- package/dist/types/CircularProgress.d.ts +1 -2
- package/dist/types/CircularProgress.d.ts.map +1 -1
- package/dist/types/ConditionalWrapper.d.ts +1 -2
- package/dist/types/ConditionalWrapper.d.ts.map +1 -1
- package/dist/types/CssBaseline.d.ts +1 -2
- package/dist/types/CssBaseline.d.ts.map +1 -1
- package/dist/types/DataTable/DataTable.d.ts +9 -19
- package/dist/types/DataTable/DataTable.d.ts.map +1 -1
- package/dist/types/DataTable/useRowReordering.d.ts.map +1 -1
- package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
- package/dist/types/DatePickers/TimeZonePicker.d.ts +1 -2
- package/dist/types/DatePickers/TimeZonePicker.d.ts.map +1 -1
- package/dist/types/DatePickers/datePickerTheme.d.ts.map +1 -1
- package/dist/types/DatePickers/useOdysseyDateFields.d.ts +4 -8
- package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
- package/dist/types/Dialog.d.ts +5 -10
- package/dist/types/Dialog.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts +4 -9
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/EmptyState.d.ts.map +1 -1
- package/dist/types/Fields/Checkbox.d.ts.map +1 -1
- package/dist/types/Fields/CheckboxGroup.d.ts.map +1 -1
- package/dist/types/Fields/Hint.d.ts.map +1 -1
- package/dist/types/Fields/RadioGroup.d.ts.map +1 -1
- package/dist/types/Fieldset.d.ts.map +1 -1
- package/dist/types/FileUploader/FileUploader.d.ts +2 -4
- package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
- package/dist/types/Form.d.ts +6 -13
- package/dist/types/Form.d.ts.map +1 -1
- package/dist/types/FormCheckedProps.d.ts +4 -8
- package/dist/types/FormCheckedProps.d.ts.map +1 -1
- package/dist/types/IconWithTooltip.d.ts.map +1 -1
- package/dist/types/Link.d.ts.map +1 -1
- package/dist/types/NativeSelect.d.ts +2 -4
- package/dist/types/NativeSelect.d.ts.map +1 -1
- package/dist/types/OdysseyCacheProvider.d.ts +5 -11
- package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
- package/dist/types/OdysseyDesignTokensContext.d.ts.map +1 -1
- package/dist/types/OdysseyProvider.d.ts +1 -2
- package/dist/types/OdysseyProvider.d.ts.map +1 -1
- package/dist/types/OdysseyThemeProvider.d.ts +1 -2
- package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/types/Pagination/Pagination.d.ts +1 -2
- package/dist/types/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/PasswordField.d.ts +2 -14
- package/dist/types/PasswordField.d.ts.map +1 -1
- package/dist/types/ScreenReaderText.d.ts +1 -2
- package/dist/types/ScreenReaderText.d.ts.map +1 -1
- package/dist/types/SearchField.d.ts +2 -4
- package/dist/types/SearchField.d.ts.map +1 -1
- package/dist/types/Select.d.ts.map +1 -1
- package/dist/types/Stack.d.ts.map +1 -1
- package/dist/types/Status.d.ts.map +1 -1
- package/dist/types/Surface.d.ts.map +1 -1
- package/dist/types/Switch.d.ts.map +1 -1
- package/dist/types/Tabs.d.ts +1 -2
- package/dist/types/Tabs.d.ts.map +1 -1
- package/dist/types/Tag.d.ts.map +1 -1
- package/dist/types/TagList.d.ts.map +1 -1
- package/dist/types/TextField.d.ts +6 -12
- package/dist/types/TextField.d.ts.map +1 -1
- package/dist/types/Toast.d.ts +2 -4
- package/dist/types/Toast.d.ts.map +1 -1
- package/dist/types/ToastStack.d.ts.map +1 -1
- package/dist/types/Tooltip.d.ts.map +1 -1
- package/dist/types/Typography.d.ts +3 -6
- package/dist/types/Typography.d.ts.map +1 -1
- package/dist/types/__internal.d.ts +1 -2
- package/dist/types/__internal.d.ts.map +1 -1
- package/dist/types/charts/BarChart.d.ts +1 -3
- package/dist/types/charts/BarChart.d.ts.map +1 -1
- package/dist/types/charts/LineChart.d.ts +1 -3
- package/dist/types/charts/LineChart.d.ts.map +1 -1
- package/dist/types/charts/components/ChartContainer.d.ts +1 -3
- package/dist/types/charts/components/ChartContainer.d.ts.map +1 -1
- package/dist/types/charts/components/ChartError.d.ts +1 -3
- package/dist/types/charts/components/ChartError.d.ts.map +1 -1
- package/dist/types/charts/components/ChartFrame.d.ts +7 -16
- package/dist/types/charts/components/ChartFrame.d.ts.map +1 -1
- package/dist/types/charts/components/ChartPopoverContent.d.ts +14 -36
- package/dist/types/charts/components/ChartPopoverContent.d.ts.map +1 -1
- package/dist/types/charts/utils/chartTokens.d.ts +7 -25
- package/dist/types/charts/utils/chartTokens.d.ts.map +1 -1
- package/dist/types/charts/utils/chartTypes.d.ts +21 -55
- package/dist/types/charts/utils/chartTypes.d.ts.map +1 -1
- package/dist/types/charts/utils/formatChartValue.d.ts +7 -28
- package/dist/types/charts/utils/formatChartValue.d.ts.map +1 -1
- package/dist/types/charts/utils/getChartSeriesPointData.d.ts +5 -16
- package/dist/types/charts/utils/getChartSeriesPointData.d.ts.map +1 -1
- package/dist/types/charts/utils/hasDuplicateSeries.d.ts +1 -3
- package/dist/types/charts/utils/hasDuplicateSeries.d.ts.map +1 -1
- package/dist/types/charts/utils/resolveChartLocale.d.ts +3 -11
- package/dist/types/charts/utils/resolveChartLocale.d.ts.map +1 -1
- package/dist/types/charts/utils/useChartValueFormatter.d.ts +3 -10
- package/dist/types/charts/utils/useChartValueFormatter.d.ts.map +1 -1
- package/dist/types/charts/utils/useStableValue.d.ts +3 -12
- package/dist/types/charts/utils/useStableValue.d.ts.map +1 -1
- package/dist/types/createContrastColors.d.ts.map +1 -1
- package/dist/types/createOdysseyStyledComponent.d.ts +1 -3
- package/dist/types/createOdysseyStyledComponent.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/getLogicalBoundaries.d.ts +1 -2
- package/dist/types/getLogicalBoundaries.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.d.ts +8 -0
- package/dist/types/i18n.generated/i18n.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.resources.d.ts +12 -0
- package/dist/types/i18n.generated/i18n.resources.d.ts.map +1 -1
- package/dist/types/icons.generated/FullscreenEnter.d.ts +16 -0
- package/dist/types/icons.generated/FullscreenEnter.d.ts.map +1 -0
- package/dist/types/icons.generated/FullscreenExit.d.ts +16 -0
- package/dist/types/icons.generated/FullscreenExit.d.ts.map +1 -0
- package/dist/types/icons.generated/index.d.ts +2 -0
- package/dist/types/icons.generated/index.d.ts.map +1 -1
- package/dist/types/icons.generated/lazyIconDictionary.d.ts.map +1 -1
- package/dist/types/icons.generated/names.d.ts +1 -1
- package/dist/types/icons.generated/names.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/inputUtils.d.ts +2 -4
- package/dist/types/inputUtils.d.ts.map +1 -1
- package/dist/types/labs/AppTile.d.ts.map +1 -1
- package/dist/types/labs/DataFilters.d.ts +9 -20
- package/dist/types/labs/DataFilters.d.ts.map +1 -1
- package/dist/types/labs/DataTable.d.ts +10 -21
- package/dist/types/labs/DataTable.d.ts.map +1 -1
- package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
- package/dist/types/labs/DataView/CardLayoutContent.d.ts +1 -1
- package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataCard.d.ts +1 -2
- package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataTable.d.ts +1 -0
- package/dist/types/labs/DataView/DataTable.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataView.d.ts +1 -0
- package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
- package/dist/types/labs/DataView/TableLayoutContent.d.ts +1 -1
- package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
- package/dist/types/labs/DataView/TableSettings.d.ts +1 -1
- package/dist/types/labs/DataView/TableSettings.d.ts.map +1 -1
- package/dist/types/labs/DataView/componentTypes.d.ts +4 -13
- package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/types/labs/DataView/tableConstants.d.ts.map +1 -1
- package/dist/types/labs/DataView/testSupportData.d.ts.map +1 -1
- package/dist/types/labs/DataView/useFilterConversion.d.ts.map +1 -1
- package/dist/types/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts.map +1 -1
- package/dist/types/labs/PageTemplate/Layout.d.ts +1 -2
- package/dist/types/labs/PageTemplate/Layout.d.ts.map +1 -1
- package/dist/types/message-bus/createBrowserMessageBus.d.ts +56 -0
- package/dist/types/message-bus/createBrowserMessageBus.d.ts.map +1 -0
- package/dist/types/message-bus/createMessageChannel.d.ts +81 -0
- package/dist/types/message-bus/createMessageChannel.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenId.d.ts +22 -0
- package/dist/types/message-bus/fullscreen/createFullscreenId.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeHost.d.ts +44 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeHost.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeMessageBus.d.ts +55 -0
- package/dist/types/message-bus/fullscreen/createFullscreenModeMessageBus.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/fullscreenMessageChannel.d.ts +49 -0
- package/dist/types/message-bus/fullscreen/fullscreenMessageChannel.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/fullscreenState.d.ts +66 -0
- package/dist/types/message-bus/fullscreen/fullscreenState.d.ts.map +1 -0
- package/dist/types/message-bus/fullscreen/watchElementDisconnection.d.ts +31 -0
- package/dist/types/message-bus/fullscreen/watchElementDisconnection.d.ts.map +1 -0
- package/dist/types/message-bus/index.d.ts +21 -0
- package/dist/types/message-bus/index.d.ts.map +1 -0
- package/dist/types/message-bus/messageGuards.d.ts +24 -0
- package/dist/types/message-bus/messageGuards.d.ts.map +1 -0
- package/dist/types/pendingDesignTokens/fullscreenTransitionTokens.d.ts +21 -0
- package/dist/types/pendingDesignTokens/fullscreenTransitionTokens.d.ts.map +1 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/types/test-utils/appendToSandbox.d.ts +3 -16
- package/dist/types/test-utils/appendToSandbox.d.ts.map +1 -1
- package/dist/types/test-utils/getControlledElement.d.ts +1 -2
- package/dist/types/test-utils/getControlledElement.d.ts.map +1 -1
- package/dist/types/test-utils/renderWithOdysseyProvider.d.ts.map +1 -1
- package/dist/types/test-utils/viewportTestSizes.d.ts.map +1 -1
- package/dist/types/theme/components/Autocomplete.d.ts.map +1 -1
- package/dist/types/theme/components/Button.d.ts.map +1 -1
- package/dist/types/theme/components/CircularProgress.d.ts.map +1 -1
- package/dist/types/theme/components/Drawer.d.ts.map +1 -1
- package/dist/types/theme/components/Form.d.ts.map +1 -1
- package/dist/types/theme/components/Input.d.ts.map +1 -1
- package/dist/types/theme/components/Table.d.ts.map +1 -1
- package/dist/types/theme/useAppElementContainerQuery.d.ts +1 -7
- package/dist/types/theme/useAppElementContainerQuery.d.ts.map +1 -1
- package/dist/types/theme/useContainerQuery.d.ts +2 -8
- package/dist/types/theme/useContainerQuery.d.ts.map +1 -1
- package/dist/types/theme/useMediaQuery.d.ts +12 -38
- package/dist/types/theme/useMediaQuery.d.ts.map +1 -1
- package/dist/types/tools/addSpecificity.d.ts +1 -2
- package/dist/types/tools/addSpecificity.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts +1 -3
- package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts +1 -3
- package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableOverlay.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/types.d.ts +6 -13
- package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
- package/dist/types/ui-shell/SkipToContent.d.ts.map +1 -1
- package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts +1 -2
- package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShell.d.ts +11 -9
- package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/UiShellProvider.d.ts +2 -4
- package/dist/types/ui-shell/UiShellProvider.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 +27 -5
- package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
- package/dist/types/ui-shell/uiShellContentTypes.d.ts +1 -2
- package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -1
- package/dist/types/ui-shell/uiShellSharedConstants.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/useContrastMode.d.ts +2 -7
- package/dist/types/useContrastMode.d.ts.map +1 -1
- package/dist/types/useStableCallback.d.ts +5 -16
- package/dist/types/useStableCallback.d.ts.map +1 -1
- package/dist/types/useThemeCache.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts +6 -12
- package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
- package/package.json +19 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContrastMode.cjs","names":["Tokens","_interopRequireWildcard","require","_react","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 * as Tokens from \"@okta/odyssey-design-tokens\";\nimport {\n createContext,\n type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n /**\n * Odyssey's app wrapper element: the contrast and height container\n * `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so\n * container queries track the space Odyssey actually occupies. Absent outside\n * a provider, and `current` stays `null` when the provider renders with\n * `hasWrapperElement={false}`.\n */\n contrastContainerRef?: RefObject<HTMLDivElement>;\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\n/** Default background color when none is detected: HueNeutral50 (gray = highContrast). */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary.\n * When `parentElement` is null (e.g., at a shadow root), this checks if the\n * element is inside a ShadowRoot and jumps to the host element to continue\n * traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used for white background (HueNeutralWhite).\n * - High contrast mode is used for gray background (defaultParentBackgroundColor = HueNeutral50).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds\n * set outside of shadow roots.\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = getParentElement(element);\n }\n return defaultParentBackgroundColor; // Default to gray/high contrast if no background color is found\n};\n\nexport const deriveContrastMode = (bgColor: string): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\";\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(deriveContrastMode(newBgColor));\n }, []);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and\n // document.head may not be accessible. Guard against null to\n // prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it\n // works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,SAAA,GAAAF,OAAA;AAAyC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP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IAC5DhB,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXoB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAChC,oBAAoB,EAAES,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLR,oBAAoB;IACpBlC,YAAY;IACZqC;EACF,CAAC;AACH,CAAC;AAACvC,OAAA,CAAAkC,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"useContrastMode.cjs","names":["Tokens","_interopRequireWildcard","require","_react","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 * as Tokens from \"@okta/odyssey-design-tokens\";\nimport {\n createContext,\n type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n /**\n * Odyssey's app wrapper element: the contrast and height container `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so container queries track the space Odyssey actually occupies. Absent outside a provider, and `current` stays `null` when the provider renders with `hasWrapperElement={false}`.\n */\n contrastContainerRef?: RefObject<HTMLDivElement>;\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\n/** Default background color when none is detected: HueNeutral50 (gray = highContrast). */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary. When `parentElement` is null (e.g., at a shadow root), this checks if the element is inside a ShadowRoot and jumps to the host element to continue traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used for white background (HueNeutralWhite).\n * - High contrast mode is used for gray background (defaultParentBackgroundColor = HueNeutral50).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds set outside of shadow roots.\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = getParentElement(element);\n }\n return defaultParentBackgroundColor; // Default to gray/high contrast if no background color is found\n};\n\nexport const deriveContrastMode = (bgColor: string): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\";\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(deriveContrastMode(newBgColor));\n }, []);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and document.head may not be accessible. Guard against null to prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,SAAA,GAAAF,OAAA;AAAyC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MA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O,EAAE,OAAO;MACpC,CAAC,CAAC;IACJ;IAEA,IAAIJ,QAAQ,CAACK,IAAI,EAAE;MACjBR,QAAQ,CAACK,OAAO,CAACF,QAAQ,CAACK,IAAI,EAAE;QAC9BC,SAAS,EAAE,IAAI;QACfC,OAAO,EAAE;MACX,CAAC,CAAC;IACJ;IAEA,MAAMC,eAAe,GAAIC,KAAY,IAAK;MACxC,IACEA,KAAK,YAAYC,eAAe,IAChCD,KAAK,CAACE,YAAY,KAAK,kBAAkB,EACzC;QACAnB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAGD,MAAMoB,SAAS,GAAG5B,oBAAoB,CAACW,OAAO,EAAEnB,WAAW,CAAC,CAAC,IAAIwB,QAAQ;IACzEY,SAAS,CAACC,gBAAgB,CAAC,eAAe,EAAEL,eAAe,CAAC;IAC5DhB,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXoB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAChC,oBAAoB,EAAES,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLR,oBAAoB;IACpBlC,YAAY;IACZqC;EACF,CAAC;AACH,CAAC;AAACvC,OAAA,CAAAkC,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStableCallback.cjs","names":["_utils","require","noop","undefined","useStableCallback","callback","unstable_useEventCallback","exports"],"sources":["../../src/useStableCallback.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { unstable_useEventCallback } from \"@mui/utils\";\n\nconst noop = () => undefined;\n\n/**\n * Returns a callback with a permanent identity that always invokes the most
|
|
1
|
+
{"version":3,"file":"useStableCallback.cjs","names":["_utils","require","noop","undefined","useStableCallback","callback","unstable_useEventCallback","exports"],"sources":["../../src/useStableCallback.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { unstable_useEventCallback } from \"@mui/utils\";\n\nconst noop = () => undefined;\n\n/**\n * Returns a callback with a permanent identity that always invokes the most recent version of `callback`.\n *\n * Use this for any consumer-supplied callback a component notifies from a `useEffect`. Consumers routinely pass an inline arrow function, which has a new identity on every render. Listing that identity in an effect's dependency array makes the effect run on renders where nothing it reports actually changed, and it then reports values captured before the latest commit. When the consumer feeds a reported value back in as a prop, the prop and the component's internal state can swap values on every commit and never settle.\n *\n * The returned callback is safe to omit from dependency arrays, so the effect can depend only on the state it reports:\n *\n * ```tsx\n * const stableOnPaginationChange = useStableCallback(onPaginationChange);\n *\n * useEffect(() => {\n * stableOnPaginationChange(pagination);\n * }, [pagination, stableOnPaginationChange]);\n * ```\n *\n * The latest `callback` is captured in a layout effect, so the returned callback must not be invoked during render. Invoke it from an effect or an event handler.\n *\n * Passing `undefined` is supported and yields a callback that does nothing, which removes the need for optional-call syntax at every call site.\n *\n * @param callback The callback to stabilize, typically a component prop.\n */\nexport const useStableCallback = <\n CallbackArguments extends unknown[],\n CallbackReturn,\n>(\n callback?: (...callbackArguments: CallbackArguments) => CallbackReturn,\n) =>\n unstable_useEventCallback<CallbackArguments, CallbackReturn | undefined>(\n callback ?? noop,\n );\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMC,IAAI,GAAGA,CAAA,KAAMC,SAAS;AAuBrB,MAAMC,iBAAiB,GAI5BC,QAAsE,IAEtE,IAAAC,gCAAyB,EACvBD,QAAQ,IAAIH,IACd,CAAC;AAACK,OAAA,CAAAH,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeCache.cjs","names":["_react","require","_theme","ThemeCacheContext","exports","createContext","useThemeCache","odysseyTokens","shadowRootElement","existingCache","useContext","localCache","useMemo","Map","getOrCreateTheme","useCallback","mode","get","cached","theme","createOdysseyMuiTheme","contrastMode","set","themeCache"],"sources":["../../src/useThemeCache.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Theme } from \"@mui/material/styles\";\nimport { createContext, useCallback, useContext, useMemo } from \"react\";\n\nimport { createOdysseyMuiTheme, DesignTokens } from \"./theme/theme.js\";\nimport { ContrastMode } from \"./useContrastMode.js\";\n\nexport type ThemeCache = {\n get: (contrastMode: ContrastMode) => Theme;\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n};\n\nexport const ThemeCacheContext = createContext<ThemeCache | null>(null);\n\nexport const useThemeCache = ({\n odysseyTokens,\n shadowRootElement,\n}: {\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n}) => {\n const existingCache = useContext(ThemeCacheContext);\n\n const localCache = useMemo(\n () => new Map<ContrastMode, Theme>(),\n // Reset the cache when tokens or shadow root change so stale Themes
|
|
1
|
+
{"version":3,"file":"useThemeCache.cjs","names":["_react","require","_theme","ThemeCacheContext","exports","createContext","useThemeCache","odysseyTokens","shadowRootElement","existingCache","useContext","localCache","useMemo","Map","getOrCreateTheme","useCallback","mode","get","cached","theme","createOdysseyMuiTheme","contrastMode","set","themeCache"],"sources":["../../src/useThemeCache.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Theme } from \"@mui/material/styles\";\nimport { createContext, useCallback, useContext, useMemo } from \"react\";\n\nimport { createOdysseyMuiTheme, DesignTokens } from \"./theme/theme.js\";\nimport { ContrastMode } from \"./useContrastMode.js\";\n\nexport type ThemeCache = {\n get: (contrastMode: ContrastMode) => Theme;\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n};\n\nexport const ThemeCacheContext = createContext<ThemeCache | null>(null);\n\nexport const useThemeCache = ({\n odysseyTokens,\n shadowRootElement,\n}: {\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n}) => {\n const existingCache = useContext(ThemeCacheContext);\n\n const localCache = useMemo(\n () => new Map<ContrastMode, Theme>(),\n // Reset the cache when tokens or shadow root change so stale Themes can't be returned for a different DesignTokens/shadowRootElement pair.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [odysseyTokens, shadowRootElement],\n );\n\n const getOrCreateTheme = useCallback(\n (mode: ContrastMode) => {\n if (\n existingCache &&\n existingCache.odysseyTokens === odysseyTokens &&\n existingCache.shadowRootElement === shadowRootElement\n ) {\n return existingCache.get(mode);\n }\n const cached = localCache.get(mode);\n if (cached) return cached;\n const theme = createOdysseyMuiTheme({\n contrastMode: mode,\n odysseyTokens,\n shadowRootElement,\n });\n localCache.set(mode, theme);\n return theme;\n },\n [existingCache, localCache, odysseyTokens, shadowRootElement],\n );\n\n const themeCache = useMemo<ThemeCache>(\n () => ({ get: getOrCreateTheme, odysseyTokens, shadowRootElement }),\n [getOrCreateTheme, odysseyTokens, shadowRootElement],\n );\n\n return { getOrCreateTheme, themeCache };\n};\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,oBAAa,EAAoB,IAAI,CAAC;AAEhE,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,aAAa;EACbC;AAIF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAG,IAAAC,iBAAU,EAACP,iBAAiB,CAAC;EAEnD,MAAMQ,UAAU,GAAG,IAAAC,cAAO,EACxB,MAAM,IAAIC,GAAG,CAAsB,CAAC,EAGpC,CAACN,aAAa,EAAEC,iBAAiB,CACnC,CAAC;EAED,MAAMM,gBAAgB,GAAG,IAAAC,kBAAW,EACjCC,IAAkB,IAAK;IACtB,IACEP,aAAa,IACbA,aAAa,CAACF,aAAa,KAAKA,aAAa,IAC7CE,aAAa,CAACD,iBAAiB,KAAKA,iBAAiB,EACrD;MACA,OAAOC,aAAa,CAACQ,GAAG,CAACD,IAAI,CAAC;IAChC;IACA,MAAME,MAAM,GAAGP,UAAU,CAACM,GAAG,CAACD,IAAI,CAAC;IACnC,IAAIE,MAAM,EAAE,OAAOA,MAAM;IACzB,MAAMC,KAAK,GAAG,IAAAC,4BAAqB,EAAC;MAClCC,YAAY,EAAEL,IAAI;MAClBT,aAAa;MACbC;IACF,CAAC,CAAC;IACFG,UAAU,CAACW,GAAG,CAACN,IAAI,EAAEG,KAAK,CAAC;IAC3B,OAAOA,KAAK;EACd,CAAC,EACD,CAACV,aAAa,EAAEE,UAAU,EAAEJ,aAAa,EAAEC,iBAAiB,CAC9D,CAAC;EAED,MAAMe,UAAU,GAAG,IAAAX,cAAO,EACxB,OAAO;IAAEK,GAAG,EAAEH,gBAAgB;IAAEP,aAAa;IAAEC;EAAkB,CAAC,CAAC,EACnE,CAACM,gBAAgB,EAAEP,aAAa,EAAEC,iBAAiB,CACrD,CAAC;EAED,OAAO;IAAEM,gBAAgB;IAAES;EAAW,CAAC;AACzC,CAAC;AAACnB,OAAA,CAAAE,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -15,5 +15,5 @@ exports.default = void 0;
|
|
|
15
15
|
*
|
|
16
16
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
var _default = exports.default = "1-
|
|
18
|
+
var _default = exports.default = "1-71-1";
|
|
19
19
|
//# sourceMappingURL=odysseyWebComponentVersion.generated.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-
|
|
1
|
+
{"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-71-1\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderReactInWebComponent.cjs","names":["_client","require","_createReactRootElements","_encapsulateShadowDomFromGlobalStyles","_odysseyWebComponentVersionGenerated","_interopRequireDefault","e","__esModule","default","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRoot","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","render","connectedCallback","encapsulateShadowDomFromGlobalStyles","nonce","getAttribute","window","cspNonce","Error","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n #reactRoot: Root | null = null;\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.#getReactComponent = getReactComponent;\n if (this.#reactRoot) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n if (this.#reactRoot) {\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);\n\n if (this.#getReactComponent) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n disconnectedCallback() {\n if (!this.#reactRoot) {\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n this.#reactRoot.unmount();\n this.#reactRoot = null;\n // #getReactComponent is preserved — if reconnected it will render on connectedCallback\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance.\n * Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":";;;;;;AAaA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAIA,IAAAE,qCAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAgE,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AApBhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAmBO,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,kCAAkC;AAGxE,MAAME,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,GACpC,+BAA+BC,4CAAO,EAAE,CAACC,WAAW,CAAC,CAAC;AAExD,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAErD,MAAMC,iBAAiB,SAASH,2BAA2B,CAAC;EACjE,CAACI,iBAAiB,GAA2C,IAAI;EACxD,CAACC,iBAAiB;EACXC,WAAW,GAAW,IAAI,CAACC,SAAS;EACpD,CAACC,SAAS,GAAgB,IAAI;EAE9BC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAAC,CAACJ,iBAAiB,GAAG,IAAAK,gDAAuB,EAAC,CAAC;IACnD,MAAM;MAAEC,cAAc;MAAEC;IAAkB,CAAC,GAAG,IAAI,CAAC,CAACP,iBAAiB;IAErE,MAAMQ,UAAU,GAAG,IAAI,CAACC,YAAY,CAAC;MAAEC,IAAI,EAAE;IAAO,CAAC,CAAC;IACtDF,UAAU,CAACG,WAAW,CAACJ,iBAAiB,CAAC;IACzCC,UAAU,CAACG,WAAW,CAACL,cAAc,CAAC;EACxC;EAQAM,oB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":"renderReactInWebComponent.cjs","names":["_client","require","_createReactRootElements","_encapsulateShadowDomFromGlobalStyles","_odysseyWebComponentVersionGenerated","_interopRequireDefault","e","__esModule","default","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRoot","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","render","connectedCallback","encapsulateShadowDomFromGlobalStyles","nonce","getAttribute","window","cspNonce","Error","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n #reactRoot: Root | null = null;\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.#getReactComponent = getReactComponent;\n if (this.#reactRoot) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n if (this.#reactRoot) {\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);\n\n if (this.#getReactComponent) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n disconnectedCallback() {\n if (!this.#reactRoot) {\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n this.#reactRoot.unmount();\n this.#reactRoot = null;\n // #getReactComponent is preserved — if reconnected it will render on connectedCallback\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots. A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component. It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps. You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance. Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component. If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":";;;;;;AAaA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAIA,IAAAE,qCAAA,GAAAF,OAAA;AACA,IAAAG,oCAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAgE,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AApBhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAmBO,MAAMG,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG,kCAAkC;AAGxE,MAAME,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,GACpC,+BAA+BC,4CAAO,EAAE,CAACC,WAAW,CAAC,CAAC;AAExD,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAErD,MAAMC,iBAAiB,SAASH,2BAA2B,CAAC;EACjE,CAACI,iBAAiB,GAA2C,IAAI;EACxD,CAACC,iBAAiB;EACXC,WAAW,GAAW,IAAI,CAACC,SAAS;EACpD,CAACC,SAAS,GAAgB,IAAI;EAE9BC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAAC,CAACJ,iBAAiB,GAAG,IAAAK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CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAACxB,WAAW,CAAC0B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAACzB,WAAW,CAAC0B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAC9C,OAAA,CAAA0C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-augment.d.js","names":[],"sources":["../../../src/@types/react-augment.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 \"react\";\n\ndeclare module \"react\" {\n type DataAttributeKey = `data-${string}`;\n interface InputHTMLAttributes<T> extends HTMLAttributes<T> {\n // Allows data-* props to be passed to inputProps in nested MUI components
|
|
1
|
+
{"version":3,"file":"react-augment.d.js","names":[],"sources":["../../../src/@types/react-augment.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 \"react\";\n\ndeclare module \"react\" {\n type DataAttributeKey = `data-${string}`;\n interface InputHTMLAttributes<T> extends HTMLAttributes<T> {\n // Allows data-* props to be passed to inputProps in nested MUI components see: https://github.com/mui/material-ui/issues/20160\n [dataAttribute: DataAttributeKey]: string | undefined;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,OAAO","ignoreList":[]}
|
package/dist/esm/Accordion.js
CHANGED
|
@@ -57,6 +57,6 @@ const Accordion = ({
|
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
59
|
const MemoizedAccordion = memo(Accordion);
|
|
60
|
-
MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.
|
|
60
|
+
MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.71.1";
|
|
61
61
|
export { MemoizedAccordion as Accordion };
|
|
62
62
|
//# sourceMappingURL=Accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","accordionVariantValues","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","testId","translate","variant","headerId","contentId","_Accordion","defaultExpanded","disabled","disableGutters","expanded","_AccordionSummary","expandIcon","component","_AccordionDetails","MemoizedAccordion","displayName"],"sources":["../../src/Accordion.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionProps as MuiAccordionProps,\n AccordionSummary as MuiAccordionSummary,\n} from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { ChevronDownIcon } from \"./icons.generated/index.js\";\nimport { Support } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const accordionVariantValues = [\"default\", \"borderless\"] as const;\n\nexport type AccordionProps = {\n /**\n * The content of the Accordion itself\n */\n children: ReactNode;\n /**\n * Defines IDs for the header and the content of the Accordion\n */\n id?: string;\n /**\n * If `true`, the accordion item is expanded on initial render.\n */\n isDefaultExpanded?: boolean;\n /**\n * If `true`, the accordion item is disabled and cannot be expanded or collapsed.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the accordion item is expanded (controlled).\n */\n isExpanded?: boolean;\n /**\n * The label text for the AccordionSummary\n */\n label: string;\n /**\n * Called when the expansion state of the accordion changes.\n */\n onChange?: MuiAccordionProps[\"onChange\"];\n /**\n * Controls the visual border style of the accordion.\n * - If `'default'`, renders with a visible outline border.\n * - If `'borderless'`, renders without a border, suitable for use on patterned or colored backgrounds.\n * @default \"default\"\n */\n variant?: (typeof accordionVariantValues)[number];\n} & (\n | {\n isDefaultExpanded?: never;\n isExpanded: boolean;\n }\n | {\n isDefaultExpanded?: boolean;\n isExpanded?: never;\n }\n) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\n/**\n * A collapsible content section with a clickable header. Use to progressively
|
|
1
|
+
{"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","accordionVariantValues","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","testId","translate","variant","headerId","contentId","_Accordion","defaultExpanded","disabled","disableGutters","expanded","_AccordionSummary","expandIcon","component","_AccordionDetails","MemoizedAccordion","displayName"],"sources":["../../src/Accordion.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionProps as MuiAccordionProps,\n AccordionSummary as MuiAccordionSummary,\n} from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { ChevronDownIcon } from \"./icons.generated/index.js\";\nimport { Support } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const accordionVariantValues = [\"default\", \"borderless\"] as const;\n\nexport type AccordionProps = {\n /**\n * The content of the Accordion itself\n */\n children: ReactNode;\n /**\n * Defines IDs for the header and the content of the Accordion\n */\n id?: string;\n /**\n * If `true`, the accordion item is expanded on initial render.\n */\n isDefaultExpanded?: boolean;\n /**\n * If `true`, the accordion item is disabled and cannot be expanded or collapsed.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the accordion item is expanded (controlled).\n */\n isExpanded?: boolean;\n /**\n * The label text for the AccordionSummary\n */\n label: string;\n /**\n * Called when the expansion state of the accordion changes.\n */\n onChange?: MuiAccordionProps[\"onChange\"];\n /**\n * Controls the visual border style of the accordion.\n * - If `'default'`, renders with a visible outline border.\n * - If `'borderless'`, renders without a border, suitable for use on patterned or colored backgrounds.\n * @default \"default\"\n */\n variant?: (typeof accordionVariantValues)[number];\n} & (\n | {\n isDefaultExpanded?: never;\n isExpanded: boolean;\n }\n | {\n isDefaultExpanded?: boolean;\n isExpanded?: never;\n }\n) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\n/**\n * A collapsible content section with a clickable header. Use to progressively disclose information and reduce visual complexity on content-heavy pages.\n */\nconst Accordion = ({\n children,\n label,\n id: idOverride,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n onChange,\n testId,\n translate,\n variant = \"default\",\n}: AccordionProps) => {\n const id = useUniqueId(idOverride);\n const headerId = `${id}-header`;\n const contentId = `${id}-content`;\n\n return (\n <MuiAccordion\n data-ods-variant={variant}\n data-se={testId}\n defaultExpanded={isDefaultExpanded}\n disabled={isDisabled}\n disableGutters\n expanded={isExpanded}\n onChange={onChange}\n >\n <MuiAccordionSummary\n aria-controls={contentId}\n expandIcon={<ChevronDownIcon />}\n id={headerId}\n >\n <Support component=\"div\" translate={translate}>\n {label}\n </Support>\n </MuiAccordionSummary>\n <MuiAccordionDetails aria-labelledby={headerId}>\n {children}\n </MuiAccordionDetails>\n </MuiAccordion>\n );\n};\n\nconst MemoizedAccordion = memo(Accordion);\nMemoizedAccordion.displayName = \"Accordion\";\n\nexport { MemoizedAccordion as Accordion };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA,SAASA,IAAI,QAAmB,OAAO;AAIvC,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,OAAO,MAAMC,sBAAsB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AAqDxE,MAAMC,SAAS,GAAGA,CAAC;EACjBC,QAAQ;EACRC,KAAK;EACLC,EAAE,EAAEC,UAAU;EACdC,iBAAiB;EACjBC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,OAAO,GAAG;AACI,CAAC,KAAK;EACpB,MAAMR,EAAE,GAAGT,WAAW,CAACU,UAAU,CAAC;EAClC,MAAMQ,QAAQ,GAAG,GAAGT,EAAE,SAAS;EAC/B,MAAMU,SAAS,GAAG,GAAGV,EAAE,UAAU;EAEjC,OACEL,KAAA,CAAAgB,UAAA;IACE,oBAAkBH,OAAQ;IAC1B,WAASF,MAAO;IAChBM,eAAe,EAAEV,iBAAkB;IACnCW,QAAQ,EAAEV,UAAW;IACrBW,cAAc;IACdC,QAAQ,EAAEX,UAAW;IACrBC,QAAQ,EAAEA,QAAS;IAAAP,QAAA,GAEnBL,IAAA,CAAAuB,iBAAA;MACE,iBAAeN,SAAU;MACzBO,UAAU,EAAExB,IAAA,CAACJ,eAAe,IAAE,CAAE;MAChCW,EAAE,EAAES,QAAS;MAAAX,QAAA,EAEbL,IAAA,CAACH,OAAO;QAAC4B,SAAS,EAAC,KAAK;QAACX,SAAS,EAAEA,SAAU;QAAAT,QAAA,EAC3CC;MAAK,CACC;IAAC,CACS,CAAC,EACtBN,IAAA,CAAA0B,iBAAA;MAAqB,mBAAiBV,QAAS;MAAAX,QAAA,EAC5CA;IAAQ,CACU,CAAC;EAAA,CACV,CAAC;AAEnB,CAAC;AAED,MAAMsB,iBAAiB,GAAGhC,IAAI,CAACS,SAAS,CAAC;AACzCuB,iBAAiB,CAACC,WAAW,2CAAc;AAE3C,SAASD,iBAAiB,IAAIvB,SAAS","ignoreList":[]}
|
|
@@ -30,7 +30,7 @@ const AnimationProvider = ({
|
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
32
|
const MemoizedAnimationProvider = memo(AnimationProvider);
|
|
33
|
-
MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.
|
|
33
|
+
MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.71.1";
|
|
34
34
|
export { MemoizedAnimationProvider as AnimationProvider };
|
|
35
35
|
export const useAnimation = () => useContext(AnimationContext).hasAnimations;
|
|
36
36
|
//# sourceMappingURL=AnimationContext.js.map
|
package/dist/esm/Autocomplete.js
CHANGED
|
@@ -106,6 +106,6 @@ const Autocomplete = ({
|
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
108
|
const MemoizedAutocomplete = memo(Autocomplete);
|
|
109
|
-
MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.
|
|
109
|
+
MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.71.1";
|
|
110
110
|
export { MemoizedAutocomplete as Autocomplete };
|
|
111
111
|
//# sourceMappingURL=Autocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","names":["memo","createElement","_createElement","useTranslation","PickerVirtualizationListBox","useAutocomplete","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","filterOptions","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","hint","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","label","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","options","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","key","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","MemoizedAutocomplete","displayName"],"sources":["../../src/Autocomplete.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Determines the filtered options to display when typing in the input.\n * Defaults to MUI's client-side substring match against `getOptionLabel`.\n * Override this (e.g. `(options) => options`) when `options` is already\n * filtered server-side, to avoid MUI re-filtering already-matching results\n * away.\n */\n filterOptions?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"filterOptions\"];\n /**\n * Used to determine if the option represents the given value. Uses strict equality by default if\n * none provided. Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * Used to determine the string value for a given option. It's used to fill the input (and the\n * list box options if renderOption is not provided). If used in free solo mode, it must accept\n * both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\n /**\n * Whether multiple options can be selected simultaneously.\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * If `true`, the user can type a custom value not present in the options list.\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * If `true`, the Autocomplete input is disabled.\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * If `true`, a loading indicator is shown in place of the options list.\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * If `true`, the Autocomplete input is read-only.\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * If `true`, renders the options list using virtualization.\n * Recommended when the list contains hundreds of items or more.\n */\n isVirtualized?: boolean;\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The text to display when no options are available.\n * @default \"No options\"\n */\n noOptionsText?: string;\n /**\n * Called when the Autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Called when the selected value changes.\n */\n onChange?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Called when the Autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * Called when the text input value changes. Receives the new input string.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\n/**\n * An input field with a dropdown list of selectable options that supports filtering, multi-select,\n * and free-text entry. Use when users need to search or choose from a potentially large set of\n * values.\n */\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n filterOptions,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isReadOnly,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // MUI's value type is incompatible between single (null) and multiple (array)\n // modes. Changing `multiple` on a live instance causes a null.length crash,\n // so we force a remount when the mode changes. This resets internal UI state.\n key={hasMultipleChoices ? \"multiple\" : \"single\"}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n clearText={t(\"clear.text\")}\n closeText={t(\"close.text\")}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n filterOptions={filterOptions}\n filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n translate={translate}\n />\n );\n};\n\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete & {\n displayName?: string;\n};\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,SAASA,IAAI,EAAAC,aAAA,IAAAC,cAAA,QAAQ,OAAO;AAK5B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,2BAA2B,QAAQ,sDAAsD;AAClG,SAASC,eAAe,QAAQ,sBAAsB;AA2LtD,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,aAAa;EACbC,uBAAuB;EACvBC,cAAc;EACdC,kBAAkB;EAClBC,IAAI;EACJC,iBAAiB;EACjBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,WAAW,GAAG,KAAK;EACnBC,SAAS;EACTC,UAAU,GAAG,KAAK;EAClBC,UAAU;EACVC,aAAa,GAAG,KAAK;EACrBC,KAAK;EACLC,IAAI,EAAEC,YAAY;EACl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EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAc;IAC7BwB,QAAQ,EAAEnB,CAAC,CAAC,WAAW,CAAE;IACzBJ,OAAO,EAAEA,OAAQ;IACjBwB,QAAQ,EAAElC,UAAW;IACrBiB,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAED,MAAMuB,oBAAoB,GAAG5D,IAAI,CAACM,YAAY,CAE7C;AACDsD,oBAAoB,CAACC,WAAW,8CAAiB;AAEjD,SAASD,oBAAoB,IAAItD,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Autocomplete.js","names":["memo","createElement","_createElement","useTranslation","PickerVirtualizationListBox","useAutocomplete","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","filterOptions","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","hint","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","label","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","options","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","key","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","MemoizedAutocomplete","displayName"],"sources":["../../src/Autocomplete.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Determines the filtered options to display when typing in the input. Defaults to MUI's client-side substring match against `getOptionLabel`. Override this (e.g. `(options) => options`) when `options` is already filtered server-side, to avoid MUI re-filtering already-matching results away.\n */\n filterOptions?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"filterOptions\"];\n /**\n * Used to determine if the option represents the given value. Uses strict equality by default if none provided. Both arguments need to be handled, an option can only match with one value. option: the option to test value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided). If used in free solo mode, it must accept both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\n /**\n * Whether multiple options can be selected simultaneously.\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * If `true`, the user can type a custom value not present in the options list.\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * If `true`, the Autocomplete input is disabled.\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * If `true`, a loading indicator is shown in place of the options list.\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * If `true`, the Autocomplete input is read-only.\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * If `true`, renders the options list using virtualization. Recommended when the list contains hundreds of items or more.\n */\n isVirtualized?: boolean;\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The text to display when no options are available.\n * @default \"No options\"\n */\n noOptionsText?: string;\n /**\n * Called when the Autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Called when the selected value changes.\n */\n onChange?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Called when the Autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * Called when the text input value changes. Receives the new input string.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\n/**\n * An input field with a dropdown list of selectable options that supports filtering, multi-select, and free-text entry. Use when users need to search or choose from a potentially large set of values.\n */\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n filterOptions,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isReadOnly,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // MUI's value type is incompatible between single (null) and multiple (array) modes. Changing `multiple` on a live instance causes a null.length crash, so we force a remount when the mode changes. This resets internal UI state.\n key={hasMultipleChoices ? \"multiple\" : \"single\"}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n clearText={t(\"clear.text\")}\n closeText={t(\"close.text\")}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n filterOptions={filterOptions}\n filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n translate={translate}\n />\n );\n};\n\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete & {\n displayName?: string;\n};\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,SAASA,IAAI,EAAAC,aAAA,IAAAC,cAAA,QAAQ,OAAO;AAK5B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,2BAA2B,QAAQ,sDAAsD;AAClG,SAASC,eAAe,QAAQ,sBAAsB;AA+KtD,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,aAAa;EACbC,uBAAuB;EACvBC,cAAc;EACdC,kBAAkB;EAClBC,IAAI;EACJC,iBAAiB;EACjBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,WAAW,GAAG,KAAK;EACnBC,S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nBkC,QAAQ,EAAE3C,kBAAmB;IAC7BgB,aAAa,EAAEA,aAAa,IAAIS,CAAC,CAAC,wBAAwB,CAAE;IAC5DR,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAc;IAC7BwB,QAAQ,EAAEnB,CAAC,CAAC,WAAW,CAAE;IACzBJ,OAAO,EAAEA,OAAQ;IACjBwB,QAAQ,EAAElC,UAAW;IACrBiB,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAED,MAAMuB,oBAAoB,GAAG5D,IAAI,CAACM,YAAY,CAE7C;AACDsD,oBAAoB,CAACC,WAAW,8CAAiB;AAEjD,SAASD,oBAAoB,IAAItD,YAAY","ignoreList":[]}
|
package/dist/esm/Badge.js
CHANGED
|
@@ -73,6 +73,6 @@ const Badge = ({
|
|
|
73
73
|
return renderBadge;
|
|
74
74
|
};
|
|
75
75
|
const MemoizedBadge = memo(Badge);
|
|
76
|
-
MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.
|
|
76
|
+
MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.71.1";
|
|
77
77
|
export { MemoizedBadge as Badge };
|
|
78
78
|
//# sourceMappingURL=Badge.js.map
|
package/dist/esm/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":["memo","useMemo","Box","useOdysseyDesignTokens","jsx","_jsx","badgeContentMaxValues","badgeTypeValues","badgeTypeColors","odysseyTokens","default","background","HueNeutral200","font","TypographyColorBody","attention","PalettePrimaryMain","TypographyColorInverse","danger","PaletteDangerMain","Badge","badgeContent","badgeContentMax","testId","translate","type","odysseyDesignTokens","renderBadge","greaterThanZeroContentMax","threeDigitLimitedMax","isOverContentMax","overContentMaxMessage","formattedContent","toString","badgeStyles","display","alignItems","justifyContent","minWidth","Spacing4","Spacing1","height","minHeight","padding","backgroundColor","color","borderRadius","length","BorderRadiusOuter","fontSize","TypographyScale0","fontFamily","TypographyFamilyMono","fontWeight","TypographyWeightBodyBold","lineHeight","transitionDuration","TransitionDurationMain","transitionProperty","hasNotificationCount","sx","children","MemoizedBadge","displayName"],"sources":["../../src/Badge.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { CSSProperties, memo, useMemo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { Box } from \"./Box.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\n\nexport const badgeContentMaxValues = [\n 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,\n] as const;\nexport const badgeTypeValues = [\"default\", \"attention\", \"danger\"] as const;\n\nexport type BadgeProps = {\n /**\n * The numeric count to display inside the badge. Renders nothing when the value is 0 or falsy.\n */\n badgeContent: number;\n /**\n * The maximum count value to display before appending a \"+\" suffix.\n * @default 100\n */\n badgeContentMax?: (typeof badgeContentMaxValues)[number];\n /**\n * Controls the visual style of the badge.\n * - If `'default'`, neutral background.\n * - If `'attention'`, yellow attention-state background.\n * - If `'danger'`, red danger-state background.\n * @default \"default\"\n */\n type?: (typeof badgeTypeValues)[number];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst badgeTypeColors = (odysseyTokens: DesignTokens) => ({\n default: {\n background: odysseyTokens.HueNeutral200,\n font: odysseyTokens.TypographyColorBody,\n },\n attention: {\n background: odysseyTokens.PalettePrimaryMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n danger: {\n background: odysseyTokens.PaletteDangerMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n});\n\n/**\n * A small numeric indicator that overlays or accompanies another element to convey a count or
|
|
1
|
+
{"version":3,"file":"Badge.js","names":["memo","useMemo","Box","useOdysseyDesignTokens","jsx","_jsx","badgeContentMaxValues","badgeTypeValues","badgeTypeColors","odysseyTokens","default","background","HueNeutral200","font","TypographyColorBody","attention","PalettePrimaryMain","TypographyColorInverse","danger","PaletteDangerMain","Badge","badgeContent","badgeContentMax","testId","translate","type","odysseyDesignTokens","renderBadge","greaterThanZeroContentMax","threeDigitLimitedMax","isOverContentMax","overContentMaxMessage","formattedContent","toString","badgeStyles","display","alignItems","justifyContent","minWidth","Spacing4","Spacing1","height","minHeight","padding","backgroundColor","color","borderRadius","length","BorderRadiusOuter","fontSize","TypographyScale0","fontFamily","TypographyFamilyMono","fontWeight","TypographyWeightBodyBold","lineHeight","transitionDuration","TransitionDurationMain","transitionProperty","hasNotificationCount","sx","children","MemoizedBadge","displayName"],"sources":["../../src/Badge.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { CSSProperties, memo, useMemo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { Box } from \"./Box.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\n\nexport const badgeContentMaxValues = [\n 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,\n] as const;\nexport const badgeTypeValues = [\"default\", \"attention\", \"danger\"] as const;\n\nexport type BadgeProps = {\n /**\n * The numeric count to display inside the badge. Renders nothing when the value is 0 or falsy.\n */\n badgeContent: number;\n /**\n * The maximum count value to display before appending a \"+\" suffix.\n * @default 100\n */\n badgeContentMax?: (typeof badgeContentMaxValues)[number];\n /**\n * Controls the visual style of the badge.\n * - If `'default'`, neutral background.\n * - If `'attention'`, yellow attention-state background.\n * - If `'danger'`, red danger-state background.\n * @default \"default\"\n */\n type?: (typeof badgeTypeValues)[number];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst badgeTypeColors = (odysseyTokens: DesignTokens) => ({\n default: {\n background: odysseyTokens.HueNeutral200,\n font: odysseyTokens.TypographyColorBody,\n },\n attention: {\n background: odysseyTokens.PalettePrimaryMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n danger: {\n background: odysseyTokens.PaletteDangerMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n});\n\n/**\n * A small numeric indicator that overlays or accompanies another element to convey a count or status. Renders nothing when the count is zero.\n */\nconst Badge = ({\n badgeContent,\n badgeContentMax = 100,\n testId,\n translate,\n type = \"default\",\n}: BadgeProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const renderBadge = useMemo(() => {\n const greaterThanZeroContentMax = badgeContentMax > 0 ? badgeContentMax : 1;\n const threeDigitLimitedMax =\n greaterThanZeroContentMax > 999 ? 999 : greaterThanZeroContentMax;\n const isOverContentMax = badgeContent > threeDigitLimitedMax;\n const overContentMaxMessage = `${greaterThanZeroContentMax}+`;\n const formattedContent = isOverContentMax\n ? overContentMaxMessage\n : badgeContent.toString();\n\n const badgeStyles: CSSProperties = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minWidth: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n height: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n minHeight: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n // 6px horizontal padding per design requirements\n padding: \"0 6px\",\n backgroundColor: badgeTypeColors(odysseyDesignTokens)[type].background,\n color: badgeTypeColors(odysseyDesignTokens)[type].font,\n borderRadius:\n formattedContent.length > 1\n ? `${odysseyDesignTokens.BorderRadiusOuter}`\n : \"50%\",\n fontSize: `${odysseyDesignTokens.TypographyScale0}`,\n fontFamily: `${odysseyDesignTokens.TypographyFamilyMono}`,\n fontWeight: `${odysseyDesignTokens.TypographyWeightBodyBold}`,\n lineHeight: 1,\n transitionDuration: `${odysseyDesignTokens.TransitionDurationMain}`,\n transitionProperty: `background-color, color`,\n };\n\n const hasNotificationCount = badgeContent && badgeContent > 0;\n\n return hasNotificationCount ? (\n <Box sx={badgeStyles} testId={testId} translate={translate}>\n {formattedContent}\n </Box>\n ) : null;\n }, [\n badgeContent,\n badgeContentMax,\n odysseyDesignTokens,\n testId,\n translate,\n type,\n ]);\n\n return renderBadge;\n};\n\nconst MemoizedBadge = memo(Badge);\nMemoizedBadge.displayName = \"Badge\";\n\nexport { MemoizedBadge as Badge };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAwBA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAIpD,SAASC,GAAG,QAAQ,UAAU;AAC9B,SAEEC,sBAAsB,QACjB,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEzC,OAAO,MAAMC,qBAAqB,GAAG,CACnC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAC/B;AACV,OAAO,MAAMC,eAAe,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAU;AAsB1E,MAAMC,eAAe,GAAIC,aAA2B,KAAM;EACxDC,OAAO,EAAE;IACPC,UAAU,EAAEF,aAA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E,OAAO;MAChBC,eAAe,EAAEpC,eAAe,CAACkB,mBAAmB,CAAC,CAACD,IAAI,CAAC,CAACd,UAAU;MACtEkC,KAAK,EAAErC,eAAe,CAACkB,mBAAmB,CAAC,CAACD,IAAI,CAAC,CAACZ,IAAI;MACtDiC,YAAY,EACVd,gBAAgB,CAACe,MAAM,GAAG,CAAC,GACvB,GAAGrB,mBAAmB,CAACsB,iBAAiB,EAAE,GAC1C,KAAK;MACXC,QAAQ,EAAE,GAAGvB,mBAAmB,CAACwB,gBAAgB,EAAE;MACnDC,UAAU,EAAE,GAAGzB,mBAAmB,CAAC0B,oBAAoB,EAAE;MACzDC,UAAU,EAAE,GAAG3B,mBAAmB,CAAC4B,wBAAwB,EAAE;MAC7DC,UAAU,EAAE,CAAC;MACbC,kBAAkB,EAAE,GAAG9B,mBAAmB,CAAC+B,sBAAsB,EAAE;MACnEC,kBAAkB,EAAE;IACtB,CAAC;IAED,MAAMC,oBAAoB,GAAGtC,YAAY,IAAIA,YAAY,GAAG,CAAC;IAE7D,OAAOsC,oBAAoB,GACzBtD,IAAA,CAACH,GAAG;MAAC0D,EAAE,EAAE1B,WAAY;MAACX,MAAM,EAAEA,MAAO;MAACC,SAAS,EAAEA,SAAU;MAAAqC,QAAA,EACxD7B;IAAgB,CACd,CAAC,GACJ,IAAI;EACV,CAAC,EAAE,CACDX,YAAY,EACZC,eAAe,EACfI,mBAAmB,EACnBH,MAAM,EACNC,SAAS,EACTC,IAAI,CACL,CAAC;EAEF,OAAOE,WAAW;AACpB,CAAC;AAED,MAAMmC,aAAa,GAAG9D,IAAI,CAACoB,KAAK,CAAC;AACjC0C,aAAa,CAACC,WAAW,uCAAU;AAEnC,SAASD,aAAa,IAAI1C,KAAK","ignoreList":[]}
|
package/dist/esm/Banner.js
CHANGED
|
@@ -58,6 +58,6 @@ const Banner = ({
|
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
60
|
const MemoizedBanner = memo(Banner);
|
|
61
|
-
MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.
|
|
61
|
+
MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.71.1";
|
|
62
62
|
export { MemoizedBanner as Banner };
|
|
63
63
|
//# sourceMappingURL=Banner.js.map
|
package/dist/esm/Banner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","names":["memo","useTranslation","Link","ScreenReaderText","jsx","_jsx","jsxs","_jsxs","bannerRoleValues","bannerSeverityValues","Banner","linkRel","linkTarget","linkText","linkUrl","onClose","onLinkClick","role","severity","testId","text","translate","t","_Alert","variant","children","_AlertTitle","href","onClick","rel","target","MemoizedBanner","displayName"],"sources":["../../src/Banner.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 { Alert, AlertColor, AlertProps, AlertTitle } from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { Link, LinkProps } from \"./Link.js\";\nimport { ScreenReaderText } from \"./ScreenReaderText.js\";\n\nexport const bannerRoleValues = [\"status\", \"alert\"] as const;\nexport const bannerSeverityValues: AlertColor[] = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n];\n\nexport type BannerProps = {\n /**\n * Called when the user clicks the close button. When undefined, the close button is not shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * Sets the ARIA live-region role.\n * - If `'status'`, announces updates politely; use for non-critical dynamic messages.\n * - If `'alert'`, announces updates assertively; use for errors or urgent information.\n */\n role?: (typeof bannerRoleValues)[number];\n /**\n * Visual severity level that controls the banner's color and icon.\n */\n severity: (typeof bannerSeverityValues)[number];\n /**\n * Primary message text displayed inside the banner.\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\"> &\n // if linkText is provided, either linkUrl or onLinkClick must be provided\n (\n | {\n /** The `rel` attribute of the action link. */\n linkRel?: LinkProps[\"rel\"];\n /** The `target` attribute of the action link (e.g., `\"_blank\"`). */\n linkTarget?: LinkProps[\"target\"];\n /** Visible label for the action link rendered after the banner text. */\n linkText: string;\n /** The URL the action link navigates to. Required when `onLinkClick` is not provided. */\n linkUrl: LinkProps[\"href\"];\n onLinkClick?: never;\n }\n | {\n linkRel?: never;\n linkTarget?: never;\n /** Visible label for the action link rendered after the banner text. */\n linkText: string;\n linkUrl?: never;\n /** Click handler for the action link. Required when `linkUrl` is not provided. */\n onLinkClick: LinkProps[\"onClick\"];\n }\n | {\n linkRel?: never;\n linkTarget?: never;\n linkText?: never;\n linkUrl?: never;\n onLinkClick?: never;\n }\n );\n\n/**\n * A full-width alert strip displayed at the top of a page or section to communicate
|
|
1
|
+
{"version":3,"file":"Banner.js","names":["memo","useTranslation","Link","ScreenReaderText","jsx","_jsx","jsxs","_jsxs","bannerRoleValues","bannerSeverityValues","Banner","linkRel","linkTarget","linkText","linkUrl","onClose","onLinkClick","role","severity","testId","text","translate","t","_Alert","variant","children","_AlertTitle","href","onClick","rel","target","MemoizedBanner","displayName"],"sources":["../../src/Banner.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 { Alert, AlertColor, AlertProps, AlertTitle } from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { Link, LinkProps } from \"./Link.js\";\nimport { ScreenReaderText } from \"./ScreenReaderText.js\";\n\nexport const bannerRoleValues = [\"status\", \"alert\"] as const;\nexport const bannerSeverityValues: AlertColor[] = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n];\n\nexport type BannerProps = {\n /**\n * Called when the user clicks the close button. When undefined, the close button is not shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * Sets the ARIA live-region role.\n * - If `'status'`, announces updates politely; use for non-critical dynamic messages.\n * - If `'alert'`, announces updates assertively; use for errors or urgent information.\n */\n role?: (typeof bannerRoleValues)[number];\n /**\n * Visual severity level that controls the banner's color and icon.\n */\n severity: (typeof bannerSeverityValues)[number];\n /**\n * Primary message text displayed inside the banner.\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\"> &\n // if linkText is provided, either linkUrl or onLinkClick must be provided\n (\n | {\n /** The `rel` attribute of the action link. */\n linkRel?: LinkProps[\"rel\"];\n /** The `target` attribute of the action link (e.g., `\"_blank\"`). */\n linkTarget?: LinkProps[\"target\"];\n /** Visible label for the action link rendered after the banner text. */\n linkText: string;\n /** The URL the action link navigates to. Required when `onLinkClick` is not provided. */\n linkUrl: LinkProps[\"href\"];\n onLinkClick?: never;\n }\n | {\n linkRel?: never;\n linkTarget?: never;\n /** Visible label for the action link rendered after the banner text. */\n linkText: string;\n linkUrl?: never;\n /** Click handler for the action link. Required when `linkUrl` is not provided. */\n onLinkClick: LinkProps[\"onClick\"];\n }\n | {\n linkRel?: never;\n linkTarget?: never;\n linkText?: never;\n linkUrl?: never;\n onLinkClick?: never;\n }\n );\n\n/**\n * A full-width alert strip displayed at the top of a page or section to communicate high-priority information such as errors, warnings, or status updates.\n */\nconst Banner = ({\n linkRel,\n linkTarget,\n linkText,\n linkUrl,\n onClose,\n onLinkClick,\n role,\n severity,\n testId,\n text,\n translate,\n}: BannerProps) => {\n const { t } = useTranslation();\n\n return (\n <Alert\n data-se={testId}\n onClose={onClose}\n role={role}\n severity={severity}\n variant=\"banner\"\n >\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}`)}\n </ScreenReaderText>\n <AlertTitle translate={translate}>{text}</AlertTitle>\n {linkText && (\n <Link\n href={linkUrl ?? \"#\"}\n onClick={onLinkClick}\n rel={linkRel}\n target={linkTarget}\n translate={translate}\n variant=\"monochrome\"\n >\n {linkText}\n </Link>\n )}\n </Alert>\n );\n};\n\nconst MemoizedBanner = memo(Banner);\nMemoizedBanner.displayName = \"Banner\";\n\nexport { MemoizedBanner as Banner };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,QAAQ,OAAO;AAI5B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,IAAI,QAAmB,WAAW;AAC3C,SAASC,gBAAgB,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEzD,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC5D,OAAO,MAAMC,oBAAkC,GAAG,CAChD,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACR;AAwDD,MAAMC,MAAM,GAAGA,CAAC;EACdC,OAAO;EACPC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC,IAAI;EACJC;AACW,CAAC,KAAK;EACjB,MAAM;IAAEC;EAAE,CAAC,GAAGrB,cAAc,CAAC,CAAC;EAE9B,OACEM,KAAA,CAAAgB,MAAA;IACE,WAASJ,MAAO;IAChBJ,OAAO,EAAEA,OAAQ;IACjBE,IAAI,EAAEA,IAAK;IACXC,QAAQ,EAAEA,QAAS;IACnBM,OAAO,EAAC,QAAQ;IAAAC,QAAA,GAEhBpB,IAAA,CAACF,gBAAgB;MAACkB,SAAS,EAAEA,SAAU;MAAAI,QAAA,EACpCH,CAAC,CAAC,YAAYJ,QAAQ,EAAE;IAAC,CACV,CAAC,EACnBb,IAAA,CAAAqB,WAAA;MAAYL,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAEL;IAAI,CAAa,CAAC,EACpDP,QAAQ,IACPR,IAAA,CAACH,IAAI;MACHyB,IAAI,EAAEb,OAAO,IAAI,GAAI;MACrBc,OAAO,EAAEZ,WAAY;MACrBa,GAAG,EAAElB,OAAQ;MACbmB,MAAM,EAAElB,UAAW;MACnBS,SAAS,EAAEA,SAAU;MACrBG,OAAO,EAAC,YAAY;MAAAC,QAAA,EAEnBZ;IAAQ,CACL,CACP;EAAA,CACI,CAAC;AAEZ,CAAC;AAED,MAAMkB,cAAc,GAAG/B,IAAI,CAACU,MAAM,CAAC;AACnCqB,cAAc,CAACC,WAAW,wCAAW;AAErC,SAASD,cAAc,IAAIrB,MAAM","ignoreList":[]}
|
package/dist/esm/Box.js
CHANGED
|
@@ -31,6 +31,6 @@ const Box = forwardRef(({
|
|
|
31
31
|
translate: translate
|
|
32
32
|
}));
|
|
33
33
|
const MemoizedBox = memo(Box);
|
|
34
|
-
MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.
|
|
34
|
+
MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.71.1";
|
|
35
35
|
export { MemoizedBox as Box };
|
|
36
36
|
//# sourceMappingURL=Box.js.map
|
package/dist/esm/Box.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.js","names":["forwardRef","memo","jsx","_jsx","Box","children","component","id","role","sx","testId","translate","ref","_Box","MemoizedBox","displayName"],"sources":["../../src/Box.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { Box as MuiBox, BoxProps as MuiBoxProps } from \"@mui/material\";\nimport { AriaRole, forwardRef, memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport type BoxProps = {\n /** Content rendered inside the box. */\n children?: ReactNode;\n /** The underlying HTML element or React component to render as the root node. */\n component?: MuiBoxProps[\"component\"];\n /** The HTML `id` attribute applied to the root element. */\n id?: MuiBoxProps[\"id\"];\n /** The ARIA role applied to the root element. */\n role?: AriaRole;\n /** MUI system styles applied directly to the root element via the `sx` prop. */\n sx?: MuiBoxProps[\"sx\"];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\n/**\n * A generic layout primitive that renders as a `<div>` by default and supports MUI system styles
|
|
1
|
+
{"version":3,"file":"Box.js","names":["forwardRef","memo","jsx","_jsx","Box","children","component","id","role","sx","testId","translate","ref","_Box","MemoizedBox","displayName"],"sources":["../../src/Box.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-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 { Box as MuiBox, BoxProps as MuiBoxProps } from \"@mui/material\";\nimport { AriaRole, forwardRef, memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nexport type BoxProps = {\n /** Content rendered inside the box. */\n children?: ReactNode;\n /** The underlying HTML element or React component to render as the root node. */\n component?: MuiBoxProps[\"component\"];\n /** The HTML `id` attribute applied to the root element. */\n id?: MuiBoxProps[\"id\"];\n /** The ARIA role applied to the root element. */\n role?: AriaRole;\n /** MUI system styles applied directly to the root element via the `sx` prop. */\n sx?: MuiBoxProps[\"sx\"];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\n/**\n * A generic layout primitive that renders as a `<div>` by default and supports MUI system styles via the `sx` prop. Use it as a flexible building block for spacing, alignment, and structural composition.\n */\nconst Box = forwardRef<HTMLElement, BoxProps>(\n ({ children, component, id, role, sx, testId, translate }, ref) => (\n <MuiBox\n children={children}\n component={component}\n data-se={testId}\n id={id}\n ref={ref}\n role={role}\n sx={sx}\n translate={translate}\n />\n ),\n);\n\nconst MemoizedBox = memo(Box);\nMemoizedBox.displayName = \"Box\";\n\nexport { MemoizedBox as Box };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAAmBA,UAAU,EAAEC,IAAI,QAAmB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAoB9D,MAAMC,GAAG,GAAGJ,UAAU,CACpB,CAAC;EAAEK,QAAQ;EAAEC,SAAS;EAAEC,EAAE;EAAEC,IAAI;EAAEC,EAAE;EAAEC,MAAM;EAAEC;AAAU,CAAC,EAAEC,GAAG,KAC5DT,IAAA,CAAAU,IAAA;EACER,QAAQ,EAAEA,QAAS;EACnBC,SAAS,EAAEA,SAAU;EACrB,WAASI,MAAO;EAChBH,EAAE,EAAEA,EAAG;EACPK,GAAG,EAAEA,GAAI;EACTJ,IAAI,EAAEA,IAAK;EACXC,EAAE,EAAEA,EAAG;EACPE,SAAS,EAAEA;AAAU,CACtB,CAEL,CAAC;AAED,MAAMG,WAAW,GAAGb,IAAI,CAACG,GAAG,CAAC;AAC7BU,WAAW,CAACC,WAAW,qCAAQ;AAE/B,SAASD,WAAW,IAAIV,GAAG","ignoreList":[]}
|
package/dist/esm/Breadcrumbs.js
CHANGED
|
@@ -175,6 +175,6 @@ const BreadcrumbList = ({
|
|
|
175
175
|
});
|
|
176
176
|
};
|
|
177
177
|
const MemoizedBreadcrumbList = memo(BreadcrumbList);
|
|
178
|
-
MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.
|
|
178
|
+
MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.71.1";
|
|
179
179
|
export { MemoizedBreadcrumbList as BreadcrumbList };
|
|
180
180
|
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","names":["styled","createContext","memo","useCallback","useContext","useMemo","useState","useTranslation","GroupIcon","HomeIcon","UserIcon","Subordinate","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BreadcrumbContext","breadcrumbType","BreadcrumbContent","span","Breadcrumb","children","href","iconName","onClick","onClickHandler","event","preventDefault","stopPropagation","breadcrumbContent","color","_MenuItem","component","ariaCurrent","_ButtonBase","breadcrumbProviderValue","currentPage","listItem","menuItem","defaultTruncationValue","BreadcrumbList","homeHref","maxVisibleItems","maxVisibleItemsProp","testId","translate","t","anchorEl","setAnchorEl","Math","min","max","length","breadcrumbSections","beforeMenu","insideMenu","remainingBreadcrumbs","menuStart","floor","menuLength","slice","onMenuButtonClick","currentTarget","onCloseMenu","_Breadcrumbs","maxItems","separator","map","breadcrumb","index","Provider","value","_Menu","anchorOrigin","horizontal","vertical","MenuListProps","sx","minWidth","onClose","open","Boolean","MemoizedBreadcrumbList","displayName"],"sources":["../../src/Breadcrumbs.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport {\n ButtonBase,\n Menu,\n MenuItem,\n Breadcrumbs as MuiBreadcrumbs,\n} from \"@mui/material\";\nimport {\n createContext,\n memo,\n MouseEventHandler,\n ReactElement,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from \"react\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { GroupIcon, HomeIcon, UserIcon } from \"./icons.generated/index.js\";\nimport { Subordinate } from \"./Typography.js\";\n\nexport type BreadcrumbType = \"listItem\" | \"menuItem\" | \"currentPage\";\n\nexport type BreadcrumbProps = {\n /** The visible label text for the breadcrumb item. */\n children?: string;\n /**\n * The URL the breadcrumb navigates to. When omitted, the item renders as plain text\n * (e.g., the current page).\n */\n href?: string;\n /** An optional icon displayed before the label text. */\n iconName?: \"user\" | \"group\";\n /**\n * Click handler invoked when the breadcrumb is activated. Prevents default navigation when\n * provided.\n */\n onClick?: MouseEventHandler;\n};\n\nexport type BreadcrumbsProps = {\n /** The ordered list of `Breadcrumb` elements representing the navigation path. */\n children: ReactElement<typeof Breadcrumb>[];\n /** When provided, prepends a home icon link pointing to this URL as the first breadcrumb. */\n homeHref?: string;\n /**\n * Maximum number of breadcrumb items to show before collapsing the middle items into an\n * overflow menu.\n * @default 5\n */\n maxVisibleItems?: number;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nexport type BreadcrumbContextType = {\n breadcrumbType: BreadcrumbType;\n};\n\nexport const BreadcrumbContext = createContext<BreadcrumbContextType>({\n breadcrumbType: \"listItem\",\n});\n\nconst BreadcrumbContent = styled.span`\n white-space: nowrap;\n overflow: hidden;\n max-width: 10rem;\n text-overflow: ellipsis;\n`;\n\n/**\n * A single item in a Breadcrumbs trail. Renders as a link, a menu item, or plain text depending\n * on its position and context.\n */\nexport const Breadcrumb = ({\n children,\n href,\n iconName,\n onClick,\n}: BreadcrumbProps) => {\n const { breadcrumbType } = useContext(BreadcrumbContext);\n\n const onClickHandler = useCallback<MouseEventHandler<HTMLAnchorElement>>(\n (event) => {\n if (onClick) {\n event.preventDefault();\n event.stopPropagation();\n onClick(event);\n }\n },\n [onClick],\n );\n\n const breadcrumbContent = (\n <>\n {iconName === \"group\" ? (\n <GroupIcon />\n ) : iconName === \"user\" ? (\n <UserIcon />\n ) : null}\n <BreadcrumbContent>{children}</BreadcrumbContent>\n </>\n );\n\n if (!href) {\n return <Subordinate color=\"textPrimary\">{breadcrumbContent}</Subordinate>;\n }\n\n if (breadcrumbType === \"menuItem\") {\n return (\n <MenuItem component=\"a\" href={href} onClick={onClickHandler}>\n {breadcrumbContent}\n </MenuItem>\n );\n }\n\n if (breadcrumbType === \"currentPage\") {\n return (\n <Subordinate ariaCurrent=\"page\" color=\"textPrimary\">\n {breadcrumbContent}\n </Subordinate>\n );\n }\n\n // breadcrumbType === \"listItem\" is the default\n // Provided here without a conditional to get TS to be quiet\n // about potential undefined returns\n return (\n <ButtonBase href={href} onClick={onClickHandler}>\n {breadcrumbContent}\n </ButtonBase>\n );\n};\n\nconst breadcrumbProviderValue: Record<\n BreadcrumbType,\n { breadcrumbType: BreadcrumbType }\n> = {\n currentPage: {\n breadcrumbType: \"currentPage\",\n },\n listItem: {\n breadcrumbType: \"listItem\",\n },\n menuItem: {\n breadcrumbType: \"menuItem\",\n },\n};\n\nconst defaultTruncationValue = 5;\n\n/**\n * A navigational breadcrumb trail that displays the user's location within a hierarchy.\n * Automatically collapses middle items into an overflow menu when the number of items exceeds\n * `maxVisibleItems`.\n */\nconst BreadcrumbList = ({\n children,\n homeHref,\n maxVisibleItems: maxVisibleItemsProp = defaultTruncationValue,\n testId,\n translate,\n}: BreadcrumbsProps) => {\n const { t } = useTranslation();\n\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n\n const maxVisibleItems = useMemo(\n () => Math.min(Math.max(maxVisibleItemsProp, 0), children.length),\n [maxVisibleItemsProp, children],\n );\n\n const breadcrumbSections = useMemo(() => {\n if (children.length <= maxVisibleItems) {\n return {\n beforeMenu: [],\n insideMenu: [],\n remainingBreadcrumbs: children,\n };\n } else {\n const menuStart = Math.floor(maxVisibleItems / 2);\n const menuLength = children.length - maxVisibleItems;\n\n return {\n beforeMenu: children.slice(0, menuStart),\n insideMenu: children.slice(menuStart, menuStart + menuLength),\n remainingBreadcrumbs: children.slice(menuStart + menuLength),\n };\n }\n }, [children, maxVisibleItems]);\n\n const onMenuButtonClick = useCallback<MouseEventHandler<HTMLButtonElement>>(\n (event) => setAnchorEl(event.currentTarget),\n [],\n );\n const onCloseMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n return (\n <MuiBreadcrumbs\n aria-label={t(\"breadcrumbs.label.text\")}\n data-se={testId}\n maxItems={children.length + 1}\n separator={<span translate=\"no\">/</span>}\n translate={translate}\n >\n {homeHref && (\n <ButtonBase aria-label={t(\"breadcrumbs.home.text\")} href={homeHref}>\n <HomeIcon />\n </ButtonBase>\n )}\n\n {breadcrumbSections.beforeMenu.map((breadcrumb, index) => (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.listItem}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n ))}\n\n {breadcrumbSections.insideMenu.length > 0 && (\n <>\n <ButtonBase onClick={onMenuButtonClick}>...</ButtonBase>\n <Menu\n anchorEl={anchorEl}\n anchorOrigin={{ horizontal: \"left\", vertical: \"bottom\" }}\n MenuListProps={{\n sx: {\n minWidth: 180,\n },\n }}\n onClose={onCloseMenu}\n open={Boolean(anchorEl)}\n >\n <BreadcrumbContext.Provider\n value={breadcrumbProviderValue.menuItem}\n >\n {breadcrumbSections.insideMenu}\n </BreadcrumbContext.Provider>\n </Menu>\n </>\n )}\n\n {breadcrumbSections.remainingBreadcrumbs.map((breadcrumb, index) => {\n if (index === breadcrumbSections.remainingBreadcrumbs.length - 1) {\n return (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.currentPage}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n );\n }\n return (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.listItem}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n );\n })}\n </MuiBreadcrumbs>\n );\n};\n\nconst MemoizedBreadcrumbList = memo(BreadcrumbList);\nMemoizedBreadcrumbList.displayName = \"BreadcrumbList\";\n\nexport { MemoizedBreadcrumbList as BreadcrumbList };\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAOpC,SACEC,aAAa,EACbC,IAAI,EAGJC,WAAW,EACXC,UAAU,EACVC,OAAO,EACPC,QAAQ,QACH,OAAO;AAGd,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,4BAA4B;AAC1E,SAASC,WAAW,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAsC9C,OAAO,MAAMC,iBAAiB,GAAGjB,aAAa,CAAwB;EACpEkB,cAAc,EAAE;AAClB,CAAC,CAAC;AAEF,MAAMC,iBAAiB,GAAGpB,MAAM,CAACqB,IAAI;AACrC;AACA;AACA;AACA;AACA,CAAC;AAMD,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,QAAQ;EACRC,IAAI;EACJC,QAAQ;EACRC;AACe,CAAC,KAAK;EACrB,MAAM;IAAEP;EAAe,CAAC,GAAGf,UAAU,CAACc,iBAAiB,CAAC;EAExD,MAAMS,cAAc,GAA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,MAAM;UAAEC,QAAQ,EAAE;QAAS,CAAE;QACzDC,aAAa,EAAE;UACbC,EAAE,EAAE;YACFC,QAAQ,EAAE;UACZ;QACF,CAAE;QACFC,OAAO,EAAEhB,WAAY;QACrBiB,IAAI,EAAEC,OAAO,CAAClC,QAAQ,CAAE;QAAA1B,QAAA,EAExBV,IAAA,CAACK,iBAAiB,CAACsD,QAAQ;UACzBC,KAAK,EAAEpC,uBAAuB,CAACG,QAAS;UAAAjB,QAAA,EAEvCgC,kBAAkB,CAACE;QAAU,CACJ;MAAC,CACzB,CAAC;IAAA,CACP,CACH,EAEAF,kBAAkB,CAACG,oBAAoB,CAACW,GAAG,CAAC,CAACC,UAAU,EAAEC,KAAK,KAAK;MAClE,IAAIA,KAAK,KAAKhB,kBAAkB,CAACG,oBAAoB,CAACJ,MAAM,GAAG,CAAC,EAAE;QAChE,OACEzC,IAAA,CAACK,iBAAiB,CAACsD,QAAQ;UAEzBC,KAAK,EAAEpC,uBAAuB,CAACC,WAAY;UAAAf,QAAA,EAE1C+C;QAAU,GAHNC,KAIqB,CAAC;MAEjC;MACA,OACE1D,IAAA,CAACK,iBAAiB,CAACsD,QAAQ;QAEzBC,KAAK,EAAEpC,uBAAuB,CAACE,QAAS;QAAAhB,QAAA,EAEvC+C;MAAU,GAHNC,KAIqB,CAAC;IAEjC,CAAC,CAAC;EAAA,CACY,CAAC;AAErB,CAAC;AAED,MAAMa,sBAAsB,GAAGlF,IAAI,CAACwC,cAAc,CAAC;AACnD0C,sBAAsB,CAACC,WAAW,gDAAmB;AAErD,SAASD,sBAAsB,IAAI1C,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","names":["styled","createContext","memo","useCallback","useContext","useMemo","useState","useTranslation","GroupIcon","HomeIcon","UserIcon","Subordinate","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BreadcrumbContext","breadcrumbType","BreadcrumbContent","span","Breadcrumb","children","href","iconName","onClick","onClickHandler","event","preventDefault","stopPropagation","breadcrumbContent","color","_MenuItem","component","ariaCurrent","_ButtonBase","breadcrumbProviderValue","currentPage","listItem","menuItem","defaultTruncationValue","BreadcrumbList","homeHref","maxVisibleItems","maxVisibleItemsProp","testId","translate","t","anchorEl","setAnchorEl","Math","min","max","length","breadcrumbSections","beforeMenu","insideMenu","remainingBreadcrumbs","menuStart","floor","menuLength","slice","onMenuButtonClick","currentTarget","onCloseMenu","_Breadcrumbs","maxItems","separator","map","breadcrumb","index","Provider","value","_Menu","anchorOrigin","horizontal","vertical","MenuListProps","sx","minWidth","onClose","open","Boolean","MemoizedBreadcrumbList","displayName"],"sources":["../../src/Breadcrumbs.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport {\n ButtonBase,\n Menu,\n MenuItem,\n Breadcrumbs as MuiBreadcrumbs,\n} from \"@mui/material\";\nimport {\n createContext,\n memo,\n MouseEventHandler,\n ReactElement,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from \"react\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { GroupIcon, HomeIcon, UserIcon } from \"./icons.generated/index.js\";\nimport { Subordinate } from \"./Typography.js\";\n\nexport type BreadcrumbType = \"listItem\" | \"menuItem\" | \"currentPage\";\n\nexport type BreadcrumbProps = {\n /** The visible label text for the breadcrumb item. */\n children?: string;\n /**\n * The URL the breadcrumb navigates to. When omitted, the item renders as plain text (e.g., the current page).\n */\n href?: string;\n /** An optional icon displayed before the label text. */\n iconName?: \"user\" | \"group\";\n /**\n * Click handler invoked when the breadcrumb is activated. Prevents default navigation when provided.\n */\n onClick?: MouseEventHandler;\n};\n\nexport type BreadcrumbsProps = {\n /** The ordered list of `Breadcrumb` elements representing the navigation path. */\n children: ReactElement<typeof Breadcrumb>[];\n /** When provided, prepends a home icon link pointing to this URL as the first breadcrumb. */\n homeHref?: string;\n /**\n * Maximum number of breadcrumb items to show before collapsing the middle items into an overflow menu.\n * @default 5\n */\n maxVisibleItems?: number;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nexport type BreadcrumbContextType = {\n breadcrumbType: BreadcrumbType;\n};\n\nexport const BreadcrumbContext = createContext<BreadcrumbContextType>({\n breadcrumbType: \"listItem\",\n});\n\nconst BreadcrumbContent = styled.span`\n white-space: nowrap;\n overflow: hidden;\n max-width: 10rem;\n text-overflow: ellipsis;\n`;\n\n/**\n * A single item in a Breadcrumbs trail. Renders as a link, a menu item, or plain text depending on its position and context.\n */\nexport const Breadcrumb = ({\n children,\n href,\n iconName,\n onClick,\n}: BreadcrumbProps) => {\n const { breadcrumbType } = useContext(BreadcrumbContext);\n\n const onClickHandler = useCallback<MouseEventHandler<HTMLAnchorElement>>(\n (event) => {\n if (onClick) {\n event.preventDefault();\n event.stopPropagation();\n onClick(event);\n }\n },\n [onClick],\n );\n\n const breadcrumbContent = (\n <>\n {iconName === \"group\" ? (\n <GroupIcon />\n ) : iconName === \"user\" ? (\n <UserIcon />\n ) : null}\n <BreadcrumbContent>{children}</BreadcrumbContent>\n </>\n );\n\n if (!href) {\n return <Subordinate color=\"textPrimary\">{breadcrumbContent}</Subordinate>;\n }\n\n if (breadcrumbType === \"menuItem\") {\n return (\n <MenuItem component=\"a\" href={href} onClick={onClickHandler}>\n {breadcrumbContent}\n </MenuItem>\n );\n }\n\n if (breadcrumbType === \"currentPage\") {\n return (\n <Subordinate ariaCurrent=\"page\" color=\"textPrimary\">\n {breadcrumbContent}\n </Subordinate>\n );\n }\n\n // breadcrumbType === \"listItem\" is the default\n // Provided here without a conditional to get TS to be quiet about potential undefined returns\n return (\n <ButtonBase href={href} onClick={onClickHandler}>\n {breadcrumbContent}\n </ButtonBase>\n );\n};\n\nconst breadcrumbProviderValue: Record<\n BreadcrumbType,\n { breadcrumbType: BreadcrumbType }\n> = {\n currentPage: {\n breadcrumbType: \"currentPage\",\n },\n listItem: {\n breadcrumbType: \"listItem\",\n },\n menuItem: {\n breadcrumbType: \"menuItem\",\n },\n};\n\nconst defaultTruncationValue = 5;\n\n/**\n * A navigational breadcrumb trail that displays the user's location within a hierarchy. Automatically collapses middle items into an overflow menu when the number of items exceeds `maxVisibleItems`.\n */\nconst BreadcrumbList = ({\n children,\n homeHref,\n maxVisibleItems: maxVisibleItemsProp = defaultTruncationValue,\n testId,\n translate,\n}: BreadcrumbsProps) => {\n const { t } = useTranslation();\n\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n\n const maxVisibleItems = useMemo(\n () => Math.min(Math.max(maxVisibleItemsProp, 0), children.length),\n [maxVisibleItemsProp, children],\n );\n\n const breadcrumbSections = useMemo(() => {\n if (children.length <= maxVisibleItems) {\n return {\n beforeMenu: [],\n insideMenu: [],\n remainingBreadcrumbs: children,\n };\n } else {\n const menuStart = Math.floor(maxVisibleItems / 2);\n const menuLength = children.length - maxVisibleItems;\n\n return {\n beforeMenu: children.slice(0, menuStart),\n insideMenu: children.slice(menuStart, menuStart + menuLength),\n remainingBreadcrumbs: children.slice(menuStart + menuLength),\n };\n }\n }, [children, maxVisibleItems]);\n\n const onMenuButtonClick = useCallback<MouseEventHandler<HTMLButtonElement>>(\n (event) => setAnchorEl(event.currentTarget),\n [],\n );\n const onCloseMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n return (\n <MuiBreadcrumbs\n aria-label={t(\"breadcrumbs.label.text\")}\n data-se={testId}\n maxItems={children.length + 1}\n separator={<span translate=\"no\">/</span>}\n translate={translate}\n >\n {homeHref && (\n <ButtonBase aria-label={t(\"breadcrumbs.home.text\")} href={homeHref}>\n <HomeIcon />\n </ButtonBase>\n )}\n\n {breadcrumbSections.beforeMenu.map((breadcrumb, index) => (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.listItem}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n ))}\n\n {breadcrumbSections.insideMenu.length > 0 && (\n <>\n <ButtonBase onClick={onMenuButtonClick}>...</ButtonBase>\n <Menu\n anchorEl={anchorEl}\n anchorOrigin={{ horizontal: \"left\", vertical: \"bottom\" }}\n MenuListProps={{\n sx: {\n minWidth: 180,\n },\n }}\n onClose={onCloseMenu}\n open={Boolean(anchorEl)}\n >\n <BreadcrumbContext.Provider\n value={breadcrumbProviderValue.menuItem}\n >\n {breadcrumbSections.insideMenu}\n </BreadcrumbContext.Provider>\n </Menu>\n </>\n )}\n\n {breadcrumbSections.remainingBreadcrumbs.map((breadcrumb, index) => {\n if (index === breadcrumbSections.remainingBreadcrumbs.length - 1) {\n return (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.currentPage}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n );\n }\n return (\n <BreadcrumbContext.Provider\n key={index}\n value={breadcrumbProviderValue.listItem}\n >\n {breadcrumb}\n </BreadcrumbContext.Provider>\n );\n })}\n </MuiBreadcrumbs>\n );\n};\n\nconst MemoizedBreadcrumbList = memo(BreadcrumbList);\nMemoizedBreadcrumbList.displayName = \"BreadcrumbList\";\n\nexport { MemoizedBreadcrumbList as BreadcrumbList };\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAOpC,SACEC,aAAa,EACbC,IAAI,EAGJC,WAAW,EACXC,UAAU,EACVC,OAAO,EACPC,QAAQ,QACH,OAAO;AAGd,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ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KAAK,EAAEpC,uBAAuB,CAACE,QAAS;QAAAhB,QAAA,EAEvC+C;MAAU,GAHNC,KAIqB,CAAC;IAEjC,CAAC,CAAC;EAAA,CACY,CAAC;AAErB,CAAC;AAED,MAAMa,sBAAsB,GAAGlF,IAAI,CAACwC,cAAc,CAAC;AACnD0C,sBAAsB,CAACC,WAAW,gDAAmB;AAErD,SAASD,sBAAsB,IAAI1C,cAAc","ignoreList":[]}
|
|
@@ -27,6 +27,7 @@ const BaseButton = ({
|
|
|
27
27
|
ariaHasPopup,
|
|
28
28
|
ariaLabel,
|
|
29
29
|
ariaLabelledBy,
|
|
30
|
+
ariaPressed,
|
|
30
31
|
buttonRef,
|
|
31
32
|
children,
|
|
32
33
|
endIcon,
|
|
@@ -81,6 +82,7 @@ const BaseButton = ({
|
|
|
81
82
|
"aria-haspopup": ariaHasPopup,
|
|
82
83
|
"aria-label": ariaLabel,
|
|
83
84
|
"aria-labelledby": ariaLabelledBy,
|
|
85
|
+
"aria-pressed": ariaPressed,
|
|
84
86
|
"data-se": testId,
|
|
85
87
|
endIcon: endIcon,
|
|
86
88
|
fullWidth: isFullWidth,
|
|
@@ -101,7 +103,7 @@ const BaseButton = ({
|
|
|
101
103
|
variant: variant,
|
|
102
104
|
children: buttonContent
|
|
103
105
|
});
|
|
104
|
-
}, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, buttonContent, endIcon, handleClick, href, id, isDisabled, isFullWidth, isLoading, loadingIndicator, size, startIcon, tabIndex, testId, translate, type, variant]);
|
|
106
|
+
}, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, ariaPressed, buttonContent, endIcon, handleClick, href, id, isDisabled, isFullWidth, isLoading, loadingIndicator, size, startIcon, tabIndex, testId, translate, type, variant]);
|
|
105
107
|
if (tooltipText) {
|
|
106
108
|
return _jsx(Tooltip, {
|
|
107
109
|
ariaType: "description",
|
|
@@ -115,6 +117,6 @@ const BaseButton = ({
|
|
|
115
117
|
return renderButton(muiProps);
|
|
116
118
|
};
|
|
117
119
|
const MemoizedBaseButton = memo(BaseButton);
|
|
118
|
-
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.
|
|
120
|
+
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.71.1";
|
|
119
121
|
export { MemoizedBaseButton as BaseButton };
|
|
120
122
|
//# sourceMappingURL=BaseButton.js.map
|