@okta/odyssey-react-mui 1.32.4 → 1.34.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 (363) hide show
  1. package/dist/cjs/Autocomplete.cjs +1 -1
  2. package/dist/cjs/Autocomplete.cjs.map +1 -1
  3. package/dist/cjs/Breadcrumbs.cjs +23 -7
  4. package/dist/cjs/Breadcrumbs.cjs.map +1 -1
  5. package/dist/cjs/Buttons/BaseButton.cjs +1 -1
  6. package/dist/cjs/Buttons/BaseButton.cjs.map +1 -1
  7. package/dist/cjs/DatePickers/datePickerTheme.cjs +1 -1
  8. package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
  9. package/dist/cjs/OdysseyProvider.cjs +2 -2
  10. package/dist/cjs/OdysseyProvider.cjs.map +1 -1
  11. package/dist/cjs/OdysseyThemeProvider.cjs +2 -2
  12. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  13. package/dist/cjs/hexToRgb.cjs.map +1 -1
  14. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  15. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  16. package/dist/cjs/properties/ts/odyssey-react-mui.cjs +1 -0
  17. package/dist/cjs/properties/ts/odyssey-react-mui.cjs.map +1 -1
  18. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs +1 -0
  19. package/dist/cjs/properties/ts/odyssey-react-mui_cs.cjs.map +1 -1
  20. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs +1 -0
  21. package/dist/cjs/properties/ts/odyssey-react-mui_da.cjs.map +1 -1
  22. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs +1 -0
  23. package/dist/cjs/properties/ts/odyssey-react-mui_de.cjs.map +1 -1
  24. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs +1 -0
  25. package/dist/cjs/properties/ts/odyssey-react-mui_el.cjs.map +1 -1
  26. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs +1 -0
  27. package/dist/cjs/properties/ts/odyssey-react-mui_es.cjs.map +1 -1
  28. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs +1 -0
  29. package/dist/cjs/properties/ts/odyssey-react-mui_fi.cjs.map +1 -1
  30. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs +1 -0
  31. package/dist/cjs/properties/ts/odyssey-react-mui_fr.cjs.map +1 -1
  32. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs +1 -0
  33. package/dist/cjs/properties/ts/odyssey-react-mui_ht.cjs.map +1 -1
  34. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs +1 -0
  35. package/dist/cjs/properties/ts/odyssey-react-mui_hu.cjs.map +1 -1
  36. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs +1 -0
  37. package/dist/cjs/properties/ts/odyssey-react-mui_id.cjs.map +1 -1
  38. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs +1 -0
  39. package/dist/cjs/properties/ts/odyssey-react-mui_it.cjs.map +1 -1
  40. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs +1 -0
  41. package/dist/cjs/properties/ts/odyssey-react-mui_ja.cjs.map +1 -1
  42. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs +1 -0
  43. package/dist/cjs/properties/ts/odyssey-react-mui_ko.cjs.map +1 -1
  44. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs +1 -0
  45. package/dist/cjs/properties/ts/odyssey-react-mui_ms.cjs.map +1 -1
  46. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs +1 -0
  47. package/dist/cjs/properties/ts/odyssey-react-mui_nb.cjs.map +1 -1
  48. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs +1 -0
  49. package/dist/cjs/properties/ts/odyssey-react-mui_nl_NL.cjs.map +1 -1
  50. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs +1 -0
  51. package/dist/cjs/properties/ts/odyssey-react-mui_pl.cjs.map +1 -1
  52. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs +1 -0
  53. package/dist/cjs/properties/ts/odyssey-react-mui_pt_BR.cjs.map +1 -1
  54. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs +1 -0
  55. package/dist/cjs/properties/ts/odyssey-react-mui_ro.cjs.map +1 -1
  56. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs +1 -0
  57. package/dist/cjs/properties/ts/odyssey-react-mui_ru.cjs.map +1 -1
  58. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs +1 -0
  59. package/dist/cjs/properties/ts/odyssey-react-mui_sv.cjs.map +1 -1
  60. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs +1 -0
  61. package/dist/cjs/properties/ts/odyssey-react-mui_th.cjs.map +1 -1
  62. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs +1 -0
  63. package/dist/cjs/properties/ts/odyssey-react-mui_tr.cjs.map +1 -1
  64. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs +1 -0
  65. package/dist/cjs/properties/ts/odyssey-react-mui_uk.cjs.map +1 -1
  66. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs +1 -0
  67. package/dist/cjs/properties/ts/odyssey-react-mui_vi.cjs.map +1 -1
  68. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs +1 -0
  69. package/dist/cjs/properties/ts/odyssey-react-mui_zh_CN.cjs.map +1 -1
  70. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs +1 -0
  71. package/dist/cjs/properties/ts/odyssey-react-mui_zh_TW.cjs.map +1 -1
  72. package/dist/cjs/theme/pxToRem.cjs +21 -0
  73. package/dist/cjs/theme/pxToRem.cjs.map +1 -0
  74. package/dist/cjs/theme/theme.cjs +22 -0
  75. package/dist/cjs/theme/theme.cjs.map +1 -1
  76. package/dist/cjs/theme/useMediaQuery.cjs +34 -0
  77. package/dist/cjs/theme/useMediaQuery.cjs.map +1 -0
  78. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs +3 -3
  79. package/dist/cjs/ui-shell/AppSwitcher/AppSwitcher.cjs.map +1 -1
  80. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +353 -0
  81. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -0
  82. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +62 -44
  83. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  84. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs +8 -5
  85. package/dist/cjs/ui-shell/SideNav/SideNavHeader.cjs.map +1 -1
  86. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs +3 -0
  87. package/dist/cjs/ui-shell/SideNav/SideNavItemContent.cjs.map +1 -1
  88. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs +5 -5
  89. package/dist/cjs/ui-shell/SideNav/SideNavLogo.cjs.map +1 -1
  90. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs +2 -1
  91. package/dist/cjs/ui-shell/SideNav/SideNavToggleButton.cjs.map +1 -1
  92. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  93. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs +37 -0
  94. package/dist/cjs/ui-shell/TopNav/HamburgerMenuIcon.cjs.map +1 -0
  95. package/dist/cjs/ui-shell/TopNav/TopNav.cjs +5 -5
  96. package/dist/cjs/ui-shell/TopNav/TopNav.cjs.map +1 -1
  97. package/dist/cjs/ui-shell/UiShell.cjs +43 -18
  98. package/dist/cjs/ui-shell/UiShell.cjs.map +1 -1
  99. package/dist/cjs/ui-shell/UiShellProvider.cjs +14 -4
  100. package/dist/cjs/ui-shell/UiShellProvider.cjs.map +1 -1
  101. package/dist/cjs/ui-shell/WideUiShellContent.cjs +171 -0
  102. package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -0
  103. package/dist/cjs/ui-shell/index.cjs +37 -9
  104. package/dist/cjs/ui-shell/index.cjs.map +1 -1
  105. package/dist/cjs/ui-shell/renderUiShell.cjs +32 -20
  106. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  107. package/dist/cjs/ui-shell/uiShellContentTypes.cjs +20 -0
  108. package/dist/cjs/ui-shell/uiShellContentTypes.cjs.map +1 -0
  109. package/dist/cjs/ui-shell/uiShellSharedConstants.cjs +23 -0
  110. package/dist/cjs/ui-shell/uiShellSharedConstants.cjs.map +1 -0
  111. package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs +108 -0
  112. package/dist/cjs/ui-shell/useMatchAppElementToUiShellAppArea.cjs.map +1 -0
  113. package/dist/cjs/ui-shell/useScrollState.cjs +2 -4
  114. package/dist/cjs/ui-shell/useScrollState.cjs.map +1 -1
  115. package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs +41 -0
  116. package/dist/cjs/ui-shell/useUiShellBreakpoints.cjs.map +1 -0
  117. package/dist/cjs/web-component/createReactRootElements.cjs.map +1 -1
  118. package/dist/cjs/web-component/renderReactInWebComponent.cjs +6 -1
  119. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  120. package/dist/esm/Autocomplete.js +1 -1
  121. package/dist/esm/Autocomplete.js.map +1 -1
  122. package/dist/esm/Breadcrumbs.js +23 -7
  123. package/dist/esm/Breadcrumbs.js.map +1 -1
  124. package/dist/esm/Buttons/BaseButton.js +1 -1
  125. package/dist/esm/Buttons/BaseButton.js.map +1 -1
  126. package/dist/esm/DatePickers/datePickerTheme.js +1 -1
  127. package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
  128. package/dist/esm/OdysseyProvider.js +2 -2
  129. package/dist/esm/OdysseyProvider.js.map +1 -1
  130. package/dist/esm/OdysseyThemeProvider.js +2 -2
  131. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  132. package/dist/esm/hexToRgb.js.map +1 -1
  133. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  134. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  135. package/dist/esm/properties/ts/odyssey-react-mui.js +1 -0
  136. package/dist/esm/properties/ts/odyssey-react-mui.js.map +1 -1
  137. package/dist/esm/properties/ts/odyssey-react-mui_cs.js +1 -0
  138. package/dist/esm/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  139. package/dist/esm/properties/ts/odyssey-react-mui_da.js +1 -0
  140. package/dist/esm/properties/ts/odyssey-react-mui_da.js.map +1 -1
  141. package/dist/esm/properties/ts/odyssey-react-mui_de.js +1 -0
  142. package/dist/esm/properties/ts/odyssey-react-mui_de.js.map +1 -1
  143. package/dist/esm/properties/ts/odyssey-react-mui_el.js +1 -0
  144. package/dist/esm/properties/ts/odyssey-react-mui_el.js.map +1 -1
  145. package/dist/esm/properties/ts/odyssey-react-mui_es.js +1 -0
  146. package/dist/esm/properties/ts/odyssey-react-mui_es.js.map +1 -1
  147. package/dist/esm/properties/ts/odyssey-react-mui_fi.js +1 -0
  148. package/dist/esm/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  149. package/dist/esm/properties/ts/odyssey-react-mui_fr.js +1 -0
  150. package/dist/esm/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  151. package/dist/esm/properties/ts/odyssey-react-mui_ht.js +1 -0
  152. package/dist/esm/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  153. package/dist/esm/properties/ts/odyssey-react-mui_hu.js +1 -0
  154. package/dist/esm/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  155. package/dist/esm/properties/ts/odyssey-react-mui_id.js +1 -0
  156. package/dist/esm/properties/ts/odyssey-react-mui_id.js.map +1 -1
  157. package/dist/esm/properties/ts/odyssey-react-mui_it.js +1 -0
  158. package/dist/esm/properties/ts/odyssey-react-mui_it.js.map +1 -1
  159. package/dist/esm/properties/ts/odyssey-react-mui_ja.js +1 -0
  160. package/dist/esm/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  161. package/dist/esm/properties/ts/odyssey-react-mui_ko.js +1 -0
  162. package/dist/esm/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  163. package/dist/esm/properties/ts/odyssey-react-mui_ms.js +1 -0
  164. package/dist/esm/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  165. package/dist/esm/properties/ts/odyssey-react-mui_nb.js +1 -0
  166. package/dist/esm/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  167. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js +1 -0
  168. package/dist/esm/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  169. package/dist/esm/properties/ts/odyssey-react-mui_pl.js +1 -0
  170. package/dist/esm/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  171. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js +1 -0
  172. package/dist/esm/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  173. package/dist/esm/properties/ts/odyssey-react-mui_ro.js +1 -0
  174. package/dist/esm/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  175. package/dist/esm/properties/ts/odyssey-react-mui_ru.js +1 -0
  176. package/dist/esm/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  177. package/dist/esm/properties/ts/odyssey-react-mui_sv.js +1 -0
  178. package/dist/esm/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  179. package/dist/esm/properties/ts/odyssey-react-mui_th.js +1 -0
  180. package/dist/esm/properties/ts/odyssey-react-mui_th.js.map +1 -1
  181. package/dist/esm/properties/ts/odyssey-react-mui_tr.js +1 -0
  182. package/dist/esm/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  183. package/dist/esm/properties/ts/odyssey-react-mui_uk.js +1 -0
  184. package/dist/esm/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  185. package/dist/esm/properties/ts/odyssey-react-mui_vi.js +1 -0
  186. package/dist/esm/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  187. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js +1 -0
  188. package/dist/esm/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  189. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js +1 -0
  190. package/dist/esm/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  191. package/dist/esm/theme/pxToRem.js +14 -0
  192. package/dist/esm/theme/pxToRem.js.map +1 -0
  193. package/dist/esm/theme/theme.js +2 -0
  194. package/dist/esm/theme/theme.js.map +1 -1
  195. package/dist/esm/theme/useMediaQuery.js +27 -0
  196. package/dist/esm/theme/useMediaQuery.js.map +1 -0
  197. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js +2 -2
  198. package/dist/esm/ui-shell/AppSwitcher/AppSwitcher.js.map +1 -1
  199. package/dist/esm/ui-shell/NarrowUiShellContent.js +347 -0
  200. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -0
  201. package/dist/esm/ui-shell/SideNav/SideNav.js +61 -43
  202. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  203. package/dist/esm/ui-shell/SideNav/SideNavHeader.js +7 -4
  204. package/dist/esm/ui-shell/SideNav/SideNavHeader.js.map +1 -1
  205. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js +3 -0
  206. package/dist/esm/ui-shell/SideNav/SideNavItemContent.js.map +1 -1
  207. package/dist/esm/ui-shell/SideNav/SideNavLogo.js +5 -5
  208. package/dist/esm/ui-shell/SideNav/SideNavLogo.js.map +1 -1
  209. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js +2 -1
  210. package/dist/esm/ui-shell/SideNav/SideNavToggleButton.js.map +1 -1
  211. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  212. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js +32 -0
  213. package/dist/esm/ui-shell/TopNav/HamburgerMenuIcon.js.map +1 -0
  214. package/dist/esm/ui-shell/TopNav/TopNav.js +2 -2
  215. package/dist/esm/ui-shell/TopNav/TopNav.js.map +1 -1
  216. package/dist/esm/ui-shell/UiShell.js +43 -18
  217. package/dist/esm/ui-shell/UiShell.js.map +1 -1
  218. package/dist/esm/ui-shell/UiShellProvider.js +12 -3
  219. package/dist/esm/ui-shell/UiShellProvider.js.map +1 -1
  220. package/dist/esm/ui-shell/WideUiShellContent.js +165 -0
  221. package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -0
  222. package/dist/esm/ui-shell/index.js +3 -1
  223. package/dist/esm/ui-shell/index.js.map +1 -1
  224. package/dist/esm/ui-shell/renderUiShell.js +32 -20
  225. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  226. package/dist/esm/ui-shell/uiShellContentTypes.js +14 -0
  227. package/dist/esm/ui-shell/uiShellContentTypes.js.map +1 -0
  228. package/dist/esm/ui-shell/uiShellSharedConstants.js +17 -0
  229. package/dist/esm/ui-shell/uiShellSharedConstants.js.map +1 -0
  230. package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js +99 -0
  231. package/dist/esm/ui-shell/useMatchAppElementToUiShellAppArea.js.map +1 -0
  232. package/dist/esm/ui-shell/useScrollState.js +3 -5
  233. package/dist/esm/ui-shell/useScrollState.js.map +1 -1
  234. package/dist/esm/ui-shell/useUiShellBreakpoints.js +34 -0
  235. package/dist/esm/ui-shell/useUiShellBreakpoints.js.map +1 -0
  236. package/dist/esm/web-component/createReactRootElements.js.map +1 -1
  237. package/dist/esm/web-component/renderReactInWebComponent.js +6 -1
  238. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  239. package/dist/index.cjs +1 -1
  240. package/dist/index.mjs +1 -1
  241. package/dist/index.scss +1 -1
  242. package/dist/tsconfig.production.tsbuildinfo +1 -1
  243. package/dist/types/Autocomplete.d.ts +1 -1
  244. package/dist/types/Breadcrumbs.d.ts +4 -3
  245. package/dist/types/Breadcrumbs.d.ts.map +1 -1
  246. package/dist/types/Buttons/BaseButton.d.ts +1 -1
  247. package/dist/types/OdysseyProvider.d.ts +1 -1
  248. package/dist/types/OdysseyProvider.d.ts.map +1 -1
  249. package/dist/types/OdysseyThemeProvider.d.ts.map +1 -1
  250. package/dist/types/OdysseyTranslationProvider.d.ts +1 -1
  251. package/dist/types/OdysseyTranslationProvider.d.ts.map +1 -1
  252. package/dist/types/hexToRgb.d.ts.map +1 -1
  253. package/dist/types/i18n.d.ts +28 -0
  254. package/dist/types/i18n.d.ts.map +1 -1
  255. package/dist/types/labs/DatePickers/DateTimePicker.d.ts.map +1 -1
  256. package/dist/types/properties/ts/odyssey-react-mui.d.ts +1 -0
  257. package/dist/types/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  258. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts +1 -0
  259. package/dist/types/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  260. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts +1 -0
  261. package/dist/types/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  262. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts +1 -0
  263. package/dist/types/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  264. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts +1 -0
  265. package/dist/types/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  266. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts +1 -0
  267. package/dist/types/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  268. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts +1 -0
  269. package/dist/types/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  270. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts +1 -0
  271. package/dist/types/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  272. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts +1 -0
  273. package/dist/types/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  274. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts +1 -0
  275. package/dist/types/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  276. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts +1 -0
  277. package/dist/types/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  278. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts +1 -0
  279. package/dist/types/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  280. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts +1 -0
  281. package/dist/types/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  282. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts +1 -0
  283. package/dist/types/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  284. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts +1 -0
  285. package/dist/types/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  286. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts +1 -0
  287. package/dist/types/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  288. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts +1 -0
  289. package/dist/types/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  290. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts +1 -0
  291. package/dist/types/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  292. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts +1 -0
  293. package/dist/types/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  294. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts +1 -0
  295. package/dist/types/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  296. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts +1 -0
  297. package/dist/types/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  298. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts +1 -0
  299. package/dist/types/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  300. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts +1 -0
  301. package/dist/types/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  302. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts +1 -0
  303. package/dist/types/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  304. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts +1 -0
  305. package/dist/types/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  306. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts +1 -0
  307. package/dist/types/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  308. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts +1 -0
  309. package/dist/types/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  310. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts +1 -0
  311. package/dist/types/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  312. package/dist/types/theme/pxToRem.d.ts +13 -0
  313. package/dist/types/theme/pxToRem.d.ts.map +1 -0
  314. package/dist/types/theme/theme.d.ts +2 -0
  315. package/dist/types/theme/theme.d.ts.map +1 -1
  316. package/dist/types/theme/useMediaQuery.d.ts +13 -0
  317. package/dist/types/theme/useMediaQuery.d.ts.map +1 -0
  318. package/dist/types/ui-shell/AppSwitcher/AppSwitcher.d.ts.map +1 -1
  319. package/dist/types/ui-shell/NarrowUiShellContent.d.ts +17 -0
  320. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -0
  321. package/dist/types/ui-shell/SideNav/SideNav.d.ts +1 -3
  322. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  323. package/dist/types/ui-shell/SideNav/SideNavHeader.d.ts.map +1 -1
  324. package/dist/types/ui-shell/SideNav/SideNavItemContent.d.ts.map +1 -1
  325. package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts +1 -1
  326. package/dist/types/ui-shell/SideNav/SideNavLogo.d.ts.map +1 -1
  327. package/dist/types/ui-shell/SideNav/SideNavToggleButton.d.ts.map +1 -1
  328. package/dist/types/ui-shell/SideNav/types.d.ts +7 -1
  329. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  330. package/dist/types/ui-shell/TopNav/HamburgerMenuIcon.d.ts +16 -0
  331. package/dist/types/ui-shell/TopNav/HamburgerMenuIcon.d.ts.map +1 -0
  332. package/dist/types/ui-shell/TopNav/TopNav.d.ts +0 -1
  333. package/dist/types/ui-shell/TopNav/TopNav.d.ts.map +1 -1
  334. package/dist/types/ui-shell/UiShell.d.ts +12 -14
  335. package/dist/types/ui-shell/UiShell.d.ts.map +1 -1
  336. package/dist/types/ui-shell/UiShellProvider.d.ts +37 -8
  337. package/dist/types/ui-shell/UiShellProvider.d.ts.map +1 -1
  338. package/dist/types/ui-shell/WideUiShellContent.d.ts +16 -0
  339. package/dist/types/ui-shell/WideUiShellContent.d.ts.map +1 -0
  340. package/dist/types/ui-shell/index.d.ts +3 -1
  341. package/dist/types/ui-shell/index.d.ts.map +1 -1
  342. package/dist/types/ui-shell/renderUiShell.d.ts +9 -11
  343. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  344. package/dist/types/ui-shell/{UiShellContent.d.ts → uiShellContentTypes.d.ts} +45 -31
  345. package/dist/types/ui-shell/uiShellContentTypes.d.ts.map +1 -0
  346. package/dist/types/ui-shell/uiShellSharedConstants.d.ts +18 -0
  347. package/dist/types/ui-shell/uiShellSharedConstants.d.ts.map +1 -0
  348. package/dist/types/ui-shell/useMatchAppElementToUiShellAppArea.d.ts +38 -0
  349. package/dist/types/ui-shell/useMatchAppElementToUiShellAppArea.d.ts.map +1 -0
  350. package/dist/types/ui-shell/useScrollState.d.ts +0 -1
  351. package/dist/types/ui-shell/useScrollState.d.ts.map +1 -1
  352. package/dist/types/ui-shell/useUiShellBreakpoints.d.ts +18 -0
  353. package/dist/types/ui-shell/useUiShellBreakpoints.d.ts.map +1 -0
  354. package/dist/types/web-component/createReactRootElements.d.ts +6 -4
  355. package/dist/types/web-component/createReactRootElements.d.ts.map +1 -1
  356. package/dist/types/web-component/renderReactInWebComponent.d.ts +12 -5
  357. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  358. package/package.json +6 -6
  359. package/dist/cjs/ui-shell/UiShellContent.cjs +0 -242
  360. package/dist/cjs/ui-shell/UiShellContent.cjs.map +0 -1
  361. package/dist/esm/ui-shell/UiShellContent.js +0 -234
  362. package/dist/esm/ui-shell/UiShellContent.js.map +0 -1
  363. package/dist/types/ui-shell/UiShellContent.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavHeader.js","names":["styled","memo","useOdysseyDesignTokens","SideNavLogo","Heading5","TOP_NAV_HEIGHT","useUiShellContext","jsx","_jsx","jsxs","_jsxs","SideNavHeaderContainer","position","display","flexDirection","zIndex","SideNavLogoContainer","shouldForwardProp","prop","isSameBackgroundAsMain","odysseyDesignTokens","alignItems","height","paddingBlock","Spacing4","paddingInline","Spacing5","backgroundColor","HueNeutralWhite","maxHeight","width","maxWidth","SideNavHeadingContainer","contrastFontColor","justifyContent","margin","color","SideNavHeader","appName","isLoading","logoProps","uiShellContext","children","_Skeleton","variant","sideNavContrastColors","fontColor","component","MemoizedSideNavHeader","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavHeader.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo } from \"react\";\nimport { Skeleton } from \"@mui/material\";\n\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { SideNavLogo } from \"./SideNavLogo.js\";\nimport { SideNavLogoProps, SideNavProps } from \"./types.js\";\nimport { Heading5 } from \"../../Typography.js\";\nimport { TOP_NAV_HEIGHT } from \"../TopNav/index.js\";\nimport { ContrastColors } from \"../../createContrastColors.js\";\nimport { useUiShellContext } from \"../../ui-shell/UiShellProvider.js\";\n\nconst SideNavHeaderContainer = styled(\"div\")({\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n zIndex: 1,\n});\n\nconst SideNavLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isSameBackgroundAsMain\",\n})<{\n isSameBackgroundAsMain: SideNavLogoProps[\"isSameBackgroundAsMain\"];\n odysseyDesignTokens: DesignTokens;\n}>(({ isSameBackgroundAsMain, odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n backgroundColor: isSameBackgroundAsMain\n ? \"transparent\"\n : odysseyDesignTokens.HueNeutralWhite,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n}));\n\nconst SideNavHeadingContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"contrastFontColor\",\n})(\n ({\n contrastFontColor,\n odysseyDesignTokens,\n }: {\n contrastFontColor: ContrastColors[\"fontColor\"];\n odysseyDesignTokens: DesignTokens;\n }) => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n width: \"100%\",\n\n [\"& .MuiTypography-root\"]: {\n margin: 0,\n width: \"100%\",\n color: contrastFontColor || \"inherit\",\n },\n }),\n);\n\nexport type SideNavHeaderProps = {\n /**\n * The app's name.\n */\n appName?: string;\n /**\n * If the side nav currently has no items, it will be loading.\n */\n isLoading?: boolean;\n} & Pick<SideNavProps, \"logoProps\">;\n\nconst SideNavHeader = ({\n appName,\n isLoading,\n logoProps,\n}: SideNavHeaderProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n return (\n <SideNavHeaderContainer>\n <SideNavLogoContainer\n isSameBackgroundAsMain={logoProps?.isSameBackgroundAsMain}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton variant=\"rounded\" height={24} width={67} />\n ) : (\n <SideNavLogo {...logoProps} />\n )}\n </SideNavLogoContainer>\n\n {appName && (\n <SideNavHeadingContainer\n contrastFontColor={uiShellContext?.sideNavContrastColors?.fontColor}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Heading5 component=\"h2\">\n {isLoading ? <Skeleton /> : appName}\n </Heading5>\n </SideNavHeadingContainer>\n )}\n </SideNavHeaderContainer>\n );\n};\n\nconst MemoizedSideNavHeader = memo(SideNavHeader);\nMemoizedSideNavHeader.displayName = \"SideNavHeader\";\n\nexport { MemoizedSideNavHeader as SideNavHeader };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAAQ,OAAO;AAG5B,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,cAAc,QAAQ,oBAAoB;AAEnD,SAASC,iBAAiB,QAAQ,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtE,MAAMC,sBAAsB,GAAGX,MAAM,CAAC,KAAK,CAAC,CAAC;EAC3CY,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QA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GAAGlB,sBAAsB,CAAC,CAAC;EACpD,MAAMuC,cAAc,GAAGnC,iBAAiB,CAAC,CAAC;EAE1C,OACEI,KAAA,CAACC,sBAAsB;IAAA+B,QAAA,GACrBlC,IAAA,CAACQ,oBAAoB;MACnBG,sBAAsB,EAAEqB,SAAS,EAAErB,sBAAuB;MAC1DC,mBAAmB,EAAEA,mBAAoB;MAAAsB,QAAA,EAExCH,SAAS,GAER/B,IAAA,CAAAmC,SAAA;QAAUC,OAAO,EAAC,SAAS;QAACtB,MAAM,EAAE,EAAG;QAACQ,KAAK,EAAE;MAAG,CAAE,CAAC,GAErDtB,IAAA,CAACL,WAAW;QAAA,GAAKqC;MAAS,CAAG;IAC9B,CACmB,CAAC,EAEtBF,OAAO,IACN9B,IAAA,CAACwB,uBAAuB;MACtBC,iBAAiB,EAAEQ,cAAc,EAAEI,qBAAqB,EAAEC,SAAU;MACpE1B,mBAAmB,EAAEA,mBAAoB;MAAAsB,QAAA,EAEzClC,IAAA,CAACJ,QAAQ;QAAC2C,SAAS,EAAC,IAAI;QAAAL,QAAA,EACrBH,SAAS,GAAG/B,IAAA,CAAAmC,SAAA,IAAW,CAAC,GAAGL;MAAO,CAC3B;IAAC,CACY,CAC1B;EAAA,CACqB,CAAC;AAE7B,CAAC;AAED,MAAMU,qBAAqB,GAAG/C,IAAI,CAACoC,aAAa,CAAC;AACjDW,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAIX,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"SideNavHeader.js","names":["styled","memo","useOdysseyDesignTokens","SideNavLogo","Heading5","useUiShellContext","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","jsx","_jsx","jsxs","_jsxs","SideNavHeaderContainer","position","display","flexDirection","zIndex","SideNavLogoContainer","shouldForwardProp","prop","headerBackgroundColor","isSameBackgroundAsMain","odysseyDesignTokens","alignItems","height","paddingBlock","Spacing4","paddingInline","Spacing5","backgroundColor","HueNeutralWhite","maxHeight","width","maxWidth","SideNavHeadingContainer","contrastFontColor","justifyContent","margin","color","SideNavHeader","appName","isLoading","logoProps","uiShellContext","children","sideNavBackgroundColor","_Skeleton","variant","sideNavContrastColors","fontColor","component","MemoizedSideNavHeader","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavHeader.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo } from \"react\";\nimport { Skeleton } from \"@mui/material\";\n\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { SideNavLogo } from \"./SideNavLogo.js\";\nimport { SideNavLogoProps, SideNavProps } from \"./types.js\";\nimport { Heading5 } from \"../../Typography.js\";\nimport { ContrastColors } from \"../../createContrastColors.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport {\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n} from \"../uiShellSharedConstants.js\";\n\nconst SideNavHeaderContainer = styled(\"div\")({\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst SideNavLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"headerBackgroundColor\" &&\n prop !== \"isSameBackgroundAsMain\" &&\n prop !== \"odysseyDesignTokens\",\n})<{\n headerBackgroundColor?: UiShellColors[\"sideNavBackgroundColor\"];\n isSameBackgroundAsMain: SideNavLogoProps[\"isSameBackgroundAsMain\"];\n odysseyDesignTokens: DesignTokens;\n}>(\n ({ headerBackgroundColor, isSameBackgroundAsMain, odysseyDesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n backgroundColor: isSameBackgroundAsMain\n ? headerBackgroundColor\n : odysseyDesignTokens.HueNeutralWhite,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n }),\n);\n\nconst SideNavHeadingContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"contrastFontColor\",\n})(\n ({\n contrastFontColor,\n odysseyDesignTokens,\n }: {\n contrastFontColor: ContrastColors[\"fontColor\"];\n odysseyDesignTokens: DesignTokens;\n }) => ({\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n paddingBlock: odysseyDesignTokens.Spacing4,\n paddingInline: odysseyDesignTokens.Spacing5,\n width: \"100%\",\n\n [\"& .MuiTypography-root\"]: {\n margin: 0,\n width: \"100%\",\n color: contrastFontColor || \"inherit\",\n },\n }),\n);\n\nexport type SideNavHeaderProps = {\n /**\n * The app's name.\n */\n appName?: string;\n /**\n * If the side nav currently has no items, it will be loading.\n */\n isLoading?: boolean;\n} & Pick<SideNavProps, \"logoProps\">;\n\nconst SideNavHeader = ({\n appName,\n isLoading,\n logoProps,\n}: SideNavHeaderProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n return (\n <SideNavHeaderContainer>\n <SideNavLogoContainer\n isSameBackgroundAsMain={logoProps?.isSameBackgroundAsMain}\n headerBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n odysseyDesignTokens={odysseyDesignTokens}\n data-se=\"sidenav-header-logo-container\"\n >\n {isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton variant=\"rounded\" height={24} width={67} />\n ) : (\n <SideNavLogo {...logoProps} />\n )}\n </SideNavLogoContainer>\n\n {appName && (\n <SideNavHeadingContainer\n contrastFontColor={uiShellContext?.sideNavContrastColors?.fontColor}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <Heading5 component=\"h2\">\n {isLoading ? <Skeleton /> : appName}\n </Heading5>\n </SideNavHeadingContainer>\n )}\n </SideNavHeaderContainer>\n );\n};\n\nconst MemoizedSideNavHeader = memo(SideNavHeader);\nMemoizedSideNavHeader.displayName = \"SideNavHeader\";\n\nexport { MemoizedSideNavHeader as SideNavHeader };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAAQ,OAAO;AAG5B,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,SAEEC,iBAAiB,QACZ,mCAAmC;AAC1C,SACEC,cAAc,EACdC,qBAAqB,QAChB,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtC,MAAMC,sBAAsB,GAAGZ,MAAM,CAAC,KAAK,CAAC,CAAC;EAC3Ca,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,MAAM;EACfC,aAAa,EAAE,QAAQ;EACvBC,MAAM,EAAET;AACV,CAAC,CAAC;AAEF,MAAMU,oBAAoB,GAAGjB,MAAM,CAAC,KAAK,EAAE;EACzCkB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,uBAAuB,IAChCA,IAAI,KAAK,wBAAwB,IACjCA,IAAI,KAAK;AACb,CAAC,CAAC,CAKA,CAAC;EAAEC,qBAAqB;EAAEC,sBAAsB;EAAEC;AAAoB,CAAC,MAAM;EAC3ER,OAAO,EAAE,MAAM;EACfS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mBAAoB;MACzC,WAAQ,+BAA+B;MAAAsB,QAAA,EAEtCH,SAAS,GAERhC,IAAA,CAAAqC,SAAA;QAAUC,OAAO,EAAC,SAAS;QAACvB,MAAM,EAAE,EAAG;QAACQ,KAAK,EAAE;MAAG,CAAE,CAAC,GAErDvB,IAAA,CAACN,WAAW;QAAA,GAAKuC;MAAS,CAAG;IAC9B,CACmB,CAAC,EAEtBF,OAAO,IACN/B,IAAA,CAACyB,uBAAuB;MACtBC,iBAAiB,EAAEQ,cAAc,EAAEK,qBAAqB,EAAEC,SAAU;MACpE3B,mBAAmB,EAAEA,mBAAoB;MAAAsB,QAAA,EAEzCnC,IAAA,CAACL,QAAQ;QAAC8C,SAAS,EAAC,IAAI;QAAAN,QAAA,EACrBH,SAAS,GAAGhC,IAAA,CAAAqC,SAAA,IAAW,CAAC,GAAGN;MAAO,CAC3B;IAAC,CACY,CAC1B;EAAA,CACqB,CAAC;AAE7B,CAAC;AAED,MAAMW,qBAAqB,GAAGlD,IAAI,CAACsC,aAAa,CAAC;AACjDY,qBAAqB,CAACC,WAAW,GAAG,eAAe;AAEnD,SAASD,qBAAqB,IAAIZ,aAAa","ignoreList":[]}
@@ -215,6 +215,7 @@ const SideNavItemContent = ({
215
215
  odysseyDesignTokens: odysseyDesignTokens,
216
216
  sideNavContrastColors: uiShellContext?.sideNavContrastColors,
217
217
  isActiveDropTarget: false,
218
+ "data-se": "tb--sidenav-text-container",
218
219
  children: _jsx(SideNavItemLinkContent, {
219
220
  count: count,
220
221
  label: label,
@@ -235,6 +236,7 @@ const SideNavItemContent = ({
235
236
  sideNavContrastColors: uiShellContext?.sideNavContrastColors,
236
237
  tabIndex: 0,
237
238
  isActiveDropTarget: isActiveDropTarget,
239
+ "data-se": "tb--sidenav-text-container",
238
240
  children: _jsx(SideNavItemLinkContent, {
239
241
  count: count,
240
242
  label: label,
@@ -254,6 +256,7 @@ const SideNavItemContent = ({
254
256
  sideNavContrastColors: uiShellContext?.sideNavContrastColors,
255
257
  target: target,
256
258
  isActiveDropTarget: isActiveDropTarget,
259
+ "data-se": "tb--sidenav-text-container",
257
260
  children: [_jsx(SideNavItemLinkContent, {
258
261
  count: count,
259
262
  label: label,
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavItemContent.js","names":["styled","memo","useCallback","useImperativeHandle","useMemo","useRef","useState","useOdysseyDesignTokens","SideNavItemLinkContent","useSideNavItemContent","ExternalLinkIcon","useUiShellContext","jsx","_jsx","jsxs","_jsxs","StyledSideNavListItem","shouldForwardProp","prop","isSelected","odysseyDesignTokens","sideNavContrastColors","display","alignItems","backgroundColor","borderRadius","BorderRadiusMain","transition","TransitionDurationMain","color","fontColor","TypographyColorAction","itemSelectedBackgroundColor","HueBlue50","scrollToNode","node","scrollIntoView","behavior","block","inline","getBaseNavItemContentStyles","isDisabled","isActiveDropTarget","width","textDecoration","TypographyColorHeading","minHeight","paddingBlock","Spacing3","paddingInlineEnd","Spacing4","cursor","itemHoverBackgroundColor","HueNeutral50","fontWeight","TypographyWeightBodyBold","TypographyColorDisabled","itemDisabledFontColor","outline","boxShadow","focusRingColor","PalettePrimaryMain","getNavItemContentStyles","contextValue","paddingInlineStart","depth","Spacing6","isCompact","Spacing1","NavItemContentContainer","StyledNavItemLink","_Link","SideNavItemContent","count","id","label","href","target","startIcon","severity","statusLabel","endIcon","onClick","scrollRef","onItemSelected","translate","uiShellContext","sidenavItemContentContext","setIsActiveDropTarget","localScrollRef","current","itemClickHandler","event","sideNavItemContentKeyHandler","key","preventDefault","undefined","disabled","ref","onDragOver","onDragLeave","onDrop","children","onKeyDown","role","tabIndex","className","MemoizedSideNavItemContent","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavItemContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport {\n KeyboardEventHandler,\n memo,\n MouseEventHandler,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Link as NavItemLink } from \"@mui/material\";\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { SideNavItemLinkContent } from \"./SideNavItemLinkContent.js\";\nimport type { SideNavItem } from \"./types.js\";\nimport {\n SideNavItemContentContextValue,\n useSideNavItemContent,\n} from \"./SideNavItemContentContext.js\";\nimport { ExternalLinkIcon } from \"../../icons.generated/index.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\n\nexport const StyledSideNavListItem = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"isSelected\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavContrastColors\",\n})<{\n sideNavContrastColors?: UiShellColors[\"sideNavContrastColors\"];\n odysseyDesignTokens: DesignTokens;\n isSelected?: boolean;\n itemSelectedBackgroundColor?: string;\n disabled?: boolean;\n}>(({ isSelected, odysseyDesignTokens, sideNavContrastColors }) => ({\n display: \"flex\",\n alignItems: \"center\",\n backgroundColor: \"unset\",\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n\n ...(isSelected && {\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors.fontColor}`\n : `${odysseyDesignTokens.TypographyColorAction}`,\n backgroundColor:\n sideNavContrastColors?.itemSelectedBackgroundColor ||\n odysseyDesignTokens.HueBlue50,\n }),\n}));\n\nconst scrollToNode = (node: HTMLElement | null) => {\n if (node) {\n node?.scrollIntoView({\n behavior: \"instant\",\n block: \"center\",\n inline: \"nearest\",\n });\n }\n};\n\ntype ScrollIntoViewHandle = {\n scrollIntoView: () => void;\n};\n\nexport const getBaseNavItemContentStyles = ({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n}: {\n isSelected?: boolean;\n isDisabled?: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isActiveDropTarget: boolean;\n}) => ({\n display: \"flex\",\n alignItems: \"center\",\n width: \"100%\",\n textDecoration: \"none\",\n // !important needed here to override more specific base link styling\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors?.fontColor} !important`\n : `${odysseyDesignTokens.TypographyColorHeading} !important`,\n minHeight: \"unset\",\n paddingBlock: odysseyDesignTokens.Spacing3,\n paddingInlineEnd: odysseyDesignTokens.Spacing4,\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n cursor: \"pointer\",\n ...(isActiveDropTarget && {\n backgroundColor:\n sideNavContrastColors?.itemHoverBackgroundColor ||\n odysseyDesignTokens.HueNeutral50,\n }),\n\n // When hover or focus of the drag handle, apply general hover styles\n \"&:hover, li:has(> button:hover, > button:focus, > button:focus-visible) &\": {\n textDecoration: \"none\",\n backgroundColor:\n sideNavContrastColors?.itemHoverBackgroundColor ||\n odysseyDesignTokens.HueNeutral50,\n\n ...(isSelected && {\n backgroundColor:\n sideNavContrastColors?.itemSelectedBackgroundColor ||\n odysseyDesignTokens.HueBlue50,\n color:\n sideNavContrastColors?.fontColor ||\n odysseyDesignTokens.TypographyColorAction,\n }),\n\n ...(isDisabled && {\n backgroundColor: \"unset\",\n }),\n },\n\n ...(isSelected && {\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors?.fontColor} !important`\n : `${odysseyDesignTokens.TypographyColorAction} !important`,\n fontWeight: odysseyDesignTokens.TypographyWeightBodyBold,\n }),\n\n ...(isDisabled && {\n cursor: \"default\",\n color: `${odysseyDesignTokens.TypographyColorDisabled} !important`,\n\n ...(sideNavContrastColors?.itemDisabledFontColor && {\n color: `${sideNavContrastColors?.itemDisabledFontColor} !important`,\n }),\n }),\n\n \"&:focus-visible\": {\n outline: \"none\",\n boxShadow: `inset 0 0 0 2px ${sideNavContrastColors?.focusRingColor || odysseyDesignTokens.PalettePrimaryMain}`,\n },\n});\n\nexport const getNavItemContentStyles = ({\n odysseyDesignTokens,\n contextValue,\n}: {\n odysseyDesignTokens: DesignTokens;\n contextValue: SideNavItemContentContextValue;\n}) => ({\n paddingInlineStart: `calc(${odysseyDesignTokens.Spacing4} * ${contextValue.depth} + ${odysseyDesignTokens.Spacing6})`,\n\n ...(contextValue.depth === 1 && {\n paddingInlineStart: odysseyDesignTokens.Spacing4,\n }),\n\n ...(contextValue.isCompact && {\n paddingBlock: odysseyDesignTokens.Spacing1,\n }),\n});\n\nconst NavItemContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop != \"contextValue\" &&\n prop !== \"isDisabled\" &&\n prop !== \"sideNavContrastColors\" &&\n prop !== \"isSelected\" &&\n prop !== \"isActiveDropTarget\",\n})<{\n contextValue: SideNavItemContentContextValue;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isSelected?: boolean;\n isDisabled?: boolean;\n isActiveDropTarget: boolean;\n}>(\n ({\n isDisabled,\n isSelected,\n contextValue,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }) => ({\n ...getBaseNavItemContentStyles({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }),\n\n ...getNavItemContentStyles({\n odysseyDesignTokens,\n contextValue,\n }),\n }),\n);\n\nconst StyledNavItemLink = styled(NavItemLink, {\n shouldForwardProp: (prop) =>\n prop != \"contextValue\" &&\n prop !== \"isDisabled\" &&\n prop !== \"isSelected\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavContrastColors\" &&\n prop !== \"isActiveDropTarget\",\n})<{\n contextValue: SideNavItemContentContextValue;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isSelected?: boolean;\n isDisabled?: boolean;\n isActiveDropTarget: boolean;\n}>(\n ({\n isDisabled,\n isSelected,\n contextValue,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }) => ({\n ...getBaseNavItemContentStyles({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }),\n\n ...getNavItemContentStyles({\n odysseyDesignTokens,\n contextValue,\n }),\n }),\n);\n\nconst SideNavItemContent = ({\n count,\n id,\n label,\n href,\n target,\n startIcon,\n severity,\n statusLabel,\n endIcon,\n onClick,\n isDisabled,\n isSelected,\n scrollRef,\n onItemSelected,\n translate,\n}: Pick<\n SideNavItem,\n | \"count\"\n | \"id\"\n | \"label\"\n | \"href\"\n | \"target\"\n | \"startIcon\"\n | \"severity\"\n | \"statusLabel\"\n | \"endIcon\"\n | \"onClick\"\n | \"isDisabled\"\n | \"isSelected\"\n | \"translate\"\n> & {\n /**\n * The ref used to scroll to this item\n */\n scrollRef?: React.RefObject<ScrollIntoViewHandle>;\n onItemSelected?: (selectedItemId: string) => void;\n}) => {\n const uiShellContext = useUiShellContext();\n const sidenavItemContentContext = useSideNavItemContent();\n const contextValue = useMemo(\n () => sidenavItemContentContext,\n [sidenavItemContentContext],\n );\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const [isActiveDropTarget, setIsActiveDropTarget] = useState(false);\n\n const localScrollRef = useRef<HTMLLIElement>(null);\n useImperativeHandle(scrollRef, () => {\n return {\n scrollIntoView: () => {\n scrollToNode(localScrollRef.current);\n },\n };\n }, []);\n\n const itemClickHandler = useCallback<\n MouseEventHandler<HTMLDivElement | HTMLAnchorElement>\n >(\n (event) => {\n onItemSelected?.(id);\n onClick?.(event);\n },\n [id, onClick, onItemSelected],\n );\n\n const sideNavItemContentKeyHandler = useCallback<\n KeyboardEventHandler<HTMLDivElement>\n >(\n (event) => {\n if (event?.key === \"Enter\") {\n event.preventDefault();\n onItemSelected?.(id);\n onClick?.(event);\n }\n },\n [id, onClick, onItemSelected],\n );\n\n return (\n <StyledSideNavListItem\n aria-disabled={isDisabled}\n aria-current={isSelected ? \"page\" : undefined}\n disabled={isDisabled}\n id={id}\n isSelected={isSelected}\n key={id}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={localScrollRef}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n onDragOver={() => {\n setIsActiveDropTarget(true);\n }}\n onDragLeave={() => {\n setIsActiveDropTarget(false);\n }}\n onDrop={() => {\n setIsActiveDropTarget(false);\n }}\n >\n {\n // Use Link for nav items with links and div for disabled or non-link items\n isDisabled ? (\n <NavItemContentContainer\n contextValue={contextValue}\n isDisabled={isDisabled}\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n isActiveDropTarget={false}\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n </NavItemContentContainer>\n ) : !href ? (\n <NavItemContentContainer\n contextValue={contextValue}\n isDisabled={isDisabled}\n isSelected={isSelected}\n onClick={itemClickHandler}\n onKeyDown={sideNavItemContentKeyHandler}\n odysseyDesignTokens={odysseyDesignTokens}\n role=\"button\"\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n tabIndex={0}\n isActiveDropTarget={isActiveDropTarget}\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n </NavItemContentContainer>\n ) : (\n <StyledNavItemLink\n contextValue={contextValue}\n href={href}\n isDisabled={isDisabled}\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={itemClickHandler}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n target={target}\n isActiveDropTarget={isActiveDropTarget}\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </StyledNavItemLink>\n )\n }\n </StyledSideNavListItem>\n );\n};\n\nconst MemoizedSideNavItemContent = memo(SideNavItemContent);\nMemoizedSideNavItemContent.displayName = \"SideNavItemContent\";\n\nexport { MemoizedSideNavItemContent as SideNavItemContent };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAEEC,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAASC,sBAAsB,QAAQ,6BAA6B;AAEpE,SAEEC,qBAAqB,QAChB,gCAAgC;AACvC,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAEEC,iBAAiB,QACZ,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,OAAO,MAAMC,qBAAqB,GAAGhB,MAAM,CAAC,IAAI,EAAE;EAChDiB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,YAAY,IACrBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK;AACb,CAAC,CAAC,CAMC,CAAC;EAAEC,UAAU;EAAEC,mBAAmB;EAAEC;AAAsB,CAAC,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DR,MAAM,KAAK,QAAQ,IAClBhE,IAAA;QAAM6F,SAAS,EAAC,gBAAgB;QAACF,IAAI,EAAC,cAAc;QAAAF,QAAA,EAClDzF,IAAA,CAACH,gBAAgB,IAAE;MAAC,CAChB,CACP;IAAA,CACgB;EACpB,GArFEgE,EAuFgB,CAAC;AAE5B,CAAC;AAED,MAAMiC,0BAA0B,GAAG1G,IAAI,CAACuE,kBAAkB,CAAC;AAC3DmC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAInC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"SideNavItemContent.js","names":["styled","memo","useCallback","useImperativeHandle","useMemo","useRef","useState","useOdysseyDesignTokens","SideNavItemLinkContent","useSideNavItemContent","ExternalLinkIcon","useUiShellContext","jsx","_jsx","jsxs","_jsxs","StyledSideNavListItem","shouldForwardProp","prop","isSelected","odysseyDesignTokens","sideNavContrastColors","display","alignItems","backgroundColor","borderRadius","BorderRadiusMain","transition","TransitionDurationMain","color","fontColor","TypographyColorAction","itemSelectedBackgroundColor","HueBlue50","scrollToNode","node","scrollIntoView","behavior","block","inline","getBaseNavItemContentStyles","isDisabled","isActiveDropTarget","width","textDecoration","TypographyColorHeading","minHeight","paddingBlock","Spacing3","paddingInlineEnd","Spacing4","cursor","itemHoverBackgroundColor","HueNeutral50","fontWeight","TypographyWeightBodyBold","TypographyColorDisabled","itemDisabledFontColor","outline","boxShadow","focusRingColor","PalettePrimaryMain","getNavItemContentStyles","contextValue","paddingInlineStart","depth","Spacing6","isCompact","Spacing1","NavItemContentContainer","StyledNavItemLink","_Link","SideNavItemContent","count","id","label","href","target","startIcon","severity","statusLabel","endIcon","onClick","scrollRef","onItemSelected","translate","uiShellContext","sidenavItemContentContext","setIsActiveDropTarget","localScrollRef","current","itemClickHandler","event","sideNavItemContentKeyHandler","key","preventDefault","undefined","disabled","ref","onDragOver","onDragLeave","onDrop","children","onKeyDown","role","tabIndex","className","MemoizedSideNavItemContent","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavItemContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport {\n KeyboardEventHandler,\n memo,\n MouseEventHandler,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Link as NavItemLink } from \"@mui/material\";\nimport {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { SideNavItemLinkContent } from \"./SideNavItemLinkContent.js\";\nimport type { SideNavItem } from \"./types.js\";\nimport {\n SideNavItemContentContextValue,\n useSideNavItemContent,\n} from \"./SideNavItemContentContext.js\";\nimport { ExternalLinkIcon } from \"../../icons.generated/index.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\n\nexport const StyledSideNavListItem = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"isSelected\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavContrastColors\",\n})<{\n sideNavContrastColors?: UiShellColors[\"sideNavContrastColors\"];\n odysseyDesignTokens: DesignTokens;\n isSelected?: boolean;\n itemSelectedBackgroundColor?: string;\n disabled?: boolean;\n}>(({ isSelected, odysseyDesignTokens, sideNavContrastColors }) => ({\n display: \"flex\",\n alignItems: \"center\",\n backgroundColor: \"unset\",\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n\n ...(isSelected && {\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors.fontColor}`\n : `${odysseyDesignTokens.TypographyColorAction}`,\n backgroundColor:\n sideNavContrastColors?.itemSelectedBackgroundColor ||\n odysseyDesignTokens.HueBlue50,\n }),\n}));\n\nconst scrollToNode = (node: HTMLElement | null) => {\n if (node) {\n node?.scrollIntoView({\n behavior: \"instant\",\n block: \"center\",\n inline: \"nearest\",\n });\n }\n};\n\ntype ScrollIntoViewHandle = {\n scrollIntoView: () => void;\n};\n\nexport const getBaseNavItemContentStyles = ({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n}: {\n isSelected?: boolean;\n isDisabled?: boolean;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isActiveDropTarget: boolean;\n}) => ({\n display: \"flex\",\n alignItems: \"center\",\n width: \"100%\",\n textDecoration: \"none\",\n // !important needed here to override more specific base link styling\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors?.fontColor} !important`\n : `${odysseyDesignTokens.TypographyColorHeading} !important`,\n minHeight: \"unset\",\n paddingBlock: odysseyDesignTokens.Spacing3,\n paddingInlineEnd: odysseyDesignTokens.Spacing4,\n borderRadius: odysseyDesignTokens.BorderRadiusMain,\n transition: `backgroundColor ${odysseyDesignTokens.TransitionDurationMain}, color ${odysseyDesignTokens.TransitionDurationMain}`,\n cursor: \"pointer\",\n ...(isActiveDropTarget && {\n backgroundColor:\n sideNavContrastColors?.itemHoverBackgroundColor ||\n odysseyDesignTokens.HueNeutral50,\n }),\n\n // When hover or focus of the drag handle, apply general hover styles\n \"&:hover, li:has(> button:hover, > button:focus, > button:focus-visible) &\": {\n textDecoration: \"none\",\n backgroundColor:\n sideNavContrastColors?.itemHoverBackgroundColor ||\n odysseyDesignTokens.HueNeutral50,\n\n ...(isSelected && {\n backgroundColor:\n sideNavContrastColors?.itemSelectedBackgroundColor ||\n odysseyDesignTokens.HueBlue50,\n color:\n sideNavContrastColors?.fontColor ||\n odysseyDesignTokens.TypographyColorAction,\n }),\n\n ...(isDisabled && {\n backgroundColor: \"unset\",\n }),\n },\n\n ...(isSelected && {\n color: sideNavContrastColors?.fontColor\n ? `${sideNavContrastColors?.fontColor} !important`\n : `${odysseyDesignTokens.TypographyColorAction} !important`,\n fontWeight: odysseyDesignTokens.TypographyWeightBodyBold,\n }),\n\n ...(isDisabled && {\n cursor: \"default\",\n color: `${odysseyDesignTokens.TypographyColorDisabled} !important`,\n\n ...(sideNavContrastColors?.itemDisabledFontColor && {\n color: `${sideNavContrastColors?.itemDisabledFontColor} !important`,\n }),\n }),\n\n \"&:focus-visible\": {\n outline: \"none\",\n boxShadow: `inset 0 0 0 2px ${sideNavContrastColors?.focusRingColor || odysseyDesignTokens.PalettePrimaryMain}`,\n },\n});\n\nexport const getNavItemContentStyles = ({\n odysseyDesignTokens,\n contextValue,\n}: {\n odysseyDesignTokens: DesignTokens;\n contextValue: SideNavItemContentContextValue;\n}) => ({\n paddingInlineStart: `calc(${odysseyDesignTokens.Spacing4} * ${contextValue.depth} + ${odysseyDesignTokens.Spacing6})`,\n\n ...(contextValue.depth === 1 && {\n paddingInlineStart: odysseyDesignTokens.Spacing4,\n }),\n\n ...(contextValue.isCompact && {\n paddingBlock: odysseyDesignTokens.Spacing1,\n }),\n});\n\nconst NavItemContentContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop != \"contextValue\" &&\n prop !== \"isDisabled\" &&\n prop !== \"sideNavContrastColors\" &&\n prop !== \"isSelected\" &&\n prop !== \"isActiveDropTarget\",\n})<{\n contextValue: SideNavItemContentContextValue;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isSelected?: boolean;\n isDisabled?: boolean;\n isActiveDropTarget: boolean;\n}>(\n ({\n isDisabled,\n isSelected,\n contextValue,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }) => ({\n ...getBaseNavItemContentStyles({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }),\n\n ...getNavItemContentStyles({\n odysseyDesignTokens,\n contextValue,\n }),\n }),\n);\n\nconst StyledNavItemLink = styled(NavItemLink, {\n shouldForwardProp: (prop) =>\n prop != \"contextValue\" &&\n prop !== \"isDisabled\" &&\n prop !== \"isSelected\" &&\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"sideNavContrastColors\" &&\n prop !== \"isActiveDropTarget\",\n})<{\n contextValue: SideNavItemContentContextValue;\n odysseyDesignTokens: DesignTokens;\n sideNavContrastColors: UiShellColors[\"sideNavContrastColors\"];\n isSelected?: boolean;\n isDisabled?: boolean;\n isActiveDropTarget: boolean;\n}>(\n ({\n isDisabled,\n isSelected,\n contextValue,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }) => ({\n ...getBaseNavItemContentStyles({\n isDisabled,\n isSelected,\n odysseyDesignTokens,\n sideNavContrastColors,\n isActiveDropTarget,\n }),\n\n ...getNavItemContentStyles({\n odysseyDesignTokens,\n contextValue,\n }),\n }),\n);\n\nconst SideNavItemContent = ({\n count,\n id,\n label,\n href,\n target,\n startIcon,\n severity,\n statusLabel,\n endIcon,\n onClick,\n isDisabled,\n isSelected,\n scrollRef,\n onItemSelected,\n translate,\n}: Pick<\n SideNavItem,\n | \"count\"\n | \"id\"\n | \"label\"\n | \"href\"\n | \"target\"\n | \"startIcon\"\n | \"severity\"\n | \"statusLabel\"\n | \"endIcon\"\n | \"onClick\"\n | \"isDisabled\"\n | \"isSelected\"\n | \"translate\"\n> & {\n /**\n * The ref used to scroll to this item\n */\n scrollRef?: React.RefObject<ScrollIntoViewHandle>;\n onItemSelected?: (selectedItemId: string) => void;\n}) => {\n const uiShellContext = useUiShellContext();\n const sidenavItemContentContext = useSideNavItemContent();\n const contextValue = useMemo(\n () => sidenavItemContentContext,\n [sidenavItemContentContext],\n );\n\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const [isActiveDropTarget, setIsActiveDropTarget] = useState(false);\n\n const localScrollRef = useRef<HTMLLIElement>(null);\n useImperativeHandle(scrollRef, () => {\n return {\n scrollIntoView: () => {\n scrollToNode(localScrollRef.current);\n },\n };\n }, []);\n\n const itemClickHandler = useCallback<\n MouseEventHandler<HTMLDivElement | HTMLAnchorElement>\n >(\n (event) => {\n onItemSelected?.(id);\n onClick?.(event);\n },\n [id, onClick, onItemSelected],\n );\n\n const sideNavItemContentKeyHandler = useCallback<\n KeyboardEventHandler<HTMLDivElement>\n >(\n (event) => {\n if (event?.key === \"Enter\") {\n event.preventDefault();\n onItemSelected?.(id);\n onClick?.(event);\n }\n },\n [id, onClick, onItemSelected],\n );\n\n return (\n <StyledSideNavListItem\n aria-disabled={isDisabled}\n aria-current={isSelected ? \"page\" : undefined}\n disabled={isDisabled}\n id={id}\n isSelected={isSelected}\n key={id}\n odysseyDesignTokens={odysseyDesignTokens}\n ref={localScrollRef}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n onDragOver={() => {\n setIsActiveDropTarget(true);\n }}\n onDragLeave={() => {\n setIsActiveDropTarget(false);\n }}\n onDrop={() => {\n setIsActiveDropTarget(false);\n }}\n >\n {\n // Use Link for nav items with links and div for disabled or non-link items\n isDisabled ? (\n <NavItemContentContainer\n contextValue={contextValue}\n isDisabled={isDisabled}\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n isActiveDropTarget={false}\n data-se=\"tb--sidenav-text-container\"\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n </NavItemContentContainer>\n ) : !href ? (\n <NavItemContentContainer\n contextValue={contextValue}\n isDisabled={isDisabled}\n isSelected={isSelected}\n onClick={itemClickHandler}\n onKeyDown={sideNavItemContentKeyHandler}\n odysseyDesignTokens={odysseyDesignTokens}\n role=\"button\"\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n tabIndex={0}\n isActiveDropTarget={isActiveDropTarget}\n data-se=\"tb--sidenav-text-container\"\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n </NavItemContentContainer>\n ) : (\n <StyledNavItemLink\n contextValue={contextValue}\n href={href}\n isDisabled={isDisabled}\n isSelected={isSelected}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={itemClickHandler}\n sideNavContrastColors={uiShellContext?.sideNavContrastColors}\n target={target}\n isActiveDropTarget={isActiveDropTarget}\n data-se=\"tb--sidenav-text-container\"\n >\n <SideNavItemLinkContent\n count={count}\n label={label}\n startIcon={startIcon}\n endIcon={endIcon}\n statusLabel={statusLabel}\n severity={severity}\n translate={translate}\n />\n {target === \"_blank\" && (\n <span className=\"Link-indicator\" role=\"presentation\">\n <ExternalLinkIcon />\n </span>\n )}\n </StyledNavItemLink>\n )\n }\n </StyledSideNavListItem>\n );\n};\n\nconst MemoizedSideNavItemContent = memo(SideNavItemContent);\nMemoizedSideNavItemContent.displayName = \"SideNavItemContent\";\n\nexport { MemoizedSideNavItemContent as SideNavItemContent };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAEEC,IAAI,EAEJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AAEd,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAASC,sBAAsB,QAAQ,6BAA6B;AAEpE,SAEEC,qBAAqB,QAChB,gCAAgC;AACvC,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAEEC,iBAAiB,QACZ,mCAAmC;AA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BAAqB,EAAEiE,cAAc,EAAEjE,qBAAsB;MAC7DwD,MAAM,EAAEA,MAAO;MACfnC,kBAAkB,EAAEA,kBAAmB;MACvC,WAAQ,4BAA4B;MAAA4D,QAAA,GAEpCzF,IAAA,CAACL,sBAAsB;QACrBiE,KAAK,EAAEA,KAAM;QACbE,KAAK,EAAEA,KAAM;QACbG,SAAS,EAAEA,SAAU;QACrBG,OAAO,EAAEA,OAAQ;QACjBD,WAAW,EAAEA,WAAY;QACzBD,QAAQ,EAAEA,QAAS;QACnBM,SAAS,EAAEA;MAAU,CACtB,CAAC,EACDR,MAAM,KAAK,QAAQ,IAClBhE,IAAA;QAAM6F,SAAS,EAAC,gBAAgB;QAACF,IAAI,EAAC,cAAc;QAAAF,QAAA,EAClDzF,IAAA,CAACH,gBAAgB,IAAE;MAAC,CAChB,CACP;IAAA,CACgB;EACpB,GAxFEgE,EA0FgB,CAAC;AAE5B,CAAC;AAED,MAAMiC,0BAA0B,GAAG1G,IAAI,CAACuE,kBAAkB,CAAC;AAC3DmC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAInC,kBAAkB","ignoreList":[]}
@@ -19,22 +19,22 @@ const StyledLogoContainer = styled("div", {
19
19
  })(({
20
20
  isLogoInteractive
21
21
  }) => ({
22
- display: "flex",
23
22
  alignItems: "center",
23
+ display: "flex",
24
24
  height: "100%",
25
25
  ...(isLogoInteractive && {
26
26
  cursor: "pointer"
27
27
  })
28
28
  }));
29
29
  const StyledLogoLink = styled("a")(() => ({
30
- display: "flex",
31
30
  alignItems: "center",
31
+ display: "flex",
32
32
  height: "100%"
33
33
  }));
34
34
  const SideNavLogo = ({
35
35
  imageAltText,
36
- logoComponent,
37
36
  imageUrl,
37
+ logoComponent,
38
38
  ...optionalProps
39
39
  }) => {
40
40
  const logo = useMemo(() => {
@@ -56,11 +56,11 @@ const SideNavLogo = ({
56
56
  onClick: optionalProps.onClick,
57
57
  children: logo
58
58
  }) : _jsx(StyledLogoContainer, {
59
- role: "presentation",
60
59
  "aria-label": optionalProps.ariaLabel,
61
60
  "data-se": "sidenav-header-logo",
62
- onClick: optionalProps.onClick,
63
61
  isLogoInteractive: Boolean(optionalProps.onClick) || optionalProps.href,
62
+ onClick: optionalProps.onClick,
63
+ role: "presentation",
64
64
  children: logo
65
65
  });
66
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavLogo.js","names":["memo","useMemo","styled","OktaLogo","jsx","_jsx","StyledLogoContainer","shouldForwardProp","prop","isLogoInteractive","display","alignItems","height","cursor","StyledLogoLink","SideNavLogo","imageAltText","logoComponent","imageUrl","optionalProps","logo","src","alt","ariaLabel","href","onClick","children","role","Boolean","MemoizedSideNavLogo","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavLogo.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport { OktaLogo } from \"./OktaLogo.js\";\nimport { SideNavLogoProps } from \"./types.js\";\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isLogoInteractive\",\n})<{\n isLogoInteractive?: boolean;\n}>(({ isLogoInteractive }) => ({\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n ...(isLogoInteractive && {\n cursor: \"pointer\",\n }),\n}));\n\nconst StyledLogoLink = styled(\"a\")(() => ({\n display: \"flex\",\n alignItems: \"center\",\n height: \"100%\",\n}));\n\nconst SideNavLogo = ({\n imageAltText,\n logoComponent,\n imageUrl,\n ...optionalProps\n}: SideNavLogoProps) => {\n const logo = useMemo(() => {\n if (logoComponent) {\n return logoComponent;\n }\n\n if (imageAltText && imageUrl) {\n return <img src={imageUrl} alt={imageAltText} />;\n }\n\n return <OktaLogo />;\n }, [imageAltText, logoComponent, imageUrl]);\n\n return \"href\" in optionalProps && \"ariaLabel\" in optionalProps ? (\n <StyledLogoLink\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n href={optionalProps.href}\n onClick={optionalProps.onClick}\n >\n {logo}\n </StyledLogoLink>\n ) : (\n <StyledLogoContainer\n role=\"presentation\"\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n onClick={optionalProps.onClick}\n isLogoInteractive={Boolean(optionalProps.onClick) || optionalProps.href}\n >\n {logo}\n </StyledLogoContainer>\n );\n};\n\nconst MemoizedSideNavLogo = memo(SideNavLogo);\nMemoizedSideNavLogo.displayName = \"SideNavLogo\";\n\nexport { MemoizedSideNavLogo as SideNavLogo };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SAASC,QAAQ,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGzC,MAAMC,mBAAmB,GAAGJ,MAAM,CAAC,KAAK,EAAE;EACxCK,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAkB,CAAC,MAAM;EAC7BC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,QAAQ;EACpBC,MAAM,EAAE,MAAM;EACd,IAAIH,iBAAiB,IAAI;IACvBI,MAAM,EAAE;EACV,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,MAAMC,cAAc,GAAGZ,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO;EACxCQ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Logo.js","names":["memo","useMemo","styled","OktaLogo","jsx","_jsx","StyledLogoContainer","shouldForwardProp","prop","isLogoInteractive","alignItems","display","height","cursor","StyledLogoLink","SideNavLogo","imageAltText","imageUrl","logoComponent","optionalProps","logo","src","alt","ariaLabel","href","onClick","children","Boolean","role","MemoizedSideNavLogo","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavLogo.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\n\nimport { OktaLogo } from \"./OktaLogo.js\";\nimport { SideNavLogoProps } from \"./types.js\";\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isLogoInteractive\",\n})<{\n isLogoInteractive?: boolean;\n}>(({ isLogoInteractive }) => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n\n ...(isLogoInteractive && {\n cursor: \"pointer\",\n }),\n}));\n\nconst StyledLogoLink = styled(\"a\")(() => ({\n alignItems: \"center\",\n display: \"flex\",\n height: \"100%\",\n}));\n\nconst SideNavLogo = ({\n imageAltText,\n imageUrl,\n logoComponent,\n ...optionalProps\n}: SideNavLogoProps) => {\n const logo = useMemo(() => {\n if (logoComponent) {\n return logoComponent;\n }\n\n if (imageAltText && imageUrl) {\n return <img src={imageUrl} alt={imageAltText} />;\n }\n\n return <OktaLogo />;\n }, [imageAltText, logoComponent, imageUrl]);\n\n return \"href\" in optionalProps && \"ariaLabel\" in optionalProps ? (\n <StyledLogoLink\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n href={optionalProps.href}\n onClick={optionalProps.onClick}\n >\n {logo}\n </StyledLogoLink>\n ) : (\n <StyledLogoContainer\n aria-label={optionalProps.ariaLabel}\n data-se=\"sidenav-header-logo\"\n isLogoInteractive={Boolean(optionalProps.onClick) || optionalProps.href}\n onClick={optionalProps.onClick}\n role=\"presentation\"\n >\n {logo}\n </StyledLogoContainer>\n );\n};\n\nconst MemoizedSideNavLogo = memo(SideNavLogo);\nMemoizedSideNavLogo.displayName = \"SideNavLogo\";\n\nexport { MemoizedSideNavLogo as SideNavLogo };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SAASC,QAAQ,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGzC,MAAMC,mBAAmB,GAAGJ,MAAM,CAAC,KAAK,EAAE;EACxCK,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAkB,CAAC,MAAM;EAC7BC,UAAU,EAAE,QAAQ;EACpBC,OAAO,EAAE,MAAM;EACfC,MAAM,EAAE,MAAM;EAEd,IAAIH,iBAAiB,IAAI;IACvBI,MAAM,EAAE;EACV,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,MAAMC,cAAc,GAAGZ,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO;EACxCQ,UAAU,EAAE,QAAQ;EACpBC,OAAO,EAAE,MAAM;EACfC,MAAM,EAAE;AACV,CAAC,CAAC,CAAC;AAEH,MAAMG,WAAW,GAAGA,CAAC;EACnBC,YAAY;EACZC,QAAQ;EACRC,aAAa;EACb,GAAGC;AACa,CAAC,KAAK;EACtB,MAAMC,IAAI,GAAGnB,OAAO,CAAC,MAAM;IACzB,IAAIiB,aAAa,EAAE;MACjB,OAAOA,aAAa;IACtB;IAEA,IAAIF,YAAY,IAAIC,QAAQ,EAAE;MAC5B,OAAOZ,IAAA;QAAKgB,GAAG,EAAEJ,QAAS;QAACK,GAAG,EAAEN;MAAa,CAAE,CAAC;IAClD;IAEA,OAAOX,IAAA,CAACF,QAAQ,IAAE,CAAC;EACrB,CAAC,EAAE,CAACa,YAAY,EAAEE,aAAa,EAAED,QAAQ,CAAC,CAAC;EAE3C,OAAO,MAAM,IAAIE,aAAa,IAAI,WAAW,IAAIA,aAAa,GAC5Dd,IAAA,CAACS,cAAc;IACb,cAAYK,aAAa,CAACI,SAAU;IACpC,WAAQ,qBAAqB;IAC7BC,IAAI,EAAEL,aAAa,CAACK,IAAK;IACzBC,OAAO,EAAEN,aAAa,CAACM,OAAQ;IAAAC,QAAA,EAE9BN;EAAI,CACS,CAAC,GAEjBf,IAAA,CAACC,mBAAmB;IAClB,cAAYa,aAAa,CAACI,SAAU;IACpC,WAAQ,qBAAqB;IAC7Bd,iBAAiB,EAAEkB,OAAO,CAACR,aAAa,CAACM,OAAO,CAAC,IAAIN,aAAa,CAACK,IAAK;IACxEC,OAAO,EAAEN,aAAa,CAACM,OAAQ;IAC/BG,IAAI,EAAC,cAAc;IAAAF,QAAA,EAElBN;EAAI,CACc,CACtB;AACH,CAAC;AAED,MAAMS,mBAAmB,GAAG7B,IAAI,CAACe,WAAW,CAAC;AAC7Cc,mBAAmB,CAACC,WAAW,GAAG,aAAa;AAE/C,SAASD,mBAAmB,IAAId,WAAW","ignoreList":[]}
@@ -18,6 +18,7 @@ import { MuiPropsContext } from "../../MuiPropsContext.js";
18
18
  import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
19
19
  import { Tooltip } from "../../Tooltip.js";
20
20
  import { useUiShellContext } from "../../ui-shell/UiShellProvider.js";
21
+ import { UI_SHELL_OVERLAY_Z_INDEX } from "../uiShellSharedConstants.js";
21
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
23
  const StyledToggleButton = styled(_Button, {
23
24
  shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "isSideNavCollapsed" && prop !== "toggleContrastColors"
@@ -31,7 +32,7 @@ const StyledToggleButton = styled(_Button, {
31
32
  width: odysseyDesignTokens.Spacing6,
32
33
  height: odysseyDesignTokens.Spacing6,
33
34
  border: 0,
34
- zIndex: 200,
35
+ zIndex: UI_SHELL_OVERLAY_Z_INDEX,
35
36
  "&:focus-visible": {
36
37
  boxShadow: `inset 0 0 0 2px ${odysseyDesignTokens.PalettePrimaryMain}`,
37
38
  outline: "none"
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavToggleButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","styled","useTranslation","generateContrastColors","MuiPropsContext","useOdysseyDesignTokens","Tooltip","useUiShellContext","jsx","_jsx","jsxs","_jsxs","StyledToggleButton","_Button","shouldForwardProp","prop","isSideNavCollapsed","odysseyDesignTokens","toggleContrastColors","backgroundColor","position","width","Spacing6","height","border","zIndex","boxShadow","PalettePrimaryMain","outline","animation","TransitionDurationMain","animationFillMode","transform","span","top","left","Spacing4","HueNeutral600","transition","fontColor","SideNavToggleButton","ariaControls","buttonRef","id","onClick","tabIndex","t","uiShellContext","localButtonRef","hasNonStandardAppBackgroundColor","appBackgroundColor","HueNeutralWhite","HueNeutral50","undefined","focus","current","toggleLabel","renderButton","muiProps","ref","element","variant","children","ariaType","placement","text","Consumer","MemoizedSideNavToggleButton","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavToggleButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n ContrastColors,\n generateContrastColors,\n} from \"../../createContrastColors.js\";\nimport { FocusHandle } from \"../../inputUtils.js\";\nimport { MuiPropsContext, MuiPropsContextType } from \"../../MuiPropsContext.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { Tooltip } from \"../../Tooltip.js\";\nimport { useUiShellContext } from \"../../ui-shell/UiShellProvider.js\";\n\nconst StyledToggleButton = styled(MuiButton, {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"toggleContrastColors\",\n})<{\n isSideNavCollapsed: boolean;\n odysseyDesignTokens: DesignTokens;\n toggleContrastColors?: ContrastColors;\n}>(({ isSideNavCollapsed, odysseyDesignTokens, toggleContrastColors }) => ({\n backgroundColor: \"transparent\",\n position: \"relative\",\n width: odysseyDesignTokens.Spacing6,\n height: odysseyDesignTokens.Spacing6,\n border: 0,\n zIndex: 200,\n\n \"&:focus-visible\": {\n boxShadow: `inset 0 0 0 2px ${odysseyDesignTokens.PalettePrimaryMain}`,\n outline: \"none\",\n },\n\n \"&:hover, &:focus-visible\": {\n backgroundColor: \"transparent\",\n\n \"#lineOne\": {\n animation: `lineOne-animate-to-collapse ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineOne-animate-to-collapse\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(-90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -27%, 0) rotate(-45deg) scaleY(.75)\",\n },\n },\n },\n\n \"#lineTwo\": {\n animation: `lineTwo-animate-to-collapse ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineTwo-animate-to-collapse\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(-90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -73%, 0) rotate(-135deg) scaleY(.75)\",\n },\n },\n },\n\n ...(isSideNavCollapsed && {\n \"#lineOne\": {\n animation: `lineOne-animate-to-expand ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineOne-animate-to-expand\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -73%, 0) rotate(135deg) scaleY(.75)\",\n },\n },\n },\n\n \"#lineTwo\": {\n animation: `lineTwo-animate-to-expand ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineTwo-animate-to-expand\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -27%, 0) rotate(45deg) scaleY(.75)\",\n },\n },\n },\n }),\n },\n\n span: {\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n width: \"2px\",\n height: odysseyDesignTokens.Spacing4,\n backgroundColor: odysseyDesignTokens.HueNeutral600,\n transform: \"translate3d(-50%, -50%, 0)\",\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n\n ...(toggleContrastColors?.fontColor && {\n backgroundColor: toggleContrastColors.fontColor,\n }),\n },\n}));\n\nexport type SideNavToggleButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: React.RefObject<FocusHandle>;\n /**\n * The `id` of the item this button controls\n */\n ariaControls: string;\n /**\n * The ID of the Button\n */\n id?: string;\n isSideNavCollapsed: boolean;\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n onKeyDown?: MuiButtonProps[\"onKeyDown\"];\n};\n\nconst SideNavToggleButton = ({\n ariaControls,\n buttonRef,\n id,\n isSideNavCollapsed,\n onClick,\n tabIndex,\n}: SideNavToggleButtonProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n const uiShellContext = useUiShellContext();\n\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n\n const toggleContrastColors = useMemo(() => {\n const hasNonStandardAppBackgroundColor =\n uiShellContext?.appBackgroundColor &&\n uiShellContext?.appBackgroundColor !==\n odysseyDesignTokens.HueNeutralWhite &&\n uiShellContext?.appBackgroundColor !== odysseyDesignTokens.HueNeutral50;\n\n if (hasNonStandardAppBackgroundColor) {\n return generateContrastColors(\n uiShellContext.appBackgroundColor,\n odysseyDesignTokens,\n );\n }\n\n return undefined;\n }, [odysseyDesignTokens, uiShellContext]);\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const toggleLabel = useMemo(\n () =>\n isSideNavCollapsed\n ? t(\"sidenav.toggle.expand\")\n : t(\"sidenav.toggle.collapse\"),\n [isSideNavCollapsed, t],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <StyledToggleButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-expanded={!isSideNavCollapsed}\n aria-label={toggleLabel}\n data-se=\"sidenav-toggle-button\"\n data-sidenav-toggle={true}\n id={id}\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={onClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<HTMLButtonElement>\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 tabIndex={tabIndex}\n toggleContrastColors={toggleContrastColors}\n variant=\"floating\"\n >\n <span id=\"lineOne\" />\n <span id=\"lineTwo\" />\n </StyledToggleButton>\n );\n },\n [\n ariaControls,\n id,\n isSideNavCollapsed,\n odysseyDesignTokens,\n onClick,\n tabIndex,\n toggleContrastColors,\n toggleLabel,\n ],\n );\n\n return (\n <Tooltip ariaType=\"description\" placement=\"right\" text={toggleLabel}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n};\n\nconst MemoizedSideNavToggleButton = memo(SideNavToggleButton);\nMemoizedSideNavToggleButton.displayName = \"SideNavToggleButton\";\n\nexport { MemoizedSideNavToggleButton as SideNavToggleButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA,SAEEA,IAAI,EACJC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,OAAO;AACd,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,cAAc,QAAQ,eAAe;AAE9C,SAEEC,sBAAsB,QACjB,+BAA+B;AAEtC,SAASC,eAAe,QAA6B,0BAA0B;AAC/E,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,iBAAiB,QAAQ,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtE,MAAMC,kBAAkB,GAAGX,MAAM,CAAAY,OAAA,EAAY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EAAEA,QAAS;MACnB3B,oBAAoB,EAAEA,oBAAqB;MAC3C2C,OAAO,EAAC,UAAU;MAAAC,QAAA,GAElBrD,IAAA;QAAMkC,EAAE,EAAC;MAAS,CAAE,CAAC,EACrBlC,IAAA;QAAMkC,EAAE,EAAC;MAAS,CAAE,CAAC;IAAA,CACH,CAAC;EAEzB,CAAC,EACD,CACEF,YAAY,EACZE,EAAE,EACF3B,kBAAkB,EAClBC,mBAAmB,EACnB2B,OAAO,EACPC,QAAQ,EACR3B,oBAAoB,EACpBsC,WAAW,CAEf,CAAC;EAED,OACE/C,IAAA,CAACH,OAAO;IAACyD,QAAQ,EAAC,aAAa;IAACC,SAAS,EAAC,OAAO;IAACC,IAAI,EAAET,WAAY;IAAAM,QAAA,EAClErD,IAAA,CAACL,eAAe,CAAC8D,QAAQ;MAAAJ,QAAA,EAAEL;IAAY,CAA2B;EAAC,CAC5D,CAAC;AAEd,CAAC;AAED,MAAMU,2BAA2B,GAAGvE,IAAI,CAAC4C,mBAAmB,CAAC;AAC7D2B,2BAA2B,CAACC,WAAW,GAAG,qBAAqB;AAE/D,SAASD,2BAA2B,IAAI3B,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"SideNavToggleButton.js","names":["memo","useCallback","useImperativeHandle","useMemo","useRef","styled","useTranslation","generateContrastColors","MuiPropsContext","useOdysseyDesignTokens","Tooltip","useUiShellContext","UI_SHELL_OVERLAY_Z_INDEX","jsx","_jsx","jsxs","_jsxs","StyledToggleButton","_Button","shouldForwardProp","prop","isSideNavCollapsed","odysseyDesignTokens","toggleContrastColors","backgroundColor","position","width","Spacing6","height","border","zIndex","boxShadow","PalettePrimaryMain","outline","animation","TransitionDurationMain","animationFillMode","transform","span","top","left","Spacing4","HueNeutral600","transition","fontColor","SideNavToggleButton","ariaControls","buttonRef","id","onClick","tabIndex","t","uiShellContext","localButtonRef","hasNonStandardAppBackgroundColor","appBackgroundColor","HueNeutralWhite","HueNeutral50","undefined","focus","current","toggleLabel","renderButton","muiProps","ref","element","variant","children","ariaType","placement","text","Consumer","MemoizedSideNavToggleButton","displayName"],"sources":["../../../../src/ui-shell/SideNav/SideNavToggleButton.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Button as MuiButton } from \"@mui/material\";\nimport type { ButtonProps as MuiButtonProps } from \"@mui/material\";\nimport {\n HTMLAttributes,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n} from \"react\";\nimport styled from \"@emotion/styled\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n ContrastColors,\n generateContrastColors,\n} from \"../../createContrastColors.js\";\nimport { FocusHandle } from \"../../inputUtils.js\";\nimport { MuiPropsContext, MuiPropsContextType } from \"../../MuiPropsContext.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport { Tooltip } from \"../../Tooltip.js\";\nimport { useUiShellContext } from \"../../ui-shell/UiShellProvider.js\";\nimport { UI_SHELL_OVERLAY_Z_INDEX } from \"../uiShellSharedConstants.js\";\n\nconst StyledToggleButton = styled(MuiButton, {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isSideNavCollapsed\" &&\n prop !== \"toggleContrastColors\",\n})<{\n isSideNavCollapsed: boolean;\n odysseyDesignTokens: DesignTokens;\n toggleContrastColors?: ContrastColors;\n}>(({ isSideNavCollapsed, odysseyDesignTokens, toggleContrastColors }) => ({\n backgroundColor: \"transparent\",\n position: \"relative\",\n width: odysseyDesignTokens.Spacing6,\n height: odysseyDesignTokens.Spacing6,\n border: 0,\n zIndex: UI_SHELL_OVERLAY_Z_INDEX,\n\n \"&:focus-visible\": {\n boxShadow: `inset 0 0 0 2px ${odysseyDesignTokens.PalettePrimaryMain}`,\n outline: \"none\",\n },\n\n \"&:hover, &:focus-visible\": {\n backgroundColor: \"transparent\",\n\n \"#lineOne\": {\n animation: `lineOne-animate-to-collapse ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineOne-animate-to-collapse\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(-90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -27%, 0) rotate(-45deg) scaleY(.75)\",\n },\n },\n },\n\n \"#lineTwo\": {\n animation: `lineTwo-animate-to-collapse ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineTwo-animate-to-collapse\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(-90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -73%, 0) rotate(-135deg) scaleY(.75)\",\n },\n },\n },\n\n ...(isSideNavCollapsed && {\n \"#lineOne\": {\n animation: `lineOne-animate-to-expand ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineOne-animate-to-expand\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -73%, 0) rotate(135deg) scaleY(.75)\",\n },\n },\n },\n\n \"#lineTwo\": {\n animation: `lineTwo-animate-to-expand ${odysseyDesignTokens.TransitionDurationMain} cubic-bezier(0, 0, 0.2, 1)`,\n animationFillMode: \"forwards\",\n \"@keyframes lineTwo-animate-to-expand\": {\n \"0%\": {\n transform: \"translate3d(-50%, -50%, 0)\",\n },\n \"50%\": {\n transform: \"translate3d(-50%, -50%, 0) rotate(90deg) scaleY(.75)\",\n },\n \"100%\": {\n transform: \"translate3d(-50%, -27%, 0) rotate(45deg) scaleY(.75)\",\n },\n },\n },\n }),\n },\n\n span: {\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n width: \"2px\",\n height: odysseyDesignTokens.Spacing4,\n backgroundColor: odysseyDesignTokens.HueNeutral600,\n transform: \"translate3d(-50%, -50%, 0)\",\n transition: `transform ${odysseyDesignTokens.TransitionDurationMain}`,\n\n ...(toggleContrastColors?.fontColor && {\n backgroundColor: toggleContrastColors.fontColor,\n }),\n },\n}));\n\nexport type SideNavToggleButtonProps = {\n /**\n * The ref forwarded to the Button\n */\n buttonRef?: React.RefObject<FocusHandle>;\n /**\n * The `id` of the item this button controls\n */\n ariaControls: string;\n /**\n * The ID of the Button\n */\n id?: string;\n isSideNavCollapsed: boolean;\n tabIndex?: HTMLAttributes<HTMLElement>[\"tabIndex\"];\n /**\n * The click event handler for the Button\n */\n onClick?: MuiButtonProps[\"onClick\"];\n onKeyDown?: MuiButtonProps[\"onKeyDown\"];\n};\n\nconst SideNavToggleButton = ({\n ariaControls,\n buttonRef,\n id,\n isSideNavCollapsed,\n onClick,\n tabIndex,\n}: SideNavToggleButtonProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { t } = useTranslation();\n const uiShellContext = useUiShellContext();\n\n const localButtonRef = useRef<HTMLButtonElement | HTMLAnchorElement>(null);\n\n const toggleContrastColors = useMemo(() => {\n const hasNonStandardAppBackgroundColor =\n uiShellContext?.appBackgroundColor &&\n uiShellContext?.appBackgroundColor !==\n odysseyDesignTokens.HueNeutralWhite &&\n uiShellContext?.appBackgroundColor !== odysseyDesignTokens.HueNeutral50;\n\n if (hasNonStandardAppBackgroundColor) {\n return generateContrastColors(\n uiShellContext.appBackgroundColor,\n odysseyDesignTokens,\n );\n }\n\n return undefined;\n }, [odysseyDesignTokens, uiShellContext]);\n\n useImperativeHandle(\n buttonRef,\n () => ({\n focus: () => {\n localButtonRef.current?.focus();\n },\n }),\n [],\n );\n\n const toggleLabel = useMemo(\n () =>\n isSideNavCollapsed\n ? t(\"sidenav.toggle.expand\")\n : t(\"sidenav.toggle.collapse\"),\n [isSideNavCollapsed, t],\n );\n\n const renderButton = useCallback(\n (muiProps: MuiPropsContextType) => {\n return (\n <StyledToggleButton\n {...muiProps}\n aria-controls={ariaControls}\n aria-expanded={!isSideNavCollapsed}\n aria-label={toggleLabel}\n data-se=\"sidenav-toggle-button\"\n data-sidenav-toggle={true}\n id={id}\n isSideNavCollapsed={isSideNavCollapsed}\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={onClick}\n ref={(element) => {\n if (element) {\n (\n localButtonRef as React.MutableRefObject<HTMLButtonElement>\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 tabIndex={tabIndex}\n toggleContrastColors={toggleContrastColors}\n variant=\"floating\"\n >\n <span id=\"lineOne\" />\n <span id=\"lineTwo\" />\n </StyledToggleButton>\n );\n },\n [\n ariaControls,\n id,\n isSideNavCollapsed,\n odysseyDesignTokens,\n onClick,\n tabIndex,\n toggleContrastColors,\n toggleLabel,\n ],\n );\n\n return (\n <Tooltip ariaType=\"description\" placement=\"right\" text={toggleLabel}>\n <MuiPropsContext.Consumer>{renderButton}</MuiPropsContext.Consumer>\n </Tooltip>\n );\n};\n\nconst MemoizedSideNavToggleButton = memo(SideNavToggleButton);\nMemoizedSideNavToggleButton.displayName = \"SideNavToggleButton\";\n\nexport { MemoizedSideNavToggleButton as SideNavToggleButton };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactElement, SyntheticEvent } from \"react\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\ntype LogoWithLink = {\n href: string;\n ariaLabel: string;\n};\ntype LogoWithNoLink = {\n href?: never;\n ariaLabel?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n imageAltText?: never;\n imageUrl?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n logoComponent?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n logoComponent?: never;\n }\n );\n\nexport type SideNavProps = {\n /**\n * Side Nav header text that is usually reserved to show the App name\n */\n appName?: string;\n /**\n * Determines whether the side nav is collapsible\n */\n isCollapsible?: boolean;\n /**\n * Determines whether the side nav is collapsed\n */\n isCollapsed?: boolean;\n /**\n * Determines whether the side nav items use compact layout\n */\n isCompact?: boolean;\n /**\n * Before the side nav has items, it will be in a loading state.\n */\n isLoading?: boolean;\n /**\n * An optional logo component or src string for an img to display in the header. If not provided, will default to the Okta logo\n */\n logoProps?: SideNavLogoProps;\n /**\n * Triggers when the side nav is collapsed\n */\n onCollapse?: () => void;\n /**\n * Triggers when the side nav is expanded\n */\n onExpand?: () => void;\n /**\n * Triggers when the item is reordered\n */\n onSort?: (\n reorderedItems: SideNavItem[],\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n /**\n * Nav items in the side nav\n */\n sideNavItems: SideNavItem[];\n} & (\n | {\n /**\n * The component to display as the footer; if present the `footerItems` are ignored and not rendered.\n */\n footerComponent?: ReactElement;\n footerItems?: never;\n hasCustomFooter: true;\n }\n | {\n footerComponent?: never;\n /**\n * Footer items in the side nav\n */\n footerItems?: SideNavFooterItem[];\n hasCustomFooter?: false;\n }\n) &\n Pick<HtmlProps, \"testId\">;\n\nexport type SideNavItem = {\n /**\n * The number to display as a count alongside the nav item\n */\n count?: number;\n /**\n * The icon element to display after the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n endIcon?: ReactElement;\n id: string;\n /**\n * Whether the item is disabled. When set to true the nav item is set to Disabled color,\n * the link/item is not clickable, and item with nestedNavItems is not expandable.\n */\n isDisabled?: boolean;\n /**\n * Whether the item is active/selected\n */\n isSelected?: boolean;\n /**\n * Whether the item is sortable within a sortable list\n */\n isSortable?: boolean;\n label: string;\n /**\n * Event fired when the nav item is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n /**\n * The status element to display after the label\n */\n severity?: (typeof statusSeverityValues)[number];\n /**\n * The icon element to display before the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n startIcon?: ReactElement;\n /**\n * The label to display inside the status\n */\n statusLabel?: string;\n /**\n * The link target prop. e.g., \"_blank\"\n */\n target?: string;\n} & (\n | {\n nestedNavItems?: never;\n href?: never;\n isDefaultExpanded?: never;\n isExpanded?: never;\n /**\n * Determines if the side nav item is a section header\n */\n isSectionHeader: true;\n }\n | {\n nestedNavItems?: never;\n /**\n * link added to the nav item. if it is undefined, static text will be displayed.\n * fires onClick event when it is passed\n */\n href?: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n }\n | {\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<Omit<SideNavItem, \"nestedNavItems\" | \"startIcon\">>;\n href?: never;\n /**\n * Whether the accordion (nav item with nestedNavItems) is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * If true, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n isExpanded?: boolean;\n /**\n * If true, enables sorting for the accordion items\n */\n isSectionHeader?: never;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactElement, SyntheticEvent } from \"react\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\ntype LogoWithLink = {\n href: string;\n ariaLabel: string;\n};\ntype LogoWithNoLink = {\n href?: never;\n ariaLabel?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n imageAltText?: never;\n imageUrl?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n logoComponent?: never;\n }\n | {\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n logoComponent?: never;\n }\n );\n\nexport type SideNavProps = {\n /**\n * Side Nav header text that is usually reserved to show the App name\n */\n appName?: string;\n /**\n * Determines whether the side nav is collapsible\n */\n isCollapsible?: boolean;\n /**\n * Determines whether the side nav is collapsed by default. When `true`, side nav also closes once and item is clicked.\n */\n isCollapsed?: boolean;\n /**\n * Determines whether the side nav items use compact layout\n */\n isCompact?: boolean;\n /**\n * Before the side nav has items, it will be in a loading state.\n */\n isLoading?: boolean;\n /**\n * If the side nav is up too much screen real estate. For instance, if you're in a narrower view, and it displays next to the content.\n *\n * When `true`, side nav will close itself after nav items are clicked.\n */\n isObtrusive?: boolean;\n /**\n * An optional logo component or src string for an img to display in the header. If not provided, will default to the Okta logo\n */\n logoProps?: SideNavLogoProps;\n /**\n * Triggers when the side nav is collapsed\n */\n onCollapse?: () => void;\n /**\n * Triggers when the side nav is expanded\n */\n onExpand?: () => void;\n /**\n * Triggers when the item is reordered\n */\n onSort?: (\n reorderedItems: SideNavItem[],\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n /**\n * Nav items in the side nav\n */\n sideNavItems: SideNavItem[];\n} & (\n | {\n /**\n * The component to display as the footer; if present the `footerItems` are ignored and not rendered.\n */\n footerComponent?: ReactElement;\n footerItems?: never;\n hasCustomFooter: true;\n }\n | {\n footerComponent?: never;\n /**\n * Footer items in the side nav\n */\n footerItems?: SideNavFooterItem[];\n hasCustomFooter?: false;\n }\n) &\n Pick<HtmlProps, \"testId\">;\n\nexport type SideNavItem = {\n /**\n * The number to display as a count alongside the nav item\n */\n count?: number;\n /**\n * The icon element to display after the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n endIcon?: ReactElement;\n id: string;\n /**\n * Whether the item is disabled. When set to true the nav item is set to Disabled color,\n * the link/item is not clickable, and item with nestedNavItems is not expandable.\n */\n isDisabled?: boolean;\n /**\n * Whether the item is active/selected\n */\n isSelected?: boolean;\n /**\n * Whether the item is sortable within a sortable list\n */\n isSortable?: boolean;\n label: string;\n /**\n * Event fired when the nav item is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n /**\n * The status element to display after the label\n */\n severity?: (typeof statusSeverityValues)[number];\n /**\n * The icon element to display before the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n startIcon?: ReactElement;\n /**\n * The label to display inside the status\n */\n statusLabel?: string;\n /**\n * The link target prop. e.g., \"_blank\"\n */\n target?: string;\n} & (\n | {\n nestedNavItems?: never;\n href?: never;\n isDefaultExpanded?: never;\n isExpanded?: never;\n /**\n * Determines if the side nav item is a section header\n */\n isSectionHeader: true;\n }\n | {\n nestedNavItems?: never;\n /**\n * link added to the nav item. if it is undefined, static text will be displayed.\n * fires onClick event when it is passed\n */\n href?: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n }\n | {\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<Omit<SideNavItem, \"nestedNavItems\" | \"startIcon\">>;\n href?: never;\n /**\n * Whether the accordion (nav item with nestedNavItems) is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * If true, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n isExpanded?: boolean;\n /**\n * If true, enables sorting for the accordion items\n */\n isSectionHeader?: never;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ /*!
2
+ * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.
3
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4
+ *
5
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6
+ * Unless required by applicable law or agreed to in writing, software
7
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ *
10
+ * See the License for the specific language governing permissions and limitations under the License.
11
+ */import { forwardRef, memo } from "react";
12
+ import { SvgIcon } from "../../SvgIcon.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ const HamburgerMenuIcon = forwardRef((props, ref) => {
15
+ return _jsx(SvgIcon, {
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ ref: ref,
20
+ ...props,
21
+ children: _jsx("path", {
22
+ fillRule: "evenodd",
23
+ clipRule: "evenodd",
24
+ d: "M21.333 5.778H2.667V4H21.333V5.778ZM21.333 12.885H2.667V11.111H21.333V12.885ZM2.667 20H21.333V18.221H2.667V20Z",
25
+ fill: "currentColor"
26
+ })
27
+ });
28
+ });
29
+ const MemoizedHamburgerMenuIcon = memo(HamburgerMenuIcon);
30
+ MemoizedHamburgerMenuIcon.displayName = "HamburgerMenuIcon";
31
+ export { MemoizedHamburgerMenuIcon as HamburgerMenuIcon };
32
+ //# sourceMappingURL=HamburgerMenuIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HamburgerMenuIcon.js","names":["forwardRef","memo","SvgIcon","jsx","_jsx","HamburgerMenuIcon","props","ref","viewBox","fill","xmlns","children","fillRule","clipRule","d","MemoizedHamburgerMenuIcon","displayName"],"sources":["../../../../src/ui-shell/TopNav/HamburgerMenuIcon.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n// Code automatically generated; DO NOT EDIT.\n\nimport { forwardRef, memo } from \"react\";\nimport { SvgIcon, type SvgIconNoChildrenProps } from \"../../SvgIcon.js\";\n\nexport type HamburgerMenuProps = SvgIconNoChildrenProps;\n\nconst HamburgerMenuIcon = forwardRef<SVGSVGElement, HamburgerMenuProps>(\n (props, ref) => {\n return (\n <SvgIcon\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ref={ref}\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M21.333 5.778H2.667V4H21.333V5.778ZM21.333 12.885H2.667V11.111H21.333V12.885ZM2.667 20H21.333V18.221H2.667V20Z\"\n fill=\"currentColor\"\n />\n </SvgIcon>\n );\n },\n);\n\nconst MemoizedHamburgerMenuIcon = memo(HamburgerMenuIcon);\nMemoizedHamburgerMenuIcon.displayName = \"HamburgerMenuIcon\";\n\nexport { MemoizedHamburgerMenuIcon as HamburgerMenuIcon };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAIA,SAASA,UAAU,EAAEC,IAAI,QAAQ,OAAO;AACxC,SAASC,OAAO,QAAqC,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIxE,MAAMC,iBAAiB,GAAGL,UAAU,CAClC,CAACM,KAAK,EAAEC,GAAG,KAAK;EACd,OACEH,IAAA,CAACF,OAAO;IACNM,OAAO,EAAC,WAAW;IACnBC,IAAI,EAAC,MAAM;IACXC,KAAK,EAAC,4BAA4B;IAClCH,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IAAAK,QAAA,EAETP,IAAA;MACEQ,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,gHAAgH;MAClHL,IAAI,EAAC;IAAc,CACpB;EAAC,CACK,CAAC;AAEd,CACF,CAAC;AAED,MAAMM,yBAAyB,GAAGd,IAAI,CAACI,iBAAiB,CAAC;AACzDU,yBAAyB,CAACC,WAAW,GAAG,mBAAmB;AAE3D,SAASD,yBAAyB,IAAIV,iBAAiB","ignoreList":[]}
@@ -14,8 +14,8 @@ import styled from "@emotion/styled";
14
14
  import { memo } from "react";
15
15
  import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
16
16
  import { useUiShellContext } from "../../ui-shell/UiShellProvider.js";
17
+ import { TOP_NAV_HEIGHT, UI_SHELL_BASE_Z_INDEX } from "../uiShellSharedConstants.js";
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- export const TOP_NAV_HEIGHT = `${64 / 14}rem`;
19
19
  const StyledLeftSideContainer = styled("div")(() => ({
20
20
  flexGrow: 1
21
21
  }));
@@ -43,7 +43,7 @@ const StyledTopNavContainer = styled("div", {
43
43
  paddingInline: odysseyDesignTokens.Spacing8,
44
44
  position: "relative",
45
45
  transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,
46
- zIndex: 100,
46
+ zIndex: UI_SHELL_BASE_Z_INDEX,
47
47
  ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite && {
48
48
  borderBottom: `${odysseyDesignTokens.BorderWidthMain} ${odysseyDesignTokens.BorderStyleMain} ${odysseyDesignTokens.HueNeutral100}`
49
49
  })
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.js","names":["styled","memo","useOdysseyDesignTokens","useUiShellContext","jsx","_jsx","jsxs","_jsxs","TOP_NAV_HEIGHT","StyledLeftSideContainer","flexGrow","StyledRightSideContainer","flexShrink","StyledTopNavContainer","shouldForwardProp","prop","odysseyDesignTokens","isScrolled","topNavBackgroundColor","alignItems","backgroundColor","boxShadow","DepthMedium","undefined","clipPath","display","gap","Spacing4","height","justifyContent","maxHeight","minHeight","paddingBlock","Spacing2","paddingInline","Spacing8","position","transition","TransitionDurationMain","TransitionTimingMain","zIndex","HueNeutralWhite","borderBottom","BorderWidthMain","BorderStyleMain","HueNeutral100","TopNav","leftSideComponent","rightSideComponent","uiShellContext","children","MemoizedTopNav","displayName"],"sources":["../../../../src/ui-shell/TopNav/TopNav.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, type ReactElement } from \"react\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\n\nexport const TOP_NAV_HEIGHT = `${64 / 14}rem`;\n\nconst StyledLeftSideContainer = styled(\"div\")(() => ({\n flexGrow: 1,\n}));\n\nconst StyledRightSideContainer = styled(\"div\")(() => ({\n flexShrink: 0,\n}));\n\nconst StyledTopNavContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isScrolled, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n backgroundColor: topNavBackgroundColor,\n boxShadow: isScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing4,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing8,\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: 100,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite && {\n borderBottom: `${odysseyDesignTokens.BorderWidthMain} ${odysseyDesignTokens.BorderStyleMain} ${odysseyDesignTokens.HueNeutral100}`,\n }),\n}));\n\nexport type TopNavProps = {\n /**\n * Whether or not the underlying content has been scrolled\n */\n isScrolled?: boolean;\n /**\n * React components that render into the left side of the top nav.\n */\n leftSideComponent?: ReactElement;\n /**\n * React components that render into the right side of the top nav.\n */\n rightSideComponent?: ReactElement;\n} & Pick<HtmlProps, \"testId\">;\n\nconst TopNav = ({\n isScrolled,\n leftSideComponent,\n rightSideComponent,\n}: TopNavProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n return (\n <StyledTopNavContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrolled={isScrolled}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledLeftSideContainer>\n {leftSideComponent ?? <div />}\n </StyledLeftSideContainer>\n <StyledRightSideContainer>\n {rightSideComponent ?? <div />}\n </StyledRightSideContainer>\n </StyledTopNavContainer>\n );\n};\n\nconst MemoizedTopNav = memo(TopNav);\nMemoizedTopNav.displayName = \"TopNav\";\n\nexport { MemoizedTopNav as TopNav };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAA2B,OAAO;AAG/C,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAEEC,iBAAiB,QACZ,mCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,OAAO,MAAMC,cAAc,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK;AAE7C,MAAMC,uBAAuB,GAAGT,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACnDU,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AAEH,MAAMC,wBAAwB,GAAGX,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACpDY,UAAU,EAAE;AACd,CAAC,CAAC,CAAC;AAEH,MAAMC,qBAAqB,GAAGb,MAAM,CAAC,KAAK,EAAE;EAC1Cc,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,YAAY,IACrBA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,mBAAmB;EAAEC,UAAU;EAAEC;AAAsB,CAAC,MAAM;EAClEC,UAAU,EAAE,QAAQ;EACpBC,eAAe,EAAEF,qBAAqB;EACtCG,SAAS,EAAEJ,UAAU,GAAGD,mBAAmB,CAACM,WAAW,GAAGC,SAAS;EACnEC,QAAQ,EAAE,qBAAqB;EAC/BC,OAAO,EAAE,MAAM;EACfC,GAAG,EAAEV,mBAAmB,CAACW,QAAQ;EACjCC,MAAM,EAAE,MAAM;EACdC,cAAc,EAAE,eAAe;EAC/BC,SAAS,EAAEtB,cAAc;EACzBuB,SAAS,EAAEvB,c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E_Z_INDEX","jsx","_jsx","jsxs","_jsxs","StyledLeftSideContainer","flexGrow","StyledRightSideContainer","flexShrink","StyledTopNavContainer","shouldForwardProp","prop","odysseyDesignTokens","isScrolled","topNavBackgroundColor","alignItems","backgroundColor","boxShadow","DepthMedium","undefined","clipPath","display","gap","Spacing4","height","justifyContent","maxHeight","minHeight","paddingBlock","Spacing2","paddingInline","Spacing8","position","transition","TransitionDurationMain","TransitionTimingMain","zIndex","HueNeutralWhite","borderBottom","BorderWidthMain","BorderStyleMain","HueNeutral100","TopNav","leftSideComponent","rightSideComponent","uiShellContext","children","MemoizedTopNav","displayName"],"sources":["../../../../src/ui-shell/TopNav/TopNav.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo, type ReactElement } from \"react\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext.js\";\nimport {\n UiShellColors,\n useUiShellContext,\n} from \"../../ui-shell/UiShellProvider.js\";\nimport {\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n} from \"../uiShellSharedConstants.js\";\n\nconst StyledLeftSideContainer = styled(\"div\")(() => ({\n flexGrow: 1,\n}));\n\nconst StyledRightSideContainer = styled(\"div\")(() => ({\n flexShrink: 0,\n}));\n\nconst StyledTopNavContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isScrolled, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n backgroundColor: topNavBackgroundColor,\n boxShadow: isScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing4,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing8,\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite && {\n borderBottom: `${odysseyDesignTokens.BorderWidthMain} ${odysseyDesignTokens.BorderStyleMain} ${odysseyDesignTokens.HueNeutral100}`,\n }),\n}));\n\nexport type TopNavProps = {\n /**\n * Whether or not the underlying content has been scrolled\n */\n isScrolled?: boolean;\n /**\n * React components that render into the left side of the top nav.\n */\n leftSideComponent?: ReactElement;\n /**\n * React components that render into the right side of the top nav.\n */\n rightSideComponent?: ReactElement;\n} & Pick<HtmlProps, \"testId\">;\n\nconst TopNav = ({\n isScrolled,\n leftSideComponent,\n rightSideComponent,\n}: TopNavProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n return (\n <StyledTopNavContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrolled={isScrolled}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledLeftSideContainer>\n {leftSideComponent ?? <div />}\n </StyledLeftSideContainer>\n <StyledRightSideContainer>\n {rightSideComponent ?? <div />}\n </StyledRightSideContainer>\n </StyledTopNavContainer>\n );\n};\n\nconst MemoizedTopNav = memo(TopNav);\nMemoizedTopNav.displayName = \"TopNav\";\n\nexport { MemoizedTopNav as TopNav };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAA2B,OAAO;AAG/C,SAEEC,sBAAsB,QACjB,qCAAqC;AAC5C,SAEEC,iBAAiB,QACZ,mCAAmC;AAC1C,SACEC,cAAc,EACdC,qBAAqB,QAChB,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtC,MAAMC,uBAAuB,GAAGV,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACnDW,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AAEH,MAAMC,wBAAwB,GAAGZ,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACpDa,UAAU,EAAE;AACd,CAAC,CAAC,CAAC;AAEH,MAAMC,qBAAqB,GAAGd,MAAM,CAAC,KAAK,EAAE;EAC1Ce,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAC9BA,IAAI,KAAK,YAAY,IACrBA,IAAI,KAAK;AACb,CAAC,CAAC,CAIC,CAAC;EAAEC,mBAAmB;EAAEC,UAAU;EAAEC;AAAsB,CAAC,MAAM;EAClEC,UAAU,EAAE,QAAQ;EACpBC,eAAe,EAAEF,qBAAqB;EACtCG,SAAS,EAAEJ,UAAU,GAAGD,mBAAmB,CAACM,WAAW,GAAGC,SAAS;EACnEC,QAAQ,EAAE,qBAAqB;EAC/BC,OAAO,EAAE,MAAM;EACfC,GAAG,EAAEV,mBAAmB,CAACW,QAAQ;EACjCC,MAAM,EAAE,MAAM;EACdC,cAAc,EAAE,eAAe;EAC/BC,SAAS,EAAE3B,cAAc;EACzB4B,SAAS,EAAE5B,cAAc;EACzB6B,YAAY,EAAEhB,mBAAmB,CAACiB,QAAQ;EAC1CC,aAAa,EAAElB,mBAAmB,CAACmB,QAAQ;EAC3CC,QAAQ,EAAE,UAAU;EACpBC,UAAU,EAAE,cAAcrB,mBAAmB,CAACsB,sBAAsB,IAAItB,mBAAmB,CAACuB,oBAAoB,EAAE;EAClHC,MAAM,EAAEpC,qBAAqB;EAE7B,IAAIc,qBAAqB,KAAKF,mBAAmB,CAACyB,eAAe,IAAI;IACnEC,YAAY,EAAE,GAAG1B,mBAAmB,CAAC2B,eAAe,IAAI3B,mBAAmB,CAAC4B,eAAe,IAAI5B,mBAAmB,CAAC6B,aAAa;EAClI,CAAC;AACH,CAAC,CAAC,CAAC;AAiBH,MAAMC,MAAM,GAAGA,CAAC;EACd7B,UAAU;EACV8B,iBAAiB;EACjBC;AACW,CAAC,KAAK;EACjB,MAAMhC,mBAAmB,GAAGf,sBAAsB,CAAC,CAAC;EACpD,MAAMgD,cAAc,GAAG/C,iBAAiB,CAAC,CAAC;EAE1C,OACEM,KAAA,CAACK,qBAAqB;IACpBG,mBAAmB,EAAEA,mBAAoB;IACzCC,UAAU,EAAEA,UAAW;IACvBC,qBAAqB,EAAE+B,cAAc,EAAE/B,qBAAsB;IAAAgC,QAAA,GAE7D5C,IAAA,CAACG,uBAAuB;MAAAyC,QAAA,EACrBH,iBAAiB,IAAIzC,IAAA,UAAM;IAAC,CACN,CAAC,EAC1BA,IAAA,CAACK,wBAAwB;MAAAuC,QAAA,EACtBF,kBAAkB,IAAI1C,IAAA,UAAM;IAAC,CACN,CAAC;EAAA,CACN,CAAC;AAE5B,CAAC;AAED,MAAM6C,cAAc,GAAGnD,IAAI,CAAC8C,MAAM,CAAC;AACnCK,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIL,MAAM","ignoreList":[]}
@@ -13,32 +13,40 @@
13
13
  import { memo, useEffect, useState } from "react";
14
14
  import { ErrorBoundary } from "react-error-boundary";
15
15
  import { CssBaseline } from "../CssBaseline.js";
16
+ import { NarrowUiShellContent } from "./NarrowUiShellContent.js";
16
17
  import { OdysseyProvider } from "../OdysseyProvider.js";
17
- import { UiShellContent } from "./UiShellContent.js";
18
18
  import { UiShellProvider } from "./UiShellProvider.js";
19
+ import { useUiShellBreakpoints } from "./useUiShellBreakpoints.js";
20
+ import { WideUiShellContent } from "./WideUiShellContent.js";
19
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
22
  export const defaultComponentProps = {
21
23
  sideNavProps: undefined,
22
24
  topNavProps: undefined
23
25
  };
26
+ const errorComponent = _jsx("div", {
27
+ "data-error": true
28
+ });
24
29
  const UiShell = ({
25
30
  appBackgroundColor,
26
31
  appBackgroundContrastMode,
27
- appComponent,
28
- appRootElement,
29
- appContainerElement,
30
- appContainerScrollingMode,
32
+ appElement,
33
+ appElementScrollingMode,
34
+ closeSideNavMenu,
31
35
  hasStandardAppContentPadding,
32
36
  initialVisibleSections,
33
37
  onError = console.error,
34
38
  onSubscriptionCreated,
35
39
  optionalComponents,
36
40
  sideNavBackgroundColor,
37
- stylesRootElement,
41
+ subscribeToCloseRightSideMenu,
42
+ subscribeToCloseSideNavMenu,
43
+ subscribeToPropChanges,
38
44
  topNavBackgroundColor,
39
- subscribeToPropChanges
45
+ uiShellAppElement,
46
+ uiShellStylesElement
40
47
  }) => {
41
48
  const [componentProps, setComponentProps] = useState(defaultComponentProps);
49
+ const activeBreakpoint = useUiShellBreakpoints();
42
50
  useEffect(() => {
43
51
  const unsubscribe = subscribeToPropChanges(componentProps => {
44
52
  setComponentProps(componentProps || defaultComponentProps);
@@ -48,30 +56,47 @@ const UiShell = ({
48
56
  unsubscribe();
49
57
  };
50
58
  }, [onSubscriptionCreated, subscribeToPropChanges]);
51
- return _jsx(ErrorBoundary, {
52
- fallback: appComponent,
59
+ return activeBreakpoint === "none" ? null : _jsx(ErrorBoundary, {
60
+ fallback: errorComponent,
53
61
  onError: onError,
54
62
  children: _jsx(OdysseyProvider, {
55
- emotionRootElement: stylesRootElement,
56
- shadowRootElement: appRootElement,
57
- hasScopedCssBaseline: false,
63
+ emotionRootElement: uiShellStylesElement,
64
+ shadowRootElement: uiShellAppElement,
58
65
  children: _jsxs(ErrorBoundary, {
59
- fallback: appComponent,
66
+ fallback: errorComponent,
60
67
  onError: onError,
61
- children: [_jsx(CssBaseline, {}), _jsx(UiShellProvider, {
68
+ children: [_jsx(CssBaseline, {}), _jsxs(UiShellProvider, {
62
69
  appBackgroundColor: appBackgroundColor,
63
70
  appBackgroundContrastMode: appBackgroundContrastMode,
71
+ closeSideNavMenu: closeSideNavMenu,
64
72
  sideNavBackgroundColor: sideNavBackgroundColor,
73
+ subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu,
74
+ subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu,
65
75
  topNavBackgroundColor: topNavBackgroundColor,
66
- children: _jsx(UiShellContent, {
76
+ children: [activeBreakpoint === "constrained" && _jsx(NarrowUiShellContent, {
67
77
  ...componentProps,
68
- appContainerElement: appContainerElement,
69
- appContainerScrollingMode: appContainerScrollingMode,
78
+ appElement: appElement,
79
+ appElementScrollingMode: appElementScrollingMode,
70
80
  hasStandardAppContentPadding: hasStandardAppContentPadding,
71
81
  initialVisibleSections: initialVisibleSections,
72
82
  onError: onError,
73
83
  optionalComponents: optionalComponents
74
- })
84
+ }), (activeBreakpoint === "compact" || activeBreakpoint === "comfortable") && _jsx(WideUiShellContent, {
85
+ ...componentProps,
86
+ ...(componentProps.sideNavProps ? {
87
+ sideNavProps: {
88
+ ...componentProps.sideNavProps,
89
+ isCollapsed: activeBreakpoint === "compact" || componentProps.sideNavProps?.isCollapsed,
90
+ isCollapsible: activeBreakpoint === "compact" || componentProps.sideNavProps?.isCollapsible
91
+ }
92
+ } : {}),
93
+ appElement: appElement,
94
+ appElementScrollingMode: appElementScrollingMode,
95
+ hasStandardAppContentPadding: hasStandardAppContentPadding,
96
+ initialVisibleSections: initialVisibleSections,
97
+ onError: onError,
98
+ optionalComponents: optionalComponents
99
+ })]
75
100
  })]
76
101
  })
77
102
  })