@okta/odyssey-contribution-tooling 1.47.1 → 1.49.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 (694) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/assets/{Accordion-BUumLSm9.js → Accordion-BNJn0pfW.js} +1 -1
  3. package/dist/assets/{Accordion.stories-CaMgAnYN.js → Accordion.stories-DZIjfE-o.js} +3 -3
  4. package/dist/assets/{AccordionSummary-0jrOTJTD.js → AccordionSummary-BjqT0nEb.js} +1 -1
  5. package/dist/assets/{AlertTitle-BbBpDTwd.js → AlertTitle-q6ff_Zkl.js} +1 -1
  6. package/dist/assets/{AppSwitcher-B7j0xavZ.js → AppSwitcher-cyyPttJv.js} +1 -1
  7. package/dist/assets/{AppSwitcher.stories-BqeExztr.js → AppSwitcher.stories--8DVDaS1.js} +3 -3
  8. package/dist/assets/AppTile _labs_.stories-D9W_XD90.js +136 -0
  9. package/dist/assets/{ArrowDropDown-LYMnJjPD.js → ArrowDropDown-DdemyKZU.js} +1 -1
  10. package/dist/assets/{ArrowRight-Bi2Pswgc.js → ArrowRight-ChWYjNny.js} +1 -1
  11. package/dist/assets/{Autocomplete-DD8JT6Eb.js → Autocomplete-Cpi_kUVA.js} +1 -1
  12. package/dist/assets/Autocomplete-CxtGbb8j.js +1 -0
  13. package/dist/assets/{Autocomplete.stories-DjkuAafz.js → Autocomplete.stories-CQuaZrwN.js} +3 -3
  14. package/dist/assets/{Badge-C6SBtLt7.js → Badge-BO7bTIEa.js} +1 -1
  15. package/dist/assets/{Banner-itG3HAaL.js → Banner-K7AM0SJj.js} +1 -1
  16. package/dist/assets/{Banner.stories-o2KYQ49p.js → Banner.stories-BRQINNIu.js} +3 -3
  17. package/dist/assets/{BaseButton-COF38VLB.js → BaseButton-DYZHKnV3.js} +1 -1
  18. package/dist/assets/{BaseMenuButton-pigMBOEp.js → BaseMenuButton-BIietjUB.js} +1 -1
  19. package/dist/assets/{Box-BGpAHVQV.js → Box-1mvP3NLW.js} +1 -1
  20. package/dist/assets/Box-BcMTQ_R2.js +1 -0
  21. package/dist/assets/Box-DXoV5_ch.js +11 -0
  22. package/dist/assets/{Box.stories-Bl1v2MtQ.js → Box.stories-C8EeKXhb.js} +1 -1
  23. package/dist/assets/Breadcrumbs-Bp-jt6t5.js +6 -0
  24. package/dist/assets/Breadcrumbs.stories-B_3snTWA.js +79 -0
  25. package/dist/assets/{Bug-CF8uTmAI.js → Bug-CQIUmZ-N.js} +1 -1
  26. package/dist/assets/{Button-DGmXZ3jw.js → Button-BEA5U6Tg.js} +1 -1
  27. package/dist/assets/{Button-CdPi1pZc.js → Button-BzIwUmSM.js} +1 -1
  28. package/dist/assets/{Button.stories-DDHyMQ1_.js → Button.stories-S7v-663i.js} +2 -2
  29. package/dist/assets/ButtonBase-BNqa2TMD.js +74 -0
  30. package/dist/assets/{Calendar-DjJqG0qe.js → Calendar-_GPHtaRa.js} +1 -1
  31. package/dist/assets/{Callout-DyDdgWdc.js → Callout-FZxPpigF.js} +1 -1
  32. package/dist/assets/Callout.stories-CODSBn6K.js +105 -0
  33. package/dist/assets/Card-C0RGIer3.js +1 -0
  34. package/dist/assets/Card-CBiqCoFv.js +8 -0
  35. package/dist/assets/{Card.stories-B_l3D6T0.js → Card.stories-Cp5cSsvN.js} +1 -1
  36. package/dist/assets/{CardActionArea-BTMPt80M.js → CardActionArea-DWrXZntI.js} +1 -1
  37. package/dist/assets/CardActions-BQdq7Bn0.js +1 -0
  38. package/dist/assets/Checkbox-DPv3Q9UW.js +1 -0
  39. package/dist/assets/{Checkbox-BVTNXOF7.js → Checkbox-vZwuXtzm.js} +1 -1
  40. package/dist/assets/Checkbox.stories-9dZS0JMC.js +96 -0
  41. package/dist/assets/{CheckboxGroup-D-ykWUnV.js → CheckboxGroup-Be66QML5.js} +1 -1
  42. package/dist/assets/CheckboxGroup.stories-Cx6CsE7C.js +92 -0
  43. package/dist/assets/{ChevronRight-DkL07pJu.js → ChevronRight-C12ToI7Y.js} +1 -1
  44. package/dist/assets/{ChevronUp-DBzjQ0Vq.js → ChevronUp-CfT7Bz8X.js} +1 -1
  45. package/dist/assets/Chip-CXnMieIl.js +1 -0
  46. package/dist/assets/{CircularProgress-Dfpt5LAz.js → CircularProgress-DPxwxglU.js} +1 -1
  47. package/dist/assets/{CircularProgress-B5_VbcVt.js → CircularProgress-HbIdZLBB.js} +4 -4
  48. package/dist/assets/{CircularProgress.stories-Daf0R9vA.js → CircularProgress.stories-BCClfpJw.js} +1 -1
  49. package/dist/assets/{Clock-Cs7_WjUp.js → Clock-17ua7UAW.js} +1 -1
  50. package/dist/assets/{Close-ATS01D1v.js → Close-OXBt1nIe.js} +1 -1
  51. package/dist/assets/{Code Styling Guidelines-KEouIK7B.js → Code Styling Guidelines-CVbofGQK.js } +1 -1
  52. package/dist/assets/{Collapse-COoe3Qtd.js → Collapse-DfdoVIdP.js} +1 -1
  53. package/dist/assets/{Color-YHDXOIA2-DQdRRXzu.js → Color-YHDXOIA2-DT4T6TnK.js} +1 -1
  54. package/dist/assets/{CssBaseline-D-vAj66q.js → CssBaseline-DpDXOHEK.js} +1 -1
  55. package/dist/assets/{CssBaseline.stories-BOhXBF5h.js → CssBaseline.stories-DeSEyTd-.js} +1 -1
  56. package/dist/assets/{Custom Theming-DmPtfg8b.js → Custom Theming-CmbOHtP1.js } +5 -6
  57. package/dist/assets/Custom Theming.stories-CxVTbjdx.js +95 -0
  58. package/dist/assets/{DataFilters _labs_-blW_3eFm.js → DataFilters _labs_-DvUVhC-g.js } +2 -2
  59. package/dist/assets/{DataFilters _labs_.stories-D2qt9BDz.js → DataFilters _labs_.stories-Ca9tvzkv.js } +1 -1
  60. package/dist/assets/{DataFilters-49CUFFBF.js → DataFilters-BnT_U3-o.js} +1 -1
  61. package/dist/assets/DataTable _labs_-DL8Jc4Hl.js +41 -0
  62. package/dist/assets/{DataTable _labs_.stories-DrwT0H9g.js → DataTable _labs_.stories-C9Tljg4U.js } +2 -2
  63. package/dist/assets/{DataTable-Ka-SCcOh.js → DataTable-S0xhd1LQ.js} +2 -2
  64. package/dist/assets/{DataTable-DeujVhYp.js → DataTable-XayRBHyP.js} +3 -3
  65. package/dist/assets/{DataTable.stories-CaSfkouk.js → DataTable.stories-tcZyd507.js} +1 -1
  66. package/dist/assets/{DataView _labs_-CqZlEyu1.js → DataView _labs_-oQPoSKgb.js } +2 -2
  67. package/dist/assets/{DataView _labs_.stories-CXjSXDeF.js → DataView _labs_.stories-C_xQt04_.js } +1 -1
  68. package/dist/assets/{DataView-CYkwjPzk.js → DataView-C5rMFmwA.js} +7 -7
  69. package/dist/assets/{DataView.stories-DT0ROHOs.js → DataView.stories-oJRHGPAN.js} +148 -65
  70. package/dist/assets/DatePicker-BwDkz3WT.js +1 -0
  71. package/dist/assets/{DatePicker-C9sNy4fj.js → DatePicker-CaivHe9y.js} +2 -2
  72. package/dist/assets/DatePicker.stories-DbwO66Pf.js +133 -0
  73. package/dist/assets/DateTimePicker-B7a9bgL6.js +1 -0
  74. package/dist/assets/{DateTimePicker.stories-B2SaI9OL.js → DateTimePicker.stories-DL2oaP7L.js} +9 -9
  75. package/dist/assets/Design Tokens-CLnoritM.js +4 -0
  76. package/dist/assets/Dialog-CR4TUjlJ.js +1 -0
  77. package/dist/assets/Dialog.stories-2q37jV4r.js +201 -0
  78. package/dist/assets/{DialogContent-_oGbCJT8.js → DialogContent-Cwn-I-C_.js} +1 -1
  79. package/dist/assets/DialogTitle-C-K7jEio.js +1 -0
  80. package/dist/assets/{Divider-DsFAYUeD.js → Divider-Ln3VaO81.js} +1 -1
  81. package/dist/assets/{DocsRenderer-CFRXHY34-IKzmQUB4.js → DocsRenderer-CFRXHY34-CCeAz_jE.js} +1 -1
  82. package/dist/assets/{Documentation-BrTRsPbe.js → Documentation-DF3oo39e.js} +1 -1
  83. package/dist/assets/{Download-CnpAgqy2.js → Download-Zlhupksh.js} +1 -1
  84. package/dist/assets/Drawer-CXQ3piJR.js +33 -0
  85. package/dist/assets/Drawer.stories-Dlkg74m1.js +95 -0
  86. package/dist/assets/{EmptyState-9pxLjmqH.js → EmptyState-CpBEzmap.js} +2 -2
  87. package/dist/assets/EmptyState.stories-Dl57LvdY.js +11 -0
  88. package/dist/assets/ExampleButton.stories-Bbj5W6A-.js +320 -0
  89. package/dist/assets/{Extending Translations-DW0F3Xxk.js → Extending Translations-D38KR8Kn.js } +1 -1
  90. package/dist/assets/{ExternalLink-BZ-Yczsk.js → ExternalLink-D0l1c5Cz.js} +1 -1
  91. package/dist/assets/Fade-dUgBN8rJ.js +1 -0
  92. package/dist/assets/{Field-lyECanzU.js → Field-DH3L8v09.js} +2 -2
  93. package/dist/assets/{FieldHint-C3tXb7u4.js → FieldHint-B3Jif_Up.js} +1 -1
  94. package/dist/assets/{Fieldset-C2nSfkpl.js → Fieldset-D7_59eeI.js} +2 -2
  95. package/dist/assets/Fieldset.stories-B-NXKKP-.js +15 -0
  96. package/dist/assets/{FileUploader.stories-C8jSeElw.js → FileUploader.stories-C9ua336t.js} +8 -8
  97. package/dist/assets/{Filter-Dx8z3DNi.js → Filter-DsDJ7si-.js} +1 -1
  98. package/dist/assets/{Folder-BfxqGqvt.js → Folder-e-po0U54.js} +1 -1
  99. package/dist/assets/{Form Field Accessibility-Bk715sxq.js → Form Field Accessibility-D5GmQTjo.js } +1 -1
  100. package/dist/assets/{Form-BFqw21k4.js → Form-iTx8DKdm.js} +1 -1
  101. package/dist/assets/Form.stories-CKX8F-HV.js +69 -0
  102. package/dist/assets/{FormControlLabel-BKhSSavj.js → FormControlLabel-0BBemR80.js} +1 -1
  103. package/dist/assets/{FormGroup-Cuk9jkbL.js → FormGroup-HFkGZ983.js} +1 -1
  104. package/dist/assets/{FormHelperText-qF3DX-zz.js → FormHelperText-CsNAE1E3.js} +1 -1
  105. package/dist/assets/{FormLabel-BLj3hKkg.js → FormLabel-CiGre9wK.js} +1 -1
  106. package/dist/assets/{FullScreenOverlay-D_QtB3Yt.js → FullScreenOverlay-BTMDlJhE.js} +1 -1
  107. package/dist/assets/{Generating Icons-DU5C85Nu.js → Generating Icons-B_lqn7WI.js } +1 -1
  108. package/dist/assets/{Globe-Brrqdlv8.js → Globe-B83Xmd05.js} +1 -1
  109. package/dist/assets/{Grid-CZMVE6qU.js → Grid-EpV3TL4a.js} +1 -1
  110. package/dist/assets/{Group-B6q-i_C2.js → Group-mTVRC79V.js} +1 -1
  111. package/dist/assets/GroupPicker _labs_.stories-rRod3ZIj.js +33 -0
  112. package/dist/assets/Grow-C8kUeGCY.js +1 -0
  113. package/dist/assets/{Hide-DlEWsxsn.js → Hide-TKfOHglI.js} +1 -1
  114. package/dist/assets/Hint-DoJneNg9.js +11 -0
  115. package/dist/assets/{Home-BiP4Mg1h.js → Home-la7Lmt_L.js} +1 -1
  116. package/dist/assets/Icon _icons_.stories-BmisOf4s.js +16 -0
  117. package/dist/assets/{IconButton-OY9nJWpv.js → IconButton-5qShmnSr.js} +1 -1
  118. package/dist/assets/IconWithTooltip _icons_.stories-C86MVO5n.js +19 -0
  119. package/dist/assets/{InformationCircle-CE8ruoYu.js → InformationCircle-a2jMUKfL.js} +1 -1
  120. package/dist/assets/{InputAdornment-D4SsBOPe.js → InputAdornment-CdR3XT6f.js} +1 -1
  121. package/dist/assets/{InputBase-DSZ9ZgyW.js → InputBase-DeB4_faH.js} +2 -2
  122. package/dist/assets/{Installing odyssey-react-mui-XtugTFlz.js → Installing odyssey-react-mui-BlZZYALn.js } +24 -3
  123. package/dist/assets/{Introduction-Bt8Bd0mz.js → Introduction-D6814AO1.js} +6 -6
  124. package/dist/assets/{Layout-BduWITqf.js → Layout-DGOs1275.js} +1 -1
  125. package/dist/assets/{Layout.stories-BaeIV62G.js → Layout.stories-DE3l510g.js} +2 -2
  126. package/dist/assets/{Legacy Migrations-DZ-fx_Jl.js → Legacy Migrations-B9gOEz-l.js } +1 -1
  127. package/dist/assets/{Link-DI6v1ROk.js → Link-BDoLypER.js} +1 -1
  128. package/dist/assets/{Link-BnBknBcu.js → Link-DNIf0luC.js} +1 -1
  129. package/dist/assets/Link-dX7EI1Ct.js +11 -0
  130. package/dist/assets/{Link.stories-BY0xRfX5.js → Link.stories-DnkjU-5y.js} +1 -1
  131. package/dist/assets/{List-Be7fhh4_.js → List-CmjR1pNu.js} +1 -1
  132. package/dist/assets/{List-DsAZFSEg.js → List-UlX1tusJ.js} +1 -1
  133. package/dist/assets/{ListItem-C8ebNPnP.js → ListItem-C0ExFtXb.js} +1 -1
  134. package/dist/assets/{ListSubheader-Bwc0JItn.js → ListSubheader-CQJAAOsd.js} +1 -1
  135. package/dist/assets/Menu-K9lpVvDG.js +1 -0
  136. package/dist/assets/{MenuButton-Dr4RJoKG.js → MenuButton-B3T7c15t.js} +1 -1
  137. package/dist/assets/MenuButton-hdFGv_9Z.js +9 -0
  138. package/dist/assets/{MenuButton.stories-B5Ron3HG.js → MenuButton.stories-BRHUGqba.js} +1 -1
  139. package/dist/assets/{MenuItem-n-UKDxiu.js → MenuItem-CmSG6PNu.js} +1 -1
  140. package/dist/assets/{MenuItem-B0_vCuIq.js → MenuItem-vhp8G-Nb.js} +1 -1
  141. package/dist/assets/MenuItem.stories-dOOOz3KO.js +29 -0
  142. package/dist/assets/{MenuList-CW8ri5AI.js → MenuList-BMOesnfs.js} +1 -1
  143. package/dist/assets/Modal-CSDyCVCf.js +1 -0
  144. package/dist/assets/{More-D1qrtSvt.js → More-DLQ2RjWn.js} +1 -1
  145. package/dist/assets/NativeSelect.stories-DHgms1GM.js +173 -0
  146. package/dist/assets/{OdysseyProvider-2xjMTEu6.js → OdysseyProvider-qIn9QVYS.js} +5 -5
  147. package/dist/assets/{OdysseyStorybookThemeDecorator-BRjYVaUu.js → OdysseyStorybookThemeDecorator-BuDiOG2V.js} +1 -1
  148. package/dist/assets/{OdysseyThemeProvider-BBwjgzn2.js → OdysseyThemeProvider-Bh0Bu-2o.js} +1 -1
  149. package/dist/assets/{PageHeader.stories-q0-kxFNT.js → PageHeader.stories-MDEEjM1g.js} +2 -2
  150. package/dist/assets/PageHeader.stories-eACdVWYK.js +57 -0
  151. package/dist/assets/PageTemplate _labs_-BuvgCua7.js +8 -0
  152. package/dist/assets/{PageTemplate _labs_.stories-DtJtMC5B.js → PageTemplate _labs_.stories-C8RdfTqi.js } +1 -1
  153. package/dist/assets/{PageTemplate-mNUP99LO.js → PageTemplate-D-EQlTUx.js} +2 -2
  154. package/dist/assets/PageTemplate.stories-BzgC-WCT.js +197 -0
  155. package/dist/assets/{PaginatedTable _labs_.stories--9YveFu7.js → PaginatedTable _labs_.stories-CvpuSFlt.js } +3 -3
  156. package/dist/assets/{Pagination-D6myvUfo.js → Pagination-CB1wBW8Q.js} +2 -2
  157. package/dist/assets/Pagination.stories-RoH8O-RA.js +17 -0
  158. package/dist/assets/{Paper-XsV8SWR9.js → Paper-D-_O-EjU.js} +1 -1
  159. package/dist/assets/PasswordField.stories-BUOy4gYe.js +129 -0
  160. package/dist/assets/Picker _labs_.stories-BIZmrH82.js +18 -0
  161. package/dist/assets/{PickerWithOptionAdornment _labs_.stories-DZ_mcN9y.js → PickerWithOptionAdornment _labs_.stories-CQYX6Af7.js } +3 -3
  162. package/dist/assets/Popper-BARIxJrI.js +1 -0
  163. package/dist/assets/Portal-C6D59xAE.js +1 -0
  164. package/dist/assets/ProgressBar.stories-Dyp9UXSp.js +311 -0
  165. package/dist/assets/{Radio-BimAm2in.js → Radio-B4gVvwps.js} +1 -1
  166. package/dist/assets/Radio-BdNnpooK.js +1 -0
  167. package/dist/assets/{Radio.stories-BIH7UBMO.js → Radio.stories-BtiaRnXY.js} +3 -3
  168. package/dist/assets/{RadioGroup-DhVJQTpS.js → RadioGroup-BYJZ378_.js} +1 -1
  169. package/dist/assets/RadioGroup-CtUWSbQc.js +1 -0
  170. package/dist/assets/RadioGroup-D1k5iqEQ.js +10 -0
  171. package/dist/assets/RadioGroup.stories-kfMrpCQ4.js +138 -0
  172. package/dist/assets/{Refresh-GVzSl4pN.js → Refresh-DexPEklu.js} +1 -1
  173. package/dist/assets/ResourceAccessPolicyComponentsStorybookThemeDecorator-Bo_QNpfC.js +212 -0
  174. package/dist/assets/{Right-to-Left (RTL)-DyJ58shp.js → Right-to-Left (RTL)-BHFSR1q8.js } +1 -1
  175. package/dist/assets/{ScreenReaderText-CM78bF1y.js → ScreenReaderText-CebALBsG.js} +1 -1
  176. package/dist/assets/{ScreenReaderText-CqMaDm6f.js → ScreenReaderText-DkVEZTIb.js} +2 -2
  177. package/dist/assets/ScreenReaderText.stories-BuS5WxvE.js +8 -0
  178. package/dist/assets/{Search-CkfJXFe5.js → Search-C5TVrLyE.js} +1 -1
  179. package/dist/assets/{SearchDropdown _labs_.stories-BQPhsSku.js → SearchDropdown _labs_.stories-Bq7Qapoa.js } +3 -3
  180. package/dist/assets/{SearchField-CYM6nbh5.js → SearchField-BdnOrhVM.js} +1 -1
  181. package/dist/assets/SearchField.stories-IB3f7QOK.js +37 -0
  182. package/dist/assets/Select-DZTigpTO.js +1 -0
  183. package/dist/assets/{Select-DJ071lNE.js → Select-KZvejALm.js} +2 -2
  184. package/dist/assets/{Select.stories-Dv7mWYvh.js → Select.stories-5trfU4Ma.js} +2 -2
  185. package/dist/assets/{Server-DjXPiVgb.js → Server-Ch5aeRtt.js} +1 -1
  186. package/dist/assets/{Settings-CjXK8-N1.js → Settings-2rTKyez8.js} +1 -1
  187. package/dist/assets/{Setup-C5eWg4Hp.js → Setup-BDM9nDVO.js} +1 -1
  188. package/dist/assets/{Shadow DOM-CwtnF89G.js → Shadow DOM-DHECKIzr.js } +1 -1
  189. package/dist/assets/{Show-BmUFIvXd.js → Show-BnmQFsN6.js} +1 -1
  190. package/dist/assets/{SideNav-CJ4qafJJ.js → SideNav-5pMdKSEl.js} +13 -13
  191. package/dist/assets/{SideNav-Bks9RS2j.js → SideNav-bhdOFKbL.js} +3 -3
  192. package/dist/assets/{SideNav.stories-C1fpy9wN.js → SideNav.stories-ciX1pArE.js} +1 -1
  193. package/dist/assets/{Skeleton-dfR0DjWP.js → Skeleton-BPjIT6NG.js} +5 -5
  194. package/dist/assets/Snackbar-BM0ZOC4Y.js +1 -0
  195. package/dist/assets/{Stack-DKhviX3e.js → Stack-B7OGvu7C.js} +1 -1
  196. package/dist/assets/{Stack.stories-BDHo9eFa.js → Stack.stories-CYylNLHT.js} +1 -1
  197. package/dist/assets/{StaticTable _labs_.stories-Dxpy5sLd.js → StaticTable _labs_.stories-ChL0Cwn4.js } +3 -3
  198. package/dist/assets/{Status-BpzpxYZ-.js → Status-BlOUycBm.js} +1 -1
  199. package/dist/assets/{Status.stories-DLINjRQE.js → Status.stories-Dv4b1Z5X.js} +2 -2
  200. package/dist/assets/{Surface-3Y97A1O8.js → Surface-DTngmQRF.js} +1 -1
  201. package/dist/assets/{Switch.stories-pYIYfkr3.js → Switch.stories-hjVvL7UR.js} +5 -5
  202. package/dist/assets/{SwitchBase-D-uzeIbM.js → SwitchBase-CefEM0OA.js} +1 -1
  203. package/dist/assets/{Sync-DFFNrTTV.js → Sync-BbqTDeWk.js} +1 -1
  204. package/dist/assets/Tabs-CQz87GHd.js +1 -0
  205. package/dist/assets/{Tabs-SRLNy8_X.js → Tabs-gXh7YFSu.js} +6 -6
  206. package/dist/assets/Tabs.stories-CRJgQA20.js +100 -0
  207. package/dist/assets/{Tag-BgjQI7VM.js → Tag-DwH0t814.js} +1 -1
  208. package/dist/assets/Tag.stories-CoLnXBke.js +96 -0
  209. package/dist/assets/{TagList-DGN86KvF.js → TagList-BZGEhGXn.js} +1 -1
  210. package/dist/assets/{TextField-BuwBI2RX.js → TextField-BhK0y2Zt.js} +1 -1
  211. package/dist/assets/{TextField.stories-DL7enA3k.js → TextField.stories-DYOK0z5b.js} +2 -2
  212. package/dist/assets/Toast.stories-BipAY3GN.js +134 -0
  213. package/dist/assets/ToastManager.stories-BWZvSWGT.js +196 -0
  214. package/dist/assets/Tooltip-Cq2rQGbD.js +1 -0
  215. package/dist/assets/{Tooltip-XQJL1Byd.js → Tooltip-CsVWtVfL.js} +1 -1
  216. package/dist/assets/Tooltip.stories-B6wyATg5.js +68 -0
  217. package/dist/assets/{TopNav-dZWiR_bv.js → TopNav-DEIYDz6v.js} +1 -1
  218. package/dist/assets/TopNav.stories-DJNZEi08.js +13 -0
  219. package/dist/assets/TransitionGroupContext-DAL84N7p.js +1 -0
  220. package/dist/assets/{Typography-CORddEdk.js → Typography-CkeEfKaM.js} +1 -1
  221. package/dist/assets/{Typography-Yf1Zkad_.js → Typography-ClQ35Rr-.js} +1 -1
  222. package/dist/assets/{Typography-DfSdXC7o.js → Typography-Cz6D417Y.js} +1 -1
  223. package/dist/assets/Typography-r6MlG5YM.js +1 -0
  224. package/dist/assets/Typography.stories-93RlEwpU.js +73 -0
  225. package/dist/assets/{Typography.stories-D-TscJaP.js → Typography.stories-DRUYEGzH.js} +1 -1
  226. package/dist/assets/{UiShell.stories-BRpnZ7zi.js → UiShell.stories-HV8yGvd3.js} +3 -3
  227. package/dist/assets/{UiShellProvider-BOM87LOZ.js → UiShellProvider-BEcD16AU.js} +1 -1
  228. package/dist/assets/{Upload-CXJBKzcC.js → Upload-CfzP_Muq.js} +1 -1
  229. package/dist/assets/{User-D6db-Gy0.js → User-CyxEAfVT.js} +1 -1
  230. package/dist/assets/{UserProfile-DqokqHU1.js → UserProfile-B6GSEZPs.js} +1 -1
  231. package/dist/assets/UserProfile.stories-Cx9GmLsV.js +14 -0
  232. package/dist/assets/{UserProfileMenuButton.stories-CKErfTVM.js → UserProfileMenuButton.stories-BjxJHNWm.js} +3 -3
  233. package/dist/assets/{Video-B1Csvrbu.js → Video-DWT3WylB.js} +1 -1
  234. package/dist/assets/WorkflowsComponentsStorybookThemeDecorator-CxOFxh0W.js +197 -0
  235. package/dist/assets/assertThisInitialized-B9jnkVVz.js +1 -0
  236. package/dist/assets/{colorManipulator-CjGkpVfF.js → colorManipulator-DKifQsuo.js} +1 -1
  237. package/dist/assets/createBox-Dxawkfow.js +1 -0
  238. package/dist/assets/{createStyled-D0LG5-qz.js → createStyled-D6bTcpHC.js} +1 -1
  239. package/dist/assets/{createSvgIcon-DsUj6UQo.js → createSvgIcon-ClUWwDzL.js} +1 -1
  240. package/dist/assets/{dialogActionsClasses-BWrWITLY.js → dialogActionsClasses-ZEPlxVw-.js} +1 -1
  241. package/dist/assets/emotion-react-jsx-runtime.browser.esm-DL0BDwaj.js +1 -0
  242. package/dist/assets/{entry-preview-CklzQ6bB.js → entry-preview-BxxndF3a.js} +1 -1
  243. package/dist/assets/getReactElementRef-DsIevm5t.js +1 -0
  244. package/dist/assets/i18next-7SyOfhCu.js +1 -0
  245. package/dist/assets/{iconUtils-B6sV00nC.js → iconUtils-BII10A1q.js} +1 -1
  246. package/dist/assets/{iframe-CXLAql3E.js → iframe-Cf-Lpz6Y.js} +2 -2
  247. package/dist/assets/{index-Dj8r1U9U.js → index-DB8HwIVZ.js} +1 -1
  248. package/dist/assets/{index-BqmbiZ7T.js → index-DLgQDw3r.js} +3 -3
  249. package/dist/assets/{index-DRboDwvZ.js → index-Ml2UeFXJ.js} +1 -1
  250. package/dist/assets/index-_dyfSX8u.js +1 -0
  251. package/dist/assets/index.esm-CBOWgn41.js +1 -0
  252. package/dist/assets/{index.esm-CaIA2ztV.js → index.esm-DTxqsiYY.js} +1 -1
  253. package/dist/assets/inheritsLoose-CJ6Ie9dp.js +1 -0
  254. package/dist/assets/{personData-zrA1iJih.js → personData-BYPP3apv.js} +1 -1
  255. package/dist/assets/{personData-vW3mumD1.js → personData-CRkmqebZ.js} +1 -1
  256. package/dist/assets/{pickerComponentPropsMetadata-P9x80E4R.js → pickerComponentPropsMetadata-D10GkMIO.js} +3 -3
  257. package/dist/assets/popper-BVOCD5jc.js +1 -0
  258. package/dist/assets/{preview-BprB3Yzd.js → preview-D06dtFvI.js} +2 -2
  259. package/dist/assets/{preview-_inBJXZG.js → preview-Dk8DzNBz.js} +1 -1
  260. package/dist/assets/renderUiShell.stories-CAw-IOS4.js +866 -0
  261. package/dist/assets/{resolveComponentProps-BzfJewMt.js → resolveComponentProps-DXQ8X87i.js} +1 -1
  262. package/dist/assets/{tableSortLabelClasses-DtOYtU1J.js → tableSortLabelClasses-CkKrbp1R.js} +1 -1
  263. package/dist/assets/{useAutocomplete-DwWveFvJ.js → useAutocomplete-BRetTkpF.js} +1 -1
  264. package/dist/assets/{useMobilePicker-5I3ooa1D.js → useMobilePicker-DZhX9dEQ.js} +1 -1
  265. package/dist/assets/useOdysseyDateFields-DPSkeXJj.js +61 -0
  266. package/dist/assets/{useScrollIndication-C4t86M0g.js → useScrollIndication-mYI-g6xa.js} +3 -3
  267. package/dist/assets/{useSlot-CaOQD_17.js → useSlot-CvpE2t6D.js} +1 -1
  268. package/dist/assets/useThemeProps-BPvYx-mf.js +1 -0
  269. package/dist/assets/useThemeProps-DwvbKxez.js +1 -0
  270. package/dist/assets/utils-kUZVaD1e.js +1 -0
  271. package/dist/cjs/DataTable/DataTable.cjs +18 -16
  272. package/dist/cjs/DataTable/DataTable.cjs.map +1 -1
  273. package/dist/cjs/DataTable/DataTableRowActions.cjs +13 -12
  274. package/dist/cjs/DataTable/DataTableRowActions.cjs.map +1 -1
  275. package/dist/cjs/DataTable/DataTableSettings.cjs +9 -8
  276. package/dist/cjs/DataTable/DataTableSettings.cjs.map +1 -1
  277. package/dist/cjs/DatePickers/DateFieldActionBar.cjs +3 -3
  278. package/dist/cjs/DatePickers/DateFieldActionBar.cjs.map +1 -1
  279. package/dist/cjs/DatePickers/DatePicker.cjs +2 -2
  280. package/dist/cjs/DatePickers/DatePicker.cjs.map +1 -1
  281. package/dist/cjs/DatePickers/datePickerTheme.cjs +2 -2
  282. package/dist/cjs/DatePickers/datePickerTheme.cjs.map +1 -1
  283. package/dist/cjs/Dialog.cjs +4 -4
  284. package/dist/cjs/Dialog.cjs.map +1 -1
  285. package/dist/cjs/Drawer.cjs +29 -18
  286. package/dist/cjs/Drawer.cjs.map +1 -1
  287. package/dist/cjs/{Checkbox.cjs → Fields/Checkbox.cjs} +7 -16
  288. package/dist/cjs/Fields/Checkbox.cjs.map +1 -0
  289. package/dist/cjs/{CheckboxGroup.cjs → Fields/CheckboxGroup.cjs} +1 -1
  290. package/dist/cjs/Fields/CheckboxGroup.cjs.map +1 -0
  291. package/dist/cjs/Fields/Hint.cjs +31 -0
  292. package/dist/cjs/Fields/Hint.cjs.map +1 -0
  293. package/dist/cjs/{Radio.cjs → Fields/Radio.cjs} +5 -14
  294. package/dist/cjs/Fields/Radio.cjs.map +1 -0
  295. package/dist/cjs/{RadioGroup.cjs → Fields/RadioGroup.cjs} +2 -2
  296. package/dist/cjs/Fields/RadioGroup.cjs.map +1 -0
  297. package/dist/cjs/FileUploader/FileUploader.cjs +6 -6
  298. package/dist/cjs/FileUploader/FileUploader.cjs.map +1 -1
  299. package/dist/cjs/Form.cjs.map +1 -1
  300. package/dist/cjs/OdysseyThemeProvider.cjs +2 -2
  301. package/dist/cjs/OdysseyThemeProvider.cjs.map +1 -1
  302. package/dist/cjs/OdysseyThemeProviderPropsContext.cjs.map +1 -1
  303. package/dist/cjs/Pagination/Pagination.cjs +7 -7
  304. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  305. package/dist/cjs/Toast.cjs +4 -4
  306. package/dist/cjs/Toast.cjs.map +1 -1
  307. package/dist/cjs/__internal.cjs +143 -0
  308. package/dist/cjs/__internal.cjs.map +1 -1
  309. package/dist/cjs/index.cjs +685 -613
  310. package/dist/cjs/index.cjs.map +1 -1
  311. package/dist/cjs/labs/AppTile.cjs +2 -2
  312. package/dist/cjs/labs/AppTile.cjs.map +1 -1
  313. package/dist/cjs/labs/DataFilters.cjs +16 -16
  314. package/dist/cjs/labs/DataFilters.cjs.map +1 -1
  315. package/dist/cjs/labs/DataTablePagination.cjs +7 -7
  316. package/dist/cjs/labs/DataTablePagination.cjs.map +1 -1
  317. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs +7 -6
  318. package/dist/cjs/labs/DataView/BulkActionsMenu.cjs.map +1 -1
  319. package/dist/cjs/labs/DataView/DataView.cjs +8 -7
  320. package/dist/cjs/labs/DataView/DataView.cjs.map +1 -1
  321. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs +4 -3
  322. package/dist/cjs/labs/DataView/LayoutSwitcher.cjs.map +1 -1
  323. package/dist/cjs/labs/DataView/RowActions.cjs +10 -10
  324. package/dist/cjs/labs/DataView/RowActions.cjs.map +1 -1
  325. package/dist/cjs/labs/DataView/TableLayoutContent.cjs +11 -10
  326. package/dist/cjs/labs/DataView/TableLayoutContent.cjs.map +1 -1
  327. package/dist/cjs/labs/DataView/TableSettings.cjs +9 -8
  328. package/dist/cjs/labs/DataView/TableSettings.cjs.map +1 -1
  329. package/dist/cjs/labs/DataView/componentTypes.cjs.map +1 -1
  330. package/dist/cjs/labs/DataView/useFilterConversion.cjs.map +1 -1
  331. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs +7 -7
  332. package/dist/cjs/labs/DatePickers/DateTimePicker.cjs.map +1 -1
  333. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs +3 -3
  334. package/dist/cjs/labs/DatePickers/dateTimePickerTheme.cjs.map +1 -1
  335. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs +2 -2
  336. package/dist/cjs/labs/OdysseyPickers/PickerWithOptionAdornment.cjs.map +1 -1
  337. package/dist/cjs/labs/index.cjs +156 -28
  338. package/dist/cjs/labs/index.cjs.map +1 -1
  339. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs +2 -0
  340. package/dist/cjs/ui-shell/SideNav/NavAccordion.cjs.map +1 -1
  341. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +5 -3
  342. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  343. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  344. package/dist/cjs/ui-shell/WideUiShellContent.cjs +9 -9
  345. package/dist/cjs/ui-shell/WideUiShellContent.cjs.map +1 -1
  346. package/dist/cjs/ui-shell/index.cjs +24 -12
  347. package/dist/cjs/ui-shell/index.cjs.map +1 -1
  348. package/dist/cjs/ui-shell/renderUiShell.cjs +4 -2
  349. package/dist/cjs/ui-shell/renderUiShell.cjs.map +1 -1
  350. package/dist/cjs/web-component/createShadowDomElements.cjs +2 -2
  351. package/dist/cjs/web-component/createShadowDomElements.cjs.map +1 -1
  352. package/dist/cjs/web-component/{removeGlobalStylesFromShadowDom.cjs → encapsulateShadowDomFromGlobalStyles.cjs} +4 -4
  353. package/dist/cjs/web-component/encapsulateShadowDomFromGlobalStyles.cjs.map +1 -0
  354. package/dist/cjs/web-component/index.cjs +4 -4
  355. package/dist/cjs/web-component/index.cjs.map +1 -1
  356. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs +1 -1
  357. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -1
  358. package/dist/cjs/web-component/renderReactInWebComponent.cjs +12 -8
  359. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  360. package/dist/esm/DataTable/DataTable.js +4 -2
  361. package/dist/esm/DataTable/DataTable.js.map +1 -1
  362. package/dist/esm/DataTable/DataTableRowActions.js +2 -1
  363. package/dist/esm/DataTable/DataTableRowActions.js.map +1 -1
  364. package/dist/esm/DataTable/DataTableSettings.js +2 -1
  365. package/dist/esm/DataTable/DataTableSettings.js.map +1 -1
  366. package/dist/esm/DatePickers/DateFieldActionBar.js +1 -1
  367. package/dist/esm/DatePickers/DateFieldActionBar.js.map +1 -1
  368. package/dist/esm/DatePickers/DatePicker.js +1 -1
  369. package/dist/esm/DatePickers/DatePicker.js.map +1 -1
  370. package/dist/esm/DatePickers/datePickerTheme.js +1 -1
  371. package/dist/esm/DatePickers/datePickerTheme.js.map +1 -1
  372. package/dist/esm/Dialog.js +1 -1
  373. package/dist/esm/Dialog.js.map +1 -1
  374. package/dist/esm/Drawer.js +26 -15
  375. package/dist/esm/Drawer.js.map +1 -1
  376. package/dist/esm/{Checkbox.js → Fields/Checkbox.js} +6 -16
  377. package/dist/esm/Fields/Checkbox.js.map +1 -0
  378. package/dist/esm/{CheckboxGroup.js → Fields/CheckboxGroup.js} +1 -1
  379. package/dist/esm/Fields/CheckboxGroup.js.map +1 -0
  380. package/dist/esm/Fields/Hint.js +24 -0
  381. package/dist/esm/Fields/Hint.js.map +1 -0
  382. package/dist/esm/{Radio.js → Fields/Radio.js} +4 -14
  383. package/dist/esm/Fields/Radio.js.map +1 -0
  384. package/dist/esm/{RadioGroup.js → Fields/RadioGroup.js} +2 -2
  385. package/dist/esm/Fields/RadioGroup.js.map +1 -0
  386. package/dist/esm/FileUploader/FileUploader.js +2 -3
  387. package/dist/esm/FileUploader/FileUploader.js.map +1 -1
  388. package/dist/esm/Form.js.map +1 -1
  389. package/dist/esm/OdysseyThemeProvider.js +1 -1
  390. package/dist/esm/OdysseyThemeProvider.js.map +1 -1
  391. package/dist/esm/OdysseyThemeProviderPropsContext.js.map +1 -1
  392. package/dist/esm/Pagination/Pagination.js +1 -1
  393. package/dist/esm/Pagination/Pagination.js.map +1 -1
  394. package/dist/esm/Toast.js +1 -1
  395. package/dist/esm/Toast.js.map +1 -1
  396. package/dist/esm/__internal.js +13 -0
  397. package/dist/esm/__internal.js.map +1 -1
  398. package/dist/esm/index.js +62 -54
  399. package/dist/esm/index.js.map +1 -1
  400. package/dist/esm/labs/AppTile.js +1 -1
  401. package/dist/esm/labs/AppTile.js.map +1 -1
  402. package/dist/esm/labs/DataFilters.js +5 -5
  403. package/dist/esm/labs/DataFilters.js.map +1 -1
  404. package/dist/esm/labs/DataTablePagination.js +1 -1
  405. package/dist/esm/labs/DataTablePagination.js.map +1 -1
  406. package/dist/esm/labs/DataView/BulkActionsMenu.js +2 -1
  407. package/dist/esm/labs/DataView/BulkActionsMenu.js.map +1 -1
  408. package/dist/esm/labs/DataView/DataView.js +3 -2
  409. package/dist/esm/labs/DataView/DataView.js.map +1 -1
  410. package/dist/esm/labs/DataView/LayoutSwitcher.js +2 -1
  411. package/dist/esm/labs/DataView/LayoutSwitcher.js.map +1 -1
  412. package/dist/esm/labs/DataView/RowActions.js +1 -1
  413. package/dist/esm/labs/DataView/RowActions.js.map +1 -1
  414. package/dist/esm/labs/DataView/TableLayoutContent.js +2 -1
  415. package/dist/esm/labs/DataView/TableLayoutContent.js.map +1 -1
  416. package/dist/esm/labs/DataView/TableSettings.js +2 -1
  417. package/dist/esm/labs/DataView/TableSettings.js.map +1 -1
  418. package/dist/esm/labs/DataView/componentTypes.js.map +1 -1
  419. package/dist/esm/labs/DataView/useFilterConversion.js.map +1 -1
  420. package/dist/esm/labs/DatePickers/DateTimePicker.js +2 -2
  421. package/dist/esm/labs/DatePickers/DateTimePicker.js.map +1 -1
  422. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js +1 -1
  423. package/dist/esm/labs/DatePickers/dateTimePickerTheme.js.map +1 -1
  424. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js +1 -1
  425. package/dist/esm/labs/OdysseyPickers/PickerWithOptionAdornment.js.map +1 -1
  426. package/dist/esm/labs/index.js +18 -7
  427. package/dist/esm/labs/index.js.map +1 -1
  428. package/dist/esm/ui-shell/SideNav/NavAccordion.js +2 -0
  429. package/dist/esm/ui-shell/SideNav/NavAccordion.js.map +1 -1
  430. package/dist/esm/ui-shell/SideNav/SideNav.js +4 -2
  431. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  432. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  433. package/dist/esm/ui-shell/WideUiShellContent.js +3 -3
  434. package/dist/esm/ui-shell/WideUiShellContent.js.map +1 -1
  435. package/dist/esm/ui-shell/index.js +4 -3
  436. package/dist/esm/ui-shell/index.js.map +1 -1
  437. package/dist/esm/ui-shell/renderUiShell.js +4 -2
  438. package/dist/esm/ui-shell/renderUiShell.js.map +1 -1
  439. package/dist/esm/web-component/createShadowDomElements.js +2 -2
  440. package/dist/esm/web-component/createShadowDomElements.js.map +1 -1
  441. package/dist/esm/web-component/{removeGlobalStylesFromShadowDom.js → encapsulateShadowDomFromGlobalStyles.js} +2 -2
  442. package/dist/esm/web-component/encapsulateShadowDomFromGlobalStyles.js.map +1 -0
  443. package/dist/esm/web-component/index.js +1 -1
  444. package/dist/esm/web-component/index.js.map +1 -1
  445. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +1 -1
  446. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -1
  447. package/dist/esm/web-component/renderReactInWebComponent.js +12 -8
  448. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  449. package/dist/iframe.html +1 -1
  450. package/dist/index.d.ts +21 -232
  451. package/dist/index.json +1 -1
  452. package/dist/project.json +1 -1
  453. package/dist/sb-addons/storybook-13/manager-bundle.js +1 -1
  454. package/dist/tsconfig.production.tsbuildinfo +1 -1
  455. package/dist/tsconfig.tsbuildinfo +1 -1
  456. package/dist/types/DataTable/DataTable.d.ts +3 -3
  457. package/dist/types/DataTable/DataTable.d.ts.map +1 -1
  458. package/dist/types/DataTable/DataTableRowActions.d.ts +2 -1
  459. package/dist/types/DataTable/DataTableRowActions.d.ts.map +1 -1
  460. package/dist/types/DataTable/DataTableSettings.d.ts.map +1 -1
  461. package/dist/types/Dialog.d.ts +1 -1
  462. package/dist/types/Dialog.d.ts.map +1 -1
  463. package/dist/types/Drawer.d.ts +1 -1
  464. package/dist/types/Drawer.d.ts.map +1 -1
  465. package/dist/types/{Checkbox.d.ts → Fields/Checkbox.d.ts} +4 -4
  466. package/dist/types/Fields/Checkbox.d.ts.map +1 -0
  467. package/dist/types/{CheckboxGroup.d.ts → Fields/CheckboxGroup.d.ts} +2 -2
  468. package/dist/types/Fields/CheckboxGroup.d.ts.map +1 -0
  469. package/dist/{esm/DatePickers/index.js → types/Fields/Hint.d.ts} +9 -6
  470. package/dist/types/Fields/Hint.d.ts.map +1 -0
  471. package/dist/types/{Radio.d.ts → Fields/Radio.d.ts} +3 -3
  472. package/dist/types/Fields/Radio.d.ts.map +1 -0
  473. package/dist/types/{RadioGroup.d.ts → Fields/RadioGroup.d.ts} +2 -2
  474. package/dist/types/Fields/RadioGroup.d.ts.map +1 -0
  475. package/dist/types/FileUploader/FileUploader.d.ts +1 -2
  476. package/dist/types/FileUploader/FileUploader.d.ts.map +1 -1
  477. package/dist/types/Form.d.ts +1 -1
  478. package/dist/types/Form.d.ts.map +1 -1
  479. package/dist/types/OdysseyThemeProviderPropsContext.d.ts +1 -1
  480. package/dist/types/__internal.d.ts +13 -0
  481. package/dist/types/__internal.d.ts.map +1 -1
  482. package/dist/types/index.d.ts.map +1 -1
  483. package/dist/types/labs/DataView/BulkActionsMenu.d.ts.map +1 -1
  484. package/dist/types/labs/DataView/DataView.d.ts.map +1 -1
  485. package/dist/types/labs/DataView/LayoutSwitcher.d.ts.map +1 -1
  486. package/dist/types/labs/DataView/RowActions.d.ts +2 -1
  487. package/dist/types/labs/DataView/RowActions.d.ts.map +1 -1
  488. package/dist/types/labs/DataView/TableLayoutContent.d.ts.map +1 -1
  489. package/dist/types/labs/DataView/TableSettings.d.ts.map +1 -1
  490. package/dist/types/labs/DataView/componentTypes.d.ts +1 -1
  491. package/dist/types/labs/DataView/componentTypes.d.ts.map +1 -1
  492. package/dist/types/labs/index.d.ts +19 -7
  493. package/dist/types/labs/index.d.ts.map +1 -1
  494. package/dist/types/tsconfig.tsbuildinfo +1 -1
  495. package/dist/types/ui-shell/SideNav/NavAccordion.d.ts +1 -1
  496. package/dist/types/ui-shell/SideNav/NavAccordion.d.ts.map +1 -1
  497. package/dist/types/ui-shell/SideNav/SideNav.d.ts +0 -2
  498. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  499. package/dist/types/ui-shell/SideNav/types.d.ts +4 -0
  500. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  501. package/dist/types/ui-shell/index.d.ts +4 -3
  502. package/dist/types/ui-shell/index.d.ts.map +1 -1
  503. package/dist/types/ui-shell/renderUiShell.d.ts +5 -1
  504. package/dist/types/ui-shell/renderUiShell.d.ts.map +1 -1
  505. package/dist/types/web-component/{removeGlobalStylesFromShadowDom.d.ts → encapsulateShadowDomFromGlobalStyles.d.ts} +2 -2
  506. package/dist/types/web-component/encapsulateShadowDomFromGlobalStyles.d.ts.map +1 -0
  507. package/dist/types/web-component/index.d.ts +1 -1
  508. package/dist/types/web-component/index.d.ts.map +1 -1
  509. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +1 -1
  510. package/dist/types/web-component/renderReactInWebComponent.d.ts +8 -2
  511. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  512. package/package.json +3 -3
  513. package/dist/assets/AdapterLuxon-0NB_ajTr.js +0 -1
  514. package/dist/assets/AppTile _labs_.stories-uDhyBCfD.js +0 -136
  515. package/dist/assets/Autocomplete-CXy6JKKy.js +0 -1
  516. package/dist/assets/Box-CWTB5xfE.js +0 -1
  517. package/dist/assets/Box-D2NdOYc2.js +0 -11
  518. package/dist/assets/Breadcrumbs-6BEAV_iX.js +0 -1
  519. package/dist/assets/Breadcrumbs-C2ZpdmyC.js +0 -6
  520. package/dist/assets/Breadcrumbs.stories-WwSpw0c-.js +0 -79
  521. package/dist/assets/Button-B6KDXfay.js +0 -41
  522. package/dist/assets/ButtonBase-BAQsCgRq.js +0 -74
  523. package/dist/assets/Callout.stories-nPexHuaO.js +0 -105
  524. package/dist/assets/Card-2fiTHibU.js +0 -8
  525. package/dist/assets/Card-CaY-V3Lt.js +0 -1
  526. package/dist/assets/CardActions-X5bUcMdJ.js +0 -1
  527. package/dist/assets/Checkbox-BCh8HZ37.js +0 -1
  528. package/dist/assets/Checkbox.stories-CQ5I8O9l.js +0 -96
  529. package/dist/assets/CheckboxGroup.stories-B4ljyQRV.js +0 -81
  530. package/dist/assets/Chip-DXaMeATb.js +0 -1
  531. package/dist/assets/Custom Theming.stories-t0y6qbUN.js +0 -95
  532. package/dist/assets/DataTable _labs_-CJnucUaL.js +0 -41
  533. package/dist/assets/DatePicker-txjKmLSi.js +0 -1
  534. package/dist/assets/DatePicker.stories-VLeccVga.js +0 -133
  535. package/dist/assets/DateTimePicker-LSjVE-IM.js +0 -1
  536. package/dist/assets/Design Tokens-DrLUPXCc.js +0 -4
  537. package/dist/assets/Dialog-CRuld07G.js +0 -1
  538. package/dist/assets/Dialog.stories-Bm_j9j63.js +0 -201
  539. package/dist/assets/DialogContentText-DU3-VV7L.js +0 -1
  540. package/dist/assets/DialogTitle-DyO9kr6R.js +0 -1
  541. package/dist/assets/Drawer-CwxKxBTE.js +0 -27
  542. package/dist/assets/Drawer-DEqB4KYp.js +0 -1
  543. package/dist/assets/Drawer.stories-Dvgnp9yd.js +0 -95
  544. package/dist/assets/EmptyState.stories-DK1ZE36w.js +0 -11
  545. package/dist/assets/ExampleButton.stories-C51QbMy5.js +0 -11
  546. package/dist/assets/Fade-CVbWKXvx.js +0 -1
  547. package/dist/assets/Fieldset.stories-BU8d3fia.js +0 -15
  548. package/dist/assets/Form.stories-Clfikd2x.js +0 -69
  549. package/dist/assets/GroupPicker _labs_.stories-CFJvoMQP.js +0 -33
  550. package/dist/assets/Grow-DacPmog-.js +0 -1
  551. package/dist/assets/Icon _icons_.stories-BQr18gG9.js +0 -16
  552. package/dist/assets/IconWithTooltip _icons_.stories-Ct7hQD2g.js +0 -19
  553. package/dist/assets/IgaComponentsLegacyOdysseyDecorator-28myx5I9.js +0 -175
  554. package/dist/assets/Link-BH0CiguI.js +0 -11
  555. package/dist/assets/Menu-CHod3UUY.js +0 -1
  556. package/dist/assets/MenuButton-CMGgaZPh.js +0 -9
  557. package/dist/assets/MenuItem.stories-YEtPNOwc.js +0 -29
  558. package/dist/assets/Modal-B1-40kNg.js +0 -1
  559. package/dist/assets/NativeSelect.stories-BIRwQlHa.js +0 -173
  560. package/dist/assets/OdysseyProvider-CLb8psrs.js +0 -197
  561. package/dist/assets/PageHeader.stories-fXDR4T37.js +0 -17
  562. package/dist/assets/PageTemplate _labs_-D3SkGEbG.js +0 -8
  563. package/dist/assets/PageTemplate.stories-H4WnNBj4.js +0 -487
  564. package/dist/assets/Pagination.stories-CB4pOr9i.js +0 -17
  565. package/dist/assets/PasswordField.stories-D5ZRplSl.js +0 -129
  566. package/dist/assets/Picker _labs_.stories-CyZs7sOo.js +0 -18
  567. package/dist/assets/Popper-DjhYeJJy.js +0 -1
  568. package/dist/assets/Portal-GAJY6Au9.js +0 -1
  569. package/dist/assets/Radio-tkNaA8vy.js +0 -1
  570. package/dist/assets/RadioGroup-DP-BtKDw.js +0 -10
  571. package/dist/assets/RadioGroup-DRNCKA-f.js +0 -1
  572. package/dist/assets/RadioGroup.stories-DRXPUU0H.js +0 -127
  573. package/dist/assets/ResourceAccessPolicyComponentsStorybookThemeDecorator-IgdZHick.js +0 -1
  574. package/dist/assets/ScreenReaderText.stories-CpsTRHeF.js +0 -8
  575. package/dist/assets/SearchField.stories-C95LqZ5d.js +0 -37
  576. package/dist/assets/Select-9yKLDVKS.js +0 -1
  577. package/dist/assets/Snackbar-Cn_gMSEK.js +0 -1
  578. package/dist/assets/TabPanel-XF64c5rR.js +0 -1
  579. package/dist/assets/Tabs-DzeBYjfY.js +0 -1
  580. package/dist/assets/Tabs.stories-Dtlm8Y9N.js +0 -100
  581. package/dist/assets/Tag.stories-DIlHCDGk.js +0 -96
  582. package/dist/assets/Toast.stories-DO1V8pyh.js +0 -134
  583. package/dist/assets/ToastManager.stories-CmZGqHye.js +0 -22
  584. package/dist/assets/Tooltip-D4AWrTBw.js +0 -1
  585. package/dist/assets/Tooltip.stories-s36iDmFy.js +0 -68
  586. package/dist/assets/TopNav.stories-Dg27-0zA.js +0 -13
  587. package/dist/assets/TransitionGroupContext-DLI0IzWy.js +0 -1
  588. package/dist/assets/Typography-D01yctPx.js +0 -607
  589. package/dist/assets/Typography.stories-Cr7YbFxb.js +0 -73
  590. package/dist/assets/UserProfile.stories-BbvzhbPD.js +0 -14
  591. package/dist/assets/WorkflowsComponentsStorybookThemeDecorator-COYvO4K8.js +0 -1
  592. package/dist/assets/emotion-react-jsx-runtime.browser.esm-DcYOMKFp.js +0 -1
  593. package/dist/assets/index-BsDcV5Kh.js +0 -1
  594. package/dist/assets/index.esm-HelN6IAt.js +0 -1
  595. package/dist/assets/renderUiShell.stories-ILWjsAQY.js +0 -854
  596. package/dist/assets/useOdysseyDateFields-Cq2BZNiB.js +0 -61
  597. package/dist/assets/useThemeProps-Bfa1XAV-.js +0 -1
  598. package/dist/assets/useThemeProps-D4857Xca.js +0 -1
  599. package/dist/assets/utils-DkZjDCLm.js +0 -1
  600. package/dist/cjs/Buttons/index.cjs +0 -93
  601. package/dist/cjs/Buttons/index.cjs.map +0 -1
  602. package/dist/cjs/Checkbox.cjs.map +0 -1
  603. package/dist/cjs/CheckboxGroup.cjs.map +0 -1
  604. package/dist/cjs/DataTable/index.cjs +0 -20
  605. package/dist/cjs/DataTable/index.cjs.map +0 -1
  606. package/dist/cjs/DatePickers/index.cjs +0 -39
  607. package/dist/cjs/DatePickers/index.cjs.map +0 -1
  608. package/dist/cjs/FileUploader/index.cjs +0 -17
  609. package/dist/cjs/FileUploader/index.cjs.map +0 -1
  610. package/dist/cjs/Pagination/index.cjs +0 -36
  611. package/dist/cjs/Pagination/index.cjs.map +0 -1
  612. package/dist/cjs/Radio.cjs.map +0 -1
  613. package/dist/cjs/RadioGroup.cjs.map +0 -1
  614. package/dist/cjs/labs/DataView/index.cjs +0 -60
  615. package/dist/cjs/labs/DataView/index.cjs.map +0 -1
  616. package/dist/cjs/labs/DatePickers/index.cjs +0 -17
  617. package/dist/cjs/labs/DatePickers/index.cjs.map +0 -1
  618. package/dist/cjs/labs/OdysseyPickers/index.cjs +0 -48
  619. package/dist/cjs/labs/OdysseyPickers/index.cjs.map +0 -1
  620. package/dist/cjs/labs/PageTemplate/index.cjs +0 -28
  621. package/dist/cjs/labs/PageTemplate/index.cjs.map +0 -1
  622. package/dist/cjs/theme/index.cjs +0 -17
  623. package/dist/cjs/theme/index.cjs.map +0 -1
  624. package/dist/cjs/ui-shell/AppSwitcher/index.cjs +0 -17
  625. package/dist/cjs/ui-shell/AppSwitcher/index.cjs.map +0 -1
  626. package/dist/cjs/ui-shell/SideNav/index.cjs +0 -40
  627. package/dist/cjs/ui-shell/SideNav/index.cjs.map +0 -1
  628. package/dist/cjs/ui-shell/TopNav/index.cjs +0 -17
  629. package/dist/cjs/ui-shell/TopNav/index.cjs.map +0 -1
  630. package/dist/cjs/web-component/removeGlobalStylesFromShadowDom.cjs.map +0 -1
  631. package/dist/esm/Buttons/index.js +0 -19
  632. package/dist/esm/Buttons/index.js.map +0 -1
  633. package/dist/esm/Checkbox.js.map +0 -1
  634. package/dist/esm/CheckboxGroup.js.map +0 -1
  635. package/dist/esm/DataTable/index.js +0 -15
  636. package/dist/esm/DataTable/index.js.map +0 -1
  637. package/dist/esm/DatePickers/index.js.map +0 -1
  638. package/dist/esm/FileUploader/index.js +0 -14
  639. package/dist/esm/FileUploader/index.js.map +0 -1
  640. package/dist/esm/Pagination/index.js +0 -16
  641. package/dist/esm/Pagination/index.js.map +0 -1
  642. package/dist/esm/Radio.js.map +0 -1
  643. package/dist/esm/RadioGroup.js.map +0 -1
  644. package/dist/esm/labs/DataView/index.js +0 -18
  645. package/dist/esm/labs/DataView/index.js.map +0 -1
  646. package/dist/esm/labs/DatePickers/index.js +0 -14
  647. package/dist/esm/labs/DatePickers/index.js.map +0 -1
  648. package/dist/esm/labs/OdysseyPickers/index.js +0 -17
  649. package/dist/esm/labs/OdysseyPickers/index.js.map +0 -1
  650. package/dist/esm/labs/PageTemplate/index.js +0 -15
  651. package/dist/esm/labs/PageTemplate/index.js.map +0 -1
  652. package/dist/esm/theme/index.js +0 -14
  653. package/dist/esm/theme/index.js.map +0 -1
  654. package/dist/esm/ui-shell/AppSwitcher/index.js +0 -14
  655. package/dist/esm/ui-shell/AppSwitcher/index.js.map +0 -1
  656. package/dist/esm/ui-shell/SideNav/index.js +0 -16
  657. package/dist/esm/ui-shell/SideNav/index.js.map +0 -1
  658. package/dist/esm/ui-shell/TopNav/index.js +0 -14
  659. package/dist/esm/ui-shell/TopNav/index.js.map +0 -1
  660. package/dist/esm/web-component/removeGlobalStylesFromShadowDom.js.map +0 -1
  661. package/dist/index.cjs +0 -231
  662. package/dist/index.mjs +0 -229
  663. package/dist/index.scss +0 -549
  664. package/dist/types/Buttons/index.d.ts +0 -18
  665. package/dist/types/Buttons/index.d.ts.map +0 -1
  666. package/dist/types/Checkbox.d.ts.map +0 -1
  667. package/dist/types/CheckboxGroup.d.ts.map +0 -1
  668. package/dist/types/DataTable/index.d.ts +0 -15
  669. package/dist/types/DataTable/index.d.ts.map +0 -1
  670. package/dist/types/DatePickers/index.d.ts +0 -15
  671. package/dist/types/DatePickers/index.d.ts.map +0 -1
  672. package/dist/types/FileUploader/index.d.ts +0 -13
  673. package/dist/types/FileUploader/index.d.ts.map +0 -1
  674. package/dist/types/Pagination/index.d.ts +0 -15
  675. package/dist/types/Pagination/index.d.ts.map +0 -1
  676. package/dist/types/Radio.d.ts.map +0 -1
  677. package/dist/types/RadioGroup.d.ts.map +0 -1
  678. package/dist/types/labs/DataView/index.d.ts +0 -18
  679. package/dist/types/labs/DataView/index.d.ts.map +0 -1
  680. package/dist/types/labs/DatePickers/index.d.ts +0 -13
  681. package/dist/types/labs/DatePickers/index.d.ts.map +0 -1
  682. package/dist/types/labs/OdysseyPickers/index.d.ts +0 -16
  683. package/dist/types/labs/OdysseyPickers/index.d.ts.map +0 -1
  684. package/dist/types/labs/PageTemplate/index.d.ts +0 -14
  685. package/dist/types/labs/PageTemplate/index.d.ts.map +0 -1
  686. package/dist/types/theme/index.d.ts +0 -13
  687. package/dist/types/theme/index.d.ts.map +0 -1
  688. package/dist/types/ui-shell/AppSwitcher/index.d.ts +0 -13
  689. package/dist/types/ui-shell/AppSwitcher/index.d.ts.map +0 -1
  690. package/dist/types/ui-shell/SideNav/index.d.ts +0 -15
  691. package/dist/types/ui-shell/SideNav/index.d.ts.map +0 -1
  692. package/dist/types/ui-shell/TopNav/index.d.ts +0 -13
  693. package/dist/types/ui-shell/TopNav/index.d.ts.map +0 -1
  694. package/dist/types/web-component/removeGlobalStylesFromShadowDom.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactElement, SyntheticEvent } from \"react\";\n\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\n\n/**\n * Type representing spacing values from the design tokens.\n * odysseyDesignTokens.Spacing0, odysseyDesignTokens.Spacing1, etc.\n */\nexport type OdysseySpacingValue = DesignTokens[keyof Pick<\n DesignTokens,\n | \"Spacing0\"\n | \"Spacing1\"\n | \"Spacing2\"\n | \"Spacing3\"\n | \"Spacing4\"\n | \"Spacing5\"\n | \"Spacing6\"\n | \"Spacing7\"\n | \"Spacing8\"\n | \"Spacing9\"\n>];\n\ntype LogoWithLink = {\n ariaLabel: string;\n href: string;\n};\ntype LogoWithNoLink = {\n ariaLabel?: never;\n href?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n imageAltText?: never;\n imageUrl?: never;\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n logoComponent?: never;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n logoComponent?: never;\n }\n );\n\nexport type SideNavProps = {\n /**\n * Side Nav header text that is usually reserved to show the App name\n */\n appName?: string;\n /**\n * If we want the collapse state to be based on session storage, then this needs to be `true`.\n */\n hasSessionStorageState?: boolean;\n /**\n * Determines whether the side nav is collapsed by default. When `true`, side nav also closes once and item is clicked.\n */\n isCollapsed?: boolean;\n /**\n * Determines whether the side nav is collapsible\n */\n isCollapsible?: boolean;\n /**\n * Determines whether the side nav items use compact layout\n */\n isCompact?: boolean;\n /**\n * Before the side nav has items, it will be in a loading state.\n */\n isLoading?: boolean;\n /**\n * If the side nav is up too much screen real estate. For instance, if you're in a narrower view, and it displays next to the content.\n *\n * When `true`, side nav will close itself after nav items are clicked.\n */\n isObtrusive?: boolean;\n /**\n * Optional padding to apply to the start of the leaves (items which are not expanded).\n * Should be one of the Odyssey design token spacing values (e.g., odysseyDesignTokens.Spacing1, odysseyDesignTokens.Spacing2, etc.)\n */\n leavesPaddingStart?: OdysseySpacingValue;\n /**\n * An optional logo component or src string for an img to display in the header. If not provided, will default to the Okta logo\n */\n logoProps?: SideNavLogoProps;\n /**\n * Triggers when the side nav is collapsed\n */\n onCollapse?: () => void;\n /**\n * Triggers when the side nav is expanded\n */\n onExpand?: () => void;\n /**\n * Triggers when the item is reordered\n */\n onSort?: (\n reorderedItems: SideNavItem[],\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n /**\n * Nav items in the side nav\n */\n sideNavItems?: SideNavItem[];\n} & (\n | {\n /**\n * The component to display as the footer; if present the `footerItems` are ignored and not rendered.\n */\n footerComponent?: ReactElement;\n footerItems?: never;\n hasCustomFooter: true;\n }\n | {\n footerComponent?: never;\n /**\n * Footer items in the side nav\n */\n footerItems?: SideNavFooterItem[];\n hasCustomFooter?: false;\n }\n) &\n Pick<HtmlProps, \"testId\">;\n\nexport type SideNavItem = {\n /**\n * The number to display as a count alongside the nav item\n */\n count?: number;\n /**\n * The icon element to display after the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n endIcon?: ReactElement;\n id: string;\n /**\n * Whether the item is disabled. When set to true the nav item is set to Disabled color,\n * the link/item is not clickable, and item with nestedNavItems is not expandable.\n */\n isDisabled?: boolean;\n /**\n * Whether the item is active/selected\n */\n isSelected?: boolean;\n /**\n * Whether the item is sortable within a sortable list\n */\n isSortable?: boolean;\n label: string;\n /**\n * Event fired when the nav item is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n /**\n * The status element to display after the label\n */\n severity?: (typeof statusSeverityValues)[number];\n /**\n * The icon element to display before the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n startIcon?: ReactElement;\n /**\n * The label to display inside the status\n */\n statusLabel?: string;\n /**\n * The link target prop. e.g., \"_blank\"\n */\n target?: string;\n} & (\n | {\n href?: never;\n isDefaultExpanded?: never;\n isExpanded?: never;\n /**\n * Determines if the side nav item is a section header\n */\n isSectionHeader: true;\n nestedNavItems?: never;\n }\n | {\n /**\n * link added to the nav item. if it is undefined, static text will be displayed.\n * fires onClick event when it is passed\n */\n href?: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n nestedNavItems?: never;\n }\n | {\n href?: never;\n /**\n * Whether the accordion (nav item with nestedNavItems) is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * If true, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n isExpanded?: boolean;\n /**\n * If true, enables sorting for the accordion items\n */\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n | {\n href: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../src/ui-shell/SideNav/types.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { ReactElement, SyntheticEvent } from \"react\";\n\nimport { UniqueIdentifier } from \"@dnd-kit/core\";\n\nimport type { HtmlProps } from \"../../HtmlProps.js\";\nimport type { DesignTokens } from \"../../OdysseyDesignTokensContext.js\";\nimport type { statusSeverityValues } from \"../../Status.js\";\n\n/**\n * Type representing spacing values from the design tokens.\n * odysseyDesignTokens.Spacing0, odysseyDesignTokens.Spacing1, etc.\n */\nexport type OdysseySpacingValue = DesignTokens[keyof Pick<\n DesignTokens,\n | \"Spacing0\"\n | \"Spacing1\"\n | \"Spacing2\"\n | \"Spacing3\"\n | \"Spacing4\"\n | \"Spacing5\"\n | \"Spacing6\"\n | \"Spacing7\"\n | \"Spacing8\"\n | \"Spacing9\"\n>];\n\ntype LogoWithLink = {\n ariaLabel: string;\n href: string;\n};\ntype LogoWithNoLink = {\n ariaLabel?: never;\n href?: never;\n};\n\nexport type SideNavLogoProps = {\n isSameBackgroundAsMain?: boolean;\n /**\n * Event fired when the logo is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n} & (LogoWithLink | LogoWithNoLink) &\n (\n | {\n imageAltText?: never;\n imageUrl?: never;\n /**\n * a component to render as the logo\n */\n logoComponent: ReactElement;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText: string;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl: string;\n logoComponent?: never;\n }\n | {\n /**\n * alt text for the img logo\n */\n imageAltText?: never;\n /**\n * The src url to render in an `img` tag\n */\n imageUrl?: never;\n logoComponent?: never;\n }\n );\n\nexport type SideNavProps = {\n /**\n * Side Nav header text that is usually reserved to show the App name\n */\n appName?: string;\n /**\n * If we want the collapse state to be based on session storage, then this needs to be `true`.\n */\n hasSessionStorageState?: boolean;\n /**\n * Determines whether the side nav is collapsed by default. When `true`, side nav also closes once and item is clicked.\n */\n isCollapsed?: boolean;\n /**\n * Determines whether the side nav is collapsible\n */\n isCollapsible?: boolean;\n /**\n * Determines whether the side nav items use compact layout\n */\n isCompact?: boolean;\n /**\n * Before the side nav has items, it will be in a loading state.\n */\n isLoading?: boolean;\n /**\n * If the side nav is up too much screen real estate. For instance, if you're in a narrower view, and it displays next to the content.\n *\n * When `true`, side nav will close itself after nav items are clicked.\n */\n isObtrusive?: boolean;\n /**\n * Optional padding to apply to the start of the leaves (items which are not expanded).\n * Should be one of the Odyssey design token spacing values (e.g., odysseyDesignTokens.Spacing1, odysseyDesignTokens.Spacing2, etc.)\n */\n leavesPaddingStart?: OdysseySpacingValue;\n /**\n * An optional logo component or src string for an img to display in the header. If not provided, will default to the Okta logo\n */\n logoProps?: SideNavLogoProps;\n /**\n * Triggers when the side nav is collapsed\n */\n onCollapse?: () => void;\n /**\n * Triggers when the side nav is expanded\n */\n onExpand?: () => void;\n /**\n * Triggers when the item is reordered\n */\n onSort?: (\n reorderedItems: SideNavItem[],\n parentId: string,\n activeId: UniqueIdentifier,\n activeIndex: number,\n overIndex: number,\n ) => void;\n /**\n * Nav items in the side nav\n */\n sideNavItems?: SideNavItem[];\n} & (\n | {\n /**\n * The component to display as the footer; if present the `footerItems` are ignored and not rendered.\n */\n footerComponent?: ReactElement;\n footerItems?: never;\n hasCustomFooter: true;\n }\n | {\n footerComponent?: never;\n /**\n * Footer items in the side nav\n */\n footerItems?: SideNavFooterItem[];\n hasCustomFooter?: false;\n }\n) &\n Pick<HtmlProps, \"testId\">;\n\nexport type SideNavItem = {\n /**\n * The number to display as a count alongside the nav item\n */\n count?: number;\n /**\n * The icon element to display after the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n endIcon?: ReactElement;\n id: string;\n /**\n * Whether the item is disabled. When set to true the nav item is set to Disabled color,\n * the link/item is not clickable, and item with nestedNavItems is not expandable.\n */\n isDisabled?: boolean;\n /**\n * Whether the item is active/selected\n */\n isSelected?: boolean;\n /**\n * Whether the item is sortable within a sortable list\n */\n isSortable?: boolean;\n label: string;\n /**\n * Event fired when the nav item is changed (for instance, capturing clicks on Accordion)\n */\n onChange?: (event: SyntheticEvent) => void;\n /**\n * Event fired when the nav item is clicked\n */\n onClick?: (event: SyntheticEvent) => void;\n /**\n * The status element to display after the label\n */\n severity?: (typeof statusSeverityValues)[number];\n /**\n * The icon element to display before the nav item text. Only use this with images that don't have React context. Even the official Odyssey Icons use MUI which references the MUI theme in context and will error when rendered in Unified UI Shell.\n */\n startIcon?: ReactElement;\n /**\n * The label to display inside the status\n */\n statusLabel?: string;\n /**\n * The link target prop. e.g., \"_blank\"\n */\n target?: string;\n} & (\n | {\n href?: never;\n isDefaultExpanded?: never;\n isExpanded?: never;\n /**\n * Determines if the side nav item is a section header\n */\n isSectionHeader: true;\n nestedNavItems?: never;\n }\n | {\n /**\n * link added to the nav item. if it is undefined, static text will be displayed.\n * fires onClick event when it is passed\n */\n href?: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n nestedNavItems?: never;\n }\n | {\n href?: never;\n /**\n * Whether the accordion (nav item with nestedNavItems) is expanded by default\n */\n isDefaultExpanded?: boolean;\n /**\n * If true, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n isExpanded?: boolean;\n /**\n * If true, enables sorting for the accordion items\n */\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n | {\n href: string;\n isDefaultExpanded?: never;\n isExpanded?: never;\n isSectionHeader?: never;\n /**\n * An array of side nav items to be displayed as nestedNavItems within Accordion\n */\n nestedNavItems: Array<SideNavItem>;\n }\n) &\n Pick<HtmlProps, \"translate\">;\n\nexport type SideNavFooterItem = {\n href?: string;\n id: string;\n label: string;\n};\n"],"mappings":"","ignoreList":[]}
@@ -14,10 +14,10 @@ import styled from "@emotion/styled";
14
14
  import { memo, useRef } from "react";
15
15
  import { ErrorBoundary } from "react-error-boundary";
16
16
  import { useOdysseyDesignTokens } from "../OdysseyDesignTokensContext.js";
17
- import { AppSwitcher } from "./AppSwitcher/index.js";
17
+ import { AppSwitcher } from "./AppSwitcher/AppSwitcher.js";
18
18
  import { InnerAppContainer } from "./InnerAppContainer.js";
19
- import { SideNav } from "./SideNav/index.js";
20
- import { TopNav } from "./TopNav/index.js";
19
+ import { SideNav } from "./SideNav/SideNav.js";
20
+ import { TopNav } from "./TopNav/TopNav.js";
21
21
  import { TURN_OFF_APP_SWITCHER } from "./uiShellContentTypes.js";
22
22
  import { useUiShellContext } from "./UiShellProvider.js";
23
23
  import { emptySideNavItems } from "./uiShellSharedConstants.js";
@@ -1 +1 @@
1
- {"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","useOdysseyDesignTokens","AppSwitcher","InnerAppContainer","SideNav","TopNav","TURN_OFF_APP_SWITCHER","useUiShellContext","emptySideNavItems","useMatchAppElementToUiShellAppArea","useScrollState","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","appIcons","isLoading","selectedAppName","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","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 {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { AppSwitcher } from \"./AppSwitcher/index.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/index.js\";\nimport { TopNav } from \"./TopNav/index.js\";\nimport {\n TURN_OFF_APP_SWITCHER,\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\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 hasSideNavProps,\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\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && appSwitcherProps !== TURN_OFF_APP_SWITCHER && (\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\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && 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 leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\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,SAEEC,sBAAsB,QACjB,kCAAkC;AAEzC,SAASC,WAAW,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AAG/E,IAAI,CAACuC,kBAAkB,CAAC;AAC3DwC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAIxC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"WideUiShellContent.js","names":["styled","memo","useRef","ErrorBoundary","useOdysseyDesignTokens","AppSwitcher","InnerAppContainer","SideNav","TopNav","TURN_OFF_APP_SWITCHER","useUiShellContext","emptySideNavItems","useMatchAppElementToUiShellAppArea","useScrollState","jsx","_jsx","jsxs","_jsxs","appSwitcherDefaultAppIcons","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","gridArea","position","StyledAppSwitcherContainer","StyledBannersContainer","StyledSideNavContainer","StyledShellContainer","odysseyDesignTokens","HueNeutral50","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledTopNavContainer","WideUiShellContent","appElement","appElementScrollingMode","appSwitcherProps","hasStandardAppContentPadding","hasSideNavProps","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","isContentScrolled","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","parentContainerRef","paddingMode","uiShellResizableRefs","ref","children","banners","includes","fallback","appIcons","isLoading","selectedAppName","sideNavItems","hasCustomFooter","sideNavFooter","footerComponent","footerItems","undefined","leftSideComponent","topNavLeftSide","rightSideComponent","topNavRightSide","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 {\n type DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { AppSwitcher } from \"./AppSwitcher/AppSwitcher.js\";\nimport { AppSwitcherAppIconData } from \"./AppSwitcher/AppSwitcherApp.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { TopNav } from \"./TopNav/TopNav.js\";\nimport {\n TURN_OFF_APP_SWITCHER,\n UiShellContentProps,\n UiShellNavComponentProps,\n} from \"./uiShellContentTypes.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport { emptySideNavItems } from \"./uiShellSharedConstants.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { useScrollState } from \"./useScrollState.js\";\n\nconst appSwitcherDefaultAppIcons = [] satisfies AppSwitcherAppIconData[];\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-content\",\n position: \"relative\",\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 hasSideNavProps,\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\n appIcons={appSwitcherDefaultAppIcons}\n isLoading\n selectedAppName=\"\"\n />\n </ErrorBoundary>\n )\n }\n\n {appSwitcherProps && appSwitcherProps !== TURN_OFF_APP_SWITCHER && (\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\") && !hasSideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {hasSideNavProps && 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 leftSideComponent={optionalComponents?.topNavLeftSide}\n rightSideComponent={optionalComponents?.topNavRightSide}\n />\n </ErrorBoundary>\n )}\n </StyledTopNavContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n ref={uiShellAppAreaRef}\n tabIndex={0}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\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,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,WAAW,QAAQ,8BAA8B;AAE1D,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SACEC,qBAAqB,QAGhB,0BAA0B;AACjC,SAAwBC,iBAAiB,QAAQ,sBAAsB;AACvE,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,kCAAkC,QAAQ,yCAAyC;AAC5F,SAASC,cAAc,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAErD,MAAMC,0BAA0B,GAAG,EAAqC;AAExE,MAAMC,kBAAkB,GAAGnB,MAAM,CAAC,KAAK,EAAE;EACvCoB,iBAAiB,EAAGC,IAAI,IACtBA,IAAI,KAAK,oBAAoB,IAAIA,IAAI,KAAK;AAC9C,CAAC,CAAC,CAEC,CAAC;EAAEC;AAAmB,CAAC,MAAM;EAC9BC,eAAe,EAAED,kBAAkB;EACnCE,QAAQ,EAAE,aAAa;EACvBC,QAAQ,EAAE;AACZ,CAAC,CAAC,CAAC;AAEH,MAAMC,0BAA0B,GAAG1B,MAAM,CAAC,KAAK,CAAC,CAAC;EAC/CwB,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMG,sBAAsB,GAAG3B,MA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iB,EAAEzB,kBAAkB,EAAE0B,cAAe;UACtDC,kBAAkB,EAAE3B,kBAAkB,EAAE4B;QAAgB,CACzD;MAAC,CACW,CAChB;IAAA,CACoB,CAAC,EAExB/D,IAAA,CAACI,kBAAkB;MACjBG,kBAAkB,EAAE+B,cAAc,EAAE/B,kBAAmB;MACvDuC,GAAG,EAAEJ,iBAAkB;MACvBsB,QAAQ,EAAE,CAAE;MAAAjB,QAAA,EAEZ/C,IAAA,CAACT,iBAAiB;QAACgD,iBAAiB,EAAEA;MAAkB,CAAE;IAAC,CACzC,CAAC;EAAA,CACD,CAAC;AAE3B,CAAC;AAED,MAAM0B,0BAA0B,GAAG/E,IAAI,CAACuC,kBAAkB,CAAC;AAC3DwC,0BAA0B,CAACC,WAAW,GAAG,oBAAoB;AAE7D,SAASD,0BAA0B,IAAIxC,kBAAkB","ignoreList":[]}
@@ -10,12 +10,13 @@
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- export * from "./AppSwitcher/index.js";
13
+ export * from "./AppSwitcher/AppSwitcher.js";
14
14
  export * from "./InnerAppContainer.js";
15
15
  export * from "./NarrowUiShellContent.js";
16
16
  export * from "./renderUiShell.js";
17
- export * from "./SideNav/index.js";
18
- export * from "./TopNav/index.js";
17
+ export * from "./SideNav/SideNav.js";
18
+ export * from "./SideNav/types.js";
19
+ export * from "./TopNav/TopNav.js";
19
20
  export * from "./uiShellContentTypes.js";
20
21
  export * from "./useHasUiShell.js";
21
22
  export * from "./WideUiShellContent.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["UiShell","adminAppUiShellBreakpoints","useUiShellBreakpoints"],"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 \"./InnerAppContainer.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 \"./WideUiShellContent.js\";\n\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 adminAppUiShellBreakpoints,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,2BAA2B;AACzC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,mBAAmB;AACjC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AAEvC,cAAc,+CAA+C;AAE7D,SAASA,OAAO,QAA2B,cAAc;AACzD,SACEC,0BAA0B,EAC1BC,qBAAqB,QAChB,4BAA4B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["UiShell","adminAppUiShellBreakpoints","useUiShellBreakpoints"],"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/AppSwitcher.js\";\nexport * from \"./InnerAppContainer.js\";\nexport * from \"./NarrowUiShellContent.js\";\nexport * from \"./renderUiShell.js\";\nexport * from \"./SideNav/SideNav.js\";\nexport * from \"./SideNav/types.js\";\nexport * from \"./TopNav/TopNav.js\";\nexport * from \"./uiShellContentTypes.js\";\nexport * from \"./useHasUiShell.js\";\nexport * from \"./WideUiShellContent.js\";\n\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 adminAppUiShellBreakpoints,\n useUiShellBreakpoints,\n} from \"./useUiShellBreakpoints.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,8BAA8B;AAC5C,cAAc,wBAAwB;AACtC,cAAc,2BAA2B;AACzC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,yBAAyB;AAEvC,cAAc,+CAA+C;AAE7D,SAASA,OAAO,QAA2B,cAAc;AACzD,SACEC,0BAA0B,EAC1BC,qBAAqB,QAChB,4BAA4B","ignoreList":[]}
@@ -37,7 +37,8 @@ export const renderUiShell = ({
37
37
  parentElement,
38
38
  sideNavBackgroundColor,
39
39
  sideNavBackgroundContrastColor,
40
- topNavBackgroundColor
40
+ topNavBackgroundColor,
41
+ nonce = window.cspNonce
41
42
  }) => {
42
43
  const appElement = providedAppElement || document.createElement("div");
43
44
  parentElement.setAttribute(uiShellDataAttribute, "");
@@ -98,7 +99,8 @@ export const renderUiShell = ({
98
99
  })
99
100
  }),
100
101
  webComponentChildren,
101
- webComponentParentElement: parentElement
102
+ webComponentParentElement: parentElement,
103
+ nonce
102
104
  });
103
105
  const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(() => {
104
106
  unsubscribeFromUnifiedUiShellRendered();
@@ -1 +1 @@
1
- {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","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","unsubscribeFromUnifiedUiShellRendered","setComponentProps","appendChild"],"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 \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.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\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n slottedElements: SlottedElements;\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\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 breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\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 * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => 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 | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\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 SlottedElements;\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 breakpointConfig={breakpointConfig}\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 sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\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 webComponentChildren,\n webComponentParentElement: parentElement,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n });\n },\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,0BAA0B;AACvD,SAASC,gBAAgB,QAAwB,8BAA8B;AAC/E,SAASC,yBAAyB,QAAQ,+CAA+C;AACzF,SAAS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QAC/CC,8BAA8B,EAAEA,8BAA+B;QAC/Da,6BAA6B,EAAEA,6BAA8B;QAC7DE,2BAA2B,EAAEA,2BAA4B;QACzDP,sBAAsB,EAAEA,sBAAuB;QAC/CP,qBAAqB,EAAEA,qBAAsB;QAC7CiC,iBAAiB,EAAEN,iBAAiB,CAACO,cAAe;QACpDC,oBAAoB,EAAER,iBAAiB,CAACS;MAAkB,CAC3D;IAAC,CACW,CAChB;IACDb,oBAAoB;IACpBc,yBAAyB,EAAExC;EAC7B,CAAC,CAAC;EAEF,MAAMyC,qCAAqC,GAAG7B,6BAA6B,CACzE,MAAM;IACJ6B,qCAAqC,CAAC,CAAC;IAEvC1C,QAAQ,GAAG;MACTT,UAAU;MACVwB,kBAAkB;MAClBE,gBAAgB;MAChB0B,iBAAiB,EAAE7B,iCAAiC;MACpDK,eAAe;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAED5B,aAAa,CAAC2C,WAAW,CAACrD,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACVwB,kBAAkB;IAClBE,gBAAgB;IAChB0B,iBAAiB,EAAE7B,iCAAiC;IACpDK,eAAe;IACfU;EACF,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"renderUiShell.js","names":["ErrorBoundary","bufferLatest","createMessageBus","renderReactInWebComponent","UiShell","uiShellDataAttribute","jsx","_jsx","optionalComponentSlotNames","banners","rightSideMenu","sideNavFooter","topNavLeftSide","topNavRightSide","renderUiShell","appBackgroundColor","appBackgroundContrastMode","appElement","providedAppElement","appElementScrollingMode","breakpointConfig","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","onRender","parentElement","sideNavBackgroundColor","sideNavBackgroundContrastColor","topNavBackgroundColor","nonce","window","cspNonce","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","unsubscribeFromUnifiedUiShellRendered","setComponentProps","appendChild"],"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 \"../tools/bufferLatest.js\";\nimport { createMessageBus, PublishMessage } from \"../tools/createMessageBus.js\";\nimport { renderReactInWebComponent } from \"../web-component/renderReactInWebComponent.js\";\nimport { UiShell, UiShellProps } from \"./UiShell.js\";\nimport { UiShellNavComponentProps } from \"./uiShellContentTypes.js\";\nimport { uiShellDataAttribute } from \"./useHasUiShell.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\nexport type SlottedElements = Record<\n keyof Required<UiShellProps>[\"optionalComponents\"],\n HTMLDivElement\n>;\n\nexport type RenderedUiShell = {\n closeRightSideMenu: PublishMessage<void>;\n closeSideNavMenu: PublishMessage<void>;\n setComponentProps: ReturnType<\n typeof bufferLatest<SetStateAction<UiShellNavComponentProps>>\n >;\n slottedElements: SlottedElements;\n uiShellElement: ReturnType<typeof renderReactInWebComponent>;\n} & Partial<Pick<UiShellProps, \"appElement\">>;\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 breakpointConfig,\n hasStandardAppContentPadding,\n initialVisibleSections,\n onError = console.error,\n onRender,\n parentElement,\n sideNavBackgroundColor,\n sideNavBackgroundContrastColor,\n topNavBackgroundColor,\n nonce = window.cspNonce,\n}: {\n /**\n * Optional nonce for CSP compliance.\n */\n nonce?: string;\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 * Notify once when React has rendered UI Shell the first time.\n */\n onRender?: (renderedUiShell: RenderedUiShell) => 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 | \"breakpointConfig\"\n | \"hasStandardAppContentPadding\"\n | \"initialVisibleSections\"\n | \"sideNavBackgroundColor\"\n | \"sideNavBackgroundContrastColor\"\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 SlottedElements;\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 breakpointConfig={breakpointConfig}\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 sideNavBackgroundContrastColor={sideNavBackgroundContrastColor}\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 webComponentChildren,\n webComponentParentElement: parentElement,\n nonce,\n });\n\n const unsubscribeFromUnifiedUiShellRendered = subscribeToReactAppSubscribed(\n () => {\n unsubscribeFromUnifiedUiShellRendered();\n\n onRender?.({\n appElement,\n closeRightSideMenu,\n closeSideNavMenu,\n setComponentProps: publishAfterReactAppReadyForProps,\n slottedElements,\n uiShellElement,\n });\n },\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,0BAA0B;AACvD,SAASC,gBAAgB,QAAwB,8BAA8B;AAC/E,SAASC,yBAAyB,QAAQ,+CAA+C;AACzF,SAASC,OAAO,QAAsB,cAAc;AAEpD,SAASC,oBAAoB,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1D,OAAO,MAAMC,0BAGZ,GAAG;EACFC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE,iBAAiB;EAChCC,aAAa,EAAE,iBAAiB;EAChCC,cAAc,EAAE,mBAAmB;EACnCC,eAAe,EAAE;AACnB,CAAC;AA0BD,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,kBAAkB;EAClBC,yBAAyB;EACzBC,UAAU,EAAEC,kBAAkB;EAC9BC,uBAAuB;EACvBC,gBAAgB;EAChBC,4BAA4B;EAC5BC,sBAAsB;EACtBC,OAAO,GAAGC,OAAO,CAACC,KAAK;EACvBC,QAAQ;EACRC,aAAa;EACbC,sBAAsB;EACtBC,8BAA8B;EAC9BC,qBAAqB;EACrBC,KAAK,GAAGC,MAA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AAiC;MACpDK,eAAe;MACfU;IACF,CAAC,CAAC;EACJ,CACF,CAAC;EAED/B,aAAa,CAAC8C,WAAW,CAACxD,UAAU,CAAC;EAErC,OAAO;IACLA,UAAU;IACV2B,kBAAkB;IAClBE,gBAAgB;IAChB0B,iBAAiB,EAAE7B,iCAAiC;IACpDK,eAAe;IACfU;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { createReactRootElements } from "./createReactRootElements.js";
14
- import { removeGlobalStylesFromShadowDom } from "./removeGlobalStylesFromShadowDom.js";
14
+ import { encapsulateShadowDomFromGlobalStyles } from "./encapsulateShadowDomFromGlobalStyles.js";
15
15
  export const createShadowDomElements = (containerElement, nonce = window.cspNonce) => {
16
16
  const shadowRoot = containerElement.attachShadow({
17
17
  mode: "open"
@@ -22,7 +22,7 @@ export const createShadowDomElements = (containerElement, nonce = window.cspNonc
22
22
  } = createReactRootElements();
23
23
  shadowRoot.appendChild(appRootElement);
24
24
  shadowRoot.appendChild(stylesRootElement);
25
- removeGlobalStylesFromShadowDom({
25
+ encapsulateShadowDomFromGlobalStyles({
26
26
  nonce,
27
27
  stylesRootElement
28
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"createShadowDomElements.js","names":["createReactRootElements","removeGlobalStylesFromShadowDom","createShadowDomElements","containerElement","nonce","window","cspNonce","shadowRoot","attachShadow","mode","appRootElement","stylesRootElement","appendChild","emotionRootElement","shadowRootElement","createShadowRootElement","document","createElement","setAttribute"],"sources":["../../../src/web-component/createShadowDomElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { createReactRootElements } from \"./createReactRootElements.js\";\nimport { removeGlobalStylesFromShadowDom } from \"./removeGlobalStylesFromShadowDom.js\";\n\n/**\n * This function is necessary only when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component.\n *\n * In most cases, you'll want to use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead.\n */\nexport const createShadowDomElements = (\n containerElement: HTMLElement,\n nonce: string = window.cspNonce,\n) => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // Container for Emotion `<style>` elements.\n const { appRootElement, stylesRootElement } = createReactRootElements();\n\n shadowRoot.appendChild(appRootElement);\n shadowRoot.appendChild(stylesRootElement);\n\n removeGlobalStylesFromShadowDom({\n nonce,\n stylesRootElement,\n });\n\n return {\n emotionRootElement: stylesRootElement,\n shadowRootElement: appRootElement,\n };\n};\n\n/**\n * @deprecated Use `createShadowDomElements` instead which returns an object instead of an array. It's otherwise the same.\n * @deprecated Ideally, use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead. This function was necessary when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component. */\nexport const createShadowRootElement = (\n containerElement: HTMLElement,\n): [HTMLStyleElement, HTMLDivElement] => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // the element that styles will be cached into\n const emotionRootElement = document.createElement(\"style\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // the element that emotion renders html into\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return [emotionRootElement, shadowRootElement];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;A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ignoreList":[]}
1
+ {"version":3,"file":"createShadowDomElements.js","names":["createReactRootElements","encapsulateShadowDomFromGlobalStyles","createShadowDomElements","containerElement","nonce","window","cspNonce","shadowRoot","attachShadow","mode","appRootElement","stylesRootElement","appendChild","emotionRootElement","shadowRootElement","createShadowRootElement","document","createElement","setAttribute"],"sources":["../../../src/web-component/createShadowDomElements.ts"],"sourcesContent":["/*!\n * Copyright (c) 2023-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { createReactRootElements } from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\n\n/**\n * This function is necessary only when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component.\n *\n * In most cases, you'll want to use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead.\n */\nexport const createShadowDomElements = (\n containerElement: HTMLElement,\n nonce: string = window.cspNonce,\n) => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // Container for Emotion `<style>` elements.\n const { appRootElement, stylesRootElement } = createReactRootElements();\n\n shadowRoot.appendChild(appRootElement);\n shadowRoot.appendChild(stylesRootElement);\n\n encapsulateShadowDomFromGlobalStyles({\n nonce,\n stylesRootElement,\n });\n\n return {\n emotionRootElement: stylesRootElement,\n shadowRootElement: appRootElement,\n };\n};\n\n/**\n * @deprecated Use `createShadowDomElements` instead which returns an object instead of an array. It's otherwise the same.\n * @deprecated Ideally, use `renderReactInWebComponent` from `@okta/odyssey-react-mui/web-component` instead. This function was necessary when using bare Shadow DOM, but with UI Shell rendering in a Web Component, you won't be able to render your Shadow DOM in its Shadow DOM without using a Web Component. */\nexport const createShadowRootElement = (\n containerElement: HTMLElement,\n): [HTMLStyleElement, HTMLDivElement] => {\n const shadowRoot = containerElement.attachShadow({ mode: \"open\" });\n\n // the element that styles will be cached into\n const emotionRootElement = document.createElement(\"style\");\n emotionRootElement.setAttribute(\"id\", \"style-root\");\n emotionRootElement.setAttribute(\"nonce\", window.cspNonce);\n\n // the element that emotion renders html into\n const shadowRootElement = document.createElement(\"div\");\n shadowRootElement.setAttribute(\"id\", \"shadow-root\");\n\n shadowRoot.appendChild(emotionRootElement);\n shadowRoot.appendChild(shadowRootElement);\n\n return [emotionRootElement, shadowRootElement];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,uBAAuB,QAAQ,8BAA8B;AACtE,SAASC,oCAAoC,QAAQ,2CAA2C;AAOhG,OAAO,MAAMC,uBAAuB,GAAGA,CACrCC,gBAA6B,EAC7BC,KAAa,GAAGC,MAAM,CAACC,QAAQ,KAC5B;EACH,MAAMC,UAAU,GAAGJ,gBAAgB,CAACK,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAM;IAAEC,cAAc;IAAEC;EAAkB,CAAC,GAAGX,uBAAuB,CAAC,CAAC;EAEvEO,UAAU,CAACK,WAAW,CAACF,cAAc,CAAC;EACtCH,UAAU,CAACK,WAAW,CAACD,iBAAiB,CAAC;EAEzCV,oCAAoC,CAAC;IACnCG,KAAK;IACLO;EACF,CAAC,CAAC;EAEF,OAAO;IACLE,kBAAkB,EAAEF,iBAAiB;IACrCG,iBAAiB,EAAEJ;EACrB,CAAC;AACH,CAAC;AAKD,OAAO,MAAMK,uBAAuB,GAClCZ,gBAA6B,IACU;EACvC,MAAMI,UAAU,GAAGJ,gBAAgB,CAACK,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EAGlE,MAAMI,kBAAkB,GAAGG,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAC1DJ,kBAAkB,CAACK,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC;EACnDL,kBAAkB,CAACK,YAAY,CAAC,OAAO,EAAEb,MAAM,CAACC,QAAQ,CAAC;EAGzD,MAAMQ,iBAAiB,GAAGE,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EACvDH,iBAAiB,CAACI,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;EAEnDX,UAAU,CAACK,WAAW,CAACC,kBAAkB,CAAC;EAC1CN,UAAU,CAACK,WAAW,CAACE,iBAAiB,CAAC;EAEzC,OAAO,CAACD,kBAAkB,EAAEC,iBAAiB,CAAC;AAChD,CAAC","ignoreList":[]}
@@ -16,7 +16,7 @@ export const shadowDomHostStyles = `
16
16
  contain: content;
17
17
  }
18
18
  `;
19
- export const removeGlobalStylesFromShadowDom = ({
19
+ export const encapsulateShadowDomFromGlobalStyles = ({
20
20
  nonce,
21
21
  stylesRootElement
22
22
  }) => {
@@ -25,4 +25,4 @@ export const removeGlobalStylesFromShadowDom = ({
25
25
  styleHostElement.innerHTML = shadowDomHostStyles;
26
26
  stylesRootElement.appendChild(styleHostElement);
27
27
  };
28
- //# sourceMappingURL=removeGlobalStylesFromShadowDom.js.map
28
+ //# sourceMappingURL=encapsulateShadowDomFromGlobalStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encapsulateShadowDomFromGlobalStyles.js","names":["shadowDomHostStyles","encapsulateShadowDomFromGlobalStyles","nonce","stylesRootElement","styleHostElement","document","createElement","setAttribute","innerHTML","appendChild"],"sources":["../../../src/web-component/encapsulateShadowDomFromGlobalStyles.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 { ReactRootElements } from \"./createReactRootElements.js\";\n\nexport const shadowDomHostStyles = `\n :host {\n all: initial;\n contain: content;\n }\n`;\n\nexport const encapsulateShadowDomFromGlobalStyles = ({\n nonce,\n stylesRootElement,\n}: {\n nonce: string;\n stylesRootElement: ReactRootElements[\"stylesRootElement\"];\n}) => {\n const styleHostElement = document.createElement(\"style\");\n\n styleHostElement.setAttribute(\"nonce\", nonce);\n\n styleHostElement.innerHTML = shadowDomHostStyles;\n\n stylesRootElement.appendChild(styleHostElement);\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,mBAAmB,GAAG;AACnC;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,oCAAoC,GAAGA,CAAC;EACnDC,KAAK;EACLC;AAIF,CAAC,KAAK;EACJ,MAAMC,gBAAgB,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAExDF,gBAAgB,CAACG,YAAY,CAAC,OAAO,EAAEL,KAAK,CAAC;EAE7CE,gBAAgB,CAACI,SAAS,GAAGR,mBAAmB;EAEhDG,iBAAiB,CAACM,WAAW,CAACL,gBAAgB,CAAC;AACjD,CAAC","ignoreList":[]}
@@ -12,6 +12,6 @@
12
12
 
13
13
  export * from "./createReactRootElements.js";
14
14
  export * from "./createShadowDomElements.js";
15
- export * from "./removeGlobalStylesFromShadowDom.js";
15
+ export * from "./encapsulateShadowDomFromGlobalStyles.js";
16
16
  export * from "./renderReactInWebComponent.js";
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/web-component/index.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\nexport * from \"./createReactRootElements.js\";\nexport * from \"./createShadowDomElements.js\";\nexport * from \"./removeGlobalStylesFromShadowDom.js\";\nexport * from \"./renderReactInWebComponent.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,8BAA8B;AAC5C,cAAc,8BAA8B;AAC5C,cAAc,sCAAsC;AACpD,cAAc,gCAAgC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/web-component/index.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\nexport * from \"./createReactRootElements.js\";\nexport * from \"./createShadowDomElements.js\";\nexport * from \"./encapsulateShadowDomFromGlobalStyles.js\";\nexport * from \"./renderReactInWebComponent.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,8BAA8B;AAC5C,cAAc,8BAA8B;AAC5C,cAAc,2CAA2C;AACzD,cAAc,gCAAgC","ignoreList":[]}
@@ -8,5 +8,5 @@
8
8
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
9
  *
10
10
  * See the License for the specific language governing permissions and limitations under the License.
11
- */export default "1-47-1";
11
+ */export default "1-49-0";
12
12
  //# sourceMappingURL=odysseyWebComponentVersion.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-47-1\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"odysseyWebComponentVersion.generated.js","names":[],"sources":["../../../src/web-component/odysseyWebComponentVersion.generated.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\n/**\n * DO NOT UPDATE THIS FILE MANUALLY\n * This file is managed by scripts/updateWebComponentVersion.ts and any changes made will be overwritten\n * This script only needs to be run during release, and shouldn't be used during local development.\n */\n\nexport default \"1-49-0\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAQA,eAAe,QAAQ","ignoreList":[]}
@@ -11,8 +11,8 @@
11
11
  */
12
12
 
13
13
  import { createReactRootElements } from "./createReactRootElements.js";
14
+ import { encapsulateShadowDomFromGlobalStyles } from "./encapsulateShadowDomFromGlobalStyles.js";
14
15
  import version from "./odysseyWebComponentVersion.generated.js";
15
- import { removeGlobalStylesFromShadowDom } from "./removeGlobalStylesFromShadowDom.js";
16
16
  export const webComponentDataAttributeName = "data-odyssey-react-web-component";
17
17
  export const versionedWebComponentName = `odyssey-react-web-component-${version}`.toLowerCase();
18
18
  const SsrFriendlyHtmlElementClass = "HTMLElement" in globalThis ? HTMLElement : class {};
@@ -33,10 +33,6 @@ export class WebComponentClass extends SsrFriendlyHtmlElementClass {
33
33
  });
34
34
  shadowRoot.appendChild(stylesRootElement);
35
35
  shadowRoot.appendChild(appRootElement);
36
- removeGlobalStylesFromShadowDom({
37
- nonce: window.cspNonce,
38
- stylesRootElement
39
- });
40
36
  }
41
37
  setGetReactComponent(getReactComponent) {
42
38
  this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
@@ -48,6 +44,10 @@ export class WebComponentClass extends SsrFriendlyHtmlElementClass {
48
44
  });
49
45
  }
50
46
  connectedCallback() {
47
+ encapsulateShadowDomFromGlobalStyles({
48
+ nonce: this.getAttribute("nonce") || window.cspNonce,
49
+ stylesRootElement: this.#reactRootElements.stylesRootElement
50
+ });
51
51
  this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
52
52
  if (reactRoot) {
53
53
  throw new Error(`connectedCallback fired when reactRoot is already mounted.`);
@@ -74,13 +74,15 @@ export class WebComponentClass extends SsrFriendlyHtmlElementClass {
74
74
  }
75
75
  export const getReactWebComponent = ({
76
76
  webComponentName = versionedWebComponentName,
77
- getReactComponent
77
+ getReactComponent,
78
+ nonce
78
79
  }) => {
79
80
  if (!customElements.get(webComponentName)) {
80
81
  customElements.define(webComponentName, WebComponentClass);
81
82
  }
82
83
  const element = document.createElement(webComponentName);
83
84
  element.setAttribute(webComponentDataAttributeName, "");
85
+ element.setAttribute("nonce", nonce);
84
86
  element.setGetReactComponent(getReactComponent);
85
87
  return element;
86
88
  };
@@ -89,11 +91,13 @@ export const renderReactInWebComponent = ({
89
91
  getReactComponent,
90
92
  webComponentChildren,
91
93
  webComponentParentElement,
92
- webComponentRootElement
94
+ webComponentRootElement,
95
+ nonce = window.cspNonce
93
96
  }) => {
94
97
  const reactElement = getReactWebComponent({
95
98
  getReactComponent,
96
- webComponentName
99
+ webComponentName,
100
+ nonce
97
101
  });
98
102
  if (webComponentChildren) {
99
103
  (Array.isArray(webComponentChildren) ? webComponentChildren : [webComponentChildren]).forEach(webComponentChild => {
@@ -1 +1 @@
1
- {"version":3,"file":"renderReactInWebComponent.js","names":["createReactRootElements","version","removeGlobalStylesFromShadowDom","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","nonce","window","cspNonce","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\nimport { removeGlobalStylesFromShadowDom } from \"./removeGlobalStylesFromShadowDom.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n removeGlobalStylesFromShadowDom({\n nonce: window.cspNonce,\n stylesRootElement,\n });\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AAC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CAACH,gBAAgB,EAAE5B,iBAAiB,CAAC;EAC5D;EAEA,MAAMgC,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAACN,gBAAgB,CAEtD;EAEDI,OAAO,CAACG,YAAY,CAACzC,6BAA6B,EAAE,EAAE,CAAC;EAEvDsC,OAAO,CAACd,oBAAoB,CAACjB,iBAAiB,CAAC;EAC/C,OAAO+B,OAAO;AAChB,CAAC;AAqDD,OAAO,MAAMI,yBAAyB,GAAGA,CAAC;EACxCR,gBAAgB;EAChB3B,iBAAiB;EACjBoC,oBAAoB;EACpBC,yBAAyB;EACzBC;AAC8B,CAAC,KAAK;EACpC,MAAMC,YAAY,GAAGb,oBAAoB,CAAC;IACxC1B,iBAAiB;IACjB2B;EACF,CAAC,CAAC;EAEF,IAAIS,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC1B,WAAW,CAAC8B,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAACxB,WAAW,CAAC0B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAACzB,WAAW,CAAC0B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"renderReactInWebComponent.js","names":["createReactRootElements","encapsulateShadowDomFromGlobalStyles","version","webComponentDataAttributeName","versionedWebComponentName","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","setGetReactComponent","then","reactRoot","render","connectedCallback","nonce","getAttribute","window","cspNonce","Error","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","get","define","element","document","createElement","setAttribute","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport type { Root } from \"react-dom/client\";\n\nimport { type ReactNode } from \"react\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\nimport { encapsulateShadowDomFromGlobalStyles } from \"./encapsulateShadowDomFromGlobalStyles.js\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\ninterface GetReactWebComponentOptions {\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n nonce: string;\n webComponentName?: string;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n encapsulateShadowDomFromGlobalStyles({\n nonce: this.getAttribute(\"nonce\") || window.cspNonce,\n stylesRootElement: this.#reactRootElements.stylesRootElement,\n });\n\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n nonce,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // Set the nonce for CSP compliance\n element.setAttribute(\"nonce\", nonce);\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * Optional nonce for CSP compliance.\n * Defaults to `window.cspNonce`.\n */\n nonce?: string;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: never;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n nonce = window.cspNonce,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n nonce,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SACEA,uBAAuB,QAElB,8BAA8B;AACrC,SAASC,oCAAoC,QAAQ,2CAA2C;AAChG,OAAOC,OAAO,MAAM,2CAA2C;AAS/D,OAAO,MAAMC,6BAA6B,GAAG,kCAAkC;AAG/E,OAAO,MAAMC,yBAAyB,GACpC,+BAA+BF,OAAO,EAAE,CAACG,WAAW,CAAC,CAAC;AAExD,MAAMC,2BAA2B,GAC/B,aAAa,IAAIC,UAAU,GACvBC,WAAW,GACV,MAAM,EAA+C;AAE5D,OAAO,MAAMC,iBAAiB,SAASH,2BAA2B,CAAC;EACjE,CAACI,iBAAiB,GAA2C,IAAI;EACxD,CAACC,iBAAiB;EACXC,WAAW,GAAW,IAAI,CAACC,SAAS;EAE7CC,gBAAgB,GAAyBC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;EAErEC,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC,CAAC;IAEP,IAAI,CAAC,CAACN,iBAAiB,GAAGX,uBAAuB,CAAC,CAAC;IACnD,MAAM;MAAEkB,cAAc;MAAEC;IAAkB,CAAC,G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AoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC3B,WAAW,CAAC+B,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAACzB,WAAW,CAAC2B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC1B,WAAW,CAAC2B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC","ignoreList":[]}
package/dist/iframe.html CHANGED
@@ -591,7 +591,7 @@
591
591
  }
592
592
  </style>
593
593
 
594
- <script type="module" crossorigin src="./assets/iframe-CXLAql3E.js"></script>
594
+ <script type="module" crossorigin src="./assets/iframe-Cf-Lpz6Y.js"></script>
595
595
  </head>
596
596
 
597
597
  <body>