@okta/odyssey-react-mui 1.68.0 → 1.70.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/dist/cjs/Accordion.cjs +1 -1
- package/dist/cjs/AnimationContext.cjs +42 -0
- package/dist/cjs/AnimationContext.cjs.map +1 -0
- package/dist/cjs/Autocomplete.cjs +1 -1
- package/dist/cjs/Badge.cjs +1 -1
- package/dist/cjs/Banner.cjs +1 -1
- package/dist/cjs/Banner.cjs.map +1 -1
- package/dist/cjs/Box.cjs +1 -1
- package/dist/cjs/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/Callout.cjs.map +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/DateFieldLocalizationProvider.cjs.map +1 -1
- package/dist/cjs/DatePickers/DatePicker.cjs +3 -4
- package/dist/cjs/DatePickers/DatePicker.cjs.map +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
- package/dist/cjs/DatePickers/useOdysseyDateFields.cjs +10 -28
- package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
- package/dist/cjs/Dialog.cjs +1 -1
- package/dist/cjs/Drawer.cjs +19 -6
- 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 +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 +18 -13
- package/dist/cjs/OdysseyProvider.cjs.map +1 -1
- package/dist/cjs/OdysseyThemeProvider.cjs +1 -1
- package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
- package/dist/cjs/OdysseyThemeProviderPropsContext.cjs.map +1 -1
- package/dist/cjs/Pagination/Pagination.cjs +1 -1
- package/dist/cjs/PasswordField.cjs +1 -1
- package/dist/cjs/ScreenReaderText.cjs +1 -1
- package/dist/cjs/SearchField.cjs +1 -1
- package/dist/cjs/Select.cjs +1 -1
- package/dist/cjs/Stack.cjs +1 -1
- package/dist/cjs/Status.cjs +1 -1
- package/dist/cjs/Surface.cjs +1 -1
- package/dist/cjs/Switch.cjs +2 -2
- package/dist/cjs/Tabs.cjs +1 -1
- package/dist/cjs/Tag.cjs +1 -1
- package/dist/cjs/TagList.cjs +1 -1
- package/dist/cjs/TextField.cjs +1 -1
- package/dist/cjs/Toast.cjs +1 -1
- package/dist/cjs/ToastStack.cjs +1 -1
- package/dist/cjs/Tooltip.cjs +1 -1
- package/dist/cjs/Typography.cjs +40 -13
- package/dist/cjs/Typography.cjs.map +1 -1
- package/dist/cjs/__internal.cjs +22 -0
- package/dist/cjs/__internal.cjs.map +1 -1
- package/dist/cjs/charts/BarChart.cjs +223 -0
- package/dist/cjs/charts/BarChart.cjs.map +1 -0
- package/dist/cjs/charts/LineChart.cjs +242 -0
- package/dist/cjs/charts/LineChart.cjs.map +1 -0
- package/dist/cjs/charts/components/ChartContainer.cjs +32 -0
- package/dist/cjs/charts/components/ChartContainer.cjs.map +1 -0
- package/dist/cjs/charts/components/ChartError.cjs +73 -0
- package/dist/cjs/charts/components/ChartError.cjs.map +1 -0
- package/dist/cjs/charts/components/ChartFrame.cjs +114 -0
- package/dist/cjs/charts/components/ChartFrame.cjs.map +1 -0
- package/dist/cjs/charts/components/ChartPopoverContent.cjs +123 -0
- package/dist/cjs/charts/components/ChartPopoverContent.cjs.map +1 -0
- package/dist/cjs/charts/index.cjs +20 -0
- package/dist/cjs/charts/index.cjs.map +1 -0
- package/dist/cjs/charts/useChartAnimation.cjs +27 -0
- package/dist/cjs/charts/useChartAnimation.cjs.map +1 -0
- package/dist/cjs/charts/utils/chartTokens.cjs +162 -0
- package/dist/cjs/charts/utils/chartTokens.cjs.map +1 -0
- package/dist/cjs/charts/utils/chartTypes.cjs +6 -0
- package/dist/cjs/charts/utils/chartTypes.cjs.map +1 -0
- package/dist/cjs/charts/utils/formatChartValue.cjs +38 -0
- package/dist/cjs/charts/utils/formatChartValue.cjs.map +1 -0
- package/dist/cjs/charts/utils/getChartSeriesPointData.cjs +52 -0
- package/dist/cjs/charts/utils/getChartSeriesPointData.cjs.map +1 -0
- package/dist/cjs/charts/utils/hasDuplicateSeries.cjs +21 -0
- package/dist/cjs/charts/utils/hasDuplicateSeries.cjs.map +1 -0
- package/dist/cjs/charts/utils/resolveChartLocale.cjs +28 -0
- package/dist/cjs/charts/utils/resolveChartLocale.cjs.map +1 -0
- package/dist/cjs/charts/utils/useChartValueFormatter.cjs +35 -0
- package/dist/cjs/charts/utils/useChartValueFormatter.cjs.map +1 -0
- package/dist/cjs/charts/utils/useStableValue.cjs +28 -0
- package/dist/cjs/charts/utils/useStableValue.cjs.map +1 -0
- package/dist/cjs/createOdysseyStyledComponent.cjs +4 -3
- package/dist/cjs/createOdysseyStyledComponent.cjs.map +1 -1
- package/dist/cjs/icons.generated/Add.cjs +1 -1
- package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
- package/dist/cjs/icons.generated/Apps.cjs +1 -1
- package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
- package/dist/cjs/icons.generated/Bug.cjs +1 -1
- package/dist/cjs/icons.generated/Calendar.cjs +1 -1
- package/dist/cjs/icons.generated/Call.cjs +1 -1
- package/dist/cjs/icons.generated/Chat.cjs +1 -1
- package/dist/cjs/icons.generated/Check.cjs +1 -1
- package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
- package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
- package/dist/cjs/icons.generated/Clock.cjs +1 -1
- package/dist/cjs/icons.generated/Close.cjs +1 -1
- package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
- package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
- package/dist/cjs/icons.generated/Copy.cjs +1 -1
- package/dist/cjs/icons.generated/Customizations.cjs +1 -1
- package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
- package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Delete.cjs +1 -1
- package/dist/cjs/icons.generated/Deny.cjs +1 -1
- package/dist/cjs/icons.generated/Devices.cjs +1 -1
- package/dist/cjs/icons.generated/Directory.cjs +1 -1
- package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
- package/dist/cjs/icons.generated/Documentation.cjs +1 -1
- package/dist/cjs/icons.generated/Download.cjs +1 -1
- package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
- package/dist/cjs/icons.generated/Edit.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
- package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
- package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
- package/dist/cjs/icons.generated/Filter.cjs +1 -1
- package/dist/cjs/icons.generated/Folder.cjs +1 -1
- package/dist/cjs/icons.generated/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/IdentityGovernanceSelected.cjs.map +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/index.cjs +13 -18
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/labs/AppTile.cjs +1 -1
- package/dist/cjs/labs/DataFilters.cjs +2 -2
- package/dist/cjs/labs/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataTablePagination.cjs +1 -1
- package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
- package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
- package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
- package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
- package/dist/cjs/labs/DataView/DataView.cjs +1 -1
- package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
- package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
- package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
- package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
- package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +3 -4
- package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
- package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
- package/dist/cjs/labs/OdysseyPickers/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 +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +6 -2
- package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +4 -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 +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +4 -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 +4 -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 +5 -1
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
- package/dist/cjs/theme/components/Dialog.cjs +1 -1
- package/dist/cjs/theme/components/Dialog.cjs.map +1 -1
- package/dist/cjs/theme/components/Drawer.cjs +5 -1
- package/dist/cjs/theme/components/Drawer.cjs.map +1 -1
- package/dist/cjs/theme/useMediaQuery.cjs +9 -6
- package/dist/cjs/theme/useMediaQuery.cjs.map +1 -1
- package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +1 -1
- package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -1
- package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +2 -2
- package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +1 -1
- package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
- package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +1 -1
- package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +1 -1
- package/dist/cjs/ui-shell/UiShell.cjs +1 -1
- package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
- package/dist/cjs/ui-shell/WideUiShellContent.cjs +1 -1
- package/dist/cjs/useStableCallback.cjs +23 -0
- package/dist/cjs/useStableCallback.cjs.map +1 -0
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
- package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
- package/dist/esm/Accordion.js +1 -1
- package/dist/esm/AnimationContext.js +36 -0
- package/dist/esm/AnimationContext.js.map +1 -0
- package/dist/esm/Autocomplete.js +1 -1
- package/dist/esm/Badge.js +1 -1
- package/dist/esm/Banner.js +1 -1
- package/dist/esm/Banner.js.map +1 -1
- package/dist/esm/Box.js +1 -1
- package/dist/esm/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/Callout.js.map +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/DateFieldLocalizationProvider.js.map +1 -1
- package/dist/esm/DatePickers/DatePicker.js +3 -4
- package/dist/esm/DatePickers/DatePicker.js.map +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
- package/dist/esm/DatePickers/useOdysseyDateFields.js +10 -28
- package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drawer.js +15 -2
- 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 +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 +18 -13
- package/dist/esm/OdysseyProvider.js.map +1 -1
- package/dist/esm/OdysseyThemeProvider.js +1 -1
- package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
- package/dist/esm/OdysseyThemeProviderPropsContext.js.map +1 -1
- package/dist/esm/Pagination/Pagination.js +1 -1
- package/dist/esm/PasswordField.js +1 -1
- package/dist/esm/ScreenReaderText.js +1 -1
- package/dist/esm/SearchField.js +1 -1
- package/dist/esm/Select.js +1 -1
- package/dist/esm/Stack.js +1 -1
- package/dist/esm/Status.js +1 -1
- package/dist/esm/Surface.js +1 -1
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TagList.js +1 -1
- package/dist/esm/TextField.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/ToastStack.js +1 -1
- package/dist/esm/Tooltip.js +1 -1
- package/dist/esm/Typography.js +39 -12
- package/dist/esm/Typography.js.map +1 -1
- package/dist/esm/__internal.js +2 -0
- package/dist/esm/__internal.js.map +1 -1
- package/dist/esm/charts/BarChart.js +220 -0
- package/dist/esm/charts/BarChart.js.map +1 -0
- package/dist/esm/charts/LineChart.js +239 -0
- package/dist/esm/charts/LineChart.js.map +1 -0
- package/dist/esm/charts/components/ChartContainer.js +28 -0
- package/dist/esm/charts/components/ChartContainer.js.map +1 -0
- package/dist/esm/charts/components/ChartError.js +70 -0
- package/dist/esm/charts/components/ChartError.js.map +1 -0
- package/dist/esm/charts/components/ChartFrame.js +110 -0
- package/dist/esm/charts/components/ChartFrame.js.map +1 -0
- package/dist/esm/charts/components/ChartPopoverContent.js +118 -0
- package/dist/esm/charts/components/ChartPopoverContent.js.map +1 -0
- package/dist/esm/charts/index.js +15 -0
- package/dist/esm/charts/index.js.map +1 -0
- package/dist/esm/charts/useChartAnimation.js +22 -0
- package/dist/esm/charts/useChartAnimation.js.map +1 -0
- package/dist/esm/charts/utils/chartTokens.js +153 -0
- package/dist/esm/charts/utils/chartTokens.js.map +1 -0
- package/dist/esm/charts/utils/chartTypes.js +2 -0
- package/dist/esm/charts/utils/chartTypes.js.map +1 -0
- package/dist/esm/charts/utils/formatChartValue.js +33 -0
- package/dist/esm/charts/utils/formatChartValue.js.map +1 -0
- package/dist/esm/charts/utils/getChartSeriesPointData.js +45 -0
- package/dist/esm/charts/utils/getChartSeriesPointData.js.map +1 -0
- package/dist/esm/charts/utils/hasDuplicateSeries.js +14 -0
- package/dist/esm/charts/utils/hasDuplicateSeries.js.map +1 -0
- package/dist/esm/charts/utils/resolveChartLocale.js +21 -0
- package/dist/esm/charts/utils/resolveChartLocale.js.map +1 -0
- package/dist/esm/charts/utils/useChartValueFormatter.js +30 -0
- package/dist/esm/charts/utils/useChartValueFormatter.js.map +1 -0
- package/dist/esm/charts/utils/useStableValue.js +22 -0
- package/dist/esm/charts/utils/useStableValue.js.map +1 -0
- package/dist/esm/createOdysseyStyledComponent.js +5 -4
- package/dist/esm/createOdysseyStyledComponent.js.map +1 -1
- package/dist/esm/icons.generated/Add.js +1 -1
- package/dist/esm/icons.generated/AddCircle.js +1 -1
- package/dist/esm/icons.generated/Apps.js +1 -1
- package/dist/esm/icons.generated/AppsSelected.js +1 -1
- package/dist/esm/icons.generated/ArrowBottom.js +1 -1
- package/dist/esm/icons.generated/ArrowDown.js +1 -1
- package/dist/esm/icons.generated/ArrowLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
- package/dist/esm/icons.generated/ArrowRight.js +1 -1
- package/dist/esm/icons.generated/ArrowTop.js +1 -1
- package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
- package/dist/esm/icons.generated/ArrowUp.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
- package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
- package/dist/esm/icons.generated/Bug.js +1 -1
- package/dist/esm/icons.generated/Calendar.js +1 -1
- package/dist/esm/icons.generated/Call.js +1 -1
- package/dist/esm/icons.generated/Chat.js +1 -1
- package/dist/esm/icons.generated/Check.js +1 -1
- package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
- package/dist/esm/icons.generated/ChevronDown.js +1 -1
- package/dist/esm/icons.generated/ChevronLeft.js +1 -1
- package/dist/esm/icons.generated/ChevronRight.js +1 -1
- package/dist/esm/icons.generated/ChevronUp.js +1 -1
- package/dist/esm/icons.generated/Clock.js +1 -1
- package/dist/esm/icons.generated/Close.js +1 -1
- package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
- package/dist/esm/icons.generated/CollapseLeft.js +1 -1
- package/dist/esm/icons.generated/CollapseRight.js +1 -1
- package/dist/esm/icons.generated/Copy.js +1 -1
- package/dist/esm/icons.generated/Customizations.js +1 -1
- package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
- package/dist/esm/icons.generated/DangerDiamond.js +1 -1
- package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
- package/dist/esm/icons.generated/Delete.js +1 -1
- package/dist/esm/icons.generated/Deny.js +1 -1
- package/dist/esm/icons.generated/Devices.js +1 -1
- package/dist/esm/icons.generated/Directory.js +1 -1
- package/dist/esm/icons.generated/DirectorySelected.js +1 -1
- package/dist/esm/icons.generated/Documentation.js +1 -1
- package/dist/esm/icons.generated/Download.js +1 -1
- package/dist/esm/icons.generated/DragIndicator.js +1 -1
- package/dist/esm/icons.generated/Edit.js +1 -1
- package/dist/esm/icons.generated/ExpandLeft.js +1 -1
- package/dist/esm/icons.generated/ExpandRight.js +1 -1
- package/dist/esm/icons.generated/ExternalLink.js +1 -1
- package/dist/esm/icons.generated/Filter.js +1 -1
- package/dist/esm/icons.generated/Folder.js +1 -1
- package/dist/esm/icons.generated/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/IdentityGovernanceSelected.js.map +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/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/labs/AppTile.js +1 -1
- package/dist/esm/labs/DataFilters.js +2 -2
- package/dist/esm/labs/DataTable.js +1 -1
- package/dist/esm/labs/DataTablePagination.js +1 -1
- package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
- package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
- package/dist/esm/labs/DataView/DataCard.js +1 -1
- package/dist/esm/labs/DataView/DataTable.js +1 -1
- package/dist/esm/labs/DataView/DataView.js +1 -1
- package/dist/esm/labs/DataView/DetailPanel.js +1 -1
- package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
- package/dist/esm/labs/DataView/RowActions.js +1 -1
- package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
- package/dist/esm/labs/DataView/TableSettings.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
- package/dist/esm/labs/DatePickers/DateTimePicker.js +3 -4
- package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
- package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
- package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
- package/dist/esm/labs/OdysseyPickers/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 +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_da.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_de.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_es.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_id.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_it.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js +6 -2
- package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_nb.js +4 -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 +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_th.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
- package/dist/esm/properties/ts/odyssey-react-mui_vi.js +4 -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 +4 -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 +5 -1
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
- package/dist/esm/theme/components/Dialog.js +2 -2
- package/dist/esm/theme/components/Dialog.js.map +1 -1
- package/dist/esm/theme/components/Drawer.js +5 -1
- package/dist/esm/theme/components/Drawer.js.map +1 -1
- package/dist/esm/theme/useMediaQuery.js +7 -5
- package/dist/esm/theme/useMediaQuery.js.map +1 -1
- package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/esm/ui-shell/InnerAppContainer.js +1 -1
- package/dist/esm/ui-shell/NarrowUiShellContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +2 -2
- package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +1 -1
- package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -2
- package/dist/esm/ui-shell/SkipToContent.js +1 -1
- package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +1 -1
- package/dist/esm/ui-shell/TopNav/TopNavListItem.js +1 -1
- package/dist/esm/ui-shell/UiShell.js +1 -1
- package/dist/esm/ui-shell/UiShellLogo.js +1 -1
- package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
- package/dist/esm/useStableCallback.js +16 -0
- package/dist/esm/useStableCallback.js.map +1 -0
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
- package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
- package/dist/tsconfig.production.tsbuildinfo +1 -1
- package/dist/types/AnimationContext.d.ts +29 -0
- package/dist/types/AnimationContext.d.ts.map +1 -0
- package/dist/types/Banner.d.ts.map +1 -1
- package/dist/types/Callout.d.ts.map +1 -1
- package/dist/types/DatePickers/DateFieldLocalizationProvider.d.ts +1 -1
- package/dist/types/DatePickers/DateFieldLocalizationProvider.d.ts.map +1 -1
- package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
- package/dist/types/DatePickers/useOdysseyDateFields.d.ts +27 -15
- package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
- package/dist/types/Drawer.d.ts +4 -0
- package/dist/types/Drawer.d.ts.map +1 -1
- package/dist/types/OdysseyProvider.d.ts +7 -1
- package/dist/types/OdysseyProvider.d.ts.map +1 -1
- package/dist/types/OdysseyThemeProviderPropsContext.d.ts +1 -1
- package/dist/types/OdysseyThemeProviderPropsContext.d.ts.map +1 -1
- package/dist/types/Typography.d.ts +26 -12
- package/dist/types/Typography.d.ts.map +1 -1
- package/dist/types/__internal.d.ts +2 -0
- package/dist/types/__internal.d.ts.map +1 -1
- package/dist/types/charts/BarChart.d.ts +26 -0
- package/dist/types/charts/BarChart.d.ts.map +1 -0
- package/dist/types/charts/LineChart.d.ts +26 -0
- package/dist/types/charts/LineChart.d.ts.map +1 -0
- package/dist/types/charts/components/ChartContainer.d.ts +18 -0
- package/dist/types/charts/components/ChartContainer.d.ts.map +1 -0
- package/dist/types/charts/components/ChartError.d.ts +23 -0
- package/dist/types/charts/components/ChartError.d.ts.map +1 -0
- package/dist/types/charts/components/ChartFrame.d.ts +54 -0
- package/dist/types/charts/components/ChartFrame.d.ts.map +1 -0
- package/dist/types/charts/components/ChartPopoverContent.d.ts +97 -0
- package/dist/types/charts/components/ChartPopoverContent.d.ts.map +1 -0
- package/dist/types/charts/index.d.ts +16 -0
- package/dist/types/charts/index.d.ts.map +1 -0
- package/dist/types/charts/useChartAnimation.d.ts +16 -0
- package/dist/types/charts/useChartAnimation.d.ts.map +1 -0
- package/dist/types/charts/utils/chartTokens.d.ts +297 -0
- package/dist/types/charts/utils/chartTokens.d.ts.map +1 -0
- package/dist/types/charts/utils/chartTypes.d.ts +142 -0
- package/dist/types/charts/utils/chartTypes.d.ts.map +1 -0
- package/dist/types/charts/utils/formatChartValue.d.ts +93 -0
- package/dist/types/charts/utils/formatChartValue.d.ts.map +1 -0
- package/dist/types/charts/utils/getChartSeriesPointData.d.ts +49 -0
- package/dist/types/charts/utils/getChartSeriesPointData.d.ts.map +1 -0
- package/dist/types/charts/utils/hasDuplicateSeries.d.ts +24 -0
- package/dist/types/charts/utils/hasDuplicateSeries.d.ts.map +1 -0
- package/dist/types/charts/utils/resolveChartLocale.d.ts +28 -0
- package/dist/types/charts/utils/resolveChartLocale.d.ts.map +1 -0
- package/dist/types/charts/utils/useChartValueFormatter.d.ts +34 -0
- package/dist/types/charts/utils/useChartValueFormatter.d.ts.map +1 -0
- package/dist/types/charts/utils/useStableValue.d.ts +29 -0
- package/dist/types/charts/utils/useStableValue.d.ts.map +1 -0
- package/dist/types/createOdysseyStyledComponent.d.ts +10 -2
- package/dist/types/createOdysseyStyledComponent.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.d.ts +8 -0
- package/dist/types/i18n.generated/i18n.d.ts.map +1 -1
- package/dist/types/i18n.generated/i18n.resources.d.ts +130 -6
- package/dist/types/i18n.generated/i18n.resources.d.ts.map +1 -1
- package/dist/types/icons.generated/IdentityGovernanceSelected.d.ts +1 -1
- package/dist/types/icons.generated/IdentityGovernanceSelected.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/labs/DatePickers/DateTimePicker.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +5 -1
- 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 +4 -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 +4 -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 +5 -1
- 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 +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +4 -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 +4 -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 +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +4 -0
- 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 +4 -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 +6 -2
- package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +4 -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 +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +4 -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 +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
- package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +4 -0
- 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 +4 -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 +4 -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 +5 -1
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/theme/components/Drawer.d.ts.map +1 -1
- package/dist/types/theme/useMediaQuery.d.ts +29 -15
- package/dist/types/theme/useMediaQuery.d.ts.map +1 -1
- package/dist/types/useStableCallback.d.ts +45 -0
- package/dist/types/useStableCallback.d.ts.map +1 -0
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +60 -9
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { memo } from "react";
|
|
14
|
+
import { Button } from "../../Buttons/Button.js";
|
|
15
|
+
import { createOdysseyStyledComponent } from "../../createOdysseyStyledComponent.js";
|
|
16
|
+
import { useTranslation } from "../../i18n.generated/i18n.js";
|
|
17
|
+
import { WarningIcon } from "../../icons.generated/Warning.js";
|
|
18
|
+
import { Heading5, Paragraph } from "../../Typography.js";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
const OuterContainer = createOdysseyStyledComponent({
|
|
21
|
+
tag: "div"
|
|
22
|
+
})(({
|
|
23
|
+
odysseyDesignTokens
|
|
24
|
+
}) => ({
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: odysseyDesignTokens.Spacing5,
|
|
29
|
+
height: "100%",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
textAlign: "center"
|
|
32
|
+
}));
|
|
33
|
+
const TextGroup = createOdysseyStyledComponent({
|
|
34
|
+
tag: "div"
|
|
35
|
+
})(({
|
|
36
|
+
odysseyDesignTokens
|
|
37
|
+
}) => ({
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "column",
|
|
40
|
+
gap: odysseyDesignTokens.Spacing2,
|
|
41
|
+
maxWidth: odysseyDesignTokens.TypographyLineLengthMax,
|
|
42
|
+
"& > h4, & > p": {
|
|
43
|
+
marginBlock: 0
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
const ChartError = ({
|
|
47
|
+
onRetry
|
|
48
|
+
}) => {
|
|
49
|
+
const {
|
|
50
|
+
t
|
|
51
|
+
} = useTranslation();
|
|
52
|
+
return _jsxs(OuterContainer, {
|
|
53
|
+
children: [_jsx(WarningIcon, {}), _jsxs(TextGroup, {
|
|
54
|
+
role: "alert",
|
|
55
|
+
children: [_jsx(Heading5, {
|
|
56
|
+
children: t("chart.error.heading")
|
|
57
|
+
}), _jsx(Paragraph, {
|
|
58
|
+
children: t("chart.error.text")
|
|
59
|
+
})]
|
|
60
|
+
}), onRetry && _jsx(Button, {
|
|
61
|
+
label: t("chart.error.retry"),
|
|
62
|
+
onClick: onRetry,
|
|
63
|
+
variant: "secondary"
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
const MemoizedChartError = memo(ChartError);
|
|
68
|
+
MemoizedChartError.displayName = "ChartError::pkg=odyssey&odysseyV=1.70.0";
|
|
69
|
+
export { MemoizedChartError as ChartError };
|
|
70
|
+
//# sourceMappingURL=ChartError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartError.js","names":["memo","Button","createOdysseyStyledComponent","useTranslation","WarningIcon","Heading5","Paragraph","jsx","_jsx","jsxs","_jsxs","OuterContainer","tag","odysseyDesignTokens","alignItems","display","flexDirection","gap","Spacing5","height","justifyContent","textAlign","TextGroup","Spacing2","maxWidth","TypographyLineLengthMax","marginBlock","ChartError","onRetry","t","children","role","label","onClick","variant","MemoizedChartError","displayName"],"sources":["../../../../src/charts/components/ChartError.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\n\nimport { Button } from \"../../Buttons/Button.js\";\nimport { createOdysseyStyledComponent } from \"../../createOdysseyStyledComponent.js\";\nimport { useTranslation } from \"../../i18n.generated/i18n.js\";\nimport { WarningIcon } from \"../../icons.generated/Warning.js\";\nimport { Heading5, Paragraph } from \"../../Typography.js\";\n\n/** The props for a chart error state. */\nexport type ChartErrorProps = {\n /**\n * The chart calls this function when a user clicks the retry button in the\n * error state. The error state shows no retry button when the caller\n * omits this property.\n */\n onRetry?: () => void;\n};\n\n// The parent is a single-row grid that stretches this component to the\n// chart's full height. Centering here, rather than in the parent, keeps the\n// centering rule next to the content it centers.\nconst OuterContainer = createOdysseyStyledComponent({ tag: \"div\" })(\n ({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing5,\n height: \"100%\",\n justifyContent: \"center\",\n textAlign: \"center\",\n }),\n);\n\n// `Heading4` renders an `h4` and `Paragraph` renders a `p`, and each carries\n// its own block margins. Those margins would add to the gap below and throw\n// off the measured spacing, so this resets them. The selector names both\n// elements rather than every child, so a later child keeps its own margins.\nconst TextGroup = createOdysseyStyledComponent({ tag: \"div\" })(\n ({ odysseyDesignTokens }) => ({\n display: \"flex\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing2,\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n\n \"& > h4, & > p\": {\n marginBlock: 0,\n },\n }),\n);\n\n/**\n * Renders the error state for a chart. A chart shows this component in\n * place of its plot when the chart fails to load its data.\n */\nconst ChartError = ({ onRetry }: ChartErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <OuterContainer>\n <WarningIcon />\n <TextGroup role=\"alert\">\n <Heading5>{t(\"chart.error.heading\")}</Heading5>\n <Paragraph>{t(\"chart.error.text\")}</Paragraph>\n </TextGroup>\n {onRetry && (\n <Button\n label={t(\"chart.error.retry\")}\n onClick={onRetry}\n variant=\"secondary\"\n />\n )}\n </OuterContainer>\n );\n};\n\nconst MemoizedChartError = memo(ChartError);\nMemoizedChartError.displayName = \"ChartError\";\n\nexport { MemoizedChartError as ChartError };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAE5B,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,4BAA4B,QAAQ,uCAAuC;AACpF,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,WAAW,QAAQ,kCAAkC;AAC9D,SAASC,QAAQ,EAAEC,SAAS,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAe1D,MAAMC,cAAc,GAAGT,4BAA4B,CAAC;EAAEU,GAAG,EAAE;AAAM,CAAC,CAAC,CACjE,CAAC;EAAEC;AAAoB,CAAC,MAAM;EAC5BC,UAAU,EAAE,QAAQ;EACpBC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,GAAG,EAAEJ,mBAAmB,CAACK,QAAQ;EACjCC,MAAM,EAAE,MAAM;EACdC,cAAc,EAAE,QAAQ;EACxBC,SAAS,EAAE;AACb,CAAC,CACH,CAAC;AAMD,MAAMC,SAAS,GAAGpB,4BAA4B,CAAC;EAAEU,GAAG,EAAE;AAAM,CAAC,CAAC,CAC5D,CAAC;EAAEC;AAAoB,CAAC,MAAM;EAC5BE,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,GAAG,EAAEJ,mBAAmB,CAACU,QAAQ;EACjCC,QAAQ,EAAEX,mBAAmB,CAACY,uBAAuB;EAErD,eAAe,EAAE;IACfC,WAAW,EAAE;EACf;AACF,CAAC,CACH,CAAC;AAMD,MAAMC,UAAU,GAAGA,CAAC;EAAEC;AAAyB,CAAC,KAAK;EACnD,MAAM;IAAEC;EAAE,CAAC,GAAG1B,cAAc,CAAC,CAAC;EAE9B,OACEO,KAAA,CAACC,cAAc;IAAAmB,QAAA,GACbtB,IAAA,CAACJ,WAAW,IAAE,CAAC,EACfM,KAAA,CAACY,SAAS;MAACS,IAAI,EAAC,OAAO;MAAAD,QAAA,GACrBtB,IAAA,CAACH,QAAQ;QAAAyB,QAAA,EAAED,CAAC,CAAC,qBAAqB;MAAC,CAAW,CAAC,EAC/CrB,IAAA,CAACF,SAAS;QAAAwB,QAAA,EAAED,CAAC,CAAC,kBAAkB;MAAC,CAAY,CAAC;IAAA,CACrC,CAAC,EACXD,OAAO,IACNpB,IAAA,CAACP,MAAM;MACL+B,KAAK,EAAEH,CAAC,CAAC,mBAAmB,CAAE;MAC9BI,OAAO,EAAEL,OAAQ;MACjBM,OAAO,EAAC;IAAW,CACpB,CACF;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMC,kBAAkB,GAAGnC,IAAI,CAAC2B,UAAU,CAAC;AAC3CQ,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIR,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import _Skeleton from "@mui/material/Skeleton";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
4
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
5
|
+
*
|
|
6
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
9
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
*
|
|
11
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
import { skeletonClasses } from "@mui/material/Skeleton";
|
|
14
|
+
import { memo, useId } from "react";
|
|
15
|
+
import { createOdysseyStyledComponent } from "../../createOdysseyStyledComponent.js";
|
|
16
|
+
import { useTranslation } from "../../i18n.generated/i18n.js";
|
|
17
|
+
import { Heading4, Paragraph } from "../../Typography.js";
|
|
18
|
+
import { useChartTokens } from "../utils/chartTokens.js";
|
|
19
|
+
import { ChartError } from "./ChartError.js";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
const Frame = createOdysseyStyledComponent({
|
|
22
|
+
tag: "section",
|
|
23
|
+
shouldForwardProp: prop => prop !== "minHeight"
|
|
24
|
+
})(({
|
|
25
|
+
odysseyDesignTokens,
|
|
26
|
+
minHeight
|
|
27
|
+
}) => ({
|
|
28
|
+
display: "flex",
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
gap: odysseyDesignTokens.Spacing4,
|
|
31
|
+
height: "100%",
|
|
32
|
+
minHeight,
|
|
33
|
+
minWidth: 0
|
|
34
|
+
}));
|
|
35
|
+
const Header = createOdysseyStyledComponent({
|
|
36
|
+
tag: "header"
|
|
37
|
+
})(({
|
|
38
|
+
odysseyDesignTokens
|
|
39
|
+
}) => ({
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
flexShrink: 0,
|
|
43
|
+
gap: odysseyDesignTokens.Spacing2,
|
|
44
|
+
"& > h4, & > p": {
|
|
45
|
+
marginBlock: 0
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
const Body = createOdysseyStyledComponent({
|
|
49
|
+
tag: "div"
|
|
50
|
+
})({
|
|
51
|
+
display: "grid",
|
|
52
|
+
flex: 1,
|
|
53
|
+
gridTemplateRows: "1fr",
|
|
54
|
+
minHeight: 0,
|
|
55
|
+
minWidth: 0
|
|
56
|
+
});
|
|
57
|
+
const LoadingSkeleton = createOdysseyStyledComponent({
|
|
58
|
+
tag: "div"
|
|
59
|
+
})({
|
|
60
|
+
height: "100%",
|
|
61
|
+
width: "100%",
|
|
62
|
+
[`& .${skeletonClasses.root}`]: {
|
|
63
|
+
height: "100%",
|
|
64
|
+
width: "100%"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const ChartFrame = ({
|
|
68
|
+
children,
|
|
69
|
+
hasError,
|
|
70
|
+
isLoading,
|
|
71
|
+
onRetry,
|
|
72
|
+
subtitle,
|
|
73
|
+
title
|
|
74
|
+
}) => {
|
|
75
|
+
const {
|
|
76
|
+
minHeight
|
|
77
|
+
} = useChartTokens();
|
|
78
|
+
const {
|
|
79
|
+
t
|
|
80
|
+
} = useTranslation();
|
|
81
|
+
const headingId = useId();
|
|
82
|
+
const hasHeader = Boolean(title);
|
|
83
|
+
const subtitleText = hasHeader ? subtitle : undefined;
|
|
84
|
+
return _jsxs(Frame, {
|
|
85
|
+
"aria-labelledby": hasHeader ? headingId : undefined,
|
|
86
|
+
minHeight: minHeight,
|
|
87
|
+
children: [hasHeader && _jsxs(Header, {
|
|
88
|
+
children: [_jsx(Heading4, {
|
|
89
|
+
id: headingId,
|
|
90
|
+
children: title
|
|
91
|
+
}), subtitleText && _jsx(Paragraph, {
|
|
92
|
+
children: subtitleText
|
|
93
|
+
})]
|
|
94
|
+
}), _jsx(Body, {
|
|
95
|
+
children: isLoading ? _jsx(LoadingSkeleton, {
|
|
96
|
+
"aria-label": t("chart.loading.arialabel"),
|
|
97
|
+
role: "status",
|
|
98
|
+
children: _jsx(_Skeleton, {
|
|
99
|
+
variant: "rounded"
|
|
100
|
+
})
|
|
101
|
+
}) : hasError ? _jsx(ChartError, {
|
|
102
|
+
onRetry: onRetry
|
|
103
|
+
}) : children
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const MemoizedChartFrame = memo(ChartFrame);
|
|
108
|
+
MemoizedChartFrame.displayName = "ChartFrame::pkg=odyssey&odysseyV=1.70.0";
|
|
109
|
+
export { MemoizedChartFrame as ChartFrame };
|
|
110
|
+
//# sourceMappingURL=ChartFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartFrame.js","names":["skeletonClasses","memo","useId","createOdysseyStyledComponent","useTranslation","Heading4","Paragraph","useChartTokens","ChartError","jsx","_jsx","jsxs","_jsxs","Frame","tag","shouldForwardProp","prop","odysseyDesignTokens","minHeight","display","flexDirection","gap","Spacing4","height","minWidth","Header","flexShrink","Spacing2","marginBlock","Body","flex","gridTemplateRows","LoadingSkeleton","width","root","ChartFrame","children","hasError","isLoading","onRetry","subtitle","title","t","headingId","hasHeader","Boolean","subtitleText","undefined","id","role","_Skeleton","variant","MemoizedChartFrame","displayName"],"sources":["../../../../src/charts/components/ChartFrame.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Skeleton as MuiSkeleton } from \"@mui/material\";\nimport { skeletonClasses } from \"@mui/material/Skeleton\";\nimport { memo, type ReactElement, useId } from \"react\";\n\nimport { createOdysseyStyledComponent } from \"../../createOdysseyStyledComponent.js\";\nimport { useTranslation } from \"../../i18n.generated/i18n.js\";\nimport { Heading4, Paragraph } from \"../../Typography.js\";\nimport { useChartTokens } from \"../utils/chartTokens.js\";\nimport { ChartError } from \"./ChartError.js\";\n\n/** The props for a chart frame. */\nexport type ChartFrameProps = {\n /**\n * The chart. The frame shows this element when there is no error state and\n * no loading state.\n */\n children: ReactElement;\n /**\n * If `true`, the frame shows an error state in place of the chart body.\n * `isLoading` takes precedence over this property.\n */\n hasError?: boolean;\n /**\n * If `true`, the frame shows a loading skeleton in place of the chart\n * body. `isLoading` takes precedence over `hasError`.\n */\n isLoading?: boolean;\n /**\n * The frame calls this function when a user clicks the retry button in\n * the error state. The error state shows no retry button when the caller\n * omits this property.\n *\n * @see {@link CartesianChartProps.onRetry} for the retry flow that a\n * consumer follows. That property is the public one, so it owns the\n * description.\n */\n onRetry?: () => void;\n /**\n * The subtitle text, shown below the title. The frame ignores this text\n * when `title` has no value, because a subtitle explains a title and means\n * nothing alone.\n */\n subtitle?: string;\n /**\n * The title text, shown as a real heading above the chart body. The heading\n * survives every state: loaded, loading, and error.\n */\n title?: string;\n};\n\n// This frame supplies only a height floor. A consumer that sets a real height\n// on the parent element still controls the final height, because this value\n// is a minimum and not a fixed size.\nconst Frame = createOdysseyStyledComponent({\n tag: \"section\",\n shouldForwardProp: (prop) => prop !== \"minHeight\",\n})<{ minHeight: string }>(({ odysseyDesignTokens, minHeight }) => ({\n display: \"flex\",\n flexDirection: \"column\",\n gap: odysseyDesignTokens.Spacing4,\n height: \"100%\",\n minHeight,\n minWidth: 0,\n}));\n\n// The header must not shrink, so the body takes every pixel of height that\n// the header does not need.\n//\n// `gap` needs a flex or grid container to have any effect, and a `header` is\n// a block element by default. `Heading4` renders an `h4` and `Paragraph`\n// renders a `p`, and each carries its own block margins, which would add to\n// the gap, so the margin reset names both elements.\nconst Header = createOdysseyStyledComponent({ tag: \"header\" })(\n ({ odysseyDesignTokens }) => ({\n display: \"flex\",\n flexDirection: \"column\",\n flexShrink: 0,\n gap: odysseyDesignTokens.Spacing2,\n\n \"& > h4, & > p\": {\n marginBlock: 0,\n },\n }),\n);\n\n// A flex item defaults to a minimum height equal to its content, so this item\n// would otherwise refuse to shrink below the height of the chart it holds.\n// The zero minimum height lets the body take the flex space that `flex: 1`\n// assigns to it.\n//\n// The body is also a single-row grid. The charting library draws a bare div\n// with no class name and no height of its own. A block-level child of a flex\n// column collapses to the height of its own content, which is zero before\n// the chart draws, and the library then picks a fixed height of its own. A\n// grid child stretches to fill its row by default, so the bare div fills the\n// body without this file naming a class or reaching into a child with a\n// selector.\nconst Body = createOdysseyStyledComponent({ tag: \"div\" })({\n display: \"grid\",\n flex: 1,\n gridTemplateRows: \"1fr\",\n minHeight: 0,\n minWidth: 0,\n});\n\n// The real chart also fills the height of its parent rather than setting a\n// height of its own, so this fills the same `Body` grid cell the same way.\nconst LoadingSkeleton = createOdysseyStyledComponent({ tag: \"div\" })({\n height: \"100%\",\n width: \"100%\",\n [`& .${skeletonClasses.root}`]: {\n height: \"100%\",\n width: \"100%\",\n },\n});\n\n/**\n * A layout wrapper for a chart. The frame holds two parts: a header that\n * shows the title and the subtitle as real HTML, and a body below it. The\n * body shows exactly one of three states: a loading skeleton, an error\n * state, or the chart itself. The header stays on screen in all three\n * states.\n */\nconst ChartFrame = ({\n children,\n hasError,\n isLoading,\n onRetry,\n subtitle,\n title,\n}: ChartFrameProps) => {\n const { minHeight } = useChartTokens();\n const { t } = useTranslation();\n const headingId = useId();\n\n const hasHeader = Boolean(title);\n const subtitleText = hasHeader ? subtitle : undefined;\n\n return (\n <Frame\n aria-labelledby={hasHeader ? headingId : undefined}\n minHeight={minHeight}\n >\n {hasHeader && (\n <Header>\n <Heading4 id={headingId}>{title}</Heading4>\n {subtitleText && <Paragraph>{subtitleText}</Paragraph>}\n </Header>\n )}\n <Body>\n {/*\n * A retry sets isLoading while the failed data is still on record.\n * Loading must win here, or the user who just clicked retry would\n * still see the error they were trying to clear, instead of seeing\n * that their request is in flight.\n */}\n {isLoading ? (\n <LoadingSkeleton\n aria-label={t(\"chart.loading.arialabel\")}\n role=\"status\"\n >\n <MuiSkeleton variant=\"rounded\" />\n </LoadingSkeleton>\n ) : hasError ? (\n <ChartError onRetry={onRetry} />\n ) : (\n children\n )}\n </Body>\n </Frame>\n );\n};\n\nconst MemoizedChartFrame = memo(ChartFrame);\nMemoizedChartFrame.displayName = \"ChartFrame\";\n\nexport { MemoizedChartFrame as ChartFrame };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAqBC,KAAK,QAAQ,OAAO;AAEtD,SAASC,4BAA4B,QAAQ,uCAAuC;AACpF,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,QAAQ,EAAEC,SAAS,QAAQ,qBAAqB;AACzD,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,UAAU,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA6C7C,MAAMC,KAAK,GAAGV,4BAA4B,CAAC;EACzCW,GAAG,EAAE,SAAS;EACdC,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAAwB,CAAC;EAAEC,mBAAmB;EAAEC;AAAU,CAAC,MAAM;EACjEC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,GAAG,EAAEJ,mBAAmB,CAACK,QAAQ;EACjCC,MAAM,EAAE,MAAM;EACdL,SAAS;EACTM,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AASH,MAAMC,MAAM,GAAGtB,4BAA4B,CAAC;EAAEW,GAAG,EAAE;AAAS,CAAC,CAAC,CAC5D,CAAC;EAAEG;AAAoB,CAAC,MAAM;EAC5BE,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBM,UAAU,EAAE,CAAC;EACbL,GAAG,EAAEJ,mBAAmB,CAACU,QAAQ;EAEjC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ACJ,SAAS;QAAA8B,QAAA,EAAEU;MAAY,CAAY,CAAC;IAAA,CAChD,CACT,EACDpC,IAAA,CAACmB,IAAI;MAAAO,QAAA,EAOFE,SAAS,GACR5B,IAAA,CAACsB,eAAe;QACd,cAAYU,CAAC,CAAC,yBAAyB,CAAE;QACzCO,IAAI,EAAC,QAAQ;QAAAb,QAAA,EAEb1B,IAAA,CAAAwC,SAAA;UAAaC,OAAO,EAAC;QAAS,CAAE;MAAC,CAClB,CAAC,GAChBd,QAAQ,GACV3B,IAAA,CAACF,UAAU;QAAC+B,OAAO,EAAEA;MAAQ,CAAE,CAAC,GAEhCH;IACD,CACG,CAAC;EAAA,CACF,CAAC;AAEZ,CAAC;AAED,MAAMgB,kBAAkB,GAAGnD,IAAI,CAACkC,UAAU,CAAC;AAC3CiB,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIjB,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { Fragment } from "react";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
const MARKER_SYMBOL_STYLES = {
|
|
16
|
+
circle: {
|
|
17
|
+
borderRadius: "50%"
|
|
18
|
+
},
|
|
19
|
+
diamond: {
|
|
20
|
+
clipPath: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)"
|
|
21
|
+
},
|
|
22
|
+
square: {},
|
|
23
|
+
triangle: {
|
|
24
|
+
clipPath: "polygon(50% 0%, 100% 100%, 0% 100%)"
|
|
25
|
+
},
|
|
26
|
+
triangleDown: {
|
|
27
|
+
clipPath: "polygon(0% 0%, 100% 0%, 50% 100%)"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export const ChartPopoverContent = ({
|
|
31
|
+
categoryPlaceholder,
|
|
32
|
+
chartTokens,
|
|
33
|
+
isShared,
|
|
34
|
+
seriesIndicator = {
|
|
35
|
+
type: "swatch"
|
|
36
|
+
},
|
|
37
|
+
seriesLabelPlaceholder,
|
|
38
|
+
valuePlaceholder
|
|
39
|
+
}) => {
|
|
40
|
+
const indicator = seriesIndicator.type === "lineMarker" ? _jsxs("span", {
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
style: {
|
|
43
|
+
display: "inline-block",
|
|
44
|
+
height: chartTokens.popover.content.lineIndicatorSize,
|
|
45
|
+
position: "relative",
|
|
46
|
+
width: chartTokens.popover.content.lineIndicatorSize
|
|
47
|
+
},
|
|
48
|
+
children: [_jsx("span", {
|
|
49
|
+
style: {
|
|
50
|
+
backgroundColor: "{point.color}",
|
|
51
|
+
height: chartTokens.popover.content.lineIndicatorThickness,
|
|
52
|
+
insetBlockStart: "50%",
|
|
53
|
+
insetInlineStart: "0px",
|
|
54
|
+
position: "absolute",
|
|
55
|
+
transform: "translateY(-50%)",
|
|
56
|
+
width: "100%"
|
|
57
|
+
}
|
|
58
|
+
}), seriesIndicator.symbols.map((symbol, symbolIndex) => _jsxs(Fragment, {
|
|
59
|
+
children: [`{#if (eq series.symbolIndex ${symbolIndex})}`, _jsx("span", {
|
|
60
|
+
style: {
|
|
61
|
+
backgroundColor: "{point.color}",
|
|
62
|
+
display: "block",
|
|
63
|
+
height: chartTokens.popover.content.lineMarkerSize,
|
|
64
|
+
insetBlockStart: "50%",
|
|
65
|
+
insetInlineStart: "50%",
|
|
66
|
+
position: "absolute",
|
|
67
|
+
transform: "translate(-50%, -50%)",
|
|
68
|
+
width: chartTokens.popover.content.lineMarkerSize,
|
|
69
|
+
...MARKER_SYMBOL_STYLES[symbol]
|
|
70
|
+
}
|
|
71
|
+
}), "{/if}"]
|
|
72
|
+
}, symbol))]
|
|
73
|
+
}) : _jsx("span", {
|
|
74
|
+
"aria-hidden": "true",
|
|
75
|
+
style: {
|
|
76
|
+
backgroundColor: "{point.color}",
|
|
77
|
+
borderRadius: chartTokens.popover.content.swatchRadius,
|
|
78
|
+
display: "inline-block",
|
|
79
|
+
height: chartTokens.popover.content.swatchSize,
|
|
80
|
+
width: chartTokens.popover.content.swatchSize
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const row = _jsxs("div", {
|
|
84
|
+
style: {
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
color: chartTokens.popover.content.textColor,
|
|
87
|
+
display: "flex",
|
|
88
|
+
fontSize: chartTokens.popover.content.fontSize,
|
|
89
|
+
gap: chartTokens.popover.content.rowGap,
|
|
90
|
+
marginBlockStart: chartTokens.popover.content.rowSpacing
|
|
91
|
+
},
|
|
92
|
+
children: [indicator, _jsxs("span", {
|
|
93
|
+
children: [seriesLabelPlaceholder, _jsx("span", {
|
|
94
|
+
className: "notranslate",
|
|
95
|
+
children: ": "
|
|
96
|
+
}), _jsx("span", {
|
|
97
|
+
style: {
|
|
98
|
+
fontWeight: chartTokens.popover.content.boldFontWeight
|
|
99
|
+
},
|
|
100
|
+
children: valuePlaceholder
|
|
101
|
+
})]
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
104
|
+
return _jsxs("div", {
|
|
105
|
+
children: [_jsx("div", {
|
|
106
|
+
style: {
|
|
107
|
+
color: chartTokens.popover.content.textColor,
|
|
108
|
+
fontSize: chartTokens.popover.content.fontSize,
|
|
109
|
+
fontWeight: chartTokens.popover.content.boldFontWeight
|
|
110
|
+
},
|
|
111
|
+
children: categoryPlaceholder
|
|
112
|
+
}), isShared ? _jsxs(_Fragment, {
|
|
113
|
+
children: ["{#each points}", row, "{/each}"]
|
|
114
|
+
}) : row]
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
ChartPopoverContent.displayName = "ChartPopoverContent::pkg=odyssey&odysseyV=1.70.0";
|
|
118
|
+
//# sourceMappingURL=ChartPopoverContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartPopoverContent.js","names":["Fragment","jsx","_jsx","jsxs","_jsxs","_Fragment","MARKER_SYMBOL_STYLES","circle","borderRadius","diamond","clipPath","square","triangle","triangleDown","ChartPopoverContent","categoryPlaceholder","chartTokens","isShared","seriesIndicator","type","seriesLabelPlaceholder","valuePlaceholder","indicator","style","display","height","popover","content","lineIndicatorSize","position","width","children","backgroundColor","lineIndicatorThickness","insetBlockStart","insetInlineStart","transform","symbols","map","symbol","symbolIndex","lineMarkerSize","swatchRadius","swatchSize","row","alignItems","color","textColor","fontSize","gap","rowGap","marginBlockStart","rowSpacing","className","fontWeight","boldFontWeight","displayName"],"sources":["../../../../src/charts/components/ChartPopoverContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type CSSProperties, Fragment } from \"react\";\n\nimport type { ChartTokens } from \"../utils/chartTokens.js\";\n\n/**\n * The marker shapes that a chart popover can draw. The names match the\n * Highcharts marker symbols of the same shape.\n */\nexport type ChartMarkerSymbol =\n | \"circle\"\n | \"diamond\"\n | \"square\"\n | \"triangle\"\n | \"triangleDown\";\n\n/**\n * The visual mark that sits before a series label in a chart popover. It\n * carries the color of the series.\n * - If `'swatch'`, the popover draws the color in a rounded square. A chart\n * whose series fill a shape, such as a bar chart, asks for this.\n * - If `'lineMarker'`, the popover draws the color as a line with the marker\n * of the series at its center. A line chart asks for this, and it passes the\n * marker symbols of its series in plotted order.\n */\nexport type ChartPopoverIndicator =\n | { type: \"swatch\" }\n | { symbols: readonly ChartMarkerSymbol[]; type: \"lineMarker\" };\n\n// The CSS that draws each marker shape inside a popover. The chart itself\n// draws its markers as SVG through Highcharts, which the popover cannot reuse,\n// because Highcharts serializes the popover to HTML. The square needs no rule,\n// because a plain box is already a square.\nconst MARKER_SYMBOL_STYLES = {\n circle: { borderRadius: \"50%\" },\n diamond: { clipPath: \"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)\" },\n square: {},\n triangle: { clipPath: \"polygon(50% 0%, 100% 100%, 0% 100%)\" },\n triangleDown: { clipPath: \"polygon(0% 0%, 100% 0%, 50% 100%)\" },\n} as const satisfies Record<ChartMarkerSymbol, CSSProperties>;\n\nexport type ChartPopoverContentProps = {\n /**\n * The Highcharts format-string placeholder for the popover header.\n * Highcharts substitutes the value when it renders the popover. For example\n * `\"{point.key}\"`.\n */\n categoryPlaceholder: string;\n /**\n * The chart tokens from `useChartTokens`. The caller passes them as a prop\n * because this component cannot read the token context. See the note on\n * {@link ChartPopoverContent}.\n */\n chartTokens: ChartTokens;\n /**\n * If `true`, the series row repeats once for each point in the category\n * under the pointer. The component puts that row inside the Highcharts\n * `{#each points}` block, which repeats it. If `false`, the component\n * renders the one row that a per-point popover needs.\n * @default false\n */\n isShared?: boolean;\n /**\n * The visual mark that sits before the series label. The chart that owns the\n * popover chooses the mark, and it passes the marker symbols that its own\n * series use. See {@link ChartPopoverIndicator}.\n * @default { type: \"swatch\" }\n */\n seriesIndicator?: ChartPopoverIndicator;\n /**\n * The Highcharts format-string placeholder for the series label line. For\n * example `\"{series.name}\"`.\n */\n seriesLabelPlaceholder: string;\n /**\n * The Highcharts format-string placeholder for the value that the popover\n * shows. For example `\"{point.custom.formattedValue}\"`, which holds the\n * value already formatted for the user's locale. The placeholder\n * `\"{point.y}\"` renders the raw number and ignores the locale format.\n */\n valuePlaceholder: string;\n};\n\n/**\n * Renders chart popover contents as JSX that `@highcharts/react` serializes\n * into a Highcharts format string. It is not mounted as a React component.\n *\n * Keep this component plain and serializable:\n * - Pass tokens as props. Do not add hooks, styled wrappers, or memoization.\n * - Keep `{#each points}` and `{/each}` as separate string expressions around\n * the row. Do not parenthesize `points` or put the row markup in a string;\n * Highcharts otherwise treats the loop as text or escapes the markup.\n * - Include units in inline style values. Highcharts drops numeric values\n * instead of adding units to them.\n *\n * The component owns the markup and indicator choice so callers do not have to\n * reproduce these serialization rules. Highcharts escapes values substituted\n * into placeholders, so this component does not escape them again.\n *\n * @see docs/decisions/2026-08-18-chart-tooltip-plain-serializable-component.md\n * @see docs/decisions/2026-08-21-shared-chart-tooltip-each-block.md\n */\nexport const ChartPopoverContent = ({\n categoryPlaceholder,\n chartTokens,\n isShared,\n seriesIndicator = { type: \"swatch\" },\n seriesLabelPlaceholder,\n valuePlaceholder,\n}: ChartPopoverContentProps) => {\n const indicator =\n seriesIndicator.type === \"lineMarker\" ? (\n <span\n aria-hidden=\"true\"\n style={{\n display: \"inline-block\",\n height: chartTokens.popover.content.lineIndicatorSize,\n position: \"relative\",\n width: chartTokens.popover.content.lineIndicatorSize,\n }}\n >\n <span\n style={{\n backgroundColor: \"{point.color}\",\n height: chartTokens.popover.content.lineIndicatorThickness,\n insetBlockStart: \"50%\",\n insetInlineStart: \"0px\",\n position: \"absolute\",\n transform: \"translateY(-50%)\",\n width: \"100%\",\n }}\n />\n\n {seriesIndicator.symbols.map((symbol, symbolIndex) => (\n <Fragment key={symbol}>\n {`{#if (eq series.symbolIndex ${symbolIndex})}`}\n <span\n style={{\n backgroundColor: \"{point.color}\",\n display: \"block\",\n height: chartTokens.popover.content.lineMarkerSize,\n insetBlockStart: \"50%\",\n insetInlineStart: \"50%\",\n position: \"absolute\",\n transform: \"translate(-50%, -50%)\",\n width: chartTokens.popover.content.lineMarkerSize,\n ...MARKER_SYMBOL_STYLES[symbol],\n }}\n />\n {\"{/if}\"}\n </Fragment>\n ))}\n </span>\n ) : (\n <span\n aria-hidden=\"true\"\n style={{\n backgroundColor: \"{point.color}\",\n borderRadius: chartTokens.popover.content.swatchRadius,\n display: \"inline-block\",\n height: chartTokens.popover.content.swatchSize,\n width: chartTokens.popover.content.swatchSize,\n }}\n />\n );\n\n const row = (\n <div\n style={{\n alignItems: \"center\",\n color: chartTokens.popover.content.textColor,\n display: \"flex\",\n fontSize: chartTokens.popover.content.fontSize,\n gap: chartTokens.popover.content.rowGap,\n marginBlockStart: chartTokens.popover.content.rowSpacing,\n }}\n >\n {indicator}\n <span>\n {seriesLabelPlaceholder}\n {/*\n * Highcharts removes the `translate=\"no\"` attribute when it\n * serializes this markup. It keeps the `notranslate` class name,\n * which browsers' translation tools also respect.\n */}\n <span className=\"notranslate\">{\": \"}</span>\n <span\n style={{ fontWeight: chartTokens.popover.content.boldFontWeight }}\n >\n {valuePlaceholder}\n </span>\n </span>\n </div>\n );\n\n return (\n <div>\n <div\n style={{\n color: chartTokens.popover.content.textColor,\n fontSize: chartTokens.popover.content.fontSize,\n fontWeight: chartTokens.popover.content.boldFontWeight,\n }}\n >\n {categoryPlaceholder}\n </div>\n {isShared ? (\n <>\n {\"{#each points}\"}\n {row}\n {\"{/each}\"}\n </>\n ) : (\n row\n )}\n </div>\n );\n};\n\nChartPopoverContent.displayName = \"ChartPopoverContent\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAA6BA,QAAQ,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAJ,QAAA,IAAAK,SAAA;AAgCrD,MAAMC,oBA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AAE+B,UAAU,EAAEtC,WAAW,CAACU,OAAO,CAACC,OAAO,CAAC4B;QAAe,CAAE;QAAAxB,QAAA,EAEjEV;MAAgB,CACb,CAAC;IAAA,CACH,CAAC;EAAA,CACJ,CACN;EAED,OACEjB,KAAA;IAAA2B,QAAA,GACE7B,IAAA;MACEqB,KAAK,EAAE;QACLuB,KAAK,EAAE9B,WAAW,CAACU,OAAO,CAACC,OAAO,CAACoB,SAAS;QAC5CC,QAAQ,EAAEhC,WAAW,CAACU,OAAO,CAACC,OAAO,CAACqB,QAAQ;QAC9CM,UAAU,EAAEtC,WAAW,CAACU,OAAO,CAACC,OAAO,CAAC4B;MAC1C,CAAE;MAAAxB,QAAA,EAEDhB;IAAmB,CACjB,CAAC,EACLE,QAAQ,GACPb,KAAA,CAAAC,SAAA;MAAA0B,QAAA,GACG,gBAAgB,EAChBa,GAAG,EACH,SAAS;IAAA,CACV,CAAC,GAEHA,GACD;EAAA,CACE,CAAC;AAEV,CAAC;AAED9B,mBAAmB,CAAC0C,WAAW,qDAAwB","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export { BarChart } from "./BarChart.js";
|
|
14
|
+
export { LineChart } from "./LineChart.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["BarChart","LineChart"],"sources":["../../../src/charts/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 { BarChart, type BarChartProps } from \"./BarChart.js\";\nexport { LineChart, type LineChartProps } from \"./LineChart.js\";\nexport type { ChartPoint, ChartSeries } from \"./utils/chartTypes.js\";\nexport { type ChartValueFormat } from \"./utils/formatChartValue.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAA4B,eAAe;AAC5D,SAASC,SAAS,QAA6B,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useMemo } from "react";
|
|
14
|
+
import { useAnimation } from "../AnimationContext.js";
|
|
15
|
+
import { chartTokens } from "./utils/chartTokens.js";
|
|
16
|
+
export const useChartAnimation = () => {
|
|
17
|
+
const hasAnimations = useAnimation();
|
|
18
|
+
return useMemo(() => hasAnimations ? {
|
|
19
|
+
duration: chartTokens.ChartAnimationDuration
|
|
20
|
+
} : false, [hasAnimations]);
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=useChartAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChartAnimation.js","names":["useMemo","useAnimation","chartTokens","useChartAnimation","hasAnimations","duration","ChartAnimationDuration"],"sources":["../../../src/charts/useChartAnimation.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nimport { useAnimation } from \"../AnimationContext.js\";\nimport { chartTokens } from \"./utils/chartTokens.js\";\n\n/** Returns the stable Highcharts animation setting. */\nexport const useChartAnimation = () => {\n const hasAnimations = useAnimation();\n\n return useMemo(\n () =>\n hasAnimations\n ? { duration: chartTokens.ChartAnimationDuration }\n : (false as const),\n [hasAnimations],\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,WAAW,QAAQ,wBAAwB;AAGpD,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAMC,aAAa,GAAGH,YAAY,CAAC,CAAC;EAEpC,OAAOD,OAAO,CACZ,MACEI,aAAa,GACT;IAAEC,QAAQ,EAAEH,WAAW,CAACI;EAAuB,CAAC,GAC/C,KAAe,EACtB,CAACF,aAAa,CAChB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
|
|
3
|
+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
|
|
4
|
+
*
|
|
5
|
+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
8
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9
|
+
*
|
|
10
|
+
* See the License for the specific language governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useMemo } from "react";
|
|
14
|
+
import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
|
|
15
|
+
const CSS_ROOT_FONT_SIZE_PIXELS = 16;
|
|
16
|
+
export const chartTokens = {
|
|
17
|
+
ChartAnimationDuration: 250,
|
|
18
|
+
ChartLegendRectangleVerticalOffset: 1,
|
|
19
|
+
ChartLegendSymbolSize: 14,
|
|
20
|
+
ChartLineHoverStrokeWidthPlus: 1,
|
|
21
|
+
ChartLineMarkerHoverHaloOpacity: 0.25,
|
|
22
|
+
ChartLineMarkerHoverHaloSize: 20,
|
|
23
|
+
ChartLineMarkerHoverSize: 12,
|
|
24
|
+
ChartLineMarkerSize: 8,
|
|
25
|
+
ChartLineStrokeWidth: 2,
|
|
26
|
+
ChartMinHeight: 400,
|
|
27
|
+
ChartYAxisLabelBaselineCompensation: 8
|
|
28
|
+
};
|
|
29
|
+
export const getTokenValueAsPixels = ({
|
|
30
|
+
tokenValue,
|
|
31
|
+
typographySizeBase
|
|
32
|
+
}) => tokenValue.trimEnd().endsWith("rem") ? parseFloat(tokenValue) * (parseFloat(typographySizeBase) / 100 * CSS_ROOT_FONT_SIZE_PIXELS) : parseFloat(tokenValue);
|
|
33
|
+
export const getChartTokens = ({
|
|
34
|
+
odysseyDesignTokens
|
|
35
|
+
}) => {
|
|
36
|
+
const toPixels = tokenValue => getTokenValueAsPixels({
|
|
37
|
+
tokenValue,
|
|
38
|
+
typographySizeBase: odysseyDesignTokens.TypographySizeBase
|
|
39
|
+
});
|
|
40
|
+
const lineHeight = `${toPixels(odysseyDesignTokens.TypographySizeBody) * odysseyDesignTokens.TypographyLineHeightBody}px`;
|
|
41
|
+
const axisValueStyle = {
|
|
42
|
+
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
43
|
+
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
44
|
+
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
45
|
+
fontWeight: odysseyDesignTokens.TypographyWeightBody,
|
|
46
|
+
lineHeight
|
|
47
|
+
};
|
|
48
|
+
return {
|
|
49
|
+
animationDuration: chartTokens.ChartAnimationDuration,
|
|
50
|
+
minHeight: `${chartTokens.ChartMinHeight}px`,
|
|
51
|
+
seriesColors: [odysseyDesignTokens.HueBlue600, odysseyDesignTokens.HueAccentThree400, odysseyDesignTokens.HueAccentTwo400, odysseyDesignTokens.HueAccentOne600, odysseyDesignTokens.HueYellow400, odysseyDesignTokens.HueGreen600],
|
|
52
|
+
axis: {
|
|
53
|
+
categoryHoverBandColor: odysseyDesignTokens.HueNeutral50,
|
|
54
|
+
crosshairColor: odysseyDesignTokens.BorderColorDisplay,
|
|
55
|
+
crosshairWidth: toPixels(odysseyDesignTokens.BorderWidthMain),
|
|
56
|
+
gridLineWidth: toPixels(odysseyDesignTokens.BorderWidthMain),
|
|
57
|
+
labelStyle: axisValueStyle,
|
|
58
|
+
lineColor: odysseyDesignTokens.BorderColorDisplay,
|
|
59
|
+
rotatedLabelSpacing: toPixels(odysseyDesignTokens.Spacing2) + chartTokens.ChartYAxisLabelBaselineCompensation,
|
|
60
|
+
uprightLabelSpacing: toPixels(odysseyDesignTokens.Spacing2),
|
|
61
|
+
valueStyle: axisValueStyle
|
|
62
|
+
},
|
|
63
|
+
bar: {
|
|
64
|
+
radius: odysseyDesignTokens.BorderRadiusTight
|
|
65
|
+
},
|
|
66
|
+
chart: {
|
|
67
|
+
backgroundColor: "transparent",
|
|
68
|
+
edgeSpacing: toPixels(odysseyDesignTokens.Spacing2),
|
|
69
|
+
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
70
|
+
topEdgeSpacing: toPixels(odysseyDesignTokens.Spacing3)
|
|
71
|
+
},
|
|
72
|
+
focusRing: {
|
|
73
|
+
color: odysseyDesignTokens.BorderColorPrimaryControl,
|
|
74
|
+
offset: toPixels(odysseyDesignTokens.FocusOutlineOffsetMain),
|
|
75
|
+
radius: `${toPixels(odysseyDesignTokens.BorderRadiusTight)}px`,
|
|
76
|
+
width: toPixels(odysseyDesignTokens.FocusOutlineWidthMain)
|
|
77
|
+
},
|
|
78
|
+
legend: {
|
|
79
|
+
default: {
|
|
80
|
+
symbolHeight: chartTokens.ChartLegendSymbolSize,
|
|
81
|
+
symbolRadius: toPixels(odysseyDesignTokens.BorderRadiusTight),
|
|
82
|
+
symbolWidth: chartTokens.ChartLegendSymbolSize
|
|
83
|
+
},
|
|
84
|
+
line: {
|
|
85
|
+
symbolHeight: chartTokens.ChartLineMarkerSize,
|
|
86
|
+
symbolWidth: toPixels(odysseyDesignTokens.Spacing4)
|
|
87
|
+
},
|
|
88
|
+
shared: {
|
|
89
|
+
alignColumns: false,
|
|
90
|
+
borderWidth: 0,
|
|
91
|
+
itemDistance: toPixels(odysseyDesignTokens.Spacing4),
|
|
92
|
+
itemHiddenStyle: {
|
|
93
|
+
color: odysseyDesignTokens.TypographyColorDisabled
|
|
94
|
+
},
|
|
95
|
+
itemHoverStyle: {
|
|
96
|
+
color: odysseyDesignTokens.TypographyColorBody
|
|
97
|
+
},
|
|
98
|
+
itemStyle: {
|
|
99
|
+
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
100
|
+
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
101
|
+
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
102
|
+
fontWeight: odysseyDesignTokens.TypographyWeightBody,
|
|
103
|
+
lineHeight
|
|
104
|
+
},
|
|
105
|
+
margin: toPixels(odysseyDesignTokens.Spacing4),
|
|
106
|
+
padding: 0,
|
|
107
|
+
symbolPadding: toPixels(odysseyDesignTokens.Spacing2)
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
line: {
|
|
111
|
+
hoverStrokeWidthPlus: chartTokens.ChartLineHoverStrokeWidthPlus,
|
|
112
|
+
markerHoverHaloOpacity: chartTokens.ChartLineMarkerHoverHaloOpacity,
|
|
113
|
+
markerHoverHaloRadius: chartTokens.ChartLineMarkerHoverHaloSize / 2,
|
|
114
|
+
markerHoverRadius: chartTokens.ChartLineMarkerHoverSize / 2,
|
|
115
|
+
markerRadius: chartTokens.ChartLineMarkerSize / 2,
|
|
116
|
+
strokeWidth: chartTokens.ChartLineStrokeWidth
|
|
117
|
+
},
|
|
118
|
+
popover: {
|
|
119
|
+
backgroundColor: odysseyDesignTokens.HueNeutralWhite,
|
|
120
|
+
borderColor: odysseyDesignTokens.BorderColorDisplay,
|
|
121
|
+
borderRadius: toPixels(odysseyDesignTokens.BorderRadiusMain),
|
|
122
|
+
borderWidth: toPixels(odysseyDesignTokens.BorderWidthMain),
|
|
123
|
+
padding: toPixels(odysseyDesignTokens.Spacing4),
|
|
124
|
+
containerStyle: {
|
|
125
|
+
boxShadow: odysseyDesignTokens.DepthMedium,
|
|
126
|
+
color: odysseyDesignTokens.TypographyColorBody,
|
|
127
|
+
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
128
|
+
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
129
|
+
fontWeight: odysseyDesignTokens.TypographyWeightBody,
|
|
130
|
+
lineHeight
|
|
131
|
+
},
|
|
132
|
+
content: {
|
|
133
|
+
boldFontWeight: odysseyDesignTokens.TypographyWeightBodyBold,
|
|
134
|
+
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
135
|
+
lineIndicatorSize: odysseyDesignTokens.Spacing4,
|
|
136
|
+
lineIndicatorThickness: `${chartTokens.ChartLineStrokeWidth}px`,
|
|
137
|
+
lineMarkerSize: `${chartTokens.ChartLineMarkerSize}px`,
|
|
138
|
+
rowGap: odysseyDesignTokens.Spacing1,
|
|
139
|
+
rowSpacing: odysseyDesignTokens.Spacing1,
|
|
140
|
+
swatchRadius: odysseyDesignTokens.BorderRadiusTight,
|
|
141
|
+
swatchSize: `${chartTokens.ChartLegendSymbolSize}px`,
|
|
142
|
+
textColor: odysseyDesignTokens.TypographyColorBody
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
export const useChartTokens = () => {
|
|
148
|
+
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
149
|
+
return useMemo(() => getChartTokens({
|
|
150
|
+
odysseyDesignTokens
|
|
151
|
+
}), [odysseyDesignTokens]);
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=chartTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartTokens.js","names":["useMemo","useOdysseyDesignTokens","CSS_ROOT_FONT_SIZE_PIXELS","chartTokens","ChartAnimationDuration","ChartLegendRectangleVerticalOffset","ChartLegendSymbolSize","ChartLineHoverStrokeWidthPlus","ChartLineMarkerHoverHaloOpacity","ChartLineMarkerHoverHaloSize","ChartLineMarkerHoverSize","ChartLineMarkerSize","ChartLineStrokeWidth","ChartMinHeight","ChartYAxisLabelBaselineCompensation","getTokenValueAsPixels","tokenValue","typographySizeBase","trimEnd","endsWith","parseFloat","getChartTokens","odysseyDesignTokens","toPixels","TypographySizeBase","lineHeight","TypographySizeBody","TypographyLineHeightBody","axisValueStyle","color","TypographyColorSubordinate","fontFamily","TypographyFamilyBody","fontSize","fontWeight","TypographyWeightBody","animationDuration","minHeight","seriesColors","HueBlue600","HueAccentThree400","HueAccentTwo400","HueAccentOne600","HueYellow400","HueGreen600","axis","categoryHoverBandColor","HueNeutral50","crosshairColor","BorderColorDisplay","crosshairWidth","BorderWidthMain","gridLineWidth","labelStyle","lineColor","rotatedLabelSpacing","Spacing2","uprightLabelSpacing","valueStyle","bar","radius","BorderRadiusTight","chart","backgroundColor","edgeSpacing","topEdgeSpacing","Spacing3","focusRing","BorderColorPrimaryControl","offset","FocusOutlineOffsetMain","width","FocusOutlineWidthMain","legend","default","symbolHeight","symbolRadius","symbolWidth","line","Spacing4","shared","alignColumns","borderWidth","itemDistance","itemHiddenStyle","TypographyColorDisabled","itemHoverStyle","TypographyColorBody","itemStyle","margin","padding","symbolPadding","hoverStrokeWidthPlus","markerHoverHaloOpacity","markerHoverHaloRadius","markerHoverRadius","markerRadius","strokeWidth","popover","HueNeutralWhite","borderColor","borderRadius","BorderRadiusMain","containerStyle","boxShadow","DepthMedium","content","boldFontWeight","TypographyWeightBodyBold","lineIndicatorSize","lineIndicatorThickness","lineMarkerSize","rowGap","Spacing1","rowSpacing","swatchRadius","swatchSize","textColor","useChartTokens"],"sources":["../../../../src/charts/utils/chartTokens.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nimport type { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\n\nimport { useOdysseyDesignTokens } from \"../../OdysseyDesignTokensContext.js\";\n\nconst CSS_ROOT_FONT_SIZE_PIXELS = 16;\n\n/**\n * The chart values that no Odyssey design token supplies. Each entry is either\n * a Highcharts implementation detail that no token will ever cover, or a chart\n * specification value that the design team has not yet turned into a token.\n */\nexport const chartTokens = {\n // TransitionDurationMainAsNumber is 100, and the spec asks for 250.\n ChartAnimationDuration: 250,\n // Highcharts positions its rectangular legend symbols from the text\n // baseline, so a 14px square needs this downward optical correction.\n ChartLegendRectangleVerticalOffset: 1,\n ChartLegendSymbolSize: 14,\n // The amount Highcharts adds to ChartLineStrokeWidth on hover, for the\n // spec's 3px hover stroke. Set explicitly, so an undocumented Highcharts\n // default cannot move the hover stroke out of spec.\n ChartLineHoverStrokeWidthPlus: 1,\n ChartLineMarkerHoverHaloOpacity: 0.25,\n ChartLineMarkerHoverHaloSize: 20,\n ChartLineMarkerHoverSize: 12,\n ChartLineMarkerSize: 8,\n // The spec asks for 2px, and BorderWidthHeavy is 1.5px.\n ChartLineStrokeWidth: 2,\n // The floor for a consumer that sets no height on the chart container. The\n // spacing scale stops at Spacing9, which is 56px.\n ChartMinHeight: 400,\n // Highcharts gives a rotated axis label less visible space than an upright\n // one at the same `title.margin`. The comment on `axis.rotatedLabelSpacing`\n // below gives the cause.\n ChartYAxisLabelBaselineCompensation: 8,\n} as const;\n\n/**\n * Converts an Odyssey design token length to a pixel number, because the\n * charting library takes numbers and not CSS length strings. The function\n * multiplies a `rem` token by the base font size. The function uses a `px`\n * token without a change, because a `px` value is already absolute. Therefore\n * the function does not scale a value such as `BorderRadiusTight` as a `rem`\n * value.\n */\nexport const getTokenValueAsPixels = ({\n tokenValue,\n typographySizeBase,\n}: {\n tokenValue: string;\n typographySizeBase: string;\n}) =>\n tokenValue.trimEnd().endsWith(\"rem\")\n ? parseFloat(tokenValue) *\n ((parseFloat(typographySizeBase) / 100) * CSS_ROOT_FONT_SIZE_PIXELS)\n : parseFloat(tokenValue);\n\n/**\n * Builds the chart values from the Odyssey design tokens. Every value sits in\n * the group named after the part of the chart that it styles, so a chart reads\n * one group per Highcharts child.\n *\n * {@link useChartTokens} wraps this function for a component. This function\n * takes the tokens as an argument, so a test calls it without a React render.\n */\nexport const getChartTokens = ({\n odysseyDesignTokens,\n}: {\n odysseyDesignTokens: DesignTokens;\n}) => {\n const toPixels = (tokenValue: string) =>\n getTokenValueAsPixels({\n tokenValue,\n typographySizeBase: odysseyDesignTokens.TypographySizeBase,\n });\n\n // Highcharts reads a line height with `parseInt`, so it turns a unitless\n // ratio such as `1.5` into 1 pixel and draws the wrapped lines of a label\n // on top of each other.\n const lineHeight = `${\n toPixels(odysseyDesignTokens.TypographySizeBody) *\n odysseyDesignTokens.TypographyLineHeightBody\n }px`;\n\n // The axis values, the axis labels and the legend items share this\n // one style. The design specifies the same text treatment for all three,\n // so an axis label carries no more weight than an axis value.\n const axisValueStyle = {\n color: odysseyDesignTokens.TypographyColorSubordinate,\n fontFamily: odysseyDesignTokens.TypographyFamilyBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n fontWeight: odysseyDesignTokens.TypographyWeightBody,\n lineHeight,\n };\n\n return {\n animationDuration: chartTokens.ChartAnimationDuration,\n minHeight: `${chartTokens.ChartMinHeight}px`,\n\n /**\n * The palette that a chart gives to the charting library as its series\n * colors. The library assigns these colors to the series in order. A\n * caller cannot set the color of a series.\n */\n seriesColors: [\n odysseyDesignTokens.HueBlue600,\n odysseyDesignTokens.HueAccentThree400,\n odysseyDesignTokens.HueAccentTwo400,\n odysseyDesignTokens.HueAccentOne600,\n odysseyDesignTokens.HueYellow400,\n odysseyDesignTokens.HueGreen600,\n ],\n\n axis: {\n categoryHoverBandColor: odysseyDesignTokens.HueNeutral50,\n crosshairColor: odysseyDesignTokens.BorderColorDisplay,\n crosshairWidth: toPixels(odysseyDesignTokens.BorderWidthMain),\n gridLineWidth: toPixels(odysseyDesignTokens.BorderWidthMain),\n labelStyle: axisValueStyle,\n // The grid lines, the axis line and the ticks share this one color.\n lineColor: odysseyDesignTokens.BorderColorDisplay,\n // Highcharts renders the gap beside a rotated axis label about 3px\n // smaller than requested. Add that difference back so both axis labels\n // appear Spacing2 away from their values.\n rotatedLabelSpacing:\n toPixels(odysseyDesignTokens.Spacing2) +\n chartTokens.ChartYAxisLabelBaselineCompensation,\n uprightLabelSpacing: toPixels(odysseyDesignTokens.Spacing2),\n valueStyle: axisValueStyle,\n },\n\n bar: {\n radius: odysseyDesignTokens.BorderRadiusTight,\n },\n\n chart: {\n backgroundColor: \"transparent\",\n // Without some outer spacing, Highcharts clips the left edge of the\n // widest Y axis value.\n edgeSpacing: toPixels(odysseyDesignTokens.Spacing2),\n fontFamily: odysseyDesignTokens.TypographyFamilyBody,\n topEdgeSpacing: toPixels(odysseyDesignTokens.Spacing3),\n },\n\n focusRing: {\n color: odysseyDesignTokens.BorderColorPrimaryControl,\n offset: toPixels(odysseyDesignTokens.FocusOutlineOffsetMain),\n // Highcharts types the focus border style as a `CSSObject`, so this one\n // radius carries its unit while every other length here is a number.\n radius: `${toPixels(odysseyDesignTokens.BorderRadiusTight)}px`,\n width: toPixels(odysseyDesignTokens.FocusOutlineWidthMain),\n },\n\n legend: {\n default: {\n symbolHeight: chartTokens.ChartLegendSymbolSize,\n symbolRadius: toPixels(odysseyDesignTokens.BorderRadiusTight),\n symbolWidth: chartTokens.ChartLegendSymbolSize,\n },\n line: {\n // Highcharts also uses this as the limit for the marker in the\n // legend: it draws that marker at a radius of half this height, or\n // at `line.markerRadius`, whichever is less. Both come from\n // ChartLineMarkerSize, so the legend cannot cut the marker down.\n symbolHeight: chartTokens.ChartLineMarkerSize,\n // The line symbol spans Spacing4, the same width as the line in the\n // popover series indicator.\n symbolWidth: toPixels(odysseyDesignTokens.Spacing4),\n },\n shared: {\n alignColumns: false,\n borderWidth: 0,\n itemDistance: toPixels(odysseyDesignTokens.Spacing4),\n // Highcharts merges this over `itemStyle` for a legend item whose\n // series is hidden (toggled off). The spec's \"Selected\" state is\n // this same toggled-off item, styled with Color/Disabled.\n itemHiddenStyle: {\n color: odysseyDesignTokens.TypographyColorDisabled,\n },\n itemHoverStyle: {\n color: odysseyDesignTokens.TypographyColorBody,\n },\n // The legend spec gives its label text a different default color\n // (Color/Body) than the axis values and labels (subordinate gray),\n // so the legend does not share `axisValueStyle`.\n itemStyle: {\n color: odysseyDesignTokens.TypographyColorSubordinate,\n fontFamily: odysseyDesignTokens.TypographyFamilyBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n fontWeight: odysseyDesignTokens.TypographyWeightBody,\n lineHeight,\n },\n margin: toPixels(odysseyDesignTokens.Spacing4),\n padding: 0,\n symbolPadding: toPixels(odysseyDesignTokens.Spacing2),\n },\n },\n\n line: {\n hoverStrokeWidthPlus: chartTokens.ChartLineHoverStrokeWidthPlus,\n markerHoverHaloOpacity: chartTokens.ChartLineMarkerHoverHaloOpacity,\n markerHoverHaloRadius: chartTokens.ChartLineMarkerHoverHaloSize / 2,\n markerHoverRadius: chartTokens.ChartLineMarkerHoverSize / 2,\n markerRadius: chartTokens.ChartLineMarkerSize / 2,\n strokeWidth: chartTokens.ChartLineStrokeWidth,\n },\n\n popover: {\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n borderColor: odysseyDesignTokens.BorderColorDisplay,\n borderRadius: toPixels(odysseyDesignTokens.BorderRadiusMain),\n borderWidth: toPixels(odysseyDesignTokens.BorderWidthMain),\n padding: toPixels(odysseyDesignTokens.Spacing4),\n\n containerStyle: {\n // Odyssey has no token named \"Depth/Menu\". DepthMedium is the\n // closest match to the hover spec's \"3-layer soft drop shadow\": it\n // has three shadow layers, and its opacities are lighter than\n // DepthHigh's. The popover's own `shadow` prop stays `false` because\n // Highcharts' built-in shadow is a single-layer SVG filter and\n // cannot reproduce a 3-layer shadow; this CSS box-shadow applies\n // instead through the popover's HTML container (Highcharts' `Tooltip`\n // defaults to `useHTML`).\n boxShadow: odysseyDesignTokens.DepthMedium,\n color: odysseyDesignTokens.TypographyColorBody,\n fontFamily: odysseyDesignTokens.TypographyFamilyBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n fontWeight: odysseyDesignTokens.TypographyWeightBody,\n lineHeight,\n },\n\n content: {\n boldFontWeight: odysseyDesignTokens.TypographyWeightBodyBold,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n lineIndicatorSize: odysseyDesignTokens.Spacing4,\n lineIndicatorThickness: `${chartTokens.ChartLineStrokeWidth}px`,\n lineMarkerSize: `${chartTokens.ChartLineMarkerSize}px`,\n rowGap: odysseyDesignTokens.Spacing1,\n rowSpacing: odysseyDesignTokens.Spacing1,\n swatchRadius: odysseyDesignTokens.BorderRadiusTight,\n swatchSize: `${chartTokens.ChartLegendSymbolSize}px`,\n textColor: odysseyDesignTokens.TypographyColorBody,\n },\n },\n };\n};\n\n/**\n * Returns the chart values that come from the Odyssey design tokens in context.\n *\n * A chart component calls this one hook, and does not resolve the tokens\n * itself. Therefore the same token choices apply to every chart in the family.\n *\n * The whole object comes from one `useMemo`. A chart passes these values to the\n * React children of the chart library, and that library rebuilds and redraws the\n * whole chart when the identity of a child changes. A new style object on each\n * render therefore costs a redraw. One memo over the whole object keeps every\n * value stable while the tokens stay the same.\n */\nexport const useChartTokens = () => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return useMemo(\n () => getChartTokens({ odysseyDesignTokens }),\n [odysseyDesignTokens],\n );\n};\n\n/** The chart tokens that {@link getChartTokens} returns. */\nexport type ChartTokens = ReturnType<typeof getChartTokens>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,OAAO;AAI/B,SAASC,sBAAsB,QAAQ,qCAAqC;AAE5E,MAAMC,yBAAyB,GAAG,EAAE;AAOpC,OAAO,MAAMC,WAAW,GAAG;EAEzBC,sBAAsB,EAAE,GAAG;EAG3BC,kCAAkC,EAAE,CAAC;EACrCC,qBAAqB,EAAE,EAAE;EAIzBC,6BAA6B,EAAE,CAAC;EAChCC,+BAA+B,EAAE,IAAI;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c,CAAC;IAAEC;EAAoB,CAAC,CAAC,EAC7C,CAACA,mBAAmB,CACtB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chartTypes.js","names":[],"sources":["../../../../src/charts/utils/chartTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ChartValueFormat } from \"./formatChartValue.js\";\n\n/**\n * One line on the chart. A series has a name and one value for each category.\n *\n * The chart holds the list of categories. A series holds only the values. Put\n * the values in the same order as the categories.\n *\n * A category is always text, such as `\"Week 1\"` or `\"2026-08\"`. If your data\n * has dates or times, put that data into groups of equal length first. A chart\n * that needs a true time axis uses a different series type. See\n * `docs/decisions/2026-08-21-chart-data-model-and-axis-api.md`.\n */\nexport type ChartSeries = {\n /**\n * The values of this series, one for each category, in the same order as\n * the chart's `categories`.\n *\n * An entry of `null` means the series has no measurement for that\n * category. The chart then draws a gap at that category. It does not draw\n * a point with a value of zero.\n */\n data: Array<number | null>;\n /**\n * The name of the series. The chart shows this name in the legend and in the\n * popover. Each series in one chart must have a different name.\n */\n name: string;\n};\n\n/**\n * A data point that the chart sends to an interaction callback, such as\n * `onPointClick`. The callback receives one point at a time, so the point\n * carries the name of its own series.\n */\nexport type ChartPoint = {\n /** The category that this point belongs to. */\n category: string;\n /** The name of the series that this point belongs to. */\n seriesName: ChartSeries[\"name\"];\n /**\n * The measured value of this point. The type comes from one series value,\n * with `null` removed. The chart draws no point at a gap, so a user cannot\n * click one.\n */\n value: NonNullable<ChartSeries[\"data\"][number]>;\n};\n\n/**\n * The parts of a point that hold no position. Every chart type gives these\n * parts to a point, whatever axes that chart has.\n *\n * `custom.formattedValue` holds the text that the popover shows. The chart\n * formats a value once, when it builds the point, so the popover does not\n * format that value again on each hover.\n *\n * `events` is absent when the caller supplies no click handler. Highcharts\n * attaches a listener when it finds an `events` property, so a point with no\n * click behavior must omit the property.\n */\nexport type ChartPointDecoration = {\n custom: { formattedValue: string };\n events?: { click: () => void };\n};\n\n/**\n * The properties for a chart that plots series against a category axis and a\n * value axis.\n * The layout around a chart often supplies its own heading in surrounding HTML,\n * so a chart may need neither `title` nor `subtitle`.\n */\nexport type CartesianChartProps = {\n /**\n * A text description of the chart for assistive technology. The chart\n * library puts this description in a hidden region of its own.\n */\n ariaDescription: string;\n /**\n * The categories on the horizontal axis, in the order that the chart shows\n * them. Each series in `series` supplies one value for each category, at\n * the same index.\n */\n categories: string[];\n /**\n * If `true`, the chart shows an error state in place of its series.\n * `isLoading` takes precedence over this property.\n */\n hasError?: boolean;\n /**\n * If `true`, the chart shows a loading state in place of its series.\n * `isLoading` takes precedence over `hasError`.\n */\n isLoading?: boolean;\n /** The chart calls this function when a user clicks a point. */\n onPointClick?: (point: ChartPoint) => void;\n /**\n * The chart calls this function when a user clicks the retry button in the\n * error state. The error state shows no retry button when the caller\n * omits this property.\n *\n * Set `isLoading` to `true` in this function, then set `hasError` to\n * `false` once the data arrives. `isLoading` takes precedence over\n * `hasError`, so the loading state replaces the error state for the length\n * of the request. Leaving `isLoading` alone holds the error state, and its\n * retry button, on screen while the request is in flight.\n */\n onRetry?: () => void;\n /**\n * The format for the value in the popover of a point. If you omit this\n * property, the popover shows the value in full.\n */\n pointPopoverValueFormat?: ChartValueFormat;\n /**\n * The series that the chart plots. Each series is a set of values with a\n * name. Each value lines up by index with the chart's `categories`.\n */\n series: ChartSeries[];\n /**\n * The subtitle of the chart. The chart shows the subtitle below the title. A\n * subtitle gives more information about the title, so the chart ignores a\n * subtitle that arrives with no title.\n */\n subtitle?: string;\n /** The title of the chart. */\n title?: string;\n /** The label for the horizontal axis. */\n xAxisLabel?: string;\n /** The label for the vertical axis. */\n yAxisLabel?: string;\n};\n"],"mappings":"","ignoreList":[]}
|