@okta/odyssey-react-mui 1.70.1 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (930) hide show
  1. package/README.md +8 -20
  2. package/dist/cjs/@types/react-augment.d.cjs.map +1 -1
  3. package/dist/cjs/Accordion.cjs +1 -1
  4. package/dist/cjs/Accordion.cjs.map +1 -1
  5. package/dist/cjs/AnimationContext.cjs +1 -1
  6. package/dist/cjs/Autocomplete.cjs +1 -1
  7. package/dist/cjs/Autocomplete.cjs.map +1 -1
  8. package/dist/cjs/Badge.cjs +1 -1
  9. package/dist/cjs/Badge.cjs.map +1 -1
  10. package/dist/cjs/Banner.cjs +1 -1
  11. package/dist/cjs/Banner.cjs.map +1 -1
  12. package/dist/cjs/Box.cjs +1 -1
  13. package/dist/cjs/Box.cjs.map +1 -1
  14. package/dist/cjs/Breadcrumbs.cjs +1 -1
  15. package/dist/cjs/Breadcrumbs.cjs.map +1 -1
  16. package/dist/cjs/Buttons/BaseButton.cjs +1 -1
  17. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  18. package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
  19. package/dist/cjs/Buttons/BaseMenuButton.cjs.map +1 -1
  20. package/dist/cjs/Buttons/Button.cjs +1 -1
  21. package/dist/cjs/Buttons/Button.cjs.map +1 -1
  22. package/dist/cjs/Buttons/MenuButton.cjs +1 -1
  23. package/dist/cjs/Buttons/MenuButton.cjs.map +1 -1
  24. package/dist/cjs/Buttons/MenuItem.cjs +1 -1
  25. package/dist/cjs/Buttons/MenuItem.cjs.map +1 -1
  26. package/dist/cjs/Callout.cjs +1 -1
  27. package/dist/cjs/Callout.cjs.map +1 -1
  28. package/dist/cjs/Card.cjs +1 -1
  29. package/dist/cjs/Card.cjs.map +1 -1
  30. package/dist/cjs/CircularProgress.cjs +1 -1
  31. package/dist/cjs/CircularProgress.cjs.map +1 -1
  32. package/dist/cjs/ConditionalWrapper.cjs +1 -1
  33. package/dist/cjs/ConditionalWrapper.cjs.map +1 -1
  34. package/dist/cjs/CssBaseline.cjs.map +1 -1
  35. package/dist/cjs/DataTable/DataTable.cjs +1 -1
  36. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  37. package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
  38. package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
  39. package/dist/cjs/DataTable/useRowReordering.cjs.map +1 -1
  40. package/dist/cjs/DatePickers/DateField.cjs +1 -1
  41. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
  42. package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
  43. package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
  44. package/dist/cjs/DatePickers/DatePicker.cjs.map +1 -1
  45. package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
  46. package/dist/cjs/DatePickers/TimeZonePicker.cjs.map +1 -1
  47. package/dist/cjs/DatePickers/datePickerTheme.cjs +57 -27
  48. package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
  49. package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
  50. package/dist/cjs/Dialog.cjs +1 -1
  51. package/dist/cjs/Dialog.cjs.map +1 -1
  52. package/dist/cjs/Drawer.cjs +1 -1
  53. package/dist/cjs/Drawer.cjs.map +1 -1
  54. package/dist/cjs/EmptyState.cjs +1 -1
  55. package/dist/cjs/EmptyState.cjs.map +1 -1
  56. package/dist/cjs/ErrorMessageList.cjs +1 -1
  57. package/dist/cjs/Field.cjs +1 -1
  58. package/dist/cjs/FieldError.cjs +1 -1
  59. package/dist/cjs/FieldHint.cjs +1 -1
  60. package/dist/cjs/FieldLabel.cjs +1 -1
  61. package/dist/cjs/Fields/Checkbox.cjs +1 -1
  62. package/dist/cjs/Fields/Checkbox.cjs.map +1 -1
  63. package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
  64. package/dist/cjs/Fields/CheckboxGroup.cjs.map +1 -1
  65. package/dist/cjs/Fields/Hint.cjs.map +1 -1
  66. package/dist/cjs/Fields/Radio.cjs +1 -1
  67. package/dist/cjs/Fields/RadioGroup.cjs +1 -1
  68. package/dist/cjs/Fields/RadioGroup.cjs.map +1 -1
  69. package/dist/cjs/Fieldset.cjs +1 -1
  70. package/dist/cjs/Fieldset.cjs.map +1 -1
  71. package/dist/cjs/FileUploader/FileUploadIllustration.cjs +1 -1
  72. package/dist/cjs/FileUploader/FileUploadPreview.cjs +1 -1
  73. package/dist/cjs/FileUploader/FileUploader.cjs +1 -1
  74. package/dist/cjs/FileUploader/FileUploader.cjs.map +1 -1
  75. package/dist/cjs/Form.cjs +1 -1
  76. package/dist/cjs/Form.cjs.map +1 -1
  77. package/dist/cjs/FormCheckedProps.cjs.map +1 -1
  78. package/dist/cjs/FullScreenOverlay.cjs +1 -1
  79. package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
  80. package/dist/cjs/HintLink.cjs +1 -1
  81. package/dist/cjs/IconWithTooltip.cjs +1 -1
  82. package/dist/cjs/IconWithTooltip.cjs.map +1 -1
  83. package/dist/cjs/Link.cjs +1 -1
  84. package/dist/cjs/Link.cjs.map +1 -1
  85. package/dist/cjs/MuiPropsChild.cjs +1 -1
  86. package/dist/cjs/NativeSelect.cjs +1 -1
  87. package/dist/cjs/NativeSelect.cjs.map +1 -1
  88. package/dist/cjs/OdysseyCacheProvider.cjs +1 -1
  89. package/dist/cjs/OdysseyCacheProvider.cjs.map +1 -1
  90. package/dist/cjs/OdysseyDesignTokensContext.cjs.map +1 -1
  91. package/dist/cjs/OdysseyProvider.cjs +1 -1
  92. package/dist/cjs/OdysseyProvider.cjs.map +1 -1
  93. package/dist/cjs/OdysseyThemeProvider.cjs +1 -1
  94. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  95. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
  96. package/dist/cjs/Pagination/Pagination.cjs +1 -1
  97. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  98. package/dist/cjs/PasswordField.cjs +1 -1
  99. package/dist/cjs/PasswordField.cjs.map +1 -1
  100. package/dist/cjs/ScreenReaderText.cjs +1 -1
  101. package/dist/cjs/ScreenReaderText.cjs.map +1 -1
  102. package/dist/cjs/SearchField.cjs +1 -1
  103. package/dist/cjs/SearchField.cjs.map +1 -1
  104. package/dist/cjs/Select.cjs +1 -1
  105. package/dist/cjs/Select.cjs.map +1 -1
  106. package/dist/cjs/Stack.cjs +1 -1
  107. package/dist/cjs/Stack.cjs.map +1 -1
  108. package/dist/cjs/Status.cjs +1 -1
  109. package/dist/cjs/Status.cjs.map +1 -1
  110. package/dist/cjs/Surface.cjs +1 -1
  111. package/dist/cjs/Surface.cjs.map +1 -1
  112. package/dist/cjs/Switch.cjs +2 -2
  113. package/dist/cjs/Switch.cjs.map +1 -1
  114. package/dist/cjs/Tabs.cjs +1 -1
  115. package/dist/cjs/Tabs.cjs.map +1 -1
  116. package/dist/cjs/Tag.cjs +1 -1
  117. package/dist/cjs/Tag.cjs.map +1 -1
  118. package/dist/cjs/TagList.cjs +1 -1
  119. package/dist/cjs/TagList.cjs.map +1 -1
  120. package/dist/cjs/TextField.cjs +1 -1
  121. package/dist/cjs/TextField.cjs.map +1 -1
  122. package/dist/cjs/Toast.cjs +1 -1
  123. package/dist/cjs/Toast.cjs.map +1 -1
  124. package/dist/cjs/ToastStack.cjs +1 -1
  125. package/dist/cjs/ToastStack.cjs.map +1 -1
  126. package/dist/cjs/Tooltip.cjs +1 -1
  127. package/dist/cjs/Tooltip.cjs.map +1 -1
  128. package/dist/cjs/Typography.cjs +12 -12
  129. package/dist/cjs/Typography.cjs.map +1 -1
  130. package/dist/cjs/__internal.cjs.map +1 -1
  131. package/dist/cjs/charts/BarChart.cjs +1 -1
  132. package/dist/cjs/charts/BarChart.cjs.map +1 -1
  133. package/dist/cjs/charts/LineChart.cjs +1 -1
  134. package/dist/cjs/charts/LineChart.cjs.map +1 -1
  135. package/dist/cjs/charts/components/ChartContainer.cjs.map +1 -1
  136. package/dist/cjs/charts/components/ChartError.cjs +1 -1
  137. package/dist/cjs/charts/components/ChartError.cjs.map +1 -1
  138. package/dist/cjs/charts/components/ChartFrame.cjs +1 -1
  139. package/dist/cjs/charts/components/ChartFrame.cjs.map +1 -1
  140. package/dist/cjs/charts/components/ChartPopoverContent.cjs +1 -1
  141. package/dist/cjs/charts/components/ChartPopoverContent.cjs.map +1 -1
  142. package/dist/cjs/charts/utils/chartTokens.cjs.map +1 -1
  143. package/dist/cjs/charts/utils/chartTypes.cjs.map +1 -1
  144. package/dist/cjs/charts/utils/formatChartValue.cjs.map +1 -1
  145. package/dist/cjs/charts/utils/getChartSeriesPointData.cjs.map +1 -1
  146. package/dist/cjs/charts/utils/hasDuplicateSeries.cjs.map +1 -1
  147. package/dist/cjs/charts/utils/resolveChartLocale.cjs.map +1 -1
  148. package/dist/cjs/charts/utils/useChartValueFormatter.cjs.map +1 -1
  149. package/dist/cjs/charts/utils/useStableValue.cjs.map +1 -1
  150. package/dist/cjs/createContrastColors.cjs.map +1 -1
  151. package/dist/cjs/createOdysseyStyledComponent.cjs.map +1 -1
  152. package/dist/cjs/getLogicalBoundaries.cjs.map +1 -1
  153. package/dist/cjs/icons.generated/Add.cjs +1 -1
  154. package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
  155. package/dist/cjs/icons.generated/Apps.cjs +1 -1
  156. package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
  157. package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
  158. package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
  159. package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
  160. package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
  161. package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
  162. package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
  163. package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
  164. package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
  165. package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
  166. package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
  167. package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
  168. package/dist/cjs/icons.generated/Bug.cjs +1 -1
  169. package/dist/cjs/icons.generated/Calendar.cjs +1 -1
  170. package/dist/cjs/icons.generated/Call.cjs +1 -1
  171. package/dist/cjs/icons.generated/Chat.cjs +1 -1
  172. package/dist/cjs/icons.generated/Check.cjs +1 -1
  173. package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
  174. package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
  175. package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
  176. package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
  177. package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
  178. package/dist/cjs/icons.generated/Clock.cjs +1 -1
  179. package/dist/cjs/icons.generated/Close.cjs +1 -1
  180. package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
  181. package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
  182. package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
  183. package/dist/cjs/icons.generated/Copy.cjs +1 -1
  184. package/dist/cjs/icons.generated/Customizations.cjs +1 -1
  185. package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
  186. package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
  187. package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
  188. package/dist/cjs/icons.generated/Delete.cjs +1 -1
  189. package/dist/cjs/icons.generated/Deny.cjs +1 -1
  190. package/dist/cjs/icons.generated/Devices.cjs +1 -1
  191. package/dist/cjs/icons.generated/Directory.cjs +1 -1
  192. package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
  193. package/dist/cjs/icons.generated/Documentation.cjs +1 -1
  194. package/dist/cjs/icons.generated/Download.cjs +1 -1
  195. package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
  196. package/dist/cjs/icons.generated/Edit.cjs +1 -1
  197. package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
  198. package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
  199. package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
  200. package/dist/cjs/icons.generated/Filter.cjs +1 -1
  201. package/dist/cjs/icons.generated/Folder.cjs +1 -1
  202. package/dist/cjs/icons.generated/Globe.cjs +1 -1
  203. package/dist/cjs/icons.generated/Grid.cjs +1 -1
  204. package/dist/cjs/icons.generated/Group.cjs +1 -1
  205. package/dist/cjs/icons.generated/Happy.cjs +1 -1
  206. package/dist/cjs/icons.generated/Hide.cjs +1 -1
  207. package/dist/cjs/icons.generated/Home.cjs +1 -1
  208. package/dist/cjs/icons.generated/HomeSelected.cjs +1 -1
  209. package/dist/cjs/icons.generated/IdentityGovernance.cjs +1 -1
  210. package/dist/cjs/icons.generated/IdentityGovernanceSelected.cjs +1 -1
  211. package/dist/cjs/icons.generated/InformationCircle.cjs +1 -1
  212. package/dist/cjs/icons.generated/InformationCircleFilled.cjs +1 -1
  213. package/dist/cjs/icons.generated/Link.cjs +1 -1
  214. package/dist/cjs/icons.generated/List.cjs +1 -1
  215. package/dist/cjs/icons.generated/Lock.cjs +1 -1
  216. package/dist/cjs/icons.generated/Menu.cjs +1 -1
  217. package/dist/cjs/icons.generated/More.cjs +1 -1
  218. package/dist/cjs/icons.generated/Neutral.cjs +1 -1
  219. package/dist/cjs/icons.generated/Notification.cjs +1 -1
  220. package/dist/cjs/icons.generated/Pause.cjs +1 -1
  221. package/dist/cjs/icons.generated/QuestionCircle.cjs +1 -1
  222. package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +1 -1
  223. package/dist/cjs/icons.generated/Refresh.cjs +1 -1
  224. package/dist/cjs/icons.generated/Reports.cjs +1 -1
  225. package/dist/cjs/icons.generated/ReportsSelected.cjs +1 -1
  226. package/dist/cjs/icons.generated/Reset.cjs +1 -1
  227. package/dist/cjs/icons.generated/Resume.cjs +1 -1
  228. package/dist/cjs/icons.generated/Sad.cjs +1 -1
  229. package/dist/cjs/icons.generated/Same.cjs +1 -1
  230. package/dist/cjs/icons.generated/Search.cjs +1 -1
  231. package/dist/cjs/icons.generated/Security.cjs +1 -1
  232. package/dist/cjs/icons.generated/SecuritySelected.cjs +1 -1
  233. package/dist/cjs/icons.generated/Send.cjs +1 -1
  234. package/dist/cjs/icons.generated/Server.cjs +1 -1
  235. package/dist/cjs/icons.generated/Settings.cjs +1 -1
  236. package/dist/cjs/icons.generated/SettingsSelected.cjs +1 -1
  237. package/dist/cjs/icons.generated/Show.cjs +1 -1
  238. package/dist/cjs/icons.generated/Sparkle.cjs +1 -1
  239. package/dist/cjs/icons.generated/Subtract.cjs +1 -1
  240. package/dist/cjs/icons.generated/Sync.cjs +1 -1
  241. package/dist/cjs/icons.generated/ThumbsDown.cjs +1 -1
  242. package/dist/cjs/icons.generated/ThumbsUp.cjs +1 -1
  243. package/dist/cjs/icons.generated/Unlock.cjs +1 -1
  244. package/dist/cjs/icons.generated/Upload.cjs +1 -1
  245. package/dist/cjs/icons.generated/User.cjs +1 -1
  246. package/dist/cjs/icons.generated/Video.cjs +1 -1
  247. package/dist/cjs/icons.generated/Warning.cjs +1 -1
  248. package/dist/cjs/icons.generated/WarningFilled.cjs +1 -1
  249. package/dist/cjs/icons.generated/Workflows.cjs +1 -1
  250. package/dist/cjs/icons.generated/WorkflowsSelected.cjs +1 -1
  251. package/dist/cjs/inputUtils.cjs.map +1 -1
  252. package/dist/cjs/labs/AppTile.cjs +1 -1
  253. package/dist/cjs/labs/AppTile.cjs.map +1 -1
  254. package/dist/cjs/labs/DataFilters.cjs +2 -2
  255. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  256. package/dist/cjs/labs/DataTable.cjs +1 -1
  257. package/dist/cjs/labs/DataTable.cjs.map +1 -1
  258. package/dist/cjs/labs/DataTablePagination.cjs +1 -1
  259. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
  260. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  261. package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
  262. package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
  263. package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
  264. package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
  265. package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
  266. package/dist/cjs/labs/DataView/DataTable.cjs.map +1 -1
  267. package/dist/cjs/labs/DataView/DataView.cjs +1 -1
  268. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  269. package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
  270. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
  271. package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
  272. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  273. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
  274. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  275. package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
  276. package/dist/cjs/labs/DataView/TableSettings.cjs.map +1 -1
  277. package/dist/cjs/labs/DataView/componentTypes.cjs.map +1 -1
  278. package/dist/cjs/labs/DataView/tableConstants.cjs.map +1 -1
  279. package/dist/cjs/labs/DataView/testSupportData.cjs.map +1 -1
  280. package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
  281. package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
  282. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +2 -2
  283. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  284. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs +4 -4
  285. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs.map +1 -1
  286. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
  287. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
  288. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
  289. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs.map +1 -1
  290. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +1 -1
  291. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +1 -1
  292. package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +1 -1
  293. package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
  294. package/dist/cjs/labs/PageTemplate/Layout.cjs.map +1 -1
  295. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
  296. package/dist/cjs/labs/PaginatedTable.cjs +1 -1
  297. package/dist/cjs/labs/StaticTable.cjs +1 -1
  298. package/dist/cjs/labs/UserProfile.cjs +1 -1
  299. package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
  300. package/dist/cjs/logos.generated/Duo.cjs +1 -1
  301. package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
  302. package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
  303. package/dist/cjs/logos.generated/Persona.cjs +1 -1
  304. package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
  305. package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
  306. package/dist/cjs/test-utils/appendToSandbox.cjs.map +1 -1
  307. package/dist/cjs/test-utils/getControlledElement.cjs.map +1 -1
  308. package/dist/cjs/test-utils/renderWithOdysseyProvider.cjs.map +1 -1
  309. package/dist/cjs/test-utils/viewportTestSizes.cjs.map +1 -1
  310. package/dist/cjs/theme/components/Autocomplete.cjs.map +1 -1
  311. package/dist/cjs/theme/components/Button.cjs.map +1 -1
  312. package/dist/cjs/theme/components/CircularProgress.cjs.map +1 -1
  313. package/dist/cjs/theme/components/Drawer.cjs.map +1 -1
  314. package/dist/cjs/theme/components/Form.cjs.map +1 -1
  315. package/dist/cjs/theme/components/Input.cjs.map +1 -1
  316. package/dist/cjs/theme/components/Table.cjs.map +1 -1
  317. package/dist/cjs/theme/useAppElementContainerQuery.cjs.map +1 -1
  318. package/dist/cjs/theme/useContainerQuery.cjs.map +1 -1
  319. package/dist/cjs/theme/useMediaQuery.cjs.map +1 -1
  320. package/dist/cjs/tools/addSpecificity.cjs.map +1 -1
  321. package/dist/cjs/tools/createBrowserMessageBus.cjs +48 -0
  322. package/dist/cjs/tools/createBrowserMessageBus.cjs.map +1 -0
  323. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +1 -1
  324. package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -1
  325. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +1 -1
  326. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  327. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
  328. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
  329. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  330. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
  331. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
  332. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +2 -2
  333. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
  334. package/dist/cjs/ui-shell/SideNav/SideNavItemContentContext.cjs.map +1 -1
  335. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
  336. package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +1 -1
  337. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
  338. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
  339. package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs.map +1 -1
  340. package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs.map +1 -1
  341. package/dist/cjs/ui-shell/SideNav/SortableList/SortableOverlay.cjs.map +1 -1
  342. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  343. package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
  344. package/dist/cjs/ui-shell/SkipToContent.cjs.map +1 -1
  345. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
  346. package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
  347. package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +1 -1
  348. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +1 -1
  349. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs.map +1 -1
  350. package/dist/cjs/ui-shell/UiShell.cjs +1 -1
  351. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  352. package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
  353. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  354. package/dist/cjs/ui-shell/WideUiShellContent.cjs +1 -1
  355. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  356. package/dist/cjs/ui-shell/uiShellContentTypes.cjs.map +1 -1
  357. package/dist/cjs/ui-shell/uiShellSharedConstants.cjs.map +1 -1
  358. package/dist/cjs/useContrastMode.cjs.map +1 -1
  359. package/dist/cjs/useStableCallback.cjs.map +1 -1
  360. package/dist/cjs/useThemeCache.cjs.map +1 -1
  361. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  362. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  363. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  364. package/dist/esm/@types/react-augment.d.js.map +1 -1
  365. package/dist/esm/Accordion.js +1 -1
  366. package/dist/esm/Accordion.js.map +1 -1
  367. package/dist/esm/AnimationContext.js +1 -1
  368. package/dist/esm/Autocomplete.js +1 -1
  369. package/dist/esm/Autocomplete.js.map +1 -1
  370. package/dist/esm/Badge.js +1 -1
  371. package/dist/esm/Badge.js.map +1 -1
  372. package/dist/esm/Banner.js +1 -1
  373. package/dist/esm/Banner.js.map +1 -1
  374. package/dist/esm/Box.js +1 -1
  375. package/dist/esm/Box.js.map +1 -1
  376. package/dist/esm/Breadcrumbs.js +1 -1
  377. package/dist/esm/Breadcrumbs.js.map +1 -1
  378. package/dist/esm/Buttons/BaseButton.js +1 -1
  379. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  380. package/dist/esm/Buttons/BaseMenuButton.js +1 -1
  381. package/dist/esm/Buttons/BaseMenuButton.js.map +1 -1
  382. package/dist/esm/Buttons/Button.js +1 -1
  383. package/dist/esm/Buttons/Button.js.map +1 -1
  384. package/dist/esm/Buttons/MenuButton.js +1 -1
  385. package/dist/esm/Buttons/MenuButton.js.map +1 -1
  386. package/dist/esm/Buttons/MenuItem.js +1 -1
  387. package/dist/esm/Buttons/MenuItem.js.map +1 -1
  388. package/dist/esm/Callout.js +1 -1
  389. package/dist/esm/Callout.js.map +1 -1
  390. package/dist/esm/Card.js +1 -1
  391. package/dist/esm/Card.js.map +1 -1
  392. package/dist/esm/CircularProgress.js +1 -1
  393. package/dist/esm/CircularProgress.js.map +1 -1
  394. package/dist/esm/ConditionalWrapper.js +1 -1
  395. package/dist/esm/ConditionalWrapper.js.map +1 -1
  396. package/dist/esm/CssBaseline.js.map +1 -1
  397. package/dist/esm/DataTable/DataTable.js +1 -1
  398. package/dist/esm/DataTable/DataTable.js.map +1 -1
  399. package/dist/esm/DataTable/DataTableRowActions.js +1 -1
  400. package/dist/esm/DataTable/DataTableSettings.js +1 -1
  401. package/dist/esm/DataTable/useRowReordering.js.map +1 -1
  402. package/dist/esm/DatePickers/DateField.js +1 -1
  403. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  404. package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
  405. package/dist/esm/DatePickers/DatePicker.js +1 -1
  406. package/dist/esm/DatePickers/DatePicker.js.map +1 -1
  407. package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
  408. package/dist/esm/DatePickers/TimeZonePicker.js.map +1 -1
  409. package/dist/esm/DatePickers/datePickerTheme.js +57 -27
  410. package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
  411. package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
  412. package/dist/esm/Dialog.js +1 -1
  413. package/dist/esm/Dialog.js.map +1 -1
  414. package/dist/esm/Drawer.js +1 -1
  415. package/dist/esm/Drawer.js.map +1 -1
  416. package/dist/esm/EmptyState.js +1 -1
  417. package/dist/esm/EmptyState.js.map +1 -1
  418. package/dist/esm/ErrorMessageList.js +1 -1
  419. package/dist/esm/Field.js +1 -1
  420. package/dist/esm/FieldError.js +1 -1
  421. package/dist/esm/FieldHint.js +1 -1
  422. package/dist/esm/FieldLabel.js +1 -1
  423. package/dist/esm/Fields/Checkbox.js +1 -1
  424. package/dist/esm/Fields/Checkbox.js.map +1 -1
  425. package/dist/esm/Fields/CheckboxGroup.js +1 -1
  426. package/dist/esm/Fields/CheckboxGroup.js.map +1 -1
  427. package/dist/esm/Fields/Hint.js.map +1 -1
  428. package/dist/esm/Fields/Radio.js +1 -1
  429. package/dist/esm/Fields/RadioGroup.js +1 -1
  430. package/dist/esm/Fields/RadioGroup.js.map +1 -1
  431. package/dist/esm/Fieldset.js +1 -1
  432. package/dist/esm/Fieldset.js.map +1 -1
  433. package/dist/esm/FileUploader/FileUploadIllustration.js +1 -1
  434. package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
  435. package/dist/esm/FileUploader/FileUploader.js +1 -1
  436. package/dist/esm/FileUploader/FileUploader.js.map +1 -1
  437. package/dist/esm/Form.js +1 -1
  438. package/dist/esm/Form.js.map +1 -1
  439. package/dist/esm/FormCheckedProps.js.map +1 -1
  440. package/dist/esm/FullScreenOverlay.js +1 -1
  441. package/dist/esm/FullScreenOverlayContext.js +1 -1
  442. package/dist/esm/HintLink.js +1 -1
  443. package/dist/esm/IconWithTooltip.js +1 -1
  444. package/dist/esm/IconWithTooltip.js.map +1 -1
  445. package/dist/esm/Link.js +1 -1
  446. package/dist/esm/Link.js.map +1 -1
  447. package/dist/esm/MuiPropsChild.js +1 -1
  448. package/dist/esm/NativeSelect.js +1 -1
  449. package/dist/esm/NativeSelect.js.map +1 -1
  450. package/dist/esm/OdysseyCacheProvider.js +1 -1
  451. package/dist/esm/OdysseyCacheProvider.js.map +1 -1
  452. package/dist/esm/OdysseyDesignTokensContext.js.map +1 -1
  453. package/dist/esm/OdysseyProvider.js +1 -1
  454. package/dist/esm/OdysseyProvider.js.map +1 -1
  455. package/dist/esm/OdysseyThemeProvider.js +1 -1
  456. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  457. package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
  458. package/dist/esm/Pagination/Pagination.js +1 -1
  459. package/dist/esm/Pagination/Pagination.js.map +1 -1
  460. package/dist/esm/PasswordField.js +1 -1
  461. package/dist/esm/PasswordField.js.map +1 -1
  462. package/dist/esm/ScreenReaderText.js +1 -1
  463. package/dist/esm/ScreenReaderText.js.map +1 -1
  464. package/dist/esm/SearchField.js +1 -1
  465. package/dist/esm/SearchField.js.map +1 -1
  466. package/dist/esm/Select.js +1 -1
  467. package/dist/esm/Select.js.map +1 -1
  468. package/dist/esm/Stack.js +1 -1
  469. package/dist/esm/Stack.js.map +1 -1
  470. package/dist/esm/Status.js +1 -1
  471. package/dist/esm/Status.js.map +1 -1
  472. package/dist/esm/Surface.js +1 -1
  473. package/dist/esm/Surface.js.map +1 -1
  474. package/dist/esm/Switch.js +2 -2
  475. package/dist/esm/Switch.js.map +1 -1
  476. package/dist/esm/Tabs.js +1 -1
  477. package/dist/esm/Tabs.js.map +1 -1
  478. package/dist/esm/Tag.js +1 -1
  479. package/dist/esm/Tag.js.map +1 -1
  480. package/dist/esm/TagList.js +1 -1
  481. package/dist/esm/TagList.js.map +1 -1
  482. package/dist/esm/TextField.js +1 -1
  483. package/dist/esm/TextField.js.map +1 -1
  484. package/dist/esm/Toast.js +1 -1
  485. package/dist/esm/Toast.js.map +1 -1
  486. package/dist/esm/ToastStack.js +1 -1
  487. package/dist/esm/ToastStack.js.map +1 -1
  488. package/dist/esm/Tooltip.js +1 -1
  489. package/dist/esm/Tooltip.js.map +1 -1
  490. package/dist/esm/Typography.js +12 -12
  491. package/dist/esm/Typography.js.map +1 -1
  492. package/dist/esm/__internal.js.map +1 -1
  493. package/dist/esm/charts/BarChart.js +1 -1
  494. package/dist/esm/charts/BarChart.js.map +1 -1
  495. package/dist/esm/charts/LineChart.js +1 -1
  496. package/dist/esm/charts/LineChart.js.map +1 -1
  497. package/dist/esm/charts/components/ChartContainer.js.map +1 -1
  498. package/dist/esm/charts/components/ChartError.js +1 -1
  499. package/dist/esm/charts/components/ChartError.js.map +1 -1
  500. package/dist/esm/charts/components/ChartFrame.js +1 -1
  501. package/dist/esm/charts/components/ChartFrame.js.map +1 -1
  502. package/dist/esm/charts/components/ChartPopoverContent.js +1 -1
  503. package/dist/esm/charts/components/ChartPopoverContent.js.map +1 -1
  504. package/dist/esm/charts/utils/chartTokens.js.map +1 -1
  505. package/dist/esm/charts/utils/chartTypes.js.map +1 -1
  506. package/dist/esm/charts/utils/formatChartValue.js.map +1 -1
  507. package/dist/esm/charts/utils/getChartSeriesPointData.js.map +1 -1
  508. package/dist/esm/charts/utils/hasDuplicateSeries.js.map +1 -1
  509. package/dist/esm/charts/utils/resolveChartLocale.js.map +1 -1
  510. package/dist/esm/charts/utils/useChartValueFormatter.js.map +1 -1
  511. package/dist/esm/charts/utils/useStableValue.js.map +1 -1
  512. package/dist/esm/createContrastColors.js.map +1 -1
  513. package/dist/esm/createOdysseyStyledComponent.js.map +1 -1
  514. package/dist/esm/getLogicalBoundaries.js.map +1 -1
  515. package/dist/esm/icons.generated/Add.js +1 -1
  516. package/dist/esm/icons.generated/AddCircle.js +1 -1
  517. package/dist/esm/icons.generated/Apps.js +1 -1
  518. package/dist/esm/icons.generated/AppsSelected.js +1 -1
  519. package/dist/esm/icons.generated/ArrowBottom.js +1 -1
  520. package/dist/esm/icons.generated/ArrowDown.js +1 -1
  521. package/dist/esm/icons.generated/ArrowLeft.js +1 -1
  522. package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
  523. package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
  524. package/dist/esm/icons.generated/ArrowRight.js +1 -1
  525. package/dist/esm/icons.generated/ArrowTop.js +1 -1
  526. package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
  527. package/dist/esm/icons.generated/ArrowUp.js +1 -1
  528. package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
  529. package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
  530. package/dist/esm/icons.generated/Bug.js +1 -1
  531. package/dist/esm/icons.generated/Calendar.js +1 -1
  532. package/dist/esm/icons.generated/Call.js +1 -1
  533. package/dist/esm/icons.generated/Chat.js +1 -1
  534. package/dist/esm/icons.generated/Check.js +1 -1
  535. package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
  536. package/dist/esm/icons.generated/ChevronDown.js +1 -1
  537. package/dist/esm/icons.generated/ChevronLeft.js +1 -1
  538. package/dist/esm/icons.generated/ChevronRight.js +1 -1
  539. package/dist/esm/icons.generated/ChevronUp.js +1 -1
  540. package/dist/esm/icons.generated/Clock.js +1 -1
  541. package/dist/esm/icons.generated/Close.js +1 -1
  542. package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
  543. package/dist/esm/icons.generated/CollapseLeft.js +1 -1
  544. package/dist/esm/icons.generated/CollapseRight.js +1 -1
  545. package/dist/esm/icons.generated/Copy.js +1 -1
  546. package/dist/esm/icons.generated/Customizations.js +1 -1
  547. package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
  548. package/dist/esm/icons.generated/DangerDiamond.js +1 -1
  549. package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
  550. package/dist/esm/icons.generated/Delete.js +1 -1
  551. package/dist/esm/icons.generated/Deny.js +1 -1
  552. package/dist/esm/icons.generated/Devices.js +1 -1
  553. package/dist/esm/icons.generated/Directory.js +1 -1
  554. package/dist/esm/icons.generated/DirectorySelected.js +1 -1
  555. package/dist/esm/icons.generated/Documentation.js +1 -1
  556. package/dist/esm/icons.generated/Download.js +1 -1
  557. package/dist/esm/icons.generated/DragIndicator.js +1 -1
  558. package/dist/esm/icons.generated/Edit.js +1 -1
  559. package/dist/esm/icons.generated/ExpandLeft.js +1 -1
  560. package/dist/esm/icons.generated/ExpandRight.js +1 -1
  561. package/dist/esm/icons.generated/ExternalLink.js +1 -1
  562. package/dist/esm/icons.generated/Filter.js +1 -1
  563. package/dist/esm/icons.generated/Folder.js +1 -1
  564. package/dist/esm/icons.generated/Globe.js +1 -1
  565. package/dist/esm/icons.generated/Grid.js +1 -1
  566. package/dist/esm/icons.generated/Group.js +1 -1
  567. package/dist/esm/icons.generated/Happy.js +1 -1
  568. package/dist/esm/icons.generated/Hide.js +1 -1
  569. package/dist/esm/icons.generated/Home.js +1 -1
  570. package/dist/esm/icons.generated/HomeSelected.js +1 -1
  571. package/dist/esm/icons.generated/IdentityGovernance.js +1 -1
  572. package/dist/esm/icons.generated/IdentityGovernanceSelected.js +1 -1
  573. package/dist/esm/icons.generated/InformationCircle.js +1 -1
  574. package/dist/esm/icons.generated/InformationCircleFilled.js +1 -1
  575. package/dist/esm/icons.generated/Link.js +1 -1
  576. package/dist/esm/icons.generated/List.js +1 -1
  577. package/dist/esm/icons.generated/Lock.js +1 -1
  578. package/dist/esm/icons.generated/Menu.js +1 -1
  579. package/dist/esm/icons.generated/More.js +1 -1
  580. package/dist/esm/icons.generated/Neutral.js +1 -1
  581. package/dist/esm/icons.generated/Notification.js +1 -1
  582. package/dist/esm/icons.generated/Pause.js +1 -1
  583. package/dist/esm/icons.generated/QuestionCircle.js +1 -1
  584. package/dist/esm/icons.generated/QuestionCircleFilled.js +1 -1
  585. package/dist/esm/icons.generated/Refresh.js +1 -1
  586. package/dist/esm/icons.generated/Reports.js +1 -1
  587. package/dist/esm/icons.generated/ReportsSelected.js +1 -1
  588. package/dist/esm/icons.generated/Reset.js +1 -1
  589. package/dist/esm/icons.generated/Resume.js +1 -1
  590. package/dist/esm/icons.generated/Sad.js +1 -1
  591. package/dist/esm/icons.generated/Same.js +1 -1
  592. package/dist/esm/icons.generated/Search.js +1 -1
  593. package/dist/esm/icons.generated/Security.js +1 -1
  594. package/dist/esm/icons.generated/SecuritySelected.js +1 -1
  595. package/dist/esm/icons.generated/Send.js +1 -1
  596. package/dist/esm/icons.generated/Server.js +1 -1
  597. package/dist/esm/icons.generated/Settings.js +1 -1
  598. package/dist/esm/icons.generated/SettingsSelected.js +1 -1
  599. package/dist/esm/icons.generated/Show.js +1 -1
  600. package/dist/esm/icons.generated/Sparkle.js +1 -1
  601. package/dist/esm/icons.generated/Subtract.js +1 -1
  602. package/dist/esm/icons.generated/Sync.js +1 -1
  603. package/dist/esm/icons.generated/ThumbsDown.js +1 -1
  604. package/dist/esm/icons.generated/ThumbsUp.js +1 -1
  605. package/dist/esm/icons.generated/Unlock.js +1 -1
  606. package/dist/esm/icons.generated/Upload.js +1 -1
  607. package/dist/esm/icons.generated/User.js +1 -1
  608. package/dist/esm/icons.generated/Video.js +1 -1
  609. package/dist/esm/icons.generated/Warning.js +1 -1
  610. package/dist/esm/icons.generated/WarningFilled.js +1 -1
  611. package/dist/esm/icons.generated/Workflows.js +1 -1
  612. package/dist/esm/icons.generated/WorkflowsSelected.js +1 -1
  613. package/dist/esm/inputUtils.js.map +1 -1
  614. package/dist/esm/labs/AppTile.js +1 -1
  615. package/dist/esm/labs/AppTile.js.map +1 -1
  616. package/dist/esm/labs/DataFilters.js +2 -2
  617. package/dist/esm/labs/DataFilters.js.map +1 -1
  618. package/dist/esm/labs/DataTable.js +1 -1
  619. package/dist/esm/labs/DataTable.js.map +1 -1
  620. package/dist/esm/labs/DataTablePagination.js +1 -1
  621. package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
  622. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  623. package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
  624. package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
  625. package/dist/esm/labs/DataView/DataCard.js +1 -1
  626. package/dist/esm/labs/DataView/DataCard.js.map +1 -1
  627. package/dist/esm/labs/DataView/DataTable.js +1 -1
  628. package/dist/esm/labs/DataView/DataTable.js.map +1 -1
  629. package/dist/esm/labs/DataView/DataView.js +1 -1
  630. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  631. package/dist/esm/labs/DataView/DetailPanel.js +1 -1
  632. package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
  633. package/dist/esm/labs/DataView/RowActions.js +1 -1
  634. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  635. package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
  636. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  637. package/dist/esm/labs/DataView/TableSettings.js +1 -1
  638. package/dist/esm/labs/DataView/TableSettings.js.map +1 -1
  639. package/dist/esm/labs/DataView/componentTypes.js.map +1 -1
  640. package/dist/esm/labs/DataView/tableConstants.js.map +1 -1
  641. package/dist/esm/labs/DataView/testSupportData.js.map +1 -1
  642. package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
  643. package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
  644. package/dist/esm/labs/DatePickers/DateTimePicker.js +2 -2
  645. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  646. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js +4 -4
  647. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js.map +1 -1
  648. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
  649. package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
  650. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
  651. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js.map +1 -1
  652. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
  653. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +1 -1
  654. package/dist/esm/labs/PageTemplate/DocumentationLink.js +1 -1
  655. package/dist/esm/labs/PageTemplate/Layout.js +1 -1
  656. package/dist/esm/labs/PageTemplate/Layout.js.map +1 -1
  657. package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
  658. package/dist/esm/labs/PaginatedTable.js +1 -1
  659. package/dist/esm/labs/StaticTable.js +1 -1
  660. package/dist/esm/labs/UserProfile.js +1 -1
  661. package/dist/esm/labs/UserProfileMenuButton.js +1 -1
  662. package/dist/esm/logos.generated/Duo.js +1 -1
  663. package/dist/esm/logos.generated/GoogleAuth.js +1 -1
  664. package/dist/esm/logos.generated/OktaVerify.js +1 -1
  665. package/dist/esm/logos.generated/Persona.js +1 -1
  666. package/dist/esm/logos.generated/SymantecVip.js +1 -1
  667. package/dist/esm/logos.generated/Yubikey.js +1 -1
  668. package/dist/esm/test-utils/appendToSandbox.js.map +1 -1
  669. package/dist/esm/test-utils/getControlledElement.js.map +1 -1
  670. package/dist/esm/test-utils/renderWithOdysseyProvider.js.map +1 -1
  671. package/dist/esm/test-utils/viewportTestSizes.js.map +1 -1
  672. package/dist/esm/theme/components/Autocomplete.js.map +1 -1
  673. package/dist/esm/theme/components/Button.js.map +1 -1
  674. package/dist/esm/theme/components/CircularProgress.js.map +1 -1
  675. package/dist/esm/theme/components/Drawer.js.map +1 -1
  676. package/dist/esm/theme/components/Form.js.map +1 -1
  677. package/dist/esm/theme/components/Input.js.map +1 -1
  678. package/dist/esm/theme/components/Table.js.map +1 -1
  679. package/dist/esm/theme/useAppElementContainerQuery.js.map +1 -1
  680. package/dist/esm/theme/useContainerQuery.js.map +1 -1
  681. package/dist/esm/theme/useMediaQuery.js.map +1 -1
  682. package/dist/esm/tools/addSpecificity.js.map +1 -1
  683. package/dist/esm/tools/createBrowserMessageBus.js +41 -0
  684. package/dist/esm/tools/createBrowserMessageBus.js.map +1 -0
  685. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +1 -1
  686. package/dist/esm/ui-shell/InnerAppContainer.js +1 -1
  687. package/dist/esm/ui-shell/NarrowUiShellContent.js +1 -1
  688. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  689. package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
  690. package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
  691. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  692. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
  693. package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
  694. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +2 -2
  695. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
  696. package/dist/esm/ui-shell/SideNav/SideNavItemContentContext.js.map +1 -1
  697. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
  698. package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +1 -1
  699. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -2
  700. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
  701. package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js.map +1 -1
  702. package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js.map +1 -1
  703. package/dist/esm/ui-shell/SideNav/SortableList/SortableOverlay.js.map +1 -1
  704. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  705. package/dist/esm/ui-shell/SkipToContent.js +1 -1
  706. package/dist/esm/ui-shell/SkipToContent.js.map +1 -1
  707. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
  708. package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
  709. package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +1 -1
  710. package/dist/esm/ui-shell/TopNav/TopNavListItem.js +1 -1
  711. package/dist/esm/ui-shell/TopNav/TopNavListItem.js.map +1 -1
  712. package/dist/esm/ui-shell/UiShell.js +1 -1
  713. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  714. package/dist/esm/ui-shell/UiShellLogo.js +1 -1
  715. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  716. package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
  717. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  718. package/dist/esm/ui-shell/uiShellContentTypes.js.map +1 -1
  719. package/dist/esm/ui-shell/uiShellSharedConstants.js.map +1 -1
  720. package/dist/esm/useContrastMode.js.map +1 -1
  721. package/dist/esm/useStableCallback.js.map +1 -1
  722. package/dist/esm/useThemeCache.js.map +1 -1
  723. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  724. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  725. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  726. package/dist/tsconfig.production.tsbuildinfo +1 -1
  727. package/dist/types/Accordion.d.ts.map +1 -1
  728. package/dist/types/Autocomplete.d.ts +5 -17
  729. package/dist/types/Autocomplete.d.ts.map +1 -1
  730. package/dist/types/Badge.d.ts.map +1 -1
  731. package/dist/types/Banner.d.ts.map +1 -1
  732. package/dist/types/Box.d.ts.map +1 -1
  733. package/dist/types/Breadcrumbs.d.ts +4 -8
  734. package/dist/types/Breadcrumbs.d.ts.map +1 -1
  735. package/dist/types/Buttons/BaseButton.d.ts +2 -6
  736. package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
  737. package/dist/types/Buttons/BaseMenuButton.d.ts +1 -2
  738. package/dist/types/Buttons/BaseMenuButton.d.ts.map +1 -1
  739. package/dist/types/Buttons/Button.d.ts.map +1 -1
  740. package/dist/types/Buttons/MenuButton.d.ts.map +1 -1
  741. package/dist/types/Buttons/MenuItem.d.ts.map +1 -1
  742. package/dist/types/Callout.d.ts.map +1 -1
  743. package/dist/types/Card.d.ts.map +1 -1
  744. package/dist/types/CircularProgress.d.ts +1 -2
  745. package/dist/types/CircularProgress.d.ts.map +1 -1
  746. package/dist/types/ConditionalWrapper.d.ts +1 -2
  747. package/dist/types/ConditionalWrapper.d.ts.map +1 -1
  748. package/dist/types/CssBaseline.d.ts +1 -2
  749. package/dist/types/CssBaseline.d.ts.map +1 -1
  750. package/dist/types/DataTable/DataTable.d.ts +9 -19
  751. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  752. package/dist/types/DataTable/useRowReordering.d.ts.map +1 -1
  753. package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
  754. package/dist/types/DatePickers/TimeZonePicker.d.ts +1 -2
  755. package/dist/types/DatePickers/TimeZonePicker.d.ts.map +1 -1
  756. package/dist/types/DatePickers/datePickerTheme.d.ts.map +1 -1
  757. package/dist/types/DatePickers/useOdysseyDateFields.d.ts +4 -8
  758. package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
  759. package/dist/types/Dialog.d.ts +5 -10
  760. package/dist/types/Dialog.d.ts.map +1 -1
  761. package/dist/types/Drawer.d.ts +4 -9
  762. package/dist/types/Drawer.d.ts.map +1 -1
  763. package/dist/types/EmptyState.d.ts.map +1 -1
  764. package/dist/types/Fields/Checkbox.d.ts.map +1 -1
  765. package/dist/types/Fields/CheckboxGroup.d.ts.map +1 -1
  766. package/dist/types/Fields/Hint.d.ts.map +1 -1
  767. package/dist/types/Fields/RadioGroup.d.ts.map +1 -1
  768. package/dist/types/Fieldset.d.ts.map +1 -1
  769. package/dist/types/FileUploader/FileUploader.d.ts +2 -4
  770. package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
  771. package/dist/types/Form.d.ts +6 -13
  772. package/dist/types/Form.d.ts.map +1 -1
  773. package/dist/types/FormCheckedProps.d.ts +4 -8
  774. package/dist/types/FormCheckedProps.d.ts.map +1 -1
  775. package/dist/types/IconWithTooltip.d.ts.map +1 -1
  776. package/dist/types/Link.d.ts.map +1 -1
  777. package/dist/types/NativeSelect.d.ts +2 -4
  778. package/dist/types/NativeSelect.d.ts.map +1 -1
  779. package/dist/types/OdysseyCacheProvider.d.ts +5 -11
  780. package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
  781. package/dist/types/OdysseyDesignTokensContext.d.ts.map +1 -1
  782. package/dist/types/OdysseyProvider.d.ts +1 -2
  783. package/dist/types/OdysseyProvider.d.ts.map +1 -1
  784. package/dist/types/OdysseyThemeProvider.d.ts +1 -2
  785. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  786. package/dist/types/Pagination/Pagination.d.ts +1 -2
  787. package/dist/types/Pagination/Pagination.d.ts.map +1 -1
  788. package/dist/types/PasswordField.d.ts +2 -14
  789. package/dist/types/PasswordField.d.ts.map +1 -1
  790. package/dist/types/ScreenReaderText.d.ts +1 -2
  791. package/dist/types/ScreenReaderText.d.ts.map +1 -1
  792. package/dist/types/SearchField.d.ts +2 -4
  793. package/dist/types/SearchField.d.ts.map +1 -1
  794. package/dist/types/Select.d.ts.map +1 -1
  795. package/dist/types/Stack.d.ts.map +1 -1
  796. package/dist/types/Status.d.ts.map +1 -1
  797. package/dist/types/Surface.d.ts.map +1 -1
  798. package/dist/types/Switch.d.ts.map +1 -1
  799. package/dist/types/Tabs.d.ts +1 -2
  800. package/dist/types/Tabs.d.ts.map +1 -1
  801. package/dist/types/Tag.d.ts.map +1 -1
  802. package/dist/types/TagList.d.ts.map +1 -1
  803. package/dist/types/TextField.d.ts +6 -12
  804. package/dist/types/TextField.d.ts.map +1 -1
  805. package/dist/types/Toast.d.ts +2 -4
  806. package/dist/types/Toast.d.ts.map +1 -1
  807. package/dist/types/ToastStack.d.ts.map +1 -1
  808. package/dist/types/Tooltip.d.ts.map +1 -1
  809. package/dist/types/Typography.d.ts +3 -6
  810. package/dist/types/Typography.d.ts.map +1 -1
  811. package/dist/types/__internal.d.ts +1 -2
  812. package/dist/types/__internal.d.ts.map +1 -1
  813. package/dist/types/charts/BarChart.d.ts +1 -3
  814. package/dist/types/charts/BarChart.d.ts.map +1 -1
  815. package/dist/types/charts/LineChart.d.ts +1 -3
  816. package/dist/types/charts/LineChart.d.ts.map +1 -1
  817. package/dist/types/charts/components/ChartContainer.d.ts +1 -3
  818. package/dist/types/charts/components/ChartContainer.d.ts.map +1 -1
  819. package/dist/types/charts/components/ChartError.d.ts +1 -3
  820. package/dist/types/charts/components/ChartError.d.ts.map +1 -1
  821. package/dist/types/charts/components/ChartFrame.d.ts +7 -16
  822. package/dist/types/charts/components/ChartFrame.d.ts.map +1 -1
  823. package/dist/types/charts/components/ChartPopoverContent.d.ts +14 -36
  824. package/dist/types/charts/components/ChartPopoverContent.d.ts.map +1 -1
  825. package/dist/types/charts/utils/chartTokens.d.ts +7 -25
  826. package/dist/types/charts/utils/chartTokens.d.ts.map +1 -1
  827. package/dist/types/charts/utils/chartTypes.d.ts +21 -55
  828. package/dist/types/charts/utils/chartTypes.d.ts.map +1 -1
  829. package/dist/types/charts/utils/formatChartValue.d.ts +7 -28
  830. package/dist/types/charts/utils/formatChartValue.d.ts.map +1 -1
  831. package/dist/types/charts/utils/getChartSeriesPointData.d.ts +5 -16
  832. package/dist/types/charts/utils/getChartSeriesPointData.d.ts.map +1 -1
  833. package/dist/types/charts/utils/hasDuplicateSeries.d.ts +1 -3
  834. package/dist/types/charts/utils/hasDuplicateSeries.d.ts.map +1 -1
  835. package/dist/types/charts/utils/resolveChartLocale.d.ts +3 -11
  836. package/dist/types/charts/utils/resolveChartLocale.d.ts.map +1 -1
  837. package/dist/types/charts/utils/useChartValueFormatter.d.ts +3 -10
  838. package/dist/types/charts/utils/useChartValueFormatter.d.ts.map +1 -1
  839. package/dist/types/charts/utils/useStableValue.d.ts +3 -12
  840. package/dist/types/charts/utils/useStableValue.d.ts.map +1 -1
  841. package/dist/types/createContrastColors.d.ts.map +1 -1
  842. package/dist/types/createOdysseyStyledComponent.d.ts +1 -3
  843. package/dist/types/createOdysseyStyledComponent.d.ts.map +1 -1
  844. package/dist/types/getLogicalBoundaries.d.ts +1 -2
  845. package/dist/types/getLogicalBoundaries.d.ts.map +1 -1
  846. package/dist/types/inputUtils.d.ts +2 -4
  847. package/dist/types/inputUtils.d.ts.map +1 -1
  848. package/dist/types/labs/AppTile.d.ts.map +1 -1
  849. package/dist/types/labs/DataFilters.d.ts +9 -20
  850. package/dist/types/labs/DataFilters.d.ts.map +1 -1
  851. package/dist/types/labs/DataTable.d.ts +10 -21
  852. package/dist/types/labs/DataTable.d.ts.map +1 -1
  853. package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  854. package/dist/types/labs/DataView/CardLayoutContent.d.ts +1 -1
  855. package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  856. package/dist/types/labs/DataView/DataCard.d.ts +1 -2
  857. package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
  858. package/dist/types/labs/DataView/DataTable.d.ts +1 -0
  859. package/dist/types/labs/DataView/DataTable.d.ts.map +1 -1
  860. package/dist/types/labs/DataView/DataView.d.ts +1 -0
  861. package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
  862. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  863. package/dist/types/labs/DataView/TableLayoutContent.d.ts +1 -1
  864. package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  865. package/dist/types/labs/DataView/TableSettings.d.ts +1 -1
  866. package/dist/types/labs/DataView/TableSettings.d.ts.map +1 -1
  867. package/dist/types/labs/DataView/componentTypes.d.ts +4 -13
  868. package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
  869. package/dist/types/labs/DataView/tableConstants.d.ts.map +1 -1
  870. package/dist/types/labs/DataView/testSupportData.d.ts.map +1 -1
  871. package/dist/types/labs/DataView/useFilterConversion.d.ts.map +1 -1
  872. package/dist/types/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts.map +1 -1
  873. package/dist/types/labs/PageTemplate/Layout.d.ts +1 -2
  874. package/dist/types/labs/PageTemplate/Layout.d.ts.map +1 -1
  875. package/dist/types/test-utils/appendToSandbox.d.ts +3 -16
  876. package/dist/types/test-utils/appendToSandbox.d.ts.map +1 -1
  877. package/dist/types/test-utils/getControlledElement.d.ts +1 -2
  878. package/dist/types/test-utils/getControlledElement.d.ts.map +1 -1
  879. package/dist/types/test-utils/renderWithOdysseyProvider.d.ts.map +1 -1
  880. package/dist/types/test-utils/viewportTestSizes.d.ts.map +1 -1
  881. package/dist/types/theme/components/Autocomplete.d.ts.map +1 -1
  882. package/dist/types/theme/components/Button.d.ts.map +1 -1
  883. package/dist/types/theme/components/CircularProgress.d.ts.map +1 -1
  884. package/dist/types/theme/components/Drawer.d.ts.map +1 -1
  885. package/dist/types/theme/components/Form.d.ts.map +1 -1
  886. package/dist/types/theme/components/Input.d.ts.map +1 -1
  887. package/dist/types/theme/components/Table.d.ts.map +1 -1
  888. package/dist/types/theme/useAppElementContainerQuery.d.ts +1 -7
  889. package/dist/types/theme/useAppElementContainerQuery.d.ts.map +1 -1
  890. package/dist/types/theme/useContainerQuery.d.ts +2 -8
  891. package/dist/types/theme/useContainerQuery.d.ts.map +1 -1
  892. package/dist/types/theme/useMediaQuery.d.ts +12 -38
  893. package/dist/types/theme/useMediaQuery.d.ts.map +1 -1
  894. package/dist/types/tools/addSpecificity.d.ts +1 -2
  895. package/dist/types/tools/addSpecificity.d.ts.map +1 -1
  896. package/dist/types/tools/createBrowserMessageBus.d.ts +45 -0
  897. package/dist/types/tools/createBrowserMessageBus.d.ts.map +1 -0
  898. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  899. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  900. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
  901. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts +1 -3
  902. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts.map +1 -1
  903. package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
  904. package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts.map +1 -1
  905. package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts +1 -3
  906. package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts.map +1 -1
  907. package/dist/types/ui-shell/SideNav/SortableList/SortableOverlay.d.ts.map +1 -1
  908. package/dist/types/ui-shell/SideNav/types.d.ts +6 -13
  909. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  910. package/dist/types/ui-shell/SkipToContent.d.ts.map +1 -1
  911. package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts +1 -2
  912. package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts.map +1 -1
  913. package/dist/types/ui-shell/UiShell.d.ts +4 -8
  914. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  915. package/dist/types/ui-shell/UiShellProvider.d.ts +2 -4
  916. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  917. package/dist/types/ui-shell/renderUiShell.d.ts +2 -5
  918. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  919. package/dist/types/ui-shell/uiShellContentTypes.d.ts +1 -2
  920. package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -1
  921. package/dist/types/ui-shell/uiShellSharedConstants.d.ts.map +1 -1
  922. package/dist/types/useContrastMode.d.ts +2 -7
  923. package/dist/types/useContrastMode.d.ts.map +1 -1
  924. package/dist/types/useStableCallback.d.ts +5 -16
  925. package/dist/types/useStableCallback.d.ts.map +1 -1
  926. package/dist/types/useThemeCache.d.ts.map +1 -1
  927. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  928. package/dist/types/web-component/renderReactInWebComponent.d.ts +6 -12
  929. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  930. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","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","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","publishAfterReactAppReadyForTranslationSettings","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","getReactComponent","reactRootElements","fallback","children","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 { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.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 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\n * (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\n * settings value (so omitting `translationOverrides` clears it). Pass an updater\n * 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 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 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 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 setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,gBAAgB,QAAwB,8BAA8B;AAC/E,SAASC,yBAAyB,QAAQ,+CAA+C;AACzF,SACEC,OAAO,QAGF,cAAc;AAErB,SAASC,oBAAoB,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1D,OAAO,MAAMC,0BAGZ,GAAG;EACFC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AAwCD,OAAO,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,kB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AoB;IACpBc,yBAAyB,EAAE/C,aAAa;IACxCK;EACF,CAAC,CAAC;EAEF,MAAM2C,qCAAqC,GAAG9B,6BAA6B,CACzE,MAAM;IACJ8B,qCAAqC,CAAC,CAAC;IAEvCjD,QAAQ,GAAG;MACTV,UAAU;MACVgC,kBAAkB;MAClBE,gBAAgB;MAChB0B,iBAAiB,EAAE9B,iCAAiC;MACpD+B,sBAAsB,EAAE9B,+CAA+C;MACvEK,eAAe;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAEDnC,aAAa,CAACmD,WAAW,CAAC9D,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACVgC,kBAAkB;IAClBE,gBAAgB;IAChB0B,iBAAiB,EAAE9B,iCAAiC;IACpD+B,sBAAsB,EAAE9B,+CAA+C;IACvEK,eAAe;IACfU;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","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","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishTranslationSettings","subscribeToTranslationSettings","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","publishAfterReactAppReadyForTranslationSettings","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","getReactComponent","reactRootElements","fallback","children","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 { bufferLatest } from \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.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 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 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 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 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 setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n });\n },\n );\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n setTranslationSettings: publishAfterReactAppReadyForTranslationSettings,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,gBAAgB,QAAwB,8BAA8B;AAC/E,SAASC,y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}
@@ -1 +1 @@
1
- {"version":3,"file":"uiShellContentTypes.js","names":["subComponentNames","TURN_OFF_APP_SWITCHER","Symbol"],"sources":["../../../src/ui-shell/uiShellContentTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { ReactElement } from \"react\";\nimport { ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { AppSwitcherProps } from \"./AppSwitcher/AppSwitcher.js\";\nimport { SideNavProps } from \"./SideNav/types.js\";\nimport { TopNavProps } from \"./TopNav/TopNav.js\";\nimport { UiShellLogoProps } from \"./UiShellLogo.js\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport const TURN_OFF_APP_SWITCHER = Symbol(\n \"Turn off AppSwitcher in the event of an error.\",\n);\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n *\n * In this special case, a value of `TURN_OFF_APP_SWITCHER` tells the `appSwitcher` to not appear. This can occur if there's an error loading the items. In that case, we don't want it to appear.\n */\n appSwitcherProps?: AppSwitcherProps | typeof TURN_OFF_APP_SWITCHER;\n /**\n * Logo that displays in the side nav header and narrow top nav.\n *\n * This used to be `sideNavProps.logoProps`, but the logo is used both in the side nav and narrow top nav. If you don't have a side nav, you still need a logo in narrow view.\n */\n logoProps?: UiShellLogoProps;\n /**\n * Object that gets pass directly to the side nav component. If `undefined` and in `initialVisibleSections`, SideNav will be initially rendered. Pass `null` to hide a previously-visible SideNav.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\"> | null;\n /**\n * Object that gets pass directly to the top nav component. If `undefined` and in `initialVisibleSections`, TopNav will be initially rendered. Pass `null` to hide a previously-visible TopNav.\n */\n topNavProps?: Omit<\n TopNavProps,\n \"leftSideComponent\" | \"rightSideComponent\"\n > | null;\n};\n\nexport type UiShellContentProps = {\n /**\n * **WARNING:** UI Shell will modify the styling of this element.\n * HTML element where the app gets rendered. This typically called the React root element for your app.\n *\n * When passed, the app is expected to render into this element, not the Shadow DOM.\n *\n * UI Shell will position this element appropriately to match the content area inside the Shadow DOM.\n *\n * A major benefit to having this element separate from UI Shell is related to encapsulation. UI Shell has the capability of rendering inside a web component, but in doing so, the app would be subject to the styles in the web component and not the page itself.\n * The app should either be in its own web component or use the global styles, and having this separate element allows us to accomplish that goal.\n */\n appElement: HTMLDivElement;\n /**\n * Controls the scrolling behavior of the app element area.\n *\n * In the case of an app wanting to control their own scrolling, use `\"none\"`.\n *\n * Most apps will want to use `\"vertical\"` and let UI Shell manage scrolling behavior.\n */\n appElementScrollingMode: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Says if `sideNavProps` has been passed in. This is important for rendering as we will override `sideNavProps` internally, but we need to know if they were passed in for showing the loading state.\n */\n hasSideNavProps: boolean;\n /**\n * Defaults to `true`.\n *\n * If `false`, the content area will have no padding provided. This is for the case where an app wants to manage this separate from UI Shell.\n */\n hasStandardAppContentPadding?: boolean;\n /**\n * Parts of UI Shell that are visible when rendered.\n *\n * For example, if `sideNavProps` is `undefined`, should there be a space left for side nav or should that space not exist?\n */\n initialVisibleSections?: SubComponentName[];\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, flagging \"p0\"s, and recovering UI Shell when errors occur.\n */\n onError?: ErrorBoundaryProps[\"onError\"];\n /**\n * Components that will render as children of various other components such as the top nav or side nav.\n */\n optionalComponents?: {\n /**\n * Spot for banners to go at the top of the page.\n */\n banners?: ReactElement;\n /**\n * In narrow view, this is the right-side menu area.\n */\n rightSideMenu?: ReactElement;\n /**\n * Footer in the side nav.\n */\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the left-aligned half.\n */\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the right-aligned half.\n */\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU;AAG9E,OAAO,MAAMC,qBAAqB,GAAGC,MAAM,CACzC,gDACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"uiShellContentTypes.js","names":["subComponentNames","TURN_OFF_APP_SWITCHER","Symbol"],"sources":["../../../src/ui-shell/uiShellContentTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { ReactElement } from \"react\";\nimport { ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { AppSwitcherProps } from \"./AppSwitcher/AppSwitcher.js\";\nimport { SideNavProps } from \"./SideNav/types.js\";\nimport { TopNavProps } from \"./TopNav/TopNav.js\";\nimport { UiShellLogoProps } from \"./UiShellLogo.js\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport const TURN_OFF_APP_SWITCHER = Symbol(\n \"Turn off AppSwitcher in the event of an error.\",\n);\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n *\n * In this special case, a value of `TURN_OFF_APP_SWITCHER` tells the `appSwitcher` to not appear. This can occur if there's an error loading the items. In that case, we don't want it to appear.\n */\n appSwitcherProps?: AppSwitcherProps | typeof TURN_OFF_APP_SWITCHER;\n /**\n * Logo that displays in the side nav header and narrow top nav.\n *\n * This used to be `sideNavProps.logoProps`, but the logo is used both in the side nav and narrow top nav. If you don't have a side nav, you still need a logo in narrow view.\n */\n logoProps?: UiShellLogoProps;\n /**\n * Object that gets pass directly to the side nav component. If `undefined` and in `initialVisibleSections`, SideNav will be initially rendered. Pass `null` to hide a previously-visible SideNav.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\"> | null;\n /**\n * Object that gets pass directly to the top nav component. If `undefined` and in `initialVisibleSections`, TopNav will be initially rendered. Pass `null` to hide a previously-visible TopNav.\n */\n topNavProps?: Omit<\n TopNavProps,\n \"leftSideComponent\" | \"rightSideComponent\"\n > | null;\n};\n\nexport type UiShellContentProps = {\n /**\n * **WARNING:** UI Shell will modify the styling of this element.\n * HTML element where the app gets rendered. This typically called the React root element for your app.\n *\n * When passed, the app is expected to render into this element, not the Shadow DOM.\n *\n * UI Shell will position this element appropriately to match the content area inside the Shadow DOM.\n *\n * A major benefit to having this element separate from UI Shell is related to encapsulation. UI Shell has the capability of rendering inside a web component, but in doing so, the app would be subject to the styles in the web component and not the page itself. The app should either be in its own web component or use the global styles, and having this separate element allows us to accomplish that goal.\n */\n appElement: HTMLDivElement;\n /**\n * Controls the scrolling behavior of the app element area.\n *\n * In the case of an app wanting to control their own scrolling, use `\"none\"`.\n *\n * Most apps will want to use `\"vertical\"` and let UI Shell manage scrolling behavior.\n */\n appElementScrollingMode: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Says if `sideNavProps` has been passed in. This is important for rendering as we will override `sideNavProps` internally, but we need to know if they were passed in for showing the loading state.\n */\n hasSideNavProps: boolean;\n /**\n * Defaults to `true`.\n *\n * If `false`, the content area will have no padding provided. This is for the case where an app wants to manage this separate from UI Shell.\n */\n hasStandardAppContentPadding?: boolean;\n /**\n * Parts of UI Shell that are visible when rendered.\n *\n * For example, if `sideNavProps` is `undefined`, should there be a space left for side nav or should that space not exist?\n */\n initialVisibleSections?: SubComponentName[];\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, flagging \"p0\"s, and recovering UI Shell when errors occur.\n */\n onError?: ErrorBoundaryProps[\"onError\"];\n /**\n * Components that will render as children of various other components such as the top nav or side nav.\n */\n optionalComponents?: {\n /**\n * Spot for banners to go at the top of the page.\n */\n banners?: ReactElement;\n /**\n * In narrow view, this is the right-side menu area.\n */\n rightSideMenu?: ReactElement;\n /**\n * Footer in the side nav.\n */\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the left-aligned half.\n */\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the right-aligned half.\n */\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU;AAG9E,OAAO,MAAMC,qBAAqB,GAAGC,MAAM,CACzC,gDACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"uiShellSharedConstants.js","names":["SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","SIDE_NAV_WIDTH","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","UI_SHELL_RAISED_Z_INDEX","UI_SHELL_OVERLAY_Z_INDEX","SKIP_LINKS_Z_INDEX","emptySideNavItems"],"sources":["../../../src/ui-shell/uiShellSharedConstants.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { SideNavProps } from \"./SideNav/types.js\";\n\n// It's important to bring all our constant values together, so we can change them in one location and ensure the values are all correct relative to each other.\n// This also lends us the capability of swapping these out for a more robust solution in the future.\n\n/* The side nav collapse icon is placed absolutely from the top (Logo container + nav header height) to align it in the middle of the nav header text */\nexport const SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION = \"77px\";\n\nexport const SIDE_NAV_WIDTH = \"300px\";\n\nexport const TOP_NAV_HEIGHT = `${64 / 14}rem`;\n\nexport const UI_SHELL_BASE_Z_INDEX = 100;\n\nexport const UI_SHELL_RAISED_Z_INDEX = 101;\n\nexport const UI_SHELL_OVERLAY_Z_INDEX = 200;\n\nexport const SKIP_LINKS_Z_INDEX = 300;\n\nexport const emptySideNavItems = [] satisfies SideNavProps[\"sideNavItems\"];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,OAAO,MAAMA,wCAAwC,GAAG,MAAM;AAE9D,OAAO,MAAMC,cAAc,GAAG,OAAO;AAErC,OAAO,MAAMC,cAAc,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK;AAE7C,OAAO,MAAMC,qBAAqB,GAAG,GAAG;AAExC,OAAO,MAAMC,uBAAuB,GAAG,GAAG;AAE1C,OAAO,MAAMC,wBAAwB,GAAG,GAAG;AAE3C,OAAO,MAAMC,kBAAkB,GAAG,GAAG;AAErC,OAAO,MAAMC,iBAAiB,GAAG,EAAyC","ignoreList":[]}
1
+ {"version":3,"file":"uiShellSharedConstants.js","names":["SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","SIDE_NAV_WIDTH","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","UI_SHELL_RAISED_Z_INDEX","UI_SHELL_OVERLAY_Z_INDEX","SKIP_LINKS_Z_INDEX","emptySideNavItems"],"sources":["../../../src/ui-shell/uiShellSharedConstants.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { SideNavProps } from \"./SideNav/types.js\";\n\n// It's important to bring all our constant values together, so we can change them in one location and ensure the values are all correct relative to each other. This also lends us the capability of swapping these out for a more robust solution in the future.\n\n/* The side nav collapse icon is placed absolutely from the top (Logo container + nav header height) to align it in the middle of the nav header text */\nexport const SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION = \"77px\";\n\nexport const SIDE_NAV_WIDTH = \"300px\";\n\nexport const TOP_NAV_HEIGHT = `${64 / 14}rem`;\n\nexport const UI_SHELL_BASE_Z_INDEX = 100;\n\nexport const UI_SHELL_RAISED_Z_INDEX = 101;\n\nexport const UI_SHELL_OVERLAY_Z_INDEX = 200;\n\nexport const SKIP_LINKS_Z_INDEX = 300;\n\nexport const emptySideNavItems = [] satisfies SideNavProps[\"sideNavItems\"];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAOA,OAAO,MAAMA,wCAAwC,GAAG,MAAM;AAE9D,OAAO,MAAMC,cAAc,GAAG,OAAO;AAErC,OAAO,MAAMC,cAAc,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK;AAE7C,OAAO,MAAMC,qBAAqB,GAAG,GAAG;AAExC,OAAO,MAAMC,uBAAuB,GAAG,GAAG;AAE1C,OAAO,MAAMC,wBAAwB,GAAG,GAAG;AAE3C,OAAO,MAAMC,kBAAkB,GAAG,GAAG;AAErC,OAAO,MAAMC,iBAAiB,GAAG,EAAyC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useContrastMode.js","names":["Tokens","createContext","useCallback","useContext","useLayoutEffect","useRef","useState","hexToRgb","ContrastModeContext","contrastMode","defaultContrast","useContrastModeContext","hueNeutral50Rgb","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","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","newBgColor","current","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\n * `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so\n * container queries track the space Odyssey actually occupies. Absent outside\n * a provider, and `current` stays `null` when the provider renders with\n * `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.\n * When `parentElement` is null (e.g., at a shadow root), this checks if the\n * element is inside a ShadowRoot and jumps to the host element to continue\n * 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\n * 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\n // document.head may not be accessible. Guard against null to\n // 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\n // 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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,MAAM,MAAM,6BAA6B;AACrD,SACEC,aAAa,EAEbC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SAASC,QAAQ,QAAQ,eAAe;AAexC,OAAO,MAAMC,mBAAmB,GAAGP,aAAa,CAA0B;EACxEQ,YAAY,EAAE;AAChB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAG,aAAa;AAE5C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAMR,UAAU,CAACK,mBAAmB,CAAC;AAE3E,OAAO,MAAMI,eAAe,GAAGL,QAAQ,CAACP,MAAM,CAACa,YAAY,CAAC,CAACC,iBAAiB;AAE9E,OAAO,MAAMC,kBAAkB,GAAIC,KAAa,IAC9CA,KAAK,KAAK,kBAAkB,IAAIA,KAAK,KAAK,aAAa;AAEzD,OAAO,MAAMC,kBAAkB,GAAIC,IAAY,IAC7CA,IAAI,CAACC,OAAO,CAAC,2CAA2C,EAAE,iBAAiB,CAAC;A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ChCD,KAAK,CAACE,YAAY,KAAK,kBAAkB,EACzC;QACAjB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAID,MAAMkB,SAAS,GAAGxB,oBAAoB,CAACQ,OAAO,EAAEhB,WAAW,CAAC,CAAC,IAAIoB,QAAQ;IACzEY,SAAS,CAACC,gBAAgB,CAAC,eAAe,EAAEL,eAAe,CAAC;IAC5Dd,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXkB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAC5B,oBAAoB,EAAEO,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLN,oBAAoB;IACpBhC,YAAY;IACZkC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useContrastMode.js","names":["Tokens","createContext","useCallback","useContext","useLayoutEffect","useRef","useState","hexToRgb","ContrastModeContext","contrastMode","defaultContrast","useContrastModeContext","hueNeutral50Rgb","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","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","newBgColor","current","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":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,MAAM,MAAM,6BAA6B;AACrD,SACEC,aAAa,EAEbC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SAASC,QAAQ,QAAQ,eAAe;AAWxC,OAAO,MAAMC,mBAAmB,GAAGP,aAAa,CAA0B;EACxEQ,YAAY,EAAE;AAChB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAG,aAAa;AAE5C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAMR,UAAU,CAACK,mBA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AAe,EAAE,CAAC,OAAO,EAAE,OAAO;MACpC,CAAC,CAAC;IACJ;IAEA,IAAIJ,QAAQ,CAACK,IAAI,EAAE;MACjBR,QAAQ,CAACK,OAAO,CAACF,QAAQ,CAACK,IAAI,EAAE;QAC9BC,SAAS,EAAE,IAAI;QACfC,OAAO,EAAE;MACX,CAAC,CAAC;IACJ;IAEA,MAAMC,eAAe,GAAIC,KAAY,IAAK;MACxC,IACEA,KAAK,YAAYC,eAAe,IAChCD,KAAK,CAACE,YAAY,KAAK,kBAAkB,EACzC;QACAjB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAGD,MAAMkB,SAAS,GAAGxB,oBAAoB,CAACQ,OAAO,EAAEhB,WAAW,CAAC,CAAC,IAAIoB,QAAQ;IACzEY,SAAS,CAACC,gBAAgB,CAAC,eAAe,EAAEL,eAAe,CAAC;IAC5Dd,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXkB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAC5B,oBAAoB,EAAEO,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLN,oBAAoB;IACpBhC,YAAY;IACZkC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useStableCallback.js","names":["unstable_useEventCallback","noop","undefined","useStableCallback","callback"],"sources":["../../src/useStableCallback.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { unstable_useEventCallback } from \"@mui/utils\";\n\nconst noop = () => undefined;\n\n/**\n * Returns a callback with a permanent identity that always invokes the most\n * recent version of `callback`.\n *\n * Use this for any consumer-supplied callback a component notifies from a\n * `useEffect`. Consumers routinely pass an inline arrow function, which has a\n * new identity on every render. Listing that identity in an effect's dependency\n * array makes the effect run on renders where nothing it reports actually\n * changed, and it then reports values captured before the latest commit. When\n * the consumer feeds a reported value back in as a prop, the prop and the\n * component's internal state can swap values on every commit and never settle.\n *\n * The returned callback is safe to omit from dependency arrays, so the effect\n * can depend only on the state it reports:\n *\n * ```tsx\n * const stableOnPaginationChange = useStableCallback(onPaginationChange);\n *\n * useEffect(() => {\n * stableOnPaginationChange(pagination);\n * }, [pagination, stableOnPaginationChange]);\n * ```\n *\n * The latest `callback` is captured in a layout effect, so the returned\n * callback must not be invoked during render. Invoke it from an effect or an\n * event handler.\n *\n * Passing `undefined` is supported and yields a callback that does nothing,\n * which removes the need for optional-call syntax at every call site.\n *\n * @param callback The callback to stabilize, typically a component prop.\n */\nexport const useStableCallback = <\n CallbackArguments extends unknown[],\n CallbackReturn,\n>(\n callback?: (...callbackArguments: CallbackArguments) => CallbackReturn,\n) =>\n unstable_useEventCallback<CallbackArguments, CallbackReturn | undefined>(\n callback ?? noop,\n );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,yBAAyB,QAAQ,YAAY;AAEtD,MAAMC,IAAI,GAAGA,CAAA,KAAMC,SAAS;AAkC5B,OAAO,MAAMC,iBAAiB,GAI5BC,QAAsE,IAEtEJ,yBAAyB,CACvBI,QAAQ,IAAIH,IACd,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useStableCallback.js","names":["unstable_useEventCallback","noop","undefined","useStableCallback","callback"],"sources":["../../src/useStableCallback.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { unstable_useEventCallback } from \"@mui/utils\";\n\nconst noop = () => undefined;\n\n/**\n * Returns a callback with a permanent identity that always invokes the most recent version of `callback`.\n *\n * Use this for any consumer-supplied callback a component notifies from a `useEffect`. Consumers routinely pass an inline arrow function, which has a new identity on every render. Listing that identity in an effect's dependency array makes the effect run on renders where nothing it reports actually changed, and it then reports values captured before the latest commit. When the consumer feeds a reported value back in as a prop, the prop and the component's internal state can swap values on every commit and never settle.\n *\n * The returned callback is safe to omit from dependency arrays, so the effect can depend only on the state it reports:\n *\n * ```tsx\n * const stableOnPaginationChange = useStableCallback(onPaginationChange);\n *\n * useEffect(() => {\n * stableOnPaginationChange(pagination);\n * }, [pagination, stableOnPaginationChange]);\n * ```\n *\n * The latest `callback` is captured in a layout effect, so the returned callback must not be invoked during render. Invoke it from an effect or an event handler.\n *\n * Passing `undefined` is supported and yields a callback that does nothing, which removes the need for optional-call syntax at every call site.\n *\n * @param callback The callback to stabilize, typically a component prop.\n */\nexport const useStableCallback = <\n CallbackArguments extends unknown[],\n CallbackReturn,\n>(\n callback?: (...callbackArguments: CallbackArguments) => CallbackReturn,\n) =>\n unstable_useEventCallback<CallbackArguments, CallbackReturn | undefined>(\n callback ?? noop,\n );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,yBAAyB,QAAQ,YAAY;AAEtD,MAAMC,IAAI,GAAGA,CAAA,KAAMC,SAAS;AAuB5B,OAAO,MAAMC,iBAAiB,GAI5BC,QAAsE,IAEtEJ,yBAAyB,CACvBI,QAAQ,IAAIH,IACd,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useThemeCache.js","names":["createContext","useCallback","useContext","useMemo","createOdysseyMuiTheme","ThemeCacheContext","useThemeCache","odysseyTokens","shadowRootElement","existingCache","localCache","Map","getOrCreateTheme","mode","get","cached","theme","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\n // 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAEvE,SAASC,qBAAqB,QAAsB,kBAAkB;AAStE,OAAO,MAAMC,iBAAiB,GAAGL,aAAa,CAAoB,IAAI,CAAC;AAEvE,OAAO,MAAMM,aAAa,GAAGA,CAAC;EAC5BC,aAAa;EACbC;AAIF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGP,UAAU,CAACG,iBAAiB,CAAC;EAEnD,MAAMK,UAAU,GAAGP,OAAO,CACxB,MAAM,IAAIQ,GAAG,CAAsB,CAAC,EAIpC,CAACJ,aAAa,EAAEC,iBAAiB,CACnC,CAAC;EAED,MAAMI,gBAAgB,GAAGX,WAAW,CACjCY,IAAkB,IAAK;IACtB,IACEJ,aAAa,IACbA,aAAa,CAACF,aAAa,KAAKA,aAAa,IAC7CE,aAAa,CAACD,iBAAiB,KAAKA,iBAAiB,EACrD;MACA,OAAOC,aAAa,CAACK,GAAG,CAACD,IAAI,CAAC;IAChC;IACA,MAAME,MAAM,GAAGL,UAAU,CAACI,GAAG,CAACD,IAAI,CAAC;IACnC,IAAIE,MAAM,EAAE,OAAOA,MAAM;IACzB,MAAMC,KAAK,GAAGZ,qBAAqB,CAAC;MAClCa,YAAY,EAAEJ,IAAI;MAClBN,aAAa;MACbC;IACF,CAAC,CAAC;IACFE,UAAU,CAACQ,GAAG,CAACL,IAAI,EAAEG,KAAK,CAAC;IAC3B,OAAOA,KAAK;EACd,CAAC,EACD,CAACP,aAAa,EAAEC,UAAU,EAAEH,aAAa,EAAEC,iBAAiB,CAC9D,CAAC;EAED,MAAMW,UAAU,GAAGhB,OAAO,CACxB,OAAO;IAAEW,GAAG,EAAEF,gBAAgB;IAAEL,aAAa;IAAEC;EAAkB,CAAC,CAAC,EACnE,CAACI,gBAAgB,EAAEL,aAAa,EAAEC,iBAAiB,CACrD,CAAC;EAED,OAAO;IAAEI,gBAAgB;IAAEO;EAAW,CAAC;AACzC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useThemeCache.js","names":["createContext","useCallback","useContext","useMemo","createOdysseyMuiTheme","ThemeCacheContext","useThemeCache","odysseyTokens","shadowRootElement","existingCache","localCache","Map","getOrCreateTheme","mode","get","cached","theme","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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAEvE,SAASC,qBAAqB,QAAsB,kBAAkB;AAStE,OAAO,MAAMC,iBAAiB,GAAGL,aAAa,CAAoB,IAAI,CAAC;AAEvE,OAAO,MAAMM,aAAa,GAAGA,CAAC;EAC5BC,aAAa;EACbC;AAIF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGP,UAAU,CAACG,iBAAiB,CAAC;EAEnD,MAAMK,UAAU,GAAGP,OAAO,CACxB,MAAM,IAAIQ,GAAG,CAAsB,CAAC,EAGpC,CAACJ,aAAa,EAAEC,iBAAiB,CACnC,CAAC;EAED,MAAMI,gBAAgB,GAAGX,WAAW,CACjCY,IAAkB,IAAK;IACtB,IACEJ,aAAa,IACbA,aAAa,CAACF,aAAa,KAAKA,aAAa,IAC7CE,aAAa,CAACD,iBAAiB,KAAKA,iBAAiB,EACrD;MACA,OAAOC,aAAa,CAACK,GAAG,CAACD,IAAI,CAAC;IAChC;IACA,MAAME,MAAM,GAAGL,UAAU,CAACI,GAAG,CAACD,IAAI,CAAC;IACnC,IAAIE,MAAM,EAAE,OAAOA,MAAM;IACzB,MAAMC,KAAK,GAAGZ,qBAAqB,CAAC;MAClCa,YAAY,EAAEJ,IAAI;MAClBN,aAAa;MACbC;IACF,CAAC,CAAC;IACFE,UAAU,CAACQ,GAAG,CAACL,IAAI,EAAEG,KAAK,CAAC;IAC3B,OAAOA,KAAK;EACd,CAAC,EACD,CAACP,aAAa,EAAEC,UAAU,EAAEH,aAAa,EAAEC,iBAAiB,CAC9D,CAAC;EAED,MAAMW,UAAU,GAAGhB,OAAO,CACxB,OAAO;IAAEW,GAAG,EAAEF,gBAAgB;IAAEL,aAAa;IAAEC;EAAkB,CAAC,CAAC,EACnE,CAACI,gBAAgB,EAAEL,aAAa,EAAEC,iBAAiB,CACrD,CAAC;EAED,OAAO;IAAEI,gBAAgB;IAAEO;EAAW,CAAC;AACzC,CAAC","ignoreList":[]}
@@ -8,5 +8,5 @@
8
8
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
- */export default "1-70-1";
11
+ */export default "1-71-0";
12
12
  //# sourceMappingURL=odysseyWebComponentVersion.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-70-1\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-71-0\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderReactInWebComponent.js","names":["createRoot","createReactRootElements","encapsulateShadowDomFromGlobalStyles","version","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRoot","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","render","connectedCallback","nonce","getAttribute","window","cspNonce","Error","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n #reactRoot: Root | null = null;\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.#getReactComponent = getReactComponent;\n if (this.#reactRoot) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n if (this.#reactRoot) {\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);\n\n if (this.#getReactComponent) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n disconnectedCallback() {\n if (!this.#reactRoot) {\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n this.#reactRoot.unmount();\n this.#reactRoot = null;\n // #getReactComponent is preserved — if reconnected it will render on connectedCallback\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance.\n * Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,UAAU,QAAmB,kBAAkB;AAExD,SACEC,uBAAuB,QAElB,8BAA8B;AACrC,SAASC,oCAAoC,QAAQ,2CAA2C;AAChG,OAAOC,OAAO,MAAM,2CAA2C;AAS/D,OAAO,MAAMC,6BAA6B,GAAG,kCAAkC;AAG/E,OAAO,MAAMC,yBAAyB,GACpC,+BAA+BF,OAAO,EAAE,CAACG,WAAW,CAAC,CAAC;AAExD,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAE5D,OAAO,MAAMC,iBAAiB,SAASH,2BAA2B,CAAC;EACjE,CAACI,iBAAiB,GAA2C,IAAI;EACxD,CAACC,iBAAiB;EACXC,WAAW,GAAW,IAAI,CAACC,SAAS;EACpD,CAACC,SAAS,GAAgB,IAAI;EAE9BC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAAC,CAACJ,iBAAiB,GAAGX,uBAAuB,CAAC,CAAC;IACnD,MAAM;MAAEgB,cAAc;MAAEC;IAAkB,CAAC,GAAG,IAAI,CAAC,CAACN,iBAAiB;IAErE,MAAMO,UAAU,GAAG,IAAI,CAACC,YAAY,CAAC;MAAEC,IAAI,EAAE;IAAO,CAAC,CAAC;IACtDF,UAAU,CAACG,WAAW,CAACJ,iBAAiB,CAAC;IACzCC,UAAU,CAACG,WAAW,CAACL,cAAc,CAAC;EACxC;EAQAM,oBAAoBA,CAACZ,iBAAkD,EAAE;IACvE,IAAI,CAAC,CAACA,iBAAiB,GAAGA,iBAAiB;IAC3C,IAAI,IAAI,CAAC,CAACI,SAAS,EAAE;MACnB,IAAI,CAAC,CAACA,SAAS,CAACS,MAAM,CAAC,IAAI,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,6BAA6B,EAAE,EAAE,CAAC;EAEvDkC,OAAO,CAACG,YAAY,CAAC,OAAO,EAAEf,KAAK,CAAC;EAEpCY,OAAO,CAACf,oBAAoB,CAACZ,iBAAiB,CAAC;EAC/C,OAAO2B,OAAO;AAChB,CAAC;AA0DD,OAAO,MAAMI,yBAAyB,GAAGA,CAAC;EACxCR,gBAAgB;EAChBvB,iBAAiB;EACjBgC,oBAAoB;EACpBC,yBAAyB;EACzBC,uBAAuB;EACvBnB,KAAK,GAAGE,MAAM,CAACC;AACe,CAAC,KAAK;EACpC,MAAMiB,YAAY,GAAGb,oBAAoB,CAAC;IACxCtB,iBAAiB;IACjBuB,gBAAgB;IAChBR;EACF,CAAC,CAAC;EAEF,IAAIiB,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAACxB,WAAW,CAAC4B,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAACtB,WAAW,CAACwB,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAACvB,WAAW,CAACwB,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"renderReactInWebComponent.js","names":["createRoot","createReactRootElements","encapsulateShadowDomFromGlobalStyles","version","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRoot","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","render","connectedCallback","nonce","getAttribute","window","cspNonce","Error","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport { createRoot, type Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n #reactRoot: Root | null = null;\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.#getReactComponent = getReactComponent;\n if (this.#reactRoot) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n if (this.#reactRoot) {\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n this.#reactRoot = createRoot(this.#reactRootElements.appRootElement);\n\n if (this.#getReactComponent) {\n this.#reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n }\n\n disconnectedCallback() {\n if (!this.#reactRoot) {\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n this.#reactRoot.unmount();\n this.#reactRoot = null;\n // #getReactComponent is preserved — if reconnected it will render on connectedCallback\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots. A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component. It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps. You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance. Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component. If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AAC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