@okta/odyssey-react-mui 0.23.0 → 0.24.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 (463) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +43 -7
  3. package/dist/{src/ThemeProvider.d.ts → @types/i18next.d.js} +4 -7
  4. package/dist/@types/i18next.d.js.map +1 -0
  5. package/dist/Autocomplete.js +13 -3
  6. package/dist/Autocomplete.js.map +1 -1
  7. package/dist/Banner.js +6 -3
  8. package/dist/Banner.js.map +1 -1
  9. package/dist/Button.js +13 -3
  10. package/dist/Button.js.map +1 -1
  11. package/dist/Checkbox.js +44 -10
  12. package/dist/Checkbox.js.map +1 -1
  13. package/dist/CheckboxGroup.js +14 -3
  14. package/dist/CheckboxGroup.js.map +1 -1
  15. package/dist/CircularProgress.js +11 -0
  16. package/dist/CircularProgress.js.map +1 -1
  17. package/dist/Dialog.js +11 -7
  18. package/dist/Dialog.js.map +1 -1
  19. package/dist/Field.js +13 -8
  20. package/dist/Field.js.map +1 -1
  21. package/dist/FieldError.js +6 -3
  22. package/dist/FieldError.js.map +1 -1
  23. package/dist/FieldHint.js +1 -2
  24. package/dist/FieldHint.js.map +1 -1
  25. package/dist/FieldLabel.js +17 -5
  26. package/dist/FieldLabel.js.map +1 -1
  27. package/dist/Fieldset.js +55 -0
  28. package/dist/Fieldset.js.map +1 -0
  29. package/dist/Form.js +69 -0
  30. package/dist/Form.js.map +1 -0
  31. package/dist/Icon.js +2 -3
  32. package/dist/Icon.js.map +1 -1
  33. package/dist/Infobox.js +6 -3
  34. package/dist/Infobox.js.map +1 -1
  35. package/dist/Link.js +6 -2
  36. package/dist/Link.js.map +1 -1
  37. package/dist/MenuButton.js +0 -5
  38. package/dist/MenuButton.js.map +1 -1
  39. package/dist/MenuItem.js +4 -2
  40. package/dist/MenuItem.js.map +1 -1
  41. package/dist/MuiPropsChild.js +3 -1
  42. package/dist/MuiPropsChild.js.map +1 -1
  43. package/dist/MuiPropsContext.js +1 -0
  44. package/dist/MuiPropsContext.js.map +1 -1
  45. package/dist/NativeSelect.js +61 -0
  46. package/dist/NativeSelect.js.map +1 -0
  47. package/dist/OdysseyCacheProvider.js +1 -2
  48. package/dist/OdysseyCacheProvider.js.map +1 -1
  49. package/dist/OdysseyI18n.js +93 -0
  50. package/dist/OdysseyI18n.js.map +1 -0
  51. package/dist/{ThemeProvider.js → OdysseyProvider.js} +20 -8
  52. package/dist/OdysseyProvider.js.map +1 -0
  53. package/dist/OdysseyThemeProvider.js +11 -5
  54. package/dist/OdysseyThemeProvider.js.map +1 -1
  55. package/dist/OdysseyTranslationProvider.js +47 -0
  56. package/dist/OdysseyTranslationProvider.js.map +1 -0
  57. package/dist/OdysseyTranslationProvider.types.js +14 -0
  58. package/dist/OdysseyTranslationProvider.types.js.map +1 -0
  59. package/dist/PasswordField.js +12 -0
  60. package/dist/PasswordField.js.map +1 -1
  61. package/dist/Radio.js +11 -2
  62. package/dist/Radio.js.map +1 -1
  63. package/dist/RadioGroup.js +11 -2
  64. package/dist/RadioGroup.js.map +1 -1
  65. package/dist/ScreenReaderText.js +3 -3
  66. package/dist/ScreenReaderText.js.map +1 -1
  67. package/dist/SearchField.js +11 -0
  68. package/dist/SearchField.js.map +1 -1
  69. package/dist/Select.js +131 -0
  70. package/dist/Select.js.map +1 -0
  71. package/dist/Status.js.map +1 -1
  72. package/dist/Tabs.js +46 -0
  73. package/dist/Tabs.js.map +1 -0
  74. package/dist/Tag.js +11 -2
  75. package/dist/Tag.js.map +1 -1
  76. package/dist/TagList.js +11 -2
  77. package/dist/TagList.js.map +1 -1
  78. package/dist/TagListContext.js +1 -0
  79. package/dist/TagListContext.js.map +1 -1
  80. package/dist/TextField.js +12 -2
  81. package/dist/TextField.js.map +1 -1
  82. package/dist/Toast.js +10 -4
  83. package/dist/Toast.js.map +1 -1
  84. package/dist/ToastStack.js +1 -2
  85. package/dist/ToastStack.js.map +1 -1
  86. package/dist/Tooltip.js +11 -0
  87. package/dist/Tooltip.js.map +1 -1
  88. package/dist/a11yCheck.js +1 -2
  89. package/dist/a11yCheck.js.map +1 -1
  90. package/dist/createUniqueAlphabeticalId.js +1 -2
  91. package/dist/createUniqueAlphabeticalId.js.map +1 -1
  92. package/dist/createUniqueId.js +1 -2
  93. package/dist/createUniqueId.js.map +1 -1
  94. package/dist/iconDictionary/Add.js +1 -2
  95. package/dist/iconDictionary/Add.js.map +1 -1
  96. package/dist/iconDictionary/AddCircle.js +1 -2
  97. package/dist/iconDictionary/AddCircle.js.map +1 -1
  98. package/dist/iconDictionary/AlertCircle.js +1 -2
  99. package/dist/iconDictionary/AlertCircle.js.map +1 -1
  100. package/dist/iconDictionary/AlertCircleFilled.js +1 -2
  101. package/dist/iconDictionary/AlertCircleFilled.js.map +1 -1
  102. package/dist/iconDictionary/AlertTriangleFilled.js +1 -2
  103. package/dist/iconDictionary/AlertTriangleFilled.js.map +1 -1
  104. package/dist/iconDictionary/Anchor.js +1 -2
  105. package/dist/iconDictionary/Anchor.js.map +1 -1
  106. package/dist/iconDictionary/ArrowDown.js +1 -2
  107. package/dist/iconDictionary/ArrowDown.js.map +1 -1
  108. package/dist/iconDictionary/ArrowLeft.js +1 -2
  109. package/dist/iconDictionary/ArrowLeft.js.map +1 -1
  110. package/dist/iconDictionary/ArrowRight.js +1 -2
  111. package/dist/iconDictionary/ArrowRight.js.map +1 -1
  112. package/dist/iconDictionary/ArrowUp.js +1 -2
  113. package/dist/iconDictionary/ArrowUp.js.map +1 -1
  114. package/dist/iconDictionary/ArrowUpDown.js +1 -2
  115. package/dist/iconDictionary/ArrowUpDown.js.map +1 -1
  116. package/dist/iconDictionary/Calendar.js +1 -2
  117. package/dist/iconDictionary/Calendar.js.map +1 -1
  118. package/dist/iconDictionary/Check.js +1 -2
  119. package/dist/iconDictionary/Check.js.map +1 -1
  120. package/dist/iconDictionary/CheckCircleFilled.js +1 -2
  121. package/dist/iconDictionary/CheckCircleFilled.js.map +1 -1
  122. package/dist/iconDictionary/ChevronDown.js +1 -2
  123. package/dist/iconDictionary/ChevronDown.js.map +1 -1
  124. package/dist/iconDictionary/ChevronUp.js +1 -2
  125. package/dist/iconDictionary/ChevronUp.js.map +1 -1
  126. package/dist/iconDictionary/Close.js +1 -2
  127. package/dist/iconDictionary/Close.js.map +1 -1
  128. package/dist/iconDictionary/CloseCircleFilled.js +1 -2
  129. package/dist/iconDictionary/CloseCircleFilled.js.map +1 -1
  130. package/dist/iconDictionary/Copy.js +1 -2
  131. package/dist/iconDictionary/Copy.js.map +1 -1
  132. package/dist/iconDictionary/Delete.js +1 -2
  133. package/dist/iconDictionary/Delete.js.map +1 -1
  134. package/dist/iconDictionary/Download.js +1 -2
  135. package/dist/iconDictionary/Download.js.map +1 -1
  136. package/dist/iconDictionary/DragHandle.js +1 -2
  137. package/dist/iconDictionary/DragHandle.js.map +1 -1
  138. package/dist/iconDictionary/Edit.js +1 -2
  139. package/dist/iconDictionary/Edit.js.map +1 -1
  140. package/dist/iconDictionary/ExternalLink.js +1 -2
  141. package/dist/iconDictionary/ExternalLink.js.map +1 -1
  142. package/dist/iconDictionary/Eye.js +1 -2
  143. package/dist/iconDictionary/Eye.js.map +1 -1
  144. package/dist/iconDictionary/EyeOff.js +1 -2
  145. package/dist/iconDictionary/EyeOff.js.map +1 -1
  146. package/dist/iconDictionary/Filter.js +1 -2
  147. package/dist/iconDictionary/Filter.js.map +1 -1
  148. package/dist/iconDictionary/Globe.js +1 -2
  149. package/dist/iconDictionary/Globe.js.map +1 -1
  150. package/dist/iconDictionary/Home.js +1 -2
  151. package/dist/iconDictionary/Home.js.map +1 -1
  152. package/dist/iconDictionary/InformationCircle.js +1 -2
  153. package/dist/iconDictionary/InformationCircle.js.map +1 -1
  154. package/dist/iconDictionary/InformationCircleFilled.js +1 -2
  155. package/dist/iconDictionary/InformationCircleFilled.js.map +1 -1
  156. package/dist/iconDictionary/Notification.js +1 -2
  157. package/dist/iconDictionary/Notification.js.map +1 -1
  158. package/dist/iconDictionary/OverflowVertical.js +1 -2
  159. package/dist/iconDictionary/OverflowVertical.js.map +1 -1
  160. package/dist/iconDictionary/QuestionCircle.js +1 -2
  161. package/dist/iconDictionary/QuestionCircle.js.map +1 -1
  162. package/dist/iconDictionary/QuestionCircleFilled.js +1 -2
  163. package/dist/iconDictionary/QuestionCircleFilled.js.map +1 -1
  164. package/dist/iconDictionary/Search.js +1 -2
  165. package/dist/iconDictionary/Search.js.map +1 -1
  166. package/dist/iconDictionary/Settings.js +1 -2
  167. package/dist/iconDictionary/Settings.js.map +1 -1
  168. package/dist/iconDictionary/Subtract.js +1 -2
  169. package/dist/iconDictionary/Subtract.js.map +1 -1
  170. package/dist/iconDictionary/SvgIcon.js +1 -0
  171. package/dist/iconDictionary/SvgIcon.js.map +1 -1
  172. package/dist/iconDictionary/User.js +1 -2
  173. package/dist/iconDictionary/User.js.map +1 -1
  174. package/dist/iconDictionary/UserGroup.js +1 -2
  175. package/dist/iconDictionary/UserGroup.js.map +1 -1
  176. package/dist/iconDictionary/index.js.map +1 -1
  177. package/dist/index.js +9 -3
  178. package/dist/index.js.map +1 -1
  179. package/dist/properties/ts/odyssey-react-mui.js +11 -0
  180. package/dist/properties/ts/odyssey-react-mui.js.map +1 -0
  181. package/dist/properties/ts/odyssey-react-mui_cs.js +2 -0
  182. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -0
  183. package/dist/properties/ts/odyssey-react-mui_da.js +2 -0
  184. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -0
  185. package/dist/properties/ts/odyssey-react-mui_de.js +2 -0
  186. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -0
  187. package/dist/properties/ts/odyssey-react-mui_el.js +2 -0
  188. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -0
  189. package/dist/properties/ts/odyssey-react-mui_es.js +2 -0
  190. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -0
  191. package/dist/properties/ts/odyssey-react-mui_fi.js +2 -0
  192. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -0
  193. package/dist/properties/ts/odyssey-react-mui_fr.js +2 -0
  194. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -0
  195. package/dist/properties/ts/odyssey-react-mui_hu.js +2 -0
  196. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -0
  197. package/dist/properties/ts/odyssey-react-mui_id.js +2 -0
  198. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -0
  199. package/dist/properties/ts/odyssey-react-mui_it.js +2 -0
  200. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -0
  201. package/dist/properties/ts/odyssey-react-mui_ja.js +2 -0
  202. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -0
  203. package/dist/properties/ts/odyssey-react-mui_ko.js +2 -0
  204. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -0
  205. package/dist/properties/ts/odyssey-react-mui_ms.js +2 -0
  206. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -0
  207. package/dist/properties/ts/odyssey-react-mui_nb.js +2 -0
  208. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -0
  209. package/dist/properties/ts/odyssey-react-mui_nl-NL.js +2 -0
  210. package/dist/properties/ts/odyssey-react-mui_nl-NL.js.map +1 -0
  211. package/dist/properties/ts/odyssey-react-mui_pl.js +2 -0
  212. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -0
  213. package/dist/properties/ts/odyssey-react-mui_pt-BR.js +2 -0
  214. package/dist/properties/ts/odyssey-react-mui_pt-BR.js.map +1 -0
  215. package/dist/properties/ts/odyssey-react-mui_ro.js +2 -0
  216. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -0
  217. package/dist/properties/ts/odyssey-react-mui_ru.js +2 -0
  218. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -0
  219. package/dist/properties/ts/odyssey-react-mui_sv.js +2 -0
  220. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -0
  221. package/dist/properties/ts/odyssey-react-mui_th.js +2 -0
  222. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -0
  223. package/dist/properties/ts/odyssey-react-mui_tr.js +2 -0
  224. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -0
  225. package/dist/properties/ts/odyssey-react-mui_uk.js +2 -0
  226. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -0
  227. package/dist/properties/ts/odyssey-react-mui_zh-CN.js +2 -0
  228. package/dist/properties/ts/odyssey-react-mui_zh-CN.js.map +1 -0
  229. package/dist/properties/ts/odyssey-react-mui_zh-TW.js +2 -0
  230. package/dist/properties/ts/odyssey-react-mui_zh-TW.js.map +1 -0
  231. package/dist/src/Banner.d.ts.map +1 -1
  232. package/dist/src/Checkbox.d.ts +4 -2
  233. package/dist/src/Checkbox.d.ts.map +1 -1
  234. package/dist/src/CheckboxGroup.d.ts +2 -1
  235. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  236. package/dist/src/Field.d.ts +5 -5
  237. package/dist/src/Field.d.ts.map +1 -1
  238. package/dist/src/FieldError.d.ts.map +1 -1
  239. package/dist/src/FieldLabel.d.ts +1 -2
  240. package/dist/src/FieldLabel.d.ts.map +1 -1
  241. package/dist/src/Fieldset.d.ts +42 -0
  242. package/dist/src/Fieldset.d.ts.map +1 -0
  243. package/dist/src/Form.d.ts +73 -0
  244. package/dist/src/Form.d.ts.map +1 -0
  245. package/dist/src/Icon.d.ts +4 -2
  246. package/dist/src/Icon.d.ts.map +1 -1
  247. package/dist/src/Infobox.d.ts.map +1 -1
  248. package/dist/src/MenuItem.d.ts +1 -1
  249. package/dist/src/MenuItem.d.ts.map +1 -1
  250. package/dist/src/NativeSelect.d.ts +36 -0
  251. package/dist/src/NativeSelect.d.ts.map +1 -0
  252. package/dist/src/OdysseyI18n.d.ts +54 -0
  253. package/dist/src/OdysseyI18n.d.ts.map +1 -0
  254. package/dist/src/OdysseyProvider.d.ts +27 -0
  255. package/dist/src/OdysseyProvider.d.ts.map +1 -0
  256. package/dist/src/OdysseyThemeProvider.d.ts +4 -2
  257. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  258. package/dist/src/OdysseyTranslationProvider.d.ts +25 -0
  259. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -0
  260. package/dist/src/OdysseyTranslationProvider.types.d.ts +14 -0
  261. package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -0
  262. package/dist/src/PasswordField.d.ts.map +1 -1
  263. package/dist/src/Select.d.ts +35 -0
  264. package/dist/src/Select.d.ts.map +1 -0
  265. package/{src/ThemeProvider.tsx → dist/src/Tabs.d.ts} +16 -15
  266. package/dist/src/Tabs.d.ts.map +1 -0
  267. package/dist/src/TextField.d.ts +0 -4
  268. package/dist/src/TextField.d.ts.map +1 -1
  269. package/dist/src/Toast.d.ts +1 -1
  270. package/dist/src/Toast.d.ts.map +1 -1
  271. package/dist/src/index.d.ts +9 -5
  272. package/dist/src/index.d.ts.map +1 -1
  273. package/dist/src/properties/ts/odyssey-react-mui.d.ts +11 -0
  274. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -0
  275. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +2 -0
  276. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -0
  277. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +2 -0
  278. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -0
  279. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +2 -0
  280. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -0
  281. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +2 -0
  282. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -0
  283. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +2 -0
  284. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -0
  285. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +2 -0
  286. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -0
  287. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +2 -0
  288. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -0
  289. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +2 -0
  290. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -0
  291. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +2 -0
  292. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -0
  293. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +2 -0
  294. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -0
  295. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +2 -0
  296. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -0
  297. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +2 -0
  298. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -0
  299. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +2 -0
  300. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -0
  301. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +2 -0
  302. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -0
  303. package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts +2 -0
  304. package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts.map +1 -0
  305. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +2 -0
  306. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -0
  307. package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts +2 -0
  308. package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts.map +1 -0
  309. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +2 -0
  310. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -0
  311. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +2 -0
  312. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -0
  313. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +2 -0
  314. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -0
  315. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +2 -0
  316. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -0
  317. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +2 -0
  318. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -0
  319. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +2 -0
  320. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -0
  321. package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts +2 -0
  322. package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts.map +1 -0
  323. package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts +2 -0
  324. package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts.map +1 -0
  325. package/dist/src/theme/components.d.ts.map +1 -1
  326. package/dist/src/theme/index.d.ts +3 -1
  327. package/dist/src/theme/index.d.ts.map +1 -1
  328. package/dist/src/theme/mixins.d.ts +2 -1
  329. package/dist/src/theme/mixins.d.ts.map +1 -1
  330. package/dist/src/theme/palette.d.ts +2 -1
  331. package/dist/src/theme/palette.d.ts.map +1 -1
  332. package/dist/src/theme/shape.d.ts +2 -1
  333. package/dist/src/theme/shape.d.ts.map +1 -1
  334. package/dist/src/theme/spacing.d.ts +2 -1
  335. package/dist/src/theme/spacing.d.ts.map +1 -1
  336. package/dist/src/theme/theme.d.ts +3 -2
  337. package/dist/src/theme/theme.d.ts.map +1 -1
  338. package/dist/src/theme/typography.d.ts +2 -1
  339. package/dist/src/theme/typography.d.ts.map +1 -1
  340. package/dist/theme/components.js +91 -73
  341. package/dist/theme/components.js.map +1 -1
  342. package/dist/theme/components.types.js +1 -0
  343. package/dist/theme/components.types.js.map +1 -1
  344. package/dist/theme/index.js +1 -1
  345. package/dist/theme/index.js.map +1 -1
  346. package/dist/theme/mixins.js +8 -6
  347. package/dist/theme/mixins.js.map +1 -1
  348. package/dist/theme/mixins.types.js +1 -0
  349. package/dist/theme/mixins.types.js.map +1 -1
  350. package/dist/theme/palette.js +89 -86
  351. package/dist/theme/palette.js.map +1 -1
  352. package/dist/theme/palette.types.js +1 -0
  353. package/dist/theme/palette.types.js.map +1 -1
  354. package/dist/theme/shape.js +6 -4
  355. package/dist/theme/shape.js.map +1 -1
  356. package/dist/theme/spacing.js +4 -1
  357. package/dist/theme/spacing.js.map +1 -1
  358. package/dist/theme/temp.js +1 -0
  359. package/dist/theme/temp.js.map +1 -1
  360. package/dist/theme/theme.js +12 -9
  361. package/dist/theme/theme.js.map +1 -1
  362. package/dist/theme/typography.js +85 -83
  363. package/dist/theme/typography.js.map +1 -1
  364. package/dist/theme/typography.types.js +1 -0
  365. package/dist/theme/typography.types.js.map +1 -1
  366. package/dist/theme/useTheme.js +1 -0
  367. package/dist/theme/useTheme.js.map +1 -1
  368. package/dist/tsconfig.production.tsbuildinfo +1 -1
  369. package/dist/useUniqueAlphabeticalId.js +1 -0
  370. package/dist/useUniqueAlphabeticalId.js.map +1 -1
  371. package/dist/useUniqueId.js +1 -0
  372. package/dist/useUniqueId.js.map +1 -1
  373. package/i18n.config.json +8 -0
  374. package/package.json +9 -4
  375. package/scripts/properties-to-ts.js +103 -0
  376. package/src/@types/i18next.d.ts +22 -0
  377. package/src/Banner.tsx +16 -11
  378. package/src/Checkbox.tsx +47 -21
  379. package/src/CheckboxGroup.tsx +4 -1
  380. package/src/Field.tsx +16 -7
  381. package/src/FieldError.tsx +6 -1
  382. package/src/FieldLabel.tsx +7 -4
  383. package/src/Fieldset.tsx +95 -0
  384. package/src/Form.tsx +142 -0
  385. package/src/Icon.tsx +11 -14
  386. package/src/Infobox.tsx +12 -7
  387. package/src/Link.tsx +2 -2
  388. package/src/MenuItem.tsx +1 -0
  389. package/src/NativeSelect.tsx +107 -0
  390. package/src/OdysseyI18n.ts +101 -0
  391. package/src/OdysseyProvider.tsx +59 -0
  392. package/src/OdysseyThemeProvider.tsx +9 -3
  393. package/src/OdysseyTranslationProvider.test.tsx +63 -0
  394. package/src/OdysseyTranslationProvider.tsx +65 -0
  395. package/src/OdysseyTranslationProvider.types.ts +42 -0
  396. package/src/PasswordField.tsx +1 -0
  397. package/src/Select.tsx +226 -0
  398. package/src/Tabs.tsx +70 -0
  399. package/src/TextField.tsx +1 -6
  400. package/src/Toast.tsx +61 -59
  401. package/src/index.ts +7 -9
  402. package/src/properties/odyssey-react-mui.properties +8 -0
  403. package/src/properties/translations/odyssey-react-mui_cs.properties +0 -0
  404. package/src/properties/translations/odyssey-react-mui_da.properties +0 -0
  405. package/src/properties/translations/odyssey-react-mui_de.properties +0 -0
  406. package/src/properties/translations/odyssey-react-mui_el.properties +0 -0
  407. package/src/properties/translations/odyssey-react-mui_es.properties +0 -0
  408. package/src/properties/translations/odyssey-react-mui_fi.properties +0 -0
  409. package/src/properties/translations/odyssey-react-mui_fr.properties +0 -0
  410. package/src/properties/translations/odyssey-react-mui_hu.properties +0 -0
  411. package/src/properties/translations/odyssey-react-mui_id.properties +0 -0
  412. package/src/properties/translations/odyssey-react-mui_it.properties +0 -0
  413. package/src/properties/translations/odyssey-react-mui_ja.properties +0 -0
  414. package/src/properties/translations/odyssey-react-mui_ko.properties +0 -0
  415. package/src/properties/translations/odyssey-react-mui_ms.properties +0 -0
  416. package/src/properties/translations/odyssey-react-mui_nb.properties +0 -0
  417. package/src/properties/translations/odyssey-react-mui_nl-NL.properties +0 -0
  418. package/src/properties/translations/odyssey-react-mui_pl.properties +0 -0
  419. package/src/properties/translations/odyssey-react-mui_pt-BR.properties +0 -0
  420. package/src/properties/translations/odyssey-react-mui_ro.properties +0 -0
  421. package/src/properties/translations/odyssey-react-mui_ru.properties +0 -0
  422. package/src/properties/translations/odyssey-react-mui_sv.properties +0 -0
  423. package/src/properties/translations/odyssey-react-mui_th.properties +0 -0
  424. package/src/properties/translations/odyssey-react-mui_tr.properties +0 -0
  425. package/src/properties/translations/odyssey-react-mui_uk.properties +0 -0
  426. package/src/properties/translations/odyssey-react-mui_zh-CN.properties +0 -0
  427. package/src/properties/translations/odyssey-react-mui_zh-TW.properties +0 -0
  428. package/src/properties/ts/odyssey-react-mui.ts +1 -0
  429. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -0
  430. package/src/properties/ts/odyssey-react-mui_da.ts +1 -0
  431. package/src/properties/ts/odyssey-react-mui_de.ts +1 -0
  432. package/src/properties/ts/odyssey-react-mui_el.ts +1 -0
  433. package/src/properties/ts/odyssey-react-mui_es.ts +1 -0
  434. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -0
  435. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -0
  436. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -0
  437. package/src/properties/ts/odyssey-react-mui_id.ts +1 -0
  438. package/src/properties/ts/odyssey-react-mui_it.ts +1 -0
  439. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -0
  440. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -0
  441. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -0
  442. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -0
  443. package/src/properties/ts/odyssey-react-mui_nl-NL.ts +1 -0
  444. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -0
  445. package/src/properties/ts/odyssey-react-mui_pt-BR.ts +1 -0
  446. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -0
  447. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -0
  448. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -0
  449. package/src/properties/ts/odyssey-react-mui_th.ts +1 -0
  450. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -0
  451. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -0
  452. package/src/properties/ts/odyssey-react-mui_zh-CN.ts +1 -0
  453. package/src/properties/ts/odyssey-react-mui_zh-TW.ts +1 -0
  454. package/src/theme/components.tsx +12 -4
  455. package/src/theme/index.ts +5 -1
  456. package/src/theme/mixins.ts +10 -6
  457. package/src/theme/palette.ts +95 -88
  458. package/src/theme/shape.ts +12 -8
  459. package/src/theme/spacing.ts +17 -12
  460. package/src/theme/theme.ts +14 -10
  461. package/src/theme/typography.ts +87 -83
  462. package/dist/ThemeProvider.js.map +0 -1
  463. package/dist/src/ThemeProvider.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","names":["Button","ChevronDownIcon","Menu","useUniqueId","memo","useMemo","useState","MenuButton","buttonLabel","children","buttonEndIcon","buttonVariant","id","idOverride","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleClose","uniqueId","menuListProps","undefined","MemoizedMenuButton"],"sources":["../src/MenuButton.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 Button,\n ButtonProps,\n ChevronDownIcon,\n Divider,\n ListSubheader,\n Menu,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { memo, MouseEvent, ReactElement, useMemo, useState } from \"react\";\n\nexport type MenuButtonProps = {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: Array<\n ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n >;\n /**\n * The end Icon on the trigggering Button\n */\n buttonEndIcon?: ReactElement;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: ButtonProps[\"variant\"];\n /**\n * The id of the `input` element.\n */\n id?: string;\n};\n\nconst MenuButton = ({\n buttonLabel = \"\",\n children,\n buttonEndIcon = <ChevronDownIcon />,\n buttonVariant = \"secondary\",\n id: idOverride,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const open = Boolean(anchorEl);\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n return (\n <div>\n <Button\n endIcon={buttonEndIcon}\n id={`${uniqueId}-button`}\n aria-controls={open ? `${uniqueId}-menu` : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? \"true\" : undefined}\n onClick={handleClick}\n text={buttonLabel}\n variant={buttonVariant}\n />\n <Menu\n id={`${uniqueId}-menu`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={menuListProps}\n >\n {children}\n </Menu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;SAGEA,M,EAEAC,e,EAGAC,I,EAEAC,W;AAEF,SAASC,IAAT,EAAyCC,OAAzC,EAAkDC,QAAlD,QAAkE,OAAlE;;;;AA2BA,MAAMC,UAAU,GAAG,QAMI;EAAA,IANH;IAClBC,WAAW,GAAG,EADI;IAElBC,QAFkB;IAGlBC,aAAa,GAAG,KAAC,eAAD,KAHE;IAIlBC,aAAa,GAAG,WAJE;IAKlBC,EAAE,EAAEC;EALc,CAMG;EACrB,MAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BT,QAAQ,CAAqB,IAArB,CAAxC;EAEA,MAAMU,IAAI,GAAGC,OAAO,CAACH,QAAD,CAApB;;EAEA,MAAMI,WAAW,GAAIC,KAAD,IAA0C;IAC5DJ,WAAW,CAACI,KAAK,CAACC,aAAP,CAAX;EACD,CAFD;;EAIA,MAAMC,WAAW,GAAG,MAAM;IACxBN,WAAW,CAAC,IAAD,CAAX;EACD,CAFD;;EAIA,MAAMO,QAAQ,GAAGnB,WAAW,CAACU,UAAD,CAA5B;EAEA,MAAMU,aAAa,GAAGlB,OAAO,CAC3B,OAAO;IAAE,mBAAoB,GAAEiB,QAAS;EAAjC,CAAP,CAD2B,EAE3B,CAACA,QAAD,CAF2B,CAA7B;EAKA,OACE;IAAA,WACE,KAAC,MAAD;MACE,OAAO,EAAEZ,aADX;MAEE,EAAE,EAAG,GAAEY,QAAS,SAFlB;MAGE,iBAAeN,IAAI,GAAI,GAAEM,QAAS,OAAf,GAAwBE,SAH7C;MAIE,iBAAc,MAJhB;MAKE,iBAAeR,IAAI,GAAG,MAAH,GAAYQ,SALjC;MAME,OAAO,EAAEN,WANX;MAOE,IAAI,EAAEV,WAPR;MAQE,OAAO,EAAEG;IARX,EADF,EAWE,KAAC,IAAD;MACE,EAAE,EAAG,GAAEW,QAAS,OADlB;MAEE,QAAQ,EAAER,QAFZ;MAGE,IAAI,EAAEE,IAHR;MAIE,OAAO,EAAEK,WAJX;MAKE,aAAa,EAAEE,aALjB;MAAA,UAOGd;IAPH,EAXF;EAAA,EADF;AAuBD,CAjDD;;AAmDA,MAAMgB,kBAAkB,GAAGrB,IAAI,CAACG,UAAD,CAA/B;AAEA,SAASkB,kBAAkB,IAAIlB,UAA/B"}
1
+ {"version":3,"file":"MenuButton.js","names":["Button","ChevronDownIcon","Menu","useUniqueId","memo","useMemo","useState","jsx","_jsx","jsxs","_jsxs","MenuButton","_ref","buttonLabel","children","buttonEndIcon","buttonVariant","id","idOverride","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleClose","uniqueId","menuListProps","endIcon","undefined","onClick","text","variant","onClose","MenuListProps","MemoizedMenuButton"],"sources":["../src/MenuButton.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 Button,\n ButtonProps,\n ChevronDownIcon,\n Divider,\n ListSubheader,\n Menu,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { memo, MouseEvent, ReactElement, useMemo, useState } from \"react\";\n\nexport type MenuButtonProps = {\n /**\n * The <MenuItem> components within the Menu.\n */\n children: Array<\n ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n >;\n /**\n * The end Icon on the trigggering Button\n */\n buttonEndIcon?: ReactElement;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: ButtonProps[\"variant\"];\n /**\n * The id of the `input` element.\n */\n id?: string;\n};\n\nconst MenuButton = ({\n buttonLabel = \"\",\n children,\n buttonEndIcon = <ChevronDownIcon />,\n buttonVariant = \"secondary\",\n id: idOverride,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const open = Boolean(anchorEl);\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n return (\n <div>\n <Button\n endIcon={buttonEndIcon}\n id={`${uniqueId}-button`}\n aria-controls={open ? `${uniqueId}-menu` : undefined}\n aria-haspopup=\"true\"\n aria-expanded={open ? \"true\" : undefined}\n onClick={handleClick}\n text={buttonLabel}\n variant={buttonVariant}\n />\n <Menu\n id={`${uniqueId}-menu`}\n anchorEl={anchorEl}\n open={open}\n onClose={handleClose}\n MenuListProps={menuListProps}\n >\n {children}\n </Menu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaEA,MAAM,EAENC,eAAe,EAGfC,IAAI,EAEJC,WAAW;AAEb,SAASC,IAAI,EAA4BC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA2B1E,MAAMC,UAAU,GAAGC,IAAA,IAMI;EAAA,IANH;IAClBC,WAAW,GAAG,EAAE;IAChBC,QAAQ;IACRC,aAAa,GAAGP,IAAA,CAACP,eAAe,IAAE,CAAC;IACnCe,aAAa,GAAG,WAAW;IAC3BC,EAAE,EAAEC;EACW,CAAC,GAAAN,IAAA;EAChB,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGd,QAAQ,CAAqB,IAAI,CAAC;EAElE,MAAMe,IAAI,GAAGC,OAAO,CAACH,QAAQ,CAAC;EAE9B,MAAMI,WAAW,GAAIC,KAAoC,IAAK;IAC5DJ,WAAW,CAACI,KAAK,CAACC,aAAa,CAAC;EAClC,CAAC;EAED,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxBN,WAAW,CAAC,IAAI,CAAC;EACnB,CAAC;EAED,MAAMO,QAAQ,GAAGxB,WAAW,CAACe,UAAU,CAAC;EAExC,MAAMU,aAAa,GAAGvB,OAAO,CAC3B,OAAO;IAAE,iBAAiB,EAAG,GAAEsB,QAAS;EAAS,CAAC,CAAC,EACnD,CAACA,QAAQ,CACX,CAAC;EAED,OACEjB,KAAA;IAAAI,QAAA,GACEN,IAAA,CAACR,MAAM;MACL6B,OAAO,EAAEd,aAAc;MACvBE,EAAE,EAAG,GAAEU,QAAS,SAAS;MACzB,iBAAeN,IAAI,GAAI,GAAEM,QAAS,OAAM,GAAGG,SAAU;MACrD,iBAAc,MAAM;MACpB,iBAAeT,IAAI,GAAG,MAAM,GAAGS,SAAU;MACzCC,OAAO,EAAER,WAAY;MACrBS,IAAI,EAAEnB,WAAY;MAClBoB,OAAO,EAAEjB;IAAc,CACxB,CAAC,EACFR,IAAA,CAACN,IAAI;MACHe,EAAE,EAAG,GAAEU,QAAS,OAAO;MACvBR,QAAQ,EAAEA,QAAS;MACnBE,IAAI,EAAEA,IAAK;MACXa,OAAO,EAAER,WAAY;MACrBS,aAAa,EAAEP,aAAc;MAAAd,QAAA,EAE5BA;IAAQ,CACL,CAAC;EAAA,CACJ,CAAC;AAEV,CAAC;AAED,MAAMsB,kBAAkB,GAAGhC,IAAI,CAACO,UAAU,CAAC;AAE3C,SAASyB,kBAAkB,IAAIzB,UAAU"}
package/dist/MenuItem.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import _MenuItem from "@mui/material/MenuItem";
2
-
3
2
  /*!
4
3
  * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
5
4
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -11,6 +10,7 @@ import _MenuItem from "@mui/material/MenuItem";
11
10
  *
12
11
  * See the License for the specific language governing permissions and limitations under the License.
13
12
  */
13
+
14
14
  import { memo, forwardRef } from "react";
15
15
  import { menuItemClasses } from "@mui/material/MenuItem";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -19,12 +19,14 @@ const MenuItem = forwardRef((_ref, ref) => {
19
19
  isDestructive,
20
20
  ...props
21
21
  } = _ref;
22
- return _jsx(_MenuItem, { ...props,
22
+ return _jsx(_MenuItem, {
23
+ ...props,
23
24
  ref: ref,
24
25
  className: isDestructive ? `${menuItemClasses.root}-destructive` : undefined,
25
26
  children: props.children
26
27
  });
27
28
  });
28
29
  const MemoizedMenuItem = memo(MenuItem);
30
+ MemoizedMenuItem.displayName = "MenuItem";
29
31
  export { MemoizedMenuItem as MenuItem };
30
32
  //# sourceMappingURL=MenuItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","names":["memo","forwardRef","menuItemClasses","MenuItem","ref","isDestructive","props","root","undefined","children","MemoizedMenuItem"],"sources":["../src/MenuItem.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, forwardRef } from \"react\";\nimport { MenuItem as MuiMenuItem } from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport type { MenuItemProps as MuiMenuItemProps } from \"@mui/material\";\n\nexport interface MenuItemProps\n extends Omit<\n MuiMenuItemProps,\n | \"component\"\n | \"dense\"\n | \"disableGutters\"\n | \"divider\"\n | \"focusVisibleClassName\"\n > {\n /**\n * Toggles whether or not the MenuItem represents a destructive action.\n */\n isDestructive?: boolean;\n}\n\nconst MenuItem = forwardRef<HTMLLIElement, MenuItemProps>(\n ({ isDestructive, ...props }, ref) => (\n <MuiMenuItem\n {...props}\n ref={ref}\n className={\n isDestructive ? `${menuItemClasses.root}-destructive` : undefined\n }\n >\n {props.children}\n </MuiMenuItem>\n )\n);\n\nconst MemoizedMenuItem = memo(MenuItem);\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,IAAT,EAAeC,UAAf,QAAiC,OAAjC;AAEA,SAASC,eAAT,QAAgC,wBAAhC;;AAkBA,MAAMC,QAAQ,GAAGF,UAAU,CACzB,OAA8BG,GAA9B;EAAA,IAAC;IAAEC,aAAF;IAAiB,GAAGC;EAApB,CAAD;EAAA,OACE,qBACMA,KADN;IAEE,GAAG,EAAEF,GAFP;IAGE,SAAS,EACPC,aAAa,GAAI,GAAEH,eAAe,CAACK,IAAK,cAA3B,GAA2CC,SAJ5D;IAAA,UAOGF,KAAK,CAACG;EAPT,EADF;AAAA,CADyB,CAA3B;AAcA,MAAMC,gBAAgB,GAAGV,IAAI,CAACG,QAAD,CAA7B;AAEA,SAASO,gBAAgB,IAAIP,QAA7B"}
1
+ {"version":3,"file":"MenuItem.js","names":["memo","forwardRef","menuItemClasses","jsx","_jsx","MenuItem","_ref","ref","isDestructive","props","_MenuItem","className","root","undefined","children","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.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, forwardRef } from \"react\";\nimport { MenuItem as MuiMenuItem } from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport type { MenuItemProps as MuiMenuItemProps } from \"@mui/material\";\n\nexport interface MenuItemProps\n extends Omit<\n MuiMenuItemProps,\n | \"component\"\n | \"dense\"\n | \"disableGutters\"\n | \"divider\"\n | \"focusVisibleClassName\"\n > {\n /**\n * Toggles whether or not the MenuItem represents a destructive action.\n */\n isDestructive?: boolean;\n}\n\nconst MenuItem = forwardRef<HTMLLIElement, MenuItemProps>(\n ({ isDestructive, ...props }, ref) => (\n <MuiMenuItem\n {...props}\n ref={ref}\n className={\n isDestructive ? `${menuItemClasses.root}-destructive` : undefined\n }\n >\n {props.children}\n </MuiMenuItem>\n )\n);\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,OAAO;AAExC,SAASC,eAAe,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAkBzD,MAAMC,QAAQ,GAAGJ,UAAU,CACzB,CAAAK,IAAA,EAA8BC,GAAG;EAAA,IAAhC;IAAEC,aAAa;IAAE,GAAGC;EAAM,CAAC,GAAAH,IAAA;EAAA,OAC1BF,IAAA,CAAAM,SAAA;IAAA,GACMD,KAAK;IACTF,GAAG,EAAEA,GAAI;IACTI,SAAS,EACPH,aAAa,GAAI,GAAEN,eAAe,CAACU,IAAK,cAAa,GAAGC,SACzD;IAAAC,QAAA,EAEAL,KAAK,CAACK;EAAQ,CACJ,CAAC;AAAA,CAElB,CAAC;AAED,MAAMC,gBAAgB,GAAGf,IAAI,CAACK,QAAQ,CAAC;AACvCU,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIV,QAAQ"}
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
+
12
13
  import { forwardRef, memo, useMemo } from "react";
13
14
  import { MuiPropsContext } from "./MuiPropsContext.js";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -17,7 +18,8 @@ const MuiPropsChild = forwardRef((_ref, ref) => {
17
18
  children,
18
19
  ...muiProps
19
20
  } = _ref;
20
- const providerValue = useMemo(() => ({ ...muiProps,
21
+ const providerValue = useMemo(() => ({
22
+ ...muiProps,
21
23
  ref
22
24
  }), [muiProps, ref]);
23
25
  return _jsx(MuiPropsContext.Provider, {
@@ -1 +1 @@
1
- {"version":3,"file":"MuiPropsChild.js","names":["forwardRef","memo","useMemo","MuiPropsContext","MuiPropsChild","ref","children","muiProps","providerValue","MemoizedMuiPropsChild"],"sources":["../src/MuiPropsChild.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, memo, ReactNode, useMemo } from \"react\";\n\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\n\nexport type MuiPropsChildProps = {\n children: ReactNode;\n};\n\nconst MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(\n ({ children, ...muiProps }, ref) => {\n const providerValue = useMemo<MuiPropsContextType>(\n () => ({\n ...muiProps,\n ref,\n }),\n [muiProps, ref]\n );\n\n return (\n <MuiPropsContext.Provider value={providerValue}>\n {children}\n </MuiPropsContext.Provider>\n );\n }\n);\n\nconst MemoizedMuiPropsChild = memo(MuiPropsChild);\n\nexport { MemoizedMuiPropsChild as MuiPropsChild };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,UAAT,EAAqBC,IAArB,EAAsCC,OAAtC,QAAqD,OAArD;SAESC,e;;AAMT,MAAMC,aAAa,GAAGJ,UAAU,CAC9B,OAA4BK,GAA5B,KAAoC;EAAA,IAAnC;IAAEC,QAAF;IAAY,GAAGC;EAAf,CAAmC;EAClC,MAAMC,aAAa,GAAGN,OAAO,CAC3B,OAAO,EACL,GAAGK,QADE;IAELF;EAFK,CAAP,CAD2B,EAK3B,CAACE,QAAD,EAAWF,GAAX,CAL2B,CAA7B;EAQA,OACE,KAAC,eAAD,CAAiB,QAAjB;IAA0B,KAAK,EAAEG,aAAjC;IAAA,UACGF;EADH,EADF;AAKD,CAf6B,CAAhC;AAkBA,MAAMG,qBAAqB,GAAGR,IAAI,CAACG,aAAD,CAAlC;AAEA,SAASK,qBAAqB,IAAIL,aAAlC"}
1
+ {"version":3,"file":"MuiPropsChild.js","names":["forwardRef","memo","useMemo","MuiPropsContext","jsx","_jsx","MuiPropsChild","_ref","ref","children","muiProps","providerValue","Provider","value","MemoizedMuiPropsChild"],"sources":["../src/MuiPropsChild.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, memo, ReactNode, useMemo } from \"react\";\n\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\n\nexport type MuiPropsChildProps = {\n children: ReactNode;\n};\n\nconst MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(\n ({ children, ...muiProps }, ref) => {\n const providerValue = useMemo<MuiPropsContextType>(\n () => ({\n ...muiProps,\n ref,\n }),\n [muiProps, ref]\n );\n\n return (\n <MuiPropsContext.Provider value={providerValue}>\n {children}\n </MuiPropsContext.Provider>\n );\n }\n);\n\nconst MemoizedMuiPropsChild = memo(MuiPropsChild);\n\nexport { MemoizedMuiPropsChild as MuiPropsChild };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAEpDC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxB,MAAMC,aAAa,GAAGN,UAAU,CAC9B,CAAAO,IAAA,EAA4BC,GAAG,KAAK;EAAA,IAAnC;IAAEC,QAAQ;IAAE,GAAGC;EAAS,CAAC,GAAAH,IAAA;EACxB,MAAMI,aAAa,GAAGT,OAAO,CAC3B,OAAO;IACL,GAAGQ,QAAQ;IACXF;EACF,CAAC,CAAC,EACF,CAACE,QAAQ,EAAEF,GAAG,CAChB,CAAC;EAED,OACEH,IAAA,CAACF,eAAe,CAACS,QAAQ;IAACC,KAAK,EAAEF,aAAc;IAAAF,QAAA,EAC5CA;EAAQ,CACe,CAAC;AAE/B,CACF,CAAC;AAED,MAAMK,qBAAqB,GAAGb,IAAI,CAACK,aAAa,CAAC;AAEjD,SAASQ,qBAAqB,IAAIR,aAAa"}
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
+
12
13
  import { createContext } from "react";
13
14
  export const MuiPropsContext = createContext({});
14
15
  //# sourceMappingURL=MuiPropsContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MuiPropsContext.js","names":["createContext","MuiPropsContext"],"sources":["../src/MuiPropsContext.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 { createContext } from \"react\";\n\nexport type MuiPropsContextType = Record<string, unknown>;\n\nexport const MuiPropsContext = createContext<MuiPropsContextType>({});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,aAAT,QAA8B,OAA9B;AAIA,OAAO,MAAMC,eAAe,GAAGD,aAAa,CAAsB,EAAtB,CAArC"}
1
+ {"version":3,"file":"MuiPropsContext.js","names":["createContext","MuiPropsContext"],"sources":["../src/MuiPropsContext.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 { createContext } from \"react\";\n\nexport type MuiPropsContextType = Record<string, unknown>;\n\nexport const MuiPropsContext = createContext<MuiPropsContextType>({});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,OAAO;AAIrC,OAAO,MAAMC,eAAe,GAAGD,aAAa,CAAsB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ import _Select from "@mui/material/Select";
2
+ /*!
3
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
4
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
5
+ *
6
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ *
11
+ * See the License for the specific language governing permissions and limitations under the License.
12
+ */
13
+
14
+ import { forwardRef, memo, useCallback } from "react";
15
+ import { Field } from "./Field.js";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ const NativeSelect = forwardRef((_ref, ref) => {
18
+ let {
19
+ defaultValue,
20
+ errorMessage,
21
+ hint,
22
+ id: idOverride,
23
+ isDisabled = false,
24
+ isMultiSelect = false,
25
+ isOptional = false,
26
+ label,
27
+ onBlur,
28
+ onChange,
29
+ onFocus,
30
+ value,
31
+ children
32
+ } = _ref;
33
+ const renderFieldComponent = useCallback(() => _jsx(_Select, {
34
+ defaultValue: defaultValue,
35
+ id: idOverride,
36
+ name: idOverride,
37
+ multiple: isMultiSelect,
38
+ native: true,
39
+ onBlur: onBlur,
40
+ onChange: onChange,
41
+ onFocus: onFocus,
42
+ ref: ref,
43
+ value: value,
44
+ children: children
45
+ }), [defaultValue, idOverride, isMultiSelect, onBlur, onChange, onFocus, ref, children, value]);
46
+ return _jsx(Field, {
47
+ errorMessage: errorMessage,
48
+ fieldType: "single",
49
+ hasVisibleLabel: true,
50
+ hint: hint,
51
+ id: idOverride,
52
+ isDisabled: isDisabled,
53
+ isOptional: isOptional,
54
+ label: label,
55
+ renderFieldComponent: renderFieldComponent
56
+ });
57
+ });
58
+ const MemoizedNativeSelect = memo(NativeSelect);
59
+ MemoizedNativeSelect.displayName = "NativeSelect";
60
+ export { MemoizedNativeSelect as NativeSelect };
61
+ //# sourceMappingURL=NativeSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeSelect.js","names":["forwardRef","memo","useCallback","Field","jsx","_jsx","NativeSelect","_ref","ref","defaultValue","errorMessage","hint","id","idOverride","isDisabled","isMultiSelect","isOptional","label","onBlur","onChange","onFocus","value","children","renderFieldComponent","_Select","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.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 { ReactElement, forwardRef, memo, useCallback } from \"react\";\nimport { Select as MuiSelect } from \"@mui/material\";\nimport { SelectProps as MuiSelectProps } from \"@mui/material\";\nimport { Field } from \"./Field\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectProps = {\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n defaultValue?: string;\n errorMessage?: string;\n hint?: string;\n id?: string;\n isDisabled?: boolean;\n isMultiSelect?: boolean;\n isOptional?: boolean;\n label: string;\n onBlur?: MuiSelectProps[\"onBlur\"];\n onChange?: MuiSelectProps[\"onChange\"];\n onFocus?: MuiSelectProps[\"onFocus\"];\n value?: string | string[];\n};\n\nconst NativeSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(\n (\n {\n defaultValue,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiSelect = false,\n isOptional = false,\n label,\n onBlur,\n onChange,\n onFocus,\n value,\n children,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n () => (\n <MuiSelect\n defaultValue={defaultValue}\n id={idOverride}\n name={idOverride}\n multiple={isMultiSelect}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n value={value}\n children={children}\n />\n ),\n [\n defaultValue,\n idOverride,\n isMultiSelect,\n onBlur,\n onChange,\n onFocus,\n ref,\n children,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAuBA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAAC,SAG3DC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAwBd,MAAMC,YAAY,GAAGN,UAAU,CAC7B,CAAAO,IAAA,EAgBEC,GAAG,KACA;EAAA,IAhBH;IACEC,YAAY;IACZC,YAAY;IACZC,IAAI;IACJC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,aAAa,GAAG,KAAK;IACrBC,UAAU,GAAG,KAAK;IAClBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,KAAK;IACLC;EACF,CAAC,GAAAf,IAAA;EAGD,MAAMgB,oBAAoB,GAAGrB,WAAW,CACtC,MACEG,IAAA,CAAAmB,OAAA;IACEf,YAAY,EAAEA,YAAa;IAC3BG,EAAE,EAAEC,UAAW;IACfY,IAAI,EAAEZ,UAAW;IACjBa,QAAQ,EAAEX,aAAc;IACxBY,MAAM,EAAE,IAAK;IACbT,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBZ,GAAG,EAAEA,GAAI;IACTa,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA;EAAS,CACpB,CACF,EACD,CACEb,YAAY,EACZI,UAAU,EACVE,aAAa,EACbG,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPZ,GAAG,EACHc,QAAQ,EACRD,KAAK,CAET,CAAC;EAED,OACEhB,IAAA,CAACF,KAAK;IACJO,YAAY,EAAEA,YAAa;IAC3BkB,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACflB,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBE,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA,KAAM;IACbM,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMO,oBAAoB,GAAG7B,IAAI,CAACK,YAAY,CAAC;AAC/CwB,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIxB,YAAY"}
@@ -9,12 +9,12 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
+
12
13
  import createCache from "@emotion/cache";
13
14
  import { CacheProvider } from "@emotion/react";
14
15
  import { memo, useMemo } from "react";
15
16
  import { useUniqueAlphabeticalId } from "./useUniqueAlphabeticalId.js";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
-
18
18
  const OdysseyCacheProvider = _ref => {
19
19
  let {
20
20
  children,
@@ -30,7 +30,6 @@ const OdysseyCacheProvider = _ref => {
30
30
  children: children
31
31
  });
32
32
  };
33
-
34
33
  const MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);
35
34
  export { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };
36
35
  //# sourceMappingURL=OdysseyCacheProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","OdysseyCacheProvider","children","nonce","uniqueAlphabeticalId","emotionCache","key","window","cspNonce","MemoizedOdysseyCacheProvider"],"sources":["../src/OdysseyCacheProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nconst OdysseyCacheProvider = ({\n children,\n nonce,\n}: {\n children: ReactElement;\n nonce?: string;\n}) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n }),\n [nonce, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA,OAAOA,WAAP,MAAwB,gBAAxB;AACA,SAASC,aAAT,QAA8B,gBAA9B;AACA,SAASC,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAESC,uB;;;AAET,MAAMC,oBAAoB,GAAG,QAMvB;EAAA,IANwB;IAC5BC,QAD4B;IAE5BC;EAF4B,CAMxB;EACJ,MAAMC,oBAAoB,GAAGJ,uBAAuB,EAApD;EAEA,MAAMK,YAAY,GAAGN,OAAO,CAC1B,MACEH,WAAW,CAAC;IACVU,GAAG,EAAEF,oBADK;IAEVD,KAAK,EAAEA,KAAK,IAAII,MAAM,CAACC;EAFb,CAAD,CAFa,EAM1B,CAACL,KAAD,EAAQC,oBAAR,CAN0B,CAA5B;EASA,OAAO,KAAC,aAAD;IAAe,KAAK,EAAEC,YAAtB;IAAA,UAAqCH;EAArC,EAAP;AACD,CAnBD;;AAqBA,MAAMO,4BAA4B,GAAGX,IAAI,CAACG,oBAAD,CAAzC;AAEA,SAASQ,4BAA4B,IAAIR,oBAAzC"}
1
+ {"version":3,"file":"OdysseyCacheProvider.js","names":["createCache","CacheProvider","memo","useMemo","useUniqueAlphabeticalId","jsx","_jsx","OdysseyCacheProvider","_ref","children","nonce","uniqueAlphabeticalId","emotionCache","key","window","cspNonce","value","MemoizedOdysseyCacheProvider"],"sources":["../src/OdysseyCacheProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\ndeclare global {\n interface Window {\n cspNonce: string;\n }\n}\n\nimport createCache from \"@emotion/cache\";\nimport { CacheProvider } from \"@emotion/react\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { useUniqueAlphabeticalId } from \"./useUniqueAlphabeticalId\";\n\nconst OdysseyCacheProvider = ({\n children,\n nonce,\n}: {\n children: ReactElement;\n nonce?: string;\n}) => {\n const uniqueAlphabeticalId = useUniqueAlphabeticalId();\n\n const emotionCache = useMemo(\n () =>\n createCache({\n key: uniqueAlphabeticalId,\n nonce: nonce || window.cspNonce,\n }),\n [nonce, uniqueAlphabeticalId]\n );\n\n return <CacheProvider value={emotionCache}>{children}</CacheProvider>;\n};\n\nconst MemoizedOdysseyCacheProvider = memo(OdysseyCacheProvider);\n\nexport { MemoizedOdysseyCacheProvider as OdysseyCacheProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,WAAW,MAAM,gBAAgB;AACxC,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAE3CC,uBAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEhC,MAAMC,oBAAoB,GAAGC,IAAA,IAMvB;EAAA,IANwB;IAC5BC,QAAQ;IACRC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAMG,oBAAoB,GAAGP,uBAAuB,CAAC,CAAC;EAEtD,MAAMQ,YAAY,GAAGT,OAAO,CAC1B,MACEH,WAAW,CAAC;IACVa,GAAG,EAAEF,oBAAoB;IACzBD,KAAK,EAAEA,KAAK,IAAII,MAAM,CAACC;EACzB,CAAC,CAAC,EACJ,CAACL,KAAK,EAAEC,oBAAoB,CAC9B,CAAC;EAED,OAAOL,IAAA,CAACL,aAAa;IAACe,KAAK,EAAEJ,YAAa;IAAAH,QAAA,EAAEA;EAAQ,CAAgB,CAAC;AACvE,CAAC;AAED,MAAMQ,4BAA4B,GAAGf,IAAI,CAACK,oBAAoB,CAAC;AAE/D,SAASU,4BAA4B,IAAIV,oBAAoB"}
@@ -0,0 +1,93 @@
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
+ import i18n from "i18next";
14
+ import { initReactI18next } from "react-i18next";
15
+ import { translation as cs } from "./properties/ts/odyssey-react-mui_cs.js";
16
+ import { translation as da } from "./properties/ts/odyssey-react-mui_da.js";
17
+ import { translation as de } from "./properties/ts/odyssey-react-mui_de.js";
18
+ import { translation as el } from "./properties/ts/odyssey-react-mui_el.js";
19
+ import { translation as en } from "./properties/ts/odyssey-react-mui.js";
20
+ import { translation as es } from "./properties/ts/odyssey-react-mui_es.js";
21
+ import { translation as fi } from "./properties/ts/odyssey-react-mui_fi.js";
22
+ import { translation as fr } from "./properties/ts/odyssey-react-mui_fr.js";
23
+ import { translation as hu } from "./properties/ts/odyssey-react-mui_hu.js";
24
+ import { translation as id } from "./properties/ts/odyssey-react-mui_id.js";
25
+ import { translation as it } from "./properties/ts/odyssey-react-mui_it.js";
26
+ import { translation as ja } from "./properties/ts/odyssey-react-mui_ja.js";
27
+ import { translation as ko } from "./properties/ts/odyssey-react-mui_ko.js";
28
+ import { translation as ms } from "./properties/ts/odyssey-react-mui_ms.js";
29
+ import { translation as nb } from "./properties/ts/odyssey-react-mui_nb.js";
30
+ import { translation as nlNL } from "./properties/ts/odyssey-react-mui_nl-NL.js";
31
+ import { translation as pl } from "./properties/ts/odyssey-react-mui_pl.js";
32
+ import { translation as ptBR } from "./properties/ts/odyssey-react-mui_pt-BR.js";
33
+ import { translation as ro } from "./properties/ts/odyssey-react-mui_ro.js";
34
+ import { translation as ru } from "./properties/ts/odyssey-react-mui_ru.js";
35
+ import { translation as sv } from "./properties/ts/odyssey-react-mui_sv.js";
36
+ import { translation as th } from "./properties/ts/odyssey-react-mui_th.js";
37
+ import { translation as tr } from "./properties/ts/odyssey-react-mui_tr.js";
38
+ import { translation as uk } from "./properties/ts/odyssey-react-mui_uk.js";
39
+ import { translation as zhCN } from "./properties/ts/odyssey-react-mui_zh-CN.js";
40
+ import { translation as znTW } from "./properties/ts/odyssey-react-mui_zh-TW.js";
41
+ import { supportedLanguages } from "./OdysseyTranslationProvider.types.js";
42
+ export const defaultLNG = "en";
43
+ export const defaultNS = "translations";
44
+ export const resources = {
45
+ cs,
46
+ da,
47
+ de,
48
+ el,
49
+ en,
50
+ es,
51
+ fi,
52
+ fr,
53
+ hu,
54
+ id,
55
+ it,
56
+ ja,
57
+ ko,
58
+ ms,
59
+ nb,
60
+ "nl-NL": nlNL,
61
+ pl,
62
+ "pt-BR": ptBR,
63
+ ro,
64
+ ru,
65
+ sv,
66
+ th,
67
+ tr,
68
+ uk,
69
+ "zh-CN": zhCN,
70
+ "zh-TW": znTW
71
+ };
72
+ i18n.use(initReactI18next).init({
73
+ defaultNS,
74
+ ns: [defaultNS],
75
+ fallbackLng: defaultLNG,
76
+ supportedLngs: supportedLanguages,
77
+ load: "currentOnly",
78
+ keySeparator: false,
79
+ interpolation: {
80
+ escapeValue: false,
81
+ skipOnVariables: false
82
+ },
83
+ react: {
84
+ useSuspense: false,
85
+ bindI18nStore: "added"
86
+ }
87
+ });
88
+ Object.entries(resources).forEach(_ref => {
89
+ let [locale, property] = _ref;
90
+ i18n.addResourceBundle(locale, defaultNS, property);
91
+ });
92
+ export default i18n;
93
+ //# sourceMappingURL=OdysseyI18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdysseyI18n.js","names":["i18n","initReactI18next","translation","cs","da","de","el","en","es","fi","fr","hu","id","it","ja","ko","ms","nb","nlNL","pl","ptBR","ro","ru","sv","th","tr","uk","zhCN","znTW","supportedLanguages","defaultLNG","defaultNS","resources","use","init","ns","fallbackLng","supportedLngs","load","keySeparator","interpolation","escapeValue","skipOnVariables","react","useSuspense","bindI18nStore","Object","entries","forEach","_ref","locale","property","addResourceBundle"],"sources":["../src/OdysseyI18n.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 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 zhCN } from \"./properties/ts/odyssey-react-mui_zh-CN\";\nimport { translation as znTW } from \"./properties/ts/odyssey-react-mui_zh-TW\";\n\nimport {\n SupportedLanguages,\n supportedLanguages,\n} from \"./OdysseyTranslationProvider.types\";\n\nexport const defaultLNG: SupportedLanguages = \"en\";\nexport const defaultNS = \"translations\";\nexport const resources = {\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 pl,\n \"pt-BR\": ptBR,\n ro,\n ru,\n sv,\n th,\n tr,\n uk,\n \"zh-CN\": zhCN,\n \"zh-TW\": znTW,\n};\n\ni18n.use(initReactI18next).init({\n defaultNS,\n ns: [defaultNS],\n fallbackLng: defaultLNG,\n supportedLngs: supportedLanguages,\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\n// eslint-disable-next-line import/no-default-export\nexport default i18n;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,SAAS;AAC1B,SAASC,gBAAgB,QAAQ,eAAe;AAAC,SAExCC,WAAW,IAAIC,EAAE;AAAA,SACjBD,WAAW,IAAIE,EAAE;AAAA,SACjBF,WAAW,IAAIG,EAAE;AAAA,SACjBH,WAAW,IAAII,EAAE;AAAA,SACjBJ,WAAW,IAAIK,EAAE;AAAA,SACjBL,WAAW,IAAIM,EAAE;AAAA,SACjBN,WAAW,IAAIO,EAAE;AAAA,SACjBP,WAAW,IAAIQ,EAAE;AAAA,SACjBR,WAAW,IAAIS,EAAE;AAAA,SACjBT,WAAW,IAAIU,EAAE;AAAA,SACjBV,WAAW,IAAIW,EAAE;AAAA,SACjBX,WAAW,IAAIY,EAAE;AAAA,SACjBZ,WAAW,IAAIa,EAAE;AAAA,SACjBb,WAAW,IAAIc,EAAE;AAAA,SACjBd,WAAW,IAAIe,EAAE;AAAA,SACjBf,WAAW,IAAIgB,IAAI;AAAA,SACnBhB,WAAW,IAAIiB,EAAE;AAAA,SACjBjB,WAAW,IAAIkB,IAAI;AAAA,SACnBlB,WAAW,IAAImB,EAAE;AAAA,SACjBnB,WAAW,IAAIoB,EAAE;AAAA,SACjBpB,WAAW,IAAIqB,EAAE;AAAA,SACjBrB,WAAW,IAAIsB,EAAE;AAAA,SACjBtB,WAAW,IAAIuB,EAAE;AAAA,SACjBvB,WAAW,IAAIwB,EAAE;AAAA,SACjBxB,WAAW,IAAIyB,IAAI;AAAA,SACnBzB,WAAW,IAAI0B,IAAI;AAAA,SAI1BC,kBAAkB;AAGpB,OAAO,MAAMC,UAA8B,GAAG,IAAI;AAClD,OAAO,MAAMC,SAAS,GAAG,cAAc;AACvC,OAAO,MAAMC,SAAS,GAAG;EACvB7B,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;EACFC,EAAE;EACF,OAAO,EAAEC,IAAI;EACbC,EAAE;EACF,OAAO,EAAEC,IAAI;EACbC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACF,OAAO,EAAEC,IAAI;EACb,OAAO,EAAEC;AACX,CAAC;AAED5B,IAAI,CAACiC,GAAG,CAAChC,gBAAgB,CAAC,CAACiC,IAAI,CAAC;EAC9BH,SAAS;EACTI,EAAE,EAAE,CAACJ,SAAS,CAAC;EACfK,WAAW,EAAEN,UAAU;EACvBO,aAAa,EAAER,kBAAkB;EACjCS,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,CAACf,SAAS,CAAC,CAACgB,OAAO,CAACC,IAAA,IAAwB;EAAA,IAAvB,CAACC,MAAM,EAAEC,QAAQ,CAAC,GAAAF,IAAA;EACnDjD,IAAI,CAACoD,iBAAiB,CAACF,MAAM,EAAEnB,SAAS,EAAEoB,QAAQ,CAAC;AACrD,CAAC,CAAC;AAGF,eAAenD,IAAI"}
@@ -9,22 +9,34 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
+
12
13
  import { memo } from "react";
13
14
  import { OdysseyCacheProvider } from "./OdysseyCacheProvider.js";
14
15
  import { OdysseyThemeProvider } from "./OdysseyThemeProvider.js";
16
+ import { OdysseyTranslationProvider } from "./OdysseyTranslationProvider.js";
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
-
17
- const ThemeProvider = _ref => {
18
+ const OdysseyProvider = _ref => {
18
19
  let {
19
- children
20
+ children,
21
+ nonce,
22
+ themeOverride,
23
+ designTokensOverride,
24
+ languageCode,
25
+ translationOverrides
20
26
  } = _ref;
21
27
  return _jsx(OdysseyCacheProvider, {
28
+ nonce: nonce,
22
29
  children: _jsx(OdysseyThemeProvider, {
23
- children: children
30
+ themeOverride: themeOverride,
31
+ designTokensOverride: designTokensOverride,
32
+ children: _jsx(OdysseyTranslationProvider, {
33
+ languageCode: languageCode,
34
+ translationOverrides: translationOverrides,
35
+ children: children
36
+ })
24
37
  })
25
38
  });
26
39
  };
27
-
28
- const MemoizedThemeProvider = memo(ThemeProvider);
29
- export { MemoizedThemeProvider as ThemeProvider };
30
- //# sourceMappingURL=ThemeProvider.js.map
40
+ const MemoizedThemeProvider = memo(OdysseyProvider);
41
+ export { MemoizedThemeProvider as OdysseyProvider };
42
+ //# sourceMappingURL=OdysseyProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","_ref","children","nonce","themeOverride","designTokensOverride","languageCode","translationOverrides","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactElement } from \"react\";\n\nimport { ThemeOptions } from \".\";\nimport { DesignTokensOverride } from \"../src/theme/index\";\nimport { OdysseyCacheProvider } from \"./OdysseyCacheProvider\";\nimport { OdysseyThemeProvider } from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n TranslationOverrides,\n} from \"./OdysseyTranslationProvider\";\nimport { SupportedLanguages } from \"./OdysseyTranslationProvider.types\";\n\ntype OdysseyProviderProps = {\n children: ReactElement;\n nonce?: string;\n themeOverride?: ThemeOptions;\n designTokensOverride?: DesignTokensOverride;\n languageCode?: SupportedLanguages;\n translationOverrides?: TranslationOverrides;\n};\n\nconst OdysseyProvider = ({\n children,\n nonce,\n themeOverride,\n designTokensOverride,\n languageCode,\n translationOverrides,\n}: OdysseyProviderProps) => (\n <OdysseyCacheProvider nonce={nonce}>\n <OdysseyThemeProvider\n themeOverride={themeOverride}\n designTokensOverride={designTokensOverride}\n >\n <OdysseyTranslationProvider\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider);\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAsB,OAAO;AAAC,SAIlCC,oBAAoB;AAAA,SACpBC,oBAAoB;AAAA,SAE3BC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAc5B,MAAMC,eAAe,GAAGC,IAAA;EAAA,IAAC;IACvBC,QAAQ;IACRC,KAAK;IACLC,aAAa;IACbC,oBAAoB;IACpBC,YAAY;IACZC;EACoB,CAAC,GAAAN,IAAA;EAAA,OACrBF,IAAA,CAACJ,oBAAoB;IAACQ,KAAK,EAAEA,KAAM;IAAAD,QAAA,EACjCH,IAAA,CAACH,oBAAoB;MACnBQ,aAAa,EAAEA,aAAc;MAC7BC,oBAAoB,EAAEA,oBAAqB;MAAAH,QAAA,EAE3CH,IAAA,CAACF,0BAA0B;QACzBS,YAAY,EAAEA,YAAa;QAC3BC,oBAAoB,EAAEA,oBAAqB;QAAAL,QAAA,EAE1CA;MAAQ,CACiB;IAAC,CACT;EAAC,CACH,CAAC;AAAA,CACxB;AAED,MAAMM,qBAAqB,GAAGd,IAAI,CAACM,eAAe,CAAC;AAEnD,SAASQ,qBAAqB,IAAIR,eAAe"}
@@ -9,24 +9,30 @@
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
+
12
13
  import { ThemeProvider as MuiThemeProvider } from "@mui/material/styles";
13
14
  import { memo, useMemo } from "react";
14
15
  import { createTheme, deepmerge } from "./index.js";
15
- import { odysseyTheme } from "./theme/index.js";
16
+ import { createOdysseyMuiTheme } from "./theme/index.js";
17
+ import * as Tokens from "@okta/odyssey-design-tokens";
16
18
  import { jsx as _jsx } from "react/jsx-runtime";
17
-
18
19
  const OdysseyThemeProvider = _ref => {
19
20
  let {
20
21
  children,
21
- themeOverride
22
+ themeOverride,
23
+ designTokensOverride
22
24
  } = _ref;
23
- const customOdysseyTheme = useMemo(() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)), [themeOverride]);
25
+ const odysseyTokens = {
26
+ ...Tokens,
27
+ ...designTokensOverride
28
+ };
29
+ const odysseyTheme = createOdysseyMuiTheme(odysseyTokens);
30
+ const customOdysseyTheme = useMemo(() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)), [odysseyTheme, themeOverride]);
24
31
  return _jsx(MuiThemeProvider, {
25
32
  theme: customOdysseyTheme ?? odysseyTheme,
26
33
  children: children
27
34
  });
28
35
  };
29
-
30
36
  const MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);
31
37
  export { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };
32
38
  //# sourceMappingURL=OdysseyThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyThemeProvider.js","names":["ThemeProvider","MuiThemeProvider","memo","useMemo","createTheme","deepmerge","odysseyTheme","OdysseyThemeProvider","children","themeOverride","customOdysseyTheme","MemoizedOdysseyThemeProvider"],"sources":["../src/OdysseyThemeProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { ThemeProvider as MuiThemeProvider } from \"@mui/material/styles\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { createTheme, deepmerge, ThemeOptions } from \".\";\nimport { odysseyTheme } from \"./theme\";\n\nconst OdysseyThemeProvider = ({\n children,\n themeOverride,\n}: {\n children: ReactElement;\n themeOverride?: ThemeOptions;\n}) => {\n const customOdysseyTheme = useMemo(\n () => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),\n [themeOverride]\n );\n\n return (\n <MuiThemeProvider theme={customOdysseyTheme ?? odysseyTheme}>\n {children}\n </MuiThemeProvider>\n );\n};\n\nconst MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);\n\nexport { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,aAAa,IAAIC,gBAA1B,QAAkD,sBAAlD;AACA,SAASC,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAESC,W,EAAaC,S;SACbC,Y;;;AAET,MAAMC,oBAAoB,GAAG,QAMvB;EAAA,IANwB;IAC5BC,QAD4B;IAE5BC;EAF4B,CAMxB;EACJ,MAAMC,kBAAkB,GAAGP,OAAO,CAChC,MAAMM,aAAa,IAAIL,WAAW,CAACC,SAAS,CAACC,YAAD,EAAeG,aAAf,CAAV,CADF,EAEhC,CAACA,aAAD,CAFgC,CAAlC;EAKA,OACE,KAAC,gBAAD;IAAkB,KAAK,EAAEC,kBAAkB,IAAIJ,YAA/C;IAAA,UACGE;EADH,EADF;AAKD,CAjBD;;AAmBA,MAAMG,4BAA4B,GAAGT,IAAI,CAACK,oBAAD,CAAzC;AAEA,SAASI,4BAA4B,IAAIJ,oBAAzC"}
1
+ {"version":3,"file":"OdysseyThemeProvider.js","names":["ThemeProvider","MuiThemeProvider","memo","useMemo","createTheme","deepmerge","createOdysseyMuiTheme","Tokens","jsx","_jsx","OdysseyThemeProvider","_ref","children","themeOverride","designTokensOverride","odysseyTokens","odysseyTheme","customOdysseyTheme","theme","MemoizedOdysseyThemeProvider"],"sources":["../src/OdysseyThemeProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { ThemeProvider as MuiThemeProvider } from \"@mui/material/styles\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { createTheme, deepmerge, ThemeOptions, DesignTokensOverride } from \".\";\nimport { createOdysseyMuiTheme } from \"./theme\";\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\n\nconst OdysseyThemeProvider = ({\n children,\n themeOverride,\n designTokensOverride,\n}: {\n children: ReactElement;\n themeOverride?: ThemeOptions;\n designTokensOverride?: DesignTokensOverride;\n}) => {\n const odysseyTokens = { ...Tokens, ...designTokensOverride };\n const odysseyTheme = createOdysseyMuiTheme(odysseyTokens);\n\n const customOdysseyTheme = useMemo(\n () => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)),\n [odysseyTheme, themeOverride]\n );\n\n return (\n <MuiThemeProvider theme={customOdysseyTheme ?? odysseyTheme}>\n {children}\n </MuiThemeProvider>\n );\n};\n\nconst MemoizedOdysseyThemeProvider = memo(OdysseyThemeProvider);\n\nexport { MemoizedOdysseyThemeProvider as OdysseyThemeProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,IAAIC,gBAAgB,QAAQ,sBAAsB;AACxE,SAASC,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAE3CC,WAAW,EAAEC,SAAS;AAAA,SACtBC,qBAAqB;AAC9B,OAAO,KAAKC,MAAM,MAAM,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtD,MAAMC,oBAAoB,GAAGC,IAAA,IAQvB;EAAA,IARwB;IAC5BC,QAAQ;IACRC,aAAa;IACbC;EAKF,CAAC,GAAAH,IAAA;EACC,MAAMI,aAAa,GAAG;IAAE,GAAGR,MAAM;IAAE,GAAGO;EAAqB,CAAC;EAC5D,MAAME,YAAY,GAAGV,qBAAqB,CAACS,aAAa,CAAC;EAEzD,MAAME,kBAAkB,GAAGd,OAAO,CAChC,MAAMU,aAAa,IAAIT,WAAW,CAACC,SAAS,CAACW,YAAY,EAAEH,aAAa,CAAC,CAAC,EAC1E,CAACG,YAAY,EAAEH,aAAa,CAC9B,CAAC;EAED,OACEJ,IAAA,CAACR,gBAAgB;IAACiB,KAAK,EAAED,kBAAkB,IAAID,YAAa;IAAAJ,QAAA,EACzDA;EAAQ,CACO,CAAC;AAEvB,CAAC;AAED,MAAMO,4BAA4B,GAAGjB,IAAI,CAACQ,oBAAoB,CAAC;AAE/D,SAASS,4BAA4B,IAAIT,oBAAoB"}
@@ -0,0 +1,47 @@
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
+ import { useEffect } from "react";
14
+ import i18n, { defaultNS, resources } from "./OdysseyI18n.js";
15
+ import { I18nextProvider } from "react-i18next";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ const mergeBundleOverrides = (languageCode, translationOverrides) => {
18
+ const bundle = resources[languageCode];
19
+ const overrides = translationOverrides[languageCode];
20
+ return {
21
+ ...bundle,
22
+ ...overrides
23
+ };
24
+ };
25
+ export const OdysseyTranslationProvider = _ref => {
26
+ let {
27
+ children,
28
+ languageCode,
29
+ translationOverrides
30
+ } = _ref;
31
+ useEffect(() => {
32
+ i18n.changeLanguage(languageCode || window.navigator.language);
33
+ }, [languageCode]);
34
+ useEffect(() => {
35
+ if (translationOverrides) {
36
+ Object.keys(translationOverrides).forEach(language => {
37
+ const bundle = mergeBundleOverrides(language, translationOverrides);
38
+ i18n.addResourceBundle(language, defaultNS, bundle);
39
+ });
40
+ }
41
+ }, [translationOverrides]);
42
+ return _jsx(I18nextProvider, {
43
+ i18n: i18n,
44
+ children: children
45
+ });
46
+ };
47
+ //# sourceMappingURL=OdysseyTranslationProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdysseyTranslationProvider.js","names":["useEffect","i18n","defaultNS","resources","I18nextProvider","jsx","_jsx","mergeBundleOverrides","languageCode","translationOverrides","bundle","overrides","OdysseyTranslationProvider","_ref","children","changeLanguage","window","navigator","language","Object","keys","forEach","addResourceBundle"],"sources":["../src/OdysseyTranslationProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { ReactElement, useEffect } from \"react\";\n\nimport { SupportedLanguages } from \"./OdysseyTranslationProvider.types\";\n\nimport i18n, { defaultNS, resources } from \"./OdysseyI18n\";\nimport { I18nextProvider } from \"react-i18next\";\n\nexport type TranslationOverrides = {\n [key in SupportedLanguages]?: Partial<(typeof resources)[\"en\"]>;\n};\n\ntype OdysseyTranslationProviderProps = {\n children: ReactElement;\n languageCode?: SupportedLanguages;\n translationOverrides?: TranslationOverrides;\n};\n\nconst mergeBundleOverrides = (\n languageCode: SupportedLanguages,\n translationOverrides: TranslationOverrides\n) => {\n const bundle = resources[languageCode];\n const overrides = translationOverrides[languageCode];\n return {\n ...bundle,\n ...overrides,\n };\n};\n\nexport const OdysseyTranslationProvider = ({\n children,\n languageCode,\n translationOverrides,\n}: OdysseyTranslationProviderProps) => {\n useEffect(() => {\n // Defaults to the browser's language if available otherwise `en` will be used\n i18n.changeLanguage(languageCode || window.navigator.language);\n }, [languageCode]);\n\n useEffect(() => {\n if (translationOverrides) {\n Object.keys(translationOverrides).forEach((language) => {\n const bundle = mergeBundleOverrides(\n language as SupportedLanguages,\n translationOverrides\n );\n i18n.addResourceBundle(language, defaultNS, bundle);\n });\n }\n }, [translationOverrides]);\n\n return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAuBA,SAAS,QAAQ,OAAO;AAAC,OAIzCC,IAAI,IAAIC,SAAS,EAAEC,SAAS;AACnC,SAASC,eAAe,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYhD,MAAMC,oBAAoB,GAAGA,CAC3BC,YAAgC,EAChCC,oBAA0C,KACvC;EACH,MAAMC,MAAM,GAAGP,SAAS,CAACK,YAAY,CAAC;EACtC,MAAMG,SAAS,GAAGF,oBAAoB,CAACD,YAAY,CAAC;EACpD,OAAO;IACL,GAAGE,MAAM;IACT,GAAGC;EACL,CAAC;AACH,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGC,IAAA,IAIH;EAAA,IAJI;IACzCC,QAAQ;IACRN,YAAY;IACZC;EAC+B,CAAC,GAAAI,IAAA;EAChCb,SAAS,CAAC,MAAM;IAEdC,IAAI,CAACc,cAAc,CAACP,YAAY,IAAIQ,MAAM,CAACC,SAAS,CAACC,QAAQ,CAAC;EAChE,CAAC,EAAE,CAACV,YAAY,CAAC,CAAC;EAElBR,SAAS,CAAC,MAAM;IACd,IAAIS,oBAAoB,EAAE;MACxBU,MAAM,CAACC,IAAI,CAACX,oBAAoB,CAAC,CAACY,OAAO,CAAEH,QAAQ,IAAK;QACtD,MAAMR,MAAM,GAAGH,oBAAoB,CACjCW,QAAQ,EACRT,oBACF,CAAC;QACDR,IAAI,CAACqB,iBAAiB,CAACJ,QAAQ,EAAEhB,SAAS,EAAEQ,MAAM,CAAC;MACrD,CAAC,CAAC;IACJ;EACF,CAAC,EAAE,CAACD,oBAAoB,CAAC,CAAC;EAE1B,OAAOH,IAAA,CAACF,eAAe;IAACH,IAAI,EAAEA,IAAK;IAAAa,QAAA,EAAEA;EAAQ,CAAkB,CAAC;AAClE,CAAC"}
@@ -0,0 +1,14 @@
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 supportedLanguages = ["cs", "da", "de", "el", "en", "es", "fi", "fr", "hu", "id", "it", "ja", "ko", "ms", "nb", "nl-NL", "pl", "pt-BR", "ro", "ru", "sv", "th", "tr", "uk", "zh-CN", "zh-TW"];
14
+ //# sourceMappingURL=OdysseyTranslationProvider.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OdysseyTranslationProvider.types.js","names":["supportedLanguages"],"sources":["../src/OdysseyTranslationProvider.types.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 supportedLanguages = [\n \"cs\", // Czech\n \"da\", // Danish\n \"de\", // German\n \"el\", // Greek\n \"en\", // English\n \"es\", // Spanish\n \"fi\", // Finnish\n \"fr\", // French\n \"hu\", // Hungarian\n \"id\", // Indonesian\n \"it\", // Italian\n \"ja\", // Japanese\n \"ko\", // Korean\n \"ms\", // Malaysian\n \"nb\", // Norwegian\n \"nl-NL\", // Dutch\n \"pl\", // Polish\n \"pt-BR\", // Portuguese (Brazil)\n \"ro\", // Romanian\n \"ru\", // Russian\n \"sv\", // Swedish\n \"th\", // Thai\n \"tr\", // Turkish\n \"uk\", // Ukrainian\n \"zh-CN\", // Chinese (PRC)\n \"zh-TW\", // Chinese\n] as const;\n\nexport type SupportedLanguages = (typeof supportedLanguages)[number];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,kBAAkB,GAAG,CAChC,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,CACC"}
@@ -1,5 +1,16 @@
1
1
  import _InputBase from "@mui/material/InputBase";
2
2
  import _InputAdornment from "@mui/material/InputAdornment";
3
+ /*!
4
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
5
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
6
+ *
7
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
8
+ * Unless required by applicable law or agreed to in writing, software
9
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ *
12
+ * See the License for the specific language governing permissions and limitations under the License.
13
+ */
3
14
  import { forwardRef, memo, useCallback, useState } from "react";
4
15
  import { EyeIcon, EyeOffIcon, IconButton } from "./index.js";
5
16
  import { Field } from "./Field.js";
@@ -69,5 +80,6 @@ const PasswordField = forwardRef((_ref, ref) => {
69
80
  });
70
81
  });
71
82
  const MemoizedPasswordField = memo(PasswordField);
83
+ MemoizedPasswordField.displayName = "PasswordField";
72
84
  export { MemoizedPasswordField as PasswordField };
73
85
  //# sourceMappingURL=PasswordField.js.map