@solostylist/ui-kit 1.0.170 → 1.0.171
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 +244 -277
- 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-message/s-chat-message.js +77 -99
- 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-glow-button/s-glow-button.js +4 -5
- 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-scroll-reveal/s-scroll-reveal.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-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 +51 -88
- 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 +5 -0
- package/dist/theme/theme-primitives.js +22 -17
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
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 oe, Divider as te, 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__ */ ((o) => (o.TEXTAREA = "textarea", o.SLIDER = "slider", o.IMAGE = "image", o.NUMBER = "number", o.SELECT = "select", o.CHECKBOX = "checkbox", o))(N || {});
|
|
19
|
+
const fe = g.memo(({ input: o, 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: o.placeholder || o.label,
|
|
27
27
|
disabled: d,
|
|
28
28
|
multiline: !0,
|
|
29
|
-
minRows:
|
|
30
|
-
maxRows:
|
|
29
|
+
minRows: o.minRows ?? 2,
|
|
30
|
+
maxRows: o.maxRows ?? 5,
|
|
31
31
|
fullWidth: !0
|
|
32
32
|
}
|
|
33
|
-
)),
|
|
34
|
-
|
|
33
|
+
)), P = g.memo((o) => /* @__PURE__ */ e.jsx(
|
|
34
|
+
Z,
|
|
35
35
|
{
|
|
36
36
|
variant: "caption",
|
|
37
37
|
sx: {
|
|
@@ -42,34 +42,33 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
42
42
|
width: "100% !important",
|
|
43
43
|
textAlign: "center"
|
|
44
44
|
},
|
|
45
|
-
children:
|
|
45
|
+
children: o.label
|
|
46
46
|
}
|
|
47
|
-
)),
|
|
48
|
-
|
|
47
|
+
)), pe = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
48
|
+
a,
|
|
49
49
|
{
|
|
50
50
|
sx: {
|
|
51
|
-
width:
|
|
52
|
-
transition: "width 0.3s ease",
|
|
51
|
+
width: 120,
|
|
53
52
|
display: "flex",
|
|
54
53
|
flexDirection: "column"
|
|
55
54
|
},
|
|
56
55
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
56
|
+
/* @__PURE__ */ e.jsx(P, { label: o.label }),
|
|
57
|
+
/* @__PURE__ */ e.jsx(
|
|
58
|
+
K,
|
|
60
59
|
{
|
|
61
60
|
type: "number",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (
|
|
64
|
-
onFocus:
|
|
65
|
-
onBlur:
|
|
66
|
-
disabled:
|
|
61
|
+
value: l ?? o.defaultValue ?? 0,
|
|
62
|
+
onChange: (c) => u(Number(c.target.value)),
|
|
63
|
+
onFocus: r,
|
|
64
|
+
onBlur: p,
|
|
65
|
+
disabled: d,
|
|
67
66
|
size: "small",
|
|
68
67
|
slotProps: {
|
|
69
68
|
htmlInput: {
|
|
70
|
-
min:
|
|
71
|
-
max:
|
|
72
|
-
step:
|
|
69
|
+
min: o.min,
|
|
70
|
+
max: o.max,
|
|
71
|
+
step: o.step
|
|
73
72
|
}
|
|
74
73
|
},
|
|
75
74
|
sx: {
|
|
@@ -81,158 +80,152 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
81
80
|
)
|
|
82
81
|
]
|
|
83
82
|
}
|
|
84
|
-
)),
|
|
85
|
-
|
|
83
|
+
)), me = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
84
|
+
a,
|
|
86
85
|
{
|
|
87
86
|
sx: {
|
|
88
|
-
width:
|
|
89
|
-
transition: "width 0.3s ease",
|
|
87
|
+
width: 180,
|
|
90
88
|
display: "flex",
|
|
91
89
|
flexDirection: "column"
|
|
92
90
|
},
|
|
93
91
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
92
|
+
/* @__PURE__ */ e.jsx(P, { label: o.label }),
|
|
93
|
+
/* @__PURE__ */ e.jsx(
|
|
94
|
+
se,
|
|
97
95
|
{
|
|
98
|
-
value:
|
|
99
|
-
onChange: (
|
|
100
|
-
onFocus:
|
|
101
|
-
onBlur:
|
|
102
|
-
disabled:
|
|
103
|
-
placeholder:
|
|
104
|
-
options:
|
|
105
|
-
optionLabel:
|
|
106
|
-
optionValue:
|
|
107
|
-
searchable:
|
|
108
|
-
searchPlaceholder:
|
|
96
|
+
value: l ?? o.defaultValue ?? "",
|
|
97
|
+
onChange: (c) => u(c.target.value),
|
|
98
|
+
onFocus: r,
|
|
99
|
+
onBlur: p,
|
|
100
|
+
disabled: d,
|
|
101
|
+
placeholder: o.placeholder,
|
|
102
|
+
options: o.options || [],
|
|
103
|
+
optionLabel: o.optionLabel,
|
|
104
|
+
optionValue: o.optionValue,
|
|
105
|
+
searchable: o.searchable,
|
|
106
|
+
searchPlaceholder: o.searchPlaceholder,
|
|
109
107
|
size: "small"
|
|
110
108
|
}
|
|
111
109
|
)
|
|
112
110
|
]
|
|
113
111
|
}
|
|
114
|
-
)),
|
|
115
|
-
|
|
112
|
+
)), he = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
113
|
+
a,
|
|
116
114
|
{
|
|
117
115
|
sx: {
|
|
118
|
-
width:
|
|
119
|
-
transition: "width 0.3s ease",
|
|
116
|
+
width: 160,
|
|
120
117
|
display: "flex",
|
|
121
118
|
flexDirection: "column"
|
|
122
119
|
},
|
|
123
120
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
/* @__PURE__ */ e.jsx(P, { label: o.label }),
|
|
122
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", height: 36 }, children: [
|
|
123
|
+
/* @__PURE__ */ e.jsx(
|
|
124
|
+
ee,
|
|
128
125
|
{
|
|
129
|
-
value:
|
|
130
|
-
onChange: (
|
|
131
|
-
onMouseDown:
|
|
132
|
-
onMouseUp:
|
|
133
|
-
disabled:
|
|
134
|
-
min:
|
|
135
|
-
max:
|
|
136
|
-
step:
|
|
126
|
+
value: l ?? o.defaultValue ?? o.min ?? 0,
|
|
127
|
+
onChange: (c, b) => u(b),
|
|
128
|
+
onMouseDown: r,
|
|
129
|
+
onMouseUp: p,
|
|
130
|
+
disabled: d,
|
|
131
|
+
min: o.min ?? 0,
|
|
132
|
+
max: o.max ?? 100,
|
|
133
|
+
step: o.step ?? 1,
|
|
137
134
|
size: "small",
|
|
138
135
|
sx: { flex: 1 }
|
|
139
136
|
}
|
|
140
137
|
),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
138
|
+
/* @__PURE__ */ e.jsx(
|
|
139
|
+
a,
|
|
143
140
|
{
|
|
144
141
|
sx: {
|
|
145
142
|
minWidth: 60,
|
|
146
143
|
textAlign: "center",
|
|
147
144
|
fontWeight: 500,
|
|
148
|
-
fontSize: "0.875rem"
|
|
149
|
-
width: l ? "auto" : "100%"
|
|
145
|
+
fontSize: "0.875rem"
|
|
150
146
|
},
|
|
151
|
-
children:
|
|
147
|
+
children: l ?? o.defaultValue ?? o.min ?? 0
|
|
152
148
|
}
|
|
153
149
|
)
|
|
154
150
|
] })
|
|
155
151
|
]
|
|
156
152
|
}
|
|
157
|
-
)),
|
|
158
|
-
const
|
|
159
|
-
|
|
153
|
+
)), xe = g.memo(({ input: o, value: l, onChange: u, disabled: r }) => {
|
|
154
|
+
const p = g.useRef(null), [d, c] = g.useState([]), [b, R] = g.useState(null), j = o.multiple ?? !1, w = o.maxImages ?? 5;
|
|
155
|
+
$(() => {
|
|
160
156
|
let m = [];
|
|
161
|
-
return
|
|
157
|
+
return c(((s) => {
|
|
162
158
|
if (!s) return [];
|
|
163
159
|
const v = Array.isArray(s) ? s : [s], i = [];
|
|
164
|
-
return v.forEach((
|
|
165
|
-
if (
|
|
166
|
-
const
|
|
167
|
-
i.push(
|
|
168
|
-
} else typeof
|
|
160
|
+
return v.forEach((I) => {
|
|
161
|
+
if (I instanceof File) {
|
|
162
|
+
const T = URL.createObjectURL(I);
|
|
163
|
+
i.push(T), m.push(T);
|
|
164
|
+
} else typeof I == "string" && i.push(I);
|
|
169
165
|
}), i;
|
|
170
|
-
})(
|
|
166
|
+
})(l)), () => {
|
|
171
167
|
m.forEach((s) => URL.revokeObjectURL(s));
|
|
172
168
|
};
|
|
173
|
-
}, [
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
if (!(!
|
|
169
|
+
}, [l]);
|
|
170
|
+
const h = (m) => {
|
|
171
|
+
const f = m.target.files;
|
|
172
|
+
if (!(!f || f.length === 0)) {
|
|
177
173
|
if (j) {
|
|
178
|
-
const s = Array.isArray(
|
|
179
|
-
|
|
174
|
+
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];
|
|
175
|
+
u(i);
|
|
180
176
|
} else
|
|
181
|
-
|
|
177
|
+
u(f[0]);
|
|
182
178
|
m.target.value = "";
|
|
183
179
|
}
|
|
184
|
-
},
|
|
185
|
-
if (m.stopPropagation(), j && Array.isArray(
|
|
186
|
-
const s =
|
|
187
|
-
|
|
180
|
+
}, B = (m, f) => {
|
|
181
|
+
if (m.stopPropagation(), j && Array.isArray(l)) {
|
|
182
|
+
const s = l.filter((v, i) => i !== f);
|
|
183
|
+
u(s.length > 0 ? s : null);
|
|
188
184
|
} else
|
|
189
|
-
|
|
190
|
-
},
|
|
185
|
+
u(null);
|
|
186
|
+
}, F = () => {
|
|
191
187
|
var m;
|
|
192
|
-
|
|
193
|
-
}, D = j && d.length <
|
|
194
|
-
return /* @__PURE__ */
|
|
195
|
-
/* @__PURE__ */
|
|
188
|
+
r || j && d.length >= w || (m = p.current) == null || m.click();
|
|
189
|
+
}, D = j && d.length < w;
|
|
190
|
+
return /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
191
|
+
/* @__PURE__ */ e.jsx(
|
|
196
192
|
"input",
|
|
197
193
|
{
|
|
198
|
-
ref:
|
|
194
|
+
ref: p,
|
|
199
195
|
type: "file",
|
|
200
196
|
accept: "image/*",
|
|
201
197
|
multiple: j,
|
|
202
|
-
onChange:
|
|
203
|
-
disabled:
|
|
198
|
+
onChange: h,
|
|
199
|
+
disabled: r,
|
|
204
200
|
style: { display: "none" }
|
|
205
201
|
}
|
|
206
202
|
),
|
|
207
|
-
d.map((m,
|
|
208
|
-
|
|
203
|
+
d.map((m, f) => /* @__PURE__ */ e.jsxs(
|
|
204
|
+
a,
|
|
209
205
|
{
|
|
210
|
-
onMouseEnter: () =>
|
|
211
|
-
onMouseLeave: () =>
|
|
206
|
+
onMouseEnter: () => R(f),
|
|
207
|
+
onMouseLeave: () => R(null),
|
|
212
208
|
sx: {
|
|
213
209
|
width: 50,
|
|
214
210
|
height: 50,
|
|
215
211
|
border: 1,
|
|
216
|
-
borderColor:
|
|
212
|
+
borderColor: r ? "action.disabled" : "divider",
|
|
217
213
|
borderRadius: 1,
|
|
218
214
|
display: "flex",
|
|
219
215
|
alignItems: "center",
|
|
220
216
|
justifyContent: "center",
|
|
221
|
-
cursor:
|
|
217
|
+
cursor: r ? "not-allowed" : "default",
|
|
222
218
|
position: "relative",
|
|
223
219
|
overflow: "hidden",
|
|
224
|
-
transition: "all 0.2s"
|
|
225
|
-
"&:hover": l ? {} : {
|
|
226
|
-
borderColor: "primary.dark"
|
|
227
|
-
}
|
|
220
|
+
transition: "all 0.2s"
|
|
228
221
|
},
|
|
229
222
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
|
|
223
|
+
/* @__PURE__ */ e.jsx(
|
|
224
|
+
a,
|
|
232
225
|
{
|
|
233
226
|
component: "img",
|
|
234
227
|
src: m,
|
|
235
|
-
alt: `Preview ${
|
|
228
|
+
alt: `Preview ${f + 1}`,
|
|
236
229
|
sx: {
|
|
237
230
|
width: "100%",
|
|
238
231
|
height: "100%",
|
|
@@ -240,10 +233,10 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
240
233
|
}
|
|
241
234
|
}
|
|
242
235
|
),
|
|
243
|
-
!
|
|
244
|
-
|
|
236
|
+
!r && b === f && /* @__PURE__ */ e.jsx(
|
|
237
|
+
a,
|
|
245
238
|
{
|
|
246
|
-
onClick: (s) =>
|
|
239
|
+
onClick: (s) => B(s, f),
|
|
247
240
|
sx: {
|
|
248
241
|
position: "absolute",
|
|
249
242
|
top: 0,
|
|
@@ -252,64 +245,48 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
252
245
|
bottom: 0,
|
|
253
246
|
display: "flex",
|
|
254
247
|
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
|
-
}
|
|
248
|
+
justifyContent: "center"
|
|
262
249
|
},
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
ae,
|
|
265
|
-
{
|
|
266
|
-
sx: {
|
|
267
|
-
fontSize: 16,
|
|
268
|
-
color: "white"
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
)
|
|
250
|
+
children: /* @__PURE__ */ e.jsx(A, { onClick: (s) => B(s, f), children: /* @__PURE__ */ e.jsx(Q, {}) })
|
|
272
251
|
}
|
|
273
252
|
)
|
|
274
253
|
]
|
|
275
254
|
},
|
|
276
|
-
|
|
255
|
+
f
|
|
277
256
|
)),
|
|
278
|
-
(d.length === 0 || D) && /* @__PURE__ */
|
|
279
|
-
|
|
257
|
+
(d.length === 0 || D) && /* @__PURE__ */ e.jsx(
|
|
258
|
+
a,
|
|
280
259
|
{
|
|
281
|
-
onClick:
|
|
260
|
+
onClick: F,
|
|
282
261
|
sx: {
|
|
283
262
|
width: 50,
|
|
284
263
|
height: 50,
|
|
285
264
|
border: 1,
|
|
286
|
-
borderColor:
|
|
265
|
+
borderColor: r ? "action.disabled" : "divider",
|
|
287
266
|
borderRadius: 1,
|
|
288
267
|
display: "flex",
|
|
289
268
|
alignItems: "center",
|
|
290
269
|
justifyContent: "center",
|
|
291
|
-
cursor:
|
|
292
|
-
bgcolor: R("#000", 0.02),
|
|
270
|
+
cursor: r ? "not-allowed" : "pointer",
|
|
293
271
|
transition: "all 0.2s",
|
|
294
|
-
"&:hover":
|
|
295
|
-
|
|
296
|
-
bgcolor: R("#000", 0.04)
|
|
272
|
+
"&:hover": {
|
|
273
|
+
bgcolor: "action.hover"
|
|
297
274
|
}
|
|
298
275
|
},
|
|
299
|
-
children: /* @__PURE__ */
|
|
300
|
-
|
|
276
|
+
children: /* @__PURE__ */ e.jsx(
|
|
277
|
+
ie,
|
|
301
278
|
{
|
|
302
279
|
sx: {
|
|
303
280
|
fontSize: 20,
|
|
304
|
-
color:
|
|
281
|
+
color: r ? "action.disabled" : "text.secondary"
|
|
305
282
|
}
|
|
306
283
|
}
|
|
307
284
|
)
|
|
308
285
|
}
|
|
309
286
|
)
|
|
310
287
|
] });
|
|
311
|
-
}),
|
|
312
|
-
|
|
288
|
+
}), ye = g.memo(({ input: o, value: l, onChange: u, onFocus: r, onBlur: p, disabled: d }) => /* @__PURE__ */ e.jsxs(
|
|
289
|
+
a,
|
|
313
290
|
{
|
|
314
291
|
sx: {
|
|
315
292
|
display: "flex",
|
|
@@ -318,79 +295,79 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
318
295
|
minWidth: 60
|
|
319
296
|
},
|
|
320
297
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
|
|
298
|
+
/* @__PURE__ */ e.jsx(P, { label: o.label }),
|
|
299
|
+
/* @__PURE__ */ e.jsx(
|
|
300
|
+
oe,
|
|
324
301
|
{
|
|
325
|
-
checked:
|
|
326
|
-
onChange: (
|
|
327
|
-
onFocus:
|
|
328
|
-
onBlur:
|
|
302
|
+
checked: l ?? o.defaultValue ?? !1,
|
|
303
|
+
onChange: (c) => u(c.target.checked),
|
|
304
|
+
onFocus: r,
|
|
305
|
+
onBlur: p,
|
|
329
306
|
disabled: d,
|
|
330
307
|
size: "small"
|
|
331
308
|
}
|
|
332
309
|
)
|
|
333
310
|
]
|
|
334
311
|
}
|
|
335
|
-
)),
|
|
336
|
-
switch (
|
|
312
|
+
)), M = (o) => {
|
|
313
|
+
switch (o.input.type) {
|
|
337
314
|
case "textarea":
|
|
338
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ e.jsx(fe, { ...o });
|
|
339
316
|
case "number":
|
|
340
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ e.jsx(pe, { ...o });
|
|
341
318
|
case "slider":
|
|
342
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ e.jsx(he, { ...o });
|
|
343
320
|
case "select":
|
|
344
|
-
return /* @__PURE__ */
|
|
321
|
+
return /* @__PURE__ */ e.jsx(me, { ...o });
|
|
345
322
|
case "image":
|
|
346
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ e.jsx(xe, { input: o.input, value: o.value, onChange: o.onChange, disabled: o.disabled });
|
|
347
324
|
case "checkbox":
|
|
348
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ e.jsx(ye, { ...o });
|
|
349
326
|
default:
|
|
350
327
|
return null;
|
|
351
328
|
}
|
|
352
|
-
},
|
|
353
|
-
inputs:
|
|
354
|
-
onProcess:
|
|
355
|
-
onReset:
|
|
356
|
-
onDownload:
|
|
357
|
-
processing:
|
|
329
|
+
}, L = ({
|
|
330
|
+
inputs: o = [],
|
|
331
|
+
onProcess: l,
|
|
332
|
+
onReset: u,
|
|
333
|
+
onDownload: r,
|
|
334
|
+
processing: p = !1,
|
|
358
335
|
uploading: d = !1,
|
|
359
|
-
inputValues:
|
|
360
|
-
onInputChange:
|
|
361
|
-
customActionButtons:
|
|
336
|
+
inputValues: c = {},
|
|
337
|
+
onInputChange: b,
|
|
338
|
+
customActionButtons: R,
|
|
362
339
|
hideProcessButton: j = !1,
|
|
363
|
-
processButtonDisabled:
|
|
364
|
-
getInputDisabled:
|
|
365
|
-
processTooltip:
|
|
366
|
-
downloadTooltip:
|
|
340
|
+
processButtonDisabled: w = !1,
|
|
341
|
+
getInputDisabled: h,
|
|
342
|
+
processTooltip: B = "Process",
|
|
343
|
+
downloadTooltip: F = "Download",
|
|
367
344
|
resetTooltip: D = "Reset",
|
|
368
345
|
infoTooltip: m = "Information",
|
|
369
|
-
infoTitle:
|
|
346
|
+
infoTitle: f = "Tool Information",
|
|
370
347
|
infoContent: s,
|
|
371
348
|
position: v = "bottom",
|
|
372
349
|
relative: i = !1
|
|
373
350
|
}) => {
|
|
374
|
-
const [
|
|
351
|
+
const [I, T] = J(!1), O = H(() => o.length === 0 ? !0 : o.every((t) => {
|
|
375
352
|
if (!t.required) return !0;
|
|
376
|
-
const n =
|
|
353
|
+
const n = c[t.key];
|
|
377
354
|
return t.type === "textarea" ? n && typeof n == "string" && n.trim() !== "" : t.type === "number" || t.type === "slider" ? n != null : t.type === "select" ? n != null && n !== "" : !0;
|
|
378
|
-
}), [
|
|
355
|
+
}), [o, c]), { imageInputs: z, textareaInputs: W, paramInputs: E } = H(() => o.reduce(
|
|
379
356
|
(t, n) => (n.type === "image" ? t.imageInputs.push(n) : n.type === "textarea" ? t.textareaInputs.push(n) : t.paramInputs.push(n), t),
|
|
380
357
|
{
|
|
381
358
|
imageInputs: [],
|
|
382
359
|
textareaInputs: [],
|
|
383
360
|
paramInputs: []
|
|
384
361
|
}
|
|
385
|
-
), [
|
|
386
|
-
|
|
387
|
-
}, []),
|
|
388
|
-
(t, n,
|
|
389
|
-
|
|
362
|
+
), [o]), V = q(() => {
|
|
363
|
+
}, []), k = q(() => {
|
|
364
|
+
}, []), C = q(
|
|
365
|
+
(t, n, y) => {
|
|
366
|
+
b == null || b(t, n, y);
|
|
390
367
|
},
|
|
391
|
-
[
|
|
392
|
-
),
|
|
393
|
-
|
|
368
|
+
[b]
|
|
369
|
+
), X = q(() => T(!0), []), G = q(() => T(!1), []), U = /* @__PURE__ */ e.jsxs(
|
|
370
|
+
a,
|
|
394
371
|
{
|
|
395
372
|
sx: {
|
|
396
373
|
position: i ? "relative" : "fixed",
|
|
@@ -404,11 +381,9 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
404
381
|
mb: i && v === "bottom" ? 2 : 0
|
|
405
382
|
},
|
|
406
383
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
384
|
+
/* @__PURE__ */ e.jsxs(
|
|
385
|
+
a,
|
|
409
386
|
{
|
|
410
|
-
onMouseEnter: ee,
|
|
411
|
-
onMouseLeave: oe,
|
|
412
387
|
sx: {
|
|
413
388
|
display: "flex",
|
|
414
389
|
flexDirection: "column",
|
|
@@ -420,32 +395,30 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
420
395
|
bgcolor: "background.default"
|
|
421
396
|
},
|
|
422
397
|
children: [
|
|
423
|
-
|
|
424
|
-
const n =
|
|
425
|
-
return t.renderInput ? /* @__PURE__ */
|
|
398
|
+
W.length > 0 && /* @__PURE__ */ e.jsx(a, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: W.map((t) => {
|
|
399
|
+
const n = c[t.key], y = (h == null ? void 0 : h(t.key)) ?? !1;
|
|
400
|
+
return t.renderInput ? /* @__PURE__ */ e.jsx(a, { children: t.renderInput({
|
|
426
401
|
value: n,
|
|
427
|
-
onChange: (
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
O,
|
|
402
|
+
onChange: (x) => C(t.key, x),
|
|
403
|
+
onFocus: V,
|
|
404
|
+
onBlur: k,
|
|
405
|
+
disabled: y
|
|
406
|
+
}) }, t.key) : /* @__PURE__ */ e.jsx(
|
|
407
|
+
M,
|
|
434
408
|
{
|
|
435
409
|
input: t,
|
|
436
410
|
value: n,
|
|
437
|
-
onChange: (
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
disabled: g
|
|
411
|
+
onChange: (x) => C(t.key, x),
|
|
412
|
+
onFocus: V,
|
|
413
|
+
onBlur: k,
|
|
414
|
+
disabled: y
|
|
442
415
|
},
|
|
443
416
|
t.key
|
|
444
417
|
);
|
|
445
418
|
}) }),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
|
|
419
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
420
|
+
/* @__PURE__ */ e.jsx(
|
|
421
|
+
a,
|
|
449
422
|
{
|
|
450
423
|
sx: {
|
|
451
424
|
display: "flex",
|
|
@@ -453,49 +426,45 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
453
426
|
gap: 2,
|
|
454
427
|
flex: 1
|
|
455
428
|
},
|
|
456
|
-
children: (
|
|
457
|
-
|
|
458
|
-
const n =
|
|
459
|
-
return t.renderInput ? /* @__PURE__ */
|
|
429
|
+
children: (z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "flex-end", gap: 1.5 }, children: [
|
|
430
|
+
z.map((t) => {
|
|
431
|
+
const n = c[t.key], y = (h == null ? void 0 : h(t.key)) ?? !1;
|
|
432
|
+
return t.renderInput ? /* @__PURE__ */ e.jsx(a, { children: t.renderInput({
|
|
460
433
|
value: n,
|
|
461
|
-
onChange: (
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
O,
|
|
434
|
+
onChange: (x) => C(t.key, x),
|
|
435
|
+
onFocus: V,
|
|
436
|
+
onBlur: k,
|
|
437
|
+
disabled: y
|
|
438
|
+
}) }, t.key) : /* @__PURE__ */ e.jsx(
|
|
439
|
+
M,
|
|
468
440
|
{
|
|
469
441
|
input: t,
|
|
470
442
|
value: n,
|
|
471
|
-
onChange: (
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
disabled: g
|
|
443
|
+
onChange: (x) => C(t.key, x),
|
|
444
|
+
onFocus: V,
|
|
445
|
+
onBlur: k,
|
|
446
|
+
disabled: y
|
|
476
447
|
},
|
|
477
448
|
t.key
|
|
478
449
|
);
|
|
479
450
|
}),
|
|
480
|
-
|
|
481
|
-
const n =
|
|
482
|
-
return t.renderInput ? /* @__PURE__ */
|
|
451
|
+
E.map((t) => {
|
|
452
|
+
const n = c[t.key], y = (h == null ? void 0 : h(t.key)) ?? !1;
|
|
453
|
+
return t.renderInput ? /* @__PURE__ */ e.jsx(a, { children: t.renderInput({
|
|
483
454
|
value: n,
|
|
484
|
-
onChange: (
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
O,
|
|
455
|
+
onChange: (x) => C(t.key, x),
|
|
456
|
+
onFocus: V,
|
|
457
|
+
onBlur: k,
|
|
458
|
+
disabled: y
|
|
459
|
+
}) }, t.key) : /* @__PURE__ */ e.jsx(
|
|
460
|
+
M,
|
|
491
461
|
{
|
|
492
462
|
input: t,
|
|
493
463
|
value: n,
|
|
494
|
-
onChange: (
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
disabled: g
|
|
464
|
+
onChange: (x) => C(t.key, x),
|
|
465
|
+
onFocus: V,
|
|
466
|
+
onBlur: k,
|
|
467
|
+
disabled: y
|
|
499
468
|
},
|
|
500
469
|
t.key
|
|
501
470
|
);
|
|
@@ -503,22 +472,22 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
503
472
|
] })
|
|
504
473
|
}
|
|
505
474
|
),
|
|
506
|
-
(
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
|
|
509
|
-
s && /* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
!j && /* @__PURE__ */
|
|
513
|
-
|
|
475
|
+
(z.length > 0 || E.length > 0) && /* @__PURE__ */ e.jsx(te, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5, flexShrink: 0 } }),
|
|
476
|
+
/* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75, ml: "auto" }, children: [
|
|
477
|
+
R,
|
|
478
|
+
s && /* @__PURE__ */ e.jsx(_, { title: m, children: /* @__PURE__ */ e.jsx(A, { onClick: X, children: /* @__PURE__ */ e.jsx(ue, {}) }) }),
|
|
479
|
+
/* @__PURE__ */ e.jsx(_, { title: F, children: /* @__PURE__ */ e.jsx(A, { onClick: r, children: /* @__PURE__ */ e.jsx(Y, {}) }) }),
|
|
480
|
+
/* @__PURE__ */ e.jsx(_, { title: D, children: /* @__PURE__ */ e.jsx(A, { onClick: u, children: /* @__PURE__ */ e.jsx(de, {}) }) }),
|
|
481
|
+
!j && /* @__PURE__ */ e.jsx(_, { title: B, children: /* @__PURE__ */ e.jsx("span", { children: /* @__PURE__ */ e.jsx(
|
|
482
|
+
A,
|
|
514
483
|
{
|
|
515
|
-
onClick:
|
|
516
|
-
disabled:
|
|
484
|
+
onClick: l,
|
|
485
|
+
disabled: w || !O || d || p,
|
|
517
486
|
size: "large",
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
|
|
487
|
+
children: /* @__PURE__ */ e.jsx(
|
|
488
|
+
ce,
|
|
520
489
|
{
|
|
521
|
-
color:
|
|
490
|
+
color: w || !O || d || p ? "disabled" : "primary"
|
|
522
491
|
}
|
|
523
492
|
)
|
|
524
493
|
}
|
|
@@ -528,34 +497,32 @@ const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, dis
|
|
|
528
497
|
]
|
|
529
498
|
}
|
|
530
499
|
),
|
|
531
|
-
s && /* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */
|
|
500
|
+
s && /* @__PURE__ */ e.jsxs(ne, { open: I, onClose: G, maxWidth: "sm", fullWidth: !0, children: [
|
|
501
|
+
/* @__PURE__ */ e.jsx(le, { children: f }),
|
|
502
|
+
/* @__PURE__ */ e.jsx(ae, { children: s })
|
|
534
503
|
] })
|
|
535
504
|
]
|
|
536
505
|
}
|
|
537
506
|
);
|
|
538
|
-
return !i && typeof window < "u" ?
|
|
507
|
+
return !i && typeof window < "u" ? re(U, document.body) : U;
|
|
539
508
|
};
|
|
540
|
-
|
|
509
|
+
L.displayName = "SAiToolBar";
|
|
541
510
|
try {
|
|
542
|
-
|
|
511
|
+
N.displayName = "SAiToolBarInputType", N.__docgenInfo = { description: "Supported input types for SAiToolBar", displayName: "SAiToolBarInputType", props: {} };
|
|
543
512
|
} catch {
|
|
544
513
|
}
|
|
545
514
|
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" } } } };
|
|
515
|
+
L.displayName = "SAiToolBar", L.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with inputs and action buttons.
|
|
516
|
+
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
517
|
} catch {
|
|
550
518
|
}
|
|
551
519
|
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" } } } };
|
|
520
|
+
saitoolbar.displayName = "saitoolbar", saitoolbar.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with inputs and action buttons.
|
|
521
|
+
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
522
|
} catch {
|
|
556
523
|
}
|
|
557
524
|
export {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
525
|
+
L as SAiToolBar,
|
|
526
|
+
N as SAiToolBarInputType,
|
|
527
|
+
L as default
|
|
561
528
|
};
|