@solostylist/ui-kit 2.0.1 → 2.0.2

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 (379) hide show
  1. package/dist/Add-CEnTWsXs.js +6 -0
  2. package/dist/ArrowUpward-udL1ltj2.js +6 -0
  3. package/dist/Box-9oeZgA1U.js +46 -0
  4. package/dist/Button-DaLr1m20.js +534 -0
  5. package/dist/ButtonBase-DovDC6-1.js +700 -0
  6. package/dist/Checkbox-C-Xjbzzh.js +152 -0
  7. package/dist/ChevronRight-DsPfsFKB.js +6 -0
  8. package/dist/Close-CIYOM-Sc.js +6 -0
  9. package/dist/Collapse-DPUr1cbP.js +266 -0
  10. package/dist/ContentCopy-Hlh3azVb.js +6 -0
  11. package/dist/DefaultPropsProvider-ebWx4_5E.js +128 -0
  12. package/dist/DialogContent-b3xbJVC6.js +450 -0
  13. package/dist/Download-D9PkFi7a.js +6 -0
  14. package/dist/ExpandMore-sOgvEha9.js +6 -0
  15. package/dist/Favorite-BP343hjM.js +6 -0
  16. package/dist/FavoriteBorder-D15j9xEL.js +6 -0
  17. package/dist/FormControl-DwMfZCiz.js +215 -0
  18. package/dist/FormControlLabel-Ihga1FTB.js +173 -0
  19. package/dist/Grow-BQR7x52V.js +121 -0
  20. package/dist/IconButton-CE-4GamO.js +448 -0
  21. package/dist/InfoOutlined-lpvhO6P8.js +6 -0
  22. package/dist/List-RNcZhRdr.js +105 -0
  23. package/dist/Menu-CnyB4SDS.js +180 -0
  24. package/dist/MenuItem-Ck30dBOR.js +224 -0
  25. package/dist/MenuList-Cc98uWXq.js +160 -0
  26. package/dist/Modal-CD2EBfU8.js +702 -0
  27. package/dist/Paper-_3qggtBp.js +115 -0
  28. package/dist/Popover-BFdKSYI5.js +340 -0
  29. package/dist/Popper-DYNAMSDd.js +1351 -0
  30. package/dist/Portal-i_wgIe9-.js +49 -0
  31. package/dist/Remove-DDEn8ek8.js +6 -0
  32. package/dist/RtlProvider-B7uVJXUY.js +19 -0
  33. package/dist/Skeleton-iZFynl7z.js +220 -0
  34. package/dist/Stack-C0LGzM4c.js +158 -0
  35. package/dist/SwitchBase-CjWtDdmE.js +198 -0
  36. package/dist/Tooltip-B1sn94L0.js +448 -0
  37. package/dist/Typography-_P0svrkO.js +168 -0
  38. package/dist/UnfoldMoreRounded-CuCrdxoy.js +6 -0
  39. package/dist/appendOwnerState-CFQTq3pb.js +17 -0
  40. package/dist/assets/stripe-input.css +1 -0
  41. package/dist/autocomplete-BgARERpp.js +43 -0
  42. package/dist/avatar-XNOdbbRz.js +10 -0
  43. package/dist/buttonBaseClasses-B90LjsNK.js +13 -0
  44. package/dist/capitalize-C0baBJCm.js +5 -0
  45. package/dist/chainPropTypes-CkMRtDjQ.js +8 -0
  46. package/dist/checkbox-D1U_JKqs.js +88 -0
  47. package/dist/checkboxClasses-B1up2lUn.js +18 -0
  48. package/dist/chunk-C_CI6nMA.js +13 -0
  49. package/dist/clsx-DGZSe4Nt.js +16 -0
  50. package/dist/colorManipulator-DmUjcif3.js +129 -0
  51. package/dist/contains-DnqPQsQU.js +16 -0
  52. package/dist/createSimplePaletteValueFilter-DFvyXHoZ.js +14 -0
  53. package/dist/createSvgIcon-3y-gS0r1.js +155 -0
  54. package/dist/createTheme-xB2Em0Na.js +1869 -0
  55. package/dist/defaultTheme-BaGcIzCh.js +210 -0
  56. package/dist/elementAcceptingRef-pKEY6jPR.js +25 -0
  57. package/dist/elementTypeAcceptingRef-xl_04Y5-.js +19 -0
  58. package/dist/exactProp-C_IsucXf.js +13 -0
  59. package/dist/extends-DXMyyJCW.js +12 -0
  60. package/dist/field-label-styles-4praXMaE.js +50 -0
  61. package/dist/formLabelClasses-AuZHWfTs.js +18 -0
  62. package/dist/generateUtilityClass-PAIOm1jC.js +34 -0
  63. package/dist/generateUtilityClasses-DvX505Gy.js +10 -0
  64. package/dist/getActiveElement-BfBkhgy6.js +8 -0
  65. package/dist/{gradients-DSnBONEQ.js → gradients-mQAYCK0_.js} +1 -1
  66. package/dist/iconButtonClasses-CVVRFXRo.js +27 -0
  67. package/dist/inputAdornmentClasses-BbB8s-Z4.js +19 -0
  68. package/dist/inputBaseClasses-Ce_jjdp9.js +25 -0
  69. package/dist/integerPropType-CCkQD1JY.js +27 -0
  70. package/dist/isEventHandler-QShLXBxE.js +7 -0
  71. package/dist/isFocusVisible-4OIE8TST.js +11 -0
  72. package/dist/isLayoutSupported-Btg2X3QE.js +6 -0
  73. package/dist/isMuiElement-CPjhi284.js +10 -0
  74. package/dist/main.js +1 -1
  75. package/dist/mega-menu-trigger-BcOo8I5_.js +53 -0
  76. package/dist/memoTheme-qFyKAk7y.js +15 -0
  77. package/dist/mergeSlotProps-DC8r4QzS.js +45 -0
  78. package/dist/monthCalendarClasses-b964KRbc.js +14 -0
  79. package/dist/objectWithoutPropertiesLoose-q4Zwd1RV.js +12 -0
  80. package/dist/outlinedInputClasses-ci1zDasn.js +17 -0
  81. package/dist/ownerDocument-CJjQZweZ.js +6 -0
  82. package/dist/ownerDocument-pYjJiXem.js +5 -0
  83. package/dist/ownerWindow-SSeeoqPT.js +18 -0
  84. package/dist/palettes/index.js +1 -1
  85. package/dist/{palettes-CJLuEy1m.js → palettes-B1FcGUYs.js} +163 -163
  86. package/dist/pickersCalendarHeaderClasses-BAiPN_oY.js +12 -0
  87. package/dist/prop-types-BzYPyWN7.js +516 -0
  88. package/dist/refType-j5S9pc_e.js +6 -0
  89. package/dist/resolveProps-7jIA45vn.js +30 -0
  90. package/dist/s-accordion/index.js +1 -1
  91. package/dist/s-accordion/s-accordion.js +2 -70
  92. package/dist/s-accordion-1oLxQhod.js +487 -0
  93. package/dist/s-action-overlay/s-action-overlay.js +21 -21
  94. package/dist/s-animated-gradient-text/index.d.ts +2 -0
  95. package/dist/s-animated-gradient-text/index.js +2 -0
  96. package/dist/s-animated-gradient-text/s-animated-gradient-text.d.ts +64 -0
  97. package/dist/s-animated-gradient-text/s-animated-gradient-text.js +93 -0
  98. package/dist/s-announcement-bar/index.d.ts +2 -0
  99. package/dist/s-announcement-bar/index.js +2 -0
  100. package/dist/s-announcement-bar/s-announcement-bar.d.ts +113 -0
  101. package/dist/s-announcement-bar/s-announcement-bar.js +275 -0
  102. package/dist/s-autocomplete/s-autocomplete.js +1 -1
  103. package/dist/s-avatar/s-avatar.js +17 -17
  104. package/dist/s-blur-text/s-blur-text.js +16 -16
  105. package/dist/s-brand-logo/index.js +1 -1
  106. package/dist/s-brand-logo/s-brand-logo.js +1 -1
  107. package/dist/s-breadcrumbs/s-breadcrumbs.js +19 -19
  108. package/dist/s-carousel/index.js +1 -1
  109. package/dist/s-carousel/s-carousel.d.ts +2 -0
  110. package/dist/s-carousel/s-carousel.js +2 -184
  111. package/dist/s-carousel-CAyAl3ka.js +1355 -0
  112. package/dist/s-category-card/s-category-card.js +22 -22
  113. package/dist/s-chat-input/index.js +1 -1
  114. package/dist/s-chat-input/s-chat-input.js +2 -398
  115. package/dist/s-chat-input-T3gyan60.js +419 -0
  116. package/dist/s-chat-message/index.js +1 -1
  117. package/dist/s-chat-message/s-chat-message.js +2 -314
  118. package/dist/s-chat-message-NFTpNgt5.js +315 -0
  119. package/dist/s-checkbox/s-checkbox.js +19 -18
  120. package/dist/s-chips/index.js +1 -1
  121. package/dist/s-chips/s-chips.js +2 -174
  122. package/dist/s-chips-Dqq1fgz-.js +176 -0
  123. package/dist/s-code-block/index.js +1 -1
  124. package/dist/s-code-block/s-code-block.js +2 -103
  125. package/dist/s-code-block-DyDtctGG.js +658 -0
  126. package/dist/s-comment-message/index.js +1 -1
  127. package/dist/s-comment-message/s-comment-message.js +2 -189
  128. package/dist/s-comment-message-DpCVBKiE.js +192 -0
  129. package/dist/s-copyable-text/s-copyable-text.js +18 -18
  130. package/dist/s-countdown/s-count-box.js +18 -18
  131. package/dist/s-data-table/index.js +1 -1
  132. package/dist/s-data-table/s-data-table.js +2 -213
  133. package/dist/s-data-table-D4V58HFR.js +805 -0
  134. package/dist/s-date-picker/index.js +1 -1
  135. package/dist/s-date-picker/s-date-picker.js +2 -106
  136. package/dist/s-date-picker-BFIQOA8C.js +657 -0
  137. package/dist/s-datetime-picker/index.js +1 -1
  138. package/dist/s-datetime-picker/s-datetime-picker.js +2 -108
  139. package/dist/s-datetime-picker-zfg7BEOW.js +3886 -0
  140. package/dist/s-dialog/index.js +1 -1
  141. package/dist/s-dialog/s-dialog.js +2 -80
  142. package/dist/s-dialog-BNlXsVVP.js +123 -0
  143. package/dist/s-dialog-confirm/s-dialog-confirm.js +33 -32
  144. package/dist/s-dialog-message/s-dialog-message.js +32 -31
  145. package/dist/s-drawer/index.d.ts +3 -0
  146. package/dist/s-drawer/index.js +2 -0
  147. package/dist/s-drawer/s-drawer.d.ts +70 -0
  148. package/dist/s-drawer/s-drawer.js +2 -0
  149. package/dist/s-drawer-4h5ZyoM8.js +562 -0
  150. package/dist/s-empty/s-empty.js +14 -13
  151. package/dist/s-file-dropzone/index.js +1 -1
  152. package/dist/s-file-dropzone/s-file-dropzone.js +2 -219
  153. package/dist/s-file-dropzone-Cfzv1Cm8.js +422 -0
  154. package/dist/s-file-icon/s-file-icon.js +88 -87
  155. package/dist/s-flex-box/s-flex-box.js +12 -11
  156. package/dist/s-form/s-form.js +15 -15
  157. package/dist/s-gallery/s-gallery.js +1 -1
  158. package/dist/s-glow-button/s-glow-button.js +10 -9
  159. package/dist/s-gradient-blob-pulse/index.d.ts +2 -0
  160. package/dist/s-gradient-blob-pulse/index.js +2 -0
  161. package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.d.ts +62 -0
  162. package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.js +237 -0
  163. package/dist/s-gradient-icon/index.d.ts +1 -1
  164. package/dist/s-gradient-icon/s-gradient-icon.d.ts +4 -4
  165. package/dist/s-gradient-icon/s-gradient-icon.js +2 -2
  166. package/dist/s-icon-button/s-icon-button.d.ts +6 -2
  167. package/dist/s-icon-button/s-icon-button.js +14 -13
  168. package/dist/s-image-comparison/s-image-comparison.js +31 -29
  169. package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +1 -1
  170. package/dist/s-image-viewer/index.js +3 -3
  171. package/dist/s-image-viewer/s-image-viewer.js +2 -266
  172. package/dist/s-image-viewer/use-image-viewer-navigation.js +7 -7
  173. package/dist/s-image-viewer-CjK67-rs.js +269 -0
  174. package/dist/s-interactive-card/index.d.ts +3 -0
  175. package/dist/s-interactive-card/index.js +2 -0
  176. package/dist/s-interactive-card/s-interactive-card.d.ts +57 -0
  177. package/dist/s-interactive-card/s-interactive-card.js +152 -0
  178. package/dist/s-label/s-label.js +26 -25
  179. package/dist/s-language-switcher/index.js +2 -2
  180. package/dist/s-language-switcher/s-language-switcher.js +2 -150
  181. package/dist/s-language-switcher-PaMgHWc2.js +246 -0
  182. package/dist/s-lazy-image/s-lazy-image.js +18 -17
  183. package/dist/s-link/index.js +1 -1
  184. package/dist/s-link/s-link.js +2 -5
  185. package/dist/s-link-Db1aabHh.js +235 -0
  186. package/dist/s-list-action-item/index.d.ts +2 -0
  187. package/dist/s-list-action-item/index.js +2 -0
  188. package/dist/s-list-action-item/s-list-action-item.d.ts +89 -0
  189. package/dist/s-list-action-item/s-list-action-item.js +150 -0
  190. package/dist/s-localization-provider/index.js +1 -1
  191. package/dist/s-localization-provider/s-localization-provider.js +2 -12
  192. package/dist/s-localization-provider-CeyB_SGz.js +519 -0
  193. package/dist/s-mega-menu/index.d.ts +3 -0
  194. package/dist/s-mega-menu/index.js +2 -0
  195. package/dist/s-mega-menu/mega-menu-panel.d.ts +38 -0
  196. package/dist/s-mega-menu/mega-menu-panel.js +253 -0
  197. package/dist/s-mega-menu/mega-menu-slots.d.ts +65 -0
  198. package/dist/s-mega-menu/mega-menu-slots.js +232 -0
  199. package/dist/s-mega-menu/mega-menu-trigger.d.ts +35 -0
  200. package/dist/s-mega-menu/mega-menu-trigger.js +2 -0
  201. package/dist/s-mega-menu/s-mega-menu.d.ts +23 -0
  202. package/dist/s-mega-menu/s-mega-menu.js +228 -0
  203. package/dist/s-mega-menu/types.d.ts +188 -0
  204. package/dist/s-mega-menu/types.js +0 -0
  205. package/dist/s-mega-menu/utils.d.ts +51 -0
  206. package/dist/s-mega-menu/utils.js +51 -0
  207. package/dist/s-mobile-dock/index.d.ts +3 -0
  208. package/dist/s-mobile-dock/index.js +2 -0
  209. package/dist/s-mobile-dock/s-mobile-dock.d.ts +96 -0
  210. package/dist/s-mobile-dock/s-mobile-dock.js +2 -0
  211. package/dist/s-mobile-dock-8F3UWAb8.js +615 -0
  212. package/dist/s-nav-item/index.d.ts +1 -1
  213. package/dist/s-nav-item/s-nav-item.d.ts +35 -16
  214. package/dist/s-nav-item/s-nav-item.js +56 -77
  215. package/dist/s-nav-items/s-nav-items.js +78 -121
  216. package/dist/s-no-ssr/index.js +1 -1
  217. package/dist/s-no-ssr/s-no-ssr.js +2 -5
  218. package/dist/s-no-ssr-DH57_uP_.js +25 -0
  219. package/dist/s-number-range/index.d.ts +3 -0
  220. package/dist/s-number-range/index.js +2 -0
  221. package/dist/s-number-range/s-number-range.d.ts +109 -0
  222. package/dist/s-number-range/s-number-range.js +2 -0
  223. package/dist/s-number-range-Low5QjuD.js +253 -0
  224. package/dist/s-pagination/index.js +1 -1
  225. package/dist/s-pagination/s-pagination.js +2 -85
  226. package/dist/s-pagination-s46hBifh.js +606 -0
  227. package/dist/s-pixel-reveal/s-pixel-reveal.js +20 -20
  228. package/dist/s-popover/index.d.ts +5 -0
  229. package/dist/s-popover/index.js +3 -0
  230. package/dist/s-popover/placement.d.ts +14 -0
  231. package/dist/s-popover/placement.js +65 -0
  232. package/dist/s-popover/s-popover-content.d.ts +22 -0
  233. package/dist/s-popover/s-popover-content.js +22 -0
  234. package/dist/s-popover/s-popover.d.ts +59 -0
  235. package/dist/s-popover/s-popover.js +68 -0
  236. package/dist/s-product-card/index.d.ts +3 -0
  237. package/dist/s-product-card/index.js +2 -0
  238. package/dist/s-product-card/s-product-card.d.ts +216 -0
  239. package/dist/s-product-card/s-product-card.js +502 -0
  240. package/dist/s-product-gallery/index.d.ts +3 -0
  241. package/dist/s-product-gallery/index.js +2 -0
  242. package/dist/s-product-gallery/s-product-gallery.d.ts +116 -0
  243. package/dist/s-product-gallery/s-product-gallery.js +2 -0
  244. package/dist/s-product-gallery-Dj9eGg5i.js +430 -0
  245. package/dist/s-quantity-input/s-quantity-input.js +24 -24
  246. package/dist/s-review/index.js +1 -1
  247. package/dist/s-review/s-review.js +2 -272
  248. package/dist/s-review--Q2C0ngO.js +272 -0
  249. package/dist/s-scroll-reveal/s-scroll-reveal.js +8 -7
  250. package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +1 -1
  251. package/dist/s-scroll-to-top/s-scroll-to-top.js +28 -27
  252. package/dist/s-scroll-velocity/scroll-velocity-row.js +29 -29
  253. package/dist/s-segmented-control/index.d.ts +3 -0
  254. package/dist/s-segmented-control/index.js +2 -0
  255. package/dist/s-segmented-control/s-segmented-control.d.ts +94 -0
  256. package/dist/s-segmented-control/s-segmented-control.js +302 -0
  257. package/dist/s-select/index.js +1 -1
  258. package/dist/s-select/s-select.js +2 -201
  259. package/dist/s-select-CtVKEOZ5.js +204 -0
  260. package/dist/s-select-list/s-select-list.js +50 -47
  261. package/dist/s-skeleton/s-skeleton.js +13 -12
  262. package/dist/s-snackbar-message/index.js +2 -2
  263. package/dist/s-snackbar-message/s-snackbar-message.js +2 -89
  264. package/dist/s-snackbar-message-DsfJlDYd.js +810 -0
  265. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +27 -27
  266. package/dist/s-status-illustration/s-status-illustration.js +74 -74
  267. package/dist/s-stepper/index.d.ts +3 -0
  268. package/dist/s-stepper/index.js +2 -0
  269. package/dist/s-stepper/s-stepper.d.ts +90 -0
  270. package/dist/s-stepper/s-stepper.js +2 -0
  271. package/dist/s-stepper-BtODHVro.js +892 -0
  272. package/dist/s-stripe/s-stripe.js +12 -11
  273. package/dist/s-stripe/stripe-input.js +2 -3
  274. package/dist/s-swatch/index.d.ts +3 -0
  275. package/dist/s-swatch/index.js +2 -0
  276. package/dist/s-swatch/s-swatch.d.ts +235 -0
  277. package/dist/s-swatch/s-swatch.js +219 -0
  278. package/dist/s-switch/index.js +1 -1
  279. package/dist/s-switch/s-switch.js +2 -48
  280. package/dist/s-switch-BCeBoxWf.js +307 -0
  281. package/dist/s-tabs/s-tabs.js +50 -48
  282. package/dist/s-text-editor/index.js +1 -1
  283. package/dist/s-text-editor/s-text-editor-toolbar.js +2 -216
  284. package/dist/s-text-editor/s-text-editor.js +26 -25
  285. package/dist/s-text-editor-toolbar-D5eQ-jCs.js +2124 -0
  286. package/dist/s-text-field/index.js +1 -1
  287. package/dist/s-text-field/s-text-field.js +2 -52
  288. package/dist/s-text-field-HYyDf1Jo.js +51 -0
  289. package/dist/s-text-shimmer/s-text-shimmer.js +3 -1
  290. package/dist/s-text-truncation/s-text-truncation.js +20 -20
  291. package/dist/s-theme-demo/s-theme-demo.js +8 -8
  292. package/dist/s-theme-demo/theme-demo-color-palette-section.js +1 -1
  293. package/dist/s-theme-demo/theme-demo-color-ramps-section.js +1 -1
  294. package/dist/s-theme-demo/theme-demo-components-section.js +2 -265
  295. package/dist/s-theme-demo/theme-demo-typography-section.js +10 -10
  296. package/dist/s-theme-provider/s-theme-provider.js +1 -1
  297. package/dist/s-theme-switch/index.js +1 -1
  298. package/dist/s-theme-switch/s-theme-switch.js +2 -60
  299. package/dist/s-theme-switch-BFWpADh3.js +60 -0
  300. package/dist/s-tip/index.js +1 -1
  301. package/dist/s-tip/s-tip.js +2 -61
  302. package/dist/s-tip-jbL7vtoU.js +62 -0
  303. package/dist/s-tool-bar/s-tool-bar.js +28 -28
  304. package/dist/s-tool-bar/tool-bar-action-buttons.js +2 -55
  305. package/dist/s-tool-bar/tool-bar-image-input.js +2 -148
  306. package/dist/s-tool-bar/tool-bar-inputs.js +55 -55
  307. package/dist/s-tool-item/s-tool-item.d.ts +10 -6
  308. package/dist/s-tool-item/s-tool-item.js +29 -29
  309. package/dist/s-two-pane-layout/s-two-pane-layout.js +32 -32
  310. package/dist/s-zoom-image/s-zoom-image.js +19 -18
  311. package/dist/selectClasses-CPxME5jE.js +22 -0
  312. package/dist/setRef-BWPyWnrr.js +6 -0
  313. package/dist/styled-Bog8QCl3.js +163 -0
  314. package/dist/svgIconClasses-1kWGzgux.js +20 -0
  315. package/dist/switchClasses-BtweO7PC.js +23 -0
  316. package/dist/theme/component-augmentation.d.ts +65 -1
  317. package/dist/theme/components/autocomplete.js +2 -43
  318. package/dist/theme/components/avatar.js +2 -9
  319. package/dist/theme/components/card.js +3 -3
  320. package/dist/theme/components/checkbox.js +2 -90
  321. package/dist/theme/components/chip.js +3 -3
  322. package/dist/theme/components/components.js +20 -20
  323. package/dist/theme/components/date-calendar.js +0 -1
  324. package/dist/theme/components/day-calendar.js +0 -1
  325. package/dist/theme/components/drawer.d.ts +1 -0
  326. package/dist/theme/components/drawer.js +4 -1
  327. package/dist/theme/components/field-label-styles.js +2 -19
  328. package/dist/theme/components/form-label.js +1 -1
  329. package/dist/theme/components/list-item-button.js +1 -1
  330. package/dist/theme/components/list-item.js +7 -7
  331. package/dist/theme/components/month-calendar.js +13 -14
  332. package/dist/theme/components/multi-section-digital-clock-section.js +0 -1
  333. package/dist/theme/components/outlined-input.js +6 -6
  334. package/dist/theme/components/picker-day.js +0 -1
  335. package/dist/theme/components/pickers-arrow-switcher.js +0 -1
  336. package/dist/theme/components/pickers-calendar-header.js +2 -3
  337. package/dist/theme/components/select.js +6 -6
  338. package/dist/theme/components/slider.js +18 -1
  339. package/dist/theme/components/step-connector.d.ts +0 -3
  340. package/dist/theme/components/step-connector.js +1 -6
  341. package/dist/theme/components/step-icon.d.ts +3 -12
  342. package/dist/theme/components/step-icon.js +3 -14
  343. package/dist/theme/components/switch.js +1 -1
  344. package/dist/theme/components/table-pagination.js +1 -1
  345. package/dist/theme/components/toggle-button.js +2 -93
  346. package/dist/theme/components/year-calendar.js +13 -14
  347. package/dist/theme/theme-primitives.js +2 -2
  348. package/dist/theme-demo-components-section-C7l_2KAo.js +267 -0
  349. package/dist/{theme-primitives-CRfnMsNy.js → theme-primitives-CXtaMdVj.js} +109 -108
  350. package/dist/toggle-button-BsGb-tOr.js +104 -0
  351. package/dist/tool-bar-action-buttons-v1koaasr.js +54 -0
  352. package/dist/tool-bar-image-input-DtXTyEe1.js +148 -0
  353. package/dist/typographyClasses-BH_-zLwg.js +31 -0
  354. package/dist/unsupportedProp-whMV_uOi.js +11 -0
  355. package/dist/useControlled-DqNPBJNp.js +5 -0
  356. package/dist/useControlled-uxVKygk1.js +29 -0
  357. package/dist/useEnhancedEffect-DFq_FMGX.js +5 -0
  358. package/dist/useEnhancedEffect-dBFfkm1e.js +5 -0
  359. package/dist/useEventCallback-DGCsaRIu.js +5 -0
  360. package/dist/useEventCallback-DhCPBxRG.js +11 -0
  361. package/dist/useForkRef-BuNFTXxE.js +29 -0
  362. package/dist/useFormControl-gXwNeUM1.js +18 -0
  363. package/dist/useMobilePicker-CdrT935R.js +7584 -0
  364. package/dist/useRovingTabIndex-DPlW997R.js +242 -0
  365. package/dist/useSlot-BG8ReOxN.js +83 -0
  366. package/dist/useSlotProps-BOO3qaI9.js +16 -0
  367. package/dist/useTheme-BIWMbX3i.js +9 -0
  368. package/dist/useThemeProps-Dw9dmKyT.js +29 -0
  369. package/dist/useTimeout-CoK-Khfm.js +49 -0
  370. package/dist/utils/dayjs.js +146 -9
  371. package/dist/utils-Bfqbev5I.js +248 -0
  372. package/dist/warning-D5YhCbje.js +99 -0
  373. package/dist/yearCalendarClasses-D9k_KT38.js +14 -0
  374. package/package.json +1 -1
  375. package/dist/theme/components/components.d.ts +0 -2
  376. package/dist/theme/components/slider.d.ts +0 -34
  377. /package/dist/{colors-CNjL5fhq.js → colors-Bik9qOU9.js} +0 -0
  378. /package/dist/{s-brand-logo-CErW9Slg.js → s-brand-logo-D7Jovf5K.js} +0 -0
  379. /package/dist/{utils-CMeAWSRO.js → utils-DOY6v6ln.js} +0 -0
@@ -0,0 +1,228 @@
1
+ import { toSxArray as e } from "../utils/sx.js";
2
+ import { resolveOwnerStateSlotProps as t } from "../utils/slots.js";
3
+ import { t as n } from "../useForkRef-BuNFTXxE.js";
4
+ import { t as r } from "../useEventCallback-DGCsaRIu.js";
5
+ import { t as i } from "../appendOwnerState-CFQTq3pb.js";
6
+ import { t as ee } from "../useControlled-DqNPBJNp.js";
7
+ import { t as a } from "../mergeSlotProps-DC8r4QzS.js";
8
+ import { t as te } from "../mega-menu-trigger-BcOo8I5_.js";
9
+ import { contains as o, focusAdjacentTrigger as s, getFirstRow as c } from "./utils.js";
10
+ import { SMegaMenuPopover as ne, SMegaMenuRoot as re } from "./mega-menu-slots.js";
11
+ import { MegaMenuPanelContent as ie } from "./mega-menu-panel.js";
12
+ import * as l from "react";
13
+ import { jsx as u, jsxs as ae } from "react/jsx-runtime";
14
+ import { useMediaQuery as oe, useThemeProps as se } from "@mui/material";
15
+ //#region lib/s-mega-menu/s-mega-menu.tsx
16
+ var ce = 0;
17
+ function d(e, t) {
18
+ return e.href === t || !!e.children?.some((e) => d(e, t));
19
+ }
20
+ function f(f, p) {
21
+ let { activeHref: m, closeDelay: h = ce, defaultOpenId: g = null, getIsActive: _, items: v, keepMounted: y = !1, layout: b = "auto", linkComponent: x, onOpenChange: S, openDelay: C = 0, openId: le, renderItem: ue, renderTrigger: de, slotProps: w, slots: T, sx: fe, ...E } = se({
22
+ props: f,
23
+ name: "SMegaMenu"
24
+ }), [D, O] = ee({
25
+ controlled: le,
26
+ default: g,
27
+ name: "SMegaMenu",
28
+ state: "openId"
29
+ }), [k, A] = l.useState(null), pe = oe("(prefers-reduced-motion: reduce)", { noSsr: !0 }), j = l.useId(), M = `${j}-panel`, N = l.useRef(null), P = l.useRef(/* @__PURE__ */ new Map()), F = l.useRef(void 0), I = l.useRef(void 0), L = l.useRef(!1), R = l.useRef(0), me = n(N, p), [z, he] = l.useState(g);
30
+ D != null && D !== z && he(D);
31
+ let B = v.find((e) => e.id === (D ?? z)) ?? null, V = B ? v.indexOf(B) : -1, ge = V >= 0 ? `${j}-trigger-${V}` : void 0, H = !!(D == null ? null : B)?.children?.length && k != null, U = {
32
+ activeHref: m,
33
+ closeDelay: h,
34
+ items: v,
35
+ keepMounted: y,
36
+ layout: b,
37
+ openDelay: C,
38
+ openId: D ?? null
39
+ };
40
+ l.useEffect(() => {}, [v, b]);
41
+ let W = l.useCallback(() => typeof document > "u" ? null : document.getElementById(M), [M]), G = l.useCallback(() => {
42
+ F.current &&= (clearTimeout(F.current), void 0), I.current &&= (clearTimeout(I.current), void 0);
43
+ }, []);
44
+ l.useEffect(() => G, [G]);
45
+ let K = r((e) => _ ? _(e) : !!(m && d(e, m))), q = r((e, t, n, r, i = !1) => {
46
+ G(), !(e.disabled || D === e.id) && (L.current = i, A(t), O(e.id), S?.(n, e.id, e, r));
47
+ }), J = r(({ event: e, focusTrigger: t = !1, reason: n }) => {
48
+ G(), D != null && (t && P.current.get(D)?.focus(), L.current = !1, O(null), S?.(e, null, null, n));
49
+ }), Y = r((e) => {
50
+ G(), I.current = setTimeout(() => J({
51
+ event: e,
52
+ reason: "pointerLeave"
53
+ }), h);
54
+ });
55
+ l.useEffect(() => {
56
+ if (D == null) return;
57
+ let e = P.current.get(D);
58
+ e && e !== k && A(e);
59
+ }, [k, D]), l.useEffect(() => {
60
+ H && L.current && (L.current = !1, c(W())?.focus());
61
+ }, [W, H]), l.useEffect(() => {
62
+ if (!H) return;
63
+ let e = (e) => {
64
+ o(W(), e.target) || o(N.current, e.target) || J({
65
+ event: e,
66
+ reason: "outsidePress"
67
+ });
68
+ };
69
+ return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
70
+ }, [
71
+ J,
72
+ W,
73
+ H
74
+ ]);
75
+ let _e = l.useCallback((e, t) => {
76
+ t ? P.current.set(e, t) : P.current.delete(e);
77
+ }, []), X = r((e) => {
78
+ let t = e.relatedTarget;
79
+ !t || o(N.current, t) || o(W(), t) || J({
80
+ event: e,
81
+ reason: "blur"
82
+ });
83
+ }), ve = r((e, t) => {
84
+ if (e.disabled || t.pointerType === "touch" || Date.now() < R.current || !e.children?.length) return;
85
+ let n = t.currentTarget, r = t.nativeEvent;
86
+ if (G(), C > 0 && D == null) {
87
+ F.current = setTimeout(() => q(e, n, r, "triggerHover"), C);
88
+ return;
89
+ }
90
+ q(e, n, t, "triggerHover");
91
+ }), ye = r((e) => {
92
+ Date.now() >= R.current && (R.current = 0), e.pointerType !== "touch" && Y(e.nativeEvent);
93
+ }), be = r((e, t) => {
94
+ let n = !!e.children?.length;
95
+ if (n && D !== e.id) {
96
+ q(e, t.currentTarget, t, "triggerClick");
97
+ return;
98
+ }
99
+ if (n) {
100
+ R.current = Date.now() + 300, J({
101
+ event: t,
102
+ reason: "triggerClick"
103
+ });
104
+ return;
105
+ }
106
+ J({
107
+ event: t,
108
+ reason: "itemClick"
109
+ });
110
+ }), xe = r((e, t) => {
111
+ D != null && D !== e.id && J({
112
+ event: t,
113
+ reason: "triggerFocus"
114
+ });
115
+ }), Se = r((e, t) => {
116
+ let n = t.currentTarget, r = !!e.children?.length;
117
+ switch (t.key) {
118
+ case "ArrowDown":
119
+ if (!r) break;
120
+ t.preventDefault(), D === e.id ? c(W())?.focus() : q(e, n, t, "triggerKeyDown", !0);
121
+ break;
122
+ case "ArrowRight":
123
+ t.preventDefault(), s(N.current, n, 1);
124
+ break;
125
+ case "ArrowLeft":
126
+ t.preventDefault(), s(N.current, n, -1);
127
+ break;
128
+ case "Escape":
129
+ D != null && (t.preventDefault(), J({
130
+ event: t,
131
+ reason: "escapeKeyDown"
132
+ }));
133
+ break;
134
+ default: break;
135
+ }
136
+ }), Ce = r((e) => {
137
+ e.pointerType !== "touch" && G();
138
+ }), we = r((e) => {
139
+ e.pointerType !== "touch" && Y(e.nativeEvent);
140
+ }), Z = r((e) => {
141
+ e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), J({
142
+ event: e,
143
+ focusTrigger: !0,
144
+ reason: "escapeKeyDown"
145
+ }));
146
+ }), Te = {
147
+ closeMenu: J,
148
+ getIsActive: K,
149
+ keepMounted: y,
150
+ linkComponent: x,
151
+ ownerState: U,
152
+ renderItem: ue,
153
+ slotProps: w,
154
+ slots: T
155
+ }, Q = T?.root ?? re, $ = T?.popover ?? ne, { ref: Ee, sx: De, ...Oe } = i(Q, a(t(w?.root, U), {
156
+ ...E,
157
+ onBlurCapture: X
158
+ }), U), ke = n(Ee, me), { slotProps: Ae, sx: je, ...Me } = t(w?.popover, U) ?? {}, Ne = a(Ae?.paper, {
159
+ "aria-labelledby": ge,
160
+ id: M,
161
+ onBlurCapture: X,
162
+ onKeyDown: Z,
163
+ onPointerEnter: Ce,
164
+ onPointerLeave: we,
165
+ sx: [(e) => ({
166
+ maxWidth: "92vw",
167
+ minWidth: e.spacing(25),
168
+ overflow: "visible",
169
+ pointerEvents: "auto",
170
+ width: "max-content"
171
+ })],
172
+ role: "region",
173
+ tabIndex: -1
174
+ }), Pe = i($, a(Me, {
175
+ anchorEl: k,
176
+ disableAutoFocus: !0,
177
+ disableEnforceFocus: !0,
178
+ disableRestoreFocus: !0,
179
+ disableScrollLock: !0,
180
+ hideBackdrop: !0,
181
+ keepMounted: y,
182
+ onClose: (e, t) => J({
183
+ event: e,
184
+ focusTrigger: t === "escapeKeyDown",
185
+ reason: t === "escapeKeyDown" ? "escapeKeyDown" : "outsidePress"
186
+ }),
187
+ placement: "bottom-start",
188
+ transitionDuration: pe ? 0 : void 0
189
+ }), U);
190
+ return /* @__PURE__ */ ae(Q, {
191
+ ...Oe,
192
+ ref: ke,
193
+ sx: [...e(De), ...e(fe)],
194
+ children: [v.map((e, t) => /* @__PURE__ */ u(te, {
195
+ active: K(e),
196
+ hasPanel: !!e.children?.length,
197
+ item: e,
198
+ linkComponent: x,
199
+ onClick: (t) => be(e, t),
200
+ onFocus: (t) => xe(e, t),
201
+ onKeyDown: (t) => Se(e, t),
202
+ onPointerEnter: (t) => ve(e, t),
203
+ onPointerLeave: ye,
204
+ open: H && D === e.id,
205
+ ownerState: U,
206
+ panelId: M,
207
+ registerRef: _e,
208
+ renderTrigger: de,
209
+ slotProps: w,
210
+ slots: T,
211
+ triggerId: `${j}-trigger-${t}`
212
+ }, e.id)), /* @__PURE__ */ u($, {
213
+ ...Pe,
214
+ open: H,
215
+ slotProps: { paper: Ne },
216
+ sx: [...e(je)],
217
+ children: B?.children?.length ? /* @__PURE__ */ u(ie, {
218
+ ctx: Te,
219
+ depth: 0,
220
+ items: B.children
221
+ }) : null
222
+ })]
223
+ });
224
+ }
225
+ var p = l.forwardRef(f);
226
+ p.displayName = "SMegaMenu";
227
+ //#endregion
228
+ export { p as SMegaMenu, p as default };
@@ -0,0 +1,188 @@
1
+ import { default as React } from 'react';
2
+ import { BoxProps, ButtonBaseProps, PaperProps, TypographyProps } from '@mui/material';
3
+ import { SListActionItemProps } from '../s-list-action-item/s-list-action-item';
4
+ import { SPopoverProps } from '../s-popover/s-popover';
5
+ import { OwnerStateSlotProps as MuiOwnerStateSlotProps } from '../utils/slots';
6
+ /** Props shared by every node of the mega-menu tree. */
7
+ export interface SMegaMenuItemBase<T = unknown> {
8
+ /** Arbitrary consumer payload, handed back to `renderTrigger`/`renderItem`. */
9
+ data?: T;
10
+ /** Secondary text rendered under the label on panel rows. */
11
+ description?: React.ReactNode;
12
+ /** Prevents activation and exposes the disabled state to assistive technology. */
13
+ disabled?: boolean;
14
+ /** Leading icon. Comes from the item data — the kit never maps labels to icons. */
15
+ icon?: React.ReactNode;
16
+ /** Stable identifier, used as the React key and as the open-panel key. */
17
+ id: string;
18
+ /** Visible label. */
19
+ label: React.ReactNode;
20
+ }
21
+ /**
22
+ * A single node of the mega-menu tree.
23
+ *
24
+ * At runtime, nodes with children are always disclosure buttons and `href` is
25
+ * used only by leaf links. Keeping this as an interface avoids the pathological
26
+ * type expansion produced by a recursive discriminated union combined with
27
+ * generic owner-state slot callbacks.
28
+ */
29
+ export interface SMegaMenuItem<T = unknown> extends SMegaMenuItemBase<T> {
30
+ /** Nested navigation entries shown by this disclosure. */
31
+ children?: SMegaMenuItem<T>[];
32
+ /** Element used for this link, e.g. a router `Link`. Overrides `linkComponent`. */
33
+ component?: React.ElementType;
34
+ /** Leaf-link destination. Ignored when `children` is non-empty. */
35
+ href?: string;
36
+ /** Anchor relationship, forwarded when the entry renders as a link. */
37
+ rel?: string;
38
+ /** Anchor target, forwarded when the entry renders as a link. */
39
+ target?: string;
40
+ }
41
+ /**
42
+ * Panel layout.
43
+ *
44
+ * - `list` — one vertical list; rows that have children open a flyout submenu.
45
+ * - `columns` — a `title + children` column grid, for trees that are exactly two levels deep.
46
+ * - `auto` — picks `list` when the tree is flat or deeper than two levels, `columns` when it is
47
+ * exactly two levels deep.
48
+ */
49
+ export type SMegaMenuLayout = 'auto' | 'columns' | 'list';
50
+ /** Layout actually rendered once `auto` has been resolved. */
51
+ export type SMegaMenuResolvedLayout = Exclude<SMegaMenuLayout, 'auto'>;
52
+ /** Side a flyout submenu is placed on after viewport collision detection. */
53
+ export type SMegaMenuSide = 'left' | 'right';
54
+ /** Why the open top-level disclosure changed. */
55
+ export type SMegaMenuChangeReason = 'blur' | 'escapeKeyDown' | 'itemClick' | 'outsidePress' | 'pointerLeave' | 'triggerClick' | 'triggerFocus' | 'triggerHover' | 'triggerKeyDown';
56
+ export interface SMegaMenuSlots {
57
+ /** Column wrapper in the `columns` layout. */
58
+ column?: React.ElementType;
59
+ /** Non-interactive column heading in the `columns` layout. */
60
+ heading?: React.ElementType;
61
+ /** Panel row. Defaults to `SListActionItem`. */
62
+ item?: React.ElementType;
63
+ /** Content container inside the popover surface (and inside every flyout submenu). */
64
+ panel?: React.ElementType;
65
+ /** Popover hosting the top-level panel. Defaults to `SPopover`. */
66
+ popover?: React.ElementType;
67
+ /** Navigation root. */
68
+ root?: React.ElementType;
69
+ /** Flyout submenu surface rendered next to a nested row. */
70
+ submenu?: React.ElementType;
71
+ /** Positioned wrapper around a row plus its flyout submenu. Carries the invisible hover bridge. */
72
+ submenuNode?: React.ElementType;
73
+ /** Top-level trigger. */
74
+ trigger?: React.ElementType;
75
+ /** Chevron rendered by the default top-level trigger. */
76
+ triggerArrow?: React.ElementType;
77
+ }
78
+ type SMegaMenuItemSlotProps = Omit<SListActionItemProps, 'component' | 'description' | 'disabled' | 'href' | 'icon' | 'label' | 'onClick' | 'rel' | 'selected' | 'target'>;
79
+ type SMegaMenuTriggerSlotProps = Omit<ButtonBaseProps, 'children' | 'component' | 'disabled' | 'href' | 'onClick' | 'onFocus' | 'onKeyDown' | 'onPointerEnter' | 'onPointerLeave'>;
80
+ export interface SMegaMenuSlotProps<T = unknown> {
81
+ /** Props or state callback for the column slot. */
82
+ column?: MuiOwnerStateSlotProps<Omit<BoxProps, 'children'>, SMegaMenuItemState<T>>;
83
+ /** Props or state callback for the non-interactive column heading slot. */
84
+ heading?: MuiOwnerStateSlotProps<Omit<TypographyProps, 'children'>, SMegaMenuItemState<T>>;
85
+ /** Props or state callback for the row slot. */
86
+ item?: MuiOwnerStateSlotProps<SMegaMenuItemSlotProps, SMegaMenuItemState<T>>;
87
+ /** Props or state callback for the panel slot. */
88
+ panel?: MuiOwnerStateSlotProps<Omit<BoxProps, 'children'>, SMegaMenuPanelState<T>>;
89
+ /** Props or state callback for the popover slot. */
90
+ popover?: MuiOwnerStateSlotProps<Omit<SPopoverProps, 'children' | 'open'>, SMegaMenuOwnerState<T>>;
91
+ /** Props or state callback for the navigation root slot. */
92
+ root?: MuiOwnerStateSlotProps<Omit<BoxProps, 'children' | 'component'>, SMegaMenuOwnerState<T>>;
93
+ /** Props or state callback for the flyout submenu surface slot. */
94
+ submenu?: MuiOwnerStateSlotProps<Omit<PaperProps, 'children'>, SMegaMenuItemState<T>>;
95
+ /** Props or state callback for the positioned submenu wrapper slot. */
96
+ submenuNode?: MuiOwnerStateSlotProps<Omit<BoxProps, 'children'>, SMegaMenuItemState<T>>;
97
+ /** Props or state callback for the trigger slot. */
98
+ trigger?: MuiOwnerStateSlotProps<SMegaMenuTriggerSlotProps, SMegaMenuTriggerState<T>>;
99
+ /** Props or state callback for the default trigger's chevron slot. */
100
+ triggerArrow?: MuiOwnerStateSlotProps<Omit<BoxProps, 'children' | 'component'>, SMegaMenuTriggerState<T>>;
101
+ }
102
+ /** Props for a multi-level navigation mega menu built on `SPopover`. */
103
+ export interface SMegaMenuProps<T = unknown> extends Omit<BoxProps, 'children' | 'component'> {
104
+ /** Accessible name of the navigation landmark. */
105
+ 'aria-label'?: string;
106
+ /** `href` considered current. Marks the matching trigger and row as the active entry. */
107
+ activeHref?: string;
108
+ /**
109
+ * Delay in ms before an open panel closes once the pointer leaves both trigger and panel.
110
+ * @default 0
111
+ */
112
+ closeDelay?: number;
113
+ /** Initially open top-level item id, for uncontrolled usage. */
114
+ defaultOpenId?: string | null;
115
+ /** Overrides `activeHref` matching with custom logic. */
116
+ getIsActive?: (item: SMegaMenuItem<T>) => boolean;
117
+ /** Top-level entries of the menu. */
118
+ items: SMegaMenuItem<T>[];
119
+ /** Keeps panel and submenu content mounted while closed. Defaults to unmounted, so closed panels add no tab stops. */
120
+ keepMounted?: boolean;
121
+ /** Panel layout. `auto` derives it from the shape of the tree. */
122
+ layout?: SMegaMenuLayout;
123
+ /** Default element used for every entry that has an `href`, e.g. a router `Link`. */
124
+ linkComponent?: React.ElementType;
125
+ /** Called whenever the open top-level item changes. */
126
+ onOpenChange?: (event: Event | React.SyntheticEvent | null, openId: string | null, item: SMegaMenuItem<T> | null, reason: SMegaMenuChangeReason) => void;
127
+ /** Delay in ms before hovering a trigger opens its panel. */
128
+ openDelay?: number;
129
+ /** Open top-level item id, for controlled usage. Pass `null` to close. */
130
+ openId?: string | null;
131
+ /** Renders the content of a panel row. Defaults to `item.label`. Return content, not a nested link. */
132
+ renderItem?: (item: SMegaMenuItem<T>, state: SMegaMenuItemState<T>) => React.ReactNode;
133
+ /** Renders the content of a top-level trigger. Defaults to the label plus a rotating chevron. */
134
+ renderTrigger?: (item: SMegaMenuItem<T>, state: SMegaMenuTriggerState<T>) => React.ReactNode;
135
+ /** Components used for internal structural slots. */
136
+ slots?: SMegaMenuSlots;
137
+ /** Props or owner-state callbacks for internal structural slots. */
138
+ slotProps?: SMegaMenuSlotProps<T>;
139
+ }
140
+ /** Styling and interaction state shared by every slot. */
141
+ export interface SMegaMenuOwnerState<T = unknown> {
142
+ activeHref?: string;
143
+ closeDelay: number;
144
+ items: SMegaMenuItem<T>[];
145
+ keepMounted: boolean;
146
+ layout: SMegaMenuLayout;
147
+ openDelay: number;
148
+ /** Currently open top-level item id, or `null`. */
149
+ openId: string | null;
150
+ }
151
+ /** Owner state of a top-level trigger. */
152
+ export interface SMegaMenuTriggerState<T = unknown> extends SMegaMenuOwnerState<T> {
153
+ /** The trigger points at the active `href`. */
154
+ active: boolean;
155
+ /** The item has children, so the trigger owns a panel. */
156
+ hasPanel: boolean;
157
+ item: SMegaMenuItem<T>;
158
+ /** The trigger's panel is open. */
159
+ open: boolean;
160
+ }
161
+ /** Owner state of a panel container. */
162
+ export interface SMegaMenuPanelState<T = unknown> extends SMegaMenuOwnerState<T> {
163
+ /** Nesting level: `0` is the top-level panel. */
164
+ depth: number;
165
+ /** The panel scrolls instead of letting flyout submenus overflow it. */
166
+ scrollable: boolean;
167
+ /** Layout after `auto` has been resolved for this level. */
168
+ resolvedLayout: SMegaMenuResolvedLayout;
169
+ }
170
+ /** Owner state of a panel row and of its submenu wrapper/surface. */
171
+ export interface SMegaMenuItemState<T = unknown> extends SMegaMenuOwnerState<T> {
172
+ /** The row points at the active `href`. */
173
+ active: boolean;
174
+ /** Nesting level of the row's list: `0` is the top-level panel. */
175
+ depth: number;
176
+ /** The row has children, so it owns a flyout submenu. */
177
+ hasChildren: boolean;
178
+ /** The row is a column heading in the `columns` layout. */
179
+ heading: boolean;
180
+ item: SMegaMenuItem<T>;
181
+ /** The row's flyout submenu is open. */
182
+ open: boolean;
183
+ /** Layout after `auto` has been resolved for the row's current panel. */
184
+ resolvedLayout: SMegaMenuResolvedLayout;
185
+ /** Side the flyout submenu is placed on. */
186
+ side: SMegaMenuSide;
187
+ }
188
+ export {};
File without changes
@@ -0,0 +1,51 @@
1
+ import { SMegaMenuItem, SMegaMenuLayout, SMegaMenuResolvedLayout, SMegaMenuSide } from './types';
2
+ /**
3
+ * Width assumed for a flyout submenu that has not been measured yet (its content
4
+ * is unmounted while closed). Once the submenu opens, the real `offsetWidth` is
5
+ * measured in a layout effect and the side is recomputed before paint.
6
+ */
7
+ export declare const SUBMENU_FALLBACK_WIDTH = 280;
8
+ /** Viewport gutter kept clear when deciding whether a submenu still fits on the right. */
9
+ export declare const VIEWPORT_EDGE_INSET = 16;
10
+ /** Data attributes used for DOM-based keyboard traversal of the recursive tree. */
11
+ export declare const ROW_ATTRIBUTE = "data-s-mega-menu-row";
12
+ export declare const LIST_ATTRIBUTE = "data-s-mega-menu-list";
13
+ export declare const NODE_ATTRIBUTE = "data-s-mega-menu-node";
14
+ export declare const PANEL_ATTRIBUTE = "data-s-mega-menu-panel";
15
+ export declare const TRIGGER_ATTRIBUTE = "data-s-mega-menu-trigger";
16
+ /** `true` when at least one item carries children. */
17
+ export declare function hasNestedChildren<T>(items: readonly SMegaMenuItem<T>[]): boolean;
18
+ /** `true` when the tree bottoms out after `items` + one level of children. */
19
+ export declare function isFinalTwoLevels<T>(items: readonly SMegaMenuItem<T>[]): boolean;
20
+ /** `true` when `items` can render as non-interactive headings plus leaf-link columns. */
21
+ export declare function supportsColumnsLayout<T>(items: readonly SMegaMenuItem<T>[]): boolean;
22
+ /**
23
+ * Resolves the `auto` layout with the heuristic ported from the store: a flat
24
+ * tree renders as a plain list, a tree exactly two levels deep renders as a
25
+ * column grid, and anything deeper renders as a list of flyout submenus. An
26
+ * explicit but incompatible `columns` request safely falls back to `list`.
27
+ */
28
+ export declare function resolveLayout<T>(items: readonly SMegaMenuItem<T>[], layout: SMegaMenuLayout): SMegaMenuResolvedLayout;
29
+ /**
30
+ * Viewport collision flipping, ported from the store: a submenu stays on the
31
+ * right while its far edge still clears the viewport gutter, otherwise it flips
32
+ * to the left of its row.
33
+ */
34
+ export declare function resolveSubmenuSide(node: HTMLElement | null, surface: HTMLElement | null): SMegaMenuSide;
35
+ /** Rows that sit in the same list as `row`, in DOM order. */
36
+ export declare function getSiblingRows(row: HTMLElement): HTMLElement[];
37
+ /** Lists that sit in the same panel as `row`, in DOM order. Only `columns` panels have more than one. */
38
+ export declare function getSiblingLists(row: HTMLElement): HTMLElement[];
39
+ /**
40
+ * Moves focus to the first row of the adjacent list (column) inside the same panel.
41
+ * Returns `false` when the panel has no sibling list, so the caller can fall back.
42
+ */
43
+ export declare function focusAdjacentList(row: HTMLElement, offset: number): boolean;
44
+ /** First row of `container`, used when opening a panel or submenu from the keyboard. */
45
+ export declare function getFirstRow(container: HTMLElement | null): HTMLElement | null;
46
+ /** Moves focus to the previous/next top-level trigger inside `root`, wrapping around. */
47
+ export declare function focusAdjacentTrigger(root: HTMLElement | null, current: HTMLElement, offset: number): void;
48
+ /** Moves focus by `offset` inside `rows`, wrapping around at both ends. */
49
+ export declare function focusRowByOffset(rows: HTMLElement[], current: HTMLElement, offset: number): void;
50
+ /** `true` when `element` is inside `container`. Tolerates `null` on either side. */
51
+ export declare function contains(container: Element | null | undefined, element: EventTarget | null): boolean;
@@ -0,0 +1,51 @@
1
+ //#region lib/s-mega-menu/utils.ts
2
+ var e = 280, t = 16, n = "data-s-mega-menu-row", r = "data-s-mega-menu-list", i = "data-s-mega-menu-node", a = "data-s-mega-menu-panel", o = "data-s-mega-menu-trigger", s = `[${n}]`, c = `[${r}]`, l = `[${a}]`, u = `:scope > ${s}, :scope > [${i}] > ${s}`;
3
+ function d(e) {
4
+ return e.some((e) => !!e.children?.length);
5
+ }
6
+ function f(e) {
7
+ return e.every((e) => !e.children?.some((e) => e.children?.length));
8
+ }
9
+ function p(e) {
10
+ return d(e) && f(e);
11
+ }
12
+ function m(e, t) {
13
+ return t === "list" ? "list" : p(e) ? "columns" : "list";
14
+ }
15
+ function h(e, t) {
16
+ if (!e || !t || typeof window > "u") return "right";
17
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = r.width, a = i > 280 / 2 ? i : 280, o = r.left >= n.right ? r.left - n.right : Math.max(0, n.left - r.right);
18
+ return n.right + o + a <= window.innerWidth - 16 ? "right" : "left";
19
+ }
20
+ function g(e) {
21
+ let t = e.closest(c);
22
+ return t ? Array.from(t.querySelectorAll(u)) : [e];
23
+ }
24
+ function _(e) {
25
+ let t = e.closest(l);
26
+ return t ? Array.from(t.querySelectorAll(`:scope > ${c}`)) : [];
27
+ }
28
+ function v(e, t) {
29
+ let n = _(e), r = e.closest(c);
30
+ if (n.length < 2 || !r) return !1;
31
+ let i = n.indexOf(r);
32
+ if (i === -1) return !1;
33
+ let a = y(n[(i + t + n.length) % n.length]);
34
+ return a?.focus(), !!a;
35
+ }
36
+ function y(e) {
37
+ return e?.querySelector(s) ?? null;
38
+ }
39
+ function b(e, t, n) {
40
+ e && x(Array.from(e.querySelectorAll(`[${o}]`)), t, n);
41
+ }
42
+ function x(e, t, n) {
43
+ if (e.length === 0) return;
44
+ let r = e.indexOf(t);
45
+ e[r === -1 ? 0 : (r + n + e.length) % e.length]?.focus();
46
+ }
47
+ function S(e, t) {
48
+ return !!(e && t instanceof Node && e.contains(t));
49
+ }
50
+ //#endregion
51
+ export { r as LIST_ATTRIBUTE, i as NODE_ATTRIBUTE, a as PANEL_ATTRIBUTE, n as ROW_ATTRIBUTE, e as SUBMENU_FALLBACK_WIDTH, o as TRIGGER_ATTRIBUTE, t as VIEWPORT_EDGE_INSET, S as contains, v as focusAdjacentList, b as focusAdjacentTrigger, x as focusRowByOffset, y as getFirstRow, _ as getSiblingLists, g as getSiblingRows, d as hasNestedChildren, f as isFinalTwoLevels, m as resolveLayout, h as resolveSubmenuSide, p as supportsColumnsLayout };
@@ -0,0 +1,3 @@
1
+ export { default, default as SMobileDock } from './s-mobile-dock';
2
+ export type { SMobileDockItem, SMobileDockItemState, SMobileDockLabelVisibility, SMobileDockOwnerState, SMobileDockProps, SMobileDockSlotProps, SMobileDockSlots, } from './s-mobile-dock';
3
+ export type {} from '../theme/component-augmentation';
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../s-mobile-dock-8F3UWAb8.js";
2
+ export { e as SMobileDock, e as default };
@@ -0,0 +1,96 @@
1
+ import { BadgeProps } from '@mui/material/Badge';
2
+ import { BottomNavigationProps } from '@mui/material/BottomNavigation';
3
+ import { BottomNavigationActionProps } from '@mui/material/BottomNavigationAction';
4
+ import { BoxProps } from '@mui/material/Box';
5
+ import { OwnerStateSlotProps as MuiOwnerStateSlotProps } from '../utils/slots';
6
+ import * as React from 'react';
7
+ interface SMobileDockItemBase<Value extends string> {
8
+ /** Badge content rendered over the icon. Omit for no badge. */
9
+ badge?: React.ReactNode;
10
+ /** Non-native link component used for this destination. Overrides `linkComponent`. */
11
+ component?: React.ElementType;
12
+ /** Disables the item. */
13
+ disabled?: boolean;
14
+ /** Link destination; renders an anchor when no `component` is given. */
15
+ href?: string;
16
+ /** Item icon. */
17
+ icon: React.ReactNode;
18
+ /** Called when the item is activated. */
19
+ onClick?: React.MouseEventHandler<HTMLElement>;
20
+ /** Anchor relationship forwarded to link destinations. */
21
+ rel?: string;
22
+ /** Anchor target forwarded to link destinations. */
23
+ target?: React.HTMLAttributeAnchorTarget;
24
+ /** Stable value used for selection and as the React key. */
25
+ value: Value;
26
+ }
27
+ type SMobileDockItemAccessibleName = {
28
+ /** Accessible name. Overrides the visible label for assistive technology. */
29
+ ariaLabel: string;
30
+ /** Optional visible label. */
31
+ label?: React.ReactNode;
32
+ } | {
33
+ /** Optional accessible-name override. */
34
+ ariaLabel?: string;
35
+ /** Visible label used as the accessible name. */
36
+ label: React.ReactNode;
37
+ };
38
+ /** A single dock destination. Navigation and copy stay with the consumer. */
39
+ export type SMobileDockItem<Value extends string = string> = SMobileDockItemBase<Value> & SMobileDockItemAccessibleName;
40
+ export type SMobileDockLabelVisibility = 'always' | 'never';
41
+ type SMobileDockAccessibleName = {
42
+ 'aria-label': string;
43
+ 'aria-labelledby'?: string;
44
+ } | {
45
+ 'aria-label'?: never;
46
+ 'aria-labelledby': string;
47
+ };
48
+ /** Props for a semantic bottom navigation dock built on MUI BottomNavigation. */
49
+ export type SMobileDockProps<Value extends string = string> = Omit<BottomNavigationProps, 'aria-label' | 'aria-labelledby' | 'children' | 'component' | 'defaultValue' | 'onChange' | 'showLabels' | 'value'> & SMobileDockAccessibleName & {
50
+ /** Initial selected value for uncontrolled usage. */
51
+ defaultValue?: Value;
52
+ /** Dock destinations. */
53
+ items: readonly SMobileDockItem<Value>[];
54
+ /** Controls whether destination labels are visually displayed. @default 'always' */
55
+ labelVisibility?: SMobileDockLabelVisibility;
56
+ /** Default non-native element used for destinations with an `href`, e.g. a router link. */
57
+ linkComponent?: React.ElementType;
58
+ /** Called with the value of the newly activated destination. */
59
+ onChange?: (event: React.SyntheticEvent, value: Value) => void;
60
+ /** Components used for internal structural slots. */
61
+ slots?: SMobileDockSlots;
62
+ /** Props or owner-state callbacks for internal structural slots. */
63
+ slotProps?: SMobileDockSlotProps<Value>;
64
+ /** Selected value for controlled usage. */
65
+ value?: Value;
66
+ };
67
+ export type SMobileDockOwnerState<Value extends string = string> = Omit<SMobileDockProps<Value>, 'labelVisibility' | 'slotProps' | 'slots' | 'value'> & {
68
+ labelVisibility: SMobileDockLabelVisibility;
69
+ value: Value | null;
70
+ };
71
+ export type SMobileDockItemState<Value extends string = string> = SMobileDockOwnerState<Value> & {
72
+ item: SMobileDockItem<Value>;
73
+ selected: boolean;
74
+ };
75
+ type RootSlotProps<Props, Value extends string> = MuiOwnerStateSlotProps<Props, SMobileDockOwnerState<Value>>;
76
+ type ItemSlotProps<Props, Value extends string> = MuiOwnerStateSlotProps<Props, SMobileDockItemState<Value>>;
77
+ export interface SMobileDockSlots {
78
+ action?: React.ElementType;
79
+ badge?: React.ElementType;
80
+ icon?: React.ElementType;
81
+ label?: React.ElementType;
82
+ root?: React.ElementType;
83
+ }
84
+ export interface SMobileDockSlotProps<Value extends string = string> {
85
+ action?: ItemSlotProps<Omit<BottomNavigationActionProps, 'icon' | 'label' | 'slots' | 'slotProps' | 'value'>, Value>;
86
+ badge?: ItemSlotProps<Omit<BadgeProps, 'children'>, Value>;
87
+ icon?: ItemSlotProps<Omit<BoxProps, 'children'>, Value>;
88
+ label?: ItemSlotProps<React.HTMLAttributes<HTMLSpanElement>, Value>;
89
+ root?: RootSlotProps<Omit<BottomNavigationProps, 'children' | 'component' | 'defaultValue' | 'onChange' | 'showLabels' | 'value'>, Value>;
90
+ }
91
+ interface SMobileDockComponent {
92
+ <Value extends string = string>(props: SMobileDockProps<Value> & React.RefAttributes<HTMLElement>): React.JSX.Element;
93
+ displayName?: string;
94
+ }
95
+ export declare const SMobileDock: SMobileDockComponent;
96
+ export default SMobileDock;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../s-mobile-dock-8F3UWAb8.js";
2
+ export { e as SMobileDock, e as default };