@okta/odyssey-react-mui 1.44.0 → 1.47.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 (752) hide show
  1. package/dist/cjs/Autocomplete.cjs +3 -33
  2. package/dist/cjs/Autocomplete.cjs.map +1 -1
  3. package/dist/cjs/Banner.cjs +2 -2
  4. package/dist/cjs/Banner.cjs.map +1 -1
  5. package/dist/cjs/Breadcrumbs.cjs +2 -2
  6. package/dist/cjs/Breadcrumbs.cjs.map +1 -1
  7. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  8. package/dist/cjs/Callout.cjs +3 -27
  9. package/dist/cjs/Callout.cjs.map +1 -1
  10. package/dist/cjs/Card.cjs +280 -63
  11. package/dist/cjs/Card.cjs.map +1 -1
  12. package/dist/cjs/Checkbox.cjs +14 -12
  13. package/dist/cjs/Checkbox.cjs.map +1 -1
  14. package/dist/cjs/DataTable/DataTable.cjs +2 -2
  15. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  16. package/dist/cjs/DataTable/DataTableRowActions.cjs +6 -6
  17. package/dist/cjs/DataTable/DataTableRowActions.cjs.map +1 -1
  18. package/dist/cjs/DataTable/DataTableSettings.cjs +2 -2
  19. package/dist/cjs/DataTable/DataTableSettings.cjs.map +1 -1
  20. package/dist/cjs/DataTable/useRowReordering.cjs +2 -2
  21. package/dist/cjs/DataTable/useRowReordering.cjs.map +1 -1
  22. package/dist/cjs/DatePickers/DateField.cjs +2 -2
  23. package/dist/cjs/DatePickers/DateField.cjs.map +1 -1
  24. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +2 -2
  25. package/dist/cjs/DatePickers/DateFieldActionBar.cjs.map +1 -1
  26. package/dist/cjs/DatePickers/DatePicker.cjs +2 -2
  27. package/dist/cjs/DatePickers/DatePicker.cjs.map +1 -1
  28. package/dist/cjs/DatePickers/useDateFieldsTranslations.cjs +2 -2
  29. package/dist/cjs/DatePickers/useDateFieldsTranslations.cjs.map +1 -1
  30. package/dist/cjs/DatePickers/useOdysseyDateFields.cjs +2 -2
  31. package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
  32. package/dist/cjs/Dialog.cjs +34 -31
  33. package/dist/cjs/Dialog.cjs.map +1 -1
  34. package/dist/cjs/Drawer.cjs +8 -4
  35. package/dist/cjs/Drawer.cjs.map +1 -1
  36. package/dist/cjs/Field.cjs +2 -2
  37. package/dist/cjs/Field.cjs.map +1 -1
  38. package/dist/cjs/FieldError.cjs +2 -2
  39. package/dist/cjs/FieldError.cjs.map +1 -1
  40. package/dist/cjs/FieldLabel.cjs +2 -2
  41. package/dist/cjs/FieldLabel.cjs.map +1 -1
  42. package/dist/cjs/FileUploader/FileUploadPreview.cjs +2 -2
  43. package/dist/cjs/FileUploader/FileUploadPreview.cjs.map +1 -1
  44. package/dist/cjs/FileUploader/FileUploader.cjs +2 -2
  45. package/dist/cjs/FileUploader/FileUploader.cjs.map +1 -1
  46. package/dist/cjs/FullScreenOverlay.cjs +40 -0
  47. package/dist/cjs/FullScreenOverlay.cjs.map +1 -0
  48. package/dist/cjs/FullScreenOverlayContext.cjs +72 -0
  49. package/dist/cjs/FullScreenOverlayContext.cjs.map +1 -0
  50. package/dist/cjs/OdysseyCacheProvider.cjs +12 -17
  51. package/dist/cjs/OdysseyCacheProvider.cjs.map +1 -1
  52. package/dist/cjs/OdysseyProvider.cjs +18 -10
  53. package/dist/cjs/OdysseyProvider.cjs.map +1 -1
  54. package/dist/cjs/OdysseyThemeProvider.cjs +27 -16
  55. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  56. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +44 -0
  57. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs.map +1 -0
  58. package/dist/cjs/Pagination/Pagination.cjs +2 -3
  59. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  60. package/dist/cjs/Pagination/usePagination.cjs +2 -2
  61. package/dist/cjs/Pagination/usePagination.cjs.map +1 -1
  62. package/dist/cjs/PasswordField.cjs +2 -2
  63. package/dist/cjs/PasswordField.cjs.map +1 -1
  64. package/dist/cjs/Radio.cjs +22 -20
  65. package/dist/cjs/Radio.cjs.map +1 -1
  66. package/dist/cjs/SearchField.cjs +2 -2
  67. package/dist/cjs/SearchField.cjs.map +1 -1
  68. package/dist/cjs/Select.cjs +1 -37
  69. package/dist/cjs/Select.cjs.map +1 -1
  70. package/dist/cjs/Surface.cjs +3 -3
  71. package/dist/cjs/Surface.cjs.map +1 -1
  72. package/dist/cjs/Switch.cjs +2 -2
  73. package/dist/cjs/Switch.cjs.map +1 -1
  74. package/dist/cjs/Tabs.cjs +1 -21
  75. package/dist/cjs/Tabs.cjs.map +1 -1
  76. package/dist/cjs/Tag.cjs +2 -2
  77. package/dist/cjs/Tag.cjs.map +1 -1
  78. package/dist/cjs/TextField.cjs +1 -26
  79. package/dist/cjs/TextField.cjs.map +1 -1
  80. package/dist/cjs/Toast.cjs +2 -2
  81. package/dist/cjs/Toast.cjs.map +1 -1
  82. package/dist/cjs/__internal.cjs +149 -0
  83. package/dist/cjs/__internal.cjs.map +1 -0
  84. package/dist/cjs/i18n.generated/i18n.cjs +35 -0
  85. package/dist/cjs/i18n.generated/i18n.cjs.map +1 -0
  86. package/dist/cjs/i18n.generated/i18n.resources.cjs +81 -0
  87. package/dist/cjs/i18n.generated/i18n.resources.cjs.map +1 -0
  88. package/dist/{esm/shadow-dom/index.js → cjs/i18n.generated/i18n.types.cjs} +9 -4
  89. package/dist/cjs/i18n.generated/i18n.types.cjs.map +1 -0
  90. package/dist/cjs/index.cjs +49 -30
  91. package/dist/cjs/index.cjs.map +1 -1
  92. package/dist/cjs/labs/DataFilters.cjs +4 -4
  93. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  94. package/dist/cjs/labs/DataTable.cjs +2 -2
  95. package/dist/cjs/labs/DataTable.cjs.map +1 -1
  96. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +2 -2
  97. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  98. package/dist/cjs/labs/DataView/CardLayoutContent.cjs +60 -44
  99. package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
  100. package/dist/cjs/labs/DataView/DataCard.cjs +52 -181
  101. package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
  102. package/dist/cjs/labs/DataView/DataView.cjs +2 -2
  103. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  104. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +2 -2
  105. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs.map +1 -1
  106. package/dist/cjs/labs/DataView/RowActions.cjs +2 -2
  107. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  108. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +2 -2
  109. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  110. package/dist/cjs/labs/DataView/TableSettings.cjs +2 -2
  111. package/dist/cjs/labs/DataView/TableSettings.cjs.map +1 -1
  112. package/dist/cjs/labs/DataView/componentTypes.cjs.map +1 -1
  113. package/dist/cjs/labs/DataView/fetchData.cjs +2 -2
  114. package/dist/cjs/labs/DataView/fetchData.cjs.map +1 -1
  115. package/dist/cjs/labs/DatePickers/DateTimeField.cjs +2 -2
  116. package/dist/cjs/labs/DatePickers/DateTimeField.cjs.map +1 -1
  117. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +2 -2
  118. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  119. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs +3 -3
  120. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs.map +1 -1
  121. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +2 -2
  122. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
  123. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +4 -0
  124. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  125. package/dist/cjs/labs/OdysseyPickers/index.cjs.map +1 -1
  126. package/dist/cjs/labs/PageTemplate/Layout.cjs +2 -2
  127. package/dist/cjs/labs/PageTemplate/Layout.cjs.map +1 -1
  128. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs.map +1 -1
  129. package/dist/cjs/labs/PaginatedTable.cjs +4 -4
  130. package/dist/cjs/labs/PaginatedTable.cjs.map +1 -1
  131. package/dist/cjs/labs/StaticTable.cjs +2 -2
  132. package/dist/cjs/labs/StaticTable.cjs.map +1 -1
  133. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  134. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +7 -1
  135. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
  136. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +7 -1
  137. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
  138. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +8 -2
  139. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
  140. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +7 -1
  141. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
  142. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +7 -1
  143. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
  144. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +7 -1
  145. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
  146. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +7 -1
  147. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
  148. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +7 -1
  149. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
  150. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +7 -1
  151. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
  152. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +7 -1
  153. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
  154. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +7 -1
  155. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
  156. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +7 -1
  157. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
  158. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +7 -1
  159. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
  160. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +7 -1
  161. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
  162. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +7 -1
  163. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
  164. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +7 -1
  165. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
  166. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +7 -1
  167. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
  168. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
  169. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
  170. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +7 -1
  171. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
  172. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +7 -1
  173. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
  174. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +7 -1
  175. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
  176. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +7 -1
  177. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
  178. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +7 -1
  179. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
  180. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +7 -1
  181. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
  182. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +7 -1
  183. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
  184. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +7 -1
  185. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
  186. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +7 -1
  187. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
  188. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +7 -1
  189. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
  190. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +7 -1
  191. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
  192. package/dist/cjs/test-selectors/AutocompleteTestSelector.cjs +49 -0
  193. package/dist/cjs/test-selectors/AutocompleteTestSelector.cjs.map +1 -0
  194. package/dist/cjs/test-selectors/CalloutTestSelector.cjs +43 -0
  195. package/dist/cjs/test-selectors/CalloutTestSelector.cjs.map +1 -0
  196. package/dist/cjs/test-selectors/SelectTestSelector.cjs +55 -0
  197. package/dist/cjs/test-selectors/SelectTestSelector.cjs.map +1 -0
  198. package/dist/cjs/{OdysseyTranslationProvider.types.cjs → test-selectors/TabsTestSelector.cjs} +23 -4
  199. package/dist/cjs/test-selectors/TabsTestSelector.cjs.map +1 -0
  200. package/dist/cjs/test-selectors/TextFieldTestSelector.cjs +44 -0
  201. package/dist/cjs/test-selectors/TextFieldTestSelector.cjs.map +1 -0
  202. package/dist/cjs/test-selectors/index.cjs +11 -0
  203. package/dist/cjs/test-selectors/index.cjs.map +1 -1
  204. package/dist/cjs/test-selectors/queryOdysseySelector.cjs +10 -10
  205. package/dist/cjs/test-selectors/queryOdysseySelector.cjs.map +1 -1
  206. package/dist/cjs/theme/components.cjs +5 -9
  207. package/dist/cjs/theme/components.cjs.map +1 -1
  208. package/dist/cjs/tools/addSpecificity.cjs.map +1 -0
  209. package/dist/cjs/tools/bufferLatest.cjs.map +1 -0
  210. package/dist/cjs/tools/createMessageBus.cjs.map +1 -0
  211. package/dist/cjs/tools/createStore.cjs.map +1 -0
  212. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +2 -12
  213. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  214. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +20 -15
  215. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs.map +1 -1
  216. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +137 -136
  217. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  218. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +2 -2
  219. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs.map +1 -1
  220. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +7 -4
  221. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
  222. package/dist/cjs/ui-shell/SideNav/SideNavItemContentContext.cjs.map +1 -1
  223. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +3 -4
  224. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs.map +1 -1
  225. package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +47 -0
  226. package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs.map +1 -0
  227. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
  228. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
  229. package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs +2 -2
  230. package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs.map +1 -1
  231. package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs +2 -2
  232. package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs.map +1 -1
  233. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  234. package/dist/cjs/ui-shell/UiShell.cjs +4 -4
  235. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  236. package/dist/cjs/ui-shell/UiShellProvider.cjs +1 -1
  237. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  238. package/dist/cjs/ui-shell/WideUiShellContent.cjs +2 -1
  239. package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
  240. package/dist/cjs/ui-shell/renderUiShell.cjs +2 -2
  241. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  242. package/dist/cjs/ui-shell/uiShellContentTypes.cjs +2 -1
  243. package/dist/cjs/ui-shell/uiShellContentTypes.cjs.map +1 -1
  244. package/dist/cjs/{shadow-dom/shadow-dom.cjs → web-component/createShadowDomElements.cjs} +8 -3
  245. package/dist/cjs/web-component/createShadowDomElements.cjs.map +1 -0
  246. package/dist/cjs/web-component/index.cjs +33 -0
  247. package/dist/cjs/web-component/index.cjs.map +1 -1
  248. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  249. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  250. package/dist/cjs/web-component/removeGlobalStylesFromShadowDom.cjs +35 -0
  251. package/dist/cjs/web-component/removeGlobalStylesFromShadowDom.cjs.map +1 -0
  252. package/dist/cjs/web-component/renderReactInWebComponent.cjs +5 -9
  253. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  254. package/dist/esm/Autocomplete.js +1 -31
  255. package/dist/esm/Autocomplete.js.map +1 -1
  256. package/dist/esm/Banner.js +1 -1
  257. package/dist/esm/Banner.js.map +1 -1
  258. package/dist/esm/Breadcrumbs.js +1 -1
  259. package/dist/esm/Breadcrumbs.js.map +1 -1
  260. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  261. package/dist/esm/Callout.js +1 -25
  262. package/dist/esm/Callout.js.map +1 -1
  263. package/dist/esm/Card.js +281 -63
  264. package/dist/esm/Card.js.map +1 -1
  265. package/dist/esm/Checkbox.js +13 -11
  266. package/dist/esm/Checkbox.js.map +1 -1
  267. package/dist/esm/DataTable/DataTable.js +1 -1
  268. package/dist/esm/DataTable/DataTable.js.map +1 -1
  269. package/dist/esm/DataTable/DataTableRowActions.js +1 -1
  270. package/dist/esm/DataTable/DataTableRowActions.js.map +1 -1
  271. package/dist/esm/DataTable/DataTableSettings.js +1 -1
  272. package/dist/esm/DataTable/DataTableSettings.js.map +1 -1
  273. package/dist/esm/DataTable/useRowReordering.js +1 -1
  274. package/dist/esm/DataTable/useRowReordering.js.map +1 -1
  275. package/dist/esm/DatePickers/DateField.js +1 -1
  276. package/dist/esm/DatePickers/DateField.js.map +1 -1
  277. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  278. package/dist/esm/DatePickers/DateFieldActionBar.js.map +1 -1
  279. package/dist/esm/DatePickers/DatePicker.js +1 -1
  280. package/dist/esm/DatePickers/DatePicker.js.map +1 -1
  281. package/dist/esm/DatePickers/useDateFieldsTranslations.js +1 -1
  282. package/dist/esm/DatePickers/useDateFieldsTranslations.js.map +1 -1
  283. package/dist/esm/DatePickers/useOdysseyDateFields.js +1 -1
  284. package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
  285. package/dist/esm/Dialog.js +33 -30
  286. package/dist/esm/Dialog.js.map +1 -1
  287. package/dist/esm/Drawer.js +7 -3
  288. package/dist/esm/Drawer.js.map +1 -1
  289. package/dist/esm/Field.js +1 -1
  290. package/dist/esm/Field.js.map +1 -1
  291. package/dist/esm/FieldError.js +1 -1
  292. package/dist/esm/FieldError.js.map +1 -1
  293. package/dist/esm/FieldLabel.js +1 -1
  294. package/dist/esm/FieldLabel.js.map +1 -1
  295. package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
  296. package/dist/esm/FileUploader/FileUploadPreview.js.map +1 -1
  297. package/dist/esm/FileUploader/FileUploader.js +1 -1
  298. package/dist/esm/FileUploader/FileUploader.js.map +1 -1
  299. package/dist/esm/FullScreenOverlay.js +35 -0
  300. package/dist/esm/FullScreenOverlay.js.map +1 -0
  301. package/dist/esm/FullScreenOverlayContext.js +66 -0
  302. package/dist/esm/FullScreenOverlayContext.js.map +1 -0
  303. package/dist/esm/OdysseyCacheProvider.js +12 -17
  304. package/dist/esm/OdysseyCacheProvider.js.map +1 -1
  305. package/dist/esm/OdysseyProvider.js +18 -10
  306. package/dist/esm/OdysseyProvider.js.map +1 -1
  307. package/dist/esm/OdysseyThemeProvider.js +27 -16
  308. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  309. package/dist/esm/OdysseyThemeProviderPropsContext.js +38 -0
  310. package/dist/esm/OdysseyThemeProviderPropsContext.js.map +1 -0
  311. package/dist/esm/Pagination/Pagination.js +1 -2
  312. package/dist/esm/Pagination/Pagination.js.map +1 -1
  313. package/dist/esm/Pagination/usePagination.js +1 -1
  314. package/dist/esm/Pagination/usePagination.js.map +1 -1
  315. package/dist/esm/PasswordField.js +1 -1
  316. package/dist/esm/PasswordField.js.map +1 -1
  317. package/dist/esm/Radio.js +22 -20
  318. package/dist/esm/Radio.js.map +1 -1
  319. package/dist/esm/SearchField.js +1 -1
  320. package/dist/esm/SearchField.js.map +1 -1
  321. package/dist/esm/Select.js +0 -36
  322. package/dist/esm/Select.js.map +1 -1
  323. package/dist/esm/Surface.js +3 -3
  324. package/dist/esm/Surface.js.map +1 -1
  325. package/dist/esm/Switch.js +1 -1
  326. package/dist/esm/Switch.js.map +1 -1
  327. package/dist/esm/Tabs.js +0 -20
  328. package/dist/esm/Tabs.js.map +1 -1
  329. package/dist/esm/Tag.js +1 -1
  330. package/dist/esm/Tag.js.map +1 -1
  331. package/dist/esm/TextField.js +0 -25
  332. package/dist/esm/TextField.js.map +1 -1
  333. package/dist/esm/Toast.js +1 -1
  334. package/dist/esm/Toast.js.map +1 -1
  335. package/dist/esm/__internal.js +24 -0
  336. package/dist/esm/__internal.js.map +1 -0
  337. package/dist/esm/i18n.generated/i18n.js +25 -0
  338. package/dist/esm/i18n.generated/i18n.js.map +1 -0
  339. package/dist/esm/i18n.generated/i18n.resources.js +75 -0
  340. package/dist/esm/i18n.generated/i18n.resources.js.map +1 -0
  341. package/dist/{types/shadow-dom/index.d.ts → esm/i18n.generated/i18n.types.js} +3 -3
  342. package/dist/esm/i18n.generated/i18n.types.js.map +1 -0
  343. package/dist/esm/index.js +4 -3
  344. package/dist/esm/index.js.map +1 -1
  345. package/dist/esm/labs/DataFilters.js +1 -1
  346. package/dist/esm/labs/DataFilters.js.map +1 -1
  347. package/dist/esm/labs/DataTable.js +1 -1
  348. package/dist/esm/labs/DataTable.js.map +1 -1
  349. package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
  350. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  351. package/dist/esm/labs/DataView/CardLayoutContent.js +61 -45
  352. package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
  353. package/dist/esm/labs/DataView/DataCard.js +51 -180
  354. package/dist/esm/labs/DataView/DataCard.js.map +1 -1
  355. package/dist/esm/labs/DataView/DataView.js +1 -1
  356. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  357. package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
  358. package/dist/esm/labs/DataView/LayoutSwitcher.js.map +1 -1
  359. package/dist/esm/labs/DataView/RowActions.js +1 -1
  360. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  361. package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
  362. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  363. package/dist/esm/labs/DataView/TableSettings.js +1 -1
  364. package/dist/esm/labs/DataView/TableSettings.js.map +1 -1
  365. package/dist/esm/labs/DataView/componentTypes.js.map +1 -1
  366. package/dist/esm/labs/DataView/fetchData.js +2 -2
  367. package/dist/esm/labs/DataView/fetchData.js.map +1 -1
  368. package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
  369. package/dist/esm/labs/DatePickers/DateTimeField.js.map +1 -1
  370. package/dist/esm/labs/DatePickers/DateTimePicker.js +1 -1
  371. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  372. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js +3 -3
  373. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js.map +1 -1
  374. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
  375. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
  376. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +4 -0
  377. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  378. package/dist/esm/labs/OdysseyPickers/index.js.map +1 -1
  379. package/dist/esm/labs/PageTemplate/Layout.js +2 -2
  380. package/dist/esm/labs/PageTemplate/Layout.js.map +1 -1
  381. package/dist/esm/labs/PageTemplate/PageTemplate.js.map +1 -1
  382. package/dist/esm/labs/PaginatedTable.js +1 -1
  383. package/dist/esm/labs/PaginatedTable.js.map +1 -1
  384. package/dist/esm/labs/StaticTable.js +1 -1
  385. package/dist/esm/labs/StaticTable.js.map +1 -1
  386. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  387. package/dist/esm/properties/ts/odyssey-react-mui_cs.js +7 -1
  388. package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  389. package/dist/esm/properties/ts/odyssey-react-mui_da.js +7 -1
  390. package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
  391. package/dist/esm/properties/ts/odyssey-react-mui_de.js +8 -2
  392. package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
  393. package/dist/esm/properties/ts/odyssey-react-mui_el.js +7 -1
  394. package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
  395. package/dist/esm/properties/ts/odyssey-react-mui_es.js +7 -1
  396. package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
  397. package/dist/esm/properties/ts/odyssey-react-mui_eu.js +7 -1
  398. package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
  399. package/dist/esm/properties/ts/odyssey-react-mui_fi.js +7 -1
  400. package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  401. package/dist/esm/properties/ts/odyssey-react-mui_fr.js +7 -1
  402. package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  403. package/dist/esm/properties/ts/odyssey-react-mui_ht.js +7 -1
  404. package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  405. package/dist/esm/properties/ts/odyssey-react-mui_hu.js +7 -1
  406. package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  407. package/dist/esm/properties/ts/odyssey-react-mui_id.js +7 -1
  408. package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
  409. package/dist/esm/properties/ts/odyssey-react-mui_it.js +7 -1
  410. package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
  411. package/dist/esm/properties/ts/odyssey-react-mui_ja.js +7 -1
  412. package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  413. package/dist/esm/properties/ts/odyssey-react-mui_ko.js +7 -1
  414. package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  415. package/dist/esm/properties/ts/odyssey-react-mui_ms.js +7 -1
  416. package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  417. package/dist/esm/properties/ts/odyssey-react-mui_nb.js +7 -1
  418. package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  419. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +7 -1
  420. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  421. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  422. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  423. package/dist/esm/properties/ts/odyssey-react-mui_pl.js +7 -1
  424. package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  425. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +7 -1
  426. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  427. package/dist/esm/properties/ts/odyssey-react-mui_ro.js +7 -1
  428. package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  429. package/dist/esm/properties/ts/odyssey-react-mui_ru.js +7 -1
  430. package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  431. package/dist/esm/properties/ts/odyssey-react-mui_sv.js +7 -1
  432. package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  433. package/dist/esm/properties/ts/odyssey-react-mui_th.js +7 -1
  434. package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
  435. package/dist/esm/properties/ts/odyssey-react-mui_tr.js +7 -1
  436. package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  437. package/dist/esm/properties/ts/odyssey-react-mui_uk.js +7 -1
  438. package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  439. package/dist/esm/properties/ts/odyssey-react-mui_vi.js +7 -1
  440. package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  441. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +7 -1
  442. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  443. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +7 -1
  444. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  445. package/dist/esm/test-selectors/AutocompleteTestSelector.js +43 -0
  446. package/dist/esm/test-selectors/AutocompleteTestSelector.js.map +1 -0
  447. package/dist/esm/test-selectors/CalloutTestSelector.js +37 -0
  448. package/dist/esm/test-selectors/CalloutTestSelector.js.map +1 -0
  449. package/dist/esm/test-selectors/SelectTestSelector.js +49 -0
  450. package/dist/esm/test-selectors/SelectTestSelector.js.map +1 -0
  451. package/dist/esm/test-selectors/TabsTestSelector.js +33 -0
  452. package/dist/esm/test-selectors/TabsTestSelector.js.map +1 -0
  453. package/dist/esm/test-selectors/TextFieldTestSelector.js +38 -0
  454. package/dist/esm/test-selectors/TextFieldTestSelector.js.map +1 -0
  455. package/dist/esm/test-selectors/index.js +1 -0
  456. package/dist/esm/test-selectors/index.js.map +1 -1
  457. package/dist/esm/test-selectors/queryOdysseySelector.js +5 -5
  458. package/dist/esm/test-selectors/queryOdysseySelector.js.map +1 -1
  459. package/dist/esm/theme/components.js +5 -9
  460. package/dist/esm/theme/components.js.map +1 -1
  461. package/dist/esm/tools/addSpecificity.js.map +1 -0
  462. package/dist/esm/tools/bufferLatest.js.map +1 -0
  463. package/dist/esm/tools/createMessageBus.js.map +1 -0
  464. package/dist/esm/tools/createStore.js.map +1 -0
  465. package/dist/esm/ui-shell/NarrowUiShellContent.js +3 -13
  466. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  467. package/dist/esm/ui-shell/SideNav/NavAccordion.js +20 -15
  468. package/dist/esm/ui-shell/SideNav/NavAccordion.js.map +1 -1
  469. package/dist/esm/ui-shell/SideNav/SideNav.js +136 -135
  470. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  471. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
  472. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js.map +1 -1
  473. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +7 -4
  474. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
  475. package/dist/esm/ui-shell/SideNav/SideNavItemContentContext.js.map +1 -1
  476. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +3 -4
  477. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js.map +1 -1
  478. package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +42 -0
  479. package/dist/esm/ui-shell/SideNav/SideNavSortableList.js.map +1 -0
  480. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +1 -1
  481. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
  482. package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js +1 -1
  483. package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js.map +1 -1
  484. package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js +1 -1
  485. package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js.map +1 -1
  486. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  487. package/dist/esm/ui-shell/UiShell.js +4 -4
  488. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  489. package/dist/esm/ui-shell/UiShellProvider.js +1 -1
  490. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  491. package/dist/esm/ui-shell/WideUiShellContent.js +2 -1
  492. package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
  493. package/dist/esm/ui-shell/renderUiShell.js +2 -2
  494. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  495. package/dist/esm/ui-shell/uiShellContentTypes.js +1 -0
  496. package/dist/esm/ui-shell/uiShellContentTypes.js.map +1 -1
  497. package/dist/esm/{shadow-dom/shadow-dom.js → web-component/createShadowDomElements.js} +8 -3
  498. package/dist/esm/web-component/createShadowDomElements.js.map +1 -0
  499. package/dist/esm/web-component/index.js +3 -0
  500. package/dist/esm/web-component/index.js.map +1 -1
  501. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  502. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  503. package/dist/esm/web-component/removeGlobalStylesFromShadowDom.js +28 -0
  504. package/dist/esm/web-component/removeGlobalStylesFromShadowDom.js.map +1 -0
  505. package/dist/esm/web-component/renderReactInWebComponent.js +5 -9
  506. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  507. package/dist/tsconfig.production.tsbuildinfo +1 -1
  508. package/dist/types/Autocomplete.d.ts +0 -30
  509. package/dist/types/Autocomplete.d.ts.map +1 -1
  510. package/dist/types/Banner.d.ts.map +1 -1
  511. package/dist/types/Breadcrumbs.d.ts.map +1 -1
  512. package/dist/types/Buttons/BaseButton.d.ts +2 -2
  513. package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
  514. package/dist/types/Callout.d.ts +0 -24
  515. package/dist/types/Callout.d.ts.map +1 -1
  516. package/dist/types/Card.d.ts +17 -6
  517. package/dist/types/Card.d.ts.map +1 -1
  518. package/dist/types/Checkbox.d.ts.map +1 -1
  519. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  520. package/dist/types/DataTable/DataTableRowActions.d.ts.map +1 -1
  521. package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
  522. package/dist/types/DatePickers/useDateFieldsTranslations.d.ts.map +1 -1
  523. package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
  524. package/dist/types/Dialog.d.ts.map +1 -1
  525. package/dist/types/Drawer.d.ts.map +1 -1
  526. package/dist/types/Field.d.ts.map +1 -1
  527. package/dist/types/FieldError.d.ts.map +1 -1
  528. package/dist/types/FieldLabel.d.ts.map +1 -1
  529. package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
  530. package/dist/types/FullScreenOverlay.d.ts +19 -0
  531. package/dist/types/FullScreenOverlay.d.ts.map +1 -0
  532. package/dist/types/FullScreenOverlayContext.d.ts +31 -0
  533. package/dist/types/FullScreenOverlayContext.d.ts.map +1 -0
  534. package/dist/types/NativeSelect.d.ts +1 -1
  535. package/dist/types/OdysseyCacheProvider.d.ts +10 -3
  536. package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
  537. package/dist/types/OdysseyProvider.d.ts +8 -8
  538. package/dist/types/OdysseyProvider.d.ts.map +1 -1
  539. package/dist/types/OdysseyThemeProvider.d.ts +7 -16
  540. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  541. package/dist/types/OdysseyThemeProviderPropsContext.d.ts +27 -0
  542. package/dist/types/OdysseyThemeProviderPropsContext.d.ts.map +1 -0
  543. package/dist/types/Pagination/Pagination.d.ts +0 -1
  544. package/dist/types/Pagination/Pagination.d.ts.map +1 -1
  545. package/dist/types/Pagination/usePagination.d.ts.map +1 -1
  546. package/dist/types/PasswordField.d.ts.map +1 -1
  547. package/dist/types/Radio.d.ts.map +1 -1
  548. package/dist/types/SearchField.d.ts.map +1 -1
  549. package/dist/types/Select.d.ts +0 -36
  550. package/dist/types/Select.d.ts.map +1 -1
  551. package/dist/types/Surface.d.ts.map +1 -1
  552. package/dist/types/Switch.d.ts.map +1 -1
  553. package/dist/types/Tabs.d.ts +0 -20
  554. package/dist/types/Tabs.d.ts.map +1 -1
  555. package/dist/types/Tag.d.ts.map +1 -1
  556. package/dist/types/TextField.d.ts +0 -25
  557. package/dist/types/TextField.d.ts.map +1 -1
  558. package/dist/types/Toast.d.ts.map +1 -1
  559. package/dist/types/__internal.d.ts +30 -0
  560. package/dist/types/__internal.d.ts.map +1 -0
  561. package/dist/types/i18n.generated/i18n.d.ts +285 -0
  562. package/dist/types/i18n.generated/i18n.d.ts.map +1 -0
  563. package/dist/types/i18n.generated/i18n.resources.d.ts +4199 -0
  564. package/dist/types/{i18n.d.ts.map → i18n.generated/i18n.resources.d.ts.map} +1 -1
  565. package/dist/types/i18n.generated/i18n.types.d.ts +30 -0
  566. package/dist/types/i18n.generated/i18n.types.d.ts.map +1 -0
  567. package/dist/types/index.d.ts +4 -3
  568. package/dist/types/index.d.ts.map +1 -1
  569. package/dist/types/labs/DataTable.d.ts.map +1 -1
  570. package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  571. package/dist/types/labs/DataView/DataCard.d.ts +14 -30
  572. package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
  573. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  574. package/dist/types/labs/DataView/componentTypes.d.ts +1 -1
  575. package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
  576. package/dist/types/labs/DataView/fetchData.d.ts.map +1 -1
  577. package/dist/types/labs/DatePickers/DateTimePicker.d.ts.map +1 -1
  578. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
  579. package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
  580. package/dist/types/labs/OdysseyPickers/index.d.ts +1 -2
  581. package/dist/types/labs/OdysseyPickers/index.d.ts.map +1 -1
  582. package/dist/types/labs/PageTemplate/PageTemplate.d.ts.map +1 -1
  583. package/dist/types/labs/PaginatedTable.d.ts.map +1 -1
  584. package/dist/types/labs/StaticTable.d.ts.map +1 -1
  585. package/dist/types/properties/ts/odyssey-react-mui.d.ts +133 -133
  586. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  587. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +133 -127
  588. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  589. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +133 -127
  590. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  591. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +133 -127
  592. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  593. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +133 -127
  594. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  595. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +133 -127
  596. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  597. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +133 -127
  598. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
  599. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +133 -127
  600. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  601. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +133 -127
  602. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  603. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +133 -127
  604. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  605. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +133 -127
  606. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  607. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +133 -127
  608. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  609. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +133 -127
  610. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  611. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +133 -127
  612. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  613. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +133 -127
  614. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  615. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +133 -127
  616. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  617. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +133 -127
  618. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  619. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +133 -127
  620. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  621. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +133 -133
  622. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  623. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +133 -133
  624. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  625. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +133 -127
  626. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  627. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +133 -127
  628. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  629. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +133 -127
  630. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  631. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +133 -127
  632. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  633. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +133 -127
  634. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  635. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +133 -127
  636. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  637. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +133 -127
  638. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  639. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +133 -127
  640. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  641. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +133 -127
  642. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  643. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +133 -127
  644. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  645. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +133 -127
  646. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  647. package/dist/types/test-selectors/AutocompleteTestSelector.d.ts +42 -0
  648. package/dist/types/test-selectors/AutocompleteTestSelector.d.ts.map +1 -0
  649. package/dist/types/test-selectors/CalloutTestSelector.d.ts +36 -0
  650. package/dist/types/test-selectors/CalloutTestSelector.d.ts.map +1 -0
  651. package/dist/types/test-selectors/SelectTestSelector.d.ts +48 -0
  652. package/dist/types/test-selectors/SelectTestSelector.d.ts.map +1 -0
  653. package/dist/types/test-selectors/TabsTestSelector.d.ts +32 -0
  654. package/dist/types/test-selectors/TabsTestSelector.d.ts.map +1 -0
  655. package/dist/types/test-selectors/TextFieldTestSelector.d.ts +37 -0
  656. package/dist/types/test-selectors/TextFieldTestSelector.d.ts.map +1 -0
  657. package/dist/types/test-selectors/index.d.ts +1 -0
  658. package/dist/types/test-selectors/index.d.ts.map +1 -1
  659. package/dist/types/test-selectors/queryOdysseySelector.d.ts.map +1 -1
  660. package/dist/types/theme/components.d.ts.map +1 -1
  661. package/dist/types/tools/addSpecificity.d.ts.map +1 -0
  662. package/dist/types/tools/bufferLatest.d.ts.map +1 -0
  663. package/dist/types/tools/createMessageBus.d.ts.map +1 -0
  664. package/dist/types/tools/createStore.d.ts.map +1 -0
  665. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  666. package/dist/types/ui-shell/SideNav/NavAccordion.d.ts.map +1 -1
  667. package/dist/types/ui-shell/SideNav/SideNav.d.ts +1 -1
  668. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  669. package/dist/types/ui-shell/SideNav/SideNavFooterContent.d.ts.map +1 -1
  670. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts +2 -1
  671. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
  672. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts +1 -0
  673. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts.map +1 -1
  674. package/dist/types/ui-shell/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
  675. package/dist/types/ui-shell/SideNav/SideNavSortableList.d.ts +41 -0
  676. package/dist/types/ui-shell/SideNav/SideNavSortableList.d.ts.map +1 -0
  677. package/dist/types/ui-shell/SideNav/types.d.ts +13 -2
  678. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  679. package/dist/types/ui-shell/UiShell.d.ts +1 -1
  680. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  681. package/dist/types/ui-shell/UiShellProvider.d.ts +1 -1
  682. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  683. package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
  684. package/dist/types/ui-shell/renderUiShell.d.ts +2 -2
  685. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  686. package/dist/types/ui-shell/uiShellContentTypes.d.ts +4 -1
  687. package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -1
  688. package/dist/types/{shadow-dom/shadow-dom.d.ts → web-component/createShadowDomElements.d.ts} +6 -4
  689. package/dist/types/web-component/createShadowDomElements.d.ts.map +1 -0
  690. package/dist/types/web-component/index.d.ts +3 -0
  691. package/dist/types/web-component/index.d.ts.map +1 -1
  692. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  693. package/dist/types/web-component/removeGlobalStylesFromShadowDom.d.ts +18 -0
  694. package/dist/types/web-component/removeGlobalStylesFromShadowDom.d.ts.map +1 -0
  695. package/dist/types/web-component/renderReactInWebComponent.d.ts +1 -1
  696. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  697. package/package.json +26 -17
  698. package/dist/cjs/@types/i18next.d.cjs +0 -4
  699. package/dist/cjs/@types/i18next.d.cjs.map +0 -1
  700. package/dist/cjs/@types/properties.d.cjs +0 -2
  701. package/dist/cjs/@types/properties.d.cjs.map +0 -1
  702. package/dist/cjs/OdysseyTranslationProvider.cjs +0 -55
  703. package/dist/cjs/OdysseyTranslationProvider.cjs.map +0 -1
  704. package/dist/cjs/OdysseyTranslationProvider.types.cjs.map +0 -1
  705. package/dist/cjs/addSpecificity.cjs.map +0 -1
  706. package/dist/cjs/i18n.cjs +0 -113
  707. package/dist/cjs/i18n.cjs.map +0 -1
  708. package/dist/cjs/shadow-dom/index.cjs +0 -17
  709. package/dist/cjs/shadow-dom/index.cjs.map +0 -1
  710. package/dist/cjs/shadow-dom/shadow-dom.cjs.map +0 -1
  711. package/dist/cjs/ui-shell/bufferLatest.cjs.map +0 -1
  712. package/dist/cjs/ui-shell/createMessageBus.cjs.map +0 -1
  713. package/dist/cjs/ui-shell/createStore.cjs.map +0 -1
  714. package/dist/esm/@types/i18next.d.js +0 -14
  715. package/dist/esm/@types/i18next.d.js.map +0 -1
  716. package/dist/esm/@types/properties.d.js +0 -2
  717. package/dist/esm/@types/properties.d.js.map +0 -1
  718. package/dist/esm/OdysseyTranslationProvider.js +0 -48
  719. package/dist/esm/OdysseyTranslationProvider.js.map +0 -1
  720. package/dist/esm/OdysseyTranslationProvider.types.js +0 -14
  721. package/dist/esm/OdysseyTranslationProvider.types.js.map +0 -1
  722. package/dist/esm/addSpecificity.js.map +0 -1
  723. package/dist/esm/i18n.js +0 -100
  724. package/dist/esm/i18n.js.map +0 -1
  725. package/dist/esm/shadow-dom/index.js.map +0 -1
  726. package/dist/esm/shadow-dom/shadow-dom.js.map +0 -1
  727. package/dist/esm/ui-shell/bufferLatest.js.map +0 -1
  728. package/dist/esm/ui-shell/createMessageBus.js.map +0 -1
  729. package/dist/esm/ui-shell/createStore.js.map +0 -1
  730. package/dist/types/OdysseyTranslationProvider.d.ts +0 -24
  731. package/dist/types/OdysseyTranslationProvider.d.ts.map +0 -1
  732. package/dist/types/OdysseyTranslationProvider.types.d.ts +0 -14
  733. package/dist/types/OdysseyTranslationProvider.types.d.ts.map +0 -1
  734. package/dist/types/addSpecificity.d.ts.map +0 -1
  735. package/dist/types/i18n.d.ts +0 -3910
  736. package/dist/types/shadow-dom/index.d.ts.map +0 -1
  737. package/dist/types/shadow-dom/shadow-dom.d.ts.map +0 -1
  738. package/dist/types/ui-shell/bufferLatest.d.ts.map +0 -1
  739. package/dist/types/ui-shell/createMessageBus.d.ts.map +0 -1
  740. package/dist/types/ui-shell/createStore.d.ts.map +0 -1
  741. /package/dist/cjs/{addSpecificity.cjs → tools/addSpecificity.cjs} +0 -0
  742. /package/dist/cjs/{ui-shell → tools}/bufferLatest.cjs +0 -0
  743. /package/dist/cjs/{ui-shell → tools}/createMessageBus.cjs +0 -0
  744. /package/dist/cjs/{ui-shell → tools}/createStore.cjs +0 -0
  745. /package/dist/esm/{addSpecificity.js → tools/addSpecificity.js} +0 -0
  746. /package/dist/esm/{ui-shell → tools}/bufferLatest.js +0 -0
  747. /package/dist/esm/{ui-shell → tools}/createMessageBus.js +0 -0
  748. /package/dist/esm/{ui-shell → tools}/createStore.js +0 -0
  749. /package/dist/types/{addSpecificity.d.ts → tools/addSpecificity.d.ts} +0 -0
  750. /package/dist/types/{ui-shell → tools}/bufferLatest.d.ts +0 -0
  751. /package/dist/types/{ui-shell → tools}/createMessageBus.d.ts +0 -0
  752. /package/dist/types/{ui-shell → tools}/createStore.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"WideUiShellContent.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactErrorBoundary","_OdysseyDesignTokensContext","_index","_InnerAppContainer","_index2","_index3","_UiShellProvider","_uiShellSharedConstants","_useMatchAppElementToUiShellAppArea","_useScrollState","_jsxRuntime","e","__esModule","default","appSwitcherDefaultAppIcons","StyledAppContainer","styled","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","useOdysseyDesignTokens","uiShellContext","useUiShellContext","isContentScrolled","useScrollState","sideNavContainerRef","useRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","useMatchAppElementToUiShellAppArea","paddingMode","uiShellResizableRefs","jsxs","ref","children","jsx","banners","includes","ErrorBoundary","fallback","AppSwitcher","appIcons","isLoading","selectedAppName","SideNav","sideNavItems","emptySideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","TopNav","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","InnerAppContainer","MemoizedWideUiShellContent","exports","memo","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.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 styled from \"@emotion/styled\";\nimport { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport {\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAEA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,gBAAA,GAAAR,OAAA;AACA,IAAAS,uBAAA,GAAAT,OAAA;AACA,IAAAU,mCAAA,GAAAV,OAAA;AACA,IAAAW,eAAA,GAAAX,OAAA;AAAqD,IAAAY,WAAA,GA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e;UACtDC,kBAAkB,EAAEvC,kBAAkB,EAAEwC;QAAgB,CACzD;MAAC,CACW,CAChB;IAAA,CACoB,CAAC,EAExB,IAAA7E,WAAA,CAAAwD,GAAA,EAACnD,kBAAkB;MACjBI,kBAAkB,EAAEgC,cAAc,EAAEhC,kBAAmB;MACvD6C,GAAG,EAAEN,iBAAkB;MACvB8B,QAAQ,EAAE,CAAE;MAAAvB,QAAA,EAEZ,IAAAvD,WAAA,CAAAwD,GAAA,EAAC/D,kBAAA,CAAAsF,iBAAiB;QAACpC,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAMqC,0BAA0B,GAAAC,OAAA,CAAAtD,kBAAA,GAAG,IAAAuD,WAAI,EAACvD,kBAAkB,CAAC;AAC3DqD,0BAA0B,CAACG,WAAW,GAAG,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"WideUiShellContent.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactErrorBoundary","_OdysseyDesignTokensContext","_index","_InnerAppContainer","_index2","_index3","_uiShellContentTypes","_UiShellProvider","_uiShellSharedConstants","_useMatchAppElementToUiShellAppArea","_useScrollState","_jsxRuntime","e","__esModule","default","appSwitcherDefaultAppIcons","StyledAppContainer","styled","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","useOdysseyDesignTokens","uiShellContext","useUiShellContext","isContentScrolled","useScrollState","sideNavContainerRef","useRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","useMatchAppElementToUiShellAppArea","paddingMode","uiShellResizableRefs","jsxs","ref","children","jsx","banners","includes","ErrorBoundary","fallback","AppSwitcher","appIcons","isLoading","selectedAppName","TURN_OFF_APP_SWITCHER","SideNav","sideNavItems","emptySideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","TopNav","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","InnerAppContainer","MemoizedWideUiShellContent","exports","memo","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.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 styled from \"@emotion/styled\";\nimport { memo, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport {\n TURN_OFF_APP_SWITCHER,\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\n});\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n});\n\nconst StyledSideNavContainer = styled(\"div\")({\n gridArea: \"side-nav\",\n});\n\nconst StyledShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners banners banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")({\n gridArea: \"top-nav\",\n});\n\nexport type WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n hasSideNavProps,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && appSwitcherProps !== TURN_OFF_APP_SWITCHER && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAEA,IAAAG,2BAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAKA,IAAAS,gBAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AACA,IAAAW,mCAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AAAqD,IAAAa,WAAA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AAiB,EAAEtC,kBAAkB,EAAEuC,cAAe;UACtDC,kBAAkB,EAAExC,kBAAkB,EAAEyC;QAAgB,CACzD;MAAC,CACW,CAChB;IAAA,CACoB,CAAC,EAExB,IAAA9E,WAAA,CAAAwD,GAAA,EAACnD,kBAAkB;MACjBI,kBAAkB,EAAEgC,cAAc,EAAEhC,kBAAmB;MACvD6C,GAAG,EAAEN,iBAAkB;MACvB+B,QAAQ,EAAE,CAAE;MAAAxB,QAAA,EAEZ,IAAAvD,WAAA,CAAAwD,GAAA,EAAChE,kBAAA,CAAAwF,iBAAiB;QAACrC,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAMsC,0BAA0B,GAAAC,OAAA,CAAAvD,kBAAA,GAAG,IAAAwD,WAAI,EAACxD,kBAAkB,CAAC;AAC3DsD,0BAA0B,CAACG,WAAW,GAAG,oBAAoB","ignoreList":[]}
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.renderUiShell = exports.optionalComponentSlotNames = void 0;
7
7
  var _reactErrorBoundary = require("react-error-boundary");
8
+ var _bufferLatest = require("../tools/bufferLatest.cjs");
9
+ var _createMessageBus = require("../tools/createMessageBus.cjs");
8
10
  var _renderReactInWebComponent = require("../web-component/renderReactInWebComponent.cjs");
9
- var _bufferLatest = require("./bufferLatest.cjs");
10
- var _createMessageBus = require("./createMessageBus.cjs");
11
11
  var _UiShell = require("./UiShell.cjs");
12
12
  var _useHasUiShell = require("./useHasUiShell.cjs");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.cjs","names":["_reactErrorBoundary","require","_renderReactInWebComponent","_bufferLatest","_createMessageBus","_UiShell","_useHasUiShell","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","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 { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { bufferLatest } from \"./bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"./createMessageBus.js\";\nimport { UiShell, UiShellProps } 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 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 onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n}: {\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<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: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\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 topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\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 slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":";;;;;;AAaA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AApB1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,MAAMO,0BAGZ,GAAAC,OAAA,CAAAD,0BAAA,GAAG;EACFE,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AA0BM,MAAMC,aAAa,G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EA,qBAAsB;QAC7CwC,iBAAiB,EAAET,iBAAiB,CAACU,cAAe;QACpDC,oBAAoB,EAAEX,iBAAiB,CAACY;MAAkB,CAC3D;IAAC,CACW,CAChB;IACDjB,oBAAoB;IACpBkB,yBAAyB,EAAE/C;EAC7B,CAAC,CAAC;EAEF,MAAMgD,qCAAqC,GAAGlC,6BAA6B,CACzE,MAAM;IACJkC,qCAAqC,CAAC,CAAC;IAEvCjD,QAAQ,GAAG;MACTT,UAAU;MACV2B,kBAAkB;MAClBE,gBAAgB;MAChB8B,iBAAiB,EAAElC,iCAAiC;MACpDM,eAAe;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAED/B,aAAa,CAACkD,WAAW,CAAC5D,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACV2B,kBAAkB;IAClBE,gBAAgB;IAChB8B,iBAAiB,EAAElC,iCAAiC;IACpDM,eAAe;IACfU;EACF,CAAC;AACH,CAAC;AAAClD,OAAA,CAAAM,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"renderUiShell.cjs","names":["_reactErrorBoundary","require","_bufferLatest","_createMessageBus","_renderReactInWebComponent","_UiShell","_useHasUiShell","_jsxRuntime","optionalComponentSlotNames","exports","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","document","createElement","setAttribute","uiShellDataAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","createMessageBus","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","bufferLatest","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","renderReactInWebComponent","getReactComponent","reactRootElements","jsx","ErrorBoundary","fallback","children","UiShell","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","unsubscribeFromUnifiedUiShellRendered","setComponentProps","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 { UiShell, UiShellProps } 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 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 onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n}: {\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<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: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\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 topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentChildren,\n webComponentParentElement: parentElement,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\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 slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":";;;;;;AAaA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AApB1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,MAAMO,0BAGZ,GAAAC,OAAA,CAAAD,0BAAA,GAAG;EACFE,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AA0BM,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU,EAAEC,kBAAkB;EAC9BC,uBAAuB;EACvBC,gBAAgB;EAChBC,4BAA4B;EAC5BC,sBAAsB;EACtBC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,QAAQ;EACRC,aAAa;EACbC,sBAAsB;EACtBC,8BAA8B;EAC9BC;AA0BwC,CAAC,KAAK;EAC9C,MAAMb,UAAU,GAAGC,kBAAkB,IAAIa,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAGtEL,aAAa,CAACM,YAAY,CAACC,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;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAED/B,aAAa,CAACkD,WAAW,CAAC5D,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACV2B,kBAAkB;IAClBE,gBAAgB;IAChB8B,iBAAiB,EAAElC,iCAAiC;IACpDM,eAAe;IACfU;EACF,CAAC;AACH,CAAC;AAAClD,OAAA,CAAAM,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.subComponentNames = void 0;
6
+ exports.subComponentNames = exports.TURN_OFF_APP_SWITCHER = void 0;
7
7
  /*!
8
8
  * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.
9
9
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -17,4 +17,5 @@ exports.subComponentNames = void 0;
17
17
  */
18
18
 
19
19
  const subComponentNames = exports.subComponentNames = ["TopNav", "SideNav", "AppSwitcher"];
20
+ const TURN_OFF_APP_SWITCHER = exports.TURN_OFF_APP_SWITCHER = Symbol("Turn off AppSwitcher in the event of an error.");
20
21
  //# sourceMappingURL=uiShellContentTypes.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"uiShellContentTypes.cjs","names":["subComponentNames","exports"],"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\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n */\n appSwitcherProps?: AppSwitcherProps;\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;;AASO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU","ignoreList":[]}
1
+ {"version":3,"file":"uiShellContentTypes.cjs","names":["subComponentNames","exports","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\";\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 * 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;;AASO,MAAMA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU;AAGvE,MAAME,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,GAAGC,MAAM,CACzC,gDACF,CAAC","ignoreList":[]}
@@ -4,7 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createShadowRootElement = exports.createShadowDomElements = void 0;
7
- var _createReactRootElements = require("../web-component/createReactRootElements.cjs");
7
+ var _createReactRootElements = require("./createReactRootElements.cjs");
8
+ var _removeGlobalStylesFromShadowDom = require("./removeGlobalStylesFromShadowDom.cjs");
8
9
  /*!
9
10
  * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
10
11
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -15,7 +16,7 @@ var _createReactRootElements = require("../web-component/createReactRootElements
15
16
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
17
  *
17
18
  * See the License for the specific language governing permissions and limitations under the License.
18
- */const createShadowDomElements = containerElement => {
19
+ */const createShadowDomElements = (containerElement, nonce = window.cspNonce) => {
19
20
  const shadowRoot = containerElement.attachShadow({
20
21
  mode: "open"
21
22
  });
@@ -25,6 +26,10 @@ var _createReactRootElements = require("../web-component/createReactRootElements
25
26
  } = (0, _createReactRootElements.createReactRootElements)();
26
27
  shadowRoot.appendChild(appRootElement);
27
28
  shadowRoot.appendChild(stylesRootElement);
29
+ (0, _removeGlobalStylesFromShadowDom.removeGlobalStylesFromShadowDom)({
30
+ nonce,
31
+ stylesRootElement
32
+ });
28
33
  return {
29
34
  emotionRootElement: stylesRootElement,
30
35
  shadowRootElement: appRootElement
@@ -45,4 +50,4 @@ const createShadowRootElement = containerElement => {
45
50
  return [emotionRootElement, shadowRootElement];
46
51
  };
47
52
  exports.createShadowRootElement = createShadowRootElement;
48
- //# sourceMappingURL=shadow-dom.cjs.map
53
+ //# sourceMappingURL=createShadowDomElements.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createShadowDomElements.cjs","names":["_createReactRootElements","require","_removeGlobalStylesFromShadowDom","createShadowDomElements","containerElement","nonce","window","cspNonce","shadowRoot","attachShadow","mode","appRootElement","stylesRootElement","createReactRootElements","appendChild","removeGlobalStylesFromShadowDom","emotionRootElement","shadowRootElement","exports","createShadowRootElement","document","createElement","setAttribute"],"sources":["../../../src/web-component/createShadowDomElements.ts"],"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 { createReactRootElements } from \"./createReactRootElements.js\";\nimport { removeGlobalStylesFromShadowDom } from \"./removeGlobalStylesFromShadowDom.js\";\n\n/**\n * This function is necessary only when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component.\n *\n * In most cases, you'll want to use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead.\n */\nexport const createShadowDomElements = (\n containerElement: HTMLElement,\n nonce: string = window.cspNonce,\n) => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // Container for Emotion `<style>` elements.\n const { appRootElement, stylesRootElement } = createReactRootElements();\n\n shadowRoot.appendChild(appRootElement);\n shadowRoot.appendChild(stylesRootElement);\n\n removeGlobalStylesFromShadowDom({\n nonce,\n stylesRootElement,\n });\n\n return {\n emotionRootElement: stylesRootElement,\n shadowRootElement: appRootElement,\n };\n};\n\n/**\n * @deprecated Use `createShadowDomElements` instead which returns an object instead of an array. It's otherwise the same.\n * @deprecated Ideally, use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead. This function was necessary when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component. */\nexport const createShadowRootElement = (\n containerElement: HTMLElement,\n): [HTMLStyleElement, HTMLDivElement] => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // the element that styles will be cached into\n const emotionRootElement = document.createElement(\"style\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // the element that emotion renders html into\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return [emotionRootElement, shadowRootElement];\n};\n"],"mappings":";;;;;;AAYA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAUO,MAAME,uBAAuB,GAAGA,CACrCC,gBAA6B,EAC7BC,KAAa,GAAGC,MAAM,CAACC,QAAQ,KAC5B;EACH,MAAMC,UAAU,GAAGJ,gBAAgB,CAACK,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAM;IAAEC,cAAc;IAAEC;EAAkB,CAAC,GAAG,IAAAC,gDAAuB,EAAC,CAAC;EAEvEL,UAAU,CAACM,WAAW,CAACH,cAAc,CAAC;EACtCH,UAAU,CAACM,WAAW,CAACF,iBAAiB,CAAC;EAEzC,IAAAG,gEAA+B,EAAC;IAC9BV,KAAK;IACLO;EACF,CAAC,CAAC;EAEF,OAAO;IACLI,kBAAkB,EAAEJ,iBAAiB;IACrCK,iBAAiB,EAAEN;EACrB,CAAC;AACH,CAAC;AAACO,OAAA,CAAAf,uBAAA,GAAAA,uBAAA;AAKK,MAAMgB,uBAAuB,GAClCf,gBAA6B,IACU;EACvC,MAAMI,UAAU,GAAGJ,gBAAgB,CAACK,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAMM,kBAAkB,GAAGI,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAC1DL,kBAAkB,CAACM,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;EACnDN,kBAAkB,CAACM,YAAY,CAAC,OAAO,EAAEhB,MAAM,CAACC,QAAQ,CAAC;EAGzD,MAAMU,iBAAiB,GAAGG,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACvDJ,iBAAiB,CAACK,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;EAEnDd,UAAU,CAACM,WAAW,CAACE,kBAAkB,CAAC;EAC1CR,UAAU,CAACM,WAAW,CAACG,iBAAiB,CAAC;EAEzC,OAAO,CAACD,kBAAkB,EAAEC,iBAAiB,CAAC;AAChD,CAAC;AAACC,OAAA,CAAAC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -3,6 +3,39 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _createReactRootElements = require("./createReactRootElements.cjs");
7
+ Object.keys(_createReactRootElements).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _createReactRootElements[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _createReactRootElements[key];
14
+ }
15
+ });
16
+ });
17
+ var _createShadowDomElements = require("./createShadowDomElements.cjs");
18
+ Object.keys(_createShadowDomElements).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _createShadowDomElements[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _createShadowDomElements[key];
25
+ }
26
+ });
27
+ });
28
+ var _removeGlobalStylesFromShadowDom = require("./removeGlobalStylesFromShadowDom.cjs");
29
+ Object.keys(_removeGlobalStylesFromShadowDom).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _removeGlobalStylesFromShadowDom[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _removeGlobalStylesFromShadowDom[key];
36
+ }
37
+ });
38
+ });
6
39
  var _renderReactInWebComponent = require("./renderReactInWebComponent.cjs");
7
40
  Object.keys(_renderReactInWebComponent).forEach(function (key) {
8
41
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["_renderReactInWebComponent","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/web-component/index.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\nexport * from \"./renderReactInWebComponent.js\";\n"],"mappings":";;;;;AAYA,IAAAA,0BAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,0BAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,0BAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,0BAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.cjs","names":["_createReactRootElements","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_createShadowDomElements","_removeGlobalStylesFromShadowDom","_renderReactInWebComponent"],"sources":["../../../src/web-component/index.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\nexport * from \"./createReactRootElements.js\";\nexport * from \"./createShadowDomElements.js\";\nexport * from \"./removeGlobalStylesFromShadowDom.js\";\nexport * from \"./renderReactInWebComponent.js\";\n"],"mappings":";;;;;AAYA,IAAAA,wBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,wBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,wBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,wBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,wBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,wBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,wBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,wBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,gCAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,gCAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,gCAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,gCAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,0BAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,0BAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,0BAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,0BAAA,CAAAP,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -15,5 +15,5 @@ exports.default = void 0;
15
15
  *
16
16
  * See the License for the specific language governing permissions and limitations under the License.
17
17
  */
18
- var _default = exports.default = "1-44-0";
18
+ var _default = exports.default = "1-47-0";
19
19
  //# sourceMappingURL=odysseyWebComponentVersion.generated.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-44-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-47-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.shadowDomHostStyles = exports.removeGlobalStylesFromShadowDom = void 0;
7
+ /*!
8
+ * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.
9
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
10
+ *
11
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ *
16
+ * See the License for the specific language governing permissions and limitations under the License.
17
+ */
18
+
19
+ const shadowDomHostStyles = exports.shadowDomHostStyles = `
20
+ :host {
21
+ all: initial;
22
+ contain: content;
23
+ }
24
+ `;
25
+ const removeGlobalStylesFromShadowDom = ({
26
+ nonce,
27
+ stylesRootElement
28
+ }) => {
29
+ const styleHostElement = document.createElement("style");
30
+ styleHostElement.setAttribute("nonce", nonce);
31
+ styleHostElement.innerHTML = shadowDomHostStyles;
32
+ stylesRootElement.appendChild(styleHostElement);
33
+ };
34
+ exports.removeGlobalStylesFromShadowDom = removeGlobalStylesFromShadowDom;
35
+ //# sourceMappingURL=removeGlobalStylesFromShadowDom.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeGlobalStylesFromShadowDom.cjs","names":["shadowDomHostStyles","exports","removeGlobalStylesFromShadowDom","nonce","stylesRootElement","styleHostElement","document","createElement","setAttribute","innerHTML","appendChild"],"sources":["../../../src/web-component/removeGlobalStylesFromShadowDom.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 { ReactRootElements } from \"./createReactRootElements.js\";\n\nexport const shadowDomHostStyles = `\n :host {\n all: initial;\n contain: content;\n }\n`;\n\nexport const removeGlobalStylesFromShadowDom = ({\n nonce,\n stylesRootElement,\n}: {\n nonce: string;\n stylesRootElement: ReactRootElements[\"stylesRootElement\"];\n}) => {\n const styleHostElement = document.createElement(\"style\");\n\n styleHostElement.setAttribute(\"nonce\", nonce);\n\n styleHostElement.innerHTML = shadowDomHostStyles;\n\n stylesRootElement.appendChild(styleHostElement);\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG;AACnC;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAME,+BAA+B,GAAGA,CAAC;EAC9CC,KAAK;EACLC;AAIF,CAAC,KAAK;EACJ,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAExDF,gBAAgB,CAACG,YAAY,CAAC,OAAO,EAAEL,KAAK,CAAC;EAE7CE,gBAAgB,CAACI,SAAS,GAAGT,mBAAmB;EAEhDI,iBAAiB,CAACM,WAAW,CAACL,gBAAgB,CAAC;AACjD,CAAC;AAACJ,OAAA,CAAAC,+BAAA,GAAAA,+BAAA","ignoreList":[]}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.webComponentDataAttributeName = exports.versionedWebComponentName = exports.renderReactInWebComponent = exports.getReactWebComponent = exports.WebComponentClass = void 0;
7
7
  var _createReactRootElements = require("./createReactRootElements.cjs");
8
8
  var _odysseyWebComponentVersionGenerated = _interopRequireDefault(require("./odysseyWebComponentVersion.generated.cjs"));
9
+ var _removeGlobalStylesFromShadowDom = require("./removeGlobalStylesFromShadowDom.cjs");
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
12
  function __transformExtension(filepath, extMapping) {
@@ -58,15 +59,10 @@ class WebComponentClass extends SsrFriendlyHtmlElementClass {
58
59
  });
59
60
  shadowRoot.appendChild(stylesRootElement);
60
61
  shadowRoot.appendChild(appRootElement);
61
- const styleHostElement = document.createElement("style");
62
- styleHostElement.setAttribute("nonce", window.cspNonce);
63
- styleHostElement.innerHTML = `
64
- :host {
65
- all: initial;
66
- contain: content;
67
- }
68
- `;
69
- stylesRootElement.appendChild(styleHostElement);
62
+ (0, _removeGlobalStylesFromShadowDom.removeGlobalStylesFromShadowDom)({
63
+ nonce: window.cspNonce,
64
+ stylesRootElement
65
+ });
70
66
  }
71
67
  setGetReactComponent(getReactComponent) {
72
68
  this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
@@ -1 +1 @@
1
- {"version":3,"file":"renderReactInWebComponent.cjs","names":["_createReactRootElements","require","_odysseyWebComponentVersionGenerated","_interopRequireDefault","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","a","b","length","endsWith","slice","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","styleHostElement","document","createElement","setAttribute","window","cspNonce","innerHTML","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","specifier","s","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","define","element","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n const styleHostElement = document.createElement(\"style\");\n styleHostElement.setAttribute(\"nonce\", window.cspNonce);\n styleHostElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n stylesRootElement.appendChild(styleHostElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: 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 // 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 * 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?: HTMLElement;\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}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\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":";;;;;;AAgBA,IAAAA,wBAAA,GAAAC,OAAA;AAIA,IAAAC,oCAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgE,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,wBAAAH,CAAA,EAAAI,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,uBAAA,YAAAA,CAAAH,CAAA,EAAAI,CAAA,SAAAA,CAAA,IAAAJ,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAQ,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAT,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAU,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAZ,CAAA,UAAAQ,CAAA,CAAAK,GAAA,CAAAb,CAAA,GAAAQ,CAAA,CAAAM,GAAA,CAAAd,CAAA,EAAAU,CAAA,gBAAAN,CAAA,IAAAJ,CAAA,gBAAAI,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAI,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAI,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAN,CAAA,EAAAK,CAAA,I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AAC2B,CAAC,KAAK;EAEjC,IAAI,CAACmC,cAAc,CAACnE,GAAG,CAACkE,gBAAgB,CAAC,EAAE;IACzCC,cAAc,CAACC,MAAM,CAACF,gBAAgB,EAAEnC,iBAAiB,CAAC;EAC5D;EAEA,MAAMsC,OAAO,GAAGrB,QAAQ,CAACC,aAAa,CAACiB,gBAAgB,CAEtD;EAEDG,OAAO,CAACnB,YAAY,CAAC3B,6BAA6B,EAAE,EAAE,CAAC;EAEvD8C,OAAO,CAACf,oBAAoB,CAACtB,iBAAiB,CAAC;EAC/C,OAAOqC,OAAO;AAChB,CAAC;AAAC7C,OAAA,CAAAyC,oBAAA,GAAAA,oBAAA;AAqDK,MAAMK,yBAAyB,GAAGA,CAAC;EACxCJ,gBAAgB;EAChBlC,iBAAiB;EACjBuC,oBAAoB;EACpBC,yBAAyB;EACzBC;AAC8B,CAAC,KAAK;EACpC,MAAMC,YAAY,GAAGT,oBAAoB,CAAC;IACxCjC,iBAAiB;IACjBkC;EACF,CAAC,CAAC;EAEF,IAAIK,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC5B,WAAW,CAACgC,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAC1B,WAAW,CAAC4B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC3B,WAAW,CAAC4B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAClD,OAAA,CAAA8C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"file":"renderReactInWebComponent.cjs","names":["_createReactRootElements","require","_odysseyWebComponentVersionGenerated","_interopRequireDefault","_removeGlobalStylesFromShadowDom","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","a","b","length","endsWith","slice","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","removeGlobalStylesFromShadowDom","nonce","window","cspNonce","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","specifier","s","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\nimport { removeGlobalStylesFromShadowDom } from \"./removeGlobalStylesFromShadowDom.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n removeGlobalStylesFromShadowDom({\n nonce: window.cspNonce,\n stylesRootElement,\n });\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: 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 // 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 * 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}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\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":";;;;;;AAgBA,IAAAA,wBAAA,GAAAC,OAAA;AAIA,IAAAC,oCAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,gCAAA,GAAAH,OAAA;AAAuF,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,wBAAAH,CAAA,EAAAI,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,uBAAA,YAAAA,CAAAH,CAAA,EAAAI,CAAA,SAAAA,CAAA,IAAAJ,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAQ,CAAA,EAAAC,C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AiB,IAAK;MAC/BJ,YAAY,CAAC5B,WAAW,CAACgC,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAC1B,WAAW,CAAC4B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC3B,WAAW,CAAC4B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAClD,OAAA,CAAA8C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -11,40 +11,10 @@ import _Autocomplete from "@mui/material/Autocomplete";
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
13
  import { memo } from "react";
14
- import { useTranslation } from "react-i18next";
14
+ import { useTranslation } from "./i18n.generated/i18n.js";
15
15
  import { PickerVirtualizationListBox } from "./labs/OdysseyPickers/PickerVirtualizationListBox.js";
16
16
  import { useAutocomplete } from "./useAutocomplete.js";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
- export const AutocompleteTestSelector = {
19
- accessibleText: {
20
- errorMessage: "errorMessage",
21
- hint: "description",
22
- label: "label"
23
- },
24
- children: {
25
- list: {
26
- children: {
27
- listItem: {
28
- elementSelector: {
29
- method: "ByRole",
30
- options: {
31
- label: "name"
32
- },
33
- role: "option"
34
- }
35
- }
36
- },
37
- isControlledElement: true
38
- }
39
- },
40
- elementSelector: {
41
- method: "ByRole",
42
- options: {
43
- label: "name"
44
- },
45
- role: "combobox"
46
- }
47
- };
48
18
  const Autocomplete = ({
49
19
  ariaDescribedBy,
50
20
  defaultValue,
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.js","names":["memo","useTranslation","PickerVirtualizationListBox","useAutocomplete","jsx","_jsx","AutocompleteTestSelector","accessibleText","errorMessage","hint","label","children","list","listItem","elementSelector","method","options","role","isControlledElement","Autocomplete","ariaDescribedBy","defaultValue","errorMessageList","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","MemoizedAutocomplete","displayName"],"sources":["../../src/Autocomplete.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 {\n Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\nimport { memo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { TestSelector } from \"./test-selectors/index.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nexport const AutocompleteTestSelector = {\n accessibleText: {\n errorMessage: \"errorMessage\",\n hint: \"description\",\n label: \"label\",\n },\n children: {\n list: {\n children: {\n listItem: {\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"option\",\n },\n },\n },\n isControlledElement: true,\n },\n },\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"combobox\",\n },\n} as const satisfies TestSelector;\n// type SetItemSize = (size: number) => void;\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /** Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided). If used in free solo mode, it must accept both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\n /**\n * Enables multiple choice selection\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * If this component is required to display a virtualized list of options,\n * then this value needs to be set to true.\n * It is recommended if you're options are on the order of 10's of hundreds or more.\n */\n isVirtualized?: boolean;\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The text to display when no options are available\n *\n * default: \"No options\"\n */\n noOptionsText?: string;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n clearText={t(\"clear.text\")}\n closeText={t(\"close.text\")}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n translate={translate}\n />\n );\n};\n\n// Need the `typeof Autocomplete` because generics don't get passed through\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete;\n// @ts-expect-error displayName is expected to not be on `typeof Autocomplete`\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,cAAc,QAAQ,eAAe;AAK9C,SAASC,2BAA2B,QAAQ,sDAAsD;AAElG,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvD,OAAO,MAAMC,wBAAwB,GAAG;EACtCC,cAAc,EAAE;IACdC,YAAY,EAAE,cAAc;IAC5BC,IAAI,EAAE,aAAa;IACnBC,KAAK,EAAE;EACT,CAAC;EACDC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJD,QAAQ,EAAE;QACRE,QAAQ,EAAE;UACRC,eAAe,EAAE;YACfC,MAAM,EAAE,QAAQ;YAChBC,OAAO,EAAE;cACPN,KAAK,EAAE;YACT,CAAC;YACDO,IAAI,EAAE;UACR;QACF;MACF,CAAC;MACDC,mBAAmB,EAAE;IACvB;EACF,CAAC;EACDJ,eAAe,EAAE;IACfC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE;MACPN,KAAK,EAAE;IACT,CAAC;IACDO,IAAI,EAAE;EACR;AACF,CAAiC;AAyKjC,MAAME,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZb,YAAY;EACZc,gBAAgB;EAChBC,uBAAuB;EACvBC,cAAc;EACdC,kBAAkB;EAClBhB,IAAI;EACJiB,iBAAiB;EACjBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,WAAW,GAAG,KAAK;EACnBC,SAAS;EACTC,UAAU,GAAG,KAAK;EAClBC,UAAU;EACVC,aAAa,GAAG,KAAK;EACrB1B,KAAK;EACL2B,IAAI,EAAEC,YAAY;EAClBC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,OAAO;EACPC,aAAa;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B,OAAO,EAAEA,OAAQ;IACjBkD,QAAQ,EAAE/B,UAAW;IACrBe,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAGD,MAAMsB,oBAAoB,GAAGnE,IAAI,CAACmB,YAAY,CAAwB;AAEtEgD,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIhD,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Autocomplete.js","names":["memo","useTranslation","PickerVirtualizationListBox","useAutocomplete","jsx","_jsx","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","hint","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","label","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","options","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","MemoizedAutocomplete","displayName"],"sources":["../../src/Autocomplete.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 {\n Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\nimport { memo } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport { useTranslation } from \"./i18n.generated/i18n.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /** Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided). If used in free solo mode, it must accept both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\n /**\n * Enables multiple choice selection\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * If this component is required to display a virtualized list of options,\n * then this value needs to be set to true.\n * It is recommended if you're options are on the order of 10's of hundreds or more.\n */\n isVirtualized?: boolean;\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The text to display when no options are available\n *\n * default: \"No options\"\n */\n noOptionsText?: string;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n clearText={t(\"clear.text\")}\n closeText={t(\"close.text\")}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n translate={translate}\n />\n );\n};\n\n// Need the `typeof Autocomplete` because generics don't get passed through\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete;\n// @ts-expect-error displayName is expected to not be on `typeof Autocomplete`\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA,SAASA,IAAI,QAAQ,OAAO;AAK5B,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,2BAA2B,QAAQ,sDAAsD;AAClG,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwKvD,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,uBAAuB;EACvBC,cAAc;EACdC,kBAAkB;EAClBC,IAAI;EACJC,iBAAiB;EACjBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,WAAW,GAAG,KAAK;EACnBC,SAAS;EACTC,UAAU,GAAG,KAAK;EAClBC,UAAU;EACVC,aAAa,GAAG,KAAK;EACrBC,KAAK;EACLC,IAAI,EAAEC,YAAY;EAClBC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,OAAO;EACPC,aAAa;EACbC,OAAO;EACPC,MAAM;EACNC,SAAS;EACTC;AACuE,CAAC,KAAK;EAC7E,MAAM;IAAEC;EAAE,CAAC,GAAGrC,cAAc,CAAC,CAAC;EAC9B,MAAM;IAAEsC,cAAc;IAAEC,gBAAgB;IAAEC,WAAW;IAAEC;EAAW,CAAC,GACjEvC,eAAe,CAAuD;IACpEI,eAAe;IACfC,YAAY;IACZC,YAAY;IACZC,gBAAgB;IAChBG,kBAAkB;IAClBC,IAAI;IACJC,iBAAiB;IACjBG,UAAU;IACVG,WAAW;IACXE,UAAU;IACVE,aAAa;IACbC,KAAK;IACLC,IAAI,EAAEC,YAAY;IAClBO,MAAM;IACNE;EACF,CAAC,CAAC;EAEJ,OACEhC,IAAA,CAAAsC,aAAA;IAAA,GACMD,UAAU;IAAA,GACVH,cAAc;IAAA,IAEbC,gBAAgB,CAACI,OAAO,IAAI;MAC/BC,gBAAgB,EAAE3C;IACpB,CAAC;IAED,iBAAekB,UAAW;IAC1B0B,SAAS,EAAER,CAAC,CAAC,YAAY,CAAE;IAC3BS,SAAS,EAAET,CAAC,CAAC,YAAY,CAAE;IAC3BU,oBAAoB,EAAEnC,kBAAmB;IACzCoC,QAAQ,EAAE7B,UAAW;IACrB8B,qBAAqB,EAAE,IAAK;IAC5BC,QAAQ,EAAEhC,oBAAqB;IAC/BiC,SAAS,EAAE/B,WAAY;IACvBT,cAAc,EAAEA,cAAe;IAC/BI,EAAE,EAAEC,UAAW;IACfoC,oBAAoB,EAAE1C,uBAAwB;IAC9C2C,OAAO,EAAEhC,SAAU;IACnBiC,QAAQ,EAAE1C,kBAAmB;IAC7BgB,aAAa,EAAEA,aAAa,IAAIS,CAAC,CAAC,wBAAwB,CAAE;IAC5DR,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAc;IAC7BuB,QAAQ,EAAElB,CAAC,CAAC,WAAW,CAAE;IACzBJ,OAAO,EAAEA,OAAQ;IACjBuB,QAAQ,EAAEjC,UAAW;IACrBiB,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAGD,MAAMsB,oBAAoB,GAAG1D,IAAI,CAACM,YAAY,CAAwB;AAEtEoD,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIpD,YAAY","ignoreList":[]}
@@ -12,7 +12,7 @@ import _AlertTitle from "@mui/material/AlertTitle";
12
12
  * See the License for the specific language governing permissions and limitations under the License.
13
13
  */
14
14
  import { memo } from "react";
15
- import { useTranslation } from "react-i18next";
15
+ import { useTranslation } from "./i18n.generated/i18n.js";
16
16
  import { Link } from "./Link.js";
17
17
  import { ScreenReaderText } from "./ScreenReaderText.js";
18
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";