@solostylist/ui-kit 1.0.87 → 1.0.89

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 (70) hide show
  1. package/dist/{Box-Cf99MewL.js → Box-CJmG1mTu.js} +3 -3
  2. package/dist/ButtonBase-C0g54hXq.js +910 -0
  3. package/dist/ChevronRight-CtkI4XwH.js +11 -0
  4. package/dist/{Close-CKpTrk7X.js → Close--Sf9yZGB.js} +1 -1
  5. package/dist/{Menu-D2LDo0yd.js → Menu-BuktPpzX.js} +914 -1453
  6. package/dist/{MenuItem-JkMrBIMD.js → MenuItem-sL2AcofB.js} +8 -8
  7. package/dist/Paper-CH6cuu9i.js +553 -0
  8. package/dist/{Select-4BjFewNI.js → Select-D2lV25sl.js} +16 -15
  9. package/dist/{Stack-UjxgGQu9.js → Stack-CIrlOUXL.js} +4 -4
  10. package/dist/{TransitionGroup-DzGaAPUk.js → TransitionGroup-SToIdl-5.js} +3 -3
  11. package/dist/{Typography-CGoVq27h.js → Typography-D-VP4V1G.js} +3 -3
  12. package/dist/{createSvgIcon-vJH0FaMW.js → createSvgIcon-DpVs_nKR.js} +5 -5
  13. package/dist/{createTheme-DjqDAiZm.js → createTheme-DbdaZ0Ku.js} +3 -2
  14. package/dist/{defaultTheme-CaAxts6z.js → defaultTheme-CFAmbghg.js} +1 -1
  15. package/dist/{extendSxProp-BnfiUPQK.js → extendSxProp-CQnEn3aw.js} +1 -1
  16. package/dist/{index-DcImsw9J.js → index-CjPqjRDL.js} +4 -4
  17. package/dist/main.d.ts +6 -0
  18. package/dist/main.js +117 -111
  19. package/dist/mergeSlotProps-N47mO9C9.js +62 -0
  20. package/dist/s-accordion/index.d.ts +2 -0
  21. package/dist/s-accordion/index.js +4 -0
  22. package/dist/s-accordion/package.json +5 -0
  23. package/dist/s-accordion/s-accordion.d.ts +9 -0
  24. package/dist/s-accordion/s-accordion.js +924 -0
  25. package/dist/s-avatar/index.d.ts +2 -0
  26. package/dist/s-avatar/index.js +4 -0
  27. package/dist/s-avatar/package.json +5 -0
  28. package/dist/s-avatar/s-avatar.d.ts +10 -0
  29. package/dist/s-avatar/s-avatar.js +9 -0
  30. package/dist/s-chat-input/s-chat-input.js +6 -6
  31. package/dist/s-copyable-text/s-copyable-text.js +1 -1
  32. package/dist/s-data-table/s-data-table.js +12 -10
  33. package/dist/s-date-picker/s-date-picker.js +24 -24
  34. package/dist/s-datetime-picker/s-datetime-picker.js +13 -12
  35. package/dist/s-dialog/s-dialog.js +1 -1
  36. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  37. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  38. package/dist/s-file-dropzone/s-file-dropzone.js +8 -8
  39. package/dist/s-file-icon/s-file-icon.js +1 -1
  40. package/dist/s-image-comparison/index.d.ts +2 -0
  41. package/dist/s-image-comparison/index.js +4 -0
  42. package/dist/s-image-comparison/package.json +5 -0
  43. package/dist/s-image-comparison/s-image-comparison.d.ts +11 -0
  44. package/dist/s-image-comparison/s-image-comparison.js +155 -0
  45. package/dist/s-image-modal/s-image-modal.js +94 -98
  46. package/dist/s-interactive-gallery/s-interactive-gallery.js +69 -69
  47. package/dist/s-label/s-label.js +1 -1
  48. package/dist/s-localization-provider/s-localization-provider.js +1 -1
  49. package/dist/s-multi-select/s-multi-select.js +5 -5
  50. package/dist/s-smart-text-field/s-smart-text-field.js +2 -2
  51. package/dist/s-text-editor/s-text-editor-toolbar.js +8 -8
  52. package/dist/s-text-editor/s-text-editor.js +1 -1
  53. package/dist/s-text-field/s-text-field.js +13 -4
  54. package/dist/s-tip/s-tip.js +3 -3
  55. package/dist/theme/components/avatar.js +3 -3
  56. package/dist/theme/components/button.d.ts +2 -2
  57. package/dist/theme/components/chip.js +1 -1
  58. package/dist/theme/components/components.d.ts +2 -2
  59. package/dist/theme/customizations/inputs.js +1 -1
  60. package/dist/theme/customizations/navigation.js +1 -1
  61. package/dist/theme/theme-primitives.js +1 -1
  62. package/dist/useControlled-nm4pBabJ.js +31 -0
  63. package/dist/useFormControl-CatNKXAi.js +10 -0
  64. package/dist/{useMobilePicker-DmFQ075P.js → useMobilePicker-CRxlxUeh.js} +100 -98
  65. package/dist/{useTheme-DPtt6ExE.js → useTheme-CjYoxoob.js} +1 -1
  66. package/dist/{useThemeProps-DQiCrjPQ.js → useThemeProps-DdCEfRBE.js} +2 -2
  67. package/dist/{warning-UxpRUL3s.js → warning-CiVr8tE6.js} +3 -3
  68. package/package.json +1 -1
  69. package/dist/useFormControl-B3RPiDsz.js +0 -38
  70. package/dist/useSlot-DFSsVuMw.js +0 -969
@@ -1,74 +1,70 @@
1
- import { j as i } from "../jsx-runtime-DywqP_6a.js";
2
- import { useState as k, useEffect as z } from "react";
3
- import { Modal as A, Box as l, Paper as b, Typography as w, IconButton as m, Stack as T } from "@mui/material";
4
- import { motion as u, AnimatePresence as F } from "framer-motion";
5
- import { C as M } from "../Close-CKpTrk7X.js";
6
- import { c as P } from "../createSvgIcon-vJH0FaMW.js";
7
- const $ = P(/* @__PURE__ */ i.jsx("path", {
8
- d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
9
- }), "ChevronLeft"), B = P(/* @__PURE__ */ i.jsx("path", {
10
- d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
11
- }), "ChevronRight"), I = ({ item: s, onClick: c, style: r = {}, objectFit: e = "contain", disableVideoControls: n = !1 }) => s.type === "video" ? /* @__PURE__ */ i.jsx(
12
- l,
1
+ import { j as o } from "../jsx-runtime-DywqP_6a.js";
2
+ import { useState as k, useEffect as w } from "react";
3
+ import { Modal as A, Box as d, Paper as b, Typography as z, IconButton as m, Stack as L } from "@mui/material";
4
+ import { motion as h, AnimatePresence as T } from "framer-motion";
5
+ import { C as F } from "../Close--Sf9yZGB.js";
6
+ import { C as $, a as B } from "../ChevronRight-CtkI4XwH.js";
7
+ const I = ({ item: s, onClick: l, style: x = {}, objectFit: e = "contain", disableVideoControls: n = !1 }) => s.type === "video" ? /* @__PURE__ */ o.jsx(
8
+ d,
13
9
  {
14
10
  component: "video",
15
- onClick: c,
11
+ onClick: l,
16
12
  controls: !n,
17
13
  sx: {
18
14
  width: "100%",
19
15
  height: "100%",
20
16
  objectFit: e,
21
17
  bgcolor: "background.paper",
22
- ...r
18
+ ...x
23
19
  },
24
- children: /* @__PURE__ */ i.jsx("source", { src: s.url, type: "video/mp4" })
20
+ children: /* @__PURE__ */ o.jsx("source", { src: s.url, type: "video/mp4" })
25
21
  }
26
- ) : /* @__PURE__ */ i.jsx(
27
- l,
22
+ ) : /* @__PURE__ */ o.jsx(
23
+ d,
28
24
  {
29
25
  component: "img",
30
26
  src: s.url,
31
27
  alt: s.title || "",
32
- onClick: c,
28
+ onClick: l,
33
29
  sx: {
34
30
  width: "100%",
35
31
  height: "100%",
36
32
  objectFit: e,
37
33
  bgcolor: "background.paper",
38
- ...r
34
+ ...x
39
35
  }
40
36
  }
41
- ), V = ({
37
+ ), M = ({
42
38
  selectedItem: s,
43
- isOpen: c,
44
- onClose: r,
39
+ isOpen: l,
40
+ onClose: x,
45
41
  onItemChange: e,
46
42
  mediaItems: n = [],
47
43
  renderMediaItem: f,
48
- showNavigation: E = !0,
49
- showThumbnailDock: S = !0,
50
- showCounter: R = !0,
44
+ showNavigation: P = !0,
45
+ showThumbnailDock: E = !0,
46
+ showCounter: S = !0,
51
47
  modalSx: C = {}
52
48
  }) => {
53
- const [v, L] = k({ x: 0, y: 0 }), [D, h] = k(s || null), o = s || D;
54
- z(() => {
55
- s && h(s);
49
+ const [v, R] = k({ x: 0, y: 0 }), [D, u] = k(s || null), i = s || D;
50
+ w(() => {
51
+ s && u(s);
56
52
  }, [s]);
57
- const p = E && n.length > 1 && o, a = o ? n.findIndex((t) => t.id === o.id) : -1, g = n.length, y = () => {
58
- if (p && a > 0) {
59
- const t = n[a - 1];
60
- e ? e(t) : h(t);
53
+ const p = P && n.length > 1 && i, r = i ? n.findIndex((t) => t.id === i.id) : -1, g = n.length, y = () => {
54
+ if (p && r > 0) {
55
+ const t = n[r - 1];
56
+ e ? e(t) : u(t);
61
57
  }
62
58
  }, j = () => {
63
- if (p && a < g - 1) {
64
- const t = n[a + 1];
65
- e ? e(t) : h(t);
59
+ if (p && r < g - 1) {
60
+ const t = n[r + 1];
61
+ e ? e(t) : u(t);
66
62
  }
67
63
  };
68
- return z(() => {
69
- const t = (d) => {
70
- if (c)
71
- switch (d.key) {
64
+ return w(() => {
65
+ const t = (a) => {
66
+ if (l)
67
+ switch (a.key) {
72
68
  case "ArrowLeft":
73
69
  y();
74
70
  break;
@@ -76,16 +72,16 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
76
72
  j();
77
73
  break;
78
74
  case "Escape":
79
- r();
75
+ x();
80
76
  break;
81
77
  }
82
78
  };
83
79
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
84
- }, [c, a, g, p]), !c || !o ? null : /* @__PURE__ */ i.jsx(
80
+ }, [l, r, g, p]), !l || !i ? null : /* @__PURE__ */ o.jsx(
85
81
  A,
86
82
  {
87
- open: c,
88
- onClose: r,
83
+ open: l,
84
+ onClose: x,
89
85
  sx: {
90
86
  zIndex: (t) => t.zIndex.modal + 100,
91
87
  ...C
@@ -98,15 +94,15 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
98
94
  }
99
95
  }
100
96
  },
101
- children: /* @__PURE__ */ i.jsxs(l, { children: [
102
- /* @__PURE__ */ i.jsx(
103
- u.div,
97
+ children: /* @__PURE__ */ o.jsxs(d, { children: [
98
+ /* @__PURE__ */ o.jsx(
99
+ h.div,
104
100
  {
105
101
  initial: { scale: 0.98 },
106
102
  animate: { scale: 1 },
107
103
  exit: { scale: 0.98 },
108
104
  transition: { type: "spring", stiffness: 400, damping: 30 },
109
- children: /* @__PURE__ */ i.jsxs(
105
+ children: /* @__PURE__ */ o.jsxs(
110
106
  b,
111
107
  {
112
108
  elevation: 3,
@@ -120,16 +116,16 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
120
116
  zIndex: (t) => t.zIndex.modal + 101
121
117
  },
122
118
  children: [
123
- /* @__PURE__ */ i.jsx(
124
- l,
119
+ /* @__PURE__ */ o.jsx(
120
+ d,
125
121
  {
126
122
  sx: {
127
123
  height: "100%",
128
124
  display: "flex",
129
125
  flexDirection: "column"
130
126
  },
131
- children: /* @__PURE__ */ i.jsx(
132
- l,
127
+ children: /* @__PURE__ */ o.jsx(
128
+ d,
133
129
  {
134
130
  sx: {
135
131
  flex: 1,
@@ -139,8 +135,8 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
139
135
  justifyContent: "center",
140
136
  bgcolor: "background.default"
141
137
  },
142
- children: /* @__PURE__ */ i.jsx(F, { mode: "wait", children: /* @__PURE__ */ i.jsx(
143
- u.div,
138
+ children: /* @__PURE__ */ o.jsx(T, { mode: "wait", children: /* @__PURE__ */ o.jsx(
139
+ h.div,
144
140
  {
145
141
  style: { position: "relative" },
146
142
  initial: { y: 20, scale: 0.97 },
@@ -150,11 +146,11 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
150
146
  transition: { type: "spring", stiffness: 500, damping: 30, mass: 0.5 }
151
147
  },
152
148
  exit: { y: 20, scale: 0.97, transition: { duration: 0.15 } },
153
- onClick: r,
154
- children: /* @__PURE__ */ i.jsxs(
149
+ children: /* @__PURE__ */ o.jsxs(
155
150
  b,
156
151
  {
157
152
  elevation: 6,
153
+ onClick: (t) => t.stopPropagation(),
158
154
  sx: {
159
155
  position: "relative",
160
156
  width: "100%",
@@ -165,9 +161,9 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
165
161
  overflow: "hidden"
166
162
  },
167
163
  children: [
168
- f ? f(o, r) : /* @__PURE__ */ i.jsx(I, { item: o, onClick: r }),
169
- (o.title || o.desc) && /* @__PURE__ */ i.jsxs(
170
- l,
164
+ f ? f(i) : /* @__PURE__ */ o.jsx(I, { item: i }),
165
+ (i.title || i.desc) && /* @__PURE__ */ o.jsxs(
166
+ d,
171
167
  {
172
168
  sx: {
173
169
  position: "absolute",
@@ -180,8 +176,8 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
180
176
  },
181
177
  onClick: (t) => t.stopPropagation(),
182
178
  children: [
183
- o.title && /* @__PURE__ */ i.jsx(w, { variant: "h6", sx: { fontWeight: 600, fontSize: { xs: 14, sm: 18, md: 20 } }, children: o.title }),
184
- o.desc && /* @__PURE__ */ i.jsx(w, { variant: "body2", sx: { opacity: 0.8, mt: 0.5 }, children: o.desc })
179
+ i.title && /* @__PURE__ */ o.jsx(z, { variant: "h6", sx: { fontWeight: 600, fontSize: { xs: 14, sm: 18, md: 20 } }, children: i.title }),
180
+ i.desc && /* @__PURE__ */ o.jsx(z, { variant: "body2", sx: { opacity: 0.8, mt: 0.5 }, children: i.desc })
185
181
  ]
186
182
  }
187
183
  )
@@ -189,28 +185,28 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
189
185
  }
190
186
  )
191
187
  },
192
- o.id
188
+ i.id
193
189
  ) })
194
190
  }
195
191
  )
196
192
  }
197
193
  ),
198
- /* @__PURE__ */ i.jsx(
194
+ /* @__PURE__ */ o.jsx(
199
195
  m,
200
196
  {
201
197
  "aria-label": "Close",
202
- onClick: r,
198
+ onClick: x,
203
199
  sx: {
204
200
  position: "absolute",
205
201
  top: { xs: 8, sm: 10, md: 12 },
206
202
  right: { xs: 8, sm: 10, md: 12 },
207
203
  zIndex: (t) => t.zIndex.modal + 102
208
204
  },
209
- children: /* @__PURE__ */ i.jsx(M, {})
205
+ children: /* @__PURE__ */ o.jsx(F, {})
210
206
  }
211
207
  ),
212
- R && p && /* @__PURE__ */ i.jsxs(
213
- l,
208
+ S && p && /* @__PURE__ */ o.jsxs(
209
+ d,
214
210
  {
215
211
  sx: {
216
212
  position: "absolute",
@@ -223,21 +219,21 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
223
219
  color: "text.primary"
224
220
  },
225
221
  children: [
226
- a + 1,
222
+ r + 1,
227
223
  " / ",
228
224
  g
229
225
  ]
230
226
  }
231
227
  ),
232
- p && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
233
- /* @__PURE__ */ i.jsx(
228
+ p && /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
229
+ /* @__PURE__ */ o.jsx(
234
230
  m,
235
231
  {
236
232
  "aria-label": "Previous image",
237
233
  onClick: (t) => {
238
234
  t.stopPropagation(), y();
239
235
  },
240
- disabled: a === 0,
236
+ disabled: r === 0,
241
237
  sx: {
242
238
  position: "absolute",
243
239
  left: { xs: 8, sm: 10, md: 12 },
@@ -248,17 +244,17 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
248
244
  opacity: 0.5
249
245
  }
250
246
  },
251
- children: /* @__PURE__ */ i.jsx($, {})
247
+ children: /* @__PURE__ */ o.jsx($, {})
252
248
  }
253
249
  ),
254
- /* @__PURE__ */ i.jsx(
250
+ /* @__PURE__ */ o.jsx(
255
251
  m,
256
252
  {
257
253
  "aria-label": "Next image",
258
254
  onClick: (t) => {
259
255
  t.stopPropagation(), j();
260
256
  },
261
- disabled: a === g - 1,
257
+ disabled: r === g - 1,
262
258
  sx: {
263
259
  position: "absolute",
264
260
  right: { xs: 8, sm: 10, md: 12 },
@@ -269,7 +265,7 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
269
265
  opacity: 0.5
270
266
  }
271
267
  },
272
- children: /* @__PURE__ */ i.jsx(B, {})
268
+ children: /* @__PURE__ */ o.jsx(B, {})
273
269
  }
274
270
  )
275
271
  ] })
@@ -278,16 +274,16 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
278
274
  )
279
275
  }
280
276
  ),
281
- S && p && n.length > 1 && /* @__PURE__ */ i.jsx(
282
- u.div,
277
+ E && p && n.length > 1 && /* @__PURE__ */ o.jsx(
278
+ h.div,
283
279
  {
284
280
  drag: !0,
285
281
  dragMomentum: !1,
286
282
  dragElastic: 0.1,
287
283
  initial: !1,
288
284
  animate: { x: v.x, y: v.y },
289
- onDragEnd: (t, d) => {
290
- L((x) => ({ x: x.x + d.offset.x, y: x.y + d.offset.y }));
285
+ onDragEnd: (t, a) => {
286
+ R((c) => ({ x: c.x + a.offset.x, y: c.y + a.offset.y }));
291
287
  },
292
288
  style: {
293
289
  position: "fixed",
@@ -297,7 +293,7 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
297
293
  transform: "translateX(-50%)",
298
294
  touchAction: "none"
299
295
  },
300
- children: /* @__PURE__ */ i.jsx(
296
+ children: /* @__PURE__ */ o.jsx(
301
297
  b,
302
298
  {
303
299
  elevation: 8,
@@ -313,11 +309,11 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
313
309
  px: 1.5,
314
310
  py: 1
315
311
  },
316
- children: /* @__PURE__ */ i.jsx(T, { direction: "row", alignItems: "center", spacing: -1.5, children: n.map((t, d) => /* @__PURE__ */ i.jsxs(
317
- u.div,
312
+ children: /* @__PURE__ */ o.jsx(L, { direction: "row", alignItems: "center", spacing: -1.5, children: n.map((t, a) => /* @__PURE__ */ o.jsxs(
313
+ h.div,
318
314
  {
319
- onClick: (x) => {
320
- x.stopPropagation(), e ? e(t) : h(t);
315
+ onClick: (c) => {
316
+ c.stopPropagation(), e ? e(t) : u(t);
321
317
  },
322
318
  style: {
323
319
  position: "relative",
@@ -326,16 +322,16 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
326
322
  borderRadius: 10,
327
323
  overflow: "hidden",
328
324
  flexShrink: 0,
329
- zIndex: o.id === t.id ? 30 : n.length - d,
330
- border: o.id === t.id ? "2px solid" : void 0,
331
- borderColor: o.id === t.id ? "divider" : void 0,
325
+ zIndex: i.id === t.id ? 30 : n.length - a,
326
+ border: i.id === t.id ? "2px solid" : void 0,
327
+ borderColor: i.id === t.id ? "divider" : void 0,
332
328
  cursor: "pointer"
333
329
  },
334
- initial: { rotate: d % 2 === 0 ? -15 : 15 },
330
+ initial: { rotate: a % 2 === 0 ? -15 : 15 },
335
331
  animate: {
336
- scale: o.id === t.id ? 1.2 : 1,
337
- rotate: o.id === t.id ? 0 : d % 2 === 0 ? -15 : 15,
338
- y: o.id === t.id ? -8 : 0
332
+ scale: i.id === t.id ? 1.2 : 1,
333
+ rotate: i.id === t.id ? 0 : a % 2 === 0 ? -15 : 15,
334
+ y: i.id === t.id ? -8 : 0
339
335
  },
340
336
  whileHover: {
341
337
  scale: 1.3,
@@ -345,8 +341,8 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
345
341
  },
346
342
  children: [
347
343
  f ? f(t, () => {
348
- e ? e(t) : h(t);
349
- }) : /* @__PURE__ */ i.jsx(
344
+ e ? e(t) : u(t);
345
+ }) : /* @__PURE__ */ o.jsx(
350
346
  I,
351
347
  {
352
348
  item: t,
@@ -360,19 +356,19 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
360
356
  disableVideoControls: !0
361
357
  }
362
358
  ),
363
- /* @__PURE__ */ i.jsx(
364
- l,
359
+ /* @__PURE__ */ o.jsx(
360
+ d,
365
361
  {
366
362
  sx: {
367
363
  position: "absolute",
368
364
  inset: 0,
369
- background: (x) => `linear-gradient(to bottom, transparent, ${x.palette.action.hover}, ${x.palette.action.selected})`,
365
+ background: (c) => `linear-gradient(to bottom, transparent, ${c.palette.action.hover}, ${c.palette.action.selected})`,
370
366
  pointerEvents: "none"
371
367
  }
372
368
  }
373
369
  ),
374
- o.id === t.id && /* @__PURE__ */ i.jsx(
375
- u.div,
370
+ i.id === t.id && /* @__PURE__ */ o.jsx(
371
+ h.div,
376
372
  {
377
373
  layoutId: "activeGlow",
378
374
  style: {
@@ -400,5 +396,5 @@ const $ = P(/* @__PURE__ */ i.jsx("path", {
400
396
  };
401
397
  export {
402
398
  I as DefaultMediaItem,
403
- V as default
399
+ M as default
404
400
  };