@solostylist/ui-kit 1.0.167 → 1.0.169
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/{Typography-B7LOtCzI.js → Typography-C8jwvSWe.js} +1 -1
- package/dist/main.d.ts +5 -3
- package/dist/main.js +187 -173
- package/dist/s-accordion/index.js +2 -2
- package/dist/s-accordion/s-accordion.d.ts +17 -1
- package/dist/s-accordion/s-accordion.js +252 -238
- package/dist/s-action-overlay/index.js +1 -1
- package/dist/s-action-overlay/s-action-overlay.d.ts +34 -1
- package/dist/s-action-overlay/s-action-overlay.js +67 -55
- package/dist/s-ai-tool-bar/index.d.ts +2 -0
- package/dist/s-ai-tool-bar/index.js +3 -2
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +33 -22
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +295 -247
- package/dist/s-autocomplete/index.js +2 -2
- package/dist/s-autocomplete/s-autocomplete.d.ts +13 -15
- package/dist/s-autocomplete/s-autocomplete.js +25 -17
- package/dist/s-avatar/index.js +2 -2
- package/dist/s-avatar/s-avatar.d.ts +16 -1
- package/dist/s-avatar/s-avatar.js +23 -10
- package/dist/s-blur-text/index.js +2 -2
- package/dist/s-blur-text/s-blur-text.d.ts +4 -13
- package/dist/s-blur-text/s-blur-text.js +57 -51
- package/dist/s-breadcrumbs/index.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +20 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +39 -30
- package/dist/s-button/index.js +2 -2
- package/dist/s-button/s-button.d.ts +7 -1
- package/dist/s-button/s-button.js +15 -5
- package/dist/s-button-link/index.js +2 -2
- package/dist/s-button-link/s-button-link.d.ts +12 -26
- package/dist/s-button-link/s-button-link.js +36 -26
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +11 -1
- package/dist/s-carousel/s-carousel.js +233 -223
- package/dist/s-category-card/index.js +2 -2
- package/dist/s-category-card/s-category-card.d.ts +28 -1
- package/dist/s-category-card/s-category-card.js +77 -58
- package/dist/s-chat-input/index.js +2 -2
- package/dist/s-chat-input/s-chat-input.d.ts +12 -1
- package/dist/s-chat-input/s-chat-input.js +92 -82
- package/dist/s-chat-message/index.js +2 -2
- package/dist/s-chat-message/s-chat-message.d.ts +22 -1
- package/dist/s-chat-message/s-chat-message.js +144 -133
- package/dist/s-checkbox/index.js +2 -2
- package/dist/s-checkbox/s-checkbox.d.ts +2 -15
- package/dist/s-checkbox/s-checkbox.js +20 -10
- package/dist/s-chip/index.js +2 -2
- package/dist/s-chip/s-chip.d.ts +7 -1
- package/dist/s-chip/s-chip.js +15 -5
- package/dist/s-chips/index.js +2 -2
- package/dist/s-chips/s-chips.d.ts +5 -18
- package/dist/s-chips/s-chips.js +56 -41
- package/dist/s-comment-message/index.js +2 -2
- package/dist/s-comment-message/s-comment-message.d.ts +26 -1
- package/dist/s-comment-message/s-comment-message.js +95 -89
- package/dist/s-copyable-text/index.js +1 -1
- package/dist/s-copyable-text/s-copyable-text.d.ts +9 -36
- package/dist/s-copyable-text/s-copyable-text.js +31 -21
- package/dist/s-countdown/index.d.ts +3 -2
- package/dist/s-countdown/index.js +4 -3
- package/dist/s-countdown/s-count-box.d.ts +39 -0
- package/dist/s-countdown/s-count-box.js +112 -0
- package/dist/s-countdown/s-count-down.d.ts +6 -50
- package/dist/s-countdown/s-count-down.js +110 -175
- package/dist/s-data-table/index.js +2 -2
- package/dist/s-data-table/s-data-table.d.ts +9 -65
- package/dist/s-data-table/s-data-table.js +381 -371
- package/dist/s-date-picker/index.js +2 -2
- package/dist/s-date-picker/s-date-picker.d.ts +6 -17
- package/dist/s-date-picker/s-date-picker.js +124 -107
- package/dist/s-datetime-picker/index.js +2 -2
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +5 -16
- package/dist/s-datetime-picker/s-datetime-picker.js +897 -887
- package/dist/s-dialog/index.js +2 -2
- package/dist/s-dialog/s-dialog.d.ts +3 -16
- package/dist/s-dialog/s-dialog.js +32 -23
- package/dist/s-dialog-confirm/index.js +3 -3
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +5 -13
- package/dist/s-dialog-confirm/s-dialog-confirm.js +55 -48
- package/dist/s-dialog-message/index.js +4 -4
- package/dist/s-dialog-message/s-dialog-message.d.ts +5 -15
- package/dist/s-dialog-message/s-dialog-message.js +45 -38
- package/dist/s-empty/index.js +2 -2
- package/dist/s-empty/s-empty.d.ts +5 -20
- package/dist/s-empty/s-empty.js +14 -4
- package/dist/s-error/index.js +2 -2
- package/dist/s-error/s-error.d.ts +5 -20
- package/dist/s-error/s-error.js +16 -6
- package/dist/s-error-layout/index.js +2 -2
- package/dist/s-error-layout/s-error-layout.d.ts +6 -1
- package/dist/s-error-layout/s-error-layout.js +60 -51
- package/dist/s-file-dropzone/index.js +2 -2
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +6 -51
- package/dist/s-file-dropzone/s-file-dropzone.js +64 -54
- package/dist/s-file-icon/index.js +2 -2
- package/dist/s-file-icon/s-file-icon.d.ts +5 -25
- package/dist/s-file-icon/s-file-icon.js +14 -8
- package/dist/s-flex-box/index.js +2 -2
- package/dist/s-flex-box/s-flex-box.d.ts +10 -1
- package/dist/s-flex-box/s-flex-box.js +14 -4
- package/dist/s-form/index.js +2 -2
- package/dist/s-form/s-form.d.ts +5 -14
- package/dist/s-form/s-form.js +19 -9
- package/dist/s-gallery/index.js +33 -3
- package/dist/s-gallery/s-gallery.d.ts +3 -36
- package/dist/s-gallery/s-gallery.js +108 -78
- package/dist/s-glow-button/s-glow-button.d.ts +6 -42
- package/dist/s-glow-button/s-glow-button.js +29 -47
- package/dist/s-gradient-icon/index.d.ts +1 -1
- package/dist/s-gradient-icon/index.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +8 -68
- package/dist/s-gradient-icon/s-gradient-icon.js +54 -44
- package/dist/s-i18n-provider/index.js +1 -1
- package/dist/s-i18n-provider/s-i18n-provider.d.ts +5 -33
- package/dist/s-i18n-provider/s-i18n-provider.js +25 -15
- package/dist/s-icon-button/index.js +2 -2
- package/dist/s-icon-button/s-icon-button.d.ts +6 -19
- package/dist/s-icon-button/s-icon-button.js +14 -4
- package/dist/s-image-comparison/s-image-comparison.js +50 -45
- package/dist/s-image-modal/index.js +3 -3
- package/dist/s-image-modal/s-image-modal.d.ts +4 -20
- package/dist/s-image-modal/s-image-modal.js +150 -135
- package/dist/s-item-not-found/index.js +2 -2
- package/dist/s-item-not-found/s-item-not-found.d.ts +14 -1
- package/dist/s-item-not-found/s-item-not-found.js +21 -10
- package/dist/s-label/index.js +2 -2
- package/dist/s-label/s-label.d.ts +9 -25
- package/dist/s-label/s-label.js +19 -9
- package/dist/s-language-switcher/index.js +3 -3
- package/dist/s-language-switcher/s-language-switcher.d.ts +20 -33
- package/dist/s-language-switcher/s-language-switcher.js +137 -115
- package/dist/s-lazy-image/index.js +10 -2
- package/dist/s-lazy-image/s-lazy-image.d.ts +12 -58
- package/dist/s-lazy-image/s-lazy-image.js +53 -58
- package/dist/s-localization-provider/index.js +2 -2
- package/dist/s-localization-provider/s-localization-provider.d.ts +6 -27
- package/dist/s-localization-provider/s-localization-provider.js +157 -149
- package/dist/s-moving-border/index.js +2 -2
- package/dist/s-moving-border/s-moving-border.d.ts +3 -33
- package/dist/s-moving-border/s-moving-border.js +65 -55
- package/dist/s-multi-select/index.js +2 -2
- package/dist/s-multi-select/s-multi-select.d.ts +5 -15
- package/dist/s-multi-select/s-multi-select.js +54 -45
- package/dist/s-no-ssr/index.js +2 -2
- package/dist/s-no-ssr/s-no-ssr.d.ts +5 -33
- package/dist/s-no-ssr/s-no-ssr.js +21 -11
- package/dist/s-overlay-scrollbar/index.js +2 -2
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.d.ts +10 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +16 -11
- package/dist/s-pagination/index.js +2 -2
- package/dist/s-pagination/s-pagination.d.ts +5 -23
- package/dist/s-pagination/s-pagination.js +17 -11
- package/dist/s-pixel-reveal/index.js +2 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +15 -1
- package/dist/s-pixel-reveal/s-pixel-reveal.js +83 -78
- package/dist/s-radial-pulse-animate/index.js +2 -2
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.d.ts +12 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +52 -42
- package/dist/s-rating/index.js +2 -2
- package/dist/s-rating/s-rating.d.ts +7 -1
- package/dist/s-rating/s-rating.js +15 -5
- package/dist/s-review/index.js +2 -2
- package/dist/s-review/s-review.d.ts +25 -1
- package/dist/s-review/s-review.js +104 -97
- package/dist/s-scroll-reveal/index.js +2 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +17 -36
- package/dist/s-scroll-reveal/s-scroll-reveal.js +43 -33
- package/dist/s-scroll-to-top/index.js +2 -2
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +12 -17
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -15
- package/dist/s-scroll-velocity/index.d.ts +6 -0
- package/dist/s-scroll-velocity/index.js +8 -0
- package/dist/s-scroll-velocity/package.json +5 -0
- package/dist/s-scroll-velocity/s-scroll-velocity.d.ts +24 -0
- package/dist/s-scroll-velocity/s-scroll-velocity.js +22 -0
- package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +20 -0
- package/dist/s-scroll-velocity/scroll-velocity-container.js +40 -0
- package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +27 -0
- package/dist/s-scroll-velocity/scroll-velocity-row.js +131 -0
- package/dist/s-select/index.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -22
- package/dist/s-select/s-select.js +76 -72
- package/dist/s-select-list/index.js +2 -2
- package/dist/s-select-list/s-select-list.d.ts +16 -19
- package/dist/s-select-list/s-select-list.js +33 -28
- package/dist/s-skeleton/index.js +2 -2
- package/dist/s-skeleton/s-skeleton.d.ts +6 -22
- package/dist/s-skeleton/s-skeleton.js +28 -18
- package/dist/s-snackbar-message/index.js +4 -4
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +5 -23
- package/dist/s-snackbar-message/s-snackbar-message.js +38 -31
- package/dist/s-spotlight-cursor/index.js +2 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.d.ts +10 -44
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +35 -29
- package/dist/s-stripe/index.d.ts +4 -1
- package/dist/s-stripe/index.js +7 -4
- package/dist/s-stripe/s-stripe-cvc.d.ts +8 -0
- package/dist/s-stripe/s-stripe-cvc.js +15 -0
- package/dist/s-stripe/s-stripe-expiry.d.ts +8 -0
- package/dist/s-stripe/s-stripe-expiry.js +15 -0
- package/dist/s-stripe/s-stripe-number.d.ts +8 -0
- package/dist/s-stripe/s-stripe-number.js +15 -0
- package/dist/s-stripe/s-stripe.d.ts +6 -85
- package/dist/s-stripe/s-stripe.js +24 -27
- package/dist/s-stripe/stripe-input.js +22 -18
- package/dist/s-tabs/index.js +6 -6
- package/dist/s-tabs/s-tab-panel.d.ts +11 -1
- package/dist/s-tabs/s-tab-panel.js +25 -16
- package/dist/s-tabs/s-tab.js +9 -5
- package/dist/s-tabs/s-tabs.d.ts +24 -3
- package/dist/s-tabs/s-tabs.js +34 -25
- package/dist/s-text-editor/index.js +3 -3
- package/dist/s-text-editor/s-text-editor-toolbar.js +91 -76
- package/dist/s-text-editor/s-text-editor.d.ts +13 -11
- package/dist/s-text-editor/s-text-editor.js +44 -30
- package/dist/s-text-field/index.js +2 -2
- package/dist/s-text-field/s-text-field.d.ts +6 -15
- package/dist/s-text-field/s-text-field.js +38 -28
- package/dist/s-text-shimmer/index.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +10 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +27 -18
- package/dist/s-text-truncation/index.js +2 -2
- package/dist/s-text-truncation/s-text-truncation.d.ts +9 -38
- package/dist/s-text-truncation/s-text-truncation.js +34 -20
- package/dist/s-theme-demo/s-theme-demo.js +238 -223
- package/dist/s-theme-provider/index.js +1 -1
- package/dist/s-theme-provider/s-theme-provider.d.ts +5 -17
- package/dist/s-theme-provider/s-theme-provider.js +44 -34
- package/dist/s-theme-switch/s-theme-switch.js +23 -19
- package/dist/s-tip/index.js +2 -2
- package/dist/s-tip/s-tip.d.ts +5 -22
- package/dist/s-tip/s-tip.js +22 -12
- package/dist/s-two-pane-layout/index.js +10 -2
- package/dist/s-two-pane-layout/s-two-pane-layout.d.ts +7 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.js +58 -48
- package/dist/s-typewriter-text/index.js +2 -2
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +17 -1
- package/dist/s-typewriter-text/s-typewriter-text.js +37 -27
- package/dist/s-zoom-image/index.js +10 -2
- package/dist/s-zoom-image/s-zoom-image.d.ts +10 -42
- package/dist/s-zoom-image/s-zoom-image.js +62 -52
- package/dist/theme/components/alert.d.ts +1436 -1436
- package/dist/theme/components/button.d.ts +2150 -2150
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/{typographyClasses-C7fhAsUD.js → typographyClasses-DDyl9mok.js} +4 -4
- package/dist/{useMobilePicker-DgxcRrRB.js → useMobilePicker-C1RZZUWr.js} +1 -1
- package/package.json +23 -6
|
@@ -1,35 +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 he from "../s-select/s-select.js";
|
|
9
|
-
const
|
|
1
|
+
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import b, { useEffect as le, useState as N, useMemo as J, useCallback as w } from "react";
|
|
3
|
+
import { c as P } from "../createSvgIcon-DxwgGAVe.js";
|
|
4
|
+
import { C as ae } from "../Close-BRlEKA2Q.js";
|
|
5
|
+
import { D as re } from "../Download-UsLvGg3y.js";
|
|
6
|
+
import { TextField as Q, Typography as se, Box as r, Slider as ie, alpha as R, Checkbox as de, Divider as ue, Tooltip as _, IconButton as S, Dialog as ce, DialogTitle as fe, DialogContent as pe } from "@mui/material";
|
|
7
|
+
import { createPortal as me } from "react-dom";
|
|
8
|
+
import { SSelect as he } from "../s-select/s-select.js";
|
|
9
|
+
const xe = P(/* @__PURE__ */ o.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"), ye = P(/* @__PURE__ */ o.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"), ge = P(/* @__PURE__ */ o.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"), be = P(/* @__PURE__ */ o.jsx("path", {
|
|
16
16
|
d: "M8 5v14l11-7z"
|
|
17
|
-
}), "PlayArrow")
|
|
18
|
-
|
|
17
|
+
}), "PlayArrow");
|
|
18
|
+
var W = /* @__PURE__ */ ((e) => (e.TEXTAREA = "textarea", e.SLIDER = "slider", e.IMAGE = "image", e.NUMBER = "number", e.SELECT = "select", e.CHECKBOX = "checkbox", e))(W || {});
|
|
19
|
+
const ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, disabled: d }) => /* @__PURE__ */ o.jsx(
|
|
20
|
+
Q,
|
|
19
21
|
{
|
|
20
|
-
value:
|
|
21
|
-
onChange: (
|
|
22
|
+
value: a,
|
|
23
|
+
onChange: (u) => c(u.target.value),
|
|
22
24
|
onFocus: l,
|
|
23
25
|
onBlur: f,
|
|
24
|
-
placeholder:
|
|
25
|
-
disabled:
|
|
26
|
+
placeholder: e.placeholder || e.label,
|
|
27
|
+
disabled: d,
|
|
26
28
|
multiline: !0,
|
|
27
|
-
minRows:
|
|
28
|
-
maxRows:
|
|
29
|
+
minRows: e.minRows ?? 2,
|
|
30
|
+
maxRows: e.maxRows ?? 5,
|
|
29
31
|
fullWidth: !0
|
|
30
32
|
}
|
|
31
|
-
)),
|
|
32
|
-
|
|
33
|
+
)), F = b.memo((e) => /* @__PURE__ */ o.jsx(
|
|
34
|
+
se,
|
|
33
35
|
{
|
|
34
36
|
variant: "caption",
|
|
35
37
|
sx: {
|
|
@@ -40,10 +42,10 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
40
42
|
width: "100% !important",
|
|
41
43
|
textAlign: "center"
|
|
42
44
|
},
|
|
43
|
-
children:
|
|
45
|
+
children: e.label
|
|
44
46
|
}
|
|
45
|
-
)),
|
|
46
|
-
|
|
47
|
+
)), je = b.memo(({ input: e, value: a, onChange: c, isExpanded: l, onFocus: f, onBlur: d, disabled: u }) => /* @__PURE__ */ o.jsxs(
|
|
48
|
+
r,
|
|
47
49
|
{
|
|
48
50
|
sx: {
|
|
49
51
|
width: l ? 120 : 60,
|
|
@@ -52,22 +54,22 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
52
54
|
flexDirection: "column"
|
|
53
55
|
},
|
|
54
56
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
57
|
+
/* @__PURE__ */ o.jsx(F, { label: e.label }),
|
|
58
|
+
/* @__PURE__ */ o.jsx(
|
|
59
|
+
Q,
|
|
58
60
|
{
|
|
59
61
|
type: "number",
|
|
60
|
-
value:
|
|
61
|
-
onChange: (
|
|
62
|
+
value: a ?? e.defaultValue ?? 0,
|
|
63
|
+
onChange: (h) => c(Number(h.target.value)),
|
|
62
64
|
onFocus: f,
|
|
63
|
-
onBlur:
|
|
64
|
-
disabled:
|
|
65
|
+
onBlur: d,
|
|
66
|
+
disabled: u,
|
|
65
67
|
size: "small",
|
|
66
68
|
slotProps: {
|
|
67
69
|
htmlInput: {
|
|
68
|
-
min:
|
|
69
|
-
max:
|
|
70
|
-
step:
|
|
70
|
+
min: e.min,
|
|
71
|
+
max: e.max,
|
|
72
|
+
step: e.step
|
|
71
73
|
}
|
|
72
74
|
},
|
|
73
75
|
sx: {
|
|
@@ -79,8 +81,8 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
79
81
|
)
|
|
80
82
|
]
|
|
81
83
|
}
|
|
82
|
-
)),
|
|
83
|
-
|
|
84
|
+
)), we = b.memo(({ input: e, value: a, onChange: c, isExpanded: l, onFocus: f, onBlur: d, disabled: u }) => /* @__PURE__ */ o.jsxs(
|
|
85
|
+
r,
|
|
84
86
|
{
|
|
85
87
|
sx: {
|
|
86
88
|
width: l ? 180 : 80,
|
|
@@ -89,28 +91,28 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
89
91
|
flexDirection: "column"
|
|
90
92
|
},
|
|
91
93
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ o.jsx(F, { label: e.label }),
|
|
95
|
+
/* @__PURE__ */ o.jsx(
|
|
94
96
|
he,
|
|
95
97
|
{
|
|
96
|
-
value:
|
|
97
|
-
onChange: (
|
|
98
|
+
value: a ?? e.defaultValue ?? "",
|
|
99
|
+
onChange: (h) => c(h.target.value),
|
|
98
100
|
onFocus: f,
|
|
99
|
-
onBlur:
|
|
100
|
-
disabled:
|
|
101
|
-
placeholder:
|
|
102
|
-
options:
|
|
103
|
-
optionLabel:
|
|
104
|
-
optionValue:
|
|
105
|
-
searchable:
|
|
106
|
-
searchPlaceholder:
|
|
101
|
+
onBlur: d,
|
|
102
|
+
disabled: u,
|
|
103
|
+
placeholder: e.placeholder,
|
|
104
|
+
options: e.options || [],
|
|
105
|
+
optionLabel: e.optionLabel,
|
|
106
|
+
optionValue: e.optionValue,
|
|
107
|
+
searchable: e.searchable,
|
|
108
|
+
searchPlaceholder: e.searchPlaceholder,
|
|
107
109
|
size: "small"
|
|
108
110
|
}
|
|
109
111
|
)
|
|
110
112
|
]
|
|
111
113
|
}
|
|
112
|
-
)), Ie =
|
|
113
|
-
|
|
114
|
+
)), Ie = b.memo(({ input: e, value: a, onChange: c, isExpanded: l, onFocus: f, onBlur: d, disabled: u }) => /* @__PURE__ */ o.jsxs(
|
|
115
|
+
r,
|
|
114
116
|
{
|
|
115
117
|
sx: {
|
|
116
118
|
width: l ? 160 : 60,
|
|
@@ -119,25 +121,25 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
119
121
|
flexDirection: "column"
|
|
120
122
|
},
|
|
121
123
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
l && /* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
/* @__PURE__ */ o.jsx(F, { label: e.label }),
|
|
125
|
+
/* @__PURE__ */ o.jsxs(r, { sx: { display: "flex", alignItems: "center", height: 36 }, children: [
|
|
126
|
+
l && /* @__PURE__ */ o.jsx(
|
|
127
|
+
ie,
|
|
126
128
|
{
|
|
127
|
-
value:
|
|
128
|
-
onChange: (
|
|
129
|
+
value: a ?? e.defaultValue ?? e.min ?? 0,
|
|
130
|
+
onChange: (h, I) => c(I),
|
|
129
131
|
onMouseDown: f,
|
|
130
|
-
onMouseUp:
|
|
131
|
-
disabled:
|
|
132
|
-
min:
|
|
133
|
-
max:
|
|
134
|
-
step:
|
|
132
|
+
onMouseUp: d,
|
|
133
|
+
disabled: u,
|
|
134
|
+
min: e.min ?? 0,
|
|
135
|
+
max: e.max ?? 100,
|
|
136
|
+
step: e.step ?? 1,
|
|
135
137
|
size: "small",
|
|
136
138
|
sx: { flex: 1 }
|
|
137
139
|
}
|
|
138
140
|
),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
141
|
+
/* @__PURE__ */ o.jsx(
|
|
142
|
+
r,
|
|
141
143
|
{
|
|
142
144
|
sx: {
|
|
143
145
|
minWidth: 60,
|
|
@@ -146,67 +148,67 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
146
148
|
fontSize: "0.875rem",
|
|
147
149
|
width: l ? "auto" : "100%"
|
|
148
150
|
},
|
|
149
|
-
children:
|
|
151
|
+
children: a ?? e.defaultValue ?? e.min ?? 0
|
|
150
152
|
}
|
|
151
153
|
)
|
|
152
154
|
] })
|
|
153
155
|
]
|
|
154
156
|
}
|
|
155
|
-
)),
|
|
156
|
-
const f =
|
|
157
|
-
|
|
157
|
+
)), ke = b.memo(({ input: e, value: a, onChange: c, disabled: l }) => {
|
|
158
|
+
const f = b.useRef(null), [d, u] = b.useState([]), [h, I] = b.useState(null), j = e.multiple ?? !1, k = e.maxImages ?? 5;
|
|
159
|
+
le(() => {
|
|
158
160
|
let m = [];
|
|
159
|
-
return
|
|
160
|
-
if (!
|
|
161
|
-
const
|
|
162
|
-
return
|
|
163
|
-
if (
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
} else typeof
|
|
167
|
-
}),
|
|
168
|
-
})(
|
|
169
|
-
m.forEach((
|
|
161
|
+
return u(((s) => {
|
|
162
|
+
if (!s) return [];
|
|
163
|
+
const v = Array.isArray(s) ? s : [s], i = [];
|
|
164
|
+
return v.forEach((V) => {
|
|
165
|
+
if (V instanceof File) {
|
|
166
|
+
const B = URL.createObjectURL(V);
|
|
167
|
+
i.push(B), m.push(B);
|
|
168
|
+
} else typeof V == "string" && i.push(V);
|
|
169
|
+
}), i;
|
|
170
|
+
})(a)), () => {
|
|
171
|
+
m.forEach((s) => URL.revokeObjectURL(s));
|
|
170
172
|
};
|
|
171
|
-
}, [
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
if (!(!
|
|
175
|
-
if (
|
|
176
|
-
const
|
|
177
|
-
|
|
173
|
+
}, [a]);
|
|
174
|
+
const x = (m) => {
|
|
175
|
+
const p = m.target.files;
|
|
176
|
+
if (!(!p || p.length === 0)) {
|
|
177
|
+
if (j) {
|
|
178
|
+
const s = Array.isArray(a) ? a : a instanceof File || typeof a == "string" ? [a] : [], v = Array.from(p).slice(0, k - s.length), i = [...s, ...v];
|
|
179
|
+
c(i);
|
|
178
180
|
} else
|
|
179
|
-
|
|
181
|
+
c(p[0]);
|
|
180
182
|
m.target.value = "";
|
|
181
183
|
}
|
|
182
|
-
},
|
|
183
|
-
if (m.stopPropagation(),
|
|
184
|
-
const
|
|
185
|
-
|
|
184
|
+
}, M = (m, p) => {
|
|
185
|
+
if (m.stopPropagation(), j && Array.isArray(a)) {
|
|
186
|
+
const s = a.filter((v, i) => i !== p);
|
|
187
|
+
c(s.length > 0 ? s : null);
|
|
186
188
|
} else
|
|
187
|
-
|
|
188
|
-
},
|
|
189
|
+
c(null);
|
|
190
|
+
}, z = () => {
|
|
189
191
|
var m;
|
|
190
|
-
l ||
|
|
191
|
-
},
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
192
|
+
l || j && d.length >= k || (m = f.current) == null || m.click();
|
|
193
|
+
}, D = j && d.length < k;
|
|
194
|
+
return /* @__PURE__ */ o.jsxs(r, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
|
|
195
|
+
/* @__PURE__ */ o.jsx(
|
|
194
196
|
"input",
|
|
195
197
|
{
|
|
196
198
|
ref: f,
|
|
197
199
|
type: "file",
|
|
198
200
|
accept: "image/*",
|
|
199
|
-
multiple:
|
|
200
|
-
onChange:
|
|
201
|
+
multiple: j,
|
|
202
|
+
onChange: x,
|
|
201
203
|
disabled: l,
|
|
202
204
|
style: { display: "none" }
|
|
203
205
|
}
|
|
204
206
|
),
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
d.map((m, p) => /* @__PURE__ */ o.jsxs(
|
|
208
|
+
r,
|
|
207
209
|
{
|
|
208
|
-
onMouseEnter: () =>
|
|
209
|
-
onMouseLeave: () =>
|
|
210
|
+
onMouseEnter: () => I(p),
|
|
211
|
+
onMouseLeave: () => I(null),
|
|
210
212
|
sx: {
|
|
211
213
|
width: 50,
|
|
212
214
|
height: 50,
|
|
@@ -225,12 +227,12 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
225
227
|
}
|
|
226
228
|
},
|
|
227
229
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
|
|
230
|
+
/* @__PURE__ */ o.jsx(
|
|
231
|
+
r,
|
|
230
232
|
{
|
|
231
233
|
component: "img",
|
|
232
234
|
src: m,
|
|
233
|
-
alt: `Preview ${
|
|
235
|
+
alt: `Preview ${p + 1}`,
|
|
234
236
|
sx: {
|
|
235
237
|
width: "100%",
|
|
236
238
|
height: "100%",
|
|
@@ -238,10 +240,10 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
238
240
|
}
|
|
239
241
|
}
|
|
240
242
|
),
|
|
241
|
-
!l &&
|
|
242
|
-
|
|
243
|
+
!l && h === p && /* @__PURE__ */ o.jsx(
|
|
244
|
+
r,
|
|
243
245
|
{
|
|
244
|
-
onClick: (
|
|
246
|
+
onClick: (s) => M(s, p),
|
|
245
247
|
sx: {
|
|
246
248
|
position: "absolute",
|
|
247
249
|
top: 0,
|
|
@@ -251,15 +253,15 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
251
253
|
display: "flex",
|
|
252
254
|
alignItems: "center",
|
|
253
255
|
justifyContent: "center",
|
|
254
|
-
bgcolor:
|
|
256
|
+
bgcolor: R("#000", 0.5),
|
|
255
257
|
cursor: "pointer",
|
|
256
258
|
transition: "background-color 0.2s",
|
|
257
259
|
"&:hover": {
|
|
258
|
-
bgcolor:
|
|
260
|
+
bgcolor: R("#000", 0.65)
|
|
259
261
|
}
|
|
260
262
|
},
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
-
|
|
263
|
+
children: /* @__PURE__ */ o.jsx(
|
|
264
|
+
ae,
|
|
263
265
|
{
|
|
264
266
|
sx: {
|
|
265
267
|
fontSize: 16,
|
|
@@ -271,12 +273,12 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
271
273
|
)
|
|
272
274
|
]
|
|
273
275
|
},
|
|
274
|
-
|
|
276
|
+
p
|
|
275
277
|
)),
|
|
276
|
-
(
|
|
277
|
-
|
|
278
|
+
(d.length === 0 || D) && /* @__PURE__ */ o.jsx(
|
|
279
|
+
r,
|
|
278
280
|
{
|
|
279
|
-
onClick:
|
|
281
|
+
onClick: z,
|
|
280
282
|
sx: {
|
|
281
283
|
width: 50,
|
|
282
284
|
height: 50,
|
|
@@ -287,15 +289,15 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
287
289
|
alignItems: "center",
|
|
288
290
|
justifyContent: "center",
|
|
289
291
|
cursor: l ? "not-allowed" : "pointer",
|
|
290
|
-
bgcolor:
|
|
292
|
+
bgcolor: R("#000", 0.02),
|
|
291
293
|
transition: "all 0.2s",
|
|
292
294
|
"&:hover": l ? {} : {
|
|
293
295
|
borderColor: "primary.main",
|
|
294
|
-
bgcolor:
|
|
296
|
+
bgcolor: R("#000", 0.04)
|
|
295
297
|
}
|
|
296
298
|
},
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
-
|
|
299
|
+
children: /* @__PURE__ */ o.jsx(
|
|
300
|
+
xe,
|
|
299
301
|
{
|
|
300
302
|
sx: {
|
|
301
303
|
fontSize: 20,
|
|
@@ -306,81 +308,107 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
306
308
|
}
|
|
307
309
|
)
|
|
308
310
|
] });
|
|
309
|
-
}),
|
|
310
|
-
|
|
311
|
+
}), Ve = b.memo(({ input: e, value: a, onChange: c, onFocus: l, onBlur: f, disabled: d }) => /* @__PURE__ */ o.jsxs(
|
|
312
|
+
r,
|
|
313
|
+
{
|
|
314
|
+
sx: {
|
|
315
|
+
display: "flex",
|
|
316
|
+
flexDirection: "column",
|
|
317
|
+
alignItems: "center",
|
|
318
|
+
minWidth: 60
|
|
319
|
+
},
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ o.jsx(F, { label: e.label }),
|
|
322
|
+
/* @__PURE__ */ o.jsx(
|
|
323
|
+
de,
|
|
324
|
+
{
|
|
325
|
+
checked: a ?? e.defaultValue ?? !1,
|
|
326
|
+
onChange: (u) => c(u.target.checked),
|
|
327
|
+
onFocus: l,
|
|
328
|
+
onBlur: f,
|
|
329
|
+
disabled: d,
|
|
330
|
+
size: "small"
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
)), O = (e) => {
|
|
336
|
+
switch (e.input.type) {
|
|
311
337
|
case "textarea":
|
|
312
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ o.jsx(ve, { ...e });
|
|
313
339
|
case "number":
|
|
314
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ o.jsx(je, { ...e });
|
|
315
341
|
case "slider":
|
|
316
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ o.jsx(Ie, { ...e });
|
|
317
343
|
case "select":
|
|
318
|
-
return /* @__PURE__ */
|
|
344
|
+
return /* @__PURE__ */ o.jsx(we, { ...e });
|
|
319
345
|
case "image":
|
|
320
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ o.jsx(ke, { input: e.input, value: e.value, onChange: e.onChange, disabled: e.disabled });
|
|
347
|
+
case "checkbox":
|
|
348
|
+
return /* @__PURE__ */ o.jsx(Ve, { ...e });
|
|
321
349
|
default:
|
|
322
350
|
return null;
|
|
323
351
|
}
|
|
324
|
-
},
|
|
325
|
-
inputs:
|
|
326
|
-
onProcess:
|
|
327
|
-
onReset:
|
|
352
|
+
}, U = ({
|
|
353
|
+
inputs: e = [],
|
|
354
|
+
onProcess: a,
|
|
355
|
+
onReset: c,
|
|
328
356
|
onDownload: l,
|
|
329
357
|
processing: f = !1,
|
|
330
|
-
uploading:
|
|
331
|
-
inputValues:
|
|
332
|
-
onInputChange:
|
|
333
|
-
customActionButtons:
|
|
334
|
-
hideProcessButton:
|
|
335
|
-
processButtonDisabled:
|
|
336
|
-
getInputDisabled:
|
|
337
|
-
processTooltip:
|
|
338
|
-
downloadTooltip:
|
|
339
|
-
resetTooltip:
|
|
358
|
+
uploading: d = !1,
|
|
359
|
+
inputValues: u = {},
|
|
360
|
+
onInputChange: h,
|
|
361
|
+
customActionButtons: I,
|
|
362
|
+
hideProcessButton: j = !1,
|
|
363
|
+
processButtonDisabled: k = !1,
|
|
364
|
+
getInputDisabled: x,
|
|
365
|
+
processTooltip: M = "Process",
|
|
366
|
+
downloadTooltip: z = "Download",
|
|
367
|
+
resetTooltip: D = "Reset",
|
|
340
368
|
infoTooltip: m = "Information",
|
|
341
|
-
infoTitle:
|
|
342
|
-
infoContent:
|
|
343
|
-
position:
|
|
344
|
-
relative:
|
|
369
|
+
infoTitle: p = "Tool Information",
|
|
370
|
+
infoContent: s,
|
|
371
|
+
position: v = "bottom",
|
|
372
|
+
relative: i = !1
|
|
345
373
|
}) => {
|
|
346
|
-
const [
|
|
347
|
-
if (!
|
|
348
|
-
const
|
|
349
|
-
return
|
|
350
|
-
}), [
|
|
351
|
-
(
|
|
374
|
+
const [V, B] = N(!1), [Y, H] = N(!1), [Z, K] = N(!1), C = V || Y, X = J(() => e.length === 0 ? !0 : e.every((t) => {
|
|
375
|
+
if (!t.required) return !0;
|
|
376
|
+
const n = u[t.key];
|
|
377
|
+
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
|
+
}), [e, u]), { imageInputs: E, textareaInputs: G, paramInputs: L } = J(() => e.reduce(
|
|
379
|
+
(t, n) => (n.type === "image" ? t.imageInputs.push(n) : n.type === "textarea" ? t.textareaInputs.push(n) : t.paramInputs.push(n), t),
|
|
352
380
|
{
|
|
353
381
|
imageInputs: [],
|
|
354
382
|
textareaInputs: [],
|
|
355
383
|
paramInputs: []
|
|
356
384
|
}
|
|
357
|
-
), [
|
|
358
|
-
setTimeout(() =>
|
|
359
|
-
}, []),
|
|
360
|
-
(
|
|
361
|
-
|
|
385
|
+
), [e]), ee = w(() => B(!0), []), oe = w(() => B(!1), []), T = w(() => H(!0), []), q = w(() => {
|
|
386
|
+
setTimeout(() => H(!1), 200);
|
|
387
|
+
}, []), A = w(
|
|
388
|
+
(t, n, g) => {
|
|
389
|
+
h == null || h(t, n, g);
|
|
362
390
|
},
|
|
363
|
-
[
|
|
364
|
-
),
|
|
365
|
-
|
|
391
|
+
[h]
|
|
392
|
+
), te = w(() => K(!0), []), ne = w(() => K(!1), []), $ = /* @__PURE__ */ o.jsxs(
|
|
393
|
+
r,
|
|
366
394
|
{
|
|
367
395
|
sx: {
|
|
368
|
-
position:
|
|
369
|
-
[
|
|
370
|
-
left:
|
|
371
|
-
transform:
|
|
372
|
-
zIndex:
|
|
373
|
-
display:
|
|
374
|
-
justifyContent:
|
|
375
|
-
mt:
|
|
376
|
-
mb:
|
|
396
|
+
position: i ? "relative" : "fixed",
|
|
397
|
+
[v]: i ? "auto" : 20,
|
|
398
|
+
left: i ? "auto" : "50%",
|
|
399
|
+
transform: i ? "none" : "translateX(-50%)",
|
|
400
|
+
zIndex: i ? "auto" : 1300,
|
|
401
|
+
display: i ? "flex" : "block",
|
|
402
|
+
justifyContent: i ? "center" : "initial",
|
|
403
|
+
mt: i && v === "top" ? 2 : 0,
|
|
404
|
+
mb: i && v === "bottom" ? 2 : 0
|
|
377
405
|
},
|
|
378
406
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
407
|
+
/* @__PURE__ */ o.jsxs(
|
|
408
|
+
r,
|
|
381
409
|
{
|
|
382
|
-
onMouseEnter:
|
|
383
|
-
onMouseLeave:
|
|
410
|
+
onMouseEnter: ee,
|
|
411
|
+
onMouseLeave: oe,
|
|
384
412
|
sx: {
|
|
385
413
|
display: "flex",
|
|
386
414
|
flexDirection: "column",
|
|
@@ -388,35 +416,36 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
388
416
|
p: 2,
|
|
389
417
|
borderRadius: 2,
|
|
390
418
|
border: 1,
|
|
391
|
-
borderColor: "divider"
|
|
419
|
+
borderColor: "divider",
|
|
420
|
+
bgcolor: "background.default"
|
|
392
421
|
},
|
|
393
422
|
children: [
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
return
|
|
397
|
-
value:
|
|
398
|
-
onChange: (
|
|
399
|
-
isExpanded:
|
|
400
|
-
onFocus:
|
|
401
|
-
onBlur:
|
|
423
|
+
G.length > 0 && /* @__PURE__ */ o.jsx(r, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: G.map((t) => {
|
|
424
|
+
const n = u[t.key], g = (x == null ? void 0 : x(t.key)) ?? !1;
|
|
425
|
+
return t.renderInput ? /* @__PURE__ */ o.jsx(r, { children: t.renderInput({
|
|
426
|
+
value: n,
|
|
427
|
+
onChange: (y) => A(t.key, y),
|
|
428
|
+
isExpanded: C,
|
|
429
|
+
onFocus: T,
|
|
430
|
+
onBlur: q,
|
|
402
431
|
disabled: g
|
|
403
|
-
}) },
|
|
404
|
-
|
|
432
|
+
}) }, t.key) : /* @__PURE__ */ o.jsx(
|
|
433
|
+
O,
|
|
405
434
|
{
|
|
406
|
-
input:
|
|
407
|
-
value:
|
|
408
|
-
onChange: (
|
|
409
|
-
isExpanded:
|
|
410
|
-
onFocus:
|
|
411
|
-
onBlur:
|
|
435
|
+
input: t,
|
|
436
|
+
value: n,
|
|
437
|
+
onChange: (y) => A(t.key, y),
|
|
438
|
+
isExpanded: C,
|
|
439
|
+
onFocus: T,
|
|
440
|
+
onBlur: q,
|
|
412
441
|
disabled: g
|
|
413
442
|
},
|
|
414
|
-
|
|
443
|
+
t.key
|
|
415
444
|
);
|
|
416
445
|
}) }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
446
|
+
/* @__PURE__ */ o.jsxs(r, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
447
|
+
/* @__PURE__ */ o.jsx(
|
|
448
|
+
r,
|
|
420
449
|
{
|
|
421
450
|
sx: {
|
|
422
451
|
display: "flex",
|
|
@@ -424,72 +453,72 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
424
453
|
gap: 2,
|
|
425
454
|
flex: 1
|
|
426
455
|
},
|
|
427
|
-
children: (E.length > 0 ||
|
|
428
|
-
E.map((
|
|
429
|
-
const
|
|
430
|
-
return
|
|
431
|
-
value:
|
|
432
|
-
onChange: (
|
|
433
|
-
isExpanded:
|
|
434
|
-
onFocus:
|
|
435
|
-
onBlur:
|
|
456
|
+
children: (E.length > 0 || L.length > 0) && /* @__PURE__ */ o.jsxs(r, { sx: { display: "flex", alignItems: "flex-end", gap: 1.5 }, children: [
|
|
457
|
+
E.map((t) => {
|
|
458
|
+
const n = u[t.key], g = (x == null ? void 0 : x(t.key)) ?? !1;
|
|
459
|
+
return t.renderInput ? /* @__PURE__ */ o.jsx(r, { children: t.renderInput({
|
|
460
|
+
value: n,
|
|
461
|
+
onChange: (y) => A(t.key, y),
|
|
462
|
+
isExpanded: C,
|
|
463
|
+
onFocus: T,
|
|
464
|
+
onBlur: q,
|
|
436
465
|
disabled: g
|
|
437
|
-
}) },
|
|
438
|
-
|
|
466
|
+
}) }, t.key) : /* @__PURE__ */ o.jsx(
|
|
467
|
+
O,
|
|
439
468
|
{
|
|
440
|
-
input:
|
|
441
|
-
value:
|
|
442
|
-
onChange: (
|
|
443
|
-
isExpanded:
|
|
444
|
-
onFocus:
|
|
445
|
-
onBlur:
|
|
469
|
+
input: t,
|
|
470
|
+
value: n,
|
|
471
|
+
onChange: (y) => A(t.key, y),
|
|
472
|
+
isExpanded: C,
|
|
473
|
+
onFocus: T,
|
|
474
|
+
onBlur: q,
|
|
446
475
|
disabled: g
|
|
447
476
|
},
|
|
448
|
-
|
|
477
|
+
t.key
|
|
449
478
|
);
|
|
450
479
|
}),
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
return
|
|
454
|
-
value:
|
|
455
|
-
onChange: (
|
|
456
|
-
isExpanded:
|
|
457
|
-
onFocus:
|
|
458
|
-
onBlur:
|
|
480
|
+
L.map((t) => {
|
|
481
|
+
const n = u[t.key], g = (x == null ? void 0 : x(t.key)) ?? !1;
|
|
482
|
+
return t.renderInput ? /* @__PURE__ */ o.jsx(r, { children: t.renderInput({
|
|
483
|
+
value: n,
|
|
484
|
+
onChange: (y) => A(t.key, y),
|
|
485
|
+
isExpanded: C,
|
|
486
|
+
onFocus: T,
|
|
487
|
+
onBlur: q,
|
|
459
488
|
disabled: g
|
|
460
|
-
}) },
|
|
461
|
-
|
|
489
|
+
}) }, t.key) : /* @__PURE__ */ o.jsx(
|
|
490
|
+
O,
|
|
462
491
|
{
|
|
463
|
-
input:
|
|
464
|
-
value:
|
|
465
|
-
onChange: (
|
|
466
|
-
isExpanded:
|
|
467
|
-
onFocus:
|
|
468
|
-
onBlur:
|
|
492
|
+
input: t,
|
|
493
|
+
value: n,
|
|
494
|
+
onChange: (y) => A(t.key, y),
|
|
495
|
+
isExpanded: C,
|
|
496
|
+
onFocus: T,
|
|
497
|
+
onBlur: q,
|
|
469
498
|
disabled: g
|
|
470
499
|
},
|
|
471
|
-
|
|
500
|
+
t.key
|
|
472
501
|
);
|
|
473
502
|
})
|
|
474
503
|
] })
|
|
475
504
|
}
|
|
476
505
|
),
|
|
477
|
-
(E.length > 0 ||
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
!
|
|
484
|
-
|
|
506
|
+
(E.length > 0 || L.length > 0) && /* @__PURE__ */ o.jsx(ue, { orientation: "vertical", flexItem: !0, sx: { mx: 0.5, flexShrink: 0 } }),
|
|
507
|
+
/* @__PURE__ */ o.jsxs(r, { sx: { display: "flex", alignItems: "center", gap: 0.75, ml: "auto" }, children: [
|
|
508
|
+
I,
|
|
509
|
+
s && /* @__PURE__ */ o.jsx(_, { title: m, children: /* @__PURE__ */ o.jsx(S, { onClick: te, children: /* @__PURE__ */ o.jsx(ge, {}) }) }),
|
|
510
|
+
/* @__PURE__ */ o.jsx(_, { title: z, children: /* @__PURE__ */ o.jsx(S, { onClick: l, children: /* @__PURE__ */ o.jsx(re, {}) }) }),
|
|
511
|
+
/* @__PURE__ */ o.jsx(_, { title: D, children: /* @__PURE__ */ o.jsx(S, { onClick: c, children: /* @__PURE__ */ o.jsx(ye, {}) }) }),
|
|
512
|
+
!j && /* @__PURE__ */ o.jsx(_, { title: M, children: /* @__PURE__ */ o.jsx("span", { children: /* @__PURE__ */ o.jsx(
|
|
513
|
+
S,
|
|
485
514
|
{
|
|
486
|
-
onClick:
|
|
487
|
-
disabled:
|
|
515
|
+
onClick: a,
|
|
516
|
+
disabled: k || !X || d || f,
|
|
488
517
|
size: "large",
|
|
489
|
-
children: /* @__PURE__ */
|
|
490
|
-
|
|
518
|
+
children: /* @__PURE__ */ o.jsx(
|
|
519
|
+
be,
|
|
491
520
|
{
|
|
492
|
-
color:
|
|
521
|
+
color: k || !X || d || f ? "disabled" : "primary"
|
|
493
522
|
}
|
|
494
523
|
)
|
|
495
524
|
}
|
|
@@ -499,15 +528,34 @@ const me = L(/* @__PURE__ */ e.jsx("path", {
|
|
|
499
528
|
]
|
|
500
529
|
}
|
|
501
530
|
),
|
|
502
|
-
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
/* @__PURE__ */
|
|
531
|
+
s && /* @__PURE__ */ o.jsxs(ce, { open: Z, onClose: ne, maxWidth: "sm", fullWidth: !0, children: [
|
|
532
|
+
/* @__PURE__ */ o.jsx(fe, { children: p }),
|
|
533
|
+
/* @__PURE__ */ o.jsx(pe, { children: s })
|
|
505
534
|
] })
|
|
506
535
|
]
|
|
507
536
|
}
|
|
508
537
|
);
|
|
509
|
-
return !
|
|
538
|
+
return !i && typeof window < "u" ? me($, document.body) : $;
|
|
510
539
|
};
|
|
540
|
+
U.displayName = "SAiToolBar";
|
|
541
|
+
try {
|
|
542
|
+
W.displayName = "SAiToolBarInputType", W.__docgenInfo = { description: "Supported input types for SAiToolBar", displayName: "SAiToolBarInputType", props: {} };
|
|
543
|
+
} catch {
|
|
544
|
+
}
|
|
545
|
+
try {
|
|
546
|
+
U.displayName = "SAiToolBar", U.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with expandable inputs and action buttons.
|
|
547
|
+
Features smooth expand/collapse animations, multiple input types, built-in validation,
|
|
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" } } } };
|
|
549
|
+
} catch {
|
|
550
|
+
}
|
|
551
|
+
try {
|
|
552
|
+
saitoolbar.displayName = "saitoolbar", saitoolbar.__docgenInfo = { description: `A dynamic floating toolbar for AI tools with expandable inputs and action buttons.
|
|
553
|
+
Features smooth expand/collapse animations, multiple input types, built-in validation,
|
|
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" } } } };
|
|
555
|
+
} catch {
|
|
556
|
+
}
|
|
511
557
|
export {
|
|
512
|
-
|
|
558
|
+
U as SAiToolBar,
|
|
559
|
+
W as SAiToolBarInputType,
|
|
560
|
+
U as default
|
|
513
561
|
};
|