@okta/odyssey-react-mui 1.62.2 → 1.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/cjs/Accordion.cjs +1 -1
- package/dist/cjs/Accordion.cjs.map +1 -1
- package/dist/cjs/Autocomplete.cjs +2 -4
- 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 +2 -4
- 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 +1 -1
- 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 +2 -4
- package/dist/cjs/Buttons/Button.cjs.map +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs +2 -4
- package/dist/cjs/Buttons/MenuButton.cjs.map +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs +4 -4
- 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 +2 -4
- 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 +1 -3
- 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/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 +2 -4
- package/dist/cjs/DatePickers/TimeZonePicker.cjs.map +1 -1
- package/dist/cjs/DatePickers/datePickerTheme.cjs +30 -3
- package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
- package/dist/cjs/Dialog.cjs +27 -8
- 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/Field.cjs.map +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/FieldLabel.cjs.map +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 +2 -4
- package/dist/cjs/Fields/CheckboxGroup.cjs.map +1 -1
- package/dist/cjs/Fields/Radio.cjs +2 -4
- package/dist/cjs/Fields/Radio.cjs.map +1 -1
- package/dist/cjs/Fields/RadioGroup.cjs +2 -4
- 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/FieldsetContext.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 +13 -11
- 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/FullScreenOverlay.cjs +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
- package/dist/cjs/HintLink.cjs +2 -4
- package/dist/cjs/HintLink.cjs.map +1 -1
- package/dist/cjs/HtmlProps.cjs.map +1 -1
- package/dist/cjs/IconWithTooltip.cjs +1 -1
- package/dist/cjs/IconWithTooltip.cjs.map +1 -1
- package/dist/cjs/Link.cjs +3 -1
- package/dist/cjs/Link.cjs.map +1 -1
- package/dist/cjs/MuiPropsChild.cjs +1 -1
- package/dist/cjs/NativeSelect.cjs +2 -4
- package/dist/cjs/NativeSelect.cjs.map +1 -1
- package/dist/cjs/OdysseyCacheProvider.cjs +2 -4
- package/dist/cjs/OdysseyCacheProvider.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 +2 -4
- 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 +4 -4
- 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 +4 -2
- package/dist/cjs/Tag.cjs.map +1 -1
- package/dist/cjs/TagList.cjs +2 -4
- 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 +2 -4
- package/dist/cjs/ToastStack.cjs.map +1 -1
- package/dist/cjs/Tooltip.cjs +2 -4
- 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/createOdysseyStyledComponent.cjs +39 -0
- package/dist/cjs/createOdysseyStyledComponent.cjs.map +1 -0
- package/dist/cjs/icons.generated/Add.cjs +1 -1
- package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
- package/dist/cjs/icons.generated/Apps.cjs +1 -1
- package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
- package/dist/cjs/icons.generated/Bug.cjs +1 -1
- package/dist/cjs/icons.generated/Calendar.cjs +1 -1
- package/dist/cjs/icons.generated/Call.cjs +1 -1
- package/dist/cjs/icons.generated/Chat.cjs +1 -1
- package/dist/cjs/icons.generated/Check.cjs +1 -1
- package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
- package/dist/cjs/icons.generated/Clock.cjs +1 -1
- package/dist/cjs/icons.generated/Close.cjs +1 -1
- package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
- package/dist/cjs/icons.generated/Copy.cjs +1 -1
- package/dist/cjs/icons.generated/Customizations.cjs +1 -1
- package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Delete.cjs +1 -1
- package/dist/cjs/icons.generated/Deny.cjs +1 -1
- package/dist/cjs/icons.generated/Devices.cjs +1 -1
- package/dist/cjs/icons.generated/Directory.cjs +1 -1
- package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
- package/dist/cjs/icons.generated/Documentation.cjs +1 -1
- package/dist/cjs/icons.generated/Download.cjs +1 -1
- package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
- package/dist/cjs/icons.generated/Edit.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
- package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
- package/dist/cjs/icons.generated/Filter.cjs +1 -1
- package/dist/cjs/icons.generated/Folder.cjs +1 -1
- package/dist/cjs/icons.generated/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/lazyIconDictionary.cjs +315 -0
- package/dist/cjs/icons.generated/lazyIconDictionary.cjs.map +1 -0
- package/dist/cjs/icons.generated/names.cjs +18 -0
- package/dist/cjs/icons.generated/names.cjs.map +1 -0
- package/dist/cjs/index.cjs +7 -0
- package/dist/cjs/index.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 +4 -3
- 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/DataTablePagination.cjs.map +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
- package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
- package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +1 -1
- package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
- package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
- package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
- package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
- package/dist/cjs/labs/PaginatedTable.cjs +1 -1
- package/dist/cjs/labs/StaticTable.cjs +1 -1
- package/dist/cjs/labs/UserProfile.cjs +1 -1
- package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
- package/dist/cjs/logos.generated/Duo.cjs +1 -1
- package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
- package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
- package/dist/cjs/logos.generated/Persona.cjs +1 -1
- package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
- package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
- package/dist/cjs/theme/components/Dialog.cjs +2 -11
- package/dist/cjs/theme/components/Dialog.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 +1 -1
- package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +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/SkipToContent.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs.map +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 +1 -1
- package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +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/esm/Accordion.js +1 -1
- package/dist/esm/Accordion.js.map +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 +1 -1
- 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 +3 -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/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 +30 -3
- package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
- package/dist/esm/Dialog.js +25 -6
- 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/Field.js.map +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/FieldLabel.js.map +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/Radio.js +1 -1
- package/dist/esm/Fields/Radio.js.map +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/FieldsetContext.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 +14 -12
- 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/FullScreenOverlay.js +1 -1
- package/dist/esm/FullScreenOverlayContext.js +1 -1
- package/dist/esm/HintLink.js +1 -1
- package/dist/esm/HintLink.js.map +1 -1
- package/dist/esm/HtmlProps.js.map +1 -1
- package/dist/esm/IconWithTooltip.js +1 -1
- package/dist/esm/IconWithTooltip.js.map +1 -1
- package/dist/esm/Link.js +3 -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/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 +4 -4
- 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 +4 -2
- 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/createOdysseyStyledComponent.js +33 -0
- package/dist/esm/createOdysseyStyledComponent.js.map +1 -0
- package/dist/esm/icons.generated/Add.js +1 -1
- package/dist/esm/icons.generated/AddCircle.js +1 -1
- package/dist/esm/icons.generated/Apps.js +1 -1
- package/dist/esm/icons.generated/AppsSelected.js +1 -1
- package/dist/esm/icons.generated/ArrowBottom.js +1 -1
- package/dist/esm/icons.generated/ArrowDown.js +1 -1
- package/dist/esm/icons.generated/ArrowLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
- package/dist/esm/icons.generated/ArrowRight.js +1 -1
- package/dist/esm/icons.generated/ArrowTop.js +1 -1
- package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
- package/dist/esm/icons.generated/ArrowUp.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
- package/dist/esm/icons.generated/Bug.js +1 -1
- package/dist/esm/icons.generated/Calendar.js +1 -1
- package/dist/esm/icons.generated/Call.js +1 -1
- package/dist/esm/icons.generated/Chat.js +1 -1
- package/dist/esm/icons.generated/Check.js +1 -1
- package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
- package/dist/esm/icons.generated/ChevronDown.js +1 -1
- package/dist/esm/icons.generated/ChevronLeft.js +1 -1
- package/dist/esm/icons.generated/ChevronRight.js +1 -1
- package/dist/esm/icons.generated/ChevronUp.js +1 -1
- package/dist/esm/icons.generated/Clock.js +1 -1
- package/dist/esm/icons.generated/Close.js +1 -1
- package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
- package/dist/esm/icons.generated/CollapseLeft.js +1 -1
- package/dist/esm/icons.generated/CollapseRight.js +1 -1
- package/dist/esm/icons.generated/Copy.js +1 -1
- package/dist/esm/icons.generated/Customizations.js +1 -1
- package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
- package/dist/esm/icons.generated/DangerDiamond.js +1 -1
- package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
- package/dist/esm/icons.generated/Delete.js +1 -1
- package/dist/esm/icons.generated/Deny.js +1 -1
- package/dist/esm/icons.generated/Devices.js +1 -1
- package/dist/esm/icons.generated/Directory.js +1 -1
- package/dist/esm/icons.generated/DirectorySelected.js +1 -1
- package/dist/esm/icons.generated/Documentation.js +1 -1
- package/dist/esm/icons.generated/Download.js +1 -1
- package/dist/esm/icons.generated/DragIndicator.js +1 -1
- package/dist/esm/icons.generated/Edit.js +1 -1
- package/dist/esm/icons.generated/ExpandLeft.js +1 -1
- package/dist/esm/icons.generated/ExpandRight.js +1 -1
- package/dist/esm/icons.generated/ExternalLink.js +1 -1
- package/dist/esm/icons.generated/Filter.js +1 -1
- package/dist/esm/icons.generated/Folder.js +1 -1
- package/dist/esm/icons.generated/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/lazyIconDictionary.js +308 -0
- package/dist/esm/icons.generated/lazyIconDictionary.js.map +1 -0
- package/dist/esm/icons.generated/names.js +12 -0
- package/dist/esm/icons.generated/names.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.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 +4 -3
- 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/DataTablePagination.js.map +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
- package/dist/esm/labs/DataView/DataCard.js +1 -1
- package/dist/esm/labs/DataView/DataCard.js.map +1 -1
- package/dist/esm/labs/DataView/DataTable.js +1 -1
- package/dist/esm/labs/DataView/DataView.js +1 -1
- package/dist/esm/labs/DataView/DetailPanel.js +1 -1
- package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
- package/dist/esm/labs/DataView/RowActions.js +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/esm/labs/DataView/TableSettings.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimePicker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
- package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +1 -1
- package/dist/esm/labs/PageTemplate/DocumentationLink.js +1 -1
- package/dist/esm/labs/PageTemplate/Layout.js +1 -1
- package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
- package/dist/esm/labs/PaginatedTable.js +1 -1
- package/dist/esm/labs/StaticTable.js +1 -1
- package/dist/esm/labs/UserProfile.js +1 -1
- package/dist/esm/labs/UserProfileMenuButton.js +1 -1
- package/dist/esm/logos.generated/Duo.js +1 -1
- package/dist/esm/logos.generated/GoogleAuth.js +1 -1
- package/dist/esm/logos.generated/OktaVerify.js +1 -1
- package/dist/esm/logos.generated/Persona.js +1 -1
- package/dist/esm/logos.generated/SymantecVip.js +1 -1
- package/dist/esm/logos.generated/Yubikey.js +1 -1
- package/dist/esm/theme/components/Dialog.js +2 -11
- package/dist/esm/theme/components/Dialog.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 +1 -1
- package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
- package/dist/esm/ui-shell/SideNav/NavAccordion.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +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/SkipToContent.js +1 -1
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js.map +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 +1 -1
- package/dist/esm/ui-shell/UiShellLogo.js +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +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/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Accordion.d.ts +9 -6
- package/dist/types/Accordion.d.ts.map +1 -1
- package/dist/types/Autocomplete.d.ts +24 -18
- package/dist/types/Autocomplete.d.ts.map +1 -1
- package/dist/types/Badge.d.ts +14 -0
- package/dist/types/Badge.d.ts.map +1 -1
- package/dist/types/Banner.d.ts +12 -7
- package/dist/types/Banner.d.ts.map +1 -1
- package/dist/types/Box.d.ts +10 -0
- package/dist/types/Box.d.ts.map +1 -1
- package/dist/types/Breadcrumbs.d.ts +21 -0
- package/dist/types/Breadcrumbs.d.ts.map +1 -1
- package/dist/types/Buttons/BaseButton.d.ts +24 -9
- package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
- package/dist/types/Buttons/BaseMenuButton.d.ts +7 -6
- 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 +11 -10
- package/dist/types/Buttons/MenuItem.d.ts.map +1 -1
- package/dist/types/Callout.d.ts +13 -7
- package/dist/types/Callout.d.ts.map +1 -1
- package/dist/types/Card.d.ts +24 -0
- package/dist/types/Card.d.ts.map +1 -1
- package/dist/types/CircularProgress.d.ts.map +1 -1
- package/dist/types/ConditionalWrapper.d.ts +4 -0
- package/dist/types/ConditionalWrapper.d.ts.map +1 -1
- package/dist/types/CssBaseline.d.ts +4 -0
- package/dist/types/CssBaseline.d.ts.map +1 -1
- package/dist/types/DataTable/DataTable.d.ts +25 -20
- package/dist/types/DataTable/DataTable.d.ts.map +1 -1
- package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
- package/dist/types/DatePickers/TimeZonePicker.d.ts +9 -0
- package/dist/types/DatePickers/TimeZonePicker.d.ts.map +1 -1
- package/dist/types/DatePickers/datePickerTheme.d.ts.map +1 -1
- package/dist/types/Dialog.d.ts +16 -8
- package/dist/types/Dialog.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts +21 -11
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/EmptyState.d.ts.map +1 -1
- package/dist/types/Field.d.ts +6 -4
- package/dist/types/Field.d.ts.map +1 -1
- package/dist/types/FieldLabel.d.ts +6 -0
- package/dist/types/FieldLabel.d.ts.map +1 -1
- package/dist/types/Fields/Checkbox.d.ts +6 -5
- package/dist/types/Fields/Checkbox.d.ts.map +1 -1
- package/dist/types/Fields/CheckboxGroup.d.ts +2 -1
- package/dist/types/Fields/CheckboxGroup.d.ts.map +1 -1
- package/dist/types/Fields/Radio.d.ts +6 -4
- package/dist/types/Fields/Radio.d.ts.map +1 -1
- package/dist/types/Fields/RadioGroup.d.ts +1 -1
- package/dist/types/Fields/RadioGroup.d.ts.map +1 -1
- package/dist/types/Fieldset.d.ts +3 -2
- package/dist/types/Fieldset.d.ts.map +1 -1
- package/dist/types/FieldsetContext.d.ts +3 -0
- package/dist/types/FieldsetContext.d.ts.map +1 -1
- package/dist/types/FileUploader/FileUploader.d.ts +25 -6
- package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
- package/dist/types/Form.d.ts +16 -11
- package/dist/types/Form.d.ts.map +1 -1
- package/dist/types/HintLink.d.ts.map +1 -1
- package/dist/types/HtmlProps.d.ts +4 -0
- package/dist/types/HtmlProps.d.ts.map +1 -1
- package/dist/types/IconWithTooltip.d.ts +4 -2
- package/dist/types/IconWithTooltip.d.ts.map +1 -1
- package/dist/types/Link.d.ts +7 -5
- package/dist/types/Link.d.ts.map +1 -1
- package/dist/types/NativeSelect.d.ts +20 -16
- package/dist/types/NativeSelect.d.ts.map +1 -1
- package/dist/types/OdysseyCacheProvider.d.ts +12 -3
- package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
- package/dist/types/OdysseyProvider.d.ts +6 -4
- package/dist/types/OdysseyProvider.d.ts.map +1 -1
- package/dist/types/OdysseyThemeProvider.d.ts +8 -1
- package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
- package/dist/types/Pagination/Pagination.d.ts +9 -8
- package/dist/types/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/PasswordField.d.ts +20 -18
- package/dist/types/PasswordField.d.ts.map +1 -1
- package/dist/types/ScreenReaderText.d.ts +4 -0
- package/dist/types/ScreenReaderText.d.ts.map +1 -1
- package/dist/types/SearchField.d.ts +28 -16
- package/dist/types/SearchField.d.ts.map +1 -1
- package/dist/types/Select.d.ts +5 -6
- package/dist/types/Select.d.ts.map +1 -1
- package/dist/types/Stack.d.ts +3 -0
- package/dist/types/Stack.d.ts.map +1 -1
- package/dist/types/Status.d.ts +6 -3
- package/dist/types/Status.d.ts.map +1 -1
- package/dist/types/Surface.d.ts +1 -0
- package/dist/types/Surface.d.ts.map +1 -1
- package/dist/types/Switch.d.ts +5 -4
- package/dist/types/Switch.d.ts.map +1 -1
- package/dist/types/Tabs.d.ts +10 -3
- package/dist/types/Tabs.d.ts.map +1 -1
- package/dist/types/Tag.d.ts +12 -5
- package/dist/types/Tag.d.ts.map +1 -1
- package/dist/types/TagList.d.ts.map +1 -1
- package/dist/types/TextField.d.ts +22 -16
- package/dist/types/TextField.d.ts.map +1 -1
- package/dist/types/Toast.d.ts +13 -13
- package/dist/types/Toast.d.ts.map +1 -1
- package/dist/types/ToastStack.d.ts.map +1 -1
- package/dist/types/Tooltip.d.ts +1 -0
- package/dist/types/Tooltip.d.ts.map +1 -1
- package/dist/types/Typography.d.ts +9 -3
- package/dist/types/Typography.d.ts.map +1 -1
- package/dist/types/createOdysseyStyledComponent.d.ts +54 -0
- package/dist/types/createOdysseyStyledComponent.d.ts.map +1 -0
- package/dist/types/icons.generated/lazyIconDictionary.d.ts +17 -0
- package/dist/types/icons.generated/lazyIconDictionary.d.ts.map +1 -0
- package/dist/types/icons.generated/names.d.ts +14 -0
- package/dist/types/icons.generated/names.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/labs/AppTile.d.ts +8 -0
- package/dist/types/labs/AppTile.d.ts.map +1 -1
- package/dist/types/labs/DataFilters.d.ts +3 -5
- package/dist/types/labs/DataFilters.d.ts.map +1 -1
- package/dist/types/labs/DataTable.d.ts +15 -17
- package/dist/types/labs/DataTable.d.ts.map +1 -1
- package/dist/types/labs/DataTablePagination.d.ts +6 -0
- package/dist/types/labs/DataTablePagination.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataCard.d.ts +6 -0
- package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
- package/dist/types/theme/components/Dialog.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/NavAccordion.d.ts +4 -5
- package/dist/types/ui-shell/SideNav/NavAccordion.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts +1 -1
- package/dist/types/ui-shell/TopNav/TopNav.d.ts +1 -1
- package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts +1 -1
- package/dist/types/useThemeCache.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +31 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","names":["memo","createElement","_createElement","useTranslation","PickerVirtualizationListBox","useAutocomplete","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","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 /** Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * 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 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 * Enables multiple choice selection\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 * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * If this component is required to display a virtualized list of options,\n * then this value needs to be set to true.\n * It is recommended if you're options are on the order of 10's of hundreds 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 *\n * default: \"No options\"\n */\n noOptionsText?: string;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * Callback fired when the textbox receives typed characters.\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\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\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 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;AAwKtD,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,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,I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AAO;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,GAAG3D,IAAI,CAACM,YAAY,CAE7C;AACDqD,oBAAoB,CAACC,WAAW,8CAAiB;AAEjD,SAASD,oBAAoB,IAAIrD,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Autocomplete.js","names":["memo","createElement","_createElement","useTranslation","PickerVirtualizationListBox","useAutocomplete","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","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 * 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 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 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;AA8KtD,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,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;EAClBC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,MAAM;EACNC,SAAS;EACTC;AACuE,CAAC,KAAK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J,OAAO,EAAEA,OAAQ;IACjBwB,QAAQ,EAAElC,UAAW;IACrBiB,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAED,MAAMuB,oBAAoB,GAAG3D,IAAI,CAACM,YAAY,CAE7C;AACDqD,oBAAoB,CAACC,WAAW,8CAAiB;AAEjD,SAASD,oBAAoB,IAAIrD,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.63.0";
|
|
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 badgeContent: number;\n badgeContentMax?: (typeof badgeContentMaxValues)[number];\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\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;
|
|
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\n * 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,aAAa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,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.63.0";
|
|
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 *
|
|
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 /** 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\n * 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.63.0";
|
|
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 children?: ReactNode;\n component?: MuiBoxProps[\"component\"];\n id?: MuiBoxProps[\"id\"];\n role?: AriaRole;\n sx?: MuiBoxProps[\"sx\"];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\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;
|
|
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\n * via the `sx` prop. Use it as a flexible building block for spacing, alignment, and structural\n * 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;AAsB9D,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.63.0";
|
|
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 children?: string;\n href?: string;\n iconName?: \"user\" | \"group\";\n onClick?: MouseEventHandler;\n};\n\nexport type BreadcrumbsProps = {\n children: ReactElement<typeof Breadcrumb>[];\n homeHref?: string;\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\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\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;AAqB9C,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;AAED,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,QAAQ;E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B;QAAAxC,QAAA,EAAC;MAAG,CAAY,CAAC,EACxDV,IAAA,CAAA6D,KAAA;QACEzB,QAAQ,EAAEA,QAAS;QACnB0B,YAAY,EAAE;UAAEC,UAAU,EAAE,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\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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AQ;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":[]}
|
|
@@ -97,6 +97,6 @@ const BaseButton = ({
|
|
|
97
97
|
return renderButton(muiProps);
|
|
98
98
|
};
|
|
99
99
|
const MemoizedBaseButton = memo(BaseButton);
|
|
100
|
-
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.
|
|
100
|
+
MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.63.0";
|
|
101
101
|
export { MemoizedBaseButton as BaseButton };
|
|
102
102
|
//# sourceMappingURL=BaseButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","MuiPropsContext","useMuiProps","Tooltip","useButton","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","children","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","_Button","fullWidth","undefined","ref","element","ariaType","placement","text","Consumer","MemoizedBaseButton","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set, label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The text content of the Button\n */\n label?: string;\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will\n// want to omit children, which they cannot do from the combined union type. Instead, they should\n// omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n children,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={!isDisabled ? onClick : undefined}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {children ?? label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth,\n label,\n children,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,SAEEA,IAAI,EAIJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAKd,SACEC,eAAe,EAEfC,WAAW,QACN,uBAAuB;AAC9B,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,SAAS,QAAQ,oBAAoB;AAAC,SAAAC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,IAAA,CAACL,eAAe,CAACiD,QAAQ;QAAAhC,QAAA,EAAEuB;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACL,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMe,kBAAkB,GAAGvD,IAAI,CAACc,UAAU,CAAC;AAC3CyC,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIzC,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"BaseButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","MuiPropsContext","useMuiProps","Tooltip","useButton","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","children","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","_Button","fullWidth","undefined","ref","element","ariaType","placement","text","Consumer","MemoizedBaseButton","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * Ref attached to the underlying button element, exposing a `focus()` handle.\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set,\n * label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * If `true`, the button is disabled and cannot be activated.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the button expands to fill its container's full width.\n */\n isFullWidth?: boolean;\n /**\n * The text content of the Button.\n * @default \"\"\n */\n label?: string;\n /**\n * Called when the button is clicked.\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button.\n * @default \"medium\"\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /** The tab order of the Button relative to other focusable elements. */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The HTML button type attribute.\n * - If `'button'`, no default form behavior.\n * - If `'submit'`, submits the nearest form.\n * - If `'reset'`, resets the nearest form to its initial values.\n * @default \"button\"\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * Controls the visual hierarchy and intent of the button.\n * - If `'primary'`, high-emphasis action; use for the single most important action on a page.\n * - If `'secondary'`, medium-emphasis action; use for secondary actions alongside a primary.\n * - If `'danger'`, high-emphasis destructive action.\n * - If `'dangerSecondary'`, medium-emphasis destructive action.\n * - If `'floating'`, low-emphasis action without a border or background.\n * - If `'floatingAction'`, icon-only floating action, typically fixed-positioned.\n * - If `'tertiary'`, deprecated low-emphasis style; use `'floating'` instead.\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will\n// want to omit children, which they cannot do from the combined union type. Instead, they should\n// omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\n/**\n * The internal base button primitive used by all Odyssey button variants. Handles icon placement,\n * full-width layout, tooltip wrapping, focus handle forwarding, and MUI prop context integration.\n */\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n children,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={!isDisabled ? onClick : undefined}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {children ?? label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth,\n label,\n children,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,SAEEA,IAAI,EAIJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAKd,SACEC,eAAe,EAEfC,WAAW,QACN,uBAAuB;AAC9B,SAASC,OAAO,QAAQ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C,KAAK;MAACC,IAAI,EAAElB,WAAY;MAAAb,QAAA,EAChEZ,IAAA,CAACL,eAAe,CAACiD,QAAQ;QAAAhC,QAAA,EAAEuB;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACL,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMe,kBAAkB,GAAGvD,IAAI,CAACc,UAAU,CAAC;AAC3CyC,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIzC,UAAU","ignoreList":[]}
|
|
@@ -165,6 +165,6 @@ const BaseMenuButton = ({
|
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
const MemoizedBaseMenuButton = memo(BaseMenuButton);
|
|
168
|
-
MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.
|
|
168
|
+
MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.63.0";
|
|
169
169
|
export { MemoizedBaseMenuButton as BaseMenuButton };
|
|
170
170
|
//# sourceMappingURL=BaseMenuButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseMenuButton.js","names":["styled","memo","useCallback","useMemo","useState","Box","ChevronDownIcon","MoreIcon","useOdysseyDesignTokens","useUniqueId","BaseButton","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","verticalDividerAlignmentValues","StyledMenuButtonContainer","shouldForwardProp","prop","hasVerticalDivider","odysseyDesignTokens","verticalDividerAlignment","position","display","top","left","width","height","Spacing6","backgroundColor","HueNeutral300","content","transform","transition","right","opacity","BaseMenuButton","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonChildren","buttonLabel","buttonVariant","children","popoverContent","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","omitEndIcon","shouldCloseOnSelect","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","anchorOrigin","horizontal","vertical","transformOrigin","ariaControls","ariaExpanded","ariaHasPopup","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","_Popover","sx","padding","Spacing4","MemoizedBaseMenuButton","displayName"],"sources":["../../../src/Buttons/BaseMenuButton.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 styled from \"@emotion/styled\";\nimport {\n Menu as MuiMenu,\n Popover as MuiPopover,\n PopoverOrigin,\n} from \"@mui/material\";\nimport {\n memo,\n type ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { Box } from \"../Box.js\";\nimport { FieldComponentProps } from \"../FieldComponentProps.js\";\nimport { ChevronDownIcon, MoreIcon } from \"../icons.generated/index.js\";\nimport { NullElement } from \"../NullElement.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useUniqueId } from \"../useUniqueId.js\";\nimport {\n BaseButton,\n buttonSizeValues,\n buttonVariantValues,\n} from \"./BaseButton.js\";\nimport { MenuContext, MenuContextType } from \"./MenuContext.js\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\nexport const verticalDividerAlignmentValues = [\"start\", \"end\"] as const;\n\nconst StyledMenuButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"hasVerticalDivider\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"verticalDividerAlignment\",\n})<{\n hasVerticalDivider: BaseMenuButtonProps[\"hasVerticalDivider\"];\n odysseyDesignTokens: DesignTokens;\n verticalDividerAlignment: BaseMenuButtonProps[\"verticalDividerAlignment\"];\n}>(({ hasVerticalDivider, odysseyDesignTokens, verticalDividerAlignment }) => ({\n position: \"relative\",\n\n ...(hasVerticalDivider && {\n display: \"inline-block\",\n\n \"&:before\": {\n position: \"absolute\",\n top: \"50%\",\n left: 0,\n width: 1,\n height: odysseyDesignTokens.Spacing6,\n backgroundColor: odysseyDesignTokens.HueNeutral300,\n content: '\"\"',\n transform: \"translate3d(0, -50%, 0)\",\n transition: `opacity 200ms`,\n\n ...(verticalDividerAlignment === \"end\" && {\n left: \"unset\",\n right: 0,\n }),\n },\n\n \":has(> button:hover)\": {\n \"&:before\": {\n opacity: 0,\n },\n },\n\n \":dir(rtl)\": {\n \"&:before\": {\n left: \"unset\",\n right: 0,\n ...(verticalDividerAlignment === \"end\" && {\n right: \"unset\",\n left: 0,\n }),\n },\n },\n }),\n}));\n\nexport type BaseMenuButtonProps = {\n /**\n * The button children for the triggering Button. Only available internal to Odyssey here in BaseMenuButton. If set, buttonLabel is ignored.\n */\n buttonChildren?: ReactNode;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The end Icon on the triggering Button\n */\n endIcon?: ReactElement;\n /**\n * Add a vertical rule to divide the button from surrounding content\n */\n hasVerticalDivider?: boolean;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * Whether to omit the endIcon if not set (rather than use a default value for it based on overflow)\n */\n omitEndIcon?: boolean;\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n\n /**\n * Show vertical rule before or after the button\n */\n verticalDividerAlignment?: (typeof verticalDividerAlignmentValues)[number];\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. MenuButton) will\n// want to omit buttonChildren, which they cannot do from the combined union type. Instead, they should\n// omit from BaseMenuButtonProps, then union with the AdditionalBaseMenuButtonProps (as seen in MenuButton)\nexport type AdditionalBaseMenuButtonProps = Pick<\n HtmlProps,\n \"ariaDescribedBy\" | \"ariaLabel\" | \"ariaLabelledBy\" | \"testId\" | \"translate\"\n> &\n Pick<FieldComponentProps, \"isDisabled\"> &\n (\n | { buttonLabel: string }\n | (Required<Pick<HtmlProps, \"ariaLabelledBy\">> &\n Partial<Pick<HtmlProps, \"ariaLabel\">> & {\n buttonLabel?: undefined | \"\";\n })\n | (Required<Pick<HtmlProps, \"ariaLabel\">> &\n Partial<Pick<HtmlProps, \"ariaLabelledBy\">> & {\n buttonLabel?: undefined | \"\";\n })\n ) &\n (\n | {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: ReactNode | NullElement;\n /**\n * popoverContent is disallowed if children are present\n */\n popoverContent?: never;\n }\n | {\n /**\n * children is disallowed if popoverContent is present\n */\n children?: never;\n /**\n * The content for the popover that is triggered on click.\n */\n popoverContent: ReactNode | NullElement;\n }\n );\n\nconst BaseMenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonChildren,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n popoverContent,\n endIcon: endIconProp,\n hasVerticalDivider = false,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n omitEndIcon = false,\n shouldCloseOnSelect = true,\n size,\n testId,\n tooltipText,\n translate,\n verticalDividerAlignment = \"start\",\n}: BaseMenuButtonProps & AdditionalBaseMenuButtonProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId],\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect],\n );\n\n const endIcon = omitEndIcon ? undefined : endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n return (\n <StyledMenuButtonContainer\n hasVerticalDivider={hasVerticalDivider}\n odysseyDesignTokens={odysseyDesignTokens}\n verticalDividerAlignment={verticalDividerAlignment}\n >\n <BaseButton\n ariaControls={isOpen ? `${uniqueId}-menu` : undefined}\n ariaDescribedBy={ariaDescribedBy}\n ariaExpanded={isOpen ? \"true\" : undefined}\n ariaHasPopup=\"true\"\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={buttonChildren}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n testId={testId}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n {children && (\n <MuiMenu\n anchorEl={anchorEl}\n anchorOrigin={anchorOrigin}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n transformOrigin={transformOrigin}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n )}\n\n {popoverContent && (\n <MuiPopover\n anchorEl={anchorEl}\n anchorOrigin={anchorOrigin}\n onClose={closeMenu}\n open={isOpen}\n transformOrigin={transformOrigin}\n >\n <Box\n sx={{\n padding: odysseyDesignTokens.Spacing4,\n }}\n >\n {popoverContent}\n </Box>\n </MuiPopover>\n )}\n </StyledMenuButtonContainer>\n );\n};\n\nconst MemoizedBaseMenuButton = memo(BaseMenuButton);\nMemoizedBaseMenuButton.displayName = \"BaseMenuButton\";\n\nexport { MemoizedBaseMenuButton as BaseMenuButton };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC,SACEC,IAAI,EAGJC,WAAW,EACXC,OAAO,EACPC,QAAQ,QACH,OAAO;AAId,SAASC,GAAG,QAAQ,WAAW;AAE/B,SAASC,eAAe,EAAEC,QAAQ,QAAQ,6BAA6B;AAEvE,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACEC,UAAU,QAGL,iBAAiB;AACxB,SAASC,WAAW,QAAyB,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU;AAC7D,OAAO,MAAMC,8BAA8B,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU;AAEvE,MAAMC,yBAAyB,GAAGlB,MAAM,CAAC,KAAK,EAAE;EAC9CmB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAC7BA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,kBAAkB;EAAEC,mBAAmB;EAAEC;AAAyB,CAAC,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AA9B,QAAA,EAEjChC,IAAA,CAACR,GAAG;QACFoF,EAAE,EAAE;UACFC,OAAO,EAAEpE,mBAAmB,CAACqE;QAC/B,CAAE;QAAA9C,QAAA,EAEDC;MAAc,CACZ;IAAC,CACI,CACb;EAAA,CACwB,CAAC;AAEhC,CAAC;AAED,MAAM8C,sBAAsB,GAAG3F,IAAI,CAACqC,cAAc,CAAC;AACnDsD,sBAAsB,CAACC,WAAW,gDAAmB;AAErD,SAASD,sBAAsB,IAAItD,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"BaseMenuButton.js","names":["styled","memo","useCallback","useMemo","useState","Box","ChevronDownIcon","MoreIcon","useOdysseyDesignTokens","useUniqueId","BaseButton","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","verticalDividerAlignmentValues","StyledMenuButtonContainer","shouldForwardProp","prop","hasVerticalDivider","odysseyDesignTokens","verticalDividerAlignment","position","display","top","left","width","height","Spacing6","backgroundColor","HueNeutral300","content","transform","transition","right","opacity","BaseMenuButton","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonChildren","buttonLabel","buttonVariant","children","popoverContent","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","omitEndIcon","shouldCloseOnSelect","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","undefined","anchorOrigin","horizontal","vertical","transformOrigin","ariaControls","ariaExpanded","ariaHasPopup","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","_Popover","sx","padding","Spacing4","MemoizedBaseMenuButton","displayName"],"sources":["../../../src/Buttons/BaseMenuButton.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 styled from \"@emotion/styled\";\nimport {\n Menu as MuiMenu,\n Popover as MuiPopover,\n PopoverOrigin,\n} from \"@mui/material\";\nimport {\n memo,\n type ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useState,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { Box } from \"../Box.js\";\nimport { FieldComponentProps } from \"../FieldComponentProps.js\";\nimport { ChevronDownIcon, MoreIcon } from \"../icons.generated/index.js\";\nimport { NullElement } from \"../NullElement.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { useUniqueId } from \"../useUniqueId.js\";\nimport {\n BaseButton,\n buttonSizeValues,\n buttonVariantValues,\n} from \"./BaseButton.js\";\nimport { MenuContext, MenuContextType } from \"./MenuContext.js\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\nexport const verticalDividerAlignmentValues = [\"start\", \"end\"] as const;\n\nconst StyledMenuButtonContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"hasVerticalDivider\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"verticalDividerAlignment\",\n})<{\n hasVerticalDivider: BaseMenuButtonProps[\"hasVerticalDivider\"];\n odysseyDesignTokens: DesignTokens;\n verticalDividerAlignment: BaseMenuButtonProps[\"verticalDividerAlignment\"];\n}>(({ hasVerticalDivider, odysseyDesignTokens, verticalDividerAlignment }) => ({\n position: \"relative\",\n\n ...(hasVerticalDivider && {\n display: \"inline-block\",\n\n \"&:before\": {\n position: \"absolute\",\n top: \"50%\",\n left: 0,\n width: 1,\n height: odysseyDesignTokens.Spacing6,\n backgroundColor: odysseyDesignTokens.HueNeutral300,\n content: '\"\"',\n transform: \"translate3d(0, -50%, 0)\",\n transition: `opacity 200ms`,\n\n ...(verticalDividerAlignment === \"end\" && {\n left: \"unset\",\n right: 0,\n }),\n },\n\n \":has(> button:hover)\": {\n \"&:before\": {\n opacity: 0,\n },\n },\n\n \":dir(rtl)\": {\n \"&:before\": {\n left: \"unset\",\n right: 0,\n ...(verticalDividerAlignment === \"end\" && {\n right: \"unset\",\n left: 0,\n }),\n },\n },\n }),\n}));\n\nexport type BaseMenuButtonProps = {\n /**\n * The button children for the triggering Button. Only available internal to Odyssey here in\n * BaseMenuButton. If set, buttonLabel is ignored.\n */\n buttonChildren?: ReactNode;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The end Icon on the triggering Button\n */\n endIcon?: ReactElement;\n /**\n * If `true`, renders a vertical divider adjacent to the button to separate it from surrounding content.\n */\n hasVerticalDivider?: boolean;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If `true`, renders as an overflow (more-actions) trigger instead of a labeled menu button.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If `true`, suppresses the default end icon rather than falling back to the overflow or chevron default.\n */\n omitEndIcon?: boolean;\n /**\n * If `true`, the menu closes automatically when a child MenuItem is clicked.\n * @default true\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n\n /**\n * Show vertical rule before or after the button\n */\n verticalDividerAlignment?: (typeof verticalDividerAlignmentValues)[number];\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. MenuButton) will\n// want to omit buttonChildren, which they cannot do from the combined union type. Instead, they should\n// omit from BaseMenuButtonProps, then union with the AdditionalBaseMenuButtonProps (as seen in MenuButton)\nexport type AdditionalBaseMenuButtonProps = Pick<\n HtmlProps,\n \"ariaDescribedBy\" | \"ariaLabel\" | \"ariaLabelledBy\" | \"testId\" | \"translate\"\n> &\n Pick<FieldComponentProps, \"isDisabled\"> &\n (\n | { buttonLabel: string }\n | (Required<Pick<HtmlProps, \"ariaLabelledBy\">> &\n Partial<Pick<HtmlProps, \"ariaLabel\">> & {\n buttonLabel?: undefined | \"\";\n })\n | (Required<Pick<HtmlProps, \"ariaLabel\">> &\n Partial<Pick<HtmlProps, \"ariaLabelledBy\">> & {\n buttonLabel?: undefined | \"\";\n })\n ) &\n (\n | {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: ReactNode | NullElement;\n /**\n * popoverContent is disallowed if children are present\n */\n popoverContent?: never;\n }\n | {\n /**\n * children is disallowed if popoverContent is present\n */\n children?: never;\n /**\n * The content for the popover that is triggered on click.\n */\n popoverContent: ReactNode | NullElement;\n }\n );\n\n/**\n * Base component for button-triggered menus and popovers. Renders a trigger button that opens a\n * dropdown menu or popover content on click. Used internally by MenuButton and overflow menu\n * patterns.\n */\nconst BaseMenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonChildren,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n popoverContent,\n endIcon: endIconProp,\n hasVerticalDivider = false,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n omitEndIcon = false,\n shouldCloseOnSelect = true,\n size,\n testId,\n tooltipText,\n translate,\n verticalDividerAlignment = \"start\",\n}: BaseMenuButtonProps & AdditionalBaseMenuButtonProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId],\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect],\n );\n\n const endIcon = omitEndIcon ? undefined : endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n return (\n <StyledMenuButtonContainer\n hasVerticalDivider={hasVerticalDivider}\n odysseyDesignTokens={odysseyDesignTokens}\n verticalDividerAlignment={verticalDividerAlignment}\n >\n <BaseButton\n ariaControls={isOpen ? `${uniqueId}-menu` : undefined}\n ariaDescribedBy={ariaDescribedBy}\n ariaExpanded={isOpen ? \"true\" : undefined}\n ariaHasPopup=\"true\"\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n children={buttonChildren}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n testId={testId}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n {children && (\n <MuiMenu\n anchorEl={anchorEl}\n anchorOrigin={anchorOrigin}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n transformOrigin={transformOrigin}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n )}\n\n {popoverContent && (\n <MuiPopover\n anchorEl={anchorEl}\n anchorOrigin={anchorOrigin}\n onClose={closeMenu}\n open={isOpen}\n transformOrigin={transformOrigin}\n >\n <Box\n sx={{\n padding: odysseyDesignTokens.Spacing4,\n }}\n >\n {popoverContent}\n </Box>\n </MuiPopover>\n )}\n </StyledMenuButtonContainer>\n );\n};\n\nconst MemoizedBaseMenuButton = memo(BaseMenuButton);\nMemoizedBaseMenuButton.displayName = \"BaseMenuButton\";\n\nexport { MemoizedBaseMenuButton as BaseMenuButton };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAMpC,SACEC,IAAI,EAGJC,WAAW,EACXC,OAAO,EACPC,QAAQ,QACH,OAAO;AAId,SAASC,GAAG,QAAQ,WAAW;AAE/B,SAASC,eAAe,EAAEC,QAAQ,QAAQ,6BAA6B;AAEvE,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SACEC,UAAU,QAGL,iBAAiB;AACxB,SAASC,WAAW,QAAyB,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU;AAC7D,OAAO,MAAMC,8BAA8B,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU;AAEvE,MAAMC,yBAAyB,GAAGlB,MAAM,CAAC,KAAK,EAAE;EAC9CmB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAC7BA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,kBAAkB;EAAEC,mBAAmB;EAAEC;AAAyB,CAAC,MAAM;EAC7EC,QAAQ,EAAE,UAAU;EAEpB,IAAIH,kBAAkB,IAAI;IACxBI,OAAO,EAAE,cAAc;IAEvB,UAAU,EAAE;MACVD,QAAQ,EAAE,UAAU;MACpBE,GAAG,EAAE,KAAK;MACVC,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAEP,mBAAmB,CAACQ,QAAQ;MACpCC,eA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B,CAACC,WAAW,gDAAmB;AAErD,SAASD,sBAAsB,IAAItD,cAAc","ignoreList":[]}
|
|
@@ -19,6 +19,6 @@ const Button = props => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
const MemoizedButton = memo(Button);
|
|
22
|
-
MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.
|
|
22
|
+
MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.63.0";
|
|
23
23
|
export { MemoizedButton as Button };
|
|
24
24
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["memo","BaseButton","jsx","_jsx","Button","props","MemoizedButton","displayName"],"sources":["../../../src/Buttons/Button.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 { memo } from \"react\";\n\nimport {\n AdditionalBaseButtonProps,\n BaseButton,\n BaseButtonProps,\n} from \"./BaseButton.js\";\n\nexport type ButtonProps = Omit<BaseButtonProps, \"children\"> &\n AdditionalBaseButtonProps;\n\nconst Button = (props: ButtonProps) => {\n return <BaseButton {...props} />;\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAE5B,SAEEC,UAAU,QAEL,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"file":"Button.js","names":["memo","BaseButton","jsx","_jsx","Button","props","MemoizedButton","displayName"],"sources":["../../../src/Buttons/Button.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 { memo } from \"react\";\n\nimport {\n AdditionalBaseButtonProps,\n BaseButton,\n BaseButtonProps,\n} from \"./BaseButton.js\";\n\nexport type ButtonProps = Omit<BaseButtonProps, \"children\"> &\n AdditionalBaseButtonProps;\n\n/**\n * A clickable button used to trigger actions or submit forms. Supports multiple visual variants,\n * sizes, icons, and an optional tooltip for icon-only usage.\n */\nconst Button = (props: ButtonProps) => {\n return <BaseButton {...props} />;\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAE5B,SAEEC,UAAU,QAEL,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASzB,MAAMC,MAAM,GAAIC,KAAkB,IAAK;EACrC,OAAOF,IAAA,CAACF,UAAU;IAAA,GAAKI;EAAK,CAAG,CAAC;AAClC,CAAC;AAED,MAAMC,cAAc,GAAGN,IAAI,CAACI,MAAM,CAAC;AACnCE,cAAc,CAACC,WAAW,wCAAW;AAErC,SAASD,cAAc,IAAIF,MAAM","ignoreList":[]}
|
|
@@ -19,6 +19,6 @@ const MenuButton = props => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
const MemoizedMenuButton = memo(MenuButton);
|
|
22
|
-
MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.
|
|
22
|
+
MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.63.0";
|
|
23
23
|
export { MemoizedMenuButton as MenuButton };
|
|
24
24
|
//# sourceMappingURL=MenuButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","names":["memo","BaseMenuButton","jsx","_jsx","MenuButton","props","MemoizedMenuButton","displayName"],"sources":["../../../src/Buttons/MenuButton.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 { memo } from \"react\";\n\nimport {\n AdditionalBaseMenuButtonProps,\n BaseMenuButton,\n BaseMenuButtonProps,\n} from \"./BaseMenuButton.js\";\n\nexport type MenuButtonProps = Omit<\n BaseMenuButtonProps,\n \"buttonChildren\" | \"omitEndIcon\"\n> &\n AdditionalBaseMenuButtonProps;\n\nconst MenuButton = (props: MenuButtonProps) => {\n return <BaseMenuButton {...props} />;\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAE5B,SAEEC,cAAc,QAET,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"file":"MenuButton.js","names":["memo","BaseMenuButton","jsx","_jsx","MenuButton","props","MemoizedMenuButton","displayName"],"sources":["../../../src/Buttons/MenuButton.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 { memo } from \"react\";\n\nimport {\n AdditionalBaseMenuButtonProps,\n BaseMenuButton,\n BaseMenuButtonProps,\n} from \"./BaseMenuButton.js\";\n\nexport type MenuButtonProps = Omit<\n BaseMenuButtonProps,\n \"buttonChildren\" | \"omitEndIcon\"\n> &\n AdditionalBaseMenuButtonProps;\n\n/**\n * A button that opens a dropdown menu of actions when clicked. Renders a labeled trigger button\n * with a chevron icon and manages the open/close state of the associated menu.\n */\nconst MenuButton = (props: MenuButtonProps) => {\n return <BaseMenuButton {...props} />;\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAE5B,SAEEC,cAAc,QAET,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY7B,MAAMC,UAAU,GAAIC,KAAsB,IAAK;EAC7C,OAAOF,IAAA,CAACF,cAAc;IAAA,GAAKI;EAAK,CAAG,CAAC;AACtC,CAAC;AAED,MAAMC,kBAAkB,GAAGN,IAAI,CAACI,UAAU,CAAC;AAC3CE,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIF,UAAU","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
17
|
const MenuItem = ({
|
|
18
18
|
children,
|
|
19
19
|
hasInitialFocus,
|
|
20
|
+
id,
|
|
20
21
|
isSelected,
|
|
21
22
|
isDisabled,
|
|
22
23
|
onClick: onClickProp,
|
|
@@ -40,6 +41,7 @@ const MenuItem = ({
|
|
|
40
41
|
className: variant === "destructive" ? `${menuItemClasses.root}-destructive` : undefined,
|
|
41
42
|
"data-se": testId,
|
|
42
43
|
disabled: isDisabled,
|
|
44
|
+
id: id,
|
|
43
45
|
onClick: onClick,
|
|
44
46
|
selected: isSelected,
|
|
45
47
|
tabIndex: 0,
|
|
@@ -48,6 +50,6 @@ const MenuItem = ({
|
|
|
48
50
|
});
|
|
49
51
|
};
|
|
50
52
|
const MemoizedMenuItem = memo(MenuItem);
|
|
51
|
-
MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.
|
|
53
|
+
MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.63.0";
|
|
52
54
|
export { MemoizedMenuItem as MenuItem };
|
|
53
55
|
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","tabIndex","MemoizedMenuItem","displayName"],"sources":["../../../src/Buttons/MenuItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, type ReactNode, useCallback, useContext } from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { MenuContext } from \"./MenuContext.js\";\n\nexport type MenuItemProps = {\n /**\n *
|
|
1
|
+
{"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","children","hasInitialFocus","id","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","tabIndex","MemoizedMenuItem","displayName"],"sources":["../../../src/Buttons/MenuItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, type ReactNode, useCallback, useContext } from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { MenuContext } from \"./MenuContext.js\";\n\nexport type MenuItemProps = {\n /**\n * Label or content rendered inside the clickable menu item row.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item receives focus automatically when the menu opens.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item is visually and functionally disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the menu item is visually marked as the current selection.\n */\n isSelected?: boolean;\n /**\n * Called when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * Controls the visual style of the menu item.\n * - If `'default'`, standard menu item appearance.\n * - If `'destructive'`, red text and icon, indicating a destructive or irreversible action.\n * @default \"default\"\n */\n variant?: \"default\" | \"destructive\";\n} & Pick<HtmlProps, \"id\" | \"testId\">;\n\n/**\n * An individual action item rendered inside a Menu. Supports default and destructive visual\n * variants, disabled and selected states, and auto-closes the parent Menu on click by default.\n */\nconst MenuItem = ({\n children,\n hasInitialFocus,\n id,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect],\n );\n\n return (\n <MuiMenuItem\n aria-current={isSelected}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n id={id}\n onClick={onClick}\n selected={isSelected}\n tabIndex={0}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAkBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAIrE,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwC/C,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,eAAe;EACfC,EAAE;EACFC,UAAU;EACVC,UAAU;EACVC,OAAO,EAAEC,WAAW;EACpBC,MAAM;EACNC,KAAK;EACLC,OAAO,GAAG;AACG,CAAC,KAAK;EACnB,MAAM;IAAEC,SAAS;IAAEC;EAAoB,CAAC,GAAGhB,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMS,OAAO,GAAGX,WAAW,CACxBkB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEb,IAAA,CAAAe,SAAA;IACE,gBAAcV,UAAW;IAEzBW,SAAS,EAAEb,eAAgB;IAC3Bc,SAAS,EACPN,OAAO,KAAK,aAAa,GACrB,GAAGjB,eAAe,CAACwB,IAAI,cAAc,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBF,EAAE,EAAEA,EAAG;IACPG,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBiB,QAAQ,EAAE,CAAE;IACZZ,KAAK,EAAEA,KAAM;IAAAR,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMqB,gBAAgB,GAAG5B,IAAI,CAACM,QAAQ,CAAC;AACvCsB,gBAAgB,CAACC,WAAW,0CAAa;AAEzC,SAASD,gBAAgB,IAAItB,QAAQ","ignoreList":[]}
|
package/dist/esm/Callout.js
CHANGED
|
@@ -84,6 +84,6 @@ const Callout = ({
|
|
|
84
84
|
});
|
|
85
85
|
};
|
|
86
86
|
const MemoizedCallout = memo(Callout);
|
|
87
|
-
MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.
|
|
87
|
+
MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.63.0";
|
|
88
88
|
export { MemoizedCallout as Callout };
|
|
89
89
|
//# sourceMappingURL=Callout.js.map
|
package/dist/esm/Callout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","names":["styled","memo","useTranslation","Link","useOdysseyDesignTokens","Paragraph","useUniqueId","jsx","_jsx","jsxs","_jsxs","calloutRoleValues","calloutSeverityValues","ContentContainer","shouldForwardProp","prop","odysseyDesignTokens","marginBlockStart","Spacing4","Callout","children","linkRel","linkTarget","linkText","linkUrl","onLinkClick","role","severity","testId","text","title","translate","t","titleId","_Alert","variant","_AlertTitle","id","_Box","component","href","onClick","rel","target","MemoizedCallout","displayName"],"sources":["../../src/Callout.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 styled from \"@emotion/styled\";\nimport { Alert, AlertTitle, Box } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { Link, LinkProps } from \"./Link.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Paragraph } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const calloutRoleValues = [\"status\", \"alert\"] as const;\nexport const calloutSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type CalloutProps = {\n /**\n *
|
|
1
|
+
{"version":3,"file":"Callout.js","names":["styled","memo","useTranslation","Link","useOdysseyDesignTokens","Paragraph","useUniqueId","jsx","_jsx","jsxs","_jsxs","calloutRoleValues","calloutSeverityValues","ContentContainer","shouldForwardProp","prop","odysseyDesignTokens","marginBlockStart","Spacing4","Callout","children","linkRel","linkTarget","linkText","linkUrl","onLinkClick","role","severity","testId","text","title","translate","t","titleId","_Alert","variant","_AlertTitle","id","_Box","component","href","onClick","rel","target","MemoizedCallout","displayName"],"sources":["../../src/Callout.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 styled from \"@emotion/styled\";\nimport { Alert, AlertTitle, Box } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { Link, LinkProps } from \"./Link.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\nimport { Paragraph } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const calloutRoleValues = [\"status\", \"alert\"] as const;\nexport const calloutSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type CalloutProps = {\n /**\n * Supplementary content rendered inside the callout body, typically a list or structured markup.\n */\n children?: ReactNode;\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 calloutRoleValues)[number];\n /**\n * Visual severity level that controls the callout's color and icon.\n */\n severity: (typeof calloutSeverityValues)[number];\n /**\n * Primary message text displayed inside the callout body.\n */\n text?: string;\n /**\n * Heading text displayed at the top of the callout, above the body content.\n */\n title?: string;\n} & (\n | {\n children?: never;\n text: string;\n }\n | {\n children: ReactNode;\n text?: never;\n }\n) &\n // if linkText is provided, either linkUrl or onLinkClick must be provided\n (| {\n /** The `rel` attribute forwarded to the action link. */\n linkRel?: LinkProps[\"rel\"];\n /** The `target` attribute forwarded to the action link. */\n linkTarget?: LinkProps[\"target\"];\n /** Visible label for the action link rendered below the Callout content. */\n linkText: string;\n /** 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 below the Callout content. */\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 Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst ContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n \"& > * + *\": {\n marginBlockStart: odysseyDesignTokens.Spacing4,\n },\n}));\n\n/**\n * A non-dismissible inline message that draws attention to important contextual information. Use\n * Callout to surface status, warnings, errors, or supplementary guidance within a page or form.\n */\nconst Callout = ({\n children,\n linkRel,\n linkTarget,\n linkText,\n linkUrl,\n onLinkClick,\n role,\n severity,\n testId,\n text,\n title,\n translate,\n}: CalloutProps) => {\n const { t } = useTranslation();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const titleId = useUniqueId();\n\n return (\n <Alert\n aria-label={t(`severity.${severity}`)}\n aria-labelledby={titleId}\n data-se={testId}\n role={role}\n severity={severity}\n variant=\"callout\"\n >\n {title && (\n <AlertTitle aria-hidden id={titleId} translate={translate}>\n {title}\n </AlertTitle>\n )}\n\n <ContentContainer odysseyDesignTokens={odysseyDesignTokens}>\n {children && <Box component=\"div\">{children}</Box>}\n {text && <Paragraph>{text}</Paragraph>}\n {linkText && (\n <Box>\n <Link\n href={linkUrl ?? \"#\"}\n onClick={onLinkClick}\n rel={linkRel}\n target={linkTarget}\n variant=\"monochrome\"\n >\n {linkText}\n </Link>\n </Box>\n )}\n </ContentContainer>\n </Alert>\n );\n};\n\nconst MemoizedCallout = memo(Callout);\nMemoizedCallout.displayName = \"Callout\";\n\nexport { MemoizedCallout as Callout };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,SAASC,IAAI,QAAmB,OAAO;AAIvC,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,IAAI,QAAmB,WAAW;AAC3C,SAEEC,sBAAsB,QACjB,iCAAiC;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,OAAO,MAAMC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC7D,OAAO,MAAMC,qBAAqB,GAAG,CACnC,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACC;AAkEV,MAAMC,gBAAgB,GAAGb,MAAM,CAAC,KAAK,EAAE;EACrCc,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAAwC,CAAC;EAAEC;AAAoB,CAAC,MAAM;EACtE,WAAW,EAAE;IACXC,gBAAgB,EAAED,mBAAmB,CAACE;EACxC;AACF,CAAC,CAAC,CAAC;AAMH,MAAMC,O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