@okta/odyssey-react-mui 1.15.8 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (973) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +4 -0
  3. package/dist/Accordion.js +2 -0
  4. package/dist/Accordion.js.map +1 -1
  5. package/dist/Autocomplete.js +9 -0
  6. package/dist/Autocomplete.js.map +1 -1
  7. package/dist/Badge.js +1 -0
  8. package/dist/Badge.js.map +1 -1
  9. package/dist/Banner.js +6 -5
  10. package/dist/Banner.js.map +1 -1
  11. package/dist/Button.js +15 -11
  12. package/dist/Button.js.map +1 -1
  13. package/dist/Callout.js +45 -7
  14. package/dist/Callout.js.map +1 -1
  15. package/dist/{Tile.js → Card.js} +43 -28
  16. package/dist/Card.js.map +1 -0
  17. package/dist/DataTable/DataTable.js +68 -40
  18. package/dist/DataTable/DataTable.js.map +1 -1
  19. package/dist/DataTable/DataTableRowActions.js.map +1 -1
  20. package/dist/DataTable/constants.js +0 -1
  21. package/dist/DataTable/constants.js.map +1 -1
  22. package/dist/DataTable/index.js +0 -1
  23. package/dist/DataTable/index.js.map +1 -1
  24. package/dist/Dialog.js +9 -3
  25. package/dist/Dialog.js.map +1 -1
  26. package/dist/{labs/Drawer.js → Drawer.js} +5 -5
  27. package/dist/Drawer.js.map +1 -0
  28. package/dist/{DataTable/DataTableEmptyState.js → EmptyState.js} +17 -15
  29. package/dist/EmptyState.js.map +1 -0
  30. package/dist/ErrorMessageList.js +1 -1
  31. package/dist/ErrorMessageList.js.map +1 -1
  32. package/dist/FieldError.js +3 -2
  33. package/dist/FieldError.js.map +1 -1
  34. package/dist/HtmlProps.js.map +1 -1
  35. package/dist/MenuItem.js +1 -0
  36. package/dist/MenuItem.js.map +1 -1
  37. package/dist/OdysseyCacheProvider.js +5 -2
  38. package/dist/OdysseyCacheProvider.js.map +1 -1
  39. package/dist/OdysseyProvider.js +1 -1
  40. package/dist/OdysseyProvider.js.map +1 -1
  41. package/dist/OdysseyTranslationProvider.js +1 -6
  42. package/dist/OdysseyTranslationProvider.js.map +1 -1
  43. package/dist/{DataTable/DataTablePagination.js → Pagination/Pagination.js} +56 -59
  44. package/dist/Pagination/Pagination.js.map +1 -0
  45. package/dist/Pagination/constants.js +14 -0
  46. package/dist/Pagination/constants.js.map +1 -0
  47. package/dist/Pagination/index.js +15 -0
  48. package/dist/Pagination/index.js.map +1 -0
  49. package/dist/Pagination/usePagination.js +51 -0
  50. package/dist/Pagination/usePagination.js.map +1 -0
  51. package/dist/Radio.js +17 -5
  52. package/dist/Radio.js.map +1 -1
  53. package/dist/ScreenReaderText.js +4 -0
  54. package/dist/ScreenReaderText.js.map +1 -1
  55. package/dist/Select.js +33 -42
  56. package/dist/Select.js.map +1 -1
  57. package/dist/Status.js +5 -3
  58. package/dist/Status.js.map +1 -1
  59. package/dist/Surface.js +38 -0
  60. package/dist/Surface.js.map +1 -0
  61. package/dist/Tabs.js +22 -0
  62. package/dist/Tabs.js.map +1 -1
  63. package/dist/TextField.js +48 -0
  64. package/dist/TextField.js.map +1 -1
  65. package/dist/Toast.js +37 -34
  66. package/dist/Toast.js.map +1 -1
  67. package/dist/assertEnv.d.ts +18 -0
  68. package/dist/assertEnv.d.ts.map +1 -0
  69. package/dist/assertEnv.js +32 -0
  70. package/dist/icons.generated/Add.js +1 -1
  71. package/dist/icons.generated/Add.js.map +1 -1
  72. package/dist/icons.generated/AddCircle.js +1 -1
  73. package/dist/icons.generated/AddCircle.js.map +1 -1
  74. package/dist/icons.generated/Apps.js +1 -1
  75. package/dist/icons.generated/Apps.js.map +1 -1
  76. package/dist/icons.generated/ArrowBottom.js +2 -2
  77. package/dist/icons.generated/ArrowBottom.js.map +1 -1
  78. package/dist/icons.generated/ArrowDown.js +1 -1
  79. package/dist/icons.generated/ArrowDown.js.map +1 -1
  80. package/dist/icons.generated/ArrowLeft.js +1 -1
  81. package/dist/icons.generated/ArrowLeft.js.map +1 -1
  82. package/dist/icons.generated/ArrowLowerLeft.js +1 -1
  83. package/dist/icons.generated/ArrowLowerLeft.js.map +1 -1
  84. package/dist/icons.generated/ArrowLowerRight.js +1 -1
  85. package/dist/icons.generated/ArrowLowerRight.js.map +1 -1
  86. package/dist/icons.generated/ArrowRight.js +1 -1
  87. package/dist/icons.generated/ArrowRight.js.map +1 -1
  88. package/dist/icons.generated/ArrowTop.js +2 -2
  89. package/dist/icons.generated/ArrowTop.js.map +1 -1
  90. package/dist/icons.generated/ArrowUnsorted.js +1 -1
  91. package/dist/icons.generated/ArrowUnsorted.js.map +1 -1
  92. package/dist/icons.generated/ArrowUp.js +1 -1
  93. package/dist/icons.generated/ArrowUp.js.map +1 -1
  94. package/dist/icons.generated/ArrowUpperLeft.js +1 -1
  95. package/dist/icons.generated/ArrowUpperLeft.js.map +1 -1
  96. package/dist/icons.generated/ArrowUpperRight.js +1 -1
  97. package/dist/icons.generated/ArrowUpperRight.js.map +1 -1
  98. package/dist/icons.generated/Bug.js +1 -1
  99. package/dist/icons.generated/Bug.js.map +1 -1
  100. package/dist/icons.generated/Calendar.js +1 -1
  101. package/dist/icons.generated/Calendar.js.map +1 -1
  102. package/dist/icons.generated/Call.js +1 -1
  103. package/dist/icons.generated/Call.js.map +1 -1
  104. package/dist/icons.generated/Chat.js +1 -1
  105. package/dist/icons.generated/Chat.js.map +1 -1
  106. package/dist/icons.generated/Check.js +1 -1
  107. package/dist/icons.generated/Check.js.map +1 -1
  108. package/dist/icons.generated/CheckCircleFilled.js +1 -1
  109. package/dist/icons.generated/CheckCircleFilled.js.map +1 -1
  110. package/dist/icons.generated/ChevronDown.js +1 -1
  111. package/dist/icons.generated/ChevronDown.js.map +1 -1
  112. package/dist/icons.generated/ChevronLeft.js +1 -1
  113. package/dist/icons.generated/ChevronLeft.js.map +1 -1
  114. package/dist/icons.generated/ChevronRight.js +1 -1
  115. package/dist/icons.generated/ChevronRight.js.map +1 -1
  116. package/dist/icons.generated/ChevronUp.js +1 -1
  117. package/dist/icons.generated/ChevronUp.js.map +1 -1
  118. package/dist/icons.generated/Clock.js +1 -1
  119. package/dist/icons.generated/Clock.js.map +1 -1
  120. package/dist/icons.generated/Close.js +1 -1
  121. package/dist/icons.generated/Close.js.map +1 -1
  122. package/dist/icons.generated/CloseCircleFilled.js +1 -1
  123. package/dist/icons.generated/CloseCircleFilled.js.map +1 -1
  124. package/dist/icons.generated/CollapseLeft.js +1 -1
  125. package/dist/icons.generated/CollapseLeft.js.map +1 -1
  126. package/dist/icons.generated/CollapseRight.js +1 -1
  127. package/dist/icons.generated/CollapseRight.js.map +1 -1
  128. package/dist/icons.generated/Copy.js +1 -1
  129. package/dist/icons.generated/Copy.js.map +1 -1
  130. package/dist/icons.generated/Custom.js +39 -0
  131. package/dist/icons.generated/Custom.js.map +1 -0
  132. package/dist/icons.generated/DangerDiamond.js +1 -1
  133. package/dist/icons.generated/DangerDiamond.js.map +1 -1
  134. package/dist/icons.generated/DangerDiamondFilled.js +1 -1
  135. package/dist/icons.generated/DangerDiamondFilled.js.map +1 -1
  136. package/dist/icons.generated/Delete.js +1 -1
  137. package/dist/icons.generated/Delete.js.map +1 -1
  138. package/dist/icons.generated/Deny.js +1 -1
  139. package/dist/icons.generated/Deny.js.map +1 -1
  140. package/dist/icons.generated/Devices.js +1 -1
  141. package/dist/icons.generated/Devices.js.map +1 -1
  142. package/dist/icons.generated/Directory.js +1 -1
  143. package/dist/icons.generated/Directory.js.map +1 -1
  144. package/dist/icons.generated/Documentation.js +1 -1
  145. package/dist/icons.generated/Documentation.js.map +1 -1
  146. package/dist/icons.generated/Download.js +1 -1
  147. package/dist/icons.generated/Download.js.map +1 -1
  148. package/dist/icons.generated/DragIndicator.js +1 -1
  149. package/dist/icons.generated/DragIndicator.js.map +1 -1
  150. package/dist/icons.generated/Duo.js +47 -0
  151. package/dist/icons.generated/Duo.js.map +1 -0
  152. package/dist/icons.generated/Edit.js +1 -1
  153. package/dist/icons.generated/Edit.js.map +1 -1
  154. package/dist/icons.generated/Email.js +38 -0
  155. package/dist/icons.generated/Email.js.map +1 -0
  156. package/dist/icons.generated/ExpandLeft.js +1 -1
  157. package/dist/icons.generated/ExpandLeft.js.map +1 -1
  158. package/dist/icons.generated/ExpandRight.js +1 -1
  159. package/dist/icons.generated/ExpandRight.js.map +1 -1
  160. package/dist/icons.generated/ExternalLink.js +1 -1
  161. package/dist/icons.generated/ExternalLink.js.map +1 -1
  162. package/dist/icons.generated/Fido2.js +57 -0
  163. package/dist/icons.generated/Fido2.js.map +1 -0
  164. package/dist/icons.generated/Filter.js +1 -1
  165. package/dist/icons.generated/Filter.js.map +1 -1
  166. package/dist/icons.generated/Folder.js +1 -1
  167. package/dist/icons.generated/Folder.js.map +1 -1
  168. package/dist/icons.generated/Globe.js +1 -1
  169. package/dist/icons.generated/Globe.js.map +1 -1
  170. package/dist/icons.generated/GoogleAuth.js +54 -0
  171. package/dist/icons.generated/GoogleAuth.js.map +1 -0
  172. package/dist/icons.generated/Grid.js +1 -1
  173. package/dist/icons.generated/Grid.js.map +1 -1
  174. package/dist/icons.generated/Group.js +1 -1
  175. package/dist/icons.generated/Group.js.map +1 -1
  176. package/dist/icons.generated/Hide.js +1 -1
  177. package/dist/icons.generated/Hide.js.map +1 -1
  178. package/dist/icons.generated/Home.js +1 -1
  179. package/dist/icons.generated/Home.js.map +1 -1
  180. package/dist/icons.generated/Idp.js +42 -0
  181. package/dist/icons.generated/Idp.js.map +1 -0
  182. package/dist/icons.generated/InformationCircle.js +1 -1
  183. package/dist/icons.generated/InformationCircle.js.map +1 -1
  184. package/dist/icons.generated/InformationCircleFilled.js +1 -1
  185. package/dist/icons.generated/InformationCircleFilled.js.map +1 -1
  186. package/dist/icons.generated/Link.js +1 -1
  187. package/dist/icons.generated/Link.js.map +1 -1
  188. package/dist/icons.generated/List.js +1 -1
  189. package/dist/icons.generated/List.js.map +1 -1
  190. package/dist/icons.generated/Lock.js +1 -1
  191. package/dist/icons.generated/Lock.js.map +1 -1
  192. package/dist/icons.generated/More.js +1 -1
  193. package/dist/icons.generated/More.js.map +1 -1
  194. package/dist/icons.generated/Notification.js +1 -1
  195. package/dist/icons.generated/Notification.js.map +1 -1
  196. package/dist/icons.generated/OktaVerify.js +33 -0
  197. package/dist/icons.generated/OktaVerify.js.map +1 -0
  198. package/dist/icons.generated/OnPremMfa.js +39 -0
  199. package/dist/icons.generated/OnPremMfa.js.map +1 -0
  200. package/dist/icons.generated/OneTimePassword.js +49 -0
  201. package/dist/icons.generated/OneTimePassword.js.map +1 -0
  202. package/dist/icons.generated/Password.js +61 -0
  203. package/dist/icons.generated/Password.js.map +1 -0
  204. package/dist/icons.generated/Pause.js +1 -1
  205. package/dist/icons.generated/Pause.js.map +1 -1
  206. package/dist/icons.generated/QuestionCircle.js +1 -1
  207. package/dist/icons.generated/QuestionCircle.js.map +1 -1
  208. package/dist/icons.generated/QuestionCircleFilled.js +1 -1
  209. package/dist/icons.generated/QuestionCircleFilled.js.map +1 -1
  210. package/dist/icons.generated/Refresh.js +1 -1
  211. package/dist/icons.generated/Refresh.js.map +1 -1
  212. package/dist/icons.generated/Reset.js +1 -1
  213. package/dist/icons.generated/Reset.js.map +1 -1
  214. package/dist/icons.generated/Resume.js +1 -1
  215. package/dist/icons.generated/Resume.js.map +1 -1
  216. package/dist/icons.generated/Search.js +1 -1
  217. package/dist/icons.generated/Search.js.map +1 -1
  218. package/dist/icons.generated/SecurityQuestion.js +41 -0
  219. package/dist/icons.generated/SecurityQuestion.js.map +1 -0
  220. package/dist/icons.generated/Server.js +1 -1
  221. package/dist/icons.generated/Server.js.map +1 -1
  222. package/dist/icons.generated/Settings.js +1 -1
  223. package/dist/icons.generated/Settings.js.map +1 -1
  224. package/dist/icons.generated/Show.js +1 -1
  225. package/dist/icons.generated/Show.js.map +1 -1
  226. package/dist/icons.generated/SmartCard.js +49 -0
  227. package/dist/icons.generated/SmartCard.js.map +1 -0
  228. package/dist/icons.generated/Sms.js +49 -0
  229. package/dist/icons.generated/Sms.js.map +1 -0
  230. package/dist/icons.generated/Subtract.js +1 -1
  231. package/dist/icons.generated/Subtract.js.map +1 -1
  232. package/dist/icons.generated/SymantecVip.js +38 -0
  233. package/dist/icons.generated/SymantecVip.js.map +1 -0
  234. package/dist/icons.generated/Sync.js +1 -1
  235. package/dist/icons.generated/Sync.js.map +1 -1
  236. package/dist/icons.generated/ThumbsDown.js +33 -0
  237. package/dist/icons.generated/ThumbsDown.js.map +1 -0
  238. package/dist/icons.generated/ThumbsUp.js +33 -0
  239. package/dist/icons.generated/ThumbsUp.js.map +1 -0
  240. package/dist/icons.generated/Unlock.js +1 -1
  241. package/dist/icons.generated/Unlock.js.map +1 -1
  242. package/dist/icons.generated/Upload.js +1 -1
  243. package/dist/icons.generated/Upload.js.map +1 -1
  244. package/dist/icons.generated/User.js +1 -1
  245. package/dist/icons.generated/User.js.map +1 -1
  246. package/dist/icons.generated/Video.js +1 -1
  247. package/dist/icons.generated/Video.js.map +1 -1
  248. package/dist/icons.generated/VoiceCall.js +54 -0
  249. package/dist/icons.generated/VoiceCall.js.map +1 -0
  250. package/dist/icons.generated/Warning.js +1 -1
  251. package/dist/icons.generated/Warning.js.map +1 -1
  252. package/dist/icons.generated/WarningFilled.js +1 -1
  253. package/dist/icons.generated/WarningFilled.js.map +1 -1
  254. package/dist/icons.generated/Yubikey.js +31 -0
  255. package/dist/icons.generated/Yubikey.js.map +1 -0
  256. package/dist/icons.generated/index.js +18 -0
  257. package/dist/icons.generated/index.js.map +1 -1
  258. package/dist/index.d.ts +24 -0
  259. package/dist/index.d.ts.map +1 -0
  260. package/dist/index.js +7 -2
  261. package/dist/index.js.map +1 -1
  262. package/dist/index.scss +457 -0
  263. package/dist/labs/DataComponents/BulkActionsMenu.js +77 -0
  264. package/dist/labs/DataComponents/BulkActionsMenu.js.map +1 -0
  265. package/dist/labs/DataComponents/DataStack.js +79 -0
  266. package/dist/labs/DataComponents/DataStack.js.map +1 -0
  267. package/dist/labs/DataComponents/DataTable.js +90 -0
  268. package/dist/labs/DataComponents/DataTable.js.map +1 -0
  269. package/dist/labs/DataComponents/DataView.js +278 -0
  270. package/dist/labs/DataComponents/DataView.js.map +1 -0
  271. package/dist/{src/DataTable/DataTableEmptyState.d.ts → labs/DataComponents/DetailPanel.js} +14 -9
  272. package/dist/labs/DataComponents/DetailPanel.js.map +1 -0
  273. package/dist/labs/DataComponents/LayoutSwitcher.js +53 -0
  274. package/dist/labs/DataComponents/LayoutSwitcher.js.map +1 -0
  275. package/dist/labs/DataComponents/RowActions.js +80 -0
  276. package/dist/labs/DataComponents/RowActions.js.map +1 -0
  277. package/dist/labs/DataComponents/StackCard.js +163 -0
  278. package/dist/labs/DataComponents/StackCard.js.map +1 -0
  279. package/dist/labs/DataComponents/StackContent.js +143 -0
  280. package/dist/labs/DataComponents/StackContent.js.map +1 -0
  281. package/dist/labs/DataComponents/TableContent.js +248 -0
  282. package/dist/labs/DataComponents/TableContent.js.map +1 -0
  283. package/dist/labs/DataComponents/TableSettings.js +96 -0
  284. package/dist/labs/DataComponents/TableSettings.js.map +1 -0
  285. package/dist/labs/DataComponents/componentTypes.js +2 -0
  286. package/dist/labs/DataComponents/componentTypes.js.map +1 -0
  287. package/dist/labs/DataComponents/constants.js +17 -0
  288. package/dist/labs/DataComponents/constants.js.map +1 -0
  289. package/dist/labs/DataComponents/dataTypes.js +2 -0
  290. package/dist/labs/DataComponents/dataTypes.js.map +1 -0
  291. package/dist/labs/DataComponents/fetchData.js +33 -0
  292. package/dist/labs/DataComponents/fetchData.js.map +1 -0
  293. package/dist/labs/DataComponents/index.js +18 -0
  294. package/dist/labs/DataComponents/index.js.map +1 -0
  295. package/dist/labs/DataComponents/tableConstants.js +146 -0
  296. package/dist/labs/DataComponents/tableConstants.js.map +1 -0
  297. package/dist/labs/DataComponents/useFilterConversion.js +58 -0
  298. package/dist/labs/DataComponents/useFilterConversion.js.map +1 -0
  299. package/dist/labs/DataFilters.js +139 -82
  300. package/dist/labs/DataFilters.js.map +1 -1
  301. package/dist/labs/DateField.js +77 -0
  302. package/dist/labs/DateField.js.map +1 -0
  303. package/dist/labs/DatePicker.js +186 -23
  304. package/dist/labs/DatePicker.js.map +1 -1
  305. package/dist/labs/{DatePicker.types.js → DatePicker.types.d.js} +1 -1
  306. package/dist/labs/DatePicker.types.d.js.map +1 -0
  307. package/dist/labs/FileUpload.js +28 -25
  308. package/dist/labs/FileUpload.js.map +1 -1
  309. package/dist/labs/FileUploadIllustration.js +1 -1
  310. package/dist/labs/FileUploadIllustration.js.map +1 -1
  311. package/dist/labs/FileUploadPreview.js +1 -0
  312. package/dist/labs/FileUploadPreview.js.map +1 -1
  313. package/dist/labs/Layout.js +49 -0
  314. package/dist/labs/Layout.js.map +1 -0
  315. package/dist/labs/NavAccordion.js +80 -0
  316. package/dist/labs/NavAccordion.js.map +1 -0
  317. package/dist/labs/PageTemplate.js +140 -0
  318. package/dist/labs/PageTemplate.js.map +1 -0
  319. package/dist/labs/SideNav.js +478 -0
  320. package/dist/labs/SideNav.js.map +1 -0
  321. package/dist/labs/Switch.js +186 -77
  322. package/dist/labs/Switch.js.map +1 -1
  323. package/dist/labs/datePickerTheme.js +138 -80
  324. package/dist/labs/datePickerTheme.js.map +1 -1
  325. package/dist/labs/index.js +5 -1
  326. package/dist/labs/index.js.map +1 -1
  327. package/dist/labs/useDatePickerTranslations.js +71 -0
  328. package/dist/labs/useDatePickerTranslations.js.map +1 -0
  329. package/dist/preset.d.ts +23 -0
  330. package/dist/preset.d.ts.map +1 -0
  331. package/dist/preset.js +35 -0
  332. package/dist/properties/ts/odyssey-react-mui.js +68 -10
  333. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  334. package/dist/properties/ts/odyssey-react-mui_cs.js +77 -2
  335. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  336. package/dist/properties/ts/odyssey-react-mui_da.js +77 -2
  337. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
  338. package/dist/properties/ts/odyssey-react-mui_de.js +77 -2
  339. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
  340. package/dist/properties/ts/odyssey-react-mui_el.js +77 -2
  341. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
  342. package/dist/properties/ts/odyssey-react-mui_es.js +77 -2
  343. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
  344. package/dist/properties/ts/odyssey-react-mui_fi.js +77 -2
  345. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  346. package/dist/properties/ts/odyssey-react-mui_fr.js +77 -2
  347. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  348. package/dist/properties/ts/odyssey-react-mui_ht.js +98 -0
  349. package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -0
  350. package/dist/properties/ts/odyssey-react-mui_hu.js +77 -2
  351. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  352. package/dist/properties/ts/odyssey-react-mui_id.js +77 -2
  353. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
  354. package/dist/properties/ts/odyssey-react-mui_it.js +77 -2
  355. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
  356. package/dist/properties/ts/odyssey-react-mui_ja.js +77 -2
  357. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  358. package/dist/properties/ts/odyssey-react-mui_ko.js +77 -2
  359. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  360. package/dist/properties/ts/odyssey-react-mui_ms.js +77 -2
  361. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  362. package/dist/properties/ts/odyssey-react-mui_nb.js +77 -2
  363. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  364. package/dist/properties/ts/odyssey-react-mui_nl_NL.js +77 -2
  365. package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  366. package/dist/properties/ts/odyssey-react-mui_ok_PL.js +34 -3
  367. package/dist/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  368. package/dist/properties/ts/odyssey-react-mui_ok_SK.js +34 -3
  369. package/dist/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  370. package/dist/properties/ts/odyssey-react-mui_pl.js +77 -2
  371. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  372. package/dist/properties/ts/odyssey-react-mui_pt_BR.js +77 -2
  373. package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  374. package/dist/properties/ts/odyssey-react-mui_ro.js +77 -2
  375. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  376. package/dist/properties/ts/odyssey-react-mui_ru.js +77 -2
  377. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  378. package/dist/properties/ts/odyssey-react-mui_sv.js +77 -2
  379. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  380. package/dist/properties/ts/odyssey-react-mui_th.js +77 -2
  381. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
  382. package/dist/properties/ts/odyssey-react-mui_tr.js +77 -2
  383. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  384. package/dist/properties/ts/odyssey-react-mui_uk.js +77 -2
  385. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  386. package/dist/properties/ts/odyssey-react-mui_vi.js +77 -2
  387. package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  388. package/dist/properties/ts/odyssey-react-mui_zh_CN.js +77 -2
  389. package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  390. package/dist/properties/ts/odyssey-react-mui_zh_TW.js +77 -2
  391. package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  392. package/dist/remUtils.js +14 -0
  393. package/dist/remUtils.js.map +1 -0
  394. package/dist/scripts/generateTestSelectorsJson.d.ts +13 -0
  395. package/dist/scripts/generateTestSelectorsJson.d.ts.map +1 -0
  396. package/dist/src/Accordion.d.ts +1 -1
  397. package/dist/src/Accordion.d.ts.map +1 -1
  398. package/dist/src/Autocomplete.d.ts +7 -1
  399. package/dist/src/Autocomplete.d.ts.map +1 -1
  400. package/dist/src/Badge.d.ts +2 -2
  401. package/dist/src/Badge.d.ts.map +1 -1
  402. package/dist/src/Banner.d.ts.map +1 -1
  403. package/dist/src/Button.d.ts +10 -6
  404. package/dist/src/Button.d.ts.map +1 -1
  405. package/dist/src/Callout.d.ts +38 -2
  406. package/dist/src/Callout.d.ts.map +1 -1
  407. package/dist/src/{Tile.d.ts → Card.d.ts} +6 -27
  408. package/dist/src/Card.d.ts.map +1 -0
  409. package/dist/src/DataTable/DataTable.d.ts +70 -50
  410. package/dist/src/DataTable/DataTable.d.ts.map +1 -1
  411. package/dist/src/DataTable/DataTableRowActions.d.ts +1 -1
  412. package/dist/src/DataTable/DataTableRowActions.d.ts.map +1 -1
  413. package/dist/src/DataTable/constants.d.ts +0 -1
  414. package/dist/src/DataTable/constants.d.ts.map +1 -1
  415. package/dist/src/DataTable/index.d.ts +2 -3
  416. package/dist/src/DataTable/index.d.ts.map +1 -1
  417. package/dist/src/DataTable/reorderDataRowsLocally.d.ts.map +1 -1
  418. package/dist/src/DataTable/useRowReordering.d.ts +3 -3
  419. package/dist/src/DataTable/useRowReordering.d.ts.map +1 -1
  420. package/dist/src/Dialog.d.ts +19 -7
  421. package/dist/src/Dialog.d.ts.map +1 -1
  422. package/dist/src/{labs/Drawer.d.ts → Drawer.d.ts} +3 -3
  423. package/dist/src/Drawer.d.ts.map +1 -0
  424. package/dist/src/EmptyState.d.ts +34 -0
  425. package/dist/src/EmptyState.d.ts.map +1 -0
  426. package/dist/src/ErrorMessageList.d.ts.map +1 -1
  427. package/dist/src/FieldError.d.ts.map +1 -1
  428. package/dist/src/HtmlProps.d.ts +1 -0
  429. package/dist/src/HtmlProps.d.ts.map +1 -1
  430. package/dist/src/MenuItem.d.ts.map +1 -1
  431. package/dist/src/OdysseyCacheProvider.d.ts +6 -2
  432. package/dist/src/OdysseyCacheProvider.d.ts.map +1 -1
  433. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  434. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  435. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  436. package/dist/src/Pagination/Pagination.d.ts +70 -0
  437. package/dist/src/Pagination/Pagination.d.ts.map +1 -0
  438. package/dist/src/Pagination/constants.d.ts +13 -0
  439. package/dist/src/Pagination/constants.d.ts.map +1 -0
  440. package/dist/src/Pagination/index.d.ts +15 -0
  441. package/dist/src/Pagination/index.d.ts.map +1 -0
  442. package/dist/src/Pagination/usePagination.d.ts +23 -0
  443. package/dist/src/Pagination/usePagination.d.ts.map +1 -0
  444. package/dist/src/Radio.d.ts +2 -2
  445. package/dist/src/Radio.d.ts.map +1 -1
  446. package/dist/src/ScreenReaderText.d.ts +3 -2
  447. package/dist/src/ScreenReaderText.d.ts.map +1 -1
  448. package/dist/src/Select.d.ts.map +1 -1
  449. package/dist/src/Status.d.ts +7 -2
  450. package/dist/src/Status.d.ts.map +1 -1
  451. package/dist/src/{labs/DatePicker.types.d.ts → Surface.d.ts} +7 -8
  452. package/dist/src/Surface.d.ts.map +1 -0
  453. package/dist/src/Tabs.d.ts +22 -0
  454. package/dist/src/Tabs.d.ts.map +1 -1
  455. package/dist/src/TextField.d.ts +48 -0
  456. package/dist/src/TextField.d.ts.map +1 -1
  457. package/dist/src/Toast.d.ts.map +1 -1
  458. package/dist/src/icons.generated/Add.d.ts +1 -1
  459. package/dist/src/icons.generated/AddCircle.d.ts +1 -1
  460. package/dist/src/icons.generated/Apps.d.ts +1 -1
  461. package/dist/src/icons.generated/ArrowBottom.d.ts +1 -1
  462. package/dist/src/icons.generated/ArrowDown.d.ts +1 -1
  463. package/dist/src/icons.generated/ArrowLeft.d.ts +1 -1
  464. package/dist/src/icons.generated/ArrowLowerLeft.d.ts +1 -1
  465. package/dist/src/icons.generated/ArrowLowerRight.d.ts +1 -1
  466. package/dist/src/icons.generated/ArrowRight.d.ts +1 -1
  467. package/dist/src/icons.generated/ArrowTop.d.ts +1 -1
  468. package/dist/src/icons.generated/ArrowUnsorted.d.ts +1 -1
  469. package/dist/src/icons.generated/ArrowUp.d.ts +1 -1
  470. package/dist/src/icons.generated/ArrowUpperLeft.d.ts +1 -1
  471. package/dist/src/icons.generated/ArrowUpperRight.d.ts +1 -1
  472. package/dist/src/icons.generated/Bug.d.ts +1 -1
  473. package/dist/src/icons.generated/Calendar.d.ts +1 -1
  474. package/dist/src/icons.generated/Call.d.ts +1 -1
  475. package/dist/src/icons.generated/Chat.d.ts +1 -1
  476. package/dist/src/icons.generated/Check.d.ts +1 -1
  477. package/dist/src/icons.generated/CheckCircleFilled.d.ts +1 -1
  478. package/dist/src/icons.generated/ChevronDown.d.ts +1 -1
  479. package/dist/src/icons.generated/ChevronLeft.d.ts +1 -1
  480. package/dist/src/icons.generated/ChevronRight.d.ts +1 -1
  481. package/dist/src/icons.generated/ChevronUp.d.ts +1 -1
  482. package/dist/src/icons.generated/Clock.d.ts +1 -1
  483. package/dist/src/icons.generated/Close.d.ts +1 -1
  484. package/dist/src/icons.generated/CloseCircleFilled.d.ts +1 -1
  485. package/dist/src/icons.generated/CollapseLeft.d.ts +1 -1
  486. package/dist/src/icons.generated/CollapseRight.d.ts +1 -1
  487. package/dist/src/icons.generated/Copy.d.ts +1 -1
  488. package/dist/src/icons.generated/Custom.d.ts +16 -0
  489. package/dist/src/icons.generated/Custom.d.ts.map +1 -0
  490. package/dist/src/icons.generated/DangerDiamond.d.ts +1 -1
  491. package/dist/src/icons.generated/DangerDiamondFilled.d.ts +1 -1
  492. package/dist/src/icons.generated/Delete.d.ts +1 -1
  493. package/dist/src/icons.generated/Deny.d.ts +1 -1
  494. package/dist/src/icons.generated/Devices.d.ts +1 -1
  495. package/dist/src/icons.generated/Directory.d.ts +1 -1
  496. package/dist/src/icons.generated/Documentation.d.ts +1 -1
  497. package/dist/src/icons.generated/Download.d.ts +1 -1
  498. package/dist/src/icons.generated/DragIndicator.d.ts +1 -1
  499. package/dist/src/icons.generated/Duo.d.ts +16 -0
  500. package/dist/src/icons.generated/Duo.d.ts.map +1 -0
  501. package/dist/src/icons.generated/Edit.d.ts +1 -1
  502. package/dist/src/icons.generated/Email.d.ts +16 -0
  503. package/dist/src/icons.generated/Email.d.ts.map +1 -0
  504. package/dist/src/icons.generated/ExpandLeft.d.ts +1 -1
  505. package/dist/src/icons.generated/ExpandRight.d.ts +1 -1
  506. package/dist/src/icons.generated/ExternalLink.d.ts +1 -1
  507. package/dist/src/icons.generated/Fido2.d.ts +16 -0
  508. package/dist/src/icons.generated/Fido2.d.ts.map +1 -0
  509. package/dist/src/icons.generated/Filter.d.ts +1 -1
  510. package/dist/src/icons.generated/Folder.d.ts +1 -1
  511. package/dist/src/icons.generated/Globe.d.ts +1 -1
  512. package/dist/src/icons.generated/GoogleAuth.d.ts +16 -0
  513. package/dist/src/icons.generated/GoogleAuth.d.ts.map +1 -0
  514. package/dist/src/icons.generated/Grid.d.ts +1 -1
  515. package/dist/src/icons.generated/Group.d.ts +1 -1
  516. package/dist/src/icons.generated/Hide.d.ts +1 -1
  517. package/dist/src/icons.generated/Home.d.ts +1 -1
  518. package/dist/src/icons.generated/Idp.d.ts +16 -0
  519. package/dist/src/icons.generated/Idp.d.ts.map +1 -0
  520. package/dist/src/icons.generated/InformationCircle.d.ts +1 -1
  521. package/dist/src/icons.generated/InformationCircleFilled.d.ts +1 -1
  522. package/dist/src/icons.generated/Link.d.ts +1 -1
  523. package/dist/src/icons.generated/List.d.ts +1 -1
  524. package/dist/src/icons.generated/Lock.d.ts +1 -1
  525. package/dist/src/icons.generated/More.d.ts +1 -1
  526. package/dist/src/icons.generated/Notification.d.ts +1 -1
  527. package/dist/src/icons.generated/OktaVerify.d.ts +16 -0
  528. package/dist/src/icons.generated/OktaVerify.d.ts.map +1 -0
  529. package/dist/src/icons.generated/OnPremMfa.d.ts +16 -0
  530. package/dist/src/icons.generated/OnPremMfa.d.ts.map +1 -0
  531. package/dist/src/icons.generated/OneTimePassword.d.ts +16 -0
  532. package/dist/src/icons.generated/OneTimePassword.d.ts.map +1 -0
  533. package/dist/src/icons.generated/Password.d.ts +16 -0
  534. package/dist/src/icons.generated/Password.d.ts.map +1 -0
  535. package/dist/src/icons.generated/Pause.d.ts +1 -1
  536. package/dist/src/icons.generated/QuestionCircle.d.ts +1 -1
  537. package/dist/src/icons.generated/QuestionCircleFilled.d.ts +1 -1
  538. package/dist/src/icons.generated/Refresh.d.ts +1 -1
  539. package/dist/src/icons.generated/Reset.d.ts +1 -1
  540. package/dist/src/icons.generated/Resume.d.ts +1 -1
  541. package/dist/src/icons.generated/Search.d.ts +1 -1
  542. package/dist/src/icons.generated/SecurityQuestion.d.ts +16 -0
  543. package/dist/src/icons.generated/SecurityQuestion.d.ts.map +1 -0
  544. package/dist/src/icons.generated/Server.d.ts +1 -1
  545. package/dist/src/icons.generated/Settings.d.ts +1 -1
  546. package/dist/src/icons.generated/Show.d.ts +1 -1
  547. package/dist/src/icons.generated/SmartCard.d.ts +16 -0
  548. package/dist/src/icons.generated/SmartCard.d.ts.map +1 -0
  549. package/dist/src/icons.generated/Sms.d.ts +16 -0
  550. package/dist/src/icons.generated/Sms.d.ts.map +1 -0
  551. package/dist/src/icons.generated/Subtract.d.ts +1 -1
  552. package/dist/src/icons.generated/SymantecVip.d.ts +16 -0
  553. package/dist/src/icons.generated/SymantecVip.d.ts.map +1 -0
  554. package/dist/src/icons.generated/Sync.d.ts +1 -1
  555. package/dist/src/icons.generated/ThumbsDown.d.ts +16 -0
  556. package/dist/src/icons.generated/ThumbsDown.d.ts.map +1 -0
  557. package/dist/src/icons.generated/ThumbsUp.d.ts +16 -0
  558. package/dist/src/icons.generated/ThumbsUp.d.ts.map +1 -0
  559. package/dist/src/icons.generated/Unlock.d.ts +1 -1
  560. package/dist/src/icons.generated/Upload.d.ts +1 -1
  561. package/dist/src/icons.generated/User.d.ts +1 -1
  562. package/dist/src/icons.generated/Video.d.ts +1 -1
  563. package/dist/src/icons.generated/VoiceCall.d.ts +16 -0
  564. package/dist/src/icons.generated/VoiceCall.d.ts.map +1 -0
  565. package/dist/src/icons.generated/Warning.d.ts +1 -1
  566. package/dist/src/icons.generated/WarningFilled.d.ts +1 -1
  567. package/dist/src/icons.generated/Yubikey.d.ts +16 -0
  568. package/dist/src/icons.generated/Yubikey.d.ts.map +1 -0
  569. package/dist/src/icons.generated/index.d.ts +18 -0
  570. package/dist/src/icons.generated/index.d.ts.map +1 -1
  571. package/dist/src/index.d.ts +7 -2
  572. package/dist/src/index.d.ts.map +1 -1
  573. package/dist/src/inputUtils.d.ts.map +1 -1
  574. package/dist/src/labs/DataComponents/BulkActionsMenu.d.ts +23 -0
  575. package/dist/src/labs/DataComponents/BulkActionsMenu.d.ts.map +1 -0
  576. package/dist/src/labs/DataComponents/DataStack.d.ts +21 -0
  577. package/dist/src/labs/DataComponents/DataStack.d.ts.map +1 -0
  578. package/dist/src/labs/DataComponents/DataTable.d.ts +17 -0
  579. package/dist/src/labs/DataComponents/DataTable.d.ts.map +1 -0
  580. package/dist/src/labs/DataComponents/DataView.d.ts +17 -0
  581. package/dist/src/labs/DataComponents/DataView.d.ts.map +1 -0
  582. package/dist/src/labs/DataComponents/DetailPanel.d.ts +20 -0
  583. package/dist/src/labs/DataComponents/DetailPanel.d.ts.map +1 -0
  584. package/dist/src/labs/DataComponents/LayoutSwitcher.d.ts +21 -0
  585. package/dist/src/labs/DataComponents/LayoutSwitcher.d.ts.map +1 -0
  586. package/dist/src/labs/DataComponents/RowActions.d.ts +31 -0
  587. package/dist/src/labs/DataComponents/RowActions.d.ts.map +1 -0
  588. package/dist/src/labs/DataComponents/StackCard.d.ts +36 -0
  589. package/dist/src/labs/DataComponents/StackCard.d.ts.map +1 -0
  590. package/dist/src/labs/DataComponents/StackContent.d.ts +64 -0
  591. package/dist/src/labs/DataComponents/StackContent.d.ts.map +1 -0
  592. package/dist/src/labs/DataComponents/TableContent.d.ts +66 -0
  593. package/dist/src/labs/DataComponents/TableContent.d.ts.map +1 -0
  594. package/dist/src/labs/DataComponents/TableSettings.d.ts +21 -0
  595. package/dist/src/labs/DataComponents/TableSettings.d.ts.map +1 -0
  596. package/dist/src/labs/DataComponents/componentTypes.d.ts +81 -0
  597. package/dist/src/labs/DataComponents/componentTypes.d.ts.map +1 -0
  598. package/dist/src/labs/DataComponents/constants.d.ts +16 -0
  599. package/dist/src/labs/DataComponents/constants.d.ts.map +1 -0
  600. package/dist/src/labs/DataComponents/dataTypes.d.ts +52 -0
  601. package/dist/src/labs/DataComponents/dataTypes.d.ts.map +1 -0
  602. package/dist/src/labs/DataComponents/fetchData.d.ts +26 -0
  603. package/dist/src/labs/DataComponents/fetchData.d.ts.map +1 -0
  604. package/dist/src/labs/DataComponents/index.d.ts +18 -0
  605. package/dist/src/labs/DataComponents/index.d.ts.map +1 -0
  606. package/dist/src/labs/DataComponents/tableConstants.d.ts +100 -0
  607. package/dist/src/labs/DataComponents/tableConstants.d.ts.map +1 -0
  608. package/dist/src/labs/DataComponents/useFilterConversion.d.ts +20 -0
  609. package/dist/src/labs/DataComponents/useFilterConversion.d.ts.map +1 -0
  610. package/dist/src/labs/DataFilters.d.ts +14 -7
  611. package/dist/src/labs/DataFilters.d.ts.map +1 -1
  612. package/dist/src/labs/DateField.d.ts +23 -0
  613. package/dist/src/labs/DateField.d.ts.map +1 -0
  614. package/dist/src/labs/DatePicker.d.ts +31 -8
  615. package/dist/src/labs/DatePicker.d.ts.map +1 -1
  616. package/dist/src/labs/FileUpload.d.ts +2 -2
  617. package/dist/src/labs/FileUpload.d.ts.map +1 -1
  618. package/dist/src/labs/FileUploadPreview.d.ts.map +1 -1
  619. package/dist/src/labs/GroupPicker.d.ts.map +1 -1
  620. package/dist/src/labs/Layout.d.ts +28 -0
  621. package/dist/src/labs/Layout.d.ts.map +1 -0
  622. package/dist/src/labs/NavAccordion.d.ts +52 -0
  623. package/dist/src/labs/NavAccordion.d.ts.map +1 -0
  624. package/dist/src/labs/PageTemplate.d.ts +57 -0
  625. package/dist/src/labs/PageTemplate.d.ts.map +1 -0
  626. package/dist/src/labs/PaginatedTable.d.ts.map +1 -1
  627. package/dist/src/labs/SideNav.d.ts +120 -0
  628. package/dist/src/labs/SideNav.d.ts.map +1 -0
  629. package/dist/src/labs/StaticTable.d.ts.map +1 -1
  630. package/dist/src/labs/Switch.d.ts +3 -7
  631. package/dist/src/labs/Switch.d.ts.map +1 -1
  632. package/dist/src/labs/datePickerTheme.d.ts.map +1 -1
  633. package/dist/src/labs/index.d.ts +5 -1
  634. package/dist/src/labs/index.d.ts.map +1 -1
  635. package/dist/src/labs/useDatePickerTranslations.d.ts +15 -0
  636. package/dist/src/labs/useDatePickerTranslations.d.ts.map +1 -0
  637. package/dist/src/properties/ts/odyssey-react-mui.d.ts +66 -8
  638. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  639. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +77 -2
  640. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  641. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +77 -2
  642. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  643. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +77 -2
  644. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  645. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +77 -2
  646. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  647. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +77 -2
  648. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  649. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +77 -2
  650. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  651. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +77 -2
  652. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  653. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +98 -0
  654. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -0
  655. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +77 -2
  656. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  657. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +77 -2
  658. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  659. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +77 -2
  660. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  661. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +77 -2
  662. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  663. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +77 -2
  664. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  665. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +77 -2
  666. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  667. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +77 -2
  668. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  669. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +77 -2
  670. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  671. package/dist/src/properties/ts/odyssey-react-mui_ok_PL.d.ts +33 -2
  672. package/dist/src/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  673. package/dist/src/properties/ts/odyssey-react-mui_ok_SK.d.ts +33 -2
  674. package/dist/src/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  675. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +77 -2
  676. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  677. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +77 -2
  678. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  679. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +77 -2
  680. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  681. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +77 -2
  682. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  683. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +77 -2
  684. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  685. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +77 -2
  686. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  687. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +77 -2
  688. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  689. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +77 -2
  690. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  691. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +77 -2
  692. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  693. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +77 -2
  694. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  695. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +77 -2
  696. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  697. package/dist/src/remUtils.d.ts +24 -0
  698. package/dist/src/remUtils.d.ts.map +1 -0
  699. package/dist/src/test-selectors/featureTestSelector.d.ts +31 -0
  700. package/dist/src/test-selectors/featureTestSelector.d.ts.map +1 -0
  701. package/dist/src/test-selectors/index.d.ts +15 -0
  702. package/dist/src/test-selectors/index.d.ts.map +1 -0
  703. package/dist/src/test-selectors/odysseyTestSelectors.d.ts +120 -0
  704. package/dist/src/test-selectors/odysseyTestSelectors.d.ts.map +1 -0
  705. package/dist/src/test-selectors/querySelector.d.ts +3632 -0
  706. package/dist/src/test-selectors/querySelector.d.ts.map +1 -0
  707. package/dist/src/theme/components.d.ts +1 -1
  708. package/dist/src/theme/components.d.ts.map +1 -1
  709. package/dist/src/theme/components.types.d.ts +5 -3
  710. package/dist/src/theme/components.types.d.ts.map +1 -1
  711. package/dist/src/theme/createOdysseyMuiTheme.d.ts +1 -1
  712. package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  713. package/dist/src/theme/mixins.d.ts.map +1 -1
  714. package/dist/src/theme/palette.d.ts.map +1 -1
  715. package/dist/src/theme/shape.d.ts.map +1 -1
  716. package/dist/src/theme/spacing.d.ts.map +1 -1
  717. package/dist/src/theme/typography.d.ts.map +1 -1
  718. package/dist/test-selectors/featureTestSelector.js +2 -0
  719. package/dist/test-selectors/featureTestSelector.js.map +1 -0
  720. package/dist/test-selectors/index.js +15 -0
  721. package/dist/test-selectors/index.js.map +1 -0
  722. package/dist/test-selectors/odysseyTestSelectors.js +20 -0
  723. package/dist/test-selectors/odysseyTestSelectors.js.map +1 -0
  724. package/dist/test-selectors/querySelector.js +78 -0
  725. package/dist/test-selectors/querySelector.js.map +1 -0
  726. package/dist/test-selectors/testSelectors.json +1 -0
  727. package/dist/theme/components.js +261 -181
  728. package/dist/theme/components.js.map +1 -1
  729. package/dist/theme/components.types.js.map +1 -1
  730. package/dist/tsconfig.production.tsbuildinfo +1 -1
  731. package/dist/tsconfig.tsbuildinfo +1 -0
  732. package/i18n.config.json +3 -1
  733. package/package.json +13 -5
  734. package/scripts/generateTestSelectorsJson.ts +28 -0
  735. package/src/Accordion.tsx +3 -0
  736. package/src/Autocomplete.tsx +13 -0
  737. package/src/Badge.tsx +4 -3
  738. package/src/Banner.tsx +4 -4
  739. package/src/Button.tsx +30 -16
  740. package/src/Callout.tsx +59 -12
  741. package/src/{Tile.tsx → Card.tsx} +63 -57
  742. package/src/DataTable/DataTable.tsx +195 -108
  743. package/src/DataTable/DataTableRowActions.tsx +1 -1
  744. package/src/DataTable/constants.ts +0 -1
  745. package/src/DataTable/index.tsx +2 -2
  746. package/src/Dialog.tsx +38 -13
  747. package/src/{labs/Drawer.tsx → Drawer.tsx} +10 -9
  748. package/src/{DataTable/DataTableEmptyState.tsx → EmptyState.tsx} +34 -19
  749. package/src/ErrorMessageList.tsx +6 -1
  750. package/src/FieldError.tsx +10 -5
  751. package/src/HtmlProps.ts +1 -0
  752. package/src/MenuItem.tsx +1 -0
  753. package/src/OdysseyCacheProvider.tsx +11 -3
  754. package/src/OdysseyProvider.tsx +1 -1
  755. package/src/OdysseyTranslationProvider.tsx +1 -17
  756. package/src/{DataTable/DataTablePagination.tsx → Pagination/Pagination.tsx} +107 -74
  757. package/src/Pagination/constants.ts +13 -0
  758. package/src/Pagination/index.ts +15 -0
  759. package/src/Pagination/usePagination.ts +49 -0
  760. package/src/Radio.tsx +18 -6
  761. package/src/ScreenReaderText.tsx +15 -3
  762. package/src/Select.tsx +84 -92
  763. package/src/Status.tsx +14 -2
  764. package/src/Surface.tsx +48 -0
  765. package/src/Tabs.tsx +24 -0
  766. package/src/TextField.tsx +50 -0
  767. package/src/Toast.tsx +44 -40
  768. package/src/icons.generated/Add.tsx +1 -1
  769. package/src/icons.generated/AddCircle.tsx +1 -1
  770. package/src/icons.generated/Apps.tsx +1 -1
  771. package/src/icons.generated/ArrowBottom.tsx +2 -2
  772. package/src/icons.generated/ArrowDown.tsx +1 -1
  773. package/src/icons.generated/ArrowLeft.tsx +1 -1
  774. package/src/icons.generated/ArrowLowerLeft.tsx +1 -1
  775. package/src/icons.generated/ArrowLowerRight.tsx +1 -1
  776. package/src/icons.generated/ArrowRight.tsx +1 -1
  777. package/src/icons.generated/ArrowTop.tsx +2 -2
  778. package/src/icons.generated/ArrowUnsorted.tsx +1 -1
  779. package/src/icons.generated/ArrowUp.tsx +1 -1
  780. package/src/icons.generated/ArrowUpperLeft.tsx +1 -1
  781. package/src/icons.generated/ArrowUpperRight.tsx +1 -1
  782. package/src/icons.generated/Bug.tsx +1 -1
  783. package/src/icons.generated/Calendar.tsx +1 -1
  784. package/src/icons.generated/Call.tsx +1 -1
  785. package/src/icons.generated/Chat.tsx +1 -1
  786. package/src/icons.generated/Check.tsx +1 -1
  787. package/src/icons.generated/CheckCircleFilled.tsx +1 -1
  788. package/src/icons.generated/ChevronDown.tsx +1 -1
  789. package/src/icons.generated/ChevronLeft.tsx +1 -1
  790. package/src/icons.generated/ChevronRight.tsx +1 -1
  791. package/src/icons.generated/ChevronUp.tsx +1 -1
  792. package/src/icons.generated/Clock.tsx +1 -1
  793. package/src/icons.generated/Close.tsx +1 -1
  794. package/src/icons.generated/CloseCircleFilled.tsx +1 -1
  795. package/src/icons.generated/CollapseLeft.tsx +1 -1
  796. package/src/icons.generated/CollapseRight.tsx +1 -1
  797. package/src/icons.generated/Copy.tsx +1 -1
  798. package/src/icons.generated/Custom.tsx +49 -0
  799. package/src/icons.generated/DangerDiamond.tsx +1 -1
  800. package/src/icons.generated/DangerDiamondFilled.tsx +1 -1
  801. package/src/icons.generated/Delete.tsx +1 -1
  802. package/src/icons.generated/Deny.tsx +1 -1
  803. package/src/icons.generated/Devices.tsx +1 -1
  804. package/src/icons.generated/Directory.tsx +1 -1
  805. package/src/icons.generated/Documentation.tsx +1 -1
  806. package/src/icons.generated/Download.tsx +1 -1
  807. package/src/icons.generated/DragIndicator.tsx +1 -1
  808. package/src/icons.generated/Duo.tsx +59 -0
  809. package/src/icons.generated/Edit.tsx +1 -1
  810. package/src/icons.generated/Email.tsx +48 -0
  811. package/src/icons.generated/ExpandLeft.tsx +1 -1
  812. package/src/icons.generated/ExpandRight.tsx +1 -1
  813. package/src/icons.generated/ExternalLink.tsx +1 -1
  814. package/src/icons.generated/Fido2.tsx +71 -0
  815. package/src/icons.generated/Filter.tsx +1 -1
  816. package/src/icons.generated/Folder.tsx +1 -1
  817. package/src/icons.generated/Globe.tsx +1 -1
  818. package/src/icons.generated/GoogleAuth.tsx +67 -0
  819. package/src/icons.generated/Grid.tsx +1 -1
  820. package/src/icons.generated/Group.tsx +1 -1
  821. package/src/icons.generated/Hide.tsx +1 -1
  822. package/src/icons.generated/Home.tsx +1 -1
  823. package/src/icons.generated/Idp.tsx +51 -0
  824. package/src/icons.generated/InformationCircle.tsx +1 -1
  825. package/src/icons.generated/InformationCircleFilled.tsx +1 -1
  826. package/src/icons.generated/Link.tsx +1 -1
  827. package/src/icons.generated/List.tsx +1 -1
  828. package/src/icons.generated/Lock.tsx +1 -1
  829. package/src/icons.generated/More.tsx +1 -1
  830. package/src/icons.generated/Notification.tsx +1 -1
  831. package/src/icons.generated/OktaVerify.tsx +43 -0
  832. package/src/icons.generated/OnPremMfa.tsx +49 -0
  833. package/src/icons.generated/OneTimePassword.tsx +63 -0
  834. package/src/icons.generated/Password.tsx +77 -0
  835. package/src/icons.generated/Pause.tsx +1 -1
  836. package/src/icons.generated/QuestionCircle.tsx +1 -1
  837. package/src/icons.generated/QuestionCircleFilled.tsx +1 -1
  838. package/src/icons.generated/Refresh.tsx +1 -1
  839. package/src/icons.generated/Reset.tsx +1 -1
  840. package/src/icons.generated/Resume.tsx +1 -1
  841. package/src/icons.generated/Search.tsx +1 -1
  842. package/src/icons.generated/SecurityQuestion.tsx +48 -0
  843. package/src/icons.generated/Server.tsx +1 -1
  844. package/src/icons.generated/Settings.tsx +1 -1
  845. package/src/icons.generated/Show.tsx +1 -1
  846. package/src/icons.generated/SmartCard.tsx +62 -0
  847. package/src/icons.generated/Sms.tsx +52 -0
  848. package/src/icons.generated/Subtract.tsx +1 -1
  849. package/src/icons.generated/SymantecVip.tsx +49 -0
  850. package/src/icons.generated/Sync.tsx +1 -1
  851. package/src/icons.generated/ThumbsDown.tsx +43 -0
  852. package/src/icons.generated/ThumbsUp.tsx +43 -0
  853. package/src/icons.generated/Unlock.tsx +1 -1
  854. package/src/icons.generated/Upload.tsx +1 -1
  855. package/src/icons.generated/User.tsx +1 -1
  856. package/src/icons.generated/Video.tsx +1 -1
  857. package/src/icons.generated/VoiceCall.tsx +59 -0
  858. package/src/icons.generated/Warning.tsx +1 -1
  859. package/src/icons.generated/WarningFilled.tsx +1 -1
  860. package/src/icons.generated/Yubikey.tsx +41 -0
  861. package/src/icons.generated/index.ts +18 -0
  862. package/src/index.ts +7 -2
  863. package/src/labs/DataComponents/BulkActionsMenu.tsx +97 -0
  864. package/src/labs/DataComponents/DataStack.tsx +99 -0
  865. package/src/labs/DataComponents/DataTable.tsx +111 -0
  866. package/src/labs/DataComponents/DataView.tsx +394 -0
  867. package/src/labs/DataComponents/DetailPanel.tsx +31 -0
  868. package/src/labs/DataComponents/LayoutSwitcher.tsx +73 -0
  869. package/src/labs/DataComponents/RowActions.tsx +122 -0
  870. package/src/labs/DataComponents/StackCard.tsx +256 -0
  871. package/src/labs/DataComponents/StackContent.tsx +254 -0
  872. package/src/labs/DataComponents/TableContent.tsx +390 -0
  873. package/src/labs/DataComponents/TableSettings.tsx +138 -0
  874. package/src/labs/DataComponents/componentTypes.ts +111 -0
  875. package/src/labs/DataComponents/constants.tsx +20 -0
  876. package/src/labs/DataComponents/dataTypes.ts +77 -0
  877. package/src/labs/DataComponents/fetchData.ts +47 -0
  878. package/src/labs/DataComponents/index.tsx +19 -0
  879. package/src/labs/DataComponents/tableConstants.tsx +162 -0
  880. package/src/labs/DataComponents/useFilterConversion.ts +92 -0
  881. package/src/labs/DataFilters.tsx +250 -162
  882. package/src/labs/DateField.tsx +119 -0
  883. package/src/labs/DatePicker.tsx +304 -31
  884. package/src/labs/{DatePicker.types.ts → DatePicker.types.d.ts} +0 -10
  885. package/src/labs/FileUpload.tsx +30 -21
  886. package/src/labs/FileUploadIllustration.tsx +1 -1
  887. package/src/labs/FileUploadPreview.tsx +1 -0
  888. package/src/labs/Layout.tsx +85 -0
  889. package/src/labs/NavAccordion.tsx +133 -0
  890. package/src/labs/PageTemplate.tsx +225 -0
  891. package/src/labs/SideNav.tsx +745 -0
  892. package/src/labs/Switch.tsx +240 -119
  893. package/src/labs/datePickerTheme.tsx +119 -83
  894. package/src/labs/index.ts +7 -1
  895. package/src/labs/useDatePickerTranslations.ts +92 -0
  896. package/src/properties/odyssey-react-mui.properties +76 -10
  897. package/src/properties/translations/odyssey-react-mui_cs.properties +92 -2
  898. package/src/properties/translations/odyssey-react-mui_da.properties +92 -2
  899. package/src/properties/translations/odyssey-react-mui_de.properties +92 -2
  900. package/src/properties/translations/odyssey-react-mui_el.properties +92 -2
  901. package/src/properties/translations/odyssey-react-mui_es.properties +92 -2
  902. package/src/properties/translations/odyssey-react-mui_fi.properties +92 -2
  903. package/src/properties/translations/odyssey-react-mui_fr.properties +92 -2
  904. package/src/properties/translations/odyssey-react-mui_ht.properties +112 -0
  905. package/src/properties/translations/odyssey-react-mui_hu.properties +92 -2
  906. package/src/properties/translations/odyssey-react-mui_id.properties +92 -2
  907. package/src/properties/translations/odyssey-react-mui_it.properties +92 -2
  908. package/src/properties/translations/odyssey-react-mui_ja.properties +92 -2
  909. package/src/properties/translations/odyssey-react-mui_ko.properties +92 -2
  910. package/src/properties/translations/odyssey-react-mui_ms.properties +92 -2
  911. package/src/properties/translations/odyssey-react-mui_nb.properties +92 -2
  912. package/src/properties/translations/odyssey-react-mui_nl_NL.properties +92 -2
  913. package/src/properties/translations/odyssey-react-mui_ok_PL.properties +33 -2
  914. package/src/properties/translations/odyssey-react-mui_ok_SK.properties +33 -2
  915. package/src/properties/translations/odyssey-react-mui_pl.properties +92 -2
  916. package/src/properties/translations/odyssey-react-mui_pt_BR.properties +92 -2
  917. package/src/properties/translations/odyssey-react-mui_ro.properties +92 -2
  918. package/src/properties/translations/odyssey-react-mui_ru.properties +92 -2
  919. package/src/properties/translations/odyssey-react-mui_sv.properties +92 -2
  920. package/src/properties/translations/odyssey-react-mui_th.properties +92 -2
  921. package/src/properties/translations/odyssey-react-mui_tr.properties +92 -2
  922. package/src/properties/translations/odyssey-react-mui_uk.properties +92 -2
  923. package/src/properties/translations/odyssey-react-mui_vi.properties +92 -2
  924. package/src/properties/translations/odyssey-react-mui_zh_CN.properties +92 -2
  925. package/src/properties/translations/odyssey-react-mui_zh_TW.properties +92 -2
  926. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  927. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
  928. package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
  929. package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
  930. package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
  931. package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
  932. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
  933. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
  934. package/src/properties/ts/odyssey-react-mui_ht.ts +1 -0
  935. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
  936. package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
  937. package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
  938. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
  939. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
  940. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
  941. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
  942. package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
  943. package/src/properties/ts/odyssey-react-mui_ok_PL.ts +1 -1
  944. package/src/properties/ts/odyssey-react-mui_ok_SK.ts +1 -1
  945. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
  946. package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
  947. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
  948. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
  949. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
  950. package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
  951. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
  952. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
  953. package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
  954. package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
  955. package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
  956. package/src/remUtils.ts +27 -0
  957. package/src/test-selectors/featureTestSelector.ts +41 -0
  958. package/src/test-selectors/index.ts +15 -0
  959. package/src/test-selectors/odysseyTestSelectors.ts +22 -0
  960. package/src/test-selectors/querySelector.ts +198 -0
  961. package/src/theme/components.tsx +285 -192
  962. package/src/theme/components.types.ts +5 -3
  963. package/dist/DataTable/DataTableEmptyState.js.map +0 -1
  964. package/dist/DataTable/DataTablePagination.js.map +0 -1
  965. package/dist/Tile.js.map +0 -1
  966. package/dist/labs/DatePicker.types.js.map +0 -1
  967. package/dist/labs/Drawer.js.map +0 -1
  968. package/dist/src/DataTable/DataTableEmptyState.d.ts.map +0 -1
  969. package/dist/src/DataTable/DataTablePagination.d.ts +0 -33
  970. package/dist/src/DataTable/DataTablePagination.d.ts.map +0 -1
  971. package/dist/src/Tile.d.ts.map +0 -1
  972. package/dist/src/labs/DatePicker.types.d.ts.map +0 -1
  973. package/dist/src/labs/Drawer.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,45 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.19.0](https://github.com/okta/odyssey/compare/v1.18.0...v1.19.0) (2024-07-15)
7
+
8
+ ### Features
9
+
10
+ - adds new side navigation component for unified nav design ([#2269](https://github.com/okta/odyssey/issues/2269)) ([e54a470](https://github.com/okta/odyssey/commit/e54a470aaa71eec4fd85f19ac8519425f1d64e8f))
11
+
12
+ ## [1.18.0](https://github.com/okta/odyssey/compare/v1.15.9...v1.18.0) (2024-06-26)
13
+
14
+ ### Features
15
+
16
+ - add backwards compatible empty state export ([#2266](https://github.com/okta/odyssey/issues/2266)) ([0fe3203](https://github.com/okta/odyssey/commit/0fe3203629dc85f7c91c58e3ff078c9a89360407))
17
+ - add initial search prop to DataTable ([#2265](https://github.com/okta/odyssey/issues/2265)) ([5829534](https://github.com/okta/odyssey/commit/582953472b9a4e9946a57c852b78cd890a6ab674))
18
+ - EmptyState component ([#2175](https://github.com/okta/odyssey/issues/2175)) ([8c86845](https://github.com/okta/odyssey/commit/8c868450b6e1b8c63775afe1f38219507e9bacc7))
19
+ - move Pagination to its own component ([#2166](https://github.com/okta/odyssey/issues/2166)) ([61eda40](https://github.com/okta/odyssey/commit/61eda40aaf1a5dc5477799694594ea5625715fe0))
20
+ - Test Selectors ([#2209](https://github.com/okta/odyssey/issues/2209)) ([dfa8451](https://github.com/okta/odyssey/commit/dfa8451d0cb6ed63cbd3ac1ce740203b638348f7))
21
+
22
+ ### Bug Fixes
23
+
24
+ - add changes back, remove required label ([cccce45](https://github.com/okta/odyssey/commit/cccce454c33588369786b2dc8cc6e39bbace4678))
25
+ - add comment ([9af7d11](https://github.com/okta/odyssey/commit/9af7d11f2964fa1b17be673c4e84a0bbb1a47ab9))
26
+ - add floating action button variant ([a32110d](https://github.com/okta/odyssey/commit/a32110d5aa71efd7fcbf3f1606eae613a639c721))
27
+ - add hint text to Radio and RadioGroup ([6518de5](https://github.com/okta/odyssey/commit/6518de5b38e54ec6aa3146a310c7c02a3b7d8a4e))
28
+ - add optional href prop to button ([f46123b](https://github.com/okta/odyssey/commit/f46123b538947aa0040b29832dafaf6df9da332e))
29
+ - add secondary danger button variant ([170e6e0](https://github.com/okta/odyssey/commit/170e6e03476d3a7fdef9bdca9f94a8d7e0d6f00a))
30
+ - alphabetize props ([988bd74](https://github.com/okta/odyssey/commit/988bd74e98794f2f48589e6be3e37f608f87a07a))
31
+ - alphabetize props in imports ([ca56f0a](https://github.com/okta/odyssey/commit/ca56f0a3ad5b3a4902bf38111bc6c229ad1533f6))
32
+ - bump version to 1.17 ([0e32aba](https://github.com/okta/odyssey/commit/0e32aba973ef00d5a872dbd408a84fb54c8a7408))
33
+ - make return implicit in label ([e2a26df](https://github.com/okta/odyssey/commit/e2a26df5082bfb5e7573c83a9ab53b364941713b))
34
+ - move Drawer from labs to Odyssey OKTA-700393 ([247b30a](https://github.com/okta/odyssey/commit/247b30af6e598119b78d97c971f490c48cd1dfca))
35
+ - prevent mixing old and new button props ([7aed65b](https://github.com/okta/odyssey/commit/7aed65be175c12525c9aee5fca18af0251dd2fec))
36
+ - re-add support for "callToAction" button usage ([0eb6ec7](https://github.com/okta/odyssey/commit/0eb6ec704ba6a0a9da12dcd6d864a6d1d1421915))
37
+ - rename new variant ([28466a4](https://github.com/okta/odyssey/commit/28466a46c8a254f543f595d2abf26115eff7b66b))
38
+ - resolve eslint error ([6be8bd0](https://github.com/okta/odyssey/commit/6be8bd0ca6f333949d80cbe59e28fac48528388b))
39
+ - revert type change ([9d9e16b](https://github.com/okta/odyssey/commit/9d9e16b83cc3047b7dd6c5eb7e8027b2dd0898cb))
40
+
41
+ ## [1.15.9](https://github.com/okta/odyssey/compare/v1.15.8...v1.15.9) (2024-03-26)
42
+
43
+ **Note:** Version bump only for package @okta/odyssey-react-mui
44
+
6
45
  ## [1.15.8](https://github.com/okta/odyssey/compare/v1.15.7...v1.15.8) (2024-03-22)
7
46
 
8
47
  **Note:** Version bump only for package @okta/odyssey-react-mui
package/README.md CHANGED
@@ -132,6 +132,10 @@ bundled, and polyfilled for advanced use cases and browser support targets.
132
132
 
133
133
  [1]: https://help.okta.com/en/prod/Content/Topics/Miscellaneous/Platforms_Browser_OS_Support.htm
134
134
 
135
+ ## Running odyssey-react-mui for local development
136
+
137
+ Follow these steps for local [Odyssey development](https://odyssey-storybook.okta.design/?path=/docs/contributing-odyssey-development--docs)
138
+
135
139
  ## License
136
140
 
137
141
  [Apache Version 2.0](https://github.com/okta/odyssey/blob/main/LICENSE)
package/dist/Accordion.js CHANGED
@@ -27,12 +27,14 @@ const Accordion = ({
27
27
  isDisabled,
28
28
  isExpanded,
29
29
  onChange,
30
+ testId,
30
31
  translate
31
32
  }) => {
32
33
  const id = useUniqueId(idOverride);
33
34
  const headerId = `${id}-header`;
34
35
  const contentId = `${id}-content`;
35
36
  return _jsxs(_Accordion, {
37
+ "data-se": testId,
36
38
  defaultExpanded: isDefaultExpanded,
37
39
  disabled: isDisabled,
38
40
  disableGutters: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","translate","headerId","contentId","_Accordion","defaultExpanded","disabled","disableGutters","expanded","_AccordionSummary","expandIcon","component","_AccordionDetails","MemoizedAccordion","displayName"],"sources":["../src/Accordion.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 { ReactNode, memo } from \"react\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionSummary as MuiAccordionSummary,\n AccordionProps as MuiAccordionProps,\n} from \"@mui/material\";\nimport { ChevronDownIcon } from \"./icons.generated\";\nimport { Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type AccordionProps = {\n /**\n * The content of the Accordion itself\n */\n children: ReactNode;\n /**\n * Defines IDs for the header and the content of the Accordion\n */\n id?: string;\n /**\n * The label text for the AccordionSummary\n */\n label: string;\n /**\n * Whether the item is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * Whether the item is disabled\n */\n isDisabled?: boolean;\n /**\n * Whether the item is expanded\n */\n isExpanded?: boolean;\n /**\n * Event fired when the expansion state of the accordion is changed\n */\n onChange?: MuiAccordionProps[\"onChange\"];\n} & (\n | {\n isExpanded: boolean;\n isDefaultExpanded?: never;\n }\n | {\n isDefaultExpanded?: boolean;\n isExpanded?: never;\n }\n) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Accordion = ({\n children,\n label,\n id: idOverride,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n onChange,\n translate,\n}: AccordionProps) => {\n const id = useUniqueId(idOverride);\n const headerId = `${id}-header`;\n const contentId = `${id}-content`;\n return (\n <MuiAccordion\n defaultExpanded={isDefaultExpanded}\n disabled={isDisabled}\n disableGutters\n expanded={isExpanded}\n onChange={onChange}\n >\n <MuiAccordionSummary\n aria-controls={contentId}\n expandIcon={<ChevronDownIcon />}\n id={headerId}\n >\n <Support component=\"div\" translate={translate}>\n {label}\n </Support>\n </MuiAccordionSummary>\n <MuiAccordionDetails aria-labelledby={headerId}>\n {children}\n </MuiAccordionDetails>\n </MuiAccordion>\n );\n};\n\nconst MemoizedAccordion = memo(Accordion);\nMemoizedAccordion.displayName = \"Accordion\";\n\nexport { MemoizedAccordion as Accordion };\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAoBA,IAAI,QAAQ,OAAO;AAAC,SAQ/BC,eAAe;AAAA,SACfC,OAAO;AAAA,SACPC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA2CpB,MAAMC,SAAS,GAAGA,CAAC;EACjBC,QAAQ;EACRC,KAAK;EACLC,EAAE,EAAEC,UAAU;EACdC,iBAAiB;EACjBC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC;AACc,CAAC,KAAK;EACpB,MAAMN,EAAE,GAAGR,WAAW,CAACS,UAAU,CAAC;EAClC,MAAMM,QAAQ,GAAI,GAAEP,EAAG,SAAQ;EAC/B,MAAMQ,SAAS,GAAI,GAAER,EAAG,UAAS;EACjC,OACEJ,KAAA,CAAAa,UAAA;IACEC,eAAe,EAAER,iBAAkB;IACnCS,QAAQ,EAAER,UAAW;IACrBS,cAAc;IACdC,QAAQ,EAAET,UAAW;IACrBC,QAAQ,EAAEA,QAAS;IAAAP,QAAA,GAEnBJ,IAAA,CAAAoB,iBAAA;MACE,iBAAeN,SAAU;MACzBO,UAAU,EAAErB,IAAA,CAACJ,eAAe,IAAE,CAAE;MAChCU,EAAE,EAAEO,QAAS;MAAAT,QAAA,EAEbJ,IAAA,CAACH,OAAO;QAACyB,SAAS,EAAC,KAAK;QAACV,SAAS,EAAEA,SAAU;QAAAR,QAAA,EAC3CC;MAAK,CACC;IAAC,CACS,CAAC,EACtBL,IAAA,CAAAuB,iBAAA;MAAqB,mBAAiBV,QAAS;MAAAT,QAAA,EAC5CA;IAAQ,CACU,CAAC;EAAA,CACV,CAAC;AAEnB,CAAC;AAED,MAAMoB,iBAAiB,GAAG7B,IAAI,CAACQ,SAAS,CAAC;AACzCqB,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIrB,SAAS"}
1
+ {"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","testId","translate","headerId","contentId","_Accordion","defaultExpanded","disabled","disableGutters","expanded","_AccordionSummary","expandIcon","component","_AccordionDetails","MemoizedAccordion","displayName"],"sources":["../src/Accordion.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 { ReactNode, memo } from \"react\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionSummary as MuiAccordionSummary,\n AccordionProps as MuiAccordionProps,\n} from \"@mui/material\";\nimport { ChevronDownIcon } from \"./icons.generated\";\nimport { Support } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport type AccordionProps = {\n /**\n * The content of the Accordion itself\n */\n children: ReactNode;\n /**\n * Defines IDs for the header and the content of the Accordion\n */\n id?: string;\n /**\n * The label text for the AccordionSummary\n */\n label: string;\n /**\n * Whether the item is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * Whether the item is disabled\n */\n isDisabled?: boolean;\n /**\n * Whether the item is expanded\n */\n isExpanded?: boolean;\n /**\n * Event fired when the expansion state of the accordion is changed\n */\n onChange?: MuiAccordionProps[\"onChange\"];\n} & (\n | {\n isExpanded: boolean;\n isDefaultExpanded?: never;\n }\n | {\n isDefaultExpanded?: boolean;\n isExpanded?: never;\n }\n) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Accordion = ({\n children,\n label,\n id: idOverride,\n isDefaultExpanded,\n isDisabled,\n isExpanded,\n onChange,\n testId,\n translate,\n}: AccordionProps) => {\n const id = useUniqueId(idOverride);\n const headerId = `${id}-header`;\n const contentId = `${id}-content`;\n\n return (\n <MuiAccordion\n data-se={testId}\n defaultExpanded={isDefaultExpanded}\n disabled={isDisabled}\n disableGutters\n expanded={isExpanded}\n onChange={onChange}\n >\n <MuiAccordionSummary\n aria-controls={contentId}\n expandIcon={<ChevronDownIcon />}\n id={headerId}\n >\n <Support component=\"div\" translate={translate}>\n {label}\n </Support>\n </MuiAccordionSummary>\n <MuiAccordionDetails aria-labelledby={headerId}>\n {children}\n </MuiAccordionDetails>\n </MuiAccordion>\n );\n};\n\nconst MemoizedAccordion = memo(Accordion);\nMemoizedAccordion.displayName = \"Accordion\";\n\nexport { MemoizedAccordion as Accordion };\n"],"mappings":";;;AAAA;AAC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@@ -15,6 +15,7 @@ import { createContext, forwardRef, memo, useCallback, useContext, useEffect, us
15
15
  import styled from "@emotion/styled";
16
16
  import { VariableSizeList } from "react-window";
17
17
  import _AutoSizer from "react-virtualized-auto-sizer";
18
+ import { useTranslation } from "react-i18next";
18
19
  const AutoSizer = _AutoSizer;
19
20
  import { Field } from "./Field.js";
20
21
  import { ComponentControlledState, useInputValues, getControlState } from "./inputUtils.js";
@@ -42,6 +43,7 @@ const Autocomplete = ({
42
43
  HintLinkComponent,
43
44
  label,
44
45
  name: nameOverride,
46
+ noOptionsText,
45
47
  onBlur,
46
48
  onChange: onChangeProp,
47
49
  onInputChange: onInputChangeProp,
@@ -52,6 +54,9 @@ const Autocomplete = ({
52
54
  testId,
53
55
  translate
54
56
  }) => {
57
+ const {
58
+ t
59
+ } = useTranslation();
55
60
  const controlledStateRef = useRef(getControlState({
56
61
  controlledValue: value,
57
62
  uncontrolledValue: defaultValue
@@ -196,6 +201,8 @@ const Autocomplete = ({
196
201
  ListboxComponent
197
202
  }),
198
203
  "aria-disabled": isDisabled,
204
+ clearText: t("clear.text"),
205
+ closeText: t("close.text"),
199
206
  disableCloseOnSelect: hasMultipleChoices,
200
207
  disabled: isDisabled,
201
208
  freeSolo: isCustomValueAllowed,
@@ -204,10 +211,12 @@ const Autocomplete = ({
204
211
  fullWidth: isFullWidth,
205
212
  loading: isLoading,
206
213
  multiple: hasMultipleChoices,
214
+ noOptionsText: noOptionsText,
207
215
  onBlur: onBlur,
208
216
  onChange: onChange,
209
217
  onInputChange: onInputChange,
210
218
  onFocus: onFocus,
219
+ openText: t("open.text"),
211
220
  options: options,
212
221
  readOnly: isReadOnly,
213
222
  renderInput: renderInput,
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.js","names":["createContext","forwardRef","memo","useCallback","useContext","useEffect","useMemo","useRef","styled","VariableSizeList","_AutoSizer","AutoSizer","Field","ComponentControlledState","useInputValues","getControlState","jsx","_jsx","ListboxContainer","div","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","isVirtualizedProp","hint","HintLinkComponent","label","name","nameOverride","onBlur","onChange","onChangeProp","onInputChange","onInputChangeProp","onFocus","options","value","getIsOptionEqualToValue","testId","translate","controlledStateRef","controlledValue","uncontrolledValue","Boolean","defaultValueProp","undefined","valueProps","controlState","current","inputValueProp","CONTROLLED","renderInput","InputLabelProps","InputProps","params","fieldType","hasVisibleLabel","htmlFor","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","inputProps","required","renderVirtualizedRow","data","index","style","baseOption","optionItem","props","OuterListboxContext","OuterListboxElementType","ref","outerProps","useResetCache","length","resetAfterIndex","ListboxComponent","children","other","itemData","flatMap","item","concat","optionHeight","overscanRowCount","itemSize","gridRef","renderWindow","height","width","innerElementType","itemCount","outerElementType","overscanCount","Provider","event","reason","details","_Autocomplete","disableCloseOnSelect","disabled","freeSolo","filterSelectedOptions","fullWidth","loading","multiple","readOnly","isOptionEqualToValue","MemoizedAutocomplete","displayName"],"sources":["../src/Autocomplete.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 {\n Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n InputBase,\n UseAutocompleteProps,\n AutocompleteValue,\n AutocompleteRenderInputParams,\n} from \"@mui/material\";\nimport {\n createContext,\n FC,\n forwardRef,\n HTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from \"react\";\nimport styled from \"@emotion/styled\";\nimport { VariableSizeList, ListChildComponentProps } from \"react-window\";\nimport _AutoSizer, {\n Props as AutoSizerProps,\n Size as AutoSizerSize,\n} from \"react-virtualized-auto-sizer\";\n\n// This is required to get around a react-types issue for \"AutoSizer is not a valid JSX element.\"\n// @see https://github.com/bvaughn/react-virtualized/issues/1739#issuecomment-1291444246\nconst AutoSizer = _AutoSizer as unknown as FC<AutoSizerProps>;\n\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n ComponentControlledState,\n useInputValues,\n getControlState,\n} from \"./inputUtils\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Enables multiple choice selection\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n\n /**\n * Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * If this component is required to display a virtualized list of options,\n * then this value needs to be set to true.\n * It is recommended if you're options are on the order of 10's of hundreds or more.\n */\n isVirtualized?: boolean;\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\nconst ListboxContainer = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized: isVirtualizedProp = false,\n hint,\n HintLinkComponent,\n label,\n name: nameOverride,\n onBlur,\n onChange: onChangeProp,\n onInputChange: onInputChangeProp,\n onFocus,\n options,\n value,\n getIsOptionEqualToValue,\n testId,\n translate,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n\n const isVirtualized = useRef(Boolean(isVirtualizedProp));\n const defaultValueProp = useMemo<\n | AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >\n | undefined\n >(() => {\n if (hasMultipleChoices) {\n if (value === undefined) {\n return defaultValue;\n }\n return [] as AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >;\n }\n return value === undefined ? defaultValue : undefined;\n }, [defaultValue, hasMultipleChoices, value]);\n\n const valueProps = useInputValues({\n defaultValue: defaultValueProp,\n value: value,\n controlState: controlledStateRef.current,\n });\n\n const inputValueProp = useMemo(() => {\n if (controlledStateRef.current === ComponentControlledState.CONTROLLED) {\n return { inputValue };\n }\n return undefined;\n }, [inputValue]);\n\n const renderInput = useCallback(\n ({\n InputLabelProps,\n InputProps,\n ...params\n }: AutocompleteRenderInputParams) => (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n //@ts-expect-error htmlFor does not exist ont he InputLabelProps for autocomplete\n id={InputLabelProps.htmlFor}\n isFullWidth={isFullWidth}\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n label={label}\n isOptional={isOptional}\n renderFieldComponent={({\n ariaDescribedBy,\n id,\n errorMessageElementId,\n labelElementId,\n }) => (\n <InputBase\n {...params}\n {...InputProps}\n inputProps={{\n ...params.inputProps,\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\n aria-describedby={ariaDescribedBy}\n id={id}\n name={nameOverride ?? id}\n required={!isOptional}\n />\n )}\n />\n ),\n [\n ariaDescribedBy,\n errorMessage,\n errorMessageList,\n hint,\n HintLinkComponent,\n isFullWidth,\n isOptional,\n label,\n nameOverride,\n testId,\n ],\n );\n\n const renderVirtualizedRow = ({\n data,\n index,\n style,\n }: ListChildComponentProps) => {\n const baseOption = data[index];\n /**\n * react-window calculates the absolute positions of the list items, via an inline style, so\n * we need to add it to each list item that is being rendered in the viewable list window.\n * See here if you need to know more: https://github.com/bvaughn/react-window?tab=readme-ov-file#why-is-my-list-blank-when-i-scroll\n */\n const optionItem = { ...baseOption, props: { ...baseOption.props, style } };\n return optionItem;\n };\n\n const OuterListboxContext = createContext({});\n\n const OuterListboxElementType = forwardRef<HTMLDivElement>((props, ref) => {\n const outerProps = useContext(OuterListboxContext);\n return <div ref={ref} {...props} {...outerProps} />;\n });\n\n function useResetCache(length: number) {\n const ref = useRef<VariableSizeList>(null);\n useEffect(() => {\n if (ref.current) {\n ref.current.resetAfterIndex(0, true);\n }\n }, [length]);\n return ref;\n }\n\n const ListboxComponent = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLElement>\n >(function (props, ref) {\n const { children, ...other } = props;\n const itemData: ReactElement[] = (children as ReactElement[]).flatMap(\n (item: ReactElement & { children?: ReactElement[] }) =>\n [item].concat(item.children || []),\n );\n\n // the height of an Odyssey autocomplete option item that is used to calculate height of window\n const optionHeight = 45; //px\n\n // The number of items (rows or columns) to render outside of the visible area for performance and scrolling reasons\n const overscanRowCount = 8;\n\n const itemSize = useCallback(() => optionHeight, []);\n\n const gridRef = useResetCache(itemData.length);\n\n const renderWindow = useCallback(\n ({ height, width }: AutoSizerSize) => (\n <VariableSizeList\n innerElementType=\"ul\"\n itemData={itemData}\n itemCount={itemData.length}\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n itemSize={itemSize}\n height={height}\n width={width}\n ref={gridRef}\n outerElementType={OuterListboxElementType}\n overscanCount={overscanRowCount}\n >\n {renderVirtualizedRow}\n </VariableSizeList>\n ),\n [itemData, gridRef, itemSize],\n );\n\n return (\n <ListboxContainer ref={ref}>\n <OuterListboxContext.Provider value={other}>\n <AutoSizer>{renderWindow}</AutoSizer>\n </OuterListboxContext.Provider>\n </ListboxContainer>\n );\n });\n\n const onChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"]\n >\n >(\n (event, value, reason, details) => {\n onChangeProp?.(event, value, reason, details);\n },\n [onChangeProp],\n );\n\n const onInputChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"]\n >\n >(\n (event, value, reason) => {\n onInputChangeProp?.(event, value, reason);\n },\n [onInputChangeProp],\n );\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualized.current && { ListboxComponent })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n freeSolo={isCustomValueAllowed}\n filterSelectedOptions={true}\n id={idOverride}\n fullWidth={isFullWidth}\n loading={isLoading}\n multiple={hasMultipleChoices}\n onBlur={onBlur}\n onChange={onChange}\n onInputChange={onInputChange}\n onFocus={onFocus}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n isOptionEqualToValue={getIsOptionEqualToValue}\n translate={translate}\n />\n );\n};\n\n// Need the `typeof Autocomplete` because generics don't get passed through\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete;\n// @ts-expect-error displayName is expected to not be on `typeof Autocomplete`\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,SACEA,aAAa,EAEbC,UAAU,EAEVC,IAAI,EAEJC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,QACD,OAAO;AACd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,gBAAgB,QAAiC,cAAc;AACxE,OAAOC,UAAU,MAGV,8BAA8B;AAIrC,MAAMC,SAAS,GAAGD,UAA2C;AAAC,SAErDE,KAAK;AAAA,SAIZC,wBAAwB,EACxBC,cAAc,EACdC,eAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA;AA0JjB,MAAMC,gBAAgB,GAAGV,MAAM,CAACW,GAAI;AACpC;AACA;AACA,CAAC;AAED,MAAMC,YAAY,GAAGA,CAInB;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,kBAAkB;EAClBC,EAAE,EAAEC,UAAU;EACdC,UAAU;EACVC,oBAAoB;EACpBC,UAAU;EACVC,WAAW,GAAG,KAAK;EACnBC,SAAS;EACTC,UAAU,GAAG,KAAK;EAClBC,UAAU;EACVC,aAAa,EAAEC,iBAAiB,GAAG,KAAK;EACxCC,IAAI;EACJC,iBAAiB;EACjBC,KAAK;EACLC,IAAI,EAAEC,YAAY;EAClBC,MAAM;EACNC,QAAQ,EAAEC,YAAY;EACtBC,aAAa,EAAEC,iBAAiB;EAChCC,OAAO;EACPC,OAAO;EACPC,KAAK;EACLC,uBAAuB;EACvBC,MAAM;EACNC;AACuE,CAAC,KAAK;EAC7E,MAAMC,kBAAkB,GAAG9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AEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IACjByE,QAAQ,EAAEvF,UAAW;IACrB8B,WAAW,EAAEA,WAAY;IACzB0D,oBAAoB,EAAExE,uBAAwB;IAC9CE,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAGD,MAAMuE,oBAAoB,GAAGzH,IAAI,CAACkB,YAAY,CAAwB;AAEtEuG,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIvG,YAAY"}
1
+ {"version":3,"file":"Autocomplete.js","names":["createContext","forwardRef","memo","useCallback","useContext","useEffect","useMemo","useRef","styled","VariableSizeList","_AutoSizer","useTranslation","AutoSizer","Field","ComponentControlledState","useInputValues","getControlState","jsx","_jsx","ListboxContainer","div","Autocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","isVirtualizedProp","hint","HintLinkComponent","label","name","nameOverride","noOptionsText","onBlur","onChange","onChangeProp","onInputChange","onInputChangeProp","onFocus","options","value","getIsOptionEqualToValue","testId","translate","t","controlledStateRef","controlledValue","uncontrolledValue","Boolean","defaultValueProp","undefined","valueProps","controlState","current","inputValueProp","CONTROLLED","renderInput","InputLabelProps","InputProps","params","fieldType","hasVisibleLabel","htmlFor","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase","inputProps","required","renderVirtualizedRow","data","index","style","baseOption","optionItem","props","OuterListboxContext","OuterListboxElementType","ref","outerProps","useResetCache","length","resetAfterIndex","ListboxComponent","children","other","itemData","flatMap","item","concat","optionHeight","overscanRowCount","itemSize","gridRef","renderWindow","height","width","innerElementType","itemCount","outerElementType","overscanCount","Provider","event","reason","details","_Autocomplete","clearText","closeText","disableCloseOnSelect","disabled","freeSolo","filterSelectedOptions","fullWidth","loading","multiple","openText","readOnly","isOptionEqualToValue","MemoizedAutocomplete","displayName"],"sources":["../src/Autocomplete.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 {\n Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n InputBase,\n UseAutocompleteProps,\n AutocompleteValue,\n AutocompleteRenderInputParams,\n} from \"@mui/material\";\nimport {\n createContext,\n FC,\n forwardRef,\n HTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from \"react\";\nimport styled from \"@emotion/styled\";\nimport { VariableSizeList, ListChildComponentProps } from \"react-window\";\nimport _AutoSizer, {\n Props as AutoSizerProps,\n Size as AutoSizerSize,\n} from \"react-virtualized-auto-sizer\";\nimport { useTranslation } from \"react-i18next\";\n\n// This is required to get around a react-types issue for \"AutoSizer is not a valid JSX element.\"\n// @see https://github.com/bvaughn/react-virtualized/issues/1739#issuecomment-1291444246\nconst AutoSizer = _AutoSizer as unknown as FC<AutoSizerProps>;\n\nimport { Field } from \"./Field\";\nimport { FieldComponentProps } from \"./FieldComponentProps\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n ComponentControlledState,\n useInputValues,\n getControlState,\n} from \"./inputUtils\";\n\nexport type AutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = {\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Enables multiple choice selection\n */\n hasMultipleChoices?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"multiple\"];\n /**\n * The value for the input\n */\n inputValue?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"inputValue\"];\n /**\n * Allows the input of custom values\n */\n isCustomValueAllowed?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"freeSolo\"];\n /**\n * Disables the Autocomplete input\n */\n isDisabled?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"disabled\"];\n /**\n * Displays a loading indicator\n */\n isLoading?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"loading\"];\n /**\n * Makes the Autocomplete input read-only\n */\n isReadOnly?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"readOnly\"];\n /**\n * The label text for the autocomplete input\n */\n label: string;\n /**\n * The text to display when no options are available\n *\n * default: \"No Options\"\n */\n noOptionsText?: string;\n /**\n * Callback fired when the autocomplete loses focus.\n */\n onBlur?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onBlur\"];\n /**\n * Callback fired when a selection is made.\n */\n onChange?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\n /**\n * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * Callback fired when the autocomplete gains focus.\n */\n onFocus?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onFocus\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\n\n /**\n * Used to determine if the option represents the given value. Uses strict equality by default if none provided.\n * Both arguments need to be handled, an option can only match with one value.\n * option: the option to test\n * value: the value to test against\n *\n * You will need to implement this function if your `option` items are objects.\n */\n getIsOptionEqualToValue?: (option: OptionType, value: OptionType) => boolean;\n\n /**\n * If this component is required to display a virtualized list of options,\n * then this value needs to be set to true.\n * It is recommended if you're options are on the order of 10's of hundreds or more.\n */\n isVirtualized?: boolean;\n} & Pick<\n FieldComponentProps,\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"id\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"name\"\n> &\n Pick<HtmlProps, \"ariaDescribedBy\" | \"testId\" | \"translate\">;\n\nconst ListboxContainer = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized: isVirtualizedProp = false,\n hint,\n HintLinkComponent,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange: onChangeProp,\n onInputChange: onInputChangeProp,\n onFocus,\n options,\n value,\n getIsOptionEqualToValue,\n testId,\n translate,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n\n const isVirtualized = useRef(Boolean(isVirtualizedProp));\n const defaultValueProp = useMemo<\n | AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >\n | undefined\n >(() => {\n if (hasMultipleChoices) {\n if (value === undefined) {\n return defaultValue;\n }\n return [] as AutocompleteValue<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >;\n }\n return value === undefined ? defaultValue : undefined;\n }, [defaultValue, hasMultipleChoices, value]);\n\n const valueProps = useInputValues({\n defaultValue: defaultValueProp,\n value: value,\n controlState: controlledStateRef.current,\n });\n\n const inputValueProp = useMemo(() => {\n if (controlledStateRef.current === ComponentControlledState.CONTROLLED) {\n return { inputValue };\n }\n return undefined;\n }, [inputValue]);\n\n const renderInput = useCallback(\n ({\n InputLabelProps,\n InputProps,\n ...params\n }: AutocompleteRenderInputParams) => (\n <Field\n ariaDescribedBy={ariaDescribedBy}\n errorMessage={errorMessage}\n errorMessageList={errorMessageList}\n fieldType=\"single\"\n hasVisibleLabel\n //@ts-expect-error htmlFor does not exist ont he InputLabelProps for autocomplete\n id={InputLabelProps.htmlFor}\n isFullWidth={isFullWidth}\n hint={hint}\n HintLinkComponent={HintLinkComponent}\n label={label}\n isOptional={isOptional}\n renderFieldComponent={({\n ariaDescribedBy,\n id,\n errorMessageElementId,\n labelElementId,\n }) => (\n <InputBase\n {...params}\n {...InputProps}\n inputProps={{\n ...params.inputProps,\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\n aria-describedby={ariaDescribedBy}\n id={id}\n name={nameOverride ?? id}\n required={!isOptional}\n />\n )}\n />\n ),\n [\n ariaDescribedBy,\n errorMessage,\n errorMessageList,\n hint,\n HintLinkComponent,\n isFullWidth,\n isOptional,\n label,\n nameOverride,\n testId,\n ],\n );\n\n const renderVirtualizedRow = ({\n data,\n index,\n style,\n }: ListChildComponentProps) => {\n const baseOption = data[index];\n /**\n * react-window calculates the absolute positions of the list items, via an inline style, so\n * we need to add it to each list item that is being rendered in the viewable list window.\n * See here if you need to know more: https://github.com/bvaughn/react-window?tab=readme-ov-file#why-is-my-list-blank-when-i-scroll\n */\n const optionItem = { ...baseOption, props: { ...baseOption.props, style } };\n return optionItem;\n };\n\n const OuterListboxContext = createContext({});\n\n const OuterListboxElementType = forwardRef<HTMLDivElement>((props, ref) => {\n const outerProps = useContext(OuterListboxContext);\n return <div ref={ref} {...props} {...outerProps} />;\n });\n\n function useResetCache(length: number) {\n const ref = useRef<VariableSizeList>(null);\n useEffect(() => {\n if (ref.current) {\n ref.current.resetAfterIndex(0, true);\n }\n }, [length]);\n return ref;\n }\n\n const ListboxComponent = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLElement>\n >(function (props, ref) {\n const { children, ...other } = props;\n const itemData: ReactElement[] = (children as ReactElement[]).flatMap(\n (item: ReactElement & { children?: ReactElement[] }) =>\n [item].concat(item.children || []),\n );\n\n // the height of an Odyssey autocomplete option item that is used to calculate height of window\n const optionHeight = 45; //px\n\n // The number of items (rows or columns) to render outside of the visible area for performance and scrolling reasons\n const overscanRowCount = 8;\n\n const itemSize = useCallback(() => optionHeight, []);\n\n const gridRef = useResetCache(itemData.length);\n\n const renderWindow = useCallback(\n ({ height, width }: AutoSizerSize) => (\n <VariableSizeList\n innerElementType=\"ul\"\n itemData={itemData}\n itemCount={itemData.length}\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n itemSize={itemSize}\n height={height}\n width={width}\n ref={gridRef}\n outerElementType={OuterListboxElementType}\n overscanCount={overscanRowCount}\n >\n {renderVirtualizedRow}\n </VariableSizeList>\n ),\n [itemData, gridRef, itemSize],\n );\n\n return (\n <ListboxContainer ref={ref}>\n <OuterListboxContext.Provider value={other}>\n <AutoSizer>{renderWindow}</AutoSizer>\n </OuterListboxContext.Provider>\n </ListboxContainer>\n );\n });\n\n const onChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"]\n >\n >(\n (event, value, reason, details) => {\n onChangeProp?.(event, value, reason, details);\n },\n [onChangeProp],\n );\n\n const onInputChange = useCallback<\n NonNullable<\n UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"]\n >\n >(\n (event, value, reason) => {\n onInputChangeProp?.(event, value, reason);\n },\n [onInputChangeProp],\n );\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualized.current && { ListboxComponent })}\n // AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div\n aria-disabled={isDisabled}\n clearText={t(\"clear.text\")}\n closeText={t(\"close.text\")}\n disableCloseOnSelect={hasMultipleChoices}\n disabled={isDisabled}\n freeSolo={isCustomValueAllowed}\n filterSelectedOptions={true}\n id={idOverride}\n fullWidth={isFullWidth}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText}\n onBlur={onBlur}\n onChange={onChange}\n onInputChange={onInputChange}\n onFocus={onFocus}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\n isOptionEqualToValue={getIsOptionEqualToValue}\n translate={translate}\n />\n );\n};\n\n// Need the `typeof Autocomplete` because generics don't get passed through\nconst MemoizedAutocomplete = memo(Autocomplete) as typeof Autocomplete;\n// @ts-expect-error displayName is expected to not be on `typeof Autocomplete`\nMemoizedAutocomplete.displayName = \"Autocomplete\";\n\nexport { MemoizedAutocomplete as Autocomplete };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,SACEA,aAAa,EAEbC,UAAU,EAEVC,IAAI,EAEJC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,QACD,OAAO;AACd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,gBAAgB,QAAiC,cAAc;AACxE,OAAOC,UAAU,MAGV,8BAA8B;AACrC,SAASC,cAAc,QAAQ,eAAe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AAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAI5G,YAAY"}
package/dist/Badge.js CHANGED
@@ -14,6 +14,7 @@ import { memo, useMemo } from "react";
14
14
  import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
15
15
  import { Box } from "./Box.js";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ export const badgeContentMaxValues = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
17
18
  export const badgeTypeValues = ["default", "attention", "danger"];
18
19
  const badgeTypeColors = odysseyTokens => ({
19
20
  default: {
package/dist/Badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["memo","useMemo","useOdysseyDesignTokens","Box","jsx","_jsx","badgeTypeValues","badgeTypeColors","odysseyTokens","default","background","HueNeutral200","font","TypographyColorBody","attention","PalettePrimaryMain","TypographyColorInverse","danger","PaletteDangerMain","Badge","badgeContent","badgeContentMax","testId","translate","type","odysseyDesignTokens","renderBadge","greaterThanZeroContentMax","threeDigitLimitedMax","isOverContentMax","overContentMaxMessage","formattedContent","toString","badgeStyles","display","alignItems","justifyContent","minWidth","Spacing4","Spacing1","height","minHeight","padding","backgroundColor","color","borderRadius","length","BorderRadiusOuter","fontSize","TypographyScale0","fontFamily","TypographyFamilyMono","fontWeight","TypographyWeightBodyBold","lineHeight","transitionDuration","TransitionDurationMain","transitionProperty","hasNotificationCount","sx","children","MemoizedBadge","displayName"],"sources":["../src/Badge.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 { CSSProperties, memo, useMemo } from \"react\";\n\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { Box } from \"./Box\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport type BadgeContentMax = 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100;\n\nexport const badgeTypeValues = [\"default\", \"attention\", \"danger\"] as const;\n\nexport type BadgeProps = {\n badgeContent: number;\n badgeContentMax?: BadgeContentMax;\n type?: (typeof badgeTypeValues)[number];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst badgeTypeColors = (odysseyTokens: DesignTokens) => ({\n default: {\n background: odysseyTokens.HueNeutral200,\n font: odysseyTokens.TypographyColorBody,\n },\n attention: {\n background: odysseyTokens.PalettePrimaryMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n danger: {\n background: odysseyTokens.PaletteDangerMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n});\n\nconst Badge = ({\n badgeContent,\n badgeContentMax = 100,\n testId,\n translate,\n type = \"default\",\n}: BadgeProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const renderBadge = useMemo(() => {\n const greaterThanZeroContentMax = badgeContentMax > 0 ? badgeContentMax : 1;\n const threeDigitLimitedMax =\n greaterThanZeroContentMax > 999 ? 999 : greaterThanZeroContentMax;\n const isOverContentMax = badgeContent > threeDigitLimitedMax;\n const overContentMaxMessage = `${greaterThanZeroContentMax}+`;\n const formattedContent = isOverContentMax\n ? overContentMaxMessage\n : badgeContent.toString();\n\n const badgeStyles: CSSProperties = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minWidth: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n height: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n minHeight: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n // 6px horizontal padding per design requirements\n padding: \"0 6px\",\n backgroundColor: badgeTypeColors(odysseyDesignTokens)[type].background,\n color: badgeTypeColors(odysseyDesignTokens)[type].font,\n borderRadius:\n formattedContent.length > 1\n ? `${odysseyDesignTokens.BorderRadiusOuter}`\n : \"50%\",\n fontSize: `${odysseyDesignTokens.TypographyScale0}`,\n fontFamily: `${odysseyDesignTokens.TypographyFamilyMono}`,\n fontWeight: `${odysseyDesignTokens.TypographyWeightBodyBold}`,\n lineHeight: 1,\n transitionDuration: `${odysseyDesignTokens.TransitionDurationMain}`,\n transitionProperty: `background-color, color`,\n };\n\n const hasNotificationCount = badgeContent && badgeContent > 0;\n\n return hasNotificationCount ? (\n <Box sx={badgeStyles} testId={testId} translate={translate}>\n {formattedContent}\n </Box>\n ) : null;\n }, [\n badgeContent,\n badgeContentMax,\n odysseyDesignTokens,\n testId,\n translate,\n type,\n ]);\n\n return renderBadge;\n};\n\nconst MemoizedBadge = memo(Badge);\nMemoizedBadge.displayName = \"Badge\";\n\nexport { MemoizedBadge as Badge };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAwBA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAAC,SAGnDC,sBAAsB;AAAA,SAGfC,GAAG;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAKZ,OAAO,MAAMC,eAAe,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAU;AAQ1E,MAAMC,eAAe,GAAIC,aAA2B,KAAM;EACxDC,OAAO,EAAE;IACPC,UAAU,EAAEF,aAAa,CAACG,aAAa;IACvCC,IAAI,EAAEJ,aAAa,CAACK;EACtB,CAAC;EACDC,SAAS,EAAE;IACTJ,UAAU,EAAEF,aAAa,CAACO,kBAAkB;IAC5CH,IAAI,EAAEJ,aAAa,CAACQ;EACtB,CAAC;EACDC,MAAM,EAAE;IACNP,UAAU,EAAEF,aAAa,CAACU,iBAAiB;IAC3CN,I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,CAACsB,iBAAkB,EAAC,GAC1C,KAAK;MACXC,QAAQ,EAAG,GAAEvB,mBAAmB,CAACwB,gBAAiB,EAAC;MACnDC,UAAU,EAAG,GAAEzB,mBAAmB,CAAC0B,oBAAqB,EAAC;MACzDC,UAAU,EAAG,GAAE3B,mBAAmB,CAAC4B,wBAAyB,EAAC;MAC7DC,UAAU,EAAE,CAAC;MACbC,kBAAkB,EAAG,GAAE9B,mBAAmB,CAAC+B,sBAAuB,EAAC;MACnEC,kBAAkB,EAAG;IACvB,CAAC;IAED,MAAMC,oBAAoB,GAAGtC,YAAY,IAAIA,YAAY,GAAG,CAAC;IAE7D,OAAOsC,oBAAoB,GACzBrD,IAAA,CAACF,GAAG;MAACwD,EAAE,EAAE1B,WAAY;MAACX,MAAM,EAAEA,MAAO;MAACC,SAAS,EAAEA,SAAU;MAAAqC,QAAA,EACxD7B;IAAgB,CACd,CAAC,GACJ,IAAI;EACV,CAAC,EAAE,CACDX,YAAY,EACZC,eAAe,EACfI,mBAAmB,EACnBH,MAAM,EACNC,SAAS,EACTC,IAAI,CACL,CAAC;EAEF,OAAOE,WAAW;AACpB,CAAC;AAED,MAAMmC,aAAa,GAAG7D,IAAI,CAACmB,KAAK,CAAC;AACjC0C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI1C,KAAK"}
1
+ {"version":3,"file":"Badge.js","names":["memo","useMemo","useOdysseyDesignTokens","Box","jsx","_jsx","badgeContentMaxValues","badgeTypeValues","badgeTypeColors","odysseyTokens","default","background","HueNeutral200","font","TypographyColorBody","attention","PalettePrimaryMain","TypographyColorInverse","danger","PaletteDangerMain","Badge","badgeContent","badgeContentMax","testId","translate","type","odysseyDesignTokens","renderBadge","greaterThanZeroContentMax","threeDigitLimitedMax","isOverContentMax","overContentMaxMessage","formattedContent","toString","badgeStyles","display","alignItems","justifyContent","minWidth","Spacing4","Spacing1","height","minHeight","padding","backgroundColor","color","borderRadius","length","BorderRadiusOuter","fontSize","TypographyScale0","fontFamily","TypographyFamilyMono","fontWeight","TypographyWeightBodyBold","lineHeight","transitionDuration","TransitionDurationMain","transitionProperty","hasNotificationCount","sx","children","MemoizedBadge","displayName"],"sources":["../src/Badge.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 { CSSProperties, memo, useMemo } from \"react\";\n\nimport {\n useOdysseyDesignTokens,\n DesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { Box } from \"./Box\";\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport const badgeContentMaxValues = [\n 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,\n] as const;\nexport const badgeTypeValues = [\"default\", \"attention\", \"danger\"] as const;\n\nexport type BadgeProps = {\n badgeContent: number;\n badgeContentMax?: (typeof badgeContentMaxValues)[number];\n type?: (typeof badgeTypeValues)[number];\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst badgeTypeColors = (odysseyTokens: DesignTokens) => ({\n default: {\n background: odysseyTokens.HueNeutral200,\n font: odysseyTokens.TypographyColorBody,\n },\n attention: {\n background: odysseyTokens.PalettePrimaryMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n danger: {\n background: odysseyTokens.PaletteDangerMain,\n font: odysseyTokens.TypographyColorInverse,\n },\n});\n\nconst Badge = ({\n badgeContent,\n badgeContentMax = 100,\n testId,\n translate,\n type = \"default\",\n}: BadgeProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const renderBadge = useMemo(() => {\n const greaterThanZeroContentMax = badgeContentMax > 0 ? badgeContentMax : 1;\n const threeDigitLimitedMax =\n greaterThanZeroContentMax > 999 ? 999 : greaterThanZeroContentMax;\n const isOverContentMax = badgeContent > threeDigitLimitedMax;\n const overContentMaxMessage = `${greaterThanZeroContentMax}+`;\n const formattedContent = isOverContentMax\n ? overContentMaxMessage\n : badgeContent.toString();\n\n const badgeStyles: CSSProperties = {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minWidth: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n height: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n minHeight: `calc(${odysseyDesignTokens.Spacing4} + ${odysseyDesignTokens.Spacing1})`,\n // 6px horizontal padding per design requirements\n padding: \"0 6px\",\n backgroundColor: badgeTypeColors(odysseyDesignTokens)[type].background,\n color: badgeTypeColors(odysseyDesignTokens)[type].font,\n borderRadius:\n formattedContent.length > 1\n ? `${odysseyDesignTokens.BorderRadiusOuter}`\n : \"50%\",\n fontSize: `${odysseyDesignTokens.TypographyScale0}`,\n fontFamily: `${odysseyDesignTokens.TypographyFamilyMono}`,\n fontWeight: `${odysseyDesignTokens.TypographyWeightBodyBold}`,\n lineHeight: 1,\n transitionDuration: `${odysseyDesignTokens.TransitionDurationMain}`,\n transitionProperty: `background-color, color`,\n };\n\n const hasNotificationCount = badgeContent && badgeContent > 0;\n\n return hasNotificationCount ? (\n <Box sx={badgeStyles} testId={testId} translate={translate}>\n {formattedContent}\n </Box>\n ) : null;\n }, [\n badgeContent,\n badgeContentMax,\n odysseyDesignTokens,\n testId,\n translate,\n type,\n ]);\n\n return renderBadge;\n};\n\nconst MemoizedBadge = memo(Badge);\nMemoizedBadge.displayName = \"Badge\";\n\nexport { MemoizedBadge as Badge };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAwBA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAAC,SAGn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,EACfI,mBAAmB,EACnBH,MAAM,EACNC,SAAS,EACTC,IAAI,CACL,CAAC;EAEF,OAAOE,WAAW;AACpB,CAAC;AAED,MAAMmC,aAAa,GAAG9D,IAAI,CAACoB,KAAK,CAAC;AACjC0C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI1C,KAAK"}
package/dist/Banner.js CHANGED
@@ -11,12 +11,13 @@ import _AlertTitle from "@mui/material/AlertTitle";
11
11
  *
12
12
  * See the License for the specific language governing permissions and limitations under the License.
13
13
  */
14
- import { Link } from "./Link.js";
15
- import { ScreenReaderText } from "./ScreenReaderText.js";
14
+
16
15
  import { memo } from "react";
17
16
  import { useTranslation } from "react-i18next";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { Link } from "./Link.js";
18
+ import { ScreenReaderText } from "./ScreenReaderText.js";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
21
  export const bannerRoleValues = ["status", "alert"];
21
22
  export const bannerSeverityValues = ["success", "info", "warning", "error"];
22
23
  const Banner = ({
@@ -38,9 +39,9 @@ const Banner = ({
38
39
  role: role,
39
40
  severity: severity,
40
41
  variant: "banner",
41
- children: [_jsxs(ScreenReaderText, {
42
+ children: [_jsx(ScreenReaderText, {
42
43
  translate: translate,
43
- children: [t(`severity.${severity}`), ":"]
44
+ children: t(`severity.${severity}`)
44
45
  }), _jsx(_AlertTitle, {
45
46
  translate: translate,
46
47
  children: text
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","names":["Link","ScreenReaderText","memo","useTranslation","jsxs","_jsxs","jsx","_jsx","bannerRoleValues","bannerSeverityValues","Banner","linkUrl","linkText","onClose","role","severity","text","testId","translate","t","_Alert","variant","children","_AlertTitle","href","MemoizedBanner","displayName"],"sources":["../src/Banner.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 { Alert, AlertColor, AlertTitle, AlertProps } from \"@mui/material\";\nimport { Link } from \"./Link\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { memo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\n\nexport const bannerRoleValues = [\"status\", \"alert\"] as const;\nexport const bannerSeverityValues: AlertColor[] = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n];\n\nexport type BannerProps = {\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n /**\n * If defined, the alert will include a link to the URL\n */\n linkUrl?: string;\n /**\n * The function that's fired when the user clicks the close button. If undefined,\n * the close button will not be shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof bannerRoleValues)[number];\n /**\n * Determine the color and icon of the alert\n */\n severity: (typeof bannerSeverityValues)[number];\n /**\n * The text content of the alert\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Banner = ({\n linkUrl,\n linkText,\n onClose,\n role,\n severity,\n text,\n testId,\n translate,\n}: BannerProps) => {\n const { t } = useTranslation();\n\n return (\n <Alert\n data-se={testId}\n onClose={onClose}\n role={role}\n severity={severity}\n variant=\"banner\"\n >\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}`)}:\n </ScreenReaderText>\n <AlertTitle translate={translate}>{text}</AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\" translate={translate}>\n {linkText}\n </Link>\n )}\n </Alert>\n );\n};\n\nconst MemoizedBanner = memo(Banner);\nMemoizedBanner.displayName = \"Banner\";\n\nexport { MemoizedBanner as Banner };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAaSA,IAAI;AAAA,SACJC,gBAAgB;AACzB,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAI/C,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC5D,OAAO,MAAMC,oBAAkC,GAAG,CAChD,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACR;AAkCD,MAAMC,MAAM,GAAGA,CAAC;EACdC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,IAAI;EACJC,MAAM;EACNC;AACW,CAAC,KAAK;EACjB,MAAM;IAAEC;EAAE,CAAC,GAAGhB,cAAc,CAAC,CAAC;EAE9B,OACEE,KAAA,CAAAe,MAAA;IACE,WAASH,MAAO;IAChBJ,OAAO,EAAEA,OAAQ;IACjBC,IAAI,EAAEA,IAAK;IACXC,QAAQ,EAAEA,QAAS;IACnBM,OAAO,EAAC,QAAQ;IAAAC,QAAA,GAEhBjB,KAAA,CAACJ,gBAAgB;MAACiB,SAAS,EAAEA,SAAU;MAAAI,QAAA,GACpCH,CAAC,CAAE,YAAWJ,QAAS,EAAC,CAAC,EAAC,GAC7B;IAAA,CAAkB,CAAC,EACnBR,IAAA,CAAAgB,WAAA;MAAYL,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAEN;IAAI,CAAa,CAAC,EACpDL,OAAO,IACNJ,IAAA,CAACP,IAAI;MAACwB,IAAI,EAAEb,OAAQ;MAACU,OAAO,EAAC,YAAY;MAACH,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAC5DV;IAAQ,CACL,CACP;EAAA,CACI,CAAC;AAEZ,CAAC;AAED,MAAMa,cAAc,GAAGvB,IAAI,CAACQ,MAAM,CAAC;AACnCe,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIf,MAAM"}
1
+ {"version":3,"file":"Banner.js","names":["memo","useTranslation","Link","ScreenReaderText","jsx","_jsx","jsxs","_jsxs","bannerRoleValues","bannerSeverityValues","Banner","linkUrl","linkText","onClose","role","severity","text","testId","translate","t","_Alert","variant","children","_AlertTitle","href","MemoizedBanner","displayName"],"sources":["../src/Banner.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\";\nimport { useTranslation } from \"react-i18next\";\nimport { Alert, AlertColor, AlertTitle, AlertProps } from \"@mui/material\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Link } from \"./Link\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\n\nexport const bannerRoleValues = [\"status\", \"alert\"] as const;\nexport const bannerSeverityValues: AlertColor[] = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n];\n\nexport type BannerProps = {\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkText?: string;\n /**\n * If defined, the alert will include a link to the URL\n */\n linkUrl?: string;\n /**\n * The function that's fired when the user clicks the close button. If undefined,\n * the close button will not be shown.\n */\n onClose?: AlertProps[\"onClose\"];\n /**\n * Sets the ARIA role of the alert\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof bannerRoleValues)[number];\n /**\n * Determine the color and icon of the alert\n */\n severity: (typeof bannerSeverityValues)[number];\n /**\n * The text content of the alert\n */\n text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst Banner = ({\n linkUrl,\n linkText,\n onClose,\n role,\n severity,\n text,\n testId,\n translate,\n}: BannerProps) => {\n const { t } = useTranslation();\n\n return (\n <Alert\n data-se={testId}\n onClose={onClose}\n role={role}\n severity={severity}\n variant=\"banner\"\n >\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}`)}\n </ScreenReaderText>\n <AlertTitle translate={translate}>{text}</AlertTitle>\n {linkUrl && (\n <Link href={linkUrl} variant=\"monochrome\" translate={translate}>\n {linkText}\n </Link>\n )}\n </Alert>\n );\n};\n\nconst MemoizedBanner = memo(Banner);\nMemoizedBanner.displayName = \"Banner\";\n\nexport { MemoizedBanner as Banner };\n"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,cAAc,QAAQ,eAAe;AAAC,SAItCC,IAAI;AAAA,SACJC,gBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEzB,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC5D,OAAO,MAAMC,oBAAkC,GAAG,CAChD,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACR;AAkCD,MAAMC,MAAM,GAAGA,CAAC;EACdC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC,QAAQ;EACRC,IAAI;EACJC,MAAM;EACNC;AACW,CAAC,KAAK;EACjB,MAAM;IAAEC;EAAE,CAAC,GAAGlB,cAAc,CAAC,CAAC;EAE9B,OACEM,KAAA,CAAAa,MAAA;IACE,WAASH,MAAO;IAChBJ,OAAO,EAAEA,OAAQ;IACjBC,IAAI,EAAEA,IAAK;IACXC,QAAQ,EAAEA,QAAS;IACnBM,OAAO,EAAC,QAAQ;IAAAC,QAAA,GAEhBjB,IAAA,CAACF,gBAAgB;MAACe,SAAS,EAAEA,SAAU;MAAAI,QAAA,EACpCH,CAAC,CAAE,YAAWJ,QAAS,EAAC;IAAC,CACV,CAAC,EACnBV,IAAA,CAAAkB,WAAA;MAAYL,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAAEN;IAAI,CAAa,CAAC,EACpDL,OAAO,IACNN,IAAA,CAACH,IAAI;MAACsB,IAAI,EAAEb,OAAQ;MAACU,OAAO,EAAC,YAAY;MAACH,SAAS,EAAEA,SAAU;MAAAI,QAAA,EAC5DV;IAAQ,CACL,CACP;EAAA,CACI,CAAC;AAEZ,CAAC;AAED,MAAMa,cAAc,GAAGzB,IAAI,CAACU,MAAM,CAAC;AACnCe,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIf,MAAM"}
package/dist/Button.js CHANGED
@@ -17,7 +17,7 @@ import { Tooltip } from "./Tooltip.js";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  export const buttonSizeValues = ["small", "medium", "large"];
19
19
  export const buttonTypeValues = ["button", "submit", "reset"];
20
- export const buttonVariantValues = ["primary", "secondary", "danger", "floating"];
20
+ export const buttonVariantValues = ["primary", "secondary", "danger", "dangerSecondary", "floating", "floatingAction"];
21
21
  const Button = ({
22
22
  ariaControls,
23
23
  ariaDescribedBy,
@@ -27,6 +27,7 @@ const Button = ({
27
27
  ariaLabelledBy,
28
28
  buttonRef,
29
29
  endIcon,
30
+ href,
30
31
  id,
31
32
  isDisabled,
32
33
  isFullWidth: isFullWidthProp,
@@ -46,15 +47,12 @@ const Button = ({
46
47
  const localButtonRef = useRef(null);
47
48
  const buttonContext = useButton();
48
49
  const isFullWidth = useMemo(() => buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp, [buttonContext, isFullWidthProp]);
49
- useImperativeHandle(buttonRef, () => {
50
- return {
51
- focus: () => {
52
- localButtonRef.current?.focus();
53
- }
54
- };
55
- }, []);
50
+ useImperativeHandle(buttonRef, () => ({
51
+ focus: () => {
52
+ localButtonRef.current?.focus();
53
+ }
54
+ }), []);
56
55
  const renderButton = useCallback(muiProps => {
57
- muiProps?.ref?.(localButtonRef.current);
58
56
  return _jsx(_Button, {
59
57
  ...muiProps,
60
58
  "aria-controls": ariaControls,
@@ -67,9 +65,15 @@ const Button = ({
67
65
  disabled: isDisabled,
68
66
  endIcon: endIcon,
69
67
  fullWidth: isFullWidth,
68
+ href: href,
70
69
  id: id,
71
70
  onClick: onClick,
72
- ref: localButtonRef,
71
+ ref: element => {
72
+ if (element) {
73
+ localButtonRef.current = element;
74
+ muiProps?.ref?.(element);
75
+ }
76
+ },
73
77
  size: size,
74
78
  startIcon: startIcon,
75
79
  tabIndex: tabIndex,
@@ -78,7 +82,7 @@ const Button = ({
78
82
  variant: variant,
79
83
  children: label
80
84
  });
81
- }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, endIcon, id, isDisabled, isFullWidth, label, onClick, size, startIcon, tabIndex, testId, translate, type, variant]);
85
+ }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, endIcon, href, id, isDisabled, isFullWidth, label, onClick, size, startIcon, tabIndex, testId, translate, type, variant]);
82
86
  if (tooltipText) {
83
87
  return _jsx(Tooltip, {
84
88
  ariaType: "description",
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","useButton","MuiPropsContext","useMuiProps","Tooltip","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","Button","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","endIcon","id","isDisabled","isFullWidth","isFullWidthProp","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","ref","_Button","disabled","fullWidth","children","ariaType","placement","text","Consumer","MemoizedButton","displayName"],"sources":["../src/Button.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 { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport { useButton } from \"./ButtonContext\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle } from \"./inputUtils\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"./MuiPropsContext\";\nimport { Tooltip } from \"./Tooltip\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"floating\",\n] as const;\n\nexport type ButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: React.RefObject<FocusHandle>;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n} & (\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The text content of the Button\n */\n label: string;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n }\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The text content of the Button\n */\n label?: string | \"\" | undefined;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon: ReactElement;\n }\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon: ReactElement;\n /**\n * The text content of the Button\n */\n label?: never;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n }\n) &\n Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n >;\n\nconst Button = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n endIcon,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: ButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => {\n return {\n focus: () => {\n localButtonRef.current?.focus();\n },\n };\n },\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(localButtonRef.current);\n\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n disabled={isDisabled}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n id={id}\n onClick={onClick}\n ref={localButtonRef}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n id,\n isDisabled,\n isFullWidth,\n label,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAEEA,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAENC,SAAS;AAAA,SAIhBC,eAAe,EAEfC,WAAW;AAAA,SAEJC,OAAO;AAAA,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;AACnCuC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIvC,MAAM"}
1
+ {"version":3,"file":"Button.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","useButton","MuiPropsContext","useMuiProps","Tooltip","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","Button","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","_Button","disabled","fullWidth","ref","element","children","ariaType","placement","text","Consumer","MemoizedButton","displayName"],"sources":["../src/Button.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 { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport { useButton } from \"./ButtonContext\";\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { FocusHandle } from \"./inputUtils\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"./MuiPropsContext\";\nimport { Tooltip } from \"./Tooltip\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type ButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: React.RefObject<FocusHandle>;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * Determines whether the Button is disabled\n */\n isDisabled?: boolean;\n /**\n * Determines whether the Button should take up the full available width\n */\n isFullWidth?: boolean;\n /**\n * The size of the button\n */\n size?: (typeof buttonSizeValues)[number];\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The type of the HTML button element\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * The variant of the Button\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n} & (\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The text content of the Button\n */\n label: string;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n }\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * The text content of the Button\n */\n label?: string | \"\" | undefined;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon: ReactElement;\n }\n | {\n /**\n * The icon element to display at the end of the Button\n */\n endIcon: ReactElement;\n /**\n * The text content of the Button\n */\n label?: never;\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n }\n) &\n Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n >;\n\nconst Button = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: ButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n disabled={isDisabled}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={onClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth,\n label,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedButton = memo(Button);\nMemoizedButton.displayName = \"Button\";\n\nexport { MemoizedButton as Button };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAEEA,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAAC,SAENC,SAAS;AAAA,SAIhBC,eAAe,EAEfC,WAAW;AAAA,SAEJC,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEhB,OAAO,MAAMC,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AACrE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AACtE,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,gBAAgB,CACR;AAqGV,MAAMC,MAAM,GAAGA,CAAC;EACdC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,cAAc;EACdC,SAAS;EACTC,OAAO;EACPC,IAAI;EACJC,EAAE;EACFC,UAAU;EACVC,WAAW,EAAEC,eAAe;EAC5BC,KAAK,GAAG,EAAE;EACVC,OAAO;EACPC,IAAI,GAAG,QAAQ;EACfC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,WAAW;EACXC,SAAS;EACTC,IAAI,GAAG,QAAQ;EACfC,OAAO,EAAEC;AACE,CAAC,KAAK;EACjB,MAAMC,QAAQ,GAAGhC,WAAW,CAAC,CAAC;EAI9B,MAAM8B,OAAO,GAAGC,WAAW,KAAK,UAAU,GAAG,WAAW,GAAGA,WAAW;EACtE,MAAME,cAAc,GAAG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,SAAS,EACTC,cAAc,EACdE,OAAO,EACPC,IAAI,EACJC,EAAE,EACFC,UAAU,EACVC,WAAW,EACXE,KAAK,EACLC,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNE,SAAS,EACTC,IAAI,EACJC,OAAO,CAEX,CAAC;EAED,IAAIH,WAAW,EAAE;IACf,OACExB,IAAA,CAACF,OAAO;MAAC2C,QAAQ,EAAC,aAAa;MAACC,SAAS,EAAC,KAAK;MAACC,IAAI,EAAEnB,WAAY;MAAAgB,QAAA,EAChExC,IAAA,CAACJ,eAAe,CAACgD,QAAQ;QAAAJ,QAAA,EAAEN;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACL,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMgB,cAAc,GAAGvD,IAAI,CAACc,MAAM,CAAC;AACnCyC,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIzC,MAAM"}
package/dist/Callout.js CHANGED
@@ -14,14 +14,50 @@ import _AlertTitle from "@mui/material/AlertTitle";
14
14
  * See the License for the specific language governing permissions and limitations under the License.
15
15
  */
16
16
 
17
+ import styled from "@emotion/styled";
17
18
  import { memo } from "react";
18
- import { ScreenReaderText } from "./ScreenReaderText.js";
19
19
  import { useTranslation } from "react-i18next";
20
- import { Paragraph } from "./Typography.js";
21
20
  import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
22
- import styled from "@emotion/styled";
21
+ import { Paragraph } from "./Typography.js";
22
+ import { useUniqueId } from "./useUniqueId.js";
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ export const CalloutTestSelectors = {
26
+ feature: {
27
+ link: {
28
+ selector: {
29
+ method: "ByRole",
30
+ options: {
31
+ name: "${linkText}"
32
+ },
33
+ role: "link",
34
+ templateVariableNames: ["linkText"]
35
+ }
36
+ },
37
+ text: {
38
+ selector: {
39
+ method: "ByText",
40
+ templateVariableNames: ["text"],
41
+ text: "${text}"
42
+ }
43
+ },
44
+ title: {
45
+ selector: {
46
+ method: "ByText",
47
+ templateVariableNames: ["title"],
48
+ text: "${title}"
49
+ }
50
+ }
51
+ },
52
+ selector: {
53
+ method: "ByRole",
54
+ options: {
55
+ name: "${title}"
56
+ },
57
+ role: "${role}",
58
+ templateVariableNames: ["role", "title"]
59
+ }
60
+ };
25
61
  export const calloutRoleValues = ["status", "alert"];
26
62
  export const calloutSeverityValues = ["success", "info", "warning", "error"];
27
63
  const ContentContainer = styled("div", {
@@ -48,15 +84,17 @@ const Callout = ({
48
84
  t
49
85
  } = useTranslation();
50
86
  const odysseyDesignTokens = useOdysseyDesignTokens();
87
+ const titleId = useUniqueId();
51
88
  return _jsxs(_Alert, {
89
+ "aria-label": t(`severity.${severity}`),
90
+ "aria-labelledby": titleId,
52
91
  "data-se": testId,
53
92
  role: role,
54
93
  severity: severity,
55
94
  variant: "callout",
56
- children: [_jsx(ScreenReaderText, {
57
- translate: translate,
58
- children: t(`severity.${severity}`)
59
- }), title && _jsx(_AlertTitle, {
95
+ children: [title && _jsx(_AlertTitle, {
96
+ "aria-hidden": true,
97
+ id: titleId,
60
98
  translate: translate,
61
99
  children: title
62
100
  }), _jsxs(ContentContainer, {
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.js","names":["memo","ScreenReaderText","useTranslation","Paragraph","useOdysseyDesignTokens","styled","jsx","_jsx","jsxs","_jsxs","calloutRoleValues","calloutSeverityValues","ContentContainer","shouldForwardProp","prop","odysseyDesignTokens","marginBlockStart","Spacing4","Callout","children","linkText","linkUrl","role","severity","testId","text","title","translate","t","_Alert","variant","_AlertTitle","_Box","component","_Link","href","MemoizedCallout","displayName"],"sources":["../src/Callout.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 { Alert, AlertTitle, Box, Link as MuiLink } from \"@mui/material\";\nimport { ScreenReaderText } from \"./ScreenReaderText\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\nimport { Paragraph } from \"./Typography\";\n\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport styled from \"@emotion/styled\";\n\nexport const calloutRoleValues = [\"status\", \"alert\"] as const;\nexport const calloutSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type CalloutProps = {\n /**\n * Used to optionally pass a text list to the component\n */\n children?: ReactNode;\n /**\n * Sets the ARIA role of the Callout\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof calloutRoleValues)[number];\n /**\n * Determine the color and icon of the Callout\n */\n severity: (typeof calloutSeverityValues)[number];\n /**\n * The text content of the Callout\n */\n text?: string;\n /**\n * The title of the Callout\n */\n title?: string;\n} & (\n | {\n text: string;\n children?: never;\n }\n | {\n text?: never;\n children: ReactNode;\n }\n) &\n (\n | {\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkUrl: string;\n /**\n * If defined, the Toast will include a link to the URL\n */\n linkText: string;\n }\n | {\n linkUrl?: never;\n linkText?: never;\n }\n ) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst ContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({\n \"& > * + *\": {\n marginBlockStart: odysseyDesignTokens.Spacing4,\n },\n}));\n\nconst Callout = ({\n children,\n linkText,\n linkUrl,\n role,\n severity,\n testId,\n text,\n title,\n translate,\n}: CalloutProps) => {\n const { t } = useTranslation();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <Alert data-se={testId} role={role} severity={severity} variant=\"callout\">\n <ScreenReaderText translate={translate}>\n {t(`severity.${severity}`)}\n </ScreenReaderText>\n {title && <AlertTitle translate={translate}>{title}</AlertTitle>}\n <ContentContainer odysseyDesignTokens={odysseyDesignTokens}>\n {children && <Box component=\"div\">{children}</Box>}\n {text && <Paragraph>{text}</Paragraph>}\n {linkUrl && (\n <Box>\n <MuiLink href={linkUrl} variant=\"monochrome\">\n {linkText}\n </MuiLink>\n </Box>\n )}\n </ContentContainer>\n </Alert>\n );\n};\n\nconst MemoizedCallout = memo(Callout);\nMemoizedCallout.displayName = \"Callout\";\n\nexport { MemoizedCallout as Callout };\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAmB,OAAO;AAAC,SAE/BC,gBAAgB;AACzB,SAASC,cAAc,QAAQ,eAAe;AAAC,SAGtCC,SAAS;AAAA,SAIhBC,sBAAsB;AAExB,OAAOC,MAAM,MAAM,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErC,OAAO,MAAMC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU;AAC7D,OAAO,MAAMC,qBAAqB,GAAG,CACnC,SAAS,EACT,MAAM,EACN,SAAS,EACT,OAAO,CACC;AAuDV,MAAMC,gBAAgB,GAAGP,MAAM,CAAC,KAAK,EAAE;EACrCQ,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAAC,CAAC;EAAEC;AAA2D,CAAC,MAAM;E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,IAAI,CAACkB,OAAO,CAAC;AACrCkB,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAIlB,OAAO"}
1
+ {"version":3,"file":"Callout.js","names":["styled","memo","useTranslation","useOdysseyDesignTokens","Paragraph","useUniqueId","jsx","_jsx","jsxs","_jsxs","CalloutTestSelectors","feature","link","selector","method","options","name","role","templateVariableNames","text","title","calloutRoleValues","calloutSeverityValues","ContentContainer","shouldForwardProp","prop","odysseyDesignTokens","marginBlockStart","Spacing4","Callout","children","linkText","linkUrl","severity","testId","translate","t","titleId","_Alert","variant","_AlertTitle","id","_Box","component","_Link","href","MemoizedCallout","displayName"],"sources":["../src/Callout.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { Alert, AlertTitle, Box, Link as MuiLink } from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext\";\nimport { type FeatureTestSelector } from \"./test-selectors\";\nimport { Paragraph } from \"./Typography\";\nimport { useUniqueId } from \"./useUniqueId\";\n\nexport const CalloutTestSelectors = {\n feature: {\n link: {\n selector: {\n method: \"ByRole\",\n options: {\n name: \"${linkText}\",\n },\n role: \"link\",\n templateVariableNames: [\"linkText\"],\n },\n },\n text: {\n selector: {\n method: \"ByText\",\n templateVariableNames: [\"text\"],\n text: \"${text}\",\n },\n },\n title: {\n selector: {\n method: \"ByText\",\n templateVariableNames: [\"title\"],\n text: \"${title}\",\n },\n },\n },\n selector: {\n method: \"ByRole\",\n options: {\n name: \"${title}\",\n },\n role: \"${role}\",\n templateVariableNames: [\"role\", \"title\"],\n },\n} as const satisfies FeatureTestSelector;\n\nexport const calloutRoleValues = [\"status\", \"alert\"] as const;\nexport const calloutSeverityValues = [\n \"success\",\n \"info\",\n \"warning\",\n \"error\",\n] as const;\n\nexport type CalloutProps = {\n /**\n * Used to optionally pass a text list to the component\n */\n children?: ReactNode;\n /**\n * Sets the ARIA role of the Callout\n * (\"status\" for something that dynamically updates, \"alert\" for errors, null for something\n * unchanging)\n */\n role?: (typeof calloutRoleValues)[number];\n /**\n * Determine the color and icon of the Callout\n */\n severity: (typeof calloutSeverityValues)[number];\n /**\n * The text content of the Callout\n */\n text?: string;\n /**\n * The title of the Callout\n */\n title?: string;\n} & (\n | {\n children?: never;\n text: string;\n }\n | {\n children: ReactNode;\n text?: never;\n }\n) &\n (\n | {\n /**\n * If linkUrl is not undefined, this is the text of the link.\n * If left blank, it defaults to \"Learn more\".\n * Note that linkText does nothing if linkUrl is not defined\n */\n linkUrl: string;\n /**\n * If defined, the Toast will include a link to the URL\n */\n linkText: string;\n }\n | {\n linkUrl?: never;\n linkText?: never;\n }\n ) &\n Pick<HtmlProps, \"testId\" | \"translate\">;\n\nconst ContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({\n \"& > * + *\": {\n marginBlockStart: odysseyDesignTokens.Spacing4,\n },\n}));\n\nconst Callout = ({\n children,\n linkText,\n linkUrl,\n role,\n severity,\n testId,\n text,\n title,\n translate,\n}: CalloutProps) => {\n const { t } = useTranslation();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const titleId = useUniqueId();\n\n return (\n <Alert\n aria-label={t(`severity.${severity}`)}\n aria-labelledby={titleId}\n data-se={testId}\n role={role}\n severity={severity}\n variant=\"callout\"\n >\n {title && (\n <AlertTitle aria-hidden id={titleId} translate={translate}>\n {title}\n </AlertTitle>\n )}\n\n <ContentContainer odysseyDesignTokens={odysseyDesignTokens}>\n {children && <Box component=\"div\">{children}</Box>}\n {text && <Paragraph>{text}</Paragraph>}\n {linkUrl && (\n <Box>\n <MuiLink href={linkUrl} variant=\"monochrome\">\n {linkText}\n </MuiLink>\n </Box>\n )}\n </ContentContainer>\n </Alert>\n );\n};\n\nconst MemoizedCallout = memo(Callout);\nMemoizedCallout.displayName = \"Callout\";\n\nexport { MemoizedCallout as Callout };\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,SAASC,IAAI,QAAmB,OAAO;AACvC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAK7CC,sBAAsB;AAAA,SAGfC,SAAS;AAAA,SACTC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpB,OAAO,MAAMC,oBAAoB,GAAG;EAClCC,OAAO,EAAE;IACPC,IAAI,EAAE;MACJC,QAAQ,EAAE;QACRC,MAAM,EAAE,QAAQ;QAChBC,OAAO,EAAE;UACPC,IAAI,EAAE;QACR,CAAC;QACDC,IAAI,EAAE,MAAM;QACZC,qBAAqB,EAAE,CAAC,UAAU;MACpC;IACF,CAAC;IACDC,IAAI,EAAE;MACJN,QAAQ,EAAE;QACRC,MAAM,EAAE,QAAQ;QAChBI,qBAAqB,EAAE,CAAC,MAAM,CAAC;QAC/BC,IAAI,EAAE;MACR;IACF,CAAC;IACDC,KAAK,EAAE;MACLP,QAAQ,EAAE;QACRC,MAAM,EAAE,QAAQ;QAChBI,qBAAqB,EAAE,CAAC,OAAO,CAAC;QAChCC,IAAI,EAAE;MACR;IACF;EACF,CAAC;EACDN,QAAQ,EAAE;IACRC,MAAM,EAAE,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