@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":"UiShell.js","names":["memo","useEffect","useState","ErrorBoundary","CssBaseline","OdysseyProvider","UiShellContent","UiShellProvider","jsx","_jsx","jsxs","_jsxs","defaultComponentProps","sideNavProps","undefined","topNavProps","UiShell","appBackgroundColor","appBackgroundContrastMode","appComponent","appRootElement","appContainerElement","appContainerScrollingMode","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","stylesRootElement","topNavBackgroundColor","subscribeToPropChanges","componentProps","setComponentProps","unsubscribe","fallback","children","emotionRootElement","shadowRootElement","hasScopedCssBaseline","MemoizedUiShell","displayName"],"sources":["../../../src/ui-shell/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 {\n memo,\n ReactNode,\n useEffect,\n useState,\n type SetStateAction,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { CssBaseline } from \"../CssBaseline.js\";\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport {\n UiShellContent,\n type UiShellContentProps,\n type UiShellNavComponentProps,\n} from \"./UiShellContent.js\";\nimport { type ReactRootElements } from \"../web-component/renderReactInWebComponent.js\";\nimport { UiShellProvider } from \"./UiShellProvider.js\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: undefined,\n topNavProps: undefined,\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 /**\n * Sets a custom background color for the side nav area.\n */\n sideNavBackgroundColor?: string;\n /**\n * Sets a custom background color for the top nav area.\n */\n topNavBackgroundColor?: string;\n /**\n * React app component that renders as children in the correct location of the shell. Only used as fallback for ErrorBoundary.\n */\n appComponent?: ReactNode;\n} & Pick<ReactRootElements, \"appRootElement\" | \"stylesRootElement\"> &\n Pick<\n UiShellContentProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appContainerElement\"\n | \"appContainerScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"onError\"\n | \"optionalComponents\"\n >;\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 appBackgroundColor,\n appBackgroundContrastMode,\n appComponent,\n appRootElement,\n appContainerElement,\n appContainerScrollingMode,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n sideNavBackgroundColor,\n stylesRootElement,\n topNavBackgroundColor,\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 hasScopedCssBaseline={false}\n >\n <ErrorBoundary fallback={appComponent} onError={onError}>\n <CssBaseline />\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n sideNavBackgroundColor={sideNavBackgroundColor}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n <UiShellContent\n {...componentProps}\n appContainerElement={appContainerElement}\n appContainerScrollingMode={appContainerScrollingMode}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n </UiShellProvider>\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,SACEA,IAAI,EAEJC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SACEC,cAAc,QAGT,qBAAqB;AAE5B,SAASC,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;A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AuB;UAC/CE,qBAAqB,EAAEA,qBAAsB;UAAAM,QAAA,EAE7C7B,IAAA,CAACH,cAAc;YAAA,GACT4B,cAAc;YAClBb,mBAAmB,EAAEA,mBAAoB;YACzCC,yBAAyB,EAAEA,yBAA0B;YACrDC,4BAA4B,EAAEA,4BAA6B;YAC3DC,sBAAsB,EAAEA,sBAAuB;YAC/CC,OAAO,EAAEA,OAAQ;YACjBI,kBAAkB,EAAEA;UAAmB,CACxC;QAAC,CACa,CAAC;MAAA,CACL;IAAC,CACD;EAAC,CACL,CAAC;AAEpB,CAAC;AAED,MAAMa,eAAe,GAAG1C,IAAI,CAACgB,OAAO,CAAC;AACrC0B,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAI1B,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"UiShell.js","names":["memo","useEffect","useState","ErrorBoundary","CssBaseline","NarrowUiShellContent","OdysseyProvider","UiShellProvider","useUiShellBreakpoints","WideUiShellContent","jsx","_jsx","jsxs","_jsxs","defaultComponentProps","sideNavProps","undefined","topNavProps","errorComponent","UiShell","appBackgroundColor","appBackgroundContrastMode","appElement","appElementScrollingMode","closeSideNavMenu","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onSubscriptionCreated","optionalComponents","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","subscribeToPropChanges","topNavBackgroundColor","uiShellAppElement","uiShellStylesElement","componentProps","setComponentProps","activeBreakpoint","unsubscribe","fallback","children","emotionRootElement","shadowRootElement","isCollapsed","isCollapsible","MemoizedUiShell","displayName"],"sources":["../../../src/ui-shell/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 { type ReactRootElements } from \"../web-component/createReactRootElements.js\";\nimport { CssBaseline } from \"../CssBaseline.js\";\nimport { NarrowUiShellContent } from \"./NarrowUiShellContent.js\";\nimport { OdysseyProvider } from \"../OdysseyProvider.js\";\nimport { UiShellProvider, UiShellProviderProps } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport { useUiShellBreakpoints } from \"./useUiShellBreakpoints.js\";\nimport { WideUiShellContent } from \"./WideUiShellContent.js\";\nimport { MessageBus } from \"./createMessageBus.js\";\n\nexport const defaultComponentProps: UiShellNavComponentProps = {\n sideNavProps: undefined,\n topNavProps: undefined,\n} as const;\n\nconst errorComponent = <div data-error />;\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: MessageBus<\n SetStateAction<UiShellNavComponentProps>\n >[\"subscribe\"];\n /**\n * Element inside UI Shell's React root component renders into. If using a web component, this is going to exist inside it.\n */\n uiShellAppElement: ReactRootElements[\"appRootElement\"];\n /**\n * Typically, this is your `<head>` element. If using a web component, you need to create one yourself as Shadow DOM's don't have a `<head>`.\n */\n uiShellStylesElement: ReactRootElements[\"stylesRootElement\"];\n} & UiShellProviderProps &\n Pick<\n UiShellContentProps,\n | \"appElement\"\n | \"appElementScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"onError\"\n | \"optionalComponents\"\n >;\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 appBackgroundColor,\n appBackgroundContrastMode,\n appElement,\n appElementScrollingMode,\n closeSideNavMenu,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onSubscriptionCreated,\n optionalComponents,\n sideNavBackgroundColor,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n subscribeToPropChanges,\n topNavBackgroundColor,\n uiShellAppElement,\n uiShellStylesElement,\n}: UiShellProps) => {\n const [componentProps, setComponentProps] = useState(defaultComponentProps);\n\n const activeBreakpoint = useUiShellBreakpoints();\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 activeBreakpoint === \"none\" ? null : (\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <OdysseyProvider\n emotionRootElement={uiShellStylesElement}\n shadowRootElement={uiShellAppElement}\n >\n <ErrorBoundary fallback={errorComponent} onError={onError}>\n <CssBaseline />\n\n <UiShellProvider\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n closeSideNavMenu={closeSideNavMenu}\n sideNavBackgroundColor={sideNavBackgroundColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n topNavBackgroundColor={topNavBackgroundColor}\n >\n {activeBreakpoint === \"constrained\" && (\n <NarrowUiShellContent\n {...componentProps}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n\n {(activeBreakpoint === \"compact\" ||\n activeBreakpoint === \"comfortable\") && (\n <WideUiShellContent\n {...{\n ...componentProps,\n ...(componentProps.sideNavProps\n ? {\n sideNavProps: {\n ...componentProps.sideNavProps,\n isCollapsed:\n activeBreakpoint === \"compact\" ||\n componentProps.sideNavProps?.isCollapsed,\n isCollapsible:\n activeBreakpoint === \"compact\" ||\n componentProps.sideNavProps?.isCollapsible,\n // We have to use `as` because sideNavProps expects you to have `sideNavItems` defined even though it had to be passed in `...componentProps.sideNavProps`.\n } as typeof componentProps.sideNavProps,\n }\n : {}),\n }}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n optionalComponents={optionalComponents}\n />\n )}\n </UiShellProvider>\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;AAGpD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,eAAe,QAA8B,sBAAsB;AAK5E,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,kBAAkB,QAAQ,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG7D,OAAO,MAAMC,qBAA+C,GAAG;EAC7DC,YAAY,EAAEC,SAAS;EACvBC,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C;AACrC8B,eAAe,CAACC,WAAW,GAAG,SAAS;AAEvC,SAASD,eAAe,IAAI9B,OAAO","ignoreList":[]}
@@ -13,7 +13,10 @@
13
13
  import { createContext, memo, useContext, useMemo } from "react";
14
14
  import { generateContrastColors } from "../createContrastColors.js";
15
15
  import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
16
+ import { createMessageBus } from "./createMessageBus.js";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
+ export const defaultCloseSideNavMessageBus = createMessageBus();
19
+ export const defaultSubscribeToCloseRightSideMenu = () => () => {};
17
20
  const UiShellContext = createContext(undefined);
18
21
  export const useUiShellContext = () => {
19
22
  return useContext(UiShellContext);
@@ -21,9 +24,12 @@ export const useUiShellContext = () => {
21
24
  const UiShellProvider = ({
22
25
  appBackgroundColor,
23
26
  appBackgroundContrastMode = "lowContrast",
27
+ children,
28
+ closeSideNavMenu,
24
29
  sideNavBackgroundColor,
25
- topNavBackgroundColor,
26
- children
30
+ subscribeToCloseRightSideMenu,
31
+ subscribeToCloseSideNavMenu,
32
+ topNavBackgroundColor
27
33
  }) => {
28
34
  const odysseyDesignTokens = useOdysseyDesignTokens();
29
35
  const defaultedSideNavBackgroundColor = sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite;
@@ -34,10 +40,13 @@ const UiShellProvider = ({
34
40
  const appContentBackgroundColor = appBackgroundColor || defaultTopAndAppBackgroundColor;
35
41
  const memoizedContextValue = useMemo(() => ({
36
42
  appBackgroundColor: appContentBackgroundColor,
43
+ closeSideNavMenu: closeSideNavMenu ?? defaultCloseSideNavMessageBus.publish,
37
44
  sideNavBackgroundColor: sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,
38
45
  sideNavContrastColors,
46
+ subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu ?? defaultCloseSideNavMessageBus.subscribe,
47
+ subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu ?? defaultSubscribeToCloseRightSideMenu,
39
48
  topNavBackgroundColor: topNavColor
40
- }), [appContentBackgroundColor, odysseyDesignTokens, sideNavBackgroundColor, sideNavContrastColors, topNavColor]);
49
+ }), [appContentBackgroundColor, odysseyDesignTokens.HueNeutralWhite, closeSideNavMenu, sideNavBackgroundColor, sideNavContrastColors, subscribeToCloseRightSideMenu, subscribeToCloseSideNavMenu, topNavColor]);
41
50
  return _jsx(UiShellContext.Provider, {
42
51
  value: memoizedContextValue,
43
52
  children: children
@@ -1 +1 @@
1
- {"version":3,"file":"UiShellProvider.js","names":["createContext","memo","useContext","useMemo","generateContrastColors","useOdysseyDesignTokens","jsx","_jsx","UiShellContext","undefined","useUiShellContext","UiShellProvider","appBackgroundColor","appBackgroundContrastMode","sideNavBackgroundColor","topNavBackgroundColor","children","odysseyDesignTokens","defaultedSideNavBackgroundColor","HueNeutralWhite","sideNavContrastColors","isAppBackgroundHightContrast","defaultTopAndAppBackgroundColor","HueNeutral50","topNavColor","appContentBackgroundColor","memoizedContextValue","Provider","value","MemoizedUiShellProvider"],"sources":["../../../src/ui-shell/UiShellProvider.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 {\n createContext,\n memo,\n PropsWithChildren,\n useContext,\n useMemo,\n} from \"react\";\nimport {\n generateContrastColors,\n ContrastColors,\n} from \"../createContrastColors.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\n\nexport type UiShellColors = {\n appBackgroundColor: string;\n sideNavBackgroundColor: string;\n sideNavContrastColors?: ContrastColors | undefined;\n topNavBackgroundColor: string;\n};\n\nconst UiShellContext = createContext<UiShellColors | undefined>(undefined);\n\nexport const useUiShellContext = () => {\n return useContext(UiShellContext);\n};\n\nexport type UiShellProviderProps = {\n appBackgroundColor?: string;\n sideNavBackgroundColor?: string;\n topNavBackgroundColor?: string;\n appBackgroundContrastMode?: string;\n};\n\nconst UiShellProvider = ({\n appBackgroundColor,\n appBackgroundContrastMode = \"lowContrast\",\n sideNavBackgroundColor,\n topNavBackgroundColor,\n children,\n}: PropsWithChildren<UiShellProviderProps>) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const defaultedSideNavBackgroundColor =\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite;\n\n const sideNavContrastColors =\n defaultedSideNavBackgroundColor !== odysseyDesignTokens.HueNeutralWhite\n ? generateContrastColors(\n defaultedSideNavBackgroundColor,\n odysseyDesignTokens,\n )\n : undefined;\n\n const isAppBackgroundHightContrast =\n appBackgroundContrastMode === \"highContrast\";\n\n const defaultTopAndAppBackgroundColor = isAppBackgroundHightContrast\n ? odysseyDesignTokens.HueNeutralWhite\n : odysseyDesignTokens.HueNeutral50;\n\n const topNavColor = topNavBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const appContentBackgroundColor =\n appBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const memoizedContextValue = useMemo(\n () => ({\n appBackgroundColor: appContentBackgroundColor,\n sideNavBackgroundColor:\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,\n sideNavContrastColors,\n topNavBackgroundColor: topNavColor,\n }),\n [\n appContentBackgroundColor,\n odysseyDesignTokens,\n sideNavBackgroundColor,\n sideNavContrastColors,\n topNavColor,\n ],\n );\n\n return (\n <UiShellContext.Provider value={memoizedContextValue}>\n {children}\n </UiShellContext.Provider>\n );\n};\n\nconst MemoizedUiShellProvider = memo(UiShellProvider);\n\nexport { MemoizedUiShellProvider as UiShellProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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CAEf,CAAC;EAED,OACEjB,IAAA,CAACC,cAAc,CAACmB,QAAQ;IAACC,KAAK,EAAEF,oBAAqB;IAAAV,QAAA,EAClDA;EAAQ,CACc,CAAC;AAE9B,CAAC;AAED,MAAMa,uBAAuB,GAAG5B,IAAI,CAACU,eAAe,CAAC;AAErD,SAASkB,uBAAuB,IAAIlB,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"UiShellProvider.js","names":["createContext","memo","useContext","useMemo","generateContrastColors","useOdysseyDesignTokens","createMessageBus","jsx","_jsx","defaultCloseSideNavMessageBus","defaultSubscribeToCloseRightSideMenu","UiShellContext","undefined","useUiShellContext","UiShellProvider","appBackgroundColor","appBackgroundContrastMode","children","closeSideNavMenu","sideNavBackgroundColor","subscribeToCloseRightSideMenu","subscribeToCloseSideNavMenu","topNavBackgroundColor","odysseyDesignTokens","defaultedSideNavBackgroundColor","HueNeutralWhite","sideNavContrastColors","isAppBackgroundHightContrast","defaultTopAndAppBackgroundColor","HueNeutral50","topNavColor","appContentBackgroundColor","memoizedContextValue","publish","subscribe","Provider","value","MemoizedUiShellProvider"],"sources":["../../../src/ui-shell/UiShellProvider.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 {\n createContext,\n memo,\n PropsWithChildren,\n useContext,\n useMemo,\n} from \"react\";\nimport {\n ContrastColors,\n generateContrastColors,\n} from \"../createContrastColors.js\";\nimport { useOdysseyDesignTokens } from \"../OdysseyDesignTokensContext.js\";\nimport { createMessageBus, MessageBus } from \"./createMessageBus.js\";\nimport { ContrastMode } from \"../useContrastMode.js\";\n\nexport const defaultCloseSideNavMessageBus = createMessageBus();\nexport const defaultSubscribeToCloseRightSideMenu = () => () => {};\n\nexport type UiShellColors = {\n /**\n * Sets a custom background color for the app content area.\n */\n appBackgroundColor: string;\n /**\n * Sets a custom background color for the side nav area.\n */\n sideNavBackgroundColor: string;\n sideNavContrastColors?: ContrastColors;\n /**\n * Sets a custom background color for the top nav area.\n */\n topNavBackgroundColor: string;\n};\n\nexport type UiShellContext = {\n /**\n * This is a callback that publishes a change to all subscribers listening for when to close the side nav.\n */\n closeSideNavMenu: MessageBus<void>[\"publish\"];\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 a publisher that asks us to close the side nav.\n */\n subscribeToCloseSideNavMenu: MessageBus<void>[\"subscribe\"];\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 a publisher that asks us to close the right-side menu.\n */\n subscribeToCloseRightSideMenu: MessageBus<void>[\"subscribe\"];\n} & UiShellColors;\n\nconst UiShellContext = createContext<UiShellContext | undefined>(undefined);\n\nexport const useUiShellContext = () => {\n return useContext(UiShellContext);\n};\n\nexport type UiShellProviderProps = {\n /**\n * Sets either a gray or white background color for the app content area.\n */\n appBackgroundContrastMode?: ContrastMode;\n} & Partial<UiShellContext>;\n\nconst UiShellProvider = ({\n appBackgroundColor,\n appBackgroundContrastMode = \"lowContrast\",\n children,\n closeSideNavMenu,\n sideNavBackgroundColor,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n topNavBackgroundColor,\n}: PropsWithChildren<UiShellProviderProps>) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const defaultedSideNavBackgroundColor =\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite;\n\n const sideNavContrastColors =\n defaultedSideNavBackgroundColor !== odysseyDesignTokens.HueNeutralWhite\n ? generateContrastColors(\n defaultedSideNavBackgroundColor,\n odysseyDesignTokens,\n )\n : undefined;\n\n const isAppBackgroundHightContrast =\n appBackgroundContrastMode === \"highContrast\";\n\n const defaultTopAndAppBackgroundColor = isAppBackgroundHightContrast\n ? odysseyDesignTokens.HueNeutralWhite\n : odysseyDesignTokens.HueNeutral50;\n\n const topNavColor = topNavBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const appContentBackgroundColor =\n appBackgroundColor || defaultTopAndAppBackgroundColor;\n\n const memoizedContextValue = useMemo(\n () => ({\n appBackgroundColor: appContentBackgroundColor,\n closeSideNavMenu:\n closeSideNavMenu ?? defaultCloseSideNavMessageBus.publish,\n sideNavBackgroundColor:\n sideNavBackgroundColor || odysseyDesignTokens.HueNeutralWhite,\n sideNavContrastColors,\n subscribeToCloseSideNavMenu:\n subscribeToCloseSideNavMenu ?? defaultCloseSideNavMessageBus.subscribe,\n subscribeToCloseRightSideMenu:\n subscribeToCloseRightSideMenu ?? defaultSubscribeToCloseRightSideMenu,\n topNavBackgroundColor: topNavColor,\n }),\n [\n appContentBackgroundColor,\n odysseyDesignTokens.HueNeutralWhite,\n closeSideNavMenu,\n sideNavBackgroundColor,\n sideNavContrastColors,\n subscribeToCloseRightSideMenu,\n subscribeToCloseSideNavMenu,\n topNavColor,\n ],\n );\n\n return (\n <UiShellContext.Provider value={memoizedContextValue}>\n {children}\n </UiShellContext.Provider>\n );\n};\n\nconst MemoizedUiShellProvider = memo(UiShellProvider);\n\nexport { MemoizedUiShellProvider as UiShellProvider };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,aAAa,EACbC,IAAI,EAEJC,UAAU,EACVC,OAAO,QACF,OAAO;AACd,SAEEC,sBAAsB,QACjB,4BAA4B;AACnC,SAASC,sBAAsB,QAAQ,kCAAkC;AACzE,SAASC,gBAAgB,QAAoB,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGrE,OAAO,MAAMC,6BAA6B,GAAGH,gBAAgB,CAAC,CAAC;AAC/D,OAA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AEQ;EACzB,CAAC,CAAC,EACF,CACEC,yBAAyB,EACzBR,mBAAmB,CAACE,eAAe,EACnCP,gBAAgB,EAChBC,sBAAsB,EACtBO,qBAAqB,EACrBN,6BAA6B,EAC7BC,2BAA2B,EAC3BS,WAAW,CAEf,CAAC;EAED,OACEtB,IAAA,CAACG,cAAc,CAACwB,QAAQ;IAACC,KAAK,EAAEJ,oBAAqB;IAAAf,QAAA,EAClDA;EAAQ,CACc,CAAC;AAE9B,CAAC;AAED,MAAMoB,uBAAuB,GAAGpC,IAAI,CAACa,eAAe,CAAC;AAErD,SAASuB,uBAAuB,IAAIvB,eAAe","ignoreList":[]}
@@ -0,0 +1,165 @@
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, useRef } from "react";
15
+ import { ErrorBoundary } from "react-error-boundary";
16
+ import { AppSwitcher } from "./AppSwitcher/index.js";
17
+ import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
18
+ import { SideNav } from "./SideNav/index.js";
19
+ import { TopNav } from "./TopNav/index.js";
20
+ import { useScrollState } from "./useScrollState.js";
21
+ import { useMatchAppElementToUiShellAppArea } from "./useMatchAppElementToUiShellAppArea.js";
22
+ import { useUiShellContext } from "./UiShellProvider.js";
23
+ import { emptySideNavItems } from "./uiShellSharedConstants.js";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ const StyledAppContainer = styled("div", {
26
+ shouldForwardProp: prop => prop !== "appBackgroundColor" && prop !== "odysseyDesignTokens"
27
+ })(({
28
+ appBackgroundColor
29
+ }) => ({
30
+ gridArea: "app-content",
31
+ backgroundColor: appBackgroundColor
32
+ }));
33
+ const StyledAppSwitcherContainer = styled("div")({
34
+ gridArea: "app-switcher"
35
+ });
36
+ const StyledBannersContainer = styled("div")({
37
+ gridArea: "banners"
38
+ });
39
+ const StyledSideNavContainer = styled("div")({
40
+ gridArea: "side-nav"
41
+ });
42
+ const StyledShellContainer = styled("div", {
43
+ shouldForwardProp: prop => prop !== "odysseyDesignTokens"
44
+ })(({
45
+ odysseyDesignTokens
46
+ }) => ({
47
+ backgroundColor: odysseyDesignTokens.HueNeutral50,
48
+ display: "grid",
49
+ gridGap: 0,
50
+ gridTemplateAreas: `
51
+ "banners banners banners"
52
+ "app-switcher side-nav top-nav"
53
+ "app-switcher side-nav app-content"
54
+ `,
55
+ gridTemplateColumns: "auto auto 1fr",
56
+ gridTemplateRows: "auto auto 1fr",
57
+ height: "100vh",
58
+ width: "100vw"
59
+ }));
60
+ const StyledTopNavContainer = styled("div")({
61
+ gridArea: "top-nav"
62
+ });
63
+ const WideUiShellContent = ({
64
+ appElement,
65
+ appElementScrollingMode,
66
+ appSwitcherProps,
67
+ hasStandardAppContentPadding = true,
68
+ initialVisibleSections = ["TopNav", "SideNav", "AppSwitcher"],
69
+ onError = console.error,
70
+ optionalComponents,
71
+ sideNavProps,
72
+ topNavProps
73
+ }) => {
74
+ const odysseyDesignTokens = useOdysseyDesignTokens();
75
+ const uiShellContext = useUiShellContext();
76
+ const {
77
+ isContentScrolled
78
+ } = useScrollState(appElement);
79
+ const sideNavContainerRef = useRef(null);
80
+ const topNavContainerRef = useRef(null);
81
+ const uiShellAppAreaRef = useRef(null);
82
+ const {
83
+ parentContainerRef
84
+ } = useMatchAppElementToUiShellAppArea({
85
+ appElement,
86
+ appElementScrollingMode,
87
+ paddingMode: hasStandardAppContentPadding ? "comfortable" : "none",
88
+ uiShellAppAreaRef,
89
+ uiShellResizableRefs: [sideNavContainerRef, topNavContainerRef, uiShellAppAreaRef]
90
+ });
91
+ return _jsxs(StyledShellContainer, {
92
+ odysseyDesignTokens: odysseyDesignTokens,
93
+ ref: parentContainerRef,
94
+ children: [_jsx(StyledBannersContainer, {
95
+ children: optionalComponents?.banners
96
+ }), _jsxs(StyledAppSwitcherContainer, {
97
+ children: [initialVisibleSections?.includes("AppSwitcher") && !appSwitcherProps && _jsx(ErrorBoundary, {
98
+ fallback: null,
99
+ onError: onError,
100
+ children: _jsx(AppSwitcher, {
101
+ isLoading: true,
102
+ appIcons: [],
103
+ selectedAppName: ""
104
+ })
105
+ }), appSwitcherProps && _jsx(ErrorBoundary, {
106
+ fallback: null,
107
+ onError: onError,
108
+ children: _jsx(AppSwitcher, {
109
+ ...appSwitcherProps
110
+ })
111
+ })]
112
+ }), _jsxs(StyledSideNavContainer, {
113
+ ref: sideNavContainerRef,
114
+ children: [initialVisibleSections?.includes("SideNav") && sideNavProps === undefined && _jsx(ErrorBoundary, {
115
+ fallback: null,
116
+ onError: onError,
117
+ children: _jsx(SideNav, {
118
+ isLoading: true,
119
+ sideNavItems: emptySideNavItems
120
+ })
121
+ }), sideNavProps && _jsx(ErrorBoundary, {
122
+ fallback: null,
123
+ onError: onError,
124
+ children: _jsx(SideNav, {
125
+ ...sideNavProps,
126
+ ...(sideNavProps.hasCustomFooter && optionalComponents?.sideNavFooter ? {
127
+ footerComponent: optionalComponents.sideNavFooter,
128
+ footerItems: undefined,
129
+ hasCustomFooter: sideNavProps.hasCustomFooter
130
+ } : {
131
+ footerItems: sideNavProps.footerItems,
132
+ hasCustomFooter: false
133
+ })
134
+ })
135
+ })]
136
+ }), _jsxs(StyledTopNavContainer, {
137
+ ref: topNavContainerRef,
138
+ children: [initialVisibleSections?.includes("TopNav") && topNavProps === undefined && _jsx(ErrorBoundary, {
139
+ fallback: null,
140
+ onError: onError,
141
+ children: _jsx(TopNav, {
142
+ leftSideComponent: optionalComponents?.topNavLeftSide,
143
+ rightSideComponent: optionalComponents?.topNavRightSide
144
+ })
145
+ }), topNavProps && _jsx(ErrorBoundary, {
146
+ fallback: null,
147
+ onError: onError,
148
+ children: _jsx(TopNav, {
149
+ ...topNavProps,
150
+ isScrolled: isContentScrolled,
151
+ leftSideComponent: optionalComponents?.topNavLeftSide,
152
+ rightSideComponent: optionalComponents?.topNavRightSide
153
+ })
154
+ })]
155
+ }), _jsx(StyledAppContainer, {
156
+ appBackgroundColor: uiShellContext?.appBackgroundColor,
157
+ tabIndex: 0,
158
+ ref: uiShellAppAreaRef
159
+ })]
160
+ });
161
+ };
162
+ const MemoizedWideUiShellContent = memo(WideUiShellContent);
163
+ MemoizedWideUiShellContent.displayName = "WideUiShellContent";
164
+ export { MemoizedWideUiShellContent as WideUiShellContent };
165
+ //# sourceMappingURL=WideUiShellContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","AppSwitcher","useOdysseyDesignTokens","SideNav","TopNav","useScrollState","useMatchAppElementToUiShellAppArea","useUiShellContext","emptySideNavItems","jsx","_jsx","jsxs","_jsxs","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","gridArea","backgroundColor","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","isLoading","appIcons","selectedAppName","undefined","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","isScrolled","tabIndex","MemoizedWideUiShellContent","displayName"],"sources":["../../../src/ui-shell/WideUiShellContent.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, useRef } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport {\n useOdysseyDesignTokens,\n type DesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport { useScrollState } from \"./useScrollState.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n gridArea: \"app-content\",\n backgroundColor: appBackgroundColor,\n}));\n\nconst StyledAppSwitcherContainer = styled(\"div\")({\n gridArea: \"app-switcher\",\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 banners\"\n \"app-switcher side-nav top-nav\"\n \"app-switcher side-nav app-content\"\n `,\n gridTemplateColumns: \"auto 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 WideUiShellContentProps = UiShellNavComponentProps &\n UiShellContentProps;\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 WideUiShellContent = ({\n appElement,\n appElementScrollingMode,\n appSwitcherProps,\n hasStandardAppContentPadding = true,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: WideUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"comfortable\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <StyledShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n <StyledAppSwitcherContainer>\n {\n /* If AppSwitcher should be initially visible and we have not yet received props, render AppSwitcher in the loading state */\n initialVisibleSections?.includes(\"AppSwitcher\") &&\n !appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher isLoading appIcons={[]} selectedAppName=\"\" />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <AppSwitcher {...appSwitcherProps} />\n </ErrorBoundary>\n )}\n </StyledAppSwitcherContainer>\n\n <StyledSideNavContainer ref={sideNavContainerRef}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") &&\n sideNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\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 ref={topNavContainerRef}>\n {\n /* If TopNav should be initially visible and we have not yet received props, render Topnav with minimal inputs */\n initialVisibleSections?.includes(\"TopNav\") &&\n topNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <TopNav\n leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )\n }\n\n {topNavProps && (\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 )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n tabIndex={0}\n ref={uiShellAppAreaRef}\n />\n </StyledShellContainer>\n );\n};\n\nconst MemoizedWideUiShellContent = memo(WideUiShellContent);\nMemoizedWideUiShellContent.displayName = \"WideUiShellContent\";\n\nexport { MemoizedWideUiShellContent as WideUiShellContent };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SACEC,sBAAsB,QAEjB,kCAAkC;AAKzC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,kCAAkC,QAAQ,yCAAyC;AAC5F,SAAwBC,iBAAiB,QAAQ,sBAAsB;AACvE,SAASC,iBAAiB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,MAAMC,kBAAkB,GAAGhB,MAAM,CAAC,KAAK,EAAE;EACvCiB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAAIA,IAAI,KAAK;AAC9C,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAmB,CAAC,MAAM;EAC9BC,QAAQ,EAAE,aAAa;EACvBC,eAAe,EAAEF;AACnB,CAAC,CAAC,CAAC;AAEH,MAAMG,0BAA0B,GAAGtB,MAAM,CAAC,KAAK,CAAC,CAAC;EAC/CoB,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMG,sBAAsB,GAAGvB,MAAM,CAAC,KAAK,CAAC,CAAC;EAC3CoB,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAA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AAC,EAExB5D,IAAA,CAACG,kBAAkB;MACjBG,kBAAkB,EAAE6B,cAAc,EAAE7B,kBAAmB;MACvDwD,QAAQ,EAAE,CAAE;MACZnB,GAAG,EAAEJ;IAAkB,CACxB,CAAC;EAAA,CACkB,CAAC;AAE3B,CAAC;AAED,MAAMwB,0BAA0B,GAAG3E,IAAI,CAACmC,kBAAkB,CAAC;AAC3DwC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAIxC,kBAAkB","ignoreList":[]}
@@ -11,11 +11,13 @@
11
11
  */
12
12
 
13
13
  export * from "./AppSwitcher/index.js";
14
+ export * from "./NarrowUiShellContent.js";
14
15
  export * from "./renderUiShell.js";
15
16
  export * from "./SideNav/index.js";
16
17
  export * from "./TopNav/index.js";
18
+ export * from "./uiShellContentTypes.js";
17
19
  export * from "./useHasUiShell.js";
18
20
  export * from "../web-component/renderReactInWebComponent.js";
21
+ export * from "./WideUiShellContent.js";
19
22
  export { UiShell } from "./UiShell.js";
20
- export { UiShellContent } from "./UiShellContent.js";
21
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["UiShell","UiShellContent"],"sources":["../../../src/ui-shell/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 \"./AppSwitcher/index.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/index.js\";\nexport * from \"./TopNav/index.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"../web-component/renderReactInWebComponent.js\"; // This is located here because some teams use React v17, and this uses React v18's `ReactDOM/client` import which isn't in older versions.\n\nexport { UiShell, type UiShellProps } from \"./UiShell.js\";\nexport {\n UiShellContent,\n type UiShellNavComponentProps,\n} from \"./UiShellContent.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,+CAA+C;AAE7D,SAASA,OAAO,QAA2B,cAAc;AACzD,SACEC,cAAc,QAET,qBAAqB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["UiShell"],"sources":["../../../src/ui-shell/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 \"./AppSwitcher/index.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/index.js\";\nexport * from \"./TopNav/index.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"../web-component/renderReactInWebComponent.js\"; // This is located here because some teams use React v17, and this uses React v18's `ReactDOM/client` import which isn't in older versions.\nexport * from \"./WideUiShellContent.js\";\n\nexport { UiShell, type UiShellProps } from \"./UiShell.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,wBAAwB;AACtC,cAAc,2BAA2B;AACzC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,mBAAmB;AACjC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,+CAA+C;AAC7D,cAAc,yBAAyB;AAEvC,SAASA,OAAO,QAA2B,cAAc","ignoreList":[]}
@@ -14,11 +14,12 @@ import { ErrorBoundary } from "react-error-boundary";
14
14
  import { bufferLatest } from "./bufferLatest.js";
15
15
  import { createMessageBus } from "./createMessageBus.js";
16
16
  import { UiShell } from "./UiShell.js";
17
- import { renderReactInWebComponent } from "../web-component/renderReactInWebComponent.js";
18
17
  import { uiShellDataAttribute } from "./useHasUiShell.js";
18
+ import { renderReactInWebComponent } from "../web-component/renderReactInWebComponent.js";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  export const optionalComponentSlotNames = {
21
21
  banners: "banners",
22
+ rightSideMenu: "right-side-menu",
22
23
  sideNavFooter: "side-nav-footer",
23
24
  topNavLeftSide: "top-nav-left-side",
24
25
  topNavRightSide: "top-nav-right-side"
@@ -26,17 +27,17 @@ export const optionalComponentSlotNames = {
26
27
  export const renderUiShell = ({
27
28
  appBackgroundColor,
28
29
  appBackgroundContrastMode,
29
- appContainerScrollingMode,
30
- appRootElement: explicitAppRootElement,
30
+ appElement: providedAppElement,
31
+ appElementScrollingMode,
31
32
  hasStandardAppContentPadding,
32
33
  initialVisibleSections,
33
34
  onError = console.error,
35
+ parentElement,
34
36
  sideNavBackgroundColor,
35
- topNavBackgroundColor,
36
- uiShellRootElement
37
+ topNavBackgroundColor
37
38
  }) => {
38
- const appRootElement = explicitAppRootElement || document.createElement("div");
39
- uiShellRootElement.setAttribute(uiShellDataAttribute, "");
39
+ const appElement = providedAppElement || document.createElement("div");
40
+ parentElement.setAttribute(uiShellDataAttribute, "");
40
41
  const {
41
42
  publish: publishPropChanges,
42
43
  subscribe: subscribeToPropChanges
@@ -49,26 +50,32 @@ export const renderUiShell = ({
49
50
  publish: publishPropChanges,
50
51
  subscribe: subscribeToReactAppSubscribed
51
52
  });
53
+ const {
54
+ publish: closeRightSideMenu,
55
+ subscribe: subscribeToCloseRightSideMenu
56
+ } = createMessageBus();
57
+ const {
58
+ publish: closeSideNavMenu,
59
+ subscribe: subscribeToCloseSideNavMenu
60
+ } = createMessageBus();
52
61
  const slottedElements = Object.fromEntries(Object.entries(optionalComponentSlotNames).map(([optionalComponentKey, slotName]) => {
53
62
  const element = document.createElement("div");
54
63
  element.setAttribute("slot", slotName);
55
64
  return [optionalComponentKey, element];
56
65
  }));
57
- const appContainerElement = document.createElement("div");
58
- appContainerElement.appendChild(appRootElement);
59
66
  const webComponentChildren = Object.values(slottedElements);
60
- const appComponent = _jsx("slot", {});
61
67
  const uiShellElement = renderReactInWebComponent({
62
68
  getReactComponent: reactRootElements => _jsx(ErrorBoundary, {
63
- fallback: appComponent,
69
+ fallback: _jsx("div", {
70
+ "data-error": true
71
+ }),
64
72
  onError: onError,
65
73
  children: _jsx(UiShell, {
66
74
  appBackgroundColor: appBackgroundColor,
67
75
  appBackgroundContrastMode: appBackgroundContrastMode,
68
- appComponent: appComponent,
69
- appContainerElement: appContainerElement,
70
- appContainerScrollingMode: appContainerScrollingMode,
71
- appRootElement: reactRootElements.appRootElement,
76
+ appElement: appElement,
77
+ appElementScrollingMode: appElementScrollingMode,
78
+ closeSideNavMenu: closeSideNavMenu,
72
79
  hasStandardAppContentPadding: hasStandardAppContentPadding,
73
80
  initialVisibleSections: initialVisibleSections,
74
81
  onError: onError,
@@ -77,17 +84,22 @@ export const renderUiShell = ({
77
84
  name: slotName
78
85
  })])),
79
86
  sideNavBackgroundColor: sideNavBackgroundColor,
80
- stylesRootElement: reactRootElements.stylesRootElement,
87
+ subscribeToCloseRightSideMenu: subscribeToCloseRightSideMenu,
88
+ subscribeToCloseSideNavMenu: subscribeToCloseSideNavMenu,
81
89
  subscribeToPropChanges: subscribeToPropChanges,
82
- topNavBackgroundColor: topNavBackgroundColor
90
+ topNavBackgroundColor: topNavBackgroundColor,
91
+ uiShellAppElement: reactRootElements.appRootElement,
92
+ uiShellStylesElement: reactRootElements.stylesRootElement
83
93
  })
84
94
  }),
85
- webComponentRootElement: uiShellRootElement,
95
+ webComponentParentElement: parentElement,
86
96
  webComponentChildren
87
97
  });
88
- uiShellRootElement.appendChild(appContainerElement);
98
+ parentElement.appendChild(appElement);
89
99
  return {
90
- appRootElement,
100
+ appElement,
101
+ closeRightSideMenu,
102
+ closeSideNavMenu,
91
103
  setComponentProps: publishAfterReactAppReadyForProps,
92
104
  slottedElements,
93
105
  uiShellElement
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","UiShell","renderReactInWebComponent","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","banners","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appContainerScrollingMode","appRootElement","explicitAppRootElement","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","sideNavBackgroundColor","topNavBackgroundColor","uiShellRootElement","document","createElement","setAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","appContainerElement","appendChild","webComponentChildren","values","appComponent","uiShellElement","getReactComponent","reactRootElements","fallback","children","onSubscriptionCreated","optionalComponents","name","stylesRootElement","webComponentRootElement","setComponentProps"],"sources":["../../../src/ui-shell/renderUiShell.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 { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { bufferLatest } from \"./bufferLatest.js\";\nimport { createMessageBus } from \"./createMessageBus.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { type UiShellNavComponentProps } from \"./UiShellContent.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appContainerScrollingMode,\n appRootElement: explicitAppRootElement,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n sideNavBackgroundColor,\n topNavBackgroundColor,\n uiShellRootElement,\n}: {\n /**\n * HTML element used as the root for a React app.\n */\n appRootElement?: HTMLDivElement;\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * HTML element used as the root for UI Shell.\n */\n uiShellRootElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appContainerScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"topNavBackgroundColor\"\n>) => {\n const appRootElement =\n explicitAppRootElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n uiShellRootElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n >;\n\n const appContainerElement = document.createElement(\"div\");\n appContainerElement.appendChild(appRootElement);\n\n const webComponentChildren = Object.values(slottedElements);\n\n const appComponent = <slot />;\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={appComponent} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appComponent={appComponent}\n appContainerElement={appContainerElement}\n appContainerScrollingMode={appContainerScrollingMode}\n appRootElement={reactRootElements.appRootElement}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n stylesRootElement={reactRootElements.stylesRootElement}\n subscribeToPropChanges={subscribeToPropChanges}\n topNavBackgroundColor={topNavBackgroundColor}\n />\n </ErrorBoundary>\n ),\n webComponentRootElement: uiShellRootElement,\n webComponentChildren,\n });\n uiShellRootElement.appendChild(appContainerElement);\n\n return {\n appRootElement,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,OAAO,QAAsB,cAAc;AACpD,SAASC,yBAAyB,QAAQ,+CAA+C;AAEzF,SAASC,oBAAoB,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1D,OAAO,MAAMC,0BAGZ,GAAG;EACFC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AAWD,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;EAClBC,yBAAyB;EACzBC,yBAAyB;EACzBC,cAAc,EAAEC,sBAAsB;EACtCC,4BAA4B;EAC5BC,sBAAsB;EACtBC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,sBAAsB;EACtBC,qBAAqB;EACrBC;AAuBF,CAAC,KAAK;EACJ,MAAMT,cAAc,GAClBC,sBAAsB,IAAIS,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAGzDF,kBAAkB,CAACG,YAAY,CAACxB,oBAAoB,EAAE,EAAE,CAAC;EAEzD,MAAM;IAAEyB,OAAO,EAAEC,kBAAkB;IAAEC,SAAS,EAAEC;EAAuB,CAAC,GACtE/B,gBAAgB,CAA2C,CAAC;EAE9D,MAAM;IACJ4B,OAAO,EAAEI,0BAA0B;IACnCF,SAAS,EA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;QACjBkC,qBAAqB,EAAErB,0BAA2B;QAElDsB,kBAAkB,EAAElB,MAAM,CAACC,WAAW,CACpCD,MAAM,CAACE,OAAO,CAAChC,0BAA0B,CAAC,CAACiC,GAAG,CAC5C,CAAC,CAACC,oBAAoB,EAAEC,QAAQ,CAAC,KAAK,CACpCD,oBAAoB,EACpBnC,IAAA;UAAMkD,IAAI,EAAEd;QAAS,CAAE,CAAC,CAE5B,CACF,CAAE;QACFnB,sBAAsB,EAAEA,sBAAuB;QAC/CkC,iBAAiB,EAAEN,iBAAiB,CAACM,iBAAkB;QACvDzB,sBAAsB,EAAEA,sBAAuB;QAC/CR,qBAAqB,EAAEA;MAAsB,CAC9C;IAAC,CACW,CAChB;IACDkC,uBAAuB,EAAEjC,kBAAkB;IAC3CqB;EACF,CAAC,CAAC;EACFrB,kBAAkB,CAACoB,WAAW,CAACD,mBAAmB,CAAC;EAEnD,OAAO;IACL5B,cAAc;IACd2C,iBAAiB,EAAExB,iCAAiC;IACpDC,eAAe;IACfa;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","UiShell","uiShellDataAttribute","renderReactInWebComponent","jsx","_jsx","optionalComponentSlotNames","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","parentElement","sideNavBackgroundColor","topNavBackgroundColor","document","createElement","setAttribute","publish","publishPropChanges","subscribe","subscribeToPropChanges","publishSubscriptionCreated","subscribeToReactAppSubscribed","publishAfterReactAppReadyForProps","closeRightSideMenu","subscribeToCloseRightSideMenu","closeSideNavMenu","subscribeToCloseSideNavMenu","slottedElements","Object","fromEntries","entries","map","optionalComponentKey","slotName","element","webComponentChildren","values","uiShellElement","getReactComponent","reactRootElements","fallback","children","onSubscriptionCreated","optionalComponents","name","uiShellAppElement","appRootElement","uiShellStylesElement","stylesRootElement","webComponentParentElement","appendChild","setComponentProps"],"sources":["../../../src/ui-shell/renderUiShell.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 { type SetStateAction } from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { bufferLatest } from \"./bufferLatest.js\";\nimport { createMessageBus } from \"./createMessageBus.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\n\nexport const optionalComponentSlotNames: Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n string\n> = {\n banners: \"banners\",\n rightSideMenu: \"right-side-menu\",\n sideNavFooter: \"side-nav-footer\",\n topNavLeftSide: \"top-nav-left-side\",\n topNavRightSide: \"top-nav-right-side\",\n};\n\n/**\n * This function renders UI Shell in a web component.\n * This function is agnostic to the UI framework for your app is using. Your application can be another web component, a React app, or even vanilla HTML.\n *\n * **All styles are self-contained.** Even though your application visually renders as children of the web component, its within the global `document` scope, not the web component's `ShadowRoot`. That means any global styles will not affect UI Shell but will affect your application.\n *\n * It places your app's root element in a web component <slot> and ensures it remains rendered in the event of a UI Shell error.\n * It also provides you with other elements fitted to slots in the web component. **In React, you can portal to these components.**\n */\nexport const renderUiShell = ({\n appBackgroundColor,\n appBackgroundContrastMode,\n appElement: providedAppElement,\n appElementScrollingMode,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n parentElement,\n sideNavBackgroundColor,\n topNavBackgroundColor,\n}: {\n /**\n * Notifies when a React rendering error occurs. This could be useful for logging, reporting priority 0 issues, and recovering UI Shell when errors occur.\n */\n onError?: () => void;\n /**\n * HTML element used as the container for UI Shell and the App. They're siblings inside this element.\n */\n parentElement: HTMLElement;\n} & Pick<\n UiShellProps,\n | \"appBackgroundColor\"\n | \"appBackgroundContrastMode\"\n | \"appElementScrollingMode\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"topNavBackgroundColor\"\n> &\n Partial<Pick<UiShellProps, \"appElement\">>) => {\n const appElement = providedAppElement || document.createElement(\"div\");\n\n // Add this attribute so `PageTemplate` and potentially other components will know if they're in UI Shell with special padding already available.\n parentElement.setAttribute(uiShellDataAttribute, \"\");\n\n const { publish: publishPropChanges, subscribe: subscribeToPropChanges } =\n createMessageBus<SetStateAction<UiShellNavComponentProps>>();\n\n const {\n publish: publishSubscriptionCreated,\n subscribe: subscribeToReactAppSubscribed,\n } = createMessageBus();\n\n const publishAfterReactAppReadyForProps = bufferLatest({\n publish: publishPropChanges,\n subscribe: subscribeToReactAppSubscribed,\n });\n\n const {\n publish: closeRightSideMenu,\n subscribe: subscribeToCloseRightSideMenu,\n } = createMessageBus();\n\n const { publish: closeSideNavMenu, subscribe: subscribeToCloseSideNavMenu } =\n createMessageBus();\n\n const slottedElements = Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => {\n const element = document.createElement(\"div\");\n\n element.setAttribute(\"slot\", slotName);\n\n return [optionalComponentKey, element];\n },\n ),\n ) as Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n >;\n\n const webComponentChildren = Object.values(slottedElements);\n\n const uiShellElement = renderReactInWebComponent({\n getReactComponent: (reactRootElements) => (\n <ErrorBoundary fallback={<div data-error />} onError={onError}>\n <UiShell\n appBackgroundColor={appBackgroundColor}\n appBackgroundContrastMode={appBackgroundContrastMode}\n appElement={appElement}\n appElementScrollingMode={appElementScrollingMode}\n closeSideNavMenu={closeSideNavMenu}\n hasStandardAppContentPadding={hasStandardAppContentPadding}\n initialVisibleSections={initialVisibleSections}\n onError={onError}\n onSubscriptionCreated={publishSubscriptionCreated}\n // `optionalComponents` doesn't need to be memoized because gets passed in once, and this isn't a React component.\n optionalComponents={Object.fromEntries(\n Object.entries(optionalComponentSlotNames).map(\n ([optionalComponentKey, slotName]) => [\n optionalComponentKey,\n <slot name={slotName} />,\n ],\n ),\n )}\n sideNavBackgroundColor={sideNavBackgroundColor}\n subscribeToCloseRightSideMenu={subscribeToCloseRightSideMenu}\n subscribeToCloseSideNavMenu={subscribeToCloseSideNavMenu}\n subscribeToPropChanges={subscribeToPropChanges}\n topNavBackgroundColor={topNavBackgroundColor}\n uiShellAppElement={reactRootElements.appRootElement}\n uiShellStylesElement={reactRootElements.stylesRootElement}\n />\n </ErrorBoundary>\n ),\n webComponentParentElement: parentElement,\n webComponentChildren,\n });\n\n parentElement.appendChild(appElement);\n\n return {\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASC,OAAO,QAAsB,cAAc;AAEpD,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,yBAAyB,QAAQ,+CAA+C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1F,OAAO,MAAMC,0BAGZ,GAAG;EACFC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,m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aAAa,CAACwC,WAAW,CAAChD,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACVqB,kBAAkB;IAClBE,gBAAgB;IAChB0B,iBAAiB,EAAE7B,iCAAiC;IACpDK,eAAe;IACfU;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright (c) 2025-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
+ export const subComponentNames = ["TopNav", "SideNav", "AppSwitcher"];
14
+ //# sourceMappingURL=uiShellContentTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiShellContentTypes.js","names":["subComponentNames"],"sources":["../../../src/ui-shell/uiShellContentTypes.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { ReactElement } from \"react\";\nimport { ErrorBoundaryProps } from \"react-error-boundary\";\n\nimport { AppSwitcherProps } from \"./AppSwitcher/AppSwitcher.js\";\nimport { SideNavProps } from \"./SideNav/types.js\";\nimport { TopNavProps } from \"./TopNav/TopNav.js\";\n\nexport const subComponentNames = [\"TopNav\", \"SideNav\", \"AppSwitcher\"] as const;\nexport type SubComponentName = (typeof subComponentNames)[number];\n\nexport type UiShellNavComponentProps = {\n /**\n * Object that gets pass directly to the app switcher component.\n */\n appSwitcherProps?: AppSwitcherProps;\n /**\n * Object that gets pass directly to the side nav component. If `undefined` and in `initialVisibleSections`, SideNav will be initially rendered. Pass `null` to hide a previously-visible SideNav.\n */\n sideNavProps?: Omit<SideNavProps, \"footerComponent\"> | null;\n /**\n * Object that gets pass directly to the top nav component. If `undefined` and in `initialVisibleSections`, TopNav will be initially rendered. Pass `null` to hide a previously-visible TopNav.\n */\n topNavProps?: Omit<\n TopNavProps,\n \"leftSideComponent\" | \"rightSideComponent\"\n > | null;\n};\n\nexport type UiShellContentProps = {\n /**\n * **WARNING:** UI Shell will modify the styling of this element.\n * HTML element where the app gets rendered. This typically called the React root element for your app.\n *\n * When passed, the app is expected to render into this element, not the Shadow DOM.\n *\n * UI Shell will position this element appropriately to match the content area inside the Shadow DOM.\n *\n * A major benefit to having this element separate from UI Shell is related to encapsulation. UI Shell has the capability of rendering inside a web component, but in doing so, the app would be subject to the styles in the web component and not the page itself.\n * The app should either be in its own web component or use the global styles, and having this separate element allows us to accomplish that goal.\n */\n appElement: HTMLDivElement;\n /**\n * Controls the scrolling behavior of the app element area.\n *\n * In the case of an app wanting to control their own scrolling, use `\"none\"`.\n *\n * Most apps will want to use `\"vertical\"` and let UI Shell manage scrolling behavior.\n */\n appElementScrollingMode: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Defaults to `true`.\n *\n * If `false`, the content area will have no padding provided. This is for the case where an app wants to manage this separate from UI Shell.\n */\n hasStandardAppContentPadding?: boolean;\n /**\n * Parts of UI Shell that are visible when rendered.\n *\n * For example, if `sideNavProps` is `undefined`, should there be a space left for side nav or should that space not exist?\n */\n initialVisibleSections?: SubComponentName[];\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 /**\n * Spot for banners to go at the top of the page.\n */\n banners?: ReactElement;\n /**\n * In narrow view, this is the right-side menu area.\n */\n rightSideMenu?: ReactElement;\n /**\n * Footer in the side nav.\n */\n sideNavFooter?: SideNavProps[\"footerComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the left-aligned half.\n */\n topNavLeftSide?: TopNavProps[\"leftSideComponent\"];\n /**\n * Top nav is divided into 2 parts. This is the right-aligned half.\n */\n topNavRightSide?: TopNavProps[\"rightSideComponent\"];\n };\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,MAAMA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,aAAa,CAAU","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright (c) 2025-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
+ */export const SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION = "77px";
12
+ export const SIDE_NAV_WIDTH = "300px";
13
+ export const TOP_NAV_HEIGHT = `${64 / 14}rem`;
14
+ export const UI_SHELL_BASE_Z_INDEX = 100;
15
+ export const UI_SHELL_OVERLAY_Z_INDEX = 200;
16
+ export const emptySideNavItems = [];
17
+ //# sourceMappingURL=uiShellSharedConstants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiShellSharedConstants.js","names":["SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION","SIDE_NAV_WIDTH","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","UI_SHELL_OVERLAY_Z_INDEX","emptySideNavItems"],"sources":["../../../src/ui-shell/uiShellSharedConstants.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { SideNavProps } from \"./SideNav/types.js\";\n\n// It's important to bring all our constant values together, so we can change them in one location and ensure the values are all correct relative to each other.\n// This also lends us the capability of swapping these out for a more robust solution in the future.\n\n/* The side nav collapse icon is placed absolutely from the top (Logo container + nav header height) to align it in the middle of the nav header text */\nexport const SIDE_NAV_VISIBILITY_TOGGLE_ICON_POSITION = \"77px\";\n\nexport const SIDE_NAV_WIDTH = \"300px\";\n\nexport const TOP_NAV_HEIGHT = `${64 / 14}rem`;\n\nexport const UI_SHELL_BASE_Z_INDEX = 100;\n\nexport const UI_SHELL_OVERLAY_Z_INDEX = 200;\n\nexport const emptySideNavItems = [] satisfies SideNavProps[\"sideNavItems\"];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,OAAO,MAAMA,wCAAwC,GAAG,MAAM;AAE9D,OAAO,MAAMC,cAAc,GAAG,OAAO;AAErC,OAAO,MAAMC,cAAc,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK;AAE7C,OAAO,MAAMC,qBAAqB,GAAG,GAAG;AAExC,OAAO,MAAMC,wBAAwB,GAAG,GAAG;AAE3C,OAAO,MAAMC,iBAAiB,GAAG,EAAyC","ignoreList":[]}