@solostylist/ui-kit 1.0.171 → 1.0.172
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.
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +79 -80
- package/dist/s-breadcrumbs/s-breadcrumbs.js +2 -2
- package/dist/s-button-link/s-button-link.js +2 -2
- package/dist/s-chat-input/s-chat-input.js +29 -29
- package/dist/s-chat-message/s-chat-message.js +14 -70
- package/dist/s-comment-message/s-comment-message.js +9 -9
- package/dist/s-countdown/s-count-box.js +2 -2
- package/dist/s-countdown/s-count-down.js +2 -2
- package/dist/s-error-layout/s-error-layout.js +2 -2
- package/dist/s-gallery/s-gallery.js +106 -119
- package/dist/s-glow-button/s-glow-button.d.ts +7 -1
- package/dist/s-glow-button/s-glow-button.js +39 -188
- package/dist/s-review/s-review.js +28 -28
- package/dist/s-skeleton/s-skeleton.js +2 -2
- package/dist/s-stripe/s-stripe.js +2 -2
- package/dist/s-tabs/s-tab-panel.js +2 -2
- package/dist/s-theme-demo/s-theme-demo.js +65 -65
- package/dist/s-theme-provider/s-theme-provider.js +2 -2
- package/dist/s-theme-switch/s-theme-switch.js +1 -1
- package/dist/theme/theme-primitives.d.ts +1 -0
- package/dist/theme/theme-primitives.js +29 -28
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import g, { useEffect as $, useState as J, useMemo as H, useCallback as q } from
|
|
|
3
3
|
import { c as S } from "../createSvgIcon-DxwgGAVe.js";
|
|
4
4
|
import { C as Q } from "../Close-BRlEKA2Q.js";
|
|
5
5
|
import { D as Y } from "../Download-UsLvGg3y.js";
|
|
6
|
-
import { TextField as K, Typography as Z, Box as a, Slider as ee, IconButton as A, Checkbox as
|
|
6
|
+
import { TextField as K, Typography as Z, Box as a, Slider as ee, IconButton as A, Checkbox as te, Divider as oe, Tooltip as _, Dialog as ne, DialogTitle as le, DialogContent as ae } from "@mui/material";
|
|
7
7
|
import { createPortal as re } from "react-dom";
|
|
8
8
|
import { SSelect as se } from "../s-select/s-select.js";
|
|
9
9
|
const ie = S(/* @__PURE__ */ e.jsx("path", {
|
|
@@ -15,36 +15,35 @@ const ie = S(/* @__PURE__ */ e.jsx("path", {
|
|
|
15
15
|
}), "InfoOutlined"), ce = S(/* @__PURE__ */ e.jsx("path", {
|
|
16
16
|
d: "M8 5v14l11-7z"
|
|
17
17
|
}), "PlayArrow");
|
|
18
|
-
var N = /* @__PURE__ */ ((
|
|
19
|
-
const fe = g.memo(({ input:
|
|
18
|
+
var N = /* @__PURE__ */ ((t) => (t.TEXTAREA = "textarea", t.SLIDER = "slider", t.IMAGE = "image", t.NUMBER = "number", t.SELECT = "select", t.CHECKBOX = "checkbox", t))(N || {});
|
|
19
|
+
const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsx(
|
|
20
20
|
K,
|
|
21
21
|
{
|
|
22
22
|
value: l,
|
|
23
23
|
onChange: (c) => u(c.target.value),
|
|
24
24
|
onFocus: r,
|
|
25
25
|
onBlur: p,
|
|
26
|
-
placeholder:
|
|
26
|
+
placeholder: t.placeholder || t.label,
|
|
27
27
|
disabled: d,
|
|
28
28
|
multiline: !0,
|
|
29
|
-
minRows:
|
|
30
|
-
maxRows:
|
|
29
|
+
minRows: t.minRows ?? 2,
|
|
30
|
+
maxRows: t.maxRows ?? 5,
|
|
31
31
|
fullWidth: !0
|
|
32
32
|
}
|
|
33
|
-
)), P = g.memo((
|
|
33
|
+
)), P = g.memo((t) => /* @__PURE__ */ e.jsx(
|
|
34
34
|
Z,
|
|
35
35
|
{
|
|
36
36
|
variant: "caption",
|
|
37
37
|
sx: {
|
|
38
|
-
color: "text.secondary",
|
|
39
38
|
whiteSpace: "nowrap",
|
|
40
39
|
overflow: "hidden",
|
|
41
40
|
textOverflow: "ellipsis",
|
|
42
41
|
width: "100% !important",
|
|
43
42
|
textAlign: "center"
|
|
44
43
|
},
|
|
45
|
-
children:
|
|
44
|
+
children: t.label
|
|
46
45
|
}
|
|
47
|
-
)), pe = g.memo(({ input:
|
|
46
|
+
)), pe = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
48
47
|
a,
|
|
49
48
|
{
|
|
50
49
|
sx: {
|
|
@@ -53,12 +52,12 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
53
52
|
flexDirection: "column"
|
|
54
53
|
},
|
|
55
54
|
children: [
|
|
56
|
-
/* @__PURE__ */ e.jsx(P, { label:
|
|
55
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
57
56
|
/* @__PURE__ */ e.jsx(
|
|
58
57
|
K,
|
|
59
58
|
{
|
|
60
59
|
type: "number",
|
|
61
|
-
value: l ??
|
|
60
|
+
value: l ?? t.defaultValue ?? 0,
|
|
62
61
|
onChange: (c) => u(Number(c.target.value)),
|
|
63
62
|
onFocus: r,
|
|
64
63
|
onBlur: p,
|
|
@@ -66,9 +65,9 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
66
65
|
size: "small",
|
|
67
66
|
slotProps: {
|
|
68
67
|
htmlInput: {
|
|
69
|
-
min:
|
|
70
|
-
max:
|
|
71
|
-
step:
|
|
68
|
+
min: t.min,
|
|
69
|
+
max: t.max,
|
|
70
|
+
step: t.step
|
|
72
71
|
}
|
|
73
72
|
},
|
|
74
73
|
sx: {
|
|
@@ -80,7 +79,7 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
80
79
|
)
|
|
81
80
|
]
|
|
82
81
|
}
|
|
83
|
-
)), me = g.memo(({ input:
|
|
82
|
+
)), me = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
84
83
|
a,
|
|
85
84
|
{
|
|
86
85
|
sx: {
|
|
@@ -89,27 +88,27 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
89
88
|
flexDirection: "column"
|
|
90
89
|
},
|
|
91
90
|
children: [
|
|
92
|
-
/* @__PURE__ */ e.jsx(P, { label:
|
|
91
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
93
92
|
/* @__PURE__ */ e.jsx(
|
|
94
93
|
se,
|
|
95
94
|
{
|
|
96
|
-
value: l ??
|
|
95
|
+
value: l ?? t.defaultValue ?? "",
|
|
97
96
|
onChange: (c) => u(c.target.value),
|
|
98
97
|
onFocus: r,
|
|
99
98
|
onBlur: p,
|
|
100
99
|
disabled: d,
|
|
101
|
-
placeholder:
|
|
102
|
-
options:
|
|
103
|
-
optionLabel:
|
|
104
|
-
optionValue:
|
|
105
|
-
searchable:
|
|
106
|
-
searchPlaceholder:
|
|
100
|
+
placeholder: t.placeholder,
|
|
101
|
+
options: t.options || [],
|
|
102
|
+
optionLabel: t.optionLabel,
|
|
103
|
+
optionValue: t.optionValue,
|
|
104
|
+
searchable: t.searchable,
|
|
105
|
+
searchPlaceholder: t.searchPlaceholder,
|
|
107
106
|
size: "small"
|
|
108
107
|
}
|
|
109
108
|
)
|
|
110
109
|
]
|
|
111
110
|
}
|
|
112
|
-
)), he = g.memo(({ input:
|
|
111
|
+
)), he = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
113
112
|
a,
|
|
114
113
|
{
|
|
115
114
|
sx: {
|
|
@@ -118,19 +117,19 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
118
117
|
flexDirection: "column"
|
|
119
118
|
},
|
|
120
119
|
children: [
|
|
121
|
-
/* @__PURE__ */ e.jsx(P, { label:
|
|
120
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
122
121
|
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", height: 36 }, children: [
|
|
123
122
|
/* @__PURE__ */ e.jsx(
|
|
124
123
|
ee,
|
|
125
124
|
{
|
|
126
|
-
value: l ??
|
|
125
|
+
value: l ?? t.defaultValue ?? t.min ?? 0,
|
|
127
126
|
onChange: (c, b) => u(b),
|
|
128
127
|
onMouseDown: r,
|
|
129
128
|
onMouseUp: p,
|
|
130
129
|
disabled: d,
|
|
131
|
-
min:
|
|
132
|
-
max:
|
|
133
|
-
step:
|
|
130
|
+
min: t.min ?? 0,
|
|
131
|
+
max: t.max ?? 100,
|
|
132
|
+
step: t.step ?? 1,
|
|
134
133
|
size: "small",
|
|
135
134
|
sx: { flex: 1 }
|
|
136
135
|
}
|
|
@@ -144,14 +143,14 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
144
143
|
fontWeight: 500,
|
|
145
144
|
fontSize: "0.875rem"
|
|
146
145
|
},
|
|
147
|
-
children: l ??
|
|
146
|
+
children: l ?? t.defaultValue ?? t.min ?? 0
|
|
148
147
|
}
|
|
149
148
|
)
|
|
150
149
|
] })
|
|
151
150
|
]
|
|
152
151
|
}
|
|
153
|
-
)), xe = g.memo(({ input:
|
|
154
|
-
const p = g.useRef(null), [d, c] = g.useState([]), [b, R] = g.useState(null), j =
|
|
152
|
+
)), xe = g.memo(({ input: t, value: l, onChange: u, disabled: r }) => {
|
|
153
|
+
const p = g.useRef(null), [d, c] = g.useState([]), [b, R] = g.useState(null), j = t.multiple ?? !1, w = t.maxImages ?? 5;
|
|
155
154
|
$(() => {
|
|
156
155
|
let m = [];
|
|
157
156
|
return c(((s) => {
|
|
@@ -285,7 +284,7 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
285
284
|
}
|
|
286
285
|
)
|
|
287
286
|
] });
|
|
288
|
-
}), ye = g.memo(({ input:
|
|
287
|
+
}), ye = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
289
288
|
a,
|
|
290
289
|
{
|
|
291
290
|
sx: {
|
|
@@ -295,11 +294,11 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
295
294
|
minWidth: 60
|
|
296
295
|
},
|
|
297
296
|
children: [
|
|
298
|
-
/* @__PURE__ */ e.jsx(P, { label:
|
|
297
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
299
298
|
/* @__PURE__ */ e.jsx(
|
|
300
|
-
|
|
299
|
+
te,
|
|
301
300
|
{
|
|
302
|
-
checked: l ??
|
|
301
|
+
checked: l ?? t.defaultValue ?? !1,
|
|
303
302
|
onChange: (c) => u(c.target.checked),
|
|
304
303
|
onFocus: r,
|
|
305
304
|
onBlur: p,
|
|
@@ -309,25 +308,25 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
309
308
|
)
|
|
310
309
|
]
|
|
311
310
|
}
|
|
312
|
-
)), M = (
|
|
313
|
-
switch (
|
|
311
|
+
)), M = (t) => {
|
|
312
|
+
switch (t.input.type) {
|
|
314
313
|
case "textarea":
|
|
315
|
-
return /* @__PURE__ */ e.jsx(fe, { ...
|
|
314
|
+
return /* @__PURE__ */ e.jsx(fe, { ...t });
|
|
316
315
|
case "number":
|
|
317
|
-
return /* @__PURE__ */ e.jsx(pe, { ...
|
|
316
|
+
return /* @__PURE__ */ e.jsx(pe, { ...t });
|
|
318
317
|
case "slider":
|
|
319
|
-
return /* @__PURE__ */ e.jsx(he, { ...
|
|
318
|
+
return /* @__PURE__ */ e.jsx(he, { ...t });
|
|
320
319
|
case "select":
|
|
321
|
-
return /* @__PURE__ */ e.jsx(me, { ...
|
|
320
|
+
return /* @__PURE__ */ e.jsx(me, { ...t });
|
|
322
321
|
case "image":
|
|
323
|
-
return /* @__PURE__ */ e.jsx(xe, { input:
|
|
322
|
+
return /* @__PURE__ */ e.jsx(xe, { input: t.input, value: t.value, onChange: t.onChange, disabled: t.disabled });
|
|
324
323
|
case "checkbox":
|
|
325
|
-
return /* @__PURE__ */ e.jsx(ye, { ...
|
|
324
|
+
return /* @__PURE__ */ e.jsx(ye, { ...t });
|
|
326
325
|
default:
|
|
327
326
|
return null;
|
|
328
327
|
}
|
|
329
328
|
}, L = ({
|
|
330
|
-
inputs:
|
|
329
|
+
inputs: t = [],
|
|
331
330
|
onProcess: l,
|
|
332
331
|
onReset: u,
|
|
333
332
|
onDownload: r,
|
|
@@ -348,22 +347,22 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
348
347
|
position: v = "bottom",
|
|
349
348
|
relative: i = !1
|
|
350
349
|
}) => {
|
|
351
|
-
const [I, T] = J(!1), O = H(() =>
|
|
352
|
-
if (!
|
|
353
|
-
const n = c[
|
|
354
|
-
return
|
|
355
|
-
}), [
|
|
356
|
-
(
|
|
350
|
+
const [I, T] = J(!1), O = H(() => t.length === 0 ? !0 : t.every((o) => {
|
|
351
|
+
if (!o.required) return !0;
|
|
352
|
+
const n = c[o.key];
|
|
353
|
+
return o.type === "textarea" ? n && typeof n == "string" && n.trim() !== "" : o.type === "number" || o.type === "slider" ? n != null : o.type === "select" ? n != null && n !== "" : !0;
|
|
354
|
+
}), [t, c]), { imageInputs: z, textareaInputs: W, paramInputs: E } = H(() => t.reduce(
|
|
355
|
+
(o, n) => (n.type === "image" ? o.imageInputs.push(n) : n.type === "textarea" ? o.textareaInputs.push(n) : o.paramInputs.push(n), o),
|
|
357
356
|
{
|
|
358
357
|
imageInputs: [],
|
|
359
358
|
textareaInputs: [],
|
|
360
359
|
paramInputs: []
|
|
361
360
|
}
|
|
362
|
-
), [
|
|
361
|
+
), [t]), V = q(() => {
|
|
363
362
|
}, []), k = q(() => {
|
|
364
363
|
}, []), C = q(
|
|
365
|
-
(
|
|
366
|
-
b == null || b(
|
|
364
|
+
(o, n, y) => {
|
|
365
|
+
b == null || b(o, n, y);
|
|
367
366
|
},
|
|
368
367
|
[b]
|
|
369
368
|
), X = q(() => T(!0), []), G = q(() => T(!1), []), U = /* @__PURE__ */ e.jsxs(
|
|
@@ -395,25 +394,25 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
395
394
|
bgcolor: "background.default"
|
|
396
395
|
},
|
|
397
396
|
children: [
|
|
398
|
-
W.length > 0 && /* @__PURE__ */ e.jsx(a, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: W.map((
|
|
399
|
-
const n = c[
|
|
400
|
-
return
|
|
397
|
+
W.length > 0 && /* @__PURE__ */ e.jsx(a, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: W.map((o) => {
|
|
398
|
+
const n = c[o.key], y = (h == null ? void 0 : h(o.key)) ?? !1;
|
|
399
|
+
return o.renderInput ? /* @__PURE__ */ e.jsx(a, { children: o.renderInput({
|
|
401
400
|
value: n,
|
|
402
|
-
onChange: (x) => C(
|
|
401
|
+
onChange: (x) => C(o.key, x),
|
|
403
402
|
onFocus: V,
|
|
404
403
|
onBlur: k,
|
|
405
404
|
disabled: y
|
|
406
|
-
}) },
|
|
405
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
407
406
|
M,
|
|
408
407
|
{
|
|
409
|
-
input:
|
|
408
|
+
input: o,
|
|
410
409
|
value: n,
|
|
411
|
-
onChange: (x) => C(
|
|
410
|
+
onChange: (x) => C(o.key, x),
|
|
412
411
|
onFocus: V,
|
|
413
412
|
onBlur: k,
|
|
414
413
|
disabled: y
|
|
415
414
|
},
|
|
416
|
-
|
|
415
|
+
o.key
|
|
417
416
|
);
|
|
418
417
|
}) }),
|
|
419
418
|
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
@@ -427,52 +426,52 @@ const fe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, dis
|
|
|
427
426
|
flex: 1
|
|
428
427
|
},
|
|
429
428
|
children: (z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "flex-end", gap: 1.5 }, children: [
|
|
430
|
-
z.map((
|
|
431
|
-
const n = c[
|
|
432
|
-
return
|
|
429
|
+
z.map((o) => {
|
|
430
|
+
const n = c[o.key], y = (h == null ? void 0 : h(o.key)) ?? !1;
|
|
431
|
+
return o.renderInput ? /* @__PURE__ */ e.jsx(a, { children: o.renderInput({
|
|
433
432
|
value: n,
|
|
434
|
-
onChange: (x) => C(
|
|
433
|
+
onChange: (x) => C(o.key, x),
|
|
435
434
|
onFocus: V,
|
|
436
435
|
onBlur: k,
|
|
437
436
|
disabled: y
|
|
438
|
-
}) },
|
|
437
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
439
438
|
M,
|
|
440
439
|
{
|
|
441
|
-
input:
|
|
440
|
+
input: o,
|
|
442
441
|
value: n,
|
|
443
|
-
onChange: (x) => C(
|
|
442
|
+
onChange: (x) => C(o.key, x),
|
|
444
443
|
onFocus: V,
|
|
445
444
|
onBlur: k,
|
|
446
445
|
disabled: y
|
|
447
446
|
},
|
|
448
|
-
|
|
447
|
+
o.key
|
|
449
448
|
);
|
|
450
449
|
}),
|
|
451
|
-
E.map((
|
|
452
|
-
const n = c[
|
|
453
|
-
return
|
|
450
|
+
E.map((o) => {
|
|
451
|
+
const n = c[o.key], y = (h == null ? void 0 : h(o.key)) ?? !1;
|
|
452
|
+
return o.renderInput ? /* @__PURE__ */ e.jsx(a, { children: o.renderInput({
|
|
454
453
|
value: n,
|
|
455
|
-
onChange: (x) => C(
|
|
454
|
+
onChange: (x) => C(o.key, x),
|
|
456
455
|
onFocus: V,
|
|
457
456
|
onBlur: k,
|
|
458
457
|
disabled: y
|
|
459
|
-
}) },
|
|
458
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
460
459
|
M,
|
|
461
460
|
{
|
|
462
|
-
input:
|
|
461
|
+
input: o,
|
|
463
462
|
value: n,
|
|
464
|
-
onChange: (x) => C(
|
|
463
|
+
onChange: (x) => C(o.key, x),
|
|
465
464
|
onFocus: V,
|
|
466
465
|
onBlur: k,
|
|
467
466
|
disabled: y
|
|
468
467
|
},
|
|
469
|
-
|
|
468
|
+
o.key
|
|
470
469
|
);
|
|
471
470
|
})
|
|
472
471
|
] })
|
|
473
472
|
}
|
|
474
473
|
),
|
|
475
|
-
(z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsx(
|
|
474
|
+
(z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsx(oe, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5, flexShrink: 0 } }),
|
|
476
475
|
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75, ml: "auto" }, children: [
|
|
477
476
|
R,
|
|
478
477
|
s && /* @__PURE__ */ e.jsx(_, { title: m, children: /* @__PURE__ */ e.jsx(A, { onClick: X, children: /* @__PURE__ */ e.jsx(ue, {}) }) }),
|
|
@@ -39,11 +39,11 @@ const l = b(
|
|
|
39
39
|
);
|
|
40
40
|
l.displayName = "SBreadcrumbs";
|
|
41
41
|
try {
|
|
42
|
-
l.displayName = "SBreadcrumbs", l.__docgenInfo = { description: "A breadcrumb navigation component for displaying hierarchical navigation paths.", displayName: "SBreadcrumbs", props: {
|
|
42
|
+
l.displayName = "SBreadcrumbs", l.__docgenInfo = { description: "A breadcrumb navigation component for displaying hierarchical navigation paths.", displayName: "SBreadcrumbs", props: { separator: { defaultValue: { value: '<ChevronRightIcon fontSize="small" />' }, description: "Custom separator element between breadcrumb items", name: "separator", required: !1, type: { name: "ReactNode" } }, sx: { defaultValue: null, description: "System prop for custom styling", name: "sx", required: !1, type: { name: "SxProps<Theme>" } }, LinkComponent: { defaultValue: null, description: "Custom link component (e.g., React Router Link) for navigation", name: "LinkComponent", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, linkColor: { defaultValue: { value: "primary.main" }, description: "Color of clickable breadcrumb links", name: "linkColor", required: !1, type: { name: "string" } }, items: { defaultValue: null, description: "Array of breadcrumb items to display", name: "items", required: !0, type: { name: "BreadcrumbItem[]" } }, currentColor: { defaultValue: { value: "text.primary" }, description: "Color of the current (active) breadcrumb item", name: "currentColor", required: !1, type: { name: "string" } } } };
|
|
43
43
|
} catch {
|
|
44
44
|
}
|
|
45
45
|
try {
|
|
46
|
-
sbreadcrumbs.displayName = "sbreadcrumbs", sbreadcrumbs.__docgenInfo = { description: "A breadcrumb navigation component for displaying hierarchical navigation paths.", displayName: "sbreadcrumbs", props: {
|
|
46
|
+
sbreadcrumbs.displayName = "sbreadcrumbs", sbreadcrumbs.__docgenInfo = { description: "A breadcrumb navigation component for displaying hierarchical navigation paths.", displayName: "sbreadcrumbs", props: { separator: { defaultValue: { value: '<ChevronRightIcon fontSize="small" />' }, description: "Custom separator element between breadcrumb items", name: "separator", required: !1, type: { name: "ReactNode" } }, sx: { defaultValue: null, description: "System prop for custom styling", name: "sx", required: !1, type: { name: "SxProps<Theme>" } }, LinkComponent: { defaultValue: null, description: "Custom link component (e.g., React Router Link) for navigation", name: "LinkComponent", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, linkColor: { defaultValue: { value: "primary.main" }, description: "Color of clickable breadcrumb links", name: "linkColor", required: !1, type: { name: "string" } }, items: { defaultValue: null, description: "Array of breadcrumb items to display", name: "items", required: !0, type: { name: "BreadcrumbItem[]" } }, currentColor: { defaultValue: { value: "text.primary" }, description: "Color of the current (active) breadcrumb item", name: "currentColor", required: !1, type: { name: "string" } } } };
|
|
47
47
|
} catch {
|
|
48
48
|
}
|
|
49
49
|
export {
|
|
@@ -32,11 +32,11 @@ const t = ({
|
|
|
32
32
|
] });
|
|
33
33
|
t.displayName = "SButtonLink";
|
|
34
34
|
try {
|
|
35
|
-
t.displayName = "SButtonLink", t.__docgenInfo = { description: "A flexible link component that combines text and a clickable link element.", displayName: "SButtonLink", props: { beforeText: { defaultValue: { value: "" }, description: "Text or element displayed before the main link", name: "beforeText", required: !1, type: { name: "ReactNode" } }, afterText: { defaultValue: { value: "" }, description: "Text or element displayed after the main link", name: "afterText", required: !1, type: { name: "ReactNode" } }, mainText: { defaultValue: { value: "" }, description: "The main clickable link text or element", name: "mainText", required: !1, type: { name: "ReactNode" } }, href: { defaultValue: { value: "#" }, description: "URL for the link (defaults to '#')", name: "href", required: !1, type: { name: "string" } }, component: { defaultValue: { value: "a" }, description: "Component to render the link as (e.g., RouterLink for client-side routing)", name: "component", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, target: { defaultValue: null, description: "Target attribute for the link (e.g., '_blank' for new tab)", name: "target", required: !1, type: { name: "string" } }, color: { defaultValue: { value: "text.secondary" }, description: "Color of the surrounding text", name: "color", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "
|
|
35
|
+
t.displayName = "SButtonLink", t.__docgenInfo = { description: "A flexible link component that combines text and a clickable link element.", displayName: "SButtonLink", props: { beforeText: { defaultValue: { value: "" }, description: "Text or element displayed before the main link", name: "beforeText", required: !1, type: { name: "ReactNode" } }, afterText: { defaultValue: { value: "" }, description: "Text or element displayed after the main link", name: "afterText", required: !1, type: { name: "ReactNode" } }, mainText: { defaultValue: { value: "" }, description: "The main clickable link text or element", name: "mainText", required: !1, type: { name: "ReactNode" } }, href: { defaultValue: { value: "#" }, description: "URL for the link (defaults to '#')", name: "href", required: !1, type: { name: "string" } }, component: { defaultValue: { value: "a" }, description: "Component to render the link as (e.g., RouterLink for client-side routing)", name: "component", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, target: { defaultValue: null, description: "Target attribute for the link (e.g., '_blank' for new tab)", name: "target", required: !1, type: { name: "string" } }, color: { defaultValue: { value: "text.secondary" }, description: "Color of the surrounding text", name: "color", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "error" | "info" | "success" | "warning" | "textPrimary" | "textSecondary" | "textDisabled", TypographyPropsColorOverrides>' } }, linkColor: { defaultValue: { value: "undefined" }, description: "Color of the link itself (overrides default link color)", name: "linkColor", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "error" | "info" | "success" | "warning" | "textPrimary" | "textSecondary" | "textDisabled", TypographyPropsColorOverrides>' } }, lineHeight: { defaultValue: null, description: "Line height for the typography", name: "lineHeight", required: !1, type: { name: "ResponsiveStyleValue<LineHeight<string | number> | readonly NonNullable<LineHeight<string | number>>[]> | ((theme: Theme) => ResponsiveStyleValue<...>)" } }, variant: { defaultValue: { value: "body2" }, description: "Typography variant for the container text", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"inherit"' }, { value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, onClick: { defaultValue: null, description: "Click handler for the link", name: "onClick", required: !1, type: { name: "MouseEventHandler<HTMLAnchorElement>" } } } };
|
|
36
36
|
} catch {
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
sbuttonlink.displayName = "sbuttonlink", sbuttonlink.__docgenInfo = { description: "A flexible link component that combines text and a clickable link element.", displayName: "sbuttonlink", props: { beforeText: { defaultValue: { value: "" }, description: "Text or element displayed before the main link", name: "beforeText", required: !1, type: { name: "ReactNode" } }, afterText: { defaultValue: { value: "" }, description: "Text or element displayed after the main link", name: "afterText", required: !1, type: { name: "ReactNode" } }, mainText: { defaultValue: { value: "" }, description: "The main clickable link text or element", name: "mainText", required: !1, type: { name: "ReactNode" } }, href: { defaultValue: { value: "#" }, description: "URL for the link (defaults to '#')", name: "href", required: !1, type: { name: "string" } }, component: { defaultValue: { value: "a" }, description: "Component to render the link as (e.g., RouterLink for client-side routing)", name: "component", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, target: { defaultValue: null, description: "Target attribute for the link (e.g., '_blank' for new tab)", name: "target", required: !1, type: { name: "string" } }, color: { defaultValue: { value: "text.secondary" }, description: "Color of the surrounding text", name: "color", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "
|
|
39
|
+
sbuttonlink.displayName = "sbuttonlink", sbuttonlink.__docgenInfo = { description: "A flexible link component that combines text and a clickable link element.", displayName: "sbuttonlink", props: { beforeText: { defaultValue: { value: "" }, description: "Text or element displayed before the main link", name: "beforeText", required: !1, type: { name: "ReactNode" } }, afterText: { defaultValue: { value: "" }, description: "Text or element displayed after the main link", name: "afterText", required: !1, type: { name: "ReactNode" } }, mainText: { defaultValue: { value: "" }, description: "The main clickable link text or element", name: "mainText", required: !1, type: { name: "ReactNode" } }, href: { defaultValue: { value: "#" }, description: "URL for the link (defaults to '#')", name: "href", required: !1, type: { name: "string" } }, component: { defaultValue: { value: "a" }, description: "Component to render the link as (e.g., RouterLink for client-side routing)", name: "component", required: !1, type: { name: "ElementType<any, keyof IntrinsicElements>" } }, target: { defaultValue: null, description: "Target attribute for the link (e.g., '_blank' for new tab)", name: "target", required: !1, type: { name: "string" } }, color: { defaultValue: { value: "text.secondary" }, description: "Color of the surrounding text", name: "color", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "error" | "info" | "success" | "warning" | "textPrimary" | "textSecondary" | "textDisabled", TypographyPropsColorOverrides>' } }, linkColor: { defaultValue: { value: "undefined" }, description: "Color of the link itself (overrides default link color)", name: "linkColor", required: !1, type: { name: '(string & {}) | OverridableStringUnion<"primary" | "secondary" | "error" | "info" | "success" | "warning" | "textPrimary" | "textSecondary" | "textDisabled", TypographyPropsColorOverrides>' } }, lineHeight: { defaultValue: null, description: "Line height for the typography", name: "lineHeight", required: !1, type: { name: "ResponsiveStyleValue<LineHeight<string | number> | readonly NonNullable<LineHeight<string | number>>[]> | ((theme: Theme) => ResponsiveStyleValue<...>)" } }, variant: { defaultValue: { value: "body2" }, description: "Typography variant for the container text", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"inherit"' }, { value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, onClick: { defaultValue: null, description: "Click handler for the link", name: "onClick", required: !1, type: { name: "MouseEventHandler<HTMLAnchorElement>" } } } };
|
|
40
40
|
} catch {
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as r } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
2
|
import { forwardRef as A, useState as c, useRef as L, useId as O, useEffect as D } from "react";
|
|
3
|
-
import { Box as
|
|
3
|
+
import { Box as i, outlinedInputClasses as K, Typography as I, Popper as B, ClickAwayListener as N } from "@mui/material";
|
|
4
4
|
import W from "emoji-picker-react";
|
|
5
5
|
import { SFileIcon as H } from "../s-file-icon/s-file-icon.js";
|
|
6
6
|
import { SIconButton as p } from "../s-icon-button/s-icon-button.js";
|
|
@@ -13,14 +13,14 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
13
13
|
}), "AttachFile"), Y = S(/* @__PURE__ */ r.jsx("path", {
|
|
14
14
|
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"
|
|
15
15
|
}), "EmojiEmotions"), j = A(
|
|
16
|
-
({ onSubmit: l, onFileSelect: u, disabled:
|
|
16
|
+
({ onSubmit: l, onFileSelect: u, disabled: a, acceptedFileTypes: E, maxFileSize: v, ...z }, _) => {
|
|
17
17
|
const [m, f] = c(""), [d, h] = c([]), [s, b] = c(/* @__PURE__ */ new Map()), [k, x] = c(!1), C = L(null), w = O(), g = (e) => e.type.startsWith("image/"), V = (e) => {
|
|
18
18
|
const t = `${e.name}-${e.size}-${e.lastModified}`;
|
|
19
19
|
if (s.has(t))
|
|
20
20
|
return s.get(t);
|
|
21
21
|
if (g(e)) {
|
|
22
|
-
const
|
|
23
|
-
return b((
|
|
22
|
+
const n = URL.createObjectURL(e);
|
|
23
|
+
return b((o) => new Map(o).set(t, n)), n;
|
|
24
24
|
}
|
|
25
25
|
return "";
|
|
26
26
|
}, M = (e) => {
|
|
@@ -30,31 +30,31 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
30
30
|
}, $ = () => {
|
|
31
31
|
x(!k);
|
|
32
32
|
}, F = () => {
|
|
33
|
-
|
|
33
|
+
a || m.trim().length === 0 && d.length === 0 || (l == null || l(m, d), f(""), s.forEach((e) => URL.revokeObjectURL(e)), b(/* @__PURE__ */ new Map()), h([]));
|
|
34
34
|
}, q = (e) => {
|
|
35
|
-
const
|
|
36
|
-
h((
|
|
35
|
+
const n = Array.from(e.target.files || []).filter((o) => !(v && o.size > v));
|
|
36
|
+
h((o) => [...o, ...n]), u == null || u(n), e.target.value = "";
|
|
37
37
|
}, P = (e) => {
|
|
38
38
|
const t = d[e];
|
|
39
39
|
if (t && g(t)) {
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const n = `${t.name}-${t.size}-${t.lastModified}`, o = s.get(n);
|
|
41
|
+
o && (URL.revokeObjectURL(o), b((y) => {
|
|
42
42
|
const R = new Map(y);
|
|
43
|
-
return R.delete(
|
|
43
|
+
return R.delete(n), R;
|
|
44
44
|
}));
|
|
45
45
|
}
|
|
46
|
-
h((
|
|
46
|
+
h((n) => n.filter((o, y) => y !== e));
|
|
47
47
|
}, T = (e) => {
|
|
48
48
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), F());
|
|
49
49
|
};
|
|
50
50
|
return D(() => () => {
|
|
51
51
|
s.forEach((e) => URL.revokeObjectURL(e));
|
|
52
|
-
}, [s]), /* @__PURE__ */ r.jsxs(
|
|
52
|
+
}, [s]), /* @__PURE__ */ r.jsxs(i, { border: "1px solid", borderColor: "divider", borderRadius: 2, padding: "8px 12px", children: [
|
|
53
53
|
/* @__PURE__ */ r.jsx(
|
|
54
54
|
G,
|
|
55
55
|
{
|
|
56
56
|
placeholder: "Enter your message here...",
|
|
57
|
-
disabled:
|
|
57
|
+
disabled: a,
|
|
58
58
|
value: m,
|
|
59
59
|
onChange: M,
|
|
60
60
|
onKeyDown: T,
|
|
@@ -90,10 +90,10 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
90
90
|
...z
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
|
-
d.length > 0 && /* @__PURE__ */ r.jsx(
|
|
94
|
-
const
|
|
93
|
+
d.length > 0 && /* @__PURE__ */ r.jsx(i, { mt: 1, children: d.map((e, t) => {
|
|
94
|
+
const n = g(e), o = e.name.split(".").pop();
|
|
95
95
|
return /* @__PURE__ */ r.jsxs(
|
|
96
|
-
|
|
96
|
+
i,
|
|
97
97
|
{
|
|
98
98
|
display: "flex",
|
|
99
99
|
alignItems: "center",
|
|
@@ -107,9 +107,9 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
107
107
|
mb: 0.5
|
|
108
108
|
},
|
|
109
109
|
children: [
|
|
110
|
-
/* @__PURE__ */ r.jsxs(
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
/* @__PURE__ */ r.jsxs(i, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
111
|
+
n ? /* @__PURE__ */ r.jsx(
|
|
112
|
+
i,
|
|
113
113
|
{
|
|
114
114
|
component: "img",
|
|
115
115
|
src: V(e),
|
|
@@ -123,10 +123,10 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
123
123
|
borderColor: "divider"
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
) : /* @__PURE__ */ r.jsx(H, { extension:
|
|
127
|
-
/* @__PURE__ */ r.jsxs(
|
|
126
|
+
) : /* @__PURE__ */ r.jsx(H, { extension: o }),
|
|
127
|
+
/* @__PURE__ */ r.jsxs(i, { display: "flex", flexDirection: "row", alignItems: "center", gap: 1, children: [
|
|
128
128
|
/* @__PURE__ */ r.jsx(I, { variant: "subtitle2", textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", children: e.name }),
|
|
129
|
-
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs(I, { variant: "caption",
|
|
129
|
+
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsxs(I, { variant: "caption", children: [
|
|
130
130
|
"(",
|
|
131
131
|
Math.round(e.size / 1024),
|
|
132
132
|
" KB)"
|
|
@@ -139,8 +139,8 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
139
139
|
`${e.name}-${t}`
|
|
140
140
|
);
|
|
141
141
|
}) }),
|
|
142
|
-
/* @__PURE__ */ r.jsxs(
|
|
143
|
-
/* @__PURE__ */ r.jsxs(
|
|
142
|
+
/* @__PURE__ */ r.jsxs(i, { display: "flex", justifyContent: "space-between", alignItems: "center", mt: 1, children: [
|
|
143
|
+
/* @__PURE__ */ r.jsxs(i, { display: "flex", gap: 1, children: [
|
|
144
144
|
/* @__PURE__ */ r.jsx(
|
|
145
145
|
"input",
|
|
146
146
|
{
|
|
@@ -150,14 +150,14 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
150
150
|
onChange: q,
|
|
151
151
|
style: { display: "none" },
|
|
152
152
|
id: `file-attachment-input-${w}`,
|
|
153
|
-
disabled:
|
|
153
|
+
disabled: a
|
|
154
154
|
}
|
|
155
155
|
),
|
|
156
156
|
/* @__PURE__ */ r.jsx("label", { htmlFor: `file-attachment-input-${w}`, children: /* @__PURE__ */ r.jsx(
|
|
157
157
|
p,
|
|
158
158
|
{
|
|
159
159
|
component: "span",
|
|
160
|
-
disabled:
|
|
160
|
+
disabled: a,
|
|
161
161
|
size: "small",
|
|
162
162
|
sx: {
|
|
163
163
|
transition: "transform 0.3s ease",
|
|
@@ -173,7 +173,7 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
173
173
|
{
|
|
174
174
|
ref: C,
|
|
175
175
|
onClick: $,
|
|
176
|
-
disabled:
|
|
176
|
+
disabled: a,
|
|
177
177
|
size: "small",
|
|
178
178
|
sx: {
|
|
179
179
|
transition: "transform 0.3s ease",
|
|
@@ -189,7 +189,7 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
189
189
|
p,
|
|
190
190
|
{
|
|
191
191
|
onClick: F,
|
|
192
|
-
disabled:
|
|
192
|
+
disabled: a,
|
|
193
193
|
size: "small",
|
|
194
194
|
sx: {
|
|
195
195
|
transition: "transform 0.3s ease",
|
|
@@ -202,7 +202,7 @@ const X = S(/* @__PURE__ */ r.jsx("path", {
|
|
|
202
202
|
)
|
|
203
203
|
] }),
|
|
204
204
|
/* @__PURE__ */ r.jsx(B, { open: k, anchorEl: C.current, placement: "top-start", sx: { zIndex: 1300 }, children: /* @__PURE__ */ r.jsx(N, { onClickAway: () => x(!1), children: /* @__PURE__ */ r.jsx(
|
|
205
|
-
|
|
205
|
+
i,
|
|
206
206
|
{
|
|
207
207
|
sx: {
|
|
208
208
|
border: "1px solid",
|