@okta/odyssey-react-mui 1.13.11 → 1.14.2

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 (684) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/@types/properties.d.js +2 -0
  3. package/dist/@types/properties.d.js.map +1 -0
  4. package/dist/Accordion.js.map +1 -1
  5. package/dist/Autocomplete.js.map +1 -1
  6. package/dist/Badge.js.map +1 -1
  7. package/dist/Banner.js.map +1 -1
  8. package/dist/Box.js.map +1 -1
  9. package/dist/Breadcrumbs.js.map +1 -1
  10. package/dist/Button.js +3 -3
  11. package/dist/Button.js.map +1 -1
  12. package/dist/Callout.js.map +1 -1
  13. package/dist/Checkbox.js.map +1 -1
  14. package/dist/CheckboxGroup.js.map +1 -1
  15. package/dist/CircularProgress.js.map +1 -1
  16. package/dist/Dialog.js +8 -8
  17. package/dist/Dialog.js.map +1 -1
  18. package/dist/ErrorMessageList.js.map +1 -1
  19. package/dist/Field.js +1 -0
  20. package/dist/Field.js.map +1 -1
  21. package/dist/FieldComponentProps.js.map +1 -1
  22. package/dist/FieldError.js.map +1 -1
  23. package/dist/FieldHint.js.map +1 -1
  24. package/dist/FieldLabel.js.map +1 -1
  25. package/dist/Fieldset.js.map +1 -1
  26. package/dist/Form.js.map +1 -1
  27. package/dist/FormCheckedProps.js.map +1 -1
  28. package/dist/HintLink.js.map +1 -1
  29. package/dist/HtmlProps.js.map +1 -1
  30. package/dist/Link.js.map +1 -1
  31. package/dist/MenuButton.js.map +1 -1
  32. package/dist/MenuItem.js.map +1 -1
  33. package/dist/MuiPropsChild.js.map +1 -1
  34. package/dist/NativeSelect.js.map +1 -1
  35. package/dist/OdysseyProvider.js +0 -2
  36. package/dist/OdysseyProvider.js.map +1 -1
  37. package/dist/OdysseyThemeProvider.js +1 -28
  38. package/dist/OdysseyThemeProvider.js.map +1 -1
  39. package/dist/OdysseyTranslationProvider.js.map +1 -1
  40. package/dist/PasswordField.js.map +1 -1
  41. package/dist/Radio.js.map +1 -1
  42. package/dist/RadioGroup.js.map +1 -1
  43. package/dist/ScreenReaderText.js.map +1 -1
  44. package/dist/SearchField.js +6 -2
  45. package/dist/SearchField.js.map +1 -1
  46. package/dist/Select.js +144 -44
  47. package/dist/Select.js.map +1 -1
  48. package/dist/Status.js +6 -1
  49. package/dist/Status.js.map +1 -1
  50. package/dist/Tabs.js +1 -1
  51. package/dist/Tabs.js.map +1 -1
  52. package/dist/Tag.js.map +1 -1
  53. package/dist/TagList.js.map +1 -1
  54. package/dist/TextField.js.map +1 -1
  55. package/dist/Tile.js +53 -39
  56. package/dist/Tile.js.map +1 -1
  57. package/dist/Toast.js.map +1 -1
  58. package/dist/Tooltip.js.map +1 -1
  59. package/dist/Typography.js +11 -10
  60. package/dist/Typography.js.map +1 -1
  61. package/dist/createShadowRootElement.js.map +1 -1
  62. package/dist/getTypedObjectKeys.js.map +1 -1
  63. package/dist/icons.generated/AddCircle.js.map +1 -1
  64. package/dist/icons.generated/Apps.js.map +1 -1
  65. package/dist/icons.generated/ArrowBottom.js.map +1 -1
  66. package/dist/icons.generated/ArrowDown.js.map +1 -1
  67. package/dist/icons.generated/ArrowLeft.js.map +1 -1
  68. package/dist/icons.generated/ArrowRight.js.map +1 -1
  69. package/dist/icons.generated/ArrowTop.js.map +1 -1
  70. package/dist/icons.generated/ArrowUp.js.map +1 -1
  71. package/dist/icons.generated/Calendar.js.map +1 -1
  72. package/dist/icons.generated/Call.js.map +1 -1
  73. package/dist/icons.generated/Chat.js.map +1 -1
  74. package/dist/icons.generated/Check.js.map +1 -1
  75. package/dist/icons.generated/ChevronDown.js.map +1 -1
  76. package/dist/icons.generated/ChevronLeft.js.map +1 -1
  77. package/dist/icons.generated/ChevronUp.js.map +1 -1
  78. package/dist/icons.generated/Clock.js.map +1 -1
  79. package/dist/icons.generated/Close.js.map +1 -1
  80. package/dist/icons.generated/Copy.js.map +1 -1
  81. package/dist/icons.generated/Delete.js.map +1 -1
  82. package/dist/icons.generated/Deny.js.map +1 -1
  83. package/dist/icons.generated/Devices.js.map +1 -1
  84. package/dist/icons.generated/Directory.js.map +1 -1
  85. package/dist/icons.generated/Download.js.map +1 -1
  86. package/dist/icons.generated/Edit.js.map +1 -1
  87. package/dist/icons.generated/ExpandLeft.js.map +1 -1
  88. package/dist/icons.generated/ExpandRight.js.map +1 -1
  89. package/dist/icons.generated/Filter.js.map +1 -1
  90. package/dist/icons.generated/Folder.js.map +1 -1
  91. package/dist/icons.generated/Globe.js.map +1 -1
  92. package/dist/icons.generated/Grid.js.map +1 -1
  93. package/dist/icons.generated/Group.js.map +1 -1
  94. package/dist/icons.generated/Hide.js.map +1 -1
  95. package/dist/icons.generated/Home.js.map +1 -1
  96. package/dist/icons.generated/Link.js.map +1 -1
  97. package/dist/icons.generated/List.js.map +1 -1
  98. package/dist/icons.generated/Lock.js.map +1 -1
  99. package/dist/icons.generated/More.js.map +1 -1
  100. package/dist/icons.generated/Pause.js.map +1 -1
  101. package/dist/icons.generated/Refresh.js.map +1 -1
  102. package/dist/icons.generated/Reset.js.map +1 -1
  103. package/dist/icons.generated/Resume.js.map +1 -1
  104. package/dist/icons.generated/Search.js.map +1 -1
  105. package/dist/icons.generated/Server.js.map +1 -1
  106. package/dist/icons.generated/Settings.js.map +1 -1
  107. package/dist/icons.generated/Show.js.map +1 -1
  108. package/dist/icons.generated/Subtract.js.map +1 -1
  109. package/dist/icons.generated/Sync.js.map +1 -1
  110. package/dist/icons.generated/Unlock.js.map +1 -1
  111. package/dist/icons.generated/Upload.js.map +1 -1
  112. package/dist/icons.generated/User.js.map +1 -1
  113. package/dist/icons.generated/Video.js.map +1 -1
  114. package/dist/icons.generated/Warning.js.map +1 -1
  115. package/dist/icons.generated/index.js +1 -1
  116. package/dist/icons.generated/index.js.map +1 -1
  117. package/dist/index.js.map +1 -1
  118. package/dist/labs/DataFilters.js.map +1 -1
  119. package/dist/labs/DataTable.js.map +1 -1
  120. package/dist/labs/DatePicker.js.map +1 -1
  121. package/dist/labs/Drawer.js +172 -0
  122. package/dist/labs/Drawer.js.map +1 -0
  123. package/dist/labs/GroupPicker.js.map +1 -1
  124. package/dist/labs/PaginatedTable.js.map +1 -1
  125. package/dist/labs/StaticTable.js.map +1 -1
  126. package/dist/labs/Switch.js.map +1 -1
  127. package/dist/labs/VirtualizedAutocomplete.js.map +1 -1
  128. package/dist/labs/datePickerTheme.js.map +1 -1
  129. package/dist/labs/index.js +1 -0
  130. package/dist/labs/index.js.map +1 -1
  131. package/dist/labs/materialReactTableTypes.js.map +1 -1
  132. package/dist/properties/ts/odyssey-react-mui_cs.js +4 -2
  133. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  134. package/dist/properties/ts/odyssey-react-mui_da.js +4 -2
  135. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
  136. package/dist/properties/ts/odyssey-react-mui_de.js +4 -2
  137. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
  138. package/dist/properties/ts/odyssey-react-mui_el.js +4 -2
  139. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
  140. package/dist/properties/ts/odyssey-react-mui_es.js +4 -2
  141. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
  142. package/dist/properties/ts/odyssey-react-mui_fi.js +4 -2
  143. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  144. package/dist/properties/ts/odyssey-react-mui_fr.js +4 -2
  145. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  146. package/dist/properties/ts/odyssey-react-mui_hu.js +4 -2
  147. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  148. package/dist/properties/ts/odyssey-react-mui_id.js +4 -2
  149. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
  150. package/dist/properties/ts/odyssey-react-mui_it.js +4 -2
  151. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
  152. package/dist/properties/ts/odyssey-react-mui_ja.js +4 -2
  153. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  154. package/dist/properties/ts/odyssey-react-mui_ko.js +4 -2
  155. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  156. package/dist/properties/ts/odyssey-react-mui_ms.js +4 -2
  157. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  158. package/dist/properties/ts/odyssey-react-mui_nb.js +4 -2
  159. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  160. package/dist/properties/ts/odyssey-react-mui_nl_NL.js +4 -2
  161. package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  162. package/dist/properties/ts/odyssey-react-mui_pl.js +4 -2
  163. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  164. package/dist/properties/ts/odyssey-react-mui_pt_BR.js +4 -2
  165. package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  166. package/dist/properties/ts/odyssey-react-mui_ro.js +4 -2
  167. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  168. package/dist/properties/ts/odyssey-react-mui_ru.js +4 -2
  169. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  170. package/dist/properties/ts/odyssey-react-mui_sv.js +4 -2
  171. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  172. package/dist/properties/ts/odyssey-react-mui_th.js +4 -2
  173. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
  174. package/dist/properties/ts/odyssey-react-mui_tr.js +4 -2
  175. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  176. package/dist/properties/ts/odyssey-react-mui_uk.js +4 -2
  177. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  178. package/dist/properties/ts/odyssey-react-mui_vi.js +4 -2
  179. package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  180. package/dist/properties/ts/odyssey-react-mui_zh_CN.js +4 -2
  181. package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  182. package/dist/properties/ts/odyssey-react-mui_zh_TW.js +4 -2
  183. package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  184. package/dist/scripts/properties-to-ts.d.ts +14 -0
  185. package/dist/scripts/properties-to-ts.d.ts.map +1 -0
  186. package/dist/src/Accordion.d.ts +2 -2
  187. package/dist/src/Accordion.d.ts.map +1 -1
  188. package/dist/src/Autocomplete.d.ts +2 -2
  189. package/dist/src/Autocomplete.d.ts.map +1 -1
  190. package/dist/src/Badge.d.ts +2 -2
  191. package/dist/src/Badge.d.ts.map +1 -1
  192. package/dist/src/Banner.d.ts +2 -2
  193. package/dist/src/Banner.d.ts.map +1 -1
  194. package/dist/src/Box.d.ts +2 -2
  195. package/dist/src/Box.d.ts.map +1 -1
  196. package/dist/src/Breadcrumbs.d.ts +3 -3
  197. package/dist/src/Breadcrumbs.d.ts.map +1 -1
  198. package/dist/src/Button.d.ts +3 -30
  199. package/dist/src/Button.d.ts.map +1 -1
  200. package/dist/src/Callout.d.ts +2 -2
  201. package/dist/src/Callout.d.ts.map +1 -1
  202. package/dist/src/Checkbox.d.ts +3 -23
  203. package/dist/src/Checkbox.d.ts.map +1 -1
  204. package/dist/src/CheckboxGroup.d.ts +2 -2
  205. package/dist/src/CheckboxGroup.d.ts.map +1 -1
  206. package/dist/src/CircularProgress.d.ts +2 -6
  207. package/dist/src/CircularProgress.d.ts.map +1 -1
  208. package/dist/src/CssBaseline.d.ts +1 -1
  209. package/dist/src/CssBaseline.d.ts.map +1 -1
  210. package/dist/src/Dialog.d.ts +5 -5
  211. package/dist/src/Dialog.d.ts.map +1 -1
  212. package/dist/src/ErrorMessageList.d.ts +1 -1
  213. package/dist/src/ErrorMessageList.d.ts.map +1 -1
  214. package/dist/src/Field.d.ts +2 -5
  215. package/dist/src/Field.d.ts.map +1 -1
  216. package/dist/src/FieldComponentProps.d.ts +7 -4
  217. package/dist/src/FieldComponentProps.d.ts.map +1 -1
  218. package/dist/src/FieldError.d.ts +2 -2
  219. package/dist/src/FieldError.d.ts.map +1 -1
  220. package/dist/src/FieldHint.d.ts +2 -2
  221. package/dist/src/FieldHint.d.ts.map +1 -1
  222. package/dist/src/FieldLabel.d.ts +2 -2
  223. package/dist/src/FieldLabel.d.ts.map +1 -1
  224. package/dist/src/Fieldset.d.ts +2 -2
  225. package/dist/src/Fieldset.d.ts.map +1 -1
  226. package/dist/src/Form.d.ts +2 -2
  227. package/dist/src/Form.d.ts.map +1 -1
  228. package/dist/src/HintLink.d.ts +1 -1
  229. package/dist/src/HintLink.d.ts.map +1 -1
  230. package/dist/src/HtmlProps.d.ts +59 -0
  231. package/dist/src/HtmlProps.d.ts.map +1 -1
  232. package/dist/src/Link.d.ts +2 -6
  233. package/dist/src/Link.d.ts.map +1 -1
  234. package/dist/src/MenuButton.d.ts +5 -23
  235. package/dist/src/MenuButton.d.ts.map +1 -1
  236. package/dist/src/MenuItem.d.ts +2 -2
  237. package/dist/src/MenuItem.d.ts.map +1 -1
  238. package/dist/src/NativeSelect.d.ts +2 -2
  239. package/dist/src/NativeSelect.d.ts.map +1 -1
  240. package/dist/src/OdysseyCacheProvider.d.ts +1 -1
  241. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
  242. package/dist/src/OdysseyProvider.d.ts +1 -1
  243. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  244. package/dist/src/OdysseyThemeProvider.d.ts +1 -3
  245. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  246. package/dist/src/OdysseyTranslationProvider.d.ts +2 -2
  247. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  248. package/dist/src/PasswordField.d.ts +2 -2
  249. package/dist/src/PasswordField.d.ts.map +1 -1
  250. package/dist/src/Radio.d.ts +2 -2
  251. package/dist/src/Radio.d.ts.map +1 -1
  252. package/dist/src/RadioGroup.d.ts +2 -2
  253. package/dist/src/RadioGroup.d.ts.map +1 -1
  254. package/dist/src/ScreenReaderText.d.ts +2 -2
  255. package/dist/src/ScreenReaderText.d.ts.map +1 -1
  256. package/dist/src/SearchField.d.ts +11 -2
  257. package/dist/src/SearchField.d.ts.map +1 -1
  258. package/dist/src/Select.d.ts +2 -2
  259. package/dist/src/Select.d.ts.map +1 -1
  260. package/dist/src/Status.d.ts +4 -2
  261. package/dist/src/Status.d.ts.map +1 -1
  262. package/dist/src/Tabs.d.ts +2 -6
  263. package/dist/src/Tabs.d.ts.map +1 -1
  264. package/dist/src/Tag.d.ts +2 -2
  265. package/dist/src/Tag.d.ts.map +1 -1
  266. package/dist/src/TagList.d.ts +2 -2
  267. package/dist/src/TagList.d.ts.map +1 -1
  268. package/dist/src/TextField.d.ts +3 -3
  269. package/dist/src/TextField.d.ts.map +1 -1
  270. package/dist/src/Tile.d.ts +32 -11
  271. package/dist/src/Tile.d.ts.map +1 -1
  272. package/dist/src/Toast.d.ts +2 -2
  273. package/dist/src/Toast.d.ts.map +1 -1
  274. package/dist/src/ToastStack.d.ts +1 -1
  275. package/dist/src/ToastStack.d.ts.map +1 -1
  276. package/dist/src/Tooltip.d.ts +2 -2
  277. package/dist/src/Tooltip.d.ts.map +1 -1
  278. package/dist/src/Typography.d.ts +13 -25
  279. package/dist/src/Typography.d.ts.map +1 -1
  280. package/dist/src/icons.generated/Add.d.ts +1 -1
  281. package/dist/src/icons.generated/Add.d.ts.map +1 -1
  282. package/dist/src/icons.generated/AddCircle.d.ts +1 -1
  283. package/dist/src/icons.generated/AddCircle.d.ts.map +1 -1
  284. package/dist/src/icons.generated/Apps.d.ts +1 -1
  285. package/dist/src/icons.generated/Apps.d.ts.map +1 -1
  286. package/dist/src/icons.generated/ArrowBottom.d.ts +1 -1
  287. package/dist/src/icons.generated/ArrowBottom.d.ts.map +1 -1
  288. package/dist/src/icons.generated/ArrowDown.d.ts +1 -1
  289. package/dist/src/icons.generated/ArrowDown.d.ts.map +1 -1
  290. package/dist/src/icons.generated/ArrowLeft.d.ts +1 -1
  291. package/dist/src/icons.generated/ArrowLeft.d.ts.map +1 -1
  292. package/dist/src/icons.generated/ArrowLowerLeft.d.ts +1 -1
  293. package/dist/src/icons.generated/ArrowLowerLeft.d.ts.map +1 -1
  294. package/dist/src/icons.generated/ArrowLowerRight.d.ts +1 -1
  295. package/dist/src/icons.generated/ArrowLowerRight.d.ts.map +1 -1
  296. package/dist/src/icons.generated/ArrowRight.d.ts +1 -1
  297. package/dist/src/icons.generated/ArrowRight.d.ts.map +1 -1
  298. package/dist/src/icons.generated/ArrowTop.d.ts +1 -1
  299. package/dist/src/icons.generated/ArrowTop.d.ts.map +1 -1
  300. package/dist/src/icons.generated/ArrowUnsorted.d.ts +1 -1
  301. package/dist/src/icons.generated/ArrowUnsorted.d.ts.map +1 -1
  302. package/dist/src/icons.generated/ArrowUp.d.ts +1 -1
  303. package/dist/src/icons.generated/ArrowUp.d.ts.map +1 -1
  304. package/dist/src/icons.generated/ArrowUpperLeft.d.ts +1 -1
  305. package/dist/src/icons.generated/ArrowUpperLeft.d.ts.map +1 -1
  306. package/dist/src/icons.generated/ArrowUpperRight.d.ts +1 -1
  307. package/dist/src/icons.generated/ArrowUpperRight.d.ts.map +1 -1
  308. package/dist/src/icons.generated/Bug.d.ts +1 -1
  309. package/dist/src/icons.generated/Bug.d.ts.map +1 -1
  310. package/dist/src/icons.generated/Calendar.d.ts +1 -1
  311. package/dist/src/icons.generated/Calendar.d.ts.map +1 -1
  312. package/dist/src/icons.generated/Call.d.ts +1 -1
  313. package/dist/src/icons.generated/Call.d.ts.map +1 -1
  314. package/dist/src/icons.generated/Chat.d.ts +1 -1
  315. package/dist/src/icons.generated/Chat.d.ts.map +1 -1
  316. package/dist/src/icons.generated/Check.d.ts +1 -1
  317. package/dist/src/icons.generated/Check.d.ts.map +1 -1
  318. package/dist/src/icons.generated/CheckCircleFilled.d.ts +1 -1
  319. package/dist/src/icons.generated/CheckCircleFilled.d.ts.map +1 -1
  320. package/dist/src/icons.generated/ChevronDown.d.ts +1 -1
  321. package/dist/src/icons.generated/ChevronDown.d.ts.map +1 -1
  322. package/dist/src/icons.generated/ChevronLeft.d.ts +1 -1
  323. package/dist/src/icons.generated/ChevronLeft.d.ts.map +1 -1
  324. package/dist/src/icons.generated/ChevronRight.d.ts +1 -1
  325. package/dist/src/icons.generated/ChevronRight.d.ts.map +1 -1
  326. package/dist/src/icons.generated/ChevronUp.d.ts +1 -1
  327. package/dist/src/icons.generated/ChevronUp.d.ts.map +1 -1
  328. package/dist/src/icons.generated/Clock.d.ts +1 -1
  329. package/dist/src/icons.generated/Clock.d.ts.map +1 -1
  330. package/dist/src/icons.generated/Close.d.ts +1 -1
  331. package/dist/src/icons.generated/Close.d.ts.map +1 -1
  332. package/dist/src/icons.generated/CloseCircleFilled.d.ts +1 -1
  333. package/dist/src/icons.generated/CloseCircleFilled.d.ts.map +1 -1
  334. package/dist/src/icons.generated/CollapseLeft.d.ts +1 -1
  335. package/dist/src/icons.generated/CollapseLeft.d.ts.map +1 -1
  336. package/dist/src/icons.generated/CollapseRight.d.ts +1 -1
  337. package/dist/src/icons.generated/CollapseRight.d.ts.map +1 -1
  338. package/dist/src/icons.generated/Copy.d.ts +1 -1
  339. package/dist/src/icons.generated/Copy.d.ts.map +1 -1
  340. package/dist/src/icons.generated/DangerDiamond.d.ts +1 -1
  341. package/dist/src/icons.generated/DangerDiamond.d.ts.map +1 -1
  342. package/dist/src/icons.generated/DangerDiamondFilled.d.ts +1 -1
  343. package/dist/src/icons.generated/DangerDiamondFilled.d.ts.map +1 -1
  344. package/dist/src/icons.generated/Delete.d.ts +1 -1
  345. package/dist/src/icons.generated/Delete.d.ts.map +1 -1
  346. package/dist/src/icons.generated/Deny.d.ts +1 -1
  347. package/dist/src/icons.generated/Deny.d.ts.map +1 -1
  348. package/dist/src/icons.generated/Devices.d.ts +1 -1
  349. package/dist/src/icons.generated/Devices.d.ts.map +1 -1
  350. package/dist/src/icons.generated/Directory.d.ts +1 -1
  351. package/dist/src/icons.generated/Directory.d.ts.map +1 -1
  352. package/dist/src/icons.generated/Documentation.d.ts +1 -1
  353. package/dist/src/icons.generated/Documentation.d.ts.map +1 -1
  354. package/dist/src/icons.generated/Download.d.ts +1 -1
  355. package/dist/src/icons.generated/Download.d.ts.map +1 -1
  356. package/dist/src/icons.generated/DragIndicator.d.ts +1 -1
  357. package/dist/src/icons.generated/DragIndicator.d.ts.map +1 -1
  358. package/dist/src/icons.generated/Edit.d.ts +1 -1
  359. package/dist/src/icons.generated/Edit.d.ts.map +1 -1
  360. package/dist/src/icons.generated/ExpandLeft.d.ts +1 -1
  361. package/dist/src/icons.generated/ExpandLeft.d.ts.map +1 -1
  362. package/dist/src/icons.generated/ExpandRight.d.ts +1 -1
  363. package/dist/src/icons.generated/ExpandRight.d.ts.map +1 -1
  364. package/dist/src/icons.generated/ExternalLink.d.ts +1 -1
  365. package/dist/src/icons.generated/ExternalLink.d.ts.map +1 -1
  366. package/dist/src/icons.generated/Filter.d.ts +1 -1
  367. package/dist/src/icons.generated/Filter.d.ts.map +1 -1
  368. package/dist/src/icons.generated/Folder.d.ts +1 -1
  369. package/dist/src/icons.generated/Folder.d.ts.map +1 -1
  370. package/dist/src/icons.generated/Globe.d.ts +1 -1
  371. package/dist/src/icons.generated/Globe.d.ts.map +1 -1
  372. package/dist/src/icons.generated/Grid.d.ts +1 -1
  373. package/dist/src/icons.generated/Grid.d.ts.map +1 -1
  374. package/dist/src/icons.generated/Group.d.ts +1 -1
  375. package/dist/src/icons.generated/Group.d.ts.map +1 -1
  376. package/dist/src/icons.generated/Hide.d.ts +1 -1
  377. package/dist/src/icons.generated/Hide.d.ts.map +1 -1
  378. package/dist/src/icons.generated/Home.d.ts +1 -1
  379. package/dist/src/icons.generated/Home.d.ts.map +1 -1
  380. package/dist/src/icons.generated/InformationCircle.d.ts +1 -1
  381. package/dist/src/icons.generated/InformationCircle.d.ts.map +1 -1
  382. package/dist/src/icons.generated/InformationCircleFilled.d.ts +1 -1
  383. package/dist/src/icons.generated/InformationCircleFilled.d.ts.map +1 -1
  384. package/dist/src/icons.generated/Link.d.ts +1 -1
  385. package/dist/src/icons.generated/Link.d.ts.map +1 -1
  386. package/dist/src/icons.generated/List.d.ts +1 -1
  387. package/dist/src/icons.generated/List.d.ts.map +1 -1
  388. package/dist/src/icons.generated/Lock.d.ts +1 -1
  389. package/dist/src/icons.generated/Lock.d.ts.map +1 -1
  390. package/dist/src/icons.generated/More.d.ts +1 -1
  391. package/dist/src/icons.generated/More.d.ts.map +1 -1
  392. package/dist/src/icons.generated/Notification.d.ts +1 -1
  393. package/dist/src/icons.generated/Notification.d.ts.map +1 -1
  394. package/dist/src/icons.generated/Pause.d.ts +1 -1
  395. package/dist/src/icons.generated/Pause.d.ts.map +1 -1
  396. package/dist/src/icons.generated/QuestionCircle.d.ts +1 -1
  397. package/dist/src/icons.generated/QuestionCircle.d.ts.map +1 -1
  398. package/dist/src/icons.generated/QuestionCircleFilled.d.ts +1 -1
  399. package/dist/src/icons.generated/QuestionCircleFilled.d.ts.map +1 -1
  400. package/dist/src/icons.generated/Refresh.d.ts +1 -1
  401. package/dist/src/icons.generated/Refresh.d.ts.map +1 -1
  402. package/dist/src/icons.generated/Reset.d.ts +1 -1
  403. package/dist/src/icons.generated/Reset.d.ts.map +1 -1
  404. package/dist/src/icons.generated/Resume.d.ts +1 -1
  405. package/dist/src/icons.generated/Resume.d.ts.map +1 -1
  406. package/dist/src/icons.generated/Search.d.ts +1 -1
  407. package/dist/src/icons.generated/Search.d.ts.map +1 -1
  408. package/dist/src/icons.generated/Server.d.ts +1 -1
  409. package/dist/src/icons.generated/Server.d.ts.map +1 -1
  410. package/dist/src/icons.generated/Settings.d.ts +1 -1
  411. package/dist/src/icons.generated/Settings.d.ts.map +1 -1
  412. package/dist/src/icons.generated/Show.d.ts +1 -1
  413. package/dist/src/icons.generated/Show.d.ts.map +1 -1
  414. package/dist/src/icons.generated/Subtract.d.ts +1 -1
  415. package/dist/src/icons.generated/Subtract.d.ts.map +1 -1
  416. package/dist/src/icons.generated/Sync.d.ts +1 -1
  417. package/dist/src/icons.generated/Sync.d.ts.map +1 -1
  418. package/dist/src/icons.generated/Unlock.d.ts +1 -1
  419. package/dist/src/icons.generated/Unlock.d.ts.map +1 -1
  420. package/dist/src/icons.generated/Upload.d.ts +1 -1
  421. package/dist/src/icons.generated/Upload.d.ts.map +1 -1
  422. package/dist/src/icons.generated/User.d.ts +1 -1
  423. package/dist/src/icons.generated/User.d.ts.map +1 -1
  424. package/dist/src/icons.generated/Video.d.ts +1 -1
  425. package/dist/src/icons.generated/Video.d.ts.map +1 -1
  426. package/dist/src/icons.generated/Warning.d.ts +1 -1
  427. package/dist/src/icons.generated/Warning.d.ts.map +1 -1
  428. package/dist/src/icons.generated/WarningFilled.d.ts +1 -1
  429. package/dist/src/icons.generated/WarningFilled.d.ts.map +1 -1
  430. package/dist/src/icons.generated/index.d.ts +1 -1
  431. package/dist/src/index.d.ts.map +1 -1
  432. package/dist/src/labs/DataFilters.d.ts +1 -1
  433. package/dist/src/labs/DataFilters.d.ts.map +1 -1
  434. package/dist/src/labs/DataTable.d.ts +1 -1
  435. package/dist/src/labs/DataTable.d.ts.map +1 -1
  436. package/dist/src/labs/DataTablePagination.d.ts +1 -1
  437. package/dist/src/labs/DataTablePagination.d.ts.map +1 -1
  438. package/dist/src/labs/DatePicker.d.ts +1 -1
  439. package/dist/src/labs/DatePicker.d.ts.map +1 -1
  440. package/dist/src/labs/Drawer.d.ts +56 -0
  441. package/dist/src/labs/Drawer.d.ts.map +1 -0
  442. package/dist/src/labs/GroupPicker.d.ts +1 -1
  443. package/dist/src/labs/GroupPicker.d.ts.map +1 -1
  444. package/dist/src/labs/PaginatedTable.d.ts +1 -1
  445. package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
  446. package/dist/src/labs/StaticTable.d.ts +1 -1
  447. package/dist/src/labs/StaticTable.d.ts.map +1 -1
  448. package/dist/src/labs/Switch.d.ts +2 -2
  449. package/dist/src/labs/Switch.d.ts.map +1 -1
  450. package/dist/src/labs/VirtualizedAutocomplete.d.ts +2 -2
  451. package/dist/src/labs/VirtualizedAutocomplete.d.ts.map +1 -1
  452. package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
  453. package/dist/src/labs/index.d.ts +1 -0
  454. package/dist/src/labs/index.d.ts.map +1 -1
  455. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +3 -1
  456. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  457. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +3 -1
  458. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  459. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +3 -1
  460. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  461. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +3 -1
  462. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  463. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +3 -1
  464. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  465. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +3 -1
  466. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  467. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +3 -1
  468. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  469. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +3 -1
  470. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  471. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +3 -1
  472. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  473. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +3 -1
  474. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  475. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +3 -1
  476. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  477. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +3 -1
  478. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  479. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +3 -1
  480. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  481. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +3 -1
  482. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  483. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +3 -1
  484. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  485. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +3 -1
  486. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  487. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +3 -1
  488. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  489. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +3 -1
  490. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  491. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +3 -1
  492. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  493. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +3 -1
  494. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  495. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +3 -1
  496. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  497. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +3 -1
  498. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  499. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +3 -1
  500. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  501. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +3 -1
  502. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  503. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +3 -1
  504. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  505. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +3 -1
  506. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  507. package/dist/src/theme/components.d.ts.map +1 -1
  508. package/dist/theme/components.js +60 -8
  509. package/dist/theme/components.js.map +1 -1
  510. package/dist/tsconfig.production.tsbuildinfo +1 -1
  511. package/package.json +15 -15
  512. package/scripts/generateIconsIndex.ts +2 -2
  513. package/scripts/{properties-to-ts.js → properties-to-ts.ts} +55 -41
  514. package/src/@types/properties.d.ts +292 -0
  515. package/src/Accordion.tsx +1 -1
  516. package/src/Autocomplete.tsx +17 -9
  517. package/src/Badge.tsx +1 -1
  518. package/src/Banner.tsx +1 -1
  519. package/src/Box.tsx +2 -2
  520. package/src/Breadcrumbs.tsx +2 -2
  521. package/src/Button.tsx +26 -38
  522. package/src/Callout.tsx +1 -1
  523. package/src/Checkbox.tsx +9 -29
  524. package/src/CheckboxGroup.tsx +20 -5
  525. package/src/CircularProgress.tsx +1 -5
  526. package/src/Dialog.tsx +18 -17
  527. package/src/ErrorMessageList.tsx +1 -1
  528. package/src/Field.tsx +6 -9
  529. package/src/FieldComponentProps.ts +8 -4
  530. package/src/FieldError.tsx +2 -2
  531. package/src/FieldHint.tsx +1 -1
  532. package/src/FieldLabel.tsx +2 -2
  533. package/src/Fieldset.tsx +2 -2
  534. package/src/Form.tsx +1 -1
  535. package/src/FormCheckedProps.ts +3 -3
  536. package/src/HintLink.tsx +1 -1
  537. package/src/HtmlProps.ts +60 -0
  538. package/src/Link.tsx +2 -6
  539. package/src/MenuButton.tsx +21 -36
  540. package/src/MenuItem.tsx +2 -2
  541. package/src/MuiPropsChild.tsx +2 -2
  542. package/src/NativeSelect.tsx +24 -13
  543. package/src/OdysseyCacheProvider.test.tsx +3 -3
  544. package/src/OdysseyProvider.tsx +1 -3
  545. package/src/OdysseyThemeProvider.tsx +8 -35
  546. package/src/OdysseyTranslationProvider.test.tsx +6 -6
  547. package/src/OdysseyTranslationProvider.tsx +7 -7
  548. package/src/PasswordField.tsx +23 -10
  549. package/src/Radio.tsx +4 -4
  550. package/src/RadioGroup.tsx +22 -7
  551. package/src/ScreenReaderText.tsx +1 -1
  552. package/src/SearchField.tsx +25 -12
  553. package/src/Select.tsx +219 -77
  554. package/src/Status.tsx +8 -2
  555. package/src/Tabs.tsx +7 -11
  556. package/src/Tag.tsx +4 -4
  557. package/src/TagList.tsx +2 -2
  558. package/src/TextField.tsx +22 -9
  559. package/src/Tile.tsx +74 -43
  560. package/src/Toast.tsx +1 -1
  561. package/src/Tooltip.tsx +1 -1
  562. package/src/Typography.tsx +20 -28
  563. package/src/createShadowRootElement.ts +1 -1
  564. package/src/getTypedObjectKeys.ts +1 -1
  565. package/src/icons.generated/AddCircle.tsx +1 -1
  566. package/src/icons.generated/Apps.tsx +1 -1
  567. package/src/icons.generated/ArrowBottom.tsx +1 -1
  568. package/src/icons.generated/ArrowDown.tsx +1 -1
  569. package/src/icons.generated/ArrowLeft.tsx +1 -1
  570. package/src/icons.generated/ArrowRight.tsx +1 -1
  571. package/src/icons.generated/ArrowTop.tsx +1 -1
  572. package/src/icons.generated/ArrowUp.tsx +1 -1
  573. package/src/icons.generated/Calendar.tsx +1 -1
  574. package/src/icons.generated/Call.tsx +1 -1
  575. package/src/icons.generated/Chat.tsx +1 -1
  576. package/src/icons.generated/Check.tsx +1 -1
  577. package/src/icons.generated/ChevronDown.tsx +1 -1
  578. package/src/icons.generated/ChevronLeft.tsx +1 -1
  579. package/src/icons.generated/ChevronUp.tsx +1 -1
  580. package/src/icons.generated/Clock.tsx +1 -1
  581. package/src/icons.generated/Close.tsx +1 -1
  582. package/src/icons.generated/Copy.tsx +1 -1
  583. package/src/icons.generated/Delete.tsx +1 -1
  584. package/src/icons.generated/Deny.tsx +1 -1
  585. package/src/icons.generated/Devices.tsx +1 -1
  586. package/src/icons.generated/Directory.tsx +1 -1
  587. package/src/icons.generated/Download.tsx +1 -1
  588. package/src/icons.generated/Edit.tsx +1 -1
  589. package/src/icons.generated/ExpandLeft.tsx +1 -1
  590. package/src/icons.generated/ExpandRight.tsx +1 -1
  591. package/src/icons.generated/Filter.tsx +1 -1
  592. package/src/icons.generated/Folder.tsx +1 -1
  593. package/src/icons.generated/Globe.tsx +1 -1
  594. package/src/icons.generated/Grid.tsx +1 -1
  595. package/src/icons.generated/Group.tsx +1 -1
  596. package/src/icons.generated/Hide.tsx +1 -1
  597. package/src/icons.generated/Home.tsx +1 -1
  598. package/src/icons.generated/Link.tsx +1 -1
  599. package/src/icons.generated/List.tsx +1 -1
  600. package/src/icons.generated/Lock.tsx +1 -1
  601. package/src/icons.generated/More.tsx +1 -1
  602. package/src/icons.generated/Pause.tsx +1 -1
  603. package/src/icons.generated/Refresh.tsx +1 -1
  604. package/src/icons.generated/Reset.tsx +1 -1
  605. package/src/icons.generated/Resume.tsx +1 -1
  606. package/src/icons.generated/Search.tsx +1 -1
  607. package/src/icons.generated/Server.tsx +1 -1
  608. package/src/icons.generated/Settings.tsx +1 -1
  609. package/src/icons.generated/Show.tsx +1 -1
  610. package/src/icons.generated/Subtract.tsx +1 -1
  611. package/src/icons.generated/Sync.tsx +1 -1
  612. package/src/icons.generated/Unlock.tsx +1 -1
  613. package/src/icons.generated/Upload.tsx +1 -1
  614. package/src/icons.generated/User.tsx +1 -1
  615. package/src/icons.generated/Video.tsx +1 -1
  616. package/src/icons.generated/Warning.tsx +1 -1
  617. package/src/icons.generated/index.ts +1 -1
  618. package/src/index.ts +0 -1
  619. package/src/labs/DataFilters.tsx +36 -30
  620. package/src/labs/DataTable.tsx +20 -20
  621. package/src/labs/DatePicker.tsx +3 -1
  622. package/src/labs/Drawer.tsx +254 -0
  623. package/src/labs/GroupPicker.tsx +34 -15
  624. package/src/labs/PaginatedTable.tsx +12 -10
  625. package/src/labs/StaticTable.tsx +3 -3
  626. package/src/labs/Switch.tsx +5 -5
  627. package/src/labs/VirtualizedAutocomplete.tsx +19 -16
  628. package/src/labs/datePickerTheme.tsx +4 -2
  629. package/src/labs/index.ts +2 -0
  630. package/src/labs/materialReactTableTypes.tsx +1 -1
  631. package/src/properties/translations/odyssey-react-mui_cs.properties +3 -1
  632. package/src/properties/translations/odyssey-react-mui_da.properties +3 -1
  633. package/src/properties/translations/odyssey-react-mui_de.properties +3 -1
  634. package/src/properties/translations/odyssey-react-mui_el.properties +3 -1
  635. package/src/properties/translations/odyssey-react-mui_es.properties +3 -1
  636. package/src/properties/translations/odyssey-react-mui_fi.properties +3 -1
  637. package/src/properties/translations/odyssey-react-mui_fr.properties +3 -1
  638. package/src/properties/translations/odyssey-react-mui_hu.properties +3 -1
  639. package/src/properties/translations/odyssey-react-mui_id.properties +3 -1
  640. package/src/properties/translations/odyssey-react-mui_it.properties +3 -1
  641. package/src/properties/translations/odyssey-react-mui_ja.properties +3 -1
  642. package/src/properties/translations/odyssey-react-mui_ko.properties +3 -1
  643. package/src/properties/translations/odyssey-react-mui_ms.properties +3 -1
  644. package/src/properties/translations/odyssey-react-mui_nb.properties +3 -1
  645. package/src/properties/translations/odyssey-react-mui_nl_NL.properties +3 -1
  646. package/src/properties/translations/odyssey-react-mui_pl.properties +3 -1
  647. package/src/properties/translations/odyssey-react-mui_pt_BR.properties +3 -1
  648. package/src/properties/translations/odyssey-react-mui_ro.properties +3 -1
  649. package/src/properties/translations/odyssey-react-mui_ru.properties +3 -1
  650. package/src/properties/translations/odyssey-react-mui_sv.properties +3 -1
  651. package/src/properties/translations/odyssey-react-mui_th.properties +3 -1
  652. package/src/properties/translations/odyssey-react-mui_tr.properties +3 -1
  653. package/src/properties/translations/odyssey-react-mui_uk.properties +3 -1
  654. package/src/properties/translations/odyssey-react-mui_vi.properties +3 -1
  655. package/src/properties/translations/odyssey-react-mui_zh_CN.properties +3 -1
  656. package/src/properties/translations/odyssey-react-mui_zh_TW.properties +3 -1
  657. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
  658. package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
  659. package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
  660. package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
  661. package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
  662. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
  663. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
  664. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
  665. package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
  666. package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
  667. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
  668. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
  669. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
  670. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
  671. package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
  672. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
  673. package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
  674. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
  675. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
  676. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
  677. package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
  678. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
  679. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
  680. package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
  681. package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
  682. package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
  683. package/src/theme/components.tsx +83 -16
  684. package/tsconfig.json +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["useTranslation","Button","CloseIcon","memo","useState","useEffect","useRef","jsx","_jsx","jsxs","_jsxs","Dialog","callToActionFirstComponent","callToActionSecondComponent","callToActionLastComponent","children","isOpen","onClose","testId","title","translate","t","isContentScrollable","setIsContentScrollable","dialogContentRef","frameId","handleContentScroll","dialogContentElement","current","scrollHeight","clientHeight","requestAnimationFrame","cancelAnimationFrame","content","_DialogContentText","_Dialog","open","_DialogTitle","ariaLabel","label","onClick","size","startIcon","variant","_DialogContent","dividers","ref","tabIndex","_DialogActions","MemoizedDialog","displayName"],"sources":["../src/Dialog.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 { useTranslation } from \"react-i18next\";\nimport { Dialog as MuiDialog } from \"@mui/material\";\nimport {\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n} from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { CloseIcon } from \"./icons.generated\";\nimport {\n memo,\n ReactNode,\n useState,\n useEffect,\n useRef,\n ReactElement,\n} from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type DialogProps = {\n /**\n * @deprecated `aria-label` for close button comes from translation file\n */\n ariaLabel?: string;\n /**\n * An optional Button object to be situated in the Dialog footer. Should almost always be of variant `primary`.\n */\n callToActionFirstComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the `callToActionPrimaryComponent`.\n */\n callToActionSecondComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the other two `callToAction` components.\n */\n callToActionLastComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children: ReactNode;\n /**\n * When set to `true`, the Dialog will be visible.\n */\n isOpen: boolean;\n /**\n * Callback that controls what happens when the Dialog is dismissed\n */\n onClose: () => void;\n /**\n * The title of the Dialog\n */\n title: string;\n} & HtmlProps;\n\nconst Dialog = ({\n callToActionFirstComponent,\n callToActionSecondComponent,\n callToActionLastComponent,\n children,\n isOpen,\n onClose,\n testId,\n title,\n translate,\n}: DialogProps) => {\n const { t } = useTranslation();\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const dialogContentElement = dialogContentRef.current;\n if (dialogContentElement) {\n setIsContentScrollable(\n dialogContentElement.scrollHeight > dialogContentElement.clientHeight\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const content =\n typeof children === \"string\" ? (\n <DialogContentText>{children}</DialogContentText>\n ) : (\n children\n );\n\n return (\n <MuiDialog data-se={testId} open={isOpen} onClose={onClose}>\n <DialogTitle translate={translate}>\n {title}\n <Button\n ariaLabel={t(\"close.text\")}\n label=\"\"\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DialogTitle>\n <DialogContent\n dividers={isContentScrollable}\n ref={dialogContentRef}\n {...(isContentScrollable && {\n tabIndex: 0,\n })}\n >\n {content}\n </DialogContent>\n\n {(callToActionFirstComponent ||\n callToActionSecondComponent ||\n callToActionLastComponent) && (\n <DialogActions>\n {callToActionLastComponent}\n {callToActionSecondComponent}\n {callToActionFirstComponent}\n </DialogActions>\n )}\n </MuiDialog>\n );\n};\n\nconst MemoizedDialog = memo(Dialog);\nMemoizedDialog.displayName = \"Dialog\";\n\nexport { MemoizedDialog as Dialog };\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;A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;EAEH,OACEL,KAAA,CAAAyB,OAAA;IAAW,WAASjB,MAAO;IAACkB,IAAI,EAAEpB,MAAO;IAACC,OAAO,EAAEA,OAAQ;IAAAF,QAAA,GACzDL,KAAA,CAAA2B,YAAA;MAAajB,SAAS,EAAEA,SAAU;MAAAL,QAAA,GAC/BI,KAAK,EACNX,IAAA,CAACP,MAAM;QACLqC,SAAS,EAAEjB,CAAC,CAAC,YAAY,CAAE;QAC3BkB,KAAK,EAAC,EAAE;QACRC,OAAO,EAAEvB,OAAQ;QACjBwB,IAAI,EAAC,OAAO;QACZC,SAAS,EAAElC,IAAA,CAACN,SAAS,IAAE,CAAE;QACzByC,OAAO,EAAC;MAAU,CACnB,CAAC;IAAA,CACS,CAAC,EACdnC,IAAA,CAAAoC,cAAA;MACEC,QAAQ,EAAEvB,mBAAoB;MAC9BwB,GAAG,EAAEtB,gBAAiB;MAAA,IACjBF,mBAAmB,IAAI;QAC1ByB,QAAQ,EAAE;MACZ,CAAC;MAAAhC,QAAA,EAEAkB;IAAO,CACK,CAAC,EAEf,CAACrB,0BAA0B,IAC1BC,2BAA2B,IAC3BC,yBAAyB,KACzBJ,KAAA,CAAAsC,cAAA;MAAAjC,QAAA,GACGD,yBAAyB,EACzBD,2BAA2B,EAC3BD,0BAA0B;IAAA,CACd,CAChB;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMqC,cAAc,GAAG9C,IAAI,CAACQ,MAAM,CAAC;AACnCsC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAItC,MAAM"}
1
+ {"version":3,"file":"Dialog.js","names":["useTranslation","Button","CloseIcon","memo","useState","useEffect","useRef","jsx","_jsx","jsxs","_jsxs","Dialog","primaryCallToActionComponent","secondaryCallToActionComponent","tertiaryCallToActionComponent","children","isOpen","onClose","testId","title","translate","t","isContentScrollable","setIsContentScrollable","dialogContentRef","frameId","handleContentScroll","dialogContentElement","current","cancelAnimationFrame","scrollHeight","clientHeight","requestAnimationFrame","content","_DialogContentText","_Dialog","open","_DialogTitle","ariaLabel","onClick","size","startIcon","variant","_DialogContent","tabIndex","dividers","ref","_DialogActions","MemoizedDialog","displayName"],"sources":["../src/Dialog.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 { useTranslation } from \"react-i18next\";\nimport { Dialog as MuiDialog } from \"@mui/material\";\nimport {\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n} from \"@mui/material\";\nimport { Button } from \"./Button\";\nimport { CloseIcon } from \"./icons.generated\";\nimport {\n memo,\n ReactNode,\n useState,\n useEffect,\n useRef,\n ReactElement,\n} from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type DialogProps = {\n /**\n * @deprecated `aria-label` for close button comes from translation file\n */\n ariaLabel?: string;\n /**\n * An optional Button object to be situated in the Dialog footer. Should almost always be of variant `primary`.\n */\n primaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the `callToActionPrimaryComponent`.\n */\n secondaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * An optional Button object to be situated in the Dialog footer, alongside the other two `callToAction` components.\n */\n tertiaryCallToActionComponent?: ReactElement<typeof Button>;\n /**\n * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s.\n */\n children: ReactNode;\n /**\n * When set to `true`, the Dialog will be visible.\n */\n isOpen: boolean;\n /**\n * Callback that controls what happens when the Dialog is dismissed\n */\n onClose: () => void;\n /**\n * The title of the Dialog\n */\n title: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Dialog = ({\n primaryCallToActionComponent,\n secondaryCallToActionComponent,\n tertiaryCallToActionComponent,\n children,\n isOpen,\n onClose,\n testId,\n title,\n translate,\n}: DialogProps) => {\n const { t } = useTranslation();\n const [isContentScrollable, setIsContentScrollable] = useState(false);\n const dialogContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let frameId: number;\n\n const handleContentScroll = () => {\n const dialogContentElement = dialogContentRef.current;\n if (dialogContentElement) {\n cancelAnimationFrame(frameId);\n setIsContentScrollable(\n dialogContentElement.scrollHeight > dialogContentElement.clientHeight,\n );\n }\n frameId = requestAnimationFrame(handleContentScroll);\n };\n\n if (isOpen) {\n frameId = requestAnimationFrame(handleContentScroll);\n }\n\n return () => {\n cancelAnimationFrame(frameId);\n };\n }, [isOpen]);\n\n const content =\n typeof children === \"string\" ? (\n <DialogContentText>{children}</DialogContentText>\n ) : (\n children\n );\n\n return (\n <MuiDialog data-se={testId} open={isOpen} onClose={onClose}>\n <DialogTitle translate={translate}>\n {title}\n <Button\n ariaLabel={t(\"close.text\")}\n onClick={onClose}\n size=\"small\"\n startIcon={<CloseIcon />}\n variant=\"floating\"\n />\n </DialogTitle>\n <DialogContent\n {...(isContentScrollable && {\n //Sets tabIndex on content element if scrollable so content is easier to navigate with the keyboard\n tabIndex: 0,\n })}\n dividers={isContentScrollable}\n ref={dialogContentRef}\n >\n {content}\n </DialogContent>\n\n {(primaryCallToActionComponent ||\n secondaryCallToActionComponent ||\n tertiaryCallToActionComponent) && (\n <DialogActions>\n {tertiaryCallToActionComponent}\n {secondaryCallToActionComponent}\n {primaryCallToActionComponent}\n </DialogActions>\n )}\n </MuiDialog>\n );\n};\n\nconst MemoizedDialog = memo(Dialog);\nMemoizedDialog.displayName = \"Dialog\";\n\nexport { MemoizedDialog as Dialog };\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,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AEH,OACEL,KAAA,CAAAyB,OAAA;IAAW,WAASjB,MAAO;IAACkB,IAAI,EAAEpB,MAAO;IAACC,OAAO,EAAEA,OAAQ;IAAAF,QAAA,GACzDL,KAAA,CAAA2B,YAAA;MAAajB,SAAS,EAAEA,SAAU;MAAAL,QAAA,GAC/BI,KAAK,EACNX,IAAA,CAACP,MAAM;QACLqC,SAAS,EAAEjB,CAAC,CAAC,YAAY,CAAE;QAC3BkB,OAAO,EAAEtB,OAAQ;QACjBuB,IAAI,EAAC,OAAO;QACZC,SAAS,EAAEjC,IAAA,CAACN,SAAS,IAAE,CAAE;QACzBwC,OAAO,EAAC;MAAU,CACnB,CAAC;IAAA,CACS,CAAC,EACdlC,IAAA,CAAAmC,cAAA;MAAA,IACOrB,mBAAmB,IAAI;QAE1BsB,QAAQ,EAAE;MACZ,CAAC;MACDC,QAAQ,EAAEvB,mBAAoB;MAC9BwB,GAAG,EAAEtB,gBAAiB;MAAAT,QAAA,EAErBkB;IAAO,CACK,CAAC,EAEf,CAACrB,4BAA4B,IAC5BC,8BAA8B,IAC9BC,6BAA6B,KAC7BJ,KAAA,CAAAqC,cAAA;MAAAhC,QAAA,GACGD,6BAA6B,EAC7BD,8BAA8B,EAC9BD,4BAA4B;IAAA,CAChB,CAChB;EAAA,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMoC,cAAc,GAAG7C,IAAI,CAACQ,MAAM,CAAC;AACnCqC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIrC,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorMessageList.js","names":["useOdysseyDesignTokens","memo","useMemo","jsx","_jsx","listItemStyles","display","paddingInlineStart","ErrorMessageList","errorMessages","odysseyDesignTokens","listStyles","listStyle","Spacing4","_List","disablePadding","dense","sx","children","map","errorMessage","_ListItem","MemoizedErrorMessageList","displayName"],"sources":["../src/ErrorMessageList.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 { List as MuiList, ListItem as MuiListItem } from \"@mui/material\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { memo, useMemo } from \"react\";\n\nexport type ErrorMessageListProps = {\n errorMessages: string[];\n};\n\nconst listItemStyles = {\n display: \"list-item\",\n paddingInlineStart: 0,\n};\n\nconst ErrorMessageList = ({ errorMessages }: ErrorMessageListProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const listStyles = useMemo(\n () => ({\n listStyle: \"disc\",\n paddingInlineStart: odysseyDesignTokens.Spacing4,\n }),\n [odysseyDesignTokens]\n );\n\n return (\n <MuiList disablePadding dense sx={listStyles}>\n {errorMessages.map((errorMessage) => (\n <MuiListItem disablePadding dense sx={listItemStyles}>\n {errorMessage}\n </MuiListItem>\n ))}\n </MuiList>\n );\n};\n\nconst MemoizedErrorMessageList = memo(ErrorMessageList);\nMemoizedErrorMessageList.displayName = \"ErrorMessageList\";\n\nexport { MemoizedErrorMessageList as ErrorMessageList };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaSA,sBAAsB;AAC/B,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMtC,MAAMC,cAAc,GAAG;EACrBC,OAAO,EAAE,WAAW;EACpBC,kBAAkB,EAAE;AACtB,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAqC,CAAC,KAAK;EACrE,MAAMC,mBAAmB,GAAGV,sBAAsB,CAAC,CAAC;EAEpD,MAAMW,UAAU,GAAGT,OAAO,CACxB,OAAO;IACLU,SAAS,EAAE,MAAM;IACjBL,kBAAkB,EAAEG,mBAAmB,CAACG;EAC1C,CAAC,CAAC,EACF,CAACH,mBAAmB,CACtB,CAAC;EAED,OACEN,IAAA,CAAAU,KAAA;IAASC,cAAc;IAACC,KAAK;IAACC,EAAE,EAAEN,UAAW;IAAAO,QAAA,EAC1CT,aAAa,CAACU,GAAG,CAAEC,YAAY,IAC9BhB,IAAA,CAAAiB,SAAA;MAAaN,cAAc;MAACC,KAAK;MAACC,EAAE,EAAEZ,cAAe;MAAAa,QAAA,EAClDE;IAAY,CACF,CACd;EAAC,CACK,CAAC;AAEd,CAAC;AAED,MAAME,wBAAwB,GAAGrB,IAAI,CAACO,gBAAgB,CAAC;AACvDc,wBAAwB,CAACC,WAAW,GAAG,kBAAkB;AAEzD,SAASD,wBAAwB,IAAId,gBAAgB"}
1
+ {"version":3,"file":"ErrorMessageList.js","names":["useOdysseyDesignTokens","memo","useMemo","jsx","_jsx","listItemStyles","display","paddingInlineStart","ErrorMessageList","errorMessages","odysseyDesignTokens","listStyles","listStyle","Spacing4","_List","disablePadding","dense","sx","children","map","errorMessage","_ListItem","MemoizedErrorMessageList","displayName"],"sources":["../src/ErrorMessageList.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 { List as MuiList, ListItem as MuiListItem } from \"@mui/material\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { memo, useMemo } from \"react\";\n\nexport type ErrorMessageListProps = {\n errorMessages: string[];\n};\n\nconst listItemStyles = {\n display: \"list-item\",\n paddingInlineStart: 0,\n};\n\nconst ErrorMessageList = ({ errorMessages }: ErrorMessageListProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const listStyles = useMemo(\n () => ({\n listStyle: \"disc\",\n paddingInlineStart: odysseyDesignTokens.Spacing4,\n }),\n [odysseyDesignTokens],\n );\n\n return (\n <MuiList disablePadding dense sx={listStyles}>\n {errorMessages.map((errorMessage) => (\n <MuiListItem disablePadding dense sx={listItemStyles}>\n {errorMessage}\n </MuiListItem>\n ))}\n </MuiList>\n );\n};\n\nconst MemoizedErrorMessageList = memo(ErrorMessageList);\nMemoizedErrorMessageList.displayName = \"ErrorMessageList\";\n\nexport { MemoizedErrorMessageList as ErrorMessageList };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaSA,sBAAsB;AAC/B,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMtC,MAAMC,cAAc,GAAG;EACrBC,OAAO,EAAE,WAAW;EACpBC,kBAAkB,EAAE;AACtB,CAAC;AAED,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC;AAAqC,CAAC,KAAK;EACrE,MAAMC,mBAAmB,GAAGV,sBAAsB,CAAC,CAAC;EAEpD,MAAMW,UAAU,GAAGT,OAAO,CACxB,OAAO;IACLU,SAAS,EAAE,MAAM;IACjBL,kBAAkB,EAAEG,mBAAmB,CAACG;EAC1C,CAAC,CAAC,EACF,CAACH,mBAAmB,CACtB,CAAC;EAED,OACEN,IAAA,CAAAU,KAAA;IAASC,cAAc;IAACC,KAAK;IAACC,EAAE,EAAEN,UAAW;IAAAO,QAAA,EAC1CT,aAAa,CAACU,GAAG,CAAEC,YAAY,IAC9BhB,IAAA,CAAAiB,SAAA;MAAaN,cAAc;MAACC,KAAK;MAACC,EAAE,EAAEZ,cAAe;MAAAa,QAAA,EAClDE;IAAY,CACF,CACd;EAAC,CACK,CAAC;AAEd,CAAC;AAED,MAAME,wBAAwB,GAAGrB,IAAI,CAACO,gBAAgB,CAAC;AACvDc,wBAAwB,CAACC,WAAW,GAAG,kBAAkB;AAEzD,SAASD,wBAAwB,IAAId,gBAAgB"}
package/dist/Field.js CHANGED
@@ -59,6 +59,7 @@ const Field = ({
59
59
  fullWidth: isFullWidth,
60
60
  children: [fieldType === "group" ? _jsxs(_FormLabel, {
61
61
  component: "legend",
62
+ id: labelElementId,
62
63
  children: [label, " ", isOptional && label && _jsxs(Typography, {
63
64
  component: "span",
64
65
  color: "textSecondary",
package/dist/Field.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","Typography","useFieldset","useTranslation","useUniqueId","jsxs","_jsxs","jsx","_jsx","fieldTypeValues","Field","ariaDescribedBy","errorMessage","errorMessageList","fieldType","hasVisibleLabel","hint","HintLinkComponent","id","idOverride","isDisabled","isDisabledProp","isFullWidth","isRadioGroup","isOptional","label","renderFieldComponent","t","hintId","undefined","errorMessageElementId","labelElementId","localAriaDescribedBy","join","trim","isFieldsetDisabled","_FormControl","component","disabled","error","Boolean","Array","isArray","length","role","fullWidth","children","_FormLabel","color","inputId","text","LinkComponent","message","messageList","MemoizedField","displayName"],"sources":["../src/Field.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, useMemo } from \"react\";\n\nimport {\n FormControl as MuiFormControl,\n FormLabel as MuiFormLabel,\n} from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { FieldError } from \"./FieldError\";\nimport { FieldHint } from \"./FieldHint\";\nimport { FieldLabel } from \"./FieldLabel\";\nimport { Typography } from \"./Typography\";\nimport { useFieldset } from \"./FieldsetContext\";\nimport { useTranslation } from \"react-i18next\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const fieldTypeValues = [\"single\", \"group\"] as const;\n\nexport type FieldProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessageList?: string[];\n /**\n * The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).\n */\n fieldType: (typeof fieldTypeValues)[number];\n /**\n * If `true`, the Field label will be shown\n */\n hasVisibleLabel: boolean;\n /**\n * Important for narrowing down the `fieldset` role to \"radiogroup\".\n */\n isRadioGroup?: boolean;\n /**\n * Important for determining if children inherit error state\n */\n isCheckboxGroup?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Render-props function that sends back ARIA props to your field component.\n */\n renderFieldComponent: ({\n ariaDescribedBy,\n dataSe,\n errorMessageElementId,\n id,\n labelElementId,\n }: {\n ariaDescribedBy?: string;\n dataSe?: string;\n errorMessageElementId?: string;\n id: string;\n labelElementId: string;\n }) => ReactElement;\n};\n\nconst Field = ({\n ariaDescribedBy,\n errorMessage,\n errorMessageList,\n fieldType,\n hasVisibleLabel,\n hint,\n HintLinkComponent,\n id: idOverride,\n isDisabled: isDisabledProp = false,\n isFullWidth = false,\n isRadioGroup = false,\n isOptional = false,\n label,\n renderFieldComponent,\n}: FieldProps &\n Pick<\n FieldComponentProps,\n | \"ariaDescribedBy\"\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isDisabled\"\n | \"isFullWidth\"\n | \"isOptional\"\n >) => {\n const { t } = useTranslation();\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorMessageElementId =\n errorMessage || errorMessageList ? `${id}-error` : undefined;\n const labelElementId = `${id}-label`;\n\n const localAriaDescribedBy = useMemo(\n () =>\n [hintId, errorMessageElementId, ariaDescribedBy].join(\" \").trim() ||\n undefined,\n [ariaDescribedBy, errorMessageElementId, hintId]\n );\n\n const { isDisabled: isFieldsetDisabled } = useFieldset();\n\n const isDisabled = useMemo(\n () => isDisabledProp || isFieldsetDisabled,\n [isDisabledProp, isFieldsetDisabled]\n );\n\n return (\n <MuiFormControl\n component={fieldType === \"group\" ? \"fieldset\" : \"div\"}\n disabled={isDisabled}\n error={\n Boolean(errorMessage) ||\n (Array.isArray(errorMessageList) && errorMessageList.length > 0)\n }\n role={isRadioGroup ? \"radiogroup\" : undefined}\n fullWidth={isFullWidth}\n >\n {fieldType === \"group\" ? (\n <MuiFormLabel component=\"legend\">\n {label}{\" \"}\n {isOptional && label && (\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.optional.text\")})\n </Typography>\n )}\n </MuiFormLabel>\n ) : (\n <FieldLabel\n hasVisibleLabel={hasVisibleLabel}\n id={labelElementId}\n inputId={id}\n isOptional={isOptional}\n text={label}\n />\n )}\n\n {hint && (\n <FieldHint id={hintId} LinkComponent={HintLinkComponent} text={hint} />\n )}\n\n {renderFieldComponent({\n ariaDescribedBy: localAriaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n })}\n\n {(errorMessage || errorMessageList) && (\n <FieldError\n id={errorMessageElementId}\n message={errorMessage}\n messageList={errorMessageList}\n />\n )}\n </MuiFormControl>\n );\n};\n\nconst MemoizedField = memo(Field);\nMemoizedField.displayName = \"Field\";\n\nexport { MemoizedField as Field };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AAC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AAC,CAAC,EAED,CAACnB,YAAY,IAAIC,gBAAgB,KAChCL,IAAA,CAACV,UAAU;MACToB,EAAE,EAAEY,qBAAsB;MAC1BsB,OAAO,EAAExC,YAAa;MACtByC,WAAW,EAAExC;IAAiB,CAC/B,CACF;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMyC,aAAa,GAAG1D,IAAI,CAACc,KAAK,CAAC;AACjC4C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI5C,KAAK"}
1
+ {"version":3,"file":"Field.js","names":["memo","useMemo","FieldError","FieldHint","FieldLabel","Typography","useFieldset","useTranslation","useUniqueId","jsxs","_jsxs","jsx","_jsx","fieldTypeValues","Field","ariaDescribedBy","errorMessage","errorMessageList","fieldType","hasVisibleLabel","hint","HintLinkComponent","id","idOverride","isDisabled","isDisabledProp","isFullWidth","isRadioGroup","isOptional","label","renderFieldComponent","t","hintId","undefined","errorMessageElementId","labelElementId","localAriaDescribedBy","join","trim","isFieldsetDisabled","_FormControl","component","disabled","error","Boolean","Array","isArray","length","role","fullWidth","children","_FormLabel","color","inputId","text","LinkComponent","message","messageList","MemoizedField","displayName"],"sources":["../src/Field.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, useMemo } from \"react\";\n\nimport {\n FormControl as MuiFormControl,\n FormLabel as MuiFormLabel,\n} from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { FieldError } from \"./FieldError\";\nimport { FieldHint } from \"./FieldHint\";\nimport { FieldLabel } from \"./FieldLabel\";\nimport { HtmlProps } from \"./HtmlProps\";\nimport { Typography } from \"./Typography\";\nimport { useFieldset } from \"./FieldsetContext\";\nimport { useTranslation } from \"react-i18next\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const fieldTypeValues = [\"single\", \"group\"] as const;\n\nexport type FieldProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessageList?: string[];\n /**\n * The field type determines how ARIA components are setup. It's important to use this to denote if you expect only one component (like a text field) or multiple (like a radio group).\n */\n fieldType: (typeof fieldTypeValues)[number];\n /**\n * If `true`, the Field label will be shown\n */\n hasVisibleLabel: boolean;\n /**\n * Important for narrowing down the `fieldset` role to \"radiogroup\".\n */\n isRadioGroup?: boolean;\n /**\n * Important for determining if children inherit error state\n */\n isCheckboxGroup?: boolean;\n /**\n * The label for the `input` element.\n */\n label: string;\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder?: string;\n /**\n * Render-props function that sends back ARIA props to your field component.\n */\n renderFieldComponent: ({\n ariaDescribedBy,\n dataSe,\n errorMessageElementId,\n id,\n labelElementId,\n }: {\n ariaDescribedBy?: string;\n dataSe?: string;\n errorMessageElementId?: string;\n id: string;\n labelElementId: string;\n }) => ReactElement;\n};\n\nconst Field = ({\n ariaDescribedBy,\n errorMessage,\n errorMessageList,\n fieldType,\n hasVisibleLabel,\n hint,\n HintLinkComponent,\n id: idOverride,\n isDisabled: isDisabledProp = false,\n isFullWidth = false,\n isRadioGroup = false,\n isOptional = false,\n label,\n renderFieldComponent,\n}: FieldProps &\n Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isDisabled\"\n | \"isFullWidth\"\n | \"isOptional\"\n > &\n Pick<HtmlProps, \"ariaDescribedBy\">) => {\n const { t } = useTranslation();\n\n const id = useUniqueId(idOverride);\n const hintId = hint ? `${id}-hint` : undefined;\n const errorMessageElementId =\n errorMessage || errorMessageList ? `${id}-error` : undefined;\n const labelElementId = `${id}-label`;\n\n const localAriaDescribedBy = useMemo(\n () =>\n [hintId, errorMessageElementId, ariaDescribedBy].join(\" \").trim() ||\n undefined,\n [ariaDescribedBy, errorMessageElementId, hintId],\n );\n\n const { isDisabled: isFieldsetDisabled } = useFieldset();\n\n const isDisabled = useMemo(\n () => isDisabledProp || isFieldsetDisabled,\n [isDisabledProp, isFieldsetDisabled],\n );\n\n return (\n <MuiFormControl\n component={fieldType === \"group\" ? \"fieldset\" : \"div\"}\n disabled={isDisabled}\n error={\n Boolean(errorMessage) ||\n (Array.isArray(errorMessageList) && errorMessageList.length > 0)\n }\n role={isRadioGroup ? \"radiogroup\" : undefined}\n fullWidth={isFullWidth}\n >\n {fieldType === \"group\" ? (\n <MuiFormLabel component=\"legend\" id={labelElementId}>\n {label}{\" \"}\n {isOptional && label && (\n <Typography component=\"span\" color=\"textSecondary\">\n ({t(\"fieldlabel.optional.text\")})\n </Typography>\n )}\n </MuiFormLabel>\n ) : (\n <FieldLabel\n hasVisibleLabel={hasVisibleLabel}\n id={labelElementId}\n inputId={id}\n isOptional={isOptional}\n text={label}\n />\n )}\n\n {hint && (\n <FieldHint id={hintId} LinkComponent={HintLinkComponent} text={hint} />\n )}\n\n {renderFieldComponent({\n ariaDescribedBy: localAriaDescribedBy,\n errorMessageElementId,\n id,\n labelElementId,\n })}\n\n {(errorMessage || errorMessageList) && (\n <FieldError\n id={errorMessageElementId}\n message={errorMessage}\n messageList={errorMessageList}\n />\n )}\n </MuiFormControl>\n );\n};\n\nconst MemoizedField = memo(Field);\nMemoizedField.displayName = \"Field\";\n\nexport { MemoizedField as Field };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAQ3CC,UAAU;AAAA,SACVC,SAAS;AAAA,SACTC,UAAU;AAAA,SAEVC,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AExC,YAAa;MACtByC,WAAW,EAAExC;IAAiB,CAC/B,CACF;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMyC,aAAa,GAAG1D,IAAI,CAACc,KAAK,CAAC;AACjC4C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI5C,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldComponentProps.js","names":[],"sources":["../src/FieldComponentProps.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\nimport { ReactElement } from \"react\";\n\nimport { HintLink } from \"./HintLink\";\n\nexport type FieldComponentProps = {\n /**\n * The ID of the element that describes the Field\n */\n ariaDescribedBy?: string;\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * If `error` is not undefined, the `input` will indicate multiple errors.\n */\n errorMessageList?: string[];\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * A `Link` component to provide greater context that is rendered at the end of the `hint` text\n */\n HintLinkComponent?: ReactElement<typeof HintLink>;\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`, the component can stretch to fill the width of the container.\n */\n isFullWidth?: 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 name of the `input` element. Defaults to the `id` if not set.\n */\n name?: string;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"FieldComponentProps.js","names":[],"sources":["../src/FieldComponentProps.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\nimport { ReactElement } from \"react\";\n\nimport { HintLink } from \"./HintLink\";\n\nexport type FieldComponentProps = {\n /**\n * If `error` is not undefined, the `input` will indicate an error.\n */\n errorMessage?: string;\n /**\n * If `error` is not undefined, the `input` will indicate multiple errors.\n */\n errorMessageList?: string[];\n /**\n * The helper text content.\n */\n hint?: string;\n /**\n * A `Link` component to provide greater context that is rendered at the end of the `hint` text\n */\n HintLinkComponent?: ReactElement<typeof HintLink>;\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`, the component can stretch to fill the width of the container.\n */\n isFullWidth?: 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 name of the `input` element. Defaults to the `id` if not set.\n */\n name?: string;\n};\n\nexport type FieldComponentRenderProps = {\n ariaDescribedBy: string;\n dataSe: string;\n errorMessageElementId: string;\n id: string;\n labelElementId: string;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldError.js","names":["memo","ScreenReaderText","ErrorMessageList","useTranslation","Box","jsx","_jsx","jsxs","_jsxs","FieldError","id","message","messageList","testId","translate","t","_FormHelperText","error","children","errorMessages","MemoizedFieldError","displayName"],"sources":["../src/FieldError.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { ErrorMessageList } from \"./ErrorMessageList\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Box } from \"./Box\";\n\nexport type FieldErrorProps = {\n id?: string;\n message?: string;\n messageList?: string[];\n} & HtmlProps;\n\nconst FieldError = ({\n id,\n message,\n messageList,\n testId,\n translate,\n}: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText data-se={testId} error id={id} translate={translate}>\n <ScreenReaderText translate={translate}>{`${t(\n \"fielderror.screenreader.text\"\n )}:`}</ScreenReaderText>\n <Box>\n {message}\n {messageList && <ErrorMessageList errorMessages={messageList} />}\n </Box>\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldError = memo(FieldError);\nMemoizedFieldError.displayName = \"FieldError\";\n\nexport { MemoizedFieldError as FieldError };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAGpBC,gBAAgB;AAAA,SAChBC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAGtCC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAQZ,MAAMC,UAAU,GAAGA,CAAC;EAClBC,EAAE;EACFC,OAAO;EACPC,WAAW;EACXC,MAAM;EACNC;AACe,CAAC,KAAK;EACrB,MAAM;IAAEC;EAAE,CAAC,GAAGZ,cAAc,CAAC,CAAC;EAE9B,OACEK,KAAA,CAAAQ,eAAA;IAAgB,WAASH,MAAO;IAACI,KAAK;IAACP,EAAE,EAAEA,EAAG;IAACI,SAAS,EAAEA,SAAU;IAAAI,QAAA,GAClEZ,IAAA,CAACL,gBAAgB;MAACa,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAG,GAAEH,CAAC,CAC3C,8BACF,CAAE;IAAE,CAAmB,CAAC,EACxBP,KAAA,CAACJ,GAAG;MAAAc,QAAA,GACDP,OAAO,EACPC,WAAW,IAAIN,IAAA,CAACJ,gBAAgB;QAACiB,aAAa,EAAEP;MAAY,CAAE,CAAC;IAAA,CAC7D,CAAC;EAAA,CACQ,CAAC;AAErB,CAAC;AAED,MAAMQ,kBAAkB,GAAGpB,IAAI,CAACS,UAAU,CAAC;AAC3CW,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIX,UAAU"}
1
+ {"version":3,"file":"FieldError.js","names":["memo","ScreenReaderText","ErrorMessageList","useTranslation","Box","jsx","_jsx","jsxs","_jsxs","FieldError","id","message","messageList","testId","translate","t","_FormHelperText","error","children","errorMessages","MemoizedFieldError","displayName"],"sources":["../src/FieldError.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { ErrorMessageList } from \"./ErrorMessageList\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Box } from \"./Box\";\n\nexport type FieldErrorProps = {\n id?: string;\n message?: string;\n messageList?: string[];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst FieldError = ({\n id,\n message,\n messageList,\n testId,\n translate,\n}: FieldErrorProps) => {\n const { t } = useTranslation();\n\n return (\n <FormHelperText data-se={testId} error id={id} translate={translate}>\n <ScreenReaderText translate={translate}>{`${t(\n \"fielderror.screenreader.text\",\n )}:`}</ScreenReaderText>\n <Box>\n {message}\n {messageList && <ErrorMessageList errorMessages={messageList} />}\n </Box>\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldError = memo(FieldError);\nMemoizedFieldError.displayName = \"FieldError\";\n\nexport { MemoizedFieldError as FieldError };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAGpBC,gBAAgB;AAAA,SAChBC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAGtCC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAQZ,MAAMC,UAAU,GAAGA,CAAC;EAClBC,EAAE;EACFC,OAAO;EACPC,WAAW;EACXC,MAAM;EACNC;AACe,CAAC,KAAK;EACrB,MAAM;IAAEC;EAAE,CAAC,GAAGZ,cAAc,CAAC,CAAC;EAE9B,OACEK,KAAA,CAAAQ,eAAA;IAAgB,WAASH,MAAO;IAACI,KAAK;IAACP,EAAE,EAAEA,EAAG;IAACI,SAAS,EAAEA,SAAU;IAAAI,QAAA,GAClEZ,IAAA,CAACL,gBAAgB;MAACa,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAG,GAAEH,CAAC,CAC3C,8BACF,CAAE;IAAE,CAAmB,CAAC,EACxBP,KAAA,CAACJ,GAAG;MAAAc,QAAA,GACDP,OAAO,EACPC,WAAW,IAAIN,IAAA,CAACJ,gBAAgB;QAACiB,aAAa,EAAEP;MAAY,CAAE,CAAC;IAAA,CAC7D,CAAC;EAAA,CACQ,CAAC;AAErB,CAAC;AAED,MAAMQ,kBAAkB,GAAGpB,IAAI,CAACS,UAAU,CAAC;AAC3CW,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIX,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldHint.js","names":["memo","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","FieldHint","id","LinkComponent","testId","text","translate","_FormHelperText","children","MemoizedFieldHint","displayName"],"sources":["../src/FieldHint.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldHintProps = {\n LinkComponent?: FieldComponentProps[\"HintLinkComponent\"];\n id?: string;\n text: string;\n} & HtmlProps;\n\nconst FieldHint = ({\n id,\n LinkComponent,\n testId,\n text,\n translate,\n}: FieldHintProps) => {\n return (\n <FormHelperText data-se={testId} id={id} translate={translate}>\n {text}\n {LinkComponent && (\n <>\n <span>&nbsp;{LinkComponent}</span>\n </>\n )}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\nMemoizedFieldHint.displayName = \"FieldHint\";\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAa7B,MAAMC,SAAS,GAAGA,CAAC;EACjBC,EAAE;EACFC,aAAa;EACbC,MAAM;EACNC,IAAI;EACJC;AACc,CAAC,KAAK;EACpB,OACEV,KAAA,CAAAW,eAAA;IAAgB,WAASH,MAAO;IAACF,EAAE,EAAEA,EAAG;IAACI,SAAS,EAAEA,SAAU;IAAAE,QAAA,GAC3DH,IAAI,EACJF,aAAa,IACZH,IAAA,CAAAF,SAAA;MAAAU,QAAA,EACEZ,KAAA;QAAAY,QAAA,GAAM,MAAM,EAACL,aAAa;MAAA,CAAO;IAAC,CAClC,CACH;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMM,iBAAiB,GAAGf,IAAI,CAACO,SAAS,CAAC;AACzCQ,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIR,SAAS"}
1
+ {"version":3,"file":"FieldHint.js","names":["memo","jsxs","_jsxs","Fragment","_Fragment","jsx","_jsx","FieldHint","id","LinkComponent","testId","text","translate","_FormHelperText","children","MemoizedFieldHint","displayName"],"sources":["../src/FieldHint.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo } from \"react\";\n\nimport { FormHelperText } from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldHintProps = {\n LinkComponent?: FieldComponentProps[\"HintLinkComponent\"];\n id?: string;\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst FieldHint = ({\n id,\n LinkComponent,\n testId,\n text,\n translate,\n}: FieldHintProps) => {\n return (\n <FormHelperText data-se={testId} id={id} translate={translate}>\n {text}\n {LinkComponent && (\n <>\n <span>&nbsp;{LinkComponent}</span>\n </>\n )}\n </FormHelperText>\n );\n};\n\nconst MemoizedFieldHint = memo(FieldHint);\nMemoizedFieldHint.displayName = \"FieldHint\";\n\nexport { MemoizedFieldHint as FieldHint };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAa7B,MAAMC,SAAS,GAAGA,CAAC;EACjBC,EAAE;EACFC,aAAa;EACbC,MAAM;EACNC,IAAI;EACJC;AACc,CAAC,KAAK;EACpB,OACEV,KAAA,CAAAW,eAAA;IAAgB,WAASH,MAAO;IAACF,EAAE,EAAEA,EAAG;IAACI,SAAS,EAAEA,SAAU;IAAAE,QAAA,GAC3DH,IAAI,EACJF,aAAa,IACZH,IAAA,CAAAF,SAAA;MAAAU,QAAA,EACEZ,KAAA;QAAAY,QAAA,GAAM,MAAM,EAACL,aAAa;MAAA,CAAO;IAAC,CAClC,CACH;EAAA,CACa,CAAC;AAErB,CAAC;AAED,MAAMM,iBAAiB,GAAGf,IAAI,CAACO,SAAS,CAAC;AACzCQ,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIR,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Subordinate","jsx","_jsx","jsxs","_jsxs","FieldLabel","hasVisibleLabel","id","inputId","isOptional","testId","translate","text","t","inputLabel","_InputLabel","htmlFor","children","MemoizedFieldLabel","displayName"],"sources":["../src/FieldLabel.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { InputLabel as MuiInputLabel } from \"@mui/material\";\nimport { memo, useMemo } from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { Subordinate } from \"./Typography\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n} & HtmlProps;\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n testId,\n translate,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel\n data-se={testId}\n htmlFor={inputId}\n id={id}\n translate={translate}\n >\n <span>{text}</span>\n {isOptional && (\n <Subordinate>{t(\"fieldlabel.optional.text\")}</Subordinate>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, testId, translate, text, t]\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText translate={translate}>{inputLabel}</ScreenReaderText>\n );\n};\n\nconst MemoizedFieldLabel = memo(FieldLabel);\nMemoizedFieldLabel.displayName = \"FieldLabel\";\n\nexport { MemoizedFieldLabel as FieldLabel };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,SAASC,cAAc,QAAQ,eAAe;AAAC,SACtCC,gBAAgB;AAAA,SAChBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAWpB,MAAMC,UAAU,GAAGA,CAAC;EAClBC,eAAe;EACfC,EAAE;EACFC,OAAO;EACPC,UAAU;EACVC,MAAM;EACNC,SAAS;EACTC;AACe,CAAC,KAAK;EACrB,MAAM;IAAEC;EAAE,CAAC,GAAGf,cAAc,CAAC,CAAC;EAE9B,MAAMgB,UAAU,GAAGjB,OAAO,CACxB,MACEO,KAAA,CAAAW,WAAA;IACE,WAASL,MAAO;IAChBM,OAAO,EAAER,OAAQ;IACjBD,EAAE,EAAEA,EAAG;IACPI,SAAS,EAAEA,SAAU;IAAAM,QAAA,GAErBf,IAAA;MAAAe,QAAA,EAAOL;IAAI,CAAO,CAAC,EAClBH,UAAU,IACTP,IAAA,CAACF,WAAW;MAAAiB,QAAA,EAAEJ,CAAC,CAAC,0BAA0B;IAAC,CAAc,CAC1D;EAAA,CACY,CAChB,EACD,CAACN,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,CAAC,CACtD,CAAC;EAED,OAAOP,eAAe,GACpBQ,UAAU,GAEVZ,IAAA,CAACH,gBAAgB;IAACY,SAAS,EAAEA,SAAU;IAAAM,QAAA,EAAEH;EAAU,CAAmB,CACvE;AACH,CAAC;AAED,MAAMI,kBAAkB,GAAGtB,IAAI,CAACS,UAAU,CAAC;AAC3Ca,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIb,UAAU"}
1
+ {"version":3,"file":"FieldLabel.js","names":["memo","useMemo","useTranslation","ScreenReaderText","Subordinate","jsx","_jsx","jsxs","_jsxs","FieldLabel","hasVisibleLabel","id","inputId","isOptional","testId","translate","text","t","inputLabel","_InputLabel","htmlFor","children","MemoizedFieldLabel","displayName"],"sources":["../src/FieldLabel.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { InputLabel as MuiInputLabel } from \"@mui/material\";\nimport { memo, useMemo } from \"react\";\n\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { Subordinate } from \"./Typography\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldLabelProps = {\n hasVisibleLabel: boolean;\n id: string;\n inputId: string;\n isOptional: boolean;\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst FieldLabel = ({\n hasVisibleLabel,\n id,\n inputId,\n isOptional,\n testId,\n translate,\n text,\n}: FieldLabelProps) => {\n const { t } = useTranslation();\n\n const inputLabel = useMemo(\n () => (\n <MuiInputLabel\n data-se={testId}\n htmlFor={inputId}\n id={id}\n translate={translate}\n >\n <span>{text}</span>\n {isOptional && (\n <Subordinate>{t(\"fieldlabel.optional.text\")}</Subordinate>\n )}\n </MuiInputLabel>\n ),\n [id, inputId, isOptional, testId, translate, text, t],\n );\n\n return hasVisibleLabel ? (\n inputLabel\n ) : (\n <ScreenReaderText translate={translate}>{inputLabel}</ScreenReaderText>\n );\n};\n\nconst MemoizedFieldLabel = memo(FieldLabel);\nMemoizedFieldLabel.displayName = \"FieldLabel\";\n\nexport { MemoizedFieldLabel as FieldLabel };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAErC,SAASC,cAAc,QAAQ,eAAe;AAAC,SACtCC,gBAAgB;AAAA,SAChBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAWpB,MAAMC,UAAU,GAAGA,CAAC;EAClBC,eAAe;EACfC,EAAE;EACFC,OAAO;EACPC,UAAU;EACVC,MAAM;EACNC,SAAS;EACTC;AACe,CAAC,KAAK;EACrB,MAAM;IAAEC;EAAE,CAAC,GAAGf,cAAc,CAAC,CAAC;EAE9B,MAAMgB,UAAU,GAAGjB,OAAO,CACxB,MACEO,KAAA,CAAAW,WAAA;IACE,WAASL,MAAO;IAChBM,OAAO,EAAER,OAAQ;IACjBD,EAAE,EAAEA,EAAG;IACPI,SAAS,EAAEA,SAAU;IAAAM,QAAA,GAErBf,IAAA;MAAAe,QAAA,EAAOL;IAAI,CAAO,CAAC,EAClBH,UAAU,IACTP,IAAA,CAACF,WAAW;MAAAiB,QAAA,EAAEJ,CAAC,CAAC,0BAA0B;IAAC,CAAc,CAC1D;EAAA,CACY,CAChB,EACD,CAACN,EAAE,EAAEC,OAAO,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAEC,CAAC,CACtD,CAAC;EAED,OAAOP,eAAe,GACpBQ,UAAU,GAEVZ,IAAA,CAACH,gBAAgB;IAACY,SAAS,EAAEA,SAAU;IAAAM,QAAA,EAAEH;EAAU,CAAmB,CACvE;AACH,CAAC;AAED,MAAMI,kBAAkB,GAAGtB,IAAI,CAACS,UAAU,CAAC;AAC3Ca,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAIb,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.js","names":["memo","useMemo","FieldsetContext","Legend","Support","useOdysseyDesignTokens","useUniqueId","jsx","_jsx","jsxs","_jsxs","Fieldset","alert","children","description","id","idOverride","isDisabled","legend","name","testId","translate","odysseyDesignTokens","fieldsetContextValue","_Box","component","disabled","sx","border","margin","Spacing0","marginBlockEnd","Spacing6","maxWidth","TypographyLineLengthMax","padding","Provider","value","MemoizedFieldset","displayName"],"sources":["../src/Fieldset.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 { Box } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { Callout } from \"./Callout\";\nimport { FieldsetContext } from \"./FieldsetContext\";\nimport { Legend, Support } from \"./Typography\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { useUniqueId } from \"./useUniqueId\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldsetProps = {\n /**\n * A Callout indicating a Fieldset-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * The Field components within the Fieldset\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * Disables the component and any wrapped input fields.\n */\n isDisabled?: boolean;\n /**\n * The title of the Fieldset\n */\n legend: string;\n /**\n * The name associated with the group.\n */\n name?: string;\n} & HtmlProps;\n\nconst Fieldset = ({\n alert,\n children,\n description,\n id: idOverride,\n isDisabled = false,\n legend,\n name,\n testId,\n translate,\n}: FieldsetProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const id = useUniqueId(idOverride);\n\n const fieldsetContextValue = useMemo(\n () => ({\n isDisabled,\n }),\n [isDisabled]\n );\n\n return (\n <Box\n component=\"fieldset\"\n data-se={testId}\n disabled={isDisabled}\n name={name}\n id={id}\n sx={{\n border: \"0\",\n margin: odysseyDesignTokens.Spacing0,\n marginBlockEnd: odysseyDesignTokens.Spacing6,\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n padding: odysseyDesignTokens.Spacing0,\n\n \"&:last-child\": {\n marginBlockEnd: odysseyDesignTokens.Spacing0,\n },\n }}\n >\n <Legend translate={translate}>{legend}</Legend>\n\n {description && <Support translate={translate}>{description}</Support>}\n\n {alert}\n\n <FieldsetContext.Provider value={fieldsetContextValue}>\n {children}\n </FieldsetContext.Provider>\n </Box>\n );\n};\n\nconst MemoizedFieldset = memo(Fieldset);\nMemoizedFieldset.displayName = \"Fieldset\";\n\nexport { MemoizedFieldset as Fieldset };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAG3CC,eAAe;AAAA,SACfC,MAAM,EAAEC,OAAO;AAAA,SACfC,sBAAsB;AAAA,SACtBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAkCpB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,EAAE,EAAEC,UAAU;EACdC,UAAU,GAAG,KAAK;EAClBC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC;AACa,CAAC,KAAK;EACnB,MAAMC,mBAAmB,GAAGjB,sBAAsB,CAAC,CAAC;EACpD,MAAMU,EAAE,GAAGT,WAAW,CAACU,UAAU,CAAC;EAElC,MAAMO,oBAAoB,GAAGtB,OAAO,CAClC,OAAO;IACLgB;EACF,CAAC,CAAC,EACF,CAACA,UAAU,CACb,CAAC;EAED,OACEP,KAAA,CAAAc,IAAA;IACEC,SAAS,EAAC,UAAU;IACpB,WAASL,MAAO;IAChBM,QAAQ,EAAET,UAAW;IACrBE,IAAI,EAAEA,IAAK;IACXJ,EAAE,EAAEA,EAAG;IACPY,EAAE,EAAE;MACFC,MAAM,EAAE,GAAG;MACXC,MAAM,EAAEP,mBAAmB,CAACQ,QAAQ;MACpCC,cAAc,EAAET,mBAAmB,CAACU,QAAQ;MAC5CC,QAAQ,EAAEX,mBAAmB,CAACY,uBAAuB;MACrDC,OAAO,EAAEb,mBAAmB,CAACQ,QAAQ;MAErC,cAAc,EAAE;QACdC,cAAc,EAAET,mBAAmB,CAACQ;MACtC;IACF,CAAE;IAAAjB,QAAA,GAEFL,IAAA,CAACL,MAAM;MAACkB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEK;IAAM,CAAS,CAAC,EAE9CJ,WAAW,IAAIN,IAAA,CAACJ,OAAO;MAACiB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEC;IAAW,CAAU,CAAC,EAErEF,KAAK,EAENJ,IAAA,CAACN,eAAe,CAACkC,QAAQ;MAACC,KAAK,EAAEd,oBAAqB;MAAAV,QAAA,EACnDA;IAAQ,CACe,CAAC;EAAA,CACxB,CAAC;AAEV,CAAC;AAED,MAAMyB,gBAAgB,GAAGtC,IAAI,CAACW,QAAQ,CAAC;AACvC2B,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAI3B,QAAQ"}
1
+ {"version":3,"file":"Fieldset.js","names":["memo","useMemo","FieldsetContext","Legend","Support","useOdysseyDesignTokens","useUniqueId","jsx","_jsx","jsxs","_jsxs","Fieldset","alert","children","description","id","idOverride","isDisabled","legend","name","testId","translate","odysseyDesignTokens","fieldsetContextValue","_Box","component","disabled","sx","border","margin","Spacing0","marginBlockEnd","Spacing6","maxWidth","TypographyLineLengthMax","padding","Provider","value","MemoizedFieldset","displayName"],"sources":["../src/Fieldset.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 { Box } from \"@mui/material\";\nimport { memo, ReactElement, useMemo } from \"react\";\n\nimport { Callout } from \"./Callout\";\nimport { FieldsetContext } from \"./FieldsetContext\";\nimport { Legend, Support } from \"./Typography\";\nimport { useOdysseyDesignTokens } from \"./OdysseyDesignTokensContext\";\nimport { useUniqueId } from \"./useUniqueId\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type FieldsetProps = {\n /**\n * A Callout indicating a Fieldset-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * The Field components within the Fieldset\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * Disables the component and any wrapped input fields.\n */\n isDisabled?: boolean;\n /**\n * The title of the Fieldset\n */\n legend: string;\n /**\n * The name associated with the group.\n */\n name?: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Fieldset = ({\n alert,\n children,\n description,\n id: idOverride,\n isDisabled = false,\n legend,\n name,\n testId,\n translate,\n}: FieldsetProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const id = useUniqueId(idOverride);\n\n const fieldsetContextValue = useMemo(\n () => ({\n isDisabled,\n }),\n [isDisabled],\n );\n\n return (\n <Box\n component=\"fieldset\"\n data-se={testId}\n disabled={isDisabled}\n name={name}\n id={id}\n sx={{\n border: \"0\",\n margin: odysseyDesignTokens.Spacing0,\n marginBlockEnd: odysseyDesignTokens.Spacing6,\n maxWidth: odysseyDesignTokens.TypographyLineLengthMax,\n padding: odysseyDesignTokens.Spacing0,\n\n \"&:last-child\": {\n marginBlockEnd: odysseyDesignTokens.Spacing0,\n },\n }}\n >\n <Legend translate={translate}>{legend}</Legend>\n\n {description && <Support translate={translate}>{description}</Support>}\n\n {alert}\n\n <FieldsetContext.Provider value={fieldsetContextValue}>\n {children}\n </FieldsetContext.Provider>\n </Box>\n );\n};\n\nconst MemoizedFieldset = memo(Fieldset);\nMemoizedFieldset.displayName = \"Fieldset\";\n\nexport { MemoizedFieldset as Fieldset };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,SAASA,IAAI,EAAgBC,OAAO,QAAQ,OAAO;AAAC,SAG3CC,eAAe;AAAA,SACfC,MAAM,EAAEC,OAAO;AAAA,SACfC,sBAAsB;AAAA,SACtBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAkCpB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,KAAK;EACLC,QAAQ;EACRC,WAAW;EACXC,EAAE,EAAEC,UAAU;EACdC,UAAU,GAAG,KAAK;EAClBC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC;AACa,CAAC,KAAK;EACnB,MAAMC,mBAAmB,GAAGjB,sBAAsB,CAAC,CAAC;EACpD,MAAMU,EAAE,GAAGT,WAAW,CAACU,UAAU,CAAC;EAElC,MAAMO,oBAAoB,GAAGtB,OAAO,CAClC,OAAO;IACLgB;EACF,CAAC,CAAC,EACF,CAACA,UAAU,CACb,CAAC;EAED,OACEP,KAAA,CAAAc,IAAA;IACEC,SAAS,EAAC,UAAU;IACpB,WAASL,MAAO;IAChBM,QAAQ,EAAET,UAAW;IACrBE,IAAI,EAAEA,IAAK;IACXJ,EAAE,EAAEA,EAAG;IACPY,EAAE,EAAE;MACFC,MAAM,EAAE,GAAG;MACXC,MAAM,EAAEP,mBAAmB,CAACQ,QAAQ;MACpCC,cAAc,EAAET,mBAAmB,CAACU,QAAQ;MAC5CC,QAAQ,EAAEX,mBAAmB,CAACY,uBAAuB;MACrDC,OAAO,EAAEb,mBAAmB,CAACQ,QAAQ;MAErC,cAAc,EAAE;QACdC,cAAc,EAAET,mBAAmB,CAACQ;MACtC;IACF,CAAE;IAAAjB,QAAA,GAEFL,IAAA,CAACL,MAAM;MAACkB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEK;IAAM,CAAS,CAAC,EAE9CJ,WAAW,IAAIN,IAAA,CAACJ,OAAO;MAACiB,SAAS,EAAEA,SAAU;MAAAR,QAAA,EAAEC;IAAW,CAAU,CAAC,EAErEF,KAAK,EAENJ,IAAA,CAACN,eAAe,CAACkC,QAAQ;MAACC,KAAK,EAAEd,oBAAqB;MAAAV,QAAA,EACnDA;IAAQ,CACe,CAAC;EAAA,CACxB,CAAC;AAEV,CAAC;AAED,MAAMyB,gBAAgB,GAAGtC,IAAI,CAACW,QAAQ,CAAC;AACvC2B,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAI3B,QAAQ"}
package/dist/Form.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":["memo","Heading4","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","formEncodingTypeValues","formAutoCompleteTypeValues","formMethodValues","Form","alert","autoCompleteType","children","description","encodingType","formActions","id","idOverride","isFullWidth","method","name","noValidate","onSubmit","target","testId","title","translate","_Box","autoComplete","component","encType","sx","maxWidth","theme","mixins","margin","spacing","padding","marginBlockEnd","display","justifyContent","gap","marginBlockStart","MemoizedForm","displayName"],"sources":["../src/Form.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 { FormEventHandler, memo, ReactElement } from \"react\";\nimport { Box } from \"@mui/material\";\n\nimport { Button } from \"./Button\";\nimport { Callout } from \"./Callout\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Heading4, Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const formEncodingTypeValues = [\n \"application/x-www-form-urlencoded\",\n \"application/json\",\n \"multipart/form-data\",\n \"text/plain\",\n] as const;\nexport const formAutoCompleteTypeValues = [\"on\", \"off\"] as const;\nexport const formMethodValues = [\"post\", \"get\", \"dialog\"] as const;\n\nexport type FormProps = {\n /**\n * A Callout indicating a Form-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * Indicates whether input elements can by default have their values automatically completed by the browser.\n * `autocomplete` attributes on form elements override it on <form>\n */\n autoCompleteType?: (typeof formAutoCompleteTypeValues)[number];\n /**\n * The Field or FieldSet components within the Form\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * If the value of the method attribute is post, enctype is the MIME type of the form submission.\n * This value can be overridden by formenctype attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n encodingType?: (typeof formEncodingTypeValues)[number];\n /**\n * The Field or FieldGroup components within the Form\n */\n formActions?:\n | ReactElement<typeof Button>\n | Array<ReactElement<typeof Button>>;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * The HTTP method to submit the form with.\n * This value is overridden by formmethod attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n method?: (typeof formMethodValues)[number];\n /**\n * The name of the form. The value must not be the empty string, and must be unique among the form elements in the forms collection that it is in, if any.\n */\n name: string;\n /**\n * This Boolean attribute indicates that the form shouldn't be validated when submitted.\n * If this attribute is not set (and therefore the form is validated),\n * it can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.\n */\n noValidate?: boolean;\n /**\n * Callback that passes the submit event to the consumer\n */\n onSubmit?: FormEventHandler<HTMLFormElement>;\n /**\n * Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe).\n * This value can be overridden by a formtarget attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element.\n */\n target?: string;\n /**\n * The title of the Form\n */\n title?: string;\n} & Pick<FieldComponentProps, \"isFullWidth\"> &\n HtmlProps;\n\nconst Form = ({\n alert,\n autoCompleteType,\n children,\n description,\n encodingType,\n formActions,\n id: idOverride,\n isFullWidth,\n method,\n name,\n noValidate = false,\n onSubmit,\n target,\n testId,\n title,\n translate,\n}: FormProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n autoComplete={autoCompleteType}\n component=\"form\"\n data-se={testId}\n encType={encodingType}\n id={id}\n method={method}\n name={name}\n noValidate={noValidate}\n onSubmit={onSubmit}\n target={target}\n sx={{\n maxWidth: (theme) => (isFullWidth ? \"100%\" : theme.mixins.maxWidth),\n margin: (theme) => theme.spacing(0),\n padding: (theme) => theme.spacing(0),\n }}\n >\n <Box\n component=\"div\"\n sx={{\n marginBlockEnd: (theme) => theme.spacing(4),\n }}\n >\n {title && (\n <Heading4 component=\"h1\" translate={translate}>\n {title}\n </Heading4>\n )}\n {description && <Support translate={translate}>{description}</Support>}\n {alert}\n </Box>\n <Box component=\"div\">{children}</Box>\n {formActions && (\n <Box\n component=\"div\"\n sx={{\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: (theme) => theme.spacing(1),\n marginBlockStart: (theme) => theme.spacing(7),\n }}\n >\n {formActions}\n </Box>\n )}\n </Box>\n );\n};\n\nconst MemoizedForm = memo(Form);\nMemoizedForm.displayName = \"Form\";\n\nexport { MemoizedForm as Form };\n"],"mappings":";AAAA;AACA;AACA;AACA;A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,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;IACrC,CAAE;IAAAxB,QAAA,GAEFP,KAAA,CAAAsB,IAAA;MACEE,SAAS,EAAC,KAAK;MACfE,EAAE,EAAE;QACFO,cAAc,EAAGL,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MAC5C,CAAE;MAAAxB,QAAA,GAEDa,KAAK,IACJtB,IAAA,CAACJ,QAAQ;QAAC8B,SAAS,EAAC,IAAI;QAACH,SAAS,EAAEA,SAAU;QAAAd,QAAA,EAC3Ca;MAAK,CACE,CACX,EACAZ,WAAW,IAAIV,IAAA,CAACH,OAAO;QAAC0B,SAAS,EAAEA,SAAU;QAAAd,QAAA,EAAEC;MAAW,CAAU,CAAC,EACrEH,KAAK;IAAA,CACH,CAAC,EACNP,IAAA,CAAAwB,IAAA;MAAKE,SAAS,EAAC,KAAK;MAAAjB,QAAA,EAAEA;IAAQ,CAAM,CAAC,EACpCG,WAAW,IACVZ,IAAA,CAAAwB,IAAA;MACEE,SAAS,EAAC,KAAK;MACfE,EAAE,EAAE;QACFQ,OAAO,EAAE,MAAM;QACfC,cAAc,EAAE,UAAU;QAC1BC,GAAG,EAAGR,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;QAChCM,gBAAgB,EAAGT,KAAK,IAAKA,KAAK,CAACG,OAAO,CAAC,CAAC;MAC9C,CAAE;MAAAxB,QAAA,EAEDG;IAAW,CACT,CACN;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAM4B,YAAY,GAAG7C,IAAI,CAACW,IAAI,CAAC;AAC/BkC,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIlC,IAAI"}
1
+ {"version":3,"file":"Form.js","names":["memo","Heading4","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","formEncodingTypeValues","formAutoCompleteTypeValues","formMethodValues","Form","alert","autoCompleteType","children","description","encodingType","formActions","id","idOverride","isFullWidth","method","name","noValidate","onSubmit","target","testId","title","translate","_Box","autoComplete","component","encType","sx","maxWidth","theme","mixins","margin","spacing","padding","marginBlockEnd","display","justifyContent","gap","marginBlockStart","MemoizedForm","displayName"],"sources":["../src/Form.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 { FormEventHandler, memo, ReactElement } from \"react\";\nimport { Box } from \"@mui/material\";\n\nimport { Button } from \"./Button\";\nimport { Callout } from \"./Callout\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Heading4, Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const formEncodingTypeValues = [\n \"application/x-www-form-urlencoded\",\n \"application/json\",\n \"multipart/form-data\",\n \"text/plain\",\n] as const;\nexport const formAutoCompleteTypeValues = [\"on\", \"off\"] as const;\nexport const formMethodValues = [\"post\", \"get\", \"dialog\"] as const;\n\nexport type FormProps = {\n /**\n * A Callout indicating a Form-wide error or status update.\n */\n alert?: ReactElement<typeof Callout>;\n /**\n * Indicates whether input elements can by default have their values automatically completed by the browser.\n * `autocomplete` attributes on form elements override it on <form>\n */\n autoCompleteType?: (typeof formAutoCompleteTypeValues)[number];\n /**\n * The Field or FieldSet components within the Form\n */\n children: ReactElement | Array<ReactElement>;\n /**\n * A supplementary description\n */\n description?: string;\n /**\n * If the value of the method attribute is post, enctype is the MIME type of the form submission.\n * This value can be overridden by formenctype attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n encodingType?: (typeof formEncodingTypeValues)[number];\n /**\n * The Field or FieldGroup components within the Form\n */\n formActions?:\n | ReactElement<typeof Button>\n | Array<ReactElement<typeof Button>>;\n /**\n * Defines a unique identifier (ID) which must be unique in the whole document.\n */\n id?: string;\n /**\n * The HTTP method to submit the form with.\n * This value is overridden by formmethod attributes on <button>, <input type=\"submit\">, or <input type=\"image\"> elements.\n */\n method?: (typeof formMethodValues)[number];\n /**\n * The name of the form. The value must not be the empty string, and must be unique among the form elements in the forms collection that it is in, if any.\n */\n name: string;\n /**\n * This Boolean attribute indicates that the form shouldn't be validated when submitted.\n * If this attribute is not set (and therefore the form is validated),\n * it can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.\n */\n noValidate?: boolean;\n /**\n * Callback that passes the submit event to the consumer\n */\n onSubmit?: FormEventHandler<HTMLFormElement>;\n /**\n * Indicates where to display the response after submitting the form. It is a name/keyword for a browsing context (for example, tab, window, or iframe).\n * This value can be overridden by a formtarget attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element.\n */\n target?: string;\n /**\n * The title of the Form\n */\n title?: string;\n} & Pick<FieldComponentProps, \"isFullWidth\"> &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Form = ({\n alert,\n autoCompleteType,\n children,\n description,\n encodingType,\n formActions,\n id: idOverride,\n isFullWidth,\n method,\n name,\n noValidate = false,\n onSubmit,\n target,\n testId,\n title,\n translate,\n}: FormProps) => {\n const id = useUniqueId(idOverride);\n\n return (\n <Box\n autoComplete={autoCompleteType}\n component=\"form\"\n data-se={testId}\n encType={encodingType}\n id={id}\n method={method}\n name={name}\n noValidate={noValidate}\n onSubmit={onSubmit}\n target={target}\n sx={{\n maxWidth: (theme) => (isFullWidth ? \"100%\" : theme.mixins.maxWidth),\n margin: (theme) => theme.spacing(0),\n padding: (theme) => theme.spacing(0),\n }}\n >\n <Box\n component=\"div\"\n sx={{\n marginBlockEnd: (theme) => theme.spacing(4),\n }}\n >\n {title && (\n <Heading4 component=\"h1\" translate={translate}>\n {title}\n </Heading4>\n )}\n {description && <Support translate={translate}>{description}</Support>}\n {alert}\n </Box>\n <Box component=\"div\">{children}</Box>\n {formActions && (\n <Box\n component=\"div\"\n sx={{\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: (theme) => theme.spacing(1),\n marginBlockStart: (theme) => theme.spacing(7),\n }}\n >\n {formActions}\n </Box>\n )}\n </Box>\n );\n};\n\nconst MemoizedForm = memo(Form);\nMemoizedForm.displayName = \"Form\";\n\nexport { MemoizedForm as Form };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAA2BA,IAAI,QAAsB,OAAO;AAAC,SAOpDC,QAAQ,EAAEC,OAAO;AAAA,SACjBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpB,OAAO,MAAMC,sBAAsB,GAAG,CACpC,mCAAmC,EACnC,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,CACJ;AACV,OAAO,MAAMC,0BAA0B,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU;AAChE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAU;AAkElE,MAAMC,IAAI,GAAGA,CAAC;EACZC,KAAK;EACLC,gBAAgB;EAChBC,QAAQ;EACRC,WAAW;EACXC,YAAY;EACZC,WAAW;EACXC,EAAE,EAAEC,UAAU;EACdC,WAAW;EACXC,MAAM;EACNC,IAAI;EACJC,UAAU,GAAG,KAAK;EAClBC,QAAQ;EACRC,MAAM;EACNC,MAAM;EACNC,KAAK;EACLC;AACS,CAAC,KAAK;EACf,MAAMV,EAAE,GAAGf,WAAW,CAACgB,UAAU,CAAC;EAElC,OACEZ,KAAA,CAAAsB,IAAA;IACEC,YAAY,EAAEjB,gBAAiB;IAC/BkB,SAAS,EAAC,MAAM;IAChB,WAASL,MAAO;IAChBM,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C;MAC9C,CAAE;MAAAxB,QAAA,EAEDG;IAAW,CACT,CACN;EAAA,CACE,CAAC;AAEV,CAAC;AAED,MAAM4B,YAAY,GAAG7C,IAAI,CAACW,IAAI,CAAC;AAC/BkC,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAIlC,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormCheckedProps.js","names":[],"sources":["../src/FormCheckedProps.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { SwitchBaseProps } from \"@mui/material/internal/SwitchBase\";\n\ntype SwitchOnChangeProp = Pick<SwitchBaseProps, \"onChange\">;\n\nexport type ControlledCheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp\n> = {\n /**\n * Sets the checked state of the Checkbox\n */\n isChecked: boolean;\n /**\n * Determines whether the Checkbox is checked\n * Should not be used if `isChecked` is used\n */\n isDefaultChecked?: never;\n /**\n * The change event handler for the Checkbox\n * Must be used if `isChecked` is used\n */\n onChange: TogglableInputElement[\"onChange\"];\n};\n\nexport type UncontrolledCheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp\n> = {\n /**\n * Sets the checked state of the Checkbox\n */\n isChecked?: never;\n /**\n * Determines whether the Checkbox is checked\n * Should not be used if `isChecked` is used\n */\n isDefaultChecked?: boolean;\n /**\n * The change event handler for the Checkbox\n * Must be used if `isChecked` is used\n */\n onChange?: TogglableInputElement[\"onChange\"];\n};\n\nexport type CheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp\n> =\n | ControlledCheckedFieldProps<TogglableInputElement>\n | UncontrolledCheckedFieldProps<TogglableInputElement>;\n"],"mappings":""}
1
+ {"version":3,"file":"FormCheckedProps.js","names":[],"sources":["../src/FormCheckedProps.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { SwitchBaseProps } from \"@mui/material/internal/SwitchBase\";\n\ntype SwitchOnChangeProp = Pick<SwitchBaseProps, \"onChange\">;\n\nexport type ControlledCheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp,\n> = {\n /**\n * Sets the checked state of the Checkbox\n */\n isChecked: boolean;\n /**\n * Determines whether the Checkbox is checked\n * Should not be used if `isChecked` is used\n */\n isDefaultChecked?: never;\n /**\n * The change event handler for the Checkbox\n * Must be used if `isChecked` is used\n */\n onChange: TogglableInputElement[\"onChange\"];\n};\n\nexport type UncontrolledCheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp,\n> = {\n /**\n * Sets the checked state of the Checkbox\n */\n isChecked?: never;\n /**\n * Determines whether the Checkbox is checked\n * Should not be used if `isChecked` is used\n */\n isDefaultChecked?: boolean;\n /**\n * The change event handler for the Checkbox\n * Must be used if `isChecked` is used\n */\n onChange?: TogglableInputElement[\"onChange\"];\n};\n\nexport type CheckedFieldProps<\n TogglableInputElement extends SwitchOnChangeProp,\n> =\n | ControlledCheckedFieldProps<TogglableInputElement>\n | UncontrolledCheckedFieldProps<TogglableInputElement>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"HintLink.js","names":["memo","Link","jsx","_jsx","HintLink","props","variant","MemoizedHintLink","displayName"],"sources":["../src/HintLink.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 } from \"react\";\n\nimport { Link, LinkProps } from \"./Link\";\n\nconst HintLink = (\n props: Pick<\n LinkProps,\n \"children\" | \"href\" | \"onClick\" | \"rel\" | \"target\" | \"testId\"\n >\n) => <Link {...props} variant=\"default\" />;\n\nconst MemoizedHintLink = memo(HintLink);\n\nMemoizedHintLink.displayName = \"HintLink\";\n\nexport { MemoizedHintLink as HintLink };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAEpBC,IAAI;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEb,MAAMC,QAAQ,GACZC,KAGC,IACEF,IAAA,CAACF,IAAI;EAAA,GAAKI,KAAK;EAAEC,OAAO,EAAC;AAAS,CAAE,CAAC;AAE1C,MAAMC,gBAAgB,GAAGP,IAAI,CAACI,QAAQ,CAAC;AAEvCG,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIH,QAAQ"}
1
+ {"version":3,"file":"HintLink.js","names":["memo","Link","jsx","_jsx","HintLink","props","variant","MemoizedHintLink","displayName"],"sources":["../src/HintLink.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 } from \"react\";\n\nimport { Link, LinkProps } from \"./Link\";\n\nconst HintLink = (\n props: Pick<\n LinkProps,\n \"children\" | \"href\" | \"onClick\" | \"rel\" | \"target\" | \"testId\"\n >,\n) => <Link {...props} variant=\"default\" />;\n\nconst MemoizedHintLink = memo(HintLink);\n\nMemoizedHintLink.displayName = \"HintLink\";\n\nexport { MemoizedHintLink as HintLink };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAAC,SAEpBC,IAAI;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEb,MAAMC,QAAQ,GACZC,KAGC,IACEF,IAAA,CAACF,IAAI;EAAA,GAAKI,KAAK;EAAEC,OAAO,EAAC;AAAS,CAAE,CAAC;AAE1C,MAAMC,gBAAgB,GAAGP,IAAI,CAACI,QAAQ,CAAC;AAEvCG,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIH,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"HtmlProps.js","names":[],"sources":["../src/HtmlProps.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport type HtmlProps = {\n /**\n * This prop puts a `data` attribute on an HTML element in this component with the value provided.\n *\n * @deprecated **WARNING:** You should be using Semantic Selectors instead of this property. This is a temporary measure for backwards compatibility with existing Selenium tests.\n */\n testId?: string;\n /**\n * This prop puts a `translate` attribute on an HTML element. It should be used to indicate whether text within the element should be translated.\n */\n translate?: \"yes\" | \"no\";\n};\n"],"mappings":""}
1
+ {"version":3,"file":"HtmlProps.js","names":[],"sources":["../src/HtmlProps.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { HTMLAttributes } from \"react\";\n\nexport type HtmlProps = {\n /**\n * Used in [ARIA live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions), the global aria-busy state indicates an element is being modified and that assistive technologies may want to wait until the changes are complete before informing the user about the update.\n */\n ariaBusy?: HTMLAttributes<HTMLElement>[\"aria-busy\"];\n /**\n * The `aria-checked` attribute indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n *\n * NOTE: Where possible use an HTML `<input>` element with `type=\"checkbox\"` and `type=\"radio\"` as these have built in semantics and do not require ARIA attributes.\n */\n ariaChecked?: HTMLAttributes<HTMLElement>[\"aria-checked\"];\n /**\n * The global `aria-controls` property identifies the element (or elements) whose contents or presence are controlled by the element on which this attribute is set.\n *\n * Value: A space-separated list of one or more ID values referencing the elements being controlled by the current element\n */\n ariaControls?: HTMLAttributes<HTMLElement>[\"aria-controls\"];\n /**\n * The global `aria-describedby` attribute identifies the element (or elements) that describes the element on which the attribute is set.\n *\n * Value: The id or space-separated list of element ids that describe the current element.\n *\n * Note: The `aria-describedby` attribute is not designed to reference descriptions from external resources. It must reference elements in the same DOM document.\n */\n ariaDescribedBy?: HTMLAttributes<HTMLElement>[\"aria-describedby\"];\n /**\n * The `aria-errormessage` attribute on an object identifies the element that provides an error message for that object.\n *\n * Value: The value of the id of the element containing the error message for the current element\n */\n ariaErrorMessage?: HTMLAttributes<HTMLElement>[\"aria-errormessage\"];\n /**\n * The `aria-expanded` attribute is set on an element to indicate if a control is expanded or collapsed, and whether or not the controlled elements are displayed or hidden.\n */\n ariaExpanded?: HTMLAttributes<HTMLElement>[\"aria-expanded\"];\n /**\n * The `aria-haspopup` attribute indicates the availability and type of interactive popup element that can be triggered by the element on which the attribute is set.\n */\n ariaHasPopup?: HTMLAttributes<HTMLElement>[\"aria-haspopup\"];\n /**\n * The `aria-label` attribute defines a string value that labels an interactive element.\n */\n ariaLabel?: HTMLAttributes<HTMLElement>[\"aria-label\"];\n /**\n * The `aria-labelledby` attribute identifies the element (or elements) that labels the element it is applied to.\n *\n * Value: Space separated list of one or more ID values referencing the elements that label the current element.\n */\n ariaLabelledBy?: HTMLAttributes<HTMLElement>[\"aria-labelledby\"];\n /**\n * The `aria-pressed` attribute indicates the current \"pressed\" state of a toggle button.\n */\n ariaPressed?: HTMLAttributes<HTMLElement>[\"aria-pressed\"];\n /**\n * The `tabindex` global attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable\n *\n * Note: Manipulating the natural tab order is generally advised against\n */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * This prop puts a `data` attribute on an HTML element in this component with the value provided.\n *\n * @deprecated **WARNING:** You should be using Semantic Selectors instead of this property. This is a temporary measure for backwards compatibility with existing Selenium tests.\n */\n testId?: string;\n /**\n * This prop puts a `translate` attribute on an HTML element. It should be used to indicate whether text within the element should be translated.\n */\n translate?: \"yes\" | \"no\";\n};\n"],"mappings":""}
package/dist/Link.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","names":["memo","useImperativeHandle","useRef","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","ariaLabel","children","href","icon","linkRef","rel","target","testId","translate","variant","onClick","localLinkRef","focus","current","_Link","ref","className","role","MemoizedLink","displayName"],"sources":["../src/Link.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, useImperativeHandle, useRef } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle } from \"./inputUtils\";\n\nimport { Link as MuiLink, LinkProps as MuiLinkProps } from \"@mui/material\";\n\nexport const linkVariantValues = [\"default\", \"monochrome\"] as const;\n\nexport type LinkProps = {\n /**\n * The ARIA label for the Link\n */\n ariaLabel?: string;\n /**\n * The content within the Link\n */\n children: React.ReactNode;\n /**\n * The Link destination\n */\n href: string;\n /**\n * An optional Icon component at the start of the Link\n */\n icon?: ReactElement;\n /**\n * The ref forwarded to the TextField\n */\n linkRef?: React.RefObject<FocusHandle>;\n /**\n * The click event handler for the Link\n */\n onClick?: MuiLinkProps[\"onClick\"];\n /**\n * The HTML `rel` attribute for the Link\n */\n rel?: string;\n /**\n * The HTML `target` attribute for the Link\n */\n target?:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | (string & NonNullable<unknown>);\n /**\n * The visual presentation of the Link (default or monochrome)\n */\n variant?: (typeof linkVariantValues)[number];\n} & HtmlProps;\n\nconst Link = ({\n ariaLabel,\n children,\n href,\n icon,\n linkRef,\n rel,\n target,\n testId,\n translate,\n variant,\n onClick,\n}: LinkProps) => {\n const localLinkRef = useRef<HTMLAnchorElement>(null);\n useImperativeHandle(\n linkRef,\n () => {\n return {\n focus: () => {\n localLinkRef.current?.focus();\n },\n };\n },\n []\n );\n\n return (\n <MuiLink\n aria-label={ariaLabel}\n data-se={testId}\n href={href}\n ref={localLinkRef}\n rel={rel}\n target={target}\n translate={translate}\n variant={variant}\n onClick={onClick}\n >\n {icon && <span className=\"Link-icon\">{icon}</span>}\n\n {children}\n\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </MuiLink>\n );\n};\n\nconst MemoizedLink = memo(Link);\n\nMemoizedLink.displayName = \"Link\";\n\nexport { MemoizedLink as Link };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAgBC,mBAAmB,EAAEC,MAAM,QAAQ,OAAO;AAAC,SAC/DC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAMzB,OAAO,MAAMC,iBAAiB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AA8CnE,MAAMC,IAAI,GAAGA,CAAC;EACZC,SAAS;EACTC,QAAQ;EACRC,IAAI;EACJC,IAAI;EACJC,OAAO;EACPC,GAAG;EACHC,MAAM;EACNC,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC;AACS,CAAC,KAAK;EACf,MAAMC,YAAY,GAAGnB,MAAM,CAAoB,IAAI,CAAC;EACpDD,mBAAmB,CACjBa,OAAO,EACP,MAAM;IACJ,OAAO;MACLQ,KAAK,EAAEA,CAAA,KAAM;QACXD,YAAY,CAACE,OAAO,EAAED,KAAK,CAAC,CAAC;MAC/B;IACF,CAAC;EACH,CAAC,EACD,EACF,CAAC;EAED,OACEf,KAAA,CAAAiB,KAAA;IACE,cAAYd,SAAU;IACtB,WAASO,MAAO;IAChBL,IAAI,EAAEA,IAAK;IACXa,GAAG,EAAEJ,YAAa;IAClBN,GAAG,EAAEA,GAAI;IACTC,MAAM,EAAEA,MAAO;IACfE,SAAS,EAAEA,SAAU;IACrBC,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IAAAT,QAAA,GAEhBE,IAAI,IAAIR,IAAA;MAAMqB,SAAS,EAAC,WAAW;MAAAf,QAAA,EAAEE;IAAI,CAAO,CAAC,EAEjDF,QAAQ,EAERK,MAAM,KAAK,QAAQ,IAClBX,IAAA;MAAMqB,SAAS,EAAC,gBAAgB;MAACC,IAAI,EAAC,cAAc;MAAAhB,QAAA,EAClDN,IAAA,CAACF,gBAAgB,IAAE;IAAC,CAChB,CACP;EAAA,CACM,CAAC;AAEd,CAAC;AAED,MAAMyB,YAAY,GAAG5B,IAAI,CAACS,IAAI,CAAC;AAE/BmB,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAInB,IAAI"}
1
+ {"version":3,"file":"Link.js","names":["memo","useImperativeHandle","useRef","ExternalLinkIcon","jsx","_jsx","jsxs","_jsxs","linkVariantValues","Link","ariaLabel","children","href","icon","linkRef","rel","target","testId","translate","variant","onClick","localLinkRef","focus","current","_Link","ref","className","role","MemoizedLink","displayName"],"sources":["../src/Link.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, useImperativeHandle, useRef } from \"react\";\nimport { ExternalLinkIcon } from \"./icons.generated\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle } from \"./inputUtils\";\n\nimport { Link as MuiLink, LinkProps as MuiLinkProps } from \"@mui/material\";\n\nexport const linkVariantValues = [\"default\", \"monochrome\"] as const;\n\nexport type LinkProps = {\n /**\n * The content within the Link\n */\n children: React.ReactNode;\n /**\n * The Link destination\n */\n href: string;\n /**\n * An optional Icon component at the start of the Link\n */\n icon?: ReactElement;\n /**\n * The ref forwarded to the TextField\n */\n linkRef?: React.RefObject<FocusHandle>;\n /**\n * The click event handler for the Link\n */\n onClick?: MuiLinkProps[\"onClick\"];\n /**\n * The HTML `rel` attribute for the Link\n */\n rel?: string;\n /**\n * The HTML `target` attribute for the Link\n */\n target?:\n | \"_self\"\n | \"_blank\"\n | \"_parent\"\n | \"_top\"\n | (string & NonNullable<unknown>);\n /**\n * The visual presentation of the Link (default or monochrome)\n */\n variant?: (typeof linkVariantValues)[number];\n} & Pick<HtmlProps, \"ariaLabel\" | \"testId\" | \"translate\">;\n\nconst Link = ({\n ariaLabel,\n children,\n href,\n icon,\n linkRef,\n rel,\n target,\n testId,\n translate,\n variant,\n onClick,\n}: LinkProps) => {\n const localLinkRef = useRef<HTMLAnchorElement>(null);\n useImperativeHandle(\n linkRef,\n () => {\n return {\n focus: () => {\n localLinkRef.current?.focus();\n },\n };\n },\n [],\n );\n\n return (\n <MuiLink\n aria-label={ariaLabel}\n data-se={testId}\n href={href}\n ref={localLinkRef}\n rel={rel}\n target={target}\n translate={translate}\n variant={variant}\n onClick={onClick}\n >\n {icon && <span className=\"Link-icon\">{icon}</span>}\n\n {children}\n\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </MuiLink>\n );\n};\n\nconst MemoizedLink = memo(Link);\n\nMemoizedLink.displayName = \"Link\";\n\nexport { MemoizedLink as Link };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;A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AAE/BmB,YAAY,CAACC,WAAW,GAAG,MAAM;AAEjC,SAASD,YAAY,IAAInB,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","names":["memo","useCallback","useMemo","useState","Button","useUniqueId","ChevronDownIcon","MoreIcon","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","ariaControls","undefined","ariaExpanded","ariaHasPopup","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\nimport {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} from \"@mui/material\";\n\nimport {\n Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = {\n /**\n * The ARIA label for the Button\n */\n ariaLabel?: string;\n /**\n * The ID of the element that labels the Button\n */\n ariaLabelledBy?: string;\n /**\n * The ID of the element that describes the Button\n */\n ariaDescribedBy?: string;\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & (\n | {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n buttonLabel: string;\n }\n | {\n ariaLabel: string;\n ariaLabelledBy?: string;\n buttonLabel?: undefined | \"\";\n }\n | {\n ariaLabel?: string;\n ariaLabelledBy: string;\n buttonLabel?: undefined | \"\";\n }\n) &\n Pick<FieldComponentProps, \"isDisabled\"> &\n HtmlProps;\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n translate,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId]\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect]\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n } as PopoverOrigin),\n [menuAlignment]\n );\n\n return (\n <div>\n <Button\n ariaControls={isOpen ? `${uniqueId}-menu` : undefined}\n ariaExpanded={isOpen ? \"true\" : undefined}\n ariaHasPopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displ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MACEX,YAAY,EAAEA,YAAa;MAC3BG,eAAe,EAAEA,eAAgB;MACjCd,QAAQ,EAAEA,QAAS;MACnBT,EAAE,EAAG,GAAEiB,QAAS,OAAO;MACvBe,aAAa,EAAEd,aAAc;MAC7Be,OAAO,EAAEpB,SAAU;MACnBqB,IAAI,EAAEvB,MAAO;MAAAf,QAAA,EAEbV,IAAA,CAACF,WAAW,CAACmD,QAAQ;QAACC,KAAK,EAAEjB,aAAc;QAAAvB,QAAA,EACxCA;MAAQ,CACW;IAAC,CAChB,CAAC;EAAA,CACP,CAAC;AAEV,CAAC;AAED,MAAMyC,kBAAkB,GAAG7D,IAAI,CAACc,UAAU,CAAC;AAC3C+C,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAI/C,UAAU"}
1
+ {"version":3,"file":"MenuButton.js","names":["memo","useCallback","useMemo","useState","Button","useUniqueId","ChevronDownIcon","MoreIcon","MenuContext","jsx","_jsx","jsxs","_jsxs","menuAlignmentValues","MenuButton","ariaLabel","ariaLabelledBy","ariaDescribedBy","buttonLabel","buttonVariant","children","shouldCloseOnSelect","endIcon","endIconProp","id","idOverride","isDisabled","isOverflow","menuAlignment","size","testId","tooltipText","translate","anchorEl","setAnchorEl","isOpen","Boolean","closeMenu","openMenu","event","currentTarget","uniqueId","menuListProps","providerValue","anchorOrigin","horizontal","vertical","transformOrigin","ariaControls","undefined","ariaExpanded","ariaHasPopup","label","onClick","variant","_Menu","MenuListProps","onClose","open","Provider","value","MemoizedMenuButton","displayName"],"sources":["../src/MenuButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, type ReactElement, useCallback, useMemo, useState } from \"react\";\nimport {\n Divider,\n ListSubheader,\n Menu as MuiMenu,\n PopoverOrigin,\n} from \"@mui/material\";\n\nimport {\n Button,\n buttonSizeValues,\n buttonVariantValues,\n MenuItem,\n useUniqueId,\n} from \"./\";\nimport { ChevronDownIcon, MoreIcon } from \"./icons.generated\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport { MenuContext, MenuContextType } from \"./MenuContext\";\nimport { NullElement } from \"./NullElement\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport const menuAlignmentValues = [\"left\", \"right\"] as const;\n\nexport type MenuButtonProps = {\n /**\n * The label on the triggering Button\n */\n buttonLabel?: string;\n /**\n * The variant of the triggering Button\n */\n buttonVariant?: (typeof buttonVariantValues)[number];\n /**\n * The <MenuItem> components within the Menu.\n */\n children:\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | Array<\n | ReactElement<typeof MenuItem | typeof Divider | typeof ListSubheader>\n | NullElement\n >\n | NullElement;\n /**\n * The end Icon on the trigggering Button\n */\n endIcon?: ReactElement;\n /**\n * The id of the Button\n */\n id?: string;\n /**\n * If the MenuButton is an overflow menu or standard menu.\n */\n isOverflow?: boolean;\n /**\n * The horizontal alignment of the menu.\n */\n menuAlignment?: (typeof menuAlignmentValues)[number];\n /**\n * If true (the default), the menu will close when a child MenuItem is clicked.\n * Otherwise, it will remain open.\n */\n shouldCloseOnSelect?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n} & Pick<\n HtmlProps,\n \"ariaDescribedBy\" | \"ariaLabel\" | \"ariaLabelledBy\" | \"testId\" | \"translate\"\n> &\n Pick<FieldComponentProps, \"isDisabled\"> &\n (\n | { buttonLabel: string }\n | (Required<Pick<HtmlProps, \"ariaLabelledBy\">> &\n Partial<Pick<HtmlProps, \"ariaLabel\">> & {\n buttonLabel?: undefined | \"\";\n })\n | (Required<Pick<HtmlProps, \"ariaLabel\">> &\n Partial<Pick<HtmlProps, \"ariaLabelledBy\">> & {\n buttonLabel?: undefined | \"\";\n })\n );\n\nconst MenuButton = ({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n buttonLabel = \"\",\n buttonVariant = \"secondary\",\n children,\n shouldCloseOnSelect = true,\n endIcon: endIconProp,\n id: idOverride,\n isDisabled,\n isOverflow,\n menuAlignment = \"left\",\n size,\n testId,\n tooltipText,\n translate,\n}: MenuButtonProps) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const isOpen = Boolean(anchorEl);\n\n const closeMenu = useCallback(() => {\n setAnchorEl(null);\n }, []);\n\n const openMenu = useCallback<MenuContextType[\"openMenu\"]>((event) => {\n setAnchorEl(event.currentTarget);\n }, []);\n\n const uniqueId = useUniqueId(idOverride);\n\n const menuListProps = useMemo(\n () => ({ \"aria-labelledby\": `${uniqueId}-button` }),\n [uniqueId],\n );\n\n const providerValue = useMemo<MenuContextType>(\n () => ({\n closeMenu,\n openMenu,\n shouldCloseOnSelect,\n }),\n [closeMenu, openMenu, shouldCloseOnSelect],\n );\n\n const endIcon = endIconProp ? (\n endIconProp\n ) : isOverflow ? (\n <MoreIcon />\n ) : (\n <ChevronDownIcon />\n );\n\n const anchorOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"bottom\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n const transformOrigin = useMemo(\n () =>\n ({\n horizontal: menuAlignment,\n vertical: \"top\",\n }) as PopoverOrigin,\n [menuAlignment],\n );\n\n return (\n <div>\n <Button\n ariaControls={isOpen ? `${uniqueId}-menu` : undefined}\n ariaExpanded={isOpen ? \"true\" : undefined}\n ariaHasPopup=\"true\"\n ariaDescribedBy={ariaDescribedBy}\n ariaLabel={ariaLabel}\n ariaLabelledBy={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n id={`${uniqueId}-button`}\n isDisabled={isDisabled}\n label={buttonLabel}\n onClick={openMenu}\n size={size}\n tooltipText={tooltipText}\n translate={translate}\n variant={buttonVariant}\n />\n\n <MuiMenu\n anchorOrigin={anchorOrigin}\n transformOrigin={transformOrigin}\n anchorEl={anchorEl}\n id={`${uniqueId}-menu`}\n MenuListProps={menuListProps}\n onClose={closeMenu}\n open={isOpen}\n >\n <MenuContext.Provider value={providerValue}>\n {children}\n </MenuContext.Provider>\n </MuiMenu>\n </div>\n );\n};\n\nconst MemoizedMenuButton = memo(MenuButton);\nMemoizedMenuButton.displayName = \"MenuButton\";\n\nexport { MemoizedMenuButton as MenuButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAqBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAAC,SAS9EC,MAAM,EAINC,WAAW;AAAA,SAEJC,eAAe,EAAEC,QAAQ;AAAA,SAEzBC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAIpB,OAAO,MAAMC,mBAAmB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU;AAmE7D,MAAMC,UAAU,GAAGA,CAAC;EAClBC,SAAS;EACTC,cAAc;EACdC,eAAe;EACfC,WAAW,GAAG,EAAE;EAChBC,aAAa,GAAG,WAAW;EAC3BC,QAAQ;EACRC,mBAAmB,GAAG,IAAI;EAC1BC,OAAO,EAAEC,WAAW;EACpBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,UAAU;EACVC,aAAa,GAAG,MAAM;EACtBC,IAAI;EACJC,MAAM;EACNC,WAAW;EACXC;AACe,CAAC,KAAK;EACrB,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG/B,QAAQ,CAAqB,IAAI,CAAC;EAElE,MAAMgC,MAAM,G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,MAAM;MACnBlC,eAAe,EAAEA,eAAgB;MACjCF,SAAS,EAAEA,SAAU;MACrBC,cAAc,EAAEA,cAAe;MAC/B,WAASc,MAAO;MAChBR,OAAO,EAAEA,OAAQ;MACjBE,EAAE,EAAG,GAAEiB,QAAS,SAAS;MACzBf,UAAU,EAAEA,UAAW;MACvB0B,KAAK,EAAElC,WAAY;MACnBmC,OAAO,EAAEf,QAAS;MAClBT,IAAI,EAAEA,IAAK;MACXE,WAAW,EAAEA,WAAY;MACzBC,SAAS,EAAEA,SAAU;MACrBsB,OAAO,EAAEnC;IAAc,CACxB,CAAC,EAEFT,IAAA,CAAA6C,KAAA;MACEX,YAAY,EAAEA,YAAa;MAC3BG,eAAe,EAAEA,eAAgB;MACjCd,QAAQ,EAAEA,QAAS;MACnBT,EAAE,EAAG,GAAEiB,QAAS,OAAO;MACvBe,aAAa,EAAEd,aAAc;MAC7Be,OAAO,EAAEpB,SAAU;MACnBqB,IAAI,EAAEvB,MAAO;MAAAf,QAAA,EAEbV,IAAA,CAACF,WAAW,CAACmD,QAAQ;QAACC,KAAK,EAAEjB,aAAc;QAAAvB,QAAA,EACxCA;MAAQ,CACW;IAAC,CAChB,CAAC;EAAA,CACP,CAAC;AAEV,CAAC;AAED,MAAMyC,kBAAkB,GAAG7D,IAAI,CAACc,UAAU,CAAC;AAC3C+C,kBAAkB,CAACC,WAAW,GAAG,YAAY;AAE7C,SAASD,kBAAkB,IAAI/C,UAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & HtmlProps;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect]\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC,UAAU;EACVC,OAAO,EAAEC,WAAW;EACpBC,MAAM;EACNC,KAAK;EACLC,OAAO,GAAG;AACG,CAAC,KAAK;EACnB,MAAM;IAAEC,SAAS;IAAEC;EAAoB,CAAC,GAAGf,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMQ,OAAO,GAAGV,WAAW,CACxBiB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEZ,IAAA,CAAAc,SAAA;IAEEC,SAAS,EAAEZ,eAAgB;IAC3Ba,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEhB,eAAe,CAACuB,IAAK,cAAa,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBK,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMmB,gBAAgB,GAAG1B,IAAI,CAACM,QAAQ,CAAC;AACvCoB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIpB,QAAQ"}
1
+ {"version":3,"file":"MenuItem.js","names":["menuItemClasses","memo","useCallback","useContext","MenuContext","jsx","_jsx","MenuItem","children","hasInitialFocus","isSelected","isDisabled","onClick","onClickProp","testId","value","variant","closeMenu","shouldCloseOnSelect","event","_MenuItem","autoFocus","className","root","undefined","disabled","selected","MemoizedMenuItem","displayName"],"sources":["../src/MenuItem.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport {\n MenuItem as MuiMenuItem,\n MenuItemProps as MuiMenuItemProps,\n} from \"@mui/material\";\nimport { menuItemClasses } from \"@mui/material/MenuItem\";\nimport { memo, useCallback, useContext, type ReactNode } from \"react\";\n\nimport { MenuContext } from \"./MenuContext\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type MenuItemProps = {\n /**\n * The content of the menu item.\n */\n children: ReactNode;\n /**\n * If `true`, the menu item will receive focus automatically.\n */\n hasInitialFocus?: boolean;\n /**\n * If `true`, the menu item will be visually marked as selected.\n */\n isSelected?: boolean;\n /**\n * If `true`, the menu item will be visually marked as disabled.\n */\n isDisabled?: boolean;\n /**\n * Callback fired when the menu item is clicked.\n */\n onClick?: MuiMenuItemProps[\"onClick\"];\n /**\n * The value associated with the menu item.\n */\n value?: string;\n /**\n * The variant of the menu item.\n * - \"default\": The default variant.\n * - \"destructive\": A variant indicating a destructive action.\n */\n variant?: \"default\" | \"destructive\";\n} & Pick<HtmlProps, \"testId\">;\n\nconst MenuItem = ({\n children,\n hasInitialFocus,\n isSelected,\n isDisabled,\n onClick: onClickProp,\n testId,\n value,\n variant = \"default\",\n}: MenuItemProps) => {\n const { closeMenu, shouldCloseOnSelect } = useContext(MenuContext);\n\n const onClick = useCallback<NonNullable<MuiMenuItemProps[\"onClick\"]>>(\n (event) => {\n onClickProp?.(event);\n if (shouldCloseOnSelect) {\n closeMenu();\n }\n },\n [onClickProp, closeMenu, shouldCloseOnSelect],\n );\n\n return (\n <MuiMenuItem\n /* eslint-disable-next-line jsx-a11y/no-autofocus */\n autoFocus={hasInitialFocus}\n className={\n variant === \"destructive\"\n ? `${menuItemClasses.root}-destructive`\n : undefined\n }\n data-se={testId}\n disabled={isDisabled}\n onClick={onClick}\n selected={isSelected}\n value={value}\n >\n {children}\n </MuiMenuItem>\n );\n};\n\nconst MemoizedMenuItem = memo(MenuItem);\nMemoizedMenuItem.displayName = \"MenuItem\";\n\nexport { MemoizedMenuItem as MenuItem };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA,SAASA,eAAe,QAAQ,wBAAwB;AACxD,SAASC,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAE7DC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAoCpB,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC,UAAU;EACVC,OAAO,EAAEC,WAAW;EACpBC,MAAM;EACNC,KAAK;EACLC,OAAO,GAAG;AACG,CAAC,KAAK;EACnB,MAAM;IAAEC,SAAS;IAAEC;EAAoB,CAAC,GAAGf,UAAU,CAACC,WAAW,CAAC;EAElE,MAAMQ,OAAO,GAAGV,WAAW,CACxBiB,KAAK,IAAK;IACTN,WAAW,GAAGM,KAAK,CAAC;IACpB,IAAID,mBAAmB,EAAE;MACvBD,SAAS,CAAC,CAAC;IACb;EACF,CAAC,EACD,CAACJ,WAAW,EAAEI,SAAS,EAAEC,mBAAmB,CAC9C,CAAC;EAED,OACEZ,IAAA,CAAAc,SAAA;IAEEC,SAAS,EAAEZ,eAAgB;IAC3Ba,SAAS,EACPN,OAAO,KAAK,aAAa,GACpB,GAAEhB,eAAe,CAACuB,IAAK,cAAa,GACrCC,SACL;IACD,WAASV,MAAO;IAChBW,QAAQ,EAAEd,UAAW;IACrBC,OAAO,EAAEA,OAAQ;IACjBc,QAAQ,EAAEhB,UAAW;IACrBK,KAAK,EAAEA,KAAM;IAAAP,QAAA,EAEZA;EAAQ,CACE,CAAC;AAElB,CAAC;AAED,MAAMmB,gBAAgB,GAAG1B,IAAI,CAACM,QAAQ,CAAC;AACvCoB,gBAAgB,CAACC,WAAW,GAAG,UAAU;AAEzC,SAASD,gBAAgB,IAAIpB,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"MuiPropsChild.js","names":["forwardRef","memo","useMemo","MuiPropsContext","jsx","_jsx","MuiPropsChild","children","muiProps","ref","providerValue","Provider","value","MemoizedMuiPropsChild","displayName"],"sources":["../src/MuiPropsChild.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, memo, ReactNode, useMemo } from \"react\";\n\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\n\nexport type MuiPropsChildProps = {\n children: ReactNode;\n};\n\nconst MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(\n ({ children, ...muiProps }, ref) => {\n const providerValue = useMemo<MuiPropsContextType>(\n () => ({\n ...muiProps,\n ref,\n }),\n [muiProps, ref]\n );\n\n return (\n <MuiPropsContext.Provider value={providerValue}>\n {children}\n </MuiPropsContext.Provider>\n );\n }\n);\n\nconst MemoizedMuiPropsChild = memo(MuiPropsChild);\nMemoizedMuiPropsChild.displayName = \"MuiPropsChild\";\n\nexport { MemoizedMuiPropsChild as MuiPropsChild };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAEpDC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxB,MAAMC,aAAa,GAAGN,UAAU,CAC9B,CAAC;EAAEO,QAAQ;EAAE,GAAGC;AAAS,CAAC,EAAEC,GAAG,KAAK;EAClC,MAAMC,aAAa,GAAGR,OAAO,CAC3B,OAAO;IACL,GAAGM,QAAQ;IACXC;EACF,CAAC,CAAC,EACF,CAACD,QAAQ,EAAEC,GAAG,CAChB,CAAC;EAED,OACEJ,IAAA,CAACF,eAAe,CAACQ,QAAQ;IAACC,KAAK,EAAEF,aAAc;IAAAH,QAAA,EAC5CA;EAAQ,CACe,CAAC;AAE/B,CACF,CAAC;AAED,MAAMM,qBAAqB,GAAGZ,IAAI,CAACK,aAAa,CAAC;AACjDO,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAIP,aAAa"}
1
+ {"version":3,"file":"MuiPropsChild.js","names":["forwardRef","memo","useMemo","MuiPropsContext","jsx","_jsx","MuiPropsChild","children","muiProps","ref","providerValue","Provider","value","MemoizedMuiPropsChild","displayName"],"sources":["../src/MuiPropsChild.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { forwardRef, memo, ReactNode, useMemo } from \"react\";\n\nimport { MuiPropsContext, MuiPropsContextType } from \"./MuiPropsContext\";\n\nexport type MuiPropsChildProps = {\n children: ReactNode;\n};\n\nconst MuiPropsChild = forwardRef<HTMLElement, MuiPropsChildProps>(\n ({ children, ...muiProps }, ref) => {\n const providerValue = useMemo<MuiPropsContextType>(\n () => ({\n ...muiProps,\n ref,\n }),\n [muiProps, ref],\n );\n\n return (\n <MuiPropsContext.Provider value={providerValue}>\n {children}\n </MuiPropsContext.Provider>\n );\n },\n);\n\nconst MemoizedMuiPropsChild = memo(MuiPropsChild);\nMemoizedMuiPropsChild.displayName = \"MuiPropsChild\";\n\nexport { MemoizedMuiPropsChild as MuiPropsChild };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,EAAaC,OAAO,QAAQ,OAAO;AAAC,SAEpDC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMxB,MAAMC,aAAa,GAAGN,UAAU,CAC9B,CAAC;EAAEO,QAAQ;EAAE,GAAGC;AAAS,CAAC,EAAEC,GAAG,KAAK;EAClC,MAAMC,aAAa,GAAGR,OAAO,CAC3B,OAAO;IACL,GAAGM,QAAQ;IACXC;EACF,CAAC,CAAC,EACF,CAACD,QAAQ,EAAEC,GAAG,CAChB,CAAC;EAED,OACEJ,IAAA,CAACF,eAAe,CAACQ,QAAQ;IAACC,KAAK,EAAEF,aAAc;IAAAH,QAAA,EAC5CA;EAAQ,CACe,CAAC;AAE/B,CACF,CAAC;AAED,MAAMM,qBAAqB,GAAGZ,IAAI,CAACK,aAAa,CAAC;AACjDO,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAIP,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeSelect.js","names":["React","forwardRef","memo","useCallback","useImperativeHandle","useMemo","useRef","Field","getControlState","useInputValues","jsx","_jsx","NativeSelect","ariaDescribedBy","autoCompleteType","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","hasMultipleChoicesProp","hint","HintLinkComponent","id","idOverride","inputRef","isDisabled","isFullWidth","isMultiSelect","isOptional","label","onBlur","onChange","onChangeProp","onFocus","testId","translate","value","children","ref","controlledStateRef","controlledValue","uncontrolledValue","localInputRef","focus","current","inputValues","controlState","event","child","undefined","renderFieldComponent","errorMessageElementId","labelElementId","_Select","autoComplete","inputProps","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport React, {\n InputHTMLAttributes,\n ReactElement,\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\nimport {\n Select as MuiSelect,\n SelectProps as MuiSelectProps,\n} from \"@mui/material\";\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle, getControlState, useInputValues } from \"./inputUtils\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectValueType<HasMultipleChoices> =\n HasMultipleChoices extends true ? string[] : string;\n\nexport type NativeSelectProps<\n Value extends NativeSelectValueType<HasMultipleChoices>,\n HasMultipleChoices extends boolean\n> = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The options or optgroup elements within the NativeSelect\n */\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n /**\n * The default value of the NativeSelect. Use when component is uncontrolled\n */\n defaultValue?: Value;\n /**\n * If `true`, the Select allows multiple selections\n */\n hasMultipleChoices?: HasMultipleChoices;\n /**\n * The ref forwarded to the NativeSelect\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * @deprecated Use `hasMultipleChoices` instead\n */\n /** **Deprecated:** use `hasMultipleChoices` */\n isMultiSelect?: HasMultipleChoices;\n /**\n * The label text for the NativeSelect\n */\n label: string;\n /**\n * Callback fired when the NativeSelect loses focus\n */\n onBlur?: MuiSelectProps<Value>[\"onBlur\"];\n /**\n * Callback fired when the value of the NativeSelect changes\n */\n onChange?: MuiSelectProps<Value>[\"onChange\"];\n /**\n * Callback fired when the NativeSelect gains focus\n */\n onFocus?: MuiSelectProps<Value>[\"onFocus\"];\n options: Value;\n /**\n * The value or values selected in the NativeSelect. Use when component is controlled\n */\n value?: Value;\n} & Pick<\n FieldComponentProps,\n | \"ariaDescribedBy\"\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isDisabled\"\n | \"isFullWidth\"\n | \"isOptional\"\n> &\n HtmlProps;\n\nconst NativeSelect = forwardRef(\n <\n Value extends NativeSelectValueType<HasMultipleChoices>,\n HasMultipleChoices extends boolean\n >(\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices: hasMultipleChoicesProp,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputRef,\n isDisabled = false,\n isFullWidth = false,\n isMultiSelect,\n isOptional = false,\n label,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n testId,\n translate,\n value,\n children,\n }: NativeSelectProps<Value, HasMultipleChoices>,\n ref?: React.Ref<ReactElement>\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n })\n );\n const localInputRef = useRef<HTMLSelectElement>(null);\n\n useImperativeHandle(\n inputRef,\n () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n },\n []\n );\n\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const onChange = useCallback<\n NonNullable<MuiSelectProps<Value>[\"onChange\"]>\n >(\n (event, child) => {\n onChangeProp?.(event, child);\n },\n [onChangeProp]\n );\n\n const hasMultipleChoices = useMemo(\n () =>\n hasMultipleChoicesProp === undefined\n ? isMultiSelect\n : hasMultipleChoicesProp,\n [hasMultipleChoicesProp, isMultiSelect]\n );\n const renderFieldComponent = useCallback(\n ({ ariaDescribedBy, errorMessageElementId, labelElementId }) => (\n <MuiSelect\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n children={children}\n id={idOverride}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\n inputRef={localInputRef}\n name={idOverride}\n multiple={hasMultipleChoices}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n translate={translate}\n />\n ),\n [\n autoCompleteType,\n children,\n idOverride,\n inputValues,\n hasMultipleChoices,\n onBlur,\n onChange,\n onFocus,\n ref,\n testId,\n translate,\n ]\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n }\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAGVC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAKNC,KAAK;AAAA,SAGQC,eAAe,EAAEC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AA6ErD,MAAMC,YAAY,GAAGX,UAAU,CAC7B,CAIE;EACEY,eAAe;EACfC,gBAAgB;EAChBC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,kBAAkB,EAAEC,sBAAsB;EAC1CC,IAAI;EACJC,iBAAiB;EACjBC,EAAE,EAAEC,UAAU;EACdC,QAAQ;EACRC,UAAU,GAAG,KAAK;EAClBC,WAAW,GAAG,KAAK;EACnBC,aAAa;EACbC,UAAU,GAAG,KAAK;EAClBC,KAAK;EACLC,MAAM;EACNC,QAAQ,EAAEC,YAAY;EACtBC,OAAO;EACPC,MAAM;EACNC,SAAS;EACTC,KAAK;EACLC;AAC4C,CAAC,EAC/CC,GAA6B,KAC1B;EACH,MAAMC,kBAAkB,GAAGjC,MAAM,CAC/BE,eAAe,CAAC;IACdgC,eAAe,EAAEJ,KAAK;IACtBK,iBAAiB,EAAE1B;EACrB,CAAC,CACH,CAAC;EACD,MAAM2B,aAAa,GAAGpC,MAAM,CAAoB,IAAI,CAAC;EAErDF,mBAAmB,CACjBoB,QAAQ,EACR,MAAM;IACJ,OAAO;MACLmB,KAAK,EAAEA,CAAA,KAAM;QACXD,aAAa,CAACE,OAAO,EAAED,KAAK,CAAC,CAAC;MAChC;IAC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,CAEb,CAAC;EAED,OACExB,IAAA,CAACJ,KAAK;IACJM,eAAe,EAAEA,eAAgB;IACjCG,YAAY,EAAEA,YAAa;IAC3BC,gBAAgB,EAAEA,gBAAiB;IACnC0C,SAAS,EAAC,QAAQ;IAClBC,eAAe;IACfxC,IAAI,EAAEA,IAAK;IACXC,iBAAiB,EAAEA,iBAAkB;IACrCC,EAAE,EAAEC,UAAW;IACfE,UAAU,EAAEA,UAAW;IACvBC,WAAW,EAAEA,WAAY;IACzBE,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAEA,KAAM;IACbqB,oBAAoB,EAAEA;EAAqB,CAC5C,CAAC;AAEN,CACF,CAAC;AAED,MAAMW,oBAAoB,GAAG3D,IAAI,CAACU,YAAY,CAAC;AAC/CiD,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIjD,YAAY"}
1
+ {"version":3,"file":"NativeSelect.js","names":["React","forwardRef","memo","useCallback","useImperativeHandle","useMemo","useRef","Field","getControlState","useInputValues","jsx","_jsx","NativeSelect","ariaDescribedBy","autoCompleteType","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","hasMultipleChoicesProp","hint","HintLinkComponent","id","idOverride","inputRef","isDisabled","isFullWidth","isMultiSelect","isOptional","label","onBlur","onChange","onChangeProp","onFocus","testId","translate","value","children","ref","controlledStateRef","controlledValue","uncontrolledValue","localInputRef","focus","current","inputValues","controlState","event","child","undefined","renderFieldComponent","errorMessageElementId","labelElementId","_Select","autoComplete","inputProps","name","multiple","native","fieldType","hasVisibleLabel","MemoizedNativeSelect","displayName"],"sources":["../src/NativeSelect.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport React, {\n InputHTMLAttributes,\n ReactElement,\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\nimport {\n Select as MuiSelect,\n SelectProps as MuiSelectProps,\n} from \"@mui/material\";\nimport { Field } from \"./Field\";\nimport {\n FieldComponentProps,\n FieldComponentRenderProps,\n} from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle, getControlState, useInputValues } from \"./inputUtils\";\n\nexport type NativeSelectOption = {\n text: string;\n value?: string;\n type?: \"heading\" | \"option\";\n};\n\nexport type NativeSelectValueType<HasMultipleChoices> =\n HasMultipleChoices extends true ? string[] : string;\n\nexport type NativeSelectProps<\n Value extends NativeSelectValueType<HasMultipleChoices>,\n HasMultipleChoices extends boolean,\n> = {\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill\n */\n autoCompleteType?: InputHTMLAttributes<HTMLInputElement>[\"autoComplete\"];\n /**\n * The options or optgroup elements within the NativeSelect\n */\n children?: ReactElement<\"option\"> | ReactElement<\"optgroup\">;\n /**\n * The default value of the NativeSelect. Use when component is uncontrolled\n */\n defaultValue?: Value;\n /**\n * If `true`, the Select allows multiple selections\n */\n hasMultipleChoices?: HasMultipleChoices;\n /**\n * The ref forwarded to the NativeSelect\n */\n inputRef?: React.RefObject<FocusHandle>;\n /**\n * @deprecated Use `hasMultipleChoices` instead\n */\n /** **Deprecated:** use `hasMultipleChoices` */\n isMultiSelect?: HasMultipleChoices;\n /**\n * The label text for the NativeSelect\n */\n label: string;\n /**\n * Callback fired when the NativeSelect loses focus\n */\n onBlur?: MuiSelectProps<Value>[\"onBlur\"];\n /**\n * Callback fired when the value of the NativeSelect changes\n */\n onChange?: MuiSelectProps<Value>[\"onChange\"];\n /**\n * Callback fired when the NativeSelect gains focus\n */\n onFocus?: MuiSelectProps<Value>[\"onFocus\"];\n options: Value;\n /**\n * The value or values selected in the NativeSelect. Use when component is controlled\n */\n value?: Value;\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isDisabled\"\n | \"isFullWidth\"\n | \"isOptional\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\ntype NativeSelectRenderProps = Partial<\n Pick<FieldComponentRenderProps, \"ariaDescribedBy\" | \"errorMessageElementId\">\n> &\n Pick<FieldComponentRenderProps, \"labelElementId\">;\n\nconst NativeSelect = forwardRef(\n <\n Value extends NativeSelectValueType<HasMultipleChoices>,\n HasMultipleChoices extends boolean,\n >(\n {\n ariaDescribedBy,\n autoCompleteType,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices: hasMultipleChoicesProp,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputRef,\n isDisabled = false,\n isFullWidth = false,\n isMultiSelect,\n isOptional = false,\n label,\n onBlur,\n onChange: onChangeProp,\n onFocus,\n testId,\n translate,\n value,\n children,\n }: NativeSelectProps<Value, HasMultipleChoices>,\n ref?: React.Ref<ReactElement>,\n ) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n const localInputRef = useRef<HTMLSelectElement>(null);\n\n useImperativeHandle(\n inputRef,\n () => {\n return {\n focus: () => {\n localInputRef.current?.focus();\n },\n };\n },\n [],\n );\n\n const inputValues = useInputValues({\n defaultValue,\n value,\n controlState: controlledStateRef.current,\n });\n\n const onChange = useCallback<\n NonNullable<MuiSelectProps<Value>[\"onChange\"]>\n >(\n (event, child) => {\n onChangeProp?.(event, child);\n },\n [onChangeProp],\n );\n\n const hasMultipleChoices = useMemo(\n () =>\n hasMultipleChoicesProp === undefined\n ? isMultiSelect\n : hasMultipleChoicesProp,\n [hasMultipleChoicesProp, isMultiSelect],\n );\n const renderFieldComponent = useCallback(\n ({\n ariaDescribedBy,\n errorMessageElementId,\n labelElementId,\n }: NativeSelectRenderProps) => (\n <MuiSelect\n {...inputValues}\n aria-describedby={ariaDescribedBy}\n autoComplete={autoCompleteType}\n children={children}\n id={idOverride}\n inputProps={{\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\n inputRef={localInputRef}\n name={idOverride}\n multiple={hasMultipleChoices}\n native={true}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n ref={ref}\n translate={translate}\n />\n ),\n [\n autoCompleteType,\n children,\n idOverride,\n inputValues,\n hasMultipleChoices,\n onBlur,\n onChange,\n onFocus,\n ref,\n testId,\n translate,\n ],\n );\n\n return (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n id={idOverride}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={renderFieldComponent}\n />\n );\n },\n);\n\nconst MemoizedNativeSelect = memo(NativeSelect);\nMemoizedNativeSelect.displayName = \"NativeSelect\";\n\nexport { MemoizedNativeSelect as NativeSelect };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAGVC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAKNC,KAAK;AAAA,SAMQC,eAAe,EAAEC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAiFrD,MAAMC,YAAY,GAAGX,UAAU,CAC7B,CAIE;EACEY,eAAe;EACfC,gBAAgB;EAChBC,YAAY;EACZC,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10 +33,8 @@ const OdysseyProvider = ({
33
33
  stylisPlugins: stylisPlugins,
34
34
  children: _jsx(OdysseyThemeProvider, {
35
35
  designTokensOverride: designTokensOverride,
36
- emotionRoot: emotionRoot,
37
36
  shadowDomElement: shadowDomElement,
38
37
  themeOverride: themeOverride,
39
- withCache: false,
40
38
  children: _jsx(_ScopedCssBaseline, {
41
39
  children: _jsx(OdysseyTranslationProvider, {
42
40
  languageCode: languageCode,
@@ -1 +1 @@
1
- {"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","children","designTokensOverride","emotionRoot","shadowDomElement","languageCode","nonce","stylisPlugins","themeOverride","translationOverrides","withCache","_ScopedCssBaseline","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactNode } from \"react\";\nimport { ScopedCssBaseline } from \"@mui/material\";\n\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n OdysseyTranslationProviderProps,\n} from \"./OdysseyTranslationProvider\";\nimport { DefaultSupportedLanguages } from \"./OdysseyTranslationProvider.types\";\n\nexport type OdysseyProviderProps<\n SupportedLanguages extends string = DefaultSupportedLanguages\n> = OdysseyCacheProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps<SupportedLanguages> & {\n children: ReactNode;\n };\n\nconst OdysseyProvider = <SupportedLanguages extends string>({\n children,\n designTokensOverride,\n emotionRoot,\n shadowDomElement,\n languageCode,\n nonce,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps<SupportedLanguages>) => (\n <OdysseyCacheProvider\n nonce={nonce}\n emotionRoot={emotionRoot}\n shadowDomElement={shadowDomElement}\n stylisPlugins={stylisPlugins}\n >\n <OdysseyThemeProvider\n designTokensOverride={designTokensOverride}\n emotionRoot={emotionRoot}\n shadowDomElement={shadowDomElement}\n themeOverride={themeOverride}\n withCache={false}\n >\n <ScopedCssBaseline>\n <OdysseyTranslationProvider<SupportedLanguages>\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </ScopedCssBaseline>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider) as typeof OdysseyProvider;\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAmB,OAAO;AAAC,SAItCC,oBAAoB;AAAA,SAIpBC,oBAAoB;AAAA,SAIpBC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAa5B,MAAMC,eAAe,GAAGA,CAAoC;EAC1DC,QAAQ;EACRC,oBAAoB;EACpBC,WAAW;EACXC,gBAAgB;EAChBC,YAAY;EACZC,KAAK;EACLC,aAAa;EACbC,aAAa;EACbC;AACwC,CAAC,KACzCV,IAAA,CAACJ,oBAAoB;EACnBW,KAAK,EAAEA,KAAM;EACbH,WAAW,EAAEA,WAAY;EACzBC,gBAAgB,EAAEA,gBAAiB;EACnCG,aAAa,EAAEA,aAAc;EAAAN,QAAA,EAE7BF,IAAA,CAACH,oBAAoB;IACnBM,oBAAoB,EAAEA,oBAAqB;IAC3CC,WAAW,EAAEA,WAAY;IACzBC,gBAAgB,EAAEA,gBAAiB;IACnCI,aAAa,EAAEA,aAAc;IAC7BE,SAAS,EAAE,KAAM;IAAAT,QAAA,EAEjBF,IAAA,CAAAY,kBAAA;MAAAV,QAAA,EACEF,IAAA,CAACF,0BAA0B;QACzBQ,YAAY,EAAEA,YAAa;QAC3BI,oBAAoB,EAAEA,oBAAqB;QAAAR,QAAA,EAE1CA;MAAQ,CACiB;IAAC,CACZ;EAAC,CACA;AAAC,CACH,CACvB;AAED,MAAMW,qBAAqB,GAAGlB,IAAI,CAACM,eAAe,CAA2B;AAE7E,SAASY,qBAAqB,IAAIZ,eAAe"}
1
+ {"version":3,"file":"OdysseyProvider.js","names":["memo","OdysseyCacheProvider","OdysseyThemeProvider","OdysseyTranslationProvider","jsx","_jsx","OdysseyProvider","children","designTokensOverride","emotionRoot","shadowDomElement","languageCode","nonce","stylisPlugins","themeOverride","translationOverrides","_ScopedCssBaseline","MemoizedThemeProvider"],"sources":["../src/OdysseyProvider.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, ReactNode } from \"react\";\nimport { ScopedCssBaseline } from \"@mui/material\";\n\nimport {\n OdysseyCacheProvider,\n OdysseyCacheProviderProps,\n} from \"./OdysseyCacheProvider\";\nimport {\n OdysseyThemeProvider,\n OdysseyThemeProviderProps,\n} from \"./OdysseyThemeProvider\";\nimport {\n OdysseyTranslationProvider,\n OdysseyTranslationProviderProps,\n} from \"./OdysseyTranslationProvider\";\nimport { DefaultSupportedLanguages } from \"./OdysseyTranslationProvider.types\";\n\nexport type OdysseyProviderProps<\n SupportedLanguages extends string = DefaultSupportedLanguages,\n> = OdysseyCacheProviderProps &\n OdysseyThemeProviderProps &\n OdysseyTranslationProviderProps<SupportedLanguages> & {\n children: ReactNode;\n };\n\nconst OdysseyProvider = <SupportedLanguages extends string>({\n children,\n designTokensOverride,\n emotionRoot,\n shadowDomElement,\n languageCode,\n nonce,\n stylisPlugins,\n themeOverride,\n translationOverrides,\n}: OdysseyProviderProps<SupportedLanguages>) => (\n <OdysseyCacheProvider\n nonce={nonce}\n emotionRoot={emotionRoot}\n shadowDomElement={shadowDomElement}\n stylisPlugins={stylisPlugins}\n >\n <OdysseyThemeProvider\n designTokensOverride={designTokensOverride}\n shadowDomElement={shadowDomElement}\n themeOverride={themeOverride}\n >\n <ScopedCssBaseline>\n <OdysseyTranslationProvider<SupportedLanguages>\n languageCode={languageCode}\n translationOverrides={translationOverrides}\n >\n {children}\n </OdysseyTranslationProvider>\n </ScopedCssBaseline>\n </OdysseyThemeProvider>\n </OdysseyCacheProvider>\n);\n\nconst MemoizedThemeProvider = memo(OdysseyProvider) as typeof OdysseyProvider;\n\nexport { MemoizedThemeProvider as OdysseyProvider };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAmB,OAAO;AAAC,SAItCC,oBAAoB;AAAA,SAIpBC,oBAAoB;AAAA,SAIpBC,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAa5B,MAAMC,eAAe,GAAGA,CAAoC;EAC1DC,QAAQ;EACRC,oBAAoB;EACpBC,WAAW;EACXC,gBAAgB;EAChBC,YAAY;EACZC,KAAK;EACLC,aAAa;EACbC,aAAa;EACbC;AACwC,CAAC,KACzCV,IAAA,CAACJ,oBAAoB;EACnBW,KAAK,EAAEA,KAAM;EACbH,WAAW,EAAEA,WAAY;EACzBC,gBAAgB,EAAEA,gBAAiB;EACnCG,aAAa,EAAEA,aAAc;EAAAN,QAAA,EAE7BF,IAAA,CAACH,oBAAoB;IACnBM,oBAAoB,EAAEA,oBAAqB;IAC3CE,gBAAgB,EAAEA,gBAAiB;IACnCI,aAAa,EAAEA,aAAc;IAAAP,QAAA,EAE7BF,IAAA,CAAAW,kBAAA;MAAAT,QAAA,EACEF,IAAA,CAACF,0BAA0B;QACzBQ,YAAY,EAAEA,YAAa;QAC3BI,oBAAoB,EAAEA,oBAAqB;QAAAR,QAAA,EAE1CA;MAAQ,CACiB;IAAC,CACZ;EAAC,CACA;AAAC,CACH,CACvB;AAED,MAAMU,qBAAqB,GAAGjB,IAAI,CAACM,eAAe,CAA2B;AAE7E,SAASW,qBAAqB,IAAIX,eAAe"}
@@ -16,17 +16,12 @@ import { deepmerge } from "@mui/utils";
16
16
  import { createOdysseyMuiTheme } from "./theme/index.js";
17
17
  import * as Tokens from "@okta/odyssey-design-tokens";
18
18
  import { OdysseyDesignTokensContext } from "./OdysseyDesignTokensContext.js";
19
- import { CacheProvider } from "@emotion/react";
20
- import createCache from "@emotion/cache";
21
- import { useUniqueAlphabeticalId } from "./useUniqueAlphabeticalId.js";
22
19
  import { jsx as _jsx } from "react/jsx-runtime";
23
20
  const OdysseyThemeProvider = ({
24
21
  children,
25
22
  designTokensOverride,
26
- emotionRoot,
27
23
  shadowDomElement,
28
- themeOverride,
29
- withCache = true
24
+ themeOverride
30
25
  }) => {
31
26
  const odysseyTokens = useMemo(() => ({
32
27
  ...Tokens,
@@ -37,28 +32,6 @@ const OdysseyThemeProvider = ({
37
32
  shadowDomElement
38
33
  }), [odysseyTokens, shadowDomElement]);
39
34
  const customOdysseyTheme = useMemo(() => themeOverride && createTheme(deepmerge(odysseyTheme, themeOverride)), [odysseyTheme, themeOverride]);
40
- const uniqueAlphabeticalId = useUniqueAlphabeticalId();
41
- const cache = useMemo(() => createCache({
42
- ...(emotionRoot && {
43
- container: emotionRoot
44
- }),
45
- key: uniqueAlphabeticalId,
46
- prepend: true,
47
- nonce: window.cspNonce,
48
- speedy: false
49
- }), [emotionRoot, uniqueAlphabeticalId]);
50
- if (withCache) {
51
- return _jsx(CacheProvider, {
52
- value: cache,
53
- children: _jsx(MuiThemeProvider, {
54
- theme: customOdysseyTheme ?? odysseyTheme,
55
- children: _jsx(OdysseyDesignTokensContext.Provider, {
56
- value: odysseyTokens,
57
- children: children
58
- })
59
- })
60
- });
61
- }
62
35
  return _jsx(MuiThemeProvider, {
63
36
  theme: customOdysseyTheme ?? odysseyTheme,
64
37
  children: _jsx(OdysseyDesignTokensContext.Provider, {