@okta/odyssey-react-mui 1.21.2 → 1.23.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 (593) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/@types/i18next.d.js.map +1 -1
  3. package/dist/Autocomplete.js +106 -38
  4. package/dist/Autocomplete.js.map +1 -1
  5. package/dist/Callout.js +12 -24
  6. package/dist/Callout.js.map +1 -1
  7. package/dist/Checkbox.js +26 -11
  8. package/dist/Checkbox.js.map +1 -1
  9. package/dist/CheckboxGroup.js +14 -3
  10. package/dist/CheckboxGroup.js.map +1 -1
  11. package/dist/DataTable/DataTable.js +10 -2
  12. package/dist/DataTable/DataTable.js.map +1 -1
  13. package/dist/DataTable/useScrollIndication.js +9 -5
  14. package/dist/DataTable/useScrollIndication.js.map +1 -1
  15. package/dist/Field.js +3 -1
  16. package/dist/Field.js.map +1 -1
  17. package/dist/FileUploader/FileUploadIllustration.js.map +1 -0
  18. package/dist/FileUploader/FileUploadPreview.js.map +1 -0
  19. package/dist/{labs/FileUpload.js → FileUploader/FileUploader.js} +6 -5
  20. package/dist/FileUploader/FileUploader.js.map +1 -0
  21. package/dist/FileUploader/index.js +13 -0
  22. package/dist/FileUploader/index.js.map +1 -0
  23. package/dist/OdysseyCacheProvider.js +4 -3
  24. package/dist/OdysseyCacheProvider.js.map +1 -1
  25. package/dist/OdysseyProvider.js +10 -3
  26. package/dist/OdysseyProvider.js.map +1 -1
  27. package/dist/OdysseyThemeProvider.js +3 -2
  28. package/dist/OdysseyThemeProvider.js.map +1 -1
  29. package/dist/Radio.js +33 -6
  30. package/dist/Radio.js.map +1 -1
  31. package/dist/RadioGroup.js +17 -5
  32. package/dist/RadioGroup.js.map +1 -1
  33. package/dist/Select.js +89 -31
  34. package/dist/Select.js.map +1 -1
  35. package/dist/{labs/Switch.js → Switch.js} +77 -23
  36. package/dist/Switch.js.map +1 -0
  37. package/dist/Tabs.js +7 -9
  38. package/dist/Tabs.js.map +1 -1
  39. package/dist/Tag.js +102 -4
  40. package/dist/Tag.js.map +1 -1
  41. package/dist/TextField.js +16 -39
  42. package/dist/TextField.js.map +1 -1
  43. package/dist/Toast.js +2 -2
  44. package/dist/Toast.js.map +1 -1
  45. package/dist/ToastStack.js.map +1 -1
  46. package/dist/createShadowDomElements.js +43 -0
  47. package/dist/createShadowDomElements.js.map +1 -0
  48. package/dist/i18n.js +1 -1
  49. package/dist/i18n.js.map +1 -1
  50. package/dist/index.js +3 -2
  51. package/dist/index.js.map +1 -1
  52. package/dist/index.scss +96 -8
  53. package/dist/labs/AppTile.js +124 -0
  54. package/dist/labs/AppTile.js.map +1 -0
  55. package/dist/labs/DataView/BulkActionsMenu.js.map +1 -0
  56. package/dist/labs/{DataComponents/StackContent.js → DataView/CardLayoutContent.js} +14 -14
  57. package/dist/labs/DataView/CardLayoutContent.js.map +1 -0
  58. package/dist/labs/{DataComponents/StackCard.js → DataView/DataCard.js} +6 -6
  59. package/dist/labs/DataView/DataCard.js.map +1 -0
  60. package/dist/labs/{DataComponents → DataView}/DataTable.js +6 -2
  61. package/dist/labs/DataView/DataTable.js.map +1 -0
  62. package/dist/labs/{DataComponents → DataView}/DataView.js +79 -30
  63. package/dist/labs/DataView/DataView.js.map +1 -0
  64. package/dist/labs/DataView/DetailPanel.js.map +1 -0
  65. package/dist/labs/DataView/LayoutSwitcher.js.map +1 -0
  66. package/dist/labs/DataView/RowActions.js.map +1 -0
  67. package/dist/labs/{DataComponents/TableContent.js → DataView/TableLayoutContent.js} +34 -20
  68. package/dist/labs/DataView/TableLayoutContent.js.map +1 -0
  69. package/dist/labs/{DataComponents → DataView}/TableSettings.js +2 -2
  70. package/dist/labs/DataView/TableSettings.js.map +1 -0
  71. package/dist/labs/DataView/componentTypes.js.map +1 -0
  72. package/dist/labs/{DataComponents → DataView}/constants.js +2 -2
  73. package/dist/labs/DataView/constants.js.map +1 -0
  74. package/dist/labs/DataView/dataTypes.js.map +1 -0
  75. package/dist/labs/DataView/fetchData.js.map +1 -0
  76. package/dist/labs/{DataComponents → DataView}/index.js +0 -1
  77. package/dist/labs/DataView/index.js.map +1 -0
  78. package/dist/labs/DataView/tableConstants.js.map +1 -0
  79. package/dist/labs/DataView/useFilterConversion.js.map +1 -0
  80. package/dist/labs/DateField.js +2 -0
  81. package/dist/labs/DateField.js.map +1 -1
  82. package/dist/labs/DatePicker.js +5 -1
  83. package/dist/labs/DatePicker.js.map +1 -1
  84. package/dist/labs/SideNav/CollapseIcon.js +44 -0
  85. package/dist/labs/SideNav/CollapseIcon.js.map +1 -0
  86. package/dist/labs/SideNav/OktaLogo.js +36 -0
  87. package/dist/labs/SideNav/OktaLogo.js.map +1 -0
  88. package/dist/labs/SideNav/SideNav.js +335 -0
  89. package/dist/labs/SideNav/SideNav.js.map +1 -0
  90. package/dist/labs/SideNav/SideNavFooterContent.js +49 -0
  91. package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -0
  92. package/dist/labs/SideNav/SideNavHeader.js +81 -0
  93. package/dist/labs/SideNav/SideNavHeader.js.map +1 -0
  94. package/dist/labs/SideNav/SideNavItemContent.js +157 -0
  95. package/dist/labs/SideNav/SideNavItemContent.js.map +1 -0
  96. package/dist/labs/SideNav/SideNavItemLinkContent.js +71 -0
  97. package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -0
  98. package/dist/labs/SideNav/index.js +14 -0
  99. package/dist/labs/SideNav/index.js.map +1 -0
  100. package/dist/labs/SideNav/types.js +2 -0
  101. package/dist/labs/SideNav/types.js.map +1 -0
  102. package/dist/labs/TopNav.js +2 -1
  103. package/dist/labs/TopNav.js.map +1 -1
  104. package/dist/labs/index.js +3 -4
  105. package/dist/labs/index.js.map +1 -1
  106. package/dist/labs/useDateFieldsTranslations.js +1 -1
  107. package/dist/labs/useDateFieldsTranslations.js.map +1 -1
  108. package/dist/properties/ts/odyssey-react-mui.js +3 -1
  109. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  110. package/dist/properties/ts/odyssey-react-mui_cs.js +17 -3
  111. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  112. package/dist/properties/ts/odyssey-react-mui_da.js +17 -3
  113. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
  114. package/dist/properties/ts/odyssey-react-mui_de.js +16 -2
  115. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
  116. package/dist/properties/ts/odyssey-react-mui_el.js +18 -4
  117. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
  118. package/dist/properties/ts/odyssey-react-mui_es.js +17 -3
  119. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
  120. package/dist/properties/ts/odyssey-react-mui_fi.js +17 -3
  121. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  122. package/dist/properties/ts/odyssey-react-mui_fr.js +17 -3
  123. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  124. package/dist/properties/ts/odyssey-react-mui_ht.js +18 -4
  125. package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  126. package/dist/properties/ts/odyssey-react-mui_hu.js +17 -3
  127. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  128. package/dist/properties/ts/odyssey-react-mui_id.js +17 -3
  129. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
  130. package/dist/properties/ts/odyssey-react-mui_it.js +17 -3
  131. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
  132. package/dist/properties/ts/odyssey-react-mui_ja.js +16 -2
  133. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  134. package/dist/properties/ts/odyssey-react-mui_ko.js +16 -2
  135. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  136. package/dist/properties/ts/odyssey-react-mui_ms.js +17 -3
  137. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  138. package/dist/properties/ts/odyssey-react-mui_nb.js +17 -3
  139. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  140. package/dist/properties/ts/odyssey-react-mui_nl_NL.js +17 -3
  141. package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  142. package/dist/properties/ts/odyssey-react-mui_pl.js +17 -3
  143. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  144. package/dist/properties/ts/odyssey-react-mui_pt_BR.js +17 -3
  145. package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  146. package/dist/properties/ts/odyssey-react-mui_ro.js +17 -3
  147. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  148. package/dist/properties/ts/odyssey-react-mui_ru.js +17 -3
  149. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  150. package/dist/properties/ts/odyssey-react-mui_sv.js +17 -3
  151. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  152. package/dist/properties/ts/odyssey-react-mui_th.js +16 -2
  153. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
  154. package/dist/properties/ts/odyssey-react-mui_tr.js +17 -3
  155. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  156. package/dist/properties/ts/odyssey-react-mui_uk.js +17 -3
  157. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  158. package/dist/properties/ts/odyssey-react-mui_vi.js +17 -3
  159. package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  160. package/dist/properties/ts/odyssey-react-mui_zh_CN.js +16 -2
  161. package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  162. package/dist/properties/ts/odyssey-react-mui_zh_TW.js +16 -2
  163. package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  164. package/dist/src/Autocomplete.d.ts +30 -0
  165. package/dist/src/Autocomplete.d.ts.map +1 -1
  166. package/dist/src/Callout.d.ts +11 -23
  167. package/dist/src/Callout.d.ts.map +1 -1
  168. package/dist/src/Checkbox.d.ts +2 -2
  169. package/dist/src/Checkbox.d.ts.map +1 -1
  170. package/dist/src/CheckboxGroup.d.ts +3 -3
  171. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  172. package/dist/src/DataTable/DataTable.d.ts +9 -1
  173. package/dist/src/DataTable/DataTable.d.ts.map +1 -1
  174. package/dist/src/DataTable/useScrollIndication.d.ts.map +1 -1
  175. package/dist/src/Field.d.ts +3 -2
  176. package/dist/src/Field.d.ts.map +1 -1
  177. package/dist/src/FileUploader/FileUploadIllustration.d.ts.map +1 -0
  178. package/dist/src/{labs → FileUploader}/FileUploadPreview.d.ts +2 -2
  179. package/dist/src/FileUploader/FileUploadPreview.d.ts.map +1 -0
  180. package/dist/src/{labs/FileUpload.d.ts → FileUploader/FileUploader.d.ts} +5 -4
  181. package/dist/src/FileUploader/FileUploader.d.ts.map +1 -0
  182. package/dist/src/FileUploader/index.d.ts +13 -0
  183. package/dist/src/FileUploader/index.d.ts.map +1 -0
  184. package/dist/src/NativeSelect.d.ts +1 -1
  185. package/dist/src/OdysseyCacheProvider.d.ts +7 -3
  186. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
  187. package/dist/src/OdysseyProvider.d.ts +1 -1
  188. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  189. package/dist/src/OdysseyThemeProvider.d.ts +3 -1
  190. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  191. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  192. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  193. package/dist/src/PasswordField.d.ts +1 -1
  194. package/dist/src/Radio.d.ts +6 -8
  195. package/dist/src/Radio.d.ts.map +1 -1
  196. package/dist/src/RadioGroup.d.ts +4 -5
  197. package/dist/src/RadioGroup.d.ts.map +1 -1
  198. package/dist/src/SearchField.d.ts +1 -1
  199. package/dist/src/Select.d.ts +38 -2
  200. package/dist/src/Select.d.ts.map +1 -1
  201. package/dist/src/{labs/Switch.d.ts → Switch.d.ts} +8 -4
  202. package/dist/src/Switch.d.ts.map +1 -0
  203. package/dist/src/Tabs.d.ts +6 -8
  204. package/dist/src/Tabs.d.ts.map +1 -1
  205. package/dist/src/Tag.d.ts +7 -1
  206. package/dist/src/Tag.d.ts.map +1 -1
  207. package/dist/src/TextField.d.ts +17 -40
  208. package/dist/src/TextField.d.ts.map +1 -1
  209. package/dist/src/ToastStack.d.ts +2 -2
  210. package/dist/src/ToastStack.d.ts.map +1 -1
  211. package/dist/src/{createShadowRootElement.d.ts → createShadowDomElements.d.ts} +6 -1
  212. package/dist/src/createShadowDomElements.d.ts.map +1 -0
  213. package/dist/src/i18n.d.ts +2 -2
  214. package/dist/src/i18n.d.ts.map +1 -1
  215. package/dist/src/index.d.ts +3 -2
  216. package/dist/src/index.d.ts.map +1 -1
  217. package/dist/src/labs/AppTile.d.ts +39 -0
  218. package/dist/src/labs/AppTile.d.ts.map +1 -0
  219. package/dist/src/labs/DataView/BulkActionsMenu.d.ts.map +1 -0
  220. package/dist/src/labs/{DataComponents/StackContent.d.ts → DataView/CardLayoutContent.d.ts} +7 -7
  221. package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -0
  222. package/dist/src/labs/{DataComponents/StackCard.d.ts → DataView/DataCard.d.ts} +4 -4
  223. package/dist/src/labs/DataView/DataCard.d.ts.map +1 -0
  224. package/dist/src/labs/DataView/DataTable.d.ts +16 -0
  225. package/dist/src/labs/DataView/DataTable.d.ts.map +1 -0
  226. package/dist/src/labs/{DataComponents → DataView}/DataView.d.ts +1 -1
  227. package/dist/src/labs/DataView/DataView.d.ts.map +1 -0
  228. package/dist/src/labs/{DataComponents → DataView}/DetailPanel.d.ts +2 -2
  229. package/dist/src/labs/DataView/DetailPanel.d.ts.map +1 -0
  230. package/dist/src/labs/DataView/LayoutSwitcher.d.ts.map +1 -0
  231. package/dist/src/labs/DataView/RowActions.d.ts.map +1 -0
  232. package/dist/src/labs/{DataComponents/TableContent.d.ts → DataView/TableLayoutContent.d.ts} +8 -7
  233. package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -0
  234. package/dist/src/labs/{DataComponents → DataView}/TableSettings.d.ts +3 -3
  235. package/dist/src/labs/DataView/TableSettings.d.ts.map +1 -0
  236. package/dist/src/labs/{DataComponents → DataView}/componentTypes.d.ts +21 -9
  237. package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -0
  238. package/dist/src/labs/{DataComponents → DataView}/constants.d.ts +1 -1
  239. package/dist/src/labs/DataView/constants.d.ts.map +1 -0
  240. package/dist/src/labs/DataView/dataTypes.d.ts.map +1 -0
  241. package/dist/src/labs/DataView/fetchData.d.ts.map +1 -0
  242. package/dist/src/labs/{DataComponents → DataView}/index.d.ts +0 -1
  243. package/dist/src/labs/DataView/index.d.ts.map +1 -0
  244. package/dist/src/labs/DataView/tableConstants.d.ts.map +1 -0
  245. package/dist/src/labs/{DataComponents → DataView}/useFilterConversion.d.ts +2 -2
  246. package/dist/src/labs/DataView/useFilterConversion.d.ts.map +1 -0
  247. package/dist/src/labs/DateField.d.ts +2 -2
  248. package/dist/src/labs/DateField.d.ts.map +1 -1
  249. package/dist/src/labs/DatePicker.d.ts +2 -2
  250. package/dist/src/labs/DatePicker.d.ts.map +1 -1
  251. package/dist/src/labs/SideNav/CollapseIcon.d.ts +17 -0
  252. package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -0
  253. package/dist/src/labs/SideNav/OktaLogo.d.ts +14 -0
  254. package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -0
  255. package/dist/src/labs/SideNav/SideNav.d.ts +16 -0
  256. package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -0
  257. package/dist/{test-selectors/odysseyTestSelectors.js → src/labs/SideNav/SideNavFooterContent.d.ts} +6 -9
  258. package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -0
  259. package/dist/src/labs/SideNav/SideNavHeader.d.ts +16 -0
  260. package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -0
  261. package/dist/src/labs/SideNav/SideNavItemContent.d.ts +33 -0
  262. package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -0
  263. package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +16 -0
  264. package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -0
  265. package/dist/src/labs/SideNav/index.d.ts +14 -0
  266. package/dist/src/labs/SideNav/index.d.ts.map +1 -0
  267. package/dist/src/labs/{SideNav.d.ts → SideNav/types.d.ts} +54 -33
  268. package/dist/src/labs/SideNav/types.d.ts.map +1 -0
  269. package/dist/src/labs/TopNav.d.ts +1 -0
  270. package/dist/src/labs/TopNav.d.ts.map +1 -1
  271. package/dist/src/labs/index.d.ts +2 -3
  272. package/dist/src/labs/index.d.ts.map +1 -1
  273. package/dist/src/properties/ts/odyssey-react-mui.d.ts +2 -0
  274. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  275. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +15 -1
  276. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  277. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +15 -1
  278. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  279. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +15 -1
  280. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  281. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +15 -1
  282. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  283. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +15 -1
  284. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  285. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +15 -1
  286. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  287. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +15 -1
  288. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  289. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +16 -2
  290. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  291. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +15 -1
  292. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  293. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +15 -1
  294. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  295. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +15 -1
  296. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  297. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +15 -1
  298. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  299. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +15 -1
  300. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  301. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +15 -1
  302. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  303. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +15 -1
  304. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  305. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +15 -1
  306. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  307. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +15 -1
  308. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  309. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +15 -1
  310. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  311. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +15 -1
  312. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  313. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +15 -1
  314. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  315. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +15 -1
  316. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  317. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +15 -1
  318. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  319. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +15 -1
  320. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  321. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +15 -1
  322. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  323. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +15 -1
  324. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  325. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +15 -1
  326. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  327. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +15 -1
  328. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  329. package/dist/src/test-selectors/getByQuerySelector.d.ts +148 -0
  330. package/dist/src/test-selectors/getByQuerySelector.d.ts.map +1 -0
  331. package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts +14 -0
  332. package/dist/src/test-selectors/getComputedAccessibleErrorMessageText.d.ts.map +1 -0
  333. package/dist/src/test-selectors/getComputedAccessibleText.d.ts +23 -0
  334. package/dist/src/test-selectors/getComputedAccessibleText.d.ts.map +1 -0
  335. package/dist/src/test-selectors/index.d.ts +2 -2
  336. package/dist/src/test-selectors/index.d.ts.map +1 -1
  337. package/{src/test-selectors/odysseyTestSelectors.ts → dist/src/test-selectors/interpolateString.d.ts} +4 -11
  338. package/dist/src/test-selectors/interpolateString.d.ts.map +1 -0
  339. package/dist/src/test-selectors/linkedHtmlSelectors.d.ts +24 -0
  340. package/dist/src/test-selectors/linkedHtmlSelectors.d.ts.map +1 -0
  341. package/dist/src/test-selectors/queryOdysseySelector.d.ts +5755 -0
  342. package/dist/src/test-selectors/queryOdysseySelector.d.ts.map +1 -0
  343. package/dist/src/test-selectors/querySelector.d.ts +59 -3613
  344. package/dist/src/test-selectors/querySelector.d.ts.map +1 -1
  345. package/dist/src/test-selectors/sanityChecks.d.ts +18 -0
  346. package/dist/src/test-selectors/sanityChecks.d.ts.map +1 -0
  347. package/dist/src/test-selectors/testSelector.d.ts +46 -0
  348. package/dist/src/test-selectors/testSelector.d.ts.map +1 -0
  349. package/dist/src/theme/components.d.ts +3 -1
  350. package/dist/src/theme/components.d.ts.map +1 -1
  351. package/dist/src/theme/createOdysseyMuiTheme.d.ts +3 -1
  352. package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  353. package/dist/test-selectors/getByQuerySelector.js +64 -0
  354. package/dist/test-selectors/getByQuerySelector.js.map +1 -0
  355. package/dist/test-selectors/getComputedAccessibleErrorMessageText.js +25 -0
  356. package/dist/test-selectors/getComputedAccessibleErrorMessageText.js.map +1 -0
  357. package/dist/test-selectors/getComputedAccessibleText.js +24 -0
  358. package/dist/test-selectors/getComputedAccessibleText.js.map +1 -0
  359. package/dist/test-selectors/index.js +2 -2
  360. package/dist/test-selectors/index.js.map +1 -1
  361. package/dist/test-selectors/interpolateString.js +25 -0
  362. package/dist/test-selectors/interpolateString.js.map +1 -0
  363. package/dist/test-selectors/linkedHtmlSelectors.js +34 -0
  364. package/dist/test-selectors/linkedHtmlSelectors.js.map +1 -0
  365. package/dist/test-selectors/queryOdysseySelector.js +26 -0
  366. package/dist/test-selectors/queryOdysseySelector.js.map +1 -0
  367. package/dist/test-selectors/querySelector.js +82 -58
  368. package/dist/test-selectors/querySelector.js.map +1 -1
  369. package/dist/test-selectors/sanityChecks.js +33 -0
  370. package/dist/test-selectors/sanityChecks.js.map +1 -0
  371. package/dist/test-selectors/testSelector.js +2 -0
  372. package/dist/test-selectors/testSelector.js.map +1 -0
  373. package/dist/test-selectors/testSelectors.json +1 -1
  374. package/dist/theme/components.js +231 -146
  375. package/dist/theme/components.js.map +1 -1
  376. package/dist/theme/createOdysseyMuiTheme.js +3 -2
  377. package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
  378. package/dist/tsconfig.production.tsbuildinfo +1 -1
  379. package/dist/tsconfig.tsbuildinfo +1 -1
  380. package/jest.setup.js +3 -0
  381. package/package.json +5 -5
  382. package/scripts/generateTestSelectorsJson.ts +1 -1
  383. package/src/@types/i18next.d.ts +1 -1
  384. package/src/Autocomplete.tsx +140 -45
  385. package/src/Callout.tsx +13 -25
  386. package/src/Checkbox.tsx +39 -9
  387. package/src/CheckboxGroup.tsx +20 -4
  388. package/src/DataTable/DataTable.tsx +24 -1
  389. package/src/DataTable/useScrollIndication.tsx +11 -4
  390. package/src/Field.tsx +5 -2
  391. package/src/{labs → FileUploader}/FileUploadPreview.tsx +3 -3
  392. package/src/{labs/FileUpload.tsx → FileUploader/FileUploader.tsx} +7 -6
  393. package/src/FileUploader/index.ts +13 -0
  394. package/src/OdysseyCacheProvider.test.tsx +1 -0
  395. package/src/OdysseyCacheProvider.tsx +18 -4
  396. package/src/OdysseyProvider.tsx +12 -4
  397. package/src/OdysseyThemeProvider.tsx +6 -2
  398. package/src/Radio.tsx +41 -12
  399. package/src/RadioGroup.tsx +26 -7
  400. package/src/Select.tsx +116 -45
  401. package/src/{labs/Switch.tsx → Switch.tsx} +95 -41
  402. package/src/Tabs.tsx +8 -10
  403. package/src/Tag.tsx +134 -3
  404. package/src/TextField.tsx +18 -41
  405. package/src/Toast.tsx +1 -1
  406. package/src/ToastStack.tsx +2 -2
  407. package/src/createShadowDomElements.ts +53 -0
  408. package/src/i18n.ts +3 -3
  409. package/src/index.ts +7 -2
  410. package/src/labs/AppTile.tsx +200 -0
  411. package/src/labs/{DataComponents/StackContent.tsx → DataView/CardLayoutContent.tsx} +24 -19
  412. package/src/labs/{DataComponents/StackCard.tsx → DataView/DataCard.tsx} +7 -7
  413. package/src/labs/{DataComponents → DataView}/DataTable.tsx +8 -4
  414. package/src/labs/DataView/DataView.test.tsx +158 -0
  415. package/src/labs/{DataComponents → DataView}/DataView.tsx +119 -42
  416. package/src/labs/{DataComponents → DataView}/DetailPanel.tsx +2 -2
  417. package/src/labs/{DataComponents/TableContent.tsx → DataView/TableLayoutContent.tsx} +59 -27
  418. package/src/labs/{DataComponents → DataView}/TableSettings.tsx +5 -4
  419. package/src/labs/{DataComponents → DataView}/componentTypes.ts +24 -9
  420. package/src/labs/{DataComponents → DataView}/constants.tsx +2 -2
  421. package/src/labs/{DataComponents → DataView}/index.tsx +0 -1
  422. package/src/labs/{DataComponents → DataView}/useFilterConversion.ts +2 -2
  423. package/src/labs/DateField.tsx +3 -0
  424. package/src/labs/DatePicker.tsx +12 -1
  425. package/src/labs/SideNav/CollapseIcon.tsx +48 -0
  426. package/src/labs/SideNav/OktaLogo.tsx +39 -0
  427. package/src/labs/SideNav/SideNav.tsx +486 -0
  428. package/src/labs/SideNav/SideNavFooterContent.tsx +64 -0
  429. package/src/labs/SideNav/SideNavHeader.tsx +88 -0
  430. package/src/labs/SideNav/SideNavItemContent.tsx +216 -0
  431. package/src/labs/SideNav/SideNavItemLinkContent.tsx +87 -0
  432. package/src/labs/SideNav/index.ts +15 -0
  433. package/src/labs/SideNav/types.ts +152 -0
  434. package/src/labs/TopNav.tsx +3 -1
  435. package/src/labs/index.ts +3 -4
  436. package/src/labs/useDateFieldsTranslations.ts +1 -1
  437. package/src/properties/odyssey-react-mui.properties +2 -1
  438. package/src/properties/translations/odyssey-react-mui_cs.properties +15 -3
  439. package/src/properties/translations/odyssey-react-mui_da.properties +15 -3
  440. package/src/properties/translations/odyssey-react-mui_de.properties +14 -2
  441. package/src/properties/translations/odyssey-react-mui_el.properties +16 -4
  442. package/src/properties/translations/odyssey-react-mui_es.properties +15 -3
  443. package/src/properties/translations/odyssey-react-mui_fi.properties +15 -3
  444. package/src/properties/translations/odyssey-react-mui_fr.properties +15 -3
  445. package/src/properties/translations/odyssey-react-mui_ht.properties +17 -6
  446. package/src/properties/translations/odyssey-react-mui_hu.properties +15 -3
  447. package/src/properties/translations/odyssey-react-mui_id.properties +15 -3
  448. package/src/properties/translations/odyssey-react-mui_it.properties +15 -3
  449. package/src/properties/translations/odyssey-react-mui_ja.properties +14 -2
  450. package/src/properties/translations/odyssey-react-mui_ko.properties +14 -2
  451. package/src/properties/translations/odyssey-react-mui_ms.properties +15 -3
  452. package/src/properties/translations/odyssey-react-mui_nb.properties +15 -3
  453. package/src/properties/translations/odyssey-react-mui_nl_NL.properties +15 -3
  454. package/src/properties/translations/odyssey-react-mui_pl.properties +15 -3
  455. package/src/properties/translations/odyssey-react-mui_pt_BR.properties +15 -3
  456. package/src/properties/translations/odyssey-react-mui_ro.properties +15 -3
  457. package/src/properties/translations/odyssey-react-mui_ru.properties +15 -3
  458. package/src/properties/translations/odyssey-react-mui_sv.properties +15 -3
  459. package/src/properties/translations/odyssey-react-mui_th.properties +14 -2
  460. package/src/properties/translations/odyssey-react-mui_tr.properties +15 -3
  461. package/src/properties/translations/odyssey-react-mui_uk.properties +15 -3
  462. package/src/properties/translations/odyssey-react-mui_vi.properties +15 -3
  463. package/src/properties/translations/odyssey-react-mui_zh_CN.properties +14 -2
  464. package/src/properties/translations/odyssey-react-mui_zh_TW.properties +14 -2
  465. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  466. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
  467. package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
  468. package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
  469. package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
  470. package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
  471. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
  472. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
  473. package/src/properties/ts/odyssey-react-mui_ht.ts +1 -1
  474. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
  475. package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
  476. package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
  477. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
  478. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
  479. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
  480. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
  481. package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
  482. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
  483. package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
  484. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
  485. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
  486. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
  487. package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
  488. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
  489. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
  490. package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
  491. package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
  492. package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
  493. package/src/test-selectors/getByQuerySelector.ts +176 -0
  494. package/src/test-selectors/getComputedAccessibleErrorMessageText.ts +52 -0
  495. package/src/test-selectors/getComputedAccessibleText.ts +36 -0
  496. package/src/test-selectors/index.ts +2 -2
  497. package/src/test-selectors/interpolateString.ts +41 -0
  498. package/src/test-selectors/linkedHtmlSelectors.ts +73 -0
  499. package/src/test-selectors/queryOdysseySelector.ts +36 -0
  500. package/src/test-selectors/querySelector.ts +221 -170
  501. package/src/test-selectors/sanityChecks.ts +53 -0
  502. package/src/test-selectors/testSelector.ts +143 -0
  503. package/src/theme/components.tsx +238 -150
  504. package/src/theme/createOdysseyMuiTheme.ts +4 -1
  505. package/dist/createShadowRootElement.js +0 -26
  506. package/dist/createShadowRootElement.js.map +0 -1
  507. package/dist/labs/DataComponents/BulkActionsMenu.js.map +0 -1
  508. package/dist/labs/DataComponents/DataStack.js +0 -85
  509. package/dist/labs/DataComponents/DataStack.js.map +0 -1
  510. package/dist/labs/DataComponents/DataTable.js.map +0 -1
  511. package/dist/labs/DataComponents/DataView.js.map +0 -1
  512. package/dist/labs/DataComponents/DetailPanel.js.map +0 -1
  513. package/dist/labs/DataComponents/LayoutSwitcher.js.map +0 -1
  514. package/dist/labs/DataComponents/RowActions.js.map +0 -1
  515. package/dist/labs/DataComponents/StackCard.js.map +0 -1
  516. package/dist/labs/DataComponents/StackContent.js.map +0 -1
  517. package/dist/labs/DataComponents/TableContent.js.map +0 -1
  518. package/dist/labs/DataComponents/TableSettings.js.map +0 -1
  519. package/dist/labs/DataComponents/componentTypes.js.map +0 -1
  520. package/dist/labs/DataComponents/constants.js.map +0 -1
  521. package/dist/labs/DataComponents/dataTypes.js.map +0 -1
  522. package/dist/labs/DataComponents/fetchData.js.map +0 -1
  523. package/dist/labs/DataComponents/index.js.map +0 -1
  524. package/dist/labs/DataComponents/tableConstants.js.map +0 -1
  525. package/dist/labs/DataComponents/useFilterConversion.js.map +0 -1
  526. package/dist/labs/FileUpload.js.map +0 -1
  527. package/dist/labs/FileUploadIllustration.js.map +0 -1
  528. package/dist/labs/FileUploadPreview.js.map +0 -1
  529. package/dist/labs/SideNav.js +0 -478
  530. package/dist/labs/SideNav.js.map +0 -1
  531. package/dist/labs/Switch.js.map +0 -1
  532. package/dist/src/createShadowRootElement.d.ts.map +0 -1
  533. package/dist/src/labs/DataComponents/BulkActionsMenu.d.ts.map +0 -1
  534. package/dist/src/labs/DataComponents/DataStack.d.ts +0 -20
  535. package/dist/src/labs/DataComponents/DataStack.d.ts.map +0 -1
  536. package/dist/src/labs/DataComponents/DataTable.d.ts +0 -16
  537. package/dist/src/labs/DataComponents/DataTable.d.ts.map +0 -1
  538. package/dist/src/labs/DataComponents/DataView.d.ts.map +0 -1
  539. package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +0 -1
  540. package/dist/src/labs/DataComponents/LayoutSwitcher.d.ts.map +0 -1
  541. package/dist/src/labs/DataComponents/RowActions.d.ts.map +0 -1
  542. package/dist/src/labs/DataComponents/StackCard.d.ts.map +0 -1
  543. package/dist/src/labs/DataComponents/StackContent.d.ts.map +0 -1
  544. package/dist/src/labs/DataComponents/TableContent.d.ts.map +0 -1
  545. package/dist/src/labs/DataComponents/TableSettings.d.ts.map +0 -1
  546. package/dist/src/labs/DataComponents/componentTypes.d.ts.map +0 -1
  547. package/dist/src/labs/DataComponents/constants.d.ts.map +0 -1
  548. package/dist/src/labs/DataComponents/dataTypes.d.ts.map +0 -1
  549. package/dist/src/labs/DataComponents/fetchData.d.ts.map +0 -1
  550. package/dist/src/labs/DataComponents/index.d.ts.map +0 -1
  551. package/dist/src/labs/DataComponents/tableConstants.d.ts.map +0 -1
  552. package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +0 -1
  553. package/dist/src/labs/FileUpload.d.ts.map +0 -1
  554. package/dist/src/labs/FileUploadIllustration.d.ts.map +0 -1
  555. package/dist/src/labs/FileUploadPreview.d.ts.map +0 -1
  556. package/dist/src/labs/SideNav.d.ts.map +0 -1
  557. package/dist/src/labs/Switch.d.ts.map +0 -1
  558. package/dist/src/test-selectors/featureTestSelector.d.ts +0 -31
  559. package/dist/src/test-selectors/featureTestSelector.d.ts.map +0 -1
  560. package/dist/src/test-selectors/odysseyTestSelectors.d.ts +0 -120
  561. package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +0 -1
  562. package/dist/test-selectors/featureTestSelector.js +0 -2
  563. package/dist/test-selectors/featureTestSelector.js.map +0 -1
  564. package/dist/test-selectors/odysseyTestSelectors.js.map +0 -1
  565. package/src/createShadowRootElement.ts +0 -31
  566. package/src/labs/DataComponents/DataStack.tsx +0 -105
  567. package/src/labs/SideNav.tsx +0 -745
  568. package/src/test-selectors/featureTestSelector.ts +0 -41
  569. /package/dist/{labs → FileUploader}/FileUploadIllustration.js +0 -0
  570. /package/dist/{labs → FileUploader}/FileUploadPreview.js +0 -0
  571. /package/dist/labs/{DataComponents → DataView}/BulkActionsMenu.js +0 -0
  572. /package/dist/labs/{DataComponents → DataView}/DetailPanel.js +0 -0
  573. /package/dist/labs/{DataComponents → DataView}/LayoutSwitcher.js +0 -0
  574. /package/dist/labs/{DataComponents → DataView}/RowActions.js +0 -0
  575. /package/dist/labs/{DataComponents → DataView}/componentTypes.js +0 -0
  576. /package/dist/labs/{DataComponents → DataView}/dataTypes.js +0 -0
  577. /package/dist/labs/{DataComponents → DataView}/fetchData.js +0 -0
  578. /package/dist/labs/{DataComponents → DataView}/tableConstants.js +0 -0
  579. /package/dist/labs/{DataComponents → DataView}/useFilterConversion.js +0 -0
  580. /package/dist/src/{labs → FileUploader}/FileUploadIllustration.d.ts +0 -0
  581. /package/dist/src/labs/{DataComponents → DataView}/BulkActionsMenu.d.ts +0 -0
  582. /package/dist/src/labs/{DataComponents → DataView}/LayoutSwitcher.d.ts +0 -0
  583. /package/dist/src/labs/{DataComponents → DataView}/RowActions.d.ts +0 -0
  584. /package/dist/src/labs/{DataComponents → DataView}/dataTypes.d.ts +0 -0
  585. /package/dist/src/labs/{DataComponents → DataView}/fetchData.d.ts +0 -0
  586. /package/dist/src/labs/{DataComponents → DataView}/tableConstants.d.ts +0 -0
  587. /package/src/{labs → FileUploader}/FileUploadIllustration.tsx +0 -0
  588. /package/src/labs/{DataComponents → DataView}/BulkActionsMenu.tsx +0 -0
  589. /package/src/labs/{DataComponents → DataView}/LayoutSwitcher.tsx +0 -0
  590. /package/src/labs/{DataComponents → DataView}/RowActions.tsx +0 -0
  591. /package/src/labs/{DataComponents → DataView}/dataTypes.ts +0 -0
  592. /package/src/labs/{DataComponents → DataView}/fetchData.ts +0 -0
  593. /package/src/labs/{DataComponents → DataView}/tableConstants.tsx +0 -0
package/dist/Tag.js CHANGED
@@ -11,10 +11,104 @@ import _Chip from "@mui/material/Chip";
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
13
  import { memo, useCallback, useContext } from "react";
14
+ import styled from "@emotion/styled";
14
15
  import { TagListContext } from "./TagListContext.js";
15
16
  import { MuiPropsContext } from "./MuiPropsContext.js";
17
+ import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
18
+ import { CloseCircleFilledIcon } from "./icons.generated/index.js";
16
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
+ export const tagColorVariants = ["default", "info", "accentOne", "accentTwo", "accentThree", "accentFour"];
21
+ const getChipColors = (colorVariant, odysseyDesignTokens) => {
22
+ const colors = {
23
+ default: {
24
+ background: odysseyDesignTokens.HueNeutral100,
25
+ hover: odysseyDesignTokens.HueNeutral200,
26
+ active: odysseyDesignTokens.HueNeutral300,
27
+ text: odysseyDesignTokens.HueNeutral700,
28
+ border: odysseyDesignTokens.HueNeutral200,
29
+ deleteIcon: odysseyDesignTokens.HueNeutral500,
30
+ deleteIconHover: odysseyDesignTokens.HueNeutral600
31
+ },
32
+ info: {
33
+ background: odysseyDesignTokens.HueBlue100,
34
+ hover: odysseyDesignTokens.HueBlue200,
35
+ active: odysseyDesignTokens.HueBlue300,
36
+ text: odysseyDesignTokens.HueBlue700,
37
+ border: odysseyDesignTokens.HueBlue200,
38
+ deleteIcon: odysseyDesignTokens.HueBlue500,
39
+ deleteIconHover: odysseyDesignTokens.HueBlue600
40
+ },
41
+ accentOne: {
42
+ background: odysseyDesignTokens.HueAccentOne100,
43
+ hover: odysseyDesignTokens.HueAccentOne200,
44
+ active: odysseyDesignTokens.HueAccentOne300,
45
+ text: odysseyDesignTokens.HueAccentOne700,
46
+ border: odysseyDesignTokens.HueAccentOne200,
47
+ deleteIcon: odysseyDesignTokens.HueAccentOne500,
48
+ deleteIconHover: odysseyDesignTokens.HueAccentOne600
49
+ },
50
+ accentTwo: {
51
+ background: odysseyDesignTokens.HueAccentTwo100,
52
+ hover: odysseyDesignTokens.HueAccentTwo200,
53
+ active: odysseyDesignTokens.HueAccentTwo300,
54
+ text: odysseyDesignTokens.HueAccentTwo700,
55
+ border: odysseyDesignTokens.HueAccentTwo200,
56
+ deleteIcon: odysseyDesignTokens.HueAccentTwo500,
57
+ deleteIconHover: odysseyDesignTokens.HueAccentTwo600
58
+ },
59
+ accentThree: {
60
+ background: odysseyDesignTokens.HueAccentThree100,
61
+ hover: odysseyDesignTokens.HueAccentThree200,
62
+ active: odysseyDesignTokens.HueAccentThree300,
63
+ text: odysseyDesignTokens.HueAccentThree700,
64
+ border: odysseyDesignTokens.HueAccentThree200,
65
+ deleteIcon: odysseyDesignTokens.HueAccentThree500,
66
+ deleteIconHover: odysseyDesignTokens.HueAccentThree600
67
+ },
68
+ accentFour: {
69
+ background: odysseyDesignTokens.HueAccentFour100,
70
+ hover: odysseyDesignTokens.HueAccentFour200,
71
+ active: odysseyDesignTokens.HueAccentFour300,
72
+ text: odysseyDesignTokens.HueAccentFour700,
73
+ border: odysseyDesignTokens.HueAccentFour200,
74
+ deleteIcon: odysseyDesignTokens.HueAccentFour500,
75
+ deleteIconHover: odysseyDesignTokens.HueAccentFour600
76
+ }
77
+ };
78
+ return colors[colorVariant] || colors.default;
79
+ };
80
+ const StyledTag = styled(_Chip, {
81
+ shouldForwardProp: prop => !["colorVariant", "odysseyDesignTokens"].includes(prop)
82
+ })(({
83
+ colorVariant,
84
+ odysseyDesignTokens
85
+ }) => {
86
+ const colors = getChipColors(colorVariant, odysseyDesignTokens);
87
+ return {
88
+ backgroundColor: colors.background,
89
+ color: colors.text,
90
+ borderColor: colors.border,
91
+ "&.MuiChip-clickable:hover": {
92
+ backgroundColor: colors.hover
93
+ },
94
+ "&.MuiChip-clickable:active": {
95
+ backgroundColor: colors.active
96
+ },
97
+ "&.Mui-disabled": {
98
+ "& .MuiChip-deleteIcon": {
99
+ color: odysseyDesignTokens.HueNeutral300
100
+ }
101
+ },
102
+ "& .MuiChip-deleteIcon": {
103
+ color: colors.deleteIcon,
104
+ "&:hover": {
105
+ color: colors.deleteIconHover
106
+ }
107
+ }
108
+ };
109
+ });
17
110
  const Tag = ({
111
+ colorVariant = "default",
18
112
  icon,
19
113
  isDisabled,
20
114
  label,
@@ -23,22 +117,26 @@ const Tag = ({
23
117
  testId,
24
118
  translate
25
119
  }) => {
120
+ const odysseyDesignTokens = useOdysseyDesignTokens();
26
121
  const {
27
122
  chipElementType
28
123
  } = useContext(TagListContext);
29
- const renderTag = useCallback(muiProps => _jsx(_Chip, {
124
+ const renderTag = useCallback(muiProps => _jsx(StyledTag, {
30
125
  ...muiProps,
126
+ as: chipElementType,
31
127
  "aria-disabled": isDisabled,
32
- clickable: onClick ? true : false,
33
- component: chipElementType,
128
+ clickable: Boolean(onClick),
34
129
  "data-se": testId,
130
+ colorVariant: colorVariant,
131
+ odysseyDesignTokens: odysseyDesignTokens,
35
132
  disabled: isDisabled,
36
133
  icon: icon,
37
134
  label: label,
38
135
  onClick: onClick,
39
136
  onDelete: onRemove,
137
+ deleteIcon: _jsx(CloseCircleFilledIcon, {}),
40
138
  translate: translate
41
- }), [chipElementType, icon, isDisabled, label, onClick, onRemove, testId, translate]);
139
+ }), [chipElementType, icon, isDisabled, label, onClick, onRemove, testId, translate, colorVariant, odysseyDesignTokens]);
42
140
  return _jsx(MuiPropsContext.Consumer, {
43
141
  children: renderTag
44
142
  });
package/dist/Tag.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","TagListContext","MuiPropsContext","jsx","_jsx","Tag","icon","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","_Chip","clickable","component","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport { HtmlProps } from \"./HtmlProps\";\n\nexport type TagProps = {\n icon?: ReactElement;\n isDisabled?: boolean;\n /**\n * The label text for the Tag\n */\n label: string;\n /**\n * Callback fired when the Tag is clicked\n */\n onClick?: MuiChipProps[\"onClick\"];\n /**\n * Callback fired when the remove button of the Tag is clicked\n */\n onRemove?: MuiChipProps[\"onDelete\"];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Tag = ({\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const { chipElementType } = useContext(TagListContext);\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <MuiChip\n {...muiProps}\n aria-disabled={isDisabled}\n clickable={onClick ? true : false}\n component={chipElementType}\n data-se={testId}\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n ],\n );\n\n return <MuiPropsContext.Consumer>{renderTag}</MuiPropsContext.Consumer>;\n};\n\nconst MemoizedTag = memo(Tag);\nMemoizedTag.displayName = \"Tag\";\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAAC,SAC3DC,cAAc;AAAA,SACdC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoBxB,MAAMC,GAAG,GAAGA,CAAC;EACXC,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,MAAM;EACNC;AACQ,CAAC,KAAK;EACd,MAAM;IAAEC;EAAgB,CAAC,GAAGb,UAAU,CAACC,cAAc,CAAC;EAEtD,MAAMa,SAAS,GAAGf,WAAW,CAC1BgB,QAA6B,IAC5BX,IAAA,CAAAY,KAAA;IAAA,GACMD,QAAQ;IACZ,iBAAeR,UAAW;IAC1BU,SAAS,EAAER,OAAO,GAAG,IAAI,GAAG,KAAM;IAClCS,SAAS,EAAEL,eAAgB;IAC3B,WAASF,MAAO;IAChBQ,QAAQ,EAAEZ,UAAW;IACrBD,IAAI,EAAEA,IAAK;IACXE,KAAK,EAAEA,KAAM;IACbC,OAAO,EAAEA,OAAQ;IACjBW,QAAQ,EAAEV,QAAS;IACnBE,SAAS,EAAEA;EAAU,CACtB,CACF,EACD,CACEC,eAAe,EACfP,IAAI,EACJC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,SAAS,CAEb,CAAC;EAED,OAAOR,IAAA,CAACF,eAAe,CAACmB,QAAQ;IAAAC,QAAA,EAAER;EAAS,CAA2B,CAAC;AACzE,CAAC;AAED,MAAMS,WAAW,GAAGzB,IAAI,CAACO,GAAG,CAAC;AAC7BkB,WAAW,CAACC,WAAW,GAAG,KAAK;AAE/B,SAASD,WAAW,IAAIlB,GAAG"}
1
+ {"version":3,"file":"Tag.js","names":["memo","useCallback","useContext","styled","TagListContext","MuiPropsContext","useOdysseyDesignTokens","CloseCircleFilledIcon","jsx","_jsx","tagColorVariants","getChipColors","colorVariant","odysseyDesignTokens","colors","default","background","HueNeutral100","hover","HueNeutral200","active","HueNeutral300","text","HueNeutral700","border","deleteIcon","HueNeutral500","deleteIconHover","HueNeutral600","info","HueBlue100","HueBlue200","HueBlue300","HueBlue700","HueBlue500","HueBlue600","accentOne","HueAccentOne100","HueAccentOne200","HueAccentOne300","HueAccentOne700","HueAccentOne500","HueAccentOne600","accentTwo","HueAccentTwo100","HueAccentTwo200","HueAccentTwo300","HueAccentTwo700","HueAccentTwo500","HueAccentTwo600","accentThree","HueAccentThree100","HueAccentThree200","HueAccentThree300","HueAccentThree700","HueAccentThree500","HueAccentThree600","accentFour","HueAccentFour100","HueAccentFour200","HueAccentFour300","HueAccentFour700","HueAccentFour500","HueAccentFour600","StyledTag","_Chip","shouldForwardProp","prop","includes","backgroundColor","color","borderColor","Tag","icon","isDisabled","label","onClick","onRemove","testId","translate","chipElementType","renderTag","muiProps","as","clickable","Boolean","disabled","onDelete","Consumer","children","MemoizedTag","displayName"],"sources":["../src/Tag.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 { Chip as MuiChip, ChipProps as MuiChipProps } from \"@mui/material\";\nimport { memo, ReactElement, useCallback, useContext } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { TagListContext } from \"./TagListContext\";\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { CloseCircleFilledIcon } from \"./icons.generated\";\n\nexport const tagColorVariants = [\n \"default\",\n \"info\",\n \"accentOne\",\n \"accentTwo\",\n \"accentThree\",\n \"accentFour\",\n] as const;\n\ntype TagColorVariant = (typeof tagColorVariants)[number];\n\nexport type TagProps = {\n icon?: ReactElement;\n isDisabled?: boolean;\n /**\n * The label text for the Tag\n */\n label: string;\n /**\n * Callback fired when the Tag is clicked\n */\n onClick?: MuiChipProps[\"onClick\"];\n /**\n * Callback fired when the remove button of the Tag is clicked\n */\n onRemove?: MuiChipProps[\"onDelete\"];\n /**\n * Color variant of the Tag, affecting its appearance\n */\n colorVariant?: TagColorVariant;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst getChipColors = (\n colorVariant: TagColorVariant,\n odysseyDesignTokens: DesignTokens,\n) => {\n const colors = {\n default: {\n background: odysseyDesignTokens.HueNeutral100,\n hover: odysseyDesignTokens.HueNeutral200,\n active: odysseyDesignTokens.HueNeutral300,\n text: odysseyDesignTokens.HueNeutral700,\n border: odysseyDesignTokens.HueNeutral200,\n deleteIcon: odysseyDesignTokens.HueNeutral500,\n deleteIconHover: odysseyDesignTokens.HueNeutral600,\n },\n info: {\n background: odysseyDesignTokens.HueBlue100,\n hover: odysseyDesignTokens.HueBlue200,\n active: odysseyDesignTokens.HueBlue300,\n text: odysseyDesignTokens.HueBlue700,\n border: odysseyDesignTokens.HueBlue200,\n deleteIcon: odysseyDesignTokens.HueBlue500,\n deleteIconHover: odysseyDesignTokens.HueBlue600,\n },\n accentOne: {\n background: odysseyDesignTokens.HueAccentOne100,\n hover: odysseyDesignTokens.HueAccentOne200,\n active: odysseyDesignTokens.HueAccentOne300,\n text: odysseyDesignTokens.HueAccentOne700,\n border: odysseyDesignTokens.HueAccentOne200,\n deleteIcon: odysseyDesignTokens.HueAccentOne500,\n deleteIconHover: odysseyDesignTokens.HueAccentOne600,\n },\n accentTwo: {\n background: odysseyDesignTokens.HueAccentTwo100,\n hover: odysseyDesignTokens.HueAccentTwo200,\n active: odysseyDesignTokens.HueAccentTwo300,\n text: odysseyDesignTokens.HueAccentTwo700,\n border: odysseyDesignTokens.HueAccentTwo200,\n deleteIcon: odysseyDesignTokens.HueAccentTwo500,\n deleteIconHover: odysseyDesignTokens.HueAccentTwo600,\n },\n accentThree: {\n background: odysseyDesignTokens.HueAccentThree100,\n hover: odysseyDesignTokens.HueAccentThree200,\n active: odysseyDesignTokens.HueAccentThree300,\n text: odysseyDesignTokens.HueAccentThree700,\n border: odysseyDesignTokens.HueAccentThree200,\n deleteIcon: odysseyDesignTokens.HueAccentThree500,\n deleteIconHover: odysseyDesignTokens.HueAccentThree600,\n },\n accentFour: {\n background: odysseyDesignTokens.HueAccentFour100,\n hover: odysseyDesignTokens.HueAccentFour200,\n active: odysseyDesignTokens.HueAccentFour300,\n text: odysseyDesignTokens.HueAccentFour700,\n border: odysseyDesignTokens.HueAccentFour200,\n deleteIcon: odysseyDesignTokens.HueAccentFour500,\n deleteIconHover: odysseyDesignTokens.HueAccentFour600,\n },\n };\n\n return colors[colorVariant] || colors.default;\n};\n\nconst StyledTag = styled(MuiChip, {\n shouldForwardProp: (prop) =>\n ![\"colorVariant\", \"odysseyDesignTokens\"].includes(prop as string),\n})<{\n colorVariant: TagColorVariant;\n odysseyDesignTokens: DesignTokens;\n as?: React.ElementType; // Allow the 'as' prop to be forwarded\n}>(({ colorVariant, odysseyDesignTokens }) => {\n const colors = getChipColors(colorVariant, odysseyDesignTokens);\n\n return {\n backgroundColor: colors.background,\n color: colors.text,\n borderColor: colors.border,\n\n \"&.MuiChip-clickable:hover\": {\n backgroundColor: colors.hover,\n },\n\n \"&.MuiChip-clickable:active\": {\n backgroundColor: colors.active,\n },\n\n \"&.Mui-disabled\": {\n \"& .MuiChip-deleteIcon\": {\n color: odysseyDesignTokens.HueNeutral300,\n },\n },\n\n \"& .MuiChip-deleteIcon\": {\n color: colors.deleteIcon,\n\n \"&:hover\": {\n color: colors.deleteIconHover,\n },\n },\n };\n});\n\nconst Tag = ({\n colorVariant = \"default\",\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n}: TagProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { chipElementType } = useContext(TagListContext);\n\n const renderTag = useCallback(\n (muiProps: MuiPropsContextType) => (\n <StyledTag\n {...muiProps}\n as={chipElementType}\n aria-disabled={isDisabled}\n clickable={Boolean(onClick)}\n data-se={testId}\n colorVariant={colorVariant}\n odysseyDesignTokens={odysseyDesignTokens}\n disabled={isDisabled}\n icon={icon}\n label={label}\n onClick={onClick}\n onDelete={onRemove}\n deleteIcon={<CloseCircleFilledIcon />}\n translate={translate}\n />\n ),\n [\n chipElementType,\n icon,\n isDisabled,\n label,\n onClick,\n onRemove,\n testId,\n translate,\n colorVariant,\n odysseyDesignTokens,\n ],\n );\n\n return <MuiPropsContext.Consumer>{renderTag}</MuiPropsContext.Consumer>;\n};\n\nconst MemoizedTag = memo(Tag);\nMemoizedTag.displayName = \"Tag\";\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,WAAW,EAAEC,UAAU,QAAQ,OAAO;AACnE,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAC5BC,cAAc;AAAA,SACdC,eAAe;AAAA,SAItBC,sBAAsB;AAAA,SAEfC,qBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE9B,OAAO,MAAMC,gBAAgB,GAAG,CAC9B,SAAS,EACT,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,YAAY,CACJ;AAyBV,MAAMC,aAAa,GAAGA,CACpBC,YAA6B,EAC7BC,mBAAiC,KAC9B;EACH,MAAMC,MAAM,GAAG;IACbC,OAAO,EAAE;MACPC,UAAU,EAAEH,mBAAmB,CAACI,aAAa;MAC7CC,KAAK,EAAEL,mBAAmB,CAACM,aAAa;MACxCC,MAAM,EAAEP,mBAAmB,CAACQ,aAAa;MACzCC,IAAI,EAAET,mBAAmB,CAACU,aAAa;MACvCC,MAAM,EAAEX,mBAAmB,CAACM,aAAa;MACzCM,UAAU,EAAEZ,mBAAmB,CAACa,aAAa;MAC7CC,eAAe,EAAEd,mBAAmB,CAACe;IACvC,CAAC;IACDC,IAAI,EAAE;MACJb,UAAU,EAAEH,mBAAmB,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ED
@@ -16,52 +16,29 @@ import { forwardRef, memo, useCallback, useImperativeHandle, useRef } from "reac
16
16
  import { Field } from "./Field.js";
17
17
  import { useInputValues, getControlState } from "./inputUtils.js";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
- export const TextFieldTestSelectors = {
20
- feature: {
21
- description: {
22
- selector: {
23
- method: "ByText",
24
- templateVariableNames: ["hint"],
25
- text: "${hint}"
26
- }
27
- },
28
- errorMessage: {
29
- selector: {
30
- method: "ByText",
31
- templateVariableNames: ["errorMessage"],
32
- text: "${errorMessage}"
33
- }
34
- },
35
- input: {
36
- selector: {
37
- method: "ByRole",
38
- options: {
39
- name: "${label}"
40
- },
41
- role: "textbox",
42
- templateVariableNames: ["label"]
43
- }
44
- },
45
- label: {
46
- selector: {
47
- method: "ByRole",
48
- options: {
49
- name: "${label}"
50
- },
51
- role: "LabelText",
52
- templateVariableNames: ["label"]
53
- }
54
- },
19
+ export const TextFieldTestSelector = {
20
+ accessibleText: {
21
+ errorMessage: "errorMessage",
22
+ hint: "description",
23
+ label: "label"
24
+ },
25
+ children: {
55
26
  link: {
56
- selector: {
27
+ elementSelector: {
57
28
  method: "ByRole",
58
29
  options: {
59
- name: "${label}"
30
+ label: "name"
60
31
  },
61
- templateVariableNames: ["label"],
62
32
  role: "link"
63
33
  }
64
34
  }
35
+ },
36
+ elementSelector: {
37
+ method: "ByRole",
38
+ options: {
39
+ label: "name"
40
+ },
41
+ role: "textbox"
65
42
  }
66
43
  };
67
44
  export const textFieldTypeValues = ["email", "number", "tel", "text", "url"];
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","Field","useInputValues","getControlState","jsx","_jsx","TextFieldTestSelectors","feature","description","selector","method","templateVariableNames","text","errorMessage","input","options","name","role","label","link","textFieldTypeValues","TextField","ariaDescribedBy","autoCompleteType","defaultValue","hasInitialFocus","endAdornment","errorMessageList","hint","HintLinkComponent","id","idOverride","inputRef","inputMode","isDisabled","isFullWidth","isMultiline","isOptional","isReadOnly","nameOverride","onBlur","onChange","onChangeProp","onFocus","placeholder","startAdornment","testId","translate","type","value","ref","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","localInputRef","focus","event","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","autoComplete","autoFocus","_InputAdornment","position","children","inputProps","multiline","readOnly","required","fieldType","hasVisibleLabel","MemoizedTextField","displayName"],"sources":["../src/TextField.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 {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport { InputAdornment, InputBase } from \"@mui/material\";\n\nimport {\n FieldComponentProps,\n FieldComponentRenderProps,\n} from \"./FieldComponentProps\";\nimport { Field } from \"./Field\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle, useInputValues, getControlState } from \"./inputUtils\";\nimport { type FeatureTestSelector } from \"./test-selectors\";\n\nexport const TextFieldTestSelectors = {\n feature: {\n description: {\n selector: {\n method: \"ByText\",\n templateVariableNames: [\"hint\"],\n text: \"${hint}\",\n },\n },\n errorMessage: {\n selector: {\n method: \"ByText\",\n templateVariableNames: [\"errorMessage\"],\n text: \"${errorMessage}\",\n },\n },\n input: {\n selector: {\n method: \"ByRole\",\n options: {\n name: \"${label}\",\n },\n role: \"textbox\",\n templateVariableNames: [\"label\"],\n },\n },\n label: {\n selector: {\n method: \"ByRole\",\n options: {\n name: \"${label}\",\n },\n role: \"LabelText\",\n templateVariableNames: [\"label\"],\n },\n },\n link: {\n selector: {\n method: \"ByRole\",\n options: {\n name: \"${label}\",\n },\n templateVariableNames: [\"label\"],\n role: \"link\",\n },\n },\n },\n} as const satisfies FeatureTestSelector;\n\nexport const textFieldTypeValues = [\n \"email\",\n \"number\",\n \"tel\",\n \"text\",\n \"url\",\n] as const;\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: string;\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: string | ReactElement;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * The ref forwarded to the TextField\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents\n * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute\n */\n inputMode?: InputHTMLAttributes<HTMLInputElement>[\"inputMode\"];\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: string | ReactElement;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: (typeof textFieldTypeValues)[number];\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n} & FieldComponentProps &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\ntype FieldRenderProps = Partial<\n Pick<FieldComponentRenderProps, \"ariaDescribedBy\" | \"errorMessageElementId\">\n> &\n Pick<FieldComponentRenderProps, \"id\" | \"labelElementId\">;\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n hasInitialFocus,\n endAdornment,\n errorMessage,\n errorMessageList,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputRef,\n inputMode,\n isDisabled = false,\n isFullWidth = false,\n isMultiline = false,\n isOptional = false,\n isReadOnly,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n placeholder,\n startAdornment,\n testId,\n translate,\n type = \"text\",\n value: value,\n },\n ref,\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const localInputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(\n inputRef,\n () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n },\n [],\n );\n\n const onChange = useCallback<\n NonNullable<ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp],\n );\n\n const renderFieldComponent = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n }: FieldRenderProps) => (\n <InputBase\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n endAdornment={\n endAdornment && (\n <InputAdornment position=\"end\" translate={translate}>\n {endAdornment}\n </InputAdornment>\n )\n }\n id={id}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n inputMode,\n }}\n inputRef={localInputRef}\n multiline={isMultiline}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n startAdornment={\n startAdornment && (\n <InputAdornment position=\"start\" translate={translate}>\n {startAdornment}\n </InputAdornment>\n )\n }\n type={type}\n translate={translate}\n />\n ),\n [\n autoCompleteType,\n inputValues,\n hasInitialFocus,\n endAdornment,\n inputMode,\n isMultiline,\n nameOverride,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n isOptional,\n isReadOnly,\n ref,\n startAdornment,\n testId,\n translate,\n type,\n ],\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n },\n);\n\nconst MemoizedTextField = memo(TextField);\nMemoizedTextField.displayName = \"TextField\";\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,UAAU,EAEVC,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,MAAM,QACD,OAAO;AAAC,SAONC,KAAK;AAAA,SAEQC,cAAc,EAAEC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGrD,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,OAAO,EAAE;IACPC,WAAW,EAAE;MACXC,QAAQ,EAAE;QACRC,MAAM,E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AqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMe,iBAAiB,GAAG9E,IAAI,CAACwB,SAAS,CAAC;AACzCsD,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAItD,SAAS"}
1
+ {"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","useImperativeHandle","useRef","Field","useInputValues","getControlState","jsx","_jsx","TextFieldTestSelector","accessibleText","errorMessage","hint","label","children","link","elementSelector","method","options","role","textFieldTypeValues","TextField","ariaDescribedBy","autoCompleteType","defaultValue","hasInitialFocus","endAdornment","errorMessageList","HintLinkComponent","id","idOverride","inputRef","inputMode","isDisabled","isFullWidth","isMultiline","isOptional","isReadOnly","name","nameOverride","onBlur","onChange","onChangeProp","onFocus","placeholder","startAdornment","testId","translate","type","value","ref","controlledStateRef","controlledValue","uncontrolledValue","inputValues","controlState","current","localInputRef","focus","event","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","autoComplete","autoFocus","_InputAdornment","position","inputProps","multiline","readOnly","required","fieldType","hasVisibleLabel","MemoizedTextField","displayName"],"sources":["../src/TextField.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 {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport { InputAdornment, InputBase } from \"@mui/material\";\n\nimport {\n FieldComponentProps,\n FieldComponentRenderProps,\n} from \"./FieldComponentProps\";\nimport { Field } from \"./Field\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle, useInputValues, getControlState } from \"./inputUtils\";\nimport { type TestSelector } from \"./test-selectors\";\n\nexport const TextFieldTestSelector = {\n accessibleText: {\n errorMessage: \"errorMessage\",\n hint: \"description\",\n label: \"label\",\n },\n children: {\n link: {\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"link\",\n },\n },\n },\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"textbox\",\n },\n} as const satisfies TestSelector;\n\nexport const textFieldTypeValues = [\n \"email\",\n \"number\",\n \"tel\",\n \"text\",\n \"url\",\n] as const;\n\nexport type TextFieldProps = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: string;\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: string | ReactElement;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * The ref forwarded to the TextField\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents\n * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute\n */\n inputMode?: InputHTMLAttributes<HTMLInputElement>[\"inputMode\"];\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * Callback fired when the `input` element loses focus.\n */\n onBlur?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * Callback fired when the value is changed.\n */\n onChange?: ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;\n /**\n * Callback fired when the `input` element get focus.\n */\n onFocus?: FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment?: string | ReactElement;\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type?: (typeof textFieldTypeValues)[number];\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n} & FieldComponentProps &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\ntype FieldRenderProps = Partial<\n Pick<FieldComponentRenderProps, \"ariaDescribedBy\" | \"errorMessageElementId\">\n> &\n Pick<FieldComponentRenderProps, \"id\" | \"labelElementId\">;\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n hasInitialFocus,\n endAdornment,\n errorMessage,\n errorMessageList,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputRef,\n inputMode,\n isDisabled = false,\n isFullWidth = false,\n isMultiline = false,\n isOptional = false,\n isReadOnly,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n placeholder,\n startAdornment,\n testId,\n translate,\n type = \"text\",\n value: value,\n },\n ref,\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const localInputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(\n inputRef,\n () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n },\n [],\n );\n\n const onChange = useCallback<\n NonNullable<ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>>\n >(\n (event) => {\n onChangeProp?.(event);\n },\n [onChangeProp],\n );\n\n const renderFieldComponent = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n }: FieldRenderProps) => (\n <InputBase\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n endAdornment={\n endAdornment && (\n <InputAdornment position=\"end\" translate={translate}>\n {endAdornment}\n </InputAdornment>\n )\n }\n id={id}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n inputMode,\n }}\n inputRef={localInputRef}\n multiline={isMultiline}\n name={nameOverride ?? id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n required={!isOptional}\n startAdornment={\n startAdornment && (\n <InputAdornment position=\"start\" translate={translate}>\n {startAdornment}\n </InputAdornment>\n )\n }\n type={type}\n translate={translate}\n />\n ),\n [\n autoCompleteType,\n inputValues,\n hasInitialFocus,\n endAdornment,\n inputMode,\n isMultiline,\n nameOverride,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n isOptional,\n isReadOnly,\n ref,\n startAdornment,\n testId,\n translate,\n type,\n ],\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n },\n);\n\nconst MemoizedTextField = memo(TextField);\nMemoizedTextField.displayName = \"TextField\";\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAGEA,UAAU,EAEVC,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,MAAM,QACD,OAAO;AAAC,SAONC,KAAK;AA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AAW,EAAEA,WAAY;IACzB0B,QAAQ,EAAEjC,UAAW;IACrBa,GAAG,EAAEA,GAAI;IACTqB,QAAQ,EAAE,CAACnC,UAAW;IACtBS,cAAc,EACZA,cAAc,IACZrC,IAAA,CAAA0D,eAAA;MAAgBC,QAAQ,EAAC,OAAO;MAACpB,SAAS,EAAEA,SAAU;MAAAjC,QAAA,EACnD+B;IAAc,CACD,CAEnB;IACDG,IAAI,EAAEA,IAAK;IACXD,SAAS,EAAEA;EAAU,CACtB,CACF,EACD,CACExB,gBAAgB,EAChB+B,WAAW,EACX7B,eAAe,EACfC,YAAY,EACZM,SAAS,EACTG,WAAW,EACXI,YAAY,EACZC,MAAM,EACNC,QAAQ,EACRE,OAAO,EACPC,WAAW,EACXR,UAAU,EACVC,UAAU,EACVa,GAAG,EACHL,cAAc,EACdC,MAAM,EACNC,SAAS,EACTC,IAAI,CAER,CAAC;EAED,OACExC,IAAA,CAACJ,KAAK;IACJkB,eAAe,EAAEA,eAAgB;IACjCX,YAAY,EAAEA,YAAa;IAC3BgB,gBAAgB,EAAEA,gBAAiB;IACnC6C,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACf7D,IAAI,EAAEA,IAAK;IACXgB,iBAAiB,EAAEA,iBAAkB;IACrCC,EAAE,EAAEC,UAAW;IACfG,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBE,UAAU,EAAEA,UAAW;IACvBvB,KAAK,EAAEA,KAAM;IACb+C,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMc,iBAAiB,GAAG1E,IAAI,CAACqB,SAAS,CAAC;AACzCqD,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIrD,SAAS"}
package/dist/Toast.js CHANGED
@@ -72,9 +72,9 @@ const Toast = ({
72
72
  variant: "toast",
73
73
  children: [_jsxs(_AlertTitle, {
74
74
  translate: translate,
75
- children: [_jsx(ScreenReaderText, {
75
+ children: [_jsxs(ScreenReaderText, {
76
76
  translate: translate,
77
- children: t(`severity.${severity}:`)
77
+ children: [t(`severity.${severity}`), ":"]
78
78
  }), text]
79
79
  }), linkUrl && _jsx(Link, {
80
80
  href: linkUrl,
package/dist/Toast.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","names":["useEffect","memo","useState","useCallback","useTranslation","Button","CloseIcon","Link","ScreenReaderText","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","toastRoleValues","toastSeverityValues","ClickAwayListenerProps","onClickAway","Toast","autoHideDuration","isDismissable","linkText","linkUrl","isVisible","isVisibleProp","onHide","onHideProp","role","severity","testId","text","translate","t","setIsVisible","children","_Snackbar","open","undefined","onClose","className","_Alert","action","ariaLabel","onClick","size","startIcon","variant","_AlertTitle","href","MemoizedToast","displayName"],"sources":["../src/Toast.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 { useEffect, memo, useState, useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Alert, AlertTitle, Snackbar } from \"@mui/material\";\n\nimport { Button } from \"./Button\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { CloseIcon } from \"./icons.generated\";\nimport { Link } from \"./Link\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\n\nexport const toastRoleValues = [\"status\", \"alert\"] as const;\nexport const toastSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type ToastProps = {\n /**\n * If set, this determines how long the Toast should appear before automatically disappearing in milliseconds.\n * It will only take effect if the Toast is not dismissible.\n * If left blank, it defaults to 6000.\n */\n autoHideDuration?: number;\n /**\n * If `true`, the Toast will include a close button.\n */\n isDismissable?: boolean;\n /**\n * If true, the Toast is visible\n */\n isVisible?: boolean;\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n /**\n * If defined, the Toast will include a link to the URL\n */\n linkUrl?: string;\n /**\n * An optional function to run when the Toast is closed.\n */\n onHide?: () => void;\n /**\n * Sets the ARIA role of the Toast\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof toastRoleValues)[number];\n /**\n * Determine the color and icon of the Toast\n */\n severity: (typeof toastSeverityValues)[number];\n /**\n * The text content of the Toast\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst ClickAwayListenerProps = { onClickAway: () => false };\n\nconst Toast = ({\n autoHideDuration = 6000,\n isDismissable,\n linkText,\n linkUrl,\n isVisible: isVisibleProp,\n onHide: onHideProp,\n role,\n severity,\n testId,\n text,\n translate,\n}: ToastProps) => {\n const { t } = useTranslation();\n const [isVisible, setIsVisible] = useState(isVisibleProp);\n\n useEffect(() => {\n setIsVisible(isVisibleProp);\n }, [isVisibleProp]);\n\n const onHide = useCallback(() => {\n setIsVisible(false);\n onHideProp?.();\n }, [onHideProp]);\n\n return (\n <>\n <Snackbar\n open={isVisible}\n autoHideDuration={\n isDismissable || autoHideDuration <= 0 ? undefined : autoHideDuration\n }\n onClose={onHide}\n className=\"Toast\"\n ClickAwayListenerProps={ClickAwayListenerProps}\n >\n <Alert\n action={\n isDismissable === true && (\n <Button\n ariaLabel={t(\"close.text\")}\n onClick={onHide}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n )\n }\n data-se={testId}\n role={role}\n severity={severity}\n variant=\"toast\"\n >\n <AlertTitle translate={translate}>\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}:`)}\n </ScreenReaderText>\n {text}\n </AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\" translate={translate}>\n {linkText}\n </Link>\n )}\n </Alert>\n </Snackbar>\n </>\n );\n};\n\nconst MemoizedToast = memo(Toast);\nMemoizedToast.displayName = \"Toast\";\n\nexport { MemoizedToast as Toast };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAAC,SAGtCC,MAAM;AAAA,SAENC,SAAS;AAAA,SACTC,IAAI;AAAA,SACJC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEzB,OAAO,MAAMC,eAAe,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC3D,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACC;AA+CV,MAAMC,sBAAsB,GAAG;EAAEC,WAAW,EAAEA,CAAA,KAAM;AAAM,CAAC;AAE3D,MAAMC,KAAK,GAAGA,CAAC;EACbC,gBAAgB,GAAG,IAAI;EACvBC,aAAa;EACbC,QAAQ;EACRC,OAAO;EACPC,SAAS,EAAEC,aAAa;EACxBC,MAAM,EAAEC,UAAU;EAClBC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC,IAAI;EACJC;AACU,CAAC,KAAK;EAChB,MAAM;IAAEC;EAAE,CAAC,GAAG7B,cAAc,CAAC,CAAC;EAC9B,MAAM,CAACoB,SAAS,EAAEU,YAAY,CAAC,GAAGhC,QAAQ,CAACuB,aAAa,CAAC;EAEzDzB,SAAS,CAAC,MAAM;IACdkC,YAAY,CAACT,aAAa,CAAC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Db;QAAQ,CACL,CACP;MAAA,CACI;IAAC,CACA;EAAC,CACX,CAAC;AAEP,CAAC;AAED,MAAM4B,aAAa,GAAGjD,IAAI,CAACkB,KAAK,CAAC;AACjC+B,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI/B,KAAK"}
1
+ {"version":3,"file":"Toast.js","names":["useEffect","memo","useState","useCallback","useTranslation","Button","CloseIcon","Link","ScreenReaderText","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","toastRoleValues","toastSeverityValues","ClickAwayListenerProps","onClickAway","Toast","autoHideDuration","isDismissable","linkText","linkUrl","isVisible","isVisibleProp","onHide","onHideProp","role","severity","testId","text","translate","t","setIsVisible","children","_Snackbar","open","undefined","onClose","className","_Alert","action","ariaLabel","onClick","size","startIcon","variant","_AlertTitle","href","MemoizedToast","displayName"],"sources":["../src/Toast.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 { useEffect, memo, useState, useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Alert, AlertTitle, Snackbar } from \"@mui/material\";\n\nimport { Button } from \"./Button\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { CloseIcon } from \"./icons.generated\";\nimport { Link } from \"./Link\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\n\nexport const toastRoleValues = [\"status\", \"alert\"] as const;\nexport const toastSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type ToastProps = {\n /**\n * If set, this determines how long the Toast should appear before automatically disappearing in milliseconds.\n * It will only take effect if the Toast is not dismissible.\n * If left blank, it defaults to 6000.\n */\n autoHideDuration?: number;\n /**\n * If `true`, the Toast will include a close button.\n */\n isDismissable?: boolean;\n /**\n * If true, the Toast is visible\n */\n isVisible?: boolean;\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n /**\n * If defined, the Toast will include a link to the URL\n */\n linkUrl?: string;\n /**\n * An optional function to run when the Toast is closed.\n */\n onHide?: () => void;\n /**\n * Sets the ARIA role of the Toast\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof toastRoleValues)[number];\n /**\n * Determine the color and icon of the Toast\n */\n severity: (typeof toastSeverityValues)[number];\n /**\n * The text content of the Toast\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst ClickAwayListenerProps = { onClickAway: () => false };\n\nconst Toast = ({\n autoHideDuration = 6000,\n isDismissable,\n linkText,\n linkUrl,\n isVisible: isVisibleProp,\n onHide: onHideProp,\n role,\n severity,\n testId,\n text,\n translate,\n}: ToastProps) => {\n const { t } = useTranslation();\n const [isVisible, setIsVisible] = useState(isVisibleProp);\n\n useEffect(() => {\n setIsVisible(isVisibleProp);\n }, [isVisibleProp]);\n\n const onHide = useCallback(() => {\n setIsVisible(false);\n onHideProp?.();\n }, [onHideProp]);\n\n return (\n <>\n <Snackbar\n open={isVisible}\n autoHideDuration={\n isDismissable || autoHideDuration <= 0 ? undefined : autoHideDuration\n }\n onClose={onHide}\n className=\"Toast\"\n ClickAwayListenerProps={ClickAwayListenerProps}\n >\n <Alert\n action={\n isDismissable === true && (\n <Button\n ariaLabel={t(\"close.text\")}\n onClick={onHide}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n )\n }\n data-se={testId}\n role={role}\n severity={severity}\n variant=\"toast\"\n >\n <AlertTitle translate={translate}>\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}`)}:\n </ScreenReaderText>\n {text}\n </AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\" translate={translate}>\n {linkText}\n </Link>\n )}\n </Alert>\n </Snackbar>\n </>\n );\n};\n\nconst MemoizedToast = memo(Toast);\nMemoizedToast.displayName = \"Toast\";\n\nexport { MemoizedToast as Toast };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAAC,SAGtCC,MAAM;AAAA,SAENC,SAAS;AAAA,SACTC,IAAI;AAAA,SACJC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEzB,OAAO,MAAMC,eAAe,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC3D,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACC;AA+CV,MAAMC,sBAAsB,GAAG;EAAEC,WAAW,EAAEA,CAAA,KAAM;AAAM,CAAC;AAE3D,MAAMC,KAAK,GAAGA,CAAC;EACbC,gBAAgB,GAAG,IAAI;EACvBC,aAAa;EACbC,QAAQ;EACRC,OAAO;EACPC,SAAS,EAAEC,aAAa;EACxBC,MAAM,EAAEC,UAAU;EAClBC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC,IAAI;EACJC;AACU,CAAC,KAAK;EAChB,MAAM;IAAEC;EAAE,CAAC,GAAG7B,cAAc,CAAC,CAAC;EAC9B,MAAM,CAACoB,SAAS,EAAEU,YAAY,CAAC,GAAGhC,QAAQ,CAACuB,aAAa,CAAC;EAEzDzB,SAAS,CAAC,MAAM;IACdkC,YAAY,CAACT,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S,EAAEA,SAAU;UAAAG,QAAA,EAC5Db;QAAQ,CACL,CACP;MAAA,CACI;IAAC,CACA;EAAC,CACX,CAAC;AAEP,CAAC;AAED,MAAM4B,aAAa,GAAGjD,IAAI,CAACkB,KAAK,CAAC;AACjC+B,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI/B,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToastStack.js","names":["memo","jsx","_jsx","ToastStack","children","_Snackbar","open","_Box","sx","display","flexDirection","gap","MemoizedToastStack","displayName"],"sources":["../src/ToastStack.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 { memo, ReactElement } from \"react\";\nimport { Box, Snackbar } from \"@mui/material\";\nimport { Toast } from \"./Toast\";\n\nexport type ToastStackProps = {\n /**\n * The Toast or array of Toasts within the ToastStack\n */\n children: ReactElement<typeof Toast> | Array<ReactElement<typeof Toast>>;\n};\n\nconst ToastStack = ({ children }: ToastStackProps) => {\n return (\n <Snackbar open={true}>\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column-reverse\",\n gap: 2,\n }}\n >\n {children}\n </Box>\n </Snackbar>\n );\n};\n\nconst MemoizedToastStack = memo(ToastStack);\nMemoizedToastStack.displayName = \"ToastStack\";\n\nexport { MemoizedToastStack as ToastStack };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW3C,MAAMC,UAAU,GAAGA,CAAC;EAAEC;AAA0B,CAAC,KAAK;EACpD,OACEF,IAAA,CAAAG,SAAA;IAAUC,IAAI,EAAE,IAAK;IAAAF,QAAA,EACnBF,IAAA,CAAAK,IAAA;MACEC,EAAE,EAAE;QACFC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE,gBAAgB;QAC/BC,GAAG,EAAE;MACP,CAAE;MAAAP,QAAA,EAEDA;IAAQ,CACN;EAAC,CACE,CAAC;AAEf,CAAC;AAED,MAAMQ,kBAAkB,GAAGZ,IAAI,CAACG,UAAU,CAAC;AAC3CS,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIT,UAAU"}
1
+ {"version":3,"file":"ToastStack.js","names":["memo","jsx","_jsx","ToastStack","children","_Snackbar","open","_Box","sx","display","flexDirection","gap","MemoizedToastStack","displayName"],"sources":["../src/ToastStack.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 { memo, ReactElement } from \"react\";\nimport { Box, Snackbar } from \"@mui/material\";\nimport { Toast } from \"./Toast\";\n\nexport type ToastListProps = {\n /**\n * The Toast or array of Toasts within the ToastStack\n */\n children: ReactElement<typeof Toast> | Array<ReactElement<typeof Toast>>;\n};\n\nconst ToastStack = ({ children }: ToastListProps) => {\n return (\n <Snackbar open={true}>\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"column-reverse\",\n gap: 2,\n }}\n >\n {children}\n </Box>\n </Snackbar>\n );\n};\n\nconst MemoizedToastStack = memo(ToastStack);\nMemoizedToastStack.displayName = \"ToastStack\";\n\nexport { MemoizedToastStack as ToastStack };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW3C,MAAMC,UAAU,GAAGA,CAAC;EAAEC;AAAyB,CAAC,KAAK;EACnD,OACEF,IAAA,CAAAG,SAAA;IAAUC,IAAI,EAAE,IAAK;IAAAF,QAAA,EACnBF,IAAA,CAAAK,IAAA;MACEC,EAAE,EAAE;QACFC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE,gBAAgB;QAC/BC,GAAG,EAAE;MACP,CAAE;MAAAP,QAAA,EAEDA;IAAQ,CACN;EAAC,CACE,CAAC;AAEf,CAAC;AAED,MAAMQ,kBAAkB,GAAGZ,IAAI,CAACG,UAAU,CAAC;AAC3CS,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIT,UAAU"}
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */
12
+
13
+ export const createShadowDomElements = containerElement => {
14
+ const shadowRoot = containerElement.attachShadow({
15
+ mode: "open"
16
+ });
17
+ const emotionRootElement = document.createElement("div");
18
+ emotionRootElement.setAttribute("id", "style-root");
19
+ emotionRootElement.setAttribute("nonce", window.cspNonce);
20
+ const shadowRootElement = document.createElement("div");
21
+ shadowRootElement.setAttribute("id", "shadow-root");
22
+ shadowRootElement.style.setProperty("height", "inherit");
23
+ shadowRoot.appendChild(emotionRootElement);
24
+ shadowRoot.appendChild(shadowRootElement);
25
+ return {
26
+ emotionRootElement,
27
+ shadowRootElement
28
+ };
29
+ };
30
+ export const createShadowRootElement = containerElement => {
31
+ const shadowRoot = containerElement.attachShadow({
32
+ mode: "open"
33
+ });
34
+ const emotionRootElement = document.createElement("style");
35
+ emotionRootElement.setAttribute("id", "style-root");
36
+ emotionRootElement.setAttribute("nonce", window.cspNonce);
37
+ const shadowRootElement = document.createElement("div");
38
+ shadowRootElement.setAttribute("id", "shadow-root");
39
+ shadowRoot.appendChild(emotionRootElement);
40
+ shadowRoot.appendChild(shadowRootElement);
41
+ return [emotionRootElement, shadowRootElement];
42
+ };
43
+ //# sourceMappingURL=createShadowDomElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createShadowDomElements.js","names":["createShadowDomElements","containerElement","shadowRoot","attachShadow","mode","emotionRootElement","document","createElement","setAttribute","window","cspNonce","shadowRootElement","style","setProperty","appendChild","createShadowRootElement"],"sources":["../src/createShadowDomElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport const createShadowDomElements = (containerElement: HTMLElement) => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // Container for Emotion `<style>` elements.\n const emotionRootElement = document.createElement(\"div\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // React app root component.\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n // This div could cause issues with layout of children.\n // For flexibility, make it inherit its parent's height\n shadowRootElement.style.setProperty(\"height\", \"inherit\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return { emotionRootElement, shadowRootElement };\n};\n\n/** @deprecated Use `createShadowDomElements` instead. */\nexport const createShadowRootElement = (\n containerElement: HTMLElement,\n): [HTMLStyleElement, HTMLDivElement] => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // the element that styles will be cached into\n const emotionRootElement = document.createElement(\"style\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // the element that emotion renders html into\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return [emotionRootElement, shadowRootElement];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,uBAAuB,GAAIC,gBAA6B,IAAK;EACxE,MAAMC,UAAU,GAAGD,gBAAgB,CAACE,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAMC,kBAAkB,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACxDF,kBAAkB,CAACG,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;EACnDH,kBAAkB,CAACG,YAAY,CAAC,OAAO,EAAEC,MAAM,CAACC,QAAQ,CAAC;EAGzD,MAAMC,iBAAiB,GAAGL,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACvDI,iBAAiB,CAACH,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;EAGnDG,iBAAiB,CAACC,KAAK,CAACC,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC;EAExDX,UAAU,CAACY,WAAW,CAACT,kBAAkB,CAAC;EAC1CH,UAAU,CAACY,WAAW,CAACH,iBAAiB,CAAC;EAEzC,OAAO;IAAEN,kBAAkB;IAAEM;EAAkB,CAAC;AAClD,CAAC;AAGD,OAAO,MAAMI,uBAAuB,GAClCd,gBAA6B,IACU;EACvC,MAAMC,UAAU,GAAGD,gBAAgB,CAACE,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAMC,kBAAkB,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAC1DF,kBAAkB,CAACG,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;EACnDH,kBAAkB,CAACG,YAAY,CAAC,OAAO,EAAEC,MAAM,CAACC,QAAQ,CAAC;EAGzD,MAAMC,iBAAiB,GAAGL,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACvDI,iBAAiB,CAACH,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;EAEnDN,UAAU,CAACY,WAAW,CAACT,kBAAkB,CAAC;EAC1CH,UAAU,CAACY,WAAW,CAACH,iBAAiB,CAAC;EAEzC,OAAO,CAACN,kBAAkB,EAAEM,iBAAiB,CAAC;AAChD,CAAC"}
package/dist/i18n.js CHANGED
@@ -42,7 +42,7 @@ import { translation as vi } from "./properties/ts/odyssey-react-mui_vi.js";
42
42
  import { translation as zhCN } from "./properties/ts/odyssey-react-mui_zh_CN.js";
43
43
  import { translation as znTW } from "./properties/ts/odyssey-react-mui_zh_TW.js";
44
44
  export const defaultLNG = "en";
45
- export const defaultNS = "translations";
45
+ export const defaultNS = "odyssey";
46
46
  export const resources = {
47
47
  cs,
48
48
  da,
package/dist/i18n.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","hu","id","it","ja","ko","ms","nb","nlNL","okPL","okSK","pl","ptBR","ro","ru","sv","th","tr","uk","vi","zhCN","znTW","defaultLNG","defaultNS","resources","nl_NL","ok_PL","ok_SK","pt_BR","zh_CN","zh_TW","use","init","ns","fallbackLng","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","locale","property","addResourceBundle","odysseyTranslate","t","bind"],"sources":["../src/i18n.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 i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { translation as cs } from \"./properties/ts/odyssey-react-mui_cs\";\nimport { translation as da } from \"./properties/ts/odyssey-react-mui_da\";\nimport { translation as de } from \"./properties/ts/odyssey-react-mui_de\";\nimport { translation as el } from \"./properties/ts/odyssey-react-mui_el\";\nimport { translation as en } from \"./properties/ts/odyssey-react-mui\";\nimport { translation as es } from \"./properties/ts/odyssey-react-mui_es\";\nimport { translation as fi } from \"./properties/ts/odyssey-react-mui_fi\";\nimport { translation as fr } from \"./properties/ts/odyssey-react-mui_fr\";\nimport { translation as hu } from \"./properties/ts/odyssey-react-mui_hu\";\nimport { translation as id } from \"./properties/ts/odyssey-react-mui_id\";\nimport { translation as it } from \"./properties/ts/odyssey-react-mui_it\";\nimport { translation as ja } from \"./properties/ts/odyssey-react-mui_ja\";\nimport { translation as ko } from \"./properties/ts/odyssey-react-mui_ko\";\nimport { translation as ms } from \"./properties/ts/odyssey-react-mui_ms\";\nimport { translation as nb } from \"./properties/ts/odyssey-react-mui_nb\";\nimport { translation as nlNL } from \"./properties/ts/odyssey-react-mui_nl_NL\";\nimport { translation as okPL } from \"./properties/ts/odyssey-react-mui_ok_PL\";\nimport { translation as okSK } from \"./properties/ts/odyssey-react-mui_ok_SK\";\nimport { translation as pl } from \"./properties/ts/odyssey-react-mui_pl\";\nimport { translation as ptBR } from \"./properties/ts/odyssey-react-mui_pt_BR\";\nimport { translation as ro } from \"./properties/ts/odyssey-react-mui_ro\";\nimport { translation as ru } from \"./properties/ts/odyssey-react-mui_ru\";\nimport { translation as sv } from \"./properties/ts/odyssey-react-mui_sv\";\nimport { translation as th } from \"./properties/ts/odyssey-react-mui_th\";\nimport { translation as tr } from \"./properties/ts/odyssey-react-mui_tr\";\nimport { translation as uk } from \"./properties/ts/odyssey-react-mui_uk\";\nimport { translation as vi } from \"./properties/ts/odyssey-react-mui_vi\";\nimport { translation as zhCN } from \"./properties/ts/odyssey-react-mui_zh_CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh_TW\";\n\nexport const defaultLNG = \"en\";\nexport const defaultNS = \"translations\";\n\n// Note: This is type \"string\" to allow translation overrides from other languages\nexport type I18nResources = Record<string, Partial<typeof en>>;\nexport const resources: I18nResources = {\n cs,\n da,\n de,\n el,\n en,\n es,\n fi,\n fr,\n hu,\n id,\n it,\n ja,\n ko,\n ms,\n nb,\n nl_NL: nlNL,\n ok_PL: okPL,\n ok_SK: okSK,\n pl,\n pt_BR: ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n vi,\n zh_CN: zhCN,\n zh_TW: znTW,\n};\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n load: \"currentOnly\",\n keySeparator: false,\n interpolation: {\n escapeValue: false, // react already safe from xss\n skipOnVariables: false, // to handle translations that use nesting\n },\n react: {\n useSuspense: false,\n bindI18nStore: \"added\",\n },\n});\n\nObject.entries(resources).forEach(([locale, property]) => {\n i18n.addResourceBundle(locale, defaultNS, property);\n});\n\nexport const odysseyTranslate = i18n.t.bind(i18n);\nexport { i18n };\n"],"mappings":"AAAA;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C,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFkB,KAAK,EAAEjB,IAAI;EACXkB,KAAK,EAAEjB,IAAI;EACXkB,KAAK,EAAEjB,IAAI;EACXC,EAAE;EACFiB,KAAK,EAAEhB,IAAI;EACXC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFU,KAAK,EAAET,IAAI;EACXU,KAAK,EAAET;AACT,CAAC;AAED/B,IAAI,CAACyC,GAAG,CAACxC,gBAAgB,CAAC,CAACyC,IAAI,CAAC;EAC9BT,SAAS;EACTU,EAAE,EAAE,CAACV,SAAS,CAAC;EACfW,WAAW,EAAEZ,UAAU;EACvBa,IAAI,EAAE,aAAa;EACnBC,YAAY,EAAE,KAAK;EACnBC,aAAa,EAAE;IACbC,WAAW,EAAE,KAAK;IAClBC,eAAe,EAAE;EACnB,CAAC;EACDC,KAAK,EAAE;IACLC,WAAW,EAAE,KAAK;IAClBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEFC,MAAM,CAACC,OAAO,CAACpB,SAAS,CAAC,CAACqB,OAAO,CAAC,CAAC,CAACC,MAAM,EAAEC,QAAQ,CAAC,KAAK;EACxDzD,IAAI,CAAC0D,iBAAiB,CAACF,MAAM,EAAEvB,SAAS,EAAEwB,QAAQ,CAAC;AACrD,CAAC,CAAC;AAEF,OAAO,MAAME,gBAAgB,GAAG3D,IAAI,CAAC4D,CAAC,CAACC,IAAI,CAAC7D,IAAI,CAAC;AACjD,SAASA,IAAI"}
1
+ {"version":3,"file":"i18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","hu","id","it","ja","ko","ms","nb","nlNL","okPL","okSK","pl","ptBR","ro","ru","sv","th","tr","uk","vi","zhCN","znTW","defaultLNG","defaultNS","resources","nl_NL","ok_PL","ok_SK","pt_BR","zh_CN","zh_TW","use","init","ns","fallbackLng","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","locale","property","addResourceBundle","odysseyTranslate","t","bind"],"sources":["../src/i18n.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 i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\n\nimport { translation as cs } from \"./properties/ts/odyssey-react-mui_cs\";\nimport { translation as da } from \"./properties/ts/odyssey-react-mui_da\";\nimport { translation as de } from \"./properties/ts/odyssey-react-mui_de\";\nimport { translation as el } from \"./properties/ts/odyssey-react-mui_el\";\nimport { translation as en } from \"./properties/ts/odyssey-react-mui\";\nimport { translation as es } from \"./properties/ts/odyssey-react-mui_es\";\nimport { translation as fi } from \"./properties/ts/odyssey-react-mui_fi\";\nimport { translation as fr } from \"./properties/ts/odyssey-react-mui_fr\";\nimport { translation as hu } from \"./properties/ts/odyssey-react-mui_hu\";\nimport { translation as id } from \"./properties/ts/odyssey-react-mui_id\";\nimport { translation as it } from \"./properties/ts/odyssey-react-mui_it\";\nimport { translation as ja } from \"./properties/ts/odyssey-react-mui_ja\";\nimport { translation as ko } from \"./properties/ts/odyssey-react-mui_ko\";\nimport { translation as ms } from \"./properties/ts/odyssey-react-mui_ms\";\nimport { translation as nb } from \"./properties/ts/odyssey-react-mui_nb\";\nimport { translation as nlNL } from \"./properties/ts/odyssey-react-mui_nl_NL\";\nimport { translation as okPL } from \"./properties/ts/odyssey-react-mui_ok_PL\";\nimport { translation as okSK } from \"./properties/ts/odyssey-react-mui_ok_SK\";\nimport { translation as pl } from \"./properties/ts/odyssey-react-mui_pl\";\nimport { translation as ptBR } from \"./properties/ts/odyssey-react-mui_pt_BR\";\nimport { translation as ro } from \"./properties/ts/odyssey-react-mui_ro\";\nimport { translation as ru } from \"./properties/ts/odyssey-react-mui_ru\";\nimport { translation as sv } from \"./properties/ts/odyssey-react-mui_sv\";\nimport { translation as th } from \"./properties/ts/odyssey-react-mui_th\";\nimport { translation as tr } from \"./properties/ts/odyssey-react-mui_tr\";\nimport { translation as uk } from \"./properties/ts/odyssey-react-mui_uk\";\nimport { translation as vi } from \"./properties/ts/odyssey-react-mui_vi\";\nimport { translation as zhCN } from \"./properties/ts/odyssey-react-mui_zh_CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh_TW\";\n\nexport const defaultLNG = \"en\";\nexport const defaultNS = \"odyssey\";\n\n// Note: This is type \"string\" to allow translation overrides from other languages\nexport type I18nResources = Record<string, Partial<typeof en>>;\nexport const resources: I18nResources = {\n cs,\n da,\n de,\n el,\n en,\n es,\n fi,\n fr,\n hu,\n id,\n it,\n ja,\n ko,\n ms,\n nb,\n nl_NL: nlNL,\n ok_PL: okPL,\n ok_SK: okSK,\n pl,\n pt_BR: ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n vi,\n zh_CN: zhCN,\n zh_TW: znTW,\n} as const;\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n load: \"currentOnly\",\n keySeparator: false,\n interpolation: {\n escapeValue: false, // react already safe from xss\n skipOnVariables: false, // to handle translations that use nesting\n },\n react: {\n useSuspense: false,\n bindI18nStore: \"added\",\n },\n} as const);\n\nObject.entries(resources).forEach(([locale, property]) => {\n i18n.addResourceBundle(locale, defaultNS, property);\n});\n\nexport const odysseyTranslate = i18n.t.bind(i18n);\nexport { i18n };\n"],"m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,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFkB,KAAK,EAAEjB,IAAI;EACXkB,KAAK,EAAEjB,IAAI;EACXkB,KAAK,EAAEjB,IAAI;EACXC,EAAE;EACFiB,KAAK,EAAEhB,IAAI;EACXC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFU,KAAK,EAAET,IAAI;EACXU,KAAK,EAAET;AACT,CAAU;AAEV/B,IAAI,CAACyC,GAAG,CAACxC,gBAAgB,CAAC,CAACyC,IAAI,CAAC;EAC9BT,SAAS;EACTU,EAAE,EAAE,CAACV,SAAS,CAAC;EACfW,WAAW,EAAEZ,UAAU;EACvBa,IAAI,EAAE,aAAa;EACnBC,YAAY,EAAE,KAAK;EACnBC,aAAa,EAAE;IACbC,WAAW,EAAE,KAAK;IAClBC,eAAe,EAAE;EACnB,CAAC;EACDC,KAAK,EAAE;IACLC,WAAW,EAAE,KAAK;IAClBC,aAAa,EAAE;EACjB;AACF,CAAU,CAAC;AAEXC,MAAM,CAACC,OAAO,CAACpB,SAAS,CAAC,CAACqB,OAAO,CAAC,CAAC,CAACC,MAAM,EAAEC,QAAQ,CAAC,KAAK;EACxDzD,IAAI,CAAC0D,iBAAiB,CAACF,MAAM,EAAEvB,SAAS,EAAEwB,QAAQ,CAAC;AACrD,CAAC,CAAC;AAEF,OAAO,MAAME,gBAAgB,GAAG3D,IAAI,CAAC4D,CAAC,CAACC,IAAI,CAAC7D,IAAI,CAAC;AACjD,SAASA,IAAI"}
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ export * from "./Checkbox.js";
27
27
  export * from "./CheckboxGroup.js";
28
28
  export * from "./CircularProgress.js";
29
29
  export * from "./CssBaseline.js";
30
- export * from "./createShadowRootElement.js";
30
+ export * from "./createShadowDomElements.js";
31
31
  export * from "./createUniqueId.js";
32
32
  export * from "./DataTable/index.js";
33
33
  export * from "./Dialog.js";
@@ -35,6 +35,7 @@ export * from "./Drawer.js";
35
35
  export * from "./EmptyState.js";
36
36
  export * from "./Fieldset.js";
37
37
  export * from "./FieldComponentProps.js";
38
+ export { FileUploader, fileUploadTypes, fileUploadVariants } from "./FileUploader/index.js";
38
39
  export * from "./Form.js";
39
40
  export * from "./HintLink.js";
40
41
  export * from "./IconWithTooltip.js";
@@ -62,7 +63,7 @@ export * from "./TextField.js";
62
63
  export * from "./theme/index.js";
63
64
  export * from "./Toast.js";
64
65
  export * from "./ToastStack.js";
65
- export * from "./labs/Switch.js";
66
+ export * from "./Switch.js";
66
67
  export * from "./Tooltip.js";
67
68
  export * from "./Typography.js";
68
69
  export * from "./useUniqueId.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["deepmerge","visuallyHidden","createTheme","DialogContentText","Divider","InputAdornment","InputBase","ListItemIcon","ListItemText","ListSubheader","MenuList","Paper","ScopedCssBaseline","ThemeProvider","odysseyTranslate","useOdysseyDesignTokens","badgeContentMaxValues"],"sources":["../src/index.ts"],"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\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport {\n createTheme,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n DialogContentText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Divider,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemIcon,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListSubheader,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n MenuList,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Paper,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ScopedCssBaseline,\n ThemeProvider,\n} from \"@mui/material\";\n\nexport type {\n CssBaselineProps,\n DialogContentTextProps,\n DividerProps,\n InputAdornmentProps,\n InputBaseProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n ThemeOptions,\n} from \"@mui/material\";\n\nexport { odysseyTranslate } from \"./i18n\";\nexport type { FocusHandle } from \"./inputUtils\";\nexport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\n\nexport * from \"./Accordion\";\nexport * from \"./Autocomplete\";\nexport { badgeContentMaxValues } from \"./Badge\";\nexport * from \"./Banner\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Callout\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./CssBaseline\";\nexport * from \"./createShadowRootElement\";\nexport * from \"./createUniqueId\";\nexport * from \"./DataTable\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./EmptyState\";\nexport * from \"./Fieldset\";\nexport * from \"./FieldComponentProps\";\nexport * from \"./Form\";\nexport * from \"./HintLink\";\nexport * from \"./IconWithTooltip\";\nexport * from \"./Link\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\nexport * from \"./NativeSelect\";\nexport * from \"./NullElement\";\nexport * from \"./OdysseyCacheProvider\";\nexport * from \"./OdysseyProvider\";\nexport * from \"./OdysseyThemeProvider\";\nexport * from \"./OdysseyTranslationProvider\";\nexport * from \"./PasswordField\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScreenReaderText\";\nexport * from \"./SearchField\";\nexport * from \"./Select\";\nexport * from \"./Status\";\nexport * from \"./Surface\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./TagList\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./Toast\";\nexport * from \"./ToastStack\";\nexport * from \"./labs/Switch\";\nexport * from \"./Tooltip\";\nexport * from \"./Typography\";\nexport * from \"./useUniqueId\";\nexport * from \"./Pagination\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,cAAc,QAAQ,YAAY;AAEtD,SACEC,WAAW,EAEXC,iBAAiB,EAEjBC,OAAO,EAEPC,cAAc,EAEdC,SAAS,EAETC,YAAY,EAEZC,YAAY,EAEZC,aAAa,EAEbC,QAAQ,EAERC,KAAK,EAELC,iBAAiB,EACjBC,aAAa,QACR,eAAe;AAAC,SAiBdC,gBAAgB;AAAA,SAEhBC,sBAAsB;AAAA;AAAA;AAAA,SAItBC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["deepmerge","visuallyHidden","createTheme","DialogContentText","Divider","InputAdornment","InputBase","ListItemIcon","ListItemText","ListSubheader","MenuList","Paper","ScopedCssBaseline","ThemeProvider","odysseyTranslate","useOdysseyDesignTokens","badgeContentMaxValues","FileUploader","fileUploadTypes","fileUploadVariants"],"sources":["../src/index.ts"],"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\nexport { deepmerge, visuallyHidden } from \"@mui/utils\";\n\nexport {\n createTheme,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n DialogContentText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Divider,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputAdornment,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n InputBase,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemIcon,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListItemText,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ListSubheader,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n MenuList,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n Paper,\n /** @deprecated Will be removed in a future Odyssey version in lieu of a wrapped version. */\n ScopedCssBaseline,\n ThemeProvider,\n} from \"@mui/material\";\n\nexport type {\n CssBaselineProps,\n DialogContentTextProps,\n DividerProps,\n InputAdornmentProps,\n InputBaseProps,\n ListItemIconProps,\n ListItemTextProps,\n ListSubheaderProps,\n MenuListProps,\n PaperProps,\n ScopedCssBaselineProps,\n ThemeOptions,\n} from \"@mui/material\";\n\nexport { odysseyTranslate } from \"./i18n\";\nexport type { FocusHandle } from \"./inputUtils\";\nexport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\n\nexport * from \"./Accordion\";\nexport * from \"./Autocomplete\";\nexport { badgeContentMaxValues } from \"./Badge\";\nexport * from \"./Banner\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Card\";\nexport * from \"./Callout\";\nexport * from \"./Checkbox\";\nexport * from \"./CheckboxGroup\";\nexport * from \"./CircularProgress\";\nexport * from \"./CssBaseline\";\nexport * from \"./createShadowDomElements\";\nexport * from \"./createUniqueId\";\nexport * from \"./DataTable\";\nexport * from \"./Dialog\";\nexport * from \"./Drawer\";\nexport * from \"./EmptyState\";\nexport * from \"./Fieldset\";\nexport * from \"./FieldComponentProps\";\nexport {\n FileUploader,\n fileUploadTypes,\n fileUploadVariants,\n} from \"./FileUploader\";\nexport * from \"./Form\";\nexport * from \"./HintLink\";\nexport * from \"./IconWithTooltip\";\nexport * from \"./Link\";\nexport * from \"./MenuButton\";\nexport * from \"./MenuItem\";\nexport * from \"./NativeSelect\";\nexport * from \"./NullElement\";\nexport * from \"./OdysseyCacheProvider\";\nexport * from \"./OdysseyProvider\";\nexport * from \"./OdysseyThemeProvider\";\nexport * from \"./OdysseyTranslationProvider\";\nexport * from \"./PasswordField\";\nexport * from \"./Radio\";\nexport * from \"./RadioGroup\";\nexport * from \"./ScreenReaderText\";\nexport * from \"./SearchField\";\nexport * from \"./Select\";\nexport * from \"./Status\";\nexport * from \"./Surface\";\nexport * from \"./Tabs\";\nexport * from \"./Tag\";\nexport * from \"./TagList\";\nexport * from \"./TextField\";\nexport * from \"./theme\";\nexport * from \"./Toast\";\nexport * from \"./ToastStack\";\nexport * from \"./Switch\";\nexport * from \"./Tooltip\";\nexport * from \"./Typography\";\nexport * from \"./useUniqueId\";\nexport * from \"./Pagination\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,cAAc,QAAQ,YAAY;AAEtD,SACEC,WAAW,EAEXC,iBAAiB,EAEjBC,OAAO,EAEPC,cAAc,EAEdC,SAAS,EAETC,YAAY,EAEZC,YAAY,EAEZC,aAAa,EAEbC,QAAQ,EAERC,KAAK,EAELC,iBAAiB,EACjBC,aAAa,QACR,eAAe;AAAC,SAiBdC,gBAAgB;AAAA,SAEhBC,sBAAsB;AAAA;AAAA;AAAA,SAItBC,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAoB5BC,YAAY,EACZC,eAAe,EACfC,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"}