@okta/odyssey-react-mui 1.42.0 → 1.44.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 (1482) hide show
  1. package/README.md +41 -0
  2. package/dist/cjs/@types/i18next.d.cjs.map +1 -1
  3. package/dist/cjs/@types/properties.d.cjs.map +1 -1
  4. package/dist/cjs/Accordion.cjs +1 -1
  5. package/dist/cjs/Accordion.cjs.map +1 -1
  6. package/dist/cjs/Autocomplete.cjs.map +1 -1
  7. package/dist/cjs/Badge.cjs +1 -1
  8. package/dist/cjs/Badge.cjs.map +1 -1
  9. package/dist/cjs/Banner.cjs.map +1 -1
  10. package/dist/cjs/Box.cjs +1 -1
  11. package/dist/cjs/Box.cjs.map +1 -1
  12. package/dist/cjs/Breadcrumbs.cjs +9 -9
  13. package/dist/cjs/Breadcrumbs.cjs.map +1 -1
  14. package/dist/cjs/Buttons/BaseButton.cjs +1 -1
  15. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  16. package/dist/cjs/Buttons/BaseMenuButton.cjs +10 -10
  17. package/dist/cjs/Buttons/BaseMenuButton.cjs.map +1 -1
  18. package/dist/cjs/Buttons/Button.cjs.map +1 -1
  19. package/dist/cjs/Buttons/MenuButton.cjs.map +1 -1
  20. package/dist/cjs/Buttons/MenuContext.cjs.map +1 -1
  21. package/dist/cjs/Buttons/MenuItem.cjs +1 -1
  22. package/dist/cjs/Buttons/MenuItem.cjs.map +1 -1
  23. package/dist/cjs/Buttons/index.cjs +1 -1
  24. package/dist/cjs/Buttons/index.cjs.map +1 -1
  25. package/dist/cjs/Callout.cjs.map +1 -1
  26. package/dist/cjs/Card.cjs +4 -4
  27. package/dist/cjs/Card.cjs.map +1 -1
  28. package/dist/cjs/Checkbox.cjs +11 -11
  29. package/dist/cjs/Checkbox.cjs.map +1 -1
  30. package/dist/cjs/CheckboxGroup.cjs.map +1 -1
  31. package/dist/cjs/CircularProgress.cjs +2 -2
  32. package/dist/cjs/CircularProgress.cjs.map +1 -1
  33. package/dist/cjs/DataTable/DataTable.cjs +125 -100
  34. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  35. package/dist/cjs/DataTable/DataTableRowActions.cjs +4 -4
  36. package/dist/cjs/DataTable/DataTableRowActions.cjs.map +1 -1
  37. package/dist/cjs/DataTable/DataTableSettings.cjs +4 -4
  38. package/dist/cjs/DataTable/DataTableSettings.cjs.map +1 -1
  39. package/dist/cjs/DataTable/index.cjs +1 -1
  40. package/dist/cjs/DataTable/index.cjs.map +1 -1
  41. package/dist/cjs/DataTable/reorderDataRowsLocally.cjs.map +1 -1
  42. package/dist/cjs/DataTable/useRowReordering.cjs +7 -3
  43. package/dist/cjs/DataTable/useRowReordering.cjs.map +1 -1
  44. package/dist/cjs/DataTable/useScrollIndication.cjs.map +1 -1
  45. package/dist/cjs/DatePickers/DateField.cjs +2 -2
  46. package/dist/cjs/DatePickers/DateField.cjs.map +1 -1
  47. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
  48. package/dist/cjs/DatePickers/DateFieldActionBar.cjs.map +1 -1
  49. package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +2 -2
  50. package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs.map +1 -1
  51. package/dist/cjs/DatePickers/DatePicker.cjs +15 -11
  52. package/dist/cjs/DatePickers/DatePicker.cjs.map +1 -1
  53. package/dist/cjs/DatePickers/datePickerTheme.cjs +1 -1
  54. package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
  55. package/dist/cjs/DatePickers/useOdysseyDateFields.cjs +1 -1
  56. package/dist/cjs/DatePickers/useOdysseyDateFields.cjs.map +1 -1
  57. package/dist/cjs/Dialog.cjs +5 -4
  58. package/dist/cjs/Dialog.cjs.map +1 -1
  59. package/dist/cjs/Drawer.cjs +23 -20
  60. package/dist/cjs/Drawer.cjs.map +1 -1
  61. package/dist/cjs/EmptyState.cjs +2 -2
  62. package/dist/cjs/EmptyState.cjs.map +1 -1
  63. package/dist/cjs/ErrorMessageList.cjs +3 -3
  64. package/dist/cjs/ErrorMessageList.cjs.map +1 -1
  65. package/dist/cjs/Field.cjs +3 -3
  66. package/dist/cjs/Field.cjs.map +1 -1
  67. package/dist/cjs/FieldError.cjs.map +1 -1
  68. package/dist/cjs/FieldHint.cjs +1 -1
  69. package/dist/cjs/FieldHint.cjs.map +1 -1
  70. package/dist/cjs/FieldLabel.cjs.map +1 -1
  71. package/dist/cjs/Fieldset.cjs +2 -2
  72. package/dist/cjs/Fieldset.cjs.map +1 -1
  73. package/dist/cjs/FileUploader/FileUploadIllustration.cjs +2 -2
  74. package/dist/cjs/FileUploader/FileUploadIllustration.cjs.map +1 -1
  75. package/dist/cjs/FileUploader/FileUploadPreview.cjs +5 -5
  76. package/dist/cjs/FileUploader/FileUploadPreview.cjs.map +1 -1
  77. package/dist/cjs/FileUploader/FileUploader.cjs +6 -6
  78. package/dist/cjs/FileUploader/FileUploader.cjs.map +1 -1
  79. package/dist/cjs/Form.cjs +2 -2
  80. package/dist/cjs/Form.cjs.map +1 -1
  81. package/dist/cjs/IconWithTooltip.cjs +1 -1
  82. package/dist/cjs/IconWithTooltip.cjs.map +1 -1
  83. package/dist/cjs/Link.cjs +1 -1
  84. package/dist/cjs/Link.cjs.map +1 -1
  85. package/dist/cjs/NativeSelect.cjs +1 -1
  86. package/dist/cjs/NativeSelect.cjs.map +1 -1
  87. package/dist/cjs/OdysseyCacheProvider.cjs +5 -5
  88. package/dist/cjs/OdysseyCacheProvider.cjs.map +1 -1
  89. package/dist/cjs/OdysseyProvider.cjs.map +1 -1
  90. package/dist/cjs/OdysseyThemeProvider.cjs +4 -4
  91. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  92. package/dist/cjs/OdysseyTranslationProvider.cjs +1 -1
  93. package/dist/cjs/OdysseyTranslationProvider.cjs.map +1 -1
  94. package/dist/cjs/Pagination/Pagination.cjs +24 -24
  95. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  96. package/dist/cjs/Pagination/usePagination.cjs +1 -1
  97. package/dist/cjs/Pagination/usePagination.cjs.map +1 -1
  98. package/dist/cjs/PasswordField.cjs +4 -4
  99. package/dist/cjs/PasswordField.cjs.map +1 -1
  100. package/dist/cjs/Radio.cjs +7 -7
  101. package/dist/cjs/Radio.cjs.map +1 -1
  102. package/dist/cjs/RadioGroup.cjs.map +1 -1
  103. package/dist/cjs/ScreenReaderText.cjs +2 -2
  104. package/dist/cjs/ScreenReaderText.cjs.map +1 -1
  105. package/dist/cjs/SearchField.cjs +13 -9
  106. package/dist/cjs/SearchField.cjs.map +1 -1
  107. package/dist/cjs/Select.cjs +44 -53
  108. package/dist/cjs/Select.cjs.map +1 -1
  109. package/dist/cjs/Stack.cjs.map +1 -1
  110. package/dist/cjs/Status.cjs +2 -0
  111. package/dist/cjs/Status.cjs.map +1 -1
  112. package/dist/cjs/Surface.cjs +1 -1
  113. package/dist/cjs/Surface.cjs.map +1 -1
  114. package/dist/cjs/Switch.cjs +9 -9
  115. package/dist/cjs/Switch.cjs.map +1 -1
  116. package/dist/cjs/Tabs.cjs +4 -4
  117. package/dist/cjs/Tabs.cjs.map +1 -1
  118. package/dist/cjs/Tag.cjs +2 -2
  119. package/dist/cjs/Tag.cjs.map +1 -1
  120. package/dist/cjs/TagList.cjs +1 -1
  121. package/dist/cjs/TagList.cjs.map +1 -1
  122. package/dist/cjs/TextField.cjs +2 -2
  123. package/dist/cjs/TextField.cjs.map +1 -1
  124. package/dist/cjs/Toast.cjs +3 -3
  125. package/dist/cjs/Toast.cjs.map +1 -1
  126. package/dist/cjs/ToastStack.cjs.map +1 -1
  127. package/dist/cjs/Tooltip.cjs +1 -1
  128. package/dist/cjs/Tooltip.cjs.map +1 -1
  129. package/dist/cjs/Typography.cjs +32 -8
  130. package/dist/cjs/Typography.cjs.map +1 -1
  131. package/dist/cjs/hexToRgb.cjs.map +1 -1
  132. package/dist/cjs/i18n.cjs +1 -1
  133. package/dist/cjs/i18n.cjs.map +1 -1
  134. package/dist/cjs/icons.generated/Add.cjs +4 -4
  135. package/dist/cjs/icons.generated/Add.cjs.map +1 -1
  136. package/dist/cjs/icons.generated/AddCircle.cjs +4 -4
  137. package/dist/cjs/icons.generated/AddCircle.cjs.map +1 -1
  138. package/dist/cjs/icons.generated/Apps.cjs +4 -4
  139. package/dist/cjs/icons.generated/Apps.cjs.map +1 -1
  140. package/dist/cjs/icons.generated/ArrowBottom.cjs +4 -4
  141. package/dist/cjs/icons.generated/ArrowBottom.cjs.map +1 -1
  142. package/dist/cjs/icons.generated/ArrowDown.cjs +4 -4
  143. package/dist/cjs/icons.generated/ArrowDown.cjs.map +1 -1
  144. package/dist/cjs/icons.generated/ArrowLeft.cjs +4 -4
  145. package/dist/cjs/icons.generated/ArrowLeft.cjs.map +1 -1
  146. package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +4 -4
  147. package/dist/cjs/icons.generated/ArrowLowerLeft.cjs.map +1 -1
  148. package/dist/cjs/icons.generated/ArrowLowerRight.cjs +4 -4
  149. package/dist/cjs/icons.generated/ArrowLowerRight.cjs.map +1 -1
  150. package/dist/cjs/icons.generated/ArrowRight.cjs +4 -4
  151. package/dist/cjs/icons.generated/ArrowRight.cjs.map +1 -1
  152. package/dist/cjs/icons.generated/ArrowTop.cjs +4 -4
  153. package/dist/cjs/icons.generated/ArrowTop.cjs.map +1 -1
  154. package/dist/cjs/icons.generated/ArrowUnsorted.cjs +4 -4
  155. package/dist/cjs/icons.generated/ArrowUnsorted.cjs.map +1 -1
  156. package/dist/cjs/icons.generated/ArrowUp.cjs +4 -4
  157. package/dist/cjs/icons.generated/ArrowUp.cjs.map +1 -1
  158. package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +4 -4
  159. package/dist/cjs/icons.generated/ArrowUpperLeft.cjs.map +1 -1
  160. package/dist/cjs/icons.generated/ArrowUpperRight.cjs +4 -4
  161. package/dist/cjs/icons.generated/ArrowUpperRight.cjs.map +1 -1
  162. package/dist/cjs/icons.generated/Bug.cjs +4 -4
  163. package/dist/cjs/icons.generated/Bug.cjs.map +1 -1
  164. package/dist/cjs/icons.generated/Calendar.cjs +4 -4
  165. package/dist/cjs/icons.generated/Calendar.cjs.map +1 -1
  166. package/dist/cjs/icons.generated/Call.cjs +4 -4
  167. package/dist/cjs/icons.generated/Call.cjs.map +1 -1
  168. package/dist/cjs/icons.generated/Chat.cjs +4 -4
  169. package/dist/cjs/icons.generated/Chat.cjs.map +1 -1
  170. package/dist/cjs/icons.generated/Check.cjs +4 -4
  171. package/dist/cjs/icons.generated/Check.cjs.map +1 -1
  172. package/dist/cjs/icons.generated/CheckCircleFilled.cjs +4 -4
  173. package/dist/cjs/icons.generated/CheckCircleFilled.cjs.map +1 -1
  174. package/dist/cjs/icons.generated/ChevronDown.cjs +4 -4
  175. package/dist/cjs/icons.generated/ChevronDown.cjs.map +1 -1
  176. package/dist/cjs/icons.generated/ChevronLeft.cjs +4 -4
  177. package/dist/cjs/icons.generated/ChevronLeft.cjs.map +1 -1
  178. package/dist/cjs/icons.generated/ChevronRight.cjs +4 -4
  179. package/dist/cjs/icons.generated/ChevronRight.cjs.map +1 -1
  180. package/dist/cjs/icons.generated/ChevronUp.cjs +4 -4
  181. package/dist/cjs/icons.generated/ChevronUp.cjs.map +1 -1
  182. package/dist/cjs/icons.generated/Clock.cjs +4 -4
  183. package/dist/cjs/icons.generated/Clock.cjs.map +1 -1
  184. package/dist/cjs/icons.generated/Close.cjs +4 -4
  185. package/dist/cjs/icons.generated/Close.cjs.map +1 -1
  186. package/dist/cjs/icons.generated/CloseCircleFilled.cjs +4 -4
  187. package/dist/cjs/icons.generated/CloseCircleFilled.cjs.map +1 -1
  188. package/dist/cjs/icons.generated/CollapseLeft.cjs +4 -4
  189. package/dist/cjs/icons.generated/CollapseLeft.cjs.map +1 -1
  190. package/dist/cjs/icons.generated/CollapseRight.cjs +4 -4
  191. package/dist/cjs/icons.generated/CollapseRight.cjs.map +1 -1
  192. package/dist/cjs/icons.generated/Copy.cjs +4 -4
  193. package/dist/cjs/icons.generated/Copy.cjs.map +1 -1
  194. package/dist/cjs/icons.generated/Custom.cjs +2 -2
  195. package/dist/cjs/icons.generated/Custom.cjs.map +1 -1
  196. package/dist/cjs/icons.generated/DangerDiamond.cjs +4 -4
  197. package/dist/cjs/icons.generated/DangerDiamond.cjs.map +1 -1
  198. package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +4 -4
  199. package/dist/cjs/icons.generated/DangerDiamondFilled.cjs.map +1 -1
  200. package/dist/cjs/icons.generated/Delete.cjs +4 -4
  201. package/dist/cjs/icons.generated/Delete.cjs.map +1 -1
  202. package/dist/cjs/icons.generated/Deny.cjs +4 -4
  203. package/dist/cjs/icons.generated/Deny.cjs.map +1 -1
  204. package/dist/cjs/icons.generated/Devices.cjs +4 -4
  205. package/dist/cjs/icons.generated/Devices.cjs.map +1 -1
  206. package/dist/cjs/icons.generated/Directory.cjs +4 -4
  207. package/dist/cjs/icons.generated/Directory.cjs.map +1 -1
  208. package/dist/cjs/icons.generated/Documentation.cjs +4 -4
  209. package/dist/cjs/icons.generated/Documentation.cjs.map +1 -1
  210. package/dist/cjs/icons.generated/Download.cjs +4 -4
  211. package/dist/cjs/icons.generated/Download.cjs.map +1 -1
  212. package/dist/cjs/icons.generated/DragIndicator.cjs +4 -4
  213. package/dist/cjs/icons.generated/DragIndicator.cjs.map +1 -1
  214. package/dist/cjs/icons.generated/Duo.cjs +2 -2
  215. package/dist/cjs/icons.generated/Duo.cjs.map +1 -1
  216. package/dist/cjs/icons.generated/Edit.cjs +4 -4
  217. package/dist/cjs/icons.generated/Edit.cjs.map +1 -1
  218. package/dist/cjs/icons.generated/Email.cjs +4 -4
  219. package/dist/cjs/icons.generated/Email.cjs.map +1 -1
  220. package/dist/cjs/icons.generated/ExpandLeft.cjs +4 -4
  221. package/dist/cjs/icons.generated/ExpandLeft.cjs.map +1 -1
  222. package/dist/cjs/icons.generated/ExpandRight.cjs +4 -4
  223. package/dist/cjs/icons.generated/ExpandRight.cjs.map +1 -1
  224. package/dist/cjs/icons.generated/ExternalLink.cjs +4 -4
  225. package/dist/cjs/icons.generated/ExternalLink.cjs.map +1 -1
  226. package/dist/cjs/icons.generated/Fido2.cjs +10 -10
  227. package/dist/cjs/icons.generated/Fido2.cjs.map +1 -1
  228. package/dist/cjs/icons.generated/Filter.cjs +4 -4
  229. package/dist/cjs/icons.generated/Filter.cjs.map +1 -1
  230. package/dist/cjs/icons.generated/Folder.cjs +4 -4
  231. package/dist/cjs/icons.generated/Folder.cjs.map +1 -1
  232. package/dist/cjs/icons.generated/Globe.cjs +4 -4
  233. package/dist/cjs/icons.generated/Globe.cjs.map +1 -1
  234. package/dist/cjs/icons.generated/GoogleAuth.cjs +12 -12
  235. package/dist/cjs/icons.generated/GoogleAuth.cjs.map +1 -1
  236. package/dist/cjs/icons.generated/Grid.cjs +20 -20
  237. package/dist/cjs/icons.generated/Grid.cjs.map +1 -1
  238. package/dist/cjs/icons.generated/Group.cjs +4 -4
  239. package/dist/cjs/icons.generated/Group.cjs.map +1 -1
  240. package/dist/cjs/icons.generated/Hide.cjs +4 -4
  241. package/dist/cjs/icons.generated/Hide.cjs.map +1 -1
  242. package/dist/cjs/icons.generated/Home.cjs +4 -4
  243. package/dist/cjs/icons.generated/Home.cjs.map +1 -1
  244. package/dist/cjs/icons.generated/Idp.cjs +4 -4
  245. package/dist/cjs/icons.generated/Idp.cjs.map +1 -1
  246. package/dist/cjs/icons.generated/InformationCircle.cjs +4 -4
  247. package/dist/cjs/icons.generated/InformationCircle.cjs.map +1 -1
  248. package/dist/cjs/icons.generated/InformationCircleFilled.cjs +4 -4
  249. package/dist/cjs/icons.generated/InformationCircleFilled.cjs.map +1 -1
  250. package/dist/cjs/icons.generated/Link.cjs +4 -4
  251. package/dist/cjs/icons.generated/Link.cjs.map +1 -1
  252. package/dist/cjs/icons.generated/List.cjs +4 -4
  253. package/dist/cjs/icons.generated/List.cjs.map +1 -1
  254. package/dist/cjs/icons.generated/Lock.cjs +4 -4
  255. package/dist/cjs/icons.generated/Lock.cjs.map +1 -1
  256. package/dist/cjs/icons.generated/More.cjs +4 -4
  257. package/dist/cjs/icons.generated/More.cjs.map +1 -1
  258. package/dist/cjs/icons.generated/Notification.cjs +4 -4
  259. package/dist/cjs/icons.generated/Notification.cjs.map +1 -1
  260. package/dist/cjs/icons.generated/OktaVerify.cjs +4 -4
  261. package/dist/cjs/icons.generated/OktaVerify.cjs.map +1 -1
  262. package/dist/cjs/icons.generated/OnPremMfa.cjs +2 -2
  263. package/dist/cjs/icons.generated/OnPremMfa.cjs.map +1 -1
  264. package/dist/cjs/icons.generated/OneTimePassword.cjs +2 -2
  265. package/dist/cjs/icons.generated/OneTimePassword.cjs.map +1 -1
  266. package/dist/cjs/icons.generated/Password.cjs +2 -2
  267. package/dist/cjs/icons.generated/Password.cjs.map +1 -1
  268. package/dist/cjs/icons.generated/Pause.cjs +4 -4
  269. package/dist/cjs/icons.generated/Pause.cjs.map +1 -1
  270. package/dist/cjs/icons.generated/QuestionCircle.cjs +4 -4
  271. package/dist/cjs/icons.generated/QuestionCircle.cjs.map +1 -1
  272. package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +4 -4
  273. package/dist/cjs/icons.generated/QuestionCircleFilled.cjs.map +1 -1
  274. package/dist/cjs/icons.generated/Refresh.cjs +4 -4
  275. package/dist/cjs/icons.generated/Refresh.cjs.map +1 -1
  276. package/dist/cjs/icons.generated/Reset.cjs +4 -4
  277. package/dist/cjs/icons.generated/Reset.cjs.map +1 -1
  278. package/dist/cjs/icons.generated/Resume.cjs +4 -4
  279. package/dist/cjs/icons.generated/Resume.cjs.map +1 -1
  280. package/dist/cjs/icons.generated/Search.cjs +4 -4
  281. package/dist/cjs/icons.generated/Search.cjs.map +1 -1
  282. package/dist/cjs/icons.generated/SecurityQuestion.cjs +4 -4
  283. package/dist/cjs/icons.generated/SecurityQuestion.cjs.map +1 -1
  284. package/dist/cjs/icons.generated/Send.cjs +37 -0
  285. package/dist/cjs/icons.generated/Send.cjs.map +1 -0
  286. package/dist/cjs/icons.generated/Server.cjs +4 -4
  287. package/dist/cjs/icons.generated/Server.cjs.map +1 -1
  288. package/dist/cjs/icons.generated/Settings.cjs +4 -4
  289. package/dist/cjs/icons.generated/Settings.cjs.map +1 -1
  290. package/dist/cjs/icons.generated/Show.cjs +4 -4
  291. package/dist/cjs/icons.generated/Show.cjs.map +1 -1
  292. package/dist/cjs/icons.generated/SmartCard.cjs +2 -2
  293. package/dist/cjs/icons.generated/SmartCard.cjs.map +1 -1
  294. package/dist/cjs/icons.generated/Sms.cjs +2 -2
  295. package/dist/cjs/icons.generated/Sms.cjs.map +1 -1
  296. package/dist/cjs/icons.generated/Subtract.cjs +4 -4
  297. package/dist/cjs/icons.generated/Subtract.cjs.map +1 -1
  298. package/dist/cjs/icons.generated/SymantecVip.cjs +2 -2
  299. package/dist/cjs/icons.generated/SymantecVip.cjs.map +1 -1
  300. package/dist/cjs/icons.generated/Sync.cjs +4 -4
  301. package/dist/cjs/icons.generated/Sync.cjs.map +1 -1
  302. package/dist/cjs/icons.generated/ThumbsDown.cjs +4 -4
  303. package/dist/cjs/icons.generated/ThumbsDown.cjs.map +1 -1
  304. package/dist/cjs/icons.generated/ThumbsUp.cjs +4 -4
  305. package/dist/cjs/icons.generated/ThumbsUp.cjs.map +1 -1
  306. package/dist/cjs/icons.generated/Unlock.cjs +4 -4
  307. package/dist/cjs/icons.generated/Unlock.cjs.map +1 -1
  308. package/dist/cjs/icons.generated/Upload.cjs +4 -4
  309. package/dist/cjs/icons.generated/Upload.cjs.map +1 -1
  310. package/dist/cjs/icons.generated/User.cjs +4 -4
  311. package/dist/cjs/icons.generated/User.cjs.map +1 -1
  312. package/dist/cjs/icons.generated/Video.cjs +4 -4
  313. package/dist/cjs/icons.generated/Video.cjs.map +1 -1
  314. package/dist/cjs/icons.generated/VoiceCall.cjs +4 -4
  315. package/dist/cjs/icons.generated/VoiceCall.cjs.map +1 -1
  316. package/dist/cjs/icons.generated/Warning.cjs +4 -4
  317. package/dist/cjs/icons.generated/Warning.cjs.map +1 -1
  318. package/dist/cjs/icons.generated/WarningFilled.cjs +4 -4
  319. package/dist/cjs/icons.generated/WarningFilled.cjs.map +1 -1
  320. package/dist/cjs/icons.generated/Yubikey.cjs +2 -2
  321. package/dist/cjs/icons.generated/Yubikey.cjs.map +1 -1
  322. package/dist/cjs/icons.generated/index.cjs +19 -8
  323. package/dist/cjs/icons.generated/index.cjs.map +1 -1
  324. package/dist/cjs/inputUtils.cjs.map +1 -1
  325. package/dist/cjs/labs/AppTile.cjs +21 -21
  326. package/dist/cjs/labs/AppTile.cjs.map +1 -1
  327. package/dist/cjs/labs/DataFilters.cjs +54 -53
  328. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  329. package/dist/cjs/labs/DataTable.cjs +19 -19
  330. package/dist/cjs/labs/DataTable.cjs.map +1 -1
  331. package/dist/cjs/labs/DataTablePagination.cjs +9 -9
  332. package/dist/cjs/labs/DataTablePagination.cjs.map +1 -1
  333. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +2 -2
  334. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  335. package/dist/cjs/labs/DataView/CardLayoutContent.cjs +7 -7
  336. package/dist/cjs/labs/DataView/CardLayoutContent.cjs.map +1 -1
  337. package/dist/cjs/labs/DataView/DataCard.cjs +7 -7
  338. package/dist/cjs/labs/DataView/DataCard.cjs.map +1 -1
  339. package/dist/cjs/labs/DataView/DataTable.cjs.map +1 -1
  340. package/dist/cjs/labs/DataView/DataView.cjs +25 -16
  341. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  342. package/dist/cjs/labs/DataView/DetailPanel.cjs.map +1 -1
  343. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +2 -2
  344. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs.map +1 -1
  345. package/dist/cjs/labs/DataView/RowActions.cjs +13 -14
  346. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  347. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +18 -20
  348. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  349. package/dist/cjs/labs/DataView/TableSettings.cjs +9 -9
  350. package/dist/cjs/labs/DataView/TableSettings.cjs.map +1 -1
  351. package/dist/cjs/labs/DataView/componentTypes.cjs.map +1 -1
  352. package/dist/cjs/labs/DataView/fetchData.cjs.map +1 -1
  353. package/dist/cjs/labs/DataView/index.cjs.map +1 -1
  354. package/dist/cjs/labs/DataView/tableConstants.cjs.map +1 -1
  355. package/dist/cjs/labs/DataView/testSupportData.cjs.map +1 -1
  356. package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
  357. package/dist/cjs/labs/DatePickers/DateTimeField.cjs +2 -2
  358. package/dist/cjs/labs/DatePickers/DateTimeField.cjs.map +1 -1
  359. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +14 -10
  360. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  361. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs +2 -2
  362. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs.map +1 -1
  363. package/dist/cjs/labs/GroupPicker.cjs +5 -5
  364. package/dist/cjs/labs/GroupPicker.cjs.map +1 -1
  365. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +3 -3
  366. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs.map +1 -1
  367. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +19 -13
  368. package/dist/cjs/labs/OdysseyPickers/Picker.cjs.map +1 -1
  369. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +7 -7
  370. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs.map +1 -1
  371. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +15 -14
  372. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  373. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +14 -15
  374. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs.map +1 -1
  375. package/dist/cjs/labs/OdysseyPickers/index.cjs.map +1 -1
  376. package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs.map +1 -1
  377. package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
  378. package/dist/cjs/labs/PageTemplate/Layout.cjs.map +1 -1
  379. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +3 -3
  380. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs.map +1 -1
  381. package/dist/cjs/labs/PaginatedTable.cjs +1 -1
  382. package/dist/cjs/labs/PaginatedTable.cjs.map +1 -1
  383. package/dist/cjs/labs/StaticTable.cjs.map +1 -1
  384. package/dist/cjs/labs/UserProfile.cjs.map +1 -1
  385. package/dist/cjs/labs/UserProfileMenuButton.cjs +7 -7
  386. package/dist/cjs/labs/UserProfileMenuButton.cjs.map +1 -1
  387. package/dist/cjs/labs/index.cjs +65 -65
  388. package/dist/cjs/labs/index.cjs.map +1 -1
  389. package/dist/cjs/properties/ts/odyssey-react-mui.cjs +5 -1
  390. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  391. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +0 -1
  392. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
  393. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +0 -1
  394. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
  395. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +0 -1
  396. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
  397. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +0 -1
  398. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
  399. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +0 -1
  400. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
  401. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs +0 -1
  402. package/dist/cjs/properties/ts/odyssey-react-mui_eu.cjs.map +1 -1
  403. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +0 -1
  404. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
  405. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +0 -1
  406. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
  407. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +0 -1
  408. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
  409. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +0 -1
  410. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
  411. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +0 -1
  412. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
  413. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +0 -1
  414. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
  415. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +0 -1
  416. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
  417. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +0 -1
  418. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
  419. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +0 -1
  420. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
  421. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +0 -1
  422. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
  423. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +0 -1
  424. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
  425. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs +9 -2
  426. package/dist/cjs/properties/ts/odyssey-react-mui_ok_PL.cjs.map +1 -1
  427. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs +133 -126
  428. package/dist/cjs/properties/ts/odyssey-react-mui_ok_SK.cjs.map +1 -1
  429. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +0 -1
  430. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
  431. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +0 -1
  432. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
  433. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +0 -1
  434. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
  435. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +0 -1
  436. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
  437. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +0 -1
  438. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
  439. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +0 -1
  440. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
  441. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +0 -1
  442. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
  443. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +0 -1
  444. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
  445. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +0 -1
  446. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
  447. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +0 -1
  448. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
  449. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +0 -1
  450. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
  451. package/dist/cjs/test-selectors/getByQuerySelector.cjs.map +1 -1
  452. package/dist/cjs/test-selectors/getComputedAccessibleText.cjs.map +1 -1
  453. package/dist/cjs/test-selectors/linkedHtmlSelectors.cjs +1 -1
  454. package/dist/cjs/test-selectors/linkedHtmlSelectors.cjs.map +1 -1
  455. package/dist/cjs/test-selectors/queryOdysseySelector.cjs +1 -1
  456. package/dist/cjs/test-selectors/queryOdysseySelector.cjs.map +1 -1
  457. package/dist/cjs/test-selectors/querySelector.cjs +1 -1
  458. package/dist/cjs/test-selectors/querySelector.cjs.map +1 -1
  459. package/dist/cjs/theme/components.cjs +9 -3
  460. package/dist/cjs/theme/components.cjs.map +1 -1
  461. package/dist/cjs/theme/components.types.cjs.map +1 -1
  462. package/dist/cjs/theme/createOdysseyMuiTheme.cjs +2 -2
  463. package/dist/cjs/theme/createOdysseyMuiTheme.cjs.map +1 -1
  464. package/dist/cjs/theme/mixins.types.cjs.map +1 -1
  465. package/dist/cjs/theme/typography.types.cjs.map +1 -1
  466. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +2 -2
  467. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs.map +1 -1
  468. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcherApp.cjs +9 -9
  469. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcherApp.cjs.map +1 -1
  470. package/dist/cjs/ui-shell/AppSwitcher/OktaAura.cjs +5 -5
  471. package/dist/cjs/ui-shell/AppSwitcher/OktaAura.cjs.map +1 -1
  472. package/dist/cjs/ui-shell/InnerAppContainer.cjs.map +1 -1
  473. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +5 -5
  474. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  475. package/dist/cjs/ui-shell/SideNav/CollapseIcon.cjs +2 -2
  476. package/dist/cjs/ui-shell/SideNav/CollapseIcon.cjs.map +1 -1
  477. package/dist/cjs/ui-shell/SideNav/HandleIcon.cjs +4 -4
  478. package/dist/cjs/ui-shell/SideNav/HandleIcon.cjs.map +1 -1
  479. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +5 -5
  480. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs.map +1 -1
  481. package/dist/cjs/ui-shell/SideNav/OktaLogo.cjs +2 -2
  482. package/dist/cjs/ui-shell/SideNav/OktaLogo.cjs.map +1 -1
  483. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +23 -22
  484. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  485. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +4 -4
  486. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs.map +1 -1
  487. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +4 -4
  488. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs.map +1 -1
  489. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +22 -22
  490. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
  491. package/dist/cjs/ui-shell/SideNav/SideNavItemContentContext.cjs.map +1 -1
  492. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +5 -5
  493. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs.map +1 -1
  494. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs +3 -3
  495. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs.map +1 -1
  496. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
  497. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
  498. package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs +5 -5
  499. package/dist/cjs/ui-shell/SideNav/SortableList/SortableItem.cjs.map +1 -1
  500. package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs +9 -9
  501. package/dist/cjs/ui-shell/SideNav/SortableList/SortableList.cjs.map +1 -1
  502. package/dist/cjs/ui-shell/SideNav/SortableList/SortableOverlay.cjs.map +1 -1
  503. package/dist/cjs/ui-shell/SideNav/index.cjs +1 -1
  504. package/dist/cjs/ui-shell/SideNav/index.cjs.map +1 -1
  505. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  506. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +4 -4
  507. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs.map +1 -1
  508. package/dist/cjs/ui-shell/TopNav/TopNav.cjs.map +1 -1
  509. package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs.map +1 -1
  510. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs.map +1 -1
  511. package/dist/cjs/ui-shell/UiShell.cjs +2 -2
  512. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  513. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  514. package/dist/cjs/ui-shell/WideUiShellContent.cjs +4 -4
  515. package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
  516. package/dist/cjs/ui-shell/renderUiShell.cjs +2 -2
  517. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  518. package/dist/cjs/ui-shell/useElementAtContainerEdge.cjs.map +1 -1
  519. package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs.map +1 -1
  520. package/dist/cjs/useAutocomplete.cjs +5 -5
  521. package/dist/cjs/useAutocomplete.cjs.map +1 -1
  522. package/dist/cjs/useContrastMode.cjs +1 -1
  523. package/dist/cjs/useContrastMode.cjs.map +1 -1
  524. package/dist/cjs/useSessionStorageState.cjs.map +1 -1
  525. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  526. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  527. package/dist/cjs/web-component/renderReactInWebComponent.cjs +1 -1
  528. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  529. package/dist/esm/@types/i18next.d.js.map +1 -1
  530. package/dist/esm/@types/properties.d.js.map +1 -1
  531. package/dist/esm/Accordion.js +1 -2
  532. package/dist/esm/Accordion.js.map +1 -1
  533. package/dist/esm/Autocomplete.js +0 -1
  534. package/dist/esm/Autocomplete.js.map +1 -1
  535. package/dist/esm/Badge.js +1 -1
  536. package/dist/esm/Badge.js.map +1 -1
  537. package/dist/esm/Banner.js +0 -1
  538. package/dist/esm/Banner.js.map +1 -1
  539. package/dist/esm/Box.js +1 -1
  540. package/dist/esm/Box.js.map +1 -1
  541. package/dist/esm/Breadcrumbs.js +10 -9
  542. package/dist/esm/Breadcrumbs.js.map +1 -1
  543. package/dist/esm/Buttons/BaseButton.js +1 -1
  544. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  545. package/dist/esm/Buttons/BaseMenuButton.js +10 -10
  546. package/dist/esm/Buttons/BaseMenuButton.js.map +1 -1
  547. package/dist/esm/Buttons/Button.js.map +1 -1
  548. package/dist/esm/Buttons/MenuButton.js.map +1 -1
  549. package/dist/esm/Buttons/MenuContext.js.map +1 -1
  550. package/dist/esm/Buttons/MenuItem.js +1 -1
  551. package/dist/esm/Buttons/MenuItem.js.map +1 -1
  552. package/dist/esm/Buttons/index.js +1 -1
  553. package/dist/esm/Buttons/index.js.map +1 -1
  554. package/dist/esm/Callout.js.map +1 -1
  555. package/dist/esm/Card.js +4 -4
  556. package/dist/esm/Card.js.map +1 -1
  557. package/dist/esm/Checkbox.js +11 -11
  558. package/dist/esm/Checkbox.js.map +1 -1
  559. package/dist/esm/CheckboxGroup.js +0 -1
  560. package/dist/esm/CheckboxGroup.js.map +1 -1
  561. package/dist/esm/CircularProgress.js +2 -3
  562. package/dist/esm/CircularProgress.js.map +1 -1
  563. package/dist/esm/DataTable/DataTable.js +111 -84
  564. package/dist/esm/DataTable/DataTable.js.map +1 -1
  565. package/dist/esm/DataTable/DataTableRowActions.js +4 -5
  566. package/dist/esm/DataTable/DataTableRowActions.js.map +1 -1
  567. package/dist/esm/DataTable/DataTableSettings.js +4 -5
  568. package/dist/esm/DataTable/DataTableSettings.js.map +1 -1
  569. package/dist/esm/DataTable/index.js +1 -1
  570. package/dist/esm/DataTable/index.js.map +1 -1
  571. package/dist/esm/DataTable/reorderDataRowsLocally.js.map +1 -1
  572. package/dist/esm/DataTable/useRowReordering.js +7 -3
  573. package/dist/esm/DataTable/useRowReordering.js.map +1 -1
  574. package/dist/esm/DataTable/useScrollIndication.js.map +1 -1
  575. package/dist/esm/DatePickers/DateField.js +2 -3
  576. package/dist/esm/DatePickers/DateField.js.map +1 -1
  577. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  578. package/dist/esm/DatePickers/DateFieldActionBar.js.map +1 -1
  579. package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +2 -2
  580. package/dist/esm/DatePickers/DateFieldLocalizationProvider.js.map +1 -1
  581. package/dist/esm/DatePickers/DatePicker.js +15 -11
  582. package/dist/esm/DatePickers/DatePicker.js.map +1 -1
  583. package/dist/esm/DatePickers/datePickerTheme.js +1 -1
  584. package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
  585. package/dist/esm/DatePickers/useOdysseyDateFields.js +1 -1
  586. package/dist/esm/DatePickers/useOdysseyDateFields.js.map +1 -1
  587. package/dist/esm/Dialog.js +5 -5
  588. package/dist/esm/Dialog.js.map +1 -1
  589. package/dist/esm/Drawer.js +23 -20
  590. package/dist/esm/Drawer.js.map +1 -1
  591. package/dist/esm/EmptyState.js +2 -2
  592. package/dist/esm/EmptyState.js.map +1 -1
  593. package/dist/esm/ErrorMessageList.js +3 -3
  594. package/dist/esm/ErrorMessageList.js.map +1 -1
  595. package/dist/esm/Field.js +3 -4
  596. package/dist/esm/Field.js.map +1 -1
  597. package/dist/esm/FieldError.js +0 -1
  598. package/dist/esm/FieldError.js.map +1 -1
  599. package/dist/esm/FieldHint.js +1 -1
  600. package/dist/esm/FieldHint.js.map +1 -1
  601. package/dist/esm/FieldLabel.js.map +1 -1
  602. package/dist/esm/Fieldset.js +2 -2
  603. package/dist/esm/Fieldset.js.map +1 -1
  604. package/dist/esm/FileUploader/FileUploadIllustration.js +2 -2
  605. package/dist/esm/FileUploader/FileUploadIllustration.js.map +1 -1
  606. package/dist/esm/FileUploader/FileUploadPreview.js +5 -5
  607. package/dist/esm/FileUploader/FileUploadPreview.js.map +1 -1
  608. package/dist/esm/FileUploader/FileUploader.js +6 -6
  609. package/dist/esm/FileUploader/FileUploader.js.map +1 -1
  610. package/dist/esm/Form.js +2 -2
  611. package/dist/esm/Form.js.map +1 -1
  612. package/dist/esm/IconWithTooltip.js +1 -1
  613. package/dist/esm/IconWithTooltip.js.map +1 -1
  614. package/dist/esm/Link.js +1 -2
  615. package/dist/esm/Link.js.map +1 -1
  616. package/dist/esm/NativeSelect.js +1 -2
  617. package/dist/esm/NativeSelect.js.map +1 -1
  618. package/dist/esm/OdysseyCacheProvider.js +1 -1
  619. package/dist/esm/OdysseyCacheProvider.js.map +1 -1
  620. package/dist/esm/OdysseyProvider.js +0 -1
  621. package/dist/esm/OdysseyProvider.js.map +1 -1
  622. package/dist/esm/OdysseyThemeProvider.js +4 -4
  623. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  624. package/dist/esm/OdysseyTranslationProvider.js +1 -1
  625. package/dist/esm/OdysseyTranslationProvider.js.map +1 -1
  626. package/dist/esm/Pagination/Pagination.js +24 -24
  627. package/dist/esm/Pagination/Pagination.js.map +1 -1
  628. package/dist/esm/Pagination/usePagination.js +1 -1
  629. package/dist/esm/Pagination/usePagination.js.map +1 -1
  630. package/dist/esm/PasswordField.js +4 -4
  631. package/dist/esm/PasswordField.js.map +1 -1
  632. package/dist/esm/Radio.js +7 -7
  633. package/dist/esm/Radio.js.map +1 -1
  634. package/dist/esm/RadioGroup.js +1 -1
  635. package/dist/esm/RadioGroup.js.map +1 -1
  636. package/dist/esm/ScreenReaderText.js +2 -3
  637. package/dist/esm/ScreenReaderText.js.map +1 -1
  638. package/dist/esm/SearchField.js +14 -9
  639. package/dist/esm/SearchField.js.map +1 -1
  640. package/dist/esm/Select.js +45 -54
  641. package/dist/esm/Select.js.map +1 -1
  642. package/dist/esm/Stack.js +0 -1
  643. package/dist/esm/Stack.js.map +1 -1
  644. package/dist/esm/Status.js +2 -1
  645. package/dist/esm/Status.js.map +1 -1
  646. package/dist/esm/Surface.js +1 -1
  647. package/dist/esm/Surface.js.map +1 -1
  648. package/dist/esm/Switch.js +9 -9
  649. package/dist/esm/Switch.js.map +1 -1
  650. package/dist/esm/Tabs.js +4 -4
  651. package/dist/esm/Tabs.js.map +1 -1
  652. package/dist/esm/Tag.js +3 -2
  653. package/dist/esm/Tag.js.map +1 -1
  654. package/dist/esm/TagList.js +1 -1
  655. package/dist/esm/TagList.js.map +1 -1
  656. package/dist/esm/TextField.js +3 -4
  657. package/dist/esm/TextField.js.map +1 -1
  658. package/dist/esm/Toast.js +4 -5
  659. package/dist/esm/Toast.js.map +1 -1
  660. package/dist/esm/ToastStack.js +0 -1
  661. package/dist/esm/ToastStack.js.map +1 -1
  662. package/dist/esm/Tooltip.js +1 -1
  663. package/dist/esm/Tooltip.js.map +1 -1
  664. package/dist/esm/Typography.js +34 -11
  665. package/dist/esm/Typography.js.map +1 -1
  666. package/dist/esm/hexToRgb.js.map +1 -1
  667. package/dist/esm/i18n.js +1 -1
  668. package/dist/esm/i18n.js.map +1 -1
  669. package/dist/esm/icons.generated/Add.js +4 -4
  670. package/dist/esm/icons.generated/Add.js.map +1 -1
  671. package/dist/esm/icons.generated/AddCircle.js +4 -4
  672. package/dist/esm/icons.generated/AddCircle.js.map +1 -1
  673. package/dist/esm/icons.generated/Apps.js +4 -4
  674. package/dist/esm/icons.generated/Apps.js.map +1 -1
  675. package/dist/esm/icons.generated/ArrowBottom.js +4 -4
  676. package/dist/esm/icons.generated/ArrowBottom.js.map +1 -1
  677. package/dist/esm/icons.generated/ArrowDown.js +4 -4
  678. package/dist/esm/icons.generated/ArrowDown.js.map +1 -1
  679. package/dist/esm/icons.generated/ArrowLeft.js +4 -4
  680. package/dist/esm/icons.generated/ArrowLeft.js.map +1 -1
  681. package/dist/esm/icons.generated/ArrowLowerLeft.js +4 -4
  682. package/dist/esm/icons.generated/ArrowLowerLeft.js.map +1 -1
  683. package/dist/esm/icons.generated/ArrowLowerRight.js +4 -4
  684. package/dist/esm/icons.generated/ArrowLowerRight.js.map +1 -1
  685. package/dist/esm/icons.generated/ArrowRight.js +4 -4
  686. package/dist/esm/icons.generated/ArrowRight.js.map +1 -1
  687. package/dist/esm/icons.generated/ArrowTop.js +4 -4
  688. package/dist/esm/icons.generated/ArrowTop.js.map +1 -1
  689. package/dist/esm/icons.generated/ArrowUnsorted.js +4 -4
  690. package/dist/esm/icons.generated/ArrowUnsorted.js.map +1 -1
  691. package/dist/esm/icons.generated/ArrowUp.js +4 -4
  692. package/dist/esm/icons.generated/ArrowUp.js.map +1 -1
  693. package/dist/esm/icons.generated/ArrowUpperLeft.js +4 -4
  694. package/dist/esm/icons.generated/ArrowUpperLeft.js.map +1 -1
  695. package/dist/esm/icons.generated/ArrowUpperRight.js +4 -4
  696. package/dist/esm/icons.generated/ArrowUpperRight.js.map +1 -1
  697. package/dist/esm/icons.generated/Bug.js +4 -4
  698. package/dist/esm/icons.generated/Bug.js.map +1 -1
  699. package/dist/esm/icons.generated/Calendar.js +4 -4
  700. package/dist/esm/icons.generated/Calendar.js.map +1 -1
  701. package/dist/esm/icons.generated/Call.js +4 -4
  702. package/dist/esm/icons.generated/Call.js.map +1 -1
  703. package/dist/esm/icons.generated/Chat.js +4 -4
  704. package/dist/esm/icons.generated/Chat.js.map +1 -1
  705. package/dist/esm/icons.generated/Check.js +4 -4
  706. package/dist/esm/icons.generated/Check.js.map +1 -1
  707. package/dist/esm/icons.generated/CheckCircleFilled.js +4 -4
  708. package/dist/esm/icons.generated/CheckCircleFilled.js.map +1 -1
  709. package/dist/esm/icons.generated/ChevronDown.js +4 -4
  710. package/dist/esm/icons.generated/ChevronDown.js.map +1 -1
  711. package/dist/esm/icons.generated/ChevronLeft.js +4 -4
  712. package/dist/esm/icons.generated/ChevronLeft.js.map +1 -1
  713. package/dist/esm/icons.generated/ChevronRight.js +4 -4
  714. package/dist/esm/icons.generated/ChevronRight.js.map +1 -1
  715. package/dist/esm/icons.generated/ChevronUp.js +4 -4
  716. package/dist/esm/icons.generated/ChevronUp.js.map +1 -1
  717. package/dist/esm/icons.generated/Clock.js +4 -4
  718. package/dist/esm/icons.generated/Clock.js.map +1 -1
  719. package/dist/esm/icons.generated/Close.js +4 -4
  720. package/dist/esm/icons.generated/Close.js.map +1 -1
  721. package/dist/esm/icons.generated/CloseCircleFilled.js +4 -4
  722. package/dist/esm/icons.generated/CloseCircleFilled.js.map +1 -1
  723. package/dist/esm/icons.generated/CollapseLeft.js +4 -4
  724. package/dist/esm/icons.generated/CollapseLeft.js.map +1 -1
  725. package/dist/esm/icons.generated/CollapseRight.js +4 -4
  726. package/dist/esm/icons.generated/CollapseRight.js.map +1 -1
  727. package/dist/esm/icons.generated/Copy.js +4 -4
  728. package/dist/esm/icons.generated/Copy.js.map +1 -1
  729. package/dist/esm/icons.generated/Custom.js +2 -2
  730. package/dist/esm/icons.generated/Custom.js.map +1 -1
  731. package/dist/esm/icons.generated/DangerDiamond.js +4 -4
  732. package/dist/esm/icons.generated/DangerDiamond.js.map +1 -1
  733. package/dist/esm/icons.generated/DangerDiamondFilled.js +4 -4
  734. package/dist/esm/icons.generated/DangerDiamondFilled.js.map +1 -1
  735. package/dist/esm/icons.generated/Delete.js +4 -4
  736. package/dist/esm/icons.generated/Delete.js.map +1 -1
  737. package/dist/esm/icons.generated/Deny.js +4 -4
  738. package/dist/esm/icons.generated/Deny.js.map +1 -1
  739. package/dist/esm/icons.generated/Devices.js +4 -4
  740. package/dist/esm/icons.generated/Devices.js.map +1 -1
  741. package/dist/esm/icons.generated/Directory.js +4 -4
  742. package/dist/esm/icons.generated/Directory.js.map +1 -1
  743. package/dist/esm/icons.generated/Documentation.js +4 -4
  744. package/dist/esm/icons.generated/Documentation.js.map +1 -1
  745. package/dist/esm/icons.generated/Download.js +4 -4
  746. package/dist/esm/icons.generated/Download.js.map +1 -1
  747. package/dist/esm/icons.generated/DragIndicator.js +4 -4
  748. package/dist/esm/icons.generated/DragIndicator.js.map +1 -1
  749. package/dist/esm/icons.generated/Duo.js +2 -2
  750. package/dist/esm/icons.generated/Duo.js.map +1 -1
  751. package/dist/esm/icons.generated/Edit.js +4 -4
  752. package/dist/esm/icons.generated/Edit.js.map +1 -1
  753. package/dist/esm/icons.generated/Email.js +4 -4
  754. package/dist/esm/icons.generated/Email.js.map +1 -1
  755. package/dist/esm/icons.generated/ExpandLeft.js +4 -4
  756. package/dist/esm/icons.generated/ExpandLeft.js.map +1 -1
  757. package/dist/esm/icons.generated/ExpandRight.js +4 -4
  758. package/dist/esm/icons.generated/ExpandRight.js.map +1 -1
  759. package/dist/esm/icons.generated/ExternalLink.js +4 -4
  760. package/dist/esm/icons.generated/ExternalLink.js.map +1 -1
  761. package/dist/esm/icons.generated/Fido2.js +10 -10
  762. package/dist/esm/icons.generated/Fido2.js.map +1 -1
  763. package/dist/esm/icons.generated/Filter.js +4 -4
  764. package/dist/esm/icons.generated/Filter.js.map +1 -1
  765. package/dist/esm/icons.generated/Folder.js +4 -4
  766. package/dist/esm/icons.generated/Folder.js.map +1 -1
  767. package/dist/esm/icons.generated/Globe.js +4 -4
  768. package/dist/esm/icons.generated/Globe.js.map +1 -1
  769. package/dist/esm/icons.generated/GoogleAuth.js +12 -12
  770. package/dist/esm/icons.generated/GoogleAuth.js.map +1 -1
  771. package/dist/esm/icons.generated/Grid.js +20 -20
  772. package/dist/esm/icons.generated/Grid.js.map +1 -1
  773. package/dist/esm/icons.generated/Group.js +4 -4
  774. package/dist/esm/icons.generated/Group.js.map +1 -1
  775. package/dist/esm/icons.generated/Hide.js +4 -4
  776. package/dist/esm/icons.generated/Hide.js.map +1 -1
  777. package/dist/esm/icons.generated/Home.js +4 -4
  778. package/dist/esm/icons.generated/Home.js.map +1 -1
  779. package/dist/esm/icons.generated/Idp.js +4 -4
  780. package/dist/esm/icons.generated/Idp.js.map +1 -1
  781. package/dist/esm/icons.generated/InformationCircle.js +4 -4
  782. package/dist/esm/icons.generated/InformationCircle.js.map +1 -1
  783. package/dist/esm/icons.generated/InformationCircleFilled.js +4 -4
  784. package/dist/esm/icons.generated/InformationCircleFilled.js.map +1 -1
  785. package/dist/esm/icons.generated/Link.js +4 -4
  786. package/dist/esm/icons.generated/Link.js.map +1 -1
  787. package/dist/esm/icons.generated/List.js +4 -4
  788. package/dist/esm/icons.generated/List.js.map +1 -1
  789. package/dist/esm/icons.generated/Lock.js +4 -4
  790. package/dist/esm/icons.generated/Lock.js.map +1 -1
  791. package/dist/esm/icons.generated/More.js +4 -4
  792. package/dist/esm/icons.generated/More.js.map +1 -1
  793. package/dist/esm/icons.generated/Notification.js +4 -4
  794. package/dist/esm/icons.generated/Notification.js.map +1 -1
  795. package/dist/esm/icons.generated/OktaVerify.js +4 -4
  796. package/dist/esm/icons.generated/OktaVerify.js.map +1 -1
  797. package/dist/esm/icons.generated/OnPremMfa.js +2 -2
  798. package/dist/esm/icons.generated/OnPremMfa.js.map +1 -1
  799. package/dist/esm/icons.generated/OneTimePassword.js +2 -2
  800. package/dist/esm/icons.generated/OneTimePassword.js.map +1 -1
  801. package/dist/esm/icons.generated/Password.js +2 -2
  802. package/dist/esm/icons.generated/Password.js.map +1 -1
  803. package/dist/esm/icons.generated/Pause.js +4 -4
  804. package/dist/esm/icons.generated/Pause.js.map +1 -1
  805. package/dist/esm/icons.generated/QuestionCircle.js +4 -4
  806. package/dist/esm/icons.generated/QuestionCircle.js.map +1 -1
  807. package/dist/esm/icons.generated/QuestionCircleFilled.js +4 -4
  808. package/dist/esm/icons.generated/QuestionCircleFilled.js.map +1 -1
  809. package/dist/esm/icons.generated/Refresh.js +4 -4
  810. package/dist/esm/icons.generated/Refresh.js.map +1 -1
  811. package/dist/esm/icons.generated/Reset.js +4 -4
  812. package/dist/esm/icons.generated/Reset.js.map +1 -1
  813. package/dist/esm/icons.generated/Resume.js +4 -4
  814. package/dist/esm/icons.generated/Resume.js.map +1 -1
  815. package/dist/esm/icons.generated/Search.js +4 -4
  816. package/dist/esm/icons.generated/Search.js.map +1 -1
  817. package/dist/esm/icons.generated/SecurityQuestion.js +4 -4
  818. package/dist/esm/icons.generated/SecurityQuestion.js.map +1 -1
  819. package/dist/esm/icons.generated/Send.js +32 -0
  820. package/dist/esm/icons.generated/Send.js.map +1 -0
  821. package/dist/esm/icons.generated/Server.js +4 -4
  822. package/dist/esm/icons.generated/Server.js.map +1 -1
  823. package/dist/esm/icons.generated/Settings.js +4 -4
  824. package/dist/esm/icons.generated/Settings.js.map +1 -1
  825. package/dist/esm/icons.generated/Show.js +4 -4
  826. package/dist/esm/icons.generated/Show.js.map +1 -1
  827. package/dist/esm/icons.generated/SmartCard.js +2 -2
  828. package/dist/esm/icons.generated/SmartCard.js.map +1 -1
  829. package/dist/esm/icons.generated/Sms.js +2 -2
  830. package/dist/esm/icons.generated/Sms.js.map +1 -1
  831. package/dist/esm/icons.generated/Subtract.js +4 -4
  832. package/dist/esm/icons.generated/Subtract.js.map +1 -1
  833. package/dist/esm/icons.generated/SymantecVip.js +2 -2
  834. package/dist/esm/icons.generated/SymantecVip.js.map +1 -1
  835. package/dist/esm/icons.generated/Sync.js +4 -4
  836. package/dist/esm/icons.generated/Sync.js.map +1 -1
  837. package/dist/esm/icons.generated/ThumbsDown.js +4 -4
  838. package/dist/esm/icons.generated/ThumbsDown.js.map +1 -1
  839. package/dist/esm/icons.generated/ThumbsUp.js +4 -4
  840. package/dist/esm/icons.generated/ThumbsUp.js.map +1 -1
  841. package/dist/esm/icons.generated/Unlock.js +4 -4
  842. package/dist/esm/icons.generated/Unlock.js.map +1 -1
  843. package/dist/esm/icons.generated/Upload.js +4 -4
  844. package/dist/esm/icons.generated/Upload.js.map +1 -1
  845. package/dist/esm/icons.generated/User.js +4 -4
  846. package/dist/esm/icons.generated/User.js.map +1 -1
  847. package/dist/esm/icons.generated/Video.js +4 -4
  848. package/dist/esm/icons.generated/Video.js.map +1 -1
  849. package/dist/esm/icons.generated/VoiceCall.js +4 -4
  850. package/dist/esm/icons.generated/VoiceCall.js.map +1 -1
  851. package/dist/esm/icons.generated/Warning.js +4 -4
  852. package/dist/esm/icons.generated/Warning.js.map +1 -1
  853. package/dist/esm/icons.generated/WarningFilled.js +4 -4
  854. package/dist/esm/icons.generated/WarningFilled.js.map +1 -1
  855. package/dist/esm/icons.generated/Yubikey.js +2 -2
  856. package/dist/esm/icons.generated/Yubikey.js.map +1 -1
  857. package/dist/esm/icons.generated/index.js +2 -1
  858. package/dist/esm/icons.generated/index.js.map +1 -1
  859. package/dist/esm/inputUtils.js.map +1 -1
  860. package/dist/esm/labs/AppTile.js +21 -21
  861. package/dist/esm/labs/AppTile.js.map +1 -1
  862. package/dist/esm/labs/DataFilters.js +54 -53
  863. package/dist/esm/labs/DataFilters.js.map +1 -1
  864. package/dist/esm/labs/DataTable.js +20 -21
  865. package/dist/esm/labs/DataTable.js.map +1 -1
  866. package/dist/esm/labs/DataTablePagination.js +9 -9
  867. package/dist/esm/labs/DataTablePagination.js.map +1 -1
  868. package/dist/esm/labs/DataView/BulkActionsMenu.js +2 -2
  869. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  870. package/dist/esm/labs/DataView/CardLayoutContent.js +7 -7
  871. package/dist/esm/labs/DataView/CardLayoutContent.js.map +1 -1
  872. package/dist/esm/labs/DataView/DataCard.js +7 -7
  873. package/dist/esm/labs/DataView/DataCard.js.map +1 -1
  874. package/dist/esm/labs/DataView/DataTable.js.map +1 -1
  875. package/dist/esm/labs/DataView/DataView.js +25 -16
  876. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  877. package/dist/esm/labs/DataView/DetailPanel.js.map +1 -1
  878. package/dist/esm/labs/DataView/LayoutSwitcher.js +2 -2
  879. package/dist/esm/labs/DataView/LayoutSwitcher.js.map +1 -1
  880. package/dist/esm/labs/DataView/RowActions.js +3 -2
  881. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  882. package/dist/esm/labs/DataView/TableLayoutContent.js +10 -12
  883. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  884. package/dist/esm/labs/DataView/TableSettings.js +3 -4
  885. package/dist/esm/labs/DataView/TableSettings.js.map +1 -1
  886. package/dist/esm/labs/DataView/componentTypes.js.map +1 -1
  887. package/dist/esm/labs/DataView/fetchData.js.map +1 -1
  888. package/dist/esm/labs/DataView/index.js.map +1 -1
  889. package/dist/esm/labs/DataView/tableConstants.js.map +1 -1
  890. package/dist/esm/labs/DataView/testSupportData.js.map +1 -1
  891. package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
  892. package/dist/esm/labs/DatePickers/DateTimeField.js +2 -3
  893. package/dist/esm/labs/DatePickers/DateTimeField.js.map +1 -1
  894. package/dist/esm/labs/DatePickers/DateTimePicker.js +14 -10
  895. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  896. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js +3 -3
  897. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js.map +1 -1
  898. package/dist/esm/labs/GroupPicker.js +5 -5
  899. package/dist/esm/labs/GroupPicker.js.map +1 -1
  900. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +3 -4
  901. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js.map +1 -1
  902. package/dist/esm/labs/OdysseyPickers/Picker.js +20 -14
  903. package/dist/esm/labs/OdysseyPickers/Picker.js.map +1 -1
  904. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +7 -7
  905. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js.map +1 -1
  906. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +15 -14
  907. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  908. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +14 -15
  909. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js.map +1 -1
  910. package/dist/esm/labs/OdysseyPickers/index.js.map +1 -1
  911. package/dist/esm/labs/PageTemplate/DocumentationLink.js +0 -1
  912. package/dist/esm/labs/PageTemplate/DocumentationLink.js.map +1 -1
  913. package/dist/esm/labs/PageTemplate/Layout.js +1 -1
  914. package/dist/esm/labs/PageTemplate/Layout.js.map +1 -1
  915. package/dist/esm/labs/PageTemplate/PageTemplate.js +3 -3
  916. package/dist/esm/labs/PageTemplate/PageTemplate.js.map +1 -1
  917. package/dist/esm/labs/PaginatedTable.js +2 -2
  918. package/dist/esm/labs/PaginatedTable.js.map +1 -1
  919. package/dist/esm/labs/StaticTable.js +1 -1
  920. package/dist/esm/labs/StaticTable.js.map +1 -1
  921. package/dist/esm/labs/UserProfile.js.map +1 -1
  922. package/dist/esm/labs/UserProfileMenuButton.js +7 -7
  923. package/dist/esm/labs/UserProfileMenuButton.js.map +1 -1
  924. package/dist/esm/labs/index.js +9 -9
  925. package/dist/esm/labs/index.js.map +1 -1
  926. package/dist/esm/properties/ts/odyssey-react-mui.js +5 -1
  927. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  928. package/dist/esm/properties/ts/odyssey-react-mui_cs.js +0 -1
  929. package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  930. package/dist/esm/properties/ts/odyssey-react-mui_da.js +0 -1
  931. package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
  932. package/dist/esm/properties/ts/odyssey-react-mui_de.js +0 -1
  933. package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
  934. package/dist/esm/properties/ts/odyssey-react-mui_el.js +0 -1
  935. package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
  936. package/dist/esm/properties/ts/odyssey-react-mui_es.js +0 -1
  937. package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
  938. package/dist/esm/properties/ts/odyssey-react-mui_eu.js +0 -1
  939. package/dist/esm/properties/ts/odyssey-react-mui_eu.js.map +1 -1
  940. package/dist/esm/properties/ts/odyssey-react-mui_fi.js +0 -1
  941. package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  942. package/dist/esm/properties/ts/odyssey-react-mui_fr.js +0 -1
  943. package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  944. package/dist/esm/properties/ts/odyssey-react-mui_ht.js +0 -1
  945. package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  946. package/dist/esm/properties/ts/odyssey-react-mui_hu.js +0 -1
  947. package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  948. package/dist/esm/properties/ts/odyssey-react-mui_id.js +0 -1
  949. package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
  950. package/dist/esm/properties/ts/odyssey-react-mui_it.js +0 -1
  951. package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
  952. package/dist/esm/properties/ts/odyssey-react-mui_ja.js +0 -1
  953. package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  954. package/dist/esm/properties/ts/odyssey-react-mui_ko.js +0 -1
  955. package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  956. package/dist/esm/properties/ts/odyssey-react-mui_ms.js +0 -1
  957. package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  958. package/dist/esm/properties/ts/odyssey-react-mui_nb.js +0 -1
  959. package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  960. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +0 -1
  961. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  962. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js +9 -2
  963. package/dist/esm/properties/ts/odyssey-react-mui_ok_PL.js.map +1 -1
  964. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js +133 -126
  965. package/dist/esm/properties/ts/odyssey-react-mui_ok_SK.js.map +1 -1
  966. package/dist/esm/properties/ts/odyssey-react-mui_pl.js +0 -1
  967. package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  968. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +0 -1
  969. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  970. package/dist/esm/properties/ts/odyssey-react-mui_ro.js +0 -1
  971. package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  972. package/dist/esm/properties/ts/odyssey-react-mui_ru.js +0 -1
  973. package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  974. package/dist/esm/properties/ts/odyssey-react-mui_sv.js +0 -1
  975. package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  976. package/dist/esm/properties/ts/odyssey-react-mui_th.js +0 -1
  977. package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
  978. package/dist/esm/properties/ts/odyssey-react-mui_tr.js +0 -1
  979. package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  980. package/dist/esm/properties/ts/odyssey-react-mui_uk.js +0 -1
  981. package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  982. package/dist/esm/properties/ts/odyssey-react-mui_vi.js +0 -1
  983. package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  984. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +0 -1
  985. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  986. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +0 -1
  987. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  988. package/dist/esm/test-selectors/getByQuerySelector.js.map +1 -1
  989. package/dist/esm/test-selectors/getComputedAccessibleText.js +1 -1
  990. package/dist/esm/test-selectors/getComputedAccessibleText.js.map +1 -1
  991. package/dist/esm/test-selectors/linkedHtmlSelectors.js +1 -1
  992. package/dist/esm/test-selectors/linkedHtmlSelectors.js.map +1 -1
  993. package/dist/esm/test-selectors/queryOdysseySelector.js +1 -1
  994. package/dist/esm/test-selectors/queryOdysseySelector.js.map +1 -1
  995. package/dist/esm/test-selectors/querySelector.js +1 -1
  996. package/dist/esm/test-selectors/querySelector.js.map +1 -1
  997. package/dist/esm/theme/components.js +9 -3
  998. package/dist/esm/theme/components.js.map +1 -1
  999. package/dist/esm/theme/components.types.js.map +1 -1
  1000. package/dist/esm/theme/createOdysseyMuiTheme.js +2 -2
  1001. package/dist/esm/theme/createOdysseyMuiTheme.js.map +1 -1
  1002. package/dist/esm/theme/mixins.types.js.map +1 -1
  1003. package/dist/esm/theme/typography.types.js.map +1 -1
  1004. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +2 -2
  1005. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js.map +1 -1
  1006. package/dist/esm/ui-shell/AppSwitcher/AppSwitcherApp.js +9 -9
  1007. package/dist/esm/ui-shell/AppSwitcher/AppSwitcherApp.js.map +1 -1
  1008. package/dist/esm/ui-shell/AppSwitcher/OktaAura.js +5 -5
  1009. package/dist/esm/ui-shell/AppSwitcher/OktaAura.js.map +1 -1
  1010. package/dist/esm/ui-shell/InnerAppContainer.js.map +1 -1
  1011. package/dist/esm/ui-shell/NarrowUiShellContent.js +5 -5
  1012. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  1013. package/dist/esm/ui-shell/SideNav/CollapseIcon.js +2 -2
  1014. package/dist/esm/ui-shell/SideNav/CollapseIcon.js.map +1 -1
  1015. package/dist/esm/ui-shell/SideNav/HandleIcon.js +4 -4
  1016. package/dist/esm/ui-shell/SideNav/HandleIcon.js.map +1 -1
  1017. package/dist/esm/ui-shell/SideNav/NavAccordion.js +5 -5
  1018. package/dist/esm/ui-shell/SideNav/NavAccordion.js.map +1 -1
  1019. package/dist/esm/ui-shell/SideNav/OktaLogo.js +2 -2
  1020. package/dist/esm/ui-shell/SideNav/OktaLogo.js.map +1 -1
  1021. package/dist/esm/ui-shell/SideNav/SideNav.js +24 -23
  1022. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  1023. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +4 -4
  1024. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js.map +1 -1
  1025. package/dist/esm/ui-shell/SideNav/SideNavHeader.js +4 -4
  1026. package/dist/esm/ui-shell/SideNav/SideNavHeader.js.map +1 -1
  1027. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +22 -22
  1028. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
  1029. package/dist/esm/ui-shell/SideNav/SideNavItemContentContext.js.map +1 -1
  1030. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +5 -5
  1031. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js.map +1 -1
  1032. package/dist/esm/ui-shell/SideNav/SideNavLogo.js +3 -3
  1033. package/dist/esm/ui-shell/SideNav/SideNavLogo.js.map +1 -1
  1034. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +3 -2
  1035. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
  1036. package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js +5 -5
  1037. package/dist/esm/ui-shell/SideNav/SortableList/SortableItem.js.map +1 -1
  1038. package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js +9 -9
  1039. package/dist/esm/ui-shell/SideNav/SortableList/SortableList.js.map +1 -1
  1040. package/dist/esm/ui-shell/SideNav/SortableList/SortableOverlay.js.map +1 -1
  1041. package/dist/esm/ui-shell/SideNav/index.js +1 -1
  1042. package/dist/esm/ui-shell/SideNav/index.js.map +1 -1
  1043. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  1044. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +4 -4
  1045. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js.map +1 -1
  1046. package/dist/esm/ui-shell/TopNav/TopNav.js.map +1 -1
  1047. package/dist/esm/ui-shell/TopNav/TopNavLinksList.js.map +1 -1
  1048. package/dist/esm/ui-shell/TopNav/TopNavListItem.js.map +1 -1
  1049. package/dist/esm/ui-shell/UiShell.js +2 -2
  1050. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  1051. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  1052. package/dist/esm/ui-shell/WideUiShellContent.js +4 -4
  1053. package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
  1054. package/dist/esm/ui-shell/renderUiShell.js +2 -2
  1055. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  1056. package/dist/esm/ui-shell/useElementAtContainerEdge.js +1 -1
  1057. package/dist/esm/ui-shell/useElementAtContainerEdge.js.map +1 -1
  1058. package/dist/esm/ui-shell/useUiShellBreakpoints.js.map +1 -1
  1059. package/dist/esm/useAutocomplete.js +6 -7
  1060. package/dist/esm/useAutocomplete.js.map +1 -1
  1061. package/dist/esm/useContrastMode.js +1 -1
  1062. package/dist/esm/useContrastMode.js.map +1 -1
  1063. package/dist/esm/useSessionStorageState.js.map +1 -1
  1064. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  1065. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  1066. package/dist/esm/web-component/renderReactInWebComponent.js +1 -1
  1067. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  1068. package/dist/tsconfig.production.tsbuildinfo +1 -1
  1069. package/dist/types/Accordion.d.ts +7 -7
  1070. package/dist/types/Accordion.d.ts.map +1 -1
  1071. package/dist/types/Autocomplete.d.ts +11 -11
  1072. package/dist/types/Autocomplete.d.ts.map +1 -1
  1073. package/dist/types/Badge.d.ts.map +1 -1
  1074. package/dist/types/Banner.d.ts.map +1 -1
  1075. package/dist/types/Box.d.ts.map +1 -1
  1076. package/dist/types/Breadcrumbs.d.ts.map +1 -1
  1077. package/dist/types/Buttons/BaseButton.d.ts +20 -20
  1078. package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
  1079. package/dist/types/Buttons/BaseMenuButton.d.ts +6 -6
  1080. package/dist/types/Buttons/BaseMenuButton.d.ts.map +1 -1
  1081. package/dist/types/Buttons/Button.d.ts.map +1 -1
  1082. package/dist/types/Buttons/MenuButton.d.ts.map +1 -1
  1083. package/dist/types/Buttons/MenuContext.d.ts.map +1 -1
  1084. package/dist/types/Buttons/MenuItem.d.ts +4 -4
  1085. package/dist/types/Buttons/MenuItem.d.ts.map +1 -1
  1086. package/dist/types/Buttons/index.d.ts +1 -1
  1087. package/dist/types/Buttons/index.d.ts.map +1 -1
  1088. package/dist/types/Callout.d.ts +1 -1
  1089. package/dist/types/Callout.d.ts.map +1 -1
  1090. package/dist/types/Card.d.ts +2 -2
  1091. package/dist/types/Card.d.ts.map +1 -1
  1092. package/dist/types/Checkbox.d.ts +6 -6
  1093. package/dist/types/Checkbox.d.ts.map +1 -1
  1094. package/dist/types/CheckboxGroup.d.ts +1 -1
  1095. package/dist/types/CheckboxGroup.d.ts.map +1 -1
  1096. package/dist/types/DataTable/DataTable.d.ts +43 -43
  1097. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  1098. package/dist/types/DataTable/DataTableRowActions.d.ts +2 -2
  1099. package/dist/types/DataTable/DataTableRowActions.d.ts.map +1 -1
  1100. package/dist/types/DataTable/DataTableSettings.d.ts +5 -5
  1101. package/dist/types/DataTable/DataTableSettings.d.ts.map +1 -1
  1102. package/dist/types/DataTable/index.d.ts +2 -2
  1103. package/dist/types/DataTable/index.d.ts.map +1 -1
  1104. package/dist/types/DataTable/reorderDataRowsLocally.d.ts +1 -1
  1105. package/dist/types/DataTable/reorderDataRowsLocally.d.ts.map +1 -1
  1106. package/dist/types/DataTable/useRowReordering.d.ts +10 -10
  1107. package/dist/types/DataTable/useRowReordering.d.ts.map +1 -1
  1108. package/dist/types/DataTable/useScrollIndication.d.ts +3 -3
  1109. package/dist/types/DataTable/useScrollIndication.d.ts.map +1 -1
  1110. package/dist/types/DatePickers/DateField.d.ts.map +1 -1
  1111. package/dist/types/DatePickers/DateFieldActionBar.d.ts.map +1 -1
  1112. package/dist/types/DatePickers/DateFieldLocalizationProvider.d.ts +1 -1
  1113. package/dist/types/DatePickers/DateFieldLocalizationProvider.d.ts.map +1 -1
  1114. package/dist/types/DatePickers/DatePicker.d.ts +2 -2
  1115. package/dist/types/DatePickers/DatePicker.d.ts.map +1 -1
  1116. package/dist/types/DatePickers/datePickerTheme.d.ts +1 -1
  1117. package/dist/types/DatePickers/datePickerTheme.d.ts.map +1 -1
  1118. package/dist/types/DatePickers/useOdysseyDateFields.d.ts +8 -8
  1119. package/dist/types/DatePickers/useOdysseyDateFields.d.ts.map +1 -1
  1120. package/dist/types/Dialog.d.ts +20 -16
  1121. package/dist/types/Dialog.d.ts.map +1 -1
  1122. package/dist/types/Drawer.d.ts +36 -14
  1123. package/dist/types/Drawer.d.ts.map +1 -1
  1124. package/dist/types/EmptyState.d.ts +4 -4
  1125. package/dist/types/EmptyState.d.ts.map +1 -1
  1126. package/dist/types/ErrorMessageList.d.ts.map +1 -1
  1127. package/dist/types/Field.d.ts +5 -5
  1128. package/dist/types/Field.d.ts.map +1 -1
  1129. package/dist/types/FieldError.d.ts.map +1 -1
  1130. package/dist/types/FieldHint.d.ts +2 -2
  1131. package/dist/types/FieldHint.d.ts.map +1 -1
  1132. package/dist/types/FieldLabel.d.ts.map +1 -1
  1133. package/dist/types/Fieldset.d.ts +1 -1
  1134. package/dist/types/Fieldset.d.ts.map +1 -1
  1135. package/dist/types/FileUploader/FileUploadPreview.d.ts.map +1 -1
  1136. package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
  1137. package/dist/types/Form.d.ts +1 -1
  1138. package/dist/types/Form.d.ts.map +1 -1
  1139. package/dist/types/IconWithTooltip.d.ts +1 -1
  1140. package/dist/types/IconWithTooltip.d.ts.map +1 -1
  1141. package/dist/types/Link.d.ts +1 -1
  1142. package/dist/types/Link.d.ts.map +1 -1
  1143. package/dist/types/NativeSelect.d.ts +4 -4
  1144. package/dist/types/NativeSelect.d.ts.map +1 -1
  1145. package/dist/types/OdysseyCacheProvider.d.ts.map +1 -1
  1146. package/dist/types/OdysseyProvider.d.ts.map +1 -1
  1147. package/dist/types/OdysseyThemeProvider.d.ts +1 -1
  1148. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  1149. package/dist/types/OdysseyTranslationProvider.d.ts +2 -2
  1150. package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
  1151. package/dist/types/Pagination/Pagination.d.ts.map +1 -1
  1152. package/dist/types/PasswordField.d.ts +1 -1
  1153. package/dist/types/PasswordField.d.ts.map +1 -1
  1154. package/dist/types/Radio.d.ts +6 -6
  1155. package/dist/types/Radio.d.ts.map +1 -1
  1156. package/dist/types/RadioGroup.d.ts +1 -1
  1157. package/dist/types/RadioGroup.d.ts.map +1 -1
  1158. package/dist/types/ScreenReaderText.d.ts.map +1 -1
  1159. package/dist/types/SearchField.d.ts +9 -9
  1160. package/dist/types/SearchField.d.ts.map +1 -1
  1161. package/dist/types/Select.d.ts +2 -2
  1162. package/dist/types/Select.d.ts.map +1 -1
  1163. package/dist/types/Stack.d.ts.map +1 -1
  1164. package/dist/types/Status.d.ts +2 -2
  1165. package/dist/types/Status.d.ts.map +1 -1
  1166. package/dist/types/Surface.d.ts.map +1 -1
  1167. package/dist/types/Switch.d.ts +5 -5
  1168. package/dist/types/Switch.d.ts.map +1 -1
  1169. package/dist/types/Tabs.d.ts +5 -5
  1170. package/dist/types/Tabs.d.ts.map +1 -1
  1171. package/dist/types/Tag.d.ts +4 -4
  1172. package/dist/types/Tag.d.ts.map +1 -1
  1173. package/dist/types/TagList.d.ts +1 -1
  1174. package/dist/types/TagList.d.ts.map +1 -1
  1175. package/dist/types/TextField.d.ts +8 -8
  1176. package/dist/types/TextField.d.ts.map +1 -1
  1177. package/dist/types/ToastStack.d.ts.map +1 -1
  1178. package/dist/types/Tooltip.d.ts.map +1 -1
  1179. package/dist/types/Typography.d.ts +22 -18
  1180. package/dist/types/Typography.d.ts.map +1 -1
  1181. package/dist/types/hexToRgb.d.ts +2 -2
  1182. package/dist/types/hexToRgb.d.ts.map +1 -1
  1183. package/dist/types/i18n.d.ts +21 -30
  1184. package/dist/types/i18n.d.ts.map +1 -1
  1185. package/dist/types/icons.generated/Add.d.ts.map +1 -1
  1186. package/dist/types/icons.generated/AddCircle.d.ts.map +1 -1
  1187. package/dist/types/icons.generated/Apps.d.ts.map +1 -1
  1188. package/dist/types/icons.generated/ArrowBottom.d.ts.map +1 -1
  1189. package/dist/types/icons.generated/ArrowDown.d.ts.map +1 -1
  1190. package/dist/types/icons.generated/ArrowLeft.d.ts.map +1 -1
  1191. package/dist/types/icons.generated/ArrowLowerLeft.d.ts.map +1 -1
  1192. package/dist/types/icons.generated/ArrowLowerRight.d.ts.map +1 -1
  1193. package/dist/types/icons.generated/ArrowRight.d.ts.map +1 -1
  1194. package/dist/types/icons.generated/ArrowTop.d.ts.map +1 -1
  1195. package/dist/types/icons.generated/ArrowUnsorted.d.ts.map +1 -1
  1196. package/dist/types/icons.generated/ArrowUp.d.ts.map +1 -1
  1197. package/dist/types/icons.generated/ArrowUpperLeft.d.ts.map +1 -1
  1198. package/dist/types/icons.generated/ArrowUpperRight.d.ts.map +1 -1
  1199. package/dist/types/icons.generated/Bug.d.ts.map +1 -1
  1200. package/dist/types/icons.generated/Calendar.d.ts.map +1 -1
  1201. package/dist/types/icons.generated/Call.d.ts.map +1 -1
  1202. package/dist/types/icons.generated/Chat.d.ts.map +1 -1
  1203. package/dist/types/icons.generated/Check.d.ts.map +1 -1
  1204. package/dist/types/icons.generated/CheckCircleFilled.d.ts.map +1 -1
  1205. package/dist/types/icons.generated/ChevronDown.d.ts.map +1 -1
  1206. package/dist/types/icons.generated/ChevronLeft.d.ts.map +1 -1
  1207. package/dist/types/icons.generated/ChevronRight.d.ts.map +1 -1
  1208. package/dist/types/icons.generated/ChevronUp.d.ts.map +1 -1
  1209. package/dist/types/icons.generated/Clock.d.ts.map +1 -1
  1210. package/dist/types/icons.generated/Close.d.ts.map +1 -1
  1211. package/dist/types/icons.generated/CloseCircleFilled.d.ts.map +1 -1
  1212. package/dist/types/icons.generated/CollapseLeft.d.ts.map +1 -1
  1213. package/dist/types/icons.generated/CollapseRight.d.ts.map +1 -1
  1214. package/dist/types/icons.generated/Copy.d.ts.map +1 -1
  1215. package/dist/types/icons.generated/Custom.d.ts.map +1 -1
  1216. package/dist/types/icons.generated/DangerDiamond.d.ts.map +1 -1
  1217. package/dist/types/icons.generated/DangerDiamondFilled.d.ts.map +1 -1
  1218. package/dist/types/icons.generated/Delete.d.ts.map +1 -1
  1219. package/dist/types/icons.generated/Deny.d.ts.map +1 -1
  1220. package/dist/types/icons.generated/Devices.d.ts.map +1 -1
  1221. package/dist/types/icons.generated/Directory.d.ts.map +1 -1
  1222. package/dist/types/icons.generated/Documentation.d.ts.map +1 -1
  1223. package/dist/types/icons.generated/Download.d.ts.map +1 -1
  1224. package/dist/types/icons.generated/DragIndicator.d.ts.map +1 -1
  1225. package/dist/types/icons.generated/Duo.d.ts.map +1 -1
  1226. package/dist/types/icons.generated/Edit.d.ts.map +1 -1
  1227. package/dist/types/icons.generated/Email.d.ts.map +1 -1
  1228. package/dist/types/icons.generated/ExpandLeft.d.ts.map +1 -1
  1229. package/dist/types/icons.generated/ExpandRight.d.ts.map +1 -1
  1230. package/dist/types/icons.generated/ExternalLink.d.ts.map +1 -1
  1231. package/dist/types/icons.generated/Fido2.d.ts.map +1 -1
  1232. package/dist/types/icons.generated/Filter.d.ts.map +1 -1
  1233. package/dist/types/icons.generated/Folder.d.ts.map +1 -1
  1234. package/dist/types/icons.generated/Globe.d.ts.map +1 -1
  1235. package/dist/types/icons.generated/GoogleAuth.d.ts.map +1 -1
  1236. package/dist/types/icons.generated/Grid.d.ts.map +1 -1
  1237. package/dist/types/icons.generated/Group.d.ts.map +1 -1
  1238. package/dist/types/icons.generated/Hide.d.ts.map +1 -1
  1239. package/dist/types/icons.generated/Home.d.ts.map +1 -1
  1240. package/dist/types/icons.generated/Idp.d.ts.map +1 -1
  1241. package/dist/types/icons.generated/InformationCircle.d.ts.map +1 -1
  1242. package/dist/types/icons.generated/InformationCircleFilled.d.ts.map +1 -1
  1243. package/dist/types/icons.generated/Link.d.ts.map +1 -1
  1244. package/dist/types/icons.generated/List.d.ts.map +1 -1
  1245. package/dist/types/icons.generated/Lock.d.ts.map +1 -1
  1246. package/dist/types/icons.generated/More.d.ts.map +1 -1
  1247. package/dist/types/icons.generated/Notification.d.ts.map +1 -1
  1248. package/dist/types/icons.generated/OktaVerify.d.ts.map +1 -1
  1249. package/dist/types/icons.generated/OnPremMfa.d.ts.map +1 -1
  1250. package/dist/types/icons.generated/OneTimePassword.d.ts.map +1 -1
  1251. package/dist/types/icons.generated/Password.d.ts.map +1 -1
  1252. package/dist/types/icons.generated/Pause.d.ts.map +1 -1
  1253. package/dist/types/icons.generated/QuestionCircle.d.ts.map +1 -1
  1254. package/dist/types/icons.generated/QuestionCircleFilled.d.ts.map +1 -1
  1255. package/dist/types/icons.generated/Refresh.d.ts.map +1 -1
  1256. package/dist/types/icons.generated/Reset.d.ts.map +1 -1
  1257. package/dist/types/icons.generated/Resume.d.ts.map +1 -1
  1258. package/dist/types/icons.generated/Search.d.ts.map +1 -1
  1259. package/dist/types/icons.generated/SecurityQuestion.d.ts.map +1 -1
  1260. package/dist/{index.js → types/icons.generated/Send.d.ts} +6 -15
  1261. package/dist/types/icons.generated/Send.d.ts.map +1 -0
  1262. package/dist/types/icons.generated/Server.d.ts.map +1 -1
  1263. package/dist/types/icons.generated/Settings.d.ts.map +1 -1
  1264. package/dist/types/icons.generated/Show.d.ts.map +1 -1
  1265. package/dist/types/icons.generated/SmartCard.d.ts.map +1 -1
  1266. package/dist/types/icons.generated/Sms.d.ts.map +1 -1
  1267. package/dist/types/icons.generated/Subtract.d.ts.map +1 -1
  1268. package/dist/types/icons.generated/SymantecVip.d.ts.map +1 -1
  1269. package/dist/types/icons.generated/Sync.d.ts.map +1 -1
  1270. package/dist/types/icons.generated/ThumbsDown.d.ts.map +1 -1
  1271. package/dist/types/icons.generated/ThumbsUp.d.ts.map +1 -1
  1272. package/dist/types/icons.generated/Unlock.d.ts.map +1 -1
  1273. package/dist/types/icons.generated/Upload.d.ts.map +1 -1
  1274. package/dist/types/icons.generated/User.d.ts.map +1 -1
  1275. package/dist/types/icons.generated/Video.d.ts.map +1 -1
  1276. package/dist/types/icons.generated/VoiceCall.d.ts.map +1 -1
  1277. package/dist/types/icons.generated/Warning.d.ts.map +1 -1
  1278. package/dist/types/icons.generated/WarningFilled.d.ts.map +1 -1
  1279. package/dist/types/icons.generated/Yubikey.d.ts.map +1 -1
  1280. package/dist/types/icons.generated/index.d.ts +2 -1
  1281. package/dist/types/icons.generated/index.d.ts.map +1 -1
  1282. package/dist/types/inputUtils.d.ts +2 -2
  1283. package/dist/types/inputUtils.d.ts.map +1 -1
  1284. package/dist/types/labs/AppTile.d.ts +7 -7
  1285. package/dist/types/labs/AppTile.d.ts.map +1 -1
  1286. package/dist/types/labs/DataFilters.d.ts +33 -33
  1287. package/dist/types/labs/DataFilters.d.ts.map +1 -1
  1288. package/dist/types/labs/DataTable.d.ts +69 -69
  1289. package/dist/types/labs/DataTable.d.ts.map +1 -1
  1290. package/dist/types/labs/DataTablePagination.d.ts +1 -1
  1291. package/dist/types/labs/DataTablePagination.d.ts.map +1 -1
  1292. package/dist/types/labs/DataView/BulkActionsMenu.d.ts +2 -2
  1293. package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  1294. package/dist/types/labs/DataView/CardLayoutContent.d.ts +10 -10
  1295. package/dist/types/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  1296. package/dist/types/labs/DataView/DataCard.d.ts +1 -1
  1297. package/dist/types/labs/DataView/DataCard.d.ts.map +1 -1
  1298. package/dist/types/labs/DataView/DataTable.d.ts +1 -1
  1299. package/dist/types/labs/DataView/DataTable.d.ts.map +1 -1
  1300. package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
  1301. package/dist/types/labs/DataView/DetailPanel.d.ts +2 -2
  1302. package/dist/types/labs/DataView/DetailPanel.d.ts.map +1 -1
  1303. package/dist/types/labs/DataView/LayoutSwitcher.d.ts.map +1 -1
  1304. package/dist/types/labs/DataView/RowActions.d.ts +6 -5
  1305. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  1306. package/dist/types/labs/DataView/TableLayoutContent.d.ts +10 -10
  1307. package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  1308. package/dist/types/labs/DataView/TableSettings.d.ts +1 -1
  1309. package/dist/types/labs/DataView/TableSettings.d.ts.map +1 -1
  1310. package/dist/types/labs/DataView/componentTypes.d.ts +5 -5
  1311. package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
  1312. package/dist/types/labs/DataView/fetchData.d.ts +2 -2
  1313. package/dist/types/labs/DataView/fetchData.d.ts.map +1 -1
  1314. package/dist/types/labs/DataView/index.d.ts +1 -1
  1315. package/dist/types/labs/DataView/index.d.ts.map +1 -1
  1316. package/dist/types/labs/DataView/tableConstants.d.ts +2 -2
  1317. package/dist/types/labs/DataView/tableConstants.d.ts.map +1 -1
  1318. package/dist/types/labs/DataView/testSupportData.d.ts +5 -5
  1319. package/dist/types/labs/DataView/testSupportData.d.ts.map +1 -1
  1320. package/dist/types/labs/DataView/useFilterConversion.d.ts +1 -1
  1321. package/dist/types/labs/DataView/useFilterConversion.d.ts.map +1 -1
  1322. package/dist/types/labs/DatePickers/DateTimeField.d.ts.map +1 -1
  1323. package/dist/types/labs/DatePickers/DateTimePicker.d.ts +2 -2
  1324. package/dist/types/labs/DatePickers/DateTimePicker.d.ts.map +1 -1
  1325. package/dist/types/labs/DatePickers/dateTimePickerTheme.d.ts.map +1 -1
  1326. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts +4 -1
  1327. package/dist/types/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -1
  1328. package/dist/types/labs/OdysseyPickers/Picker.d.ts +8 -8
  1329. package/dist/types/labs/OdysseyPickers/Picker.d.ts.map +1 -1
  1330. package/dist/types/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -1
  1331. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts +2 -2
  1332. package/dist/types/labs/OdysseyPickers/SearchDropdown.d.ts.map +1 -1
  1333. package/dist/types/labs/OdysseyPickers/index.d.ts +1 -1
  1334. package/dist/types/labs/OdysseyPickers/index.d.ts.map +1 -1
  1335. package/dist/types/labs/PageTemplate/DocumentationLink.d.ts.map +1 -1
  1336. package/dist/types/labs/PageTemplate/Layout.d.ts +4 -4
  1337. package/dist/types/labs/PageTemplate/Layout.d.ts.map +1 -1
  1338. package/dist/types/labs/PageTemplate/PageTemplate.d.ts +8 -8
  1339. package/dist/types/labs/PageTemplate/PageTemplate.d.ts.map +1 -1
  1340. package/dist/types/labs/PaginatedTable.d.ts.map +1 -1
  1341. package/dist/types/labs/UserProfile.d.ts +4 -4
  1342. package/dist/types/labs/UserProfile.d.ts.map +1 -1
  1343. package/dist/types/labs/UserProfileMenuButton.d.ts.map +1 -1
  1344. package/dist/types/labs/index.d.ts +14 -14
  1345. package/dist/types/labs/index.d.ts.map +1 -1
  1346. package/dist/types/properties/ts/odyssey-react-mui.d.ts +5 -1
  1347. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  1348. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +0 -1
  1349. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  1350. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +0 -1
  1351. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  1352. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +0 -1
  1353. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  1354. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +0 -1
  1355. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  1356. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +0 -1
  1357. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  1358. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts +0 -1
  1359. package/dist/types/properties/ts/odyssey-react-mui_eu.d.ts.map +1 -1
  1360. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +0 -1
  1361. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  1362. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +0 -1
  1363. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  1364. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +0 -1
  1365. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  1366. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +0 -1
  1367. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  1368. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +0 -1
  1369. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  1370. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +0 -1
  1371. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  1372. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +0 -1
  1373. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  1374. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +0 -1
  1375. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  1376. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +0 -1
  1377. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  1378. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +0 -1
  1379. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  1380. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +0 -1
  1381. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  1382. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts +8 -1
  1383. package/dist/types/properties/ts/odyssey-react-mui_ok_PL.d.ts.map +1 -1
  1384. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts +8 -1
  1385. package/dist/types/properties/ts/odyssey-react-mui_ok_SK.d.ts.map +1 -1
  1386. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +0 -1
  1387. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  1388. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +0 -1
  1389. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  1390. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +0 -1
  1391. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  1392. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +0 -1
  1393. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  1394. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +0 -1
  1395. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  1396. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +0 -1
  1397. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  1398. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +0 -1
  1399. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  1400. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +0 -1
  1401. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  1402. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +0 -1
  1403. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  1404. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +0 -1
  1405. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  1406. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +0 -1
  1407. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  1408. package/dist/types/test-selectors/getByQuerySelector.d.ts +13 -13
  1409. package/dist/types/test-selectors/getByQuerySelector.d.ts.map +1 -1
  1410. package/dist/types/test-selectors/getComputedAccessibleText.d.ts +1 -1
  1411. package/dist/types/test-selectors/getComputedAccessibleText.d.ts.map +1 -1
  1412. package/dist/types/test-selectors/linkedHtmlSelectors.d.ts.map +1 -1
  1413. package/dist/types/test-selectors/queryOdysseySelector.d.ts.map +1 -1
  1414. package/dist/types/test-selectors/querySelector.d.ts +1 -1
  1415. package/dist/types/test-selectors/querySelector.d.ts.map +1 -1
  1416. package/dist/types/theme/components.d.ts +1 -1
  1417. package/dist/types/theme/components.d.ts.map +1 -1
  1418. package/dist/types/theme/components.types.d.ts +12 -12
  1419. package/dist/types/theme/components.types.d.ts.map +1 -1
  1420. package/dist/types/theme/createOdysseyMuiTheme.d.ts +1 -1
  1421. package/dist/types/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  1422. package/dist/types/theme/mixins.types.d.ts +2 -2
  1423. package/dist/types/theme/mixins.types.d.ts.map +1 -1
  1424. package/dist/types/theme/typography.types.d.ts +2 -2
  1425. package/dist/types/theme/typography.types.d.ts.map +1 -1
  1426. package/dist/types/ui-shell/AppSwitcher/AppSwitcher.d.ts +1 -1
  1427. package/dist/types/ui-shell/AppSwitcher/AppSwitcher.d.ts.map +1 -1
  1428. package/dist/types/ui-shell/AppSwitcher/AppSwitcherApp.d.ts.map +1 -1
  1429. package/dist/types/ui-shell/AppSwitcher/OktaAura.d.ts.map +1 -1
  1430. package/dist/types/ui-shell/InnerAppContainer.d.ts.map +1 -1
  1431. package/dist/types/ui-shell/NarrowUiShellContent.d.ts +1 -1
  1432. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  1433. package/dist/types/ui-shell/SideNav/NavAccordion.d.ts +4 -4
  1434. package/dist/types/ui-shell/SideNav/NavAccordion.d.ts.map +1 -1
  1435. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  1436. package/dist/types/ui-shell/SideNav/SideNavFooterContent.d.ts.map +1 -1
  1437. package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts.map +1 -1
  1438. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts +9 -9
  1439. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
  1440. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts +1 -1
  1441. package/dist/types/ui-shell/SideNav/SideNavItemContentContext.d.ts.map +1 -1
  1442. package/dist/types/ui-shell/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
  1443. package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts +1 -1
  1444. package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
  1445. package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts +1 -1
  1446. package/dist/types/ui-shell/SideNav/SortableList/SortableItem.d.ts.map +1 -1
  1447. package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts +1 -1
  1448. package/dist/types/ui-shell/SideNav/SortableList/SortableList.d.ts.map +1 -1
  1449. package/dist/types/ui-shell/SideNav/SortableList/SortableOverlay.d.ts.map +1 -1
  1450. package/dist/types/ui-shell/SideNav/index.d.ts +1 -1
  1451. package/dist/types/ui-shell/SideNav/index.d.ts.map +1 -1
  1452. package/dist/types/ui-shell/SideNav/types.d.ts +18 -18
  1453. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  1454. package/dist/types/ui-shell/TopNav/HamburgerMenuIcon.d.ts.map +1 -1
  1455. package/dist/types/ui-shell/TopNav/TopNav.d.ts.map +1 -1
  1456. package/dist/types/ui-shell/TopNav/TopNavLinksList.d.ts +1 -1
  1457. package/dist/types/ui-shell/TopNav/TopNavLinksList.d.ts.map +1 -1
  1458. package/dist/types/ui-shell/TopNav/TopNavListItem.d.ts.map +1 -1
  1459. package/dist/types/ui-shell/UiShell.d.ts +2 -2
  1460. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  1461. package/dist/types/ui-shell/UiShellProvider.d.ts +5 -5
  1462. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  1463. package/dist/types/ui-shell/WideUiShellContent.d.ts +1 -1
  1464. package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -1
  1465. package/dist/types/ui-shell/renderUiShell.d.ts +1 -1
  1466. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  1467. package/dist/types/ui-shell/useElementAtContainerEdge.d.ts +6 -6
  1468. package/dist/types/ui-shell/useElementAtContainerEdge.d.ts.map +1 -1
  1469. package/dist/types/ui-shell/useUiShellBreakpoints.d.ts +1 -1
  1470. package/dist/types/useAutocomplete.d.ts +2 -2
  1471. package/dist/types/useAutocomplete.d.ts.map +1 -1
  1472. package/dist/types/useSessionStorageState.d.ts.map +1 -1
  1473. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  1474. package/dist/types/web-component/renderReactInWebComponent.d.ts +7 -7
  1475. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  1476. package/package.json +11 -7
  1477. package/dist/index.cjs +0 -231
  1478. package/dist/index.d.ts +0 -233
  1479. package/dist/index.d.ts.map +0 -1
  1480. package/dist/index.mjs +0 -229
  1481. package/dist/index.scss +0 -549
  1482. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useUiShellBreakpoints.cjs","names":["_useMediaQuery","require","defaultUiShellBreakpointConfig","exports","narrow","medium","wide","adminAppUiShellBreakpoints","useUiShellBreakpoints","breakpointConfig","isNarrowView","useMediaQuery","isMediumView","isWideView"],"sources":["../../../src/ui-shell/useUiShellBreakpoints.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { useMediaQuery } from \"../theme/useMediaQuery.js\";\n\nexport type UiShellBreakpointConfig = {\n narrow: number;\n medium: number;\n wide: number;\n};\n\nexport const defaultUiShellBreakpointConfig = {\n narrow: 0,\n medium: 600,\n wide: 800,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const adminAppUiShellBreakpoints = {\n narrow: 0,\n medium: 600,\n wide: 1304,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const useUiShellBreakpoints = (\n breakpointConfig: UiShellBreakpointConfig = defaultUiShellBreakpointConfig,\n): keyof UiShellBreakpointConfig | \"none\" => {\n const isNarrowView = useMediaQuery(\n `(min-width: ${breakpointConfig.narrow}px)`,\n );\n\n const isMediumView = useMediaQuery(\n `(min-width: ${breakpointConfig.medium}px)`,\n );\n\n const isWideView = useMediaQuery(`(min-width: ${breakpointConfig.wide}px)`);\n\n if (isWideView) {\n return \"wide\";\n }\n\n if (isMediumView) {\n return \"medium\";\n }\n\n if (isNarrowView) {\n return \"narrow\";\n }\n\n // This is a failsafe in case we don't have any media queries on page load or if media queries were improperly defined (no `0` case). With the default breakpoints, it will never be `\"none\"`.\n return \"none\";\n};\n"],"mappings":";;;;;;AAYA,IAAAA,cAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,MAAMC,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,GAAG;EAC5CE,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAErC,MAAMC,0BAA0B,GAAAJ,OAAA,CAAAI,0BAAA,GAAG;EACxCH,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAErC,MAAME,qBAAqB,GAAGA,CACnCC,gBAAyC,GAAGP,8BAA8B,KAC/B;EAC3C,MAAMQ,YAAY,GAAG,IAAAC,4BAAa,EAChC,eAAeF,gBAAgB,CAACL,MAAM,KACxC,CAAC;EAED,MAAMQ,YAAY,GAAG,IAAAD,4BAAa,EAChC,eAAeF,gBAAgB,CAACJ,MAAM,KACxC,CAAC;EAED,MAAMQ,UAAU,GAAG,IAAAF,4BAAa,EAAC,eAAeF,gBAAgB,CAACH,IAAI,KAAK,CAAC;EAE3E,IAAIO,UAAU,EAAE;IACd,OAAO,MAAM;EACf;EAEA,IAAID,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAEA,IAAIF,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAGA,OAAO,MAAM;AACf,CAAC;AAACP,OAAA,CAAAK,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"file":"useUiShellBreakpoints.cjs","names":["_useMediaQuery","require","defaultUiShellBreakpointConfig","exports","narrow","medium","wide","adminAppUiShellBreakpoints","useUiShellBreakpoints","breakpointConfig","isNarrowView","useMediaQuery","isMediumView","isWideView"],"sources":["../../../src/ui-shell/useUiShellBreakpoints.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { useMediaQuery } from \"../theme/useMediaQuery.js\";\n\nexport type UiShellBreakpointConfig = {\n medium: number;\n narrow: number;\n wide: number;\n};\n\nexport const defaultUiShellBreakpointConfig = {\n narrow: 0,\n medium: 600,\n wide: 800,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const adminAppUiShellBreakpoints = {\n narrow: 0,\n medium: 600,\n wide: 1304,\n} as const satisfies UiShellBreakpointConfig;\n\nexport const useUiShellBreakpoints = (\n breakpointConfig: UiShellBreakpointConfig = defaultUiShellBreakpointConfig,\n): keyof UiShellBreakpointConfig | \"none\" => {\n const isNarrowView = useMediaQuery(\n `(min-width: ${breakpointConfig.narrow}px)`,\n );\n\n const isMediumView = useMediaQuery(\n `(min-width: ${breakpointConfig.medium}px)`,\n );\n\n const isWideView = useMediaQuery(`(min-width: ${breakpointConfig.wide}px)`);\n\n if (isWideView) {\n return \"wide\";\n }\n\n if (isMediumView) {\n return \"medium\";\n }\n\n if (isNarrowView) {\n return \"narrow\";\n }\n\n // This is a failsafe in case we don't have any media queries on page load or if media queries were improperly defined (no `0` case). With the default breakpoints, it will never be `\"none\"`.\n return \"none\";\n};\n"],"mappings":";;;;;;AAYA,IAAAA,cAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,MAAMC,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,GAAG;EAC5CE,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAErC,MAAMC,0BAA0B,GAAAJ,OAAA,CAAAI,0BAAA,GAAG;EACxCH,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE;AACR,CAA4C;AAErC,MAAME,qBAAqB,GAAGA,CACnCC,gBAAyC,GAAGP,8BAA8B,KAC/B;EAC3C,MAAMQ,YAAY,GAAG,IAAAC,4BAAa,EAChC,eAAeF,gBAAgB,CAACL,MAAM,KACxC,CAAC;EAED,MAAMQ,YAAY,GAAG,IAAAD,4BAAa,EAChC,eAAeF,gBAAgB,CAACJ,MAAM,KACxC,CAAC;EAED,MAAMQ,UAAU,GAAG,IAAAF,4BAAa,EAAC,eAAeF,gBAAgB,CAACH,IAAI,KAAK,CAAC;EAE3E,IAAIO,UAAU,EAAE;IACd,OAAO,MAAM;EACf;EAEA,IAAID,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAEA,IAAIF,YAAY,EAAE;IAChB,OAAO,QAAQ;EACjB;EAGA,OAAO,MAAM;AACf,CAAC;AAACP,OAAA,CAAAK,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -76,12 +76,12 @@ const useAutocomplete = ({
76
76
  errorMessageList: errorMessageList,
77
77
  fieldType: "single",
78
78
  hasVisibleLabel: true,
79
- id: InputLabelProps.htmlFor,
80
- isFullWidth: isFullWidth,
81
79
  hint: hint,
82
80
  HintLinkComponent: HintLinkComponent,
83
- label: label,
81
+ id: InputLabelProps.htmlFor,
82
+ isFullWidth: isFullWidth,
84
83
  isOptional: isOptional,
84
+ label: label,
85
85
  renderFieldComponent: ({
86
86
  ariaDescribedBy,
87
87
  id,
@@ -90,14 +90,14 @@ const useAutocomplete = ({
90
90
  }) => (0, _jsxRuntime.jsx)(_InputBase2.default, {
91
91
  ...params,
92
92
  ...InputProps,
93
+ "aria-describedby": ariaDescribedBy,
94
+ id: id,
93
95
  inputProps: {
94
96
  ...params.inputProps,
95
97
  "aria-errormessage": errorMessageElementId,
96
98
  "aria-labelledby": labelElementId,
97
99
  "data-se": testId
98
100
  },
99
- "aria-describedby": ariaDescribedBy,
100
- id: id,
101
101
  name: nameOverride ?? id,
102
102
  required: !isOptional
103
103
  })
@@ -1 +1 @@
1
- {"version":3,"file":"useAutocomplete.cjs","names":["_react","require","_Field","_inputUtils","_jsxRuntime","_interopRequireDefault","e","__esModule","default","useAutocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","hint","HintLinkComponent","inputValue","isFullWidth","isOptional","isVirtualized","isVirtualizedProp","label","name","nameOverride","testId","value","controlledStateRef","useRef","getControlState","controlledValue","uncontrolledValue","isVirtualizedRef","Boolean","defaultValueProp","useMemo","undefined","valueProps","useInputValues","controlState","current","inputValueProp","ComponentControlledState","CONTROLLED","renderInput","useCallback","InputLabelProps","InputProps","params","jsx","Field","fieldType","hasVisibleLabel","id","htmlFor","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase2","inputProps","required","exports"],"sources":["../../src/useAutocomplete.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-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 { useCallback, useMemo, useRef } from \"react\";\nimport {\n InputBase,\n AutocompleteValue,\n AutocompleteRenderInputParams,\n} from \"@mui/material\";\n\nimport { AutocompleteProps } from \"./Autocomplete.js\";\nimport { Field } from \"./Field.js\";\nimport {\n ComponentControlledState,\n useInputValues,\n getControlState,\n} from \"./inputUtils.js\";\n\nexport type UseAutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = Pick<\n AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>,\n | \"ariaDescribedBy\"\n | \"defaultValue\"\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hasMultipleChoices\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"inputValue\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"isVirtualized\"\n | \"label\"\n | \"name\"\n | \"testId\"\n | \"value\"\n>;\n\nexport const useAutocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized: isVirtualizedProp,\n label,\n name: nameOverride,\n testId,\n value,\n}: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n IsCustomValueAllowed\n>) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n\n const isVirtualizedRef = useRef(Boolean(isVirtualizedProp));\n\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 controlState: controlledStateRef.current,\n defaultValue: defaultValueProp,\n value,\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 exists on `InputLabelProps`, but not the type.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\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 return {\n inputValueProp,\n isVirtualizedRef,\n renderInput,\n valueProps,\n };\n};\n"],"mappings":";;;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAIyB,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAzBzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwCO,MAAMG,eAAe,GAAGA,CAI7B;EACAC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,gBAAgB;EAChBC,kBAAkB;EAClBC,IAAI;EACJC,iBAAiB;EACjBC,UAAU;EACVC,WAAW;EACXC,UAAU;EACVC,aAAa,EAAEC,iBAAiB;EAChCC,KAAK;EACLC,IAAI,EAAEC,YAAY;EAClBC,MAAM;EACNC;AAKF,CAAC,KAAK;EACJ,MAAMC,kBAAkB,GAAG,IAAAC,aAAM,EAC/B,IAAAC,2BAAe,EAAC;IACdC,eAAe,EAAEJ,KAAK;IACtBK,iBAAiB,EAAEpB;EACrB,CAAC,CACH,CAAC;EAED,MAAMqB,gBAAgB,GAAG,IAAAJ,aAAM,EAACK,OAAO,CAACZ,iBAAiB,CAAC,CAAC;EAE3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C,IAAArD,WAAA,CAAA6C,GAAA,EAAAS,WAAA,CAAAlD,OAAA;MAAA,GACMwC,MAAM;MAAA,GACND,UAAU;MACdY,UAAU,EAAE;QACV,GAAGX,MAAM,CAACW,UAAU;QACpB,mBAAmB,EAAEH,qBAAqB;QAC1C,iBAAiB,EAAEC,cAAc;QACjC,SAAS,EAAEhC;MACb,CAAE;MACF,oBAAkBf,eAAgB;MAClC2C,EAAE,EAAEA,EAAG;MACP9B,IAAI,EAAEC,YAAY,IAAI6B,EAAG;MACzBO,QAAQ,EAAE,CAACzC;IAAW,CACvB;EACD,CACH,CACF,EACD,CACET,eAAe,EACfE,YAAY,EACZC,gBAAgB,EAChBE,IAAI,EACJC,iBAAiB,EACjBE,WAAW,EACXC,UAAU,EACVG,KAAK,EACLE,YAAY,EACZC,MAAM,CAEV,CAAC;EAED,OAAO;IACLgB,cAAc;IACdT,gBAAgB;IAChBY,WAAW;IACXP;EACF,CAAC;AACH,CAAC;AAACwB,OAAA,CAAApD,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"useAutocomplete.cjs","names":["_react","require","_Field","_inputUtils","_jsxRuntime","_interopRequireDefault","e","__esModule","default","useAutocomplete","ariaDescribedBy","defaultValue","errorMessage","errorMessageList","hasMultipleChoices","hint","HintLinkComponent","inputValue","isFullWidth","isOptional","isVirtualized","isVirtualizedProp","label","name","nameOverride","testId","value","controlledStateRef","useRef","getControlState","controlledValue","uncontrolledValue","isVirtualizedRef","Boolean","defaultValueProp","useMemo","undefined","valueProps","useInputValues","controlState","current","inputValueProp","ComponentControlledState","CONTROLLED","renderInput","useCallback","InputLabelProps","InputProps","params","jsx","Field","fieldType","hasVisibleLabel","id","htmlFor","renderFieldComponent","errorMessageElementId","labelElementId","_InputBase2","inputProps","required","exports"],"sources":["../../src/useAutocomplete.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-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 AutocompleteRenderInputParams,\n AutocompleteValue,\n InputBase,\n} from \"@mui/material\";\nimport { useCallback, useMemo, useRef } from \"react\";\n\nimport { AutocompleteProps } from \"./Autocomplete.js\";\nimport { Field } from \"./Field.js\";\nimport {\n ComponentControlledState,\n getControlState,\n useInputValues,\n} from \"./inputUtils.js\";\n\nexport type UseAutocompleteProps<\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n> = Pick<\n AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>,\n | \"ariaDescribedBy\"\n | \"defaultValue\"\n | \"errorMessage\"\n | \"errorMessageList\"\n | \"hasMultipleChoices\"\n | \"hint\"\n | \"HintLinkComponent\"\n | \"inputValue\"\n | \"isFullWidth\"\n | \"isOptional\"\n | \"isVirtualized\"\n | \"label\"\n | \"name\"\n | \"testId\"\n | \"value\"\n>;\n\nexport const useAutocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized: isVirtualizedProp,\n label,\n name: nameOverride,\n testId,\n value,\n}: UseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n IsCustomValueAllowed\n>) => {\n const controlledStateRef = useRef(\n getControlState({\n controlledValue: value,\n uncontrolledValue: defaultValue,\n }),\n );\n\n const isVirtualizedRef = useRef(Boolean(isVirtualizedProp));\n\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 controlState: controlledStateRef.current,\n defaultValue: defaultValueProp,\n value,\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 hint={hint}\n HintLinkComponent={HintLinkComponent}\n //@ts-expect-error htmlFor exists on `InputLabelProps`, but not the type.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n id={InputLabelProps.htmlFor}\n isFullWidth={isFullWidth}\n isOptional={isOptional}\n label={label}\n renderFieldComponent={({\n ariaDescribedBy,\n id,\n errorMessageElementId,\n labelElementId,\n }) => (\n <InputBase\n {...params}\n {...InputProps}\n aria-describedby={ariaDescribedBy}\n id={id}\n inputProps={{\n ...params.inputProps,\n \"aria-errormessage\": errorMessageElementId,\n \"aria-labelledby\": labelElementId,\n \"data-se\": testId,\n }}\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 return {\n inputValueProp,\n isVirtualizedRef,\n renderInput,\n valueProps,\n };\n};\n"],"mappings":";;;;;;;AAiBA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,MA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ACLE,YAAY,EACZC,MAAM,CAEV,CAAC;EAED,OAAO;IACLgB,cAAc;IACdT,gBAAgB;IAChBY,WAAW;IACXP;EACF,CAAC;AACH,CAAC;AAACwB,OAAA,CAAApD,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useContrastModeContext = exports.useContrastMode = exports.normalizeRgbaToRgb = exports.normalizeBackgroundColor = exports.isTransparentColor = exports.hueNeutral50Rgb = exports.getElementComputedBackgroundColor = exports.getBackgroundColor = exports.defaultParentBackgroundColor = exports.defaultContrast = exports.ContrastModeContext = void 0;
7
- var _react = require("react");
8
7
  var Tokens = _interopRequireWildcard(require("@okta/odyssey-design-tokens"));
8
+ var _react = require("react");
9
9
  var _hexToRgb = require("./hexToRgb.cjs");
10
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
11
  /*!
@@ -1 +1 @@
1
- {"version":3,"file":"useContrastMode.cjs","names":["_react","require","Tokens","_interopRequireWildcard","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getBackgroundColor","parentElement","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","setContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useEffect","observer","MutationObserver","observe","document","querySelector","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","propertyName","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.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 createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport * as Tokens from \"@okta/odyssey-design-tokens\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\nexport const defaultParentBackgroundColor = \"#ffffff\";\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used for white background (defaultParentBackgroundColor or HueNeutralWhite).\n * - High contrast mode is used for gray background (#f4f4f4 or HueNeutral50).\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = element.parentElement;\n }\n return defaultParentBackgroundColor; // Default to white/low contrast if no background color is found\n};\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [contrastMode, setContrastMode] = useState<ContrastMode>(\n () => explicitContrastMode || existingContrastMode,\n );\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n\n if (!explicitContrastMode) {\n setContrastMode(\n newBgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\",\n );\n }\n }, [explicitContrastMode]);\n\n useEffect(() => {\n const observer = new MutationObserver(updateBackgroundColor);\n observer.observe(document.querySelector(\"html\") as HTMLHtmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n\n const onTransitionEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"background-color\") {\n updateBackgroundColor();\n }\n };\n\n document.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n document.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAAyC,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EA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AU,KAAK7D,MAAM,CAAC+B,YAAY,GAAG,cAAc,GAAG,aACxD,CAAC;IACH;EACF,CAAC,EAAE,CAACoB,oBAAoB,CAAC,CAAC;EAE1B,IAAAY,gBAAS,EAAC,MAAM;IACd,MAAMC,QAAQ,GAAG,IAAIC,gBAAgB,CAACN,qBAAqB,CAAC;IAC5DK,QAAQ,CAACE,OAAO,CAACC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC,EAAqB;MAClEC,UAAU,EAAE,IAAI;MAChBC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO;IACpC,CAAC,CAAC;IACFN,QAAQ,CAACE,OAAO,CAACC,QAAQ,CAACI,IAAI,EAAE;MAC9BC,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,MAAMC,eAAe,GAAIC,KAAsB,IAAK;MAClD,IAAIA,KAAK,CAACC,YAAY,KAAK,kBAAkB,EAAE;QAC7CjB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAEDQ,QAAQ,CAACU,gBAAgB,CAAC,eAAe,EAAEH,eAAe,CAAC;IAC3Df,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXQ,QAAQ,CAACW,mBAAmB,CAAC,eAAe,EAAEJ,eAAe,CAAC;MAC9DV,QAAQ,CAACe,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAACpB,qBAAqB,CAAC,CAAC;EAE3B,OAAO;IACLP,oBAAoB;IACpB3B,YAAY;IACZ8B;EACF,CAAC;AACH,CAAC;AAAChC,OAAA,CAAA2B,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"useContrastMode.cjs","names":["Tokens","_interopRequireWildcard","require","_react","_hexToRgb","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ContrastModeContext","exports","createContext","contrastMode","defaultContrast","useContrastModeContext","useContext","hueNeutral50Rgb","hexToRgb","HueNeutral50","asFormattedString","isTransparentColor","color","normalizeRgbaToRgb","rgba","replace","getElementComputedBackgroundColor","element","window","getComputedStyle","backgroundColor","normalizeBackgroundColor","bgColor","test","normalizedColor","defaultParentBackgroundColor","getBackgroundColor","parentElement","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","setContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useEffect","observer","MutationObserver","observe","document","querySelector","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","propertyName","addEventListener","removeEventListener","disconnect"],"sources":["../../src/useContrastMode.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 * as Tokens from \"@okta/odyssey-design-tokens\";\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n contrastMode: ContrastMode;\n};\n\nexport const ContrastModeContext = createContext<ContrastModeContextType>({\n contrastMode: \"lowContrast\",\n});\n\nexport const defaultContrast = \"lowContrast\";\n\nexport const useContrastModeContext = () => useContext(ContrastModeContext);\n\nexport const hueNeutral50Rgb = hexToRgb(Tokens.HueNeutral50).asFormattedString;\n\nexport const isTransparentColor = (color: string) =>\n color === \"rgba(0, 0, 0, 0)\" || color === \"transparent\";\n\nexport const normalizeRgbaToRgb = (rgba: string) =>\n rgba.replace(/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/, \"rgb($1, $2, $3)\");\n\nexport const getElementComputedBackgroundColor = (\n element: HTMLElement,\n): string => window.getComputedStyle(element).backgroundColor;\n\nexport const normalizeBackgroundColor = (bgColor: string): string => {\n if (/rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+),\\s*[\\d.]+\\)/.test(bgColor)) {\n const normalizedColor = normalizeRgbaToRgb(bgColor);\n return normalizedColor === hueNeutral50Rgb\n ? Tokens.HueNeutral50\n : normalizedColor;\n }\n\n return bgColor === hueNeutral50Rgb ? Tokens.HueNeutral50 : bgColor;\n};\n\nexport const defaultParentBackgroundColor = \"#ffffff\";\n\n/**\n * Determines the effective background color of an element.\n *\n * @param element - The HTML element to check.\n * @returns The effective background color. Returns defaultParentBackgroundColor if no non-transparent background is found.\n *\n * Note:\n * - Low contrast mode is used for white background (defaultParentBackgroundColor or HueNeutralWhite).\n * - High contrast mode is used for gray background (#f4f4f4 or HueNeutral50).\n */\nexport const getBackgroundColor = (element: HTMLElement | null): string => {\n while (element) {\n const bgColor = getElementComputedBackgroundColor(element);\n if (!isTransparentColor(bgColor)) {\n return normalizeBackgroundColor(bgColor);\n }\n element = element.parentElement;\n }\n return defaultParentBackgroundColor; // Default to white/low contrast if no background color is found\n};\n\ntype UseContrastModeProps = {\n contrastMode?: ContrastMode;\n};\n\nexport const useContrastMode = ({\n contrastMode: explicitContrastMode,\n}: UseContrastModeProps) => {\n const contrastContainerRef = useRef<HTMLDivElement>(null);\n const { contrastMode: existingContrastMode } = useContrastModeContext();\n\n const [parentBackgroundColor, setParentBackgroundColor] = useState(\n defaultParentBackgroundColor,\n );\n const [contrastMode, setContrastMode] = useState<ContrastMode>(\n () => explicitContrastMode || existingContrastMode,\n );\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n\n if (!explicitContrastMode) {\n setContrastMode(\n newBgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\",\n );\n }\n }, [explicitContrastMode]);\n\n useEffect(() => {\n const observer = new MutationObserver(updateBackgroundColor);\n observer.observe(document.querySelector(\"html\") as HTMLHtmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n\n const onTransitionEnd = (event: TransitionEvent) => {\n if (event.propertyName === \"background-color\") {\n updateBackgroundColor();\n }\n };\n\n document.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n document.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [updateBackgroundColor]);\n\n return {\n contrastContainerRef,\n contrastMode,\n parentBackgroundColor,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AAAyC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,E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ACU,OAAO,CAAC;IACnEN,wBAAwB,CAACK,UAAU,CAAC;IAEpC,IAAI,CAACV,oBAAoB,EAAE;MACzBO,eAAe,CACbG,UAAU,KAAK/D,MAAM,CAACiC,YAAY,GAAG,cAAc,GAAG,aACxD,CAAC;IACH;EACF,CAAC,EAAE,CAACoB,oBAAoB,CAAC,CAAC;EAE1B,IAAAY,gBAAS,EAAC,MAAM;IACd,MAAMC,QAAQ,GAAG,IAAIC,gBAAgB,CAACN,qBAAqB,CAAC;IAC5DK,QAAQ,CAACE,OAAO,CAACC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC,EAAqB;MAClEC,UAAU,EAAE,IAAI;MAChBC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO;IACpC,CAAC,CAAC;IACFN,QAAQ,CAACE,OAAO,CAACC,QAAQ,CAACI,IAAI,EAAE;MAC9BC,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,MAAMC,eAAe,GAAIC,KAAsB,IAAK;MAClD,IAAIA,KAAK,CAACC,YAAY,KAAK,kBAAkB,EAAE;QAC7CjB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAEDQ,QAAQ,CAACU,gBAAgB,CAAC,eAAe,EAAEH,eAAe,CAAC;IAC3Df,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXQ,QAAQ,CAACW,mBAAmB,CAAC,eAAe,EAAEJ,eAAe,CAAC;MAC9DV,QAAQ,CAACe,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAACpB,qBAAqB,CAAC,CAAC;EAE3B,OAAO;IACLP,oBAAoB;IACpB3B,YAAY;IACZ8B;EACF,CAAC;AACH,CAAC;AAAChC,OAAA,CAAA2B,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionStorageState.cjs","names":["_react","require","_useMountLifecycleEffect","getSessionStorageValue","key","sessionStorageValue","window","sessionStorage","getItem","JSON","parse","exports","useSessionStorageState","initialState","Error","sessionState","useMemo","setSessionState","useCallback","value","sessionStorageState","stringify","setItem","localState","setLocalState","useState","useEffect","onUpdate","useMountLifecycleEffect"],"sources":["../../src/useSessionStorageState.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useMountLifecycleEffect } from \"./useMountLifecycleEffect.js\";\n\nexport const getSessionStorageValue = <Value>(key: string): Value | null => {\n const sessionStorageValue = window.sessionStorage.getItem(key);\n\n try {\n if (typeof sessionStorageValue === \"string\") {\n return JSON.parse(sessionStorageValue) as Value;\n }\n\n return null;\n } catch {\n if (typeof sessionStorageValue === \"string\") {\n return sessionStorageValue as Value;\n }\n\n return null;\n }\n};\n\nexport const useSessionStorageState = <Value>({\n initialState,\n key,\n}: {\n initialState: Value;\n key: string;\n}) => {\n if (!key) {\n throw new Error(\"You must pass a value for `key`.\");\n }\n\n const sessionState = useMemo(() => getSessionStorageValue<Value>(key), [key]);\n\n const setSessionState = useCallback(\n (value: Value) => {\n const sessionStorageState =\n typeof value === \"undefined\" ? \"\" : JSON.stringify(value);\n\n window.sessionStorage.setItem(key, sessionStorageState);\n },\n [key],\n );\n\n const [localState, setLocalState] = useState<Value>(\n () => sessionState ?? initialState,\n );\n\n // This keeps session storage's state based on local state.\n useEffect(() => {\n setSessionState(localState);\n }, [localState, setSessionState]);\n\n // This updates when `key` is updated.\n const onUpdate = useCallback(() => {\n setLocalState(sessionState ?? initialState);\n }, [initialState, sessionState]);\n\n useMountLifecycleEffect({\n onUpdate,\n });\n\n return {\n sessionState: localState,\n setSessionState: setLocalState,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,MAAME,sBAAsB,GAAWC,GAAW,IAAmB;EAC1E,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,cAAc,CAACC,OAAO,CAACJ,GAAG,CAAC;EAE9D,IAAI;IACF,IAAI,OAAOC,mBAAmB,KAAK,QAAQ,EAAE;MAC3C,OAAOI,IAAI,CAACC,KAAK,CAACL,mBAAmB,CAAC;IACxC;IAEA,OAAO,IAAI;EACb,CAAC,CAAC,MAAM;IACN,IAAI,OAAOA,mBAAmB,KAAK,QAAQ,EAAE;MAC3C,OAAOA,mBAAmB;IAC5B;IAEA,OAAO,IAAI;EACb;AACF,CAAC;AAACM,OAAA,CAAAR,sBAAA,GAAAA,sBAAA;AAEK,MAAMS,sBAAsB,GAAGA,CAAQ;EAC5CC,YAAY;EACZT;AAIF,CAAC,KAAK;EACJ,IAAI,CAACA,GAAG,EAAE;IACR,MAAM,IAAIU,KAAK,CAAC,kCAAkC,CAAC;EACrD;EAEA,MAAMC,YAAY,GAAG,IAAAC,cAAO,EAAC,MAAMb,sBAAsB,CAAQC,GAAG,CAAC,EAAE,CAACA,GAAG,CAAC,CAAC;EAE7E,MAAMa,eAAe,GAAG,IAAAC,kBAAW,EAChCC,KAAY,IAAK;IAChB,MAAMC,mBAAmB,GACvB,OAAOD,KAAK,KAAK,WAAW,GAAG,EAAE,GAAGV,IAAI,CAACY,SAAS,CAACF,KAAK,CAAC;IAE3Db,MAAM,CAACC,cAAc,CAACe,OAAO,CAAClB,GAAG,EAAEgB,mBAAmB,CAAC;EACzD,CAAC,EACD,CAAChB,GAAG,CACN,CAAC;EAED,MAAM,CAACmB,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAC1C,MAAMV,YAAY,IAAIF,YACxB,CAAC;EAGD,IAAAa,gBAAS,EAAC,MAAM;IACdT,eAAe,CAACM,UAAU,CAAC;EAC7B,CAAC,EAAE,CAACA,UAAU,EAAEN,eAAe,CAAC,CAAC;EAGjC,MAAMU,QAAQ,GAAG,IAAAT,kBAAW,EAAC,MAAM;IACjCM,aAAa,CAACT,YAAY,IAAIF,YAAY,CAAC;EAC7C,CAAC,EAAE,CAACA,YAAY,EAAEE,YAAY,CAAC,CAAC;EAEhC,IAAAa,gDAAuB,EAAC;IACtBD;EACF,CAAC,CAAC;EAEF,OAAO;IACLZ,YAAY,EAAEQ,UAAU;IACxBN,eAAe,EAAEO;EACnB,CAAC;AACH,CAAC;AAACb,OAAA,CAAAC,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"file":"useSessionStorageState.cjs","names":["_react","require","_useMountLifecycleEffect","getSessionStorageValue","key","sessionStorageValue","window","sessionStorage","getItem","JSON","parse","exports","useSessionStorageState","initialState","Error","sessionState","useMemo","setSessionState","useCallback","value","sessionStorageState","stringify","setItem","localState","setLocalState","useState","useEffect","onUpdate","useMountLifecycleEffect"],"sources":["../../src/useSessionStorageState.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-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 { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { useMountLifecycleEffect } from \"./useMountLifecycleEffect.js\";\n\nexport const getSessionStorageValue = <Value>(key: string): Value | null => {\n const sessionStorageValue = window.sessionStorage.getItem(key);\n\n try {\n if (typeof sessionStorageValue === \"string\") {\n return JSON.parse(sessionStorageValue) as Value;\n }\n\n return null;\n } catch {\n if (typeof sessionStorageValue === \"string\") {\n return sessionStorageValue as Value;\n }\n\n return null;\n }\n};\n\nexport const useSessionStorageState = <Value>({\n initialState,\n key,\n}: {\n initialState: Value;\n key: string;\n}) => {\n if (!key) {\n throw new Error(\"You must pass a value for `key`.\");\n }\n\n const sessionState = useMemo(() => getSessionStorageValue<Value>(key), [key]);\n\n const setSessionState = useCallback(\n (value: Value) => {\n const sessionStorageState =\n typeof value === \"undefined\" ? \"\" : JSON.stringify(value);\n\n window.sessionStorage.setItem(key, sessionStorageState);\n },\n [key],\n );\n\n const [localState, setLocalState] = useState<Value>(\n () => sessionState ?? initialState,\n );\n\n // This keeps session storage's state based on local state.\n useEffect(() => {\n setSessionState(localState);\n }, [localState, setSessionState]);\n\n // This updates when `key` is updated.\n const onUpdate = useCallback(() => {\n setLocalState(sessionState ?? initialState);\n }, [initialState, sessionState]);\n\n useMountLifecycleEffect({\n onUpdate,\n });\n\n return {\n sessionState: localState,\n setSessionState: setLocalState,\n };\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAME,sBAAsB,GAAWC,GAAW,IAAmB;EAC1E,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,cAAc,CAACC,OAAO,CAACJ,GAAG,CAAC;EAE9D,IAAI;IACF,IAAI,OAAOC,mBAAmB,KAAK,QAAQ,EAAE;MAC3C,OAAOI,IAAI,CAACC,KAAK,CAACL,mBAAmB,CAAC;IACxC;IAEA,OAAO,IAAI;EACb,CAAC,CAAC,MAAM;IACN,IAAI,OAAOA,mBAAmB,KAAK,QAAQ,EAAE;MAC3C,OAAOA,mBAAmB;IAC5B;IAEA,OAAO,IAAI;EACb;AACF,CAAC;AAACM,OAAA,CAAAR,sBAAA,GAAAA,sBAAA;AAEK,MAAMS,sBAAsB,GAAGA,CAAQ;EAC5CC,YAAY;EACZT;AAIF,CAAC,KAAK;EACJ,IAAI,CAACA,GAAG,EAAE;IACR,MAAM,IAAIU,KAAK,CAAC,kCAAkC,CAAC;EACrD;EAEA,MAAMC,YAAY,GAAG,IAAAC,cAAO,EAAC,MAAMb,sBAAsB,CAAQC,GAAG,CAAC,EAAE,CAACA,GAAG,CAAC,CAAC;EAE7E,MAAMa,eAAe,GAAG,IAAAC,kBAAW,EAChCC,KAAY,IAAK;IAChB,MAAMC,mBAAmB,GACvB,OAAOD,KAAK,KAAK,WAAW,GAAG,EAAE,GAAGV,IAAI,CAACY,SAAS,CAACF,KAAK,CAAC;IAE3Db,MAAM,CAACC,cAAc,CAACe,OAAO,CAAClB,GAAG,EAAEgB,mBAAmB,CAAC;EACzD,CAAC,EACD,CAAChB,GAAG,CACN,CAAC;EAED,MAAM,CAACmB,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAC1C,MAAMV,YAAY,IAAIF,YACxB,CAAC;EAGD,IAAAa,gBAAS,EAAC,MAAM;IACdT,eAAe,CAACM,UAAU,CAAC;EAC7B,CAAC,EAAE,CAACA,UAAU,EAAEN,eAAe,CAAC,CAAC;EAGjC,MAAMU,QAAQ,GAAG,IAAAT,kBAAW,EAAC,MAAM;IACjCM,aAAa,CAACT,YAAY,IAAIF,YAAY,CAAC;EAC7C,CAAC,EAAE,CAACA,YAAY,EAAEE,YAAY,CAAC,CAAC;EAEhC,IAAAa,gDAAuB,EAAC;IACtBD;EACF,CAAC,CAAC;EAEF,OAAO;IACLZ,YAAY,EAAEQ,UAAU;IACxBN,eAAe,EAAEO;EACnB,CAAC;AACH,CAAC;AAACb,OAAA,CAAAC,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -15,5 +15,5 @@ exports.default = void 0;
15
15
  *
16
16
  * See the License for the specific language governing permissions and limitations under the License.
17
17
  */
18
- var _default = exports.default = "1-42-0";
18
+ var _default = exports.default = "1-44-0";
19
19
  //# sourceMappingURL=odysseyWebComponentVersion.generated.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-42-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.cjs","names":["_default","exports","default"],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-44-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.webComponentDataAttributeName = exports.versionedWebComponentName = exports.renderReactInWebComponent = exports.getReactWebComponent = exports.WebComponentClass = void 0;
7
- var _odysseyWebComponentVersionGenerated = _interopRequireDefault(require("./odysseyWebComponentVersion.generated.cjs"));
8
7
  var _createReactRootElements = require("./createReactRootElements.cjs");
8
+ var _odysseyWebComponentVersionGenerated = _interopRequireDefault(require("./odysseyWebComponentVersion.generated.cjs"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
11
  function __transformExtension(filepath, extMapping) {
@@ -1 +1 @@
1
- {"version":3,"file":"renderReactInWebComponent.cjs","names":["_odysseyWebComponentVersionGenerated","_interopRequireDefault","require","_createReactRootElements","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","a","b","length","endsWith","slice","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","styleHostElement","document","createElement","setAttribute","window","cspNonce","innerHTML","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","specifier","s","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","define","element","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport type { Root } from \"react-dom/client\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\n\ninterface GetReactWebComponentOptions {\n webComponentName?: string;\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n const styleHostElement = document.createElement(\"style\");\n styleHostElement.setAttribute(\"nonce\", window.cspNonce);\n styleHostElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n stylesRootElement.appendChild(styleHostElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: HTMLElement;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":";;;;;;AAcA,IAAAA,oCAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAGsC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,wBAAAH,CAAA,EAAAI,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,uBAAA,YAAAA,CAAAH,CAAA,EAAAI,CAAA,SAAAA,CAAA,IAAAJ,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAQ,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAT,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAU,CAAA,MAAAF,CAAA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AAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC5B,WAAW,CAACgC,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAC1B,WAAW,CAAC4B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC3B,WAAW,CAAC4B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAClD,OAAA,CAAA8C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"file":"renderReactInWebComponent.cjs","names":["_createReactRootElements","require","_odysseyWebComponentVersionGenerated","_interopRequireDefault","e","__esModule","default","_interopRequireWildcard","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","a","b","length","endsWith","slice","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","styleHostElement","document","createElement","setAttribute","window","cspNonce","innerHTML","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","specifier","s","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","define","element","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n const styleHostElement = document.createElement(\"style\");\n styleHostElement.setAttribute(\"nonce\", window.cspNonce);\n styleHostElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n stylesRootElement.appendChild(styleHostElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: HTMLElement;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return react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AC5D;EAEA,MAAMsC,OAAO,GAAGrB,QAAQ,CAACC,aAAa,CAACiB,gBAAgB,CAEtD;EAEDG,OAAO,CAACnB,YAAY,CAAC3B,6BAA6B,EAAE,EAAE,CAAC;EAEvD8C,OAAO,CAACf,oBAAoB,CAACtB,iBAAiB,CAAC;EAC/C,OAAOqC,OAAO;AAChB,CAAC;AAAC7C,OAAA,CAAAyC,oBAAA,GAAAA,oBAAA;AAqDK,MAAMK,yBAAyB,GAAGA,CAAC;EACxCJ,gBAAgB;EAChBlC,iBAAiB;EACjBuC,oBAAoB;EACpBC,yBAAyB;EACzBC;AAC8B,CAAC,KAAK;EACpC,MAAMC,YAAY,GAAGT,oBAAoB,CAAC;IACxCjC,iBAAiB;IACjBkC;EACF,CAAC,CAAC;EAEF,IAAIK,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC5B,WAAW,CAACgC,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAC1B,WAAW,CAAC4B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC3B,WAAW,CAAC4B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAClD,OAAA,CAAA8C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"i18next.d.js","names":[],"sources":["../../../src/@types/i18next.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport \"i18next\";\nimport { defaultNS, keySeparator, resources } from \"../i18n.js\";\n\ndeclare module \"i18next\" {\n interface CustomTypeOptions {\n defaultNS: typeof defaultNS;\n keySeparator: typeof keySeparator;\n resources: {\n odyssey: (typeof resources)[\"en\"];\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"i18next.d.js","names":[],"sources":["../../../src/@types/i18next.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport \"i18next\";\n\nimport { defaultNS, keySeparator, resources } from \"../i18n.js\";\n\ndeclare module \"i18next\" {\n interface CustomTypeOptions {\n defaultNS: typeof defaultNS;\n keySeparator: typeof keySeparator;\n resources: {\n odyssey: (typeof resources)[\"en\"];\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"properties.d.js","names":[],"sources":["../../../src/@types/properties.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Copied this in from a PR that will hopefully get merged:\n * @see https://github.com/gagle/node-properties/pull/35\n */\ndeclare module \"properties\" {\n export interface ParseOptions {\n /**\n * By default `parse()` reads a String.\n * If you want to read a file, set this option to true.\n * If this option is used, the callback is mandatory.\n * It gets 2 parameters, a possible error and the object with all the properties.\n */\n path?: boolean;\n\n /**\n * Allows you to add additional comment tokens.\n * The token must be a single printable non-whitespae ascii character.\n * If the `strict` option is not set, the tokens `#` and `!` are parsed as comment tokens.\n *\n * @example\n * comments: \";\"\n * @example\n * comments: [\";\", \"&#064;\"]\n */\n comments?: string | string[];\n\n /**\n * Allows you to add additional separator tokens.\n * The token must be a single printable non-whitespae ascii character.\n * If the `strict` option is not set, the tokens `=` and `:` are parsed as comment tokens.\n *\n * @example\n * separators: \"-\"\n * @example\n * separators: [\"-\", \">\"]\n */\n separators?: string | string[];\n\n /**\n * This option can be used with the `comments` and `separators` options.\n * If true, **only** the tokens specified in these options are used to parse comments and separators.\n */\n strict?: boolean;\n\n /**\n * Parses INI sections.\n * Read the INI section for further details.\n *\n * @link https://www.npmjs.com/package/properties#ini\n */\n sections?: boolean;\n\n /**\n * Parses dot separated keys as JavaScript objects.\n *\n * Look at the namespaces section for further details.\n * @link https://www.npmjs.com/package/properties#namespaces\n */\n namespaces?: boolean;\n\n /**\n * Allows you to read the value of a key while the file is being parsed.\n *\n * Look at the variables section for further details.\n * @link https://www.npmjs.com/package/properties#variables\n */\n variables?: boolean;\n\n /**\n * External variables can be passed to the file if the variables option is enabled.\n *\n * Look at the variables section for further details.\n * @link https://www.npmjs.com/package/properties#variables\n */\n vars?: boolean;\n\n /**\n * Files can be linked and imported with the include key.\n * If this option is used, the callback is mandatory.\n *\n * Look at the include section for further details.\n * @link https://www.npmjs.com/package/properties#include\n */\n include?: boolean;\n\n /**\n * Each property or section can be removed or modified from the final object.\n * It's similar to the reviver of the `JSON.parse()` function.\n *\n * The reviver it's exactly the same as the replacer from `stringify()`.\n * The same function can be reused.\n *\n * The callback gets 3 parameters: key, value and section.\n *\n * A property has a key and a value and can belong to a section.\n * If it's a global property, the section is set to null.\n * If **undefined** is returned, the property will be removed from the final object, otherwise the returned value will be used as the property value.\n *\n * If the key and the value are set to null, then it's a section line.\n * If it returns a falsy value, it won't be added to the final object, the entire section _including all the properties_ will be discarded.\n * If it returns a truthy value, the section is parsed.\n *\n * For your convenience, to know whether the line is a property or section you can access to `this.isProperty` and `this.isSection` from inside the replacer function.\n * Also, `this.assert()` can be used to return the default value, the unmodified value that will be used to parse the line.\n *\n * Look at the reviver example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/reviver/reviver.js\n */\n reviver?: (this: Context, key: any, value: any) => any;\n }\n\n export interface Context {\n assert(): any;\n }\n\n /**\n * Parses a .properties string.\n *\n * @param data\n * @param options\n */\n export function parse(data: string, options?: ParseOptions): object;\n\n /**\n * Parses a .properties string.\n *\n * If a callback is given, the result is returned as the second parameter. Some options will require a callback.\n *\n * @param data\n * @param cb\n */\n export function parse(\n data: string,\n cb: (err: Error, result: { [key: string]: unknown } | undefined) => void,\n ): void;\n\n /**\n * Parses a .properties string.\n *\n * If a callback is given, the result is returned as the second parameter. Some options will require a callback.\n *\n * @param data\n * @param options\n * @param cb\n */\n export function parse(\n data: string,\n options: ParseOptions | undefined,\n cb: (err: Error, result: { [key: string]: unknown } | undefined) => void,\n ): void;\n\n export interface StringifyOptions {\n /**\n * By default `stringify()` returns a string.\n * If you want to write it to a file, use this option and pass the path of a file.\n * If this option is used, the callback is mandatory.\n * It gets two parameters, a possible error and the string.\n */\n path?: string;\n\n /**\n * The token to use to write comments.\n * It must be a single printable non-whitespace ascii character.\n * @default `#`\n */\n comment?: string;\n\n /**\n * The token to use to separate keys from values.\n * It must be a single printable non-whitespace ascii character.\n * @default `=`\n */\n separator?: string;\n\n /**\n * The .properties specification uses iso 8859-1 (latin-1) as a default encoding.\n * In the other hand, Node.js has a utf8 default encoding.\n * This means that if you want a full compatibility with Java, that is, you are generating a .properties file that is going to be read by a Java program, then set this option to true.\n * This will encode all ascii extended and multibyte characters to their unicode string representation (`\\uXXXX`).\n *\n * Non-printable control codes (control sets 0 and 1) are always encoded as unicode strings except `\\t`, `\\n`, `\\f` and `\\r`.\n *\n * If you are in a platform that can handle utf8 strings, e.g. Node.js, you don't need to use this option.\n */\n unicode?: boolean;\n\n /**\n * Each property or section can be removed or modified from the final string.\n * It's similar to the replacer of the `JSON.stringify()` function.\n *\n * The replacer it's exatcly the same as the reviver from `parse()`.\n * The same function can be reused.\n *\n * The callback gets three parameters: key, value and section.\n *\n * A property has a key and a value and can belong to a section.\n * If it's a global property, the section is set to null.\n * If **undefined** is returned, the property won't be stringified, otherwise the returned value will be used as the property value.\n *\n * If the key and the value are set to null, then it's a section line.\n * If it returns a falsy value, it won't be added to the final string, the entire section _including all the properties_ will be discarded.\n * If it returns a truthy value, the section is stringified.\n *\n * For your convenience, to know whether the line is a property or section you can access to `this.isProperty` and `this.isSection` from inside the replacer function.\n * Also, `this.assert()` can be used to return the default value, the unmodified value that will be used to stringify the line.\n *\n * Look at the replacer example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/replacer.js\n */\n replacer?: (this: Context, key: string, value: any) => any;\n }\n\n /**\n * Stringifies an `object` or a `Stringifier`.\n *\n * If you don't need to add sections or comments simply pass an object, otherwise use a `Stringifier`.\n *\n * @param obj\n * @param options\n */\n export function stringify(obj: object, options?: StringifyOptions): string;\n\n /**\n * Stringifies an `object` or a `Stringifier`.\n *\n * If you don't need to add sections or comments simply pass an object, otherwise use a `Stringifier`.\n *\n * The callback is only necessary when the `path` option is used.\n *\n * @param obj\n * @param options\n * @param cb\n */\n export function stringify(\n obj: object,\n options: StringifyOptions | undefined,\n cb: (err: Error, result: string) => void,\n ): void;\n\n /**\n * This class is used when you want to add sections or comments to the final string.\n *\n * To create a Stringifier use the `createStringifier()` function.\n *\n * Look at the stringify-ini example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/ini/stringify-ini.js\n */\n export interface Stringifier {\n /**\n * Writes a header comment.\n * It will be written to the top of the final string.\n * Returns the Stringifier being used.\n */\n header(comment: string): this;\n\n /**\n * Writes a property line.\n * It takes an object with three options: `key`, `value` and comment.\n * Both the key and the value are converted into a string automatically.\n * Returns the Stringifier being used.\n */\n property(obj: { key?: string; value?: string; comment?: string }): this;\n\n /**\n * Writes a section line.\n * It gets an object with two options: `name` and `comment`.\n * The name is converted into a string.\n * If you don't need to write a comment, you can pass the name instead of an object.\n * Returns the stringifier being used.\n */\n section(obj: string | { name: string; comment?: string }): this;\n }\n\n /**\n * Returns a new `Stringifier` instance.\n */\n export function createStringifier(): Stringifier;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"properties.d.js","names":[],"sources":["../../../src/@types/properties.d.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Copied this in from a PR that will hopefully get merged:\n * @see https://github.com/gagle/node-properties/pull/35\n */\ndeclare module \"properties\" {\n export interface ParseOptions {\n /**\n * Allows you to add additional comment tokens.\n * The token must be a single printable non-whitespae ascii character.\n * If the `strict` option is not set, the tokens `#` and `!` are parsed as comment tokens.\n *\n * @example\n * comments: \";\"\n * @example\n * comments: [\";\", \"&#064;\"]\n */\n comments?: string | string[];\n\n /**\n * Files can be linked and imported with the include key.\n * If this option is used, the callback is mandatory.\n *\n * Look at the include section for further details.\n * @link https://www.npmjs.com/package/properties#include\n */\n include?: boolean;\n\n /**\n * Parses dot separated keys as JavaScript objects.\n *\n * Look at the namespaces section for further details.\n * @link https://www.npmjs.com/package/properties#namespaces\n */\n namespaces?: boolean;\n\n /**\n * By default `parse()` reads a String.\n * If you want to read a file, set this option to true.\n * If this option is used, the callback is mandatory.\n * It gets 2 parameters, a possible error and the object with all the properties.\n */\n path?: boolean;\n\n /**\n * Each property or section can be removed or modified from the final object.\n * It's similar to the reviver of the `JSON.parse()` function.\n *\n * The reviver it's exactly the same as the replacer from `stringify()`.\n * The same function can be reused.\n *\n * The callback gets 3 parameters: key, value and section.\n *\n * A property has a key and a value and can belong to a section.\n * If it's a global property, the section is set to null.\n * If **undefined** is returned, the property will be removed from the final object, otherwise the returned value will be used as the property value.\n *\n * If the key and the value are set to null, then it's a section line.\n * If it returns a falsy value, it won't be added to the final object, the entire section _including all the properties_ will be discarded.\n * If it returns a truthy value, the section is parsed.\n *\n * For your convenience, to know whether the line is a property or section you can access to `this.isProperty` and `this.isSection` from inside the replacer function.\n * Also, `this.assert()` can be used to return the default value, the unmodified value that will be used to parse the line.\n *\n * Look at the reviver example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/reviver/reviver.js\n */\n reviver?: (this: Context, key: any, value: any) => any;\n\n /**\n * Parses INI sections.\n * Read the INI section for further details.\n *\n * @link https://www.npmjs.com/package/properties#ini\n */\n sections?: boolean;\n\n /**\n * Allows you to add additional separator tokens.\n * The token must be a single printable non-whitespae ascii character.\n * If the `strict` option is not set, the tokens `=` and `:` are parsed as comment tokens.\n *\n * @example\n * separators: \"-\"\n * @example\n * separators: [\"-\", \">\"]\n */\n separators?: string | string[];\n\n /**\n * This option can be used with the `comments` and `separators` options.\n * If true, **only** the tokens specified in these options are used to parse comments and separators.\n */\n strict?: boolean;\n\n /**\n * Allows you to read the value of a key while the file is being parsed.\n *\n * Look at the variables section for further details.\n * @link https://www.npmjs.com/package/properties#variables\n */\n variables?: boolean;\n\n /**\n * External variables can be passed to the file if the variables option is enabled.\n *\n * Look at the variables section for further details.\n * @link https://www.npmjs.com/package/properties#variables\n */\n vars?: boolean;\n }\n\n export interface Context {\n assert(): any;\n }\n\n /**\n * Parses a .properties string.\n *\n * @param data\n * @param options\n */\n export function parse(data: string, options?: ParseOptions): object;\n\n /**\n * Parses a .properties string.\n *\n * If a callback is given, the result is returned as the second parameter. Some options will require a callback.\n *\n * @param data\n * @param cb\n */\n export function parse(\n data: string,\n cb: (err: Error, result: { [key: string]: unknown } | undefined) => void,\n ): void;\n\n /**\n * Parses a .properties string.\n *\n * If a callback is given, the result is returned as the second parameter. Some options will require a callback.\n *\n * @param data\n * @param options\n * @param cb\n */\n export function parse(\n data: string,\n options: ParseOptions | undefined,\n cb: (err: Error, result: { [key: string]: unknown } | undefined) => void,\n ): void;\n\n export interface StringifyOptions {\n /**\n * The token to use to write comments.\n * It must be a single printable non-whitespace ascii character.\n * @default `#`\n */\n comment?: string;\n\n /**\n * By default `stringify()` returns a string.\n * If you want to write it to a file, use this option and pass the path of a file.\n * If this option is used, the callback is mandatory.\n * It gets two parameters, a possible error and the string.\n */\n path?: string;\n\n /**\n * Each property or section can be removed or modified from the final string.\n * It's similar to the replacer of the `JSON.stringify()` function.\n *\n * The replacer it's exatcly the same as the reviver from `parse()`.\n * The same function can be reused.\n *\n * The callback gets three parameters: key, value and section.\n *\n * A property has a key and a value and can belong to a section.\n * If it's a global property, the section is set to null.\n * If **undefined** is returned, the property won't be stringified, otherwise the returned value will be used as the property value.\n *\n * If the key and the value are set to null, then it's a section line.\n * If it returns a falsy value, it won't be added to the final string, the entire section _including all the properties_ will be discarded.\n * If it returns a truthy value, the section is stringified.\n *\n * For your convenience, to know whether the line is a property or section you can access to `this.isProperty` and `this.isSection` from inside the replacer function.\n * Also, `this.assert()` can be used to return the default value, the unmodified value that will be used to stringify the line.\n *\n * Look at the replacer example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/replacer.js\n */\n replacer?: (this: Context, key: string, value: any) => any;\n\n /**\n * The token to use to separate keys from values.\n * It must be a single printable non-whitespace ascii character.\n * @default `=`\n */\n separator?: string;\n\n /**\n * The .properties specification uses iso 8859-1 (latin-1) as a default encoding.\n * In the other hand, Node.js has a utf8 default encoding.\n * This means that if you want a full compatibility with Java, that is, you are generating a .properties file that is going to be read by a Java program, then set this option to true.\n * This will encode all ascii extended and multibyte characters to their unicode string representation (`\\uXXXX`).\n *\n * Non-printable control codes (control sets 0 and 1) are always encoded as unicode strings except `\\t`, `\\n`, `\\f` and `\\r`.\n *\n * If you are in a platform that can handle utf8 strings, e.g. Node.js, you don't need to use this option.\n */\n unicode?: boolean;\n }\n\n /**\n * Stringifies an `object` or a `Stringifier`.\n *\n * If you don't need to add sections or comments simply pass an object, otherwise use a `Stringifier`.\n *\n * @param obj\n * @param options\n */\n export function stringify(obj: object, options?: StringifyOptions): string;\n\n /**\n * Stringifies an `object` or a `Stringifier`.\n *\n * If you don't need to add sections or comments simply pass an object, otherwise use a `Stringifier`.\n *\n * The callback is only necessary when the `path` option is used.\n *\n * @param obj\n * @param options\n * @param cb\n */\n export function stringify(\n obj: object,\n options: StringifyOptions | undefined,\n cb: (err: Error, result: string) => void,\n ): void;\n\n /**\n * This class is used when you want to add sections or comments to the final string.\n *\n * To create a Stringifier use the `createStringifier()` function.\n *\n * Look at the stringify-ini example for further details.\n * @link https://github.com/gagle/node-properties/blob/master/examples/ini/stringify-ini.js\n */\n export interface Stringifier {\n /**\n * Writes a header comment.\n * It will be written to the top of the final string.\n * Returns the Stringifier being used.\n */\n header(comment: string): this;\n\n /**\n * Writes a property line.\n * It takes an object with three options: `key`, `value` and comment.\n * Both the key and the value are converted into a string automatically.\n * Returns the Stringifier being used.\n */\n property(obj: { comment?: string; key?: string; value?: string }): this;\n\n /**\n * Writes a section line.\n * It gets an object with two options: `name` and `comment`.\n * The name is converted into a string.\n * If you don't need to write a comment, you can pass the name instead of an object.\n * Returns the stringifier being used.\n */\n section(obj: string | { comment?: string; name: string }): this;\n }\n\n /**\n * Returns a new `Stringifier` instance.\n */\n export function createStringifier(): Stringifier;\n}\n"],"mappings":"","ignoreList":[]}
@@ -12,7 +12,6 @@ import _AccordionSummary from "@mui/material/AccordionSummary";
12
12
  *
13
13
  * See the License for the specific language governing permissions and limitations under the License.
14
14
  */
15
-
16
15
  import { memo } from "react";
17
16
  import { ChevronDownIcon } from "./icons.generated/index.js";
18
17
  import { Support } from "./Typography.js";
@@ -35,8 +34,8 @@ const Accordion = ({
35
34
  const headerId = `${id}-header`;
36
35
  const contentId = `${id}-content`;
37
36
  return _jsxs(_Accordion, {
38
- "data-se": testId,
39
37
  "data-ods-variant": variant,
38
+ "data-se": testId,
40
39
  defaultExpanded: isDefaultExpanded,
41
40
  disabled: isDisabled,
42
41
  disableGutters: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","accordionVariantValues","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","testId","translate","variant","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.js\";\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/index.js\";\nimport { Support } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const accordionVariantValues = [\"default\", \"borderless\"] as const;\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 /**\n * Visual style for the accordion (default or borderless)\n */\n variant?: (typeof accordionVariantValues)[number];\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 variant = \"default\",\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 data-ods-variant={variant}\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;AAQvC,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,WAAW,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,OAAO,MAAMC,sBAAsB,GAAG,CAAC,SAAS,EAAE,YAAY,CAAU;AA+CxE,MAAMC,SAAS,GAAGA,CAAC;EACjBC,QAAQ;EACRC,KAAK;EACLC,EAAE,EAAEC,UAAU;EACdC,iBAAiB;EACjBC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,SAAS;EACTC,OAAO,GAAG;AACI,CAAC,KAAK;EACpB,MAAMR,EAAE,GAAGT,WAAW,CAACU,UAAU,CAAC;EAClC,MAAMQ,QAAQ,GAAG,GAAGT,EAAE,SAAS;EAC/B,MAAMU,SAAS,GAAG,GAAGV,EAAE,UAAU;EAEjC,OACEL,KAAA,CAAAgB,UAAA;IACE,WAASL,MAAO;IAChB,oBAAkBE,OAAQ;IAC1BI,eAAe,EAAEV,iBAAkB;IACnCW,QAAQ,EAAEV,UAAW;IACrBW,cAAc;IACdC,QAAQ,EAAEX,UAAW;IACrBC,QAAQ,EAAEA,QAAS;IAAAP,QAAA,GAEnBL,IAAA,CAAAuB,iBAAA;MACE,iBAAeN,SAAU;MACzBO,UAAU,EAAExB,IAAA,CAACJ,eAAe,IAAE,CAAE;MAChCW,EAAE,EAAES,QAAS;MAAAX,QAAA,EAEbL,IAAA,CAACH,OAAO;QAAC4B,SAAS,EAAC,KAAK;QAACX,SAAS,EAAEA,SAAU;QAAAT,QAAA,EAC3CC;MAAK,CACC;IAAC,CACS,CAAC,EACtBN,IAAA,CAAA0B,iBAAA;MAAqB,mBAAiBV,QAAS;MAAAX,QAAA,EAC5CA;IAAQ,CACU,CAAC;EAAA,CACV,CAAC;AAEnB,CAAC;AAED,MAAMsB,iBAAiB,GAAGhC,IAAI,CAACS,SAAS,CAAC;AACzCuB,iBAAiB,CAACC,WAAW,GAAG,WAAW;AAE3C,SAASD,iBAAiB,IAAIvB,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"Accordion.js","names":["memo","ChevronDownIcon","Support","useUniqueId","jsx","_jsx","jsxs","_jsxs","accordionVariantValues","Accordion","children","label","id","idOverride","isDefaultExpanded","isDisabled","isExpanded","onChange","testId","translate","variant","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 {\n Accordion as MuiAccordion,\n AccordionDetails as MuiAccordionDetails,\n AccordionProps as MuiAccordionProps,\n AccordionSummary as MuiAccordionSummary,\n} from \"@mui/material\";\nimport { memo, ReactNode } from \"react\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { ChevronDownIcon } from \"./icons.generated/index.js\";\nimport { Support } from \"./Typography.js\";\nimport { useUniqueId } from \"./useUniqueId.js\";\n\nexport const accordionVariantValues = [\"default\", \"borderless\"] as const;\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 * 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 * The label text for the AccordionSummary\n */\n label: string;\n onChange?: MuiAccordionProps[\"onChange\"];\n /**\n * Event fired when the expansion state of the accordion is changed\n */\n /**\n * Visual style for the accordion (default or borderless)\n */\n variant?: (typeof accordionVariantValues)[number];\n} & (\n | {\n isDefaultExpanded?: never;\n isExpanded: boolean;\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 variant = \"default\",\n}: AccordionProps) => {\n const id = useUniqueId(idOverride);\n const headerId = `${id}-header`;\n const contentId = `${id}-content`;\n\n return (\n <MuiAccordion\n data-ods-variant={variant}\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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAQA,SAASA,IAAI,QAAmB,OAAO;AAIvC,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,OAAO,QAAQ,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SAAS","ignoreList":[]}
@@ -10,7 +10,6 @@ import _Autocomplete from "@mui/material/Autocomplete";
10
10
  *
11
11
  * See the License for the specific language governing permissions and limitations under the License.
12
12
  */
13
-
14
13
  import { memo } from "react";
15
14
  import { useTranslation } from "react-i18next";
16
15
  import { PickerVirtualizationListBox } from "./labs/OdysseyPickers/PickerVirtualizationListBox.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Autocomplete.js","names":["memo","useTranslation","PickerVirtualizationListBox","useAutocomplete","jsx","_jsx","AutocompleteTestSelector","accessibleText","errorMessage","hint","label","children","list","listItem","elementSelector","method","options","role","isControlledElement","Autocomplete","ariaDescribedBy","defaultValue","errorMessageList","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","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 { memo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n Autocomplete as MuiAutocomplete,\n AutocompleteProps as MuiAutocompleteProps,\n UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\nimport { TestSelector } from \"./test-selectors/index.js\";\n\nexport const AutocompleteTestSelector = {\n accessibleText: {\n errorMessage: \"errorMessage\",\n hint: \"description\",\n label: \"label\",\n },\n children: {\n list: {\n children: {\n listItem: {\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"option\",\n },\n },\n },\n isControlledElement: true,\n },\n },\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"combobox\",\n },\n} as const satisfies TestSelector;\n// type SetItemSize = (size: number) => void;\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?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\n /**\n * Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided). If used in free solo mode, it must accept both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\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 * 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?: MuiUseAutocompleteProps<\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 * 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 /**\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?: MuiUseAutocompleteProps<\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?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\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 Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\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 filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\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;;AAEA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,cAAc,QAAQ,eAAe;AAS9C,SAASC,2BAA2B,QAAQ,sDAAsD;AAClG,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGvD,OAAO,MAAMC,wBAAwB,GAAG;EACtCC,cAAc,EAAE;IACdC,YAAY,EAAE,cAAc;IAC5BC,IAAI,EAAE,aAAa;IACnBC,KAAK,EAAE;EACT,CAAC;EACDC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJD,QAAQ,EAAE;QACRE,QAAQ,EAAE;UACRC,eAAe,EAAE;YACfC,MAAM,EAAE,QAAQ;YAChBC,OAAO,EAAE;cACPN,KAAK,EAAE;YACT,CAAC;YACDO,IAAI,EAAE;UACR;QACF;MACF,CAAC;MACDC,mBAAmB,EAAE;IACvB;EACF,CAAC;EACDJ,eAAe,EAAE;IACfC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE;MACPN,KAAK,EAAE;IACT,CAAC;IACDO,IAAI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EAAE,IAAK;IAC5BC,QAAQ,EAAE9B,oBAAqB;IAC/B+B,SAAS,EAAE7B,WAAY;IACvBR,cAAc,EAAEA,cAAe;IAC/BG,EAAE,EAAEC,UAAW;IACfkC,oBAAoB,EAAEvC,uBAAwB;IAC9CwC,OAAO,EAAE9B,SAAU;IACnB+B,QAAQ,EAAEvC,kBAAmB;IAC7Bc,aAAa,EAAEA,aAAa,IAAIQ,CAAC,CAAC,wBAAwB,CAAE;IAC5DP,MAAM,EAAEA,MAAO;IACfC,QAAQ,EAAEA,QAAS;IACnBC,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAEA,aAAc;IAC7BsB,QAAQ,EAAElB,CAAC,CAAC,WAAW,CAAE;IACzB/B,OAAO,EAAEA,OAAQ;IACjBkD,QAAQ,EAAE/B,UAAW;IACrBe,WAAW,EAAEA,WAAY;IACzBL,SAAS,EAAEA;EAAU,CACtB,CAAC;AAEN,CAAC;AAGD,MAAMsB,oBAAoB,GAAGnE,IAAI,CAACmB,YAAY,CAAwB;AAEtEgD,oBAAoB,CAACC,WAAW,GAAG,cAAc;AAEjD,SAASD,oBAAoB,IAAIhD,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"Autocomplete.js","names":["memo","useTranslation","PickerVirtualizationListBox","useAutocomplete","jsx","_jsx","AutocompleteTestSelector","accessibleText","errorMessage","hint","label","children","list","listItem","elementSelector","method","options","role","isControlledElement","Autocomplete","ariaDescribedBy","defaultValue","errorMessageList","getIsOptionEqualToValue","getOptionLabel","hasMultipleChoices","HintLinkComponent","id","idOverride","inputValue","isCustomValueAllowed","isDisabled","isFullWidth","isLoading","isOptional","isReadOnly","isVirtualized","name","nameOverride","noOptionsText","onBlur","onChange","onFocus","onInputChange","testId","translate","value","t","inputValueProp","isVirtualizedRef","renderInput","valueProps","_Autocomplete","current","ListboxComponent","clearText","closeText","disableCloseOnSelect","disabled","filterSelectedOptions","freeSolo","fullWidth","isOptionEqualToValue","loading","multiple","openText","readOnly","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 UseAutocompleteProps as MuiUseAutocompleteProps,\n} from \"@mui/material\";\nimport { memo } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { FieldComponentProps } from \"./FieldComponentProps.js\";\nimport { PickerVirtualizationListBox } from \"./labs/OdysseyPickers/PickerVirtualizationListBox.js\";\nimport { TestSelector } from \"./test-selectors/index.js\";\nimport { useAutocomplete } from \"./useAutocomplete.js\";\n\nexport const AutocompleteTestSelector = {\n accessibleText: {\n errorMessage: \"errorMessage\",\n hint: \"description\",\n label: \"label\",\n },\n children: {\n list: {\n children: {\n listItem: {\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"option\",\n },\n },\n },\n isControlledElement: true,\n },\n },\n elementSelector: {\n method: \"ByRole\",\n options: {\n label: \"name\",\n },\n role: \"combobox\",\n },\n} as const satisfies TestSelector;\n// type SetItemSize = (size: number) => void;\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?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"defaultValue\"];\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 * Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption is not provided). If used in free solo mode, it must accept both the type of the options and a string.\n *\n * `function(option: Value) => string`\n */\n getOptionLabel?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"getOptionLabel\"];\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?: MuiUseAutocompleteProps<\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 * 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 /**\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?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onChange\"];\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 * Callback fired when the textbox receives typed characters.\n */\n onInputChange?: MuiAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"onInputChange\"];\n /**\n * The options for the Autocomplete input\n */\n options: ReadonlyArray<OptionType>;\n /**\n * The value of the Autocomplete input\n */\n value?: MuiUseAutocompleteProps<\n OptionType,\n HasMultipleChoices,\n undefined,\n IsCustomValueAllowed\n >[\"value\"];\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 Autocomplete = <\n OptionType,\n HasMultipleChoices extends boolean | undefined,\n IsCustomValueAllowed extends boolean | undefined,\n>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n getIsOptionEqualToValue,\n getOptionLabel,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n id: idOverride,\n inputValue,\n isCustomValueAllowed,\n isDisabled,\n isFullWidth = false,\n isLoading,\n isOptional = false,\n isReadOnly,\n isVirtualized = false,\n label,\n name: nameOverride,\n noOptionsText,\n onBlur,\n onChange,\n onFocus,\n onInputChange,\n options,\n testId,\n translate,\n value,\n}: AutocompleteProps<OptionType, HasMultipleChoices, IsCustomValueAllowed>) => {\n const { t } = useTranslation();\n const { inputValueProp, isVirtualizedRef, renderInput, valueProps } =\n useAutocomplete<OptionType, HasMultipleChoices, IsCustomValueAllowed>({\n ariaDescribedBy,\n defaultValue,\n errorMessage,\n errorMessageList,\n hasMultipleChoices,\n hint,\n HintLinkComponent,\n inputValue,\n isFullWidth,\n isOptional,\n isVirtualized,\n label,\n name: nameOverride,\n testId,\n value,\n });\n\n return (\n <MuiAutocomplete\n {...valueProps}\n {...inputValueProp}\n // conditionally provide the ListboxComponent if this needs to be virtualized\n {...(isVirtualizedRef.current && {\n ListboxComponent: PickerVirtualizationListBox,\n })}\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 filterSelectedOptions={true}\n freeSolo={isCustomValueAllowed}\n fullWidth={isFullWidth}\n getOptionLabel={getOptionLabel}\n id={idOverride}\n isOptionEqualToValue={getIsOptionEqualToValue}\n loading={isLoading}\n multiple={hasMultipleChoices}\n noOptionsText={noOptionsText || t(\"autocomplete.nooptions\")}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n onInputChange={onInputChange}\n openText={t(\"open.text\")}\n options={options}\n readOnly={isReadOnly}\n renderInput={renderInput}\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;AAOA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,cAAc,QAAQ,eAAe;AAK9C,SAASC,2BAA2B,QAAQ,sDAAsD;AAElG,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC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CHANGED
@@ -11,8 +11,8 @@
11
11
  */
12
12
 
13
13
  import { memo, useMemo } from "react";
14
- import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
15
14
  import { Box } from "./Box.js";
15
+ import { useOdysseyDesignTokens } from "./OdysseyDesignTokensContext.js";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  export const badgeContentMaxValues = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
18
18
  export const badgeTypeValues = ["default", "attention", "danger"];
@@ -1 +1 @@
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.js\";\nimport { Box } from \"./Box.js\";\nimport type { HtmlProps } from \"./HtmlProps.js\";\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;AAEpD,SACEC,sBAAsB,QAEjB,iCAAiC;AACxC,SAASC,GAAG,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG/B,OAAO,MAAMC,qBAAqB,GAAG,CACnC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAC/B;AACV,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,E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kC,KAAK,EAAErC,eAAe,CAACkB,mBAAmB,CAAC,CAACD,IAAI,CAAC,CAACZ,IAAI;MACtDiC,YAAY,EACVd,gBAAgB,CAACe,MAAM,GAAG,CAAC,GACvB,GAAGrB,mBAAmB,CAACsB,iBAAiB,EAAE,GAC1C,KAAK;MACXC,QAAQ,EAAE,GAAGvB,mBAAmB,CAACwB,gBAAgB,EAAE;MACnDC,UAAU,EAAE,GAAGzB,mBAAmB,CAAC0B,oBAAoB,EAAE;MACzDC,UAAU,EAAE,GAAG3B,mBAAmB,CAAC4B,wBAAwB,EAAE;MAC7DC,UAAU,EAAE,CAAC;MACbC,kBAAkB,EAAE,GAAG9B,mBAAmB,CAAC+B,sBAAsB,EAAE;MACnEC,kBAAkB,EAAE;IACtB,CAAC;IAED,MAAMC,oBAAoB,GAAGtC,YAAY,IAAIA,YAAY,GAAG,CAAC;IAE7D,OAAOsC,oBAAoB,GACzBtD,IAAA,CAACF,GAAG;MAACyD,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,GAAG9D,IAAI,CAACoB,KAAK,CAAC;AACjC0C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI1C,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Badge.js","names":["memo","useMemo","Box","useOdysseyDesignTokens","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 type { HtmlProps } from \"./HtmlProps.js\";\n\nimport { Box } from \"./Box.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"./OdysseyDesignTokensContext.js\";\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);\nMem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,oBAAoB,GACzBtD,IAAA,CAACH,GAAG;MAAC0D,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,GAAG9D,IAAI,CAACoB,KAAK,CAAC;AACjC0C,aAAa,CAACC,WAAW,GAAG,OAAO;AAEnC,SAASD,aAAa,IAAI1C,KAAK","ignoreList":[]}
@@ -11,7 +11,6 @@ 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
-
15
14
  import { memo } from "react";
16
15
  import { useTranslation } from "react-i18next";
17
16
  import { Link } from "./Link.js";