@solostylist/ui-kit 1.0.174 → 1.0.176
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/{ArrowUpward-DhTFpzoh.js → ArrowUpward-CEeqSc-C.js} +2 -2
- package/dist/{Box-Ha0cQ4KO.js → Box-CE3rycd-.js} +5 -5
- package/dist/ButtonBase-C_YYB9Ry.js +1099 -0
- package/dist/{ChevronLeft-CBuFk2Fh.js → ChevronLeft-6gdh4lRt.js} +2 -2
- package/dist/{ChevronRight-CnDWPrOm.js → ChevronRight-CC3l-wPC.js} +2 -2
- package/dist/{Close-BRlEKA2Q.js → Close-DOHlPcFK.js} +2 -2
- package/dist/{ContentCopy-7nFBtjhs.js → ContentCopy-2xxDThyB.js} +2 -2
- package/dist/DefaultPropsProvider-sk0uWcA6.js +64 -0
- package/dist/{Download-UsLvGg3y.js → Download-Chao5NQl.js} +2 -2
- package/dist/{ExpandMore-DTWX_mHf.js → ExpandMore-DIGPB4Mj.js} +2 -2
- package/dist/{Favorite-DS5Gpq2s.js → Favorite-wp65zwWq.js} +2 -2
- package/dist/{Menu-CWq-a1Wz.js → Menu-DZYzE2Mg.js} +908 -906
- package/dist/{MenuItem-DY_qFSPR.js → MenuItem-BXiIhfBS.js} +26 -25
- package/dist/Paper-DnctZB5U.js +689 -0
- package/dist/{Select-DabtQlJT.js → Select-DY7XGVsv.js} +2152 -2115
- package/dist/{Stack-Cq2r2NmC.js → Stack-BScsuyQy.js} +6 -6
- package/dist/{Typography-C8jwvSWe.js → Typography-9Kg27dDw.js} +84 -86
- package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
- package/dist/assets/s-overlay-scrollbar.css +1 -9
- package/dist/createSvgIcon-BKymXuBG.js +242 -0
- package/dist/{createTheme-3Wd3hHrj.js → createTheme-f5g1s6ww.js} +859 -906
- package/dist/defaultTheme-LSr-S9un.js +5 -0
- package/dist/entries/carousel.d.ts +10 -0
- package/dist/entries/carousel.js +4 -0
- package/dist/entries/chat.d.ts +9 -0
- package/dist/entries/chat.js +4 -0
- package/dist/entries/code.d.ts +9 -0
- package/dist/entries/code.js +4 -0
- package/dist/entries/core.d.ts +100 -0
- package/dist/entries/core.js +122 -0
- package/dist/entries/dates.d.ts +16 -0
- package/dist/entries/dates.js +12 -0
- package/dist/entries/dropzone.d.ts +9 -0
- package/dist/entries/dropzone.js +4 -0
- package/dist/entries/editor.d.ts +12 -0
- package/dist/entries/editor.js +4 -0
- package/dist/entries/gallery.d.ts +17 -0
- package/dist/entries/gallery.js +13 -0
- package/dist/entries/i18n.d.ts +13 -0
- package/dist/entries/i18n.js +8 -0
- package/dist/entries/motion.d.ts +29 -0
- package/dist/entries/motion.js +28 -0
- package/dist/entries/scrollbar.d.ts +9 -0
- package/dist/entries/scrollbar.js +4 -0
- package/dist/entries/stripe.d.ts +10 -0
- package/dist/entries/stripe.js +10 -0
- package/dist/extendSxProp-DitxZ8We.js +36 -0
- package/dist/hooks/index.js +8 -9
- package/dist/hooks/use-is-passed-position.js +10 -10
- package/dist/{index-BGvzecIA.js → index-D3G5Rwl-.js} +0 -7
- package/dist/{index-CfKHZ86U.js → index-DtYP8YE7.js} +12 -13
- package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-tc70JA_2.js} +108 -128
- package/dist/main.d.ts +29 -145
- package/dist/main.js +187 -187
- package/dist/mergeSlotProps-CuzBQdlp.js +62 -0
- package/dist/resolveProps-BDH0VJjn.js +39 -0
- package/dist/s-accordion/package.json +5 -5
- package/dist/s-accordion/s-accordion.js +374 -358
- package/dist/s-action-overlay/package.json +5 -5
- package/dist/s-action-overlay/s-action-overlay.js +64 -79
- package/dist/s-ai-tool-bar/package.json +5 -5
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +260 -275
- package/dist/s-autocomplete/s-autocomplete.js +19 -25
- package/dist/s-avatar/package.json +5 -5
- package/dist/s-avatar/s-avatar.js +14 -25
- package/dist/s-blur-text/package.json +5 -5
- package/dist/s-blur-text/s-blur-text.js +55 -59
- package/dist/s-breadcrumbs/package.json +5 -5
- package/dist/s-breadcrumbs/s-breadcrumbs.js +31 -39
- package/dist/s-button/package.json +5 -5
- package/dist/s-button/s-button.js +7 -15
- package/dist/s-button-link/s-button-link.js +28 -36
- package/dist/s-carousel/package.json +4 -4
- package/dist/s-carousel/s-carousel.js +267 -280
- package/dist/s-category-card/package.json +4 -4
- package/dist/s-category-card/s-category-card.js +60 -77
- package/dist/s-chat-input/package.json +5 -5
- package/dist/s-chat-input/s-chat-input.d.ts +4 -0
- package/dist/s-chat-input/s-chat-input.js +103 -109
- package/dist/s-chat-message/s-chat-message.js +111 -120
- package/dist/s-checkbox/s-checkbox.js +12 -20
- package/dist/s-chip/package.json +5 -5
- package/dist/s-chip/s-chip.js +7 -15
- package/dist/s-chips/s-chips.js +47 -56
- package/dist/s-code-block/package.json +5 -5
- package/dist/s-code-block/s-code-block.js +35 -43
- package/dist/s-comment-message/package.json +5 -5
- package/dist/s-comment-message/s-comment-message.js +90 -94
- package/dist/s-copyable-text/s-copyable-text.js +24 -32
- package/dist/s-countdown/s-count-box.js +42 -50
- package/dist/s-countdown/s-count-down.js +79 -107
- package/dist/s-data-table/s-data-table.js +374 -384
- package/dist/s-date-picker/s-date-picker.js +164 -164
- package/dist/s-datetime-picker/s-datetime-picker.js +1599 -1603
- package/dist/s-dialog/s-dialog.js +24 -32
- package/dist/s-dialog-confirm/s-dialog-confirm.js +46 -50
- package/dist/s-dialog-message/s-dialog-message.js +40 -44
- package/dist/s-empty/s-empty.js +6 -14
- package/dist/s-error/s-error.js +9 -17
- package/dist/s-error-layout/s-error-layout.js +38 -47
- package/dist/s-file-dropzone/s-file-dropzone.js +55 -64
- package/dist/s-file-icon/s-file-icon.js +9 -13
- package/dist/s-flex-box/s-flex-box.js +6 -14
- package/dist/s-form/s-form.js +11 -19
- package/dist/s-gallery/index.js +3 -33
- package/dist/s-gallery/s-gallery.js +91 -114
- package/dist/s-glow-button/s-glow-button.js +22 -26
- package/dist/s-gradient-icon/s-gradient-icon.js +49 -59
- package/dist/s-i18n-provider/s-i18n-provider.js +17 -25
- package/dist/s-icon-button/s-icon-button.js +6 -14
- package/dist/s-image-comparison/package.json +5 -5
- package/dist/s-image-comparison/s-image-comparison.js +48 -53
- package/dist/s-image-modal/package.json +5 -5
- package/dist/s-image-modal/s-image-modal.js +137 -150
- package/dist/s-item-not-found/s-item-not-found.js +13 -22
- package/dist/s-label/s-label.js +12 -20
- package/dist/s-language-switcher/s-language-switcher.js +119 -141
- package/dist/s-lazy-image/index.js +2 -10
- package/dist/s-lazy-image/s-lazy-image.js +33 -37
- package/dist/s-localization-provider/s-localization-provider.js +368 -380
- package/dist/s-moving-border/s-moving-border.js +52 -67
- package/dist/s-multi-select/s-multi-select.js +43 -51
- package/dist/s-no-ssr/s-no-ssr.js +13 -21
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +12 -16
- package/dist/s-pagination/s-pagination.js +13 -17
- package/dist/s-pixel-reveal/package.json +5 -5
- package/dist/s-pixel-reveal/s-pixel-reveal.js +92 -99
- package/dist/s-radial-pulse-animate/package.json +5 -5
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +40 -48
- package/dist/s-rating/package.json +5 -5
- package/dist/s-rating/s-rating.js +7 -15
- package/dist/s-review/package.json +5 -5
- package/dist/s-review/s-review.js +101 -106
- package/dist/s-scroll-reveal/package.json +5 -5
- package/dist/s-scroll-reveal/s-scroll-reveal.js +40 -48
- package/dist/s-scroll-to-top/package.json +5 -5
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -30
- package/dist/s-scroll-velocity/package.json +5 -5
- package/dist/s-scroll-velocity/s-scroll-velocity.js +5 -19
- package/dist/s-scroll-velocity/scroll-velocity-container.js +18 -27
- package/dist/s-scroll-velocity/scroll-velocity-row.js +62 -71
- package/dist/s-select/s-select.js +67 -75
- package/dist/s-select-list/s-select-list.js +28 -32
- package/dist/s-skeleton/s-skeleton.js +20 -28
- package/dist/s-snackbar-message/s-snackbar-message.js +36 -40
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +31 -35
- package/dist/s-stripe/s-stripe-cvc.js +8 -12
- package/dist/s-stripe/s-stripe-expiry.js +8 -12
- package/dist/s-stripe/s-stripe-number.js +8 -12
- package/dist/s-stripe/s-stripe.d.ts +2 -2
- package/dist/s-stripe/s-stripe.js +17 -26
- package/dist/s-stripe/stripe-input.js +25 -29
- package/dist/s-tabs/package.json +3 -3
- package/dist/s-tabs/s-tab-panel.js +17 -25
- package/dist/s-tabs/s-tab.js +5 -9
- package/dist/s-tabs/s-tabs.js +19 -27
- package/dist/s-text-editor/s-text-editor-toolbar.js +73 -88
- package/dist/s-text-editor/s-text-editor.js +33 -45
- package/dist/s-text-field/s-text-field.js +31 -40
- package/dist/s-text-shimmer/package.json +4 -4
- package/dist/s-text-shimmer/s-text-shimmer.js +19 -27
- package/dist/s-text-truncation/s-text-truncation.js +24 -32
- package/dist/s-theme-demo/package.json +5 -5
- package/dist/s-theme-demo/s-theme-demo.js +219 -234
- package/dist/s-theme-provider/s-theme-provider.js +37 -45
- package/dist/s-theme-switch/package.json +4 -4
- package/dist/s-theme-switch/s-theme-switch.js +19 -23
- package/dist/s-tip/s-tip.js +14 -22
- package/dist/s-two-pane-layout/index.js +2 -10
- package/dist/s-two-pane-layout/s-two-pane-layout.js +47 -55
- package/dist/s-typewriter-text/package.json +5 -5
- package/dist/s-typewriter-text/s-typewriter-text.js +27 -35
- package/dist/s-zoom-image/index.js +2 -10
- package/dist/s-zoom-image/package.json +5 -5
- package/dist/s-zoom-image/s-zoom-image.js +53 -62
- package/dist/styled-B0KflPi-.js +203 -0
- package/dist/theme/components/alert.d.ts +484 -264
- package/dist/theme/components/avatar.js +2 -2
- package/dist/theme/components/button.d.ts +726 -396
- package/dist/theme/components/chip.js +2 -2
- package/dist/theme/components/components.js +14 -12
- package/dist/theme/components/icon-button.d.ts +6191 -0
- package/dist/theme/components/icon-button.js +90 -0
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/theme/customizations/inputs.js +2 -2
- package/dist/theme/customizations/navigation.js +2 -2
- package/dist/theme/theme-primitives.d.ts +8 -246
- package/dist/theme/theme-primitives.js +76 -87
- package/dist/{typographyClasses-DDyl9mok.js → typographyClasses-C7fhAsUD.js} +4 -4
- package/dist/{useMobilePicker-C1RZZUWr.js → useMobilePicker-C4AYe0Ch.js} +11249 -11231
- package/dist/{useTheme-B5czKfC4.js → useTheme-CtdhfT4P.js} +1 -1
- package/dist/{useThemeProps-DqA5BinV.js → useThemeProps-_apS-Aua.js} +2 -2
- package/dist/utils/dayjs.js +7 -7
- package/dist/utils/logger.js +29 -32
- package/dist/{warning-BCwEnWrE.js → warning-DnPRVtW6.js} +4 -4
- package/package.json +240 -81
- package/README.md +0 -13
- package/dist/ButtonBase-DfTfJ_ou.js +0 -1105
- package/dist/DefaultPropsProvider-CaCsvQaq.js +0 -78
- package/dist/Paper-hkbPWyBT.js +0 -553
- package/dist/createSvgIcon-DxwgGAVe.js +0 -247
- package/dist/defaultTheme-fEi1x1Gb.js +0 -5
- package/dist/extendSxProp-BKWjdW12.js +0 -37
- package/dist/mergeSlotProps-Dl_rJtoN.js +0 -62
- package/dist/resolveProps-61uUKnlS.js +0 -52
- package/dist/styled-B0Z4EDy9.js +0 -206
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { j as e } from "../jsx-runtime-
|
|
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-tc70JA_2.js";
|
|
2
|
+
import j, { useEffect as K, useState as T, useMemo as H, useCallback as L } from "react";
|
|
3
|
+
import { c as M } from "../createSvgIcon-BKymXuBG.js";
|
|
4
|
+
import { C as $ } from "../Close-DOHlPcFK.js";
|
|
5
|
+
import { D as J } from "../Download-Chao5NQl.js";
|
|
6
|
+
import { TextField as X, Typography as Q, Box as n, Slider as Y, IconButton as z, Checkbox as Z, Divider as ee, Tooltip as E, Dialog as le, DialogTitle as se, DialogContent as te } from "@mui/material";
|
|
7
|
+
import { createPortal as re } from "react-dom";
|
|
8
|
+
import { SSelect as ne } from "../s-select/s-select.js";
|
|
9
|
+
const oe = M(/* @__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"), ae = M(/* @__PURE__ */ e.jsx("path", {
|
|
12
12
|
d: "m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"
|
|
13
|
-
}), "AutoAwesome"),
|
|
13
|
+
}), "AutoAwesome"), ce = M(/* @__PURE__ */ e.jsx("path", {
|
|
14
14
|
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"
|
|
15
|
-
}), "Autorenew"),
|
|
15
|
+
}), "Autorenew"), ie = M(/* @__PURE__ */ e.jsx("path", {
|
|
16
16
|
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"
|
|
17
17
|
}), "InfoOutlined");
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
var de = /* @__PURE__ */ ((l) => (l.TEXTAREA = "textarea", l.SLIDER = "slider", l.IMAGE = "image", l.NUMBER = "number", l.SELECT = "select", l.CHECKBOX = "checkbox", l))(de || {});
|
|
19
|
+
const xe = j.memo(({ input: l, value: r, onChange: d, onFocus: o, onBlur: m, disabled: i }) => /* @__PURE__ */ e.jsx(
|
|
20
|
+
X,
|
|
21
21
|
{
|
|
22
|
-
value:
|
|
23
|
-
onChange: (
|
|
24
|
-
onFocus:
|
|
25
|
-
onBlur:
|
|
26
|
-
placeholder:
|
|
27
|
-
disabled:
|
|
22
|
+
value: r,
|
|
23
|
+
onChange: (x) => d(x.target.value),
|
|
24
|
+
onFocus: o,
|
|
25
|
+
onBlur: m,
|
|
26
|
+
placeholder: l.placeholder || l.label,
|
|
27
|
+
disabled: i,
|
|
28
28
|
multiline: !0,
|
|
29
|
-
minRows:
|
|
30
|
-
maxRows:
|
|
29
|
+
minRows: l.minRows ?? 2,
|
|
30
|
+
maxRows: l.maxRows ?? 5,
|
|
31
31
|
fullWidth: !0
|
|
32
32
|
}
|
|
33
|
-
)),
|
|
34
|
-
|
|
33
|
+
)), S = j.memo((l) => /* @__PURE__ */ e.jsx(
|
|
34
|
+
Q,
|
|
35
35
|
{
|
|
36
36
|
variant: "caption",
|
|
37
37
|
sx: {
|
|
@@ -41,10 +41,10 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
41
41
|
width: "100% !important",
|
|
42
42
|
textAlign: "center"
|
|
43
43
|
},
|
|
44
|
-
children:
|
|
44
|
+
children: l.label
|
|
45
45
|
}
|
|
46
|
-
)),
|
|
47
|
-
|
|
46
|
+
)), he = j.memo(({ input: l, value: r, onChange: d, onFocus: o, onBlur: m, disabled: i }) => /* @__PURE__ */ e.jsxs(
|
|
47
|
+
n,
|
|
48
48
|
{
|
|
49
49
|
sx: {
|
|
50
50
|
width: 120,
|
|
@@ -52,22 +52,22 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
52
52
|
flexDirection: "column"
|
|
53
53
|
},
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ e.jsx(
|
|
55
|
+
/* @__PURE__ */ e.jsx(S, { label: l.label }),
|
|
56
56
|
/* @__PURE__ */ e.jsx(
|
|
57
|
-
|
|
57
|
+
X,
|
|
58
58
|
{
|
|
59
59
|
type: "number",
|
|
60
|
-
value:
|
|
61
|
-
onChange: (
|
|
62
|
-
onFocus:
|
|
63
|
-
onBlur:
|
|
64
|
-
disabled:
|
|
60
|
+
value: r ?? l.defaultValue ?? 0,
|
|
61
|
+
onChange: (x) => d(Number(x.target.value)),
|
|
62
|
+
onFocus: o,
|
|
63
|
+
onBlur: m,
|
|
64
|
+
disabled: i,
|
|
65
65
|
size: "small",
|
|
66
66
|
slotProps: {
|
|
67
67
|
htmlInput: {
|
|
68
|
-
min:
|
|
69
|
-
max:
|
|
70
|
-
step:
|
|
68
|
+
min: l.min,
|
|
69
|
+
max: l.max,
|
|
70
|
+
step: l.step
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
sx: {
|
|
@@ -79,8 +79,8 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
79
79
|
)
|
|
80
80
|
]
|
|
81
81
|
}
|
|
82
|
-
)), me =
|
|
83
|
-
|
|
82
|
+
)), me = j.memo(({ input: l, value: r, onChange: d, onFocus: o, onBlur: m, disabled: i }) => /* @__PURE__ */ e.jsxs(
|
|
83
|
+
n,
|
|
84
84
|
{
|
|
85
85
|
sx: {
|
|
86
86
|
width: 180,
|
|
@@ -88,28 +88,28 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
88
88
|
flexDirection: "column"
|
|
89
89
|
},
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */ e.jsx(
|
|
91
|
+
/* @__PURE__ */ e.jsx(S, { label: l.label }),
|
|
92
92
|
/* @__PURE__ */ e.jsx(
|
|
93
|
-
|
|
93
|
+
ne,
|
|
94
94
|
{
|
|
95
|
-
value:
|
|
96
|
-
onChange: (
|
|
97
|
-
onFocus:
|
|
98
|
-
onBlur:
|
|
99
|
-
disabled:
|
|
100
|
-
placeholder:
|
|
101
|
-
options:
|
|
102
|
-
optionLabel:
|
|
103
|
-
optionValue:
|
|
104
|
-
searchable:
|
|
105
|
-
searchPlaceholder:
|
|
95
|
+
value: r ?? l.defaultValue ?? "",
|
|
96
|
+
onChange: (x) => d(x.target.value),
|
|
97
|
+
onFocus: o,
|
|
98
|
+
onBlur: m,
|
|
99
|
+
disabled: i,
|
|
100
|
+
placeholder: l.placeholder,
|
|
101
|
+
options: l.options || [],
|
|
102
|
+
optionLabel: l.optionLabel,
|
|
103
|
+
optionValue: l.optionValue,
|
|
104
|
+
searchable: l.searchable,
|
|
105
|
+
searchPlaceholder: l.searchPlaceholder,
|
|
106
106
|
size: "small"
|
|
107
107
|
}
|
|
108
108
|
)
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
|
-
)),
|
|
112
|
-
|
|
111
|
+
)), fe = j.memo(({ input: l, value: r, onChange: d, onFocus: o, onBlur: m, disabled: i }) => /* @__PURE__ */ e.jsxs(
|
|
112
|
+
n,
|
|
113
113
|
{
|
|
114
114
|
sx: {
|
|
115
115
|
width: 160,
|
|
@@ -117,25 +117,25 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
117
117
|
flexDirection: "column"
|
|
118
118
|
},
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */ e.jsx(
|
|
121
|
-
/* @__PURE__ */ e.jsxs(
|
|
120
|
+
/* @__PURE__ */ e.jsx(S, { label: l.label }),
|
|
121
|
+
/* @__PURE__ */ e.jsxs(n, { sx: { display: "flex", alignItems: "center", height: 36 }, children: [
|
|
122
122
|
/* @__PURE__ */ e.jsx(
|
|
123
|
-
|
|
123
|
+
Y,
|
|
124
124
|
{
|
|
125
|
-
value:
|
|
126
|
-
onChange: (
|
|
127
|
-
onMouseDown:
|
|
128
|
-
onMouseUp:
|
|
129
|
-
disabled:
|
|
130
|
-
min:
|
|
131
|
-
max:
|
|
132
|
-
step:
|
|
125
|
+
value: r ?? l.defaultValue ?? l.min ?? 0,
|
|
126
|
+
onChange: (x, b) => d(b),
|
|
127
|
+
onMouseDown: o,
|
|
128
|
+
onMouseUp: m,
|
|
129
|
+
disabled: i,
|
|
130
|
+
min: l.min ?? 0,
|
|
131
|
+
max: l.max ?? 100,
|
|
132
|
+
step: l.step ?? 1,
|
|
133
133
|
size: "small",
|
|
134
134
|
sx: { flex: 1 }
|
|
135
135
|
}
|
|
136
136
|
),
|
|
137
137
|
/* @__PURE__ */ e.jsx(
|
|
138
|
-
|
|
138
|
+
n,
|
|
139
139
|
{
|
|
140
140
|
sx: {
|
|
141
141
|
minWidth: 60,
|
|
@@ -143,88 +143,87 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
143
143
|
fontWeight: 500,
|
|
144
144
|
fontSize: "0.875rem"
|
|
145
145
|
},
|
|
146
|
-
children:
|
|
146
|
+
children: r ?? l.defaultValue ?? l.min ?? 0
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
] })
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
|
-
)),
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
let
|
|
156
|
-
return
|
|
157
|
-
if (!
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
} else typeof
|
|
164
|
-
}),
|
|
165
|
-
})(
|
|
166
|
-
|
|
152
|
+
)), ue = j.memo(({ input: l, value: r, onChange: d, disabled: o }) => {
|
|
153
|
+
const m = j.useRef(null), [i, x] = j.useState([]), [b, F] = j.useState(null), I = l.multiple ?? !1, p = l.maxImages ?? 5;
|
|
154
|
+
K(() => {
|
|
155
|
+
let f = [];
|
|
156
|
+
return x(((a) => {
|
|
157
|
+
if (!a) return [];
|
|
158
|
+
const y = Array.isArray(a) ? a : [a], c = [];
|
|
159
|
+
return y.forEach((k) => {
|
|
160
|
+
if (k instanceof File) {
|
|
161
|
+
const A = URL.createObjectURL(k);
|
|
162
|
+
c.push(A), f.push(A);
|
|
163
|
+
} else typeof k == "string" && c.push(k);
|
|
164
|
+
}), c;
|
|
165
|
+
})(r)), () => {
|
|
166
|
+
f.forEach((a) => URL.revokeObjectURL(a));
|
|
167
167
|
};
|
|
168
|
-
}, [
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
if (!(!
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
|
|
168
|
+
}, [r]);
|
|
169
|
+
const R = (f) => {
|
|
170
|
+
const h = f.target.files;
|
|
171
|
+
if (!(!h || h.length === 0)) {
|
|
172
|
+
if (I) {
|
|
173
|
+
const a = Array.isArray(r) ? r : r instanceof File || typeof r == "string" ? [r] : [], y = Array.from(h).slice(0, p - a.length), c = [...a, ...y];
|
|
174
|
+
d(c);
|
|
175
175
|
} else
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
d(h[0]);
|
|
177
|
+
f.target.value = "";
|
|
178
178
|
}
|
|
179
|
-
},
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
|
|
179
|
+
}, D = (f, h) => {
|
|
180
|
+
if (f.stopPropagation(), I && Array.isArray(r)) {
|
|
181
|
+
const a = r.filter((y, c) => c !== h);
|
|
182
|
+
d(a.length > 0 ? a : null);
|
|
183
183
|
} else
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return /* @__PURE__ */ e.jsxs(a, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
184
|
+
d(null);
|
|
185
|
+
}, P = () => {
|
|
186
|
+
o || I && i.length >= p || m.current?.click();
|
|
187
|
+
}, V = I && i.length < p;
|
|
188
|
+
return /* @__PURE__ */ e.jsxs(n, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
190
189
|
/* @__PURE__ */ e.jsx(
|
|
191
190
|
"input",
|
|
192
191
|
{
|
|
193
|
-
ref:
|
|
192
|
+
ref: m,
|
|
194
193
|
type: "file",
|
|
195
194
|
accept: "image/*",
|
|
196
|
-
multiple:
|
|
197
|
-
onChange:
|
|
198
|
-
disabled:
|
|
195
|
+
multiple: I,
|
|
196
|
+
onChange: R,
|
|
197
|
+
disabled: o,
|
|
199
198
|
style: { display: "none" }
|
|
200
199
|
}
|
|
201
200
|
),
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
i.map((f, h) => /* @__PURE__ */ e.jsxs(
|
|
202
|
+
n,
|
|
204
203
|
{
|
|
205
|
-
onMouseEnter: () =>
|
|
206
|
-
onMouseLeave: () =>
|
|
204
|
+
onMouseEnter: () => F(h),
|
|
205
|
+
onMouseLeave: () => F(null),
|
|
207
206
|
sx: {
|
|
208
207
|
width: 50,
|
|
209
208
|
height: 50,
|
|
210
209
|
border: 1,
|
|
211
|
-
borderColor:
|
|
210
|
+
borderColor: o ? "action.disabled" : "divider",
|
|
212
211
|
borderRadius: 1,
|
|
213
212
|
display: "flex",
|
|
214
213
|
alignItems: "center",
|
|
215
214
|
justifyContent: "center",
|
|
216
|
-
cursor:
|
|
215
|
+
cursor: o ? "not-allowed" : "default",
|
|
217
216
|
position: "relative",
|
|
218
217
|
overflow: "hidden",
|
|
219
218
|
transition: "all 0.2s"
|
|
220
219
|
},
|
|
221
220
|
children: [
|
|
222
221
|
/* @__PURE__ */ e.jsx(
|
|
223
|
-
|
|
222
|
+
n,
|
|
224
223
|
{
|
|
225
224
|
component: "img",
|
|
226
|
-
src:
|
|
227
|
-
alt: `Preview ${
|
|
225
|
+
src: f,
|
|
226
|
+
alt: `Preview ${h + 1}`,
|
|
228
227
|
sx: {
|
|
229
228
|
width: "100%",
|
|
230
229
|
height: "100%",
|
|
@@ -232,10 +231,10 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
232
231
|
}
|
|
233
232
|
}
|
|
234
233
|
),
|
|
235
|
-
!
|
|
236
|
-
|
|
234
|
+
!o && b === h && /* @__PURE__ */ e.jsx(
|
|
235
|
+
n,
|
|
237
236
|
{
|
|
238
|
-
onClick: (
|
|
237
|
+
onClick: (a) => D(a, h),
|
|
239
238
|
sx: {
|
|
240
239
|
position: "absolute",
|
|
241
240
|
top: 0,
|
|
@@ -246,46 +245,46 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
246
245
|
alignItems: "center",
|
|
247
246
|
justifyContent: "center"
|
|
248
247
|
},
|
|
249
|
-
children: /* @__PURE__ */ e.jsx(
|
|
248
|
+
children: /* @__PURE__ */ e.jsx(z, { onClick: (a) => D(a, h), children: /* @__PURE__ */ e.jsx($, {}) })
|
|
250
249
|
}
|
|
251
250
|
)
|
|
252
251
|
]
|
|
253
252
|
},
|
|
254
|
-
|
|
253
|
+
h
|
|
255
254
|
)),
|
|
256
|
-
(
|
|
257
|
-
|
|
255
|
+
(i.length === 0 || V) && /* @__PURE__ */ e.jsx(
|
|
256
|
+
n,
|
|
258
257
|
{
|
|
259
|
-
onClick:
|
|
258
|
+
onClick: P,
|
|
260
259
|
sx: {
|
|
261
260
|
width: 50,
|
|
262
261
|
height: 50,
|
|
263
262
|
border: 1,
|
|
264
|
-
borderColor:
|
|
263
|
+
borderColor: o ? "action.disabled" : "divider",
|
|
265
264
|
borderRadius: 1,
|
|
266
265
|
display: "flex",
|
|
267
266
|
alignItems: "center",
|
|
268
267
|
justifyContent: "center",
|
|
269
|
-
cursor:
|
|
268
|
+
cursor: o ? "not-allowed" : "pointer",
|
|
270
269
|
transition: "all 0.2s",
|
|
271
270
|
"&:hover": {
|
|
272
271
|
bgcolor: "action.hover"
|
|
273
272
|
}
|
|
274
273
|
},
|
|
275
274
|
children: /* @__PURE__ */ e.jsx(
|
|
276
|
-
|
|
275
|
+
oe,
|
|
277
276
|
{
|
|
278
277
|
sx: {
|
|
279
278
|
fontSize: 20,
|
|
280
|
-
color:
|
|
279
|
+
color: o ? "action.disabled" : "divider"
|
|
281
280
|
}
|
|
282
281
|
}
|
|
283
282
|
)
|
|
284
283
|
}
|
|
285
284
|
)
|
|
286
285
|
] });
|
|
287
|
-
}),
|
|
288
|
-
|
|
286
|
+
}), ge = j.memo(({ input: l, value: r, onChange: d, onFocus: o, onBlur: m, disabled: i }) => /* @__PURE__ */ e.jsxs(
|
|
287
|
+
n,
|
|
289
288
|
{
|
|
290
289
|
sx: {
|
|
291
290
|
display: "flex",
|
|
@@ -294,94 +293,94 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
294
293
|
minWidth: 60
|
|
295
294
|
},
|
|
296
295
|
children: [
|
|
297
|
-
/* @__PURE__ */ e.jsx(
|
|
296
|
+
/* @__PURE__ */ e.jsx(S, { label: l.label }),
|
|
298
297
|
/* @__PURE__ */ e.jsx(
|
|
299
|
-
|
|
298
|
+
Z,
|
|
300
299
|
{
|
|
301
|
-
checked:
|
|
302
|
-
onChange: (
|
|
303
|
-
onFocus:
|
|
304
|
-
onBlur:
|
|
305
|
-
disabled:
|
|
300
|
+
checked: r ?? l.defaultValue ?? !1,
|
|
301
|
+
onChange: (x) => d(x.target.checked),
|
|
302
|
+
onFocus: o,
|
|
303
|
+
onBlur: m,
|
|
304
|
+
disabled: i,
|
|
306
305
|
size: "small"
|
|
307
306
|
}
|
|
308
307
|
)
|
|
309
308
|
]
|
|
310
309
|
}
|
|
311
|
-
)),
|
|
312
|
-
switch (
|
|
310
|
+
)), U = (l) => {
|
|
311
|
+
switch (l.input.type) {
|
|
313
312
|
case "textarea":
|
|
314
|
-
return /* @__PURE__ */ e.jsx(
|
|
313
|
+
return /* @__PURE__ */ e.jsx(xe, { ...l });
|
|
315
314
|
case "number":
|
|
316
|
-
return /* @__PURE__ */ e.jsx(
|
|
315
|
+
return /* @__PURE__ */ e.jsx(he, { ...l });
|
|
317
316
|
case "slider":
|
|
318
|
-
return /* @__PURE__ */ e.jsx(
|
|
317
|
+
return /* @__PURE__ */ e.jsx(fe, { ...l });
|
|
319
318
|
case "select":
|
|
320
|
-
return /* @__PURE__ */ e.jsx(me, { ...
|
|
319
|
+
return /* @__PURE__ */ e.jsx(me, { ...l });
|
|
321
320
|
case "image":
|
|
322
|
-
return /* @__PURE__ */ e.jsx(
|
|
321
|
+
return /* @__PURE__ */ e.jsx(ue, { input: l.input, value: l.value, onChange: l.onChange, disabled: l.disabled });
|
|
323
322
|
case "checkbox":
|
|
324
|
-
return /* @__PURE__ */ e.jsx(
|
|
323
|
+
return /* @__PURE__ */ e.jsx(ge, { ...l });
|
|
325
324
|
default:
|
|
326
325
|
return null;
|
|
327
326
|
}
|
|
328
|
-
},
|
|
329
|
-
inputs:
|
|
330
|
-
onProcess:
|
|
331
|
-
onReset:
|
|
332
|
-
onDownload:
|
|
333
|
-
processing:
|
|
334
|
-
uploading:
|
|
335
|
-
inputValues:
|
|
327
|
+
}, je = ({
|
|
328
|
+
inputs: l = [],
|
|
329
|
+
onProcess: r,
|
|
330
|
+
onReset: d,
|
|
331
|
+
onDownload: o,
|
|
332
|
+
processing: m = !1,
|
|
333
|
+
uploading: i = !1,
|
|
334
|
+
inputValues: x = {},
|
|
336
335
|
onInputChange: b,
|
|
337
|
-
customActionButtons:
|
|
338
|
-
hideProcessButton:
|
|
339
|
-
processButtonDisabled:
|
|
340
|
-
getInputDisabled:
|
|
341
|
-
processTooltip:
|
|
342
|
-
downloadTooltip:
|
|
343
|
-
resetTooltip:
|
|
344
|
-
infoTooltip:
|
|
345
|
-
infoTitle:
|
|
346
|
-
infoContent:
|
|
347
|
-
position:
|
|
348
|
-
relative:
|
|
336
|
+
customActionButtons: F,
|
|
337
|
+
hideProcessButton: I = !1,
|
|
338
|
+
processButtonDisabled: p = !1,
|
|
339
|
+
getInputDisabled: R,
|
|
340
|
+
processTooltip: D = "Process",
|
|
341
|
+
downloadTooltip: P = "Download",
|
|
342
|
+
resetTooltip: V = "Reset",
|
|
343
|
+
infoTooltip: f = "Information",
|
|
344
|
+
infoTitle: h = "Tool Information",
|
|
345
|
+
infoContent: a,
|
|
346
|
+
position: y = "bottom",
|
|
347
|
+
relative: c = !1
|
|
349
348
|
}) => {
|
|
350
|
-
const [
|
|
351
|
-
if (!
|
|
352
|
-
const
|
|
353
|
-
return
|
|
354
|
-
}), [
|
|
355
|
-
(
|
|
349
|
+
const [k, A] = T(!1), W = H(() => l.length === 0 ? !0 : l.every((s) => {
|
|
350
|
+
if (!s.required) return !0;
|
|
351
|
+
const t = x[s.key];
|
|
352
|
+
return s.type === "textarea" ? t && typeof t == "string" && t.trim() !== "" : s.type === "number" || s.type === "slider" ? t != null : s.type === "select" ? t != null && t !== "" : !0;
|
|
353
|
+
}), [l, x]), { imageInputs: B, textareaInputs: N, paramInputs: O } = H(() => l.reduce(
|
|
354
|
+
(s, t) => (t.type === "image" ? s.imageInputs.push(t) : t.type === "textarea" ? s.textareaInputs.push(t) : s.paramInputs.push(t), s),
|
|
356
355
|
{
|
|
357
356
|
imageInputs: [],
|
|
358
357
|
textareaInputs: [],
|
|
359
358
|
paramInputs: []
|
|
360
359
|
}
|
|
361
|
-
), [
|
|
362
|
-
}, []),
|
|
363
|
-
}, []),
|
|
364
|
-
(
|
|
365
|
-
b
|
|
360
|
+
), [l]), C = L(() => {
|
|
361
|
+
}, []), w = L(() => {
|
|
362
|
+
}, []), v = L(
|
|
363
|
+
(s, t, g) => {
|
|
364
|
+
b?.(s, t, g);
|
|
366
365
|
},
|
|
367
366
|
[b]
|
|
368
|
-
),
|
|
369
|
-
|
|
367
|
+
), q = L(() => A(!0), []), G = L(() => A(!1), []), _ = /* @__PURE__ */ e.jsxs(
|
|
368
|
+
n,
|
|
370
369
|
{
|
|
371
370
|
sx: {
|
|
372
|
-
position:
|
|
373
|
-
[
|
|
374
|
-
left:
|
|
375
|
-
transform:
|
|
376
|
-
zIndex:
|
|
377
|
-
display:
|
|
378
|
-
justifyContent:
|
|
379
|
-
mt:
|
|
380
|
-
mb:
|
|
371
|
+
position: c ? "relative" : "fixed",
|
|
372
|
+
[y]: c ? "auto" : 20,
|
|
373
|
+
left: c ? "auto" : "50%",
|
|
374
|
+
transform: c ? "none" : "translateX(-50%)",
|
|
375
|
+
zIndex: c ? "auto" : 1300,
|
|
376
|
+
display: c ? "flex" : "block",
|
|
377
|
+
justifyContent: c ? "center" : "initial",
|
|
378
|
+
mt: c && y === "top" ? 2 : 0,
|
|
379
|
+
mb: c && y === "bottom" ? 2 : 0
|
|
381
380
|
},
|
|
382
381
|
children: [
|
|
383
382
|
/* @__PURE__ */ e.jsxs(
|
|
384
|
-
|
|
383
|
+
n,
|
|
385
384
|
{
|
|
386
385
|
sx: {
|
|
387
386
|
display: "flex",
|
|
@@ -394,30 +393,30 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
394
393
|
bgcolor: "background.default"
|
|
395
394
|
},
|
|
396
395
|
children: [
|
|
397
|
-
|
|
398
|
-
const
|
|
399
|
-
return
|
|
400
|
-
value:
|
|
401
|
-
onChange: (
|
|
402
|
-
onFocus:
|
|
403
|
-
onBlur:
|
|
404
|
-
disabled:
|
|
405
|
-
}) },
|
|
406
|
-
|
|
396
|
+
N.length > 0 && /* @__PURE__ */ e.jsx(n, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: N.map((s) => {
|
|
397
|
+
const t = x[s.key], g = R?.(s.key) ?? !1;
|
|
398
|
+
return s.renderInput ? /* @__PURE__ */ e.jsx(n, { children: s.renderInput({
|
|
399
|
+
value: t,
|
|
400
|
+
onChange: (u) => v(s.key, u),
|
|
401
|
+
onFocus: C,
|
|
402
|
+
onBlur: w,
|
|
403
|
+
disabled: g
|
|
404
|
+
}) }, s.key) : /* @__PURE__ */ e.jsx(
|
|
405
|
+
U,
|
|
407
406
|
{
|
|
408
|
-
input:
|
|
409
|
-
value:
|
|
410
|
-
onChange: (
|
|
411
|
-
onFocus:
|
|
412
|
-
onBlur:
|
|
413
|
-
disabled:
|
|
407
|
+
input: s,
|
|
408
|
+
value: t,
|
|
409
|
+
onChange: (u) => v(s.key, u),
|
|
410
|
+
onFocus: C,
|
|
411
|
+
onBlur: w,
|
|
412
|
+
disabled: g
|
|
414
413
|
},
|
|
415
|
-
|
|
414
|
+
s.key
|
|
416
415
|
);
|
|
417
416
|
}) }),
|
|
418
|
-
/* @__PURE__ */ e.jsxs(
|
|
417
|
+
/* @__PURE__ */ e.jsxs(n, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
419
418
|
/* @__PURE__ */ e.jsx(
|
|
420
|
-
|
|
419
|
+
n,
|
|
421
420
|
{
|
|
422
421
|
sx: {
|
|
423
422
|
display: "flex",
|
|
@@ -425,68 +424,68 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
425
424
|
gap: 2,
|
|
426
425
|
flex: 1
|
|
427
426
|
},
|
|
428
|
-
children: (
|
|
429
|
-
|
|
430
|
-
const
|
|
431
|
-
return
|
|
432
|
-
value:
|
|
433
|
-
onChange: (
|
|
434
|
-
onFocus:
|
|
435
|
-
onBlur:
|
|
436
|
-
disabled:
|
|
437
|
-
}) },
|
|
438
|
-
|
|
427
|
+
children: (B.length > 0 || O.length > 0) && /* @__PURE__ */ e.jsxs(n, { sx: { display: "flex", alignItems: "flex-end", gap: 1.5 }, children: [
|
|
428
|
+
B.map((s) => {
|
|
429
|
+
const t = x[s.key], g = R?.(s.key) ?? !1;
|
|
430
|
+
return s.renderInput ? /* @__PURE__ */ e.jsx(n, { children: s.renderInput({
|
|
431
|
+
value: t,
|
|
432
|
+
onChange: (u) => v(s.key, u),
|
|
433
|
+
onFocus: C,
|
|
434
|
+
onBlur: w,
|
|
435
|
+
disabled: g
|
|
436
|
+
}) }, s.key) : /* @__PURE__ */ e.jsx(
|
|
437
|
+
U,
|
|
439
438
|
{
|
|
440
|
-
input:
|
|
441
|
-
value:
|
|
442
|
-
onChange: (
|
|
443
|
-
onFocus:
|
|
444
|
-
onBlur:
|
|
445
|
-
disabled:
|
|
439
|
+
input: s,
|
|
440
|
+
value: t,
|
|
441
|
+
onChange: (u) => v(s.key, u),
|
|
442
|
+
onFocus: C,
|
|
443
|
+
onBlur: w,
|
|
444
|
+
disabled: g
|
|
446
445
|
},
|
|
447
|
-
|
|
446
|
+
s.key
|
|
448
447
|
);
|
|
449
448
|
}),
|
|
450
|
-
|
|
451
|
-
const
|
|
452
|
-
return
|
|
453
|
-
value:
|
|
454
|
-
onChange: (
|
|
455
|
-
onFocus:
|
|
456
|
-
onBlur:
|
|
457
|
-
disabled:
|
|
458
|
-
}) },
|
|
459
|
-
|
|
449
|
+
O.map((s) => {
|
|
450
|
+
const t = x[s.key], g = R?.(s.key) ?? !1;
|
|
451
|
+
return s.renderInput ? /* @__PURE__ */ e.jsx(n, { children: s.renderInput({
|
|
452
|
+
value: t,
|
|
453
|
+
onChange: (u) => v(s.key, u),
|
|
454
|
+
onFocus: C,
|
|
455
|
+
onBlur: w,
|
|
456
|
+
disabled: g
|
|
457
|
+
}) }, s.key) : /* @__PURE__ */ e.jsx(
|
|
458
|
+
U,
|
|
460
459
|
{
|
|
461
|
-
input:
|
|
462
|
-
value:
|
|
463
|
-
onChange: (
|
|
464
|
-
onFocus:
|
|
465
|
-
onBlur:
|
|
466
|
-
disabled:
|
|
460
|
+
input: s,
|
|
461
|
+
value: t,
|
|
462
|
+
onChange: (u) => v(s.key, u),
|
|
463
|
+
onFocus: C,
|
|
464
|
+
onBlur: w,
|
|
465
|
+
disabled: g
|
|
467
466
|
},
|
|
468
|
-
|
|
467
|
+
s.key
|
|
469
468
|
);
|
|
470
469
|
})
|
|
471
470
|
] })
|
|
472
471
|
}
|
|
473
472
|
),
|
|
474
|
-
(
|
|
475
|
-
/* @__PURE__ */ e.jsxs(
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
/* @__PURE__ */ e.jsx(
|
|
479
|
-
/* @__PURE__ */ e.jsx(
|
|
480
|
-
!
|
|
481
|
-
|
|
473
|
+
(B.length > 0 || O.length > 0) && /* @__PURE__ */ e.jsx(ee, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5, flexShrink: 0 } }),
|
|
474
|
+
/* @__PURE__ */ e.jsxs(n, { sx: { display: "flex", alignItems: "center", gap: 0.75, ml: "auto" }, children: [
|
|
475
|
+
F,
|
|
476
|
+
a && /* @__PURE__ */ e.jsx(E, { title: f, children: /* @__PURE__ */ e.jsx(z, { onClick: q, children: /* @__PURE__ */ e.jsx(ie, {}) }) }),
|
|
477
|
+
/* @__PURE__ */ e.jsx(E, { title: P, children: /* @__PURE__ */ e.jsx(z, { onClick: o, children: /* @__PURE__ */ e.jsx(J, {}) }) }),
|
|
478
|
+
/* @__PURE__ */ e.jsx(E, { title: V, children: /* @__PURE__ */ e.jsx(z, { onClick: d, children: /* @__PURE__ */ e.jsx(ce, {}) }) }),
|
|
479
|
+
!I && /* @__PURE__ */ e.jsx(E, { title: D, children: /* @__PURE__ */ e.jsx("span", { children: /* @__PURE__ */ e.jsx(
|
|
480
|
+
z,
|
|
482
481
|
{
|
|
483
|
-
onClick:
|
|
484
|
-
disabled:
|
|
482
|
+
onClick: r,
|
|
483
|
+
disabled: p || !W || i || m,
|
|
485
484
|
size: "large",
|
|
486
485
|
children: /* @__PURE__ */ e.jsx(
|
|
487
|
-
|
|
486
|
+
ae,
|
|
488
487
|
{
|
|
489
|
-
color:
|
|
488
|
+
color: p || !W || i || m ? "disabled" : "primary"
|
|
490
489
|
}
|
|
491
490
|
)
|
|
492
491
|
}
|
|
@@ -496,32 +495,18 @@ const fe = g.memo(({ input: t, value: l, onChange: u, onFocus: s, onBlur: p, dis
|
|
|
496
495
|
]
|
|
497
496
|
}
|
|
498
497
|
),
|
|
499
|
-
|
|
500
|
-
/* @__PURE__ */ e.jsx(
|
|
501
|
-
/* @__PURE__ */ e.jsx(
|
|
498
|
+
a && /* @__PURE__ */ e.jsxs(le, { open: k, onClose: G, maxWidth: "sm", fullWidth: !0, children: [
|
|
499
|
+
/* @__PURE__ */ e.jsx(se, { children: h }),
|
|
500
|
+
/* @__PURE__ */ e.jsx(te, { children: a })
|
|
502
501
|
] })
|
|
503
502
|
]
|
|
504
503
|
}
|
|
505
504
|
);
|
|
506
|
-
return !
|
|
505
|
+
return !c && typeof window < "u" ? re(_, document.body) : _;
|
|
507
506
|
};
|
|
508
|
-
|
|
509
|
-
try {
|
|
510
|
-
M.displayName = "SAiToolBarInputType", M.__docgenInfo = { description: "Supported input types for SAiToolBar", displayName: "SAiToolBarInputType", props: {} };
|
|
511
|
-
} catch {
|
|
512
|
-
}
|
|
513
|
-
try {
|
|
514
|
-
N.displayName = "SAiToolBar", N.__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" } } } };
|
|
516
|
-
} catch {
|
|
517
|
-
}
|
|
518
|
-
try {
|
|
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" } } } };
|
|
521
|
-
} catch {
|
|
522
|
-
}
|
|
507
|
+
je.displayName = "SAiToolBar";
|
|
523
508
|
export {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
509
|
+
je as SAiToolBar,
|
|
510
|
+
de as SAiToolBarInputType,
|
|
511
|
+
je as default
|
|
527
512
|
};
|