@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,56 +1,65 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
import { Box as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
import { Box as t, Container as _, Stack as u, Typography as o, Button as w } from "@mui/material";
|
|
3
|
+
import "../s-lazy-image/index.js";
|
|
4
|
+
import A from "../s-lazy-image/s-lazy-image.js";
|
|
5
|
+
const n = ({
|
|
6
|
+
imageSrc: a,
|
|
7
|
+
imageAlt: s,
|
|
8
|
+
title: d,
|
|
9
|
+
description: m,
|
|
10
|
+
buttonText: l,
|
|
11
|
+
imageWidth: p = "200px",
|
|
12
|
+
imageHeight: c = "auto",
|
|
13
|
+
maxWidth: f = "lg",
|
|
14
|
+
height: h = "100vh",
|
|
15
|
+
py: y = 8,
|
|
16
|
+
spacing: v = 6,
|
|
17
|
+
titleVariant: g = "h4",
|
|
18
|
+
descriptionVariant: x = "body1",
|
|
19
|
+
buttonVariant: b = "contained",
|
|
20
|
+
buttonColor: V = "primary",
|
|
21
|
+
containerSx: S,
|
|
22
|
+
imageContainerSx: q,
|
|
23
|
+
contentSx: C,
|
|
24
|
+
titleSx: D,
|
|
25
|
+
descriptionSx: P,
|
|
26
|
+
buttonContainerSx: r,
|
|
27
|
+
buttonProps: T,
|
|
28
|
+
hideImage: j = !1,
|
|
28
29
|
customActions: i
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */ e.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
31
|
+
t,
|
|
32
|
+
{
|
|
33
|
+
component: "main",
|
|
34
|
+
sx: {
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
py: y,
|
|
40
|
+
height: h,
|
|
41
|
+
...S
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ e.jsx(_, { maxWidth: f, children: /* @__PURE__ */ e.jsxs(u, { spacing: v, children: [
|
|
44
|
+
!j && /* @__PURE__ */ e.jsx(t, { sx: { display: "flex", justifyContent: "center", ...q }, children: /* @__PURE__ */ e.jsx(A, { src: a, alt: s, width: p, height: c }) }),
|
|
45
|
+
/* @__PURE__ */ e.jsxs(u, { spacing: 1, sx: { textAlign: "center", ...C }, children: [
|
|
46
|
+
/* @__PURE__ */ e.jsx(o, { variant: g, sx: D, children: d }),
|
|
47
|
+
/* @__PURE__ */ e.jsx(o, { variant: x, color: "text.secondary", sx: P, children: m })
|
|
48
|
+
] }),
|
|
49
|
+
i ? /* @__PURE__ */ e.jsx(t, { sx: { display: "flex", justifyContent: "center", ...r }, children: i }) : l ? /* @__PURE__ */ e.jsx(t, { sx: { display: "flex", justifyContent: "center", ...r }, children: /* @__PURE__ */ e.jsx(w, { variant: b, color: V, ...T, children: l }) }) : null
|
|
50
|
+
] }) })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
n.displayName = "SErrorLayout";
|
|
54
|
+
try {
|
|
55
|
+
n.displayName = "SErrorLayout", n.__docgenInfo = { description: "A full-screen error layout component for displaying error pages with customizable content and styling.", displayName: "SErrorLayout", props: { imageSrc: { defaultValue: null, description: "Source URL for the error image", name: "imageSrc", required: !0, type: { name: "string" } }, imageAlt: { defaultValue: null, description: "Alt text for the error image", name: "imageAlt", required: !0, type: { name: "string" } }, title: { defaultValue: null, description: "Main error title text", name: "title", required: !0, type: { name: "string" } }, description: { defaultValue: null, description: "Error description text", name: "description", required: !0, type: { name: "ReactNode" } }, buttonText: { defaultValue: null, description: "Text for the action button. If not provided, button will not be shown", name: "buttonText", required: !1, type: { name: "string" } }, imageWidth: { defaultValue: { value: "200px" }, description: "Image width. Default: '200px'", name: "imageWidth", required: !1, type: { name: "string | number" } }, imageHeight: { defaultValue: { value: "auto" }, description: "Image height. Default: 'auto'", name: "imageHeight", required: !1, type: { name: "string | number" } }, maxWidth: { defaultValue: { value: "lg" }, description: "Container max width. Default: 'lg'", name: "maxWidth", required: !1, type: { name: 'false | "xs" | "sm" | "md" | "lg" | "xl"' } }, height: { defaultValue: { value: "100vh" }, description: "Main container height. Default: '100vh'", name: "height", required: !1, type: { name: "string | number" } }, py: { defaultValue: { value: "8" }, description: "Vertical padding. Default: 8 (64px)", name: "py", required: !1, type: { name: "string | number" } }, spacing: { defaultValue: { value: "6" }, description: "Spacing between elements. Default: 6", name: "spacing", required: !1, type: { name: "number" } }, titleVariant: { defaultValue: { value: "h4" }, description: "Title typography variant. Default: 'h4'", name: "titleVariant", required: !1, type: { name: "enum", value: [{ value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"inherit"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, descriptionVariant: { defaultValue: { value: "body1" }, description: "Description typography variant. Default: 'body1'", name: "descriptionVariant", required: !1, type: { name: "enum", value: [{ value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"inherit"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, buttonVariant: { defaultValue: { value: "contained" }, description: "Button variant. Default: 'contained'", name: "buttonVariant", required: !1, type: { name: "enum", value: [{ value: '"outlined"' }, { value: '"text"' }, { value: '"contained"' }] } }, buttonColor: { defaultValue: { value: "primary" }, description: "Button color. Default: 'primary'", name: "buttonColor", required: !1, type: { name: "enum", value: [{ value: '"error"' }, { value: '"primary"' }, { value: '"secondary"' }, { value: '"info"' }, { value: '"success"' }, { value: '"warning"' }, { value: '"inherit"' }] } }, containerSx: { defaultValue: null, description: "Custom styles for the main container", name: "containerSx", required: !1, type: { name: "SxProps<Theme>" } }, imageContainerSx: { defaultValue: null, description: "Custom styles for the image container", name: "imageContainerSx", required: !1, type: { name: "SxProps<Theme>" } }, contentSx: { defaultValue: null, description: "Custom styles for the content stack", name: "contentSx", required: !1, type: { name: "SxProps<Theme>" } }, titleSx: { defaultValue: null, description: "Custom styles for the title", name: "titleSx", required: !1, type: { name: "SxProps<Theme>" } }, descriptionSx: { defaultValue: null, description: "Custom styles for the description", name: "descriptionSx", required: !1, type: { name: "SxProps<Theme>" } }, buttonContainerSx: { defaultValue: null, description: "Custom styles for the button container", name: "buttonContainerSx", required: !1, type: { name: "SxProps<Theme>" } }, buttonProps: { defaultValue: null, description: "Additional button props", name: "buttonProps", required: !1, type: { name: "Partial<ButtonProps>" } }, hideImage: { defaultValue: { value: "false" }, description: "Hide image. Default: false", name: "hideImage", required: !1, type: { name: "boolean" } }, customActions: { defaultValue: null, description: "Custom content to render instead of the button", name: "customActions", required: !1, type: { name: "ReactNode" } } } };
|
|
56
|
+
} catch {
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
serrorlayout.displayName = "serrorlayout", serrorlayout.__docgenInfo = { description: "A full-screen error layout component for displaying error pages with customizable content and styling.", displayName: "serrorlayout", props: { imageSrc: { defaultValue: null, description: "Source URL for the error image", name: "imageSrc", required: !0, type: { name: "string" } }, imageAlt: { defaultValue: null, description: "Alt text for the error image", name: "imageAlt", required: !0, type: { name: "string" } }, title: { defaultValue: null, description: "Main error title text", name: "title", required: !0, type: { name: "string" } }, description: { defaultValue: null, description: "Error description text", name: "description", required: !0, type: { name: "ReactNode" } }, buttonText: { defaultValue: null, description: "Text for the action button. If not provided, button will not be shown", name: "buttonText", required: !1, type: { name: "string" } }, imageWidth: { defaultValue: { value: "200px" }, description: "Image width. Default: '200px'", name: "imageWidth", required: !1, type: { name: "string | number" } }, imageHeight: { defaultValue: { value: "auto" }, description: "Image height. Default: 'auto'", name: "imageHeight", required: !1, type: { name: "string | number" } }, maxWidth: { defaultValue: { value: "lg" }, description: "Container max width. Default: 'lg'", name: "maxWidth", required: !1, type: { name: 'false | "xs" | "sm" | "md" | "lg" | "xl"' } }, height: { defaultValue: { value: "100vh" }, description: "Main container height. Default: '100vh'", name: "height", required: !1, type: { name: "string | number" } }, py: { defaultValue: { value: "8" }, description: "Vertical padding. Default: 8 (64px)", name: "py", required: !1, type: { name: "string | number" } }, spacing: { defaultValue: { value: "6" }, description: "Spacing between elements. Default: 6", name: "spacing", required: !1, type: { name: "number" } }, titleVariant: { defaultValue: { value: "h4" }, description: "Title typography variant. Default: 'h4'", name: "titleVariant", required: !1, type: { name: "enum", value: [{ value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"inherit"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, descriptionVariant: { defaultValue: { value: "body1" }, description: "Description typography variant. Default: 'body1'", name: "descriptionVariant", required: !1, type: { name: "enum", value: [{ value: '"button"' }, { value: '"caption"' }, { value: '"h1"' }, { value: '"h2"' }, { value: '"h3"' }, { value: '"h4"' }, { value: '"h5"' }, { value: '"h6"' }, { value: '"inherit"' }, { value: '"subtitle1"' }, { value: '"subtitle2"' }, { value: '"body1"' }, { value: '"body2"' }, { value: '"overline"' }] } }, buttonVariant: { defaultValue: { value: "contained" }, description: "Button variant. Default: 'contained'", name: "buttonVariant", required: !1, type: { name: "enum", value: [{ value: '"outlined"' }, { value: '"text"' }, { value: '"contained"' }] } }, buttonColor: { defaultValue: { value: "primary" }, description: "Button color. Default: 'primary'", name: "buttonColor", required: !1, type: { name: "enum", value: [{ value: '"error"' }, { value: '"primary"' }, { value: '"secondary"' }, { value: '"info"' }, { value: '"success"' }, { value: '"warning"' }, { value: '"inherit"' }] } }, containerSx: { defaultValue: null, description: "Custom styles for the main container", name: "containerSx", required: !1, type: { name: "SxProps<Theme>" } }, imageContainerSx: { defaultValue: null, description: "Custom styles for the image container", name: "imageContainerSx", required: !1, type: { name: "SxProps<Theme>" } }, contentSx: { defaultValue: null, description: "Custom styles for the content stack", name: "contentSx", required: !1, type: { name: "SxProps<Theme>" } }, titleSx: { defaultValue: null, description: "Custom styles for the title", name: "titleSx", required: !1, type: { name: "SxProps<Theme>" } }, descriptionSx: { defaultValue: null, description: "Custom styles for the description", name: "descriptionSx", required: !1, type: { name: "SxProps<Theme>" } }, buttonContainerSx: { defaultValue: null, description: "Custom styles for the button container", name: "buttonContainerSx", required: !1, type: { name: "SxProps<Theme>" } }, buttonProps: { defaultValue: null, description: "Additional button props", name: "buttonProps", required: !1, type: { name: "Partial<ButtonProps>" } }, hideImage: { defaultValue: { value: "false" }, description: "Hide image. Default: false", name: "hideImage", required: !1, type: { name: "boolean" } }, customActions: { defaultValue: null, description: "Custom content to render instead of the button", name: "customActions", required: !1, type: { name: "ReactNode" } } } };
|
|
60
|
+
} catch {
|
|
53
61
|
}
|
|
54
62
|
export {
|
|
55
|
-
|
|
63
|
+
n as SErrorLayout,
|
|
64
|
+
n as default
|
|
56
65
|
};
|
|
@@ -11,9 +11,7 @@ export type CustomFile = File | FileWithPath | {
|
|
|
11
11
|
/** File size in bytes */
|
|
12
12
|
size: number;
|
|
13
13
|
};
|
|
14
|
-
/**
|
|
15
|
-
* Props for the SFileDropzone component, extending react-dropzone options
|
|
16
|
-
*/
|
|
14
|
+
/** Props interface for SFileDropzone component */
|
|
17
15
|
export interface SFileDropzoneProps extends DropzoneOptions {
|
|
18
16
|
/** Additional hint text displayed below the main upload message */
|
|
19
17
|
hint?: string;
|
|
@@ -36,52 +34,9 @@ export interface SFileDropzoneProps extends DropzoneOptions {
|
|
|
36
34
|
/** Whether to show the 'Remove all' button */
|
|
37
35
|
isShowBtnRemoveAll?: boolean;
|
|
38
36
|
}
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* - Click to browse file selection
|
|
45
|
-
* - File preview with icons based on file extension
|
|
46
|
-
* - Individual file removal with tooltips
|
|
47
|
-
* - Bulk file removal option
|
|
48
|
-
* - File size display in human-readable format
|
|
49
|
-
* - Form integration with error handling and validation
|
|
50
|
-
* - Customizable upload area styling and messaging
|
|
51
|
-
*
|
|
52
|
-
* Built on react-dropzone for robust file handling and supports all dropzone options
|
|
53
|
-
* including file type restrictions, size limits, and custom validation.
|
|
54
|
-
*
|
|
55
|
-
* @param hint - Additional descriptive text below main upload message
|
|
56
|
-
* @param label - Form field label
|
|
57
|
-
* @param error - Error message to display when validation fails
|
|
58
|
-
* @param onRemoveAll - Handler for removing all selected files
|
|
59
|
-
* @param onUpload - Optional handler for triggering upload process
|
|
60
|
-
* @param onRemove - Handler for removing individual files
|
|
61
|
-
* @param required - Whether file selection is required
|
|
62
|
-
* @param disabledUpload - Whether upload functionality is disabled
|
|
63
|
-
* @param isShowBtnRemoveAll - Whether to show bulk remove button
|
|
64
|
-
* @param props - All react-dropzone options (accept, maxSize, etc.)
|
|
65
|
-
* @returns JSX element containing the complete file dropzone interface
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```tsx
|
|
69
|
-
* <SFileDropzone
|
|
70
|
-
* label="Upload Documents"
|
|
71
|
-
* hint="PDF, DOC, or TXT files only"
|
|
72
|
-
* accept={{
|
|
73
|
-
* 'application/pdf': ['.pdf'],
|
|
74
|
-
* 'application/msword': ['.doc', '.docx'],
|
|
75
|
-
* 'text/plain': ['.txt']
|
|
76
|
-
* }}
|
|
77
|
-
* maxSize={5 * 1024 * 1024} // 5MB
|
|
78
|
-
* files={selectedFiles}
|
|
79
|
-
* onDrop={handleFileDrop}
|
|
80
|
-
* onRemove={handleFileRemove}
|
|
81
|
-
* onRemoveAll={handleRemoveAll}
|
|
82
|
-
* required
|
|
83
|
-
* />
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
declare const SFileDropzone: ({ hint, label, error, onRemoveAll, onUpload, onRemove, required, disabledUpload, isShowBtnRemoveAll, ...props }: SFileDropzoneProps) => React.JSX.Element;
|
|
37
|
+
/** A file dropzone component with drag-and-drop, file management, and form integration. */
|
|
38
|
+
export declare const SFileDropzone: {
|
|
39
|
+
({ hint, label, error, onRemoveAll, onUpload, onRemove, required, disabledUpload, isShowBtnRemoveAll, ...props }: SFileDropzoneProps): React.JSX.Element;
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
87
42
|
export default SFileDropzone;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
3
|
-
import { c
|
|
4
|
-
import { Avatar as
|
|
5
|
-
import { useDropzone as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { bytesToSize as
|
|
9
|
-
import { B as
|
|
10
|
-
import { S as
|
|
11
|
-
import { T as
|
|
12
|
-
const
|
|
1
|
+
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import * as j from "react";
|
|
3
|
+
import { c } from "../createSvgIcon-DxwgGAVe.js";
|
|
4
|
+
import { Avatar as q, Tooltip as C, IconButton as w, Button as V } from "@mui/material";
|
|
5
|
+
import { useDropzone as R } from "react-dropzone";
|
|
6
|
+
import { SFileIcon as z } from "../s-file-icon/s-file-icon.js";
|
|
7
|
+
import { SForm as A } from "../s-form/s-form.js";
|
|
8
|
+
import { bytesToSize as S } from "../utils/bytes-to-size.js";
|
|
9
|
+
import { B as u } from "../Box-Ha0cQ4KO.js";
|
|
10
|
+
import { S as l } from "../Stack-Cq2r2NmC.js";
|
|
11
|
+
import { T as a } from "../Typography-C8jwvSWe.js";
|
|
12
|
+
const _ = c(/* @__PURE__ */ e.jsx("path", {
|
|
13
13
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
14
|
-
}), "CloseOutlined"),
|
|
14
|
+
}), "CloseOutlined"), I = c(/* @__PURE__ */ e.jsx("path", {
|
|
15
15
|
d: "M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
|
16
|
-
}), "CloudUploadOutlined"),
|
|
17
|
-
hint:
|
|
18
|
-
label:
|
|
19
|
-
error:
|
|
16
|
+
}), "CloudUploadOutlined"), t = ({
|
|
17
|
+
hint: r,
|
|
18
|
+
label: m = "",
|
|
19
|
+
error: f,
|
|
20
20
|
onRemoveAll: h,
|
|
21
|
-
onUpload:
|
|
22
|
-
onRemove:
|
|
23
|
-
required:
|
|
24
|
-
disabledUpload:
|
|
25
|
-
isShowBtnRemoveAll:
|
|
26
|
-
...
|
|
21
|
+
onUpload: U,
|
|
22
|
+
onRemove: i,
|
|
23
|
+
required: y = !1,
|
|
24
|
+
disabledUpload: k = !1,
|
|
25
|
+
isShowBtnRemoveAll: x = !1,
|
|
26
|
+
...n
|
|
27
27
|
}) => {
|
|
28
|
-
var
|
|
29
|
-
const { getRootProps:
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
28
|
+
var s, p;
|
|
29
|
+
const { getRootProps: g, getInputProps: b, isDragActive: d } = R(n);
|
|
30
|
+
return /* @__PURE__ */ e.jsxs(j.Fragment, { children: [
|
|
31
|
+
/* @__PURE__ */ e.jsx(A, { error: f, label: m, required: y, hint: r, children: /* @__PURE__ */ e.jsxs(
|
|
32
|
+
u,
|
|
33
33
|
{
|
|
34
34
|
sx: {
|
|
35
35
|
alignItems: "center",
|
|
@@ -43,23 +43,23 @@ const D = d(/* @__PURE__ */ o.jsx("path", {
|
|
|
43
43
|
outline: "none",
|
|
44
44
|
p: 4,
|
|
45
45
|
// Visual feedback when files are being dragged over
|
|
46
|
-
...
|
|
46
|
+
...d && {
|
|
47
47
|
bgcolor: "action.selected",
|
|
48
48
|
opacity: 0.5
|
|
49
49
|
},
|
|
50
50
|
// Hover effect when not actively dragging
|
|
51
51
|
"&:hover": {
|
|
52
|
-
...!
|
|
52
|
+
...!d && {
|
|
53
53
|
bgcolor: "action.hover"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
...
|
|
57
|
+
...g(),
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
59
|
+
/* @__PURE__ */ e.jsx("input", { ...b() }),
|
|
60
|
+
/* @__PURE__ */ e.jsxs(l, { direction: "row", spacing: 1, sx: { alignItems: "center" }, children: [
|
|
61
|
+
/* @__PURE__ */ e.jsx(
|
|
62
|
+
q,
|
|
63
63
|
{
|
|
64
64
|
sx: {
|
|
65
65
|
border: "1px dashed",
|
|
@@ -67,11 +67,11 @@ const D = d(/* @__PURE__ */ o.jsx("path", {
|
|
|
67
67
|
color: "text.secondary",
|
|
68
68
|
backgroundColor: "transparent"
|
|
69
69
|
},
|
|
70
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ e.jsx(I, { fontSize: "small" })
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ e.jsx(l, { spacing: 1, children: /* @__PURE__ */ e.jsxs(a, { color: "text.secondary", variant: "body2", children: [
|
|
74
|
+
/* @__PURE__ */ e.jsx(a, { component: "span", sx: { textDecoration: "underline" }, variant: "inherit", children: "Click to upload" }),
|
|
75
75
|
" ",
|
|
76
76
|
"or drag and drop your files here"
|
|
77
77
|
] }) })
|
|
@@ -79,11 +79,11 @@ const D = d(/* @__PURE__ */ o.jsx("path", {
|
|
|
79
79
|
]
|
|
80
80
|
}
|
|
81
81
|
) }),
|
|
82
|
-
(
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
const
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
82
|
+
(s = n.files) != null && s.length ? /* @__PURE__ */ e.jsxs(l, { mt: 1, spacing: 1, children: [
|
|
83
|
+
/* @__PURE__ */ e.jsx(l, { component: "ul", spacing: 1, sx: { listStyle: "none", m: 0, p: 0 }, children: (p = n.files) == null ? void 0 : p.map((o) => {
|
|
84
|
+
const v = o.name.split(".").pop();
|
|
85
|
+
return /* @__PURE__ */ e.jsxs(
|
|
86
|
+
l,
|
|
87
87
|
{
|
|
88
88
|
component: "li",
|
|
89
89
|
direction: "row",
|
|
@@ -97,29 +97,39 @@ const D = d(/* @__PURE__ */ o.jsx("path", {
|
|
|
97
97
|
p: 1
|
|
98
98
|
},
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ e.jsx(z, { extension: v }),
|
|
101
|
+
/* @__PURE__ */ e.jsxs(u, { sx: { flex: "1 1 auto" }, children: [
|
|
102
|
+
/* @__PURE__ */ e.jsx(a, { variant: "subtitle2", children: o.name }),
|
|
103
|
+
/* @__PURE__ */ e.jsx(a, { color: "text.secondary", variant: "body2", children: S(o.size) })
|
|
104
104
|
] }),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
|
|
105
|
+
/* @__PURE__ */ e.jsx(C, { title: "Remove", children: /* @__PURE__ */ e.jsx(
|
|
106
|
+
w,
|
|
107
107
|
{
|
|
108
108
|
onClick: () => {
|
|
109
|
-
|
|
109
|
+
i == null || i(o);
|
|
110
110
|
},
|
|
111
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ e.jsx(_, {})
|
|
112
112
|
}
|
|
113
113
|
) })
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
|
-
|
|
116
|
+
o.size
|
|
117
117
|
);
|
|
118
118
|
}) }),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ e.jsx(l, { direction: "row", sx: { alignItems: "center", justifyContent: "flex-end" }, children: x && /* @__PURE__ */ e.jsx(V, { onClick: h, size: "small", type: "button", variant: "text", children: "Remove all" }) })
|
|
120
120
|
] }) : null
|
|
121
121
|
] });
|
|
122
122
|
};
|
|
123
|
+
t.displayName = "SFileDropzone";
|
|
124
|
+
try {
|
|
125
|
+
t.displayName = "SFileDropzone", t.__docgenInfo = { description: "A file dropzone component with drag-and-drop, file management, and form integration.", displayName: "SFileDropzone", props: { hint: { defaultValue: null, description: "Additional hint text displayed below the main upload message", name: "hint", required: !1, type: { name: "string" } }, files: { defaultValue: null, description: "Array of files currently selected/uploaded", name: "files", required: !1, type: { name: "CustomFile[]" } }, onRemove: { defaultValue: null, description: "Callback when a single file is removed", name: "onRemove", required: !1, type: { name: "((file: CustomFile) => void)" } }, onRemoveAll: { defaultValue: null, description: "Callback when all files are removed", name: "onRemoveAll", required: !1, type: { name: "(() => void)" } }, onUpload: { defaultValue: null, description: "Callback when upload is triggered (optional - for custom upload logic)", name: "onUpload", required: !1, type: { name: "(() => void)" } }, label: { defaultValue: { value: "" }, description: "Label for the form field", name: "label", required: !1, type: { name: "ReactNode" } }, disabledUpload: { defaultValue: { value: "false" }, description: "Whether upload functionality is disabled", name: "disabledUpload", required: !1, type: { name: "boolean" } }, error: { defaultValue: null, description: "Error message to display", name: "error", required: !1, type: { name: "string" } }, required: { defaultValue: { value: "false" }, description: "Whether the field is required", name: "required", required: !1, type: { name: "boolean" } }, isShowBtnRemoveAll: { defaultValue: { value: "false" }, description: "Whether to show the 'Remove all' button", name: "isShowBtnRemoveAll", required: !1, type: { name: "boolean" } } } };
|
|
126
|
+
} catch {
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
sfiledropzone.displayName = "sfiledropzone", sfiledropzone.__docgenInfo = { description: "A file dropzone component with drag-and-drop, file management, and form integration.", displayName: "sfiledropzone", props: { hint: { defaultValue: null, description: "Additional hint text displayed below the main upload message", name: "hint", required: !1, type: { name: "string" } }, files: { defaultValue: null, description: "Array of files currently selected/uploaded", name: "files", required: !1, type: { name: "CustomFile[]" } }, onRemove: { defaultValue: null, description: "Callback when a single file is removed", name: "onRemove", required: !1, type: { name: "((file: CustomFile) => void)" } }, onRemoveAll: { defaultValue: null, description: "Callback when all files are removed", name: "onRemoveAll", required: !1, type: { name: "(() => void)" } }, onUpload: { defaultValue: null, description: "Callback when upload is triggered (optional - for custom upload logic)", name: "onUpload", required: !1, type: { name: "(() => void)" } }, label: { defaultValue: { value: "" }, description: "Label for the form field", name: "label", required: !1, type: { name: "ReactNode" } }, disabledUpload: { defaultValue: { value: "false" }, description: "Whether upload functionality is disabled", name: "disabledUpload", required: !1, type: { name: "boolean" } }, error: { defaultValue: null, description: "Error message to display", name: "error", required: !1, type: { name: "string" } }, required: { defaultValue: { value: "false" }, description: "Whether the field is required", name: "required", required: !1, type: { name: "boolean" } }, isShowBtnRemoveAll: { defaultValue: { value: "false" }, description: "Whether to show the 'Remove all' button", name: "isShowBtnRemoveAll", required: !1, type: { name: "boolean" } } } };
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
123
132
|
export {
|
|
124
|
-
|
|
133
|
+
t as SFileDropzone,
|
|
134
|
+
t as default
|
|
125
135
|
};
|
|
@@ -6,29 +6,9 @@ export interface SFileIconProps {
|
|
|
6
6
|
/** File extension (without dot) to determine which icon to display */
|
|
7
7
|
extension?: string;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* - Images: JPG, JPEG, PNG, SVG
|
|
15
|
-
* - Documents: PDF
|
|
16
|
-
* - Videos: MP4
|
|
17
|
-
* - Generic: Default icon for unsupported types
|
|
18
|
-
*
|
|
19
|
-
* The component assumes icon SVG files are available in the /assets/ directory
|
|
20
|
-
* following the naming convention: icon-{type}.svg
|
|
21
|
-
*
|
|
22
|
-
* @param extension - File extension without the dot (e.g., 'pdf', 'jpg', 'png')
|
|
23
|
-
* @returns JSX element containing the appropriate file type icon
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* <SFileIcon extension="pdf" /> // Shows PDF icon
|
|
28
|
-
* <SFileIcon extension="jpg" /> // Shows image icon
|
|
29
|
-
* <SFileIcon extension="unknown" /> // Shows generic file icon
|
|
30
|
-
* <SFileIcon /> // Shows generic file icon (no extension)
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
declare const SFileIcon: ({ extension }: SFileIconProps) => React.JSX.Element;
|
|
9
|
+
/** A file type icon component that displays appropriate icons based on file extensions. */
|
|
10
|
+
export declare const SFileIcon: {
|
|
11
|
+
({ extension }: SFileIconProps): React.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
34
14
|
export default SFileIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { B as
|
|
1
|
+
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { B as n } from "../Box-Ha0cQ4KO.js";
|
|
3
3
|
const o = {
|
|
4
4
|
jpeg: "/assets/icon-jpg.svg",
|
|
5
5
|
jpg: "/assets/icon-jpg.svg",
|
|
@@ -7,11 +7,11 @@ const o = {
|
|
|
7
7
|
pdf: "/assets/icon-pdf.svg",
|
|
8
8
|
png: "/assets/icon-png.svg",
|
|
9
9
|
svg: "/assets/icon-svg.svg"
|
|
10
|
-
},
|
|
10
|
+
}, t = ({ extension: e }) => {
|
|
11
11
|
let s;
|
|
12
|
-
return
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
|
|
12
|
+
return e ? s = o[e] ?? "/assets/icon-other.svg" : s = "/assets/icon-other.svg", // Container box with fixed dimensions for consistent icon sizing
|
|
13
|
+
/* @__PURE__ */ i.jsx(
|
|
14
|
+
n,
|
|
15
15
|
{
|
|
16
16
|
sx: {
|
|
17
17
|
alignItems: "center",
|
|
@@ -23,10 +23,16 @@ const o = {
|
|
|
23
23
|
// Standard icon container size
|
|
24
24
|
height: "36px"
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ i.jsx(n, { alt: "File", component: "img", src: s, sx: { height: "100%", width: "auto" } })
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
|
+
t.displayName = "SFileIcon";
|
|
31
|
+
try {
|
|
32
|
+
t.displayName = "SFileIcon", t.__docgenInfo = { description: "A file type icon component that displays appropriate icons based on file extensions.", displayName: "SFileIcon", props: { extension: { defaultValue: null, description: "File extension (without dot) to determine which icon to display", name: "extension", required: !1, type: { name: "string" } } } };
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
30
35
|
export {
|
|
31
|
-
|
|
36
|
+
t as SFileIcon,
|
|
37
|
+
t as default
|
|
32
38
|
};
|
package/dist/s-flex-box/index.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material/Box';
|
|
2
|
+
/**
|
|
3
|
+
* Props interface for SFlexBox component
|
|
4
|
+
*/
|
|
2
5
|
export interface SFlexBoxProps extends BoxProps {
|
|
3
6
|
}
|
|
4
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A flex container component that defaults display to flex with all Material-UI Box capabilities.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SFlexBox: {
|
|
11
|
+
({ children, ...props }: SFlexBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
5
14
|
export default SFlexBox;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { B as
|
|
3
|
-
const
|
|
1
|
+
import { j as t } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { B as l } from "../Box-Ha0cQ4KO.js";
|
|
3
|
+
const o = ({ children: e, ...a }) => /* @__PURE__ */ t.jsx(l, { display: "flex", ...a, children: e });
|
|
4
|
+
o.displayName = "SFlexBox";
|
|
5
|
+
try {
|
|
6
|
+
o.displayName = "SFlexBox", o.__docgenInfo = { description: "A flex container component that defaults display to flex with all Material-UI Box capabilities.", displayName: "SFlexBox", props: {} };
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
sflexbox.displayName = "sflexbox", sflexbox.__docgenInfo = { description: "A flex container component that defaults display to flex with all Material-UI Box capabilities.", displayName: "sflexbox", props: {} };
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
4
13
|
export {
|
|
5
|
-
|
|
14
|
+
o as SFlexBox,
|
|
15
|
+
o as default
|
|
6
16
|
};
|
package/dist/s-form/index.js
CHANGED
package/dist/s-form/s-form.d.ts
CHANGED
|
@@ -15,18 +15,9 @@ export interface SFormProps {
|
|
|
15
15
|
/** HTML 'for' attribute to associate label with input element */
|
|
16
16
|
htmlFor?: string;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* - Full-width layout with proper Material-UI FormControl integration
|
|
24
|
-
*
|
|
25
|
-
* This component serves as the foundation for all form inputs in the design system,
|
|
26
|
-
* ensuring consistent labeling, error handling, and help text patterns.
|
|
27
|
-
*
|
|
28
|
-
* @param props - SFormProps containing label, validation, and child elements
|
|
29
|
-
* @returns JSX.Element - Material-UI FormControl with integrated label, hint, and error handling
|
|
30
|
-
*/
|
|
31
|
-
declare const SForm: ({ label, hint, error, required, children, htmlFor }: SFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** A form wrapper component that provides consistent labeling, error handling, and help text. */
|
|
19
|
+
export declare const SForm: {
|
|
20
|
+
({ label, hint, error, required, children, htmlFor }: SFormProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
32
23
|
export default SForm;
|
package/dist/s-form/s-form.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { FormControl as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { j as r } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { FormControl as s, FormLabel as u, FormHelperText as n } from "@mui/material";
|
|
3
|
+
const l = ({ label: e, hint: a, error: t, required: i, children: o, htmlFor: d }) => /* @__PURE__ */ r.jsxs(s, { error: !!t, fullWidth: !0, children: [
|
|
4
|
+
e ? /* @__PURE__ */ r.jsxs(u, { htmlFor: d, required: i, sx: { display: "flex", alignItems: "center" }, children: [
|
|
5
|
+
e,
|
|
6
6
|
" "
|
|
7
7
|
] }) : null,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
o,
|
|
9
|
+
a && !t ? /* @__PURE__ */ r.jsx(n, { children: a }) : null,
|
|
10
|
+
t ? /* @__PURE__ */ r.jsx(n, { children: t }) : null
|
|
11
11
|
] });
|
|
12
|
+
l.displayName = "SForm";
|
|
13
|
+
try {
|
|
14
|
+
l.displayName = "SForm", l.__docgenInfo = { description: "A form wrapper component that provides consistent labeling, error handling, and help text.", displayName: "SForm", props: { label: { defaultValue: null, description: "The form field label - can be text or a React element", name: "label", required: !0, type: { name: "ReactNode" } }, hint: { defaultValue: null, description: "Optional hint text displayed as a tooltip next to the label", name: "hint", required: !1, type: { name: "string" } }, error: { defaultValue: null, description: "Error message to display below the form field", name: "error", required: !1, type: { name: "string" } }, required: { defaultValue: null, description: "Whether the form field is required (adds asterisk to label)", name: "required", required: !0, type: { name: "boolean" } }, children: { defaultValue: null, description: "Child form elements (input, select, etc.) to wrap", name: "children", required: !0, type: { name: "ReactNode" } }, htmlFor: { defaultValue: null, description: "HTML 'for' attribute to associate label with input element", name: "htmlFor", required: !1, type: { name: "string" } } } };
|
|
15
|
+
} catch {
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
sform.displayName = "sform", sform.__docgenInfo = { description: "A form wrapper component that provides consistent labeling, error handling, and help text.", displayName: "sform", props: { label: { defaultValue: null, description: "The form field label - can be text or a React element", name: "label", required: !0, type: { name: "ReactNode" } }, hint: { defaultValue: null, description: "Optional hint text displayed as a tooltip next to the label", name: "hint", required: !1, type: { name: "string" } }, error: { defaultValue: null, description: "Error message to display below the form field", name: "error", required: !1, type: { name: "string" } }, required: { defaultValue: null, description: "Whether the form field is required (adds asterisk to label)", name: "required", required: !0, type: { name: "boolean" } }, children: { defaultValue: null, description: "Child form elements (input, select, etc.) to wrap", name: "children", required: !0, type: { name: "ReactNode" } }, htmlFor: { defaultValue: null, description: "HTML 'for' attribute to associate label with input element", name: "htmlFor", required: !1, type: { name: "string" } } } };
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
12
21
|
export {
|
|
13
|
-
|
|
22
|
+
l as SForm,
|
|
23
|
+
l as default
|
|
14
24
|
};
|