@okta/odyssey-react-mui 1.67.0 → 1.68.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 (485) hide show
  1. package/dist/cjs/Accordion.cjs +1 -1
  2. package/dist/cjs/Autocomplete.cjs +1 -1
  3. package/dist/cjs/Badge.cjs +1 -1
  4. package/dist/cjs/Banner.cjs +1 -1
  5. package/dist/cjs/Box.cjs +1 -1
  6. package/dist/cjs/Breadcrumbs.cjs +1 -1
  7. package/dist/cjs/Buttons/BaseButton.cjs +24 -6
  8. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  9. package/dist/cjs/Buttons/BaseMenuButton.cjs +1 -1
  10. package/dist/cjs/Buttons/Button.cjs +1 -1
  11. package/dist/cjs/Buttons/MenuButton.cjs +1 -1
  12. package/dist/cjs/Buttons/MenuItem.cjs +1 -1
  13. package/dist/cjs/Callout.cjs +1 -1
  14. package/dist/cjs/Card.cjs +1 -1
  15. package/dist/cjs/CircularProgress.cjs +1 -1
  16. package/dist/cjs/ConditionalWrapper.cjs +1 -1
  17. package/dist/cjs/DataTable/DataTable.cjs +1 -1
  18. package/dist/cjs/DataTable/DataTableRowActions.cjs +1 -1
  19. package/dist/cjs/DataTable/DataTableSettings.cjs +1 -1
  20. package/dist/cjs/DatePickers/DateField.cjs +1 -1
  21. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +1 -1
  22. package/dist/cjs/DatePickers/DateFieldLocalizationProvider.cjs +1 -1
  23. package/dist/cjs/DatePickers/DatePicker.cjs +1 -1
  24. package/dist/cjs/DatePickers/TimeZonePicker.cjs +1 -1
  25. package/dist/cjs/Dialog.cjs +1 -1
  26. package/dist/cjs/Drawer.cjs +1 -1
  27. package/dist/cjs/EmptyState.cjs +1 -1
  28. package/dist/cjs/ErrorMessageList.cjs +1 -1
  29. package/dist/cjs/Field.cjs +1 -1
  30. package/dist/cjs/FieldError.cjs +1 -1
  31. package/dist/cjs/FieldHint.cjs +1 -1
  32. package/dist/cjs/FieldLabel.cjs +1 -1
  33. package/dist/cjs/Fields/Checkbox.cjs +1 -1
  34. package/dist/cjs/Fields/CheckboxGroup.cjs +1 -1
  35. package/dist/cjs/Fields/Radio.cjs +1 -1
  36. package/dist/cjs/Fields/RadioGroup.cjs +1 -1
  37. package/dist/cjs/Fieldset.cjs +1 -1
  38. package/dist/cjs/FileUploader/FileUploadIllustration.cjs +1 -1
  39. package/dist/cjs/FileUploader/FileUploadPreview.cjs +1 -1
  40. package/dist/cjs/FileUploader/FileUploader.cjs +1 -1
  41. package/dist/cjs/Form.cjs +1 -1
  42. package/dist/cjs/FullScreenOverlay.cjs +1 -1
  43. package/dist/cjs/FullScreenOverlayContext.cjs +1 -1
  44. package/dist/cjs/HintLink.cjs +1 -1
  45. package/dist/cjs/IconWithTooltip.cjs +1 -1
  46. package/dist/cjs/Link.cjs +1 -1
  47. package/dist/cjs/MuiPropsChild.cjs +1 -1
  48. package/dist/cjs/NativeSelect.cjs +1 -1
  49. package/dist/cjs/OdysseyCacheProvider.cjs +1 -1
  50. package/dist/cjs/OdysseyProvider.cjs +1 -1
  51. package/dist/cjs/OdysseyThemeProvider.cjs +3 -2
  52. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  53. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs +1 -1
  54. package/dist/cjs/Pagination/Pagination.cjs +1 -1
  55. package/dist/cjs/PasswordField.cjs +1 -1
  56. package/dist/cjs/ScreenReaderText.cjs +1 -1
  57. package/dist/cjs/SearchField.cjs +1 -1
  58. package/dist/cjs/Select.cjs +1 -1
  59. package/dist/cjs/Stack.cjs +1 -1
  60. package/dist/cjs/Status.cjs +1 -1
  61. package/dist/cjs/Surface.cjs +1 -1
  62. package/dist/cjs/Switch.cjs +2 -2
  63. package/dist/cjs/Tabs.cjs +1 -1
  64. package/dist/cjs/Tag.cjs +1 -1
  65. package/dist/cjs/TagList.cjs +1 -1
  66. package/dist/cjs/TextField.cjs +1 -1
  67. package/dist/cjs/Toast.cjs +1 -1
  68. package/dist/cjs/ToastStack.cjs +1 -1
  69. package/dist/cjs/Tooltip.cjs +1 -1
  70. package/dist/cjs/Typography.cjs +12 -12
  71. package/dist/cjs/icons.generated/Add.cjs +1 -1
  72. package/dist/cjs/icons.generated/AddCircle.cjs +1 -1
  73. package/dist/cjs/icons.generated/Apps.cjs +1 -1
  74. package/dist/cjs/icons.generated/AppsSelected.cjs +1 -1
  75. package/dist/cjs/icons.generated/ArrowBottom.cjs +1 -1
  76. package/dist/cjs/icons.generated/ArrowDown.cjs +1 -1
  77. package/dist/cjs/icons.generated/ArrowLeft.cjs +1 -1
  78. package/dist/cjs/icons.generated/ArrowLowerLeft.cjs +1 -1
  79. package/dist/cjs/icons.generated/ArrowLowerRight.cjs +1 -1
  80. package/dist/cjs/icons.generated/ArrowRight.cjs +1 -1
  81. package/dist/cjs/icons.generated/ArrowTop.cjs +1 -1
  82. package/dist/cjs/icons.generated/ArrowUnsorted.cjs +1 -1
  83. package/dist/cjs/icons.generated/ArrowUp.cjs +1 -1
  84. package/dist/cjs/icons.generated/ArrowUpperLeft.cjs +1 -1
  85. package/dist/cjs/icons.generated/ArrowUpperRight.cjs +1 -1
  86. package/dist/cjs/icons.generated/Bug.cjs +1 -1
  87. package/dist/cjs/icons.generated/Calendar.cjs +1 -1
  88. package/dist/cjs/icons.generated/Call.cjs +1 -1
  89. package/dist/cjs/icons.generated/Chat.cjs +1 -1
  90. package/dist/cjs/icons.generated/Check.cjs +1 -1
  91. package/dist/cjs/icons.generated/CheckCircleFilled.cjs +1 -1
  92. package/dist/cjs/icons.generated/ChevronDown.cjs +1 -1
  93. package/dist/cjs/icons.generated/ChevronLeft.cjs +1 -1
  94. package/dist/cjs/icons.generated/ChevronRight.cjs +1 -1
  95. package/dist/cjs/icons.generated/ChevronUp.cjs +1 -1
  96. package/dist/cjs/icons.generated/Clock.cjs +1 -1
  97. package/dist/cjs/icons.generated/Close.cjs +1 -1
  98. package/dist/cjs/icons.generated/CloseCircleFilled.cjs +1 -1
  99. package/dist/cjs/icons.generated/CollapseLeft.cjs +1 -1
  100. package/dist/cjs/icons.generated/CollapseRight.cjs +1 -1
  101. package/dist/cjs/icons.generated/Copy.cjs +1 -1
  102. package/dist/cjs/icons.generated/Customizations.cjs +1 -1
  103. package/dist/cjs/icons.generated/CustomizationsSelected.cjs +1 -1
  104. package/dist/cjs/icons.generated/DangerDiamond.cjs +1 -1
  105. package/dist/cjs/icons.generated/DangerDiamondFilled.cjs +1 -1
  106. package/dist/cjs/icons.generated/Delete.cjs +1 -1
  107. package/dist/cjs/icons.generated/Deny.cjs +1 -1
  108. package/dist/cjs/icons.generated/Devices.cjs +1 -1
  109. package/dist/cjs/icons.generated/Directory.cjs +1 -1
  110. package/dist/cjs/icons.generated/DirectorySelected.cjs +1 -1
  111. package/dist/cjs/icons.generated/Documentation.cjs +1 -1
  112. package/dist/cjs/icons.generated/Download.cjs +1 -1
  113. package/dist/cjs/icons.generated/DragIndicator.cjs +1 -1
  114. package/dist/cjs/icons.generated/Edit.cjs +1 -1
  115. package/dist/cjs/icons.generated/ExpandLeft.cjs +1 -1
  116. package/dist/cjs/icons.generated/ExpandRight.cjs +1 -1
  117. package/dist/cjs/icons.generated/ExternalLink.cjs +1 -1
  118. package/dist/cjs/icons.generated/Filter.cjs +1 -1
  119. package/dist/cjs/icons.generated/Folder.cjs +1 -1
  120. package/dist/cjs/icons.generated/Globe.cjs +1 -1
  121. package/dist/cjs/icons.generated/Grid.cjs +1 -1
  122. package/dist/cjs/icons.generated/Group.cjs +1 -1
  123. package/dist/cjs/icons.generated/Happy.cjs +1 -1
  124. package/dist/cjs/icons.generated/Hide.cjs +1 -1
  125. package/dist/cjs/icons.generated/Home.cjs +1 -1
  126. package/dist/cjs/icons.generated/HomeSelected.cjs +1 -1
  127. package/dist/cjs/icons.generated/IdentityGovernance.cjs +1 -1
  128. package/dist/cjs/icons.generated/IdentityGovernanceSelected.cjs +1 -1
  129. package/dist/cjs/icons.generated/InformationCircle.cjs +1 -1
  130. package/dist/cjs/icons.generated/InformationCircleFilled.cjs +1 -1
  131. package/dist/cjs/icons.generated/Link.cjs +1 -1
  132. package/dist/cjs/icons.generated/List.cjs +1 -1
  133. package/dist/cjs/icons.generated/Lock.cjs +1 -1
  134. package/dist/cjs/icons.generated/Menu.cjs +1 -1
  135. package/dist/cjs/icons.generated/More.cjs +1 -1
  136. package/dist/cjs/icons.generated/Neutral.cjs +1 -1
  137. package/dist/cjs/icons.generated/Notification.cjs +1 -1
  138. package/dist/cjs/icons.generated/Pause.cjs +1 -1
  139. package/dist/cjs/icons.generated/QuestionCircle.cjs +1 -1
  140. package/dist/cjs/icons.generated/QuestionCircleFilled.cjs +1 -1
  141. package/dist/cjs/icons.generated/Refresh.cjs +1 -1
  142. package/dist/cjs/icons.generated/Reports.cjs +1 -1
  143. package/dist/cjs/icons.generated/ReportsSelected.cjs +1 -1
  144. package/dist/cjs/icons.generated/Reset.cjs +1 -1
  145. package/dist/cjs/icons.generated/Resume.cjs +1 -1
  146. package/dist/cjs/icons.generated/Sad.cjs +1 -1
  147. package/dist/cjs/icons.generated/Same.cjs +1 -1
  148. package/dist/cjs/icons.generated/Search.cjs +1 -1
  149. package/dist/cjs/icons.generated/Security.cjs +1 -1
  150. package/dist/cjs/icons.generated/SecuritySelected.cjs +1 -1
  151. package/dist/cjs/icons.generated/Send.cjs +1 -1
  152. package/dist/cjs/icons.generated/Server.cjs +1 -1
  153. package/dist/cjs/icons.generated/Settings.cjs +1 -1
  154. package/dist/cjs/icons.generated/SettingsSelected.cjs +1 -1
  155. package/dist/cjs/icons.generated/Show.cjs +1 -1
  156. package/dist/cjs/icons.generated/Sparkle.cjs +1 -1
  157. package/dist/cjs/icons.generated/Subtract.cjs +1 -1
  158. package/dist/cjs/icons.generated/Sync.cjs +1 -1
  159. package/dist/cjs/icons.generated/ThumbsDown.cjs +1 -1
  160. package/dist/cjs/icons.generated/ThumbsUp.cjs +1 -1
  161. package/dist/cjs/icons.generated/Unlock.cjs +1 -1
  162. package/dist/cjs/icons.generated/Upload.cjs +1 -1
  163. package/dist/cjs/icons.generated/User.cjs +1 -1
  164. package/dist/cjs/icons.generated/Video.cjs +1 -1
  165. package/dist/cjs/icons.generated/Warning.cjs +1 -1
  166. package/dist/cjs/icons.generated/WarningFilled.cjs +1 -1
  167. package/dist/cjs/icons.generated/Workflows.cjs +1 -1
  168. package/dist/cjs/icons.generated/WorkflowsSelected.cjs +1 -1
  169. package/dist/cjs/index.cjs +12 -0
  170. package/dist/cjs/index.cjs.map +1 -1
  171. package/dist/cjs/labs/AppTile.cjs +1 -1
  172. package/dist/cjs/labs/DataFilters.cjs +2 -2
  173. package/dist/cjs/labs/DataTable.cjs +1 -1
  174. package/dist/cjs/labs/DataTablePagination.cjs +1 -1
  175. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +1 -1
  176. package/dist/cjs/labs/DataView/CardLayoutContent.cjs +2 -2
  177. package/dist/cjs/labs/DataView/DataCard.cjs +1 -1
  178. package/dist/cjs/labs/DataView/DataTable.cjs +1 -1
  179. package/dist/cjs/labs/DataView/DataView.cjs +1 -1
  180. package/dist/cjs/labs/DataView/DetailPanel.cjs +1 -1
  181. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +1 -1
  182. package/dist/cjs/labs/DataView/RowActions.cjs +1 -1
  183. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +1 -1
  184. package/dist/cjs/labs/DataView/TableSettings.cjs +1 -1
  185. package/dist/cjs/labs/DatePickers/DateTimeField.cjs +1 -1
  186. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +1 -1
  187. package/dist/cjs/labs/OdysseyPickers/ComposablePicker.cjs +1 -1
  188. package/dist/cjs/labs/OdysseyPickers/Picker.cjs +1 -1
  189. package/dist/cjs/labs/OdysseyPickers/PickerVirtualizationListBox.cjs +1 -1
  190. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +1 -1
  191. package/dist/cjs/labs/OdysseyPickers/SearchDropdown.cjs +1 -1
  192. package/dist/cjs/labs/PageTemplate/DocumentationLink.cjs +1 -1
  193. package/dist/cjs/labs/PageTemplate/Layout.cjs +1 -1
  194. package/dist/cjs/labs/PageTemplate/PageTemplate.cjs +1 -1
  195. package/dist/cjs/labs/PaginatedTable.cjs +1 -1
  196. package/dist/cjs/labs/StaticTable.cjs +1 -1
  197. package/dist/cjs/labs/UserProfile.cjs +1 -1
  198. package/dist/cjs/labs/UserProfileMenuButton.cjs +1 -1
  199. package/dist/cjs/logos.generated/Duo.cjs +1 -1
  200. package/dist/cjs/logos.generated/GoogleAuth.cjs +1 -1
  201. package/dist/cjs/logos.generated/OktaVerify.cjs +1 -1
  202. package/dist/cjs/logos.generated/Persona.cjs +1 -1
  203. package/dist/cjs/logos.generated/SymantecVip.cjs +1 -1
  204. package/dist/cjs/logos.generated/Yubikey.cjs +1 -1
  205. package/dist/cjs/theme/components/Button.cjs +6 -6
  206. package/dist/cjs/theme/components/Button.cjs.map +1 -1
  207. package/dist/cjs/theme/theme.cjs +22 -0
  208. package/dist/cjs/theme/theme.cjs.map +1 -1
  209. package/dist/cjs/theme/useAppElementContainerQuery.cjs +37 -0
  210. package/dist/cjs/theme/useAppElementContainerQuery.cjs.map +1 -0
  211. package/dist/cjs/theme/useContainerQuery.cjs +94 -0
  212. package/dist/cjs/theme/useContainerQuery.cjs.map +1 -0
  213. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +1 -1
  214. package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -1
  215. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +1 -1
  216. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +1 -1
  217. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +1 -1
  218. package/dist/cjs/ui-shell/SideNav/SideNavFooterContent.cjs +1 -1
  219. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +1 -1
  220. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +2 -2
  221. package/dist/cjs/ui-shell/SideNav/SideNavItemLinkContent.cjs +1 -1
  222. package/dist/cjs/ui-shell/SideNav/SideNavSortableList.cjs +1 -1
  223. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -2
  224. package/dist/cjs/ui-shell/SkipToContent.cjs +1 -1
  225. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +1 -1
  226. package/dist/cjs/ui-shell/TopNav/TopNav.cjs +1 -1
  227. package/dist/cjs/ui-shell/TopNav/TopNavLinksList.cjs +1 -1
  228. package/dist/cjs/ui-shell/TopNav/TopNavListItem.cjs +1 -1
  229. package/dist/cjs/ui-shell/UiShell.cjs +1 -1
  230. package/dist/cjs/ui-shell/UiShellLogo.cjs +1 -1
  231. package/dist/cjs/ui-shell/WideUiShellContent.cjs +1 -1
  232. package/dist/cjs/useContrastMode.cjs.map +1 -1
  233. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  234. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  235. package/dist/esm/Accordion.js +1 -1
  236. package/dist/esm/Autocomplete.js +1 -1
  237. package/dist/esm/Badge.js +1 -1
  238. package/dist/esm/Banner.js +1 -1
  239. package/dist/esm/Box.js +1 -1
  240. package/dist/esm/Breadcrumbs.js +1 -1
  241. package/dist/esm/Buttons/BaseButton.js +24 -6
  242. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  243. package/dist/esm/Buttons/BaseMenuButton.js +1 -1
  244. package/dist/esm/Buttons/Button.js +1 -1
  245. package/dist/esm/Buttons/MenuButton.js +1 -1
  246. package/dist/esm/Buttons/MenuItem.js +1 -1
  247. package/dist/esm/Callout.js +1 -1
  248. package/dist/esm/Card.js +1 -1
  249. package/dist/esm/CircularProgress.js +1 -1
  250. package/dist/esm/ConditionalWrapper.js +1 -1
  251. package/dist/esm/DataTable/DataTable.js +1 -1
  252. package/dist/esm/DataTable/DataTableRowActions.js +1 -1
  253. package/dist/esm/DataTable/DataTableSettings.js +1 -1
  254. package/dist/esm/DatePickers/DateField.js +1 -1
  255. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  256. package/dist/esm/DatePickers/DateFieldLocalizationProvider.js +1 -1
  257. package/dist/esm/DatePickers/DatePicker.js +1 -1
  258. package/dist/esm/DatePickers/TimeZonePicker.js +1 -1
  259. package/dist/esm/Dialog.js +1 -1
  260. package/dist/esm/Drawer.js +1 -1
  261. package/dist/esm/EmptyState.js +1 -1
  262. package/dist/esm/ErrorMessageList.js +1 -1
  263. package/dist/esm/Field.js +1 -1
  264. package/dist/esm/FieldError.js +1 -1
  265. package/dist/esm/FieldHint.js +1 -1
  266. package/dist/esm/FieldLabel.js +1 -1
  267. package/dist/esm/Fields/Checkbox.js +1 -1
  268. package/dist/esm/Fields/CheckboxGroup.js +1 -1
  269. package/dist/esm/Fields/Radio.js +1 -1
  270. package/dist/esm/Fields/RadioGroup.js +1 -1
  271. package/dist/esm/Fieldset.js +1 -1
  272. package/dist/esm/FileUploader/FileUploadIllustration.js +1 -1
  273. package/dist/esm/FileUploader/FileUploadPreview.js +1 -1
  274. package/dist/esm/FileUploader/FileUploader.js +1 -1
  275. package/dist/esm/Form.js +1 -1
  276. package/dist/esm/FullScreenOverlay.js +1 -1
  277. package/dist/esm/FullScreenOverlayContext.js +1 -1
  278. package/dist/esm/HintLink.js +1 -1
  279. package/dist/esm/IconWithTooltip.js +1 -1
  280. package/dist/esm/Link.js +1 -1
  281. package/dist/esm/MuiPropsChild.js +1 -1
  282. package/dist/esm/NativeSelect.js +1 -1
  283. package/dist/esm/OdysseyCacheProvider.js +1 -1
  284. package/dist/esm/OdysseyProvider.js +1 -1
  285. package/dist/esm/OdysseyThemeProvider.js +3 -2
  286. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  287. package/dist/esm/OdysseyThemeProviderPropsContext.js +1 -1
  288. package/dist/esm/Pagination/Pagination.js +1 -1
  289. package/dist/esm/PasswordField.js +1 -1
  290. package/dist/esm/ScreenReaderText.js +1 -1
  291. package/dist/esm/SearchField.js +1 -1
  292. package/dist/esm/Select.js +1 -1
  293. package/dist/esm/Stack.js +1 -1
  294. package/dist/esm/Status.js +1 -1
  295. package/dist/esm/Surface.js +1 -1
  296. package/dist/esm/Switch.js +2 -2
  297. package/dist/esm/Tabs.js +1 -1
  298. package/dist/esm/Tag.js +1 -1
  299. package/dist/esm/TagList.js +1 -1
  300. package/dist/esm/TextField.js +1 -1
  301. package/dist/esm/Toast.js +1 -1
  302. package/dist/esm/ToastStack.js +1 -1
  303. package/dist/esm/Tooltip.js +1 -1
  304. package/dist/esm/Typography.js +12 -12
  305. package/dist/esm/icons.generated/Add.js +1 -1
  306. package/dist/esm/icons.generated/AddCircle.js +1 -1
  307. package/dist/esm/icons.generated/Apps.js +1 -1
  308. package/dist/esm/icons.generated/AppsSelected.js +1 -1
  309. package/dist/esm/icons.generated/ArrowBottom.js +1 -1
  310. package/dist/esm/icons.generated/ArrowDown.js +1 -1
  311. package/dist/esm/icons.generated/ArrowLeft.js +1 -1
  312. package/dist/esm/icons.generated/ArrowLowerLeft.js +1 -1
  313. package/dist/esm/icons.generated/ArrowLowerRight.js +1 -1
  314. package/dist/esm/icons.generated/ArrowRight.js +1 -1
  315. package/dist/esm/icons.generated/ArrowTop.js +1 -1
  316. package/dist/esm/icons.generated/ArrowUnsorted.js +1 -1
  317. package/dist/esm/icons.generated/ArrowUp.js +1 -1
  318. package/dist/esm/icons.generated/ArrowUpperLeft.js +1 -1
  319. package/dist/esm/icons.generated/ArrowUpperRight.js +1 -1
  320. package/dist/esm/icons.generated/Bug.js +1 -1
  321. package/dist/esm/icons.generated/Calendar.js +1 -1
  322. package/dist/esm/icons.generated/Call.js +1 -1
  323. package/dist/esm/icons.generated/Chat.js +1 -1
  324. package/dist/esm/icons.generated/Check.js +1 -1
  325. package/dist/esm/icons.generated/CheckCircleFilled.js +1 -1
  326. package/dist/esm/icons.generated/ChevronDown.js +1 -1
  327. package/dist/esm/icons.generated/ChevronLeft.js +1 -1
  328. package/dist/esm/icons.generated/ChevronRight.js +1 -1
  329. package/dist/esm/icons.generated/ChevronUp.js +1 -1
  330. package/dist/esm/icons.generated/Clock.js +1 -1
  331. package/dist/esm/icons.generated/Close.js +1 -1
  332. package/dist/esm/icons.generated/CloseCircleFilled.js +1 -1
  333. package/dist/esm/icons.generated/CollapseLeft.js +1 -1
  334. package/dist/esm/icons.generated/CollapseRight.js +1 -1
  335. package/dist/esm/icons.generated/Copy.js +1 -1
  336. package/dist/esm/icons.generated/Customizations.js +1 -1
  337. package/dist/esm/icons.generated/CustomizationsSelected.js +1 -1
  338. package/dist/esm/icons.generated/DangerDiamond.js +1 -1
  339. package/dist/esm/icons.generated/DangerDiamondFilled.js +1 -1
  340. package/dist/esm/icons.generated/Delete.js +1 -1
  341. package/dist/esm/icons.generated/Deny.js +1 -1
  342. package/dist/esm/icons.generated/Devices.js +1 -1
  343. package/dist/esm/icons.generated/Directory.js +1 -1
  344. package/dist/esm/icons.generated/DirectorySelected.js +1 -1
  345. package/dist/esm/icons.generated/Documentation.js +1 -1
  346. package/dist/esm/icons.generated/Download.js +1 -1
  347. package/dist/esm/icons.generated/DragIndicator.js +1 -1
  348. package/dist/esm/icons.generated/Edit.js +1 -1
  349. package/dist/esm/icons.generated/ExpandLeft.js +1 -1
  350. package/dist/esm/icons.generated/ExpandRight.js +1 -1
  351. package/dist/esm/icons.generated/ExternalLink.js +1 -1
  352. package/dist/esm/icons.generated/Filter.js +1 -1
  353. package/dist/esm/icons.generated/Folder.js +1 -1
  354. package/dist/esm/icons.generated/Globe.js +1 -1
  355. package/dist/esm/icons.generated/Grid.js +1 -1
  356. package/dist/esm/icons.generated/Group.js +1 -1
  357. package/dist/esm/icons.generated/Happy.js +1 -1
  358. package/dist/esm/icons.generated/Hide.js +1 -1
  359. package/dist/esm/icons.generated/Home.js +1 -1
  360. package/dist/esm/icons.generated/HomeSelected.js +1 -1
  361. package/dist/esm/icons.generated/IdentityGovernance.js +1 -1
  362. package/dist/esm/icons.generated/IdentityGovernanceSelected.js +1 -1
  363. package/dist/esm/icons.generated/InformationCircle.js +1 -1
  364. package/dist/esm/icons.generated/InformationCircleFilled.js +1 -1
  365. package/dist/esm/icons.generated/Link.js +1 -1
  366. package/dist/esm/icons.generated/List.js +1 -1
  367. package/dist/esm/icons.generated/Lock.js +1 -1
  368. package/dist/esm/icons.generated/Menu.js +1 -1
  369. package/dist/esm/icons.generated/More.js +1 -1
  370. package/dist/esm/icons.generated/Neutral.js +1 -1
  371. package/dist/esm/icons.generated/Notification.js +1 -1
  372. package/dist/esm/icons.generated/Pause.js +1 -1
  373. package/dist/esm/icons.generated/QuestionCircle.js +1 -1
  374. package/dist/esm/icons.generated/QuestionCircleFilled.js +1 -1
  375. package/dist/esm/icons.generated/Refresh.js +1 -1
  376. package/dist/esm/icons.generated/Reports.js +1 -1
  377. package/dist/esm/icons.generated/ReportsSelected.js +1 -1
  378. package/dist/esm/icons.generated/Reset.js +1 -1
  379. package/dist/esm/icons.generated/Resume.js +1 -1
  380. package/dist/esm/icons.generated/Sad.js +1 -1
  381. package/dist/esm/icons.generated/Same.js +1 -1
  382. package/dist/esm/icons.generated/Search.js +1 -1
  383. package/dist/esm/icons.generated/Security.js +1 -1
  384. package/dist/esm/icons.generated/SecuritySelected.js +1 -1
  385. package/dist/esm/icons.generated/Send.js +1 -1
  386. package/dist/esm/icons.generated/Server.js +1 -1
  387. package/dist/esm/icons.generated/Settings.js +1 -1
  388. package/dist/esm/icons.generated/SettingsSelected.js +1 -1
  389. package/dist/esm/icons.generated/Show.js +1 -1
  390. package/dist/esm/icons.generated/Sparkle.js +1 -1
  391. package/dist/esm/icons.generated/Subtract.js +1 -1
  392. package/dist/esm/icons.generated/Sync.js +1 -1
  393. package/dist/esm/icons.generated/ThumbsDown.js +1 -1
  394. package/dist/esm/icons.generated/ThumbsUp.js +1 -1
  395. package/dist/esm/icons.generated/Unlock.js +1 -1
  396. package/dist/esm/icons.generated/Upload.js +1 -1
  397. package/dist/esm/icons.generated/User.js +1 -1
  398. package/dist/esm/icons.generated/Video.js +1 -1
  399. package/dist/esm/icons.generated/Warning.js +1 -1
  400. package/dist/esm/icons.generated/WarningFilled.js +1 -1
  401. package/dist/esm/icons.generated/Workflows.js +1 -1
  402. package/dist/esm/icons.generated/WorkflowsSelected.js +1 -1
  403. package/dist/esm/index.js +1 -1
  404. package/dist/esm/index.js.map +1 -1
  405. package/dist/esm/labs/AppTile.js +1 -1
  406. package/dist/esm/labs/DataFilters.js +2 -2
  407. package/dist/esm/labs/DataTable.js +1 -1
  408. package/dist/esm/labs/DataTablePagination.js +1 -1
  409. package/dist/esm/labs/DataView/BulkActionsMenu.js +1 -1
  410. package/dist/esm/labs/DataView/CardLayoutContent.js +2 -2
  411. package/dist/esm/labs/DataView/DataCard.js +1 -1
  412. package/dist/esm/labs/DataView/DataTable.js +1 -1
  413. package/dist/esm/labs/DataView/DataView.js +1 -1
  414. package/dist/esm/labs/DataView/DetailPanel.js +1 -1
  415. package/dist/esm/labs/DataView/LayoutSwitcher.js +1 -1
  416. package/dist/esm/labs/DataView/RowActions.js +1 -1
  417. package/dist/esm/labs/DataView/TableLayoutContent.js +1 -1
  418. package/dist/esm/labs/DataView/TableSettings.js +1 -1
  419. package/dist/esm/labs/DatePickers/DateTimeField.js +1 -1
  420. package/dist/esm/labs/DatePickers/DateTimePicker.js +1 -1
  421. package/dist/esm/labs/OdysseyPickers/ComposablePicker.js +1 -1
  422. package/dist/esm/labs/OdysseyPickers/Picker.js +1 -1
  423. package/dist/esm/labs/OdysseyPickers/PickerVirtualizationListBox.js +1 -1
  424. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
  425. package/dist/esm/labs/OdysseyPickers/SearchDropdown.js +1 -1
  426. package/dist/esm/labs/PageTemplate/DocumentationLink.js +1 -1
  427. package/dist/esm/labs/PageTemplate/Layout.js +1 -1
  428. package/dist/esm/labs/PageTemplate/PageTemplate.js +1 -1
  429. package/dist/esm/labs/PaginatedTable.js +1 -1
  430. package/dist/esm/labs/StaticTable.js +1 -1
  431. package/dist/esm/labs/UserProfile.js +1 -1
  432. package/dist/esm/labs/UserProfileMenuButton.js +1 -1
  433. package/dist/esm/logos.generated/Duo.js +1 -1
  434. package/dist/esm/logos.generated/GoogleAuth.js +1 -1
  435. package/dist/esm/logos.generated/OktaVerify.js +1 -1
  436. package/dist/esm/logos.generated/Persona.js +1 -1
  437. package/dist/esm/logos.generated/SymantecVip.js +1 -1
  438. package/dist/esm/logos.generated/Yubikey.js +1 -1
  439. package/dist/esm/theme/components/Button.js +6 -6
  440. package/dist/esm/theme/components/Button.js.map +1 -1
  441. package/dist/esm/theme/theme.js +2 -0
  442. package/dist/esm/theme/theme.js.map +1 -1
  443. package/dist/esm/theme/useAppElementContainerQuery.js +32 -0
  444. package/dist/esm/theme/useAppElementContainerQuery.js.map +1 -0
  445. package/dist/esm/theme/useContainerQuery.js +87 -0
  446. package/dist/esm/theme/useContainerQuery.js.map +1 -0
  447. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +1 -1
  448. package/dist/esm/ui-shell/InnerAppContainer.js +1 -1
  449. package/dist/esm/ui-shell/NarrowUiShellContent.js +1 -1
  450. package/dist/esm/ui-shell/SideNav/NavAccordion.js +1 -1
  451. package/dist/esm/ui-shell/SideNav/SideNav.js +1 -1
  452. package/dist/esm/ui-shell/SideNav/SideNavFooterContent.js +1 -1
  453. package/dist/esm/ui-shell/SideNav/SideNavHeader.js +1 -1
  454. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +2 -2
  455. package/dist/esm/ui-shell/SideNav/SideNavItemLinkContent.js +1 -1
  456. package/dist/esm/ui-shell/SideNav/SideNavSortableList.js +1 -1
  457. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -2
  458. package/dist/esm/ui-shell/SkipToContent.js +1 -1
  459. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +1 -1
  460. package/dist/esm/ui-shell/TopNav/TopNav.js +1 -1
  461. package/dist/esm/ui-shell/TopNav/TopNavLinksList.js +1 -1
  462. package/dist/esm/ui-shell/TopNav/TopNavListItem.js +1 -1
  463. package/dist/esm/ui-shell/UiShell.js +1 -1
  464. package/dist/esm/ui-shell/UiShellLogo.js +1 -1
  465. package/dist/esm/ui-shell/WideUiShellContent.js +1 -1
  466. package/dist/esm/useContrastMode.js.map +1 -1
  467. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  468. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  469. package/dist/tsconfig.production.tsbuildinfo +1 -1
  470. package/dist/types/Buttons/BaseButton.d.ts +8 -1
  471. package/dist/types/Buttons/BaseButton.d.ts.map +1 -1
  472. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  473. package/dist/types/index.d.ts +1 -1
  474. package/dist/types/index.d.ts.map +1 -1
  475. package/dist/types/theme/components/Button.d.ts.map +1 -1
  476. package/dist/types/theme/theme.d.ts +2 -0
  477. package/dist/types/theme/theme.d.ts.map +1 -1
  478. package/dist/types/theme/useAppElementContainerQuery.d.ts +24 -0
  479. package/dist/types/theme/useAppElementContainerQuery.d.ts.map +1 -0
  480. package/dist/types/theme/useContainerQuery.d.ts +37 -0
  481. package/dist/types/theme/useContainerQuery.d.ts.map +1 -0
  482. package/dist/types/useContrastMode.d.ts +10 -1
  483. package/dist/types/useContrastMode.d.ts.map +1 -1
  484. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  485. package/package.json +37 -17
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppElementContainerQuery.cjs","names":["_useContrastMode","require","_useContainerQuery","useAppElementContainerQuery","maxHeight","maxWidth","minHeight","minWidth","contrastContainerRef","useContrastModeContext","useContainerQuery","target","exports"],"sources":["../../../src/theme/useAppElementContainerQuery.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-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 { useContrastModeContext } from \"../useContrastMode.js\";\nimport {\n useContainerQuery,\n type UseContainerQueryProps,\n} from \"./useContainerQuery.js\";\n\nexport type UseAppElementContainerQueryProps = Omit<\n UseContainerQueryProps,\n \"target\"\n>;\n\n/**\n * Reports whether Odyssey's app wrapper element satisfies a container query.\n * This is the app-scoped analog of `useMediaQuery`: bounds are matched against\n * the wrapper's `inline-size` (width) and `block-size` (height) rather than the\n * viewport, so responsiveness tracks the space Odyssey actually occupies (which\n * shrinks as surrounding chrome such as a side nav expands). Returns `false`\n * until the wrapper element exists, including when `OdysseyProvider` renders\n * with `hasWrapperElement={false}` and when called outside a provider.\n */\nexport const useAppElementContainerQuery = ({\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n}: UseAppElementContainerQueryProps) => {\n const { contrastContainerRef } = useContrastModeContext();\n\n return useContainerQuery({\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n target: contrastContainerRef ?? null,\n });\n};\n"],"mappings":";;;;;;AAYA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAsBO,MAAME,2BAA2B,GAAGA,CAAC;EAC1CC,SAAS;EACTC,QAAQ;EACRC,SAAS;EACTC;AACgC,CAAC,KAAK;EACtC,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,uCAAsB,EAAC,CAAC;EAEzD,OAAO,IAAAC,oCAAiB,EAAC;IACvBN,SAAS;IACTC,QAAQ;IACRC,SAAS;IACTC,QAAQ;IACRI,MAAM,EAAEH,oBAAoB,IAAI;EAClC,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAT,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useContainerQuery = void 0;
7
+ var _react = require("react");
8
+ /*!
9
+ * Copyright (c) 2026-present, Okta, Inc. and/or its affiliates. All rights reserved.
10
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
11
+ *
12
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ *
17
+ * See the License for the specific language governing permissions and limitations under the License.
18
+ */
19
+
20
+ const resolveTargetElement = target => target && "current" in target ? target.current : target;
21
+ const isResizeObserverSizeList = borderBoxSize => Array.isArray(borderBoxSize);
22
+ const resolveBorderBoxSize = borderBoxSize => isResizeObserverSizeList(borderBoxSize) ? borderBoxSize[0] : borderBoxSize;
23
+ const doesSizeMatchQuery = ({
24
+ blockSize,
25
+ inlineSize,
26
+ maxHeight,
27
+ maxWidth,
28
+ minHeight,
29
+ minWidth
30
+ }) => (minWidth === undefined || inlineSize >= minWidth) && (maxWidth === undefined || inlineSize <= maxWidth) && (minHeight === undefined || blockSize >= minHeight) && (maxHeight === undefined || blockSize <= maxHeight);
31
+ const useContainerQuery = ({
32
+ target,
33
+ minWidth,
34
+ maxWidth,
35
+ minHeight,
36
+ maxHeight
37
+ }) => {
38
+ const resolvedTargetElement = resolveTargetElement(target);
39
+ const [hasMatches, setHasMatches] = (0, _react.useState)(() => {
40
+ if (!resolvedTargetElement) {
41
+ return false;
42
+ }
43
+ const {
44
+ height,
45
+ width
46
+ } = resolvedTargetElement.getBoundingClientRect();
47
+ return doesSizeMatchQuery({
48
+ blockSize: height,
49
+ inlineSize: width,
50
+ maxHeight,
51
+ maxWidth,
52
+ minHeight,
53
+ minWidth
54
+ });
55
+ });
56
+ const animationFrameIdRef = (0, _react.useRef)(null);
57
+ (0, _react.useEffect)(() => {
58
+ const targetElement = resolveTargetElement(target);
59
+ if (typeof ResizeObserver === "undefined" || !targetElement) {
60
+ return;
61
+ }
62
+ const resizeObserver = new ResizeObserver(([resizeObserverEntry]) => {
63
+ if (animationFrameIdRef.current !== null) {
64
+ cancelAnimationFrame(animationFrameIdRef.current);
65
+ }
66
+ animationFrameIdRef.current = requestAnimationFrame(() => {
67
+ animationFrameIdRef.current = null;
68
+ if (!resizeObserverEntry) {
69
+ return;
70
+ }
71
+ const borderBoxSize = resolveBorderBoxSize(resizeObserverEntry.borderBoxSize);
72
+ setHasMatches(doesSizeMatchQuery({
73
+ blockSize: borderBoxSize?.blockSize ?? resizeObserverEntry.contentRect.height,
74
+ inlineSize: borderBoxSize?.inlineSize ?? resizeObserverEntry.contentRect.width,
75
+ maxHeight,
76
+ maxWidth,
77
+ minHeight,
78
+ minWidth
79
+ }));
80
+ });
81
+ });
82
+ resizeObserver.observe(targetElement);
83
+ return () => {
84
+ resizeObserver.disconnect();
85
+ if (animationFrameIdRef.current !== null) {
86
+ cancelAnimationFrame(animationFrameIdRef.current);
87
+ animationFrameIdRef.current = null;
88
+ }
89
+ };
90
+ }, [maxHeight, maxWidth, minHeight, minWidth, target]);
91
+ return hasMatches;
92
+ };
93
+ exports.useContainerQuery = useContainerQuery;
94
+ //# sourceMappingURL=useContainerQuery.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContainerQuery.cjs","names":["_react","require","resolveTargetElement","target","current","isResizeObserverSizeList","borderBoxSize","Array","isArray","resolveBorderBoxSize","doesSizeMatchQuery","blockSize","inlineSize","maxHeight","maxWidth","minHeight","minWidth","undefined","useContainerQuery","resolvedTargetElement","hasMatches","setHasMatches","useState","height","width","getBoundingClientRect","animationFrameIdRef","useRef","useEffect","targetElement","ResizeObserver","resizeObserver","resizeObserverEntry","cancelAnimationFrame","requestAnimationFrame","contentRect","observe","disconnect","exports"],"sources":["../../../src/theme/useContainerQuery.ts"],"sourcesContent":["/*!\n * Copyright (c) 2026-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 RefObject, useEffect, useRef, useState } from \"react\";\n\nexport type UseContainerQueryProps = {\n /** Inclusive upper bound on the target's block-size (px). */\n maxHeight?: number;\n /** Inclusive upper bound on the target's inline-size (px). */\n maxWidth?: number;\n /** Inclusive lower bound on the target's block-size (px). */\n minHeight?: number;\n /** Inclusive lower bound on the target's inline-size (px). */\n minWidth?: number;\n /**\n * Element to observe, passed as a ref or a raw element. The hook returns\n * `false` until an element is present.\n */\n target: RefObject<HTMLElement | null> | HTMLElement | null;\n};\n\nconst resolveTargetElement = (target: UseContainerQueryProps[\"target\"]) =>\n target && \"current\" in target ? target.current : target;\n\n/**\n * `borderBoxSize` is typed as an array but is absent in older browsers and a\n * single object in some, so it is narrowed through a predicate that keeps the\n * element type intact (`Array.isArray` alone widens a readonly array to `any[]`).\n */\nconst isResizeObserverSizeList = (\n borderBoxSize: ResizeObserverSize | readonly ResizeObserverSize[] | undefined,\n): borderBoxSize is readonly ResizeObserverSize[] =>\n Array.isArray(borderBoxSize);\n\nconst resolveBorderBoxSize = (\n borderBoxSize: ResizeObserverSize | readonly ResizeObserverSize[] | undefined,\n): ResizeObserverSize | undefined =>\n isResizeObserverSizeList(borderBoxSize) ? borderBoxSize[0] : borderBoxSize;\n\nconst doesSizeMatchQuery = ({\n blockSize,\n inlineSize,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n}: {\n blockSize: number;\n inlineSize: number;\n} & Omit<UseContainerQueryProps, \"target\">) =>\n (minWidth === undefined || inlineSize >= minWidth) &&\n (maxWidth === undefined || inlineSize <= maxWidth) &&\n (minHeight === undefined || blockSize >= minHeight) &&\n (maxHeight === undefined || blockSize <= maxHeight);\n\n/**\n * Reports whether an element's size satisfies a container query, mirroring\n * `useMediaQuery` but observing an element with `ResizeObserver` instead of the\n * viewport. Bounds are matched against the target's `inline-size` (width) and\n * `block-size` (height); an omitted bound is always satisfied. Returns `false`\n * until the target element exists (and when `ResizeObserver` is unavailable,\n * e.g. during server rendering).\n */\nexport const useContainerQuery = ({\n target,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n}: UseContainerQueryProps) => {\n const resolvedTargetElement = resolveTargetElement(target);\n\n const [hasMatches, setHasMatches] = useState(() => {\n if (!resolvedTargetElement) {\n return false;\n }\n\n const { height, width } = resolvedTargetElement.getBoundingClientRect();\n\n return doesSizeMatchQuery({\n blockSize: height,\n inlineSize: width,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n });\n });\n\n const animationFrameIdRef = useRef<number | null>(null);\n\n useEffect(() => {\n // Resolve the element inside the effect: a `RefObject`'s `current` is `null`\n // during render and only populated after commit, so resolving here (rather\n // than during render) is what lets a ref target attach the observer.\n const targetElement = resolveTargetElement(target);\n\n if (typeof ResizeObserver === \"undefined\" || !targetElement) {\n return;\n }\n\n const resizeObserver = new ResizeObserver(([resizeObserverEntry]) => {\n if (animationFrameIdRef.current !== null) {\n cancelAnimationFrame(animationFrameIdRef.current);\n }\n\n animationFrameIdRef.current = requestAnimationFrame(() => {\n animationFrameIdRef.current = null;\n\n if (!resizeObserverEntry) {\n return;\n }\n\n const borderBoxSize = resolveBorderBoxSize(\n resizeObserverEntry.borderBoxSize,\n );\n\n setHasMatches(\n doesSizeMatchQuery({\n blockSize:\n borderBoxSize?.blockSize ??\n resizeObserverEntry.contentRect.height,\n inlineSize:\n borderBoxSize?.inlineSize ??\n resizeObserverEntry.contentRect.width,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n }),\n );\n });\n });\n\n resizeObserver.observe(targetElement);\n\n return () => {\n resizeObserver.disconnect();\n\n if (animationFrameIdRef.current !== null) {\n cancelAnimationFrame(animationFrameIdRef.current);\n animationFrameIdRef.current = null;\n }\n };\n }, [maxHeight, maxWidth, minHeight, minWidth, target]);\n\n return hasMatches;\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,MAAMC,oBAAoB,GAAIC,MAAwC,IACpEA,MAAM,IAAI,SAAS,IAAIA,MAAM,GAAGA,MAAM,CAACC,OAAO,GAAGD,MAAM;AAOzD,MAAME,wBAAwB,GAC5BC,aAA6E,IAE7EC,KAAK,CAACC,OAAO,CAACF,aAAa,CAAC;AAE9B,MAAMG,oBAAoB,GACxBH,aAA6E,IAE7ED,wBAAwB,CAACC,aAAa,CAAC,GAAGA,aAAa,CAAC,CAAC,CAAC,GAAGA,aAAa;AAE5E,MAAMI,kBAAkB,GAAGA,CAAC;EAC1BC,SAAS;EACTC,UAAU;EACVC,SAAS;EACTC,QAAQ;EACRC,SAAS;EACTC;AAIuC,CAAC,KACxC,CAACA,QAAQ,KAAKC,SAAS,IAAIL,UAAU,IAAII,QAAQ,MAChDF,QAAQ,KAAKG,SAAS,IAAIL,UAAU,IAAIE,QAAQ,CAAC,KACjDC,SAAS,KAAKE,SAAS,IAAIN,SAAS,IAAII,SAAS,CAAC,KAClDF,SAAS,KAAKI,SAAS,IAAIN,SAAS,IAAIE,SAAS,CAAC;AAU9C,MAAMK,iBAAiB,GAAGA,CAAC;EAChCf,MAAM;EACNa,QAAQ;EACRF,QAAQ;EACRC,SAAS;EACTF;AACsB,CAAC,KAAK;EAC5B,MAAMM,qBAAqB,GA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;UACvCX,SAAS;UACTC,QAAQ;UACRC,SAAS;UACTC;QACF,CAAC,CACH,CAAC;MACH,CAAC,CAAC;IACJ,CAAC,CAAC;IAEFe,cAAc,CAACK,OAAO,CAACP,aAAa,CAAC;IAErC,OAAO,MAAM;MACXE,cAAc,CAACM,UAAU,CAAC,CAAC;MAE3B,IAAIX,mBAAmB,CAACtB,OAAO,KAAK,IAAI,EAAE;QACxC6B,oBAAoB,CAACP,mBAAmB,CAACtB,OAAO,CAAC;QACjDsB,mBAAmB,CAACtB,OAAO,GAAG,IAAI;MACpC;IACF,CAAC;EACH,CAAC,EAAE,CAACS,SAAS,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEb,MAAM,CAAC,CAAC;EAEtD,OAAOiB,UAAU;AACnB,CAAC;AAACkB,OAAA,CAAApB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -77,5 +77,5 @@ const AppSwitcher = ({
77
77
  });
78
78
  };
79
79
  const MemoizedAppSwitcher = exports.AppSwitcher = (0, _react.memo)(AppSwitcher);
80
- MemoizedAppSwitcher.displayName = "AppSwitcher::pkg=odyssey&odysseyV=1.67.0";
80
+ MemoizedAppSwitcher.displayName = "AppSwitcher::pkg=odyssey&odysseyV=1.68.0";
81
81
  //# sourceMappingURL=AppSwitcher.cjs.map
@@ -57,5 +57,5 @@ const InnerAppContainer = ({
57
57
  children: [(0, _jsxRuntime.jsx)(StyledAppContainerShadow1, {}), (0, _jsxRuntime.jsx)(StyledAppContainerShadow2, {}), (0, _jsxRuntime.jsx)(StyledAppContainerShadow3, {})]
58
58
  }) : null;
59
59
  const MemoizedInnerAppContainer = exports.InnerAppContainer = (0, _react.memo)(InnerAppContainer);
60
- MemoizedInnerAppContainer.displayName = "InnerAppContainer::pkg=odyssey&odysseyV=1.67.0";
60
+ MemoizedInnerAppContainer.displayName = "InnerAppContainer::pkg=odyssey&odysseyV=1.68.0";
61
61
  //# sourceMappingURL=InnerAppContainer.cjs.map
@@ -379,5 +379,5 @@ const NarrowUiShellContent = ({
379
379
  });
380
380
  };
381
381
  const MemoizedNarrowUiShellContent = exports.NarrowUiShellContent = (0, _react.memo)(NarrowUiShellContent);
382
- MemoizedNarrowUiShellContent.displayName = "NarrowUiShellContent::pkg=odyssey&odysseyV=1.67.0";
382
+ MemoizedNarrowUiShellContent.displayName = "NarrowUiShellContent::pkg=odyssey&odysseyV=1.68.0";
383
383
  //# sourceMappingURL=NarrowUiShellContent.cjs.map
@@ -170,5 +170,5 @@ const NavAccordion = ({
170
170
  });
171
171
  };
172
172
  const MemoizedNavAccordion = exports.NavAccordion = (0, _react.memo)(NavAccordion);
173
- MemoizedNavAccordion.displayName = "NavAccordion::pkg=odyssey&odysseyV=1.67.0";
173
+ MemoizedNavAccordion.displayName = "NavAccordion::pkg=odyssey&odysseyV=1.68.0";
174
174
  //# sourceMappingURL=NavAccordion.cjs.map
@@ -653,5 +653,5 @@ const SideNav = ({
653
653
  });
654
654
  };
655
655
  const MemoizedSideNav = exports.SideNav = (0, _react.memo)(SideNav);
656
- MemoizedSideNav.displayName = "SideNav::pkg=odyssey&odysseyV=1.67.0";
656
+ MemoizedSideNav.displayName = "SideNav::pkg=odyssey&odysseyV=1.68.0";
657
657
  //# sourceMappingURL=SideNav.cjs.map
@@ -69,5 +69,5 @@ const SideNavFooterContent = ({
69
69
  });
70
70
  };
71
71
  const MemoizedSideNavFooterContent = exports.SideNavFooterContent = (0, _react.memo)(SideNavFooterContent);
72
- MemoizedSideNavFooterContent.displayName = "SideNavFooterContent::pkg=odyssey&odysseyV=1.67.0";
72
+ MemoizedSideNavFooterContent.displayName = "SideNavFooterContent::pkg=odyssey&odysseyV=1.68.0";
73
73
  //# sourceMappingURL=SideNavFooterContent.cjs.map
@@ -100,5 +100,5 @@ const SideNavHeader = ({
100
100
  });
101
101
  };
102
102
  const MemoizedSideNavHeader = exports.SideNavHeader = (0, _react.memo)(SideNavHeader);
103
- MemoizedSideNavHeader.displayName = "SideNavHeader::pkg=odyssey&odysseyV=1.67.0";
103
+ MemoizedSideNavHeader.displayName = "SideNavHeader::pkg=odyssey&odysseyV=1.68.0";
104
104
  //# sourceMappingURL=SideNavHeader.cjs.map
@@ -61,7 +61,7 @@ const SideNavListItem = (0, _react.forwardRef)(({
61
61
  ...sideNavListItemProps,
62
62
  ref: sideNavListItemRef
63
63
  }));
64
- SideNavListItem.displayName = "SideNavListItem::pkg=odyssey&odysseyV=1.67.0";
64
+ SideNavListItem.displayName = "SideNavListItem::pkg=odyssey&odysseyV=1.68.0";
65
65
  const scrollToNode = node => {
66
66
  if (node) {
67
67
  node?.scrollIntoView({
@@ -346,5 +346,5 @@ const SideNavItemContent = ({
346
346
  }, id);
347
347
  };
348
348
  const MemoizedSideNavItemContent = exports.SideNavItemContent = (0, _react.memo)(SideNavItemContent);
349
- MemoizedSideNavItemContent.displayName = "SideNavItemContent::pkg=odyssey&odysseyV=1.67.0";
349
+ MemoizedSideNavItemContent.displayName = "SideNavItemContent::pkg=odyssey&odysseyV=1.68.0";
350
350
  //# sourceMappingURL=SideNavItemContent.cjs.map
@@ -74,5 +74,5 @@ const SideNavItemLinkContent = ({
74
74
  });
75
75
  };
76
76
  const MemoizedSideNavItemLinkContent = exports.SideNavItemLinkContent = (0, _react.memo)(SideNavItemLinkContent);
77
- MemoizedSideNavItemLinkContent.displayName = "SideNavItemLinkContent::pkg=odyssey&odysseyV=1.67.0";
77
+ MemoizedSideNavItemLinkContent.displayName = "SideNavItemLinkContent::pkg=odyssey&odysseyV=1.68.0";
78
78
  //# sourceMappingURL=SideNavItemLinkContent.cjs.map
@@ -44,5 +44,5 @@ const SideNavSortableList = ({
44
44
  });
45
45
  };
46
46
  const MemoizedSideNavSortableList = exports.SideNavSortableList = (0, _react.memo)(SideNavSortableList);
47
- MemoizedSideNavSortableList.displayName = "SideNavSortableList::pkg=odyssey&odysseyV=1.67.0";
47
+ MemoizedSideNavSortableList.displayName = "SideNavSortableList::pkg=odyssey&odysseyV=1.68.0";
48
48
  //# sourceMappingURL=SideNavSortableList.cjs.map
@@ -88,7 +88,7 @@ const StyledChevronRightIcon = (0, _styled.default)(_ChevronRight.ChevronRightIc
88
88
  transitionProperty: "transform",
89
89
  transitionTimingFunction: "ease-in-out"
90
90
  }));
91
- StyledChevronRightIcon.displayName = "StyledChevronRightIcon::pkg=odyssey&odysseyV=1.67.0";
91
+ StyledChevronRightIcon.displayName = "StyledChevronRightIcon::pkg=odyssey&odysseyV=1.68.0";
92
92
  const defaultLocalButton = typeof window === "undefined" ? null : document.createElement("button");
93
93
  const SideNavToggleButton = ({
94
94
  ariaControls,
@@ -163,5 +163,5 @@ const SideNavToggleButton = ({
163
163
  });
164
164
  };
165
165
  const MemoizedSideNavToggleButton = exports.SideNavToggleButton = (0, _react.memo)(SideNavToggleButton);
166
- MemoizedSideNavToggleButton.displayName = "SideNavToggleButton::pkg=odyssey&odysseyV=1.67.0";
166
+ MemoizedSideNavToggleButton.displayName = "SideNavToggleButton::pkg=odyssey&odysseyV=1.68.0";
167
167
  //# sourceMappingURL=SideNavToggleButton.cjs.map
@@ -121,5 +121,5 @@ const SkipToContent = ({
121
121
  });
122
122
  };
123
123
  const MemoizedSkipToContent = exports.SkipToContent = (0, _react.memo)(SkipToContent);
124
- MemoizedSkipToContent.displayName = "SkipToContent::pkg=odyssey&odysseyV=1.67.0";
124
+ MemoizedSkipToContent.displayName = "SkipToContent::pkg=odyssey&odysseyV=1.68.0";
125
125
  //# sourceMappingURL=SkipToContent.cjs.map
@@ -33,5 +33,5 @@ var _jsxRuntime = require("react/jsx-runtime");
33
33
  });
34
34
  });
35
35
  const MemoizedHamburgerMenuIcon = exports.HamburgerMenuIcon = (0, _react.memo)(HamburgerMenuIcon);
36
- MemoizedHamburgerMenuIcon.displayName = "HamburgerMenuIcon::pkg=odyssey&odysseyV=1.67.0";
36
+ MemoizedHamburgerMenuIcon.displayName = "HamburgerMenuIcon::pkg=odyssey&odysseyV=1.68.0";
37
37
  //# sourceMappingURL=HamburgerMenuIcon.cjs.map
@@ -69,5 +69,5 @@ const TopNav = ({
69
69
  });
70
70
  };
71
71
  const MemoizedTopNav = exports.TopNav = (0, _react.memo)(TopNav);
72
- MemoizedTopNav.displayName = "TopNav::pkg=odyssey&odysseyV=1.67.0";
72
+ MemoizedTopNav.displayName = "TopNav::pkg=odyssey&odysseyV=1.68.0";
73
73
  //# sourceMappingURL=TopNav.cjs.map
@@ -39,5 +39,5 @@ const TopNavLinksList = ({
39
39
  })
40
40
  });
41
41
  const MemoizedTopNavLinksList = exports.TopNavLinksList = (0, _react.memo)(TopNavLinksList);
42
- MemoizedTopNavLinksList.displayName = "TopNavLinksList::pkg=odyssey&odysseyV=1.67.0";
42
+ MemoizedTopNavLinksList.displayName = "TopNavLinksList::pkg=odyssey&odysseyV=1.68.0";
43
43
  //# sourceMappingURL=TopNavLinksList.cjs.map
@@ -133,5 +133,5 @@ const TopNavListItem = ({
133
133
  });
134
134
  };
135
135
  const MemoizedTopNavListItem = exports.TopNavListItem = (0, _react.memo)(TopNavListItem);
136
- MemoizedTopNavListItem.displayName = "TopNavListItem::pkg=odyssey&odysseyV=1.67.0";
136
+ MemoizedTopNavListItem.displayName = "TopNavListItem::pkg=odyssey&odysseyV=1.68.0";
137
137
  //# sourceMappingURL=TopNavListItem.cjs.map
@@ -129,5 +129,5 @@ const UiShell = ({
129
129
  });
130
130
  };
131
131
  const MemoizedUiShell = exports.UiShell = (0, _react.memo)(UiShell);
132
- MemoizedUiShell.displayName = "UiShell::pkg=odyssey&odysseyV=1.67.0";
132
+ MemoizedUiShell.displayName = "UiShell::pkg=odyssey&odysseyV=1.68.0";
133
133
  //# sourceMappingURL=UiShell.cjs.map
@@ -72,5 +72,5 @@ const UiShellLogo = ({
72
72
  });
73
73
  };
74
74
  const MemoizedUiShellLogo = exports.UiShellLogo = (0, _react.memo)(UiShellLogo);
75
- MemoizedUiShellLogo.displayName = "UiShellLogo::pkg=odyssey&odysseyV=1.67.0";
75
+ MemoizedUiShellLogo.displayName = "UiShellLogo::pkg=odyssey&odysseyV=1.68.0";
76
76
  //# sourceMappingURL=UiShellLogo.cjs.map
@@ -177,5 +177,5 @@ const WideUiShellContent = ({
177
177
  });
178
178
  };
179
179
  const MemoizedWideUiShellContent = exports.WideUiShellContent = (0, _react.memo)(WideUiShellContent);
180
- MemoizedWideUiShellContent.displayName = "WideUiShellContent::pkg=odyssey&odysseyV=1.67.0";
180
+ MemoizedWideUiShellContent.displayName = "WideUiShellContent::pkg=odyssey&odysseyV=1.68.0";
181
181
  //# sourceMappingURL=WideUiShellContent.cjs.map
@@ -1 +1 @@
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","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","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 useLayoutEffect,\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\n/** Default background color when none is detected: HueNeutral50 (gray = highContrast). */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary.\n * When `parentElement` is null (e.g., at a shadow root), this checks if the\n * element is inside a ShadowRoot and jumps to the host element to continue\n * traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\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 (HueNeutralWhite).\n * - High contrast mode is used for gray background (defaultParentBackgroundColor = HueNeutral50).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds\n * set outside of shadow roots.\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 = getParentElement(element);\n }\n return defaultParentBackgroundColor; // Default to gray/high contrast if no background color is found\n};\n\nexport const deriveContrastMode = (bgColor: string): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\";\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 [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(deriveContrastMode(newBgColor));\n }, []);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and\n // document.head may not be accessible. Guard against null to\n // prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it\n // works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, 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,CAA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AS,EAAE,IAAI;QACfC,OAAO,EAAE;MACX,CAAC,CAAC;IACJ;IAEA,MAAMC,eAAe,GAAIC,KAAY,IAAK;MACxC,IACEA,KAAK,YAAYC,eAAe,IAChCD,KAAK,CAACE,YAAY,KAAK,kBAAkB,EACzC;QACAnB,qBAAqB,CAAC,CAAC;MACzB;IACF,CAAC;IAID,MAAMoB,SAAS,GAAG5B,oBAAoB,CAACW,OAAO,EAAEnB,WAAW,CAAC,CAAC,IAAIwB,QAAQ;IACzEY,SAAS,CAACC,gBAAgB,CAAC,eAAe,EAAEL,eAAe,CAAC;IAC5DhB,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXoB,SAAS,CAACE,mBAAmB,CAAC,eAAe,EAAEN,eAAe,CAAC;MAC/DX,QAAQ,CAACkB,UAAU,CAAC,CAAC;IACvB,CAAC;EACH,CAAC,EAAE,CAAChC,oBAAoB,EAAES,qBAAqB,CAAC,CAAC;EAEjD,OAAO;IACLR,oBAAoB;IACpBlC,YAAY;IACZqC;EACF,CAAC;AACH,CAAC;AAACvC,OAAA,CAAAkC,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","getParentElement","parentElement","root","getRootNode","ShadowRoot","host","HTMLElement","getBackgroundColor","deriveContrastMode","useContrastMode","explicitContrastMode","contrastContainerRef","useRef","existingContrastMode","parentBackgroundColor","setParentBackgroundColor","useState","detectedContrastMode","setDetectedContrastMode","updateBackgroundColor","useCallback","newBgColor","current","useLayoutEffect","observer","MutationObserver","htmlElement","document","documentElement","observe","attributes","attributeFilter","head","childList","subtree","onTransitionEnd","event","TransitionEvent","propertyName","eventRoot","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 type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { hexToRgb } from \"./hexToRgb.js\";\n\nexport type ContrastMode = \"lowContrast\" | \"highContrast\";\nexport type ContrastModeContextType = {\n /**\n * Odyssey's app wrapper element: the contrast and height container\n * `OdysseyThemeProvider` renders. `useAppElementContainerQuery` observes it so\n * container queries track the space Odyssey actually occupies. Absent outside\n * a provider, and `current` stays `null` when the provider renders with\n * `hasWrapperElement={false}`.\n */\n contrastContainerRef?: RefObject<HTMLDivElement>;\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\n/** Default background color when none is detected: HueNeutral50 (gray = highContrast). */\nexport const defaultParentBackgroundColor = Tokens.HueNeutral50;\n\n/**\n * Returns the parent element, crossing shadow DOM boundaries when necessary.\n * When `parentElement` is null (e.g., at a shadow root), this checks if the\n * element is inside a ShadowRoot and jumps to the host element to continue\n * traversal.\n */\nconst getParentElement = (element: HTMLElement): HTMLElement | null => {\n if (element.parentElement) {\n return element.parentElement;\n }\n\n const root = element.getRootNode();\n if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {\n return root.host;\n }\n\n return null;\n};\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 (HueNeutralWhite).\n * - High contrast mode is used for gray background (defaultParentBackgroundColor = HueNeutral50).\n * - Crosses shadow DOM boundaries via `getRootNode().host` to detect backgrounds\n * set outside of shadow roots.\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 = getParentElement(element);\n }\n return defaultParentBackgroundColor; // Default to gray/high contrast if no background color is found\n};\n\nexport const deriveContrastMode = (bgColor: string): ContrastMode =>\n bgColor === Tokens.HueNeutral50 ? \"highContrast\" : \"lowContrast\";\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 [detectedContrastMode, setDetectedContrastMode] =\n useState<ContrastMode>(() => existingContrastMode);\n\n const contrastMode = explicitContrastMode ?? detectedContrastMode;\n\n const updateBackgroundColor = useCallback(() => {\n const newBgColor = getBackgroundColor(contrastContainerRef.current);\n setParentBackgroundColor(newBgColor);\n setDetectedContrastMode(deriveContrastMode(newBgColor));\n }, []);\n\n useLayoutEffect(() => {\n if (explicitContrastMode) return;\n\n const observer = new MutationObserver(updateBackgroundColor);\n\n // In shadow DOM contexts, document.documentElement and\n // document.head may not be accessible. Guard against null to\n // prevent observer.observe(null) from throwing.\n const htmlElement = document.documentElement;\n if (htmlElement) {\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"class\", \"style\"],\n });\n }\n\n if (document.head) {\n observer.observe(document.head, {\n childList: true,\n subtree: true,\n });\n }\n\n const onTransitionEnd = (event: Event) => {\n if (\n event instanceof TransitionEvent &&\n event.propertyName === \"background-color\"\n ) {\n updateBackgroundColor();\n }\n };\n\n // Attach the transitionend listener to the element's root node so it\n // works inside shadow DOM (where events don't bubble to `document`).\n const eventRoot = contrastContainerRef.current?.getRootNode() ?? document;\n eventRoot.addEventListener(\"transitionend\", onTransitionEnd);\n updateBackgroundColor();\n\n return () => {\n eventRoot.removeEventListener(\"transitionend\", onTransitionEnd);\n observer.disconnect();\n };\n }, [explicitContrastMode, 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,OAA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AAAA,eAAA","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-67-0";
18
+ var _default = exports.default = "1-68-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-67-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-68-0\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAAAA,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBe,QAAQ","ignoreList":[]}
@@ -57,6 +57,6 @@ const Accordion = ({
57
57
  });
58
58
  };
59
59
  const MemoizedAccordion = memo(Accordion);
60
- MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.67.0";
60
+ MemoizedAccordion.displayName = "Accordion::pkg=odyssey&odysseyV=1.68.0";
61
61
  export { MemoizedAccordion as Accordion };
62
62
  //# sourceMappingURL=Accordion.js.map
@@ -106,6 +106,6 @@ const Autocomplete = ({
106
106
  });
107
107
  };
108
108
  const MemoizedAutocomplete = memo(Autocomplete);
109
- MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.67.0";
109
+ MemoizedAutocomplete.displayName = "Autocomplete::pkg=odyssey&odysseyV=1.68.0";
110
110
  export { MemoizedAutocomplete as Autocomplete };
111
111
  //# sourceMappingURL=Autocomplete.js.map
package/dist/esm/Badge.js CHANGED
@@ -73,6 +73,6 @@ const Badge = ({
73
73
  return renderBadge;
74
74
  };
75
75
  const MemoizedBadge = memo(Badge);
76
- MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.67.0";
76
+ MemoizedBadge.displayName = "Badge::pkg=odyssey&odysseyV=1.68.0";
77
77
  export { MemoizedBadge as Badge };
78
78
  //# sourceMappingURL=Badge.js.map
@@ -58,6 +58,6 @@ const Banner = ({
58
58
  });
59
59
  };
60
60
  const MemoizedBanner = memo(Banner);
61
- MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.67.0";
61
+ MemoizedBanner.displayName = "Banner::pkg=odyssey&odysseyV=1.68.0";
62
62
  export { MemoizedBanner as Banner };
63
63
  //# sourceMappingURL=Banner.js.map
package/dist/esm/Box.js CHANGED
@@ -31,6 +31,6 @@ const Box = forwardRef(({
31
31
  translate: translate
32
32
  }));
33
33
  const MemoizedBox = memo(Box);
34
- MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.67.0";
34
+ MemoizedBox.displayName = "Box::pkg=odyssey&odysseyV=1.68.0";
35
35
  export { MemoizedBox as Box };
36
36
  //# sourceMappingURL=Box.js.map
@@ -175,6 +175,6 @@ const BreadcrumbList = ({
175
175
  });
176
176
  };
177
177
  const MemoizedBreadcrumbList = memo(BreadcrumbList);
178
- MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.67.0";
178
+ MemoizedBreadcrumbList.displayName = "BreadcrumbList::pkg=odyssey&odysseyV=1.68.0";
179
179
  export { MemoizedBreadcrumbList as BreadcrumbList };
180
180
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1,4 +1,5 @@
1
1
  import _Button from "@mui/material/Button";
2
+ import _CircularProgress from "@mui/material/CircularProgress";
2
3
  /*!
3
4
  * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
4
5
  * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
@@ -12,6 +13,7 @@ import _Button from "@mui/material/Button";
12
13
  */
13
14
  import { memo, useCallback, useImperativeHandle, useMemo, useRef } from "react";
14
15
  import { MuiPropsContext, useMuiProps } from "../MuiPropsContext.js";
16
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
15
17
  import { Tooltip } from "../Tooltip.js";
16
18
  import { useButton } from "./ButtonContext.js";
17
19
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -32,6 +34,7 @@ const BaseButton = ({
32
34
  id,
33
35
  isDisabled,
34
36
  isFullWidth: isFullWidthProp,
37
+ isLoading,
35
38
  label = "",
36
39
  onClick,
37
40
  size = "medium",
@@ -47,7 +50,21 @@ const BaseButton = ({
47
50
  const variant = variantProp === "tertiary" ? "secondary" : variantProp;
48
51
  const localButtonRef = useRef(null);
49
52
  const buttonContext = useButton();
53
+ const odysseyDesignTokens = useOdysseyDesignTokens();
50
54
  const isFullWidth = useMemo(() => buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp, [buttonContext, isFullWidthProp]);
55
+ const buttonContent = children ?? label;
56
+ const loadingIndicator = useMemo(() => _jsx(_CircularProgress, {
57
+ "aria-hidden": true,
58
+ color: "inherit",
59
+ size: odysseyDesignTokens.Spacing4
60
+ }), [odysseyDesignTokens]);
61
+ const handleClick = useCallback(event => {
62
+ if (isLoading || isDisabled) {
63
+ event.preventDefault();
64
+ return;
65
+ }
66
+ onClick?.(event);
67
+ }, [isDisabled, isLoading, onClick]);
51
68
  useImperativeHandle(buttonRef, () => ({
52
69
  focus: () => {
53
70
  localButtonRef.current?.focus();
@@ -56,9 +73,10 @@ const BaseButton = ({
56
73
  const renderButton = useCallback(muiProps => {
57
74
  return _jsx(_Button, {
58
75
  ...muiProps,
76
+ "aria-busy": isLoading,
59
77
  "aria-controls": ariaControls,
60
78
  "aria-describedby": ariaDescribedBy,
61
- "aria-disabled": isDisabled,
79
+ "aria-disabled": isLoading || isDisabled,
62
80
  "aria-expanded": ariaExpanded,
63
81
  "aria-haspopup": ariaHasPopup,
64
82
  "aria-label": ariaLabel,
@@ -68,7 +86,7 @@ const BaseButton = ({
68
86
  fullWidth: isFullWidth,
69
87
  href: href,
70
88
  id: id,
71
- onClick: !isDisabled ? onClick : undefined,
89
+ onClick: handleClick,
72
90
  ref: element => {
73
91
  if (element) {
74
92
  localButtonRef.current = element;
@@ -76,14 +94,14 @@ const BaseButton = ({
76
94
  }
77
95
  },
78
96
  size: size,
79
- startIcon: startIcon,
97
+ startIcon: isLoading ? loadingIndicator : startIcon,
80
98
  tabIndex: tabIndex,
81
99
  translate: translate,
82
100
  type: type,
83
101
  variant: variant,
84
- children: children ?? label
102
+ children: buttonContent
85
103
  });
86
- }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, endIcon, href, id, isDisabled, isFullWidth, label, children, onClick, size, startIcon, tabIndex, testId, translate, type, variant]);
104
+ }, [ariaControls, ariaDescribedBy, ariaExpanded, ariaHasPopup, ariaLabel, ariaLabelledBy, buttonContent, endIcon, handleClick, href, id, isDisabled, isFullWidth, isLoading, loadingIndicator, size, startIcon, tabIndex, testId, translate, type, variant]);
87
105
  if (tooltipText) {
88
106
  return _jsx(Tooltip, {
89
107
  ariaType: "description",
@@ -97,6 +115,6 @@ const BaseButton = ({
97
115
  return renderButton(muiProps);
98
116
  };
99
117
  const MemoizedBaseButton = memo(BaseButton);
100
- MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.67.0";
118
+ MemoizedBaseButton.displayName = "BaseButton::pkg=odyssey&odysseyV=1.68.0";
101
119
  export { MemoizedBaseButton as BaseButton };
102
120
  //# sourceMappingURL=BaseButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","MuiPropsContext","useMuiProps","Tooltip","useButton","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","children","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","focus","current","renderButton","_Button","fullWidth","undefined","ref","element","ariaType","placement","text","Consumer","MemoizedBaseButton","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * Ref attached to the underlying button element, exposing a `focus()` handle.\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set,\n * label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * If `true`, the button is disabled and cannot be activated.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the button expands to fill its container's full width.\n */\n isFullWidth?: boolean;\n /**\n * The text content of the Button.\n * @default \"\"\n */\n label?: string;\n /**\n * Called when the button is clicked.\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button.\n * @default \"medium\"\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /** The tab order of the Button relative to other focusable elements. */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The HTML button type attribute.\n * - If `'button'`, no default form behavior.\n * - If `'submit'`, submits the nearest form.\n * - If `'reset'`, resets the nearest form to its initial values.\n * @default \"button\"\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * Controls the visual hierarchy and intent of the button.\n * - If `'primary'`, high-emphasis action; use for the single most important action on a page.\n * - If `'secondary'`, medium-emphasis action; use for secondary actions alongside a primary.\n * - If `'danger'`, high-emphasis destructive action.\n * - If `'dangerSecondary'`, medium-emphasis destructive action.\n * - If `'floating'`, low-emphasis action without a border or background.\n * - If `'floatingAction'`, icon-only floating action, typically fixed-positioned.\n * - If `'tertiary'`, deprecated low-emphasis style; use `'floating'` instead.\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will\n// want to omit children, which they cannot do from the combined union type. Instead, they should\n// omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\n/**\n * The internal base button primitive used by all Odyssey button variants. Handles icon placement,\n * full-width layout, tooltip wrapping, focus handle forwarding, and MUI prop context integration.\n */\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n children,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={!isDisabled ? onClick : undefined}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {children ?? label}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth,\n label,\n children,\n onClick,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMemoizedBaseButton.displayName = \"BaseButton\";\n\nexport { MemoizedBaseButton as BaseButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA,SAEEA,IAAI,EAIJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AAKd,SACEC,eAAe,EAEfC,WAAW,QACN,uBAAuB;AAC9B,SAASC,OAAO,QAAQ,eAAe;AACvC,SAASC,SAAS,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/C,OAAO,MAAMC,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AACrE,OAAO,MAAMC,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAU;AACtE,OAAO,MAAMC,mBAAmB,GAAG,CACjC,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,gBAAgB,CACR;AAiGV,MAAMC,UAAU,GAAGA,CAAC;EAClBC,YAAY;EACZC,eAAe;EACfC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,cAAc;EACdC,SAAS;EACTC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC,EAAE;EACFC,UAAU;EACVC,WAAW,EAAEC,eAAe;EAC5BC,KAAK,GAAG,EAAE;EACVC,OAAO;EACPC,IAAI,GAAG,QAAQ;EACfC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,WAAW;EACXC,SAAS;EACTC,IAAI,GAAG,QAAQ;EACfC,OAAO,EAAEC;AACkC,CAAC,KAAK;EACjD,MAAMC,QAAQ,GAAGlC,WAAW,CAAC,CAAC;EAI9B,MAAMgC,OAAO,GAAGC,WAAW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,QAAQ,IAAIO;IAAK,CACT,CAAC;EAEhB,CAAC,EACD,CACEd,YAAY,EACZC,eAAe,EACfC,YAAY,EACZC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdG,OAAO,EACPC,IAAI,EACJC,EAAE,EACFC,UAAU,EACVC,WAAW,EACXE,KAAK,EACLP,QAAQ,EACRQ,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNE,SAAS,EACTC,IAAI,EACJC,OAAO,CAEX,CAAC;EAED,IAAIH,WAAW,EAAE;IACf,OACEzB,IAAA,CAACH,OAAO;MAAC4C,QAAQ,EAAC,aAAa;MAACC,SAAS,EAAC,KAAK;MAACC,IAAI,EAAElB,WAAY;MAAAb,QAAA,EAChEZ,IAAA,CAACL,eAAe,CAACiD,QAAQ;QAAAhC,QAAA,EAAEuB;MAAY,CAA2B;IAAC,CAC5D,CAAC;EAEd;EAEA,OAAOA,YAAY,CAACL,QAAQ,CAAC;AAC/B,CAAC;AAED,MAAMe,kBAAkB,GAAGvD,IAAI,CAACc,UAAU,CAAC;AAC3CyC,kBAAkB,CAACC,WAAW,4CAAe;AAE7C,SAASD,kBAAkB,IAAIzC,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"BaseButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","MuiPropsContext","useMuiProps","useOdysseyDesignTokens","Tooltip","useButton","jsx","_jsx","buttonSizeValues","buttonTypeValues","buttonVariantValues","BaseButton","ariaControls","ariaDescribedBy","ariaExpanded","ariaHasPopup","ariaLabel","ariaLabelledBy","buttonRef","children","endIcon","href","id","isDisabled","isFullWidth","isFullWidthProp","isLoading","label","onClick","size","startIcon","tabIndex","testId","tooltipText","translate","type","variant","variantProp","muiProps","localButtonRef","buttonContext","odysseyDesignTokens","buttonContent","loadingIndicator","_CircularProgress","color","Spacing4","handleClick","event","preventDefault","focus","current","renderButton","_Button","fullWidth","ref","element","ariaType","placement","text","Consumer","MemoizedBaseButton","displayName"],"sources":["../../../src/Buttons/BaseButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\n\nimport {\n Button as MuiButton,\n CircularProgress as MuiCircularProgress,\n} from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n ReactElement,\n ReactNode,\n RefObject,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\n\nimport type { HtmlProps } from \"../HtmlProps.js\";\n\nimport { FocusHandle } from \"../inputUtils.js\";\nimport {\n MuiPropsContext,\n MuiPropsContextType,\n useMuiProps,\n} from \"../MuiPropsContext.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { Tooltip } from \"../Tooltip.js\";\nimport { useButton } from \"./ButtonContext.js\";\n\nexport const buttonSizeValues = [\"small\", \"medium\", \"large\"] as const;\nexport const buttonTypeValues = [\"button\", \"submit\", \"reset\"] as const;\nexport const buttonVariantValues = [\n \"primary\",\n \"secondary\",\n \"danger\",\n \"dangerSecondary\",\n \"floating\",\n \"floatingAction\",\n] as const;\n\nexport type BaseButtonProps = {\n /**\n * Ref attached to the underlying button element, exposing a `focus()` handle.\n */\n buttonRef?: RefObject<FocusHandle>;\n /**\n * The contents of the button. Only available internal to Odyssey here in BaseButton. If set,\n * label is ignored.\n */\n children?: ReactNode;\n /**\n * The icon element to display at the end of the Button\n */\n endIcon?: ReactElement;\n /**\n * Optional href to render the button as a link\n */\n href?: string;\n /**\n * The ID of the Button\n */\n id?: string;\n /**\n * If `true`, the button is disabled and cannot be activated.\n */\n isDisabled?: boolean;\n /**\n * If `true`, the button expands to fill its container's full width.\n */\n isFullWidth?: boolean;\n /**\n * If `true`, the button shows a progress spinner in place of its start icon\n * and stops responding to clicks, while keeping the background and border of\n * its default state. To reword the button while it works (for example\n * `\"Saving…\"`), swap `label` alongside this.\n */\n isLoading?: boolean;\n /**\n * The text content of the Button.\n * @default \"\"\n */\n label?: string;\n /**\n * Called when the button is clicked.\n */\n onClick?: MuiButtonProps[\"onClick\"];\n /**\n * The size of the button.\n * @default \"medium\"\n */\n size?: (typeof buttonSizeValues)[number];\n /**\n * The icon element to display at the start of the Button\n */\n startIcon?: ReactElement;\n /** The tab order of the Button relative to other focusable elements. */\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The tooltip text for the Button if it's icon-only\n */\n tooltipText?: string;\n /**\n * The HTML button type attribute.\n * - If `'button'`, no default form behavior.\n * - If `'submit'`, submits the nearest form.\n * - If `'reset'`, resets the nearest form to its initial values.\n * @default \"button\"\n */\n type?: (typeof buttonTypeValues)[number];\n /**\n * Controls the visual hierarchy and intent of the button.\n * - If `'primary'`, high-emphasis action; use for the single most important action on a page.\n * - If `'secondary'`, medium-emphasis action; use for secondary actions alongside a primary.\n * - If `'danger'`, high-emphasis destructive action.\n * - If `'dangerSecondary'`, medium-emphasis destructive action.\n * - If `'floating'`, low-emphasis action without a border or background.\n * - If `'floatingAction'`, icon-only floating action, typically fixed-positioned.\n * - If `'tertiary'`, deprecated low-emphasis style; use `'floating'` instead.\n */\n variant: (typeof buttonVariantValues)[number] | \"tertiary\";\n};\n\n// These are split and exported separately from the above because wrappers of this (e.g. Button) will\n// want to omit children, which they cannot do from the combined union type. Instead, they should\n// omit from BaseButtonProps, then union with the AdditionalBaseButtonProps (as seen in Button)\nexport type AdditionalBaseButtonProps = Pick<\n HtmlProps,\n | \"ariaControls\"\n | \"ariaDescribedBy\"\n | \"ariaExpanded\"\n | \"ariaHasPopup\"\n | \"ariaLabel\"\n | \"ariaLabelledBy\"\n | \"tabIndex\"\n | \"testId\"\n | \"translate\"\n>;\n\n/**\n * The internal base button primitive used by all Odyssey button variants. Handles icon placement,\n * full-width layout, tooltip wrapping, focus handle forwarding, and MUI prop context integration.\n */\nconst BaseButton = ({\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonRef,\n children,\n endIcon,\n href,\n id,\n isDisabled,\n isFullWidth: isFullWidthProp,\n isLoading,\n label = \"\",\n onClick,\n size = \"medium\",\n startIcon,\n tabIndex,\n testId,\n tooltipText,\n translate,\n type = \"button\",\n variant: variantProp,\n}: BaseButtonProps & AdditionalBaseButtonProps) => {\n const muiProps = useMuiProps();\n\n // We're deprecating the \"tertiary\" variant, so map it to\n // \"secondary\" in lieu of making a breaking change\n const variant = variantProp === \"tertiary\" ? \"secondary\" : variantProp;\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n const buttonContext = useButton();\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const isFullWidth = useMemo(\n () =>\n buttonContext.isFullWidth ? buttonContext.isFullWidth : isFullWidthProp,\n [buttonContext, isFullWidthProp],\n );\n\n const buttonContent = children ?? label;\n\n const loadingIndicator = useMemo(\n () => (\n // Design specifies each variant's spinner color as that variant's own\n // label color, so `color=\"inherit\"` keeps the two in step instead of\n // restating the palette per variant. MUI's CircularProgress is used\n // directly because Odyssey's wrapper deliberately exposes neither a size\n // nor a color prop, and design asked for the 16px sizing to stay internal\n // to Button. Stroke weight comes from the shared theme default, which\n // holds a 1:12 stroke-to-diameter ratio at any size.\n <MuiCircularProgress\n aria-hidden\n color=\"inherit\"\n size={odysseyDesignTokens.Spacing4}\n />\n ),\n [odysseyDesignTokens],\n );\n\n // An inert button keeps its `href` so it stays focusable and keeps its link\n // role, which leaves the browser's own activation as the thing to stop:\n // `pointer-events: none` from the theme only blocks the mouse, and because\n // `aria-disabled` is advisory, Enter still dispatches a click that would\n // follow the link or submit the form. Preventing the default on that click\n // covers every input method without swapping the element out.\n const handleClick = useCallback<NonNullable<MuiButtonProps[\"onClick\"]>>(\n (event) => {\n if (isLoading || isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n },\n [isDisabled, isLoading, onClick],\n );\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <MuiButton\n {...muiProps}\n aria-busy={isLoading}\n aria-controls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-disabled={isLoading || isDisabled}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n data-se={testId}\n endIcon={endIcon}\n fullWidth={isFullWidth}\n href={href}\n id={id}\n onClick={handleClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<\n HTMLButtonElement | HTMLAnchorElement\n >\n ).current = element;\n //@ts-expect-error ref is not an optional prop on the props context type\n muiProps?.ref?.(element);\n }\n }}\n size={size}\n startIcon={isLoading ? loadingIndicator : startIcon}\n tabIndex={tabIndex}\n translate={translate}\n type={type}\n variant={variant}\n >\n {buttonContent}\n </MuiButton>\n );\n },\n [\n ariaControls,\n ariaDescribedBy,\n ariaExpanded,\n ariaHasPopup,\n ariaLabel,\n ariaLabelledBy,\n buttonContent,\n endIcon,\n handleClick,\n href,\n id,\n isDisabled,\n isFullWidth,\n isLoading,\n loadingIndicator,\n size,\n startIcon,\n tabIndex,\n testId,\n translate,\n type,\n variant,\n ],\n );\n\n if (tooltipText) {\n return (\n <Tooltip ariaType=\"description\" placement=\"top\" text={tooltipText}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n }\n\n return renderButton(muiProps);\n};\n\nconst MemoizedBaseButton = memo(BaseButton);\nMem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D,UAAU","ignoreList":[]}
@@ -165,6 +165,6 @@ const BaseMenuButton = ({
165
165
  });
166
166
  };
167
167
  const MemoizedBaseMenuButton = memo(BaseMenuButton);
168
- MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.67.0";
168
+ MemoizedBaseMenuButton.displayName = "BaseMenuButton::pkg=odyssey&odysseyV=1.68.0";
169
169
  export { MemoizedBaseMenuButton as BaseMenuButton };
170
170
  //# sourceMappingURL=BaseMenuButton.js.map
@@ -19,6 +19,6 @@ const Button = props => {
19
19
  });
20
20
  };
21
21
  const MemoizedButton = memo(Button);
22
- MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.67.0";
22
+ MemoizedButton.displayName = "Button::pkg=odyssey&odysseyV=1.68.0";
23
23
  export { MemoizedButton as Button };
24
24
  //# sourceMappingURL=Button.js.map