@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
@@ -26,27 +26,22 @@ const OdysseyCacheProvider = ({
26
26
  children,
27
27
  emotionRoot,
28
28
  emotionRootElement,
29
- hasShadowDom: hasShadowDomProp,
30
29
  nonce,
31
- shadowDomElement,
32
30
  stylisPlugins
33
31
  }) => {
34
32
  const uniqueAlphabeticalId = (0, _useUniqueAlphabeticalId.useUniqueAlphabeticalId)();
35
- const hasShadowDom = hasShadowDomProp || shadowDomElement;
36
- const emotionCache = (0, _react2.useMemo)(() => {
37
- return (0, _cache.default)({
38
- ...((emotionRootElement || emotionRoot) && {
39
- container: emotionRootElement || emotionRoot
40
- }),
41
- key: uniqueAlphabeticalId,
42
- nonce: nonce ?? globalThis.cspNonce,
43
- prepend: true,
44
- speedy: hasShadowDom ? false : true,
45
- ...(stylisPlugins && {
46
- stylisPlugins
47
- })
48
- });
49
- }, [emotionRoot, emotionRootElement, hasShadowDom, nonce, stylisPlugins, uniqueAlphabeticalId]);
33
+ const emotionCache = (0, _react2.useMemo)(() => (0, _cache.default)({
34
+ ...((emotionRootElement || emotionRoot) && {
35
+ container: emotionRootElement || emotionRoot
36
+ }),
37
+ key: uniqueAlphabeticalId,
38
+ nonce: nonce ?? globalThis.cspNonce,
39
+ prepend: true,
40
+ speedy: true,
41
+ ...(stylisPlugins && {
42
+ stylisPlugins
43
+ })
44
+ }), [emotionRoot, emotionRootElement, nonce, stylisPlugins, uniqueAlphabeticalId]);
50
45
  return (0, _jsxRuntime.jsx)(_react.CacheProvider, {
51
46
  value: emotionCache,
52
47
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyCacheProvider.cjs","names":["_cache","_interopRequireDefault","require","_react","_react2","_useUniqueAlphabeticalId","_jsxRuntime","e","__esModule","default","OdysseyCacheProvider","children","emotionRoot","emotionRootElement","hasShadowDom","hasShadowDomProp","nonce","shadowDomElement","stylisPlugins","uniqueAlphabeticalId","useUniqueAlphabeticalId","emotionCache","useMemo","createCache","container","key","globalThis","cspNonce","prepend","speedy","jsx","CacheProvider","value","MemoizedOdysseyCacheProvider","exports","memo","displayName"],"sources":["../../src/OdysseyCacheProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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\ndeclare global {\n var cspNonce: string; // Adding types to `globalThis` requires we use `var`.\n}\n\nimport createCache, { StylisPlugin } from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId.js\";\n\nexport type OdysseyCacheProviderProps = {\n children: ReactNode;\n /**\n * Emotion caches styles into the style element.\n * When enabling this prop, Emotion caches the styles at this element, rather than in <head>.\n * @deprecated Use `EmotionRootElement` instead. This was incorrectly configured as an `HTMLStyleElement`, but then we're rendering `<style>` inside `<style>`. We need this to be a `<div>` instead.\n */\n emotionRoot?: HTMLStyleElement;\n /**\n * Emotion adds `<style>` elements into this DOM node. Normally, Emotion puts these in `document.head`.\n * This is useful if you want to render into a Shadow DOM or iframe.\n */\n emotionRootElement?: HTMLElement;\n hasShadowDom?: boolean;\n nonce?: string;\n /**\n * Emotion renders into this HTML element.\n * When enabling this prop, Emotion renders at the top of this component rather than the bottom like it does in the HTML `<head>`.\n * @deprecated Will be removed in a future Odyssey version. Use `hasShadowDomElement` instead.\n */\n shadowDomElement?: HTMLDivElement | HTMLElement;\n stylisPlugins?: StylisPlugin[];\n};\n\nconst OdysseyCacheProvider = ({\n children,\n emotionRoot,\n emotionRootElement,\n hasShadowDom: hasShadowDomProp,\n nonce,\n shadowDomElement,\n stylisPlugins,\n}: OdysseyCacheProviderProps) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const hasShadowDom = hasShadowDomProp || shadowDomElement;\n\n const emotionCache = useMemo(() => {\n return createCache({\n ...((emotionRootElement || emotionRoot) && {\n container: emotionRootElement || emotionRoot,\n }),\n key: uniqueAlphabeticalId,\n nonce: nonce ?? globalThis.cspNonce,\n prepend: true,\n speedy: hasShadowDom ? false : true, // <-- Needs to be set to false when shadow-dom is used! https://github.com/emotion-js/emotion/issues/2053#issuecomment-713429122\n ...(stylisPlugins && { stylisPlugins }),\n });\n }, [\n emotionRoot,\n emotionRootElement,\n hasShadowDom,\n nonce,\n stylisPlugins,\n uniqueAlphabeticalId,\n ]);\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\nMemoizedOdysseyCacheProvider.displayName =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AAA,EAAC3B,MAAA,CAAA4B,aAAa;IAACC,KAAK,EAAEX,YAAa;IAAAV,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMsB,4BAA4B,GAAAC,OAAA,CAAAxB,oBAAA,GAAG,IAAAyB,YAAI,EAACzB,oBAAoB,CAAC;AAC/DuB,4BAA4B,CAACG,WAAW,GAAG,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"OdysseyCacheProvider.cjs","names":["_cache","_interopRequireDefault","require","_react","_react2","_useUniqueAlphabeticalId","_jsxRuntime","e","__esModule","default","OdysseyCacheProvider","children","emotionRoot","emotionRootElement","nonce","stylisPlugins","uniqueAlphabeticalId","useUniqueAlphabeticalId","emotionCache","useMemo","createCache","container","key","globalThis","cspNonce","prepend","speedy","jsx","CacheProvider","value","MemoizedOdysseyCacheProvider","exports","memo","displayName"],"sources":["../../src/OdysseyCacheProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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\ndeclare global {\n var cspNonce: string; // Adding types to `globalThis` requires we use `var`.\n}\n\nimport createCache, { StylisPlugin } from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId.js\";\n\nexport type OdysseyCacheProviderProps = {\n children: ReactNode;\n /**\n * @deprecated Use `EmotionRootElement` instead. This was incorrectly configured as an `HTMLStyleElement`, but then we're rendering `<style>` inside `<style>`. We need this to be a `<div>` instead.\n *\n * Emotion caches styles into the style element.\n * When enabling this prop, Emotion caches the styles at this element, rather than in <head>.\n */\n emotionRoot?: HTMLStyleElement;\n /**\n * Emotion adds `<style>` elements into this DOM node. Normally, Emotion puts these in `document.head`.\n * This is useful if you want to render into a Shadow DOM or iframe.\n */\n emotionRootElement?: HTMLElement;\n /**\n * @deprecated No longer necessary.\n *\n * Required to know if a Shadow DOM is in use. This tells Emotion to change its cache configuration.\n */\n hasShadowDom?: boolean;\n nonce?: string;\n /**\n * @deprecated No longer necessary.\n *\n * Emotion renders into this HTML element.\n * When enabling this prop, Emotion renders at the top of this component rather than the bottom like it does in the HTML `<head>`.\n */\n shadowDomElement?: HTMLDivElement | HTMLElement;\n stylisPlugins?: StylisPlugin[];\n};\n\nconst OdysseyCacheProvider = ({\n children,\n emotionRoot,\n emotionRootElement,\n nonce,\n stylisPlugins,\n}: OdysseyCacheProviderProps) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n ...((emotionRootElement || emotionRoot) && {\n container: emotionRootElement || emotionRoot,\n }),\n key: uniqueAlphabeticalId,\n nonce: nonce ?? globalThis.cspNonce,\n prepend: true,\n speedy: true,\n ...(stylisPlugins && { stylisPlugins }),\n }),\n [\n emotionRoot,\n emotionRootElement,\n nonce,\n stylisPlugins,\n uniqueAlphabeticalId,\n ],\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\nMemoizedOdysseyCacheProvider.displayName = \"OdysseyCacheProvider\";\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":";;;;;;AAgBA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AAAuE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AApBvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2CA,MAAMG,oBAAoB,GAAGA,CAAC;EAC5BC,QAAQ;EACRC,WAAW;EACXC,kBAAkB;EAClBC,KAAK;EACLC;AACyB,CAAC,KAAK;EAC/B,MAAMC,oBAAoB,GAAG,IAAAC,gDAAuB,EAAC,CAAC;EAEtD,MAAMC,YAAY,GAAG,IAAAC,eAAO,EAC1B,MACE,IAAAC,cAAW,EAAC;IACV,IAAI,CAACP,kBAAkB,IAAID,WAAW,KAAK;MACzCS,SAAS,EAAER,kBAAkB,IAAID;IACnC,CAAC,CAAC;IACFU,GAAG,EAAEN,oBAAoB;IACzBF,KAAK,EAAEA,KAAK,IAAIS,UAAU,CAACC,QAAQ;IACnCC,OAAO,EAAE,IAAI;IACbC,MAAM,EAAE,IAAI;IACZ,IAAIX,aAAa,IAAI;MAAEA;IAAc,CAAC;EACxC,CAAC,CAAC,EACJ,CACEH,WAAW,EACXC,kBAAkB,EAClBC,KAAK,EACLC,aAAa,EACbC,oBAAoB,CAExB,CAAC;EAED,OAAO,IAAAV,WAAA,CAAAqB,GAAA,EAACxB,MAAA,CAAAyB,aAAa;IAACC,KAAK,EAAEX,YAAa;IAAAP,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMmB,4BAA4B,GAAAC,OAAA,CAAArB,oBAAA,GAAG,IAAAsB,YAAI,EAACtB,oBAAoB,CAAC;AAC/DoB,4BAA4B,CAACG,WAAW,GAAG,sBAAsB","ignoreList":[]}
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.OdysseyProvider = void 0;
7
7
  var _ScopedCssBaseline2 = _interopRequireDefault(require("@mui/material/ScopedCssBaseline"));
8
8
  var _react = require("react");
9
+ var _CssBaseline = require("./CssBaseline.cjs");
10
+ var _FullScreenOverlayContext = require("./FullScreenOverlayContext.cjs");
11
+ var _i18n = require("./i18n.generated/i18n.cjs");
9
12
  var _OdysseyCacheProvider = require("./OdysseyCacheProvider.cjs");
10
13
  var _OdysseyThemeProvider = require("./OdysseyThemeProvider.cjs");
11
- var _OdysseyTranslationProvider = require("./OdysseyTranslationProvider.cjs");
12
14
  var _jsxRuntime = require("react/jsx-runtime");
13
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
16
  /*!
@@ -32,9 +34,12 @@ const OdysseyProvider = ({
32
34
  designTokensOverride,
33
35
  emotionRoot,
34
36
  emotionRootElement,
37
+ hasCssBaseline: hasGlobalCss,
35
38
  hasScopedCssBaseline = true,
39
+ hasWrapperElement,
36
40
  languageCode,
37
41
  nonce,
42
+ overlayParentElement,
38
43
  shadowDomElement,
39
44
  shadowRootElement,
40
45
  stylisPlugins,
@@ -42,25 +47,28 @@ const OdysseyProvider = ({
42
47
  translationOverrides
43
48
  }) => (0, _jsxRuntime.jsx)(_OdysseyCacheProvider.OdysseyCacheProvider, {
44
49
  emotionRootElement: emotionRootElement || emotionRoot,
45
- hasShadowDom: Boolean(shadowRootElement || shadowDomElement),
46
50
  nonce: nonce,
47
51
  stylisPlugins: stylisPlugins,
48
52
  children: (0, _jsxRuntime.jsx)(_OdysseyThemeProvider.OdysseyThemeProvider, {
49
53
  contrastMode: contrastMode,
50
54
  designTokensOverride: designTokensOverride,
51
- shadowDomElement: shadowDomElement,
52
- shadowRootElement: shadowRootElement,
55
+ hasWrapperElement: hasWrapperElement,
56
+ shadowRootElement: shadowRootElement ?? shadowDomElement,
53
57
  themeOverride: themeOverride,
54
- children: (0, _jsxRuntime.jsx)(_OdysseyTranslationProvider.OdysseyTranslationProvider, {
58
+ children: (0, _jsxRuntime.jsx)(_i18n.TranslationProvider, {
55
59
  languageCode: languageCode,
56
60
  translationOverrides: translationOverrides,
57
- children: hasScopedCssBaseline ? (0, _jsxRuntime.jsx)(_ScopedCssBaseline2.default, {
58
- sx: scopedCssBaselineStyles,
59
- children: children
60
- }) : children
61
+ children: (0, _jsxRuntime.jsxs)(_FullScreenOverlayContext.FullScreenOverlayProvider, {
62
+ hasShadowDom: Boolean(shadowRootElement || shadowDomElement),
63
+ overlayParentElement: overlayParentElement,
64
+ children: [hasGlobalCss && (0, _jsxRuntime.jsx)(_CssBaseline.CssBaseline, {}), hasScopedCssBaseline ? (0, _jsxRuntime.jsx)(_ScopedCssBaseline2.default, {
65
+ sx: scopedCssBaselineStyles,
66
+ children: children
67
+ }) : children]
68
+ })
61
69
  })
62
70
  })
63
71
  });
64
- OdysseyProvider.displayName = "OdysseyProvider";
65
72
  const MemoizedOdysseyProvider = exports.OdysseyProvider = (0, _react.memo)(OdysseyProvider);
73
+ MemoizedOdysseyProvider.displayName = "OdysseyProvider";
66
74
  //# sourceMappingURL=OdysseyProvider.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyProvider.cjs","names":["_react","require","_OdysseyCacheProvider","_OdysseyThemeProvider","_OdysseyTranslationProvider","_jsxRuntime","_interopRequireDefault","e","__esModule","default","scopedCssBaselineStyles","height","OdysseyProvider","children","contrastMode","designTokensOverride","emotionRoot","emotionRootElement","hasScopedCssBaseline","languageCode","nonce","shadowDomElement","shadowRootElement","stylisPlugins","themeOverride","translationOverrides","jsx","OdysseyCacheProvider","hasShadowDom","Boolean","OdysseyThemeProvider","OdysseyTranslationProvider","_ScopedCssBaseline2","sx","displayName","MemoizedOdysseyProvider","exports","memo"],"sources":["../../src/OdysseyProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { ScopedCssBaseline } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider.js\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider.js\";\nimport {\n OdysseyTranslationProvider,\n OdysseyTranslationProviderProps,\n} from \"./OdysseyTranslationProvider.js\";\nimport { DefaultSupportedLanguages } from \"./OdysseyTranslationProvider.types.js\";\n\nconst scopedCssBaselineStyles = {\n height: \"inherit\",\n};\n\nexport type OdysseyProviderProps<\n SupportedLanguages extends string = DefaultSupportedLanguages,\n> = OdysseyCacheProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps<SupportedLanguages> & {\n children: ReactNode;\n /**\n * Whether to emit the ScopedCssBaseline. Defaults to true.\n */\n hasScopedCssBaseline?: boolean;\n };\n\nconst OdysseyProvider = <SupportedLanguages extends string>({\n children,\n contrastMode,\n designTokensOverride,\n emotionRoot,\n emotionRootElement,\n hasScopedCssBaseline = true,\n languageCode,\n nonce,\n shadowDomElement,\n shadowRootElement,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps<SupportedLanguages>) => (\n <OdysseyCacheProvider\n emotionRootElement={emotionRootElement || emotionRoot}\n hasShadowDom={Boolean(shadowRootElement || shadowDomElement)}\n nonce={nonce}\n stylisPlugins={stylisPlugins}\n >\n <OdysseyThemeProvider\n contrastMode={contrastMode}\n designTokensOverride={designTokensOverride}\n shadowDomElement={shadowDomElement}\n shadowRootElement={shadowRootElement}\n themeOverride={themeOverride}\n >\n <OdysseyTranslationProvider<SupportedLanguages>\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {hasScopedCssBaseline ? (\n <ScopedCssBaseline sx={scopedCssBaselineStyles}>\n {children}\n </ScopedCssBaseline>\n ) : (\n children\n )}\n </OdysseyTranslationProvider>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\nOdysseyProvider.displayName = \"OdysseyProvider\";\n\nconst MemoizedOdysseyProvider = memo(OdysseyProvider) as typeof OdysseyProvider;\n\nexport { MemoizedOdysseyProvider as OdysseyProvider };\n"],"mappings":";;;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAIA,IAAAE,qBAAA,GAAAF,OAAA;AAIA,IAAAG,2BAAA,GAAAH,OAAA;AAGyC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA1BzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA,MAAMG,uBAAuB,GAAG;EAC9BC,MAAM,EAAE;AACV,CAAC;AAcD,MAAMC,eAAe,GAAGA,CAAoC;EAC1DC,QAAQ;EACRC,YAAY;EACZC,oBAAoB;EACpBC,WAAW;EACXC,kBAAkB;EAClBC,oBAAoB,GAAG,IAAI;EAC3BC,YAAY;EACZC,KAAK;EACLC,gBAAgB;EAChBC,iBAAiB;EACjBC,aAAa;EACbC,aAAa;EACbC;AACwC,CAAC,KACzC,IAAApB,WAAA,CAAAqB,GAAA,EAACxB,qBAAA,CAAAyB,oBAAoB;EACnBV,kBAAkB,EAAEA,kBAAkB,IAAID,WAAY;EACtDY,YAAY,EAAEC,OAAO,CAACP,iBAAiB,IAAID,gBAAgB,CAAE;EAC7DD,KAAK,EAAEA,KAAM;EACbG,aAAa,EAAEA,aAAc;EAAAV,QAAA,EAE7B,IAAAR,WAAA,CAAAqB,GAAA,EAACvB,qBAAA,CAAA2B,oBAAoB;IACnBhB,YAAY,EAAEA,YAAa;IAC3BC,oBAAoB,EAAEA,oBAAqB;IAC3CM,gBAAgB,EAAEA,gBAAiB;IACnCC,iBAAiB,EAAEA,iBAAkB;IACrCE,aAAa,EAAEA,aAAc;IAAAX,QAAA,EAE7B,IAAAR,WAAA,CAAAqB,GAAA,EAACtB,2BAAA,CAAA2B,0BAA0B;MACzBZ,YAAY,EAAEA,YAAa;MAC3BM,oBAAoB,EAAEA,oBAAqB;MAAAZ,QAAA,EAE1CK,oBAAoB,GACnB,IAAAb,WAAA,CAAAqB,GAAA,EAAAM,mBAAA,CAAAvB,OAAA;QAAmBwB,EAAE,EAAEvB,uBAAwB;QAAAG,QAAA,EAC5CA;MAAQ,CACQ,CAAC,GAEpBA;IACD,CACyB;EAAC,CACT;AAAC,CACH,CACvB;AACDD,eAAe,CAACsB,WAAW,GAAG,iBAAiB;AAE/C,MAAMC,uBAAuB,GAAAC,OAAA,CAAAxB,eAAA,GAAG,IAAAyB,WAAI,EAACzB,eAAe,CAA2B","ignoreList":[]}
1
+ {"version":3,"file":"OdysseyProvider.cjs","names":["_react","require","_CssBaseline","_FullScreenOverlayContext","_i18n","_OdysseyCacheProvider","_OdysseyThemeProvider","_jsxRuntime","_interopRequireDefault","e","__esModule","default","scopedCssBaselineStyles","height","OdysseyProvider","children","contrastMode","designTokensOverride","emotionRoot","emotionRootElement","hasCssBaseline","hasGlobalCss","hasScopedCssBaseline","hasWrapperElement","languageCode","nonce","overlayParentElement","shadowDomElement","shadowRootElement","stylisPlugins","themeOverride","translationOverrides","jsx","OdysseyCacheProvider","OdysseyThemeProvider","TranslationProvider","jsxs","FullScreenOverlayProvider","hasShadowDom","Boolean","CssBaseline","_ScopedCssBaseline2","sx","MemoizedOdysseyProvider","exports","memo","displayName"],"sources":["../../src/OdysseyProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { ScopedCssBaseline } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport { CssBaseline } from \"./CssBaseline.js\";\nimport {\n FullScreenOverlayProvider,\n FullScreenOverlayProviderProps,\n} from \"./FullScreenOverlayContext.js\";\nimport {\n type DefaultSupportedLanguages,\n TranslationProvider as OdysseyTranslationProvider,\n type TranslationProviderProps as OdysseyTranslationProviderProps,\n} from \"./i18n.generated/i18n.js\";\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider.js\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider.js\";\n\nconst scopedCssBaselineStyles = {\n height: \"inherit\",\n};\n\nexport type OdysseyProviderProps<\n SupportedLanguages extends string = DefaultSupportedLanguages,\n> = Omit<OdysseyCacheProviderProps, \"hasShadowDom\"> &\n FullScreenOverlayProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps<SupportedLanguages> & {\n children: ReactNode;\n /**\n * Whether to emit the ScopedCssBaseline. Defaults to true.\n */\n hasCssBaseline?: boolean;\n /**\n * Adds the `ScopedCssBaseline` wrapper. This also adds a `div`, so it might not be what you want.\n */\n hasScopedCssBaseline?: boolean;\n };\n\nconst OdysseyProvider = <SupportedLanguages extends string>({\n children,\n contrastMode,\n designTokensOverride,\n emotionRoot,\n emotionRootElement,\n hasCssBaseline: hasGlobalCss,\n hasScopedCssBaseline = true,\n hasWrapperElement,\n languageCode,\n nonce,\n overlayParentElement,\n shadowDomElement,\n shadowRootElement,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps<SupportedLanguages>) => (\n <OdysseyCacheProvider\n emotionRootElement={emotionRootElement || emotionRoot}\n nonce={nonce}\n stylisPlugins={stylisPlugins}\n >\n <OdysseyThemeProvider\n contrastMode={contrastMode}\n designTokensOverride={designTokensOverride}\n hasWrapperElement={hasWrapperElement}\n shadowRootElement={shadowRootElement ?? shadowDomElement}\n themeOverride={themeOverride}\n >\n <OdysseyTranslationProvider<SupportedLanguages>\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n <FullScreenOverlayProvider\n hasShadowDom={Boolean(shadowRootElement || shadowDomElement)}\n overlayParentElement={overlayParentElement}\n >\n {hasGlobalCss && <CssBaseline />}\n\n {hasScopedCssBaseline ? (\n <ScopedCssBaseline sx={scopedCssBaselineStyles}>\n {children}\n </ScopedCssBaseline>\n ) : (\n children\n )}\n </FullScreenOverlayProvider>\n </OdysseyTranslationProvider>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedOdysseyProvider = memo(OdysseyProvider);\nMemoizedOdysseyProvider.displayName = \"OdysseyProvider\";\n\nexport { MemoizedOdysseyProvider as OdysseyProvider };\n"],"mappings":";;;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AAIA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,qBAAA,GAAAJ,OAAA;AAIA,IAAAK,qBAAA,GAAAL,OAAA;AAGmC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhCnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA,MAAMG,uBAAuB,GAAG;EAC9BC,MAAM,EAAE;AACV,CAAC;AAmBD,MAAMC,eAAe,GAAGA,CAAoC;EAC1DC,QAAQ;EACRC,YAAY;EACZC,oBAAoB;EACpBC,WAAW;EACXC,kBAAkB;EAClBC,cAAc,EAAEC,YAAY;EAC5BC,oBAAoB,GAAG,IAAI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A+B,WAAI,EAAC/B,eAAe,CAAC;AACrD6B,uBAAuB,CAACG,WAAW,GAAG,iBAAiB","ignoreList":[]}
@@ -10,6 +10,7 @@ var _utils = require("@mui/utils");
10
10
  var Tokens = _interopRequireWildcard(require("@okta/odyssey-design-tokens"));
11
11
  var _react = require("react");
12
12
  var _OdysseyDesignTokensContext = require("./OdysseyDesignTokensContext.cjs");
13
+ var _OdysseyThemeProviderPropsContext = require("./OdysseyThemeProviderPropsContext.cjs");
13
14
  var _index = require("./theme/index.cjs");
14
15
  var _useContrastMode = require("./useContrastMode.cjs");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
@@ -32,46 +33,56 @@ const StyledContrastContainerStyles = (0, _styled.default)("div")({
32
33
  });
33
34
  const OdysseyThemeProvider = ({
34
35
  children,
35
- contrastMode: explicitContrastMode,
36
- designTokensOverride,
36
+ contrastMode: contrastModeProp,
37
+ designTokensOverride: designTokensOverrideProp,
38
+ hasWrapperElement = true,
37
39
  shadowDomElement,
38
- shadowRootElement,
39
- themeOverride
40
+ shadowRootElement: shadowRootElementProp,
41
+ themeOverride: themeOverrideProp
40
42
  }) => {
43
+ const odysseyThemeProviderPropsContext = (0, _OdysseyThemeProviderPropsContext.useOdysseyThemeProviderPropsContext)();
44
+ const designTokensOverride = designTokensOverrideProp ?? odysseyThemeProviderPropsContext.designTokensOverride;
45
+ const shadowRootElement = shadowRootElementProp ?? shadowDomElement ?? odysseyThemeProviderPropsContext.shadowRootElement;
46
+ const themeOverride = themeOverrideProp ?? odysseyThemeProviderPropsContext.themeOverride;
41
47
  const {
42
48
  contrastMode,
43
49
  contrastContainerRef
44
50
  } = (0, _useContrastMode.useContrastMode)({
45
- contrastMode: explicitContrastMode
51
+ contrastMode: contrastModeProp
46
52
  });
47
53
  const odysseyTokens = (0, _react.useMemo)(() => ({
48
54
  ...Tokens,
49
55
  ...designTokensOverride
50
56
  }), [designTokensOverride]);
51
- const effectiveShadowRootElement = shadowRootElement || shadowDomElement;
52
57
  const odysseyTheme = (0, _react.useMemo)(() => (0, _index.createOdysseyMuiTheme)({
53
58
  contrastMode,
54
59
  odysseyTokens,
55
- shadowRootElement: effectiveShadowRootElement
56
- }), [contrastMode, odysseyTokens, effectiveShadowRootElement]);
60
+ shadowRootElement
61
+ }), [contrastMode, odysseyTokens, shadowRootElement]);
57
62
  const customOdysseyTheme = (0, _react.useMemo)(() => (0, _styles.createTheme)((0, _utils.deepmerge)(odysseyTheme, themeOverride || {})), [odysseyTheme, themeOverride]);
58
63
  const contrastModeProviderValue = (0, _react.useMemo)(() => ({
59
64
  contrastMode
60
65
  }), [contrastMode]);
61
- return (0, _jsxRuntime.jsx)(StyledContrastContainerStyles, {
62
- ref: contrastContainerRef,
63
- children: (0, _jsxRuntime.jsx)(_useContrastMode.ContrastModeContext.Provider, {
64
- value: contrastModeProviderValue,
65
- children: (0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
66
- theme: customOdysseyTheme,
66
+ const providerComponents = (0, _react.useMemo)(() => (0, _jsxRuntime.jsx)(_useContrastMode.ContrastModeContext.Provider, {
67
+ value: contrastModeProviderValue,
68
+ children: (0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
69
+ theme: customOdysseyTheme,
70
+ children: (0, _jsxRuntime.jsx)(_OdysseyThemeProviderPropsContext.OdysseyThemeProviderPropsProvider, {
71
+ designTokensOverride: designTokensOverride,
72
+ shadowRootElement: shadowRootElement,
73
+ themeOverride: themeOverride,
67
74
  children: (0, _jsxRuntime.jsx)(_OdysseyDesignTokensContext.OdysseyDesignTokensContext.Provider, {
68
75
  value: odysseyTokens,
69
76
  children: children
70
77
  })
71
78
  })
72
79
  })
73
- });
80
+ }), [children, contrastModeProviderValue, customOdysseyTheme, designTokensOverride, odysseyTokens, shadowRootElement, themeOverride]);
81
+ return hasWrapperElement ? (0, _jsxRuntime.jsx)(StyledContrastContainerStyles, {
82
+ ref: contrastContainerRef,
83
+ children: providerComponents
84
+ }) : providerComponents;
74
85
  };
75
- OdysseyThemeProvider.displayName = "OdysseyThemeProvider";
76
86
  const MemoizedOdysseyThemeProvider = exports.OdysseyThemeProvider = (0, _react.memo)(OdysseyThemeProvider);
87
+ MemoizedOdysseyThemeProvider.displayName = "OdysseyThemeProvider";
77
88
  //# sourceMappingURL=OdysseyThemeProvider.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyThemeProvider.cjs","names":["_styled","_interopRequireDefault","require","_styles","_utils","Tokens","_interopRequireWildcard","_react","_OdysseyDesignTokensContext","_index","_useContrastMode","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledContrastContainerStyles","styled","height","OdysseyThemeProvider","children","contrastMode","explicitContrastMode","designTokensOverride","shadowDomElement","shadowRootElement","themeOverride","contrastContainerRef","useContrastMode","odysseyTokens","useMemo","effectiveShadowRootElement","odysseyTheme","createOdysseyMuiTheme","customOdysseyTheme","createTheme","deepmerge","contrastModeProviderValue","jsx","ref","ContrastModeContext","Provider","value","ThemeProvider","theme","OdysseyDesignTokensContext","displayName","MemoizedOdysseyThemeProvider","exports","memo"],"sources":["../../src/OdysseyThemeProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 { ThemeOptions } from \"@mui/material\";\nimport {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport { deepmerge } from \"@mui/utils\";\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { OdysseyDesignTokensContext } from \"./OdysseyDesignTokensContext.js\";\nimport { createOdysseyMuiTheme, DesignTokensOverride } from \"./theme/index.js\";\nimport {\n ContrastMode,\n ContrastModeContext,\n useContrastMode,\n} from \"./useContrastMode.js\";\n\nconst StyledContrastContainerStyles = styled(\"div\")({\n height: \"inherit\",\n});\n\nexport type OdysseyThemeProviderProps = {\n children: ReactNode;\n contrastMode?: ContrastMode;\n designTokensOverride?: DesignTokensOverride;\n /** @deprecated Use shadowRootElement instead */\n shadowDomElement?: HTMLDivElement | HTMLElement;\n shadowRootElement?: HTMLDivElement | HTMLElement;\n themeOverride?: ThemeOptions;\n};\n\n/**\n * This function doesn't include the Emotion Cache or Translations. You should probably be using `OdysseyProvider`.\n *\n * Some teams have a need to wrap separately (SIW), but most teams will never need to use this explicitly.\n */\nconst OdysseyThemeProvider = ({\n children,\n contrastMode: explicitContrastMode,\n designTokensOverride,\n shadowDomElement,\n shadowRootElement,\n themeOverride,\n}: OdysseyThemeProviderProps) => {\n const { contrastMode, contrastContainerRef } = useContrastMode({\n contrastMode: explicitContrastMode,\n });\n\n const odysseyTokens = useMemo(\n () => ({ ...Tokens, ...designTokensOverride }),\n [designTokensOverride],\n );\n\n const effectiveShadowRootElement = shadowRootElement || shadowDomElement;\n\n const odysseyTheme = useMemo(\n () =>\n createOdysseyMuiTheme({\n contrastMode,\n odysseyTokens,\n shadowRootElement: effectiveShadowRootElement,\n }),\n [contrastMode, odysseyTokens, effectiveShadowRootElement],\n );\n\n const customOdysseyTheme = useMemo(\n () => createTheme(deepmerge(odysseyTheme, themeOverride || {})),\n [odysseyTheme, themeOverride],\n );\n\n const contrastModeProviderValue = useMemo(\n () => ({\n contrastMode,\n }),\n [contrastMode],\n );\n\n return (\n <StyledContrastContainerStyles ref={contrastContainerRef}>\n <ContrastModeContext.Provider value={contrastModeProviderValue}>\n <MuiThemeProvider theme={customOdysseyTheme}>\n <OdysseyDesignTokensContext.Provider value={odysseyTokens}>\n {children}\n </OdysseyDesignTokensContext.Provider>\n </MuiThemeProvider>\n </ContrastModeContext.Provider>\n </StyledContrastContainerStyles>\n );\n};\nOdysseyThemeProvider.displayName = \"OdysseyThemeProvider\";\n\nconst MemoizedOdysseyThemeProvider = memo(\n OdysseyThemeProvider,\n) as typeof OdysseyThemeProvider;\n\nexport { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,2BAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAI8B,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAI,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,C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0BAA0B,CAC1D,CAAC;EAED,MAAMG,kBAAkB,GAAG,IAAAJ,cAAO,EAChC,MAAM,IAAAK,mBAAW,EAAC,IAAAC,gBAAS,EAACJ,YAAY,EAAEN,aAAa,IAAI,CAAC,CAAC,CAAC,CAAC,EAC/D,CAACM,YAAY,EAAEN,aAAa,CAC9B,CAAC;EAED,MAAMW,yBAAyB,GAAG,IAAAP,cAAO,EACvC,OAAO;IACLT;EACF,CAAC,CAAC,EACF,CAACA,YAAY,CACf,CAAC;EAED,OACE,IAAAzB,WAAA,CAAA0C,GAAA,EAACtB,6BAA6B;IAACuB,GAAG,EAAEZ,oBAAqB;IAAAP,QAAA,EACvD,IAAAxB,WAAA,CAAA0C,GAAA,EAAC3C,gBAAA,CAAA6C,mBAAmB,CAACC,QAAQ;MAACC,KAAK,EAAEL,yBAA0B;MAAAjB,QAAA,EAC7D,IAAAxB,WAAA,CAAA0C,GAAA,EAAClD,OAAA,CAAAuD,aAAgB;QAACC,KAAK,EAAEV,kBAAmB;QAAAd,QAAA,EAC1C,IAAAxB,WAAA,CAAA0C,GAAA,EAAC7C,2BAAA,CAAAoD,0BAA0B,CAACJ,QAAQ;UAACC,KAAK,EAAEb,aAAc;UAAAT,QAAA,EACvDA;QAAQ,CAC0B;MAAC,CACtB;IAAC,CACS;EAAC,CACF,CAAC;AAEpC,CAAC;AACDD,oBAAoB,CAAC2B,WAAW,GAAG,sBAAsB;AAEzD,MAAMC,4BAA4B,GAAAC,OAAA,CAAA7B,oBAAA,GAAG,IAAA8B,WAAI,EACvC9B,oBACF,CAAgC","ignoreList":[]}
1
+ {"version":3,"file":"OdysseyThemeProvider.cjs","names":["_styled","_interopRequireDefault","require","_styles","_utils","Tokens","_interopRequireWildcard","_react","_OdysseyDesignTokensContext","_OdysseyThemeProviderPropsContext","_index","_useContrastMode","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledContrastContainerStyles","styled","height","OdysseyThemeProvider","children","contrastMode","contrastModeProp","designTokensOverride","designTokensOverrideProp","hasWrapperElement","shadowDomElement","shadowRootElement","shadowRootElementProp","themeOverride","themeOverrideProp","odysseyThemeProviderPropsContext","useOdysseyThemeProviderPropsContext","contrastContainerRef","useContrastMode","odysseyTokens","useMemo","odysseyTheme","createOdysseyMuiTheme","customOdysseyTheme","createTheme","deepmerge","contrastModeProviderValue","providerComponents","jsx","ContrastModeContext","Provider","value","ThemeProvider","theme","OdysseyThemeProviderPropsProvider","OdysseyDesignTokensContext","ref","MemoizedOdysseyThemeProvider","exports","memo","displayName"],"sources":["../../src/OdysseyThemeProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-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 {\n createTheme,\n ThemeProvider as MuiThemeProvider,\n} from \"@mui/material/styles\";\nimport { deepmerge } from \"@mui/utils\";\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\nimport { memo, ReactNode, useMemo } from \"react\";\n\nimport { OdysseyDesignTokensContext } from \"./OdysseyDesignTokensContext.js\";\nimport {\n type OdysseyThemeProviderContextProps,\n OdysseyThemeProviderPropsProvider,\n useOdysseyThemeProviderPropsContext,\n} from \"./OdysseyThemeProviderPropsContext.js\";\nimport { createOdysseyMuiTheme } from \"./theme/index.js\";\nimport {\n ContrastMode,\n ContrastModeContext,\n useContrastMode,\n} from \"./useContrastMode.js\";\n\nconst StyledContrastContainerStyles = styled(\"div\")({\n height: \"inherit\",\n});\n\nexport type OdysseyThemeProviderProps = OdysseyThemeProviderContextProps & {\n children: ReactNode;\n contrastMode?: ContrastMode;\n /**\n * Odyssey adds a wrapper `div` for contrast changes and height calculations. This is not necessary if you're not changing the background color or rendering into full-height element.\n */\n hasWrapperElement?: boolean;\n /** @deprecated Use shadowRootElement instead */\n shadowDomElement?: HTMLDivElement | HTMLElement;\n};\n\n/**\n * This function doesn't include the Emotion Cache or Translations. You should probably be using `OdysseyProvider`.\n *\n * Some teams have a need to wrap separately (SIW), but most teams will never need to use this explicitly.\n */\nconst OdysseyThemeProvider = ({\n children,\n contrastMode: contrastModeProp,\n designTokensOverride: designTokensOverrideProp,\n hasWrapperElement = true,\n shadowDomElement,\n shadowRootElement: shadowRootElementProp,\n themeOverride: themeOverrideProp,\n}: OdysseyThemeProviderProps) => {\n const odysseyThemeProviderPropsContext =\n useOdysseyThemeProviderPropsContext();\n\n const designTokensOverride =\n designTokensOverrideProp ??\n odysseyThemeProviderPropsContext.designTokensOverride;\n\n const shadowRootElement =\n shadowRootElementProp ??\n shadowDomElement ??\n odysseyThemeProviderPropsContext.shadowRootElement; // Adding `odysseyThemeProviderPropsContext.shadowRootElement` fixes popovers not being styled in `Surface`.\n\n const themeOverride =\n themeOverrideProp ?? odysseyThemeProviderPropsContext.themeOverride;\n\n const { contrastMode, contrastContainerRef } = useContrastMode({\n contrastMode: contrastModeProp,\n });\n\n const odysseyTokens = useMemo(\n () => ({ ...Tokens, ...designTokensOverride }),\n [designTokensOverride],\n );\n\n const odysseyTheme = useMemo(\n () =>\n createOdysseyMuiTheme({\n contrastMode,\n odysseyTokens,\n shadowRootElement,\n }),\n [contrastMode, odysseyTokens, shadowRootElement],\n );\n\n const customOdysseyTheme = useMemo(\n () => createTheme(deepmerge(odysseyTheme, themeOverride || {})),\n [odysseyTheme, themeOverride],\n );\n\n const contrastModeProviderValue = useMemo(\n () => ({\n contrastMode,\n }),\n [contrastMode],\n );\n\n const providerComponents = useMemo(\n () => (\n <ContrastModeContext.Provider value={contrastModeProviderValue}>\n <MuiThemeProvider theme={customOdysseyTheme}>\n <OdysseyThemeProviderPropsProvider\n designTokensOverride={designTokensOverride}\n shadowRootElement={shadowRootElement}\n themeOverride={themeOverride}\n >\n <OdysseyDesignTokensContext.Provider value={odysseyTokens}>\n {children}\n </OdysseyDesignTokensContext.Provider>\n </OdysseyThemeProviderPropsProvider>\n </MuiThemeProvider>\n </ContrastModeContext.Provider>\n ),\n [\n children,\n contrastModeProviderValue,\n customOdysseyTheme,\n designTokensOverride,\n odysseyTokens,\n shadowRootElement,\n themeOverride,\n ],\n );\n\n return hasWrapperElement ? (\n <StyledContrastContainerStyles ref={contrastContainerRef}>\n {providerComponents}\n </StyledContrastContainerStyles>\n ) : (\n providerComponents\n );\n};\n\nconst MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);\nMemoizedOdysseyThemeProvider.displayName = \"OdysseyThemeProvider\";\n\nexport { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };\n"],"mappings":";;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,2BAAA,GAAAN,OAAA;AACA,IAAAO,iCAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,gBAAA,GAAAT,OAAA;AAI8B,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAI,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAA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AAAgD,GAAA,EAACnD,iCAAA,CAAAyD,iCAAiC;QAChC3B,oBAAoB,EAAEA,oBAAqB;QAC3CI,iBAAiB,EAAEA,iBAAkB;QACrCE,aAAa,EAAEA,aAAc;QAAAT,QAAA,EAE7B,IAAAxB,WAAA,CAAAgD,GAAA,EAACpD,2BAAA,CAAA2D,0BAA0B,CAACL,QAAQ;UAACC,KAAK,EAAEZ,aAAc;UAAAf,QAAA,EACvDA;QAAQ,CAC0B;MAAC,CACL;IAAC,CACpB;EAAC,CACS,CAC/B,EACD,CACEA,QAAQ,EACRsB,yBAAyB,EACzBH,kBAAkB,EAClBhB,oBAAoB,EACpBY,aAAa,EACbR,iBAAiB,EACjBE,aAAa,CAEjB,CAAC;EAED,OAAOJ,iBAAiB,GACtB,IAAA7B,WAAA,CAAAgD,GAAA,EAAC5B,6BAA6B;IAACoC,GAAG,EAAEnB,oBAAqB;IAAAb,QAAA,EACtDuB;EAAkB,CACU,CAAC,GAEhCA,kBACD;AACH,CAAC;AAED,MAAMU,4BAA4B,GAAAC,OAAA,CAAAnC,oBAAA,GAAG,IAAAoC,WAAI,EAACpC,oBAAoB,CAAC;AAC/DkC,4BAA4B,CAACG,WAAW,GAAG,sBAAsB","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useOdysseyThemeProviderPropsContext = exports.OdysseyThemeProviderPropsProvider = exports.OdysseyThemeProviderPropsContext = void 0;
7
+ var _react = require("react");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ /*!
10
+ * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.
11
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
12
+ *
13
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ *
18
+ * See the License for the specific language governing permissions and limitations under the License.
19
+ */
20
+
21
+ const OdysseyThemeProviderPropsContext = exports.OdysseyThemeProviderPropsContext = (0, _react.createContext)({});
22
+ const useOdysseyThemeProviderPropsContext = () => (0, _react.useContext)(OdysseyThemeProviderPropsContext);
23
+ exports.useOdysseyThemeProviderPropsContext = useOdysseyThemeProviderPropsContext;
24
+ const OdysseyThemeProviderPropsProvider = ({
25
+ children,
26
+ designTokensOverride,
27
+ shadowRootElement,
28
+ themeOverride
29
+ }) => {
30
+ const odysseyThemeProviderPropsContext = useOdysseyThemeProviderPropsContext();
31
+ const providerValue = (0, _react.useMemo)(() => ({
32
+ ...odysseyThemeProviderPropsContext,
33
+ designTokensOverride,
34
+ shadowRootElement,
35
+ themeOverride
36
+ }), [designTokensOverride, odysseyThemeProviderPropsContext, shadowRootElement, themeOverride]);
37
+ return (0, _jsxRuntime.jsx)(OdysseyThemeProviderPropsContext.Provider, {
38
+ value: providerValue,
39
+ children: children
40
+ });
41
+ };
42
+ const MemoizedOdysseyThemeProviderPropsProvider = exports.OdysseyThemeProviderPropsProvider = (0, _react.memo)(OdysseyThemeProviderPropsProvider);
43
+ MemoizedOdysseyThemeProviderPropsProvider.displayName = "OdysseyThemeProviderPropsProvider";
44
+ //# sourceMappingURL=OdysseyThemeProviderPropsContext.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdysseyThemeProviderPropsContext.cjs","names":["_react","require","_jsxRuntime","OdysseyThemeProviderPropsContext","exports","createContext","useOdysseyThemeProviderPropsContext","useContext","OdysseyThemeProviderPropsProvider","children","designTokensOverride","shadowRootElement","themeOverride","odysseyThemeProviderPropsContext","providerValue","useMemo","jsx","Provider","value","MemoizedOdysseyThemeProviderPropsProvider","memo","displayName"],"sources":["../../src/OdysseyThemeProviderPropsContext.tsx"],"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 { ThemeOptions } from \"@mui/material\";\nimport {\n createContext,\n memo,\n type ReactNode,\n useContext,\n useMemo,\n} from \"react\";\n\nimport { DesignTokensOverride } from \"./theme/index.js\";\n\nexport type OdysseyThemeProviderContextProps = {\n designTokensOverride?: DesignTokensOverride;\n shadowRootElement?: HTMLDivElement | HTMLElement;\n themeOverride?: ThemeOptions;\n};\n\nexport const OdysseyThemeProviderPropsContext =\n createContext<OdysseyThemeProviderContextProps>({});\n\nexport const useOdysseyThemeProviderPropsContext = () =>\n useContext(OdysseyThemeProviderPropsContext);\n\nexport type OdysseyThemeProviderPropsProviderProps =\n OdysseyThemeProviderContextProps & {\n children: ReactNode;\n };\n\nconst OdysseyThemeProviderPropsProvider = ({\n children,\n designTokensOverride,\n shadowRootElement,\n themeOverride,\n}: OdysseyThemeProviderPropsProviderProps) => {\n const odysseyThemeProviderPropsContext =\n useOdysseyThemeProviderPropsContext();\n\n const providerValue = useMemo(\n () => ({\n ...odysseyThemeProviderPropsContext,\n designTokensOverride,\n shadowRootElement,\n themeOverride,\n }),\n [\n designTokensOverride,\n odysseyThemeProviderPropsContext,\n shadowRootElement,\n themeOverride,\n ],\n );\n\n return (\n <OdysseyThemeProviderPropsContext.Provider value={providerValue}>\n {children}\n </OdysseyThemeProviderPropsContext.Provider>\n );\n};\n\nconst MemoizedOdysseyThemeProviderPropsProvider = memo(\n OdysseyThemeProviderPropsProvider,\n);\nMemoizedOdysseyThemeProviderPropsProvider.displayName =\n \"OdysseyThemeProviderPropsProvider\";\n\nexport { MemoizedOdysseyThemeProviderPropsProvider as OdysseyThemeProviderPropsProvider };\n"],"mappings":";;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AAMe,IAAAC,WAAA,GAAAD,OAAA;AAnBf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBO,MAAME,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAC3C,IAAAE,oBAAa,EAAmC,CAAC,CAAC,CAAC;AAE9C,MAAMC,mCAAmC,GAAGA,CAAA,KACjD,IAAAC,iBAAU,EAACJ,gCAAgC,CAAC;AAACC,OAAA,CAAAE,mCAAA,GAAAA,mCAAA;AAO/C,MAAME,iCAAiC,GAAGA,CAAC;EACzCC,QAAQ;EACRC,oBAAoB;EACpBC,iBAAiB;EACjBC;AACsC,CAAC,KAAK;EAC5C,MAAMC,gCAAgC,GACpCP,mCAAmC,CAAC,CAAC;EAEvC,MAAMQ,aAAa,GAAG,IAAAC,cAAO,EAC3B,OAAO;IACL,GAAGF,gCAAgC;IACnCH,oBAAoB;IACpBC,iBAAiB;IACjBC;EACF,CAAC,CAAC,EACF,CACEF,oBAAoB,EACpBG,gCAAgC,EAChCF,iBAAiB,EACjBC,aAAa,CAEjB,CAAC;EAED,OACE,IAAAV,WAAA,CAAAc,GAAA,EAACb,gCAAgC,CAACc,QAAQ;IAACC,KAAK,EAAEJ,aAAc;IAAAL,QAAA,EAC7DA;EAAQ,CACgC,CAAC;AAEhD,CAAC;AAED,MAAMU,yCAAyC,GAAAf,OAAA,CAAAI,iCAAA,GAAG,IAAAY,WAAI,EACpDZ,iCACF,CAAC;AACDW,yCAAyC,CAACE,WAAW,GACnD,mCAAmC","ignoreList":[]}
@@ -7,14 +7,13 @@ exports.Pagination = void 0;
7
7
  var _InputBase2 = _interopRequireDefault(require("@mui/material/InputBase"));
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
  var _react = require("react");
10
- var _reactI18next = require("react-i18next");
11
10
  var _Box = require("../Box.cjs");
12
11
  var _index = require("../Buttons/index.cjs");
12
+ var _i18n = require("../i18n.generated/i18n.cjs");
13
13
  var _index2 = require("../icons.generated/index.cjs");
14
14
  var _OdysseyDesignTokensContext = require("../OdysseyDesignTokensContext.cjs");
15
15
  var _Typography = require("../Typography.cjs");
16
16
  var _usePagination = require("./usePagination.cjs");
17
- require("../i18n.cjs");
18
17
  var _jsxRuntime = require("react/jsx-runtime");
19
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
19
  /*!
@@ -92,7 +91,7 @@ const Pagination = ({
92
91
  const odysseyDesignTokens = (0, _OdysseyDesignTokensContext.useOdysseyDesignTokens)();
93
92
  const {
94
93
  t
95
- } = (0, _reactI18next.useTranslation)();
94
+ } = (0, _i18n.useTranslation)();
96
95
  const [page, setPage] = (0, _react.useState)(pageIndex);
97
96
  const [rowsPerPage, setRowsPerPage] = (0, _react.useState)(pageSize);
98
97
  const initialRowsPerPage = (0, _react.useRef)(pageSize);
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.cjs","names":["_styled","_interopRequireDefault","require","_react","_reactI18next","_Box","_index","_index2","_OdysseyDesignTokensContext","_Typography","_usePagination","_jsxRuntime","e","__esModule","default","PaginationContainer","styled","display","justifyContent","PaginationSegment","shouldForwardProp","prop","odysseyDesignTokens","alignItems","gap","Spacing4","Spacing2","PaginationInput","_InputBase2","borderColor","HueNeutral200","borderRadius","BorderRadiusTight","height","Spacing6","width","HueNeutral400","PalettePrimaryMain","PaginationButtonContainer","marginInlineStart","Pagination","currentPageLabel","currentPageLabelProp","currentRowsCount","hasPageInput","hasRowCountInput","hasRowCountLabel","isDisabled","isMoreDisabled","lastRow","loadMoreLabel","loadMoreLabelProp","maxPageIndex","maxPageSize","nextLabel","nextLabelProp","onPaginationChange","onPaginationChangeProp","pageIndex","pageSize","previousLabel","previousLabelProp","rowsPerPageLabel","rowsPerPageLabelProp","totalRows","variant","useOdysseyDesignTokens","t","useTranslation","page","setPage","useState","rowsPerPage","setRowsPerPage","initialRowsPerPage","useRef","useEffect","useCallback","totalRowsLabel","usePagination","handlePaginationChange","updatedPage","updatedRowsPerPage","Math","ceil","handlePageSubmit","event","key","Number","currentTarget","value","handleRowsPerPageSubmit","setPageFromEvent","min","target","max","setRowsPerPageFromEvent","handleLoadMore","current","handleNextButton","handlePreviousButton","loadMoreIsDisabled","useMemo","nextButtonDisabled","previousButtonDisabled","rowsPerPageInputProps","currentPageInputProps","jsxs","children","Box","jsx","Paragraph","color","component","disabled","inputProps","onBlur","onChange","onKeyDown","type","Button","ariaLabel","onClick","size","startIcon","ArrowLeftIcon","endIcon","ArrowRightIcon","label","MemoizedPagination","exports","memo","displayName"],"sources":["../../../src/Pagination/Pagination.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 styled from \"@emotion/styled\";\nimport { InputBase } from \"@mui/material\";\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { Box } from \"../Box.js\";\nimport { Button } from \"../Buttons/index.js\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { Paragraph } from \"../Typography.js\";\nimport { paginationTypeValues } from \"./constants.js\";\nimport { usePagination } from \"./usePagination.js\";\nimport \"../i18n.js\";\n\nconst PaginationContainer = styled(\"nav\")({\n display: \"flex\",\n justifyContent: \"space-between\",\n});\n\nconst PaginationSegment = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing4,\n \"& > div\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing2,\n },\n}));\n\nconst PaginationInput = styled(InputBase, {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n borderColor: odysseyDesignTokens.HueNeutral200,\n borderRadius: odysseyDesignTokens.BorderRadiusTight,\n height: odysseyDesignTokens.Spacing6,\n width: \"4.5714285714rem\", // This is a hardcoded value, keep as string\n \"&:hover\": {\n borderColor: odysseyDesignTokens.HueNeutral400,\n },\n \"&.Mui-focused:hover\": {\n borderColor: odysseyDesignTokens.PalettePrimaryMain,\n },\n}));\n\nconst PaginationButtonContainer = styled(\"div\")({\n \"& > *\": {\n marginInlineStart: `0 !important`,\n },\n});\n\nexport type PaginationProps = {\n /**\n * The labeled rendered for the current page index\n */\n currentPageLabel?: string;\n /**\n * The number of items currently visible on the page\n */\n currentRowsCount?: number;\n /**\n * If true, the page input will be visible and the user can directly manipulate which page\n * is visible.\n */\n hasPageInput?: boolean;\n /**\n * If true, the row count input will be visible and the user can directly manipulate how many rows\n * are visible.\n */\n hasRowCountInput?: boolean;\n /**\n * If true, the \"X - X of total X\" label will be visible\n */\n hasRowCountLabel?: boolean;\n /**\n * If true, the pagination controls will be disabled\n */\n isDisabled?: boolean;\n /**\n * If true, the next or Show More button will be disabled\n */\n isMoreDisabled?: boolean;\n /**\n * The current page last row index\n */\n lastRow?: number;\n /**\n * If the pagination is of \"loadMore\" variant, then this is the the load more label\n */\n loadMoreLabel?: string;\n /**\n * The max page\n */\n maxPageIndex?: number;\n /**\n * The max rows per page\n */\n maxPageSize?: number;\n /**\n * The label for the next control\n */\n nextLabel?: string;\n /**\n * Page index and page size setter\n */\n onPaginationChange: ({\n pageIndex,\n pageSize,\n }: {\n pageIndex: number;\n pageSize: number;\n }) => void;\n /**\n * The current page index\n */\n pageIndex: number;\n /**\n * The current page size\n */\n pageSize: number;\n /**\n * The label for the previous control\n */\n previousLabel?: string;\n /**\n * The label that shows how many results are rendered per page\n */\n rowsPerPageLabel?: string;\n /**\n * Total rows count\n */\n totalRows?: number;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n variant?: (typeof paginationTypeValues)[number];\n};\n\nconst Pagination = ({\n currentPageLabel: currentPageLabelProp,\n currentRowsCount,\n hasPageInput = true,\n hasRowCountInput = true,\n hasRowCountLabel = true,\n isDisabled,\n isMoreDisabled,\n lastRow,\n loadMoreLabel: loadMoreLabelProp,\n maxPageIndex,\n maxPageSize,\n nextLabel: nextLabelProp,\n onPaginationChange: onPaginationChangeProp,\n pageIndex,\n pageSize,\n previousLabel: previousLabelProp,\n rowsPerPageLabel: rowsPerPageLabelProp,\n totalRows,\n variant,\n}: PaginationProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const [page, setPage] = useState<number>(pageIndex);\n const [rowsPerPage, setRowsPerPage] = useState<number>(pageSize);\n const initialRowsPerPage = useRef<number>(pageSize);\n\n const currentPageLabel = currentPageLabelProp ?? t(\"pagination.page\");\n const loadMoreLabel = loadMoreLabelProp ?? t(\"pagination.loadmore\");\n const nextLabel = nextLabelProp ?? t(\"pagination.next\");\n const previousLabel = previousLabelProp ?? t(\"pagination.previous\");\n const rowsPerPageLabel = rowsPerPageLabelProp ?? t(\"pagination.rowsperpage\");\n\n useEffect(() => {\n setPage(pageIndex);\n setRowsPerPage(pageSize);\n }, [pageIndex, pageSize]);\n\n const onPaginationChange = useCallback(\n ({ pageIndex, pageSize }: { pageIndex: number; pageSize: number }) => {\n onPaginationChangeProp({ pageIndex, pageSize });\n },\n [onPaginationChangeProp],\n );\n\n const { totalRowsLabel } = usePagination({\n pageIndex,\n pageSize,\n currentRowsCount: currentRowsCount || 0,\n totalRows,\n });\n\n const handlePaginationChange = useCallback(() => {\n let updatedPage = page;\n let updatedRowsPerPage = rowsPerPage;\n\n if (totalRows) {\n const maxPageIndex = Math.ceil(totalRows / updatedRowsPerPage);\n\n // Ensure rowsPerPage does not exceed totalRows\n if (updatedRowsPerPage > totalRows) {\n updatedRowsPerPage = totalRows;\n }\n\n // Ensure page is within valid range\n if (updatedPage > maxPageIndex) {\n updatedPage = maxPageIndex;\n } else if (updatedPage < 1) {\n updatedPage = 1;\n }\n }\n\n onPaginationChange({\n pageIndex: updatedPage,\n pageSize: updatedRowsPerPage,\n });\n }, [page, rowsPerPage, onPaginationChange, totalRows]);\n\n // The following handlers use React.KeyboardEvent (rather than just KeyboardEvent) because React.KeyboardEvent\n // is generic, while plain KeyboardEvent is not. We need this generic so we can specify the HTMLInputElement,\n // which allows us to use currentTarget.value\n const handlePageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: Number(event.currentTarget.value),\n pageSize: rowsPerPage,\n });\n }\n },\n [rowsPerPage, onPaginationChange],\n );\n\n const handleRowsPerPageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: page,\n pageSize: Number(event.currentTarget.value),\n });\n }\n },\n [page, onPaginationChange],\n );\n\n const setPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageIndex\n ? Math.min(Number(event.target.value), maxPageIndex)\n : Number(event.target.value);\n\n // Ensure the value can't be less than 1\n setPage(Math.max(1, value));\n },\n [setPage, maxPageIndex],\n );\n\n const setRowsPerPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageSize\n ? Math.min(Number(event.target.value), maxPageSize)\n : Number(event.target.value);\n\n // Ensure the value can't be less than 1\n setRowsPerPage(Math.max(1, value));\n },\n [setRowsPerPage, maxPageSize],\n );\n\n const handleLoadMore = useCallback(() => {\n onPaginationChange({\n pageIndex: 1,\n pageSize: rowsPerPage + initialRowsPerPage.current,\n });\n }, [rowsPerPage, onPaginationChange]);\n\n const handleNextButton = useCallback(() => {\n onPaginationChange({ pageIndex: page + 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const handlePreviousButton = useCallback(() => {\n onPaginationChange({ pageIndex: page - 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const loadMoreIsDisabled = useMemo(() => {\n return isMoreDisabled || (totalRows ? rowsPerPage >= totalRows : false);\n }, [isMoreDisabled, rowsPerPage, totalRows]);\n\n const nextButtonDisabled = useMemo(\n () =>\n isMoreDisabled ||\n (lastRow && (totalRows ? lastRow >= totalRows : false)) ||\n isDisabled,\n [isMoreDisabled, totalRows, lastRow, isDisabled],\n );\n\n const previousButtonDisabled = useMemo(\n () => pageIndex <= 1 || isDisabled,\n [pageIndex, isDisabled],\n );\n\n const rowsPerPageInputProps = useMemo(\n () => ({\n \"aria-label\": rowsPerPageLabel,\n max: maxPageSize || totalRows,\n }),\n [maxPageSize, rowsPerPageLabel, totalRows],\n );\n\n const currentPageInputProps = useMemo(\n () => ({\n \"aria-label\": currentPageLabel,\n max: maxPageIndex,\n }),\n [currentPageLabel, maxPageIndex],\n );\n\n return variant === \"paged\" ? (\n <PaginationContainer aria-label={t(\"pagination.label\")}>\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {hasRowCountInput && (\n <Box>\n <Paragraph color=\"textSecondary\" component=\"span\">\n {rowsPerPageLabel}\n </Paragraph>\n <PaginationInput\n disabled={isDisabled}\n inputProps={rowsPerPageInputProps}\n odysseyDesignTokens={odysseyDesignTokens}\n onBlur={handlePaginationChange}\n onChange={setRowsPerPageFromEvent}\n onKeyDown={handleRowsPerPageSubmit}\n type=\"number\"\n value={rowsPerPage}\n />\n </Box>\n )}\n {hasRowCountLabel && (\n <Paragraph color=\"textSecondary\" component=\"span\">\n {totalRowsLabel}\n </Paragraph>\n )}\n </PaginationSegment>\n\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {totalRows && hasPageInput && (\n <Box>\n <Paragraph color=\"textSecondary\" component=\"span\">\n {currentPageLabel}\n </Paragraph>\n <PaginationInput\n disabled={isDisabled}\n inputProps={currentPageInputProps}\n odysseyDesignTokens={odysseyDesignTokens}\n onBlur={handlePaginationChange}\n onChange={setPageFromEvent}\n onKeyDown={handlePageSubmit}\n type=\"number\"\n value={page}\n />\n </Box>\n )}\n <PaginationButtonContainer>\n <Button\n ariaLabel={previousLabel}\n isDisabled={previousButtonDisabled}\n onClick={handlePreviousButton}\n size=\"small\"\n startIcon={<ArrowLeftIcon />}\n variant=\"floating\"\n />\n <Button\n ariaLabel={nextLabel}\n endIcon={<ArrowRightIcon />}\n isDisabled={nextButtonDisabled}\n onClick={handleNextButton}\n size=\"small\"\n variant=\"floating\"\n />\n </PaginationButtonContainer>\n </PaginationSegment>\n </PaginationContainer>\n ) : (\n <Button\n isDisabled={loadMoreIsDisabled}\n label={loadMoreLabel}\n onClick={handleLoadMore}\n variant=\"secondary\"\n />\n );\n};\n\nconst MemoizedPagination = memo(Pagination);\nMemoizedPagination.displayName = \"Pagination\";\n\nexport { MemoizedPagination as Pagination };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;AAIA,IAAAO,WAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AACAA,OAAA;AAAoB,IAAAS,WA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,IAAAtD,WAAA,CAAAmG,GAAA,EAACxG,MAAA,CAAAkH,MAAM;UACLC,SAAS,EAAEnE,SAAU;UACrBwE,OAAO,EAAE,IAAAnH,WAAA,CAAAmG,GAAA,EAACvG,OAAA,CAAAwH,cAAc,IAAE,CAAE;UAC5BhF,UAAU,EAAEwD,kBAAmB;UAC/BmB,OAAO,EAAEvB,gBAAiB;UAC1BwB,IAAI,EAAC,OAAO;UACZ1D,OAAO,EAAC;QAAU,CACnB,CAAC;MAAA,CACuB,CAAC;IAAA,CACX,CAAC;EAAA,CACD,CAAC,GAEtB,IAAAtD,WAAA,CAAAmG,GAAA,EAACxG,MAAA,CAAAkH,MAAM;IACLzE,UAAU,EAAEsD,kBAAmB;IAC/B2B,KAAK,EAAE9E,aAAc;IACrBwE,OAAO,EAAEzB,cAAe;IACxBhC,OAAO,EAAC;EAAW,CACpB,CACF;AACH,CAAC;AAED,MAAMgE,kBAAkB,GAAAC,OAAA,CAAA1F,UAAA,GAAG,IAAA2F,WAAI,EAAC3F,UAAU,CAAC;AAC3CyF,kBAAkB,CAACG,WAAW,GAAG,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Pagination.cjs","names":["_styled","_interopRequireDefault","require","_react","_Box","_index","_i18n","_index2","_OdysseyDesignTokensContext","_Typography","_usePagination","_jsxRuntime","e","__esModule","default","PaginationContainer","styled","display","justifyContent","PaginationSegment","shouldForwardProp","prop","odysseyDesignTokens","alignItems","gap","Spacing4","Spacing2","PaginationInput","_InputBase2","borderColor","HueNeutral200","borderRadius","BorderRadiusTight","height","Spacing6","width","HueNeutral400","PalettePrimaryMain","PaginationButtonContainer","marginInlineStart","Pagination","currentPageLabel","currentPageLabelProp","currentRowsCount","hasPageInput","hasRowCountInput","hasRowCountLabel","isDisabled","isMoreDisabled","lastRow","loadMoreLabel","loadMoreLabelProp","maxPageIndex","maxPageSize","nextLabel","nextLabelProp","onPaginationChange","onPaginationChangeProp","pageIndex","pageSize","previousLabel","previousLabelProp","rowsPerPageLabel","rowsPerPageLabelProp","totalRows","variant","useOdysseyDesignTokens","t","useTranslation","page","setPage","useState","rowsPerPage","setRowsPerPage","initialRowsPerPage","useRef","useEffect","useCallback","totalRowsLabel","usePagination","handlePaginationChange","updatedPage","updatedRowsPerPage","Math","ceil","handlePageSubmit","event","key","Number","currentTarget","value","handleRowsPerPageSubmit","setPageFromEvent","min","target","max","setRowsPerPageFromEvent","handleLoadMore","current","handleNextButton","handlePreviousButton","loadMoreIsDisabled","useMemo","nextButtonDisabled","previousButtonDisabled","rowsPerPageInputProps","currentPageInputProps","jsxs","children","Box","jsx","Paragraph","color","component","disabled","inputProps","onBlur","onChange","onKeyDown","type","Button","ariaLabel","onClick","size","startIcon","ArrowLeftIcon","endIcon","ArrowRightIcon","label","MemoizedPagination","exports","memo","displayName"],"sources":["../../../src/Pagination/Pagination.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 styled from \"@emotion/styled\";\nimport { InputBase } from \"@mui/material\";\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\n\nimport { Box } from \"../Box.js\";\nimport { Button } from \"../Buttons/index.js\";\nimport { useTranslation } from \"../i18n.generated/i18n.js\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../icons.generated/index.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { Paragraph } from \"../Typography.js\";\nimport { paginationTypeValues } from \"./constants.js\";\nimport { usePagination } from \"./usePagination.js\";\n\nconst PaginationContainer = styled(\"nav\")({\n display: \"flex\",\n justifyContent: \"space-between\",\n});\n\nconst PaginationSegment = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing4,\n \"& > div\": {\n display: \"flex\",\n alignItems: \"center\",\n gap: odysseyDesignTokens.Spacing2,\n },\n}));\n\nconst PaginationInput = styled(InputBase, {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{ odysseyDesignTokens: DesignTokens }>(({ odysseyDesignTokens }) => ({\n borderColor: odysseyDesignTokens.HueNeutral200,\n borderRadius: odysseyDesignTokens.BorderRadiusTight,\n height: odysseyDesignTokens.Spacing6,\n width: \"4.5714285714rem\", // This is a hardcoded value, keep as string\n \"&:hover\": {\n borderColor: odysseyDesignTokens.HueNeutral400,\n },\n \"&.Mui-focused:hover\": {\n borderColor: odysseyDesignTokens.PalettePrimaryMain,\n },\n}));\n\nconst PaginationButtonContainer = styled(\"div\")({\n \"& > *\": {\n marginInlineStart: `0 !important`,\n },\n});\n\nexport type PaginationProps = {\n /**\n * The labeled rendered for the current page index\n */\n currentPageLabel?: string;\n /**\n * The number of items currently visible on the page\n */\n currentRowsCount?: number;\n /**\n * If true, the page input will be visible and the user can directly manipulate which page\n * is visible.\n */\n hasPageInput?: boolean;\n /**\n * If true, the row count input will be visible and the user can directly manipulate how many rows\n * are visible.\n */\n hasRowCountInput?: boolean;\n /**\n * If true, the \"X - X of total X\" label will be visible\n */\n hasRowCountLabel?: boolean;\n /**\n * If true, the pagination controls will be disabled\n */\n isDisabled?: boolean;\n /**\n * If true, the next or Show More button will be disabled\n */\n isMoreDisabled?: boolean;\n /**\n * The current page last row index\n */\n lastRow?: number;\n /**\n * If the pagination is of \"loadMore\" variant, then this is the the load more label\n */\n loadMoreLabel?: string;\n /**\n * The max page\n */\n maxPageIndex?: number;\n /**\n * The max rows per page\n */\n maxPageSize?: number;\n /**\n * The label for the next control\n */\n nextLabel?: string;\n /**\n * Page index and page size setter\n */\n onPaginationChange: ({\n pageIndex,\n pageSize,\n }: {\n pageIndex: number;\n pageSize: number;\n }) => void;\n /**\n * The current page index\n */\n pageIndex: number;\n /**\n * The current page size\n */\n pageSize: number;\n /**\n * The label for the previous control\n */\n previousLabel?: string;\n /**\n * The label that shows how many results are rendered per page\n */\n rowsPerPageLabel?: string;\n /**\n * Total rows count\n */\n totalRows?: number;\n /**\n * The type of pagination controls shown. Defaults to next/prev buttons, but can be\n * set to a simple \"Load more\" button by setting to \"loadMore\".\n */\n variant?: (typeof paginationTypeValues)[number];\n};\n\nconst Pagination = ({\n currentPageLabel: currentPageLabelProp,\n currentRowsCount,\n hasPageInput = true,\n hasRowCountInput = true,\n hasRowCountLabel = true,\n isDisabled,\n isMoreDisabled,\n lastRow,\n loadMoreLabel: loadMoreLabelProp,\n maxPageIndex,\n maxPageSize,\n nextLabel: nextLabelProp,\n onPaginationChange: onPaginationChangeProp,\n pageIndex,\n pageSize,\n previousLabel: previousLabelProp,\n rowsPerPageLabel: rowsPerPageLabelProp,\n totalRows,\n variant,\n}: PaginationProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n\n const [page, setPage] = useState<number>(pageIndex);\n const [rowsPerPage, setRowsPerPage] = useState<number>(pageSize);\n const initialRowsPerPage = useRef<number>(pageSize);\n\n const currentPageLabel = currentPageLabelProp ?? t(\"pagination.page\");\n const loadMoreLabel = loadMoreLabelProp ?? t(\"pagination.loadmore\");\n const nextLabel = nextLabelProp ?? t(\"pagination.next\");\n const previousLabel = previousLabelProp ?? t(\"pagination.previous\");\n const rowsPerPageLabel = rowsPerPageLabelProp ?? t(\"pagination.rowsperpage\");\n\n useEffect(() => {\n setPage(pageIndex);\n setRowsPerPage(pageSize);\n }, [pageIndex, pageSize]);\n\n const onPaginationChange = useCallback(\n ({ pageIndex, pageSize }: { pageIndex: number; pageSize: number }) => {\n onPaginationChangeProp({ pageIndex, pageSize });\n },\n [onPaginationChangeProp],\n );\n\n const { totalRowsLabel } = usePagination({\n pageIndex,\n pageSize,\n currentRowsCount: currentRowsCount || 0,\n totalRows,\n });\n\n const handlePaginationChange = useCallback(() => {\n let updatedPage = page;\n let updatedRowsPerPage = rowsPerPage;\n\n if (totalRows) {\n const maxPageIndex = Math.ceil(totalRows / updatedRowsPerPage);\n\n // Ensure rowsPerPage does not exceed totalRows\n if (updatedRowsPerPage > totalRows) {\n updatedRowsPerPage = totalRows;\n }\n\n // Ensure page is within valid range\n if (updatedPage > maxPageIndex) {\n updatedPage = maxPageIndex;\n } else if (updatedPage < 1) {\n updatedPage = 1;\n }\n }\n\n onPaginationChange({\n pageIndex: updatedPage,\n pageSize: updatedRowsPerPage,\n });\n }, [page, rowsPerPage, onPaginationChange, totalRows]);\n\n // The following handlers use React.KeyboardEvent (rather than just KeyboardEvent) because React.KeyboardEvent\n // is generic, while plain KeyboardEvent is not. We need this generic so we can specify the HTMLInputElement,\n // which allows us to use currentTarget.value\n const handlePageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: Number(event.currentTarget.value),\n pageSize: rowsPerPage,\n });\n }\n },\n [rowsPerPage, onPaginationChange],\n );\n\n const handleRowsPerPageSubmit = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (event.key === \"Enter\") {\n onPaginationChange({\n pageIndex: page,\n pageSize: Number(event.currentTarget.value),\n });\n }\n },\n [page, onPaginationChange],\n );\n\n const setPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageIndex\n ? Math.min(Number(event.target.value), maxPageIndex)\n : Number(event.target.value);\n\n // Ensure the value can't be less than 1\n setPage(Math.max(1, value));\n },\n [setPage, maxPageIndex],\n );\n\n const setRowsPerPageFromEvent = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = maxPageSize\n ? Math.min(Number(event.target.value), maxPageSize)\n : Number(event.target.value);\n\n // Ensure the value can't be less than 1\n setRowsPerPage(Math.max(1, value));\n },\n [setRowsPerPage, maxPageSize],\n );\n\n const handleLoadMore = useCallback(() => {\n onPaginationChange({\n pageIndex: 1,\n pageSize: rowsPerPage + initialRowsPerPage.current,\n });\n }, [rowsPerPage, onPaginationChange]);\n\n const handleNextButton = useCallback(() => {\n onPaginationChange({ pageIndex: page + 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const handlePreviousButton = useCallback(() => {\n onPaginationChange({ pageIndex: page - 1, pageSize: rowsPerPage });\n }, [onPaginationChange, page, rowsPerPage]);\n\n const loadMoreIsDisabled = useMemo(() => {\n return isMoreDisabled || (totalRows ? rowsPerPage >= totalRows : false);\n }, [isMoreDisabled, rowsPerPage, totalRows]);\n\n const nextButtonDisabled = useMemo(\n () =>\n isMoreDisabled ||\n (lastRow && (totalRows ? lastRow >= totalRows : false)) ||\n isDisabled,\n [isMoreDisabled, totalRows, lastRow, isDisabled],\n );\n\n const previousButtonDisabled = useMemo(\n () => pageIndex <= 1 || isDisabled,\n [pageIndex, isDisabled],\n );\n\n const rowsPerPageInputProps = useMemo(\n () => ({\n \"aria-label\": rowsPerPageLabel,\n max: maxPageSize || totalRows,\n }),\n [maxPageSize, rowsPerPageLabel, totalRows],\n );\n\n const currentPageInputProps = useMemo(\n () => ({\n \"aria-label\": currentPageLabel,\n max: maxPageIndex,\n }),\n [currentPageLabel, maxPageIndex],\n );\n\n return variant === \"paged\" ? (\n <PaginationContainer aria-label={t(\"pagination.label\")}>\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {hasRowCountInput && (\n <Box>\n <Paragraph color=\"textSecondary\" component=\"span\">\n {rowsPerPageLabel}\n </Paragraph>\n <PaginationInput\n disabled={isDisabled}\n inputProps={rowsPerPageInputProps}\n odysseyDesignTokens={odysseyDesignTokens}\n onBlur={handlePaginationChange}\n onChange={setRowsPerPageFromEvent}\n onKeyDown={handleRowsPerPageSubmit}\n type=\"number\"\n value={rowsPerPage}\n />\n </Box>\n )}\n {hasRowCountLabel && (\n <Paragraph color=\"textSecondary\" component=\"span\">\n {totalRowsLabel}\n </Paragraph>\n )}\n </PaginationSegment>\n\n <PaginationSegment odysseyDesignTokens={odysseyDesignTokens}>\n {totalRows && hasPageInput && (\n <Box>\n <Paragraph color=\"textSecondary\" component=\"span\">\n {currentPageLabel}\n </Paragraph>\n <PaginationInput\n disabled={isDisabled}\n inputProps={currentPageInputProps}\n odysseyDesignTokens={odysseyDesignTokens}\n onBlur={handlePaginationChange}\n onChange={setPageFromEvent}\n onKeyDown={handlePageSubmit}\n type=\"number\"\n value={page}\n />\n </Box>\n )}\n <PaginationButtonContainer>\n <Button\n ariaLabel={previousLabel}\n isDisabled={previousButtonDisabled}\n onClick={handlePreviousButton}\n size=\"small\"\n startIcon={<ArrowLeftIcon />}\n variant=\"floating\"\n />\n <Button\n ariaLabel={nextLabel}\n endIcon={<ArrowRightIcon />}\n isDisabled={nextButtonDisabled}\n onClick={handleNextButton}\n size=\"small\"\n variant=\"floating\"\n />\n </PaginationButtonContainer>\n </PaginationSegment>\n </PaginationContainer>\n ) : (\n <Button\n isDisabled={loadMoreIsDisabled}\n label={loadMoreLabel}\n onClick={handleLoadMore}\n variant=\"secondary\"\n />\n );\n};\n\nconst MemoizedPagination = memo(Pagination);\nMemoizedPagination.displayName = \"Pagination\";\n\nexport { MemoizedPagination as Pagination };\n"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,2BAAA,GAAAN,OAAA;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EAACvG,OAAA,CAAAsH,aAAa,IAAE,CAAE;UAC7B5D,OAAO,EAAC;QAAU,CACnB,CAAC,EACF,IAAAtD,WAAA,CAAAmG,GAAA,EAACzG,MAAA,CAAAmH,MAAM;UACLC,SAAS,EAAEnE,SAAU;UACrBwE,OAAO,EAAE,IAAAnH,WAAA,CAAAmG,GAAA,EAACvG,OAAA,CAAAwH,cAAc,IAAE,CAAE;UAC5BhF,UAAU,EAAEwD,kBAAmB;UAC/BmB,OAAO,EAAEvB,gBAAiB;UAC1BwB,IAAI,EAAC,OAAO;UACZ1D,OAAO,EAAC;QAAU,CACnB,CAAC;MAAA,CACuB,CAAC;IAAA,CACX,CAAC;EAAA,CACD,CAAC,GAEtB,IAAAtD,WAAA,CAAAmG,GAAA,EAACzG,MAAA,CAAAmH,MAAM;IACLzE,UAAU,EAAEsD,kBAAmB;IAC/B2B,KAAK,EAAE9E,aAAc;IACrBwE,OAAO,EAAEzB,cAAe;IACxBhC,OAAO,EAAC;EAAW,CACpB,CACF;AACH,CAAC;AAED,MAAMgE,kBAAkB,GAAAC,OAAA,CAAA1F,UAAA,GAAG,IAAA2F,WAAI,EAAC3F,UAAU,CAAC;AAC3CyF,kBAAkB,CAACG,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.usePagination = void 0;
7
7
  var _react = require("react");
8
- var _reactI18next = require("react-i18next");
8
+ var _i18n = require("../i18n.generated/i18n.cjs");
9
9
  /*!
10
10
  * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
11
11
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -26,7 +26,7 @@ const usePagination = ({
26
26
  }) => {
27
27
  const {
28
28
  t
29
- } = (0, _reactI18next.useTranslation)();
29
+ } = (0, _i18n.useTranslation)();
30
30
  return (0, _react.useMemo)(() => {
31
31
  const firstRow = pageSize * (pageIndex - 1) + 1;
32
32
  const lastRow = firstRow + (currentRowsCount - 1);
@@ -1 +1 @@
1
- {"version":3,"file":"usePagination.cjs","names":["_react","require","_reactI18next","usePagination","currentRowsCount","pageIndex","pageSize","totalRows","t","useTranslation","useMemo","firstRow","lastRow","totalRowsLabel","exports"],"sources":["../../../src/Pagination/usePagination.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 { useMemo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\ntype UsePaginationType = {\n currentRowsCount: number;\n pageIndex: number;\n pageSize: number;\n totalRows?: number;\n};\n\nexport const usePagination = ({\n currentRowsCount,\n pageIndex,\n pageSize,\n totalRows,\n}: UsePaginationType) => {\n const { t } = useTranslation();\n\n return useMemo(() => {\n const firstRow = pageSize * (pageIndex - 1) + 1;\n const lastRow = firstRow + (currentRowsCount - 1);\n\n const totalRowsLabel =\n currentRowsCount === 0\n ? t(\"pagination.totalrows\", { totalRows: 0 })\n : totalRows\n ? t(\"pagination.rowswithtotal\", { firstRow, lastRow, totalRows })\n : t(\"pagination.rowswithouttotal\", { firstRow, lastRow });\n\n return {\n firstRow,\n lastRow,\n totalRowsLabel,\n };\n }, [currentRowsCount, pageIndex, pageSize, totalRows, t]);\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYO,MAAME,aAAa,GAAGA,CAAC;EAC5BC,gBAAgB;EAChBC,SAAS;EACTC,QAAQ;EACRC;AACiB,CAAC,KAAK;EACvB,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,4BAAc,EAAC,CAAC;EAE9B,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB,MAAMC,QAAQ,GAAGL,QAAQ,IAAID,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC;IAC/C,MAAMO,OAAO,GAAGD,QAAQ,IAAIP,gBAAgB,GAAG,CAAC,CAAC;IAEjD,MAAMS,cAAc,GAClBT,gBAAgB,KAAK,CAAC,GAClBI,CAAC,CAAC,sBAAsB,EAAE;MAAED,SAAS,EAAE;IAAE,CAAC,CAAC,GAC3CA,SAAS,GACPC,CAAC,CAAC,0BAA0B,EAAE;MAAEG,QAAQ;MAAEC,OAAO;MAAEL;IAAU,CAAC,CAAC,GAC/DC,CAAC,CAAC,6BAA6B,EAAE;MAAEG,QAAQ;MAAEC;IAAQ,CAAC,CAAC;IAE/D,OAAO;MACLD,QAAQ;MACRC,OAAO;MACPC;IACF,CAAC;EACH,CAAC,EAAE,CAACT,gBAAgB,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAACM,OAAA,CAAAX,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"usePagination.cjs","names":["_react","require","_i18n","usePagination","currentRowsCount","pageIndex","pageSize","totalRows","t","useTranslation","useMemo","firstRow","lastRow","totalRowsLabel","exports"],"sources":["../../../src/Pagination/usePagination.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 { useMemo } from \"react\";\n\nimport { useTranslation } from \"../i18n.generated/i18n.js\";\n\ntype UsePaginationType = {\n currentRowsCount: number;\n pageIndex: number;\n pageSize: number;\n totalRows?: number;\n};\n\nexport const usePagination = ({\n currentRowsCount,\n pageIndex,\n pageSize,\n totalRows,\n}: UsePaginationType) => {\n const { t } = useTranslation();\n\n return useMemo(() => {\n const firstRow = pageSize * (pageIndex - 1) + 1;\n const lastRow = firstRow + (currentRowsCount - 1);\n\n const totalRowsLabel =\n currentRowsCount === 0\n ? t(\"pagination.totalrows\", { totalRows: 0 })\n : totalRows\n ? t(\"pagination.rowswithtotal\", { firstRow, lastRow, totalRows })\n : t(\"pagination.rowswithouttotal\", { firstRow, lastRow });\n\n return {\n firstRow,\n lastRow,\n totalRowsLabel,\n };\n }, [currentRowsCount, pageIndex, pageSize, totalRows, t]);\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaO,MAAME,aAAa,GAAGA,CAAC;EAC5BC,gBAAgB;EAChBC,SAAS;EACTC,QAAQ;EACRC;AACiB,CAAC,KAAK;EACvB,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,oBAAc,EAAC,CAAC;EAE9B,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB,MAAMC,QAAQ,GAAGL,QAAQ,IAAID,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC;IAC/C,MAAMO,OAAO,GAAGD,QAAQ,IAAIP,gBAAgB,GAAG,CAAC,CAAC;IAEjD,MAAMS,cAAc,GAClBT,gBAAgB,KAAK,CAAC,GAClBI,CAAC,CAAC,sBAAsB,EAAE;MAAED,SAAS,EAAE;IAAE,CAAC,CAAC,GAC3CA,SAAS,GACPC,CAAC,CAAC,0BAA0B,EAAE;MAAEG,QAAQ;MAAEC,OAAO;MAAEL;IAAU,CAAC,CAAC,GAC/DC,CAAC,CAAC,6BAA6B,EAAE;MAAEG,QAAQ;MAAEC;IAAQ,CAAC,CAAC;IAE/D,OAAO;MACLD,QAAQ;MACRC,OAAO;MACPC;IACF,CAAC;EACH,CAAC,EAAE,CAACT,gBAAgB,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAACM,OAAA,CAAAX,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -8,8 +8,8 @@ var _InputBase2 = _interopRequireDefault(require("@mui/material/InputBase"));
8
8
  var _InputAdornment2 = _interopRequireDefault(require("@mui/material/InputAdornment"));
9
9
  var _IconButton2 = _interopRequireDefault(require("@mui/material/IconButton"));
10
10
  var _react = require("react");
11
- var _reactI18next = require("react-i18next");
12
11
  var _Field = require("./Field.cjs");
12
+ var _i18n = require("./i18n.generated/i18n.cjs");
13
13
  var _index = require("./icons.generated/index.cjs");
14
14
  var _inputUtils = require("./inputUtils.cjs");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
@@ -53,7 +53,7 @@ const PasswordField = (0, _react.forwardRef)(({
53
53
  }, ref) => {
54
54
  const {
55
55
  t
56
- } = (0, _reactI18next.useTranslation)();
56
+ } = (0, _i18n.useTranslation)();
57
57
  const [inputType, setInputType] = (0, _react.useState)("password");
58
58
  const togglePasswordVisibility = (0, _react.useCallback)(() => {
59
59
  setInputType(inputType => inputType === "password" ? "text" : "password");