@solostylist/ui-kit 2.0.0 → 2.0.1

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 (268) hide show
  1. package/dist/{gradients-90SYkAC0.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-Dw3PEYF5.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-autocomplete/s-autocomplete.js +1 -1
  9. package/dist/s-avatar/s-avatar.js +17 -17
  10. package/dist/s-blur-text/s-blur-text.js +16 -16
  11. package/dist/s-brand-logo/index.js +1 -1
  12. package/dist/s-brand-logo/s-brand-logo.js +1 -1
  13. package/dist/s-breadcrumbs/s-breadcrumbs.js +19 -19
  14. package/dist/s-carousel/index.js +1 -1
  15. package/dist/s-carousel/s-carousel.js +184 -2
  16. package/dist/s-category-card/s-category-card.js +22 -22
  17. package/dist/s-chat-input/index.js +1 -1
  18. package/dist/s-chat-input/s-chat-input.js +398 -2
  19. package/dist/s-chat-message/index.js +1 -1
  20. package/dist/s-chat-message/s-chat-message.js +314 -2
  21. package/dist/s-checkbox/s-checkbox.js +18 -19
  22. package/dist/s-chips/index.js +1 -1
  23. package/dist/s-chips/s-chips.js +174 -2
  24. package/dist/s-code-block/index.js +1 -1
  25. package/dist/s-code-block/s-code-block.js +103 -2
  26. package/dist/s-comment-message/index.js +1 -1
  27. package/dist/s-comment-message/s-comment-message.js +189 -2
  28. package/dist/s-copyable-text/s-copyable-text.js +18 -18
  29. package/dist/s-countdown/s-count-box.js +18 -18
  30. package/dist/s-data-table/index.js +1 -1
  31. package/dist/s-data-table/s-data-table.js +213 -2
  32. package/dist/s-date-picker/index.js +1 -1
  33. package/dist/s-date-picker/s-date-picker.js +106 -2
  34. package/dist/s-datetime-picker/index.js +1 -1
  35. package/dist/s-datetime-picker/s-datetime-picker.js +108 -2
  36. package/dist/s-dialog/index.js +1 -1
  37. package/dist/s-dialog/s-dialog.js +80 -2
  38. package/dist/s-dialog-confirm/s-dialog-confirm.js +32 -33
  39. package/dist/s-dialog-message/s-dialog-message.js +31 -32
  40. package/dist/s-empty/s-empty.js +13 -14
  41. package/dist/s-file-dropzone/index.js +1 -1
  42. package/dist/s-file-dropzone/s-file-dropzone.js +219 -2
  43. package/dist/s-file-icon/s-file-icon.js +87 -88
  44. package/dist/s-flex-box/s-flex-box.js +11 -12
  45. package/dist/s-form/s-form.js +15 -15
  46. package/dist/s-gallery/s-gallery.js +1 -1
  47. package/dist/s-glow-button/s-glow-button.js +9 -10
  48. package/dist/s-icon-button/s-icon-button.js +15 -16
  49. package/dist/s-image-comparison/s-image-comparison.js +29 -31
  50. package/dist/s-image-viewer/image-viewer-thumbnail-dock.js +1 -1
  51. package/dist/s-image-viewer/index.js +3 -3
  52. package/dist/s-image-viewer/s-image-viewer.js +266 -2
  53. package/dist/s-image-viewer/use-image-viewer-navigation.js +7 -7
  54. package/dist/s-label/s-label.js +26 -27
  55. package/dist/s-language-switcher/index.js +2 -2
  56. package/dist/s-language-switcher/s-language-switcher.js +150 -2
  57. package/dist/s-lazy-image/s-lazy-image.js +17 -18
  58. package/dist/s-link/index.js +1 -1
  59. package/dist/s-link/s-link.js +5 -2
  60. package/dist/s-localization-provider/index.js +1 -1
  61. package/dist/s-localization-provider/s-localization-provider.js +12 -2
  62. package/dist/s-nav-item/s-nav-item.js +16 -16
  63. package/dist/s-nav-items/index.js +2 -2
  64. package/dist/s-nav-items/s-nav-items.js +167 -2
  65. package/dist/s-no-ssr/index.js +1 -1
  66. package/dist/s-no-ssr/s-no-ssr.js +5 -2
  67. package/dist/s-pagination/index.js +1 -1
  68. package/dist/s-pagination/s-pagination.js +85 -2
  69. package/dist/s-pixel-reveal/s-pixel-reveal.js +20 -20
  70. package/dist/s-quantity-input/index.js +1 -1
  71. package/dist/s-quantity-input/s-quantity-input.js +246 -2
  72. package/dist/s-review/index.js +1 -1
  73. package/dist/s-review/s-review.js +272 -2
  74. package/dist/s-scroll-reveal/s-scroll-reveal.js +7 -8
  75. package/dist/s-scroll-to-top/s-scroll-to-top.js +27 -28
  76. package/dist/s-scroll-velocity/scroll-velocity-row.js +29 -29
  77. package/dist/s-select/index.js +1 -1
  78. package/dist/s-select/s-select.js +201 -2
  79. package/dist/s-select-list/s-select-list.js +47 -50
  80. package/dist/s-skeleton/s-skeleton.js +16 -17
  81. package/dist/s-snackbar-message/index.js +2 -2
  82. package/dist/s-snackbar-message/s-snackbar-message.js +89 -2
  83. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +27 -27
  84. package/dist/s-status-illustration/s-status-illustration.js +74 -74
  85. package/dist/s-stripe/s-stripe.js +11 -12
  86. package/dist/s-stripe/stripe-input.js +3 -2
  87. package/dist/s-switch/index.js +1 -1
  88. package/dist/s-switch/s-switch.js +48 -2
  89. package/dist/s-tabs/s-tabs.js +48 -50
  90. package/dist/s-text-editor/index.js +1 -1
  91. package/dist/s-text-editor/s-text-editor-toolbar.js +216 -2
  92. package/dist/s-text-editor/s-text-editor.js +25 -26
  93. package/dist/s-text-field/index.js +1 -1
  94. package/dist/s-text-field/s-text-field.js +52 -2
  95. package/dist/s-text-shimmer/s-text-shimmer.js +1 -3
  96. package/dist/s-text-truncation/s-text-truncation.js +20 -20
  97. package/dist/s-theme-demo/s-theme-demo.js +8 -8
  98. package/dist/s-theme-demo/theme-demo-color-palette-section.js +1 -1
  99. package/dist/s-theme-demo/theme-demo-color-ramps-section.js +1 -1
  100. package/dist/s-theme-demo/theme-demo-components-section.js +265 -2
  101. package/dist/s-theme-demo/theme-demo-typography-section.js +10 -10
  102. package/dist/s-theme-provider/s-theme-provider.js +1 -1
  103. package/dist/s-theme-switch/index.js +1 -1
  104. package/dist/s-theme-switch/s-theme-switch.js +60 -2
  105. package/dist/s-tip/index.js +1 -1
  106. package/dist/s-tip/s-tip.js +61 -2
  107. package/dist/s-tool-bar/s-tool-bar.js +28 -28
  108. package/dist/s-tool-bar/tool-bar-action-buttons.js +55 -2
  109. package/dist/s-tool-bar/tool-bar-image-input.js +148 -2
  110. package/dist/s-tool-bar/tool-bar-inputs.js +55 -55
  111. package/dist/s-tool-item/s-tool-item.js +22 -22
  112. package/dist/s-two-pane-layout/s-two-pane-layout.js +32 -32
  113. package/dist/s-zoom-image/s-zoom-image.js +18 -19
  114. package/dist/theme/components/autocomplete.js +43 -2
  115. package/dist/theme/components/avatar.js +9 -2
  116. package/dist/theme/components/card.js +3 -3
  117. package/dist/theme/components/checkbox.js +90 -2
  118. package/dist/theme/components/chip.js +3 -3
  119. package/dist/theme/components/components.js +20 -20
  120. package/dist/theme/components/date-calendar.js +1 -0
  121. package/dist/theme/components/day-calendar.js +1 -0
  122. package/dist/theme/components/field-label-styles.js +19 -2
  123. package/dist/theme/components/form-label.js +1 -1
  124. package/dist/theme/components/list-item-button.js +1 -1
  125. package/dist/theme/components/list-item.js +7 -7
  126. package/dist/theme/components/month-calendar.js +14 -13
  127. package/dist/theme/components/multi-section-digital-clock-section.js +1 -0
  128. package/dist/theme/components/outlined-input.js +6 -6
  129. package/dist/theme/components/picker-day.js +1 -0
  130. package/dist/theme/components/pickers-arrow-switcher.js +1 -0
  131. package/dist/theme/components/pickers-calendar-header.js +3 -2
  132. package/dist/theme/components/select.js +6 -6
  133. package/dist/theme/components/switch.js +1 -1
  134. package/dist/theme/components/table-pagination.js +1 -1
  135. package/dist/theme/components/toggle-button.js +93 -2
  136. package/dist/theme/components/year-calendar.js +14 -13
  137. package/dist/theme/theme-primitives.js +2 -2
  138. package/dist/{theme-primitives-Dt_DT9b5.js → theme-primitives-CRfnMsNy.js} +108 -109
  139. package/dist/utils/dayjs.js +9 -146
  140. package/package.json +1 -1
  141. package/dist/Add-COc9VdNg.js +0 -6
  142. package/dist/ArrowUpward-D88i2k4q.js +0 -6
  143. package/dist/Box-9oeZgA1U.js +0 -46
  144. package/dist/Button-DgIFcM44.js +0 -534
  145. package/dist/ButtonBase-DxKtpFYs.js +0 -747
  146. package/dist/Checkbox-BoZu9z2l.js +0 -152
  147. package/dist/ChevronRight-BxsM4W78.js +0 -6
  148. package/dist/Close-o4HFfK0I.js +0 -6
  149. package/dist/Collapse-zgIFP5Sj.js +0 -266
  150. package/dist/ContentCopy-5unyTYXy.js +0 -6
  151. package/dist/DefaultPropsProvider-ebWx4_5E.js +0 -128
  152. package/dist/DialogContent-CAry6lVf.js +0 -450
  153. package/dist/Download-DtvoRwpl.js +0 -6
  154. package/dist/ExpandMore-Ba5bg6s-.js +0 -6
  155. package/dist/Favorite-B_GsElm0.js +0 -6
  156. package/dist/FormControl-BxmM9UP6.js +0 -221
  157. package/dist/FormControlLabel-DzgppcC_.js +0 -173
  158. package/dist/Grow-zRRuwUl-.js +0 -121
  159. package/dist/InfoOutlined-VC7X46pc.js +0 -6
  160. package/dist/List-CnGIAXAS.js +0 -103
  161. package/dist/ListContext-B1HQt3OD.js +0 -6
  162. package/dist/Menu-C4Zabc9U.js +0 -504
  163. package/dist/MenuItem-rXJfQzDC.js +0 -223
  164. package/dist/MenuList-DDV8J-yd.js +0 -407
  165. package/dist/Modal-jAiibALV.js +0 -707
  166. package/dist/Paper-ixxCeml9.js +0 -115
  167. package/dist/Popper-CVYyMS3c.js +0 -1350
  168. package/dist/Portal-AnyvFRC4.js +0 -53
  169. package/dist/RtlProvider-B7uVJXUY.js +0 -19
  170. package/dist/Skeleton-iZFynl7z.js +0 -220
  171. package/dist/Stack-UMc4dV4G.js +0 -158
  172. package/dist/SwitchBase-D7zqrstO.js +0 -198
  173. package/dist/Tooltip-DbCd6rgF.js +0 -447
  174. package/dist/Typography-yXjc7kVP.js +0 -168
  175. package/dist/UnfoldMoreRounded-DsN0HVDV.js +0 -6
  176. package/dist/appendOwnerState-CELpvdMz.js +0 -17
  177. package/dist/assets/stripe-input.css +0 -1
  178. package/dist/autocomplete-B_4y84Ba.js +0 -43
  179. package/dist/avatar-BHuZu3DN.js +0 -10
  180. package/dist/buttonBaseClasses-BvBqFLb_.js +0 -13
  181. package/dist/capitalize-CccCFNpQ.js +0 -5
  182. package/dist/checkbox-BKMZEVU5.js +0 -88
  183. package/dist/checkboxClasses-CEsqS4sc.js +0 -18
  184. package/dist/chunk-C_CI6nMA.js +0 -13
  185. package/dist/clsx-DGZSe4Nt.js +0 -16
  186. package/dist/colorManipulator-DmUjcif3.js +0 -129
  187. package/dist/contains-WOhYaq1E.js +0 -16
  188. package/dist/createSimplePaletteValueFilter-C1gWywW_.js +0 -14
  189. package/dist/createSvgIcon-B0SZlJF1.js +0 -155
  190. package/dist/createTheme-xB2Em0Na.js +0 -1869
  191. package/dist/defaultTheme-BaGcIzCh.js +0 -210
  192. package/dist/elementAcceptingRef-DhkNAkFH.js +0 -472
  193. package/dist/exactProp-C_IsucXf.js +0 -13
  194. package/dist/field-label-styles-BOyhp6gw.js +0 -50
  195. package/dist/formLabelClasses-B0Fa-86T.js +0 -18
  196. package/dist/generateUtilityClass-PAIOm1jC.js +0 -34
  197. package/dist/generateUtilityClasses-DvX505Gy.js +0 -10
  198. package/dist/iconButtonClasses-CkciZuIe.js +0 -27
  199. package/dist/inputAdornmentClasses-D5yYK5bM.js +0 -19
  200. package/dist/inputBaseClasses-DuWQGq8Z.js +0 -25
  201. package/dist/integerPropType-Disnft4a.js +0 -27
  202. package/dist/isEventHandler-8dPdzK9U.js +0 -7
  203. package/dist/isFocusVisible-Y7157FQS.js +0 -35
  204. package/dist/isLayoutSupported-Ceir7nyK.js +0 -21
  205. package/dist/listItemButtonClasses-DbL-aTVf.js +0 -18
  206. package/dist/memoTheme-qFyKAk7y.js +0 -15
  207. package/dist/mergeSlotProps-xl1-PgWL.js +0 -45
  208. package/dist/monthCalendarClasses-BYVHyEfI.js +0 -14
  209. package/dist/objectWithoutPropertiesLoose-Cpds-4w8.js +0 -23
  210. package/dist/outlinedInputClasses-DECY98u0.js +0 -17
  211. package/dist/pickersCalendarHeaderClasses-CIj0gBye.js +0 -12
  212. package/dist/prop-types-BzYPyWN7.js +0 -516
  213. package/dist/resolveProps-7jIA45vn.js +0 -30
  214. package/dist/s-accordion-B8nlrdFc.js +0 -487
  215. package/dist/s-carousel-Dnjke4JQ.js +0 -1353
  216. package/dist/s-chat-input-DCS0mJE4.js +0 -419
  217. package/dist/s-chat-message-9oollJJq.js +0 -315
  218. package/dist/s-chips-WqGdqHW9.js +0 -176
  219. package/dist/s-code-block-DzGoGg5e.js +0 -658
  220. package/dist/s-comment-message-C6kfgRjv.js +0 -191
  221. package/dist/s-data-table-B1TGVupB.js +0 -805
  222. package/dist/s-date-picker-BpX4HmBp.js +0 -656
  223. package/dist/s-datetime-picker-ByzW44E0.js +0 -3878
  224. package/dist/s-dialog-BLiyjLkx.js +0 -123
  225. package/dist/s-file-dropzone-CVQpYRdY.js +0 -422
  226. package/dist/s-image-viewer-DNIEYdtL.js +0 -269
  227. package/dist/s-language-switcher-D-1nywT3.js +0 -251
  228. package/dist/s-link-CAMTGfd9.js +0 -234
  229. package/dist/s-localization-provider-Xw3NO2uP.js +0 -519
  230. package/dist/s-nav-items-BUp7DddG.js +0 -327
  231. package/dist/s-no-ssr-D8tPdDfh.js +0 -25
  232. package/dist/s-pagination-Dt8Pk5Tp.js +0 -606
  233. package/dist/s-quantity-input-mYCixlJc.js +0 -246
  234. package/dist/s-review-DSXXtWlL.js +0 -272
  235. package/dist/s-select-dwY2DYa9.js +0 -204
  236. package/dist/s-snackbar-message-3Z6VySlB.js +0 -808
  237. package/dist/s-switch-B8bZAzLh.js +0 -307
  238. package/dist/s-text-editor-toolbar-D-XgFQix.js +0 -2121
  239. package/dist/s-text-field-BM4qk0mf.js +0 -51
  240. package/dist/s-theme-switch-BLMz1_m2.js +0 -60
  241. package/dist/s-tip-ty41ePQm.js +0 -62
  242. package/dist/selectClasses-DoUlWfzV.js +0 -22
  243. package/dist/styled-Bog8QCl3.js +0 -163
  244. package/dist/svgIconClasses-C8D4AsMj.js +0 -20
  245. package/dist/switchClasses-eiq1bkQN.js +0 -23
  246. package/dist/theme-demo-components-section-gtIYRngY.js +0 -267
  247. package/dist/toggle-button-Cxi5CfXC.js +0 -104
  248. package/dist/tool-bar-action-buttons-Dt-pV3GA.js +0 -54
  249. package/dist/tool-bar-image-input-BXlll_hV.js +0 -148
  250. package/dist/typographyClasses-BLM3NmYd.js +0 -31
  251. package/dist/useControlled-BeB0W_Ui.js +0 -5
  252. package/dist/useControlled-C4QJnpiR.js +0 -29
  253. package/dist/useEnhancedEffect-Bc3gBClC.js +0 -5
  254. package/dist/useEnhancedEffect-DFq_FMGX.js +0 -5
  255. package/dist/useEventCallback-CVqMfiG_.js +0 -14
  256. package/dist/useForkRef-CKneCEtr.js +0 -29
  257. package/dist/useFormControl-iWLrn7Ek.js +0 -18
  258. package/dist/useMobilePicker-C4UQFvkj.js +0 -7580
  259. package/dist/useSlot-iIu8ek6E.js +0 -83
  260. package/dist/useTheme-BIWMbX3i.js +0 -9
  261. package/dist/useThemeProps-BI9yq95N.js +0 -19
  262. package/dist/useThemeProps-Cr28OQu3.js +0 -13
  263. package/dist/utils-oJyTAkZY.js +0 -214
  264. package/dist/warning-CNkSZkq6.js +0 -98
  265. package/dist/yearCalendarClasses-CuAQumpz.js +0 -14
  266. /package/dist/{colors-DKqWMRgW.js → colors-CNjL5fhq.js} +0 -0
  267. /package/dist/{s-brand-logo-jtAJZQIv.js → s-brand-logo-CErW9Slg.js} +0 -0
  268. /package/dist/{utils-DaSrTYUS.js → utils-CMeAWSRO.js} +0 -0
@@ -1,419 +0,0 @@
1
- import { toSxArray as e } from "./utils/sx.js";
2
- import { tint as t } from "./theme/utils.js";
3
- import { t as n } from "./useForkRef-CKneCEtr.js";
4
- import { t as r } from "./appendOwnerState-CELpvdMz.js";
5
- import { t as i } from "./createSvgIcon-B0SZlJF1.js";
6
- import { t as ee } from "./useControlled-BeB0W_Ui.js";
7
- import { t as te } from "./mergeSlotProps-xl1-PgWL.js";
8
- import { t as ne } from "./ArrowUpward-D88i2k4q.js";
9
- import { t as a } from "./Close-o4HFfK0I.js";
10
- import { t as o } from "./s-text-field-BM4qk0mf.js";
11
- import { SIconButton as s } from "./s-icon-button/s-icon-button.js";
12
- import { SFileIcon as re } from "./s-file-icon/s-file-icon.js";
13
- import { forwardRef as c, useEffect as ie, useRef as l, useState as u } from "react";
14
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
15
- import { Box as m, ClickAwayListener as ae, Popper as oe, Typography as h, outlinedInputClasses as se, styled as g, useThemeProps as ce } from "@mui/material";
16
- import le, { Categories as _ } from "emoji-picker-react";
17
- //#region ../../node_modules/@mui/icons-material/AccessTime.mjs
18
- var v = i([/* @__PURE__ */ f("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" }, "0"), /* @__PURE__ */ f("path", { d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z" }, "1")], "AccessTime"), y = i(/* @__PURE__ */ f("path", { d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z" }), "AttachFile"), b = i(/* @__PURE__ */ f("path", { d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M8.5 8c.83 0 1.5.67 1.5 1.5S9.33 11 8.5 11 7 10.33 7 9.5 7.67 8 8.5 8M12 18c-2.28 0-4.22-1.66-5-4h10c-.78 2.34-2.72 4-5 4m3.5-7c-.83 0-1.5-.67-1.5-1.5S14.67 8 15.5 8s1.5.67 1.5 1.5-.67 1.5-1.5 1.5" }), "EmojiEmotions"), x = i(/* @__PURE__ */ f("path", { d: "M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m14 0c0 1.3-.84 2.4-2 2.82V7h2z" }), "EmojiEvents"), S = i(/* @__PURE__ */ f("path", { d: "m14 9-1-2H7V5.72c.6-.34 1-.98 1-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .74.4 1.38 1 1.72V21h2v-4h5l1 2h7V9h-6zm4 8h-4l-1-2H7V9h5l1 2h5v6z" }), "EmojiFlags"), C = i(/* @__PURE__ */ f("path", { d: "M20 3H9v2.4l1.81 1.45c.12.09.19.24.19.39v4.26c0 .28-.22.5-.5.5h-4c-.28 0-.5-.22-.5-.5V7.24c0-.15.07-.3.19-.39L8 5.4V3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2m0 5h-2V5h2zM4 19h16v2H4z" }), "EmojiFoodBeverage"), w = i(/* @__PURE__ */ f("path", { d: "M21.94 4.88c-.18-.53-.69-.88-1.26-.88H19.6l-.31-.97C19.15 2.43 18.61 2 18 2s-1.15.43-1.29 1.04L16.4 4h-1.07c-.57 0-1.08.35-1.26.88-.19.56.04 1.17.56 1.48l.87.52-.4 1.24c-.23.58-.04 1.25.45 1.62.23.17.51.26.78.26.31 0 .61-.11.86-.32l.81-.7.81.7c.25.21.55.32.86.32.27 0 .55-.09.78-.26.5-.37.68-1.04.45-1.62l-.39-1.24.87-.52c.51-.31.74-.92.56-1.48M18 7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-4.51 3.51c-.43-.43-.94-.73-1.49-.93V8h-1v1.38c-.11-.01-.23-.03-.34-.03-1.02 0-2.05.39-2.83 1.17-.16.16-.3.34-.43.53L6 10.52c-1.56-.55-3.28.27-3.83 1.82-.27.75-.23 1.57.12 2.29.23.48.58.87 1 1.16-.38 1.35-.06 2.85 1 3.91s2.57 1.38 3.91 1c.29.42.68.77 1.16 1q.63.3 1.29.3c.34 0 .68-.06 1.01-.17 1.56-.55 2.38-2.27 1.82-3.85l-.52-1.37c.18-.13.36-.27.53-.43.87-.87 1.24-2.04 1.14-3.17H16v-1h-1.59c-.19-.55-.49-1.06-.92-1.5m-8.82 3.78c-.25-.09-.45-.27-.57-.51s-.13-.51-.04-.76c.19-.52.76-.79 1.26-.61l3.16 1.19c-1.15.6-2.63 1.11-3.81.69m6.32 5.65c-.25.09-.52.08-.76-.04-.24-.11-.42-.32-.51-.57-.42-1.18.09-2.65.7-3.8l1.18 3.13c.18.52-.09 1.1-.61 1.28m1.21-5.34-.61-1.61c0-.01-.01-.02-.02-.03l-.06-.12c-.02-.04-.04-.07-.07-.11l-.09-.09-.09-.09c-.03-.03-.07-.05-.11-.07s-.07-.05-.12-.06c-.01 0-.02-.01-.03-.02l-1.6-.6c.36-.29.79-.46 1.26-.46.53 0 1.04.21 1.41.59.73.73.77 1.88.13 2.67" }), "EmojiNature"), T = i(/* @__PURE__ */ f("path", { d: "M12 3c-.46 0-.93.04-1.4.14-2.76.53-4.96 2.76-5.48 5.52-.48 2.61.48 5.01 2.22 6.56.43.38.66.91.66 1.47V19c0 1.1.9 2 2 2h.28c.35.6.98 1 1.72 1s1.38-.4 1.72-1H14c1.1 0 2-.9 2-2v-2.31c0-.55.22-1.09.64-1.46C18.09 13.95 19 12.08 19 10c0-3.87-3.13-7-7-7m2 16h-4v-1h4zm0-2h-4v-1h4zm-1.5-5.59V14h-1v-2.59L9.67 9.59l.71-.71L12 10.5l1.62-1.62.71.71z" }), "EmojiObjects"), E = i([
19
- /* @__PURE__ */ f("path", { d: "M3 2h8v2H3zm3 9h2V7h3V5H3v2h3zm6.4038 9.182 7.7782-7.7783 1.4142 1.4142-7.7782 7.7782z" }, "0"),
20
- /* @__PURE__ */ f("circle", {
21
- cx: "14.5",
22
- cy: "14.5",
23
- r: "1.5"
24
- }, "1"),
25
- /* @__PURE__ */ f("circle", {
26
- cx: "19.5",
27
- cy: "19.5",
28
- r: "1.5"
29
- }, "2"),
30
- /* @__PURE__ */ f("path", { d: "M15.5 11c1.38 0 2.5-1.12 2.5-2.5V4h3V2h-4v4.51c-.42-.32-.93-.51-1.5-.51C14.12 6 13 7.12 13 8.5s1.12 2.5 2.5 2.5m-5.76 4.96-1.41 1.41-.71-.71.35-.35c.98-.98.98-2.56 0-3.54-.49-.49-1.13-.73-1.77-.73s-1.28.24-1.77.73c-.98.98-.98 2.56 0 3.54l.35.35-1.06 1.06c-.98.98-.98 2.56 0 3.54.5.5 1.14.74 1.78.74s1.28-.24 1.77-.73l1.06-1.06 1.41 1.41 1.41-1.41-1.41-1.41 1.41-1.41zM5.85 14.2c.12-.12.26-.15.35-.15s.23.03.35.15c.19.2.19.51 0 .71l-.35.35-.35-.36c-.19-.19-.19-.51 0-.7m0 5.65c-.12.12-.26.15-.35.15s-.23-.03-.35-.15c-.19-.19-.19-.51 0-.71l1.06-1.06.71.71z" }, "3")
31
- ], "EmojiSymbols"), D = i([
32
- /* @__PURE__ */ f("path", { d: "M20.57 10.66c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 14.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V19h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1" }, "0"),
33
- /* @__PURE__ */ f("path", { d: "M14 9h1V3H7v5H2v13h1V9h5V4h6z" }, "1"),
34
- /* @__PURE__ */ f("path", { d: "M5 11h2v2H5zm5-6h2v2h-2zM5 15h2v2H5zm0 4h2v2H5z" }, "2")
35
- ], "EmojiTransportation"), ue = {
36
- [_.SUGGESTED]: /* @__PURE__ */ f(v, {}),
37
- [_.SMILEYS_PEOPLE]: /* @__PURE__ */ f(b, {}),
38
- [_.ANIMALS_NATURE]: /* @__PURE__ */ f(w, {}),
39
- [_.FOOD_DRINK]: /* @__PURE__ */ f(C, {}),
40
- [_.TRAVEL_PLACES]: /* @__PURE__ */ f(D, {}),
41
- [_.ACTIVITIES]: /* @__PURE__ */ f(x, {}),
42
- [_.OBJECTS]: /* @__PURE__ */ f(T, {}),
43
- [_.SYMBOLS]: /* @__PURE__ */ f(E, {}),
44
- [_.FLAGS]: /* @__PURE__ */ f(S, {})
45
- }, O = "url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"/></svg>')", de = g(m, {
46
- name: "SChatInput",
47
- slot: "Root"
48
- })({});
49
- function fe(e, t) {
50
- return typeof e == "function" ? e(t) : e;
51
- }
52
- var k = c((i, c) => {
53
- let g = ce({
54
- props: i,
55
- name: "SChatInput"
56
- }), { onSubmit: _, onFileSelect: v, disabled: x = !1, acceptedFileTypes: S, maxFileSize: C, hideEmojiPicker: w, hideFileAttachment: T, value: E, defaultValue: D = "", onChange: k, onKeyDown: pe, inputRef: me, placeholder: A = "Enter your message here...", slotProps: j, slots: M, sx: N, attachFileLabel: P = "Attach files", emojiPickerLabel: F = "Choose emoji", submitLabel: I = "Send message", ...L } = g, [R, z] = ee({
57
- controlled: E,
58
- default: D,
59
- name: "SChatInput",
60
- state: "value"
61
- }), [B, V] = u([]), [he, H] = u(/* @__PURE__ */ new Map()), U = l(/* @__PURE__ */ new Map()), W = l(null), [G, K] = u(!1), [ge, q] = u(null), J = {
62
- ...g,
63
- disabled: x,
64
- emojiPickerOpen: G,
65
- hasFiles: B.length > 0
66
- }, _e = M?.input ?? o, ve = fe(j?.input, J), { inputRef: ye, onChange: be, onKeyDown: xe, slotProps: Y, ...Se } = r(M?.input, ve ?? {}, J), Ce = n(me, ye), X = (e) => e.type.startsWith("image/"), we = (e) => he.get(e) ?? "", Te = (e) => {
67
- if (be?.(e), e.defaultPrevented) return;
68
- let t = e.target.value;
69
- z(t), k?.(e, t, "input");
70
- }, Z = (e, t) => {
71
- let n = `${R}${e.emoji}`;
72
- z(n), k?.(t, n, "emoji"), K(!1), q(null);
73
- }, Ee = (e) => {
74
- q(e.currentTarget), K(!G);
75
- }, Q = (e) => {
76
- x || R.trim().length === 0 && B.length === 0 || (_?.(e, R, B), !e.defaultPrevented && (e.preventDefault(), z(""), k?.(e, "", "clear"), U.current.forEach((e) => URL.revokeObjectURL(e)), U.current = /* @__PURE__ */ new Map(), H(/* @__PURE__ */ new Map()), V([])));
77
- }, De = (e) => {
78
- let t = Array.from(e.target.files ?? []).filter((e) => !(C && e.size > C)), n = new Map(U.current);
79
- t.forEach((e) => {
80
- X(e) && n.set(e, URL.createObjectURL(e));
81
- }), U.current = n, H(n), V((e) => [...e, ...t]), v?.(t), e.target.value = "";
82
- }, $ = (e) => {
83
- let t = B[e];
84
- if (t && X(t)) {
85
- let e = U.current.get(t);
86
- if (e) {
87
- URL.revokeObjectURL(e);
88
- let n = new Map(U.current);
89
- n.delete(t), U.current = n, H(n);
90
- }
91
- }
92
- V((t) => t.filter((t, n) => n !== e));
93
- }, Oe = (e) => {
94
- xe?.(e), pe?.(e), !e.defaultPrevented && e.key === "Enter" && !e.shiftKey && (Q(e), e.preventDefault());
95
- };
96
- return ie(() => () => {
97
- U.current.forEach((e) => URL.revokeObjectURL(e)), U.current.clear();
98
- }, []), /* @__PURE__ */ p(de, {
99
- ...L,
100
- ownerState: J,
101
- ref: c,
102
- sx: [(e) => ({
103
- border: "1px solid",
104
- borderColor: "divider",
105
- borderRadius: 1,
106
- padding: "8px 12px",
107
- transition: "border 120ms ease-in",
108
- "&:hover": { borderColor: (e.vars ?? e).palette.grey[500] },
109
- "&:focus-within": {
110
- outline: `3px solid ${t((e.vars ?? e).palette.primary[500], 50)}`,
111
- borderColor: (e.vars ?? e).palette.primary[400]
112
- },
113
- ...x && {
114
- opacity: .5,
115
- pointerEvents: "none"
116
- }
117
- }), ...e(N)],
118
- children: [
119
- /* @__PURE__ */ f(_e, {
120
- ...Se,
121
- placeholder: A,
122
- disabled: x,
123
- value: R,
124
- onChange: Te,
125
- onKeyDown: Oe,
126
- fullWidth: !0,
127
- multiline: !0,
128
- minRows: 1,
129
- maxRows: 10,
130
- variant: "outlined",
131
- inputRef: Ce,
132
- slotProps: {
133
- ...Y,
134
- input: te(Y?.input, { sx: {
135
- height: "100%",
136
- backgroundColor: "transparent",
137
- border: "none",
138
- padding: 0,
139
- [`&.${se.focused}`]: { outline: "none" },
140
- "& fieldset": { border: "none" },
141
- "&:hover fieldset": { border: "none" },
142
- "&.Mui-focused fieldset": { border: "none" }
143
- } })
144
- }
145
- }),
146
- B.length > 0 && /* @__PURE__ */ f(m, {
147
- sx: {
148
- display: "flex",
149
- flexWrap: "wrap",
150
- gap: 1,
151
- mt: 1
152
- },
153
- children: B.map((e, t) => {
154
- let n = X(e), r = e.name.split(".").pop();
155
- return n ? /* @__PURE__ */ p(m, {
156
- sx: {
157
- flex: "0 0 auto",
158
- height: 72,
159
- position: "relative",
160
- width: 72
161
- },
162
- children: [/* @__PURE__ */ f(m, {
163
- component: "img",
164
- src: we(e),
165
- alt: e.name,
166
- sx: {
167
- borderRadius: 1,
168
- display: "block",
169
- height: "100%",
170
- objectFit: "cover",
171
- width: "100%"
172
- }
173
- }), /* @__PURE__ */ f(s, {
174
- "aria-label": `Remove ${e.name}`,
175
- onClick: () => $(t),
176
- size: "small",
177
- variant: "overlay",
178
- sx: {
179
- position: "absolute",
180
- right: 4,
181
- top: 4
182
- },
183
- children: /* @__PURE__ */ f(a, { fontSize: "small" })
184
- })]
185
- }, `${e.name}-${t}`) : /* @__PURE__ */ p(m, {
186
- sx: {
187
- alignItems: "center",
188
- bgcolor: "background.paper",
189
- border: "1px solid",
190
- borderColor: "divider",
191
- borderRadius: 1,
192
- display: "flex",
193
- justifyContent: "space-between",
194
- p: 1,
195
- width: "100%"
196
- },
197
- children: [/* @__PURE__ */ p(m, {
198
- sx: {
199
- display: "flex",
200
- alignItems: "center",
201
- gap: 1
202
- },
203
- children: [/* @__PURE__ */ f(re, { extension: r }), /* @__PURE__ */ p(m, {
204
- sx: {
205
- display: "flex",
206
- flexDirection: "row",
207
- alignItems: "center",
208
- gap: 1
209
- },
210
- children: [/* @__PURE__ */ f(h, {
211
- variant: "subtitle2",
212
- sx: {
213
- textOverflow: "ellipsis",
214
- overflow: "hidden",
215
- whiteSpace: "nowrap"
216
- },
217
- children: e.name
218
- }), /* @__PURE__ */ f("div", { children: /* @__PURE__ */ p(h, {
219
- variant: "caption",
220
- children: [
221
- "(",
222
- Math.round(e.size / 1024),
223
- " KB)"
224
- ]
225
- }) })]
226
- })]
227
- }), /* @__PURE__ */ f(s, {
228
- "aria-label": `Remove ${e.name}`,
229
- onClick: () => $(t),
230
- sx: {
231
- minWidth: "auto",
232
- p: .5
233
- },
234
- children: /* @__PURE__ */ f(a, {})
235
- })]
236
- }, `${e.name}-${t}`);
237
- })
238
- }),
239
- /* @__PURE__ */ p(m, {
240
- sx: {
241
- display: "flex",
242
- justifyContent: "space-between",
243
- alignItems: "center",
244
- mt: 1
245
- },
246
- children: [/* @__PURE__ */ p(m, {
247
- sx: {
248
- display: "flex",
249
- gap: 1
250
- },
251
- children: [!T && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
252
- ref: W,
253
- type: "file",
254
- multiple: !0,
255
- accept: S,
256
- onChange: De,
257
- style: { display: "none" },
258
- disabled: x
259
- }), /* @__PURE__ */ f(s, {
260
- "aria-label": P,
261
- disabled: x,
262
- onClick: () => W.current?.click(),
263
- children: /* @__PURE__ */ f(y, {})
264
- })] }), !w && /* @__PURE__ */ f(s, {
265
- "aria-label": F,
266
- onClick: Ee,
267
- disabled: x,
268
- children: /* @__PURE__ */ f(b, {})
269
- })]
270
- }), /* @__PURE__ */ f(s, {
271
- "aria-label": I,
272
- onClick: Q,
273
- disabled: x,
274
- children: /* @__PURE__ */ f(ne, {})
275
- })]
276
- }),
277
- /* @__PURE__ */ f(oe, {
278
- open: G,
279
- anchorEl: ge,
280
- placement: "top-start",
281
- sx: { zIndex: 1300 },
282
- children: /* @__PURE__ */ f(ae, {
283
- onClickAway: () => {
284
- K(!1), q(null);
285
- },
286
- children: /* @__PURE__ */ f(m, {
287
- sx: (e) => ({
288
- border: "1px solid",
289
- borderColor: "divider",
290
- borderRadius: 1,
291
- overflow: "hidden",
292
- "& .epr-main": {
293
- backgroundColor: "background.paper",
294
- border: "none"
295
- },
296
- "& .epr-main, & .epr-main *": { fontFamily: e.typography.fontFamily },
297
- "& .epr-header": { backgroundColor: "background.paper" },
298
- "& .epr-search-container": { backgroundColor: "background.paper" },
299
- "& .epr-search-container > .epr-icn-search": { display: "none" },
300
- "& .epr-icn-clear-search": {
301
- backgroundImage: "none",
302
- backgroundColor: "action.active",
303
- WebkitMaskImage: O,
304
- maskImage: O,
305
- WebkitMaskRepeat: "no-repeat",
306
- maskRepeat: "no-repeat",
307
- WebkitMaskPosition: "center",
308
- maskPosition: "center",
309
- WebkitMaskSize: "0.875rem",
310
- maskSize: "0.875rem"
311
- },
312
- "& .epr-btn-clear-search": {
313
- height: 24,
314
- width: 24,
315
- "&:hover, &:focus": { backgroundColor: "action.hover" }
316
- },
317
- "& .epr-search-container > input": {
318
- boxSizing: "border-box",
319
- minHeight: 40,
320
- backgroundColor: "background.default",
321
- border: "1px solid",
322
- borderColor: "divider",
323
- borderRadius: 1,
324
- color: "text.primary",
325
- fontFamily: "inherit",
326
- fontSize: e.typography.body1.fontSize,
327
- padding: "8px 12px",
328
- transition: "border 120ms ease-in",
329
- "&:hover": { borderColor: (e.vars ?? e).palette.grey[500] },
330
- "&:focus": {
331
- outline: `3px solid ${t((e.vars ?? e).palette.primary[500], 50)}`,
332
- borderColor: (e.vars ?? e).palette.primary[400]
333
- },
334
- "&::placeholder": { color: "text.secondary" }
335
- },
336
- "& .epr-category-nav": {
337
- backgroundColor: "background.paper",
338
- borderBottom: "1px solid",
339
- borderColor: "divider",
340
- padding: "0px 8px 8px 8px"
341
- },
342
- "& .epr-cat-btn": {
343
- backgroundColor: "transparent !important",
344
- border: "none",
345
- transition: e.transitions.create("background-color", { duration: e.transitions.duration.shorter })
346
- },
347
- "& .epr-cat-btn:focus::before": { display: "none" },
348
- "& .epr-cat-btn:focus-visible": {
349
- borderRadius: 1,
350
- outline: "2px solid",
351
- outlineColor: "primary.main",
352
- outlineOffset: 2
353
- },
354
- "& .epr-cat-btn-custom-icon svg": {
355
- color: "text.secondary",
356
- transition: e.transitions.create("color", { duration: e.transitions.duration.shorter })
357
- },
358
- "& .epr-cat-btn-custom-icon.epr-active svg": { color: (e.vars ?? e).palette.primary[500] },
359
- "& .epr-body": { backgroundColor: "background.paper" },
360
- "& .epr-emoji-category-label": {
361
- backgroundColor: "background.paper",
362
- color: "text.primary",
363
- fontSize: e.typography.caption.fontSize,
364
- fontWeight: 600,
365
- padding: "8px 16px 4px",
366
- textTransform: "uppercase",
367
- letterSpacing: "0.5px"
368
- },
369
- "& .epr-emoji-list": { backgroundColor: "background.paper" },
370
- "& .epr-emoji": {
371
- borderRadius: 1,
372
- margin: "2px",
373
- transition: e.transitions.create("background-color", { duration: e.transitions.duration.shorter }),
374
- "&:focus-visible": {
375
- outline: "2px solid",
376
- outlineColor: "primary.main",
377
- outlineOffset: 1
378
- }
379
- },
380
- "& .epr-skin-tones": {
381
- backgroundColor: "background.paper",
382
- border: "1px solid",
383
- borderColor: "divider",
384
- borderRadius: 1,
385
- display: "none"
386
- },
387
- "& .epr-tone": {
388
- border: "none",
389
- borderRadius: 1,
390
- transition: e.transitions.create("background-color", { duration: e.transitions.duration.shorter }),
391
- "&:focus-visible": {
392
- outline: "2px solid",
393
- outlineColor: "primary.main",
394
- outlineOffset: 1
395
- }
396
- },
397
- "@media (hover: hover) and (pointer: fine)": {
398
- "& .epr-cat-btn-custom-icon:hover svg": { color: "text.primary" },
399
- "& .epr-emoji:hover, & .epr-tone:hover": { backgroundColor: "action.hover" }
400
- }
401
- }),
402
- children: /* @__PURE__ */ f(le, {
403
- onEmojiClick: Z,
404
- width: 300,
405
- height: 400,
406
- searchDisabled: !1,
407
- skinTonesDisabled: !1,
408
- previewConfig: { showPreview: !1 },
409
- categoryIcons: ue
410
- })
411
- })
412
- })
413
- })
414
- ]
415
- });
416
- });
417
- k.displayName = "SChatInput";
418
- //#endregion
419
- export { k as t };