@okta/odyssey-react-mui 1.72.0 → 1.73.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.
Files changed (693) hide show
  1. package/README.md +15 -5
  2. package/dist/cjs/Accordion.cjs +1 -1
  3. package/dist/cjs/AnimationContext.cjs +1 -1
  4. package/dist/cjs/Autocomplete.cjs +1 -1
  5. package/dist/cjs/Badge.cjs +1 -1
  6. package/dist/cjs/Banner.cjs +1 -1
  7. package/dist/cjs/Box.cjs +1 -1
  8. package/dist/cjs/Breadcrumbs.cjs +1 -1
  9. package/dist/cjs/Buttons/BaseButton.cjs +1 -1
  10. package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
  11. package/dist/cjs/Buttons/Button.cjs +1 -1
  12. package/dist/cjs/Buttons/MenuButton.cjs +1 -1
  13. package/dist/cjs/Buttons/MenuItem.cjs +1 -1
  14. package/dist/cjs/Callout.cjs +1 -1
  15. package/dist/cjs/Card.cjs +1 -1
  16. package/dist/cjs/CircularProgress.cjs +1 -1
  17. package/dist/cjs/ConditionalWrapper.cjs +1 -1
  18. package/dist/cjs/DataTable/DataTable.cjs +1 -1
  19. package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
  20. package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
  21. package/dist/cjs/DatePickers/DateField.cjs +1 -1
  22. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
  23. package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
  24. package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
  25. package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
  26. package/dist/cjs/Dialog.cjs +1 -1
  27. package/dist/cjs/Drawer.cjs +2 -1
  28. package/dist/cjs/Drawer.cjs.map +1 -1
  29. package/dist/cjs/EmptyState.cjs +1 -1
  30. package/dist/cjs/ErrorMessageList.cjs +1 -1
  31. package/dist/cjs/Field.cjs +1 -1
  32. package/dist/cjs/FieldError.cjs +1 -1
  33. package/dist/cjs/FieldHint.cjs +1 -1
  34. package/dist/cjs/FieldLabel.cjs +1 -1
  35. package/dist/cjs/Fields/Checkbox.cjs +1 -1
  36. package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
  37. package/dist/cjs/Fields/Radio.cjs +1 -1
  38. package/dist/cjs/Fields/RadioGroup.cjs +1 -1
  39. package/dist/cjs/Fieldset.cjs +1 -1
  40. package/dist/cjs/FileUploader/FileUploadIllustration.cjs +1 -1
  41. package/dist/cjs/FileUploader/FileUploadPreview.cjs +1 -1
  42. package/dist/cjs/FileUploader/FileUploader.cjs +1 -1
  43. package/dist/cjs/Form.cjs +1 -1
  44. package/dist/cjs/FullScreenOverlay.cjs +4 -1
  45. package/dist/cjs/FullScreenOverlay.cjs.map +1 -1
  46. package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
  47. package/dist/cjs/HintLink.cjs +1 -1
  48. package/dist/cjs/IconWithTooltip.cjs +1 -1
  49. package/dist/cjs/Link.cjs +1 -1
  50. package/dist/cjs/MuiPropsChild.cjs +1 -1
  51. package/dist/cjs/NativeSelect.cjs +1 -1
  52. package/dist/cjs/OdysseyCacheProvider.cjs +11 -2
  53. package/dist/cjs/OdysseyCacheProvider.cjs.map +1 -1
  54. package/dist/cjs/OdysseyProvider.cjs +8 -1
  55. package/dist/cjs/OdysseyProvider.cjs.map +1 -1
  56. package/dist/cjs/OdysseyThemeProvider.cjs +61 -28
  57. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  58. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
  59. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs.map +1 -1
  60. package/dist/cjs/Pagination/Pagination.cjs +37 -35
  61. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  62. package/dist/cjs/PasswordField.cjs +1 -1
  63. package/dist/cjs/ScreenReaderText.cjs +1 -1
  64. package/dist/cjs/SearchField.cjs +1 -1
  65. package/dist/cjs/Select.cjs +1 -1
  66. package/dist/cjs/Stack.cjs +1 -1
  67. package/dist/cjs/Status.cjs +1 -1
  68. package/dist/cjs/Surface.cjs +1 -1
  69. package/dist/cjs/Switch.cjs +3 -3
  70. package/dist/cjs/Switch.cjs.map +1 -1
  71. package/dist/cjs/Tabs.cjs +1 -1
  72. package/dist/cjs/Tag.cjs +31 -23
  73. package/dist/cjs/Tag.cjs.map +1 -1
  74. package/dist/cjs/TagList.cjs +1 -1
  75. package/dist/cjs/TextField.cjs +1 -1
  76. package/dist/cjs/Toast.cjs +1 -1
  77. package/dist/cjs/ToastStack.cjs +1 -1
  78. package/dist/cjs/Tooltip.cjs +1 -1
  79. package/dist/cjs/Typography.cjs +12 -12
  80. package/dist/cjs/charts/BarChart.cjs +1 -1
  81. package/dist/cjs/charts/LineChart.cjs +1 -1
  82. package/dist/cjs/charts/components/ChartError.cjs +1 -1
  83. package/dist/cjs/charts/components/ChartFrame.cjs +1 -1
  84. package/dist/cjs/charts/components/ChartPopoverContent.cjs +1 -1
  85. package/dist/cjs/fullscreen/FullscreenButton.cjs +1 -1
  86. package/dist/cjs/fullscreen/FullscreenRegion.cjs +1 -1
  87. package/dist/cjs/{getTypedObjectKeys.cjs → getActionTintChannel.cjs} +7 -6
  88. package/dist/cjs/getActionTintChannel.cjs.map +1 -0
  89. package/dist/cjs/getColorSchemeDesignTokensOverride.cjs +33 -0
  90. package/dist/cjs/getColorSchemeDesignTokensOverride.cjs.map +1 -0
  91. package/dist/cjs/getDropShadowFilter.cjs +22 -0
  92. package/dist/cjs/getDropShadowFilter.cjs.map +1 -0
  93. package/dist/cjs/icons.generated/Add.cjs +1 -1
  94. package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
  95. package/dist/cjs/icons.generated/Apps.cjs +1 -1
  96. package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
  97. package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
  98. package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
  99. package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
  100. package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
  101. package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
  102. package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
  103. package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
  104. package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
  105. package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
  106. package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
  107. package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
  108. package/dist/cjs/icons.generated/Bug.cjs +1 -1
  109. package/dist/cjs/icons.generated/Calendar.cjs +1 -1
  110. package/dist/cjs/icons.generated/Call.cjs +1 -1
  111. package/dist/cjs/icons.generated/Chat.cjs +1 -1
  112. package/dist/cjs/icons.generated/Check.cjs +1 -1
  113. package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
  114. package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
  115. package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
  116. package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
  117. package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
  118. package/dist/cjs/icons.generated/Clock.cjs +1 -1
  119. package/dist/cjs/icons.generated/Close.cjs +1 -1
  120. package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
  121. package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
  122. package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
  123. package/dist/cjs/icons.generated/Copy.cjs +1 -1
  124. package/dist/cjs/icons.generated/Customizations.cjs +1 -1
  125. package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
  126. package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
  127. package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
  128. package/dist/cjs/icons.generated/Delete.cjs +1 -1
  129. package/dist/cjs/icons.generated/Deny.cjs +1 -1
  130. package/dist/cjs/icons.generated/Devices.cjs +1 -1
  131. package/dist/cjs/icons.generated/Directory.cjs +1 -1
  132. package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
  133. package/dist/cjs/icons.generated/Documentation.cjs +1 -1
  134. package/dist/cjs/icons.generated/Download.cjs +1 -1
  135. package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
  136. package/dist/cjs/icons.generated/Edit.cjs +1 -1
  137. package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
  138. package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
  139. package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
  140. package/dist/cjs/icons.generated/Filter.cjs +1 -1
  141. package/dist/cjs/icons.generated/Folder.cjs +1 -1
  142. package/dist/cjs/icons.generated/FullscreenEnter.cjs +1 -1
  143. package/dist/cjs/icons.generated/FullscreenExit.cjs +1 -1
  144. package/dist/cjs/icons.generated/Globe.cjs +1 -1
  145. package/dist/cjs/icons.generated/Grid.cjs +1 -1
  146. package/dist/cjs/icons.generated/Group.cjs +1 -1
  147. package/dist/cjs/icons.generated/Happy.cjs +1 -1
  148. package/dist/cjs/icons.generated/Hide.cjs +1 -1
  149. package/dist/cjs/icons.generated/Home.cjs +1 -1
  150. package/dist/cjs/icons.generated/HomeSelected.cjs +1 -1
  151. package/dist/cjs/icons.generated/IdentityGovernance.cjs +1 -1
  152. package/dist/cjs/icons.generated/IdentityGovernanceSelected.cjs +1 -1
  153. package/dist/cjs/icons.generated/InformationCircle.cjs +1 -1
  154. package/dist/cjs/icons.generated/InformationCircleFilled.cjs +1 -1
  155. package/dist/cjs/icons.generated/Link.cjs +1 -1
  156. package/dist/cjs/icons.generated/List.cjs +1 -1
  157. package/dist/cjs/icons.generated/Lock.cjs +1 -1
  158. package/dist/cjs/icons.generated/Menu.cjs +1 -1
  159. package/dist/cjs/icons.generated/More.cjs +1 -1
  160. package/dist/cjs/icons.generated/Neutral.cjs +1 -1
  161. package/dist/cjs/icons.generated/Notification.cjs +1 -1
  162. package/dist/cjs/icons.generated/Pause.cjs +1 -1
  163. package/dist/cjs/icons.generated/QuestionCircle.cjs +1 -1
  164. package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +1 -1
  165. package/dist/cjs/icons.generated/Refresh.cjs +1 -1
  166. package/dist/cjs/icons.generated/Reports.cjs +1 -1
  167. package/dist/cjs/icons.generated/ReportsSelected.cjs +1 -1
  168. package/dist/cjs/icons.generated/Reset.cjs +1 -1
  169. package/dist/cjs/icons.generated/Resume.cjs +1 -1
  170. package/dist/cjs/icons.generated/Sad.cjs +1 -1
  171. package/dist/cjs/icons.generated/Same.cjs +1 -1
  172. package/dist/cjs/icons.generated/Search.cjs +1 -1
  173. package/dist/cjs/icons.generated/Security.cjs +1 -1
  174. package/dist/cjs/icons.generated/SecuritySelected.cjs +1 -1
  175. package/dist/cjs/icons.generated/Send.cjs +1 -1
  176. package/dist/cjs/icons.generated/Server.cjs +1 -1
  177. package/dist/cjs/icons.generated/Settings.cjs +1 -1
  178. package/dist/cjs/icons.generated/SettingsSelected.cjs +1 -1
  179. package/dist/cjs/icons.generated/Show.cjs +1 -1
  180. package/dist/cjs/icons.generated/Sparkle.cjs +1 -1
  181. package/dist/cjs/icons.generated/Subtract.cjs +1 -1
  182. package/dist/cjs/icons.generated/Sync.cjs +1 -1
  183. package/dist/cjs/icons.generated/ThumbsDown.cjs +1 -1
  184. package/dist/cjs/icons.generated/ThumbsUp.cjs +1 -1
  185. package/dist/cjs/icons.generated/Unlock.cjs +1 -1
  186. package/dist/cjs/icons.generated/Upload.cjs +1 -1
  187. package/dist/cjs/icons.generated/User.cjs +1 -1
  188. package/dist/cjs/icons.generated/Video.cjs +1 -1
  189. package/dist/cjs/icons.generated/Warning.cjs +1 -1
  190. package/dist/cjs/icons.generated/WarningFilled.cjs +1 -1
  191. package/dist/cjs/icons.generated/Workflows.cjs +1 -1
  192. package/dist/cjs/icons.generated/WorkflowsSelected.cjs +1 -1
  193. package/dist/cjs/index.cjs +46 -0
  194. package/dist/cjs/index.cjs.map +1 -1
  195. package/dist/cjs/labs/AppTile.cjs +1 -1
  196. package/dist/cjs/labs/DataFilters.cjs +2 -2
  197. package/dist/cjs/labs/DataTablePagination.cjs +1 -1
  198. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
  199. package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
  200. package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
  201. package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
  202. package/dist/cjs/labs/DataView/DataView.cjs +1 -1
  203. package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
  204. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
  205. package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
  206. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
  207. package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
  208. package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
  209. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +1 -1
  210. package/dist/cjs/labs/GroupPicker.cjs +1 -0
  211. package/dist/cjs/labs/GroupPicker.cjs.map +1 -1
  212. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
  213. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
  214. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
  215. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +1 -1
  216. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +1 -1
  217. package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +1 -1
  218. package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
  219. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
  220. package/dist/cjs/labs/PaginatedTable.cjs +1 -1
  221. package/dist/cjs/labs/StaticTable.cjs +1 -1
  222. package/dist/cjs/labs/UserProfile.cjs +1 -1
  223. package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
  224. package/dist/cjs/logos.generated/Duo.cjs +1 -1
  225. package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
  226. package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
  227. package/dist/cjs/logos.generated/Persona.cjs +1 -1
  228. package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
  229. package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
  230. package/dist/cjs/message-bus/messageGuards.cjs +1 -5
  231. package/dist/cjs/message-bus/messageGuards.cjs.map +1 -1
  232. package/dist/cjs/properties/ts/odyssey-react-mui.cjs +2 -0
  233. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  234. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +2 -0
  235. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
  236. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +2 -0
  237. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
  238. package/dist/cjs/remUtils.cjs +1 -3
  239. package/dist/cjs/remUtils.cjs.map +1 -1
  240. package/dist/cjs/resolveColorSchemeDesignTokens.cjs +43 -0
  241. package/dist/cjs/resolveColorSchemeDesignTokens.cjs.map +1 -0
  242. package/dist/cjs/test-selectors/index.cjs.map +1 -1
  243. package/dist/cjs/test-selectors/sanityChecks.cjs +1 -19
  244. package/dist/cjs/test-selectors/sanityChecks.cjs.map +1 -1
  245. package/dist/cjs/theme/components/Button.cjs +7 -6
  246. package/dist/cjs/theme/components/Button.cjs.map +1 -1
  247. package/dist/cjs/theme/components/Checkbox.cjs +1 -1
  248. package/dist/cjs/theme/components/Checkbox.cjs.map +1 -1
  249. package/dist/cjs/theme/components/Chip.cjs +3 -1
  250. package/dist/cjs/theme/components/Chip.cjs.map +1 -1
  251. package/dist/cjs/theme/components/Dialog.cjs +6 -2
  252. package/dist/cjs/theme/components/Dialog.cjs.map +1 -1
  253. package/dist/cjs/theme/components/Paper.cjs +3 -0
  254. package/dist/cjs/theme/components/Paper.cjs.map +1 -1
  255. package/dist/cjs/theme/components/Tabs.cjs +7 -11
  256. package/dist/cjs/theme/components/Tabs.cjs.map +1 -1
  257. package/dist/cjs/theme/components/types.cjs.map +1 -1
  258. package/dist/cjs/theme/createOdysseyMuiTheme.cjs +3 -0
  259. package/dist/cjs/theme/createOdysseyMuiTheme.cjs.map +1 -1
  260. package/dist/cjs/theme/palette.cjs +14 -9
  261. package/dist/cjs/theme/palette.cjs.map +1 -1
  262. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +10 -1
  263. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs.map +1 -1
  264. package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -1
  265. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +1 -1
  266. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
  267. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
  268. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
  269. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
  270. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +2 -2
  271. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
  272. package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +1 -1
  273. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +3 -3
  274. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
  275. package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
  276. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
  277. package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
  278. package/dist/cjs/ui-shell/UiShell.cjs +7 -2
  279. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  280. package/dist/cjs/ui-shell/UiShellLogo.cjs +24 -2
  281. package/dist/cjs/ui-shell/UiShellLogo.cjs.map +1 -1
  282. package/dist/cjs/ui-shell/WideUiShellContent.cjs +1 -1
  283. package/dist/cjs/ui-shell/renderUiShell.cjs +15 -0
  284. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  285. package/dist/cjs/useColorScheme.cjs +36 -0
  286. package/dist/cjs/useColorScheme.cjs.map +1 -0
  287. package/dist/cjs/useContrastMode.cjs +5 -4
  288. package/dist/cjs/useContrastMode.cjs.map +1 -1
  289. package/dist/cjs/useThemeCache.cjs +22 -14
  290. package/dist/cjs/useThemeCache.cjs.map +1 -1
  291. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  292. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  293. package/dist/esm/Accordion.js +1 -1
  294. package/dist/esm/AnimationContext.js +1 -1
  295. package/dist/esm/Autocomplete.js +1 -1
  296. package/dist/esm/Badge.js +1 -1
  297. package/dist/esm/Banner.js +1 -1
  298. package/dist/esm/Box.js +1 -1
  299. package/dist/esm/Breadcrumbs.js +1 -1
  300. package/dist/esm/Buttons/BaseButton.js +1 -1
  301. package/dist/esm/Buttons/BaseMenuButton.js +1 -1
  302. package/dist/esm/Buttons/Button.js +1 -1
  303. package/dist/esm/Buttons/MenuButton.js +1 -1
  304. package/dist/esm/Buttons/MenuItem.js +1 -1
  305. package/dist/esm/Callout.js +1 -1
  306. package/dist/esm/Card.js +1 -1
  307. package/dist/esm/CircularProgress.js +1 -1
  308. package/dist/esm/ConditionalWrapper.js +1 -1
  309. package/dist/esm/DataTable/DataTable.js +1 -1
  310. package/dist/esm/DataTable/DataTableRowActions.js +1 -1
  311. package/dist/esm/DataTable/DataTableSettings.js +1 -1
  312. package/dist/esm/DatePickers/DateField.js +1 -1
  313. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  314. package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
  315. package/dist/esm/DatePickers/DatePicker.js +1 -1
  316. package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
  317. package/dist/esm/Dialog.js +1 -1
  318. package/dist/esm/Drawer.js +2 -1
  319. package/dist/esm/Drawer.js.map +1 -1
  320. package/dist/esm/EmptyState.js +1 -1
  321. package/dist/esm/ErrorMessageList.js +1 -1
  322. package/dist/esm/Field.js +1 -1
  323. package/dist/esm/FieldError.js +1 -1
  324. package/dist/esm/FieldHint.js +1 -1
  325. package/dist/esm/FieldLabel.js +1 -1
  326. package/dist/esm/Fields/Checkbox.js +1 -1
  327. package/dist/esm/Fields/CheckboxGroup.js +1 -1
  328. package/dist/esm/Fields/Radio.js +1 -1
  329. package/dist/esm/Fields/RadioGroup.js +1 -1
  330. package/dist/esm/Fieldset.js +1 -1
  331. package/dist/esm/FileUploader/FileUploadIllustration.js +1 -1
  332. package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
  333. package/dist/esm/FileUploader/FileUploader.js +1 -1
  334. package/dist/esm/Form.js +1 -1
  335. package/dist/esm/FullScreenOverlay.js +4 -1
  336. package/dist/esm/FullScreenOverlay.js.map +1 -1
  337. package/dist/esm/FullScreenOverlayContext.js +1 -1
  338. package/dist/esm/HintLink.js +1 -1
  339. package/dist/esm/IconWithTooltip.js +1 -1
  340. package/dist/esm/Link.js +1 -1
  341. package/dist/esm/MuiPropsChild.js +1 -1
  342. package/dist/esm/NativeSelect.js +1 -1
  343. package/dist/esm/OdysseyCacheProvider.js +12 -3
  344. package/dist/esm/OdysseyCacheProvider.js.map +1 -1
  345. package/dist/esm/OdysseyProvider.js +8 -1
  346. package/dist/esm/OdysseyProvider.js.map +1 -1
  347. package/dist/esm/OdysseyThemeProvider.js +61 -26
  348. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  349. package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
  350. package/dist/esm/OdysseyThemeProviderPropsContext.js.map +1 -1
  351. package/dist/esm/Pagination/Pagination.js +37 -35
  352. package/dist/esm/Pagination/Pagination.js.map +1 -1
  353. package/dist/esm/PasswordField.js +1 -1
  354. package/dist/esm/ScreenReaderText.js +1 -1
  355. package/dist/esm/SearchField.js +1 -1
  356. package/dist/esm/Select.js +1 -1
  357. package/dist/esm/Stack.js +1 -1
  358. package/dist/esm/Status.js +1 -1
  359. package/dist/esm/Surface.js +1 -1
  360. package/dist/esm/Switch.js +3 -3
  361. package/dist/esm/Switch.js.map +1 -1
  362. package/dist/esm/Tabs.js +1 -1
  363. package/dist/esm/Tag.js +31 -23
  364. package/dist/esm/Tag.js.map +1 -1
  365. package/dist/esm/TagList.js +1 -1
  366. package/dist/esm/TextField.js +1 -1
  367. package/dist/esm/Toast.js +1 -1
  368. package/dist/esm/ToastStack.js +1 -1
  369. package/dist/esm/Tooltip.js +1 -1
  370. package/dist/esm/Typography.js +12 -12
  371. package/dist/esm/charts/BarChart.js +1 -1
  372. package/dist/esm/charts/LineChart.js +1 -1
  373. package/dist/esm/charts/components/ChartError.js +1 -1
  374. package/dist/esm/charts/components/ChartFrame.js +1 -1
  375. package/dist/esm/charts/components/ChartPopoverContent.js +1 -1
  376. package/dist/esm/fullscreen/FullscreenButton.js +1 -1
  377. package/dist/esm/fullscreen/FullscreenRegion.js +1 -1
  378. package/dist/esm/{getTypedObjectKeys.js → getActionTintChannel.js} +5 -5
  379. package/dist/esm/getActionTintChannel.js.map +1 -0
  380. package/dist/esm/getColorSchemeDesignTokensOverride.js +27 -0
  381. package/dist/esm/getColorSchemeDesignTokensOverride.js.map +1 -0
  382. package/dist/{types/getTypedObjectKeys.d.ts → esm/getDropShadowFilter.js} +6 -4
  383. package/dist/esm/getDropShadowFilter.js.map +1 -0
  384. package/dist/esm/icons.generated/Add.js +1 -1
  385. package/dist/esm/icons.generated/AddCircle.js +1 -1
  386. package/dist/esm/icons.generated/Apps.js +1 -1
  387. package/dist/esm/icons.generated/AppsSelected.js +1 -1
  388. package/dist/esm/icons.generated/ArrowBottom.js +1 -1
  389. package/dist/esm/icons.generated/ArrowDown.js +1 -1
  390. package/dist/esm/icons.generated/ArrowLeft.js +1 -1
  391. package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
  392. package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
  393. package/dist/esm/icons.generated/ArrowRight.js +1 -1
  394. package/dist/esm/icons.generated/ArrowTop.js +1 -1
  395. package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
  396. package/dist/esm/icons.generated/ArrowUp.js +1 -1
  397. package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
  398. package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
  399. package/dist/esm/icons.generated/Bug.js +1 -1
  400. package/dist/esm/icons.generated/Calendar.js +1 -1
  401. package/dist/esm/icons.generated/Call.js +1 -1
  402. package/dist/esm/icons.generated/Chat.js +1 -1
  403. package/dist/esm/icons.generated/Check.js +1 -1
  404. package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
  405. package/dist/esm/icons.generated/ChevronDown.js +1 -1
  406. package/dist/esm/icons.generated/ChevronLeft.js +1 -1
  407. package/dist/esm/icons.generated/ChevronRight.js +1 -1
  408. package/dist/esm/icons.generated/ChevronUp.js +1 -1
  409. package/dist/esm/icons.generated/Clock.js +1 -1
  410. package/dist/esm/icons.generated/Close.js +1 -1
  411. package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
  412. package/dist/esm/icons.generated/CollapseLeft.js +1 -1
  413. package/dist/esm/icons.generated/CollapseRight.js +1 -1
  414. package/dist/esm/icons.generated/Copy.js +1 -1
  415. package/dist/esm/icons.generated/Customizations.js +1 -1
  416. package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
  417. package/dist/esm/icons.generated/DangerDiamond.js +1 -1
  418. package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
  419. package/dist/esm/icons.generated/Delete.js +1 -1
  420. package/dist/esm/icons.generated/Deny.js +1 -1
  421. package/dist/esm/icons.generated/Devices.js +1 -1
  422. package/dist/esm/icons.generated/Directory.js +1 -1
  423. package/dist/esm/icons.generated/DirectorySelected.js +1 -1
  424. package/dist/esm/icons.generated/Documentation.js +1 -1
  425. package/dist/esm/icons.generated/Download.js +1 -1
  426. package/dist/esm/icons.generated/DragIndicator.js +1 -1
  427. package/dist/esm/icons.generated/Edit.js +1 -1
  428. package/dist/esm/icons.generated/ExpandLeft.js +1 -1
  429. package/dist/esm/icons.generated/ExpandRight.js +1 -1
  430. package/dist/esm/icons.generated/ExternalLink.js +1 -1
  431. package/dist/esm/icons.generated/Filter.js +1 -1
  432. package/dist/esm/icons.generated/Folder.js +1 -1
  433. package/dist/esm/icons.generated/FullscreenEnter.js +1 -1
  434. package/dist/esm/icons.generated/FullscreenExit.js +1 -1
  435. package/dist/esm/icons.generated/Globe.js +1 -1
  436. package/dist/esm/icons.generated/Grid.js +1 -1
  437. package/dist/esm/icons.generated/Group.js +1 -1
  438. package/dist/esm/icons.generated/Happy.js +1 -1
  439. package/dist/esm/icons.generated/Hide.js +1 -1
  440. package/dist/esm/icons.generated/Home.js +1 -1
  441. package/dist/esm/icons.generated/HomeSelected.js +1 -1
  442. package/dist/esm/icons.generated/IdentityGovernance.js +1 -1
  443. package/dist/esm/icons.generated/IdentityGovernanceSelected.js +1 -1
  444. package/dist/esm/icons.generated/InformationCircle.js +1 -1
  445. package/dist/esm/icons.generated/InformationCircleFilled.js +1 -1
  446. package/dist/esm/icons.generated/Link.js +1 -1
  447. package/dist/esm/icons.generated/List.js +1 -1
  448. package/dist/esm/icons.generated/Lock.js +1 -1
  449. package/dist/esm/icons.generated/Menu.js +1 -1
  450. package/dist/esm/icons.generated/More.js +1 -1
  451. package/dist/esm/icons.generated/Neutral.js +1 -1
  452. package/dist/esm/icons.generated/Notification.js +1 -1
  453. package/dist/esm/icons.generated/Pause.js +1 -1
  454. package/dist/esm/icons.generated/QuestionCircle.js +1 -1
  455. package/dist/esm/icons.generated/QuestionCircleFilled.js +1 -1
  456. package/dist/esm/icons.generated/Refresh.js +1 -1
  457. package/dist/esm/icons.generated/Reports.js +1 -1
  458. package/dist/esm/icons.generated/ReportsSelected.js +1 -1
  459. package/dist/esm/icons.generated/Reset.js +1 -1
  460. package/dist/esm/icons.generated/Resume.js +1 -1
  461. package/dist/esm/icons.generated/Sad.js +1 -1
  462. package/dist/esm/icons.generated/Same.js +1 -1
  463. package/dist/esm/icons.generated/Search.js +1 -1
  464. package/dist/esm/icons.generated/Security.js +1 -1
  465. package/dist/esm/icons.generated/SecuritySelected.js +1 -1
  466. package/dist/esm/icons.generated/Send.js +1 -1
  467. package/dist/esm/icons.generated/Server.js +1 -1
  468. package/dist/esm/icons.generated/Settings.js +1 -1
  469. package/dist/esm/icons.generated/SettingsSelected.js +1 -1
  470. package/dist/esm/icons.generated/Show.js +1 -1
  471. package/dist/esm/icons.generated/Sparkle.js +1 -1
  472. package/dist/esm/icons.generated/Subtract.js +1 -1
  473. package/dist/esm/icons.generated/Sync.js +1 -1
  474. package/dist/esm/icons.generated/ThumbsDown.js +1 -1
  475. package/dist/esm/icons.generated/ThumbsUp.js +1 -1
  476. package/dist/esm/icons.generated/Unlock.js +1 -1
  477. package/dist/esm/icons.generated/Upload.js +1 -1
  478. package/dist/esm/icons.generated/User.js +1 -1
  479. package/dist/esm/icons.generated/Video.js +1 -1
  480. package/dist/esm/icons.generated/Warning.js +1 -1
  481. package/dist/esm/icons.generated/WarningFilled.js +1 -1
  482. package/dist/esm/icons.generated/Workflows.js +1 -1
  483. package/dist/esm/icons.generated/WorkflowsSelected.js +1 -1
  484. package/dist/esm/index.js +4 -0
  485. package/dist/esm/index.js.map +1 -1
  486. package/dist/esm/labs/AppTile.js +1 -1
  487. package/dist/esm/labs/DataFilters.js +2 -2
  488. package/dist/esm/labs/DataTablePagination.js +1 -1
  489. package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
  490. package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
  491. package/dist/esm/labs/DataView/DataCard.js +1 -1
  492. package/dist/esm/labs/DataView/DataTable.js +1 -1
  493. package/dist/esm/labs/DataView/DataView.js +1 -1
  494. package/dist/esm/labs/DataView/DetailPanel.js +1 -1
  495. package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
  496. package/dist/esm/labs/DataView/RowActions.js +1 -1
  497. package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
  498. package/dist/esm/labs/DataView/TableSettings.js +1 -1
  499. package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
  500. package/dist/esm/labs/DatePickers/DateTimePicker.js +1 -1
  501. package/dist/esm/labs/GroupPicker.js +1 -0
  502. package/dist/esm/labs/GroupPicker.js.map +1 -1
  503. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
  504. package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
  505. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
  506. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
  507. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +1 -1
  508. package/dist/esm/labs/PageTemplate/DocumentationLink.js +1 -1
  509. package/dist/esm/labs/PageTemplate/Layout.js +1 -1
  510. package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
  511. package/dist/esm/labs/PaginatedTable.js +1 -1
  512. package/dist/esm/labs/StaticTable.js +1 -1
  513. package/dist/esm/labs/UserProfile.js +1 -1
  514. package/dist/esm/labs/UserProfileMenuButton.js +1 -1
  515. package/dist/esm/logos.generated/Duo.js +1 -1
  516. package/dist/esm/logos.generated/GoogleAuth.js +1 -1
  517. package/dist/esm/logos.generated/OktaVerify.js +1 -1
  518. package/dist/esm/logos.generated/Persona.js +1 -1
  519. package/dist/esm/logos.generated/SymantecVip.js +1 -1
  520. package/dist/esm/logos.generated/Yubikey.js +1 -1
  521. package/dist/esm/message-bus/messageGuards.js +0 -2
  522. package/dist/esm/message-bus/messageGuards.js.map +1 -1
  523. package/dist/esm/properties/ts/odyssey-react-mui.js +2 -0
  524. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  525. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +2 -0
  526. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  527. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +2 -0
  528. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  529. package/dist/esm/remUtils.js +0 -1
  530. package/dist/esm/remUtils.js.map +1 -1
  531. package/dist/esm/resolveColorSchemeDesignTokens.js +37 -0
  532. package/dist/esm/resolveColorSchemeDesignTokens.js.map +1 -0
  533. package/dist/esm/test-selectors/index.js.map +1 -1
  534. package/dist/esm/test-selectors/sanityChecks.js +0 -15
  535. package/dist/esm/test-selectors/sanityChecks.js.map +1 -1
  536. package/dist/esm/theme/components/Button.js +7 -6
  537. package/dist/esm/theme/components/Button.js.map +1 -1
  538. package/dist/esm/theme/components/Checkbox.js +1 -1
  539. package/dist/esm/theme/components/Checkbox.js.map +1 -1
  540. package/dist/esm/theme/components/Chip.js +3 -1
  541. package/dist/esm/theme/components/Chip.js.map +1 -1
  542. package/dist/esm/theme/components/Dialog.js +6 -2
  543. package/dist/esm/theme/components/Dialog.js.map +1 -1
  544. package/dist/esm/theme/components/Paper.js +3 -0
  545. package/dist/esm/theme/components/Paper.js.map +1 -1
  546. package/dist/esm/theme/components/Tabs.js +7 -11
  547. package/dist/esm/theme/components/Tabs.js.map +1 -1
  548. package/dist/esm/theme/components/types.js.map +1 -1
  549. package/dist/esm/theme/createOdysseyMuiTheme.js +3 -0
  550. package/dist/esm/theme/createOdysseyMuiTheme.js.map +1 -1
  551. package/dist/esm/theme/palette.js +14 -9
  552. package/dist/esm/theme/palette.js.map +1 -1
  553. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +10 -1
  554. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js.map +1 -1
  555. package/dist/esm/ui-shell/InnerAppContainer.js +1 -1
  556. package/dist/esm/ui-shell/NarrowUiShellContent.js +1 -1
  557. package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
  558. package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
  559. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
  560. package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
  561. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +2 -2
  562. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
  563. package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +1 -1
  564. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +3 -3
  565. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
  566. package/dist/esm/ui-shell/SkipToContent.js +1 -1
  567. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
  568. package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
  569. package/dist/esm/ui-shell/UiShell.js +7 -2
  570. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  571. package/dist/esm/ui-shell/UiShellLogo.js +23 -2
  572. package/dist/esm/ui-shell/UiShellLogo.js.map +1 -1
  573. package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
  574. package/dist/esm/ui-shell/renderUiShell.js +15 -0
  575. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  576. package/dist/esm/useColorScheme.js +30 -0
  577. package/dist/esm/useColorScheme.js.map +1 -0
  578. package/dist/esm/useContrastMode.js +5 -4
  579. package/dist/esm/useContrastMode.js.map +1 -1
  580. package/dist/esm/useThemeCache.js +22 -14
  581. package/dist/esm/useThemeCache.js.map +1 -1
  582. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  583. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  584. package/dist/tsconfig.production.tsbuildinfo +1 -1
  585. package/dist/types/FullScreenOverlay.d.ts.map +1 -1
  586. package/dist/types/OdysseyCacheProvider.d.ts +6 -1
  587. package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
  588. package/dist/types/OdysseyDesignTokensContext.d.ts +3 -0
  589. package/dist/types/OdysseyDesignTokensContext.d.ts.map +1 -1
  590. package/dist/types/OdysseyProvider.d.ts +2 -2
  591. package/dist/types/OdysseyProvider.d.ts.map +1 -1
  592. package/dist/types/OdysseyThemeProvider.d.ts +9 -1
  593. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  594. package/dist/types/OdysseyThemeProviderPropsContext.d.ts +10 -2
  595. package/dist/types/OdysseyThemeProviderPropsContext.d.ts.map +1 -1
  596. package/dist/types/Pagination/Pagination.d.ts.map +1 -1
  597. package/dist/types/Tag.d.ts.map +1 -1
  598. package/dist/types/getActionTintChannel.d.ts +18 -0
  599. package/dist/types/getActionTintChannel.d.ts.map +1 -0
  600. package/dist/types/getColorSchemeDesignTokensOverride.d.ts +46 -0
  601. package/dist/types/getColorSchemeDesignTokensOverride.d.ts.map +1 -0
  602. package/dist/types/getDropShadowFilter.d.ts +17 -0
  603. package/dist/types/getDropShadowFilter.d.ts.map +1 -0
  604. package/dist/types/i18n.generated/i18n.d.ts +4 -0
  605. package/dist/types/i18n.generated/i18n.d.ts.map +1 -1
  606. package/dist/types/i18n.generated/i18n.resources.d.ts +6 -0
  607. package/dist/types/i18n.generated/i18n.resources.d.ts.map +1 -1
  608. package/dist/types/index.d.ts +4 -0
  609. package/dist/types/index.d.ts.map +1 -1
  610. package/dist/types/labs/GroupPicker.d.ts +2 -1
  611. package/dist/types/labs/GroupPicker.d.ts.map +1 -1
  612. package/dist/types/message-bus/messageGuards.d.ts +0 -8
  613. package/dist/types/message-bus/messageGuards.d.ts.map +1 -1
  614. package/dist/types/properties/ts/odyssey-react-mui.d.ts +2 -0
  615. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  616. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +2 -0
  617. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  618. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +2 -0
  619. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  620. package/dist/types/remUtils.d.ts +0 -4
  621. package/dist/types/remUtils.d.ts.map +1 -1
  622. package/dist/types/resolveColorSchemeDesignTokens.d.ts +25 -0
  623. package/dist/types/resolveColorSchemeDesignTokens.d.ts.map +1 -0
  624. package/dist/types/test-selectors/index.d.ts +1 -1
  625. package/dist/types/test-selectors/sanityChecks.d.ts +0 -3
  626. package/dist/types/test-selectors/sanityChecks.d.ts.map +1 -1
  627. package/dist/types/theme/components/Button.d.ts +1 -1
  628. package/dist/types/theme/components/Button.d.ts.map +1 -1
  629. package/dist/types/theme/components/Chip.d.ts +1 -1
  630. package/dist/types/theme/components/Chip.d.ts.map +1 -1
  631. package/dist/types/theme/components/Dialog.d.ts.map +1 -1
  632. package/dist/types/theme/components/Paper.d.ts.map +1 -1
  633. package/dist/types/theme/components/Tabs.d.ts +1 -1
  634. package/dist/types/theme/components/Tabs.d.ts.map +1 -1
  635. package/dist/types/theme/components/types.d.ts +5 -0
  636. package/dist/types/theme/components/types.d.ts.map +1 -1
  637. package/dist/types/theme/createOdysseyMuiTheme.d.ts +8 -1
  638. package/dist/types/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  639. package/dist/types/theme/palette.d.ts +3 -1
  640. package/dist/types/theme/palette.d.ts.map +1 -1
  641. package/dist/types/ui-shell/AppSwitcher/AppSwitcher.d.ts.map +1 -1
  642. package/dist/types/ui-shell/UiShell.d.ts +8 -1
  643. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  644. package/dist/types/ui-shell/UiShellLogo.d.ts.map +1 -1
  645. package/dist/types/ui-shell/renderUiShell.d.ts +12 -1
  646. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  647. package/dist/types/useColorScheme.d.ts +41 -0
  648. package/dist/types/useColorScheme.d.ts.map +1 -0
  649. package/dist/types/useContrastMode.d.ts +16 -5
  650. package/dist/types/useContrastMode.d.ts.map +1 -1
  651. package/dist/types/useThemeCache.d.ts +15 -6
  652. package/dist/types/useThemeCache.d.ts.map +1 -1
  653. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  654. package/package.json +16 -20
  655. package/src/properties/odyssey-react-mui.properties +2 -0
  656. package/src/properties/translations/odyssey-react-mui_ok_PL.properties +2 -0
  657. package/src/properties/translations/odyssey-react-mui_ok_SK.properties +2 -0
  658. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  659. package/src/properties/ts/odyssey-react-mui_ok_PL.ts +1 -1
  660. package/src/properties/ts/odyssey-react-mui_ok_SK.ts +1 -1
  661. package/dist/cjs/getTypedObjectKeys.cjs.map +0 -1
  662. package/dist/cjs/labs/DataTable.cjs +0 -485
  663. package/dist/cjs/labs/DataTable.cjs.map +0 -1
  664. package/dist/cjs/test-utils/getControlledElement.cjs +0 -48
  665. package/dist/cjs/test-utils/getControlledElement.cjs.map +0 -1
  666. package/dist/cjs/test-utils/renderWithOdysseyProvider.cjs +0 -47
  667. package/dist/cjs/test-utils/renderWithOdysseyProvider.cjs.map +0 -1
  668. package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +0 -43
  669. package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs.map +0 -1
  670. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +0 -137
  671. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs.map +0 -1
  672. package/dist/esm/getTypedObjectKeys.js.map +0 -1
  673. package/dist/esm/labs/DataTable.js +0 -478
  674. package/dist/esm/labs/DataTable.js.map +0 -1
  675. package/dist/esm/test-utils/getControlledElement.js +0 -41
  676. package/dist/esm/test-utils/getControlledElement.js.map +0 -1
  677. package/dist/esm/test-utils/renderWithOdysseyProvider.js +0 -42
  678. package/dist/esm/test-utils/renderWithOdysseyProvider.js.map +0 -1
  679. package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +0 -37
  680. package/dist/esm/ui-shell/TopNav/TopNavLinksList.js.map +0 -1
  681. package/dist/esm/ui-shell/TopNav/TopNavListItem.js +0 -131
  682. package/dist/esm/ui-shell/TopNav/TopNavListItem.js.map +0 -1
  683. package/dist/types/getTypedObjectKeys.d.ts.map +0 -1
  684. package/dist/types/labs/DataTable.d.ts +0 -186
  685. package/dist/types/labs/DataTable.d.ts.map +0 -1
  686. package/dist/types/test-utils/getControlledElement.d.ts +0 -26
  687. package/dist/types/test-utils/getControlledElement.d.ts.map +0 -1
  688. package/dist/types/test-utils/renderWithOdysseyProvider.d.ts +0 -37
  689. package/dist/types/test-utils/renderWithOdysseyProvider.d.ts.map +0 -1
  690. package/dist/types/ui-shell/TopNav/TopNavLinksList.d.ts +0 -44
  691. package/dist/types/ui-shell/TopNav/TopNavLinksList.d.ts.map +0 -1
  692. package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts +0 -41
  693. package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts.map +0 -1
@@ -37,6 +37,7 @@ const renderUiShell = ({
37
37
  appElement: providedAppElement,
38
38
  appElementScrollingMode,
39
39
  breakpointConfig,
40
+ colorScheme,
40
41
  hasStandardAppContentPadding,
41
42
  initialVisibleSections,
42
43
  languageCode,
@@ -75,6 +76,17 @@ const renderUiShell = ({
75
76
  languageCode,
76
77
  translationOverrides
77
78
  });
79
+ const {
80
+ publish: publishColorScheme,
81
+ subscribe: subscribeToColorScheme
82
+ } = (0, _createMessageBus.createMessageBus)();
83
+ const publishAfterReactAppReadyForColorScheme = (0, _bufferLatest.bufferLatest)({
84
+ publish: publishColorScheme,
85
+ subscribe: subscribeToReactAppSubscribed
86
+ });
87
+ if (colorScheme) {
88
+ publishAfterReactAppReadyForColorScheme(colorScheme);
89
+ }
78
90
  const {
79
91
  publish: closeRightSideMenu,
80
92
  subscribe: subscribeToCloseRightSideMenu
@@ -127,6 +139,7 @@ const renderUiShell = ({
127
139
  sideNavBackgroundContrastColor: sideNavBackgroundContrastColor,
128
140
  subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu,
129
141
  subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu,
142
+ subscribeToColorScheme: subscribeToColorScheme,
130
143
  subscribeToPropChanges: subscribeToPropChanges,
131
144
  subscribeToTranslationSettings: subscribeToTranslationSettings,
132
145
  topNavBackgroundColor: topNavBackgroundColor,
@@ -147,6 +160,7 @@ const renderUiShell = ({
147
160
  enterAppFullscreen,
148
161
  exitAppFullscreen,
149
162
  getFullscreenState,
163
+ setColorScheme: publishAfterReactAppReadyForColorScheme,
150
164
  setComponentProps: publishAfterReactAppReadyForProps,
151
165
  setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,
152
166
  slottedElements,
@@ -162,6 +176,7 @@ const renderUiShell = ({
162
176
  enterAppFullscreen,
163
177
  exitAppFullscreen,
164
178
  getFullscreenState,
179
+ setColorScheme: publishAfterReactAppReadyForColorScheme,
165
180
  setComponentProps: publishAfterReactAppReadyForProps,
166
181
  setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,
167
182
  slottedElements,
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.cjs","names":["_reactErrorBoundary","require","_bufferLatest","_createMessageBus","_renderReactInWebComponent","_createUiShellFullscreenState","_UiShell","_useHasUiShell","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","languageCode","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","translationOverrides","nonce","window","cspNonce","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","publishAfterReactAppReadyForTranslationSettings","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","connect","connectFullscreenState","enterAppFullscreen","enterAppFullscreenNow","exitAppFullscreen","exitAppFullscreenNow","getFullscreenState","subscribeToFullscreenState","createUiShellFullscreenState","requestAfterReactAppReady","sendFullscreenRequest","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","setTranslationSettings","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { type FullscreenModeMessageBus } from \"../message-bus/index.js\";\nimport { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { createUiShellFullscreenState } from \"./createUiShellFullscreenState.js\";\nimport {\n UiShell,\n UiShellProps,\n UiShellTranslationSettings,\n} from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n /**\n * Put the whole app area in fullscreen. UI Shell hides its top nav, side nav, and banners so the app fills the page.\n *\n * Use this when your app isn't built with Odyssey's `FullscreenButton`, for example a non-React app.\n *\n * The app area is one more entry in the page's fullscreen stack, so a `FullscreenRegion` can enter on top of it, and Escape goes back one step at a time. Removing `uiShellElement` from the page clears the stack.\n */\n enterAppFullscreen: () => void;\n /**\n * Take the app area out of fullscreen. A `FullscreenRegion` that entered on top of it stays in fullscreen.\n */\n exitAppFullscreen: () => void;\n /**\n * The page's current fullscreen state.\n */\n getFullscreenState: FullscreenModeMessageBus[\"getFullscreenState\"];\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n /**\n * Update the shell's translation settings (`languageCode`, `translationOverrides`) at runtime.\n *\n * Call this after the consumer's locale changes to re-localize shell-rendered chrome (skip-to-content link, top nav icons, side nav toggle) without re-rendering UI Shell.\n *\n * Accepts a React `SetStateAction`: passing a plain object **replaces** the entire settings value (so omitting `translationOverrides` clears it). Pass an updater function — `(previous) => ({ ...previous, languageCode: \"es\" })` — to merge with\n * the previous value.\n */\n setTranslationSettings: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellTranslationSettings>>\n >;\n slottedElements: SlottedElements;\n /**\n * Listen for fullscreen changes anywhere on the page, including ones from other apps. Returns a function that stops listening.\n */\n subscribeToFullscreenState: FullscreenModeMessageBus[\"subscribeToFullscreenState\"];\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n languageCode,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n translationOverrides,\n nonce = window.cspNonce,\n}: {\n /**\n * Optional nonce for CSP compliance.\n */\n nonce?: string;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<UiShellTranslationSettings> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishTranslationSettings,\n subscribe: subscribeToTranslationSettings,\n } = createMessageBus<SetStateAction<UiShellTranslationSettings>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const publishAfterReactAppReadyForTranslationSettings = bufferLatest({\n publish: publishTranslationSettings,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n publishAfterReactAppReadyForTranslationSettings({\n languageCode,\n translationOverrides,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const {\n connect: connectFullscreenState,\n enterAppFullscreen: enterAppFullscreenNow,\n exitAppFullscreen: exitAppFullscreenNow,\n getFullscreenState,\n subscribeToFullscreenState,\n } = createUiShellFullscreenState();\n\n // The page's fullscreen host starts when UI Shell's React tree renders, so a request made before then would reach no one. Like props, only the latest request is kept, so an enter followed by an exit leaves the app where it was.\n const requestAfterReactAppReady = bufferLatest<() => void>({\n publish: (sendFullscreenRequest) => sendFullscreenRequest(),\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const enterAppFullscreen = () =>\n requestAfterReactAppReady(enterAppFullscreenNow);\n\n const exitAppFullscreen = () =>\n requestAfterReactAppReady(exitAppFullscreenNow);\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n breakpointConfig={breakpointConfig}\n closeSideNavMenu={closeSideNavMenu}\n connectFullscreenState={connectFullscreenState}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n subscribeToTranslationSettings={subscribeToTranslationSettings}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n nonce,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n } satisfies RenderedUiShell;\n};\n"],"mappings":";;;;;;AAaA,IAAAA,mBAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,6BAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAMA,IAAAM,cAAA,GAAAN,OAAA;AAA0D,IAAAO,WAAA,GAAAP,OAAA;AA1B1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBO,MAAMQ,0BAGZ,GAAAC,OAAA,CAAAD,0BAAA,GAAG;EACFE,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AAyDM,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU,EAAEC,kBAAkB;EAC9BC,uBAAuB;EACvBC,gBAAgB;EAChBC,4BAA4B;EAC5BC,sBAAsB;EACtBC,YAAY;EACZC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,QAAQ;EACRC,aAAa;EACbC,sBAAsB;EACtBC,8BAA8B;EAC9BC,qBAAqB;EACrBC,oBAAoB;EACpBC,KAAK,GAAGC,MAAM,CAACC;AA+ByB,CAAC,KAAK;EAC9C,MAAMlB,UAAU,GAAGC,kBAAkB,IAAIkB,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAGtET,aAAa,CAACU,YAAY,CAACC,mCAAoB,EAAE,EAAE,CAAC;EAEpD,MAAM;IAAEC,OAAO,EAAEC,kBAAkB;IAAEC,SAAS,EAAEC;EAAuB,CAAC,GACtE,IAAAC,kCAAg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","_createMessageBus","_renderReactInWebComponent","_createUiShellFullscreenState","_UiShell","_useHasUiShell","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","colorScheme","hasStandardAppContentPadding","initialVisibleSections","languageCode","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","translationOverrides","nonce","window","cspNonce","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","publishAfterReactAppReadyForTranslationSettings","publishColorScheme","subscribeToColorScheme","publishAfterReactAppReadyForColorScheme","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","connect","connectFullscreenState","enterAppFullscreen","enterAppFullscreenNow","exitAppFullscreen","exitAppFullscreenNow","getFullscreenState","subscribeToFullscreenState","createUiShellFullscreenState","requestAfterReactAppReady","sendFullscreenRequest","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setColorScheme","setComponentProps","setTranslationSettings","appendChild"],"sources":["../../../src/ui-shell/renderUiShell.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { type FullscreenModeMessageBus } from \"../message-bus/index.js\";\nimport { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { type ColorScheme } from \"../useColorScheme.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { createUiShellFullscreenState } from \"./createUiShellFullscreenState.js\";\nimport {\n UiShell,\n UiShellProps,\n UiShellTranslationSettings,\n} from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n /**\n * Put the whole app area in fullscreen. UI Shell hides its top nav, side nav, and banners so the app fills the page.\n *\n * Use this when your app isn't built with Odyssey's `FullscreenButton`, for example a non-React app.\n *\n * The app area is one more entry in the page's fullscreen stack, so a `FullscreenRegion` can enter on top of it, and Escape goes back one step at a time. Removing `uiShellElement` from the page clears the stack.\n */\n enterAppFullscreen: () => void;\n /**\n * Take the app area out of fullscreen. A `FullscreenRegion` that entered on top of it stays in fullscreen.\n */\n exitAppFullscreen: () => void;\n /**\n * The page's current fullscreen state.\n */\n getFullscreenState: FullscreenModeMessageBus[\"getFullscreenState\"];\n /**\n * Update the shell's color scheme at runtime, for example when the app's own dark mode toggle changes. `system` follows the operating system setting.\n */\n setColorScheme: ReturnType<typeof bufferLatest<ColorScheme>>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n /**\n * Update the shell's translation settings (`languageCode`, `translationOverrides`) at runtime.\n *\n * Call this after the consumer's locale changes to re-localize shell-rendered chrome (skip-to-content link, top nav icons, side nav toggle) without re-rendering UI Shell.\n *\n * Accepts a React `SetStateAction`: passing a plain object **replaces** the entire settings value (so omitting `translationOverrides` clears it). Pass an updater function — `(previous) => ({ ...previous, languageCode: \"es\" })` — to merge with\n * the previous value.\n */\n setTranslationSettings: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellTranslationSettings>>\n >;\n slottedElements: SlottedElements;\n /**\n * Listen for fullscreen changes anywhere on the page, including ones from other apps. Returns a function that stops listening.\n */\n subscribeToFullscreenState: FullscreenModeMessageBus[\"subscribeToFullscreenState\"];\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n breakpointConfig,\n colorScheme,\n hasStandardAppContentPadding,\n initialVisibleSections,\n languageCode,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n translationOverrides,\n nonce = window.cspNonce,\n}: {\n /**\n * The color scheme the shell renders. `system` follows the operating system setting. Change it later with `setColorScheme`.\n * @default \"light\"\n */\n colorScheme?: ColorScheme;\n /**\n * Optional nonce for CSP compliance.\n */\n nonce?: string;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<UiShellTranslationSettings> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishTranslationSettings,\n subscribe: subscribeToTranslationSettings,\n } = createMessageBus<SetStateAction<UiShellTranslationSettings>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const publishAfterReactAppReadyForTranslationSettings = bufferLatest({\n publish: publishTranslationSettings,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n publishAfterReactAppReadyForTranslationSettings({\n languageCode,\n translationOverrides,\n });\n\n const { publish: publishColorScheme, subscribe: subscribeToColorScheme } =\n createMessageBus<ColorScheme>();\n\n const publishAfterReactAppReadyForColorScheme = bufferLatest({\n publish: publishColorScheme,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n if (colorScheme) {\n publishAfterReactAppReadyForColorScheme(colorScheme);\n }\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const {\n connect: connectFullscreenState,\n enterAppFullscreen: enterAppFullscreenNow,\n exitAppFullscreen: exitAppFullscreenNow,\n getFullscreenState,\n subscribeToFullscreenState,\n } = createUiShellFullscreenState();\n\n // The page's fullscreen host starts when UI Shell's React tree renders, so a request made before then would reach no one. Like props, only the latest request is kept, so an enter followed by an exit leaves the app where it was.\n const requestAfterReactAppReady = bufferLatest<() => void>({\n publish: (sendFullscreenRequest) => sendFullscreenRequest(),\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const enterAppFullscreen = () =>\n requestAfterReactAppReady(enterAppFullscreenNow);\n\n const exitAppFullscreen = () =>\n requestAfterReactAppReady(exitAppFullscreenNow);\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as SlottedElements;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n breakpointConfig={breakpointConfig}\n closeSideNavMenu={closeSideNavMenu}\n connectFullscreenState={connectFullscreenState}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToColorScheme={subscribeToColorScheme}\n subscribeToPropChanges={subscribeToPropChanges}\n subscribeToTranslationSettings={subscribeToTranslationSettings}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n nonce,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setColorScheme: publishAfterReactAppReadyForColorScheme,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n enterAppFullscreen,\n exitAppFullscreen,\n getFullscreenState,\n setColorScheme: publishAfterReactAppReadyForColorScheme,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n subscribeToFullscreenState,\n uiShellElement,\n } satisfies RenderedUiShell;\n};\n"],"mappings":";;;;;;AAaA,IAAAA,mBAAA,GAAAC,OAAA;AAGA,IAAAC,aA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iB,EAAElD,iCAAiC;IACpDmD,sBAAsB,EAAEjD,+CAA+C;IACvEmB,eAAe;IACfJ,0BAA0B;IAC1Bc;EACF,CAAC;AACH,CAAC;AAACzE,OAAA,CAAAM,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useResolvedColorScheme = exports.useColorScheme = exports.resolvedColorSchemeValues = exports.defaultColorScheme = exports.colorSchemeValues = exports.ColorSchemeContext = void 0;
7
+ var _react = require("react");
8
+ var _useMediaQuery = require("./theme/useMediaQuery.cjs");
9
+ /*!
10
+ * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
11
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
12
+ *
13
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ *
18
+ * See the License for the specific language governing permissions and limitations under the License.
19
+ */const colorSchemeValues = exports.colorSchemeValues = ["light", "dark", "system"];
20
+ const resolvedColorSchemeValues = exports.resolvedColorSchemeValues = colorSchemeValues.filter(colorScheme => colorScheme !== "system");
21
+ const defaultColorScheme = exports.defaultColorScheme = "light";
22
+ const ColorSchemeContext = exports.ColorSchemeContext = (0, _react.createContext)(defaultColorScheme);
23
+ const useColorScheme = () => (0, _react.useContext)(ColorSchemeContext);
24
+ exports.useColorScheme = useColorScheme;
25
+ const useResolvedColorScheme = ({
26
+ colorScheme
27
+ }) => {
28
+ const parentColorScheme = useColorScheme();
29
+ const isSystemDark = (0, _useMediaQuery.useMediaQuery)("(prefers-color-scheme: dark)");
30
+ if (colorScheme === "system") {
31
+ return isSystemDark ? "dark" : "light";
32
+ }
33
+ return colorScheme ?? parentColorScheme;
34
+ };
35
+ exports.useResolvedColorScheme = useResolvedColorScheme;
36
+ //# sourceMappingURL=useColorScheme.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColorScheme.cjs","names":["_react","require","_useMediaQuery","colorSchemeValues","exports","resolvedColorSchemeValues","filter","colorScheme","defaultColorScheme","ColorSchemeContext","createContext","useColorScheme","useContext","useResolvedColorScheme","parentColorScheme","isSystemDark","useMediaQuery"],"sources":["../../src/useColorScheme.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 { createContext, useContext } from \"react\";\n\nimport { useMediaQuery } from \"./theme/useMediaQuery.js\";\n\n/**\n * Every color scheme an app can ask for. This list is the one source of truth for scheme names. `ResolvedColorScheme`, the token sets, and the per-scheme keys of `designTokensOverride` all derive from it, so adding a scheme such as a high-contrast one starts here.\n */\nexport const colorSchemeValues = [\"light\", \"dark\", \"system\"] as const;\n\n/**\n * The color scheme an app asks for. `system` follows the operating system's\n * `prefers-color-scheme` setting and updates live when it changes.\n */\nexport type ColorScheme = (typeof colorSchemeValues)[number];\n\n/** The color scheme actually rendered, after `system` is resolved. */\nexport type ResolvedColorScheme = Exclude<ColorScheme, \"system\">;\n\n/** Every color scheme Odyssey renders, which is every requested scheme except `system`. */\nexport const resolvedColorSchemeValues = colorSchemeValues.filter(\n (colorScheme): colorScheme is ResolvedColorScheme => colorScheme !== \"system\",\n);\n\nexport const defaultColorScheme: ColorScheme = \"light\";\n\nexport const ColorSchemeContext =\n createContext<ResolvedColorScheme>(defaultColorScheme);\n\n/**\n * Returns the color scheme Odyssey is rendering, `light` or `dark`. Use it for\n * anything Odyssey does not style itself, such as a chart library or a logo\n * that ships separate light and dark artwork.\n */\nexport const useColorScheme = () => useContext(ColorSchemeContext);\n\n/**\n * Resolves a requested color scheme to the one to render. With nothing\n * requested, a nested provider inherits its parent's resolved scheme so a\n * `Surface` inside a dark app stays dark.\n */\nexport const useResolvedColorScheme = ({\n colorScheme,\n}: {\n colorScheme?: ColorScheme;\n}): ResolvedColorScheme => {\n const parentColorScheme = useColorScheme();\n const isSystemDark = useMediaQuery(\"(prefers-color-scheme: dark)\");\n\n if (colorScheme === \"system\") {\n return isSystemDark ? \"dark\" : \"light\";\n }\n\n return colorScheme ?? parentColorScheme;\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GASO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU;AAY9D,MAAME,yBAAyB,GAAAD,OAAA,CAAAC,yBAAA,GAAGF,iBAAiB,CAACG,MAAM,CAC9DC,WAAW,IAAyCA,WAAW,KAAK,QACvE,CAAC;AAEM,MAAMC,kBAA+B,GAAAJ,OAAA,CAAAI,kBAAA,GAAG,OAAO;AAE/C,MAAMC,kBAAkB,GAAAL,OAAA,CAAAK,kBAAA,GAC7B,IAAAC,oBAAa,EAAsBF,kBAAkB,CAAC;AAOjD,MAAMG,cAAc,GAAGA,CAAA,KAAM,IAAAC,iBAAU,EAACH,kBAAkB,CAAC;AAACL,OAAA,CAAAO,cAAA,GAAAA,cAAA;AAO5D,MAAME,sBAAsB,GAAGA,CAAC;EACrCN;AAGF,CAAC,KAA0B;EACzB,MAAMO,iBAAiB,GAAGH,cAAc,CAAC,CAAC;EAC1C,MAAMI,YAAY,GAAG,IAAAC,4BAAa,EAAC,8BAA8B,CAAC;EAElE,IAAIT,WAAW,KAAK,QAAQ,EAAE;IAC5B,OAAOQ,YAAY,GAAG,MAAM,GAAG,OAAO;EACxC;EAEA,OAAOR,WAAW,IAAIO,iBAAiB;AACzC,CAAC;AAACV,OAAA,CAAAS,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -63,10 +63,11 @@ const getBackgroundColor = element => {
63
63
  return defaultParentBackgroundColor;
64
64
  };
65
65
  exports.getBackgroundColor = getBackgroundColor;
66
- const deriveContrastMode = bgColor => bgColor === Tokens.HueNeutral50 ? "highContrast" : "lowContrast";
66
+ const deriveContrastMode = (bgColor, highContrastBackgroundColor = Tokens.HueNeutral50) => bgColor === Tokens.HueNeutral50 || bgColor === highContrastBackgroundColor || bgColor === (0, _hexToRgb.hexToRgb)(highContrastBackgroundColor).asFormattedString ? "highContrast" : "lowContrast";
67
67
  exports.deriveContrastMode = deriveContrastMode;
68
68
  const useContrastMode = ({
69
- contrastMode: explicitContrastMode
69
+ contrastMode: explicitContrastMode,
70
+ highContrastBackgroundColor = Tokens.HueNeutral50
70
71
  }) => {
71
72
  const contrastContainerRef = (0, _react.useRef)(null);
72
73
  const {
@@ -78,8 +79,8 @@ const useContrastMode = ({
78
79
  const updateBackgroundColor = (0, _react.useCallback)(() => {
79
80
  const newBgColor = getBackgroundColor(contrastContainerRef.current);
80
81
  setParentBackgroundColor(newBgColor);
81
- setDetectedContrastMode(deriveContrastMode(newBgColor));
82
- }, []);
82
+ setDetectedContrastMode(deriveContrastMode(newBgColor, highContrastBackgroundColor));
83
+ }, [highContrastBackgroundColor]);
83
84
  (0, _react.useLayoutEffect)(() => {
84
85
  if (explicitContrastMode) return;
85
86
  const observer = new MutationObserver(updateBackgroundColor);
@@ -1 +1 @@
1
- {"version":3,"file":"useContrastMode.cjs","names":["Tokens","_interopRequireWildcard","require","_react","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\nimport {\n createContext,\n type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n /**\n * Odyssey's app wrapper element: the contrast and height container `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so container queries track the space Odyssey actually occupies. Absent outside a provider, and `current` stays `null` when the provider renders with `hasWrapperElement={false}`.\n */\n contrastContainerRef?: RefObject<HTMLDivElement>;\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\n/** Default background color when none is detected: HueNeutral50 (gray = highContrast). */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary. When `parentElement` is null (e.g., at a shadow root), this checks if the element is inside a ShadowRoot and jumps to the host element to continue traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used for white background (HueNeutralWhite).\n * - High contrast mode is used for gray background (defaultParentBackgroundColor = HueNeutral50).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds set outside of shadow roots.\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = getParentElement(element);\n }\n return defaultParentBackgroundColor; // Default to gray/high contrast if no background color is found\n};\n\nexport const deriveContrastMode = (bgColor: string): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\";\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(deriveContrastMode(newBgColor));\n }, []);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and document.head may not be accessible. Guard against null to prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,SAAA,GAAAF,OAAA;AAAyC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,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EAAEL,eAAe,CAAC;IAC5DhB,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXoB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAChC,oBAAoB,EAAES,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLR,oBAAoB;IACpBlC,YAAY;IACZqC;EACF,CAAC;AACH,CAAC;AAACvC,OAAA,CAAAkC,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"useContrastMode.cjs","names":["Tokens","_interopRequireWildcard","require","_react","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","highContrastBackgroundColor","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\nimport {\n createContext,\n type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n /**\n * Odyssey's app wrapper element: the contrast and height container `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so container queries track the space Odyssey actually occupies. Absent outside a provider, and `current` stays `null` when the provider renders with `hasWrapperElement={false}`.\n */\n contrastContainerRef?: RefObject<HTMLDivElement>;\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\n/** Background color assumed when none is detected: the HueNeutral50 page color, which means `highContrast`. */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary. When `parentElement` is null (e.g., at a shadow root), this checks if the element is inside a ShadowRoot and jumps to the host element to continue traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used on the PaletteNeutralSurface surface.\n * - High contrast mode is used on the HueNeutral50 page color (defaultParentBackgroundColor).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds set outside of shadow roots.\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = getParentElement(element);\n }\n return defaultParentBackgroundColor; // No background found, so assume the HueNeutral50 page and high contrast\n};\n\n/**\n * The HueNeutral50 page color means `highContrast`. It is read from the active\n * tokens, so dark mode's page color counts too, not only light mode's\n * `HueNeutral50`.\n */\nexport const deriveContrastMode = (\n bgColor: string,\n highContrastBackgroundColor: string = Tokens.HueNeutral50,\n): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ||\n bgColor === highContrastBackgroundColor ||\n bgColor === hexToRgb(highContrastBackgroundColor).asFormattedString\n ? \"highContrast\"\n : \"lowContrast\";\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n /**\n * The page color of the active color scheme, `HueNeutral50` from the active\n * tokens.\n * @default Tokens.HueNeutral50\n */\n highContrastBackgroundColor?: string;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n highContrastBackgroundColor = Tokens.HueNeutral50,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(\n deriveContrastMode(newBgColor, highContrastBackgroundColor),\n );\n }, [highContrastBackgroundColor]);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and document.head may not be accessible. Guard against null to prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAA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,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAChC,oBAAoB,EAAES,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLR,oBAAoB;IACpBnC,YAAY;IACZsC;EACF,CAAC;AACH,CAAC;AAACxC,OAAA,CAAAmC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -20,30 +20,38 @@ var _theme = require("./theme/theme.cjs");
20
20
 
21
21
  const ThemeCacheContext = exports.ThemeCacheContext = (0, _react.createContext)(null);
22
22
  const useThemeCache = ({
23
+ colorScheme,
24
+ isEnabled = true,
23
25
  odysseyTokens,
24
26
  shadowRootElement
25
27
  }) => {
26
28
  const existingCache = (0, _react.useContext)(ThemeCacheContext);
27
- const localCache = (0, _react.useMemo)(() => new Map(), [odysseyTokens, shadowRootElement]);
28
- const getOrCreateTheme = (0, _react.useCallback)(mode => {
29
- if (existingCache && existingCache.odysseyTokens === odysseyTokens && existingCache.shadowRootElement === shadowRootElement) {
30
- return existingCache.get(mode);
31
- }
32
- const cached = localCache.get(mode);
33
- if (cached) return cached;
34
- const theme = (0, _theme.createOdysseyMuiTheme)({
35
- contrastMode: mode,
29
+ const hasMatchingParentCache = Boolean(existingCache && existingCache.colorScheme === colorScheme && existingCache.odysseyTokens === odysseyTokens && existingCache.shadowRootElement === shadowRootElement);
30
+ const localCache = (0, _react.useMemo)(() => hasMatchingParentCache || !isEnabled ? undefined : {
31
+ highContrast: (0, _theme.createOdysseyMuiTheme)({
32
+ colorScheme,
33
+ contrastMode: "highContrast",
36
34
  odysseyTokens,
37
35
  shadowRootElement
38
- });
39
- localCache.set(mode, theme);
40
- return theme;
41
- }, [existingCache, localCache, odysseyTokens, shadowRootElement]);
36
+ }),
37
+ lowContrast: (0, _theme.createOdysseyMuiTheme)({
38
+ colorScheme,
39
+ contrastMode: "lowContrast",
40
+ odysseyTokens,
41
+ shadowRootElement
42
+ })
43
+ }, [colorScheme, hasMatchingParentCache, isEnabled, odysseyTokens, shadowRootElement]);
44
+ const getOrCreateTheme = (0, _react.useCallback)(contrastMode => {
45
+ if (hasMatchingParentCache && existingCache) return existingCache.get(contrastMode);
46
+ if (localCache) return localCache[contrastMode];
47
+ throw new Error("Odyssey theme cache is unavailable");
48
+ }, [existingCache, hasMatchingParentCache, localCache]);
42
49
  const themeCache = (0, _react.useMemo)(() => ({
50
+ colorScheme,
43
51
  get: getOrCreateTheme,
44
52
  odysseyTokens,
45
53
  shadowRootElement
46
- }), [getOrCreateTheme, odysseyTokens, shadowRootElement]);
54
+ }), [colorScheme, getOrCreateTheme, odysseyTokens, shadowRootElement]);
47
55
  return {
48
56
  getOrCreateTheme,
49
57
  themeCache
@@ -1 +1 @@
1
- {"version":3,"file":"useThemeCache.cjs","names":["_react","require","_theme","ThemeCacheContext","exports","createContext","useThemeCache","odysseyTokens","shadowRootElement","existingCache","useContext","localCache","useMemo","Map","getOrCreateTheme","useCallback","mode","get","cached","theme","createOdysseyMuiTheme","contrastMode","set","themeCache"],"sources":["../../src/useThemeCache.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Theme } from \"@mui/material/styles\";\nimport { createContext, useCallback, useContext, useMemo } from \"react\";\n\nimport { createOdysseyMuiTheme, DesignTokens } from \"./theme/theme.js\";\nimport { ContrastMode } from \"./useContrastMode.js\";\n\nexport type ThemeCache = {\n get: (contrastMode: ContrastMode) => Theme;\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n};\n\nexport const ThemeCacheContext = createContext<ThemeCache | null>(null);\n\nexport const useThemeCache = ({\n odysseyTokens,\n shadowRootElement,\n}: {\n odysseyTokens: DesignTokens;\n shadowRootElement: HTMLElement | undefined;\n}) => {\n const existingCache = useContext(ThemeCacheContext);\n\n const localCache = useMemo(\n () => new Map<ContrastMode, Theme>(),\n // Reset the cache when tokens or shadow root change so stale Themes can't be returned for a different DesignTokens/shadowRootElement pair.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [odysseyTokens, shadowRootElement],\n );\n\n const getOrCreateTheme = useCallback(\n (mode: ContrastMode) => {\n if (\n existingCache &&\n existingCache.odysseyTokens === odysseyTokens &&\n existingCache.shadowRootElement === shadowRootElement\n ) {\n return existingCache.get(mode);\n }\n const cached = localCache.get(mode);\n if (cached) return cached;\n const theme = createOdysseyMuiTheme({\n contrastMode: mode,\n odysseyTokens,\n shadowRootElement,\n });\n localCache.set(mode, theme);\n return theme;\n },\n [existingCache, localCache, odysseyTokens, shadowRootElement],\n );\n\n const themeCache = useMemo<ThemeCache>(\n () => ({ get: getOrCreateTheme, odysseyTokens, shadowRootElement }),\n [getOrCreateTheme, odysseyTokens, shadowRootElement],\n );\n\n return { getOrCreateTheme, themeCache };\n};\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,oBAAa,EAAoB,IAAI,CAAC;AAEhE,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,aAAa;EACbC;AAIF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAG,IAAAC,iBAAU,EAACP,iBAAiB,CAAC;EAEnD,MAAMQ,UAAU,GAAG,IAAAC,cAAO,EACxB,MAAM,IAAIC,GAAG,CAAsB,CAAC,EAGpC,CAACN,aAAa,EAAEC,iBAAiB,CACnC,CAAC;EAED,MAAMM,gBAAgB,GAAG,IAAAC,kBAAW,EACjCC,IAAkB,IAAK;IACtB,IACEP,aAAa,IACbA,aAAa,CAACF,aAAa,KAAKA,aAAa,IAC7CE,aAAa,CAACD,iBAAiB,KAAKA,iBAAiB,EACrD;MACA,OAAOC,aAAa,CAACQ,GAAG,CAACD,IAAI,CAAC;IAChC;IACA,MAAME,MAAM,GAAGP,UAAU,CAACM,GAAG,CAACD,IAAI,CAAC;IACnC,IAAIE,MAAM,EAAE,OAAOA,MAAM;IACzB,MAAMC,KAAK,GAAG,IAAAC,4BAAqB,EAAC;MAClCC,YAAY,EAAEL,IAAI;MAClBT,aAAa;MACbC;IACF,CAAC,CAAC;IACFG,UAAU,CAACW,GAAG,CAACN,IAAI,EAAEG,KAAK,CAAC;IAC3B,OAAOA,KAAK;EACd,CAAC,EACD,CAACV,aAAa,EAAEE,UAAU,EAAEJ,aAAa,EAAEC,iBAAiB,CAC9D,CAAC;EAED,MAAMe,UAAU,GAAG,IAAAX,cAAO,EACxB,OAAO;IAAEK,GAAG,EAAEH,gBAAgB;IAAEP,aAAa;IAAEC;EAAkB,CAAC,CAAC,EACnE,CAACM,gBAAgB,EAAEP,aAAa,EAAEC,iBAAiB,CACrD,CAAC;EAED,OAAO;IAAEM,gBAAgB;IAAES;EAAW,CAAC;AACzC,CAAC;AAACnB,OAAA,CAAAE,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"useThemeCache.cjs","names":["_react","require","_theme","ThemeCacheContext","exports","createContext","useThemeCache","colorScheme","isEnabled","odysseyTokens","shadowRootElement","existingCache","useContext","hasMatchingParentCache","Boolean","localCache","useMemo","undefined","highContrast","createOdysseyMuiTheme","contrastMode","lowContrast","getOrCreateTheme","useCallback","get","Error","themeCache"],"sources":["../../src/useThemeCache.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Theme } from \"@mui/material/styles\";\nimport { createContext, useCallback, useContext, useMemo } from \"react\";\n\nimport { createOdysseyMuiTheme, DesignTokens } from \"./theme/theme.js\";\nimport { type ResolvedColorScheme } from \"./useColorScheme.js\";\nimport { ContrastMode } from \"./useContrastMode.js\";\n\nexport type ThemeCache = {\n colorScheme: ResolvedColorScheme;\n get: (contrastMode: ContrastMode) => Theme;\n odysseyTokens: DesignTokens;\n shadowRootElement?: HTMLElement;\n};\n\nexport const ThemeCacheContext = createContext<ThemeCache | null>(null);\n\nexport const useThemeCache = ({\n colorScheme,\n isEnabled = true,\n odysseyTokens,\n shadowRootElement,\n}: UseThemeCacheArgs) => {\n const existingCache = useContext(ThemeCacheContext);\n const hasMatchingParentCache = Boolean(\n existingCache &&\n existingCache.colorScheme === colorScheme &&\n existingCache.odysseyTokens === odysseyTokens &&\n existingCache.shadowRootElement === shadowRootElement,\n );\n\n const localCache = useMemo(\n () =>\n hasMatchingParentCache || !isEnabled\n ? undefined\n : {\n highContrast: createOdysseyMuiTheme({\n colorScheme,\n contrastMode: \"highContrast\",\n odysseyTokens,\n shadowRootElement,\n }),\n lowContrast: createOdysseyMuiTheme({\n colorScheme,\n contrastMode: \"lowContrast\",\n odysseyTokens,\n shadowRootElement,\n }),\n },\n [\n colorScheme,\n hasMatchingParentCache,\n isEnabled,\n odysseyTokens,\n shadowRootElement,\n ],\n );\n\n const getOrCreateTheme = useCallback(\n (contrastMode: ContrastMode) => {\n if (hasMatchingParentCache && existingCache)\n return existingCache.get(contrastMode);\n if (localCache) return localCache[contrastMode];\n throw new Error(\"Odyssey theme cache is unavailable\");\n },\n [existingCache, hasMatchingParentCache, localCache],\n );\n\n const themeCache = useMemo<ThemeCache>(\n () => ({\n colorScheme,\n get: getOrCreateTheme,\n odysseyTokens,\n shadowRootElement,\n }),\n [colorScheme, getOrCreateTheme, odysseyTokens, shadowRootElement],\n );\n\n return { getOrCreateTheme, themeCache };\n};\n\nexport type UseThemeCacheArgs = {\n colorScheme: ResolvedColorScheme;\n /**\n * If `false`, builds no themes. A provider passes `false` for a scheme it is not rendering when it cannot switch to that scheme on its own, so it never builds themes nothing reads.\n * @default true\n */\n isEnabled?: boolean;\n odysseyTokens: DesignTokens;\n shadowRootElement?: HTMLElement;\n};\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,oBAAa,EAAoB,IAAI,CAAC;AAEhE,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,WAAW;EACXC,SAAS,GAAG,IAAI;EAChBC,aAAa;EACbC;AACiB,CAAC,KAAK;EACvB,MAAMC,aAAa,GAAG,IAAAC,iBAAU,EAACT,iBAAiB,CAAC;EACnD,MAAMU,sBAAsB,GAAGC,OAAO,CACpCH,aAAa,IACXA,aAAa,CAACJ,WAAW,KAAKA,WAAW,IACzCI,aAAa,CAACF,aAAa,KAAKA,aAAa,IAC7CE,aAAa,CAACD,iBAAiB,KAAKA,iBACxC,CAAC;EAED,MAAMK,UAAU,GAAG,IAAAC,cAAO,EACxB,MACEH,sBAAsB,IAAI,CAACL,SAAS,GAChCS,SAAS,GACT;IACEC,YAAY,EAAE,IAAAC,4BAAqB,EAAC;MAClCZ,WAAW;MACXa,YAAY,EAAE,cAAc;MAC5BX,aAAa;MACbC;IACF,CAAC,CAAC;IACFW,WAAW,EAAE,IAAAF,4BAAqB,EAAC;MACjCZ,WAAW;MACXa,YAAY,EAAE,aAAa;MAC3BX,aAAa;MACbC;IACF,CAAC;EACH,CAAC,EACP,CACEH,WAAW,EACXM,sBAAsB,EACtBL,SAAS,EACTC,aAAa,EACbC,iBAAiB,CAErB,CAAC;EAED,MAAMY,gBAAgB,GAAG,IAAAC,kBAAW,EACjCH,YAA0B,IAAK;IAC9B,IAAIP,sBAAsB,IAAIF,aAAa,EACzC,OAAOA,aAAa,CAACa,GAAG,CAACJ,YAAY,CAAC;IACxC,IAAIL,UAAU,EAAE,OAAOA,UAAU,CAACK,YAAY,CAAC;IAC/C,MAAM,IAAIK,KAAK,CAAC,oCAAoC,CAAC;EACvD,CAAC,EACD,CAACd,aAAa,EAAEE,sBAAsB,EAAEE,UAAU,CACpD,CAAC;EAED,MAAMW,UAAU,GAAG,IAAAV,cAAO,EACxB,OAAO;IACLT,WAAW;IACXiB,GAAG,EAAEF,gBAAgB;IACrBb,aAAa;IACbC;EACF,CAAC,CAAC,EACF,CAACH,WAAW,EAAEe,gBAAgB,EAAEb,aAAa,EAAEC,iBAAiB,CAClE,CAAC;EAED,OAAO;IAAEY,gBAAgB;IAAEI;EAAW,CAAC;AACzC,CAAC;AAACtB,OAAA,CAAAE,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -15,5 +15,5 @@ exports.default = void 0;
15
15
  *
16
16
  * See the License for the specific language governing permissions and limitations under the License.
17
17
  */
18
- var _default = exports.default = "1-72-0";
18
+ var _default = exports.default = "1-73-1";
19
19
  //# sourceMappingURL=odysseyWebComponentVersion.generated.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-72-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-73-1\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
@@ -57,6 +57,6 @@ const Accordion = ({
57
57
  });
58
58
  };
59
59
  const MemoizedAccordion = memo(Accordion);
60
- MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.72.0";
60
+ MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.73.1";
61
61
  export { MemoizedAccordion as Accordion };
62
62
  //# sourceMappingURL=Accordion.js.map
@@ -30,7 +30,7 @@ const AnimationProvider = ({
30
30
  });
31
31
  };
32
32
  const MemoizedAnimationProvider = memo(AnimationProvider);
33
- MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.72.0";
33
+ MemoizedAnimationProvider.displayName = "AnimationProvider::pkg=odyssey&odysseyV=1.73.1";
34
34
  export { MemoizedAnimationProvider as AnimationProvider };
35
35
  export const useAnimation = () => useContext(AnimationContext).hasAnimations;
36
36
  //# sourceMappingURL=AnimationContext.js.map
@@ -106,6 +106,6 @@ const Autocomplete = ({
106
106
  });
107
107
  };
108
108
  const MemoizedAutocomplete = memo(Autocomplete);
109
- MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.72.0";
109
+ MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.73.1";
110
110
  export { MemoizedAutocomplete as Autocomplete };
111
111
  //# sourceMappingURL=Autocomplete.js.map
package/dist/esm/Badge.js CHANGED
@@ -73,6 +73,6 @@ const Badge = ({
73
73
  return renderBadge;
74
74
  };
75
75
  const MemoizedBadge = memo(Badge);
76
- MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.72.0";
76
+ MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.73.1";
77
77
  export { MemoizedBadge as Badge };
78
78
  //# sourceMappingURL=Badge.js.map
@@ -58,6 +58,6 @@ const Banner = ({
58
58
  });
59
59
  };
60
60
  const MemoizedBanner = memo(Banner);
61
- MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.72.0";
61
+ MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.73.1";
62
62
  export { MemoizedBanner as Banner };
63
63
  //# sourceMappingURL=Banner.js.map
package/dist/esm/Box.js CHANGED
@@ -31,6 +31,6 @@ const Box = forwardRef(({
31
31
  translate: translate
32
32
  }));
33
33
  const MemoizedBox = memo(Box);
34
- MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.72.0";
34
+ MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.73.1";
35
35
  export { MemoizedBox as Box };
36
36
  //# sourceMappingURL=Box.js.map
@@ -175,6 +175,6 @@ const BreadcrumbList = ({
175
175
  });
176
176
  };
177
177
  const MemoizedBreadcrumbList = memo(BreadcrumbList);
178
- MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.72.0";
178
+ MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.73.1";
179
179
  export { MemoizedBreadcrumbList as BreadcrumbList };
180
180
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -119,6 +119,6 @@ const BaseButton = ({
119
119
  return renderButton(muiProps);
120
120
  };
121
121
  const MemoizedBaseButton = memo(BaseButton);
122
- MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.72.0";
122
+ MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.73.1";
123
123
  export { MemoizedBaseButton as BaseButton };
124
124
  //# sourceMappingURL=BaseButton.js.map
@@ -165,6 +165,6 @@ const BaseMenuButton = ({
165
165
  });
166
166
  };
167
167
  const MemoizedBaseMenuButton = memo(BaseMenuButton);
168
- MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.72.0";
168
+ MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.73.1";
169
169
  export { MemoizedBaseMenuButton as BaseMenuButton };
170
170
  //# sourceMappingURL=BaseMenuButton.js.map
@@ -19,6 +19,6 @@ const Button = props => {
19
19
  });
20
20
  };
21
21
  const MemoizedButton = memo(Button);
22
- MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.72.0";
22
+ MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.73.1";
23
23
  export { MemoizedButton as Button };
24
24
  //# sourceMappingURL=Button.js.map
@@ -19,6 +19,6 @@ const MenuButton = props => {
19
19
  });
20
20
  };
21
21
  const MemoizedMenuButton = memo(MenuButton);
22
- MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.72.0";
22
+ MemoizedMenuButton.displayName = "MenuButton::pkg=odyssey&odysseyV=1.73.1";
23
23
  export { MemoizedMenuButton as MenuButton };
24
24
  //# sourceMappingURL=MenuButton.js.map
@@ -50,6 +50,6 @@ const MenuItem = ({
50
50
  });
51
51
  };
52
52
  const MemoizedMenuItem = memo(MenuItem);
53
- MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.72.0";
53
+ MemoizedMenuItem.displayName = "MenuItem::pkg=odyssey&odysseyV=1.73.1";
54
54
  export { MemoizedMenuItem as MenuItem };
55
55
  //# sourceMappingURL=MenuItem.js.map
@@ -79,6 +79,6 @@ const Callout = ({
79
79
  });
80
80
  };
81
81
  const MemoizedCallout = memo(Callout);
82
- MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.72.0";
82
+ MemoizedCallout.displayName = "Callout::pkg=odyssey&odysseyV=1.73.1";
83
83
  export { MemoizedCallout as Callout };
84
84
  //# sourceMappingURL=Callout.js.map
package/dist/esm/Card.js CHANGED
@@ -331,6 +331,6 @@ const Card = ({
331
331
  });
332
332
  };
333
333
  const MemoizedCard = memo(Card);
334
- MemoizedCard.displayName = "Card::pkg=odyssey&odysseyV=1.72.0";
334
+ MemoizedCard.displayName = "Card::pkg=odyssey&odysseyV=1.73.1";
335
335
  export { MemoizedCard as Card };
336
336
  //# sourceMappingURL=Card.js.map
@@ -23,6 +23,6 @@ const CircularProgress = ({
23
23
  variant: value ? "determinate" : "indeterminate"
24
24
  });
25
25
  const MemoizedCircularProgress = memo(CircularProgress);
26
- MemoizedCircularProgress.displayName = "CircularProgress::pkg=odyssey&odysseyV=1.72.0";
26
+ MemoizedCircularProgress.displayName = "CircularProgress::pkg=odyssey&odysseyV=1.73.1";
27
27
  export { MemoizedCircularProgress as CircularProgress };
28
28
  //# sourceMappingURL=CircularProgress.js.map
@@ -20,6 +20,6 @@ const ConditionalWrapper = ({
20
20
  children: children
21
21
  });
22
22
  const MemoizedConditionalWrapper = memo(ConditionalWrapper);
23
- MemoizedConditionalWrapper.displayName = "ConditionalWrapper::pkg=odyssey&odysseyV=1.72.0";
23
+ MemoizedConditionalWrapper.displayName = "ConditionalWrapper::pkg=odyssey&odysseyV=1.73.1";
24
24
  export { MemoizedConditionalWrapper as ConditionalWrapper };
25
25
  //# sourceMappingURL=ConditionalWrapper.js.map
@@ -576,6 +576,6 @@ const DataTable = ({
576
576
  });
577
577
  };
578
578
  const MemoizedDataTable = memo(DataTable);
579
- MemoizedDataTable.displayName = "DataTable::pkg=odyssey&odysseyV=1.72.0";
579
+ MemoizedDataTable.displayName = "DataTable::pkg=odyssey&odysseyV=1.73.1";
580
580
  export { MemoizedDataTable as DataTable };
581
581
  //# sourceMappingURL=DataTable.js.map
@@ -100,6 +100,6 @@ const DataTableRowActions = ({
100
100
  });
101
101
  };
102
102
  const MemoizedDataTableRowActions = memo(DataTableRowActions);
103
- MemoizedDataTableRowActions.displayName = "DataTableRowActions::pkg=odyssey&odysseyV=1.72.0";
103
+ MemoizedDataTableRowActions.displayName = "DataTableRowActions::pkg=odyssey&odysseyV=1.73.1";
104
104
  export { MemoizedDataTableRowActions as DataTableRowActions };
105
105
  //# sourceMappingURL=DataTableRowActions.js.map
@@ -77,6 +77,6 @@ const DataTableSettings = ({
77
77
  });
78
78
  };
79
79
  const MemoizedDataTableSettings = memo(DataTableSettings);
80
- MemoizedDataTableSettings.displayName = "DataTableSettings::pkg=odyssey&odysseyV=1.72.0";
80
+ MemoizedDataTableSettings.displayName = "DataTableSettings::pkg=odyssey&odysseyV=1.73.1";
81
81
  export { MemoizedDataTableSettings as DataTableSettings };
82
82
  //# sourceMappingURL=DataTableSettings.js.map
@@ -161,6 +161,6 @@ const DateField = ({
161
161
  });
162
162
  };
163
163
  const MemoizedDateField = memo(DateField);
164
- MemoizedDateField.displayName = "DateField::pkg=odyssey&odysseyV=1.72.0";
164
+ MemoizedDateField.displayName = "DateField::pkg=odyssey&odysseyV=1.73.1";
165
165
  export { MemoizedDateField as DateField };
166
166
  //# sourceMappingURL=DateField.js.map
@@ -50,6 +50,6 @@ const DateFieldActionBar = ({
50
50
  return null;
51
51
  };
52
52
  const MemoizedDateFieldActionBar = memo(DateFieldActionBar);
53
- MemoizedDateFieldActionBar.displayName = "DateFieldActionBar::pkg=odyssey&odysseyV=1.72.0";
53
+ MemoizedDateFieldActionBar.displayName = "DateFieldActionBar::pkg=odyssey&odysseyV=1.73.1";
54
54
  export { MemoizedDateFieldActionBar as DateFieldActionBar };
55
55
  //# sourceMappingURL=DateFieldActionBar.js.map
@@ -27,6 +27,6 @@ const DateFieldLocalizationProvider = ({
27
27
  });
28
28
  };
29
29
  const MemoizedDateFieldLocalizationProvider = memo(DateFieldLocalizationProvider);
30
- MemoizedDateFieldLocalizationProvider.displayName = "DateFieldLocalizationProvider::pkg=odyssey&odysseyV=1.72.0";
30
+ MemoizedDateFieldLocalizationProvider.displayName = "DateFieldLocalizationProvider::pkg=odyssey&odysseyV=1.73.1";
31
31
  export { MemoizedDateFieldLocalizationProvider as DateFieldLocalizationProvider };
32
32
  //# sourceMappingURL=DateFieldLocalizationProvider.js.map