@solostylist/ui-kit 1.0.166 → 1.0.168
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 +182 -172
- 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 +43 -22
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +336 -255
- 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.d.ts +2 -0
- package/dist/s-pixel-reveal/index.js +4 -0
- package/dist/s-pixel-reveal/package.json +5 -0
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +27 -0
- package/dist/s-pixel-reveal/s-pixel-reveal.js +156 -0
- 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-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 +1440 -1440
- package/dist/theme/components/button.d.ts +2156 -2156
- 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 +10 -4
|
@@ -1,29 +1,62 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material';
|
|
3
3
|
import { SIconButtonProps } from '../s-icon-button';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for individual action overlay buttons
|
|
6
|
+
*/
|
|
4
7
|
export interface IActionOverlay {
|
|
8
|
+
/** Icon to display in the button */
|
|
5
9
|
icon: ReactNode;
|
|
10
|
+
/** Tooltip text to show on hover */
|
|
6
11
|
tooltip: string;
|
|
12
|
+
/** Click handler for the action */
|
|
7
13
|
onClick?: () => void;
|
|
14
|
+
/** Whether the action is in an active state */
|
|
8
15
|
isActive?: boolean;
|
|
16
|
+
/** Whether the action is disabled */
|
|
9
17
|
disabled?: boolean;
|
|
18
|
+
/** Color variant for the icon button */
|
|
10
19
|
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
20
|
+
/** Additional props to pass to the underlying SIconButton */
|
|
11
21
|
iconButtonProps?: SIconButtonProps;
|
|
12
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Props interface for SActionOverlay component
|
|
25
|
+
*/
|
|
13
26
|
export interface SActionOverlayProps {
|
|
27
|
+
/** Array of action configurations for the overlay buttons */
|
|
14
28
|
actions: IActionOverlay[];
|
|
29
|
+
/** Maximum width of the actions container (overrides columns calculation) */
|
|
15
30
|
maxWidth?: number | string;
|
|
31
|
+
/** Number of columns for the action grid layout */
|
|
16
32
|
columns?: number;
|
|
33
|
+
/** The content to overlay the actions on */
|
|
17
34
|
children: ReactNode;
|
|
35
|
+
/** Whether to show overlay on hover */
|
|
18
36
|
showOnHover?: boolean;
|
|
37
|
+
/** Controlled visibility state (overrides showOnHover) */
|
|
19
38
|
visible?: boolean;
|
|
39
|
+
/** Position of the action buttons within the overlay */
|
|
20
40
|
position?: 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
41
|
+
/** Background color of the overlay backdrop */
|
|
21
42
|
backdropColor?: string;
|
|
43
|
+
/** Opacity of the backdrop (0-1) */
|
|
22
44
|
backdropOpacity?: number;
|
|
45
|
+
/** Blur amount in pixels for the backdrop filter */
|
|
23
46
|
blurAmount?: number;
|
|
47
|
+
/** Border radius of the overlay */
|
|
24
48
|
borderRadius?: number | string;
|
|
49
|
+
/** Custom styles for the overlay element */
|
|
25
50
|
overlaySx?: SxProps<Theme>;
|
|
51
|
+
/** Callback when overlay visibility changes */
|
|
26
52
|
onVisibilityChange?: (visible: boolean) => void;
|
|
27
53
|
}
|
|
28
|
-
|
|
54
|
+
/**
|
|
55
|
+
* A flexible overlay component that displays action buttons on top of content.
|
|
56
|
+
* Supports hover-based or controlled visibility, multiple positioning options, and customizable backdrop effects.
|
|
57
|
+
*/
|
|
58
|
+
export declare const SActionOverlay: {
|
|
59
|
+
({ actions, maxWidth, columns, children, showOnHover, visible: controlledVisible, position, backdropColor, backdropOpacity, blurAmount, borderRadius, overlaySx, onVisibilityChange, }: SActionOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
displayName: string;
|
|
61
|
+
};
|
|
29
62
|
export default SActionOverlay;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
actions:
|
|
7
|
-
maxWidth:
|
|
8
|
-
columns:
|
|
9
|
-
children:
|
|
10
|
-
showOnHover:
|
|
11
|
-
visible:
|
|
12
|
-
position:
|
|
13
|
-
backdropColor:
|
|
14
|
-
backdropOpacity:
|
|
15
|
-
blurAmount:
|
|
16
|
-
borderRadius:
|
|
17
|
-
overlaySx:
|
|
18
|
-
onVisibilityChange:
|
|
1
|
+
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { useState as w } from "react";
|
|
3
|
+
import { Box as l, Grid as p } from "@mui/material";
|
|
4
|
+
import { SIconButton as I } from "../s-icon-button/s-icon-button.js";
|
|
5
|
+
const j = 40, S = 16, s = ({
|
|
6
|
+
actions: n,
|
|
7
|
+
maxWidth: m,
|
|
8
|
+
columns: r = 3,
|
|
9
|
+
children: f,
|
|
10
|
+
showOnHover: i = !0,
|
|
11
|
+
visible: a,
|
|
12
|
+
position: u = "center",
|
|
13
|
+
backdropColor: v = "background.paper",
|
|
14
|
+
backdropOpacity: y = 0.9,
|
|
15
|
+
blurAmount: b = 10,
|
|
16
|
+
borderRadius: h = 0,
|
|
17
|
+
overlaySx: x,
|
|
18
|
+
onVisibilityChange: t
|
|
19
19
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
|
|
20
|
+
const [g, d] = w(!1), k = a !== void 0 ? a : i && g, q = () => {
|
|
21
|
+
i && a === void 0 && (d(!0), t == null || t(!0));
|
|
22
22
|
}, A = () => {
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
switch (
|
|
23
|
+
i && a === void 0 && (d(!1), t == null || t(!1));
|
|
24
|
+
}, _ = () => {
|
|
25
|
+
switch (u) {
|
|
26
26
|
case "top-left":
|
|
27
27
|
return { justifyContent: "flex-start", alignItems: "flex-start" };
|
|
28
28
|
case "top-right":
|
|
@@ -35,8 +35,8 @@ const _ = 40, B = 16, R = ({
|
|
|
35
35
|
default:
|
|
36
36
|
return { justifyContent: "center", alignItems: "center" };
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
switch (
|
|
38
|
+
}, O = () => {
|
|
39
|
+
switch (u) {
|
|
40
40
|
case "top-left":
|
|
41
41
|
return "flex-start";
|
|
42
42
|
case "top-right":
|
|
@@ -49,16 +49,16 @@ const _ = 40, B = 16, R = ({
|
|
|
49
49
|
default:
|
|
50
50
|
return "center";
|
|
51
51
|
}
|
|
52
|
-
},
|
|
53
|
-
let
|
|
54
|
-
return
|
|
52
|
+
}, V = () => {
|
|
53
|
+
let e = m;
|
|
54
|
+
return r && (e = r * j + (r - 1) * S + r * 16), e;
|
|
55
55
|
};
|
|
56
56
|
return (
|
|
57
57
|
// Main container with flex to center the children
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
/* @__PURE__ */ o.jsx(l, { display: "flex", children: /* @__PURE__ */ o.jsxs(l, { position: "relative", onMouseEnter: q, onMouseLeave: A, children: [
|
|
59
|
+
f,
|
|
60
|
+
k && /* @__PURE__ */ o.jsx(
|
|
61
|
+
l,
|
|
62
62
|
{
|
|
63
63
|
position: "absolute",
|
|
64
64
|
top: 0,
|
|
@@ -66,49 +66,61 @@ const _ = 40, B = 16, R = ({
|
|
|
66
66
|
width: "100%",
|
|
67
67
|
height: "100%",
|
|
68
68
|
display: "flex",
|
|
69
|
-
bgcolor:
|
|
69
|
+
bgcolor: v,
|
|
70
70
|
sx: {
|
|
71
|
-
opacity:
|
|
72
|
-
backdropFilter: `blur(${
|
|
71
|
+
opacity: y,
|
|
72
|
+
backdropFilter: `blur(${b}px)`,
|
|
73
73
|
transform: "translateZ(0)",
|
|
74
74
|
willChange: "transform",
|
|
75
75
|
transition: "opacity 0.2s ease-in-out",
|
|
76
|
-
...
|
|
77
|
-
...
|
|
76
|
+
..._(),
|
|
77
|
+
...x
|
|
78
78
|
},
|
|
79
|
-
borderRadius:
|
|
80
|
-
children: /* @__PURE__ */
|
|
79
|
+
borderRadius: h,
|
|
80
|
+
children: /* @__PURE__ */ o.jsx(p, { container: !0, spacing: 2, justifyContent: O(), maxWidth: V(), children: n.map((e, C) => {
|
|
81
81
|
var c;
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
82
|
+
return /* @__PURE__ */ o.jsx(p, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ o.jsx(
|
|
83
|
+
I,
|
|
84
84
|
{
|
|
85
|
-
tooltipOptions: { title:
|
|
86
|
-
onClick:
|
|
87
|
-
disabled:
|
|
88
|
-
color:
|
|
85
|
+
tooltipOptions: { title: e.tooltip, placement: "top" },
|
|
86
|
+
onClick: e.onClick,
|
|
87
|
+
disabled: e.disabled,
|
|
88
|
+
color: e.color,
|
|
89
89
|
size: "small",
|
|
90
90
|
sx: {
|
|
91
91
|
margin: 1,
|
|
92
|
-
backgroundColor:
|
|
93
|
-
color:
|
|
92
|
+
backgroundColor: e.isActive ? "primary.main" : void 0,
|
|
93
|
+
color: e.isActive ? "primary.contrastText" : void 0,
|
|
94
94
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
95
|
-
opacity:
|
|
95
|
+
opacity: e.disabled ? 0.5 : 1,
|
|
96
96
|
"&:hover": {
|
|
97
|
-
backgroundColor:
|
|
98
|
-
color:
|
|
97
|
+
backgroundColor: e.isActive ? "primary.main" : void 0,
|
|
98
|
+
color: e.isActive ? "primary.contrastText" : void 0
|
|
99
99
|
},
|
|
100
|
-
...(c =
|
|
100
|
+
...(c = e.iconButtonProps) == null ? void 0 : c.sx
|
|
101
101
|
},
|
|
102
|
-
...
|
|
103
|
-
children:
|
|
102
|
+
...e.iconButtonProps,
|
|
103
|
+
children: e.icon
|
|
104
104
|
}
|
|
105
|
-
) }, `${
|
|
105
|
+
) }, `${e.tooltip}-${C}`);
|
|
106
106
|
}) })
|
|
107
107
|
}
|
|
108
108
|
)
|
|
109
109
|
] }) })
|
|
110
110
|
);
|
|
111
111
|
};
|
|
112
|
+
s.displayName = "SActionOverlay";
|
|
113
|
+
try {
|
|
114
|
+
s.displayName = "SActionOverlay", s.__docgenInfo = { description: `A flexible overlay component that displays action buttons on top of content.
|
|
115
|
+
Supports hover-based or controlled visibility, multiple positioning options, and customizable backdrop effects.`, displayName: "SActionOverlay", props: { actions: { defaultValue: null, description: "Array of action configurations for the overlay buttons", name: "actions", required: !0, type: { name: "IActionOverlay[]" } }, maxWidth: { defaultValue: null, description: "Maximum width of the actions container (overrides columns calculation)", name: "maxWidth", required: !1, type: { name: "string | number" } }, columns: { defaultValue: { value: "3" }, description: "Number of columns for the action grid layout", name: "columns", required: !1, type: { name: "number" } }, children: { defaultValue: null, description: "The content to overlay the actions on", name: "children", required: !0, type: { name: "ReactNode" } }, showOnHover: { defaultValue: { value: "true" }, description: "Whether to show overlay on hover", name: "showOnHover", required: !1, type: { name: "boolean" } }, visible: { defaultValue: null, description: "Controlled visibility state (overrides showOnHover)", name: "visible", required: !1, type: { name: "boolean" } }, position: { defaultValue: { value: "center" }, description: "Position of the action buttons within the overlay", name: "position", required: !1, type: { name: "enum", value: [{ value: '"center"' }, { value: '"top-left"' }, { value: '"top-right"' }, { value: '"bottom-left"' }, { value: '"bottom-right"' }] } }, backdropColor: { defaultValue: { value: "background.paper" }, description: "Background color of the overlay backdrop", name: "backdropColor", required: !1, type: { name: "string" } }, backdropOpacity: { defaultValue: { value: "0.9" }, description: "Opacity of the backdrop (0-1)", name: "backdropOpacity", required: !1, type: { name: "number" } }, blurAmount: { defaultValue: { value: "10" }, description: "Blur amount in pixels for the backdrop filter", name: "blurAmount", required: !1, type: { name: "number" } }, borderRadius: { defaultValue: { value: "0" }, description: "Border radius of the overlay", name: "borderRadius", required: !1, type: { name: "string | number" } }, overlaySx: { defaultValue: null, description: "Custom styles for the overlay element", name: "overlaySx", required: !1, type: { name: "SxProps<Theme>" } }, onVisibilityChange: { defaultValue: null, description: "Callback when overlay visibility changes", name: "onVisibilityChange", required: !1, type: { name: "((visible: boolean) => void)" } } } };
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
sactionoverlay.displayName = "sactionoverlay", sactionoverlay.__docgenInfo = { description: `A flexible overlay component that displays action buttons on top of content.
|
|
120
|
+
Supports hover-based or controlled visibility, multiple positioning options, and customizable backdrop effects.`, displayName: "sactionoverlay", props: { actions: { defaultValue: null, description: "Array of action configurations for the overlay buttons", name: "actions", required: !0, type: { name: "IActionOverlay[]" } }, maxWidth: { defaultValue: null, description: "Maximum width of the actions container (overrides columns calculation)", name: "maxWidth", required: !1, type: { name: "string | number" } }, columns: { defaultValue: { value: "3" }, description: "Number of columns for the action grid layout", name: "columns", required: !1, type: { name: "number" } }, children: { defaultValue: null, description: "The content to overlay the actions on", name: "children", required: !0, type: { name: "ReactNode" } }, showOnHover: { defaultValue: { value: "true" }, description: "Whether to show overlay on hover", name: "showOnHover", required: !1, type: { name: "boolean" } }, visible: { defaultValue: null, description: "Controlled visibility state (overrides showOnHover)", name: "visible", required: !1, type: { name: "boolean" } }, position: { defaultValue: { value: "center" }, description: "Position of the action buttons within the overlay", name: "position", required: !1, type: { name: "enum", value: [{ value: '"center"' }, { value: '"top-left"' }, { value: '"top-right"' }, { value: '"bottom-left"' }, { value: '"bottom-right"' }] } }, backdropColor: { defaultValue: { value: "background.paper" }, description: "Background color of the overlay backdrop", name: "backdropColor", required: !1, type: { name: "string" } }, backdropOpacity: { defaultValue: { value: "0.9" }, description: "Opacity of the backdrop (0-1)", name: "backdropOpacity", required: !1, type: { name: "number" } }, blurAmount: { defaultValue: { value: "10" }, description: "Blur amount in pixels for the backdrop filter", name: "blurAmount", required: !1, type: { name: "number" } }, borderRadius: { defaultValue: { value: "0" }, description: "Border radius of the overlay", name: "borderRadius", required: !1, type: { name: "string | number" } }, overlaySx: { defaultValue: null, description: "Custom styles for the overlay element", name: "overlaySx", required: !1, type: { name: "SxProps<Theme>" } }, onVisibilityChange: { defaultValue: null, description: "Callback when overlay visibility changes", name: "onVisibilityChange", required: !1, type: { name: "((visible: boolean) => void)" } } } };
|
|
121
|
+
} catch {
|
|
122
|
+
}
|
|
112
123
|
export {
|
|
113
|
-
|
|
124
|
+
s as SActionOverlay,
|
|
125
|
+
s as default
|
|
114
126
|
};
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Possible value types for SAiToolBar inputs
|
|
4
|
+
*/
|
|
5
|
+
export type SAiToolBarValue = string | number | boolean | File | (string | File)[] | null;
|
|
6
|
+
/**
|
|
7
|
+
* Base type constraint for select options
|
|
8
|
+
*/
|
|
9
|
+
export type SAiToolBarOption = string | number | Record<string, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Supported input types for SAiToolBar
|
|
12
|
+
*/
|
|
13
|
+
export declare enum SAiToolBarInputType {
|
|
14
|
+
TEXTAREA = "textarea",
|
|
15
|
+
SLIDER = "slider",
|
|
16
|
+
IMAGE = "image",
|
|
17
|
+
NUMBER = "number",
|
|
18
|
+
SELECT = "select",
|
|
19
|
+
CHECKBOX = "checkbox"
|
|
20
|
+
}
|
|
2
21
|
/**
|
|
3
22
|
* Configuration for individual toolbar input fields
|
|
4
23
|
*/
|
|
@@ -8,12 +27,12 @@ export interface SAiToolBarInput {
|
|
|
8
27
|
/** Display label for the input */
|
|
9
28
|
label: string;
|
|
10
29
|
/** Input type */
|
|
11
|
-
type:
|
|
30
|
+
type: SAiToolBarInputType;
|
|
12
31
|
/** Whether the input is required */
|
|
13
32
|
required?: boolean;
|
|
14
33
|
/** Default value for the input */
|
|
15
|
-
defaultValue?:
|
|
16
|
-
/** Placeholder text (for textarea/number inputs) */
|
|
34
|
+
defaultValue?: SAiToolBarValue;
|
|
35
|
+
/** Placeholder text (for textarea/number/select inputs) */
|
|
17
36
|
placeholder?: string;
|
|
18
37
|
/** Minimum value (for slider/number inputs) */
|
|
19
38
|
min?: number;
|
|
@@ -29,10 +48,20 @@ export interface SAiToolBarInput {
|
|
|
29
48
|
multiple?: boolean;
|
|
30
49
|
/** Maximum number of images (for image inputs with multiple=true) */
|
|
31
50
|
maxImages?: number;
|
|
51
|
+
/** Select options (for select inputs) */
|
|
52
|
+
options?: SAiToolBarOption[];
|
|
53
|
+
/** Key to extract label from option objects (for select inputs) */
|
|
54
|
+
optionLabel?: string;
|
|
55
|
+
/** Key to extract value from option objects (for select inputs) */
|
|
56
|
+
optionValue?: string;
|
|
57
|
+
/** Enable search functionality in select dropdown */
|
|
58
|
+
searchable?: boolean;
|
|
59
|
+
/** Placeholder for search input in select dropdown */
|
|
60
|
+
searchPlaceholder?: string;
|
|
32
61
|
/** Custom renderer for the input */
|
|
33
62
|
renderInput?: (props: {
|
|
34
|
-
value:
|
|
35
|
-
onChange: (value:
|
|
63
|
+
value: SAiToolBarValue;
|
|
64
|
+
onChange: (value: SAiToolBarValue) => void;
|
|
36
65
|
isExpanded: boolean;
|
|
37
66
|
onFocus: () => void;
|
|
38
67
|
onBlur: () => void;
|
|
@@ -56,9 +85,9 @@ export interface SAiToolBarProps {
|
|
|
56
85
|
/** Whether the toolbar is in uploading state */
|
|
57
86
|
uploading?: boolean;
|
|
58
87
|
/** Input values controlled externally */
|
|
59
|
-
inputValues?: Record<string,
|
|
88
|
+
inputValues?: Record<string, SAiToolBarValue>;
|
|
60
89
|
/** Callback when input values change */
|
|
61
|
-
onInputChange?: (key: string, value:
|
|
90
|
+
onInputChange?: (key: string, value: SAiToolBarValue, file?: File) => void;
|
|
62
91
|
/** Custom action buttons between inputs and standard actions */
|
|
63
92
|
customActionButtons?: React.ReactNode;
|
|
64
93
|
/** Hide the main process button */
|
|
@@ -85,20 +114,12 @@ export interface SAiToolBarProps {
|
|
|
85
114
|
relative?: boolean;
|
|
86
115
|
}
|
|
87
116
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* - Dynamic width calculation based on inputs and expanded state
|
|
92
|
-
* - Smooth expand/collapse animations on hover and focus
|
|
93
|
-
* - Support for multiple input types (text, number, slider, custom)
|
|
94
|
-
* - Portal rendering for proper z-index handling
|
|
95
|
-
* - Configurable action buttons
|
|
96
|
-
* - Built-in validation for required inputs
|
|
97
|
-
* - Info dialog integration
|
|
98
|
-
* - Responsive to processing and uploading states
|
|
99
|
-
*
|
|
100
|
-
* @param props - SAiToolBarProps for toolbar configuration
|
|
101
|
-
* @returns JSX.Element - Floating toolbar with inputs and action buttons
|
|
117
|
+
* A dynamic floating toolbar for AI tools with expandable inputs and action buttons.
|
|
118
|
+
* Features smooth expand/collapse animations, multiple input types, built-in validation,
|
|
119
|
+
* and portal rendering for proper z-index handling.
|
|
102
120
|
*/
|
|
103
|
-
declare const SAiToolBar:
|
|
121
|
+
export declare const SAiToolBar: {
|
|
122
|
+
({ inputs, onProcess, onReset, onDownload, processing, uploading, inputValues, onInputChange, customActionButtons, hideProcessButton, processButtonDisabled, getInputDisabled, processTooltip, downloadTooltip, resetTooltip, infoTooltip, infoTitle, infoContent, position, relative, }: SAiToolBarProps): React.JSX.Element;
|
|
123
|
+
displayName: string;
|
|
124
|
+
};
|
|
104
125
|
export default SAiToolBar;
|