@okta/odyssey-react-mui 1.25.0 → 1.27.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 (512) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/Autocomplete.js +30 -191
  3. package/dist/Autocomplete.js.map +1 -1
  4. package/dist/Box.js +2 -0
  5. package/dist/Box.js.map +1 -1
  6. package/dist/Card.js +1 -0
  7. package/dist/Card.js.map +1 -1
  8. package/dist/OdysseyDesignTokensContext.js +3 -2
  9. package/dist/OdysseyDesignTokensContext.js.map +1 -1
  10. package/dist/OdysseyProvider.js +9 -7
  11. package/dist/OdysseyProvider.js.map +1 -1
  12. package/dist/OdysseyThemeProvider.js +33 -13
  13. package/dist/OdysseyThemeProvider.js.map +1 -1
  14. package/dist/Pagination/Pagination.js +46 -14
  15. package/dist/Pagination/Pagination.js.map +1 -1
  16. package/dist/Surface.js +14 -3
  17. package/dist/Surface.js.map +1 -1
  18. package/dist/Tag.js +42 -27
  19. package/dist/Tag.js.map +1 -1
  20. package/dist/index.js +6 -7
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.scss +1 -1
  23. package/dist/labs/AppTile.js +137 -39
  24. package/dist/labs/AppTile.js.map +1 -1
  25. package/dist/labs/DataView/CardLayoutContent.js +7 -8
  26. package/dist/labs/DataView/CardLayoutContent.js.map +1 -1
  27. package/dist/labs/DataView/DataCard.js +96 -43
  28. package/dist/labs/DataView/DataCard.js.map +1 -1
  29. package/dist/labs/DataView/DataView.js +6 -0
  30. package/dist/labs/DataView/DataView.js.map +1 -1
  31. package/dist/labs/DataView/TableLayoutContent.js +3 -2
  32. package/dist/labs/DataView/TableLayoutContent.js.map +1 -1
  33. package/dist/labs/DataView/componentTypes.js.map +1 -1
  34. package/dist/labs/DataView/index.js.map +1 -1
  35. package/dist/labs/OdysseyPickers/ComposablePicker.js +113 -0
  36. package/dist/labs/OdysseyPickers/ComposablePicker.js.map +1 -0
  37. package/dist/labs/OdysseyPickers/Picker.js +261 -0
  38. package/dist/labs/OdysseyPickers/Picker.js.map +1 -0
  39. package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js +132 -0
  40. package/dist/labs/OdysseyPickers/PickerVirtualizationListBox.js.map +1 -0
  41. package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js +291 -0
  42. package/dist/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -0
  43. package/dist/{src/createShadowDomElements.d.ts → labs/OdysseyPickers/index.js} +4 -7
  44. package/dist/labs/OdysseyPickers/index.js.map +1 -0
  45. package/dist/labs/PageTemplate.js +14 -10
  46. package/dist/labs/PageTemplate.js.map +1 -1
  47. package/dist/labs/SideNav/CollapseIcon.js +11 -25
  48. package/dist/labs/SideNav/CollapseIcon.js.map +1 -1
  49. package/dist/labs/SideNav/HandleIcon.js +32 -0
  50. package/dist/labs/SideNav/HandleIcon.js.map +1 -0
  51. package/dist/labs/{NavAccordion.js → SideNav/NavAccordion.js} +36 -8
  52. package/dist/labs/SideNav/NavAccordion.js.map +1 -0
  53. package/dist/labs/SideNav/OktaAura.js +32 -0
  54. package/dist/labs/SideNav/OktaAura.js.map +1 -0
  55. package/dist/labs/SideNav/OktaLogo.js +6 -9
  56. package/dist/labs/SideNav/OktaLogo.js.map +1 -1
  57. package/dist/labs/SideNav/SideNav.js +316 -172
  58. package/dist/labs/SideNav/SideNav.js.map +1 -1
  59. package/dist/labs/SideNav/SideNavFooterContent.js +32 -18
  60. package/dist/labs/SideNav/SideNavFooterContent.js.map +1 -1
  61. package/dist/labs/SideNav/SideNavHeader.js +48 -37
  62. package/dist/labs/SideNav/SideNavHeader.js.map +1 -1
  63. package/dist/labs/SideNav/SideNavItemContent.js +150 -68
  64. package/dist/labs/SideNav/SideNavItemContent.js.map +1 -1
  65. package/dist/labs/SideNav/SideNavItemContentContext.js +20 -0
  66. package/dist/labs/SideNav/SideNavItemContentContext.js.map +1 -0
  67. package/dist/labs/SideNav/SideNavItemLinkContent.js +15 -14
  68. package/dist/labs/SideNav/SideNavItemLinkContent.js.map +1 -1
  69. package/dist/labs/SideNav/SideNavLogo.js +42 -0
  70. package/dist/labs/SideNav/SideNavLogo.js.map +1 -0
  71. package/dist/labs/SideNav/SideNavToggleButton.js +170 -0
  72. package/dist/labs/SideNav/SideNavToggleButton.js.map +1 -0
  73. package/dist/labs/SideNav/SortableList/SortableItem.js +162 -0
  74. package/dist/labs/SideNav/SortableList/SortableItem.js.map +1 -0
  75. package/dist/labs/SideNav/SortableList/SortableList.js +118 -0
  76. package/dist/labs/SideNav/SortableList/SortableList.js.map +1 -0
  77. package/dist/labs/SideNav/SortableList/SortableOverlay.js +30 -0
  78. package/dist/labs/SideNav/SortableList/SortableOverlay.js.map +1 -0
  79. package/dist/labs/SideNav/types.js.map +1 -1
  80. package/dist/labs/TopNav/TopNav.js +65 -0
  81. package/dist/labs/TopNav/TopNav.js.map +1 -0
  82. package/dist/labs/TopNav/TopNavLinksList.js +38 -0
  83. package/dist/labs/TopNav/TopNavLinksList.js.map +1 -0
  84. package/dist/labs/TopNav/TopNavListItem.js +132 -0
  85. package/dist/labs/TopNav/TopNavListItem.js.map +1 -0
  86. package/dist/labs/TopNav/UserProfile.js +65 -0
  87. package/dist/labs/TopNav/UserProfile.js.map +1 -0
  88. package/dist/labs/TopNav/index.js +14 -0
  89. package/dist/labs/TopNav/index.js.map +1 -0
  90. package/dist/labs/UiShell/UiShell.js +68 -0
  91. package/dist/labs/UiShell/UiShell.js.map +1 -0
  92. package/dist/labs/UiShell/UiShellContent.js +114 -0
  93. package/dist/labs/UiShell/UiShellContent.js.map +1 -0
  94. package/dist/labs/UiShell/bufferLatest.js +37 -0
  95. package/dist/labs/UiShell/bufferLatest.js.map +1 -0
  96. package/dist/labs/UiShell/createMessageBus.js +30 -0
  97. package/dist/labs/UiShell/createMessageBus.js.map +1 -0
  98. package/dist/labs/UiShell/createStore.js +24 -0
  99. package/dist/labs/UiShell/createStore.js.map +1 -0
  100. package/dist/labs/UiShell/index.js +15 -0
  101. package/dist/labs/UiShell/index.js.map +1 -0
  102. package/dist/labs/UiShell/renderUiShell.js +78 -0
  103. package/dist/labs/UiShell/renderUiShell.js.map +1 -0
  104. package/dist/labs/UiShell/useHasUiShell.js +22 -0
  105. package/dist/labs/UiShell/useHasUiShell.js.map +1 -0
  106. package/dist/labs/UiShell/useScrollState.js +41 -0
  107. package/dist/labs/UiShell/useScrollState.js.map +1 -0
  108. package/dist/labs/index.js +5 -3
  109. package/dist/labs/index.js.map +1 -1
  110. package/dist/properties/ts/odyssey-react-mui.js +14 -1
  111. package/dist/properties/ts/odyssey-react-mui.js.map +1 -1
  112. package/dist/properties/ts/odyssey-react-mui_cs.js +3 -1
  113. package/dist/properties/ts/odyssey-react-mui_cs.js.map +1 -1
  114. package/dist/properties/ts/odyssey-react-mui_da.js +3 -1
  115. package/dist/properties/ts/odyssey-react-mui_da.js.map +1 -1
  116. package/dist/properties/ts/odyssey-react-mui_de.js +3 -1
  117. package/dist/properties/ts/odyssey-react-mui_de.js.map +1 -1
  118. package/dist/properties/ts/odyssey-react-mui_el.js +3 -1
  119. package/dist/properties/ts/odyssey-react-mui_el.js.map +1 -1
  120. package/dist/properties/ts/odyssey-react-mui_es.js +3 -1
  121. package/dist/properties/ts/odyssey-react-mui_es.js.map +1 -1
  122. package/dist/properties/ts/odyssey-react-mui_fi.js +3 -1
  123. package/dist/properties/ts/odyssey-react-mui_fi.js.map +1 -1
  124. package/dist/properties/ts/odyssey-react-mui_fr.js +5 -3
  125. package/dist/properties/ts/odyssey-react-mui_fr.js.map +1 -1
  126. package/dist/properties/ts/odyssey-react-mui_ht.js +3 -1
  127. package/dist/properties/ts/odyssey-react-mui_ht.js.map +1 -1
  128. package/dist/properties/ts/odyssey-react-mui_hu.js +3 -1
  129. package/dist/properties/ts/odyssey-react-mui_hu.js.map +1 -1
  130. package/dist/properties/ts/odyssey-react-mui_id.js +3 -1
  131. package/dist/properties/ts/odyssey-react-mui_id.js.map +1 -1
  132. package/dist/properties/ts/odyssey-react-mui_it.js +4 -2
  133. package/dist/properties/ts/odyssey-react-mui_it.js.map +1 -1
  134. package/dist/properties/ts/odyssey-react-mui_ja.js +9 -7
  135. package/dist/properties/ts/odyssey-react-mui_ja.js.map +1 -1
  136. package/dist/properties/ts/odyssey-react-mui_ko.js +3 -1
  137. package/dist/properties/ts/odyssey-react-mui_ko.js.map +1 -1
  138. package/dist/properties/ts/odyssey-react-mui_ms.js +3 -1
  139. package/dist/properties/ts/odyssey-react-mui_ms.js.map +1 -1
  140. package/dist/properties/ts/odyssey-react-mui_nb.js +3 -1
  141. package/dist/properties/ts/odyssey-react-mui_nb.js.map +1 -1
  142. package/dist/properties/ts/odyssey-react-mui_nl_NL.js +3 -1
  143. package/dist/properties/ts/odyssey-react-mui_nl_NL.js.map +1 -1
  144. package/dist/properties/ts/odyssey-react-mui_pl.js +3 -1
  145. package/dist/properties/ts/odyssey-react-mui_pl.js.map +1 -1
  146. package/dist/properties/ts/odyssey-react-mui_pt_BR.js +3 -1
  147. package/dist/properties/ts/odyssey-react-mui_pt_BR.js.map +1 -1
  148. package/dist/properties/ts/odyssey-react-mui_ro.js +3 -1
  149. package/dist/properties/ts/odyssey-react-mui_ro.js.map +1 -1
  150. package/dist/properties/ts/odyssey-react-mui_ru.js +3 -1
  151. package/dist/properties/ts/odyssey-react-mui_ru.js.map +1 -1
  152. package/dist/properties/ts/odyssey-react-mui_sv.js +3 -1
  153. package/dist/properties/ts/odyssey-react-mui_sv.js.map +1 -1
  154. package/dist/properties/ts/odyssey-react-mui_th.js +3 -1
  155. package/dist/properties/ts/odyssey-react-mui_th.js.map +1 -1
  156. package/dist/properties/ts/odyssey-react-mui_tr.js +4 -2
  157. package/dist/properties/ts/odyssey-react-mui_tr.js.map +1 -1
  158. package/dist/properties/ts/odyssey-react-mui_uk.js +3 -1
  159. package/dist/properties/ts/odyssey-react-mui_uk.js.map +1 -1
  160. package/dist/properties/ts/odyssey-react-mui_vi.js +3 -1
  161. package/dist/properties/ts/odyssey-react-mui_vi.js.map +1 -1
  162. package/dist/properties/ts/odyssey-react-mui_zh_CN.js +3 -1
  163. package/dist/properties/ts/odyssey-react-mui_zh_CN.js.map +1 -1
  164. package/dist/properties/ts/odyssey-react-mui_zh_TW.js +3 -1
  165. package/dist/properties/ts/odyssey-react-mui_zh_TW.js.map +1 -1
  166. package/dist/src/Autocomplete.d.ts +21 -22
  167. package/dist/src/Autocomplete.d.ts.map +1 -1
  168. package/dist/src/Box.d.ts +3 -1
  169. package/dist/src/Box.d.ts.map +1 -1
  170. package/dist/src/Card.d.ts.map +1 -1
  171. package/dist/src/OdysseyDesignTokensContext.d.ts +5 -4
  172. package/dist/src/OdysseyDesignTokensContext.d.ts.map +1 -1
  173. package/dist/src/OdysseyProvider.d.ts +3 -3
  174. package/dist/src/OdysseyProvider.d.ts.map +1 -1
  175. package/dist/src/OdysseyThemeProvider.d.ts +10 -12
  176. package/dist/src/OdysseyThemeProvider.d.ts.map +1 -1
  177. package/dist/src/OdysseyTranslationProvider.d.ts +1 -1
  178. package/dist/src/OdysseyTranslationProvider.d.ts.map +1 -1
  179. package/dist/src/Pagination/Pagination.d.ts +21 -7
  180. package/dist/src/Pagination/Pagination.d.ts.map +1 -1
  181. package/dist/src/Surface.d.ts.map +1 -1
  182. package/dist/src/Tag.d.ts +5 -2
  183. package/dist/src/Tag.d.ts.map +1 -1
  184. package/dist/src/index.d.ts +6 -7
  185. package/dist/src/index.d.ts.map +1 -1
  186. package/dist/src/labs/AppTile.d.ts +3 -1
  187. package/dist/src/labs/AppTile.d.ts.map +1 -1
  188. package/dist/src/labs/DataView/CardLayoutContent.d.ts.map +1 -1
  189. package/dist/src/labs/DataView/DataCard.d.ts +9 -3
  190. package/dist/src/labs/DataView/DataCard.d.ts.map +1 -1
  191. package/dist/src/labs/DataView/DataView.d.ts +1 -1
  192. package/dist/src/labs/DataView/DataView.d.ts.map +1 -1
  193. package/dist/src/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  194. package/dist/src/labs/DataView/componentTypes.d.ts +4 -3
  195. package/dist/src/labs/DataView/componentTypes.d.ts.map +1 -1
  196. package/dist/src/labs/DataView/index.d.ts +1 -0
  197. package/dist/src/labs/DataView/index.d.ts.map +1 -1
  198. package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts +33 -0
  199. package/dist/src/labs/OdysseyPickers/ComposablePicker.d.ts.map +1 -0
  200. package/dist/src/labs/OdysseyPickers/Picker.d.ts +98 -0
  201. package/dist/src/labs/OdysseyPickers/Picker.d.ts.map +1 -0
  202. package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts +17 -0
  203. package/dist/src/labs/OdysseyPickers/PickerVirtualizationListBox.d.ts.map +1 -0
  204. package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts +26 -0
  205. package/dist/src/labs/OdysseyPickers/PickerWithOptionAdornment.d.ts.map +1 -0
  206. package/dist/src/labs/OdysseyPickers/index.d.ts +15 -0
  207. package/dist/src/labs/OdysseyPickers/index.d.ts.map +1 -0
  208. package/dist/src/labs/PageTemplate.d.ts +1 -1
  209. package/dist/src/labs/PageTemplate.d.ts.map +1 -1
  210. package/dist/src/labs/SideNav/CollapseIcon.d.ts +1 -4
  211. package/dist/src/labs/SideNav/CollapseIcon.d.ts.map +1 -1
  212. package/dist/src/labs/SideNav/HandleIcon.d.ts +14 -0
  213. package/dist/src/labs/SideNav/HandleIcon.d.ts.map +1 -0
  214. package/dist/src/labs/{NavAccordion.d.ts → SideNav/NavAccordion.d.ts} +7 -7
  215. package/dist/src/labs/SideNav/NavAccordion.d.ts.map +1 -0
  216. package/dist/src/labs/SideNav/OktaAura.d.ts +14 -0
  217. package/dist/src/labs/SideNav/OktaAura.d.ts.map +1 -0
  218. package/dist/src/labs/SideNav/OktaLogo.d.ts.map +1 -1
  219. package/dist/src/labs/SideNav/SideNav.d.ts +2 -1
  220. package/dist/src/labs/SideNav/SideNav.d.ts.map +1 -1
  221. package/dist/src/labs/SideNav/SideNavFooterContent.d.ts +1 -1
  222. package/dist/src/labs/SideNav/SideNavFooterContent.d.ts.map +1 -1
  223. package/dist/src/labs/SideNav/SideNavHeader.d.ts +12 -3
  224. package/dist/src/labs/SideNav/SideNavHeader.d.ts.map +1 -1
  225. package/dist/src/labs/SideNav/SideNavItemContent.d.ts +38 -3
  226. package/dist/src/labs/SideNav/SideNavItemContent.d.ts.map +1 -1
  227. package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts +19 -0
  228. package/dist/src/labs/SideNav/SideNavItemContentContext.d.ts.map +1 -0
  229. package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts +1 -1
  230. package/dist/src/labs/SideNav/SideNavItemLinkContent.d.ts.map +1 -1
  231. package/dist/src/labs/SideNav/SideNavLogo.d.ts +15 -0
  232. package/dist/src/labs/SideNav/SideNavLogo.d.ts.map +1 -0
  233. package/dist/src/labs/SideNav/SideNavToggleButton.d.ts +38 -0
  234. package/dist/src/labs/SideNav/SideNavToggleButton.d.ts.map +1 -0
  235. package/dist/src/labs/SideNav/SortableList/SortableItem.d.ts +26 -0
  236. package/dist/src/labs/SideNav/SortableList/SortableItem.d.ts.map +1 -0
  237. package/dist/src/labs/SideNav/SortableList/SortableList.d.ts +36 -0
  238. package/dist/src/labs/SideNav/SortableList/SortableList.d.ts.map +1 -0
  239. package/dist/src/labs/SideNav/SortableList/SortableOverlay.d.ts +17 -0
  240. package/dist/src/labs/SideNav/SortableList/SortableOverlay.d.ts.map +1 -0
  241. package/dist/src/labs/SideNav/types.d.ts +79 -35
  242. package/dist/src/labs/SideNav/types.d.ts.map +1 -1
  243. package/dist/src/labs/TopNav/TopNav.d.ts +31 -0
  244. package/dist/src/labs/TopNav/TopNav.d.ts.map +1 -0
  245. package/dist/src/labs/TopNav/TopNavLinksList.d.ts +44 -0
  246. package/dist/src/labs/TopNav/TopNavLinksList.d.ts.map +1 -0
  247. package/dist/src/labs/TopNav/TopNavListItem.d.ts +42 -0
  248. package/dist/src/labs/TopNav/TopNavListItem.d.ts.map +1 -0
  249. package/dist/src/labs/TopNav/UserProfile.d.ts +29 -0
  250. package/dist/src/labs/TopNav/UserProfile.d.ts.map +1 -0
  251. package/dist/src/labs/TopNav/index.d.ts +14 -0
  252. package/dist/src/labs/TopNav/index.d.ts.map +1 -0
  253. package/dist/src/labs/UiShell/UiShell.d.ts +33 -0
  254. package/dist/src/labs/UiShell/UiShell.d.ts.map +1 -0
  255. package/dist/src/labs/UiShell/UiShellContent.d.ts +47 -0
  256. package/dist/src/labs/UiShell/UiShellContent.d.ts.map +1 -0
  257. package/dist/src/labs/UiShell/bufferLatest.d.ts +31 -0
  258. package/dist/src/labs/UiShell/bufferLatest.d.ts.map +1 -0
  259. package/dist/src/labs/UiShell/createMessageBus.d.ts +24 -0
  260. package/dist/src/labs/UiShell/createMessageBus.d.ts.map +1 -0
  261. package/dist/src/labs/UiShell/createStore.d.ts +22 -0
  262. package/dist/src/labs/UiShell/createStore.d.ts.map +1 -0
  263. package/dist/src/labs/UiShell/index.d.ts +16 -0
  264. package/dist/src/labs/UiShell/index.d.ts.map +1 -0
  265. package/dist/src/labs/UiShell/renderUiShell.d.ts +45 -0
  266. package/dist/src/labs/UiShell/renderUiShell.d.ts.map +1 -0
  267. package/dist/src/labs/UiShell/useHasUiShell.d.ts +13 -0
  268. package/dist/src/labs/UiShell/useHasUiShell.d.ts.map +1 -0
  269. package/dist/src/labs/UiShell/useScrollState.d.ts +16 -0
  270. package/dist/src/labs/UiShell/useScrollState.d.ts.map +1 -0
  271. package/dist/src/labs/index.d.ts +6 -2
  272. package/dist/src/labs/index.d.ts.map +1 -1
  273. package/dist/src/properties/ts/odyssey-react-mui.d.ts +13 -0
  274. package/dist/src/properties/ts/odyssey-react-mui.d.ts.map +1 -1
  275. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts +2 -0
  276. package/dist/src/properties/ts/odyssey-react-mui_cs.d.ts.map +1 -1
  277. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts +2 -0
  278. package/dist/src/properties/ts/odyssey-react-mui_da.d.ts.map +1 -1
  279. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts +2 -0
  280. package/dist/src/properties/ts/odyssey-react-mui_de.d.ts.map +1 -1
  281. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts +2 -0
  282. package/dist/src/properties/ts/odyssey-react-mui_el.d.ts.map +1 -1
  283. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts +2 -0
  284. package/dist/src/properties/ts/odyssey-react-mui_es.d.ts.map +1 -1
  285. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts +2 -0
  286. package/dist/src/properties/ts/odyssey-react-mui_fi.d.ts.map +1 -1
  287. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts +2 -0
  288. package/dist/src/properties/ts/odyssey-react-mui_fr.d.ts.map +1 -1
  289. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts +2 -0
  290. package/dist/src/properties/ts/odyssey-react-mui_ht.d.ts.map +1 -1
  291. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts +2 -0
  292. package/dist/src/properties/ts/odyssey-react-mui_hu.d.ts.map +1 -1
  293. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts +2 -0
  294. package/dist/src/properties/ts/odyssey-react-mui_id.d.ts.map +1 -1
  295. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts +2 -0
  296. package/dist/src/properties/ts/odyssey-react-mui_it.d.ts.map +1 -1
  297. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts +2 -0
  298. package/dist/src/properties/ts/odyssey-react-mui_ja.d.ts.map +1 -1
  299. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts +2 -0
  300. package/dist/src/properties/ts/odyssey-react-mui_ko.d.ts.map +1 -1
  301. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts +2 -0
  302. package/dist/src/properties/ts/odyssey-react-mui_ms.d.ts.map +1 -1
  303. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts +2 -0
  304. package/dist/src/properties/ts/odyssey-react-mui_nb.d.ts.map +1 -1
  305. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts +2 -0
  306. package/dist/src/properties/ts/odyssey-react-mui_nl_NL.d.ts.map +1 -1
  307. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts +2 -0
  308. package/dist/src/properties/ts/odyssey-react-mui_pl.d.ts.map +1 -1
  309. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts +2 -0
  310. package/dist/src/properties/ts/odyssey-react-mui_pt_BR.d.ts.map +1 -1
  311. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts +2 -0
  312. package/dist/src/properties/ts/odyssey-react-mui_ro.d.ts.map +1 -1
  313. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts +2 -0
  314. package/dist/src/properties/ts/odyssey-react-mui_ru.d.ts.map +1 -1
  315. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts +2 -0
  316. package/dist/src/properties/ts/odyssey-react-mui_sv.d.ts.map +1 -1
  317. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts +2 -0
  318. package/dist/src/properties/ts/odyssey-react-mui_th.d.ts.map +1 -1
  319. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts +2 -0
  320. package/dist/src/properties/ts/odyssey-react-mui_tr.d.ts.map +1 -1
  321. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts +2 -0
  322. package/dist/src/properties/ts/odyssey-react-mui_uk.d.ts.map +1 -1
  323. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts +2 -0
  324. package/dist/src/properties/ts/odyssey-react-mui_vi.d.ts.map +1 -1
  325. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts +2 -0
  326. package/dist/src/properties/ts/odyssey-react-mui_zh_CN.d.ts.map +1 -1
  327. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts +2 -0
  328. package/dist/src/properties/ts/odyssey-react-mui_zh_TW.d.ts.map +1 -1
  329. package/dist/src/test-selectors/querySelector.d.ts +2 -2
  330. package/dist/src/theme/components.d.ts +3 -1
  331. package/dist/src/theme/components.d.ts.map +1 -1
  332. package/dist/src/theme/createOdysseyMuiTheme.d.ts +2 -1
  333. package/dist/src/theme/createOdysseyMuiTheme.d.ts.map +1 -1
  334. package/dist/src/useAutocomplete.d.ts +29 -0
  335. package/dist/src/useAutocomplete.d.ts.map +1 -0
  336. package/dist/src/useContrastMode.d.ts +46 -0
  337. package/dist/src/useContrastMode.d.ts.map +1 -0
  338. package/dist/src/web-component/index.d.ts +14 -0
  339. package/dist/src/web-component/index.d.ts.map +1 -0
  340. package/dist/src/web-component/renderReactInWebComponent.d.ts +76 -0
  341. package/dist/src/web-component/renderReactInWebComponent.d.ts.map +1 -0
  342. package/dist/src/web-component/shadow-dom.d.ts +23 -0
  343. package/dist/src/web-component/shadow-dom.d.ts.map +1 -0
  344. package/dist/test-selectors/querySelector.js.map +1 -1
  345. package/dist/theme/components.js +36 -32
  346. package/dist/theme/components.js.map +1 -1
  347. package/dist/theme/createOdysseyMuiTheme.js +3 -2
  348. package/dist/theme/createOdysseyMuiTheme.js.map +1 -1
  349. package/dist/tsconfig.production.tsbuildinfo +1 -1
  350. package/dist/tsconfig.tsbuildinfo +1 -1
  351. package/dist/useAutocomplete.js +105 -0
  352. package/dist/useAutocomplete.js.map +1 -0
  353. package/dist/useContrastMode.js +93 -0
  354. package/dist/useContrastMode.js.map +1 -0
  355. package/dist/web-component/index.js +14 -0
  356. package/dist/web-component/index.js.map +1 -0
  357. package/dist/web-component/renderReactInWebComponent.js +72 -0
  358. package/dist/web-component/renderReactInWebComponent.js.map +1 -0
  359. package/dist/{createShadowDomElements.js → web-component/shadow-dom.js} +10 -12
  360. package/dist/web-component/shadow-dom.js.map +1 -0
  361. package/i18n.config.json +2 -1
  362. package/jest.config.cjs +1 -1
  363. package/jest.setup.js +0 -3
  364. package/package.json +7 -3
  365. package/src/Autocomplete.tsx +40 -330
  366. package/src/Box.tsx +4 -2
  367. package/src/Card.tsx +1 -0
  368. package/src/OdysseyDesignTokensContext.tsx +6 -3
  369. package/src/OdysseyProvider.tsx +13 -8
  370. package/src/OdysseyThemeProvider.test.tsx +209 -0
  371. package/src/OdysseyThemeProvider.tsx +42 -26
  372. package/src/Pagination/Pagination.test.tsx +305 -0
  373. package/src/Pagination/Pagination.tsx +86 -38
  374. package/src/Surface.tsx +18 -5
  375. package/src/Tag.tsx +64 -39
  376. package/src/createUniqueAlphabeticalId.test.ts +1 -1
  377. package/src/createUniqueId.test.ts +1 -1
  378. package/src/index.ts +6 -7
  379. package/src/labs/AppTile.tsx +169 -40
  380. package/src/labs/DataView/CardLayoutContent.tsx +12 -14
  381. package/src/labs/DataView/DataCard.tsx +137 -69
  382. package/src/labs/DataView/DataView.test.tsx +6 -4
  383. package/src/labs/DataView/DataView.tsx +6 -0
  384. package/src/labs/DataView/TableLayoutContent.tsx +6 -2
  385. package/src/labs/DataView/componentTypes.ts +7 -3
  386. package/src/labs/DataView/index.tsx +1 -0
  387. package/src/labs/OdysseyPickers/ComposablePicker.test.tsx +29 -0
  388. package/src/labs/OdysseyPickers/ComposablePicker.tsx +188 -0
  389. package/src/labs/OdysseyPickers/Picker.tsx +381 -0
  390. package/src/labs/OdysseyPickers/PickerVirtualizationListBox.tsx +191 -0
  391. package/src/labs/OdysseyPickers/PickerWithOptionAdornment.tsx +429 -0
  392. package/src/labs/OdysseyPickers/index.ts +15 -0
  393. package/src/labs/PageTemplate.tsx +18 -10
  394. package/src/labs/SideNav/CollapseIcon.tsx +14 -28
  395. package/src/labs/SideNav/HandleIcon.tsx +35 -0
  396. package/src/labs/{NavAccordion.tsx → SideNav/NavAccordion.tsx} +51 -16
  397. package/src/labs/SideNav/OktaAura.tsx +35 -0
  398. package/src/labs/SideNav/OktaLogo.tsx +5 -10
  399. package/src/labs/SideNav/SideNav.test.tsx +323 -0
  400. package/src/labs/SideNav/SideNav.tsx +405 -205
  401. package/src/labs/SideNav/SideNavFooterContent.tsx +36 -28
  402. package/src/labs/SideNav/SideNavHeader.tsx +62 -45
  403. package/src/labs/SideNav/SideNavItemContent.tsx +202 -69
  404. package/src/labs/SideNav/SideNavItemContentContext.tsx +29 -0
  405. package/src/labs/SideNav/SideNavItemLinkContent.tsx +18 -15
  406. package/src/labs/SideNav/SideNavLogo.tsx +41 -0
  407. package/src/labs/SideNav/SideNavToggleButton.tsx +245 -0
  408. package/src/labs/SideNav/SortableList/SortableItem.tsx +202 -0
  409. package/src/labs/SideNav/SortableList/SortableList.tsx +122 -0
  410. package/src/labs/SideNav/SortableList/SortableOverlay.tsx +34 -0
  411. package/src/labs/SideNav/types.ts +85 -36
  412. package/src/labs/TopNav/TopNav.tsx +95 -0
  413. package/src/labs/TopNav/TopNavLinksList.tsx +68 -0
  414. package/src/labs/TopNav/TopNavListItem.tsx +209 -0
  415. package/src/labs/TopNav/UserProfile.tsx +79 -0
  416. package/src/labs/TopNav/index.ts +14 -0
  417. package/src/labs/UiShell/UiShell.test.tsx +284 -0
  418. package/src/labs/UiShell/UiShell.tsx +109 -0
  419. package/src/labs/UiShell/UiShellContent.tsx +170 -0
  420. package/src/labs/UiShell/bufferLatest.test.ts +79 -0
  421. package/src/labs/UiShell/bufferLatest.ts +64 -0
  422. package/src/labs/UiShell/createMessageBus.test.ts +115 -0
  423. package/src/labs/UiShell/createMessageBus.ts +53 -0
  424. package/src/labs/UiShell/createStore.test.ts +103 -0
  425. package/src/labs/UiShell/createStore.ts +37 -0
  426. package/src/labs/UiShell/index.ts +17 -0
  427. package/src/labs/UiShell/renderUiShell.test.tsx +197 -0
  428. package/src/labs/UiShell/renderUiShell.tsx +132 -0
  429. package/src/labs/UiShell/useHasUiShell.ts +25 -0
  430. package/src/labs/UiShell/useScrollState.ts +56 -0
  431. package/src/labs/index.ts +10 -3
  432. package/src/properties/odyssey-react-mui.properties +14 -0
  433. package/src/properties/translations/odyssey-react-mui_cs.properties +2 -1
  434. package/src/properties/translations/odyssey-react-mui_da.properties +2 -1
  435. package/src/properties/translations/odyssey-react-mui_de.properties +2 -1
  436. package/src/properties/translations/odyssey-react-mui_el.properties +2 -1
  437. package/src/properties/translations/odyssey-react-mui_es.properties +2 -1
  438. package/src/properties/translations/odyssey-react-mui_fi.properties +2 -1
  439. package/src/properties/translations/odyssey-react-mui_fr.properties +4 -3
  440. package/src/properties/translations/odyssey-react-mui_ht.properties +2 -1
  441. package/src/properties/translations/odyssey-react-mui_hu.properties +2 -1
  442. package/src/properties/translations/odyssey-react-mui_id.properties +2 -1
  443. package/src/properties/translations/odyssey-react-mui_it.properties +3 -2
  444. package/src/properties/translations/odyssey-react-mui_ja.properties +8 -7
  445. package/src/properties/translations/odyssey-react-mui_ko.properties +2 -1
  446. package/src/properties/translations/odyssey-react-mui_ms.properties +2 -1
  447. package/src/properties/translations/odyssey-react-mui_nb.properties +2 -1
  448. package/src/properties/translations/odyssey-react-mui_nl_NL.properties +2 -1
  449. package/src/properties/translations/odyssey-react-mui_pl.properties +2 -1
  450. package/src/properties/translations/odyssey-react-mui_pt_BR.properties +2 -1
  451. package/src/properties/translations/odyssey-react-mui_ro.properties +2 -1
  452. package/src/properties/translations/odyssey-react-mui_ru.properties +2 -1
  453. package/src/properties/translations/odyssey-react-mui_sv.properties +2 -1
  454. package/src/properties/translations/odyssey-react-mui_th.properties +2 -1
  455. package/src/properties/translations/odyssey-react-mui_tr.properties +3 -2
  456. package/src/properties/translations/odyssey-react-mui_uk.properties +2 -1
  457. package/src/properties/translations/odyssey-react-mui_vi.properties +2 -1
  458. package/src/properties/translations/odyssey-react-mui_zh_CN.properties +2 -1
  459. package/src/properties/translations/odyssey-react-mui_zh_TW.properties +2 -1
  460. package/src/properties/ts/odyssey-react-mui.ts +1 -1
  461. package/src/properties/ts/odyssey-react-mui_cs.ts +1 -1
  462. package/src/properties/ts/odyssey-react-mui_da.ts +1 -1
  463. package/src/properties/ts/odyssey-react-mui_de.ts +1 -1
  464. package/src/properties/ts/odyssey-react-mui_el.ts +1 -1
  465. package/src/properties/ts/odyssey-react-mui_es.ts +1 -1
  466. package/src/properties/ts/odyssey-react-mui_fi.ts +1 -1
  467. package/src/properties/ts/odyssey-react-mui_fr.ts +1 -1
  468. package/src/properties/ts/odyssey-react-mui_ht.ts +1 -1
  469. package/src/properties/ts/odyssey-react-mui_hu.ts +1 -1
  470. package/src/properties/ts/odyssey-react-mui_id.ts +1 -1
  471. package/src/properties/ts/odyssey-react-mui_it.ts +1 -1
  472. package/src/properties/ts/odyssey-react-mui_ja.ts +1 -1
  473. package/src/properties/ts/odyssey-react-mui_ko.ts +1 -1
  474. package/src/properties/ts/odyssey-react-mui_ms.ts +1 -1
  475. package/src/properties/ts/odyssey-react-mui_nb.ts +1 -1
  476. package/src/properties/ts/odyssey-react-mui_nl_NL.ts +1 -1
  477. package/src/properties/ts/odyssey-react-mui_pl.ts +1 -1
  478. package/src/properties/ts/odyssey-react-mui_pt_BR.ts +1 -1
  479. package/src/properties/ts/odyssey-react-mui_ro.ts +1 -1
  480. package/src/properties/ts/odyssey-react-mui_ru.ts +1 -1
  481. package/src/properties/ts/odyssey-react-mui_sv.ts +1 -1
  482. package/src/properties/ts/odyssey-react-mui_th.ts +1 -1
  483. package/src/properties/ts/odyssey-react-mui_tr.ts +1 -1
  484. package/src/properties/ts/odyssey-react-mui_uk.ts +1 -1
  485. package/src/properties/ts/odyssey-react-mui_vi.ts +1 -1
  486. package/src/properties/ts/odyssey-react-mui_zh_CN.ts +1 -1
  487. package/src/properties/ts/odyssey-react-mui_zh_TW.ts +1 -1
  488. package/src/test-selectors/querySelector.ts +1 -1
  489. package/src/theme/components.tsx +50 -33
  490. package/src/theme/createOdysseyMuiTheme.ts +4 -3
  491. package/src/theme/useContrastMode.test.tsx +503 -0
  492. package/src/useAutocomplete.tsx +183 -0
  493. package/src/useContrastMode.tsx +149 -0
  494. package/src/web-component/index.ts +14 -0
  495. package/src/web-component/renderReactInWebComponent.test.tsx +156 -0
  496. package/src/web-component/renderReactInWebComponent.ts +153 -0
  497. package/src/web-component/shadow-dom.test.ts +24 -0
  498. package/src/{createShadowDomElements.ts → web-component/shadow-dom.ts} +15 -14
  499. package/dist/ContrastModeProvider.js +0 -86
  500. package/dist/ContrastModeProvider.js.map +0 -1
  501. package/dist/createShadowDomElements.js.map +0 -1
  502. package/dist/labs/NavAccordion.js.map +0 -1
  503. package/dist/labs/TopNav.js +0 -281
  504. package/dist/labs/TopNav.js.map +0 -1
  505. package/dist/src/ContrastModeProvider.d.ts +0 -34
  506. package/dist/src/ContrastModeProvider.d.ts.map +0 -1
  507. package/dist/src/createShadowDomElements.d.ts.map +0 -1
  508. package/dist/src/labs/NavAccordion.d.ts.map +0 -1
  509. package/dist/src/labs/TopNav.d.ts +0 -78
  510. package/dist/src/labs/TopNav.d.ts.map +0 -1
  511. package/src/ContrastModeProvider.tsx +0 -131
  512. package/src/labs/TopNav.tsx +0 -396
@@ -0,0 +1,65 @@
1
+ /*!
2
+ * Copyright (c) 2022-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
+ */
12
+
13
+ import styled from "@emotion/styled";
14
+ import { memo } from "react";
15
+ import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ export const TOP_NAV_HEIGHT = `${64 / 14}rem`;
19
+ const StyledLeftSideContainer = styled("div")(() => ({
20
+ flexGrow: 1
21
+ }));
22
+ const StyledRightSideContainer = styled("div")(() => ({
23
+ flexShrink: 0
24
+ }));
25
+ const StyledTopNavContainer = styled("div", {
26
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "isScrolled"
27
+ })(({
28
+ odysseyDesignTokens,
29
+ isScrolled
30
+ }) => ({
31
+ alignItems: "center",
32
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
33
+ boxShadow: isScrolled ? odysseyDesignTokens.DepthMedium : undefined,
34
+ clipPath: "inset(0 0 -100vh 0)",
35
+ display: "flex",
36
+ gap: odysseyDesignTokens.Spacing4,
37
+ height: "100%",
38
+ justifyContent: "space-between",
39
+ maxHeight: TOP_NAV_HEIGHT,
40
+ minHeight: TOP_NAV_HEIGHT,
41
+ paddingBlock: odysseyDesignTokens.Spacing2,
42
+ paddingInline: odysseyDesignTokens.Spacing8,
43
+ transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,
44
+ zIndex: 1
45
+ }));
46
+ const TopNav = ({
47
+ isScrolled,
48
+ leftSideComponent,
49
+ rightSideComponent
50
+ }) => {
51
+ const odysseyDesignTokens = useOdysseyDesignTokens();
52
+ return _jsxs(StyledTopNavContainer, {
53
+ odysseyDesignTokens: odysseyDesignTokens,
54
+ isScrolled: isScrolled,
55
+ children: [_jsx(StyledLeftSideContainer, {
56
+ children: leftSideComponent ?? _jsx("div", {})
57
+ }), _jsx(StyledRightSideContainer, {
58
+ children: rightSideComponent ?? _jsx("div", {})
59
+ })]
60
+ });
61
+ };
62
+ const MemoizedTopNav = memo(TopNav);
63
+ MemoizedTopNav.displayName = "TopNav";
64
+ export { MemoizedTopNav as TopNav };
65
+ //# sourceMappingURL=TopNav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopNav.js","names":["styled","memo","useOdysseyDesignTokens","jsx","_jsx","jsxs","_jsxs","TOP_NAV_HEIGHT","StyledLeftSideContainer","flexGrow","StyledRightSideContainer","flexShrink","StyledTopNavContainer","shouldForwardProp","prop","odysseyDesignTokens","isScrolled","alignItems","backgroundColor","HueNeutral50","boxShadow","DepthMedium","undefined","clipPath","display","gap","Spacing4","height","justifyContent","maxHeight","minHeight","paddingBlock","Spacing2","paddingInline","Spacing8","transition","TransitionDurationMain","TransitionTimingMain","zIndex","TopNav","leftSideComponent","rightSideComponent","children","MemoizedTopNav","displayName"],"sources":["../../../src/labs/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\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\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\" && prop !== \"isScrolled\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isScrolled?: boolean;\n}>(({ odysseyDesignTokens, isScrolled }) => ({\n alignItems: \"center\",\n backgroundColor: odysseyDesignTokens.HueNeutral50,\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 transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: 1,\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\n return (\n <StyledTopNavContainer\n odysseyDesignTokens={odysseyDesignTokens}\n isScrolled={isScrolled}\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;AAAC,SAK9CC,sBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAGxB,OAAO,MAAMC,cAAc,GAAI,GAAE,EAAE,GAAG,EAAG,KAAI;AAE7C,MAAMC,uBAAuB,GAAGR,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACnDS,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AAEH,MAAMC,wBAAwB,GAAGV,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACpDW,UAAU,EAAE;AACd,CAAC,CAAC,CAAC;AAEH,MAAMC,qBAAqB,GAAGZ,MAAM,CAAC,KAAK,EAAE;EAC1Ca,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,qBAAqB,IAAIA,IAAI,KAAK;AAC/C,CAAC,CAAC,CAGC,CAAC;EAAEC,mBAAmB;EAAEC;AAAW,CAAC,MAAM;EAC3CC,UAAU,EAAE,QAAQ;EACpBC,eAAe,EAAEH,mBAAmB,CAACI,YAAY;EACjDC,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,cAAc;EACzBwB,YAAY,EAAEhB,mBAAmB,CAACiB,QAAQ;EAC1CC,aAAa,EAAElB,mBAAmB,CAACmB,QAAQ;EAC3CC,UAAU,EAAG,cAAapB,mBAAmB,CAACqB,sBAAuB,IAAGrB,mBAAmB,CAACsB,oBAAqB,EAAC;EAClHC,MAAM,EAAE;AACV,CAAC,CAAC,CAAC;AAiBH,MAAMC,MAAM,GAAGA,CAAC;EACdvB,UAAU;EACVwB,iBAAiB;EACjBC;AACW,CAAC,KAAK;EACjB,MAAM1B,mBAAmB,GAAGb,sBAAsB,CAAC,CAAC;EAEpD,OACEI,KAAA,CAACM,qBAAqB;IACpBG,mBAAmB,EAAEA,mBAAoB;IACzCC,UAAU,EAAEA,UAAW;IAAA0B,QAAA,GAEvBtC,IAAA,CAACI,uBAAuB;MAAAkC,QAAA,EACrBF,iBAAiB,IAAIpC,IAAA,UAAM;IAAC,CACN,CAAC,EAC1BA,IAAA,CAACM,wBAAwB;MAAAgC,QAAA,EACtBD,kBAAkB,IAAIrC,IAAA,UAAM;IAAC,CACN,CAAC;EAAA,CACN,CAAC;AAE5B,CAAC;AAED,MAAMuC,cAAc,GAAG1C,IAAI,CAACsC,MAAM,CAAC;AACnCI,cAAc,CAACC,WAAW,GAAG,QAAQ;AAErC,SAASD,cAAc,IAAIJ,MAAM"}
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * Copyright (c) 2022-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
+ */
12
+
13
+ import styled from "@emotion/styled";
14
+ import { memo } from "react";
15
+ import { TopNavListItem } from "./TopNavListItem.js";
16
+ import { createElement as _createElement } from "react";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ const StyledTopNavList = styled("ul")(() => ({
19
+ alignItems: "center",
20
+ display: "flex",
21
+ listStyle: "none",
22
+ listStyleType: "none",
23
+ padding: 0
24
+ }));
25
+ const TopNavLinksList = ({
26
+ topNavLinkItems
27
+ }) => _jsx("nav", {
28
+ children: _jsx(StyledTopNavList, {
29
+ children: topNavLinkItems.map(item => _createElement(TopNavListItem, {
30
+ ...item,
31
+ key: item.id
32
+ }))
33
+ })
34
+ });
35
+ const MemoizedTopNavLinksList = memo(TopNavLinksList);
36
+ MemoizedTopNavLinksList.displayName = "TopNavLinksList";
37
+ export { MemoizedTopNavLinksList as TopNavLinksList };
38
+ //# sourceMappingURL=TopNavLinksList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopNavLinksList.js","names":["styled","memo","TopNavListItem","createElement","_createElement","jsx","_jsx","StyledTopNavList","alignItems","display","listStyle","listStyleType","padding","TopNavLinksList","topNavLinkItems","children","map","item","key","id","MemoizedTopNavLinksList","displayName"],"sources":["../../../src/labs/TopNav/TopNavLinksList.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\";\nimport { TopNavListItem, TopNavListItemProps } from \"./TopNavListItem\";\nimport { UserProfileProps } from \"./UserProfile\";\n\nexport type TopNavLinksListProps = {\n /**\n * Pass in an additional component like `Button` that will be displayed after the nav link items\n */\n additionalNavItem?: ReactElement;\n /**\n * URL to the help page.\n */\n helpPageHref?: string;\n /**\n * Pass in a SearchField component with the variant=\"filled\" prop set\n */\n searchField?: ReactElement;\n /**\n * URL to settings page.\n */\n settingsPageHref?: string;\n /**\n * Nav links in the top nav\n */\n topNavLinkItems: TopNavListItemProps[];\n /**\n * Displays user account info\n */\n userProfile?: UserProfileProps;\n} & Pick<HtmlProps, \"testId\">;\n\nconst StyledTopNavList = styled(\"ul\")(() => ({\n alignItems: \"center\",\n display: \"flex\",\n listStyle: \"none\",\n listStyleType: \"none\",\n padding: 0,\n}));\n\nconst TopNavLinksList = ({ topNavLinkItems }: TopNavLinksListProps) => (\n <nav>\n <StyledTopNavList>\n {topNavLinkItems.map((item) => (\n <TopNavListItem {...item} key={item.id} />\n ))}\n </StyledTopNavList>\n </nav>\n);\n\nconst MemoizedTopNavLinksList = memo(TopNavLinksList);\nMemoizedTopNavLinksList.displayName = \"TopNavLinksList\";\n\nexport { MemoizedTopNavLinksList as TopNavLinksList };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAA2B,OAAO;AAAC,SAGvCC,cAAc;AAAA,SAAAC,aAAA,IAAAC,cAAA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AA8BvB,MAAMC,gBAAgB,GAAGP,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO;EAC3CQ,UAAU,EAAE,QAAQ;EACpBC,OAAO,EAAE,MAAM;EACfC,SAAS,EAAE,MAAM;EACjBC,aAAa,EAAE,MAAM;EACrBC,OAAO,EAAE;AACX,CAAC,CAAC,CAAC;AAEH,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAsC,CAAC,KAChER,IAAA;EAAAS,QAAA,EACET,IAAA,CAACC,gBAAgB;IAAAQ,QAAA,EACdD,eAAe,CAACE,GAAG,CAAEC,IAAI,IACxBb,cAAA,CAACF,cAAc;MAAA,GAAKe,IAAI;MAAEC,GAAG,EAAED,IAAI,CAACE;IAAG,CAAE,CAC1C;EAAC,CACc;AAAC,CAChB,CACN;AAED,MAAMC,uBAAuB,GAAGnB,IAAI,CAACY,eAAe,CAAC;AACrDO,uBAAuB,CAACC,WAAW,GAAG,iBAAiB;AAEvD,SAASD,uBAAuB,IAAIP,eAAe"}
@@ -0,0 +1,132 @@
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
+ */
12
+
13
+ import styled from "@emotion/styled";
14
+ import { memo, useCallback } from "react";
15
+ import { Link } from "../../Link.js";
16
+ import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ const StyledTopNavItemLabelContainer = styled("div", {
20
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
21
+ })(({
22
+ odysseyDesignTokens
23
+ }) => ({
24
+ alignItems: "center",
25
+ display: "flex",
26
+ flexWrap: "wrap",
27
+ fontSize: odysseyDesignTokens.TypographyScale0,
28
+ fontWeight: odysseyDesignTokens.TypographyWeightHeading
29
+ }));
30
+ const StyledTopNavListItem = styled("li", {
31
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens" && prop !== "isDisabled"
32
+ })(({
33
+ odysseyDesignTokens,
34
+ isDisabled
35
+ }) => ({
36
+ alignItems: "center",
37
+ color: `${isDisabled ? odysseyDesignTokens.TypographyColorDisabled : odysseyDesignTokens.TypographyColorHeading} !important`,
38
+ cursor: isDisabled ? "default" : "pointer",
39
+ display: "flex",
40
+ pointerEvents: isDisabled ? "none" : "auto",
41
+ a: {
42
+ alignItems: "center",
43
+ color: `${odysseyDesignTokens.TypographyColorHeading} !important`,
44
+ display: "flex",
45
+ paddingBlock: odysseyDesignTokens.Spacing2,
46
+ paddingInline: odysseyDesignTokens.Spacing4,
47
+ "&:hover": {
48
+ backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : "inherit",
49
+ textDecoration: "none"
50
+ },
51
+ "&:focus-visible": {
52
+ backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : "inherit",
53
+ borderRadius: 0,
54
+ outlineOffset: 0,
55
+ outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain
56
+ }
57
+ },
58
+ "div[role='button']:hover": {
59
+ backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : "inherit"
60
+ }
61
+ }));
62
+ const StyledNavItemContentClickContainer = styled("div", {
63
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
64
+ })(({
65
+ odysseyDesignTokens
66
+ }) => ({
67
+ alignItems: "center",
68
+ display: "flex",
69
+ paddingBlock: odysseyDesignTokens.Spacing2,
70
+ paddingInline: odysseyDesignTokens.Spacing4,
71
+ width: "100%",
72
+ "&:focus-visible": {
73
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
74
+ borderRadius: 0,
75
+ outlineColor: odysseyDesignTokens.FocusOutlineColorPrimary,
76
+ outlineStyle: odysseyDesignTokens.FocusOutlineStyle,
77
+ outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain,
78
+ textDecoration: "none"
79
+ }
80
+ }));
81
+ const TopNavListItem = ({
82
+ href,
83
+ id,
84
+ isDisabled,
85
+ label,
86
+ onClick,
87
+ target
88
+ }) => {
89
+ const odysseyDesignTokens = useOdysseyDesignTokens();
90
+ const topNavItemContentKeyHandler = useCallback(event => {
91
+ if (event?.key === "Enter") {
92
+ event.preventDefault();
93
+ event.stopPropagation();
94
+ onClick?.(event);
95
+ }
96
+ }, [onClick]);
97
+ return _jsxs(StyledTopNavListItem, {
98
+ "aria-disabled": isDisabled,
99
+ id: id,
100
+ isDisabled: isDisabled,
101
+ odysseyDesignTokens: odysseyDesignTokens,
102
+ children: [isDisabled && _jsx(StyledNavItemContentClickContainer, {
103
+ odysseyDesignTokens: odysseyDesignTokens,
104
+ children: _jsx(StyledTopNavItemLabelContainer, {
105
+ odysseyDesignTokens: odysseyDesignTokens,
106
+ children: label
107
+ })
108
+ }), !isDisabled && href && _jsx(Link, {
109
+ href: href,
110
+ onClick: onClick,
111
+ target: target,
112
+ children: _jsx(StyledTopNavItemLabelContainer, {
113
+ odysseyDesignTokens: odysseyDesignTokens,
114
+ children: label
115
+ })
116
+ }), !isDisabled && !href && _jsx(StyledNavItemContentClickContainer, {
117
+ odysseyDesignTokens: odysseyDesignTokens,
118
+ onClick: onClick,
119
+ onKeyDown: topNavItemContentKeyHandler,
120
+ role: "button",
121
+ tabIndex: 0,
122
+ children: _jsx(StyledTopNavItemLabelContainer, {
123
+ odysseyDesignTokens: odysseyDesignTokens,
124
+ children: label
125
+ })
126
+ })]
127
+ });
128
+ };
129
+ const MemoizedTopNavListItem = memo(TopNavListItem);
130
+ MemoizedTopNavListItem.displayName = "TopNavListItem";
131
+ export { MemoizedTopNavListItem as TopNavListItem };
132
+ //# sourceMappingURL=TopNavListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopNavListItem.js","names":["styled","memo","useCallback","Link","useOdysseyDesignTokens","jsx","_jsx","jsxs","_jsxs","StyledTopNavItemLabelContainer","shouldForwardProp","prop","odysseyDesignTokens","alignItems","display","flexWrap","fontSize","TypographyScale0","fontWeight","TypographyWeightHeading","StyledTopNavListItem","isDisabled","color","TypographyColorDisabled","TypographyColorHeading","cursor","pointerEvents","a","paddingBlock","Spacing2","paddingInline","Spacing4","backgroundColor","HueNeutral50","textDecoration","borderRadius","outlineOffset","outlineWidth","FocusOutlineWidthMain","StyledNavItemContentClickContainer","width","outlineColor","FocusOutlineColorPrimary","outlineStyle","FocusOutlineStyle","TopNavListItem","href","id","label","onClick","target","topNavItemContentKeyHandler","event","key","preventDefault","stopPropagation","children","onKeyDown","role","tabIndex","MemoizedTopNavListItem","displayName"],"sources":["../../../src/labs/TopNav/TopNavListItem.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 memo,\n useCallback,\n KeyboardEventHandler,\n MouseEventHandler,\n} from \"react\";\n\nimport { Link } from \"../../Link\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\n\nconst StyledTopNavItemLabelContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n flexWrap: \"wrap\",\n fontSize: odysseyDesignTokens.TypographyScale0,\n fontWeight: odysseyDesignTokens.TypographyWeightHeading,\n}));\n\nconst StyledTopNavListItem = styled(\"li\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"isDisabled\",\n})<{\n odysseyDesignTokens: DesignTokens;\n isDisabled?: boolean;\n}>(({ odysseyDesignTokens, isDisabled }) => ({\n alignItems: \"center\",\n color: `${isDisabled ? odysseyDesignTokens.TypographyColorDisabled : odysseyDesignTokens.TypographyColorHeading} !important`,\n cursor: isDisabled ? \"default\" : \"pointer\",\n display: \"flex\",\n pointerEvents: isDisabled ? \"none\" : \"auto\",\n\n a: {\n alignItems: \"center\",\n color: `${odysseyDesignTokens.TypographyColorHeading} !important`,\n display: \"flex\",\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing4,\n\n \"&:hover\": {\n backgroundColor: !isDisabled\n ? odysseyDesignTokens.HueNeutral50\n : \"inherit\",\n textDecoration: \"none\",\n },\n\n \"&:focus-visible\": {\n backgroundColor: !isDisabled\n ? odysseyDesignTokens.HueNeutral50\n : \"inherit\",\n borderRadius: 0,\n outlineOffset: 0,\n outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain,\n },\n },\n\n \"div[role='button']:hover\": {\n backgroundColor: !isDisabled ? odysseyDesignTokens.HueNeutral50 : \"inherit\",\n },\n}));\n\nconst StyledNavItemContentClickContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"flex\",\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing4,\n width: \"100%\",\n\n \"&:focus-visible\": {\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n borderRadius: 0,\n outlineColor: odysseyDesignTokens.FocusOutlineColorPrimary,\n outlineStyle: odysseyDesignTokens.FocusOutlineStyle,\n outlineWidth: odysseyDesignTokens.FocusOutlineWidthMain,\n textDecoration: \"none\",\n },\n}));\n\nexport type TopNavListItemProps = {\n /**\n * Without a hyperlink reference, `onClick` functionality will not function.\n * If `undefined`, static text will be displayed.\n */\n href?: string;\n /**\n * HTML `id` attribute.\n */\n id: string;\n /**\n * Determines whether the link item is disabled.\n */\n isDisabled?: boolean;\n /**\n * Display text for the link.\n */\n label: string;\n /**\n * Handles both mouse and keyboard interactions.\n */\n onClick?: MouseEventHandler<HTMLAnchorElement> &\n MouseEventHandler<HTMLDivElement> &\n KeyboardEventHandler<HTMLDivElement>;\n /**\n * Where to display the linked URL.\n */\n target?: string;\n};\n\nconst TopNavListItem = ({\n href,\n id,\n isDisabled,\n label,\n onClick,\n target,\n}: TopNavListItemProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n const topNavItemContentKeyHandler = useCallback<\n KeyboardEventHandler<HTMLDivElement>\n >(\n (event) => {\n if (event?.key === \"Enter\") {\n event.preventDefault();\n event.stopPropagation();\n onClick?.(event);\n }\n },\n [onClick],\n );\n\n return (\n <StyledTopNavListItem\n aria-disabled={isDisabled}\n id={id}\n isDisabled={isDisabled}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {\n // Use Link for nav items with links and div for disabled or non-link items\n isDisabled && (\n <StyledNavItemContentClickContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledTopNavItemLabelContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {label}\n </StyledTopNavItemLabelContainer>\n </StyledNavItemContentClickContainer>\n )\n }\n\n {!isDisabled && href && (\n <Link href={href} onClick={onClick} target={target}>\n <StyledTopNavItemLabelContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {label}\n </StyledTopNavItemLabelContainer>\n </Link>\n )}\n\n {!isDisabled && !href && (\n <StyledNavItemContentClickContainer\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={onClick}\n onKeyDown={topNavItemContentKeyHandler}\n role=\"button\"\n tabIndex={0}\n >\n <StyledTopNavItemLabelContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {label}\n </StyledTopNavItemLabelContainer>\n </StyledNavItemContentClickContainer>\n )}\n </StyledTopNavListItem>\n );\n};\n\nconst MemoizedTopNavListItem = memo(TopNavListItem);\nMemoizedTopNavListItem.displayName = \"TopNavListItem\";\n\nexport { MemoizedTopNavListItem as TopNavListItem };\n"],"mappings":"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"}
@@ -0,0 +1,65 @@
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
+ */
12
+
13
+ import styled from "@emotion/styled";
14
+ import { memo } from "react";
15
+ import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
16
+ import { Subordinate } from "../../Typography.js";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ const UserProfileContainer = styled("div", {
20
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
21
+ })(({
22
+ odysseyDesignTokens
23
+ }) => ({
24
+ display: "flex",
25
+ alignItems: "center",
26
+ paddingInlineEnd: odysseyDesignTokens.Spacing4
27
+ }));
28
+ const UserProfileIconContainer = styled("div", {
29
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
30
+ })(({
31
+ odysseyDesignTokens
32
+ }) => ({
33
+ display: "flex",
34
+ paddingInlineEnd: odysseyDesignTokens.Spacing2
35
+ }));
36
+ const UserProfileInfoContainer = styled("div")(() => ({
37
+ display: "flex",
38
+ flexDirection: "column"
39
+ }));
40
+ const UserProfile = ({
41
+ profileIcon,
42
+ userName,
43
+ orgName
44
+ }) => {
45
+ const odysseyDesignTokens = useOdysseyDesignTokens();
46
+ return _jsxs(UserProfileContainer, {
47
+ odysseyDesignTokens: odysseyDesignTokens,
48
+ children: [profileIcon && _jsx(UserProfileIconContainer, {
49
+ odysseyDesignTokens: odysseyDesignTokens,
50
+ children: profileIcon
51
+ }), _jsxs(UserProfileInfoContainer, {
52
+ children: [_jsx(Subordinate, {
53
+ color: "textPrimary",
54
+ children: userName
55
+ }), _jsx(Subordinate, {
56
+ color: "textSecondary",
57
+ children: orgName
58
+ })]
59
+ })]
60
+ });
61
+ };
62
+ const MemoizedUserProfile = memo(UserProfile);
63
+ MemoizedUserProfile.displayName = "UserProfile";
64
+ export { MemoizedUserProfile as UserProfile };
65
+ //# sourceMappingURL=UserProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserProfile.js","names":["styled","memo","useOdysseyDesignTokens","Subordinate","jsx","_jsx","jsxs","_jsxs","UserProfileContainer","shouldForwardProp","prop","odysseyDesignTokens","display","alignItems","paddingInlineEnd","Spacing4","UserProfileIconContainer","Spacing2","UserProfileInfoContainer","flexDirection","UserProfile","profileIcon","userName","orgName","children","color","MemoizedUserProfile","displayName"],"sources":["../../../src/labs/TopNav/UserProfile.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, type ReactElement } from \"react\";\n\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\nimport { Subordinate } from \"../../Typography\";\n\nconst UserProfileContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({\n display: \"flex\",\n alignItems: \"center\",\n paddingInlineEnd: odysseyDesignTokens.Spacing4,\n}));\n\nconst UserProfileIconContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})(({ odysseyDesignTokens }: { odysseyDesignTokens: DesignTokens }) => ({\n display: \"flex\",\n paddingInlineEnd: odysseyDesignTokens.Spacing2,\n}));\n\nconst UserProfileInfoContainer = styled(\"div\")(() => ({\n display: \"flex\",\n flexDirection: \"column\",\n}));\n\nexport type UserProfileProps = {\n /**\n * Logged in user profile icon to be displayed in the top nav\n */\n profileIcon?: ReactElement;\n /**\n * Logged in user info to be displayed in the top nav\n */\n userName: string;\n /**\n * Org name of the logged in user\n */\n orgName: string;\n};\n\nconst UserProfile = ({ profileIcon, userName, orgName }: UserProfileProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n\n return (\n <UserProfileContainer odysseyDesignTokens={odysseyDesignTokens}>\n {profileIcon && (\n <UserProfileIconContainer odysseyDesignTokens={odysseyDesignTokens}>\n {profileIcon}\n </UserProfileIconContainer>\n )}\n\n <UserProfileInfoContainer>\n <Subordinate color=\"textPrimary\">{userName}</Subordinate>\n <Subordinate color=\"textSecondary\">{orgName}</Subordinate>\n </UserProfileInfoContainer>\n </UserProfileContainer>\n );\n};\n\nconst MemoizedUserProfile = memo(UserProfile);\nMemoizedUserProfile.displayName = \"UserProfile\";\n\nexport { MemoizedUserProfile as UserProfile };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAA2B,OAAO;AAAC,SAI9CC,sBAAsB;AAAA,SAEfC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpB,MAAMC,oBAAoB,GAAGR,MAAM,CAAC,KAAK,EAAE;EACzCS,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAAC,CAAC;EAAEC;AAA2D,CAAC,MAAM;EACtEC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE,QAAQ;EACpBC,gBAAgB,EAAEH,mBAAmB,CAACI;AACxC,CAAC,CAAC,CAAC;AAEH,MAAMC,wBAAwB,GAAGhB,MAAM,CAAC,KAAK,EAAE;EAC7CS,iBAAiB,EAAGC,IAAI,IAAKA,IAAI,KAAK;AACxC,CAAC,CAAC,CAAC,CAAC;EAAEC;AAA2D,CAAC,MAAM;EACtEC,OAAO,EAAE,MAAM;EACfE,gBAAgB,EAAEH,mBAAmB,CAACM;AACxC,CAAC,CAAC,CAAC;AAEH,MAAMC,wBAAwB,GAAGlB,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;EACpDY,OAAO,EAAE,MAAM;EACfO,aAAa,EAAE;AACjB,CAAC,CAAC,CAAC;AAiBH,MAAMC,WAAW,GAAGA,CAAC;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAA0B,CAAC,KAAK;EAC5E,MAAMZ,mBAAmB,GAAGT,sBAAsB,CAAC,CAAC;EAEpD,OACEK,KAAA,CAACC,oBAAoB;IAACG,mBAAmB,EAAEA,mBAAoB;IAAAa,QAAA,GAC5DH,WAAW,IACVhB,IAAA,CAACW,wBAAwB;MAACL,mBAAmB,EAAEA,mBAAoB;MAAAa,QAAA,EAChEH;IAAW,CACY,CAC3B,EAEDd,KAAA,CAACW,wBAAwB;MAAAM,QAAA,GACvBnB,IAAA,CAACF,WAAW;QAACsB,KAAK,EAAC,aAAa;QAAAD,QAAA,EAAEF;MAAQ,CAAc,CAAC,EACzDjB,IAAA,CAACF,WAAW;QAACsB,KAAK,EAAC,eAAe;QAAAD,QAAA,EAAED;MAAO,CAAc,CAAC;IAAA,CAClC,CAAC;EAAA,CACP,CAAC;AAE3B,CAAC;AAED,MAAMG,mBAAmB,GAAGzB,IAAI,CAACmB,WAAW,CAAC;AAC7CM,mBAAmB,CAACC,WAAW,GAAG,aAAa;AAE/C,SAASD,mBAAmB,IAAIN,WAAW"}
@@ -0,0 +1,14 @@
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
+ */
12
+ export * from "./TopNav.js";
13
+ export * from "./UserProfile.js";
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/labs/TopNav/index.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\nexport * from \"./TopNav\";\nexport * from \"./UserProfile\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA;AAAA"}
@@ -0,0 +1,68 @@
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
+ */
12
+
13
+ import { memo, useEffect, useState } from "react";
14
+ import { ErrorBoundary } from "react-error-boundary";
15
+ import { CssBaseline } from "../../CssBaseline.js";
16
+ import { OdysseyProvider } from "../../OdysseyProvider.js";
17
+ import { UiShellContent } from "./UiShellContent.js";
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ export const defaultComponentProps = {
21
+ sideNavProps: {
22
+ appName: "",
23
+ sideNavItems: []
24
+ },
25
+ topNavProps: {}
26
+ };
27
+ const UiShell = ({
28
+ appComponent,
29
+ appRootElement,
30
+ onError = console.error,
31
+ onSubscriptionCreated,
32
+ optionalComponents,
33
+ stylesRootElement,
34
+ subscribeToPropChanges
35
+ }) => {
36
+ const [componentProps, setComponentProps] = useState(defaultComponentProps);
37
+ useEffect(() => {
38
+ const unsubscribe = subscribeToPropChanges(componentProps => {
39
+ setComponentProps(componentProps || defaultComponentProps);
40
+ });
41
+ onSubscriptionCreated();
42
+ return () => {
43
+ unsubscribe();
44
+ };
45
+ }, [onSubscriptionCreated, subscribeToPropChanges]);
46
+ return _jsx(ErrorBoundary, {
47
+ fallback: appComponent,
48
+ onError: onError,
49
+ children: _jsx(OdysseyProvider, {
50
+ emotionRootElement: stylesRootElement,
51
+ shadowRootElement: appRootElement,
52
+ children: _jsxs(ErrorBoundary, {
53
+ fallback: appComponent,
54
+ onError: onError,
55
+ children: [_jsx(CssBaseline, {}), _jsx(UiShellContent, {
56
+ ...componentProps,
57
+ appComponent: appComponent,
58
+ onError: onError,
59
+ optionalComponents: optionalComponents
60
+ })]
61
+ })
62
+ })
63
+ });
64
+ };
65
+ const MemoizedUiShell = memo(UiShell);
66
+ MemoizedUiShell.displayName = "UiShell";
67
+ export { MemoizedUiShell as UiShell };
68
+ //# sourceMappingURL=UiShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UiShell.js","names":["memo","useEffect","useState","ErrorBoundary","CssBaseline","OdysseyProvider","UiShellContent","jsx","_jsx","jsxs","_jsxs","defaultComponentProps","sideNavProps","appName","sideNavItems","topNavProps","UiShell","appComponent","appRootElement","onError","console","error","onSubscriptionCreated","optionalComponents","stylesRootElement","subscribeToPropChanges","componentProps","setComponentProps","unsubscribe","fallback","children","emotionRootElement","shadowRootElement","MemoizedUiShell","displayName"],"sources":["../../../src/labs/UiShell/UiShell.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, useEffect, useState, type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { CssBaseline } from \"../../CssBaseline\";\nimport { OdysseyProvider } from \"../../OdysseyProvider\";\nimport {\n UiShellContent,\n type UiShellContentProps,\n type UiShellNavComponentProps,\n} from \"./UiShellContent\";\nimport { type ReactRootElements } from \"../../web-component\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: {\n appName: \"\",\n sideNavItems: [],\n },\n topNavProps: {},\n} as const;\n\nexport type UiShellProps = {\n /**\n * Notifies when subscribed to prop changes.\n *\n * UI Shell listens to prop updates, and it won't subscribe synchronously. Because of that, this callback notifies when that subscription is ready.\n */\n onSubscriptionCreated: () => void;\n /**\n * This is a callback that provides a subscriber callback to listen for changes to state.\n * It allows UI Shell to listen for state changes.\n *\n * The props coming in this callback go directly to a React state; therefore, it shares the same signature and provides a previous state.\n */\n subscribeToPropChanges: (\n subscriber: (\n componentProps: SetStateAction<UiShellNavComponentProps>,\n ) => void,\n ) => () => void;\n} & Pick<ReactRootElements, \"appRootElement\" | \"stylesRootElement\"> &\n Pick<UiShellContentProps, \"appComponent\" | \"onError\" | \"optionalComponents\">;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst UiShell = ({\n appComponent,\n appRootElement,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n stylesRootElement,\n subscribeToPropChanges,\n}: UiShellProps) => {\n const [componentProps, setComponentProps] = useState(defaultComponentProps);\n\n useEffect(() => {\n const unsubscribe = subscribeToPropChanges((componentProps) => {\n // If for some reason nothing is passed as `componentProps`, we fallback on `defaultComponentProps` as a safety mechanism to ensure nothing breaks.\n setComponentProps(componentProps || defaultComponentProps);\n });\n\n onSubscriptionCreated();\n\n return () => {\n unsubscribe();\n };\n }, [onSubscriptionCreated, subscribeToPropChanges]);\n\n return (\n <ErrorBoundary fallback={appComponent} onError={onError}>\n <OdysseyProvider\n emotionRootElement={stylesRootElement}\n shadowRootElement={appRootElement}\n >\n <ErrorBoundary fallback={appComponent} onError={onError}>\n <CssBaseline />\n\n <UiShellContent\n {...componentProps}\n appComponent={appComponent}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n </ErrorBoundary>\n </OdysseyProvider>\n </ErrorBoundary>\n );\n};\n\nconst MemoizedUiShell = memo(UiShell);\nMemoizedUiShell.displayName = \"UiShell\";\n\nexport { MemoizedUiShell as UiShell };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAA6B,OAAO;AACtE,SAASC,aAAa,QAAQ,sBAAsB;AAAC,SAE5CC,WAAW;AAAA,SACXC,eAAe;AAAA,SAEtBC,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAMhB,OAAO,MAAMC,qBAA+C,GAAG;EAC7DC,YAAY,EAAE;IACZC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE;EAChB,CAAC;EACDC,WAAW,EAAE,CAAC;AAChB,CAAU;AA8BV,MAAMC,OAAO,GAAGA,CAAC;EACfC,YAAY;EACZC,cAAc;EACdC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,qBAAqB;EACrBC,kBAAkB;EAClBC,iBAAiB;EACjBC;AACY,CAAC,KAAK;EAClB,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGzB,QAAQ,CAACS,qBAAqB,CAAC;EAE3EV,SAAS,CAAC,MAAM;IACd,MAAM2B,WAAW,GAAGH,sBAAsB,CAAEC,cAAc,IAAK;MAE7DC,iBAAiB,CAACD,cAAc,IAAIf,qBAAqB,CAAC;IAC5D,CAAC,CAAC;IAEFW,qBAAqB,CAAC,CAAC;IAEvB,OAAO,MAAM;MACXM,WAAW,CAAC,CAAC;IACf,CAAC;EACH,CAAC,EAAE,CAACN,qBAAqB,EAAEG,sBAAsB,CAAC,CAAC;EAEnD,OACEjB,IAAA,CAACL,aAAa;IAAC0B,QAAQ,EAAEZ,YAAa;IAACE,OAAO,EAAEA,OAAQ;IAAAW,QAAA,EACtDtB,IAAA,CAACH,eAAe;MACd0B,kBAAkB,EAAEP,iBAAkB;MACtCQ,iBAAiB,EAAEd,cAAe;MAAAY,QAAA,EAElCpB,KAAA,CAACP,aAAa;QAAC0B,QAAQ,EAAEZ,YAAa;QAACE,OAAO,EAAEA,OAAQ;QAAAW,QAAA,GACtDtB,IAAA,CAACJ,WAAW,IAAE,CAAC,EAEfI,IAAA,CAACF,cAAc;UAAA,GACToB,cAAc;UAClBT,YAAY,EAAEA,YAAa;UAC3BE,OAAO,EAAEA,OAAQ;UACjBI,kBAAkB,EAAEA;QAAmB,CACxC,CAAC;MAAA,CACW;IAAC,CACD;EAAC,CACL,CAAC;AAEpB,CAAC;AAED,MAAMU,eAAe,GAAGjC,IAAI,CAACgB,OAAO,CAAC;AACrCiB,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAIjB,OAAO"}
@@ -0,0 +1,114 @@
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
+ */
12
+
13
+ import styled from "@emotion/styled";
14
+ import { memo } from "react";
15
+ import { ErrorBoundary } from "react-error-boundary";
16
+ import { SideNav } from "../SideNav/index.js";
17
+ import { TopNav } from "../TopNav/index.js";
18
+ import { useOdysseyDesignTokens } from "../../OdysseyDesignTokensContext.js";
19
+ import { useScrollState } from "./useScrollState.js";
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
+ const StyledAppContainer = styled("div", {
23
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
24
+ })(({
25
+ odysseyDesignTokens
26
+ }) => ({
27
+ gridArea: "app-content",
28
+ overflowX: "hidden",
29
+ overflowY: "auto",
30
+ paddingBlock: odysseyDesignTokens.Spacing5,
31
+ paddingInline: odysseyDesignTokens.Spacing8
32
+ }));
33
+ const StyledBannersContainer = styled("div")(() => ({
34
+ gridArea: "banners"
35
+ }));
36
+ const StyledSideNavContainer = styled("div")(() => ({
37
+ gridArea: "side-nav"
38
+ }));
39
+ const StyledShellContainer = styled("div", {
40
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
41
+ })(({
42
+ odysseyDesignTokens
43
+ }) => ({
44
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
45
+ display: "grid",
46
+ gridGap: 0,
47
+ gridTemplateAreas: `
48
+ "banners banners"
49
+ "side-nav top-nav"
50
+ "side-nav app-content"
51
+ `,
52
+ gridTemplateColumns: "auto 1fr",
53
+ gridTemplateRows: "auto auto 1fr",
54
+ height: "100vh",
55
+ width: "100vw"
56
+ }));
57
+ const StyledTopNavContainer = styled("div")(() => ({
58
+ gridArea: "top-nav"
59
+ }));
60
+ const UiShellContent = ({
61
+ appComponent,
62
+ onError = console.error,
63
+ optionalComponents,
64
+ sideNavProps,
65
+ topNavProps
66
+ }) => {
67
+ const odysseyDesignTokens = useOdysseyDesignTokens();
68
+ const {
69
+ isContentScrolled,
70
+ scrollableContentRef
71
+ } = useScrollState();
72
+ return _jsxs(StyledShellContainer, {
73
+ odysseyDesignTokens: odysseyDesignTokens,
74
+ children: [_jsx(StyledBannersContainer, {
75
+ children: optionalComponents?.banners
76
+ }), _jsx(StyledSideNavContainer, {
77
+ children: sideNavProps && _jsx(ErrorBoundary, {
78
+ fallback: null,
79
+ onError: onError,
80
+ children: _jsx(SideNav, {
81
+ ...sideNavProps,
82
+ ...(sideNavProps.hasCustomFooter && optionalComponents?.sideNavFooter ? {
83
+ footerComponent: optionalComponents.sideNavFooter,
84
+ footerItems: undefined,
85
+ hasCustomFooter: sideNavProps.hasCustomFooter
86
+ } : {
87
+ footerItems: sideNavProps.footerItems,
88
+ hasCustomFooter: false
89
+ })
90
+ })
91
+ })
92
+ }), _jsx(StyledTopNavContainer, {
93
+ children: _jsx(ErrorBoundary, {
94
+ fallback: null,
95
+ onError: onError,
96
+ children: _jsx(TopNav, {
97
+ ...topNavProps,
98
+ isScrolled: isContentScrolled,
99
+ leftSideComponent: optionalComponents?.topNavLeftSide,
100
+ rightSideComponent: optionalComponents?.topNavRightSide
101
+ })
102
+ })
103
+ }), _jsx(StyledAppContainer, {
104
+ odysseyDesignTokens: odysseyDesignTokens,
105
+ tabIndex: 0,
106
+ ref: scrollableContentRef,
107
+ children: appComponent
108
+ })]
109
+ });
110
+ };
111
+ const MemoizedUiShellContent = memo(UiShellContent);
112
+ MemoizedUiShellContent.displayName = "UiShellContent";
113
+ export { MemoizedUiShellContent as UiShellContent };
114
+ //# sourceMappingURL=UiShellContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UiShellContent.js","names":["styled","memo","ErrorBoundary","SideNav","TopNav","useOdysseyDesignTokens","useScrollState","jsx","_jsx","jsxs","_jsxs","StyledAppContainer","shouldForwardProp","prop","odysseyDesignTokens","gridArea","overflowX","overflowY","paddingBlock","Spacing5","paddingInline","Spacing8","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","backgroundColor","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","UiShellContent","appComponent","onError","console","error","optionalComponents","sideNavProps","topNavProps","isContentScrolled","scrollableContentRef","children","banners","fallback","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","isScrolled","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","tabIndex","ref","MemoizedUiShellContent","displayName"],"sources":["../../../src/labs/UiShell/UiShellContent.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, type ReactElement, type ReactNode } from \"react\";\nimport { ErrorBoundary, ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { SideNav, type SideNavProps } from \"../SideNav\";\nimport { TopNav, type TopNavProps } from \"../TopNav\";\nimport {\n useOdysseyDesignTokens,\n type DesignTokens,\n} from \"../../OdysseyDesignTokensContext\";\nimport { useScrollState } from \"./useScrollState\";\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n gridArea: \"app-content\",\n overflowX: \"hidden\",\n overflowY: \"auto\",\n paddingBlock: odysseyDesignTokens.Spacing5,\n paddingInline: odysseyDesignTokens.Spacing8,\n}));\n\nconst StyledBannersContainer = styled(\"div\")(() => ({\n gridArea: \"banners\",\n}));\n\nconst StyledSideNavContainer = styled(\"div\")(() => ({\n gridArea: \"side-nav\",\n}));\n\nconst StyledShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners banners\"\n \"side-nav top-nav\"\n \"side-nav app-content\"\n `,\n gridTemplateColumns: \"auto 1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n width: \"100vw\",\n}));\n\nconst StyledTopNavContainer = styled(\"div\")(() => ({\n gridArea: \"top-nav\",\n}));\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the side nav component.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\">;\n /**\n * Object that gets pass directly to the top nav component.\n */\n topNavProps: Omit<TopNavProps, \"leftSideComponent\" | \"rightSideComponent\">;\n};\n\nexport type UiShellContentProps = {\n /**\n * React app component that renders as children in the correct location of the shell.\n */\n appComponent: ReactNode;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, flagging \"p0\"s, and recovering UI Shell when errors occur.\n */\n onError?: ErrorBoundaryProps[\"onError\"];\n /**\n * Components that will render as children of various other components such as the top nav or side nav.\n */\n optionalComponents?: {\n banners?: ReactElement;\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n} & UiShellNavComponentProps;\n\n/**\n * Our new Unified Platform UI Shell.\n *\n * This includes the top and side navigation as well as the footer and provides a spot for your app to render into.\n *\n * If an error occurs, this will revert to only showing the app.\n */\nconst UiShellContent = ({\n appComponent,\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: UiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const { isContentScrolled, scrollableContentRef } = useScrollState();\n\n return (\n <StyledShellContainer odysseyDesignTokens={odysseyDesignTokens}>\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledSideNavContainer>\n {sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav\n {...{\n ...sideNavProps,\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n />\n </ErrorBoundary>\n )}\n </StyledSideNavContainer>\n\n <StyledTopNavContainer>\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n {...topNavProps}\n isScrolled={isContentScrolled}\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n </StyledTopNavContainer>\n\n <StyledAppContainer\n odysseyDesignTokens={odysseyDesignTokens}\n tabIndex={0}\n ref={scrollableContentRef}\n >\n {appComponent}\n </StyledAppContainer>\n </StyledShellContainer>\n );\n};\n\nconst MemoizedUiShellContent = memo(UiShellContent);\nMemoizedUiShellContent.displayName = \"UiShellContent\";\n\nexport { MemoizedUiShellContent as UiShellContent };\n"],"mappings":"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"}
@@ -0,0 +1,37 @@
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
+ */
12
+ import { createStore } from "./createStore.js";
13
+ export const bufferLatest = ({
14
+ publish,
15
+ subscribe
16
+ }) => {
17
+ const store = createStore({
18
+ isReactAppReadyForProps: false
19
+ });
20
+ const unsubscribe = subscribe(() => {
21
+ unsubscribe();
22
+ store.setState("isReactAppReadyForProps", true);
23
+ store.getState("bufferedValue");
24
+ if (store.hasState("bufferedValue")) {
25
+ publish(store.getState("bufferedValue"));
26
+ }
27
+ });
28
+ const publishWhenReady = value => {
29
+ if (store.getState("isReactAppReadyForProps")) {
30
+ publish(value);
31
+ } else {
32
+ store.setState("bufferedValue", value);
33
+ }
34
+ };
35
+ return publishWhenReady;
36
+ };
37
+ //# sourceMappingURL=bufferLatest.js.map