@okta/odyssey-react-mui 1.64.0 → 1.65.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 +5 -5
- package/dist/cjs/Accordion.cjs +1 -1
- package/dist/cjs/Autocomplete.cjs +1 -1
- package/dist/cjs/Badge.cjs +1 -1
- package/dist/cjs/Banner.cjs +1 -1
- package/dist/cjs/Box.cjs +1 -1
- package/dist/cjs/Breadcrumbs.cjs +1 -1
- package/dist/cjs/Buttons/BaseButton.cjs +1 -1
- package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
- package/dist/cjs/Buttons/Button.cjs +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs +1 -1
- package/dist/cjs/Callout.cjs +1 -1
- package/dist/cjs/Card.cjs +1 -1
- package/dist/cjs/CircularProgress.cjs +1 -1
- package/dist/cjs/ConditionalWrapper.cjs +1 -1
- package/dist/cjs/DataTable/DataTable.cjs +1 -1
- package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
- package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
- package/dist/cjs/DatePickers/DateField.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
- package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
- package/dist/cjs/Dialog.cjs +1 -1
- package/dist/cjs/Drawer.cjs +4 -1
- package/dist/cjs/Drawer.cjs.map +1 -1
- package/dist/cjs/EmptyState.cjs +1 -1
- package/dist/cjs/ErrorMessageList.cjs +1 -1
- package/dist/cjs/Field.cjs +1 -1
- package/dist/cjs/FieldError.cjs +1 -1
- package/dist/cjs/FieldHint.cjs +1 -1
- package/dist/cjs/FieldLabel.cjs +1 -1
- package/dist/cjs/Fields/Checkbox.cjs +1 -1
- package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
- package/dist/cjs/Fields/Radio.cjs +1 -1
- package/dist/cjs/Fields/RadioGroup.cjs +1 -1
- package/dist/cjs/Fieldset.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploadIllustration.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploadPreview.cjs +1 -1
- package/dist/cjs/FileUploader/FileUploader.cjs +1 -1
- package/dist/cjs/Form.cjs +1 -1
- package/dist/cjs/FullScreenOverlay.cjs +1 -1
- package/dist/cjs/FullScreenOverlayContext.cjs +2 -1
- package/dist/cjs/FullScreenOverlayContext.cjs.map +1 -1
- package/dist/cjs/HintLink.cjs +1 -1
- package/dist/cjs/IconWithTooltip.cjs +1 -1
- package/dist/cjs/Link.cjs +1 -1
- package/dist/cjs/MuiPropsChild.cjs +1 -1
- package/dist/cjs/NativeSelect.cjs +1 -1
- package/dist/cjs/OdysseyCacheProvider.cjs +1 -1
- package/dist/cjs/OdysseyProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +1 -1
- package/dist/cjs/PasswordField.cjs +4 -3
- package/dist/cjs/PasswordField.cjs.map +1 -1
- package/dist/cjs/ScreenReaderText.cjs +1 -1
- package/dist/cjs/SearchField.cjs +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Stack.cjs +1 -1
- package/dist/cjs/Status.cjs +1 -1
- package/dist/cjs/Surface.cjs +1 -1
- package/dist/cjs/Switch.cjs +2 -2
- package/dist/cjs/Tabs.cjs +1 -1
- package/dist/cjs/Tag.cjs +1 -1
- package/dist/cjs/TagList.cjs +1 -1
- package/dist/cjs/TextField.cjs +1 -1
- package/dist/cjs/Toast.cjs +1 -1
- package/dist/cjs/ToastStack.cjs +29 -10
- package/dist/cjs/ToastStack.cjs.map +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Typography.cjs +12 -12
- package/dist/cjs/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/labs/AppTile.cjs +1 -1
- package/dist/cjs/labs/DataFilters.cjs +21 -13
- package/dist/cjs/labs/DataFilters.cjs.map +1 -1
- package/dist/cjs/labs/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataTablePagination.cjs +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
- package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +5 -3
- package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
- package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
- package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
- package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
- package/dist/cjs/labs/DataView/componentTypes.cjs.map +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/properties/ts/odyssey-react-mui.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +11 -10
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +2 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +1 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/theme/components/Form.cjs +1 -1
- package/dist/cjs/theme/components/Form.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 +19 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +13 -11
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +72 -17
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContentContext.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +3 -2
- package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs +45 -23
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs +2 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs.map +1 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableOverlay.cjs +14 -1
- package/dist/cjs/ui-shell/SideNav/SortableList/SortableOverlay.cjs.map +1 -1
- package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +1 -1
- package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +1 -1
- package/dist/cjs/ui-shell/index.cjs +0 -12
- package/dist/cjs/ui-shell/index.cjs.map +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/cjs/web-component/renderReactInWebComponent.cjs +29 -62
- package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
- package/dist/esm/Accordion.js +1 -1
- package/dist/esm/Autocomplete.js +1 -1
- package/dist/esm/Badge.js +1 -1
- package/dist/esm/Banner.js +1 -1
- package/dist/esm/Box.js +1 -1
- package/dist/esm/Breadcrumbs.js +1 -1
- package/dist/esm/Buttons/BaseButton.js +1 -1
- package/dist/esm/Buttons/BaseMenuButton.js +1 -1
- package/dist/esm/Buttons/Button.js +1 -1
- package/dist/esm/Buttons/MenuButton.js +1 -1
- package/dist/esm/Buttons/MenuItem.js +1 -1
- package/dist/esm/Callout.js +1 -1
- package/dist/esm/Card.js +1 -1
- package/dist/esm/CircularProgress.js +1 -1
- package/dist/esm/ConditionalWrapper.js +1 -1
- package/dist/esm/DataTable/DataTable.js +1 -1
- package/dist/esm/DataTable/DataTableRowActions.js +1 -1
- package/dist/esm/DataTable/DataTableSettings.js +1 -1
- package/dist/esm/DatePickers/DateField.js +1 -1
- package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
- package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
- package/dist/esm/DatePickers/DatePicker.js +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drawer.js +4 -1
- package/dist/esm/Drawer.js.map +1 -1
- package/dist/esm/EmptyState.js +1 -1
- package/dist/esm/ErrorMessageList.js +1 -1
- package/dist/esm/Field.js +1 -1
- package/dist/esm/FieldError.js +1 -1
- package/dist/esm/FieldHint.js +1 -1
- package/dist/esm/FieldLabel.js +1 -1
- package/dist/esm/Fields/Checkbox.js +1 -1
- package/dist/esm/Fields/CheckboxGroup.js +1 -1
- package/dist/esm/Fields/Radio.js +1 -1
- package/dist/esm/Fields/RadioGroup.js +1 -1
- package/dist/esm/Fieldset.js +1 -1
- package/dist/esm/FileUploader/FileUploadIllustration.js +1 -1
- package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
- package/dist/esm/FileUploader/FileUploader.js +1 -1
- package/dist/esm/Form.js +1 -1
- package/dist/esm/FullScreenOverlay.js +1 -1
- package/dist/esm/FullScreenOverlayContext.js +2 -1
- package/dist/esm/FullScreenOverlayContext.js.map +1 -1
- package/dist/esm/HintLink.js +1 -1
- package/dist/esm/IconWithTooltip.js +1 -1
- package/dist/esm/Link.js +1 -1
- package/dist/esm/MuiPropsChild.js +1 -1
- package/dist/esm/NativeSelect.js +1 -1
- package/dist/esm/OdysseyCacheProvider.js +1 -1
- package/dist/esm/OdysseyProvider.js +1 -1
- package/dist/esm/OdysseyThemeProvider.js +1 -1
- package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
- package/dist/esm/Pagination/Pagination.js +1 -1
- package/dist/esm/PasswordField.js +4 -3
- package/dist/esm/PasswordField.js.map +1 -1
- package/dist/esm/ScreenReaderText.js +1 -1
- package/dist/esm/SearchField.js +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/Stack.js +1 -1
- package/dist/esm/Status.js +1 -1
- package/dist/esm/Surface.js +1 -1
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TagList.js +1 -1
- package/dist/esm/TextField.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/ToastStack.js +28 -9
- package/dist/esm/ToastStack.js.map +1 -1
- package/dist/esm/Tooltip.js +1 -1
- package/dist/esm/Typography.js +12 -12
- package/dist/esm/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/labs/AppTile.js +1 -1
- package/dist/esm/labs/DataFilters.js +21 -13
- package/dist/esm/labs/DataFilters.js.map +1 -1
- package/dist/esm/labs/DataTable.js +1 -1
- package/dist/esm/labs/DataTablePagination.js +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
- package/dist/esm/labs/DataView/DataCard.js +1 -1
- package/dist/esm/labs/DataView/DataTable.js +1 -1
- package/dist/esm/labs/DataView/DataView.js +5 -3
- package/dist/esm/labs/DataView/DataView.js.map +1 -1
- package/dist/esm/labs/DataView/DetailPanel.js +1 -1
- package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
- package/dist/esm/labs/DataView/RowActions.js +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/esm/labs/DataView/TableSettings.js +1 -1
- package/dist/esm/labs/DataView/componentTypes.js.map +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/properties/ts/odyssey-react-mui.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +11 -10
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +2 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +1 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/theme/components/Form.js +1 -1
- package/dist/esm/theme/components/Form.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 +20 -2
- package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +13 -11
- package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +74 -19
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContentContext.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +3 -2
- package/dist/esm/ui-shell/SideNav/SideNavSortableList.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -2
- package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js +45 -23
- package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js +2 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js.map +1 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableOverlay.js +12 -1
- package/dist/esm/ui-shell/SideNav/SortableList/SortableOverlay.js.map +1 -1
- package/dist/esm/ui-shell/SkipToContent.js +1 -1
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavListItem.js +1 -1
- package/dist/esm/ui-shell/UiShell.js +1 -1
- package/dist/esm/ui-shell/UiShellLogo.js +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
- package/dist/esm/ui-shell/index.js +0 -1
- package/dist/esm/ui-shell/index.js.map +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/esm/web-component/renderReactInWebComponent.js +18 -28
- package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/FullScreenOverlayContext.d.ts +1 -0
- package/dist/types/FullScreenOverlayContext.d.ts.map +1 -1
- package/dist/types/PasswordField.d.ts +20 -0
- package/dist/types/PasswordField.d.ts.map +1 -1
- package/dist/types/ToastStack.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.d.ts +2 -0
- package/dist/types/i18n.generated/i18n.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.resources.d.ts +50 -19
- package/dist/types/i18n.generated/i18n.resources.d.ts.map +1 -1
- package/dist/types/labs/DataFilters.d.ts.map +1 -1
- package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
- package/dist/types/labs/DataView/componentTypes.d.ts +7 -0
- package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +11 -10
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +2 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +1 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/theme/components/Form.d.ts.map +1 -1
- package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts +8 -8
- package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts +6 -0
- package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SideNavSortableList.d.ts +1 -1
- package/dist/types/ui-shell/SideNav/SideNavSortableList.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts +5 -3
- package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts +8 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts.map +1 -1
- package/dist/types/ui-shell/SideNav/SortableList/SortableOverlay.d.ts +5 -0
- package/dist/types/ui-shell/SideNav/SortableList/SortableOverlay.d.ts.map +1 -1
- package/dist/types/ui-shell/index.d.ts +0 -1
- package/dist/types/ui-shell/index.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/dist/types/web-component/renderReactInWebComponent.d.ts +0 -2
- package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableItem.js","names":["useSortable","CSS","styled","createContext","createRef","useContext","useMemo","useTranslation","useOdysseyDesignTokens","useUiShellContext","jsx","_jsx","jsxs","_jsxs","SortableItemContext","attributes","listeners","undefined","ref","StyledSortableListItem","shouldForwardProp","prop","odysseyDesignTokens","isSelected","sideNavContrastColors","position","button","top","left","Spacing2","transform","svg","path","fill","fontColor","opacity","outlineWidth","TypographyColorAction","StyledUl","padding","listStyle","listStyleType","StyledDragHandleButton","isDragging","focusRingColor","border","backgroundColor","cursor","transition","TransitionDurationMain","borderRadius","BorderRadiusMain","display","outline","boxShadow","PalettePrimaryMain","DragHandle","t","uiShellContext","children","height","viewBox","width","xmlns","clipRule","d","fillRule","SortableItem","id","isDisabled","isSortable","setNodeRef","setActivatorNodeRef","context","style","Translate","toString","Provider","value"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type {\n DraggableSyntheticListeners,\n UniqueIdentifier,\n} from \"@dnd-kit/core\";\n\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport styled from \"@emotion/styled\";\nimport {\n createContext,\n createRef,\n CSSProperties,\n PropsWithChildren,\n RefObject,\n useContext,\n useMemo,\n} from \"react\";\n\nimport { ContrastColors } from \"../../../createContrastColors.js\";\nimport { useTranslation } from \"../../../i18n.generated/i18n.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../../OdysseyDesignTokensContext.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../../ui-shell/UiShellProvider.js\";\n\ntype ItemProps = {\n id: UniqueIdentifier;\n isDisabled?: boolean;\n isSelected?: boolean;\n isSortable?: boolean;\n};\n\nexport type SortableItemContextType = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attributes: Record<string, any>;\n listeners: DraggableSyntheticListeners;\n ref: RefObject<HTMLButtonElement>;\n};\n\nconst SortableItemContext = createContext<SortableItemContextType>({\n attributes: {},\n listeners: undefined,\n ref: createRef<HTMLButtonElement>(),\n});\n\nconst StyledSortableListItem = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isSelected\" &&\n prop !== \"sideNavContrastColors\",\n})<{\n isSelected?: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(({ odysseyDesignTokens, isSelected, sideNavContrastColors }) => ({\n position: \"relative\",\n\n button: {\n top: \"50%\",\n left: odysseyDesignTokens.Spacing2,\n transform: \"translateY(-50%)\",\n },\n\n svg: {\n path: {\n fill: \"currentColor\",\n ...(sideNavContrastColors?.fontColor && {\n fill: sideNavContrastColors.fontColor,\n }),\n },\n },\n\n \"&:has(a:hover, button:hover, a:focus, button:focus, a:focus-visible, button:focus-visible, [role='button']:hover, [role='button']:focus, [role='button']:focus-visible)\":\n {\n button: {\n opacity: 1,\n outlineWidth: 0,\n },\n },\n\n ...(isSelected && {\n svg: {\n path: {\n fill: odysseyDesignTokens.TypographyColorAction,\n\n ...(sideNavContrastColors?.fontColor && {\n fill: sideNavContrastColors.fontColor,\n }),\n },\n },\n }),\n}));\n\nconst StyledUl = styled(\"ul\")({\n padding: 0,\n listStyle: \"none\",\n listStyleType: \"none\",\n});\n\nconst StyledDragHandleButton = styled(\"button\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isDragging\" &&\n prop !== \"focusRingColor\",\n})<{\n focusRingColor: ContrastColors[\"focusRingColor\"];\n isDragging?: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens, isDragging, focusRingColor }) => ({\n position: \"absolute\",\n opacity: 0,\n padding: odysseyDesignTokens.Spacing2,\n border: \"none\",\n backgroundColor: \"transparent\",\n cursor: `${isDragging ? \"grabbing\" : \"grab\"}`,\n transition: `opacity ${odysseyDesignTokens.TransitionDurationMain}`,\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n\n svg: {\n display: \"flex\",\n },\n\n \"&:focus, &:focus-visible\": {\n outline: \"none\",\n boxShadow: `inset 0 0 0 2px ${odysseyDesignTokens.PalettePrimaryMain}`,\n\n ...(focusRingColor && {\n boxShadow: `inset 0 0 0 2px ${focusRingColor}`,\n }),\n },\n}));\n\ntype DragHandleProps = {\n isDisabled?: boolean;\n isDragging?: boolean;\n};\n\nexport const DragHandle = ({ isDragging }: DragHandleProps) => {\n const { attributes, listeners, ref } = useContext(SortableItemContext);\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n const uiShellContext = useUiShellContext();\n\n return (\n <StyledDragHandleButton\n {...attributes}\n {...listeners}\n aria-label={t(\"navigation.drag.handle\")}\n focusRingColor={uiShellContext?.sideNavContrastColors?.focusRingColor}\n isDragging={isDragging}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={ref}\n >\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M6 2.33331C6 2.8856 5.55228 3.33331 5 3.33331C4.44772 3.33331 4 2.8856 4 2.33331C4 1.78103 4.44772 1.33331 5 1.33331C5.55228 1.33331 6 1.78103 6 2.33331ZM11 3.33331C11.5523 3.33331 12 2.8856 12 2.33331C12 1.78103 11.5523 1.33331 11 1.33331C10.4477 1.33331 10 1.78103 10 2.33331C10 2.8856 10.4477 3.33331 11 3.33331ZM11 7.11109C11.5523 7.11109 12 6.66338 12 6.11109C12 5.55881 11.5523 5.11109 11 5.11109C10.4477 5.11109 10 5.55881 10 6.11109C10 6.66338 10.4477 7.11109 11 7.11109ZM12 9.88887C12 10.4412 11.5523 10.8889 11 10.8889C10.4477 10.8889 10 10.4412 10 9.88887C10 9.33659 10.4477 8.88887 11 8.88887C11.5523 8.88887 12 9.33659 12 9.88887ZM11 14.6666C11.5523 14.6666 12 14.2189 12 13.6666C12 13.1144 11.5523 12.6666 11 12.6666C10.4477 12.6666 10 13.1144 10 13.6666C10 14.2189 10.4477 14.6666 11 14.6666ZM5 7.11109C5.55228 7.11109 6 6.66338 6 6.11109C6 5.55881 5.55228 5.11109 5 5.11109C4.44772 5.11109 4 5.55881 4 6.11109C4 6.66338 4.44772 7.11109 5 7.11109ZM6 9.88888C6 10.4412 5.55228 10.8889 5 10.8889C4.44772 10.8889 4 10.4412 4 9.88888C4 9.33659 4.44772 8.88888 5 8.88888C5.55228 8.88888 6 9.33659 6 9.88888ZM5 14.6666C5.55228 14.6666 6 14.2189 6 13.6666C6 13.1144 5.55228 12.6666 5 12.6666C4.44772 12.6666 4 13.1144 4 13.6666C4 14.2189 4.44772 14.6666 5 14.6666Z\"\n fill=\"#3F59E4\"\n fillRule=\"evenodd\"\n />\n </svg>\n </StyledDragHandleButton>\n );\n};\n\nexport const SortableItem = ({\n id,\n isDisabled,\n isSelected,\n isSortable = true,\n children,\n}: PropsWithChildren<ItemProps>) => {\n const {\n attributes,\n isDragging,\n listeners,\n setNodeRef,\n setActivatorNodeRef,\n transform,\n transition,\n } = useSortable({ id });\n\n const context: SortableItemContextType = useMemo(\n () => ({\n attributes,\n listeners,\n // This library gives us a legacy ref function, and I can't change it, so I had to override the type. --Kevin Ghadyani\n ref: setActivatorNodeRef as unknown as RefObject<HTMLButtonElement>,\n }),\n [attributes, listeners, setActivatorNodeRef],\n );\n\n const style: CSSProperties = {\n opacity: isDragging ? 0.4 : undefined,\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const uiShellContext = useUiShellContext();\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n\n return (\n <SortableItemContext.Provider value={context}>\n <StyledSortableListItem\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={setNodeRef}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n style={style}\n >\n {!isDisabled && isSortable && <DragHandle isDragging={isDragging} />}\n <StyledUl>{children}</StyledUl>\n </StyledSortableListItem>\n </SortableItemContext.Provider>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,GAAG,QAAQ,oBAAoB;AACxC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SACEC,aAAa,EACbC,SAAS,EAITC,UAAU,EACVC,OAAO,QACF,OAAO;AAGd,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAEEC,sBAAsB,QACjB,wCAAwC;AAC/C,SAEEC,iBAAiB,QACZ,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgB9C,MAAMC,mBAAmB,GAAGX,aAAa,CAA0B;EACjEY,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C9C,KAAA,CAACM,sBAAsB;MACrBI,UAAU,EAAEA,UAAW;MACvBD,mBAAmB,EAAEA,mBAAoB;MACzCJ,GAAG,EAAEqD,UAAW;MAChB/C,qBAAqB,EAAEkC,cAAc,EAAElC,qBAAsB;MAC7DkD,KAAK,EAAEA,KAAM;MAAAf,QAAA,GAEZ,CAACU,UAAU,IAAIC,UAAU,IAAI3D,IAAA,CAAC6C,UAAU;QAACb,UAAU,EAAEA;MAAW,CAAE,CAAC,EACpEhC,IAAA,CAAC2B,QAAQ;QAAAqB,QAAA,EAAEA;MAAQ,CAAW,CAAC;IAAA,CACT;EAAC,CACG,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SortableItem.js","names":["useSortable","CSS","styled","createContext","createRef","useContext","useMemo","useTranslation","useOdysseyDesignTokens","useUiShellContext","useDragOverlayContext","jsx","_jsx","jsxs","_jsxs","SortableItemContext","attributes","listeners","undefined","ref","StyledSortableListItem","shouldForwardProp","prop","odysseyDesignTokens","isSelected","sideNavContrastColors","position","button","top","left","Spacing2","transform","svg","path","fill","fontColor","opacity","outlineWidth","TypographyColorAction","getFocusRingStyles","focusRingColor","outline","boxShadow","HueNeutralWhite","PalettePrimaryMain","StyledDragHandleButton","isGrabbed","padding","border","borderRadius","BorderRadiusMain","backgroundColor","cursor","display","HueBlue100","HueNeutral200","borderColor","HueBlue600","color","DragHandle","label","t","uiShellContext","children","height","viewBox","width","xmlns","clipRule","d","fillRule","SortableItem","id","isDisabled","isSortable","isDragging","setNodeRef","setActivatorNodeRef","transition","context","style","Translate","toString","Provider","value"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type {\n DraggableSyntheticListeners,\n UniqueIdentifier,\n} from \"@dnd-kit/core\";\n\nimport { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport styled from \"@emotion/styled\";\nimport {\n createContext,\n createRef,\n CSSProperties,\n PropsWithChildren,\n RefObject,\n useContext,\n useMemo,\n} from \"react\";\n\nimport { ContrastColors } from \"../../../createContrastColors.js\";\nimport { useTranslation } from \"../../../i18n.generated/i18n.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../../OdysseyDesignTokensContext.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../../ui-shell/UiShellProvider.js\";\nimport { useDragOverlayContext } from \"./SortableOverlay.js\";\n\ntype ItemProps = {\n id: UniqueIdentifier;\n isDisabled?: boolean;\n isSelected?: boolean;\n isSortable?: boolean;\n label: string;\n};\n\nexport type SortableItemContextType = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attributes: Record<string, any>;\n listeners: DraggableSyntheticListeners;\n ref: RefObject<HTMLButtonElement>;\n};\n\nconst SortableItemContext = createContext<SortableItemContextType>({\n attributes: {},\n listeners: undefined,\n ref: createRef<HTMLButtonElement>(),\n});\n\nconst StyledSortableListItem = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isSelected\" &&\n prop !== \"sideNavContrastColors\",\n})<{\n isSelected?: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n}>(({ odysseyDesignTokens, isSelected, sideNavContrastColors }) => ({\n position: \"relative\",\n\n button: {\n top: \"50%\",\n left: odysseyDesignTokens.Spacing2,\n transform: \"translateY(-50%)\",\n },\n\n svg: {\n path: {\n fill: \"currentColor\",\n ...(sideNavContrastColors?.fontColor && {\n fill: sideNavContrastColors.fontColor,\n }),\n },\n },\n\n \"&:has(a:hover, button:hover, a:focus, button:focus, a:focus-visible, button:focus-visible, [role='button']:hover, [role='button']:focus, [role='button']:focus-visible)\":\n {\n button: {\n opacity: 1,\n outlineWidth: 0,\n },\n },\n\n ...(isSelected && {\n svg: {\n path: {\n fill: odysseyDesignTokens.TypographyColorAction,\n\n ...(sideNavContrastColors?.fontColor && {\n fill: sideNavContrastColors.fontColor,\n }),\n },\n },\n }),\n}));\n\nconst getFocusRingStyles = ({\n focusRingColor,\n odysseyDesignTokens,\n}: {\n focusRingColor: ContrastColors[\"focusRingColor\"];\n odysseyDesignTokens: DesignTokens;\n}) => ({\n outline: \"2px solid transparent\",\n boxShadow: `0 0 0 2px ${odysseyDesignTokens.HueNeutralWhite}, 0 0 0 4px ${focusRingColor || odysseyDesignTokens.PalettePrimaryMain}`,\n});\n\nconst StyledDragHandleButton = styled(\"button\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isGrabbed\" &&\n prop !== \"isSelected\" &&\n prop !== \"focusRingColor\",\n})<{\n focusRingColor: ContrastColors[\"focusRingColor\"];\n isGrabbed?: boolean;\n isSelected?: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens, isGrabbed, isSelected, focusRingColor }) => ({\n position: \"absolute\",\n opacity: 0,\n padding: odysseyDesignTokens.Spacing2,\n // Transparent 1px border by default so toggling to the HueBlue600 grabbed\n // border does not shift the icon.\n border: \"1px solid transparent\",\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n backgroundColor: \"transparent\",\n cursor: `${isGrabbed ? \"grabbing\" : \"grab\"}`,\n outline: \"none\",\n\n svg: {\n display: \"flex\",\n },\n\n // hover state, only applied when not actively grabbing/dragging the handle\n ...(!isGrabbed && {\n \"&:hover\": {\n backgroundColor: isSelected\n ? odysseyDesignTokens.HueBlue100\n : odysseyDesignTokens.HueNeutral200,\n },\n }),\n\n // Focus ring for a resting handle (keyboard focus). Excludes the actively\n // grabbed handle via aria-pressed so the isGrabbed block styles that state.\n \"&:focus-visible:not([aria-pressed='true'])\": getFocusRingStyles({\n focusRingColor,\n odysseyDesignTokens,\n }),\n\n // grabbed (overlay)\n ...(isGrabbed && {\n opacity: 1,\n borderColor: odysseyDesignTokens.HueBlue600,\n // icon fills with currentColor, so `color` recolors it to match the border\n color: odysseyDesignTokens.HueBlue600,\n ...getFocusRingStyles({ focusRingColor, odysseyDesignTokens }),\n }),\n}));\n\ntype DragHandleProps = {\n isDisabled?: boolean;\n isSelected?: boolean;\n label: string;\n};\n\nexport const DragHandle = ({ isSelected, label }: DragHandleProps) => {\n const { attributes, listeners, ref } = useContext(SortableItemContext);\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n const uiShellContext = useUiShellContext();\n // True only for the overlay copy that follows the pointer.\n const { isGrabbed } = useDragOverlayContext();\n\n return (\n <StyledDragHandleButton\n {...attributes}\n {...listeners}\n aria-label={\n label\n ? t(\"navigation.drag.handle.label\", { label })\n : t(\"navigation.drag.handle\")\n }\n focusRingColor={uiShellContext?.sideNavContrastColors?.focusRingColor}\n isGrabbed={isGrabbed}\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={ref}\n >\n <svg\n fill=\"none\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M6 2.33331C6 2.8856 5.55228 3.33331 5 3.33331C4.44772 3.33331 4 2.8856 4 2.33331C4 1.78103 4.44772 1.33331 5 1.33331C5.55228 1.33331 6 1.78103 6 2.33331ZM11 3.33331C11.5523 3.33331 12 2.8856 12 2.33331C12 1.78103 11.5523 1.33331 11 1.33331C10.4477 1.33331 10 1.78103 10 2.33331C10 2.8856 10.4477 3.33331 11 3.33331ZM11 7.11109C11.5523 7.11109 12 6.66338 12 6.11109C12 5.55881 11.5523 5.11109 11 5.11109C10.4477 5.11109 10 5.55881 10 6.11109C10 6.66338 10.4477 7.11109 11 7.11109ZM12 9.88887C12 10.4412 11.5523 10.8889 11 10.8889C10.4477 10.8889 10 10.4412 10 9.88887C10 9.33659 10.4477 8.88887 11 8.88887C11.5523 8.88887 12 9.33659 12 9.88887ZM11 14.6666C11.5523 14.6666 12 14.2189 12 13.6666C12 13.1144 11.5523 12.6666 11 12.6666C10.4477 12.6666 10 13.1144 10 13.6666C10 14.2189 10.4477 14.6666 11 14.6666ZM5 7.11109C5.55228 7.11109 6 6.66338 6 6.11109C6 5.55881 5.55228 5.11109 5 5.11109C4.44772 5.11109 4 5.55881 4 6.11109C4 6.66338 4.44772 7.11109 5 7.11109ZM6 9.88888C6 10.4412 5.55228 10.8889 5 10.8889C4.44772 10.8889 4 10.4412 4 9.88888C4 9.33659 4.44772 8.88888 5 8.88888C5.55228 8.88888 6 9.33659 6 9.88888ZM5 14.6666C5.55228 14.6666 6 14.2189 6 13.6666C6 13.1144 5.55228 12.6666 5 12.6666C4.44772 12.6666 4 13.1144 4 13.6666C4 14.2189 4.44772 14.6666 5 14.6666Z\"\n fill=\"#3F59E4\"\n fillRule=\"evenodd\"\n />\n </svg>\n </StyledDragHandleButton>\n );\n};\n\nexport const SortableItem = ({\n id,\n isDisabled,\n isSelected,\n isSortable = true,\n label,\n children,\n}: PropsWithChildren<ItemProps>) => {\n const {\n attributes,\n isDragging,\n listeners,\n setNodeRef,\n setActivatorNodeRef,\n transform,\n transition,\n } = useSortable({ id });\n\n const context: SortableItemContextType = useMemo(\n () => ({\n attributes,\n listeners,\n // This library gives us a legacy ref function, and I can't change it, so I had to override the type. --Kevin Ghadyani\n ref: setActivatorNodeRef as unknown as RefObject<HTMLButtonElement>,\n }),\n [attributes, listeners, setActivatorNodeRef],\n );\n\n const style: CSSProperties = {\n opacity: isDragging ? 0.4 : undefined,\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const uiShellContext = useUiShellContext();\n const odysseyDesignTokens: DesignTokens = useOdysseyDesignTokens();\n\n return (\n <SortableItemContext.Provider value={context}>\n <StyledSortableListItem\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={setNodeRef}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n style={style}\n >\n {!isDisabled && isSortable && (\n <DragHandle isSelected={isSelected} label={label} />\n )}\n {children}\n </StyledSortableListItem>\n </SortableItemContext.Provider>\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,GAAG,QAAQ,oBAAoB;AACxC,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SACEC,aAAa,EACbC,SAAS,EAITC,UAAU,EACVC,OAAO,QACF,OAAO;AAGd,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAEEC,sBAAsB,QACjB,wCAAwC;AAC/C,SAEEC,iBAAiB,QACZ,sCAAsC;AAC7C,SAASC,qBAAqB,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiB7D,MAAMC,mBAAmB,GAAGZ,aAAa,CAA0B;EACjEa,UAAU,EAAE,CAAC,CAAC;EACdC,SAAS,EAAEC,SAAS;EACpBC,GAAG,EAAEf,SAAS,CAAoB;AACpC,CAAC,CAAC;AAEF,MAAMgB,sBAAsB,GAAGlB,MAAM,CAAC,IAAI,EAAE;EAC1CmB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,YAAY,IACrBA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,mBAAmB;EAAEC,UAAU;EAAEC;AAAsB,CAAC,MAAM;EAClEC,QAAQ,EAAE,UAAU;EAEpBC,MAAM,EAAE;IACNC,GAAG,EAAE,KAAK;IACVC,IA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AC,CAAC;EAElE,OACEI,IAAA,CAACG,mBAAmB,CAACoE,QAAQ;IAACC,KAAK,EAAEL,OAAQ;IAAAhB,QAAA,EAC3CjD,KAAA,CAACM,sBAAsB;MACrBI,UAAU,EAAEA,UAAW;MACvBD,mBAAmB,EAAEA,mBAAoB;MACzCJ,GAAG,EAAEyD,UAAW;MAChBnD,qBAAqB,EAAEqC,cAAc,EAAErC,qBAAsB;MAC7DuD,KAAK,EAAEA,KAAM;MAAAjB,QAAA,GAEZ,CAACU,UAAU,IAAIC,UAAU,IACxB9D,IAAA,CAAC+C,UAAU;QAACnC,UAAU,EAAEA,UAAW;QAACoC,KAAK,EAAEA;MAAM,CAAE,CACpD,EACAG,QAAQ;IAAA,CACa;EAAC,CACG,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
@@ -77,7 +77,8 @@ export const SortableList = ({
|
|
|
77
77
|
}), [t]);
|
|
78
78
|
return _jsxs(DndContext, {
|
|
79
79
|
accessibility: {
|
|
80
|
-
announcements
|
|
80
|
+
announcements,
|
|
81
|
+
container: typeof document !== "undefined" ? document.body : undefined
|
|
81
82
|
},
|
|
82
83
|
onDragCancel: () => {
|
|
83
84
|
setActive(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableList.js","names":["DndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","Fragment","useMemo","useState","useTranslation","SortableItem","SortableOverlay","jsx","_jsx","jsxs","_jsxs","SortableList","parentId","items","onChange","renderItem","active","setActive","activeItem","find","item","id","sensors","coordinateGetter","t","announcements","onDragStart","activeId","onDragOver","over","overId","onDragEnd","onDragCancel","accessibility","activeIndex","findIndex","overIndex","isSortable","children","map","Item"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableList.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactNode } from \"react\";\n\nimport {\n Active,\n Announcements,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n UniqueIdentifier,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n} from \"@dnd-kit/sortable\";\nimport { Fragment, useMemo, useState } from \"react\";\n\nimport { useTranslation } from \"../../../i18n.generated/i18n.js\";\nimport { SortableItem } from \"./SortableItem.js\";\nimport { SortableOverlay } from \"./SortableOverlay.js\";\n\nexport interface BaseItem {\n id: UniqueIdentifier;\n isDisabled: boolean | undefined;\n isSelected: boolean | undefined;\n isSortable: boolean | undefined;\n navItem: ReactNode;\n}\n\ninterface ListProps<T extends BaseItem> {\n items: T[];\n onChange: (\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n parentId: string;\n renderItem: (item: T) => ReactNode;\n}\n\nexport const SortableList = <T extends BaseItem>({\n parentId,\n items,\n onChange,\n renderItem,\n}: ListProps<T>) => {\n const [active, setActive] = useState<Active | null>(null);\n\n const activeItem = useMemo(\n () => items.find((item) => item.id === active?.id),\n [active, items],\n );\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const { t } = useTranslation();\n const announcements: Announcements = useMemo(\n () => ({\n onDragStart: ({ active }) => {\n return `${t(\"sortable.list.drag.start\", { activeId: active.id })}`;\n },\n onDragOver: ({ active, over }) => {\n if (over) {\n return `${t(\"sortable.list.drag.moved.over\", { activeId: active.id, overId: over.id })}`;\n }\n return `${t(\"sortable.list.drag.nolonger.over\", { activeId: active.id })}`;\n },\n onDragEnd: ({ active, over }) => {\n if (over) {\n return `${t(\"sortable.list.drag.end.dropped.over\", { activeId: active.id, overId: over.id })}`;\n }\n return `${t(\"sortable.list.drag.end.dropped\", { activeId: active.id })}`;\n },\n onDragCancel: ({ active }) => {\n return `${t(\"sortable.list.drag.cancel\", { activeId: active.id })}`;\n },\n }),\n [t],\n );\n\n return (\n <DndContext\n accessibility={{
|
|
1
|
+
{"version":3,"file":"SortableList.js","names":["DndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","Fragment","useMemo","useState","useTranslation","SortableItem","SortableOverlay","jsx","_jsx","jsxs","_jsxs","SortableList","parentId","items","onChange","renderItem","active","setActive","activeItem","find","item","id","sensors","coordinateGetter","t","announcements","onDragStart","activeId","onDragOver","over","overId","onDragEnd","onDragCancel","accessibility","container","document","body","undefined","activeIndex","findIndex","overIndex","isSortable","children","map","Item"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableList.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactNode } from \"react\";\n\nimport {\n Active,\n Announcements,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n UniqueIdentifier,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n} from \"@dnd-kit/sortable\";\nimport { Fragment, useMemo, useState } from \"react\";\n\nimport { useTranslation } from \"../../../i18n.generated/i18n.js\";\nimport { SortableItem } from \"./SortableItem.js\";\nimport { SortableOverlay } from \"./SortableOverlay.js\";\n\nexport interface BaseItem {\n id: UniqueIdentifier;\n isDisabled: boolean | undefined;\n isSelected: boolean | undefined;\n isSortable: boolean | undefined;\n /**\n * The item's visible label, used to give its drag handle a unique\n * accessible name (e.g. \"Drag handle for Work\") so screen-reader users can\n * distinguish handles that otherwise share the same name.\n */\n label: string;\n navItem: ReactNode;\n}\n\ninterface ListProps<T extends BaseItem> {\n items: T[];\n onChange: (\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n parentId: string;\n renderItem: (item: T) => ReactNode;\n}\n\nexport const SortableList = <T extends BaseItem>({\n parentId,\n items,\n onChange,\n renderItem,\n}: ListProps<T>) => {\n const [active, setActive] = useState<Active | null>(null);\n\n const activeItem = useMemo(\n () => items.find((item) => item.id === active?.id),\n [active, items],\n );\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const { t } = useTranslation();\n const announcements: Announcements = useMemo(\n () => ({\n onDragStart: ({ active }) => {\n return `${t(\"sortable.list.drag.start\", { activeId: active.id })}`;\n },\n onDragOver: ({ active, over }) => {\n if (over) {\n return `${t(\"sortable.list.drag.moved.over\", { activeId: active.id, overId: over.id })}`;\n }\n return `${t(\"sortable.list.drag.nolonger.over\", { activeId: active.id })}`;\n },\n onDragEnd: ({ active, over }) => {\n if (over) {\n return `${t(\"sortable.list.drag.end.dropped.over\", { activeId: active.id, overId: over.id })}`;\n }\n return `${t(\"sortable.list.drag.end.dropped\", { activeId: active.id })}`;\n },\n onDragCancel: ({ active }) => {\n return `${t(\"sortable.list.drag.cancel\", { activeId: active.id })}`;\n },\n }),\n [t],\n );\n\n return (\n <DndContext\n accessibility={{\n announcements,\n // Portal the drag live region to the document body: SortableList renders\n // inside a semantic <ul>, and an inline role=\"status\" element would be an\n // invalid non-<li> child, breaking the list's accessibility semantics.\n container: typeof document !== \"undefined\" ? document.body : undefined,\n }}\n onDragCancel={() => {\n setActive(null);\n }}\n onDragEnd={({ active, over }) => {\n if (over && active.id !== over?.id) {\n const activeIndex = items.findIndex(({ id }) => id === active.id);\n const overIndex = items.findIndex(({ id }) => id === over.id);\n // allow sorting by default except when isSortable is set to false explicitly\n if (items[overIndex].isSortable !== false) {\n onChange(parentId, active.id, activeIndex, overIndex);\n }\n }\n setActive(null);\n }}\n onDragStart={({ active }) => {\n setActive(active);\n }}\n sensors={sensors}\n >\n <SortableContext items={items}>\n {items.map((item) => (\n <Fragment key={item.id}>{renderItem(item)}</Fragment>\n ))}\n </SortableContext>\n <SortableOverlay>\n {activeItem ? renderItem(activeItem) : null}\n </SortableOverlay>\n </DndContext>\n );\n};\n\nSortableList.Item = SortableItem;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAGEA,UAAU,EACVC,cAAc,EACdC,aAAa,EAEbC,SAAS,EACTC,UAAU,QACL,eAAe;AACtB,SACEC,eAAe,EACfC,2BAA2B,QACtB,mBAAmB;AAC1B,SAASC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAEnD,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4BvD,OAAO,MAAMC,YAAY,GAAGA,CAAqB;EAC/CC,QAAQ;EACRC,KAAK;EACLC,QAAQ;EACRC;AACY,CAAC,KAAK;EAClB,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGd,QAAQ,CAAgB,IAAI,CAAC;EAEzD,MAAMe,UAAU,GAAGhB,OAAO,CACxB,MAAMW,KAAK,CAACM,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACC,EAAE,KAAKL,MAAM,EAAEK,EAAE,CAAC,EAClD,CAACL,MAAM,EAA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AAAyC,QAAA,EAAgB3B,UAAU,CAACK,IAAI;MAAC,GAA1BA,IAAI,CAACC,EAAgC,CACrD;IAAC,CACa,CAAC,EAClBb,IAAA,CAACF,eAAe;MAAAoC,QAAA,EACbxB,UAAU,GAAGH,UAAU,CAACG,UAAU,CAAC,GAAG;IAAI,CAC5B,CAAC;EAAA,CACR,CAAC;AAEjB,CAAC;AAEDP,YAAY,CAACiC,IAAI,GAAGvC,YAAY","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { defaultDropAnimationSideEffects, DragOverlay } from "@dnd-kit/core";
|
|
14
|
+
import { createContext, useContext } from "react";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const dropAnimationConfig = {
|
|
16
17
|
sideEffects: defaultDropAnimationSideEffects({
|
|
@@ -21,12 +22,22 @@ const dropAnimationConfig = {
|
|
|
21
22
|
}
|
|
22
23
|
})
|
|
23
24
|
};
|
|
25
|
+
const DragOverlayContext = createContext({
|
|
26
|
+
isGrabbed: false
|
|
27
|
+
});
|
|
28
|
+
export const useDragOverlayContext = () => useContext(DragOverlayContext);
|
|
29
|
+
const dragOverlayContextValue = {
|
|
30
|
+
isGrabbed: true
|
|
31
|
+
};
|
|
24
32
|
export function SortableOverlay({
|
|
25
33
|
children
|
|
26
34
|
}) {
|
|
27
35
|
return _jsx(DragOverlay, {
|
|
28
36
|
dropAnimation: dropAnimationConfig,
|
|
29
|
-
children:
|
|
37
|
+
children: _jsx(DragOverlayContext.Provider, {
|
|
38
|
+
value: dragOverlayContextValue,
|
|
39
|
+
children: children
|
|
40
|
+
})
|
|
30
41
|
});
|
|
31
42
|
}
|
|
32
43
|
//# sourceMappingURL=SortableOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortableOverlay.js","names":["defaultDropAnimationSideEffects","DragOverlay","jsx","_jsx","dropAnimationConfig","sideEffects","styles","active","opacity","SortableOverlay","children","dropAnimation"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableOverlay.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { PropsWithChildren } from \"react\";\n\nimport {\n defaultDropAnimationSideEffects,\n DragOverlay,\n DropAnimation,\n} from \"@dnd-kit/core\";\n\nconst dropAnimationConfig: DropAnimation = {\n sideEffects: defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: \"0.4\",\n },\n },\n }),\n};\n\nexport function SortableOverlay({ children }: PropsWithChildren<object>) {\n return (\n <DragOverlay dropAnimation={dropAnimationConfig}
|
|
1
|
+
{"version":3,"file":"SortableOverlay.js","names":["defaultDropAnimationSideEffects","DragOverlay","createContext","useContext","jsx","_jsx","dropAnimationConfig","sideEffects","styles","active","opacity","DragOverlayContext","isGrabbed","useDragOverlayContext","dragOverlayContextValue","SortableOverlay","children","dropAnimation","Provider","value"],"sources":["../../../../../src/ui-shell/SideNav/SortableList/SortableOverlay.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { PropsWithChildren } from \"react\";\n\nimport {\n defaultDropAnimationSideEffects,\n DragOverlay,\n DropAnimation,\n} from \"@dnd-kit/core\";\nimport { createContext, useContext } from \"react\";\n\nconst dropAnimationConfig: DropAnimation = {\n sideEffects: defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: \"0.4\",\n },\n },\n }),\n};\n\ntype DragOverlayContextValue = {\n isGrabbed: boolean;\n};\n\n// @dnd-kit renders two copies of the dragged row: the source item that stays in\n// the list (flagged by `useSortable().isDragging`) and this floating overlay\n// copy that follows the pointer. The overlay renders outside SortableContext,\n// so it has no `isDragging` flag of its own. This context lets nested components\n// tell they are inside the overlay (the \"grabbed\" copy) vs. the source ghost.\nconst DragOverlayContext = createContext<DragOverlayContextValue>({\n isGrabbed: false,\n});\n\nexport const useDragOverlayContext = () => useContext(DragOverlayContext);\n\n// Stable reference so the provider doesn't re-render every consumer each render.\nconst dragOverlayContextValue: DragOverlayContextValue = { isGrabbed: true };\n\nexport function SortableOverlay({ children }: PropsWithChildren<object>) {\n return (\n <DragOverlay dropAnimation={dropAnimationConfig}>\n <DragOverlayContext.Provider value={dragOverlayContextValue}>\n {children}\n </DragOverlayContext.Provider>\n </DragOverlay>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SACEA,+BAA+B,EAC/BC,WAAW,QAEN,eAAe;AACtB,SAASC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElD,MAAMC,mBAAkC,GAAG;EACzCC,WAAW,EAAEP,+BAA+B,CAAC;IAC3CQ,MAAM,EAAE;MACNC,MAAM,EAAE;QACNC,OAAO,EAAE;MACX;IACF;EACF,CAAC;AACH,CAAC;AAWD,MAAMC,kBAAkB,GAAGT,aAAa,CAA0B;EAChEU,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,OAAO,MAAMC,qBAAqB,GAAGA,CAAA,KAAMV,UAAU,CAACQ,kBAAkB,CAAC;AAGzE,MAAMG,uBAAgD,GAAG;EAAEF,SAAS,EAAE;AAAK,CAAC;AAE5E,OAAO,SAASG,eAAeA,CAAC;EAAEC;AAAoC,CAAC,EAAE;EACvE,OACEX,IAAA,CAACJ,WAAW;IAACgB,aAAa,EAAEX,mBAAoB;IAAAU,QAAA,EAC9CX,IAAA,CAACM,kBAAkB,CAACO,QAAQ;MAACC,KAAK,EAAEL,uBAAwB;MAAAE,QAAA,EACzDA;IAAQ,CACkB;EAAC,CACnB,CAAC;AAElB","ignoreList":[]}
|
|
@@ -113,6 +113,6 @@ const SkipToContent = ({
|
|
|
113
113
|
});
|
|
114
114
|
};
|
|
115
115
|
const MemoizedSkipToContent = memo(SkipToContent);
|
|
116
|
-
MemoizedSkipToContent.displayName = "SkipToContent::pkg=odyssey&odysseyV=1.
|
|
116
|
+
MemoizedSkipToContent.displayName = "SkipToContent::pkg=odyssey&odysseyV=1.65.0";
|
|
117
117
|
export { MemoizedSkipToContent as SkipToContent };
|
|
118
118
|
//# sourceMappingURL=SkipToContent.js.map
|
|
@@ -27,6 +27,6 @@ const HamburgerMenuIcon = forwardRef((props, ref) => {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
const MemoizedHamburgerMenuIcon = memo(HamburgerMenuIcon);
|
|
30
|
-
MemoizedHamburgerMenuIcon.displayName = "HamburgerMenuIcon::pkg=odyssey&odysseyV=1.
|
|
30
|
+
MemoizedHamburgerMenuIcon.displayName = "HamburgerMenuIcon::pkg=odyssey&odysseyV=1.65.0";
|
|
31
31
|
export { MemoizedHamburgerMenuIcon as HamburgerMenuIcon };
|
|
32
32
|
//# sourceMappingURL=HamburgerMenuIcon.js.map
|
|
@@ -62,6 +62,6 @@ const TopNav = ({
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
const MemoizedTopNav = memo(TopNav);
|
|
65
|
-
MemoizedTopNav.displayName = "TopNav::pkg=odyssey&odysseyV=1.
|
|
65
|
+
MemoizedTopNav.displayName = "TopNav::pkg=odyssey&odysseyV=1.65.0";
|
|
66
66
|
export { MemoizedTopNav as TopNav };
|
|
67
67
|
//# sourceMappingURL=TopNav.js.map
|
|
@@ -32,6 +32,6 @@ const TopNavLinksList = ({
|
|
|
32
32
|
})
|
|
33
33
|
});
|
|
34
34
|
const MemoizedTopNavLinksList = memo(TopNavLinksList);
|
|
35
|
-
MemoizedTopNavLinksList.displayName = "TopNavLinksList::pkg=odyssey&odysseyV=1.
|
|
35
|
+
MemoizedTopNavLinksList.displayName = "TopNavLinksList::pkg=odyssey&odysseyV=1.65.0";
|
|
36
36
|
export { MemoizedTopNavLinksList as TopNavLinksList };
|
|
37
37
|
//# sourceMappingURL=TopNavLinksList.js.map
|
|
@@ -126,6 +126,6 @@ const TopNavListItem = ({
|
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
128
|
const MemoizedTopNavListItem = memo(TopNavListItem);
|
|
129
|
-
MemoizedTopNavListItem.displayName = "TopNavListItem::pkg=odyssey&odysseyV=1.
|
|
129
|
+
MemoizedTopNavListItem.displayName = "TopNavListItem::pkg=odyssey&odysseyV=1.65.0";
|
|
130
130
|
export { MemoizedTopNavListItem as TopNavListItem };
|
|
131
131
|
//# sourceMappingURL=TopNavListItem.js.map
|
|
@@ -123,6 +123,6 @@ const UiShell = ({
|
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
125
|
const MemoizedUiShell = memo(UiShell);
|
|
126
|
-
MemoizedUiShell.displayName = "UiShell::pkg=odyssey&odysseyV=1.
|
|
126
|
+
MemoizedUiShell.displayName = "UiShell::pkg=odyssey&odysseyV=1.65.0";
|
|
127
127
|
export { MemoizedUiShell as UiShell };
|
|
128
128
|
//# sourceMappingURL=UiShell.js.map
|
|
@@ -65,6 +65,6 @@ const UiShellLogo = ({
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
const MemoizedUiShellLogo = memo(UiShellLogo);
|
|
68
|
-
MemoizedUiShellLogo.displayName = "UiShellLogo::pkg=odyssey&odysseyV=1.
|
|
68
|
+
MemoizedUiShellLogo.displayName = "UiShellLogo::pkg=odyssey&odysseyV=1.65.0";
|
|
69
69
|
export { MemoizedUiShellLogo as UiShellLogo };
|
|
70
70
|
//# sourceMappingURL=UiShellLogo.js.map
|
|
@@ -170,6 +170,6 @@ const WideUiShellContent = ({
|
|
|
170
170
|
});
|
|
171
171
|
};
|
|
172
172
|
const MemoizedWideUiShellContent = memo(WideUiShellContent);
|
|
173
|
-
MemoizedWideUiShellContent.displayName = "WideUiShellContent::pkg=odyssey&odysseyV=1.
|
|
173
|
+
MemoizedWideUiShellContent.displayName = "WideUiShellContent::pkg=odyssey&odysseyV=1.65.0";
|
|
174
174
|
export { MemoizedWideUiShellContent as WideUiShellContent };
|
|
175
175
|
//# sourceMappingURL=WideUiShellContent.js.map
|
|
@@ -22,7 +22,6 @@ export * from "./uiShellContentTypes.js";
|
|
|
22
22
|
export * from "./UiShellLogo.js";
|
|
23
23
|
export * from "./useHasUiShell.js";
|
|
24
24
|
export * from "./WideUiShellContent.js";
|
|
25
|
-
export * from "../web-component/renderReactInWebComponent.js";
|
|
26
25
|
export { UiShell } from "./UiShell.js";
|
|
27
26
|
export { adminAppUiShellBreakpoints, useUiShellBreakpoints } from "./useUiShellBreakpoints.js";
|
|
28
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["UiShell","adminAppUiShellBreakpoints","useUiShellBreakpoints"],"sources":["../../../src/ui-shell/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport * from \"./AppSwitcher/AppSwitcher.js\";\nexport * from \"./InnerAppContainer.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/SideNav.js\";\nexport * from \"./SideNav/types.js\";\nexport * from \"./SkipToContent.js\";\nexport * from \"./TopNav/TopNav.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./UiShellLogo.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"./WideUiShellContent.js\";\n\nexport
|
|
1
|
+
{"version":3,"file":"index.js","names":["UiShell","adminAppUiShellBreakpoints","useUiShellBreakpoints"],"sources":["../../../src/ui-shell/index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport * from \"./AppSwitcher/AppSwitcher.js\";\nexport * from \"./InnerAppContainer.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/SideNav.js\";\nexport * from \"./SideNav/types.js\";\nexport * from \"./SkipToContent.js\";\nexport * from \"./TopNav/TopNav.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./UiShellLogo.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"./WideUiShellContent.js\";\n\nexport {\n UiShell,\n type UiShellProps,\n type UiShellTranslationSettings,\n} from \"./UiShell.js\";\nexport {\n adminAppUiShellBreakpoints,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,8BAA8B;AAC5C,cAAc,wBAAwB;AACtC,cAAc,2BAA2B;AACzC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AAEvC,SACEA,OAAO,QAGF,cAAc;AACrB,SACEC,0BAA0B,EAC1BC,qBAAqB,QAChB,4BAA4B","ignoreList":[]}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
9
|
*
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
-
*/export default "1-
|
|
11
|
+
*/export default "1-65-0";
|
|
12
12
|
//# sourceMappingURL=odysseyWebComponentVersion.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-
|
|
1
|
+
{"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-65-0\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { createRoot } from "react-dom/client";
|
|
13
14
|
import { createReactRootElements } from "./createReactRootElements.js";
|
|
14
15
|
import { encapsulateShadowDomFromGlobalStyles } from "./encapsulateShadowDomFromGlobalStyles.js";
|
|
15
16
|
import version from "./odysseyWebComponentVersion.generated.js";
|
|
@@ -20,7 +21,7 @@ export class WebComponentClass extends SsrFriendlyHtmlElementClass {
|
|
|
20
21
|
#getReactComponent = null;
|
|
21
22
|
#reactRootElements;
|
|
22
23
|
elementName = this.localName;
|
|
23
|
-
|
|
24
|
+
#reactRoot = null;
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
26
27
|
this.#reactRootElements = createReactRootElements();
|
|
@@ -35,41 +36,30 @@ export class WebComponentClass extends SsrFriendlyHtmlElementClass {
|
|
|
35
36
|
shadowRoot.appendChild(appRootElement);
|
|
36
37
|
}
|
|
37
38
|
setGetReactComponent(getReactComponent) {
|
|
38
|
-
this
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} else {}
|
|
43
|
-
return reactRoot;
|
|
44
|
-
});
|
|
39
|
+
this.#getReactComponent = getReactComponent;
|
|
40
|
+
if (this.#reactRoot) {
|
|
41
|
+
this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));
|
|
42
|
+
}
|
|
45
43
|
}
|
|
46
44
|
connectedCallback() {
|
|
47
45
|
encapsulateShadowDomFromGlobalStyles({
|
|
48
46
|
nonce: this.getAttribute("nonce") || window.cspNonce,
|
|
49
47
|
stylesRootElement: this.#reactRootElements.stylesRootElement
|
|
50
48
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}).then(reactRoot => {
|
|
59
|
-
if (!this.#getReactComponent) {} else {
|
|
60
|
-
reactRoot.render(this.#getReactComponent(this.#reactRootElements));
|
|
61
|
-
}
|
|
62
|
-
return reactRoot;
|
|
63
|
-
});
|
|
49
|
+
if (this.#reactRoot) {
|
|
50
|
+
throw new Error(`connectedCallback fired when reactRoot is already mounted.`);
|
|
51
|
+
}
|
|
52
|
+
this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);
|
|
53
|
+
if (this.#getReactComponent) {
|
|
54
|
+
this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));
|
|
55
|
+
}
|
|
64
56
|
}
|
|
65
57
|
disconnectedCallback() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return null;
|
|
72
|
-
});
|
|
58
|
+
if (!this.#reactRoot) {
|
|
59
|
+
throw new Error(`disconnectedCallback fired when reactRoot is already unmounted.`);
|
|
60
|
+
}
|
|
61
|
+
this.#reactRoot.unmount();
|
|
62
|
+
this.#reactRoot = null;
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
export const getReactWebComponent = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderReactInWebComponent.js","names":["createReactRootElements","encapsulateShadowDomFromGlobalStyles","version","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","then","reactRoot","render","connectedCallback","nonce","getAttribute","window","cspNonce","Error","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance.\n * Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SACEA,uBAAuB,QAElB,8BAA8B;AACrC,SAASC,oCAAoC,QAAQ,2CAA2C;AAChG,OAAOC,OAAO,MAAM,2CAA2C;AAS/D,OAAO,MAAMC,6BAA6B,GAAG,kCAAkC;AAG/E,OAAO,MAAMC,yBAAyB,GACpC,+BAA+BF,OAAO,EAAE,CAACG,WAAW,CAAC,CAAC;AAExD,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAE5D,OAAO,MAAMC,iBAAiB,SAASH,2BAA2B,CA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OgC,OAAO;AAChB,CAAC;AA0DD,OAAO,MAAMI,yBAAyB,GAAGA,CAAC;EACxCR,gBAAgB;EAChB5B,iBAAiB;EACjBqC,oBAAoB;EACpBC,yBAAyB;EACzBC,uBAAuB;EACvBpB,KAAK,GAAGE,MAAM,CAACC;AACe,CAAC,KAAK;EACpC,MAAMkB,YAAY,GAAGb,oBAAoB,CAAC;IACxC3B,iBAAiB;IACjB4B,gBAAgB;IAChBT;EACF,CAAC,CAAC;EAEF,IAAIkB,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC3B,WAAW,CAAC+B,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAACzB,WAAW,CAAC2B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC1B,WAAW,CAAC2B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"renderReactInWebComponent.js","names":["createRoot","createReactRootElements","encapsulateShadowDomFromGlobalStyles","version","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRoot","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","render","connectedCallback","nonce","getAttribute","window","cspNonce","Error","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n #reactRoot: Root | null = null;\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.#getReactComponent = getReactComponent;\n if (this.#reactRoot) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n if (this.#reactRoot) {\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);\n\n if (this.#getReactComponent) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n disconnectedCallback() {\n if (!this.#reactRoot) {\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n this.#reactRoot.unmount();\n this.#reactRoot = null;\n // #getReactComponent is preserved — if reconnected it will render on connectedCallback\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance.\n * Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAmB,kBAAkB;AAExD,SACEC,uBAAuB,QAElB,8BAA8B;AACrC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