@solostylist/ui-kit 1.0.170 → 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.d.ts +2 -4
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +253 -287
- package/dist/s-blur-text/s-blur-text.js +19 -20
- package/dist/s-breadcrumbs/s-breadcrumbs.js +2 -2
- package/dist/s-button-link/s-button-link.js +2 -2
- package/dist/s-category-card/s-category-card.js +2 -2
- package/dist/s-chat-input/s-chat-input.js +29 -29
- package/dist/s-chat-message/s-chat-message.js +73 -151
- 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 -189
- package/dist/s-gradient-icon/s-gradient-icon.js +2 -2
- package/dist/s-moving-border/s-moving-border.d.ts +1 -1
- package/dist/s-moving-border/s-moving-border.js +34 -34
- package/dist/s-review/s-review.js +28 -28
- package/dist/s-scroll-reveal/s-scroll-reveal.js +2 -2
- package/dist/s-skeleton/s-skeleton.js +2 -2
- package/dist/s-stripe/s-stripe.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.js +13 -13
- package/dist/s-text-truncation/s-text-truncation.js +1 -1
- package/dist/s-theme-demo/s-theme-demo.js +105 -142
- package/dist/s-theme-provider/s-theme-provider.js +2 -2
- package/dist/s-theme-switch/s-theme-switch.js +1 -1
- package/dist/s-two-pane-layout/index.js +1 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.js +2 -2
- package/dist/s-typewriter-text/s-typewriter-text.js +8 -8
- package/dist/s-zoom-image/index.js +1 -1
- package/dist/s-zoom-image/s-zoom-image.js +2 -2
- package/dist/theme/theme-primitives.d.ts +6 -0
- package/dist/theme/theme-primitives.js +51 -45
- package/package.json +1 -1
|
@@ -1,75 +1,73 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import { C as
|
|
5
|
-
import { D as
|
|
6
|
-
import { TextField as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
import { SSelect as
|
|
9
|
-
const
|
|
1
|
+
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import g, { useEffect as $, useState as J, useMemo as H, useCallback as q } from "react";
|
|
3
|
+
import { c as S } from "../createSvgIcon-DxwgGAVe.js";
|
|
4
|
+
import { C as Q } from "../Close-BRlEKA2Q.js";
|
|
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 te, Divider as oe, Tooltip as _, Dialog as ne, DialogTitle as le, DialogContent as ae } from "@mui/material";
|
|
7
|
+
import { createPortal as re } from "react-dom";
|
|
8
|
+
import { SSelect as se } from "../s-select/s-select.js";
|
|
9
|
+
const ie = S(/* @__PURE__ */ e.jsx("path", {
|
|
10
10
|
d: "M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"
|
|
11
|
-
}), "AddPhotoAlternate"),
|
|
11
|
+
}), "AddPhotoAlternate"), de = S(/* @__PURE__ */ e.jsx("path", {
|
|
12
12
|
d: "M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"
|
|
13
|
-
}), "Autorenew"),
|
|
13
|
+
}), "Autorenew"), ue = S(/* @__PURE__ */ e.jsx("path", {
|
|
14
14
|
d: "M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"
|
|
15
|
-
}), "InfoOutlined"),
|
|
15
|
+
}), "InfoOutlined"), ce = S(/* @__PURE__ */ e.jsx("path", {
|
|
16
16
|
d: "M8 5v14l11-7z"
|
|
17
17
|
}), "PlayArrow");
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
|
|
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
|
+
K,
|
|
21
21
|
{
|
|
22
|
-
value:
|
|
23
|
-
onChange: (
|
|
24
|
-
onFocus:
|
|
25
|
-
onBlur:
|
|
26
|
-
placeholder:
|
|
22
|
+
value: l,
|
|
23
|
+
onChange: (c) => u(c.target.value),
|
|
24
|
+
onFocus: r,
|
|
25
|
+
onBlur: p,
|
|
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
|
-
)),
|
|
34
|
-
|
|
33
|
+
)), P = g.memo((t) => /* @__PURE__ */ e.jsx(
|
|
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
|
-
)),
|
|
48
|
-
|
|
46
|
+
)), pe = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
47
|
+
a,
|
|
49
48
|
{
|
|
50
49
|
sx: {
|
|
51
|
-
width:
|
|
52
|
-
transition: "width 0.3s ease",
|
|
50
|
+
width: 120,
|
|
53
51
|
display: "flex",
|
|
54
52
|
flexDirection: "column"
|
|
55
53
|
},
|
|
56
54
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
55
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
56
|
+
/* @__PURE__ */ e.jsx(
|
|
57
|
+
K,
|
|
60
58
|
{
|
|
61
59
|
type: "number",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (
|
|
64
|
-
onFocus:
|
|
65
|
-
onBlur:
|
|
66
|
-
disabled:
|
|
60
|
+
value: l ?? t.defaultValue ?? 0,
|
|
61
|
+
onChange: (c) => u(Number(c.target.value)),
|
|
62
|
+
onFocus: r,
|
|
63
|
+
onBlur: p,
|
|
64
|
+
disabled: d,
|
|
67
65
|
size: "small",
|
|
68
66
|
slotProps: {
|
|
69
67
|
htmlInput: {
|
|
70
|
-
min:
|
|
71
|
-
max:
|
|
72
|
-
step:
|
|
68
|
+
min: t.min,
|
|
69
|
+
max: t.max,
|
|
70
|
+
step: t.step
|
|
73
71
|
}
|
|
74
72
|
},
|
|
75
73
|
sx: {
|
|
@@ -81,158 +79,152 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
81
79
|
)
|
|
82
80
|
]
|
|
83
81
|
}
|
|
84
|
-
)),
|
|
85
|
-
|
|
82
|
+
)), me = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
83
|
+
a,
|
|
86
84
|
{
|
|
87
85
|
sx: {
|
|
88
|
-
width:
|
|
89
|
-
transition: "width 0.3s ease",
|
|
86
|
+
width: 180,
|
|
90
87
|
display: "flex",
|
|
91
88
|
flexDirection: "column"
|
|
92
89
|
},
|
|
93
90
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
91
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
92
|
+
/* @__PURE__ */ e.jsx(
|
|
93
|
+
se,
|
|
97
94
|
{
|
|
98
|
-
value:
|
|
99
|
-
onChange: (
|
|
100
|
-
onFocus:
|
|
101
|
-
onBlur:
|
|
102
|
-
disabled:
|
|
103
|
-
placeholder:
|
|
104
|
-
options:
|
|
105
|
-
optionLabel:
|
|
106
|
-
optionValue:
|
|
107
|
-
searchable:
|
|
108
|
-
searchPlaceholder:
|
|
95
|
+
value: l ?? t.defaultValue ?? "",
|
|
96
|
+
onChange: (c) => u(c.target.value),
|
|
97
|
+
onFocus: r,
|
|
98
|
+
onBlur: p,
|
|
99
|
+
disabled: d,
|
|
100
|
+
placeholder: t.placeholder,
|
|
101
|
+
options: t.options || [],
|
|
102
|
+
optionLabel: t.optionLabel,
|
|
103
|
+
optionValue: t.optionValue,
|
|
104
|
+
searchable: t.searchable,
|
|
105
|
+
searchPlaceholder: t.searchPlaceholder,
|
|
109
106
|
size: "small"
|
|
110
107
|
}
|
|
111
108
|
)
|
|
112
109
|
]
|
|
113
110
|
}
|
|
114
|
-
)),
|
|
115
|
-
|
|
111
|
+
)), he = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
112
|
+
a,
|
|
116
113
|
{
|
|
117
114
|
sx: {
|
|
118
|
-
width:
|
|
119
|
-
transition: "width 0.3s ease",
|
|
115
|
+
width: 160,
|
|
120
116
|
display: "flex",
|
|
121
117
|
flexDirection: "column"
|
|
122
118
|
},
|
|
123
119
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
127
|
-
|
|
120
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
121
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", height: 36 }, children: [
|
|
122
|
+
/* @__PURE__ */ e.jsx(
|
|
123
|
+
ee,
|
|
128
124
|
{
|
|
129
|
-
value:
|
|
130
|
-
onChange: (
|
|
131
|
-
onMouseDown:
|
|
132
|
-
onMouseUp:
|
|
133
|
-
disabled:
|
|
134
|
-
min:
|
|
135
|
-
max:
|
|
136
|
-
step:
|
|
125
|
+
value: l ?? t.defaultValue ?? t.min ?? 0,
|
|
126
|
+
onChange: (c, b) => u(b),
|
|
127
|
+
onMouseDown: r,
|
|
128
|
+
onMouseUp: p,
|
|
129
|
+
disabled: d,
|
|
130
|
+
min: t.min ?? 0,
|
|
131
|
+
max: t.max ?? 100,
|
|
132
|
+
step: t.step ?? 1,
|
|
137
133
|
size: "small",
|
|
138
134
|
sx: { flex: 1 }
|
|
139
135
|
}
|
|
140
136
|
),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
137
|
+
/* @__PURE__ */ e.jsx(
|
|
138
|
+
a,
|
|
143
139
|
{
|
|
144
140
|
sx: {
|
|
145
141
|
minWidth: 60,
|
|
146
142
|
textAlign: "center",
|
|
147
143
|
fontWeight: 500,
|
|
148
|
-
fontSize: "0.875rem"
|
|
149
|
-
width: l ? "auto" : "100%"
|
|
144
|
+
fontSize: "0.875rem"
|
|
150
145
|
},
|
|
151
|
-
children:
|
|
146
|
+
children: l ?? t.defaultValue ?? t.min ?? 0
|
|
152
147
|
}
|
|
153
148
|
)
|
|
154
149
|
] })
|
|
155
150
|
]
|
|
156
151
|
}
|
|
157
|
-
)),
|
|
158
|
-
const
|
|
159
|
-
|
|
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;
|
|
154
|
+
$(() => {
|
|
160
155
|
let m = [];
|
|
161
|
-
return
|
|
156
|
+
return c(((s) => {
|
|
162
157
|
if (!s) return [];
|
|
163
158
|
const v = Array.isArray(s) ? s : [s], i = [];
|
|
164
|
-
return v.forEach((
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
i.push(
|
|
168
|
-
} else typeof
|
|
159
|
+
return v.forEach((I) => {
|
|
160
|
+
if (I instanceof File) {
|
|
161
|
+
const T = URL.createObjectURL(I);
|
|
162
|
+
i.push(T), m.push(T);
|
|
163
|
+
} else typeof I == "string" && i.push(I);
|
|
169
164
|
}), i;
|
|
170
|
-
})(
|
|
165
|
+
})(l)), () => {
|
|
171
166
|
m.forEach((s) => URL.revokeObjectURL(s));
|
|
172
167
|
};
|
|
173
|
-
}, [
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
if (!(!
|
|
168
|
+
}, [l]);
|
|
169
|
+
const h = (m) => {
|
|
170
|
+
const f = m.target.files;
|
|
171
|
+
if (!(!f || f.length === 0)) {
|
|
177
172
|
if (j) {
|
|
178
|
-
const s = Array.isArray(
|
|
179
|
-
|
|
173
|
+
const s = Array.isArray(l) ? l : l instanceof File || typeof l == "string" ? [l] : [], v = Array.from(f).slice(0, w - s.length), i = [...s, ...v];
|
|
174
|
+
u(i);
|
|
180
175
|
} else
|
|
181
|
-
|
|
176
|
+
u(f[0]);
|
|
182
177
|
m.target.value = "";
|
|
183
178
|
}
|
|
184
|
-
},
|
|
185
|
-
if (m.stopPropagation(), j && Array.isArray(
|
|
186
|
-
const s =
|
|
187
|
-
|
|
179
|
+
}, B = (m, f) => {
|
|
180
|
+
if (m.stopPropagation(), j && Array.isArray(l)) {
|
|
181
|
+
const s = l.filter((v, i) => i !== f);
|
|
182
|
+
u(s.length > 0 ? s : null);
|
|
188
183
|
} else
|
|
189
|
-
|
|
190
|
-
},
|
|
184
|
+
u(null);
|
|
185
|
+
}, F = () => {
|
|
191
186
|
var m;
|
|
192
|
-
|
|
193
|
-
}, D = j && d.length <
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
187
|
+
r || j && d.length >= w || (m = p.current) == null || m.click();
|
|
188
|
+
}, D = j && d.length < w;
|
|
189
|
+
return /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
190
|
+
/* @__PURE__ */ e.jsx(
|
|
196
191
|
"input",
|
|
197
192
|
{
|
|
198
|
-
ref:
|
|
193
|
+
ref: p,
|
|
199
194
|
type: "file",
|
|
200
195
|
accept: "image/*",
|
|
201
196
|
multiple: j,
|
|
202
|
-
onChange:
|
|
203
|
-
disabled:
|
|
197
|
+
onChange: h,
|
|
198
|
+
disabled: r,
|
|
204
199
|
style: { display: "none" }
|
|
205
200
|
}
|
|
206
201
|
),
|
|
207
|
-
d.map((m,
|
|
208
|
-
|
|
202
|
+
d.map((m, f) => /* @__PURE__ */ e.jsxs(
|
|
203
|
+
a,
|
|
209
204
|
{
|
|
210
|
-
onMouseEnter: () =>
|
|
211
|
-
onMouseLeave: () =>
|
|
205
|
+
onMouseEnter: () => R(f),
|
|
206
|
+
onMouseLeave: () => R(null),
|
|
212
207
|
sx: {
|
|
213
208
|
width: 50,
|
|
214
209
|
height: 50,
|
|
215
210
|
border: 1,
|
|
216
|
-
borderColor:
|
|
211
|
+
borderColor: r ? "action.disabled" : "divider",
|
|
217
212
|
borderRadius: 1,
|
|
218
213
|
display: "flex",
|
|
219
214
|
alignItems: "center",
|
|
220
215
|
justifyContent: "center",
|
|
221
|
-
cursor:
|
|
216
|
+
cursor: r ? "not-allowed" : "default",
|
|
222
217
|
position: "relative",
|
|
223
218
|
overflow: "hidden",
|
|
224
|
-
transition: "all 0.2s"
|
|
225
|
-
"&:hover": l ? {} : {
|
|
226
|
-
borderColor: "primary.dark"
|
|
227
|
-
}
|
|
219
|
+
transition: "all 0.2s"
|
|
228
220
|
},
|
|
229
221
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
|
|
222
|
+
/* @__PURE__ */ e.jsx(
|
|
223
|
+
a,
|
|
232
224
|
{
|
|
233
225
|
component: "img",
|
|
234
226
|
src: m,
|
|
235
|
-
alt: `Preview ${
|
|
227
|
+
alt: `Preview ${f + 1}`,
|
|
236
228
|
sx: {
|
|
237
229
|
width: "100%",
|
|
238
230
|
height: "100%",
|
|
@@ -240,10 +232,10 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
240
232
|
}
|
|
241
233
|
}
|
|
242
234
|
),
|
|
243
|
-
!
|
|
244
|
-
|
|
235
|
+
!r && b === f && /* @__PURE__ */ e.jsx(
|
|
236
|
+
a,
|
|
245
237
|
{
|
|
246
|
-
onClick: (s) =>
|
|
238
|
+
onClick: (s) => B(s, f),
|
|
247
239
|
sx: {
|
|
248
240
|
position: "absolute",
|
|
249
241
|
top: 0,
|
|
@@ -252,64 +244,48 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
252
244
|
bottom: 0,
|
|
253
245
|
display: "flex",
|
|
254
246
|
alignItems: "center",
|
|
255
|
-
justifyContent: "center"
|
|
256
|
-
bgcolor: R("#000", 0.5),
|
|
257
|
-
cursor: "pointer",
|
|
258
|
-
transition: "background-color 0.2s",
|
|
259
|
-
"&:hover": {
|
|
260
|
-
bgcolor: R("#000", 0.65)
|
|
261
|
-
}
|
|
247
|
+
justifyContent: "center"
|
|
262
248
|
},
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
ae,
|
|
265
|
-
{
|
|
266
|
-
sx: {
|
|
267
|
-
fontSize: 16,
|
|
268
|
-
color: "white"
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
)
|
|
249
|
+
children: /* @__PURE__ */ e.jsx(A, { onClick: (s) => B(s, f), children: /* @__PURE__ */ e.jsx(Q, {}) })
|
|
272
250
|
}
|
|
273
251
|
)
|
|
274
252
|
]
|
|
275
253
|
},
|
|
276
|
-
|
|
254
|
+
f
|
|
277
255
|
)),
|
|
278
|
-
(d.length === 0 || D) && /* @__PURE__ */
|
|
279
|
-
|
|
256
|
+
(d.length === 0 || D) && /* @__PURE__ */ e.jsx(
|
|
257
|
+
a,
|
|
280
258
|
{
|
|
281
|
-
onClick:
|
|
259
|
+
onClick: F,
|
|
282
260
|
sx: {
|
|
283
261
|
width: 50,
|
|
284
262
|
height: 50,
|
|
285
263
|
border: 1,
|
|
286
|
-
borderColor:
|
|
264
|
+
borderColor: r ? "action.disabled" : "divider",
|
|
287
265
|
borderRadius: 1,
|
|
288
266
|
display: "flex",
|
|
289
267
|
alignItems: "center",
|
|
290
268
|
justifyContent: "center",
|
|
291
|
-
cursor:
|
|
292
|
-
bgcolor: R("#000", 0.02),
|
|
269
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
293
270
|
transition: "all 0.2s",
|
|
294
|
-
"&:hover":
|
|
295
|
-
|
|
296
|
-
bgcolor: R("#000", 0.04)
|
|
271
|
+
"&:hover": {
|
|
272
|
+
bgcolor: "action.hover"
|
|
297
273
|
}
|
|
298
274
|
},
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
|
|
275
|
+
children: /* @__PURE__ */ e.jsx(
|
|
276
|
+
ie,
|
|
301
277
|
{
|
|
302
278
|
sx: {
|
|
303
279
|
fontSize: 20,
|
|
304
|
-
color:
|
|
280
|
+
color: r ? "action.disabled" : "text.secondary"
|
|
305
281
|
}
|
|
306
282
|
}
|
|
307
283
|
)
|
|
308
284
|
}
|
|
309
285
|
)
|
|
310
286
|
] });
|
|
311
|
-
}),
|
|
312
|
-
|
|
287
|
+
}), ye = g.memo(({ input: t, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
288
|
+
a,
|
|
313
289
|
{
|
|
314
290
|
sx: {
|
|
315
291
|
display: "flex",
|
|
@@ -318,79 +294,79 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
318
294
|
minWidth: 60
|
|
319
295
|
},
|
|
320
296
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
|
|
297
|
+
/* @__PURE__ */ e.jsx(P, { label: t.label }),
|
|
298
|
+
/* @__PURE__ */ e.jsx(
|
|
299
|
+
te,
|
|
324
300
|
{
|
|
325
|
-
checked:
|
|
326
|
-
onChange: (
|
|
327
|
-
onFocus:
|
|
328
|
-
onBlur:
|
|
301
|
+
checked: l ?? t.defaultValue ?? !1,
|
|
302
|
+
onChange: (c) => u(c.target.checked),
|
|
303
|
+
onFocus: r,
|
|
304
|
+
onBlur: p,
|
|
329
305
|
disabled: d,
|
|
330
306
|
size: "small"
|
|
331
307
|
}
|
|
332
308
|
)
|
|
333
309
|
]
|
|
334
310
|
}
|
|
335
|
-
)),
|
|
336
|
-
switch (
|
|
311
|
+
)), M = (t) => {
|
|
312
|
+
switch (t.input.type) {
|
|
337
313
|
case "textarea":
|
|
338
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ e.jsx(fe, { ...t });
|
|
339
315
|
case "number":
|
|
340
|
-
return /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ e.jsx(pe, { ...t });
|
|
341
317
|
case "slider":
|
|
342
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ e.jsx(he, { ...t });
|
|
343
319
|
case "select":
|
|
344
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ e.jsx(me, { ...t });
|
|
345
321
|
case "image":
|
|
346
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ e.jsx(xe, { input: t.input, value: t.value, onChange: t.onChange, disabled: t.disabled });
|
|
347
323
|
case "checkbox":
|
|
348
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ e.jsx(ye, { ...t });
|
|
349
325
|
default:
|
|
350
326
|
return null;
|
|
351
327
|
}
|
|
352
|
-
},
|
|
353
|
-
inputs:
|
|
354
|
-
onProcess:
|
|
355
|
-
onReset:
|
|
356
|
-
onDownload:
|
|
357
|
-
processing:
|
|
328
|
+
}, L = ({
|
|
329
|
+
inputs: t = [],
|
|
330
|
+
onProcess: l,
|
|
331
|
+
onReset: u,
|
|
332
|
+
onDownload: r,
|
|
333
|
+
processing: p = !1,
|
|
358
334
|
uploading: d = !1,
|
|
359
|
-
inputValues:
|
|
360
|
-
onInputChange:
|
|
361
|
-
customActionButtons:
|
|
335
|
+
inputValues: c = {},
|
|
336
|
+
onInputChange: b,
|
|
337
|
+
customActionButtons: R,
|
|
362
338
|
hideProcessButton: j = !1,
|
|
363
|
-
processButtonDisabled:
|
|
364
|
-
getInputDisabled:
|
|
365
|
-
processTooltip:
|
|
366
|
-
downloadTooltip:
|
|
339
|
+
processButtonDisabled: w = !1,
|
|
340
|
+
getInputDisabled: h,
|
|
341
|
+
processTooltip: B = "Process",
|
|
342
|
+
downloadTooltip: F = "Download",
|
|
367
343
|
resetTooltip: D = "Reset",
|
|
368
344
|
infoTooltip: m = "Information",
|
|
369
|
-
infoTitle:
|
|
345
|
+
infoTitle: f = "Tool Information",
|
|
370
346
|
infoContent: s,
|
|
371
347
|
position: v = "bottom",
|
|
372
348
|
relative: i = !1
|
|
373
349
|
}) => {
|
|
374
|
-
const [
|
|
375
|
-
if (!
|
|
376
|
-
const n =
|
|
377
|
-
return
|
|
378
|
-
}), [
|
|
379
|
-
(
|
|
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),
|
|
380
356
|
{
|
|
381
357
|
imageInputs: [],
|
|
382
358
|
textareaInputs: [],
|
|
383
359
|
paramInputs: []
|
|
384
360
|
}
|
|
385
|
-
), [
|
|
386
|
-
|
|
387
|
-
}, []),
|
|
388
|
-
(
|
|
389
|
-
|
|
361
|
+
), [t]), V = q(() => {
|
|
362
|
+
}, []), k = q(() => {
|
|
363
|
+
}, []), C = q(
|
|
364
|
+
(o, n, y) => {
|
|
365
|
+
b == null || b(o, n, y);
|
|
390
366
|
},
|
|
391
|
-
[
|
|
392
|
-
),
|
|
393
|
-
|
|
367
|
+
[b]
|
|
368
|
+
), X = q(() => T(!0), []), G = q(() => T(!1), []), U = /* @__PURE__ */ e.jsxs(
|
|
369
|
+
a,
|
|
394
370
|
{
|
|
395
371
|
sx: {
|
|
396
372
|
position: i ? "relative" : "fixed",
|
|
@@ -404,11 +380,9 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
404
380
|
mb: i && v === "bottom" ? 2 : 0
|
|
405
381
|
},
|
|
406
382
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
383
|
+
/* @__PURE__ */ e.jsxs(
|
|
384
|
+
a,
|
|
409
385
|
{
|
|
410
|
-
onMouseEnter: ee,
|
|
411
|
-
onMouseLeave: oe,
|
|
412
386
|
sx: {
|
|
413
387
|
display: "flex",
|
|
414
388
|
flexDirection: "column",
|
|
@@ -420,32 +394,30 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
420
394
|
bgcolor: "background.default"
|
|
421
395
|
},
|
|
422
396
|
children: [
|
|
423
|
-
|
|
424
|
-
const n =
|
|
425
|
-
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({
|
|
426
400
|
value: n,
|
|
427
|
-
onChange: (
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
O,
|
|
401
|
+
onChange: (x) => C(o.key, x),
|
|
402
|
+
onFocus: V,
|
|
403
|
+
onBlur: k,
|
|
404
|
+
disabled: y
|
|
405
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
406
|
+
M,
|
|
434
407
|
{
|
|
435
|
-
input:
|
|
408
|
+
input: o,
|
|
436
409
|
value: n,
|
|
437
|
-
onChange: (
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
disabled: g
|
|
410
|
+
onChange: (x) => C(o.key, x),
|
|
411
|
+
onFocus: V,
|
|
412
|
+
onBlur: k,
|
|
413
|
+
disabled: y
|
|
442
414
|
},
|
|
443
|
-
|
|
415
|
+
o.key
|
|
444
416
|
);
|
|
445
417
|
}) }),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
|
|
418
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
419
|
+
/* @__PURE__ */ e.jsx(
|
|
420
|
+
a,
|
|
449
421
|
{
|
|
450
422
|
sx: {
|
|
451
423
|
display: "flex",
|
|
@@ -453,72 +425,68 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
453
425
|
gap: 2,
|
|
454
426
|
flex: 1
|
|
455
427
|
},
|
|
456
|
-
children: (
|
|
457
|
-
|
|
458
|
-
const n =
|
|
459
|
-
return
|
|
428
|
+
children: (z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "flex-end", gap: 1.5 }, children: [
|
|
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({
|
|
460
432
|
value: n,
|
|
461
|
-
onChange: (
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
O,
|
|
433
|
+
onChange: (x) => C(o.key, x),
|
|
434
|
+
onFocus: V,
|
|
435
|
+
onBlur: k,
|
|
436
|
+
disabled: y
|
|
437
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
438
|
+
M,
|
|
468
439
|
{
|
|
469
|
-
input:
|
|
440
|
+
input: o,
|
|
470
441
|
value: n,
|
|
471
|
-
onChange: (
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
disabled: g
|
|
442
|
+
onChange: (x) => C(o.key, x),
|
|
443
|
+
onFocus: V,
|
|
444
|
+
onBlur: k,
|
|
445
|
+
disabled: y
|
|
476
446
|
},
|
|
477
|
-
|
|
447
|
+
o.key
|
|
478
448
|
);
|
|
479
449
|
}),
|
|
480
|
-
|
|
481
|
-
const n =
|
|
482
|
-
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({
|
|
483
453
|
value: n,
|
|
484
|
-
onChange: (
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
O,
|
|
454
|
+
onChange: (x) => C(o.key, x),
|
|
455
|
+
onFocus: V,
|
|
456
|
+
onBlur: k,
|
|
457
|
+
disabled: y
|
|
458
|
+
}) }, o.key) : /* @__PURE__ */ e.jsx(
|
|
459
|
+
M,
|
|
491
460
|
{
|
|
492
|
-
input:
|
|
461
|
+
input: o,
|
|
493
462
|
value: n,
|
|
494
|
-
onChange: (
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
disabled: g
|
|
463
|
+
onChange: (x) => C(o.key, x),
|
|
464
|
+
onFocus: V,
|
|
465
|
+
onBlur: k,
|
|
466
|
+
disabled: y
|
|
499
467
|
},
|
|
500
|
-
|
|
468
|
+
o.key
|
|
501
469
|
);
|
|
502
470
|
})
|
|
503
471
|
] })
|
|
504
472
|
}
|
|
505
473
|
),
|
|
506
|
-
(
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
|
|
509
|
-
s && /* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
!j && /* @__PURE__ */
|
|
513
|
-
|
|
474
|
+
(z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsx(oe, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5, flexShrink: 0 } }),
|
|
475
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75, ml: "auto" }, children: [
|
|
476
|
+
R,
|
|
477
|
+
s && /* @__PURE__ */ e.jsx(_, { title: m, children: /* @__PURE__ */ e.jsx(A, { onClick: X, children: /* @__PURE__ */ e.jsx(ue, {}) }) }),
|
|
478
|
+
/* @__PURE__ */ e.jsx(_, { title: F, children: /* @__PURE__ */ e.jsx(A, { onClick: r, children: /* @__PURE__ */ e.jsx(Y, {}) }) }),
|
|
479
|
+
/* @__PURE__ */ e.jsx(_, { title: D, children: /* @__PURE__ */ e.jsx(A, { onClick: u, children: /* @__PURE__ */ e.jsx(de, {}) }) }),
|
|
480
|
+
!j && /* @__PURE__ */ e.jsx(_, { title: B, children: /* @__PURE__ */ e.jsx("span", { children: /* @__PURE__ */ e.jsx(
|
|
481
|
+
A,
|
|
514
482
|
{
|
|
515
|
-
onClick:
|
|
516
|
-
disabled:
|
|
483
|
+
onClick: l,
|
|
484
|
+
disabled: w || !O || d || p,
|
|
517
485
|
size: "large",
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
|
|
486
|
+
children: /* @__PURE__ */ e.jsx(
|
|
487
|
+
ce,
|
|
520
488
|
{
|
|
521
|
-
color:
|
|
489
|
+
color: w || !O || d || p ? "disabled" : "primary"
|
|
522
490
|
}
|
|
523
491
|
)
|
|
524
492
|
}
|
|
@@ -528,34 +496,32 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
528
496
|
]
|
|
529
497
|
}
|
|
530
498
|
),
|
|
531
|
-
s && /* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */
|
|
499
|
+
s && /* @__PURE__ */ e.jsxs(ne, { open: I, onClose: G, maxWidth: "sm", fullWidth: !0, children: [
|
|
500
|
+
/* @__PURE__ */ e.jsx(le, { children: f }),
|
|
501
|
+
/* @__PURE__ */ e.jsx(ae, { children: s })
|
|
534
502
|
] })
|
|
535
503
|
]
|
|
536
504
|
}
|
|
537
505
|
);
|
|
538
|
-
return !i && typeof window < "u" ?
|
|
506
|
+
return !i && typeof window < "u" ? re(U, document.body) : U;
|
|
539
507
|
};
|
|
540
|
-
|
|
508
|
+
L.displayName = "SAiToolBar";
|
|
541
509
|
try {
|
|
542
|
-
|
|
510
|
+
N.displayName = "SAiToolBarInputType", N.__docgenInfo = { description: "Supported input types for SAiToolBar", displayName: "SAiToolBarInputType", props: {} };
|
|
543
511
|
} catch {
|
|
544
512
|
}
|
|
545
513
|
try {
|
|
546
|
-
|
|
547
|
-
Features
|
|
548
|
-
and portal rendering for proper z-index handling.`, displayName: "SAiToolBar", props: { inputs: { defaultValue: { value: "[]" }, description: "Configuration for input fields", name: "inputs", required: !1, type: { name: "SAiToolBarInput[]" } }, onProcess: { defaultValue: null, description: "Callback when process button is clicked", name: "onProcess", required: !1, type: { name: "(() => void)" } }, onReset: { defaultValue: null, description: "Callback when reset button is clicked", name: "onReset", required: !1, type: { name: "(() => void)" } }, onDownload: { defaultValue: null, description: "Callback when download button is clicked", name: "onDownload", required: !1, type: { name: "(() => void)" } }, processing: { defaultValue: { value: "false" }, description: "Whether the toolbar is in processing state", name: "processing", required: !1, type: { name: "boolean" } }, uploading: { defaultValue: { value: "false" }, description: "Whether the toolbar is in uploading state", name: "uploading", required: !1, type: { name: "boolean" } }, inputValues: { defaultValue: { value: "{}" }, description: "Input values controlled externally", name: "inputValues", required: !1, type: { name: "Record<string, SAiToolBarValue>" } }, onInputChange: { defaultValue: null, description: "Callback when input values change", name: "onInputChange", required: !1, type: { name: "((key: string, value: SAiToolBarValue, file?: File) => void)" } }, customActionButtons: { defaultValue: null, description: "Custom action buttons between inputs and standard actions", name: "customActionButtons", required: !1, type: { name: "ReactNode" } }, hideProcessButton: { defaultValue: { value: "false" }, description: "Hide the main process button", name: "hideProcessButton", required: !1, type: { name: "boolean" } }, processButtonDisabled: { defaultValue: { value: "false" }, description: "Override to disable the process button", name: "processButtonDisabled", required: !1, type: { name: "boolean" } }, getInputDisabled: { defaultValue: null, description: "Function to check if an input should be disabled", name: "getInputDisabled", required: !1, type: { name: "((inputKey: string) => boolean)" } }, processTooltip: { defaultValue: { value: "Process" }, description: "Tooltip for process button", name: "processTooltip", required: !1, type: { name: "string" } }, downloadTooltip: { defaultValue: { value: "Download" }, description: "Tooltip for download button", name: "downloadTooltip", required: !1, type: { name: "string" } }, resetTooltip: { defaultValue: { value: "Reset" }, description: "Tooltip for reset button", name: "resetTooltip", required: !1, type: { name: "string" } }, infoTooltip: { defaultValue: { value: "Information" }, description: "Tooltip for info button", name: "infoTooltip", required: !1, type: { name: "string" } }, infoTitle: { defaultValue: { value: "Tool Information" }, description: "Info dialog title", name: "infoTitle", required: !1, type: { name: "string" } }, infoContent: { defaultValue: null, description: "Info dialog content", name: "infoContent", required: !1, type: { name: "ReactNode" } }, position: { defaultValue: { value: "bottom" }, description: "Position of the toolbar", name: "position", required: !1, type: { name: "enum", value: [{ value: '"bottom"' }, { value: '"top"' }] } }, relative: { defaultValue: { value: "false" }, description: "Use relative positioning within container instead of fixed viewport positioning", name: "relative", required: !1, type: { name: "boolean" } } } };
|
|
514
|
+
L.displayName = "SAiToolBar", L.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with inputs and action buttons.
|
|
515
|
+
Features multiple input types, built-in validation, and portal rendering for proper z-index handling.`, displayName: "SAiToolBar", props: { inputs: { defaultValue: { value: "[]" }, description: "Configuration for input fields", name: "inputs", required: !1, type: { name: "SAiToolBarInput[]" } }, onProcess: { defaultValue: null, description: "Callback when process button is clicked", name: "onProcess", required: !1, type: { name: "(() => void)" } }, onReset: { defaultValue: null, description: "Callback when reset button is clicked", name: "onReset", required: !1, type: { name: "(() => void)" } }, onDownload: { defaultValue: null, description: "Callback when download button is clicked", name: "onDownload", required: !1, type: { name: "(() => void)" } }, processing: { defaultValue: { value: "false" }, description: "Whether the toolbar is in processing state", name: "processing", required: !1, type: { name: "boolean" } }, uploading: { defaultValue: { value: "false" }, description: "Whether the toolbar is in uploading state", name: "uploading", required: !1, type: { name: "boolean" } }, inputValues: { defaultValue: { value: "{}" }, description: "Input values controlled externally", name: "inputValues", required: !1, type: { name: "Record<string, SAiToolBarValue>" } }, onInputChange: { defaultValue: null, description: "Callback when input values change", name: "onInputChange", required: !1, type: { name: "((key: string, value: SAiToolBarValue, file?: File) => void)" } }, customActionButtons: { defaultValue: null, description: "Custom action buttons between inputs and standard actions", name: "customActionButtons", required: !1, type: { name: "ReactNode" } }, hideProcessButton: { defaultValue: { value: "false" }, description: "Hide the main process button", name: "hideProcessButton", required: !1, type: { name: "boolean" } }, processButtonDisabled: { defaultValue: { value: "false" }, description: "Override to disable the process button", name: "processButtonDisabled", required: !1, type: { name: "boolean" } }, getInputDisabled: { defaultValue: null, description: "Function to check if an input should be disabled", name: "getInputDisabled", required: !1, type: { name: "((inputKey: string) => boolean)" } }, processTooltip: { defaultValue: { value: "Process" }, description: "Tooltip for process button", name: "processTooltip", required: !1, type: { name: "string" } }, downloadTooltip: { defaultValue: { value: "Download" }, description: "Tooltip for download button", name: "downloadTooltip", required: !1, type: { name: "string" } }, resetTooltip: { defaultValue: { value: "Reset" }, description: "Tooltip for reset button", name: "resetTooltip", required: !1, type: { name: "string" } }, infoTooltip: { defaultValue: { value: "Information" }, description: "Tooltip for info button", name: "infoTooltip", required: !1, type: { name: "string" } }, infoTitle: { defaultValue: { value: "Tool Information" }, description: "Info dialog title", name: "infoTitle", required: !1, type: { name: "string" } }, infoContent: { defaultValue: null, description: "Info dialog content", name: "infoContent", required: !1, type: { name: "ReactNode" } }, position: { defaultValue: { value: "bottom" }, description: "Position of the toolbar", name: "position", required: !1, type: { name: "enum", value: [{ value: '"top"' }, { value: '"bottom"' }] } }, relative: { defaultValue: { value: "false" }, description: "Use relative positioning within container instead of fixed viewport positioning", name: "relative", required: !1, type: { name: "boolean" } } } };
|
|
549
516
|
} catch {
|
|
550
517
|
}
|
|
551
518
|
try {
|
|
552
|
-
saitoolbar.displayName = "saitoolbar", saitoolbar.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with
|
|
553
|
-
Features
|
|
554
|
-
and portal rendering for proper z-index handling.`, displayName: "saitoolbar", props: { inputs: { defaultValue: { value: "[]" }, description: "Configuration for input fields", name: "inputs", required: !1, type: { name: "SAiToolBarInput[]" } }, onProcess: { defaultValue: null, description: "Callback when process button is clicked", name: "onProcess", required: !1, type: { name: "(() => void)" } }, onReset: { defaultValue: null, description: "Callback when reset button is clicked", name: "onReset", required: !1, type: { name: "(() => void)" } }, onDownload: { defaultValue: null, description: "Callback when download button is clicked", name: "onDownload", required: !1, type: { name: "(() => void)" } }, processing: { defaultValue: { value: "false" }, description: "Whether the toolbar is in processing state", name: "processing", required: !1, type: { name: "boolean" } }, uploading: { defaultValue: { value: "false" }, description: "Whether the toolbar is in uploading state", name: "uploading", required: !1, type: { name: "boolean" } }, inputValues: { defaultValue: { value: "{}" }, description: "Input values controlled externally", name: "inputValues", required: !1, type: { name: "Record<string, SAiToolBarValue>" } }, onInputChange: { defaultValue: null, description: "Callback when input values change", name: "onInputChange", required: !1, type: { name: "((key: string, value: SAiToolBarValue, file?: File) => void)" } }, customActionButtons: { defaultValue: null, description: "Custom action buttons between inputs and standard actions", name: "customActionButtons", required: !1, type: { name: "ReactNode" } }, hideProcessButton: { defaultValue: { value: "false" }, description: "Hide the main process button", name: "hideProcessButton", required: !1, type: { name: "boolean" } }, processButtonDisabled: { defaultValue: { value: "false" }, description: "Override to disable the process button", name: "processButtonDisabled", required: !1, type: { name: "boolean" } }, getInputDisabled: { defaultValue: null, description: "Function to check if an input should be disabled", name: "getInputDisabled", required: !1, type: { name: "((inputKey: string) => boolean)" } }, processTooltip: { defaultValue: { value: "Process" }, description: "Tooltip for process button", name: "processTooltip", required: !1, type: { name: "string" } }, downloadTooltip: { defaultValue: { value: "Download" }, description: "Tooltip for download button", name: "downloadTooltip", required: !1, type: { name: "string" } }, resetTooltip: { defaultValue: { value: "Reset" }, description: "Tooltip for reset button", name: "resetTooltip", required: !1, type: { name: "string" } }, infoTooltip: { defaultValue: { value: "Information" }, description: "Tooltip for info button", name: "infoTooltip", required: !1, type: { name: "string" } }, infoTitle: { defaultValue: { value: "Tool Information" }, description: "Info dialog title", name: "infoTitle", required: !1, type: { name: "string" } }, infoContent: { defaultValue: null, description: "Info dialog content", name: "infoContent", required: !1, type: { name: "ReactNode" } }, position: { defaultValue: { value: "bottom" }, description: "Position of the toolbar", name: "position", required: !1, type: { name: "enum", value: [{ value: '"bottom"' }, { value: '"top"' }] } }, relative: { defaultValue: { value: "false" }, description: "Use relative positioning within container instead of fixed viewport positioning", name: "relative", required: !1, type: { name: "boolean" } } } };
|
|
519
|
+
saitoolbar.displayName = "saitoolbar", saitoolbar.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with inputs and action buttons.
|
|
520
|
+
Features multiple input types, built-in validation, and portal rendering for proper z-index handling.`, displayName: "saitoolbar", props: { inputs: { defaultValue: { value: "[]" }, description: "Configuration for input fields", name: "inputs", required: !1, type: { name: "SAiToolBarInput[]" } }, onProcess: { defaultValue: null, description: "Callback when process button is clicked", name: "onProcess", required: !1, type: { name: "(() => void)" } }, onReset: { defaultValue: null, description: "Callback when reset button is clicked", name: "onReset", required: !1, type: { name: "(() => void)" } }, onDownload: { defaultValue: null, description: "Callback when download button is clicked", name: "onDownload", required: !1, type: { name: "(() => void)" } }, processing: { defaultValue: { value: "false" }, description: "Whether the toolbar is in processing state", name: "processing", required: !1, type: { name: "boolean" } }, uploading: { defaultValue: { value: "false" }, description: "Whether the toolbar is in uploading state", name: "uploading", required: !1, type: { name: "boolean" } }, inputValues: { defaultValue: { value: "{}" }, description: "Input values controlled externally", name: "inputValues", required: !1, type: { name: "Record<string, SAiToolBarValue>" } }, onInputChange: { defaultValue: null, description: "Callback when input values change", name: "onInputChange", required: !1, type: { name: "((key: string, value: SAiToolBarValue, file?: File) => void)" } }, customActionButtons: { defaultValue: null, description: "Custom action buttons between inputs and standard actions", name: "customActionButtons", required: !1, type: { name: "ReactNode" } }, hideProcessButton: { defaultValue: { value: "false" }, description: "Hide the main process button", name: "hideProcessButton", required: !1, type: { name: "boolean" } }, processButtonDisabled: { defaultValue: { value: "false" }, description: "Override to disable the process button", name: "processButtonDisabled", required: !1, type: { name: "boolean" } }, getInputDisabled: { defaultValue: null, description: "Function to check if an input should be disabled", name: "getInputDisabled", required: !1, type: { name: "((inputKey: string) => boolean)" } }, processTooltip: { defaultValue: { value: "Process" }, description: "Tooltip for process button", name: "processTooltip", required: !1, type: { name: "string" } }, downloadTooltip: { defaultValue: { value: "Download" }, description: "Tooltip for download button", name: "downloadTooltip", required: !1, type: { name: "string" } }, resetTooltip: { defaultValue: { value: "Reset" }, description: "Tooltip for reset button", name: "resetTooltip", required: !1, type: { name: "string" } }, infoTooltip: { defaultValue: { value: "Information" }, description: "Tooltip for info button", name: "infoTooltip", required: !1, type: { name: "string" } }, infoTitle: { defaultValue: { value: "Tool Information" }, description: "Info dialog title", name: "infoTitle", required: !1, type: { name: "string" } }, infoContent: { defaultValue: null, description: "Info dialog content", name: "infoContent", required: !1, type: { name: "ReactNode" } }, position: { defaultValue: { value: "bottom" }, description: "Position of the toolbar", name: "position", required: !1, type: { name: "enum", value: [{ value: '"top"' }, { value: '"bottom"' }] } }, relative: { defaultValue: { value: "false" }, description: "Use relative positioning within container instead of fixed viewport positioning", name: "relative", required: !1, type: { name: "boolean" } } } };
|
|
555
521
|
} catch {
|
|
556
522
|
}
|
|
557
523
|
export {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
524
|
+
L as SAiToolBar,
|
|
525
|
+
N as SAiToolBarInputType,
|
|
526
|
+
L as default
|
|
561
527
|
};
|