@solostylist/ui-kit 2.0.2 → 2.0.3

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 (310) hide show
  1. package/dist/{gradients-mQAYCK0_.js → gradients-DSnBONEQ.js} +1 -1
  2. package/dist/main.js +1 -1
  3. package/dist/palettes/index.js +1 -1
  4. package/dist/{palettes-B1FcGUYs.js → palettes-CJLuEy1m.js} +163 -163
  5. package/dist/s-accordion/index.js +1 -1
  6. package/dist/s-accordion/s-accordion.js +70 -2
  7. package/dist/s-action-overlay/s-action-overlay.js +21 -21
  8. package/dist/s-animated-gradient-text/s-animated-gradient-text.js +18 -19
  9. package/dist/s-announcement-bar/s-announcement-bar.js +50 -53
  10. package/dist/s-autocomplete/s-autocomplete.js +1 -1
  11. package/dist/s-avatar/s-avatar.js +17 -17
  12. package/dist/s-blur-text/s-blur-text.js +16 -16
  13. package/dist/s-brand-logo/index.js +1 -1
  14. package/dist/s-brand-logo/s-brand-logo.js +1 -1
  15. package/dist/s-breadcrumbs/s-breadcrumbs.js +19 -19
  16. package/dist/s-carousel/index.js +1 -1
  17. package/dist/s-carousel/s-carousel.js +186 -2
  18. package/dist/s-category-card/s-category-card.js +22 -22
  19. package/dist/s-chat-input/index.js +1 -1
  20. package/dist/s-chat-input/s-chat-input.js +398 -2
  21. package/dist/s-chat-message/index.js +1 -1
  22. package/dist/s-chat-message/s-chat-message.js +314 -2
  23. package/dist/s-checkbox/s-checkbox.js +18 -19
  24. package/dist/s-chips/index.js +1 -1
  25. package/dist/s-chips/s-chips.js +174 -2
  26. package/dist/s-code-block/index.js +1 -1
  27. package/dist/s-code-block/s-code-block.js +103 -2
  28. package/dist/s-comment-message/index.js +1 -1
  29. package/dist/s-comment-message/s-comment-message.js +189 -2
  30. package/dist/s-copyable-text/s-copyable-text.js +18 -18
  31. package/dist/s-countdown/s-count-box.js +18 -18
  32. package/dist/s-data-table/index.js +1 -1
  33. package/dist/s-data-table/s-data-table.js +213 -2
  34. package/dist/s-date-picker/index.js +1 -1
  35. package/dist/s-date-picker/s-date-picker.js +106 -2
  36. package/dist/s-datetime-picker/index.js +1 -1
  37. package/dist/s-datetime-picker/s-datetime-picker.js +108 -2
  38. package/dist/s-dialog/index.js +1 -1
  39. package/dist/s-dialog/s-dialog.js +80 -2
  40. package/dist/s-dialog-confirm/s-dialog-confirm.js +32 -33
  41. package/dist/s-dialog-message/s-dialog-message.js +31 -32
  42. package/dist/s-drawer/index.js +1 -1
  43. package/dist/s-drawer/s-drawer.js +139 -2
  44. package/dist/s-empty/s-empty.js +13 -14
  45. package/dist/s-file-dropzone/index.js +1 -1
  46. package/dist/s-file-dropzone/s-file-dropzone.js +219 -2
  47. package/dist/s-file-icon/s-file-icon.js +87 -88
  48. package/dist/s-flex-box/s-flex-box.js +11 -12
  49. package/dist/s-form/s-form.js +15 -15
  50. package/dist/s-gallery/s-gallery.js +1 -1
  51. package/dist/s-glow-button/s-glow-button.js +9 -10
  52. package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.js +23 -24
  53. package/dist/s-icon-button/s-icon-button.js +13 -14
  54. package/dist/s-image-comparison/s-image-comparison.js +29 -31
  55. package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +1 -1
  56. package/dist/s-image-viewer/index.js +3 -3
  57. package/dist/s-image-viewer/s-image-viewer.js +266 -2
  58. package/dist/s-image-viewer/use-image-viewer-navigation.js +7 -7
  59. package/dist/s-interactive-card/s-interactive-card.js +39 -41
  60. package/dist/s-label/s-label.js +25 -26
  61. package/dist/s-language-switcher/index.js +2 -2
  62. package/dist/s-language-switcher/s-language-switcher.js +145 -2
  63. package/dist/s-lazy-image/s-lazy-image.js +17 -18
  64. package/dist/s-link/index.js +1 -1
  65. package/dist/s-link/s-link.js +5 -2
  66. package/dist/s-list-action-item/s-list-action-item.js +38 -39
  67. package/dist/s-localization-provider/index.js +1 -1
  68. package/dist/s-localization-provider/s-localization-provider.js +12 -2
  69. package/dist/s-mega-menu/mega-menu-panel.js +132 -134
  70. package/dist/s-mega-menu/mega-menu-trigger.js +49 -2
  71. package/dist/s-mega-menu/s-mega-menu.js +80 -83
  72. package/dist/s-mobile-dock/index.js +1 -1
  73. package/dist/s-mobile-dock/s-mobile-dock.js +145 -2
  74. package/dist/s-nav-item/s-nav-item.js +19 -20
  75. package/dist/s-nav-items/s-nav-items.js +51 -52
  76. package/dist/s-no-ssr/index.js +1 -1
  77. package/dist/s-no-ssr/s-no-ssr.js +5 -2
  78. package/dist/s-number-range/index.js +1 -1
  79. package/dist/s-number-range/s-number-range.js +250 -2
  80. package/dist/s-pagination/index.js +1 -1
  81. package/dist/s-pagination/s-pagination.js +85 -2
  82. package/dist/s-pixel-reveal/s-pixel-reveal.js +20 -20
  83. package/dist/s-popover/s-popover-content.js +11 -12
  84. package/dist/s-popover/s-popover.js +22 -24
  85. package/dist/s-product-card/s-product-card.js +177 -180
  86. package/dist/s-product-gallery/index.js +1 -1
  87. package/dist/s-product-gallery/s-product-gallery.js +427 -2
  88. package/dist/s-quantity-input/s-quantity-input.js +24 -24
  89. package/dist/s-review/index.js +1 -1
  90. package/dist/s-review/s-review.js +272 -2
  91. package/dist/s-scroll-reveal/s-scroll-reveal.js +7 -8
  92. package/dist/s-scroll-to-top/s-scroll-to-top.js +27 -28
  93. package/dist/s-scroll-velocity/scroll-velocity-row.js +29 -29
  94. package/dist/s-segmented-control/s-segmented-control.js +64 -68
  95. package/dist/s-select/index.js +1 -1
  96. package/dist/s-select/s-select.js +201 -2
  97. package/dist/s-select-list/s-select-list.js +47 -50
  98. package/dist/s-skeleton/s-skeleton.js +12 -13
  99. package/dist/s-snackbar-message/index.js +2 -2
  100. package/dist/s-snackbar-message/s-snackbar-message.js +89 -2
  101. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +27 -27
  102. package/dist/s-status-illustration/s-status-illustration.js +74 -74
  103. package/dist/s-stepper/index.js +1 -1
  104. package/dist/s-stepper/s-stepper.js +102 -2
  105. package/dist/s-stripe/s-stripe.js +11 -12
  106. package/dist/s-stripe/stripe-input.js +3 -2
  107. package/dist/s-swatch/s-swatch.js +34 -35
  108. package/dist/s-switch/index.js +1 -1
  109. package/dist/s-switch/s-switch.js +48 -2
  110. package/dist/s-tabs/s-tabs.js +48 -50
  111. package/dist/s-text-editor/index.js +1 -1
  112. package/dist/s-text-editor/s-text-editor-toolbar.js +213 -2
  113. package/dist/s-text-editor/s-text-editor.js +25 -26
  114. package/dist/s-text-field/index.js +1 -1
  115. package/dist/s-text-field/s-text-field.js +52 -2
  116. package/dist/s-text-shimmer/s-text-shimmer.js +1 -3
  117. package/dist/s-text-truncation/s-text-truncation.js +20 -20
  118. package/dist/s-theme-demo/s-theme-demo.js +8 -8
  119. package/dist/s-theme-demo/theme-demo-color-palette-section.js +1 -1
  120. package/dist/s-theme-demo/theme-demo-color-ramps-section.js +1 -1
  121. package/dist/s-theme-demo/theme-demo-components-section.js +265 -2
  122. package/dist/s-theme-demo/theme-demo-typography-section.js +10 -10
  123. package/dist/s-theme-provider/s-theme-provider.js +1 -1
  124. package/dist/s-theme-switch/index.js +1 -1
  125. package/dist/s-theme-switch/s-theme-switch.js +60 -2
  126. package/dist/s-tip/index.js +1 -1
  127. package/dist/s-tip/s-tip.js +61 -2
  128. package/dist/s-tool-bar/s-tool-bar.js +28 -28
  129. package/dist/s-tool-bar/tool-bar-action-buttons.js +55 -2
  130. package/dist/s-tool-bar/tool-bar-image-input.js +148 -2
  131. package/dist/s-tool-bar/tool-bar-inputs.js +55 -55
  132. package/dist/s-tool-item/s-tool-item.js +22 -22
  133. package/dist/s-two-pane-layout/s-two-pane-layout.js +32 -32
  134. package/dist/s-zoom-image/s-zoom-image.js +18 -19
  135. package/dist/theme/components/autocomplete.js +43 -2
  136. package/dist/theme/components/avatar.js +9 -2
  137. package/dist/theme/components/card.js +3 -3
  138. package/dist/theme/components/checkbox.js +90 -2
  139. package/dist/theme/components/chip.js +3 -3
  140. package/dist/theme/components/components.js +20 -20
  141. package/dist/theme/components/date-calendar.js +1 -0
  142. package/dist/theme/components/day-calendar.js +1 -0
  143. package/dist/theme/components/drawer.js +1 -1
  144. package/dist/theme/components/field-label-styles.js +19 -2
  145. package/dist/theme/components/form-label.js +1 -1
  146. package/dist/theme/components/list-item-button.js +1 -1
  147. package/dist/theme/components/list-item.js +7 -7
  148. package/dist/theme/components/month-calendar.js +14 -13
  149. package/dist/theme/components/multi-section-digital-clock-section.js +1 -0
  150. package/dist/theme/components/outlined-input.js +6 -6
  151. package/dist/theme/components/picker-day.js +1 -0
  152. package/dist/theme/components/pickers-arrow-switcher.js +1 -0
  153. package/dist/theme/components/pickers-calendar-header.js +3 -2
  154. package/dist/theme/components/select.js +6 -6
  155. package/dist/theme/components/switch.js +1 -1
  156. package/dist/theme/components/table-pagination.js +1 -1
  157. package/dist/theme/components/toggle-button.js +93 -2
  158. package/dist/theme/components/year-calendar.js +14 -13
  159. package/dist/theme/theme-primitives.js +2 -2
  160. package/dist/{theme-primitives-CXtaMdVj.js → theme-primitives-CRfnMsNy.js} +108 -109
  161. package/dist/utils/dayjs.js +9 -146
  162. package/package.json +7 -2
  163. package/dist/Add-CEnTWsXs.js +0 -6
  164. package/dist/ArrowUpward-udL1ltj2.js +0 -6
  165. package/dist/Box-9oeZgA1U.js +0 -46
  166. package/dist/Button-DaLr1m20.js +0 -534
  167. package/dist/ButtonBase-DovDC6-1.js +0 -700
  168. package/dist/Checkbox-C-Xjbzzh.js +0 -152
  169. package/dist/ChevronRight-DsPfsFKB.js +0 -6
  170. package/dist/Close-CIYOM-Sc.js +0 -6
  171. package/dist/Collapse-DPUr1cbP.js +0 -266
  172. package/dist/ContentCopy-Hlh3azVb.js +0 -6
  173. package/dist/DefaultPropsProvider-ebWx4_5E.js +0 -128
  174. package/dist/DialogContent-b3xbJVC6.js +0 -450
  175. package/dist/Download-D9PkFi7a.js +0 -6
  176. package/dist/ExpandMore-sOgvEha9.js +0 -6
  177. package/dist/Favorite-BP343hjM.js +0 -6
  178. package/dist/FavoriteBorder-D15j9xEL.js +0 -6
  179. package/dist/FormControl-DwMfZCiz.js +0 -215
  180. package/dist/FormControlLabel-Ihga1FTB.js +0 -173
  181. package/dist/Grow-BQR7x52V.js +0 -121
  182. package/dist/IconButton-CE-4GamO.js +0 -448
  183. package/dist/InfoOutlined-lpvhO6P8.js +0 -6
  184. package/dist/List-RNcZhRdr.js +0 -105
  185. package/dist/Menu-CnyB4SDS.js +0 -180
  186. package/dist/MenuItem-Ck30dBOR.js +0 -224
  187. package/dist/MenuList-Cc98uWXq.js +0 -160
  188. package/dist/Modal-CD2EBfU8.js +0 -702
  189. package/dist/Paper-_3qggtBp.js +0 -115
  190. package/dist/Popover-BFdKSYI5.js +0 -340
  191. package/dist/Popper-DYNAMSDd.js +0 -1351
  192. package/dist/Portal-i_wgIe9-.js +0 -49
  193. package/dist/Remove-DDEn8ek8.js +0 -6
  194. package/dist/RtlProvider-B7uVJXUY.js +0 -19
  195. package/dist/Skeleton-iZFynl7z.js +0 -220
  196. package/dist/Stack-C0LGzM4c.js +0 -158
  197. package/dist/SwitchBase-CjWtDdmE.js +0 -198
  198. package/dist/Tooltip-B1sn94L0.js +0 -448
  199. package/dist/Typography-_P0svrkO.js +0 -168
  200. package/dist/UnfoldMoreRounded-CuCrdxoy.js +0 -6
  201. package/dist/appendOwnerState-CFQTq3pb.js +0 -17
  202. package/dist/assets/stripe-input.css +0 -1
  203. package/dist/autocomplete-BgARERpp.js +0 -43
  204. package/dist/avatar-XNOdbbRz.js +0 -10
  205. package/dist/buttonBaseClasses-B90LjsNK.js +0 -13
  206. package/dist/capitalize-C0baBJCm.js +0 -5
  207. package/dist/chainPropTypes-CkMRtDjQ.js +0 -8
  208. package/dist/checkbox-D1U_JKqs.js +0 -88
  209. package/dist/checkboxClasses-B1up2lUn.js +0 -18
  210. package/dist/chunk-C_CI6nMA.js +0 -13
  211. package/dist/clsx-DGZSe4Nt.js +0 -16
  212. package/dist/colorManipulator-DmUjcif3.js +0 -129
  213. package/dist/contains-DnqPQsQU.js +0 -16
  214. package/dist/createSimplePaletteValueFilter-DFvyXHoZ.js +0 -14
  215. package/dist/createSvgIcon-3y-gS0r1.js +0 -155
  216. package/dist/createTheme-xB2Em0Na.js +0 -1869
  217. package/dist/defaultTheme-BaGcIzCh.js +0 -210
  218. package/dist/elementAcceptingRef-pKEY6jPR.js +0 -25
  219. package/dist/elementTypeAcceptingRef-xl_04Y5-.js +0 -19
  220. package/dist/exactProp-C_IsucXf.js +0 -13
  221. package/dist/extends-DXMyyJCW.js +0 -12
  222. package/dist/field-label-styles-4praXMaE.js +0 -50
  223. package/dist/formLabelClasses-AuZHWfTs.js +0 -18
  224. package/dist/generateUtilityClass-PAIOm1jC.js +0 -34
  225. package/dist/generateUtilityClasses-DvX505Gy.js +0 -10
  226. package/dist/getActiveElement-BfBkhgy6.js +0 -8
  227. package/dist/iconButtonClasses-CVVRFXRo.js +0 -27
  228. package/dist/inputAdornmentClasses-BbB8s-Z4.js +0 -19
  229. package/dist/inputBaseClasses-Ce_jjdp9.js +0 -25
  230. package/dist/integerPropType-CCkQD1JY.js +0 -27
  231. package/dist/isEventHandler-QShLXBxE.js +0 -7
  232. package/dist/isFocusVisible-4OIE8TST.js +0 -11
  233. package/dist/isLayoutSupported-Btg2X3QE.js +0 -6
  234. package/dist/isMuiElement-CPjhi284.js +0 -10
  235. package/dist/mega-menu-trigger-BcOo8I5_.js +0 -53
  236. package/dist/memoTheme-qFyKAk7y.js +0 -15
  237. package/dist/mergeSlotProps-DC8r4QzS.js +0 -45
  238. package/dist/monthCalendarClasses-b964KRbc.js +0 -14
  239. package/dist/objectWithoutPropertiesLoose-q4Zwd1RV.js +0 -12
  240. package/dist/outlinedInputClasses-ci1zDasn.js +0 -17
  241. package/dist/ownerDocument-CJjQZweZ.js +0 -6
  242. package/dist/ownerDocument-pYjJiXem.js +0 -5
  243. package/dist/ownerWindow-SSeeoqPT.js +0 -18
  244. package/dist/pickersCalendarHeaderClasses-BAiPN_oY.js +0 -12
  245. package/dist/prop-types-BzYPyWN7.js +0 -516
  246. package/dist/refType-j5S9pc_e.js +0 -6
  247. package/dist/resolveProps-7jIA45vn.js +0 -30
  248. package/dist/s-accordion-1oLxQhod.js +0 -487
  249. package/dist/s-carousel-CAyAl3ka.js +0 -1355
  250. package/dist/s-chat-input-T3gyan60.js +0 -419
  251. package/dist/s-chat-message-NFTpNgt5.js +0 -315
  252. package/dist/s-chips-Dqq1fgz-.js +0 -176
  253. package/dist/s-code-block-DyDtctGG.js +0 -658
  254. package/dist/s-comment-message-DpCVBKiE.js +0 -192
  255. package/dist/s-data-table-D4V58HFR.js +0 -805
  256. package/dist/s-date-picker-BFIQOA8C.js +0 -657
  257. package/dist/s-datetime-picker-zfg7BEOW.js +0 -3886
  258. package/dist/s-dialog-BNlXsVVP.js +0 -123
  259. package/dist/s-drawer-4h5ZyoM8.js +0 -562
  260. package/dist/s-file-dropzone-Cfzv1Cm8.js +0 -422
  261. package/dist/s-image-viewer-CjK67-rs.js +0 -269
  262. package/dist/s-language-switcher-PaMgHWc2.js +0 -246
  263. package/dist/s-link-Db1aabHh.js +0 -235
  264. package/dist/s-localization-provider-CeyB_SGz.js +0 -519
  265. package/dist/s-mobile-dock-8F3UWAb8.js +0 -615
  266. package/dist/s-no-ssr-DH57_uP_.js +0 -25
  267. package/dist/s-number-range-Low5QjuD.js +0 -253
  268. package/dist/s-pagination-s46hBifh.js +0 -606
  269. package/dist/s-product-gallery-Dj9eGg5i.js +0 -430
  270. package/dist/s-review--Q2C0ngO.js +0 -272
  271. package/dist/s-select-CtVKEOZ5.js +0 -204
  272. package/dist/s-snackbar-message-DsfJlDYd.js +0 -810
  273. package/dist/s-stepper-BtODHVro.js +0 -892
  274. package/dist/s-switch-BCeBoxWf.js +0 -307
  275. package/dist/s-text-editor-toolbar-D5eQ-jCs.js +0 -2124
  276. package/dist/s-text-field-HYyDf1Jo.js +0 -51
  277. package/dist/s-theme-switch-BFWpADh3.js +0 -60
  278. package/dist/s-tip-jbL7vtoU.js +0 -62
  279. package/dist/selectClasses-CPxME5jE.js +0 -22
  280. package/dist/setRef-BWPyWnrr.js +0 -6
  281. package/dist/styled-Bog8QCl3.js +0 -163
  282. package/dist/svgIconClasses-1kWGzgux.js +0 -20
  283. package/dist/switchClasses-BtweO7PC.js +0 -23
  284. package/dist/theme-demo-components-section-C7l_2KAo.js +0 -267
  285. package/dist/toggle-button-BsGb-tOr.js +0 -104
  286. package/dist/tool-bar-action-buttons-v1koaasr.js +0 -54
  287. package/dist/tool-bar-image-input-DtXTyEe1.js +0 -148
  288. package/dist/typographyClasses-BH_-zLwg.js +0 -31
  289. package/dist/unsupportedProp-whMV_uOi.js +0 -11
  290. package/dist/useControlled-DqNPBJNp.js +0 -5
  291. package/dist/useControlled-uxVKygk1.js +0 -29
  292. package/dist/useEnhancedEffect-DFq_FMGX.js +0 -5
  293. package/dist/useEnhancedEffect-dBFfkm1e.js +0 -5
  294. package/dist/useEventCallback-DGCsaRIu.js +0 -5
  295. package/dist/useEventCallback-DhCPBxRG.js +0 -11
  296. package/dist/useForkRef-BuNFTXxE.js +0 -29
  297. package/dist/useFormControl-gXwNeUM1.js +0 -18
  298. package/dist/useMobilePicker-CdrT935R.js +0 -7584
  299. package/dist/useRovingTabIndex-DPlW997R.js +0 -242
  300. package/dist/useSlot-BG8ReOxN.js +0 -83
  301. package/dist/useSlotProps-BOO3qaI9.js +0 -16
  302. package/dist/useTheme-BIWMbX3i.js +0 -9
  303. package/dist/useThemeProps-Dw9dmKyT.js +0 -29
  304. package/dist/useTimeout-CoK-Khfm.js +0 -49
  305. package/dist/utils-Bfqbev5I.js +0 -248
  306. package/dist/warning-D5YhCbje.js +0 -99
  307. package/dist/yearCalendarClasses-D9k_KT38.js +0 -14
  308. /package/dist/{colors-Bik9qOU9.js → colors-CNjL5fhq.js} +0 -0
  309. /package/dist/{s-brand-logo-D7Jovf5K.js → s-brand-logo-CErW9Slg.js} +0 -0
  310. /package/dist/{utils-DOY6v6ln.js → utils-CMeAWSRO.js} +0 -0
@@ -1,20 +1,19 @@
1
1
  import { resolveOwnerStateSlotProps as e } from "../utils/slots.js";
2
- import { t } from "../useForkRef-BuNFTXxE.js";
3
- import { t as n } from "../appendOwnerState-CFQTq3pb.js";
4
- import { getFocusVisibleStyle as r } from "../theme/components/action-styles.js";
5
- import { t as i } from "../mergeSlotProps-DC8r4QzS.js";
6
- import * as a from "react";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { Box as c, ButtonBase as l, styled as u, useThemeProps as d } from "@mui/material";
2
+ import { getFocusVisibleStyle as t } from "../theme/components/action-styles.js";
3
+ import * as n from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { Box as a, ButtonBase as o, styled as s, useThemeProps as c } from "@mui/material";
6
+ import { mergeSlotProps as l, useForkRef as u } from "@mui/material/utils";
7
+ import d from "@mui/utils/appendOwnerState";
9
8
  //#region lib/s-swatch/s-swatch.tsx
10
9
  var f = {
11
10
  small: 22,
12
11
  medium: 32,
13
12
  large: 44
14
- }, p = 24, m = 44, h = "@media (pointer: coarse)", g = 45, _ = (e) => Math.max(1, typeof e == "number" ? e : f[e]), v = ({ ownerState: e, theme: t }) => ({
13
+ }, p = 24, m = 44, h = "@media (pointer: coarse)", g = 45, _ = (e) => Math.max(1, typeof e == "number" ? e : f[e]), v = ({ ownerState: e, theme: n }) => ({
15
14
  alignItems: "center",
16
15
  backgroundColor: "transparent",
17
- borderRadius: t.radius.sm,
16
+ borderRadius: n.radius.sm,
18
17
  boxSizing: "border-box",
19
18
  cursor: e.interactive ? "pointer" : "default",
20
19
  display: "inline-flex",
@@ -23,7 +22,7 @@ var f = {
23
22
  justifyContent: "center",
24
23
  padding: 0,
25
24
  position: "relative",
26
- transition: t.transitions.create("opacity", { duration: t.transitions.duration.shorter }),
25
+ transition: n.transitions.create("opacity", { duration: n.transitions.duration.shorter }),
27
26
  width: e.controlSize,
28
27
  ...e.interactive ? {
29
28
  "& .MuiTouchRipple-root": {
@@ -35,7 +34,7 @@ var f = {
35
34
  zIndex: 1
36
35
  },
37
36
  "&.Mui-focusVisible::after": {
38
- ...r(t),
37
+ ...t(n),
39
38
  borderRadius: "inherit",
40
39
  content: "\"\"",
41
40
  height: e.swatchSize,
@@ -56,21 +55,21 @@ var f = {
56
55
  } : void 0,
57
56
  variants: [{
58
57
  props: ({ ownerState: e }) => e.shape === "circle",
59
- style: { borderRadius: t.radius.full }
58
+ style: { borderRadius: n.radius.full }
60
59
  }, {
61
60
  props: ({ ownerState: e }) => e.disabled,
62
- style: { opacity: (t.vars ?? t).palette.action.disabledOpacity }
61
+ style: { opacity: (n.vars ?? n).palette.action.disabledOpacity }
63
62
  }],
64
63
  "@media (prefers-reduced-motion: reduce)": { transition: "none" }
65
- }), y = u(l, {
64
+ }), y = s(o, {
66
65
  name: "SSwatch",
67
66
  slot: "Root",
68
67
  shouldForwardProp: (e) => e !== "ownerState"
69
- })(v), b = u(c, {
68
+ })(v), b = s(a, {
70
69
  name: "SSwatch",
71
70
  slot: "Root",
72
71
  shouldForwardProp: (e) => e !== "ownerState"
73
- })(v), x = u(c, {
72
+ })(v), x = s(a, {
74
73
  name: "SSwatch",
75
74
  slot: "Swatch",
76
75
  shouldForwardProp: (e) => e !== "ownerState"
@@ -113,7 +112,7 @@ var f = {
113
112
  }
114
113
  ],
115
114
  "@media (prefers-reduced-motion: reduce)": { transition: "none" }
116
- })), S = u(c, {
115
+ })), S = s(a, {
117
116
  name: "SSwatch",
118
117
  slot: "Image",
119
118
  shouldForwardProp: (e) => e !== "ownerState"
@@ -126,7 +125,7 @@ var f = {
126
125
  objectPosition: "center",
127
126
  position: "absolute",
128
127
  width: "100%"
129
- }), C = u(c, {
128
+ }), C = s(a, {
130
129
  name: "SSwatch",
131
130
  slot: "Indicator",
132
131
  shouldForwardProp: (e) => e !== "ownerState"
@@ -142,7 +141,7 @@ var f = {
142
141
  transform: "translate(-50%, -50%)",
143
142
  width: Math.max(6, Math.round(e.swatchSize * .3)),
144
143
  zIndex: 3
145
- })), w = u(c, {
144
+ })), w = s(a, {
146
145
  name: "SSwatch",
147
146
  slot: "Strikethrough",
148
147
  shouldForwardProp: (e) => e !== "ownerState"
@@ -158,12 +157,12 @@ var f = {
158
157
  transformOrigin: "center",
159
158
  width: "141.421%",
160
159
  zIndex: 2
161
- })), T = a.forwardRef(function(r, a) {
162
- let c = d({
163
- props: r,
160
+ })), T = n.forwardRef(function(t, n) {
161
+ let a = c({
162
+ props: t,
164
163
  name: "SSwatch"
165
- }), { "aria-label": l, "aria-labelledby": u, color: f, colorSecondary: h, disabled: v = !1, image: T, interactive: E = !0, label: D, selected: O = !1, shape: k = "square", size: A = "medium", slotProps: j, slots: M, unavailable: N = !1, unavailableText: P = "Unavailable", value: F, ...I } = c, L = _(A), R = E ? Math.max(L, p) : L, z = {
166
- ...c,
164
+ }), { "aria-label": o, "aria-labelledby": s, color: f, colorSecondary: h, disabled: v = !1, image: T, interactive: E = !0, label: D, selected: O = !1, shape: k = "square", size: A = "medium", slotProps: j, slots: M, unavailable: N = !1, unavailableText: P = "Unavailable", value: F, ...I } = a, L = _(A), R = E ? Math.max(L, p) : L, z = {
165
+ ...a,
167
166
  coarseControlSize: E ? Math.max(L, m) : L,
168
167
  controlSize: R,
169
168
  disabled: v,
@@ -173,23 +172,23 @@ var f = {
173
172
  size: A,
174
173
  swatchSize: L,
175
174
  unavailable: N
176
- }, B = M?.root ?? (E ? y : b), V = M?.swatch ?? x, H = M?.image ?? S, U = M?.indicator ?? C, W = M?.strikethrough ?? w, G = [l ?? D ?? F, N ? P : void 0].filter(Boolean).join(", "), { ref: K, ...q } = n(B, i(e(j?.root, z), E ? {
175
+ }, B = M?.root ?? (E ? y : b), V = M?.swatch ?? x, H = M?.image ?? S, U = M?.indicator ?? C, W = M?.strikethrough ?? w, G = [o ?? D ?? F, N ? P : void 0].filter(Boolean).join(", "), { ref: K, ...q } = d(B, l(e(j?.root, z), E ? {
177
176
  ...I,
178
- "aria-label": u ? void 0 : G || void 0,
179
- "aria-labelledby": u,
177
+ "aria-label": s ? void 0 : G || void 0,
178
+ "aria-labelledby": s,
180
179
  "aria-pressed": O,
181
180
  disabled: v
182
181
  } : {
183
182
  component: "span",
184
183
  role: "img",
185
184
  ...I,
186
- "aria-label": u ? void 0 : G || void 0,
187
- "aria-labelledby": u
188
- }), z), J = t(K, a), { style: Y, ...X } = e(j?.swatch, z) ?? {}, Z = n(V, X, z), Q = n(H, e(j?.image, z) ?? {}, z), $ = n(U, e(j?.indicator, z) ?? {}, z), ee = n(W, e(j?.strikethrough, z) ?? {}, z);
189
- return /* @__PURE__ */ s(B, {
185
+ "aria-label": s ? void 0 : G || void 0,
186
+ "aria-labelledby": s
187
+ }), z), J = u(K, n), { style: Y, ...X } = e(j?.swatch, z) ?? {}, Z = d(V, X, z), Q = d(H, e(j?.image, z) ?? {}, z), $ = d(U, e(j?.indicator, z) ?? {}, z), ee = d(W, e(j?.strikethrough, z) ?? {}, z);
188
+ return /* @__PURE__ */ i(B, {
190
189
  ...q,
191
190
  ref: J,
192
- children: [/* @__PURE__ */ s(V, {
191
+ children: [/* @__PURE__ */ i(V, {
193
192
  component: "span",
194
193
  ...Z,
195
194
  style: {
@@ -197,17 +196,17 @@ var f = {
197
196
  backgroundImage: h ? `linear-gradient(${180 - g}deg, ${f} 0 50%, ${h} 50% 100%)` : void 0,
198
197
  ...Y
199
198
  },
200
- children: [T ? /* @__PURE__ */ o(H, {
199
+ children: [T ? /* @__PURE__ */ r(H, {
201
200
  alt: "",
202
201
  component: "img",
203
202
  ...Q,
204
203
  src: T
205
- }) : null, N ? /* @__PURE__ */ o(W, {
204
+ }) : null, N ? /* @__PURE__ */ r(W, {
206
205
  "aria-hidden": !0,
207
206
  component: "span",
208
207
  ...ee
209
208
  }) : null]
210
- }), O ? /* @__PURE__ */ o(U, {
209
+ }), O ? /* @__PURE__ */ r(U, {
211
210
  "aria-hidden": !0,
212
211
  component: "span",
213
212
  ...$
@@ -1,2 +1,2 @@
1
- import { t as e } from "../s-switch-BCeBoxWf.js";
1
+ import { SSwitch as e } from "./s-switch.js";
2
2
  export { e as SSwitch, e as default };
@@ -1,2 +1,48 @@
1
- import { t as e } from "../s-switch-BCeBoxWf.js";
2
- export { e as SSwitch, e as default };
1
+ import { styled as e, useThemeProps as t } from "@mui/material/styles";
2
+ import n from "@mui/material/Switch";
3
+ import * as r from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ import a from "@mui/utils/appendOwnerState";
6
+ import o, { formControlLabelClasses as s } from "@mui/material/FormControlLabel";
7
+ //#region lib/s-switch/s-switch.tsx
8
+ var c = e(o, {
9
+ name: "SSwitch",
10
+ slot: "Root",
11
+ shouldForwardProp: (e) => e !== "ownerState"
12
+ })(({ theme: e }) => ({
13
+ display: "flex",
14
+ justifyContent: "space-between",
15
+ margin: 0,
16
+ userSelect: "none",
17
+ [`&&.${s.disabled}`]: { cursor: "not-allowed" },
18
+ [`&& .${s.label}.${s.disabled}`]: { color: (e.vars ?? e).palette.text.disabled }
19
+ }));
20
+ function l(e, t) {
21
+ return typeof e == "function" ? e(t) : e;
22
+ }
23
+ var u = r.forwardRef(function(e, r) {
24
+ let o = t({
25
+ props: e,
26
+ name: "SSwitch"
27
+ }), { disabled: s = !1, label: u, labelPlacement: d = "start", required: f = !1, slotProps: p, slots: m, ...h } = o, g = {
28
+ ...o,
29
+ disabled: s,
30
+ labelPlacement: d,
31
+ required: f
32
+ }, _ = m?.control ?? n, v = l(p?.control, g), y = a(m?.control, v ?? {}, g);
33
+ return /* @__PURE__ */ i(c, {
34
+ ...h,
35
+ control: /* @__PURE__ */ i(_, { ...y }),
36
+ disabled: s,
37
+ label: u,
38
+ labelPlacement: d,
39
+ ownerState: g,
40
+ ref: r,
41
+ required: f,
42
+ slots: m?.typography ? { typography: m.typography } : void 0,
43
+ slotProps: p?.typography ? { typography: p.typography } : void 0
44
+ });
45
+ });
46
+ u.displayName = "SSwitch";
47
+ //#endregion
48
+ export { u as SSwitch, u as default };
@@ -1,15 +1,13 @@
1
1
  import { toSxArray as e } from "../utils/sx.js";
2
- import { t } from "../useForkRef-BuNFTXxE.js";
3
- import { t as n } from "../appendOwnerState-CFQTq3pb.js";
4
- import { t as r } from "../useControlled-DqNPBJNp.js";
5
- import { t as i } from "../mergeSlotProps-DC8r4QzS.js";
6
- import { getTabId as a, getTabPanelId as o } from "./tab-ids.js";
7
- import * as s from "react";
8
- import { createElement as c } from "react";
9
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
- import { Box as d, Tab as f, Tabs as p, styled as m, useThemeProps as h } from "@mui/material";
2
+ import { getTabId as t, getTabPanelId as n } from "./tab-ids.js";
3
+ import * as r from "react";
4
+ import { createElement as i } from "react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { Box as s, Tab as c, Tabs as l, styled as u, useThemeProps as d } from "@mui/material";
7
+ import { mergeSlotProps as f, useControlled as p, useForkRef as m } from "@mui/material/utils";
8
+ import h from "@mui/utils/appendOwnerState";
11
9
  //#region lib/s-tabs/s-tabs.tsx
12
- var g = m(d, {
10
+ var g = u(s, {
13
11
  name: "STabs",
14
12
  slot: "Root",
15
13
  shouldForwardProp: (e) => e !== "ownerState"
@@ -20,61 +18,61 @@ function _(e, t) {
20
18
  function v(e, t) {
21
19
  return e.value ?? t;
22
20
  }
23
- var y = s.forwardRef(function(m, y) {
24
- let b = h({
25
- props: m,
21
+ var y = r.forwardRef(function(u, y) {
22
+ let b = d({
23
+ props: u,
26
24
  name: "STabs"
27
- }), { children: x, defaultValue: S, id: C, onChange: w, orientation: T = "horizontal", slotProps: E, slots: D, sx: O, tabs: k, value: A, ...j } = b, M = s.useId(), N = C ?? M, P = k[0]?.value ?? 0, [F, I] = r({
28
- controlled: A,
29
- default: S ?? P,
25
+ }), { children: x, defaultValue: ee, id: S, onChange: C, orientation: w = "horizontal", slotProps: T, slots: E, sx: D, tabs: O, value: k, ...A } = b, j = r.useId(), M = S ?? j, N = O[0]?.value ?? 0, [P, F] = p({
26
+ controlled: k,
27
+ default: ee ?? N,
30
28
  name: "STabs",
31
29
  state: "value"
32
- }), L = k.findIndex((e, t) => (e.value ?? t) === F), R = L >= 0 ? k[L]?.value ?? L : !1, z = {
30
+ }), I = O.findIndex((e, t) => (e.value ?? t) === P), L = I >= 0 ? O[I]?.value ?? I : !1, R = {
33
31
  ...b,
34
- activeIndex: L,
35
- orientation: T,
36
- value: F
37
- }, B = D?.root ?? g, V = D?.list ?? p, H = D?.tab ?? f, U = D?.panel ?? d, W = _(E?.root, z), G = _(E?.list, z), K = _(E?.panel, z), { sx: q, ...J } = W ?? {}, { sx: Y, ...X } = K ?? {}, { ref: Z, ...Q } = n(B, J, z), $ = t(Z, y), ee = n(D?.list, G ?? {}, z), te = n(D?.panel, X, z), ne = (e, t) => {
38
- I(t), w?.(e, t);
32
+ activeIndex: I,
33
+ orientation: w,
34
+ value: P
35
+ }, z = E?.root ?? g, B = E?.list ?? l, V = E?.tab ?? c, H = E?.panel ?? s, U = _(T?.root, R), W = _(T?.list, R), G = _(T?.panel, R), { sx: K, ...q } = U ?? {}, { sx: J, ...Y } = G ?? {}, { ref: X, ...Z } = h(z, q, R), Q = m(X, y), $ = h(E?.list, W ?? {}, R), te = h(E?.panel, Y, R), ne = (e, t) => {
36
+ F(t), C?.(e, t);
39
37
  };
40
- return /* @__PURE__ */ u(B, {
41
- ...j,
42
- ...Q,
43
- ref: $,
44
- id: N,
38
+ return /* @__PURE__ */ o(z, {
39
+ ...A,
40
+ ...Z,
41
+ ref: Q,
42
+ id: M,
45
43
  sx: [
46
- { display: T === "vertical" ? "flex" : "block" },
47
- ...e(O),
48
- ...e(q)
44
+ { display: w === "vertical" ? "flex" : "block" },
45
+ ...e(D),
46
+ ...e(K)
49
47
  ],
50
- children: [/* @__PURE__ */ l(V, {
48
+ children: [/* @__PURE__ */ a(B, {
51
49
  "aria-label": "Tabs",
52
- ...ee,
53
- value: F,
54
- orientation: T,
50
+ ...$,
51
+ value: P,
52
+ orientation: w,
55
53
  onChange: ne,
56
- children: k.map((e, t) => {
57
- let r = e.value ?? t, s = {
58
- ...z,
59
- index: t,
54
+ children: O.map((e, r) => {
55
+ let a = e.value ?? r, o = {
56
+ ...R,
57
+ index: r,
60
58
  item: e
61
- }, l = i(_(E?.tab, s), e);
62
- return /* @__PURE__ */ c(H, {
63
- ...n(D?.tab, l, s),
64
- key: v(e, t),
65
- id: a(N, r),
66
- "aria-controls": o(N, r),
59
+ }, s = f(_(T?.tab, o), e);
60
+ return /* @__PURE__ */ i(V, {
61
+ ...h(E?.tab, s, o),
62
+ key: v(e, r),
63
+ id: t(M, a),
64
+ "aria-controls": n(M, a),
67
65
  label: e.label,
68
- value: r
66
+ value: a
69
67
  });
70
68
  })
71
- }), x && R !== !1 ? /* @__PURE__ */ l(U, {
69
+ }), x && L !== !1 ? /* @__PURE__ */ a(H, {
72
70
  ...te,
73
71
  role: "tabpanel",
74
- id: o(N, R),
75
- "aria-labelledby": a(N, R),
76
- sx: [{ p: 2 }, ...e(Y)],
77
- children: s.Children.toArray(x)[L]
72
+ id: n(M, L),
73
+ "aria-labelledby": t(M, L),
74
+ sx: [{ p: 2 }, ...e(J)],
75
+ children: r.Children.toArray(x)[I]
78
76
  }) : null]
79
77
  });
80
78
  });
@@ -1,3 +1,3 @@
1
- import { t as e } from "../s-text-editor-toolbar-D5eQ-jCs.js";
1
+ import { STextEditorToolbar as e } from "./s-text-editor-toolbar.js";
2
2
  import { STextEditor as t } from "./s-text-editor.js";
3
3
  export { t as STextEditor, t as default, e as STextEditorToolbar };
@@ -1,2 +1,213 @@
1
- import { t as e } from "../s-text-editor-toolbar-D5eQ-jCs.js";
2
- export { e as STextEditorToolbar };
1
+ import { toSxArray as e } from "../utils/sx.js";
2
+ import { STextField as t } from "../s-text-field/s-text-field.js";
3
+ import { SPopover as n } from "../s-popover/s-popover.js";
4
+ import { SPopoverContent as r } from "../s-popover/s-popover-content.js";
5
+ import i from "@mui/material/IconButton";
6
+ import * as a from "react";
7
+ import o from "@mui/material/Select";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ import { MenuItem as l, styled as u, useThemeProps as d } from "@mui/material";
10
+ import f from "@mui/material/Stack";
11
+ import p from "@mui/icons-material/Code";
12
+ import m from "@mui/icons-material/FormatBold";
13
+ import h from "@mui/icons-material/FormatItalic";
14
+ import g from "@mui/icons-material/FormatListBulleted";
15
+ import _ from "@mui/icons-material/FormatListNumbered";
16
+ import v from "@mui/icons-material/Link";
17
+ import y from "@mui/icons-material/StrikethroughS";
18
+ import b from "@mui/material/FormControl";
19
+ //#region lib/s-text-editor/s-text-editor-toolbar.tsx
20
+ var x = u(f, {
21
+ name: "STextEditorToolbar",
22
+ slot: "Root"
23
+ })({}), S = a.forwardRef(function(i, u) {
24
+ let S = d({
25
+ props: i,
26
+ name: "STextEditorToolbar"
27
+ }), { className: T, disabled: E = !1, editor: D, spacing: O = 1, sx: k, ...A } = S, j = {
28
+ ...S,
29
+ disabled: E,
30
+ editorReady: D != null
31
+ }, [M, N] = a.useState(!1), [P, F] = a.useState(null), [I, L] = a.useState("");
32
+ return a.useEffect(() => {
33
+ E && (N(!1), F(null), L(""));
34
+ }, [E]), /* @__PURE__ */ c(a.Fragment, { children: [/* @__PURE__ */ s(x, {
35
+ ...A,
36
+ className: ["tiptap-toolbar", T].filter(Boolean).join(" "),
37
+ ownerState: j,
38
+ ref: u,
39
+ spacing: O,
40
+ "aria-disabled": E || void 0,
41
+ sx: [{
42
+ borderBottom: "1px solid",
43
+ borderColor: "divider",
44
+ p: "8px",
45
+ minHeight: "57px"
46
+ }, ...e(k)],
47
+ children: D ? /* @__PURE__ */ c(f, {
48
+ direction: "row",
49
+ spacing: .5,
50
+ sx: {
51
+ alignItems: "center",
52
+ flexWrap: "wrap"
53
+ },
54
+ children: [
55
+ /* @__PURE__ */ c(o, {
56
+ disabled: E,
57
+ inputProps: { "aria-label": "Text format" },
58
+ onChange: (e) => {
59
+ let t = e.target.value;
60
+ if (t) {
61
+ if (t === "p") {
62
+ D.chain().focus().setParagraph().run();
63
+ return;
64
+ }
65
+ if (t.startsWith("h")) {
66
+ let e = parseInt(t.replace("h", ""));
67
+ !isNaN(e) && e >= 1 && e <= 6 && D.chain().focus().setHeading({ level: e }).run();
68
+ }
69
+ }
70
+ },
71
+ value: C(D),
72
+ children: [/* @__PURE__ */ s(l, {
73
+ disabled: E || !D.can().chain().focus().setParagraph().run(),
74
+ value: "p",
75
+ children: "Paragraph"
76
+ }), [
77
+ 1,
78
+ 2,
79
+ 3,
80
+ 4,
81
+ 5,
82
+ 6
83
+ ].map((e) => /* @__PURE__ */ c(l, {
84
+ disabled: E || !D.can().chain().focus().setHeading({ level: e }).run(),
85
+ value: `h${e}`,
86
+ children: ["Heading ", e]
87
+ }, e))]
88
+ }),
89
+ /* @__PURE__ */ s(w, {
90
+ active: D.isActive("bold"),
91
+ disabled: E || !D.can().chain().focus().toggleBold().run(),
92
+ label: "Bold",
93
+ onClick: () => {
94
+ D.chain().focus().toggleBold().run();
95
+ },
96
+ children: /* @__PURE__ */ s(m, {})
97
+ }),
98
+ /* @__PURE__ */ s(w, {
99
+ active: D.isActive("italic"),
100
+ disabled: E || !D.can().chain().focus().toggleItalic().run(),
101
+ label: "Italic",
102
+ onClick: () => {
103
+ D.chain().focus().toggleItalic().run();
104
+ },
105
+ children: /* @__PURE__ */ s(h, {})
106
+ }),
107
+ /* @__PURE__ */ s(w, {
108
+ active: D.isActive("strike"),
109
+ disabled: E || !D.can().chain().focus().toggleStrike().run(),
110
+ label: "Strikethrough",
111
+ onClick: () => {
112
+ D.chain().focus().toggleStrike().run();
113
+ },
114
+ children: /* @__PURE__ */ s(y, {})
115
+ }),
116
+ /* @__PURE__ */ s(w, {
117
+ active: D.isActive("codeBlock"),
118
+ disabled: E || !D.can().chain().focus().toggleCodeBlock().run(),
119
+ label: "Code block",
120
+ onClick: () => {
121
+ D.chain().focus().toggleCodeBlock().run();
122
+ },
123
+ children: /* @__PURE__ */ s(p, {})
124
+ }),
125
+ /* @__PURE__ */ s(w, {
126
+ active: D.isActive("bulletList"),
127
+ disabled: E || !D.can().chain().focus().toggleBulletList().run(),
128
+ label: "Bulleted list",
129
+ onClick: () => {
130
+ D.chain().focus().toggleBulletList().run();
131
+ },
132
+ children: /* @__PURE__ */ s(g, {})
133
+ }),
134
+ /* @__PURE__ */ s(w, {
135
+ active: D.isActive("orderedList"),
136
+ disabled: E || !D.can().chain().focus().toggleOrderedList().run(),
137
+ label: "Numbered list",
138
+ onClick: () => {
139
+ D.chain().focus().toggleOrderedList().run();
140
+ },
141
+ children: /* @__PURE__ */ s(_, {})
142
+ }),
143
+ /* @__PURE__ */ s(w, {
144
+ disabled: E,
145
+ label: "Set link",
146
+ onClick: (e) => {
147
+ L(D.getAttributes("link").href ?? ""), F(e.currentTarget), N(!0);
148
+ },
149
+ children: /* @__PURE__ */ s(v, {})
150
+ }),
151
+ /* @__PURE__ */ s(w, {
152
+ active: D.isActive("link"),
153
+ disabled: E || !D.can().chain().focus().unsetLink().run(),
154
+ label: "Remove link",
155
+ onClick: () => {
156
+ D.chain().focus().unsetLink().run();
157
+ },
158
+ children: /* @__PURE__ */ s(v, {})
159
+ })
160
+ ]
161
+ }) : null
162
+ }), /* @__PURE__ */ s(n, {
163
+ anchorEl: P,
164
+ placement: "bottom-start",
165
+ onClose: () => {
166
+ N(!1), F(null), L("");
167
+ },
168
+ open: !E && M,
169
+ children: /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s(b, { children: /* @__PURE__ */ s(t, {
170
+ name: "url",
171
+ label: "URL",
172
+ onChange: (e) => {
173
+ L(e.target.value);
174
+ },
175
+ onKeyUp: (e) => {
176
+ if (e.key === "Enter") {
177
+ if (I === "") {
178
+ D?.chain().focus().extendMarkRange("link").unsetLink().run();
179
+ return;
180
+ }
181
+ D?.chain().focus().setLink({ href: I }).run(), N(!1), F(null), L("");
182
+ }
183
+ },
184
+ value: I
185
+ }) }) })
186
+ })] });
187
+ });
188
+ S.displayName = "STextEditorToolbar";
189
+ function C(e) {
190
+ if (e.isActive("paragraph")) return "p";
191
+ for (let t of [
192
+ 1,
193
+ 2,
194
+ 3,
195
+ 4,
196
+ 5,
197
+ 6
198
+ ]) if (e.isActive("heading", { level: t })) return `h${t}`;
199
+ return "p";
200
+ }
201
+ var w = a.forwardRef(function({ active: e, children: t, disabled: n, label: r, onClick: a }, o) {
202
+ return /* @__PURE__ */ s(i, {
203
+ "aria-label": r,
204
+ "aria-pressed": e,
205
+ color: e ? "primary" : "inherit",
206
+ disabled: n,
207
+ onClick: a,
208
+ ref: o,
209
+ children: t
210
+ });
211
+ });
212
+ //#endregion
213
+ export { S as STextEditorToolbar };
@@ -1,32 +1,31 @@
1
- import { t as e } from "../Box-9oeZgA1U.js";
2
- import { t } from "../styled-Bog8QCl3.js";
3
- import { t as n } from "../useThemeProps-Dw9dmKyT.js";
4
- import { toSxArray as r } from "../utils/sx.js";
5
- import { tint as i } from "../theme/utils.js";
6
- import { t as a } from "../s-text-editor-toolbar-D5eQ-jCs.js";
7
- import * as o from "react";
8
- import { forwardRef as s } from "react";
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
1
+ import { toSxArray as e } from "../utils/sx.js";
2
+ import { tint as t } from "../theme/utils.js";
3
+ import { STextEditorToolbar as n } from "./s-text-editor-toolbar.js";
4
+ import { styled as r, useThemeProps as i } from "@mui/material/styles";
5
+ import * as a from "react";
6
+ import { forwardRef as o } from "react";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import l from "@mui/material/Box";
10
9
  import { Placeholder as u } from "@tiptap/extension-placeholder";
11
10
  import { EditorContent as d, useEditor as f } from "@tiptap/react";
12
11
  import { StarterKit as p } from "@tiptap/starter-kit";
13
12
  //#region lib/s-text-editor/s-text-editor.tsx
14
- var m = t(e, {
13
+ var m = r(l, {
15
14
  name: "STextEditor",
16
15
  slot: "Root",
17
16
  shouldForwardProp: (e) => e !== "ownerState"
18
- })({}), h = s((e, t) => {
19
- let s = n({
20
- props: e,
17
+ })({}), h = o((r, o) => {
18
+ let l = i({
19
+ props: r,
21
20
  name: "STextEditor"
22
- }), { content: h, editable: g = !0, hideToolbar: _ = !1, onUpdate: v = () => {}, placeholder: y, sx: b, ...x } = s, S = {
23
- ...s,
21
+ }), { content: h, editable: g = !0, hideToolbar: _ = !1, onUpdate: v = () => {}, placeholder: y, sx: b, ...x } = l, S = {
22
+ ...l,
24
23
  editable: g,
25
24
  hideToolbar: _
26
- }, C = o.useRef(y);
25
+ }, C = a.useRef(y);
27
26
  C.current = y;
28
27
  let w = f({
29
- extensions: o.useMemo(() => [p.configure({ link: {
28
+ extensions: a.useMemo(() => [p.configure({ link: {
30
29
  openOnClick: !1,
31
30
  autolink: !0
32
31
  } }), u.configure({
@@ -38,15 +37,15 @@ var m = t(e, {
38
37
  onUpdate: v,
39
38
  parseOptions: { preserveWhitespace: "full" }
40
39
  });
41
- return o.useEffect(() => {
40
+ return a.useEffect(() => {
42
41
  !w || w.isDestroyed || w.setEditable(g);
43
- }, [g, w]), o.useEffect(() => {
42
+ }, [g, w]), a.useEffect(() => {
44
43
  !w || w.isDestroyed || w.view.dispatch(w.state.tr);
45
- }, [w, y]), o.useEffect(() => {
44
+ }, [w, y]), a.useEffect(() => {
46
45
  !w || w.isDestroyed || w.getHTML() !== h && w.commands.setContent(h);
47
- }, [h, w]), /* @__PURE__ */ l(m, {
46
+ }, [h, w]), /* @__PURE__ */ c(m, {
48
47
  ...x,
49
- ref: t,
48
+ ref: o,
50
49
  ownerState: S,
51
50
  sx: [(e) => ({
52
51
  display: "flex",
@@ -58,7 +57,7 @@ var m = t(e, {
58
57
  ...g ? {
59
58
  "&:hover": { borderColor: (e.vars ?? e).palette.grey[500] },
60
59
  "&:focus-within": {
61
- outline: `3px solid ${i((e.vars ?? e).palette.primary[500], 50)}`,
60
+ outline: `3px solid ${t((e.vars ?? e).palette.primary[500], 50)}`,
62
61
  borderColor: (e.vars ?? e).palette.primary[400]
63
62
  }
64
63
  } : {},
@@ -88,11 +87,11 @@ var m = t(e, {
88
87
  pointerEvents: "none"
89
88
  }
90
89
  }
91
- }), ...r(b)],
92
- children: [_ ? null : /* @__PURE__ */ c(a, {
90
+ }), ...e(b)],
91
+ children: [_ ? null : /* @__PURE__ */ s(n, {
93
92
  disabled: !g,
94
93
  editor: w
95
- }), /* @__PURE__ */ c(d, {
94
+ }), /* @__PURE__ */ s(d, {
96
95
  className: "tiptap-container",
97
96
  editor: w
98
97
  })]