@okta/odyssey-react-mui 1.69.0 → 1.70.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/Box.cjs +1 -1
- package/dist/cjs/Breadcrumbs.cjs +1 -1
- package/dist/cjs/Buttons/BaseButton.cjs +1 -1
- package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
- package/dist/cjs/Buttons/Button.cjs +1 -1
- package/dist/cjs/Buttons/MenuButton.cjs +1 -1
- package/dist/cjs/Buttons/MenuItem.cjs +1 -1
- package/dist/cjs/Callout.cjs +1 -1
- package/dist/cjs/Card.cjs +1 -1
- package/dist/cjs/CircularProgress.cjs +1 -1
- package/dist/cjs/ConditionalWrapper.cjs +1 -1
- package/dist/cjs/DataTable/DataTable.cjs +1 -1
- package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
- package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
- package/dist/cjs/DatePickers/DateField.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
- package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
- package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
- package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
- package/dist/cjs/Dialog.cjs +1 -1
- package/dist/cjs/Drawer.cjs +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/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 +12 -12
- 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 → charts/components}/ChartError.cjs +6 -6
- package/dist/cjs/charts/components/ChartError.cjs.map +1 -0
- package/dist/cjs/{Charts → charts/components}/ChartFrame.cjs +9 -7
- 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 → charts}/index.cjs +7 -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.map +1 -0
- package/dist/cjs/charts/utils/formatChartValue.cjs.map +1 -0
- package/dist/cjs/charts/utils/getChartSeriesPointData.cjs.map +1 -0
- package/dist/cjs/charts/utils/hasDuplicateSeries.cjs.map +1 -0
- package/dist/cjs/charts/utils/resolveChartLocale.cjs.map +1 -0
- package/dist/cjs/{Charts → charts/utils}/useChartValueFormatter.cjs +1 -1
- package/dist/cjs/charts/utils/useChartValueFormatter.cjs.map +1 -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/InformationCircle.cjs +1 -1
- package/dist/cjs/icons.generated/InformationCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Link.cjs +1 -1
- package/dist/cjs/icons.generated/List.cjs +1 -1
- package/dist/cjs/icons.generated/Lock.cjs +1 -1
- package/dist/cjs/icons.generated/Menu.cjs +1 -1
- package/dist/cjs/icons.generated/More.cjs +1 -1
- package/dist/cjs/icons.generated/Neutral.cjs +1 -1
- package/dist/cjs/icons.generated/Notification.cjs +1 -1
- package/dist/cjs/icons.generated/Pause.cjs +1 -1
- package/dist/cjs/icons.generated/QuestionCircle.cjs +1 -1
- package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Refresh.cjs +1 -1
- package/dist/cjs/icons.generated/Reports.cjs +1 -1
- package/dist/cjs/icons.generated/ReportsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/Reset.cjs +1 -1
- package/dist/cjs/icons.generated/Resume.cjs +1 -1
- package/dist/cjs/icons.generated/Sad.cjs +1 -1
- package/dist/cjs/icons.generated/Same.cjs +1 -1
- package/dist/cjs/icons.generated/Search.cjs +1 -1
- package/dist/cjs/icons.generated/Security.cjs +1 -1
- package/dist/cjs/icons.generated/SecuritySelected.cjs +1 -1
- package/dist/cjs/icons.generated/Send.cjs +1 -1
- package/dist/cjs/icons.generated/Server.cjs +1 -1
- package/dist/cjs/icons.generated/Settings.cjs +1 -1
- package/dist/cjs/icons.generated/SettingsSelected.cjs +1 -1
- package/dist/cjs/icons.generated/Show.cjs +1 -1
- package/dist/cjs/icons.generated/Sparkle.cjs +1 -1
- package/dist/cjs/icons.generated/Subtract.cjs +1 -1
- package/dist/cjs/icons.generated/Sync.cjs +1 -1
- package/dist/cjs/icons.generated/ThumbsDown.cjs +1 -1
- package/dist/cjs/icons.generated/ThumbsUp.cjs +1 -1
- package/dist/cjs/icons.generated/Unlock.cjs +1 -1
- package/dist/cjs/icons.generated/Upload.cjs +1 -1
- package/dist/cjs/icons.generated/User.cjs +1 -1
- package/dist/cjs/icons.generated/Video.cjs +1 -1
- package/dist/cjs/icons.generated/Warning.cjs +1 -1
- package/dist/cjs/icons.generated/WarningFilled.cjs +1 -1
- package/dist/cjs/icons.generated/Workflows.cjs +1 -1
- package/dist/cjs/icons.generated/WorkflowsSelected.cjs +1 -1
- package/dist/cjs/labs/AppTile.cjs +1 -1
- package/dist/cjs/labs/DataFilters.cjs +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 +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_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 +4 -0
- 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_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 +4 -0
- package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.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/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/Box.js +1 -1
- package/dist/esm/Breadcrumbs.js +1 -1
- package/dist/esm/Buttons/BaseButton.js +1 -1
- package/dist/esm/Buttons/BaseMenuButton.js +1 -1
- package/dist/esm/Buttons/Button.js +1 -1
- package/dist/esm/Buttons/MenuButton.js +1 -1
- package/dist/esm/Buttons/MenuItem.js +1 -1
- package/dist/esm/Callout.js +1 -1
- package/dist/esm/Card.js +1 -1
- package/dist/esm/CircularProgress.js +1 -1
- package/dist/esm/ConditionalWrapper.js +1 -1
- package/dist/esm/DataTable/DataTable.js +1 -1
- package/dist/esm/DataTable/DataTableRowActions.js +1 -1
- package/dist/esm/DataTable/DataTableSettings.js +1 -1
- package/dist/esm/DatePickers/DateField.js +1 -1
- package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
- package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
- package/dist/esm/DatePickers/DatePicker.js +1 -1
- package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Drawer.js +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/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 +12 -12
- 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 → charts/components}/ChartError.js +6 -6
- package/dist/esm/charts/components/ChartError.js.map +1 -0
- package/dist/esm/{Charts → charts/components}/ChartFrame.js +9 -7
- 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 → charts}/index.js +1 -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.map +1 -0
- package/dist/esm/charts/utils/formatChartValue.js.map +1 -0
- package/dist/esm/charts/utils/getChartSeriesPointData.js.map +1 -0
- package/dist/esm/charts/utils/hasDuplicateSeries.js.map +1 -0
- package/dist/esm/charts/utils/resolveChartLocale.js.map +1 -0
- package/dist/esm/{Charts → charts/utils}/useChartValueFormatter.js +1 -1
- package/dist/esm/charts/utils/useChartValueFormatter.js.map +1 -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/InformationCircle.js +1 -1
- package/dist/esm/icons.generated/InformationCircleFilled.js +1 -1
- package/dist/esm/icons.generated/Link.js +1 -1
- package/dist/esm/icons.generated/List.js +1 -1
- package/dist/esm/icons.generated/Lock.js +1 -1
- package/dist/esm/icons.generated/Menu.js +1 -1
- package/dist/esm/icons.generated/More.js +1 -1
- package/dist/esm/icons.generated/Neutral.js +1 -1
- package/dist/esm/icons.generated/Notification.js +1 -1
- package/dist/esm/icons.generated/Pause.js +1 -1
- package/dist/esm/icons.generated/QuestionCircle.js +1 -1
- package/dist/esm/icons.generated/QuestionCircleFilled.js +1 -1
- package/dist/esm/icons.generated/Refresh.js +1 -1
- package/dist/esm/icons.generated/Reports.js +1 -1
- package/dist/esm/icons.generated/ReportsSelected.js +1 -1
- package/dist/esm/icons.generated/Reset.js +1 -1
- package/dist/esm/icons.generated/Resume.js +1 -1
- package/dist/esm/icons.generated/Sad.js +1 -1
- package/dist/esm/icons.generated/Same.js +1 -1
- package/dist/esm/icons.generated/Search.js +1 -1
- package/dist/esm/icons.generated/Security.js +1 -1
- package/dist/esm/icons.generated/SecuritySelected.js +1 -1
- package/dist/esm/icons.generated/Send.js +1 -1
- package/dist/esm/icons.generated/Server.js +1 -1
- package/dist/esm/icons.generated/Settings.js +1 -1
- package/dist/esm/icons.generated/SettingsSelected.js +1 -1
- package/dist/esm/icons.generated/Show.js +1 -1
- package/dist/esm/icons.generated/Sparkle.js +1 -1
- package/dist/esm/icons.generated/Subtract.js +1 -1
- package/dist/esm/icons.generated/Sync.js +1 -1
- package/dist/esm/icons.generated/ThumbsDown.js +1 -1
- package/dist/esm/icons.generated/ThumbsUp.js +1 -1
- package/dist/esm/icons.generated/Unlock.js +1 -1
- package/dist/esm/icons.generated/Upload.js +1 -1
- package/dist/esm/icons.generated/User.js +1 -1
- package/dist/esm/icons.generated/Video.js +1 -1
- package/dist/esm/icons.generated/Warning.js +1 -1
- package/dist/esm/icons.generated/WarningFilled.js +1 -1
- package/dist/esm/icons.generated/Workflows.js +1 -1
- package/dist/esm/icons.generated/WorkflowsSelected.js +1 -1
- package/dist/esm/labs/AppTile.js +1 -1
- package/dist/esm/labs/DataFilters.js +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 +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_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 +4 -0
- 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_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 +4 -0
- package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.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/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/OdysseyProvider.d.ts +7 -1
- package/dist/types/OdysseyProvider.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 → charts}/LineChart.d.ts +2 -2
- 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.map +1 -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 → charts}/index.d.ts +3 -2
- 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.map +1 -0
- package/dist/types/charts/utils/formatChartValue.d.ts.map +1 -0
- package/dist/types/charts/utils/getChartSeriesPointData.d.ts.map +1 -0
- package/dist/types/charts/utils/hasDuplicateSeries.d.ts.map +1 -0
- package/dist/types/charts/utils/resolveChartLocale.d.ts.map +1 -0
- package/dist/types/charts/utils/useChartValueFormatter.d.ts.map +1 -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.resources.d.ts +116 -4
- package/dist/types/i18n.generated/i18n.resources.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 +4 -0
- 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_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 +4 -0
- package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
- package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
- package/package.json +58 -19
- package/dist/cjs/Charts/ChartError.cjs.map +0 -1
- package/dist/cjs/Charts/ChartFrame.cjs.map +0 -1
- package/dist/cjs/Charts/ChartPopoverContent.cjs +0 -56
- package/dist/cjs/Charts/ChartPopoverContent.cjs.map +0 -1
- package/dist/cjs/Charts/LineChart.cjs +0 -268
- package/dist/cjs/Charts/LineChart.cjs.map +0 -1
- package/dist/cjs/Charts/chartTokens.cjs +0 -117
- package/dist/cjs/Charts/chartTokens.cjs.map +0 -1
- package/dist/cjs/Charts/chartTypes.cjs.map +0 -1
- package/dist/cjs/Charts/formatChartValue.cjs.map +0 -1
- package/dist/cjs/Charts/getChartSeriesPointData.cjs.map +0 -1
- package/dist/cjs/Charts/hasDuplicateSeries.cjs.map +0 -1
- package/dist/cjs/Charts/index.cjs.map +0 -1
- package/dist/cjs/Charts/resolveChartLocale.cjs.map +0 -1
- package/dist/cjs/Charts/useChartValueFormatter.cjs.map +0 -1
- package/dist/cjs/Charts/useStableValue.cjs.map +0 -1
- package/dist/esm/Charts/ChartError.js.map +0 -1
- package/dist/esm/Charts/ChartFrame.js.map +0 -1
- package/dist/esm/Charts/ChartPopoverContent.js +0 -49
- package/dist/esm/Charts/ChartPopoverContent.js.map +0 -1
- package/dist/esm/Charts/LineChart.js +0 -263
- package/dist/esm/Charts/LineChart.js.map +0 -1
- package/dist/esm/Charts/chartTokens.js +0 -109
- package/dist/esm/Charts/chartTokens.js.map +0 -1
- package/dist/esm/Charts/chartTypes.js.map +0 -1
- package/dist/esm/Charts/formatChartValue.js.map +0 -1
- package/dist/esm/Charts/getChartSeriesPointData.js.map +0 -1
- package/dist/esm/Charts/hasDuplicateSeries.js.map +0 -1
- package/dist/esm/Charts/index.js.map +0 -1
- package/dist/esm/Charts/resolveChartLocale.js.map +0 -1
- package/dist/esm/Charts/useChartValueFormatter.js.map +0 -1
- package/dist/esm/Charts/useStableValue.js.map +0 -1
- package/dist/types/Charts/ChartError.d.ts.map +0 -1
- package/dist/types/Charts/ChartFrame.d.ts.map +0 -1
- package/dist/types/Charts/ChartPopoverContent.d.ts +0 -97
- package/dist/types/Charts/ChartPopoverContent.d.ts.map +0 -1
- package/dist/types/Charts/LineChart.d.ts.map +0 -1
- package/dist/types/Charts/chartTokens.d.ts +0 -362
- package/dist/types/Charts/chartTokens.d.ts.map +0 -1
- package/dist/types/Charts/chartTypes.d.ts.map +0 -1
- package/dist/types/Charts/formatChartValue.d.ts.map +0 -1
- package/dist/types/Charts/getChartSeriesPointData.d.ts.map +0 -1
- package/dist/types/Charts/hasDuplicateSeries.d.ts.map +0 -1
- package/dist/types/Charts/index.d.ts.map +0 -1
- package/dist/types/Charts/resolveChartLocale.d.ts.map +0 -1
- package/dist/types/Charts/useChartValueFormatter.d.ts.map +0 -1
- package/dist/types/Charts/useStableValue.d.ts.map +0 -1
- /package/dist/cjs/{Charts → charts/utils}/chartTypes.cjs +0 -0
- /package/dist/cjs/{Charts → charts/utils}/formatChartValue.cjs +0 -0
- /package/dist/cjs/{Charts → charts/utils}/getChartSeriesPointData.cjs +0 -0
- /package/dist/cjs/{Charts → charts/utils}/hasDuplicateSeries.cjs +0 -0
- /package/dist/cjs/{Charts → charts/utils}/resolveChartLocale.cjs +0 -0
- /package/dist/cjs/{Charts → charts/utils}/useStableValue.cjs +0 -0
- /package/dist/esm/{Charts → charts/utils}/chartTypes.js +0 -0
- /package/dist/esm/{Charts → charts/utils}/formatChartValue.js +0 -0
- /package/dist/esm/{Charts → charts/utils}/getChartSeriesPointData.js +0 -0
- /package/dist/esm/{Charts → charts/utils}/hasDuplicateSeries.js +0 -0
- /package/dist/esm/{Charts → charts/utils}/resolveChartLocale.js +0 -0
- /package/dist/esm/{Charts → charts/utils}/useStableValue.js +0 -0
- /package/dist/types/{Charts → charts/components}/ChartError.d.ts +0 -0
- /package/dist/types/{Charts → charts/components}/ChartFrame.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/chartTypes.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/formatChartValue.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/getChartSeriesPointData.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/hasDuplicateSeries.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/resolveChartLocale.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/useChartValueFormatter.d.ts +0 -0
- /package/dist/types/{Charts → charts/utils}/useStableValue.d.ts +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
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
|
-
*/export const ChartPopoverContent = ({
|
|
13
|
-
categoryPlaceholder,
|
|
14
|
-
isShared,
|
|
15
|
-
odysseyDesignTokens,
|
|
16
|
-
seriesLabelPlaceholder,
|
|
17
|
-
valuePlaceholder
|
|
18
|
-
}) => {
|
|
19
|
-
const row = _jsxs("div", {
|
|
20
|
-
style: {
|
|
21
|
-
color: odysseyDesignTokens.TypographyColorBody,
|
|
22
|
-
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
23
|
-
marginBlockStart: odysseyDesignTokens.Spacing1
|
|
24
|
-
},
|
|
25
|
-
children: [seriesLabelPlaceholder, _jsx("span", {
|
|
26
|
-
className: "notranslate",
|
|
27
|
-
children: ": "
|
|
28
|
-
}), _jsx("span", {
|
|
29
|
-
style: {
|
|
30
|
-
fontWeight: odysseyDesignTokens.TypographyWeightBodyBold
|
|
31
|
-
},
|
|
32
|
-
children: valuePlaceholder
|
|
33
|
-
})]
|
|
34
|
-
});
|
|
35
|
-
return _jsxs("div", {
|
|
36
|
-
children: [_jsx("div", {
|
|
37
|
-
style: {
|
|
38
|
-
color: odysseyDesignTokens.TypographyColorBody,
|
|
39
|
-
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
40
|
-
fontWeight: odysseyDesignTokens.TypographyWeightBodyBold
|
|
41
|
-
},
|
|
42
|
-
children: categoryPlaceholder
|
|
43
|
-
}), isShared ? _jsxs(_Fragment, {
|
|
44
|
-
children: ["{#each points}", row, "{/each}"]
|
|
45
|
-
}) : row]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
ChartPopoverContent.displayName = "ChartPopoverContent::pkg=odyssey&odysseyV=1.69.0";
|
|
49
|
-
//# sourceMappingURL=ChartPopoverContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartPopoverContent.js","names":["ChartPopoverContent","categoryPlaceholder","isShared","odysseyDesignTokens","seriesLabelPlaceholder","valuePlaceholder","row","_jsxs","style","color","TypographyColorBody","fontSize","TypographySizeBody","marginBlockStart","Spacing1","children","_jsx","className","fontWeight","TypographyWeightBodyBold","_Fragment","displayName"],"sources":["../../../src/Charts/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 { DesignTokens } from \"../OdysseyDesignTokensContext.js\";\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 * 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 Odyssey design tokens. The caller passes the tokens as a prop because\n * this component cannot read them from the context. See the note on\n * {@link ChartPopoverContent}.\n */\n odysseyDesignTokens: DesignTokens;\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 the contents of a chart popover, styled with the Odyssey design\n * tokens. The component renders a category header, then one series row. If\n * `isShared` is `true`, that row repeats once for each point under the\n * pointer. If `isShared` is `false`, the component shows exactly one row.\n * This lets one component serve both a per-point popover and a shared\n * popover.\n *\n * The caller passes this component as the JSX children of the `<Tooltip>`\n * component from `@highcharts/react`. `<Tooltip>` turns those children into\n * an HTML string. It never mounts them through React.\n *\n * That conversion to HTML is why the restrictions below apply. Testing found\n * each restriction. No restriction was guessed from how Highcharts should\n * work.\n * - Do not call hooks in this component.\n * - Do not wrap this component in `styled()`. Do not wrap it in\n * `createOdysseyStyledComponent` either. This is why the tokens arrive as\n * a prop, and the styles stay inline.\n * - Do not wrap this component in `React.memo`.\n * - Write the `isShared` each-block without parentheses. Write\n * `{#each points}`, not `{#each(points)}`. The parenthesized form turns\n * `points` into the text `[object Object]` for each point, with no error\n * message. It also leaves the `#each` and `/each` markers as plain text\n * instead of running the loop.\n * - Keep the each-block markers and the row as separate JSX elements, not as\n * text inside one string. The serializer escapes HTML tag characters found\n * inside a plain string child, before Highcharts reads the format string.\n * So the row itself must stay real JSX elements, such as `<div>`, and not\n * a string that contains tag text. The `{#each points}` and `{/each}`\n * markers are separate string expressions, placed next to the row element\n * as siblings, not combined into the same string as the row's markup.\n *\n * If the code breaks any of these rules, Highcharts renders an empty box\n * instead of the popover. Do not use this pattern outside this file.\n *\n * Write every inline style value as a string that includes its unit. The\n * serializer does not add units to a plain number. Instead, it drops the\n * style rule, with no error message.\n *\n * Highcharts escapes the values it inserts into the placeholders. This\n * 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 isShared,\n odysseyDesignTokens,\n seriesLabelPlaceholder,\n valuePlaceholder,\n}: ChartPopoverContentProps) => {\n const row = (\n <div\n style={{\n color: odysseyDesignTokens.TypographyColorBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n marginBlockStart: odysseyDesignTokens.Spacing1,\n }}\n >\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: odysseyDesignTokens.TypographyWeightBodyBold }}\n >\n {valuePlaceholder}\n </span>\n </div>\n );\n\n return (\n <div>\n <div\n style={{\n color: odysseyDesignTokens.TypographyColorBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n fontWeight: odysseyDesignTokens.TypographyWeightBodyBold,\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,GAqFA,OAAO,MAAMA,mBAAmB,GAAGA,CAAC;EAClCC,mBAAmB;EACnBC,QAAQ;EACRC,mBAAmB;EACnBC,sBAAsB;EACtBC;AACwB,CAAC,KAAK;EAC9B,MAAMC,GAAG,GACPC,KAAA;IACEC,KAAK,EAAE;MACLC,KAAK,EAAEN,mBAAmB,CAACO,mBAAmB;MAC9CC,QAAQ,EAAER,mBAAmB,CAACS,kBAAkB;MAChDC,gBAAgB,EAAEV,mBAAmB,CAACW;IACxC,CAAE;IAAAC,QAAA,GAEDX,sBAAsB,EAMvBY,IAAA;MAAMC,SAAS,EAAC,aAAa;MAAAF,QAAA,EAAE;IAAI,CAAO,CAAC,EAC3CC,IAAA;MACER,KAAK,EAAE;QAAEU,UAAU,EAAEf,mBAAmB,CAACgB;MAAyB,CAAE;MAAAJ,QAAA,EAEnEV;IAAgB,CACb,CAAC;EAAA,CACJ,CACN;EAED,OACEE,KAAA;IAAAQ,QAAA,GACEC,IAAA;MACER,KAAK,EAAE;QACLC,KAAK,EAAEN,mBAAmB,CAACO,mBAAmB;QAC9CC,QAAQ,EAAER,mBAAmB,CAACS,kBAAkB;QAChDM,UAAU,EAAEf,mBAAmB,CAACgB;MAClC,CAAE;MAAAJ,QAAA,EAEDd;IAAmB,CACjB,CAAC,EACLC,QAAQ,GACPK,KAAA,CAAAa,SAAA;MAAAL,QAAA,GACG,gBAAgB,EAChBT,GAAG,EACH,SAAS;IAAA,CACV,CAAC,GAEHA,GACD;EAAA,CACE,CAAC;AAEV,CAAC;AAEDN,mBAAmB,CAACqB,WAAW,qDAAwB","ignoreList":[]}
|
|
@@ -1,263 +0,0 @@
|
|
|
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 { Chart, Credits, Legend, PlotOptions, Tooltip as Popover, XAxis, YAxis } from "@highcharts/react";
|
|
14
|
-
import { Accessibility } from "@highcharts/react/modules/Accessibility.js";
|
|
15
|
-
import { LineSeries } from "@highcharts/react/series/Line.js";
|
|
16
|
-
import { memo, useMemo } from "react";
|
|
17
|
-
import { useMediaQuery } from "../theme/useMediaQuery.js";
|
|
18
|
-
import { useStableCallback } from "../useStableCallback.js";
|
|
19
|
-
import { ChartFrame } from "./ChartFrame.js";
|
|
20
|
-
import { ChartPopoverContent } from "./ChartPopoverContent.js";
|
|
21
|
-
import { useChartTokens } from "./chartTokens.js";
|
|
22
|
-
import { getChartSeriesPointData } from "./getChartSeriesPointData.js";
|
|
23
|
-
import { hasDuplicateSeries } from "./hasDuplicateSeries.js";
|
|
24
|
-
import { useChartValueFormatter } from "./useChartValueFormatter.js";
|
|
25
|
-
import { useStableValue } from "./useStableValue.js";
|
|
26
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
-
const REDUCED_MOTION_CONDITION = "(prefers-reduced-motion: reduce)";
|
|
28
|
-
const LineChartContent = ({
|
|
29
|
-
ariaDescription,
|
|
30
|
-
categories,
|
|
31
|
-
onPointClick,
|
|
32
|
-
pointPopoverValueFormat,
|
|
33
|
-
series,
|
|
34
|
-
xAxisLabel,
|
|
35
|
-
yAxisFormat = "compact",
|
|
36
|
-
yAxisLabel
|
|
37
|
-
}) => {
|
|
38
|
-
const {
|
|
39
|
-
animationDuration,
|
|
40
|
-
axisLabelStyle,
|
|
41
|
-
axisValueStyle,
|
|
42
|
-
bodyFontFamily,
|
|
43
|
-
borderColor,
|
|
44
|
-
borderWidth,
|
|
45
|
-
chartBackgroundColor,
|
|
46
|
-
crosshairColor,
|
|
47
|
-
crosshairWidth,
|
|
48
|
-
edgeSpacing,
|
|
49
|
-
focusRingColor,
|
|
50
|
-
focusRingOffset,
|
|
51
|
-
focusRingRadius,
|
|
52
|
-
focusRingWidth,
|
|
53
|
-
legendItemHiddenStyle,
|
|
54
|
-
legendItemHoverStyle,
|
|
55
|
-
legendItemSpacing,
|
|
56
|
-
legendItemStyle,
|
|
57
|
-
legendLineSymbolHeight,
|
|
58
|
-
legendLineSymbolWidth,
|
|
59
|
-
legendSpacing,
|
|
60
|
-
legendSymbolSpacing,
|
|
61
|
-
lineHoverStrokeWidthPlus,
|
|
62
|
-
lineMarkerHoverHaloOpacity,
|
|
63
|
-
lineMarkerHoverHaloRadius,
|
|
64
|
-
lineMarkerHoverRadius,
|
|
65
|
-
lineMarkerRadius,
|
|
66
|
-
lineStrokeWidth,
|
|
67
|
-
odysseyDesignTokens,
|
|
68
|
-
popoverBackgroundColor,
|
|
69
|
-
popoverRadius,
|
|
70
|
-
popoverSpacing,
|
|
71
|
-
popoverStyle,
|
|
72
|
-
seriesColors,
|
|
73
|
-
topEdgeSpacing,
|
|
74
|
-
xAxisLabelSpacing,
|
|
75
|
-
yAxisLabelSpacing
|
|
76
|
-
} = useChartTokens();
|
|
77
|
-
const prefersReducedMotion = useMediaQuery(REDUCED_MOTION_CONDITION);
|
|
78
|
-
const formatValue = useChartValueFormatter();
|
|
79
|
-
if (hasDuplicateSeries({
|
|
80
|
-
series
|
|
81
|
-
})) {
|
|
82
|
-
throw new Error("This chart has two or more series with the same name.");
|
|
83
|
-
}
|
|
84
|
-
const animation = prefersReducedMotion ? false : {
|
|
85
|
-
duration: animationDuration
|
|
86
|
-
};
|
|
87
|
-
const seriesList = useMemo(() => series.map(chartSeries => ({
|
|
88
|
-
chartSeries,
|
|
89
|
-
pointData: getChartSeriesPointData({
|
|
90
|
-
categories,
|
|
91
|
-
chartSeries,
|
|
92
|
-
formatValue,
|
|
93
|
-
onPointClick,
|
|
94
|
-
pointPopoverValueFormat
|
|
95
|
-
})
|
|
96
|
-
})), [categories, formatValue, onPointClick, pointPopoverValueFormat, series]);
|
|
97
|
-
const hasLegend = useMemo(() => series.length > 1, [series.length]);
|
|
98
|
-
const options = {
|
|
99
|
-
chart: {
|
|
100
|
-
animation,
|
|
101
|
-
backgroundColor: chartBackgroundColor,
|
|
102
|
-
spacingBottom: edgeSpacing,
|
|
103
|
-
spacingLeft: edgeSpacing,
|
|
104
|
-
spacingRight: edgeSpacing,
|
|
105
|
-
spacingTop: topEdgeSpacing,
|
|
106
|
-
style: {
|
|
107
|
-
fontFamily: bodyFontFamily
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
colors: seriesColors,
|
|
111
|
-
subtitle: {
|
|
112
|
-
text: undefined
|
|
113
|
-
},
|
|
114
|
-
title: {
|
|
115
|
-
text: undefined
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
return _jsxs(Chart, {
|
|
119
|
-
options: options,
|
|
120
|
-
type: "line",
|
|
121
|
-
children: [_jsx(Accessibility, {
|
|
122
|
-
description: ariaDescription,
|
|
123
|
-
enabled: true,
|
|
124
|
-
keyboardNavigation: {
|
|
125
|
-
focusBorder: {
|
|
126
|
-
margin: focusRingOffset,
|
|
127
|
-
style: {
|
|
128
|
-
borderRadius: focusRingRadius,
|
|
129
|
-
color: focusRingColor,
|
|
130
|
-
lineWidth: focusRingWidth
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
landmarkVerbosity: "disabled"
|
|
135
|
-
}), _jsx(XAxis, {
|
|
136
|
-
categories: categories,
|
|
137
|
-
crosshair: {
|
|
138
|
-
color: crosshairColor,
|
|
139
|
-
width: crosshairWidth
|
|
140
|
-
},
|
|
141
|
-
gridLineColor: borderColor,
|
|
142
|
-
gridLineWidth: 0,
|
|
143
|
-
labels: {
|
|
144
|
-
style: axisValueStyle
|
|
145
|
-
},
|
|
146
|
-
lineColor: borderColor,
|
|
147
|
-
lineWidth: 0,
|
|
148
|
-
tickColor: borderColor,
|
|
149
|
-
tickLength: 0,
|
|
150
|
-
title: {
|
|
151
|
-
align: "middle",
|
|
152
|
-
margin: xAxisLabelSpacing,
|
|
153
|
-
style: axisLabelStyle,
|
|
154
|
-
text: xAxisLabel
|
|
155
|
-
}
|
|
156
|
-
}), _jsx(YAxis, {
|
|
157
|
-
gridLineColor: borderColor,
|
|
158
|
-
gridLineWidth: borderWidth,
|
|
159
|
-
labels: {
|
|
160
|
-
formatter: context => formatValue({
|
|
161
|
-
format: yAxisFormat,
|
|
162
|
-
value: Number(context.value)
|
|
163
|
-
}),
|
|
164
|
-
style: axisValueStyle
|
|
165
|
-
},
|
|
166
|
-
lineColor: "transparent",
|
|
167
|
-
tickColor: "transparent",
|
|
168
|
-
title: {
|
|
169
|
-
align: "middle",
|
|
170
|
-
margin: yAxisLabelSpacing,
|
|
171
|
-
style: axisLabelStyle,
|
|
172
|
-
text: yAxisLabel
|
|
173
|
-
}
|
|
174
|
-
}), _jsx(Legend, {
|
|
175
|
-
borderWidth: 0,
|
|
176
|
-
enabled: hasLegend,
|
|
177
|
-
itemDistance: legendItemSpacing,
|
|
178
|
-
itemHiddenStyle: legendItemHiddenStyle,
|
|
179
|
-
itemHoverStyle: legendItemHoverStyle,
|
|
180
|
-
itemStyle: legendItemStyle,
|
|
181
|
-
margin: legendSpacing,
|
|
182
|
-
padding: 0,
|
|
183
|
-
symbolHeight: legendLineSymbolHeight,
|
|
184
|
-
symbolPadding: legendSymbolSpacing,
|
|
185
|
-
symbolWidth: legendLineSymbolWidth
|
|
186
|
-
}), _jsx(Popover, {
|
|
187
|
-
backgroundColor: popoverBackgroundColor,
|
|
188
|
-
borderColor: borderColor,
|
|
189
|
-
borderRadius: popoverRadius,
|
|
190
|
-
borderWidth: borderWidth,
|
|
191
|
-
padding: popoverSpacing,
|
|
192
|
-
shadow: false,
|
|
193
|
-
shared: true,
|
|
194
|
-
style: popoverStyle,
|
|
195
|
-
children: _jsx(ChartPopoverContent, {
|
|
196
|
-
categoryPlaceholder: "{point.key}",
|
|
197
|
-
isShared: true,
|
|
198
|
-
odysseyDesignTokens: odysseyDesignTokens,
|
|
199
|
-
seriesLabelPlaceholder: "{series.name}",
|
|
200
|
-
valuePlaceholder: "{point.custom.formattedValue}"
|
|
201
|
-
})
|
|
202
|
-
}), _jsx(PlotOptions, {
|
|
203
|
-
line: {
|
|
204
|
-
dataLabels: {
|
|
205
|
-
enabled: false
|
|
206
|
-
},
|
|
207
|
-
lineWidth: lineStrokeWidth,
|
|
208
|
-
marker: {
|
|
209
|
-
lineWidth: 0,
|
|
210
|
-
radius: lineMarkerRadius,
|
|
211
|
-
states: {
|
|
212
|
-
hover: {
|
|
213
|
-
lineWidthPlus: 0,
|
|
214
|
-
radius: lineMarkerHoverRadius
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
states: {
|
|
219
|
-
hover: {
|
|
220
|
-
halo: {
|
|
221
|
-
opacity: lineMarkerHoverHaloOpacity,
|
|
222
|
-
size: lineMarkerHoverHaloRadius
|
|
223
|
-
},
|
|
224
|
-
lineWidthPlus: lineHoverStrokeWidthPlus
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
series: {
|
|
229
|
-
animation
|
|
230
|
-
}
|
|
231
|
-
}), _jsx(Credits, {
|
|
232
|
-
enabled: false
|
|
233
|
-
}), seriesList.map(({
|
|
234
|
-
chartSeries,
|
|
235
|
-
pointData
|
|
236
|
-
}) => _jsx(LineSeries, {
|
|
237
|
-
data: pointData,
|
|
238
|
-
name: chartSeries.name
|
|
239
|
-
}, chartSeries.name))]
|
|
240
|
-
});
|
|
241
|
-
};
|
|
242
|
-
const MemoizedLineChartContent = memo(LineChartContent);
|
|
243
|
-
const LineChart = props => {
|
|
244
|
-
const stableOnPointClick = useStableCallback(props.onPointClick);
|
|
245
|
-
const stableProps = useStableValue({
|
|
246
|
-
...props,
|
|
247
|
-
onPointClick: props.onPointClick ? stableOnPointClick : undefined
|
|
248
|
-
});
|
|
249
|
-
return _jsx(ChartFrame, {
|
|
250
|
-
hasError: stableProps.hasError,
|
|
251
|
-
isLoading: stableProps.isLoading,
|
|
252
|
-
onRetry: stableProps.onRetry,
|
|
253
|
-
subtitle: stableProps.subtitle,
|
|
254
|
-
title: stableProps.title,
|
|
255
|
-
children: _jsx(MemoizedLineChartContent, {
|
|
256
|
-
...stableProps
|
|
257
|
-
})
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
|
-
const MemoizedLineChart = memo(LineChart);
|
|
261
|
-
MemoizedLineChart.displayName = "LineChart::pkg=odyssey&odysseyV=1.69.0";
|
|
262
|
-
export { MemoizedLineChart as LineChart };
|
|
263
|
-
//# sourceMappingURL=LineChart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LineChart.js","names":["Chart","Credits","Legend","PlotOptions","Tooltip","Popover","XAxis","YAxis","Accessibility","LineSeries","memo","useMemo","useMediaQuery","useStableCallback","ChartFrame","ChartPopoverContent","useChartTokens","getChartSeriesPointData","hasDuplicateSeries","useChartValueFormatter","useStableValue","jsx","_jsx","jsxs","_jsxs","REDUCED_MOTION_CONDITION","LineChartContent","ariaDescription","categories","onPointClick","pointPopoverValueFormat","series","xAxisLabel","yAxisFormat","yAxisLabel","animationDuration","axisLabelStyle","axisValueStyle","bodyFontFamily","borderColor","borderWidth","chartBackgroundColor","crosshairColor","crosshairWidth","edgeSpacing","focusRingColor","focusRingOffset","focusRingRadius","focusRingWidth","legendItemHiddenStyle","legendItemHoverStyle","legendItemSpacing","legendItemStyle","legendLineSymbolHeight","legendLineSymbolWidth","legendSpacing","legendSymbolSpacing","lineHoverStrokeWidthPlus","lineMarkerHoverHaloOpacity","lineMarkerHoverHaloRadius","lineMarkerHoverRadius","lineMarkerRadius","lineStrokeWidth","odysseyDesignTokens","popoverBackgroundColor","popoverRadius","popoverSpacing","popoverStyle","seriesColors","topEdgeSpacing","xAxisLabelSpacing","yAxisLabelSpacing","prefersReducedMotion","formatValue","Error","animation","duration","seriesList","map","chartSeries","pointData","hasLegend","length","options","chart","backgroundColor","spacingBottom","spacingLeft","spacingRight","spacingTop","style","fontFamily","colors","subtitle","text","undefined","title","type","children","description","enabled","keyboardNavigation","focusBorder","margin","borderRadius","color","lineWidth","landmarkVerbosity","crosshair","width","gridLineColor","gridLineWidth","labels","lineColor","tickColor","tickLength","align","formatter","context","format","value","Number","itemDistance","itemHiddenStyle","itemHoverStyle","itemStyle","padding","symbolHeight","symbolPadding","symbolWidth","shadow","shared","categoryPlaceholder","isShared","seriesLabelPlaceholder","valuePlaceholder","line","dataLabels","marker","radius","states","hover","lineWidthPlus","halo","opacity","size","data","name","MemoizedLineChartContent","LineChart","props","stableOnPointClick","stableProps","hasError","isLoading","onRetry","MemoizedLineChart","displayName"],"sources":["../../../src/Charts/LineChart.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 {\n Chart,\n Credits,\n Legend,\n PlotOptions,\n Tooltip as Popover,\n XAxis,\n YAxis,\n} from \"@highcharts/react\";\nimport { Accessibility } from \"@highcharts/react/modules/Accessibility.js\";\nimport { LineSeries } from \"@highcharts/react/series/Line.js\";\nimport { memo, useMemo } from \"react\";\n\nimport type { CartesianChartProps } from \"./chartTypes.js\";\nimport type { ChartValueFormat } from \"./formatChartValue.js\";\n\nimport { useMediaQuery } from \"../theme/useMediaQuery.js\";\nimport { useStableCallback } from \"../useStableCallback.js\";\nimport { ChartFrame } from \"./ChartFrame.js\";\nimport { ChartPopoverContent } from \"./ChartPopoverContent.js\";\nimport { useChartTokens } from \"./chartTokens.js\";\nimport { getChartSeriesPointData } from \"./getChartSeriesPointData.js\";\nimport { hasDuplicateSeries } from \"./hasDuplicateSeries.js\";\nimport { useChartValueFormatter } from \"./useChartValueFormatter.js\";\nimport { useStableValue } from \"./useStableValue.js\";\n\nconst REDUCED_MOTION_CONDITION = \"(prefers-reduced-motion: reduce)\";\n\n/** The props for a line chart. */\nexport type LineChartProps = CartesianChartProps & {\n /**\n * The format for the values on the vertical axis. A line chart shows its\n * numeric values on that axis. If no preset gives the format that you need,\n * supply a function.\n * @default \"compact\"\n */\n yAxisFormat?: ChartValueFormat;\n};\n\nconst LineChartContent = ({\n ariaDescription,\n categories,\n onPointClick,\n pointPopoverValueFormat,\n series,\n xAxisLabel,\n yAxisFormat = \"compact\",\n yAxisLabel,\n}: LineChartProps) => {\n const {\n animationDuration,\n axisLabelStyle,\n axisValueStyle,\n bodyFontFamily,\n borderColor,\n borderWidth,\n chartBackgroundColor,\n crosshairColor,\n crosshairWidth,\n edgeSpacing,\n focusRingColor,\n focusRingOffset,\n focusRingRadius,\n focusRingWidth,\n legendItemHiddenStyle,\n legendItemHoverStyle,\n legendItemSpacing,\n legendItemStyle,\n legendLineSymbolHeight,\n legendLineSymbolWidth,\n legendSpacing,\n legendSymbolSpacing,\n lineHoverStrokeWidthPlus,\n lineMarkerHoverHaloOpacity,\n lineMarkerHoverHaloRadius,\n lineMarkerHoverRadius,\n lineMarkerRadius,\n lineStrokeWidth,\n odysseyDesignTokens,\n popoverBackgroundColor,\n popoverRadius,\n popoverSpacing,\n popoverStyle,\n seriesColors,\n topEdgeSpacing,\n xAxisLabelSpacing,\n yAxisLabelSpacing,\n } = useChartTokens();\n const prefersReducedMotion = useMediaQuery(REDUCED_MOTION_CONDITION);\n const formatValue = useChartValueFormatter();\n\n if (hasDuplicateSeries({ series })) {\n throw new Error(\"This chart has two or more series with the same name.\");\n }\n\n const animation = prefersReducedMotion\n ? (false as const)\n : { duration: animationDuration };\n\n // This memo builds a click handler and formats the value for each point.\n // Highcharts registers a new click handler for a point whenever the\n // identity of that point's data changes. Without this memo, every render\n // would build new data, so Highcharts would tear down and re-register its\n // handlers even when nothing changed.\n //\n // This memo works because LineChart passes its props through\n // useStableValue. That hook keeps `series` at the same identity across a\n // render that does not change the data, so this memo does not rerun.\n // LineChart also passes `onPointClick` through useStableCallback, so an\n // inline handler from the caller keeps the same identity here.\n //\n // useStableValue compares a function by identity, not by what the function\n // does. `pointPopoverValueFormat` accepts a function, and this memo formats\n // each value at build time. So a caller that supplies a new function on\n // every render for that property still defeats this memo. Such a caller\n // needs its own useCallback.\n const seriesList = useMemo(\n () =>\n series.map((chartSeries) => ({\n chartSeries,\n pointData: getChartSeriesPointData({\n categories,\n chartSeries,\n formatValue,\n onPointClick,\n pointPopoverValueFormat,\n }),\n })),\n [categories, formatValue, onPointClick, pointPopoverValueFormat, series],\n );\n const hasLegend = useMemo(() => series.length > 1, [series.length]);\n\n const options = {\n chart: {\n animation,\n backgroundColor: chartBackgroundColor,\n spacingBottom: edgeSpacing,\n spacingLeft: edgeSpacing,\n spacingRight: edgeSpacing,\n spacingTop: topEdgeSpacing,\n style: { fontFamily: bodyFontFamily },\n },\n // Each series takes the next color from this list. So a change to the\n // order of `seriesColors`, in `chartTokens.ts`, changes the color of every\n // series.\n colors: seriesColors,\n // The chart library ships a default title text of \"Chart title\". Its\n // documented way to disable a title is a `text` of undefined, which draws\n // an empty text element that measures zero and so reserves no height. A\n // whole `title` of undefined does not work, because the React wrapper\n // always merges a `title` object over the `options` prop.\n subtitle: { text: undefined },\n title: { text: undefined },\n };\n\n return (\n <Chart options={options} type=\"line\">\n <Accessibility\n description={ariaDescription}\n enabled\n keyboardNavigation={{\n focusBorder: {\n margin: focusRingOffset,\n style: {\n borderRadius: focusRingRadius,\n color: focusRingColor,\n lineWidth: focusRingWidth,\n },\n },\n }}\n landmarkVerbosity=\"disabled\"\n />\n <XAxis\n categories={categories}\n crosshair={{ color: crosshairColor, width: crosshairWidth }}\n gridLineColor={borderColor}\n gridLineWidth={0}\n labels={{ style: axisValueStyle }}\n lineColor={borderColor}\n lineWidth={0}\n tickColor={borderColor}\n tickLength={0}\n title={{\n align: \"middle\",\n margin: xAxisLabelSpacing,\n style: axisLabelStyle,\n text: xAxisLabel,\n }}\n />\n <YAxis\n gridLineColor={borderColor}\n gridLineWidth={borderWidth}\n labels={{\n formatter: (context) =>\n formatValue({\n format: yAxisFormat,\n value: Number(context.value),\n }),\n style: axisValueStyle,\n }}\n lineColor=\"transparent\"\n tickColor=\"transparent\"\n title={{\n align: \"middle\",\n margin: yAxisLabelSpacing,\n style: axisLabelStyle,\n text: yAxisLabel,\n }}\n />\n <Legend\n borderWidth={0}\n enabled={hasLegend}\n itemDistance={legendItemSpacing}\n itemHiddenStyle={legendItemHiddenStyle}\n itemHoverStyle={legendItemHoverStyle}\n itemStyle={legendItemStyle}\n margin={legendSpacing}\n padding={0}\n symbolHeight={legendLineSymbolHeight}\n symbolPadding={legendSymbolSpacing}\n symbolWidth={legendLineSymbolWidth}\n />\n <Popover\n backgroundColor={popoverBackgroundColor}\n borderColor={borderColor}\n borderRadius={popoverRadius}\n borderWidth={borderWidth}\n padding={popoverSpacing}\n shadow={false}\n shared\n style={popoverStyle}\n >\n <ChartPopoverContent\n categoryPlaceholder=\"{point.key}\"\n isShared\n odysseyDesignTokens={odysseyDesignTokens}\n seriesLabelPlaceholder=\"{series.name}\"\n valuePlaceholder=\"{point.custom.formattedValue}\"\n />\n </Popover>\n <PlotOptions\n line={{\n dataLabels: { enabled: false },\n lineWidth: lineStrokeWidth,\n marker: {\n lineWidth: 0,\n radius: lineMarkerRadius,\n states: {\n hover: {\n lineWidthPlus: 0,\n radius: lineMarkerHoverRadius,\n },\n },\n },\n states: {\n hover: {\n halo: {\n opacity: lineMarkerHoverHaloOpacity,\n size: lineMarkerHoverHaloRadius,\n },\n lineWidthPlus: lineHoverStrokeWidthPlus,\n },\n },\n }}\n series={{ animation }}\n />\n <Credits enabled={false} />\n {seriesList.map(({ chartSeries, pointData }) => (\n <LineSeries\n data={pointData}\n key={chartSeries.name}\n name={chartSeries.name}\n />\n ))}\n </Chart>\n );\n};\n\n// `LineChart` passes props that keep the same identity across a render. This\n// memo then stops a render of the caller from reaching the children of\n// `Chart`. A new child identity forces Highcharts to rebuild and redraw the\n// whole chart.\nconst MemoizedLineChartContent = memo(LineChartContent);\n\n/**\n * Renders a line chart that gets its theme from Odyssey design tokens. The\n * chart plots each series against the shared `categories` of the chart. Each\n * value in a series lines up by index with a category, so a series and\n * `categories` must have the same length. If a value is `null`, the chart\n * draws a gap at that category, and not a point with a value of zero.\n *\n * The chart also gives a different marker shape to each series. The shape lets\n * a user identify a series without color. The chart library applies its five\n * built-in shapes in series order. A sixth series repeats the first shape.\n */\nconst LineChart = (props: LineChartProps) => {\n // Highcharts rebuilds and redraws the whole chart when the identity of any\n // React child changes. A caller that builds the `series` array inside its\n // own render creates a new array on every render. That new array would\n // reach every child below this point.\n //\n // useStableValue holds one props object while its contents stay the same,\n // so `MemoizedLineChartContent` keeps the same children across those\n // renders.\n //\n // useStableValue cannot hold `onPointClick`, because it compares a function\n // by identity. An inline handler therefore arrives with a new identity on\n // each render of the caller, and every memo below misses. useStableCallback\n // wraps that handler in one callback of its own that keeps the same\n // identity, and calls the latest handler when a user clicks a point.\n //\n // useStableCallback also turns an absent handler into a callback that does\n // nothing. The chart attaches a click listener to a point as soon as it\n // finds one, so a chart with no `onPointClick` must pass nothing at all.\n // The condition below keeps that behavior, and returns the one stable\n // callback in every other case.\n const stableOnPointClick = useStableCallback(props.onPointClick);\n const stableProps = useStableValue({\n ...props,\n onPointClick: props.onPointClick ? stableOnPointClick : undefined,\n });\n\n return (\n <ChartFrame\n hasError={stableProps.hasError}\n isLoading={stableProps.isLoading}\n onRetry={stableProps.onRetry}\n subtitle={stableProps.subtitle}\n title={stableProps.title}\n >\n <MemoizedLineChartContent {...stableProps} />\n </ChartFrame>\n );\n};\n\nconst MemoizedLineChart = memo(LineChart);\nMemoizedLineChart.displayName = \"LineChart\";\n\nexport { Memo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E,IAAA,CAAC8H,wBAAwB;MAAA,GAAKI;IAAW,CAAG;EAAC,CACnC,CAAC;AAEjB,CAAC;AAED,MAAMI,iBAAiB,GAAGlJ,IAAI,CAAC2I,SAAS,CAAC;AACzCO,iBAAiB,CAACC,WAAW,2CAAc;AAE3C,SAASD,iBAAiB,IAAIP,SAAS","ignoreList":[]}
|
|
@@ -1,109 +0,0 @@
|
|
|
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
|
-
ChartBarRadius: 3,
|
|
19
|
-
ChartLegendLineSymbolWidth: 22,
|
|
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 useChartTokens = () => {
|
|
34
|
-
const odysseyDesignTokens = useOdysseyDesignTokens();
|
|
35
|
-
return useMemo(() => {
|
|
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
|
-
const seriesColors = [odysseyDesignTokens.HueBlue600, odysseyDesignTokens.HueAccentThree400, odysseyDesignTokens.HueAccentTwo400, odysseyDesignTokens.HueAccentOne600, odysseyDesignTokens.HueYellow400, odysseyDesignTokens.HueGreen600];
|
|
49
|
-
return {
|
|
50
|
-
animationDuration: chartTokens.ChartAnimationDuration,
|
|
51
|
-
barRadius: chartTokens.ChartBarRadius,
|
|
52
|
-
legendLineSymbolHeight: chartTokens.ChartLineMarkerSize,
|
|
53
|
-
legendLineSymbolWidth: chartTokens.ChartLegendLineSymbolWidth,
|
|
54
|
-
lineHoverStrokeWidthPlus: chartTokens.ChartLineHoverStrokeWidthPlus,
|
|
55
|
-
lineMarkerHoverHaloOpacity: chartTokens.ChartLineMarkerHoverHaloOpacity,
|
|
56
|
-
lineMarkerHoverHaloRadius: chartTokens.ChartLineMarkerHoverHaloSize / 2,
|
|
57
|
-
lineMarkerHoverRadius: chartTokens.ChartLineMarkerHoverSize / 2,
|
|
58
|
-
lineMarkerRadius: chartTokens.ChartLineMarkerSize / 2,
|
|
59
|
-
lineStrokeWidth: chartTokens.ChartLineStrokeWidth,
|
|
60
|
-
minHeight: `${chartTokens.ChartMinHeight}px`,
|
|
61
|
-
odysseyDesignTokens,
|
|
62
|
-
bodyFontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
63
|
-
borderColor: odysseyDesignTokens.BorderColorDisplay,
|
|
64
|
-
borderWidth: toPixels(odysseyDesignTokens.BorderWidthMain),
|
|
65
|
-
chartBackgroundColor: "transparent",
|
|
66
|
-
crosshairColor: odysseyDesignTokens.BorderColorDisplay,
|
|
67
|
-
crosshairWidth: toPixels(odysseyDesignTokens.BorderWidthMain),
|
|
68
|
-
edgeSpacing: toPixels(odysseyDesignTokens.Spacing2),
|
|
69
|
-
focusRingColor: odysseyDesignTokens.BorderColorPrimaryControl,
|
|
70
|
-
focusRingOffset: toPixels(odysseyDesignTokens.FocusOutlineOffsetMain),
|
|
71
|
-
focusRingRadius: `${toPixels(odysseyDesignTokens.BorderRadiusTight)}px`,
|
|
72
|
-
focusRingWidth: toPixels(odysseyDesignTokens.FocusOutlineWidthMain),
|
|
73
|
-
legendItemSpacing: toPixels(odysseyDesignTokens.Spacing4),
|
|
74
|
-
legendSpacing: toPixels(odysseyDesignTokens.Spacing4),
|
|
75
|
-
legendSymbolSpacing: toPixels(odysseyDesignTokens.Spacing2),
|
|
76
|
-
popoverBackgroundColor: odysseyDesignTokens.HueNeutralWhite,
|
|
77
|
-
popoverRadius: toPixels(odysseyDesignTokens.BorderRadiusMain),
|
|
78
|
-
popoverSpacing: toPixels(odysseyDesignTokens.Spacing4),
|
|
79
|
-
topEdgeSpacing: toPixels(odysseyDesignTokens.Spacing3),
|
|
80
|
-
xAxisLabelSpacing: toPixels(odysseyDesignTokens.Spacing2),
|
|
81
|
-
yAxisLabelSpacing: toPixels(odysseyDesignTokens.Spacing2) + chartTokens.ChartYAxisLabelBaselineCompensation,
|
|
82
|
-
seriesColors,
|
|
83
|
-
axisLabelStyle: axisValueStyle,
|
|
84
|
-
axisValueStyle,
|
|
85
|
-
legendItemHiddenStyle: {
|
|
86
|
-
color: odysseyDesignTokens.TypographyColorDisabled
|
|
87
|
-
},
|
|
88
|
-
legendItemHoverStyle: {
|
|
89
|
-
color: odysseyDesignTokens.TypographyColorBody
|
|
90
|
-
},
|
|
91
|
-
legendItemStyle: {
|
|
92
|
-
color: odysseyDesignTokens.TypographyColorSubordinate,
|
|
93
|
-
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
94
|
-
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
95
|
-
fontWeight: odysseyDesignTokens.TypographyWeightBody,
|
|
96
|
-
lineHeight
|
|
97
|
-
},
|
|
98
|
-
popoverStyle: {
|
|
99
|
-
boxShadow: odysseyDesignTokens.DepthMedium,
|
|
100
|
-
color: odysseyDesignTokens.TypographyColorBody,
|
|
101
|
-
fontFamily: odysseyDesignTokens.TypographyFamilyBody,
|
|
102
|
-
fontSize: odysseyDesignTokens.TypographySizeBody,
|
|
103
|
-
fontWeight: odysseyDesignTokens.TypographyWeightBody,
|
|
104
|
-
lineHeight
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
}, [odysseyDesignTokens]);
|
|
108
|
-
};
|
|
109
|
-
//# sourceMappingURL=chartTokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chartTokens.js","names":["useMemo","useOdysseyDesignTokens","CSS_ROOT_FONT_SIZE_PIXELS","chartTokens","ChartAnimationDuration","ChartBarRadius","ChartLegendLineSymbolWidth","ChartLineHoverStrokeWidthPlus","ChartLineMarkerHoverHaloOpacity","ChartLineMarkerHoverHaloSize","ChartLineMarkerHoverSize","ChartLineMarkerSize","ChartLineStrokeWidth","ChartMinHeight","ChartYAxisLabelBaselineCompensation","getTokenValueAsPixels","tokenValue","typographySizeBase","trimEnd","endsWith","parseFloat","useChartTokens","odysseyDesignTokens","toPixels","TypographySizeBase","lineHeight","TypographySizeBody","TypographyLineHeightBody","axisValueStyle","color","TypographyColorSubordinate","fontFamily","TypographyFamilyBody","fontSize","fontWeight","TypographyWeightBody","seriesColors","HueBlue600","HueAccentThree400","HueAccentTwo400","HueAccentOne600","HueYellow400","HueGreen600","animationDuration","barRadius","legendLineSymbolHeight","legendLineSymbolWidth","lineHoverStrokeWidthPlus","lineMarkerHoverHaloOpacity","lineMarkerHoverHaloRadius","lineMarkerHoverRadius","lineMarkerRadius","lineStrokeWidth","minHeight","bodyFontFamily","borderColor","BorderColorDisplay","borderWidth","BorderWidthMain","chartBackgroundColor","crosshairColor","crosshairWidth","edgeSpacing","Spacing2","focusRingColor","BorderColorPrimaryControl","focusRingOffset","FocusOutlineOffsetMain","focusRingRadius","BorderRadiusTight","focusRingWidth","FocusOutlineWidthMain","legendItemSpacing","Spacing4","legendSpacing","legendSymbolSpacing","popoverBackgroundColor","HueNeutralWhite","popoverRadius","BorderRadiusMain","popoverSpacing","topEdgeSpacing","Spacing3","xAxisLabelSpacing","yAxisLabelSpacing","axisLabelStyle","legendItemHiddenStyle","TypographyColorDisabled","legendItemHoverStyle","TypographyColorBody","legendItemStyle","popoverStyle","boxShadow","DepthMedium"],"sources":["../../../src/Charts/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 { 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 // The spec asks for 3px, and BorderRadiusTight is 4px.\n ChartBarRadius: 3,\n // The spec asks for 22px, and the spacing scale has no 22px step.\n ChartLegendLineSymbolWidth: 22,\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 the Y axis label less visible space than the X axis\n // label at the same `title.margin`. The comment on `yAxisLabelSpacing` below\n // 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 * Returns the chart values that come from the Odyssey design tokens in\n * context. The values include the series color palette, the style objects that\n * the charting library takes, and the lengths the library takes.\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 hook also returns `odysseyDesignTokens` for `ChartPopoverContent`. A\n * chart serializes that content to HTML, and does not mount it. Therefore the\n * content cannot read the context itself.\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 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 const seriesColors = [\n odysseyDesignTokens.HueBlue600,\n odysseyDesignTokens.HueAccentThree400,\n odysseyDesignTokens.HueAccentTwo400,\n odysseyDesignTokens.HueAccentOne600,\n odysseyDesignTokens.HueYellow400,\n odysseyDesignTokens.HueGreen600,\n ];\n\n return {\n animationDuration: chartTokens.ChartAnimationDuration,\n barRadius: chartTokens.ChartBarRadius,\n // Highcharts also uses this as the limit for the marker in the legend: it\n // draws that marker at a radius of half this height, or at\n // `lineMarkerRadius`, whichever is less. Both come from\n // ChartLineMarkerSize, so the legend cannot cut the marker down.\n legendLineSymbolHeight: chartTokens.ChartLineMarkerSize,\n legendLineSymbolWidth: chartTokens.ChartLegendLineSymbolWidth,\n lineHoverStrokeWidthPlus: chartTokens.ChartLineHoverStrokeWidthPlus,\n lineMarkerHoverHaloOpacity: chartTokens.ChartLineMarkerHoverHaloOpacity,\n lineMarkerHoverHaloRadius: chartTokens.ChartLineMarkerHoverHaloSize / 2,\n lineMarkerHoverRadius: chartTokens.ChartLineMarkerHoverSize / 2,\n lineMarkerRadius: chartTokens.ChartLineMarkerSize / 2,\n lineStrokeWidth: chartTokens.ChartLineStrokeWidth,\n minHeight: `${chartTokens.ChartMinHeight}px`,\n odysseyDesignTokens,\n\n bodyFontFamily: odysseyDesignTokens.TypographyFamilyBody,\n borderColor: odysseyDesignTokens.BorderColorDisplay,\n borderWidth: toPixels(odysseyDesignTokens.BorderWidthMain),\n chartBackgroundColor: \"transparent\",\n crosshairColor: odysseyDesignTokens.BorderColorDisplay,\n crosshairWidth: toPixels(odysseyDesignTokens.BorderWidthMain),\n // Without some outer spacing, Highcharts clips the left edge of the\n // widest Y axis value.\n edgeSpacing: toPixels(odysseyDesignTokens.Spacing2),\n focusRingColor: odysseyDesignTokens.BorderColorPrimaryControl,\n focusRingOffset: 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 focusRingRadius: `${toPixels(odysseyDesignTokens.BorderRadiusTight)}px`,\n focusRingWidth: toPixels(odysseyDesignTokens.FocusOutlineWidthMain),\n legendItemSpacing: toPixels(odysseyDesignTokens.Spacing4),\n legendSpacing: toPixels(odysseyDesignTokens.Spacing4),\n legendSymbolSpacing: toPixels(odysseyDesignTokens.Spacing2),\n popoverBackgroundColor: odysseyDesignTokens.HueNeutralWhite,\n popoverRadius: toPixels(odysseyDesignTokens.BorderRadiusMain),\n popoverSpacing: toPixels(odysseyDesignTokens.Spacing4),\n topEdgeSpacing: toPixels(odysseyDesignTokens.Spacing3),\n xAxisLabelSpacing: toPixels(odysseyDesignTokens.Spacing2),\n // Highcharts renders the gap beside a rotated Y axis label about 3px\n // smaller than requested. Add that difference back so both axis labels\n // appear Spacing2 away from their values.\n yAxisLabelSpacing:\n toPixels(odysseyDesignTokens.Spacing2) +\n chartTokens.ChartYAxisLabelBaselineCompensation,\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\n axisLabelStyle: axisValueStyle,\n axisValueStyle,\n\n // Highcharts merges this over `legendItemStyle` for a legend item\n // whose series is hidden (toggled off). The spec's \"Selected\" state is\n // this same toggled-off item, styled with Color/Disabled.\n legendItemHiddenStyle: {\n color: odysseyDesignTokens.TypographyColorDisabled,\n },\n legendItemHoverStyle: {\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\n // gray), so the legend does not share `axisValueStyle`.\n legendItemStyle: {\n color: odysseyDesignTokens.TypographyColorSubordinate,\n fontFamily: odysseyDesignTokens.TypographyFamilyBody,\n fontSize: odysseyDesignTokens.TypographySizeBody,\n fontWeight: odysseyDesignTokens.TypographyWeightBody,\n lineHeight,\n },\n\n popoverStyle: {\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 }, [odysseyDesignTokens]);\n};\n\n/** The chart tokens that {@link useChartTokens} returns. */\nexport type ChartTokens = ReturnType<typeof useChartTokens>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,OAAO;AAE/B,SAASC,sBAAsB,QAAQ,kCAAkC;AAEzE,MAAMC,yBAAyB,GAAG,EAAE;AAOpC,OAAO,MAAMC,WAAW,GAAG;EAEzBC,sBAAsB,EAAE,GAAG;EAE3BC,cAAc,EAAE,CAAC;EAEjBC,0BAA0B,EAAE,EAAE;EAI9BC,6BAA6B,EAAE,CAAC;EAChCC,+BAA+B,EAAE,IAAI;EACrCC,4BAA4B,EAAE,EAAE;EAChCC,wBAAwB,EAAE,EAAE;EAC5BC,mBAAmB,EAAE,CAAC;EAEtBC,oBAAoB,EAAE,CAAC;EAGvBC,cAAc,EAAE,GAAG;EAInBC,mCAAmC,EAAE;AACvC,CAAU;AAUV,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC,UAAU;EACVC;AAIF,CAAC,KACCD,UAAU,CAACE,OAAO,CAAC,CAAC,CAACC,QAAQ,CAAC,KAAK,CAAC,GAChCC,UAAU,CAACJ,UAAU,CAAC,IACpBI,UAAU,CAACH,kBAAkB,CAAC,GAAG,GAAG,GAAIf,yBAAyB,CAAC,GACpEkB,UAAU,CAACJ,UAAU,CAAC;AAoB5B,OAAO,MAAMK,cAAc,GAAGA,CAAA,KAAM;EAClC,MAAMC,mBAAmB,GAAGrB,sBAAsB,CAAC,CAAC;EAEpD,OAAOD,OAAO,CAAC,MAAM;IACnB,MAAMuB,QAAQ,GAAIP,UAAkB,IAClCD,qBAAqB,CAAC;MACpBC,UAAU;MACVC,kBAAkB,EAAEK,mBAAmB,CAACE;IAC1C,CAAC,CAAC;IAKJ,MAAMC,UAAU,GAAG,GACjBF,QAAQ,C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,mBAAmB,CAACmE;MAC7B,CAAC;MAIDC,eAAe,EAAE;QACf7D,KAAK,EAAEP,mBAAmB,CAACQ,0BAA0B;QACrDC,UAAU,EAAET,mBAAmB,CAACU,oBAAoB;QACpDC,QAAQ,EAAEX,mBAAmB,CAACI,kBAAkB;QAChDQ,UAAU,EAAEZ,mBAAmB,CAACa,oBAAoB;QACpDV;MACF,CAAC;MAEDkE,YAAY,EAAE;QASZC,SAAS,EAAEtE,mBAAmB,CAACuE,WAAW;QAC1ChE,KAAK,EAAEP,mBAAmB,CAACmE,mBAAmB;QAC9C1D,UAAU,EAAET,mBAAmB,CAACU,oBAAoB;QACpDC,QAAQ,EAAEX,mBAAmB,CAACI,kBAAkB;QAChDQ,UAAU,EAAEZ,mBAAmB,CAACa,oBAAoB;QACpDV;MACF;IACF,CAAC;EACH,CAAC,EAAE,CAACH,mBAAmB,CAAC,CAAC;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chartTypes.js","names":[],"sources":["../../../src/Charts/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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatChartValue.js","names":["resolveChartLocale","numberFormatOptionsByPreset","compact","notation","decimal","percent","style","formatChartValue","format","languageCode","value","Intl","NumberFormat"],"sources":["../../../src/Charts/formatChartValue.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 { resolveChartLocale } from \"./resolveChartLocale.js\";\n\n/**\n * The `Intl.NumberFormat` options for each preset name. The preset union type\n * {@link ChartValueFormat} takes its members from the keys of this object.\n * This keeps the two lists in agreement. If a name exists in the union but\n * not here, it resolves to `undefined` options. The value then formats as a\n * plain decimal. The code gives no error.\n */\nconst numberFormatOptionsByPreset = {\n compact: { notation: \"compact\" },\n decimal: {},\n percent: { style: \"percent\" },\n} as const satisfies Record<string, Intl.NumberFormatOptions>;\n\n/**\n * The named presets accepted by {@link ChartValueFormat}.\n *\n * - `\"decimal\"` renders the value in full, for example `1,234.5`.\n * - `\"compact\"` shortens large values, for example `1.2K`.\n * - `\"percent\"` multiplies the value by 100 and adds a percent sign. For\n * example, `0.4567` renders as `46%`. Supply the value as a fraction, not\n * as a percentage that is already scaled to 100. If the value is already\n * scaled, the preset scales it twice. For example, `42` renders as\n * `4,200%`.\n */\nexport type ChartValueFormatPreset = keyof typeof numberFormatOptionsByPreset;\n\n/**\n * A chart renders a value in this currency.\n */\nexport type ChartValueCurrencyFormat = {\n /**\n * An ISO 4217 currency code such as `\"USD\"` or `\"JPY\"`.\n */\n currency: string;\n style: \"currency\";\n};\n\n/**\n * A chart value format is one of three kinds: a named preset, an explicit\n * currency, or a function. A function takes the raw number and returns a\n * string. A function gives the caller full control over the presentation.\n *\n * The presets are a closed set. They do not use the general type\n * `Intl.NumberFormatOptions`. That type allows combinations that fail when\n * the code builds them. For example, `{ style: \"currency\" }` without a\n * `currency` field passes the type check. However, it raises a `TypeError`\n * at construction. A caller that needs options outside the preset set can\n * pass a function instead.\n */\nexport type ChartValueFormat =\n | ChartValueFormatPreset\n | ChartValueCurrencyFormat\n | ((value: number) => string);\n\n/**\n * Props for {@link formatChartValue}.\n */\nexport type FormatChartValueProps = {\n /**\n * How to format the value.\n * @default \"decimal\"\n */\n format?: ChartValueFormat;\n /**\n * A language code from the Odyssey translation context, such as `\"en\"` or\n * `\"pt_BR\"`. The function converts the language code to a BCP 47 tag\n * before the value reaches `Intl`.\n */\n languageCode: string;\n /** The number to format. */\n value: number;\n};\n\n/**\n * Formats a single chart value into a locale aware string.\n *\n * When `format` is a function, the code calls it with `value`. The code\n * returns the result directly and ignores `languageCode`. A caller that\n * supplies a function controls the full presentation of the value.\n * Otherwise, the function formats the value with an `Intl.NumberFormat`\n * instance. It builds the instance from the resolved locale and the\n * requested preset or currency.\n */\nexport const formatChartValue = ({\n format = \"decimal\",\n languageCode,\n value,\n}: FormatChartValueProps): string => {\n if (typeof format === \"function\") {\n return format(value);\n }\n\n return new Intl.NumberFormat(\n resolveChartLocale(languageCode),\n typeof format === \"string\" ? numberFormatOptionsByPreset[format] : format,\n ).format(value);\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,kBAAkB,QAAQ,yBAAyB;AAS5D,MAAMC,2BAA2B,GAAG;EAClCC,OAAO,EAAE;IAAEC,QAAQ,EAAE;EAAU,CAAC;EAChCC,OAAO,EAAE,CAAC,CAAC;EACXC,OAAO,EAAE;IAAEC,KAAK,EAAE;EAAU;AAC9B,CAA6D;AAwE7D,OAAO,MAAMC,gBAAgB,GAAGA,CAAC;EAC/BC,MAAM,GAAG,SAAS;EAClBC,YAAY;EACZC;AACqB,CAAC,KAAa;EACnC,IAAI,OAAOF,MAAM,KAAK,UAAU,EAAE;IAChC,OAAOA,MAAM,CAACE,KAAK,CAAC;EACtB;EAEA,OAAO,IAAIC,IAAI,CAACC,YAAY,CAC1BZ,kBAAkB,CAACS,YAAY,CAAC,EAChC,OAAOD,MAAM,KAAK,QAAQ,GAAGP,2BAA2B,CAACO,MAAM,CAAC,GAAGA,MACrE,CAAC,CAACA,MAAM,CAACE,KAAK,CAAC;AACjB,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getChartSeriesPointData.js","names":["getChartSeriesPointData","categories","chartSeries","formatValue","onPointClick","pointPopoverValueFormat","data","length","Error","name","map","value","valueIndex","custom","formattedValue","format","y","events","click","category","seriesName"],"sources":["../../../src/Charts/getChartSeriesPointData.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 {\n ChartPoint,\n ChartPointDecoration,\n ChartSeries,\n} from \"./chartTypes.js\";\nimport type { ChartValueFormat } from \"./formatChartValue.js\";\nimport type { ChartValueFormatter } from \"./useChartValueFormatter.js\";\n\n/**\n * One point of a series that plots against a category axis. The category axis\n * gives the position, so the point holds only its value.\n *\n * Highcharts names the value axis `y` for a line chart and also for a\n * horizontal bar chart, because a bar chart inverts the drawing and not the\n * data. So `y` means the measured value here, and not a vertical position.\n *\n * A chart that needs a position on both axes, such as a scatter chart, takes a\n * point type of its own that adds `x`. That type shares\n * `ChartPointDecoration` and does not extend this type.\n */\nexport type ChartSeriesPointDatum = ChartPointDecoration & {\n y: number;\n};\n\nexport type GetChartSeriesPointDataProps = {\n categories: string[];\n chartSeries: ChartSeries;\n formatValue: ChartValueFormatter;\n onPointClick?: (point: ChartPoint) => void;\n pointPopoverValueFormat?: ChartValueFormat;\n};\n\n/**\n * Returns one data point for each entry in `categories`, lined up by index\n * with `chartSeries.data`. A `null` entry in `chartSeries.data` returns\n * `null`. Highcharts then draws a gap, instead of a point with the value\n * zero.\n *\n * The function throws if `chartSeries.data` and `categories` have different\n * lengths. A value with no matching category has no position on the axis. If\n * the chart silently cut or padded the series to fit, the chart would look\n * correct while showing the wrong data. Throwing catches the mistake instead.\n */\nexport const getChartSeriesPointData = ({\n categories,\n chartSeries,\n formatValue,\n onPointClick,\n pointPopoverValueFormat,\n}: GetChartSeriesPointDataProps): Array<ChartSeriesPointDatum | null> => {\n if (chartSeries.data.length !== categories.length) {\n throw new Error(\n `Series \"${chartSeries.name}\" has ${chartSeries.data.length} values, but the chart has ${categories.length} categories. Series data and categories must have the same length.`,\n );\n }\n\n return chartSeries.data.map((value, valueIndex) => {\n if (value === null) {\n return null;\n }\n\n return {\n custom: {\n formattedValue: formatValue({\n format: pointPopoverValueFormat,\n value,\n }),\n },\n y: value,\n ...(onPointClick\n ? {\n events: {\n click: () =>\n onPointClick({\n category: categories[valueIndex],\n seriesName: chartSeries.name,\n value,\n }),\n },\n }\n : {}),\n };\n });\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GA6CA,OAAO,MAAMA,uBAAuB,GAAGA,CAAC;EACtCC,UAAU;EACVC,WAAW;EACXC,WAAW;EACXC,YAAY;EACZC;AAC4B,CAAC,KAA0C;EACvE,IAAIH,WAAW,CAACI,IAAI,CAACC,MAAM,KAAKN,UAAU,CAACM,MAAM,EAAE;IACjD,MAAM,IAAIC,KAAK,CACb,WAAWN,WAAW,CAACO,IAAI,SAASP,WAAW,CAACI,IAAI,CAACC,MAAM,8BAA8BN,UAAU,CAACM,MAAM,oEAC5G,CAAC;EACH;EAEA,OAAOL,WAAW,CAACI,IAAI,CAACI,GAAG,CAAC,CAACC,KAAK,EAAEC,UAAU,KAAK;IACjD,IAAID,KAAK,KAAK,IAAI,EAAE;MAClB,OAAO,IAAI;IACb;IAEA,OAAO;MACLE,MAAM,EAAE;QACNC,cAAc,EAAEX,WAAW,CAAC;UAC1BY,MAAM,EAAEV,uBAAuB;UAC/BM;QACF,CAAC;MACH,CAAC;MACDK,CAAC,EAAEL,KAAK;MACR,IAAIP,YAAY,GACZ;QACEa,MAAM,EAAE;UACNC,KAAK,EAAEA,CAAA,KACLd,YAAY,CAAC;YACXe,QAAQ,EAAElB,UAAU,CAACW,UAAU,CAAC;YAChCQ,UAAU,EAAElB,WAAW,CAACO,IAAI;YAC5BE;UACF,CAAC;QACL;MACF,CAAC,GACD,CAAC,CAAC;IACR,CAAC;EACH,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasDuplicateSeries.js","names":["hasDuplicateSeries","series","Set","map","chartSeries","name","size","length"],"sources":["../../../src/Charts/hasDuplicateSeries.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 { ChartSeries } from \"./chartTypes.js\";\n\nexport type HasDuplicateSeriesProps = {\n series: ChartSeries[];\n};\n\n/**\n * Returns `true` when two or more series share one name.\n *\n * A chart uses the name of a series as its React key and as its legend label.\n * When two series share one name, React drops one of them, and the chart draws\n * fewer lines than the data holds.\n */\nexport const hasDuplicateSeries = ({ series }: HasDuplicateSeriesProps) =>\n new Set(series.map((chartSeries) => chartSeries.name)).size !== series.length;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAeA,OAAO,MAAMA,kBAAkB,GAAGA,CAAC;EAAEC;AAAgC,CAAC,KACpE,IAAIC,GAAG,CAACD,MAAM,CAACE,GAAG,CAAEC,WAAW,IAAKA,WAAW,CAACC,IAAI,CAAC,CAAC,CAACC,IAAI,KAAKL,MAAM,CAACM,MAAM","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["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 type { ChartPoint, ChartSeries } from \"./chartTypes.js\";\nexport { type ChartValueFormat } from \"./formatChartValue.js\";\nexport { LineChart, type LineChartProps } from \"./LineChart.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,SAAS,QAA6B,gBAAgB","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveChartLocale.js","names":["FALLBACK_LOCALE","resolveChartLocale","languageCode","Intl","getCanonicalLocales","replaceAll"],"sources":["../../../src/Charts/resolveChartLocale.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\nconst FALLBACK_LOCALE = \"en-US\";\n\n/**\n * The function converts a language code from the Odyssey translation\n * context to a BCP 47 locale tag. `Intl` constructors accept this tag.\n *\n * Okta's translation codes use an underscore to separate the region\n * subtag, for example `pt_BR`, `zh_CN`, and `nl_NL`. Every `Intl`\n * constructor rejects these codes with a `RangeError`. The Applitools test\n * environment reports the code `en-us@posix`. This code has no BCP 47\n * equivalent. As a result, six of the codes in `SupportedLanguages` crash\n * an unguarded `Intl` call.\n *\n * If a code has no valid equivalent, the function returns `en-US` instead\n * of raising an error. A chart with the wrong thousands separator is still\n * better than a chart that fails to render.\n */\nexport const resolveChartLocale = (languageCode: string): string => {\n try {\n return (\n Intl.getCanonicalLocales(languageCode.replaceAll(\"_\", \"-\"))[0] ??\n FALLBACK_LOCALE\n );\n } catch {\n return FALLBACK_LOCALE;\n }\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,eAAe,GAAG,OAAO;AAiB/B,OAAO,MAAMC,kBAAkB,GAAIC,YAAoB,IAAa;EAClE,IAAI;IACF,OACEC,IAAI,CAACC,mBAAmB,CAACF,YAAY,CAACG,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAC9DL,eAAe;EAEnB,CAAC,CAAC,MAAM;IACN,OAAOA,eAAe;EACxB;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useChartValueFormatter.js","names":["useCallback","useTranslation","formatChartValue","useChartValueFormatter","i18n","languageCode","language","format","value"],"sources":["../../../src/Charts/useChartValueFormatter.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 { useCallback } from \"react\";\n\nimport { useTranslation } from \"../i18n.generated/i18n.js\";\nimport {\n formatChartValue,\n type FormatChartValueProps,\n} from \"./formatChartValue.js\";\n\n/**\n * The formatter functions from {@link useChartValueFormatter} accept these\n * props. The props match {@link FormatChartValueProps}, but without\n * `languageCode`. The hook binds the `languageCode` field from context.\n */\nexport type ChartValueFormatterProps = Omit<\n FormatChartValueProps,\n \"languageCode\"\n>;\n\n/**\n * Formats a chart value with the active locale.\n */\nexport type ChartValueFormatter = (props: ChartValueFormatterProps) => string;\n\n/**\n * The hook reads the active language code from the Odyssey translation\n * context. The hook returns a version of {@link formatChartValue} that uses\n * that locale. A consumer only needs to supply `value` and an optional\n * `format`.\n *\n * The returned function stays referentially stable while the active\n * language stays the same. This makes it safe to add as a dependency of a\n * consumer's `useMemo`.\n */\nexport const useChartValueFormatter = (): ChartValueFormatter => {\n const { i18n } = useTranslation();\n const languageCode = i18n.language;\n\n return useCallback<ChartValueFormatter>(\n ({ format, value }) => formatChartValue({ format, languageCode, value }),\n [languageCode],\n );\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,cAAc,QAAQ,2BAA2B;AAC1D,SACEC,gBAAgB,QAEX,uBAAuB;AA2B9B,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAA2B;EAC/D,MAAM;IAAEC;EAAK,CAAC,GAAGH,cAAc,CAAC,CAAC;EACjC,MAAMI,YAAY,GAAGD,IAAI,CAACE,QAAQ;EAElC,OAAON,WAAW,CAChB,CAAC;IAAEO,MAAM;IAAEC;EAAM,CAAC,KAAKN,gBAAgB,CAAC;IAAEK,MAAM;IAAEF,YAAY;IAAEG;EAAM,CAAC,CAAC,EACxE,CAACH,YAAY,CACf,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useStableValue.js","names":["isEqual","useRef","useStableValue","value","stableValueRef","current"],"sources":["../../../src/Charts/useStableValue.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 isEqual from \"lodash.isequal\";\nimport { useRef } from \"react\";\n\n/**\n * Returns the same object for as long as the contents of `value` stay the same.\n * The hook returns the new object after a content change.\n *\n * A chart needs this hook because the chart library rebuilds and redraws the\n * whole chart when the identity of its React children changes. A caller that\n * builds a `series` array inside its own render supplies a new array on each\n * render, and every memo below that point then misses. A comparison of the\n * contents costs one walk over the points, which is far less than one redraw of\n * the chart.\n *\n * The comparison treats a function by its identity, because two functions with\n * the same body can still behave differently. Therefore a caller that supplies a\n * new function on each render, such as an inline formatter, gets a new object\n * from this hook on each render.\n */\nexport const useStableValue = <ValueType>(value: ValueType): ValueType => {\n // This hook writes to the ref during the render. The write is safe here\n // because the new value comes only from `value`, so a second render with the\n // same input reaches the same result.\n const stableValueRef = useRef(value);\n\n if (!isEqual(stableValueRef.current, value)) {\n stableValueRef.current = value;\n }\n\n return stableValueRef.current;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,OAAO,MAAM,gBAAgB;AACpC,SAASC,MAAM,QAAQ,OAAO;AAkB9B,OAAO,MAAMC,cAAc,GAAeC,KAAgB,IAAgB;EAIxE,MAAMC,cAAc,GAAGH,MAAM,CAACE,KAAK,CAAC;EAEpC,IAAI,CAACH,OAAO,CAACI,cAAc,CAACC,OAAO,EAAEF,KAAK,CAAC,EAAE;IAC3CC,cAAc,CAACC,OAAO,GAAGF,KAAK;EAChC;EAEA,OAAOC,cAAc,CAACC,OAAO;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartError.d.ts","sourceRoot":"","sources":["../../../src/Charts/ChartError.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,yCAAyC;AACzC,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AA2DF,QAAA,MAAM,kBAAkB,oDArBS,eAAe,sDAqBL,CAAC;AAG5C,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartFrame.d.ts","sourceRoot":"","sources":["../../../src/Charts/ChartFrame.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAQ,KAAK,YAAY,EAAS,MAAM,OAAO,CAAC;AAQvD,mCAAmC;AACnC,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA2HF,QAAA,MAAM,kBAAkB,qGA3CrB,eAAe,sDA2CyB,CAAC;AAG5C,OAAO,EAAE,kBAAkB,IAAI,UAAU,EAAE,CAAC"}
|