@okta/odyssey-react-mui 0.22.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 (584) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +43 -7
  3. package/dist/@types/i18next.d.js +14 -0
  4. package/dist/@types/i18next.d.js.map +1 -0
  5. package/dist/Autocomplete.js +18 -4
  6. package/dist/Autocomplete.js.map +1 -1
  7. package/dist/Banner.js +9 -6
  8. package/dist/Banner.js.map +1 -1
  9. package/dist/Button.js +20 -10
  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 +25 -26
  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 +72 -0
  18. package/dist/Dialog.js.map +1 -0
  19. package/dist/Field.js +28 -10
  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 +19 -7
  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 +8 -8
  32. package/dist/Icon.js.map +1 -1
  33. package/dist/Infobox.js +7 -4
  34. package/dist/Infobox.js.map +1 -1
  35. package/dist/Link.js +10 -3
  36. package/dist/Link.js.map +1 -1
  37. package/dist/MenuButton.js +3 -7
  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 +32 -0
  42. package/dist/MuiPropsChild.js.map +1 -0
  43. package/dist/MuiPropsContext.js +15 -0
  44. package/dist/MuiPropsContext.js.map +1 -0
  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/OdysseyProvider.js +42 -0
  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 +20 -3
  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 +36 -28
  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 +17 -4
  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 +28 -9
  81. package/dist/TextField.js.map +1 -1
  82. package/dist/Toast.js +78 -0
  83. package/dist/Toast.js.map +1 -0
  84. package/dist/{ThemeProvider.js → ToastStack.js} +12 -10
  85. package/dist/ToastStack.js.map +1 -0
  86. package/dist/Tooltip.js +31 -0
  87. package/dist/Tooltip.js.map +1 -0
  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 +5 -6
  95. package/dist/iconDictionary/Add.js.map +1 -1
  96. package/dist/iconDictionary/AddCircle.js +5 -6
  97. package/dist/iconDictionary/AddCircle.js.map +1 -1
  98. package/dist/iconDictionary/AlertCircle.js +5 -6
  99. package/dist/iconDictionary/AlertCircle.js.map +1 -1
  100. package/dist/iconDictionary/AlertCircleFilled.js +5 -6
  101. package/dist/iconDictionary/AlertCircleFilled.js.map +1 -1
  102. package/dist/iconDictionary/AlertTriangleFilled.js +5 -6
  103. package/dist/iconDictionary/AlertTriangleFilled.js.map +1 -1
  104. package/dist/iconDictionary/Anchor.js +6 -7
  105. package/dist/iconDictionary/Anchor.js.map +1 -1
  106. package/dist/iconDictionary/ArrowDown.js +5 -6
  107. package/dist/iconDictionary/ArrowDown.js.map +1 -1
  108. package/dist/iconDictionary/ArrowLeft.js +5 -6
  109. package/dist/iconDictionary/ArrowLeft.js.map +1 -1
  110. package/dist/iconDictionary/ArrowRight.js +5 -6
  111. package/dist/iconDictionary/ArrowRight.js.map +1 -1
  112. package/dist/iconDictionary/ArrowUp.js +5 -6
  113. package/dist/iconDictionary/ArrowUp.js.map +1 -1
  114. package/dist/iconDictionary/ArrowUpDown.js +5 -6
  115. package/dist/iconDictionary/ArrowUpDown.js.map +1 -1
  116. package/dist/iconDictionary/Calendar.js +5 -6
  117. package/dist/iconDictionary/Calendar.js.map +1 -1
  118. package/dist/iconDictionary/Check.js +5 -6
  119. package/dist/iconDictionary/Check.js.map +1 -1
  120. package/dist/iconDictionary/CheckCircleFilled.js +5 -6
  121. package/dist/iconDictionary/CheckCircleFilled.js.map +1 -1
  122. package/dist/iconDictionary/ChevronDown.js +5 -6
  123. package/dist/iconDictionary/ChevronDown.js.map +1 -1
  124. package/dist/iconDictionary/ChevronUp.js +5 -6
  125. package/dist/iconDictionary/ChevronUp.js.map +1 -1
  126. package/dist/iconDictionary/Close.js +5 -6
  127. package/dist/iconDictionary/Close.js.map +1 -1
  128. package/dist/iconDictionary/CloseCircleFilled.js +5 -6
  129. package/dist/iconDictionary/CloseCircleFilled.js.map +1 -1
  130. package/dist/iconDictionary/Copy.js +5 -6
  131. package/dist/iconDictionary/Copy.js.map +1 -1
  132. package/dist/iconDictionary/Delete.js +5 -6
  133. package/dist/iconDictionary/Delete.js.map +1 -1
  134. package/dist/iconDictionary/Download.js +5 -6
  135. package/dist/iconDictionary/Download.js.map +1 -1
  136. package/dist/iconDictionary/DragHandle.js +5 -6
  137. package/dist/iconDictionary/DragHandle.js.map +1 -1
  138. package/dist/iconDictionary/Edit.js +5 -6
  139. package/dist/iconDictionary/Edit.js.map +1 -1
  140. package/dist/iconDictionary/ExternalLink.js +5 -6
  141. package/dist/iconDictionary/ExternalLink.js.map +1 -1
  142. package/dist/iconDictionary/Eye.js +5 -6
  143. package/dist/iconDictionary/Eye.js.map +1 -1
  144. package/dist/iconDictionary/EyeOff.js +5 -6
  145. package/dist/iconDictionary/EyeOff.js.map +1 -1
  146. package/dist/iconDictionary/Filter.js +5 -6
  147. package/dist/iconDictionary/Filter.js.map +1 -1
  148. package/dist/iconDictionary/Globe.js +5 -6
  149. package/dist/iconDictionary/Globe.js.map +1 -1
  150. package/dist/iconDictionary/Home.js +5 -6
  151. package/dist/iconDictionary/Home.js.map +1 -1
  152. package/dist/iconDictionary/InformationCircle.js +5 -6
  153. package/dist/iconDictionary/InformationCircle.js.map +1 -1
  154. package/dist/iconDictionary/InformationCircleFilled.js +5 -6
  155. package/dist/iconDictionary/InformationCircleFilled.js.map +1 -1
  156. package/dist/iconDictionary/Notification.js +5 -6
  157. package/dist/iconDictionary/Notification.js.map +1 -1
  158. package/dist/iconDictionary/OverflowVertical.js +5 -6
  159. package/dist/iconDictionary/OverflowVertical.js.map +1 -1
  160. package/dist/iconDictionary/QuestionCircle.js +5 -6
  161. package/dist/iconDictionary/QuestionCircle.js.map +1 -1
  162. package/dist/iconDictionary/QuestionCircleFilled.js +5 -6
  163. package/dist/iconDictionary/QuestionCircleFilled.js.map +1 -1
  164. package/dist/iconDictionary/Search.js +5 -6
  165. package/dist/iconDictionary/Search.js.map +1 -1
  166. package/dist/iconDictionary/Settings.js +4 -5
  167. package/dist/iconDictionary/Settings.js.map +1 -1
  168. package/dist/iconDictionary/Subtract.js +5 -6
  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 +5 -6
  173. package/dist/iconDictionary/User.js.map +1 -1
  174. package/dist/iconDictionary/UserGroup.js +5 -6
  175. package/dist/iconDictionary/UserGroup.js.map +1 -1
  176. package/dist/iconDictionary/index.js.map +1 -1
  177. package/dist/index.js +13 -6
  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/Autocomplete.d.ts +2 -1
  232. package/dist/src/Autocomplete.d.ts.map +1 -1
  233. package/dist/src/Banner.d.ts +19 -19
  234. package/dist/src/Banner.d.ts.map +1 -1
  235. package/dist/src/Button.d.ts +4 -3
  236. package/dist/src/Button.d.ts.map +1 -1
  237. package/dist/src/Checkbox.d.ts +4 -2
  238. package/dist/src/Checkbox.d.ts.map +1 -1
  239. package/dist/src/CheckboxGroup.d.ts +8 -4
  240. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  241. package/dist/src/Dialog.d.ts +25 -0
  242. package/dist/src/Dialog.d.ts.map +1 -0
  243. package/dist/src/Field.d.ts +18 -7
  244. package/dist/src/Field.d.ts.map +1 -1
  245. package/dist/src/FieldError.d.ts.map +1 -1
  246. package/dist/src/FieldLabel.d.ts +2 -3
  247. package/dist/src/FieldLabel.d.ts.map +1 -1
  248. package/dist/src/Fieldset.d.ts +42 -0
  249. package/dist/src/Fieldset.d.ts.map +1 -0
  250. package/dist/src/Form.d.ts +73 -0
  251. package/dist/src/Form.d.ts.map +1 -0
  252. package/dist/src/Icon.d.ts +9 -8
  253. package/dist/src/Icon.d.ts.map +1 -1
  254. package/dist/src/Infobox.d.ts +7 -7
  255. package/dist/src/Infobox.d.ts.map +1 -1
  256. package/dist/src/Link.d.ts +9 -4
  257. package/dist/src/Link.d.ts.map +1 -1
  258. package/dist/src/MenuButton.d.ts +7 -3
  259. package/dist/src/MenuButton.d.ts.map +1 -1
  260. package/dist/src/MenuItem.d.ts +1 -1
  261. package/dist/src/MenuItem.d.ts.map +1 -1
  262. package/dist/src/MuiPropsChild.d.ts +18 -0
  263. package/dist/src/MuiPropsChild.d.ts.map +1 -0
  264. package/dist/src/MuiPropsContext.d.ts +15 -0
  265. package/dist/src/MuiPropsContext.d.ts.map +1 -0
  266. package/dist/src/NativeSelect.d.ts +36 -0
  267. package/dist/src/NativeSelect.d.ts.map +1 -0
  268. package/dist/src/OdysseyI18n.d.ts +54 -0
  269. package/dist/src/OdysseyI18n.d.ts.map +1 -0
  270. package/dist/src/OdysseyProvider.d.ts +27 -0
  271. package/dist/src/OdysseyProvider.d.ts.map +1 -0
  272. package/dist/src/OdysseyThemeProvider.d.ts +4 -2
  273. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  274. package/dist/src/OdysseyTranslationProvider.d.ts +25 -0
  275. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -0
  276. package/dist/src/OdysseyTranslationProvider.types.d.ts +14 -0
  277. package/dist/src/OdysseyTranslationProvider.types.d.ts.map +1 -0
  278. package/dist/src/PasswordField.d.ts +8 -8
  279. package/dist/src/PasswordField.d.ts.map +1 -1
  280. package/dist/src/RadioGroup.d.ts +8 -8
  281. package/dist/src/RadioGroup.d.ts.map +1 -1
  282. package/dist/src/SearchField.d.ts +4 -4
  283. package/dist/src/SearchField.d.ts.map +1 -1
  284. package/dist/src/Select.d.ts +35 -0
  285. package/dist/src/Select.d.ts.map +1 -0
  286. package/dist/src/Status.d.ts +2 -2
  287. package/dist/src/Status.d.ts.map +1 -1
  288. package/dist/src/Tabs.d.ts +27 -0
  289. package/dist/src/Tabs.d.ts.map +1 -0
  290. package/dist/src/TextField.d.ts +12 -15
  291. package/dist/src/TextField.d.ts.map +1 -1
  292. package/dist/src/Toast.d.ts +60 -0
  293. package/dist/src/Toast.d.ts.map +1 -0
  294. package/dist/src/ToastStack.d.ts +19 -0
  295. package/dist/src/ToastStack.d.ts.map +1 -0
  296. package/dist/src/{ThemeProvider.d.ts → Tooltip.d.ts} +8 -4
  297. package/dist/src/Tooltip.d.ts.map +1 -0
  298. package/dist/src/iconDictionary/Add.d.ts +2 -2
  299. package/dist/src/iconDictionary/AddCircle.d.ts +2 -2
  300. package/dist/src/iconDictionary/AlertCircle.d.ts +2 -2
  301. package/dist/src/iconDictionary/AlertCircleFilled.d.ts +2 -2
  302. package/dist/src/iconDictionary/AlertTriangleFilled.d.ts +2 -2
  303. package/dist/src/iconDictionary/Anchor.d.ts +2 -2
  304. package/dist/src/iconDictionary/ArrowDown.d.ts +2 -2
  305. package/dist/src/iconDictionary/ArrowLeft.d.ts +2 -2
  306. package/dist/src/iconDictionary/ArrowRight.d.ts +2 -2
  307. package/dist/src/iconDictionary/ArrowUp.d.ts +2 -2
  308. package/dist/src/iconDictionary/ArrowUpDown.d.ts +2 -2
  309. package/dist/src/iconDictionary/Calendar.d.ts +2 -2
  310. package/dist/src/iconDictionary/Check.d.ts +2 -2
  311. package/dist/src/iconDictionary/CheckCircleFilled.d.ts +2 -2
  312. package/dist/src/iconDictionary/ChevronDown.d.ts +2 -2
  313. package/dist/src/iconDictionary/ChevronUp.d.ts +2 -2
  314. package/dist/src/iconDictionary/Close.d.ts +2 -2
  315. package/dist/src/iconDictionary/CloseCircleFilled.d.ts +2 -2
  316. package/dist/src/iconDictionary/Copy.d.ts +2 -2
  317. package/dist/src/iconDictionary/Delete.d.ts +2 -2
  318. package/dist/src/iconDictionary/Download.d.ts +2 -2
  319. package/dist/src/iconDictionary/DragHandle.d.ts +2 -2
  320. package/dist/src/iconDictionary/Edit.d.ts +2 -2
  321. package/dist/src/iconDictionary/ExternalLink.d.ts +2 -2
  322. package/dist/src/iconDictionary/Eye.d.ts +2 -2
  323. package/dist/src/iconDictionary/EyeOff.d.ts +2 -2
  324. package/dist/src/iconDictionary/Filter.d.ts +2 -2
  325. package/dist/src/iconDictionary/Globe.d.ts +2 -2
  326. package/dist/src/iconDictionary/Home.d.ts +2 -2
  327. package/dist/src/iconDictionary/InformationCircle.d.ts +2 -2
  328. package/dist/src/iconDictionary/InformationCircleFilled.d.ts +2 -2
  329. package/dist/src/iconDictionary/Notification.d.ts +2 -2
  330. package/dist/src/iconDictionary/OverflowVertical.d.ts +2 -2
  331. package/dist/src/iconDictionary/QuestionCircle.d.ts +2 -2
  332. package/dist/src/iconDictionary/QuestionCircleFilled.d.ts +2 -2
  333. package/dist/src/iconDictionary/Search.d.ts +2 -2
  334. package/dist/src/iconDictionary/Settings.d.ts +2 -2
  335. package/dist/src/iconDictionary/Subtract.d.ts +2 -2
  336. package/dist/src/iconDictionary/User.d.ts +2 -2
  337. package/dist/src/iconDictionary/UserGroup.d.ts +2 -2
  338. package/dist/src/iconDictionary/index.d.ts +40 -40
  339. package/dist/src/index.d.ts +15 -10
  340. package/dist/src/index.d.ts.map +1 -1
  341. package/dist/src/properties/ts/odyssey-react-mui.d.ts +11 -0
  342. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -0
  343. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +2 -0
  344. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -0
  345. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +2 -0
  346. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -0
  347. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +2 -0
  348. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -0
  349. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +2 -0
  350. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -0
  351. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +2 -0
  352. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -0
  353. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +2 -0
  354. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -0
  355. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +2 -0
  356. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -0
  357. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +2 -0
  358. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -0
  359. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +2 -0
  360. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -0
  361. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +2 -0
  362. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -0
  363. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +2 -0
  364. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -0
  365. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +2 -0
  366. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -0
  367. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +2 -0
  368. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -0
  369. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +2 -0
  370. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -0
  371. package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts +2 -0
  372. package/dist/src/properties/ts/odyssey-react-mui_nl-NL.d.ts.map +1 -0
  373. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +2 -0
  374. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -0
  375. package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts +2 -0
  376. package/dist/src/properties/ts/odyssey-react-mui_pt-BR.d.ts.map +1 -0
  377. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +2 -0
  378. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -0
  379. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +2 -0
  380. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -0
  381. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +2 -0
  382. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -0
  383. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +2 -0
  384. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -0
  385. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +2 -0
  386. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -0
  387. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +2 -0
  388. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -0
  389. package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts +2 -0
  390. package/dist/src/properties/ts/odyssey-react-mui_zh-CN.d.ts.map +1 -0
  391. package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts +2 -0
  392. package/dist/src/properties/ts/odyssey-react-mui_zh-TW.d.ts.map +1 -0
  393. package/dist/src/theme/components.d.ts.map +1 -1
  394. package/dist/src/theme/index.d.ts +3 -1
  395. package/dist/src/theme/index.d.ts.map +1 -1
  396. package/dist/src/theme/mixins.d.ts +2 -1
  397. package/dist/src/theme/mixins.d.ts.map +1 -1
  398. package/dist/src/theme/palette.d.ts +2 -1
  399. package/dist/src/theme/palette.d.ts.map +1 -1
  400. package/dist/src/theme/shape.d.ts +2 -1
  401. package/dist/src/theme/shape.d.ts.map +1 -1
  402. package/dist/src/theme/spacing.d.ts +2 -1
  403. package/dist/src/theme/spacing.d.ts.map +1 -1
  404. package/dist/src/theme/theme.d.ts +3 -2
  405. package/dist/src/theme/theme.d.ts.map +1 -1
  406. package/dist/src/theme/typography.d.ts +2 -1
  407. package/dist/src/theme/typography.d.ts.map +1 -1
  408. package/dist/theme/components.js +123 -85
  409. package/dist/theme/components.js.map +1 -1
  410. package/dist/theme/components.types.js +1 -0
  411. package/dist/theme/components.types.js.map +1 -1
  412. package/dist/theme/index.js +1 -1
  413. package/dist/theme/index.js.map +1 -1
  414. package/dist/theme/mixins.js +8 -6
  415. package/dist/theme/mixins.js.map +1 -1
  416. package/dist/theme/mixins.types.js +1 -0
  417. package/dist/theme/mixins.types.js.map +1 -1
  418. package/dist/theme/palette.js +89 -86
  419. package/dist/theme/palette.js.map +1 -1
  420. package/dist/theme/palette.types.js +1 -0
  421. package/dist/theme/palette.types.js.map +1 -1
  422. package/dist/theme/shape.js +6 -4
  423. package/dist/theme/shape.js.map +1 -1
  424. package/dist/theme/spacing.js +4 -1
  425. package/dist/theme/spacing.js.map +1 -1
  426. package/dist/theme/temp.js +1 -0
  427. package/dist/theme/temp.js.map +1 -1
  428. package/dist/theme/theme.js +12 -9
  429. package/dist/theme/theme.js.map +1 -1
  430. package/dist/theme/typography.js +85 -83
  431. package/dist/theme/typography.js.map +1 -1
  432. package/dist/theme/typography.types.js +1 -0
  433. package/dist/theme/typography.types.js.map +1 -1
  434. package/dist/theme/useTheme.js +1 -0
  435. package/dist/theme/useTheme.js.map +1 -1
  436. package/dist/tsconfig.production.tsbuildinfo +1 -1
  437. package/dist/useUniqueAlphabeticalId.js +1 -0
  438. package/dist/useUniqueAlphabeticalId.js.map +1 -1
  439. package/dist/useUniqueId.js +1 -0
  440. package/dist/useUniqueId.js.map +1 -1
  441. package/i18n.config.json +8 -0
  442. package/package.json +9 -4
  443. package/scripts/properties-to-ts.js +103 -0
  444. package/src/@types/i18next.d.ts +22 -0
  445. package/src/Autocomplete.tsx +10 -1
  446. package/src/Banner.tsx +37 -32
  447. package/src/Button.tsx +38 -18
  448. package/src/Checkbox.tsx +47 -21
  449. package/src/CheckboxGroup.tsx +30 -34
  450. package/src/Dialog.tsx +110 -0
  451. package/src/Field.tsx +56 -24
  452. package/src/FieldError.tsx +6 -1
  453. package/src/FieldLabel.tsx +13 -10
  454. package/src/Fieldset.tsx +95 -0
  455. package/src/Form.tsx +142 -0
  456. package/src/Icon.test.tsx +1 -1
  457. package/src/Icon.tsx +27 -13
  458. package/src/Infobox.tsx +18 -13
  459. package/src/Link.tsx +14 -6
  460. package/src/MenuButton.tsx +8 -3
  461. package/src/MenuItem.tsx +1 -0
  462. package/src/MuiPropsChild.tsx +41 -0
  463. package/src/MuiPropsContext.ts +17 -0
  464. package/src/NativeSelect.tsx +107 -0
  465. package/src/OdysseyI18n.ts +101 -0
  466. package/src/OdysseyProvider.tsx +59 -0
  467. package/src/OdysseyThemeProvider.tsx +9 -3
  468. package/src/OdysseyTranslationProvider.test.tsx +63 -0
  469. package/src/OdysseyTranslationProvider.tsx +65 -0
  470. package/src/OdysseyTranslationProvider.types.ts +42 -0
  471. package/src/PasswordField.tsx +18 -11
  472. package/src/RadioGroup.tsx +31 -46
  473. package/src/SearchField.tsx +10 -8
  474. package/src/Select.tsx +226 -0
  475. package/src/Status.tsx +2 -2
  476. package/src/Tabs.tsx +70 -0
  477. package/src/TextField.tsx +31 -25
  478. package/src/Toast.tsx +140 -0
  479. package/src/{ThemeProvider.tsx → ToastStack.tsx} +16 -9
  480. package/src/Tooltip.tsx +39 -0
  481. package/src/iconDictionary/Add.tsx +3 -3
  482. package/src/iconDictionary/AddCircle.tsx +3 -3
  483. package/src/iconDictionary/AlertCircle.tsx +3 -3
  484. package/src/iconDictionary/AlertCircleFilled.tsx +3 -3
  485. package/src/iconDictionary/AlertTriangleFilled.tsx +3 -3
  486. package/src/iconDictionary/Anchor.tsx +3 -3
  487. package/src/iconDictionary/ArrowDown.tsx +3 -3
  488. package/src/iconDictionary/ArrowLeft.tsx +3 -3
  489. package/src/iconDictionary/ArrowRight.tsx +3 -3
  490. package/src/iconDictionary/ArrowUp.tsx +3 -3
  491. package/src/iconDictionary/ArrowUpDown.tsx +3 -3
  492. package/src/iconDictionary/Calendar.tsx +3 -3
  493. package/src/iconDictionary/Check.tsx +3 -3
  494. package/src/iconDictionary/CheckCircleFilled.tsx +3 -3
  495. package/src/iconDictionary/ChevronDown.tsx +3 -3
  496. package/src/iconDictionary/ChevronUp.tsx +3 -3
  497. package/src/iconDictionary/Close.tsx +3 -3
  498. package/src/iconDictionary/CloseCircleFilled.tsx +3 -3
  499. package/src/iconDictionary/Copy.tsx +3 -3
  500. package/src/iconDictionary/Delete.tsx +3 -3
  501. package/src/iconDictionary/Download.tsx +3 -3
  502. package/src/iconDictionary/DragHandle.tsx +3 -3
  503. package/src/iconDictionary/Edit.tsx +3 -3
  504. package/src/iconDictionary/ExternalLink.tsx +3 -3
  505. package/src/iconDictionary/Eye.tsx +3 -3
  506. package/src/iconDictionary/EyeOff.tsx +3 -3
  507. package/src/iconDictionary/Filter.tsx +3 -3
  508. package/src/iconDictionary/Globe.tsx +3 -3
  509. package/src/iconDictionary/Home.tsx +3 -3
  510. package/src/iconDictionary/InformationCircle.tsx +3 -3
  511. package/src/iconDictionary/InformationCircleFilled.tsx +3 -3
  512. package/src/iconDictionary/Notification.tsx +3 -3
  513. package/src/iconDictionary/OverflowVertical.tsx +3 -3
  514. package/src/iconDictionary/QuestionCircle.tsx +3 -3
  515. package/src/iconDictionary/QuestionCircleFilled.tsx +3 -3
  516. package/src/iconDictionary/Search.tsx +3 -3
  517. package/src/iconDictionary/Settings.tsx +2 -2
  518. package/src/iconDictionary/Subtract.tsx +3 -3
  519. package/src/iconDictionary/User.tsx +3 -3
  520. package/src/iconDictionary/UserGroup.tsx +3 -3
  521. package/src/iconDictionary/index.ts +1 -1
  522. package/src/index.ts +11 -23
  523. package/src/properties/odyssey-react-mui.properties +8 -0
  524. package/src/properties/translations/odyssey-react-mui_cs.properties +0 -0
  525. package/src/properties/translations/odyssey-react-mui_da.properties +0 -0
  526. package/src/properties/translations/odyssey-react-mui_de.properties +0 -0
  527. package/src/properties/translations/odyssey-react-mui_el.properties +0 -0
  528. package/src/properties/translations/odyssey-react-mui_es.properties +0 -0
  529. package/src/properties/translations/odyssey-react-mui_fi.properties +0 -0
  530. package/src/properties/translations/odyssey-react-mui_fr.properties +0 -0
  531. package/src/properties/translations/odyssey-react-mui_hu.properties +0 -0
  532. package/src/properties/translations/odyssey-react-mui_id.properties +0 -0
  533. package/src/properties/translations/odyssey-react-mui_it.properties +0 -0
  534. package/src/properties/translations/odyssey-react-mui_ja.properties +0 -0
  535. package/src/properties/translations/odyssey-react-mui_ko.properties +0 -0
  536. package/src/properties/translations/odyssey-react-mui_ms.properties +0 -0
  537. package/src/properties/translations/odyssey-react-mui_nb.properties +0 -0
  538. package/src/properties/translations/odyssey-react-mui_nl-NL.properties +0 -0
  539. package/src/properties/translations/odyssey-react-mui_pl.properties +0 -0
  540. package/src/properties/translations/odyssey-react-mui_pt-BR.properties +0 -0
  541. package/src/properties/translations/odyssey-react-mui_ro.properties +0 -0
  542. package/src/properties/translations/odyssey-react-mui_ru.properties +0 -0
  543. package/src/properties/translations/odyssey-react-mui_sv.properties +0 -0
  544. package/src/properties/translations/odyssey-react-mui_th.properties +0 -0
  545. package/src/properties/translations/odyssey-react-mui_tr.properties +0 -0
  546. package/src/properties/translations/odyssey-react-mui_uk.properties +0 -0
  547. package/src/properties/translations/odyssey-react-mui_zh-CN.properties +0 -0
  548. package/src/properties/translations/odyssey-react-mui_zh-TW.properties +0 -0
  549. package/src/properties/ts/odyssey-react-mui.ts +1 -0
  550. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -0
  551. package/src/properties/ts/odyssey-react-mui_da.ts +1 -0
  552. package/src/properties/ts/odyssey-react-mui_de.ts +1 -0
  553. package/src/properties/ts/odyssey-react-mui_el.ts +1 -0
  554. package/src/properties/ts/odyssey-react-mui_es.ts +1 -0
  555. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -0
  556. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -0
  557. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -0
  558. package/src/properties/ts/odyssey-react-mui_id.ts +1 -0
  559. package/src/properties/ts/odyssey-react-mui_it.ts +1 -0
  560. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -0
  561. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -0
  562. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -0
  563. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -0
  564. package/src/properties/ts/odyssey-react-mui_nl-NL.ts +1 -0
  565. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -0
  566. package/src/properties/ts/odyssey-react-mui_pt-BR.ts +1 -0
  567. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -0
  568. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -0
  569. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -0
  570. package/src/properties/ts/odyssey-react-mui_th.ts +1 -0
  571. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -0
  572. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -0
  573. package/src/properties/ts/odyssey-react-mui_zh-CN.ts +1 -0
  574. package/src/properties/ts/odyssey-react-mui_zh-TW.ts +1 -0
  575. package/src/theme/components.tsx +44 -13
  576. package/src/theme/index.ts +5 -1
  577. package/src/theme/mixins.ts +10 -6
  578. package/src/theme/palette.ts +95 -88
  579. package/src/theme/shape.ts +12 -8
  580. package/src/theme/spacing.ts +17 -12
  581. package/src/theme/theme.ts +14 -10
  582. package/src/theme/typography.ts +87 -83
  583. package/dist/ThemeProvider.js.map +0 -1
  584. package/dist/src/ThemeProvider.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.js","names":["forwardRef","memo","useCallback","useState","Checkbox","Field","jsx","_jsx","jsxs","_jsxs","Select","_ref","ref","errorMessage","hint","id","idOverride","isDisabled","isMultiSelect","isOptional","label","onBlur","onChange","onChangeProp","onFocus","value","options","selectedValue","setSelectedValue","event","child","target","split","normalizedOptions","map","option","text","type","renderValue","selected","undefined","renderedChips","item","selectedOption","find","_Chip","filter","Boolean","length","_Box","children","_ListSubheader","_MenuItem","isChecked","includes","renderFieldComponent","_Select","name","multiple","fieldType","hasVisibleLabel","MemoizedSelect","displayName"],"sources":["../src/Select.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 { ReactNode, forwardRef, memo, useCallback, useState } from \"react\";\nimport {\n Box,\n Chip,\n ListSubheader,\n MenuItem,\n Select as MuiSelect,\n SelectChangeEvent,\n} from \"@mui/material\";\nimport { SelectProps as MuiSelectProps } from \"@mui/material\";\nimport { Checkbox } from \"./Checkbox\";\nimport { Field } from \"./Field\";\n\nexport type SelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type SelectProps = {\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 options: (string | SelectOption)[];\n value?: string | string[];\n};\n\n/**\n * Options in Odyssey <Select> are passed as an array, which can contain any combination\n * of the following:\n * - string — A simple string. The string will be both the text and the value of the resulting option.\n * <option value=\"string\">string</option>\n *\n * - { text: string } — Same as above, but the string is contained within an object.\n * <option value=\"text\">text</option>\n *\n * - { text: string, value: string } — The option text will be text, and the option value will be value.\n * <option value=\"value\">text</option>\n *\n * - { text: string, type: \"heading\" } — Used to display a group heading with the text\n */\n\nconst Select = forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiSelect = false,\n isOptional = false,\n label,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n value,\n options,\n },\n ref\n ) => {\n // If there's no value set, we set it to a blank string (if it's a single-select)\n // or an empty array (if it's a multi-select)\n if (typeof value === \"undefined\") {\n value = isMultiSelect ? [] : \"\";\n }\n\n const [selectedValue, setSelectedValue] = useState<string | string[]>(\n value\n );\n\n const onChange = useCallback(\n (event: SelectChangeEvent<string | string[]>, child: ReactNode) => {\n const {\n target: { value },\n } = event;\n\n // Set the field value, with some additional logic to handle array values\n // for multi-selects\n if (isMultiSelect) {\n setSelectedValue(\n typeof value === \"string\" ? value.split(\",\") : value\n );\n } else {\n setSelectedValue(value);\n }\n\n // Trigger the onChange event, if one has been passed\n if (onChangeProp) {\n onChangeProp(event, child);\n }\n },\n [isMultiSelect, onChangeProp, setSelectedValue]\n );\n\n // Normalize the options array to accommodate the various\n // data types that might be passed\n const normalizedOptions = options.map((option) => {\n if (typeof option === \"object\") {\n return {\n text: option.text,\n value: option.value || option.text,\n type: option.type === \"heading\" ? \"heading\" : \"option\",\n };\n }\n\n return { text: option, value: option, type: \"option\" };\n });\n\n const renderValue = useCallback(\n (selected: string | string[]) => {\n // If the selected value isn't an array, then we don't need to display\n // chips and should fall back to the default render behavior\n if (typeof selected === \"string\") {\n return undefined;\n }\n\n // Convert the selected options array into <Chip>s\n const renderedChips = selected\n .map((item: string) => {\n const selectedOption = normalizedOptions.find(\n (option) => option.value === item\n );\n\n if (!selectedOption) {\n return null;\n }\n\n return <Chip key={item} label={selectedOption.text} />;\n })\n .filter(Boolean);\n\n if (renderedChips.length === 0) {\n return null;\n }\n\n // We need the <Box> to surround the <Chip>s for\n // proper styling\n return <Box>{renderedChips}</Box>;\n },\n [normalizedOptions]\n );\n\n // Convert the options into the ReactNode children\n // that will populate the <Select>\n const children = normalizedOptions.map((option) => {\n if (option.type === \"heading\") {\n return <ListSubheader key={option.text}>{option.text}</ListSubheader>;\n }\n\n return (\n <MenuItem key={option.value} value={option.value}>\n {isMultiSelect && (\n <Checkbox isChecked={selectedValue.includes(option.value)} />\n )}\n {option.text}\n </MenuItem>\n );\n });\n\n const renderFieldComponent = useCallback(\n () => (\n <MuiSelect\n id={idOverride}\n name={idOverride}\n multiple={isMultiSelect}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n children={children}\n renderValue={isMultiSelect ? renderValue : undefined}\n value={selectedValue}\n />\n ),\n [\n idOverride,\n isMultiSelect,\n onBlur,\n onChange,\n onFocus,\n ref,\n children,\n renderValue,\n selectedValue,\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 MemoizedSelect = memo(Select);\nMemoizedSelect.displayName = \"Select\";\n\nexport { MemoizedSelect as Select };\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAoBA,UAAU,EAAEC,IAAI,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAUlEC,QAAQ;AAAA,SACRC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAsCd,MAAMC,MAAM,GAAGV,UAAU,CACvB,CAAAW,IAAA,EAeEC,GAAG,KACA;EAAA,IAfH;IACEC,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,EAAEC,YAAY;IACtBC,OAAO;IACPC,KAAK;IACLC;EACF,CAAC,GAAAf,IAAA;EAKD,IAAI,OAAOc,KAAK,KAAK,WAAW,EAAE;IAChCA,KAAK,GAAGP,aAAa,GAAG,EAAE,GAAG,EAAE;EACjC;EAEA,MAAM,CAACS,aAAa,EAAEC,gBAAgB,CAAC,GAAGzB,QAAQ,CAChDsB,KACF,CAAC;EAED,MAAMH,QAAQ,GAAGpB,WAAW,CAC1B,CAAC2B,KAA2C,EAAEC,KAAgB,KAAK;IACjE,MAAM;MACJC,MAAM,EAAE;QAAEN;MAAM;IAClB,CAAC,GAAGI,KAAK;IAIT,IAAIX,aAAa,EAAE;MACjBU,gBAAgB,CACd,OAAOH,KAAK,KAAK,QAAQ,GAAGA,KAAK,CAACO,KAAK,CAAC,GAAG,CAAC,GAAGP,KACjD,CAAC;IACH,CAAC,MAAM;MACLG,gBAAgB,CAACH,KAAK,CAAC;IACzB;IAGA,IAAIF,YAAY,EAAE;MAChBA,YAAY,CAACM,KAAK,EAAEC,KAAK,CAAC;IAC5B;EACF,CAAC,EACD,CAACZ,aAAa,EAAEK,YAAY,EAAEK,gBAAgB,CAChD,CAAC;EAID,MAAMK,iBAAiB,GAAGP,OAAO,CAACQ,GAAG,CAAEC,MAAM,IAAK;IAChD,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;MAC9B,OAAO;QACLC,IAAI,EAAED,MAAM,CAACC,IAAI;QACjBX,KAAK,EAAEU,MAAM,CAACV,KAAK,IAAIU,MAAM,CAACC,IAAI;QAClCC,IAAI,EAAEF,MAAM,CAACE,IAAI,KAAK,SAAS,GAAG,SAAS,GAAG;MAChD,CAAC;IACH;IAEA,OAAO;MAAED,IAAI,EAAED,MAAM;MAAEV,KAAK,EAAEU,MAAM;MAAEE,IAAI,EAAE;IAAS,CAAC;EACxD,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAGpC,WAAW,CAC5BqC,QAA2B,IAAK;IAG/B,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAE;MAChC,OAAOC,SAAS;IAClB;IAGA,MAAMC,aAAa,GAAGF,QAAQ,CAC3BL,GAAG,CAAEQ,IAAY,IAAK;MACrB,MAAMC,cAAc,GAAGV,iBAAiB,CAACW,IAAI,CAC1CT,MAAM,IAAKA,MAAM,CAACV,KAAK,KAAKiB,IAC/B,CAAC;MAED,IAAI,CAACC,cAAc,EAAE;QACnB,OAAO,IAAI;MACb;MAEA,OAAOpC,IAAA,CAAAsC,KAAA;QAAiBzB,KAAK,EAAEuB,cAAc,CAACP;MAAK,GAAjCM,IAAmC,CAAC;IACxD,CAAC,CAAC,CACDI,MAAM,CAACC,OAAO,CAAC;IAElB,IAAIN,aAAa,CAACO,MAAM,KAAK,CAAC,EAAE;MAC9B,OAAO,IAAI;IACb;IAIA,OAAOzC,IAAA,CAAA0C,IAAA;MAAAC,QAAA,EAAMT;IAAa,CAAM,CAAC;EACnC,CAAC,EACD,CAACR,iBAAiB,CACpB,CAAC;EAID,MAAMiB,QAAQ,GAAGjB,iBAAiB,CAACC,GAAG,CAAEC,MAAM,IAAK;IACjD,IAAIA,MAAM,CAACE,IAAI,KAAK,SAAS,EAAE;MAC7B,OAAO9B,IAAA,CAAA4C,cAAA;QAAAD,QAAA,EAAkCf,MAAM,CAACC;MAAI,GAAzBD,MAAM,CAACC,IAAkC,CAAC;IACvE;IAEA,OACE3B,KAAA,CAAA2C,SAAA;MAA6B3B,KAAK,EAAEU,MAAM,CAACV,KAAM;MAAAyB,QAAA,GAC9ChC,aAAa,IACZX,IAAA,CAACH,QAAQ;QAACiD,SAAS,EAAE1B,aAAa,CAAC2B,QAAQ,CAACnB,MAAM,CAACV,KAAK;MAAE,CAAE,CAC7D,EACAU,MAAM,CAACC,IAAI;IAAA,GAJCD,MAAM,CAACV,KAKZ,CAAC;EAEf,CAAC,CAAC;EAEF,MAAM8B,oBAAoB,GAAGrD,WAAW,CACtC,MACEK,IAAA,CAAAiD,OAAA;IACEzC,EAAE,EAAEC,UAAW;IACfyC,IAAI,EAAEzC,UAAW;IACjB0C,QAAQ,EAAExC,aAAc;IACxBG,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBE,OAAO,EAAEA,OAAQ;IACjBZ,GAAG,EAAEA,GAAI;IACTsC,QAAQ,EAAEA,QAAS;IACnBZ,WAAW,EAAEpB,aAAa,GAAGoB,WAAW,GAAGE,SAAU;IACrDf,KAAK,EAAEE;EAAc,CACtB,CACF,EACD,CACEX,UAAU,EACVE,aAAa,EACbG,MAAM,EACNC,QAAQ,EACRE,OAAO,EACPZ,GAAG,EACHsC,QAAQ,EACRZ,WAAW,EACXX,aAAa,CAEjB,CAAC;EAED,OACEpB,IAAA,CAACF,KAAK;IACJQ,YAAY,EAAEA,YAAa;IAC3B8C,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACf9C,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBE,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA,KAAM;IACbmC,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMM,cAAc,GAAG5D,IAAI,CAACS,MAAM,CAAC;AACnCmD,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAInD,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"Status.js","names":["Chip","Status","severity","label"],"sources":["../src/Status.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 } from \"./\";\n\nexport interface StatusProps {\n /**\n * Determine the color and icon of the alert\n */\n severity: \"default\" | \"error\" | \"info\" | \"success\" | \"warning\";\n\n /**\n * The text content of the status\n */\n label: string;\n}\n\nexport const Status = ({ severity, label }: StatusProps) => (\n <Chip label={label} color={severity} variant=\"status\" />\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;SAESA,I;;AAcT,OAAO,MAAMC,MAAM,GAAG;EAAA,IAAC;IAAEC,QAAF;IAAYC;EAAZ,CAAD;EAAA,OACpB,KAAC,IAAD;IAAM,KAAK,EAAEA,KAAb;IAAoB,KAAK,EAAED,QAA3B;IAAqC,OAAO,EAAC;EAA7C,EADoB;AAAA,CAAf"}
1
+ {"version":3,"file":"Status.js","names":["Chip","jsx","_jsx","Status","_ref","severity","label","color","variant"],"sources":["../src/Status.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 } from \"./\";\n\nexport type StatusProps = {\n /**\n * Determine the color and icon of the alert\n */\n severity: \"default\" | \"error\" | \"info\" | \"success\" | \"warning\";\n\n /**\n * The text content of the status\n */\n label: string;\n};\n\nexport const Status = ({ severity, label }: StatusProps) => (\n <Chip label={label} color={severity} variant=\"status\" />\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAYSA,IAAI;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAcb,OAAO,MAAMC,MAAM,GAAGC,IAAA;EAAA,IAAC;IAAEC,QAAQ;IAAEC;EAAmB,CAAC,GAAAF,IAAA;EAAA,OACrDF,IAAA,CAACF,IAAI;IAACM,KAAK,EAAEA,KAAM;IAACC,KAAK,EAAEF,QAAS;IAACG,OAAO,EAAC;EAAQ,CAAE,CAAC;AAAA,CACzD"}
package/dist/Tabs.js ADDED
@@ -0,0 +1,46 @@
1
+ import _Tab from "@mui/material/Tab";
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 React, { useCallback, useState } from "react";
15
+ import { TabList as MuiTabList, TabPanel as MuiTabPanel, TabContext as MuiTabContext } from "@mui/lab";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ const Tabs = _ref => {
19
+ let {
20
+ ariaLabel,
21
+ tabs,
22
+ initialValue = "0"
23
+ } = _ref;
24
+ const [tabState, setTabState] = useState(initialValue);
25
+ const onChange = useCallback((_event, newState) => {
26
+ setTabState(newState);
27
+ }, []);
28
+ return _jsxs(MuiTabContext, {
29
+ value: tabState,
30
+ children: [_jsx(MuiTabList, {
31
+ onChange: onChange,
32
+ "aria-label": ariaLabel,
33
+ children: tabs.map((tab, index) => _jsx(_Tab, {
34
+ disabled: tab.isDisabled,
35
+ icon: tab.startIcon,
36
+ label: tab.label,
37
+ value: tab.value ? tab.value : index.toString()
38
+ }, tab.value ? tab.value : index.toString()))
39
+ }), tabs.map((tab, index) => _jsx(MuiTabPanel, {
40
+ value: tab.value ? tab.value : index.toString(),
41
+ children: tab.children
42
+ }, tab.value ? tab.value : index.toString()))]
43
+ });
44
+ };
45
+ export { Tabs };
46
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.js","names":["React","useCallback","useState","TabList","MuiTabList","TabPanel","MuiTabPanel","TabContext","MuiTabContext","jsx","_jsx","jsxs","_jsxs","Tabs","_ref","ariaLabel","tabs","initialValue","tabState","setTabState","onChange","_event","newState","value","children","map","tab","index","_Tab","disabled","isDisabled","icon","startIcon","label","toString"],"sources":["../src/Tabs.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 React, { ReactElement, ReactNode, useCallback, useState } from \"react\";\nimport { Tab as MuiTab } from \"@mui/material\";\nimport {\n TabList as MuiTabList,\n TabPanel as MuiTabPanel,\n TabContext as MuiTabContext,\n} from \"@mui/lab\";\n\nexport type TabItemProps = {\n children: ReactNode;\n startIcon?: ReactElement;\n label: string;\n isDisabled?: boolean;\n value?: string;\n};\n\nexport type TabsProps = {\n tabs: TabItemProps[];\n initialValue?: string;\n ariaLabel?: string;\n};\n\nconst Tabs = ({ ariaLabel, tabs, initialValue = \"0\" }: TabsProps) => {\n const [tabState, setTabState] = useState(initialValue);\n\n const onChange = useCallback(\n (_event: React.SyntheticEvent, newState: string) => {\n setTabState(newState);\n },\n []\n );\n\n return (\n <MuiTabContext value={tabState}>\n <MuiTabList onChange={onChange} aria-label={ariaLabel}>\n {tabs.map((tab, index) => (\n <MuiTab\n disabled={tab.isDisabled}\n icon={tab.startIcon}\n label={tab.label}\n value={tab.value ? tab.value : index.toString()}\n key={tab.value ? tab.value : index.toString()}\n />\n ))}\n </MuiTabList>\n {tabs.map((tab, index) => (\n <MuiTabPanel\n value={tab.value ? tab.value : index.toString()}\n key={tab.value ? tab.value : index.toString()}\n >\n {tab.children}\n </MuiTabPanel>\n ))}\n </MuiTabContext>\n );\n};\n\nexport { Tabs };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAA6BC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE7E,SACEC,OAAO,IAAIC,UAAU,EACrBC,QAAQ,IAAIC,WAAW,EACvBC,UAAU,IAAIC,aAAa,QACtB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAgBlB,MAAMC,IAAI,GAAGC,IAAA,IAAwD;EAAA,IAAvD;IAAEC,SAAS;IAAEC,IAAI;IAAEC,YAAY,GAAG;EAAe,CAAC,GAAAH,IAAA;EAC9D,MAAM,CAACI,QAAQ,EAAEC,WAAW,CAAC,GAAGjB,QAAQ,CAACe,YAAY,CAAC;EAEtD,MAAMG,QAAQ,GAAGnB,WAAW,CAC1B,CAACoB,MAA4B,EAAEC,QAAgB,KAAK;IAClDH,WAAW,CAACG,QAAQ,CAAC;EACvB,CAAC,EACD,EACF,CAAC;EAED,OACEV,KAAA,CAACJ,aAAa;IAACe,KAAK,EAAEL,QAAS;IAAAM,QAAA,GAC7Bd,IAAA,CAACN,UAAU;MAACgB,QAAQ,EAAEA,QAAS;MAAC,cAAYL,SAAU;MAAAS,QAAA,EACnDR,IAAI,CAACS,GAAG,CAAC,CAACC,GAAG,EAAEC,KAAK,KACnBjB,IAAA,CAAAkB,IAAA;QACEC,QAAQ,EAAEH,GAAG,CAACI,UAAW;QACzBC,IAAI,EAAEL,GAAG,CAACM,SAAU;QACpBC,KAAK,EAAEP,GAAG,CAACO,KAAM;QACjBV,KAAK,EAAEG,GAAG,CAACH,KAAK,GAAGG,GAAG,CAACH,KAAK,GAAGI,KAAK,CAACO,QAAQ,CAAC;MAAE,GAC3CR,GAAG,CAACH,KAAK,GAAGG,GAAG,CAACH,KAAK,GAAGI,KAAK,CAACO,QAAQ,CAAC,CAC7C,CACF;IAAC,CACQ,CAAC,EACZlB,IAAI,CAACS,GAAG,CAAC,CAACC,GAAG,EAAEC,KAAK,KACnBjB,IAAA,CAACJ,WAAW;MACViB,KAAK,EAAEG,GAAG,CAACH,KAAK,GAAGG,GAAG,CAACH,KAAK,GAAGI,KAAK,CAACO,QAAQ,CAAC,CAAE;MAAAV,QAAA,EAG/CE,GAAG,CAACF;IAAQ,GAFRE,GAAG,CAACH,KAAK,GAAGG,GAAG,CAACH,KAAK,GAAGI,KAAK,CAACO,QAAQ,CAAC,CAGjC,CACd,CAAC;EAAA,CACW,CAAC;AAEpB,CAAC;AAED,SAASrB,IAAI"}
package/dist/Tag.js CHANGED
@@ -1,8 +1,18 @@
1
1
  import _Chip from "@mui/material/Chip";
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
+ */
2
13
  import { memo, useContext } from "react";
3
14
  import { TagListContext } from "./TagListContext.js";
4
15
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
16
  const Tag = _ref => {
7
17
  let {
8
18
  isDisabled,
@@ -22,7 +32,6 @@ const Tag = _ref => {
22
32
  onDelete: onRemove
23
33
  });
24
34
  };
25
-
26
35
  const MemoizedTag = memo(Tag);
27
36
  export { MemoizedTag as Tag };
28
37
  //# sourceMappingURL=Tag.js.map
package/dist/Tag.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","names":["memo","useContext","TagListContext","Tag","isDisabled","label","onClick","onRemove","chipElementType","MemoizedTag"],"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, ChipProps } from \"@mui/material\";\nimport { memo, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\n\nexport type TagProps = {\n isDisabled?: boolean;\n label: string;\n onClick?: ChipProps[\"onClick\"];\n onRemove?: ChipProps[\"onDelete\"];\n};\n\nconst Tag = ({ isDisabled, label, onClick, onRemove }: TagProps) => {\n const { chipElementType } = useContext(TagListContext);\n\n return (\n <Chip\n label={label}\n clickable={onClick ? true : false}\n component={chipElementType}\n disabled={isDisabled}\n onClick={onClick}\n onDelete={onRemove}\n />\n );\n};\n\nconst MemoizedTag = memo(Tag);\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAaA,SAASA,IAAT,EAAeC,UAAf,QAAiC,OAAjC;SACSC,c;;;AAST,MAAMC,GAAG,GAAG,QAAwD;EAAA,IAAvD;IAAEC,UAAF;IAAcC,KAAd;IAAqBC,OAArB;IAA8BC;EAA9B,CAAuD;EAClE,MAAM;IAAEC;EAAF,IAAsBP,UAAU,CAACC,cAAD,CAAtC;EAEA,OACE;IACE,KAAK,EAAEG,KADT;IAEE,SAAS,EAAEC,OAAO,GAAG,IAAH,GAAU,KAF9B;IAGE,SAAS,EAAEE,eAHb;IAIE,QAAQ,EAAEJ,UAJZ;IAKE,OAAO,EAAEE,OALX;IAME,QAAQ,EAAEC;EANZ,EADF;AAUD,CAbD;;AAeA,MAAME,WAAW,GAAGT,IAAI,CAACG,GAAD,CAAxB;AAEA,SAASM,WAAW,IAAIN,GAAxB"}
1
+ {"version":3,"file":"Tag.js","names":["memo","useContext","TagListContext","jsx","_jsx","Tag","_ref","isDisabled","label","onClick","onRemove","chipElementType","_Chip","clickable","component","disabled","onDelete","MemoizedTag"],"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, ChipProps } from \"@mui/material\";\nimport { memo, useContext } from \"react\";\nimport { TagListContext } from \"./TagListContext\";\n\nexport type TagProps = {\n isDisabled?: boolean;\n label: string;\n onClick?: ChipProps[\"onClick\"];\n onRemove?: ChipProps[\"onDelete\"];\n};\n\nconst Tag = ({ isDisabled, label, onClick, onRemove }: TagProps) => {\n const { chipElementType } = useContext(TagListContext);\n\n return (\n <Chip\n label={label}\n clickable={onClick ? true : false}\n component={chipElementType}\n disabled={isDisabled}\n onClick={onClick}\n onDelete={onRemove}\n />\n );\n};\n\nconst MemoizedTag = memo(Tag);\n\nexport { MemoizedTag as Tag };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,UAAU,QAAQ,OAAO;AAAC,SAChCC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASvB,MAAMC,GAAG,GAAGC,IAAA,IAAwD;EAAA,IAAvD;IAAEC,UAAU;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAmB,CAAC,GAAAJ,IAAA;EAC7D,MAAM;IAAEK;EAAgB,CAAC,GAAGV,UAAU,CAACC,cAAc,CAAC;EAEtD,OACEE,IAAA,CAAAQ,KAAA;IACEJ,KAAK,EAAEA,KAAM;IACbK,SAAS,EAAEJ,OAAO,GAAG,IAAI,GAAG,KAAM;IAClCK,SAAS,EAAEH,eAAgB;IAC3BI,QAAQ,EAAER,UAAW;IACrBE,OAAO,EAAEA,OAAQ;IACjBO,QAAQ,EAAEN;EAAS,CACpB,CAAC;AAEN,CAAC;AAED,MAAMO,WAAW,GAAGjB,IAAI,CAACK,GAAG,CAAC;AAE7B,SAASY,WAAW,IAAIZ,GAAG"}
package/dist/TagList.js CHANGED
@@ -1,8 +1,18 @@
1
1
  import _Stack from "@mui/material/Stack";
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
+ */
2
13
  import { memo, useMemo } from "react";
3
14
  import { TagListContext } from "./TagListContext.js";
4
15
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
16
  const TagList = _ref => {
7
17
  let {
8
18
  children
@@ -20,7 +30,6 @@ const TagList = _ref => {
20
30
  })
21
31
  });
22
32
  };
23
-
24
33
  const MemoizedTagList = memo(TagList);
25
34
  export { MemoizedTagList as TagList };
26
35
  //# sourceMappingURL=TagList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TagList.js","names":["memo","useMemo","TagListContext","TagList","children","providerValue","chipElementType","MemoizedTagList"],"sources":["../src/TagList.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 { Tag } from \"./\";\nimport { Stack } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\nimport { ChipElementType, TagListContext } from \"./TagListContext\";\n\nexport type TagListProps = {\n children: ReactElement<typeof Tag> | Array<ReactElement<typeof Tag>>;\n};\n\nconst TagList = ({ children }: TagListProps) => {\n const providerValue = useMemo<{\n chipElementType: ChipElementType;\n }>(\n () => ({\n chipElementType: \"li\",\n }),\n []\n );\n\n return (\n <Stack component=\"ul\" direction=\"row\" spacing={2}>\n <TagListContext.Provider value={providerValue}>\n {children}\n </TagListContext.Provider>\n </Stack>\n );\n};\n\nconst MemoizedTagList = memo(TagList);\n\nexport { MemoizedTagList as TagList };\n"],"mappings":";AAcA,SAASA,IAAT,EAA6BC,OAA7B,QAA4C,OAA5C;SAC0BC,c;;;AAM1B,MAAMC,OAAO,GAAG,QAAgC;EAAA,IAA/B;IAAEC;EAAF,CAA+B;EAC9C,MAAMC,aAAa,GAAGJ,OAAO,CAG3B,OAAO;IACLK,eAAe,EAAE;EADZ,CAAP,CAH2B,EAM3B,EAN2B,CAA7B;EASA,OACE;IAAO,SAAS,EAAC,IAAjB;IAAsB,SAAS,EAAC,KAAhC;IAAsC,OAAO,EAAE,CAA/C;IAAA,UACE,KAAC,cAAD,CAAgB,QAAhB;MAAyB,KAAK,EAAED,aAAhC;MAAA,UACGD;IADH;EADF,EADF;AAOD,CAjBD;;AAmBA,MAAMG,eAAe,GAAGP,IAAI,CAACG,OAAD,CAA5B;AAEA,SAASI,eAAe,IAAIJ,OAA5B"}
1
+ {"version":3,"file":"TagList.js","names":["memo","useMemo","TagListContext","jsx","_jsx","TagList","_ref","children","providerValue","chipElementType","_Stack","component","direction","spacing","Provider","value","MemoizedTagList"],"sources":["../src/TagList.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 { Tag } from \"./\";\nimport { Stack } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\nimport { ChipElementType, TagListContext } from \"./TagListContext\";\n\nexport type TagListProps = {\n children: ReactElement<typeof Tag> | Array<ReactElement<typeof Tag>>;\n};\n\nconst TagList = ({ children }: TagListProps) => {\n const providerValue = useMemo<{\n chipElementType: ChipElementType;\n }>(\n () => ({\n chipElementType: \"li\",\n }),\n []\n );\n\n return (\n <Stack component=\"ul\" direction=\"row\" spacing={2}>\n <TagListContext.Provider value={providerValue}>\n {children}\n </TagListContext.Provider>\n </Stack>\n );\n};\n\nconst MemoizedTagList = memo(TagList);\n\nexport { MemoizedTagList as TagList };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAC1BC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxC,MAAMC,OAAO,GAAGC,IAAA,IAAgC;EAAA,IAA/B;IAAEC;EAAuB,CAAC,GAAAD,IAAA;EACzC,MAAME,aAAa,GAAGP,OAAO,CAG3B,OAAO;IACLQ,eAAe,EAAE;EACnB,CAAC,CAAC,EACF,EACF,CAAC;EAED,OACEL,IAAA,CAAAM,MAAA;IAAOC,SAAS,EAAC,IAAI;IAACC,SAAS,EAAC,KAAK;IAACC,OAAO,EAAE,CAAE;IAAAN,QAAA,EAC/CH,IAAA,CAACF,cAAc,CAACY,QAAQ;MAACC,KAAK,EAAEP,aAAc;MAAAD,QAAA,EAC3CA;IAAQ,CACc;EAAC,CACrB,CAAC;AAEZ,CAAC;AAED,MAAMS,eAAe,GAAGhB,IAAI,CAACK,OAAO,CAAC;AAErC,SAASW,eAAe,IAAIX,OAAO"}
@@ -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 TagListContext = createContext({
14
15
  chipElementType: "div"
@@ -1 +1 @@
1
- {"version":3,"file":"TagListContext.js","names":["createContext","TagListContext","chipElementType"],"sources":["../src/TagListContext.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 { createContext } from \"react\";\n\nexport type ChipElementType = \"li\" | \"div\";\n\nexport type TagListContextType = {\n chipElementType: ChipElementType;\n};\n\nexport const TagListContext = createContext<TagListContextType>({\n chipElementType: \"div\",\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,SAASA,aAAT,QAA8B,OAA9B;AAQA,OAAO,MAAMC,cAAc,GAAGD,aAAa,CAAqB;EAC9DE,eAAe,EAAE;AAD6C,CAArB,CAApC"}
1
+ {"version":3,"file":"TagListContext.js","names":["createContext","TagListContext","chipElementType"],"sources":["../src/TagListContext.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 { createContext } from \"react\";\n\nexport type ChipElementType = \"li\" | \"div\";\n\nexport type TagListContextType = {\n chipElementType: ChipElementType;\n};\n\nexport const TagListContext = createContext<TagListContextType>({\n chipElementType: \"div\",\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,OAAO;AAQrC,OAAO,MAAMC,cAAc,GAAGD,aAAa,CAAqB;EAC9DE,eAAe,EAAE;AACnB,CAAC,CAAC"}
package/dist/TextField.js CHANGED
@@ -1,24 +1,35 @@
1
1
  import _InputBase from "@mui/material/InputBase";
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
+ */
2
14
  import { forwardRef, memo, useCallback } from "react";
3
15
  import { Field } from "./Field.js";
4
16
  import { jsx as _jsx } from "react/jsx-runtime";
5
17
  const TextField = forwardRef((_ref, ref) => {
6
18
  let {
7
19
  autoCompleteType,
8
- autoFocus,
20
+ hasInitialFocus,
9
21
  endAdornment,
10
22
  errorMessage,
11
23
  hint,
12
24
  id: idOverride,
13
25
  isDisabled = false,
14
26
  isMultiline = false,
27
+ isOptional = false,
15
28
  isReadOnly,
16
- isRequired = true,
17
29
  label,
18
30
  onBlur,
19
31
  onChange,
20
32
  onFocus,
21
- optionalLabel,
22
33
  placeholder,
23
34
  startAdornment,
24
35
  type = "text",
@@ -32,33 +43,41 @@ const TextField = forwardRef((_ref, ref) => {
32
43
  return _jsx(_InputBase, {
33
44
  "aria-describedby": ariaDescribedBy,
34
45
  autoComplete: autoCompleteType,
35
- autoFocus: autoFocus,
36
- endAdornment: endAdornment,
46
+ autoFocus: hasInitialFocus,
47
+ endAdornment: endAdornment && _jsx(_InputAdornment, {
48
+ position: "end",
49
+ children: endAdornment
50
+ }),
37
51
  id: id,
38
52
  multiline: isMultiline,
53
+ name: id,
39
54
  onBlur: onBlur,
40
55
  onChange: onChange,
41
56
  onFocus: onFocus,
42
57
  placeholder: placeholder,
43
58
  readOnly: isReadOnly,
44
59
  ref: ref,
45
- startAdornment: startAdornment,
60
+ startAdornment: startAdornment && _jsx(_InputAdornment, {
61
+ position: "start",
62
+ children: startAdornment
63
+ }),
46
64
  type: type,
47
65
  value: value
48
66
  });
49
- }, [autoCompleteType, autoFocus, endAdornment, isMultiline, onChange, onFocus, onBlur, placeholder, isReadOnly, ref, startAdornment, type, value]);
67
+ }, [autoCompleteType, hasInitialFocus, endAdornment, isMultiline, onChange, onFocus, onBlur, placeholder, isReadOnly, ref, startAdornment, type, value]);
50
68
  return _jsx(Field, {
51
69
  errorMessage: errorMessage,
70
+ fieldType: "single",
52
71
  hasVisibleLabel: true,
53
72
  hint: hint,
54
73
  id: idOverride,
55
74
  isDisabled: isDisabled,
56
- isRequired: isRequired,
75
+ isOptional: isOptional,
57
76
  label: label,
58
- optionalLabel: optionalLabel,
59
77
  renderFieldComponent: renderFieldComponent
60
78
  });
61
79
  });
62
80
  const MemoizedTextField = memo(TextField);
81
+ MemoizedTextField.displayName = "TextField";
63
82
  export { MemoizedTextField as TextField };
64
83
  //# sourceMappingURL=TextField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","Field","TextField","ref","autoCompleteType","autoFocus","endAdornment","errorMessage","hint","id","idOverride","isDisabled","isMultiline","isReadOnly","isRequired","label","onBlur","onChange","onFocus","optionalLabel","placeholder","startAdornment","type","value","renderFieldComponent","ariaDescribedBy","MemoizedTextField"],"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 { InputBase } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactNode,\n useCallback,\n} from \"react\";\n\nimport { Field } from \"./Field\";\n\nexport type TextFieldProps = {\n /**\n * If `true`, the component will receive focus automatically.\n */\n autoFocus?: boolean;\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 * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: ReactNode;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: boolean;\n /**\n * If `true`, the `input` element is required.\n */\n isRequired?: 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 label for the `input` element if the it's not optional\n */\n optionalLabel?: string;\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?: ReactNode;\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?: \"email\" | \"number\" | \"tel\" | \"text\" | \"url\";\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n autoFocus,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiline = false,\n isReadOnly,\n isRequired = true,\n label,\n onBlur,\n onChange,\n onFocus,\n optionalLabel,\n placeholder,\n startAdornment,\n type = \"text\",\n value,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, id }) => (\n <InputBase\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={autoFocus}\n endAdornment={endAdornment}\n id={id}\n multiline={isMultiline}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={startAdornment}\n type={type}\n value={value}\n />\n ),\n [\n autoCompleteType,\n autoFocus,\n endAdornment,\n isMultiline,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isReadOnly,\n ref,\n startAdornment,\n type,\n value,\n ]\n );\n\n return (\n <Field\n errorMessage={errorMessage}\n hasVisibleLabel\n hint={hint}\n id={idOverride}\n isDisabled={isDisabled}\n isRequired={isRequired}\n label={label}\n optionalLabel={optionalLabel}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedTextField = memo(TextField);\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";AAaA,SAGEA,UAHF,EAKEC,IALF,EAOEC,WAPF,QAQO,OARP;SAUSC,K;;AAmFT,MAAMC,SAAS,GAAGJ,UAAU,CAC1B,OAsBEK,GAtBF,KAuBK;EAAA,IAtBH;IACEC,gBADF;IAEEC,SAFF;IAGEC,YAHF;IAIEC,YAJF;IAKEC,IALF;IAMEC,EAAE,EAAEC,UANN;IAOEC,UAAU,GAAG,KAPf;IAQEC,WAAW,GAAG,KARhB;IASEC,UATF;IAUEC,UAAU,GAAG,IAVf;IAWEC,KAXF;IAYEC,MAZF;IAaEC,QAbF;IAcEC,OAdF;IAeEC,aAfF;IAgBEC,WAhBF;IAiBEC,cAjBF;IAkBEC,IAAI,GAAG,MAlBT;IAmBEC;EAnBF,CAsBG;EACH,MAAMC,oBAAoB,GAAGxB,WAAW,CACtC;IAAA,IAAC;MAAEyB,eAAF;MAAmBhB;IAAnB,CAAD;IAAA,OACE;MACE,oBAAkBgB,eADpB;MAEE,YAAY,EAAErB,gBAFhB;MAIE,SAAS,EAAEC,SAJb;MAKE,YAAY,EAAEC,YALhB;MAME,EAAE,EAAEG,EANN;MAOE,SAAS,EAAEG,WAPb;MAQE,MAAM,EAAEI,MARV;MASE,QAAQ,EAAEC,QATZ;MAUE,OAAO,EAAEC,OAVX;MAWE,WAAW,EAAEE,WAXf;MAYE,QAAQ,EAAEP,UAZZ;MAaE,GAAG,EAAEV,GAbP;MAcE,cAAc,EAAEkB,cAdlB;MAeE,IAAI,EAAEC,IAfR;MAgBE,KAAK,EAAEC;IAhBT,EADF;EAAA,CADsC,EAqBtC,CACEnB,gBADF,EAEEC,SAFF,EAGEC,YAHF,EAIEM,WAJF,EAKEK,QALF,EAMEC,OANF,EAOEF,MAPF,EAQEI,WARF,EASEP,UATF,EAUEV,GAVF,EAWEkB,cAXF,EAYEC,IAZF,EAaEC,KAbF,CArBsC,CAAxC;EAsCA,OACE,KAAC,KAAD;IACE,YAAY,EAAEhB,YADhB;IAEE,eAAe,MAFjB;IAGE,IAAI,EAAEC,IAHR;IAIE,EAAE,EAAEE,UAJN;IAKE,UAAU,EAAEC,UALd;IAME,UAAU,EAAEG,UANd;IAOE,KAAK,EAAEC,KAPT;IAQE,aAAa,EAAEI,aARjB;IASE,oBAAoB,EAAEK;EATxB,EADF;AAaD,CA5EyB,CAA5B;AA+EA,MAAME,iBAAiB,GAAG3B,IAAI,CAACG,SAAD,CAA9B;AAEA,SAASwB,iBAAiB,IAAIxB,SAA9B"}
1
+ {"version":3,"file":"TextField.js","names":["forwardRef","memo","useCallback","Field","jsx","_jsx","TextField","_ref","ref","autoCompleteType","hasInitialFocus","endAdornment","errorMessage","hint","id","idOverride","isDisabled","isMultiline","isOptional","isReadOnly","label","onBlur","onChange","onFocus","placeholder","startAdornment","type","value","renderFieldComponent","_ref2","ariaDescribedBy","_InputBase","autoComplete","autoFocus","_InputAdornment","position","children","multiline","name","readOnly","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 { InputAdornment, InputBase } from \"@mui/material\";\nimport {\n ChangeEventHandler,\n FocusEventHandler,\n forwardRef,\n InputHTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n} from \"react\";\n\nimport { Field } from \"./Field\";\nimport { Icon } from \"./Icon\";\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 * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment?: string | ReactElement<typeof Icon>;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * If `true`, the component will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * The id of the `input` element.\n */\n id?: string;\n /**\n * If `true`, the component is disabled.\n */\n isDisabled?: boolean;\n /**\n * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.\n */\n isMultiline?: boolean;\n /**\n * If `true`, the `input` element is not required.\n */\n isOptional?: boolean;\n /**\n * It prevents the user from changing the value of the field\n */\n isReadOnly?: 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<typeof Icon>;\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?: \"email\" | \"number\" | \"tel\" | \"text\" | \"url\";\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value?: string;\n};\n\nconst TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n autoCompleteType,\n hasInitialFocus,\n endAdornment,\n errorMessage,\n hint,\n id: idOverride,\n isDisabled = false,\n isMultiline = false,\n isOptional = false,\n isReadOnly,\n label,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n startAdornment,\n type = \"text\",\n value,\n },\n ref\n ) => {\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, id }) => (\n <InputBase\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\">{endAdornment}</InputAdornment>\n )\n }\n id={id}\n multiline={isMultiline}\n name={id}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n readOnly={isReadOnly}\n ref={ref}\n startAdornment={\n startAdornment && (\n <InputAdornment position=\"start\">{startAdornment}</InputAdornment>\n )\n }\n type={type}\n value={value}\n />\n ),\n [\n autoCompleteType,\n hasInitialFocus,\n endAdornment,\n isMultiline,\n onChange,\n onFocus,\n onBlur,\n placeholder,\n isReadOnly,\n ref,\n startAdornment,\n type,\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 MemoizedTextField = memo(TextField);\nMemoizedTextField.displayName = \"TextField\";\n\nexport { MemoizedTextField as TextField };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAGEA,UAAU,EAEVC,IAAI,EAEJC,WAAW,QACN,OAAO;AAAC,SAENC,KAAK;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAgFd,MAAMC,SAAS,GAAGN,UAAU,CAC1B,CAAAO,IAAA,EAqBEC,GAAG,KACA;EAAA,IArBH;IACEC,gBAAgB;IAChBC,eAAe;IACfC,YAAY;IACZC,YAAY;IACZC,IAAI;IACJC,EAAE,EAAEC,UAAU;IACdC,UAAU,GAAG,KAAK;IAClBC,WAAW,GAAG,KAAK;IACnBC,UAAU,GAAG,KAAK;IAClBC,UAAU;IACVC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,OAAO;IACPC,WAAW;IACXC,cAAc;IACdC,IAAI,GAAG,MAAM;IACbC;EACF,CAAC,GAAApB,IAAA;EAGD,MAAMqB,oBAAoB,GAAG1B,WAAW,CACtC2B,KAAA;IAAA,IAAC;MAAEC,eAAe;MAAEhB;IAAG,CAAC,GAAAe,KAAA;IAAA,OACtBxB,IAAA,CAAA0B,UAAA;MACE,oBAAkBD,eAAgB;MAClCE,YAAY,EAAEvB,gBAAiB;MAE/BwB,SAAS,EAAEvB,eAAgB;MAC3BC,YAAY,EACVA,YAAY,IACVN,IAAA,CAAA6B,eAAA;QAAgBC,QAAQ,EAAC,KAAK;QAAAC,QAAA,EAAEzB;MAAY,CAAiB,CAEhE;MACDG,EAAE,EAAEA,EAAG;MACPuB,SAAS,EAAEpB,WAAY;MACvBqB,IAAI,EAAExB,EAAG;MACTO,MAAM,EAAEA,MAAO;MACfC,QAAQ,EAAEA,QAAS;MACnBC,OAAO,EAAEA,OAAQ;MACjBC,WAAW,EAAEA,WAAY;MACzBe,QAAQ,EAAEpB,UAAW;MACrBX,GAAG,EAAEA,GAAI;MACTiB,cAAc,EACZA,cAAc,IACZpB,IAAA,CAAA6B,eAAA;QAAgBC,QAAQ,EAAC,OAAO;QAAAC,QAAA,EAAEX;MAAc,CAAiB,CAEpE;MACDC,IAAI,EAAEA,IAAK;MACXC,KAAK,EAAEA;IAAM,CACd,CAAC;EAAA,CACH,EACD,CACElB,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZM,WAAW,EACXK,QAAQ,EACRC,OAAO,EACPF,MAAM,EACNG,WAAW,EACXL,UAAU,EACVX,GAAG,EACHiB,cAAc,EACdC,IAAI,EACJC,KAAK,CAET,CAAC;EAED,OACEtB,IAAA,CAACF,KAAK;IACJS,YAAY,EAAEA,YAAa;IAC3B4B,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACf5B,IAAI,EAAEA,IAAK;IACXC,EAAE,EAAEC,UAAW;IACfC,UAAU,EAAEA,UAAW;IACvBE,UAAU,EAAEA,UAAW;IACvBE,KAAK,EAAEA,KAAM;IACbQ,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMc,iBAAiB,GAAGzC,IAAI,CAACK,SAAS,CAAC;AACzCoC,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIpC,SAAS"}
package/dist/Toast.js ADDED
@@ -0,0 +1,78 @@
1
+ /*!
2
+ * Copyright (c) 2022-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, memo, useState, useCallback } from "react";
14
+ import { Alert, AlertTitle, CloseIcon, Link, Snackbar, visuallyHidden } from "./index.js";
15
+ import { Button } from "./Button.js";
16
+ import { useTranslation } from "react-i18next";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ const ClickAwayListenerProps = {
20
+ onClickAway: () => false
21
+ };
22
+ const Toast = _ref => {
23
+ let {
24
+ autoHideDuration = 6000,
25
+ isDismissable,
26
+ linkText,
27
+ linkUrl,
28
+ isVisible: isVisibleProp,
29
+ onHide: onHideProp,
30
+ role,
31
+ severity,
32
+ text
33
+ } = _ref;
34
+ const {
35
+ t
36
+ } = useTranslation();
37
+ const [isVisible, setIsVisible] = useState(isVisibleProp);
38
+ useEffect(() => {
39
+ setIsVisible(isVisibleProp);
40
+ }, [isVisibleProp]);
41
+ const onHide = useCallback(() => {
42
+ setIsVisible(false);
43
+ onHideProp?.();
44
+ }, [onHideProp]);
45
+ return _jsx(Snackbar, {
46
+ open: isVisible,
47
+ autoHideDuration: isDismissable || autoHideDuration <= 0 ? undefined : autoHideDuration,
48
+ onClose: onHide,
49
+ className: "Toast",
50
+ ClickAwayListenerProps: ClickAwayListenerProps,
51
+ children: _jsxs(Alert, {
52
+ action: isDismissable === true && _jsx(Button, {
53
+ "aria-label": t("toast.close.text"),
54
+ onClick: onHide,
55
+ size: "small",
56
+ startIcon: _jsx(CloseIcon, {}),
57
+ variant: "floating"
58
+ }),
59
+ role: role,
60
+ severity: severity,
61
+ variant: "toast",
62
+ children: [_jsxs(AlertTitle, {
63
+ children: [_jsxs("span", {
64
+ style: visuallyHidden,
65
+ children: [severity, ":"]
66
+ }), text]
67
+ }), linkUrl && _jsx(Link, {
68
+ href: linkUrl,
69
+ variant: "monochrome",
70
+ children: linkText
71
+ })]
72
+ })
73
+ });
74
+ };
75
+ const MemoizedToast = memo(Toast);
76
+ MemoizedToast.displayName = "Toast";
77
+ export { MemoizedToast as Toast };
78
+ //# sourceMappingURL=Toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.js","names":["useEffect","memo","useState","useCallback","Alert","AlertTitle","CloseIcon","Link","Snackbar","visuallyHidden","Button","useTranslation","jsx","_jsx","jsxs","_jsxs","ClickAwayListenerProps","onClickAway","Toast","_ref","autoHideDuration","isDismissable","linkText","linkUrl","isVisible","isVisibleProp","onHide","onHideProp","role","severity","text","t","setIsVisible","open","undefined","onClose","className","children","action","onClick","size","startIcon","variant","style","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 { AlertColor } from \"@mui/material\";\nimport { useEffect, memo, useState, useCallback } from \"react\";\nimport {\n Alert,\n AlertTitle,\n CloseIcon,\n Link,\n Snackbar,\n visuallyHidden,\n} from \".\";\nimport { Button } from \"./Button\";\nimport { useTranslation } from \"react-i18next\";\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 alert 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 alert 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 alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: \"status\" | \"alert\";\n /**\n * Determine the color and icon of the alert\n */\n severity: AlertColor;\n /**\n * The text content of the alert\n */\n text: string;\n};\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 text,\n}: ToastProps) => {\n const { t } = useTranslation();\n\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 <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 aria-label={t(\"toast.close.text\")}\n onClick={onHide}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n )\n }\n role={role}\n severity={severity}\n variant=\"toast\"\n >\n <AlertTitle>\n <span style={visuallyHidden}>{severity}:</span>\n {text}\n </AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\">\n {linkText}\n </Link>\n )}\n </Alert>\n </Snackbar>\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;;AAGA,SAASA,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAAC,SAE7DC,KAAK,EACLC,UAAU,EACVC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,cAAc;AAAA,SAEPC,MAAM;AACf,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA+C/C,MAAMC,sBAAsB,GAAG;EAAEC,WAAW,EAAEA,CAAA,KAAM;AAAM,CAAC;AAE3D,MAAMC,KAAK,GAAGC,IAAA,IAUI;EAAA,IAVH;IACbC,gBAAgB,GAAG,IAAI;IACvBC,aAAa;IACbC,QAAQ;IACRC,OAAO;IACPC,SAAS,EAAEC,aAAa;IACxBC,MAAM,EAAEC,UAAU;IAClBC,IAAI;IACJC,QAAQ;IACRC;EACU,CAAC,GAAAX,IAAA;EACX,MAAM;IAAEY;EAAE,CAAC,GAAGpB,cAAc,CAAC,CAAC;EAE9B,MAAM,CAACa,SAAS,EAAEQ,YAAY,CAAC,GAAG9B,QAAQ,CAACuB,aAAa,CAAC;EAEzDzB,SAAS,CAAC,MAAM;IACdgC,YAAY,CAACP,aAAa,CAAC;EAC7B,CAAC,EAAE,CAACA,aAAa,CAAC,CAAC;EAEnB,MAAMC,MAAM,GAAGvB,WAAW,CAAC,MAAM;IAC/B6B,YAAY,CAAC,KAAK,CAAC;IACnBL,UAAU,GAAG,CAAC;EAChB,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,OACEd,IAAA,CAACL,QAAQ;IACPyB,IAAI,EAAET,SAAU;IAChBJ,gBAAgB,EACdC,aAAa,IAAID,gBAAgB,IAAI,CAAC,GAAGc,SAAS,GAAGd,gBACtD;IACDe,OAAO,EAAET,MAAO;IAChBU,SAAS,EAAC,OAAO;IACjBpB,sBAAsB,EAAEA,sBAAuB;IAAAqB,QAAA,EAE/CtB,KAAA,CAACX,KAAK;MACJkC,MAAM,EACJjB,aAAa,KAAK,IAAI,IACpBR,IAAA,CAACH,MAAM;QACL,cAAYqB,CAAC,CAAC,kBAAkB,CAAE;QAClCQ,OAAO,EAAEb,MAAO;QAChBc,IAAI,EAAC,OAAO;QACZC,SAAS,EAAE5B,IAAA,CAACP,SAAS,IAAE,CAAE;QACzBoC,OAAO,EAAC;MAAU,CACnB,CAEJ;MACDd,IAAI,EAAEA,IAAK;MACXC,QAAQ,EAAEA,QAAS;MACnBa,OAAO,EAAC,OAAO;MAAAL,QAAA,GAEftB,KAAA,CAACV,UAAU;QAAAgC,QAAA,GACTtB,KAAA;UAAM4B,KAAK,EAAElC,cAAe;UAAA4B,QAAA,GAAER,QAAQ,EAAC,GAAC;QAAA,CAAM,CAAC,EAC9CC,IAAI;MAAA,CACK,CAAC,EACZP,OAAO,IACNV,IAAA,CAACN,IAAI;QAACqC,IAAI,EAAErB,OAAQ;QAACmB,OAAO,EAAC,YAAY;QAAAL,QAAA,EACtCf;MAAQ,CACL,CACP;IAAA,CACI;EAAC,CACA,CAAC;AAEf,CAAC;AAED,MAAMuB,aAAa,GAAG5C,IAAI,CAACiB,KAAK,CAAC;AACjC2B,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI3B,KAAK"}
@@ -9,22 +9,24 @@
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
- import { OdysseyCacheProvider } from "./OdysseyCacheProvider.js";
14
- import { OdysseyThemeProvider } from "./OdysseyThemeProvider.js";
14
+ import { Box, Snackbar } from "./index.js";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
-
17
- const ThemeProvider = _ref => {
16
+ const ToastStack = _ref => {
18
17
  let {
19
18
  children
20
19
  } = _ref;
21
- return _jsx(OdysseyCacheProvider, {
22
- children: _jsx(OdysseyThemeProvider, {
20
+ return _jsx(Snackbar, {
21
+ open: true,
22
+ children: _jsx(Box, {
23
+ display: "flex",
24
+ flexDirection: "column-reverse",
25
+ gap: 2,
23
26
  children: children
24
27
  })
25
28
  });
26
29
  };
27
-
28
- const MemoizedThemeProvider = memo(ThemeProvider);
29
- export { MemoizedThemeProvider as ThemeProvider };
30
- //# sourceMappingURL=ThemeProvider.js.map
30
+ const MemoizedToastStack = memo(ToastStack);
31
+ export { MemoizedToastStack as ToastStack };
32
+ //# sourceMappingURL=ToastStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastStack.js","names":["memo","Box","Snackbar","jsx","_jsx","ToastStack","_ref","children","open","display","flexDirection","gap","MemoizedToastStack"],"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 \".\";\nimport { Toast } from \"./Toast\";\n\nexport type ToastStackProps = {\n children: ReactElement<typeof Toast> | Array<ReactElement<typeof Toast>>;\n};\n\nconst ToastStack = ({ children }: ToastStackProps) => {\n return (\n <Snackbar open={true}>\n <Box display=\"flex\" flexDirection=\"column-reverse\" gap={2}>\n {children}\n </Box>\n </Snackbar>\n );\n};\n\nconst MemoizedToastStack = memo(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,SAClCC,GAAG,EAAEC,QAAQ;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOtB,MAAMC,UAAU,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC;EAA0B,CAAC,GAAAD,IAAA;EAC/C,OACEF,IAAA,CAACF,QAAQ;IAACM,IAAI,EAAE,IAAK;IAAAD,QAAA,EACnBH,IAAA,CAACH,GAAG;MAACQ,OAAO,EAAC,MAAM;MAACC,aAAa,EAAC,gBAAgB;MAACC,GAAG,EAAE,CAAE;MAAAJ,QAAA,EACvDA;IAAQ,CACN;EAAC,CACE,CAAC;AAEf,CAAC;AAED,MAAMK,kBAAkB,GAAGZ,IAAI,CAACK,UAAU,CAAC;AAE3C,SAASO,kBAAkB,IAAIP,UAAU"}
@@ -0,0 +1,31 @@
1
+ import _Tooltip from "@mui/material/Tooltip";
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
+ import { MuiPropsChild } from "./MuiPropsChild.js";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ export const Tooltip = _ref => {
16
+ let {
17
+ ariaType,
18
+ children,
19
+ text,
20
+ placement
21
+ } = _ref;
22
+ return _jsx(_Tooltip, {
23
+ describeChild: ariaType === "description",
24
+ placement: placement,
25
+ title: text,
26
+ children: _jsx(MuiPropsChild, {
27
+ children: children
28
+ })
29
+ });
30
+ };
31
+ //# sourceMappingURL=Tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.js","names":["MuiPropsChild","jsx","_jsx","Tooltip","_ref","ariaType","children","text","placement","_Tooltip","describeChild","title"],"sources":["../src/Tooltip.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 { Tooltip as MuiTooltip } from \"@mui/material\";\nimport type { TooltipProps as MuiTooltipProps } from \"@mui/material\";\n\nimport { MuiPropsChild } from \"./MuiPropsChild\";\nimport { ReactElement } from \"react\";\n\nexport type TooltipProps = {\n children: ReactElement;\n ariaType: \"description\" | \"label\";\n text: string;\n placement?: MuiTooltipProps[\"placement\"];\n};\n\nexport const Tooltip = ({\n ariaType,\n children,\n text,\n placement,\n}: TooltipProps) => (\n <MuiTooltip\n describeChild={ariaType === \"description\"}\n placement={placement}\n title={text}\n >\n <MuiPropsChild>{children}</MuiPropsChild>\n </MuiTooltip>\n);\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAeSA,aAAa;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUtB,OAAO,MAAMC,OAAO,GAAGC,IAAA;EAAA,IAAC;IACtBC,QAAQ;IACRC,QAAQ;IACRC,IAAI;IACJC;EACY,CAAC,GAAAJ,IAAA;EAAA,OACbF,IAAA,CAAAO,QAAA;IACEC,aAAa,EAAEL,QAAQ,KAAK,aAAc;IAC1CG,SAAS,EAAEA,SAAU;IACrBG,KAAK,EAAEJ,IAAK;IAAAD,QAAA,EAEZJ,IAAA,CAACF,aAAa;MAAAM,QAAA,EAAEA;IAAQ,CAAgB;EAAC,CAC/B,CAAC;AAAA,CACd"}
package/dist/a11yCheck.js CHANGED
@@ -8,8 +8,7 @@
8
8
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
- */
12
- import { axe } from "jest-axe";
11
+ */import { axe } from "jest-axe";
13
12
  export const a11yCheck = renderFn => {
14
13
  describe("accessibility", () => {
15
14
  it("meets WCAG 2.1 AA criteria", async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"a11yCheck.js","names":["axe","a11yCheck","renderFn","describe","it","container","results","runOnly","expect","toHaveNoViolations"],"sources":["../src/a11yCheck.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\nimport type { RenderResult } from \"@testing-library/react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { axe } from \"jest-axe\";\n\nexport const a11yCheck = (renderFn: () => RenderResult): void => {\n describe(\"accessibility\", () => {\n it(\"meets WCAG 2.1 AA criteria\", async () => {\n const { container } = renderFn();\n const results = await axe(container, {\n runOnly: [\"section508\", \"wcag21a\", \"wcag21aa\"],\n });\n\n expect(results).toHaveNoViolations();\n });\n });\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAASA,GAAT,QAAoB,UAApB;AAEA,OAAO,MAAMC,SAAS,GAAIC,QAAD,IAAwC;EAC/DC,QAAQ,CAAC,eAAD,EAAkB,MAAM;IAC9BC,EAAE,CAAC,4BAAD,EAA+B,YAAY;MAC3C,MAAM;QAAEC;MAAF,IAAgBH,QAAQ,EAA9B;MACA,MAAMI,OAAO,GAAG,MAAMN,GAAG,CAACK,SAAD,EAAY;QACnCE,OAAO,EAAE,CAAC,YAAD,EAAe,SAAf,EAA0B,UAA1B;MAD0B,CAAZ,CAAzB;MAIAC,MAAM,CAACF,OAAD,CAAN,CAAgBG,kBAAhB;IACD,CAPC,CAAF;EAQD,CATO,CAAR;AAUD,CAXM"}
1
+ {"version":3,"file":"a11yCheck.js","names":["axe","a11yCheck","renderFn","describe","it","container","results","runOnly","expect","toHaveNoViolations"],"sources":["../src/a11yCheck.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\nimport type { RenderResult } from \"@testing-library/react\";\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { axe } from \"jest-axe\";\n\nexport const a11yCheck = (renderFn: () => RenderResult): void => {\n describe(\"accessibility\", () => {\n it(\"meets WCAG 2.1 AA criteria\", async () => {\n const { container } = renderFn();\n const results = await axe(container, {\n runOnly: [\"section508\", \"wcag21a\", \"wcag21aa\"],\n });\n\n expect(results).toHaveNoViolations();\n });\n });\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAIA,SAASA,GAAG,QAAQ,UAAU;AAE9B,OAAO,MAAMC,SAAS,GAAIC,QAA4B,IAAW;EAC/DC,QAAQ,CAAC,eAAe,EAAE,MAAM;IAC9BC,EAAE,CAAC,4BAA4B,EAAE,YAAY;MAC3C,MAAM;QAAEC;MAAU,CAAC,GAAGH,QAAQ,CAAC,CAAC;MAChC,MAAMI,OAAO,GAAG,MAAMN,GAAG,CAACK,SAAS,EAAE;QACnCE,OAAO,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU;MAC/C,CAAC,CAAC;MAEFC,MAAM,CAACF,OAAO,CAAC,CAACG,kBAAkB,CAAC,CAAC;IACtC,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -8,7 +8,6 @@
8
8
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
- */
12
- export const uniqueIdLength = 6;
11
+ */export const uniqueIdLength = 6;
13
12
  export const createUniqueAlphabeticalId = () => Math.random().toString(36).replace(/[\d\.]/g, "");
14
13
  //# sourceMappingURL=createUniqueAlphabeticalId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createUniqueAlphabeticalId.js","names":["uniqueIdLength","createUniqueAlphabeticalId","Math","random","toString","replace"],"sources":["../src/createUniqueAlphabeticalId.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// This is a random number chosen to shrink down the unique ID to an arbitrary length.\nexport const uniqueIdLength = 6;\n\nexport const createUniqueAlphabeticalId = () =>\n Math.random()\n .toString(36)\n .replace(/[\\d\\.]/g, \"\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,OAAO,MAAMA,cAAc,GAAG,CAAvB;AAEP,OAAO,MAAMC,0BAA0B,GAAG,MACxCC,IAAI,CAACC,MAAL,GACGC,QADH,CACY,EADZ,EAEGC,OAFH,CAEW,SAFX,EAEsB,EAFtB,CADK"}
1
+ {"version":3,"file":"createUniqueAlphabeticalId.js","names":["uniqueIdLength","createUniqueAlphabeticalId","Math","random","toString","replace"],"sources":["../src/createUniqueAlphabeticalId.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// This is a random number chosen to shrink down the unique ID to an arbitrary length.\nexport const uniqueIdLength = 6;\n\nexport const createUniqueAlphabeticalId = () =>\n Math.random()\n .toString(36)\n .replace(/[\\d\\.]/g, \"\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAGA,OAAO,MAAMA,cAAc,GAAG,CAAC;AAE/B,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KACxCC,IAAI,CAACC,MAAM,CAAC,CAAC,CACVC,QAAQ,CAAC,EAAE,CAAC,CACZC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC"}
@@ -8,7 +8,6 @@
8
8
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
- */
12
- export const uniqueIdLength = 6;
11
+ */export const uniqueIdLength = 6;
13
12
  export const createUniqueId = () => Math.random().toString(36).slice(-uniqueIdLength);
14
13
  //# sourceMappingURL=createUniqueId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createUniqueId.js","names":["uniqueIdLength","createUniqueId","Math","random","toString","slice"],"sources":["../src/createUniqueId.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// This is a random number chosen to shrink down the unique ID to an arbitrary length.\nexport const uniqueIdLength = 6;\n\nexport const createUniqueId = () =>\n Math.random().toString(36).slice(-uniqueIdLength);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,OAAO,MAAMA,cAAc,GAAG,CAAvB;AAEP,OAAO,MAAMC,cAAc,GAAG,MAC5BC,IAAI,CAACC,MAAL,GAAcC,QAAd,CAAuB,EAAvB,EAA2BC,KAA3B,CAAiC,CAACL,cAAlC,CADK"}
1
+ {"version":3,"file":"createUniqueId.js","names":["uniqueIdLength","createUniqueId","Math","random","toString","slice"],"sources":["../src/createUniqueId.ts"],"sourcesContent":["/*!\n * Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// This is a random number chosen to shrink down the unique ID to an arbitrary length.\nexport const uniqueIdLength = 6;\n\nexport const createUniqueId = () =>\n Math.random().toString(36).slice(-uniqueIdLength);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAGA,OAAO,MAAMA,cAAc,GAAG,CAAC;AAE/B,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAC5BC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAACL,cAAc,CAAC"}