@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,24 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useColorScheme as g, useTheme as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { j as i } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { useRef as x } from "react";
|
|
3
|
+
import { useColorScheme as g, useTheme as b, Button as h, alpha as e, Box as o } from "@mui/material";
|
|
4
|
+
import { SMovingBorder as u } from "../s-moving-border/s-moving-border.js";
|
|
5
|
+
const n = ({
|
|
6
6
|
borderRadius: r = 12,
|
|
7
|
-
children:
|
|
8
|
-
duration:
|
|
9
|
-
|
|
10
|
-
...l
|
|
7
|
+
children: p,
|
|
8
|
+
duration: l = 6e3,
|
|
9
|
+
...m
|
|
11
10
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
11
|
+
const s = x(null), { mode: a } = g(), t = b(), c = a === "light" ? (t.vars || t).palette.primary.main : (t.vars || t).palette.primary.light, d = a === "light" ? 90 : 110;
|
|
12
|
+
return /* @__PURE__ */ i.jsx(
|
|
13
|
+
u,
|
|
15
14
|
{
|
|
16
|
-
duration:
|
|
15
|
+
duration: l,
|
|
17
16
|
borderRadius: r,
|
|
18
17
|
height: 60,
|
|
19
|
-
glowSize:
|
|
20
|
-
glowColor:
|
|
21
|
-
children: /* @__PURE__ */
|
|
18
|
+
glowSize: d,
|
|
19
|
+
glowColor: c,
|
|
20
|
+
children: /* @__PURE__ */ i.jsx(
|
|
22
21
|
h,
|
|
23
22
|
{
|
|
24
23
|
variant: "text",
|
|
@@ -27,13 +26,10 @@ const f = ({
|
|
|
27
26
|
borderRadius: r,
|
|
28
27
|
position: "relative",
|
|
29
28
|
overflow: "hidden",
|
|
30
|
-
// Clear, high-contrast background base per theme, with subtle accent overlay
|
|
31
29
|
background: a === "light" ? `linear-gradient(0deg, ${(t.vars || t).palette.background.paper}, ${(t.vars || t).palette.background.paper}),
|
|
32
30
|
linear-gradient(45deg, ${e(t.palette.primary.main, 0.04)} 0%, transparent 60%)` : `linear-gradient(0deg, ${(t.vars || t).palette.background.default}, ${(t.vars || t).palette.background.default}),
|
|
33
31
|
linear-gradient(45deg, ${e(t.palette.primary.light, 0.06)} 0%, transparent 60%)`,
|
|
34
|
-
// Enhanced border with gradient and inner highlight
|
|
35
32
|
border: `1px solid ${a === "light" ? e(t.palette.divider, 0.25) : e(t.palette.divider, 0.4)}`,
|
|
36
|
-
// Inner highlight for premium glass effect
|
|
37
33
|
"&::before": {
|
|
38
34
|
content: '""',
|
|
39
35
|
position: "absolute",
|
|
@@ -44,7 +40,6 @@ const f = ({
|
|
|
44
40
|
background: a === "light" ? `linear-gradient(90deg, transparent, ${e(t.palette.common.white, 0.6)}, transparent)` : `linear-gradient(90deg, transparent, ${e(t.palette.common.white, 0.2)}, transparent)`,
|
|
45
41
|
borderRadius: `${r}px ${r}px 0 0`
|
|
46
42
|
},
|
|
47
|
-
// Inner shadow for depth
|
|
48
43
|
"&::after": {
|
|
49
44
|
content: '""',
|
|
50
45
|
position: "absolute",
|
|
@@ -53,7 +48,6 @@ const f = ({
|
|
|
53
48
|
background: a === "light" ? `linear-gradient(180deg, ${e(t.palette.common.white, 0.1)} 0%, transparent 50%)` : `linear-gradient(180deg, ${e(t.palette.common.white, 0.05)} 0%, transparent 50%)`,
|
|
54
49
|
pointerEvents: "none"
|
|
55
50
|
},
|
|
56
|
-
// Premium shadow system with multiple layers
|
|
57
51
|
boxShadow: a === "light" ? `0 1px 3px ${e(t.palette.common.black, 0.08)},
|
|
58
52
|
0 4px 12px ${e(t.palette.common.black, 0.05)},
|
|
59
53
|
0 16px 24px ${e(t.palette.common.black, 0.03)},
|
|
@@ -61,25 +55,17 @@ const f = ({
|
|
|
61
55
|
0 8px 24px ${e(t.palette.common.black, 0.2)},
|
|
62
56
|
0 16px 32px ${e(t.palette.common.black, 0.1)},
|
|
63
57
|
inset 0 1px 0 ${e(t.palette.common.white, 0.1)}`,
|
|
64
|
-
// Enhanced backdrop blur
|
|
65
58
|
backdropFilter: "blur(20px) saturate(1.2)",
|
|
66
59
|
WebkitBackdropFilter: "blur(20px) saturate(1.2)",
|
|
67
|
-
// Smooth premium transitions
|
|
68
60
|
transition: "all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1)",
|
|
69
|
-
// Advanced hover effects with multiple animations
|
|
70
61
|
"&:hover": {
|
|
71
|
-
// Keep strong contrast on hover; only adjust subtleties
|
|
72
62
|
background: a === "light" ? `linear-gradient(0deg, ${(t.vars || t).palette.background.paper}, ${(t.vars || t).palette.background.paper}),
|
|
73
63
|
linear-gradient(45deg, ${e(t.palette.primary.main, 0.08)} 0%, transparent 60%)` : `linear-gradient(0deg, ${(t.vars || t).palette.background.default}, ${(t.vars || t).palette.background.default}),
|
|
74
64
|
linear-gradient(45deg, ${e(t.palette.primary.light, 0.1)} 0%, transparent 60%)`,
|
|
75
|
-
// Subtle elevation
|
|
76
65
|
boxShadow: a === "light" ? `0 6px 18px ${e(t.palette.common.black, 0.12)}` : `0 10px 24px ${e(t.palette.common.black, 0.4)}`,
|
|
77
|
-
// Gentle lift only
|
|
78
66
|
transform: "translateY(-1px)",
|
|
79
|
-
// Simple border tint for feedback
|
|
80
67
|
border: `1px solid ${a === "light" ? e(t.palette.primary.main, 0.2) : e(t.palette.primary.light, 0.25)}`
|
|
81
68
|
},
|
|
82
|
-
// Enhanced active state with micro-interactions
|
|
83
69
|
"&:active": {
|
|
84
70
|
transform: "translateY(-1px) scale(1.01)",
|
|
85
71
|
transition: "all 0.15s cubic-bezier(0.4, 0, 0.6, 1)",
|
|
@@ -89,7 +75,6 @@ const f = ({
|
|
|
89
75
|
0 12px 32px ${e(t.palette.common.black, 0.25)},
|
|
90
76
|
inset 0 1px 0 ${e(t.palette.common.white, 0.1)}`
|
|
91
77
|
},
|
|
92
|
-
// Premium focus state with animated glow
|
|
93
78
|
"&:focus-visible": {
|
|
94
79
|
outline: "none",
|
|
95
80
|
boxShadow: a === "light" ? `0 4px 12px ${e(t.palette.common.black, 0.12)},
|
|
@@ -104,19 +89,18 @@ const f = ({
|
|
|
104
89
|
transform: "translateY(-1px)"
|
|
105
90
|
}
|
|
106
91
|
},
|
|
107
|
-
ref:
|
|
92
|
+
ref: s,
|
|
108
93
|
disableRipple: !0,
|
|
109
|
-
...
|
|
94
|
+
...m,
|
|
110
95
|
fullWidth: !0,
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
|
|
96
|
+
children: /* @__PURE__ */ i.jsxs(
|
|
97
|
+
o,
|
|
113
98
|
{
|
|
114
99
|
sx: {
|
|
115
100
|
position: "relative",
|
|
116
101
|
zIndex: 2,
|
|
117
102
|
fontSize: 16,
|
|
118
103
|
fontWeight: a === "light" ? 700 : 600,
|
|
119
|
-
// Enhanced gradient with multiple layers
|
|
120
104
|
background: `
|
|
121
105
|
${(t.vars || t).palette.gradient.primary},
|
|
122
106
|
linear-gradient(135deg,
|
|
@@ -129,20 +113,15 @@ const f = ({
|
|
|
129
113
|
WebkitBackgroundClip: "text",
|
|
130
114
|
color: "transparent",
|
|
131
115
|
WebkitTextFillColor: "transparent",
|
|
132
|
-
// Premium transitions with staggered timing
|
|
133
116
|
transition: "all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-position 0.6s ease",
|
|
134
|
-
// Advanced text effects
|
|
135
117
|
textShadow: a === "light" ? `0 1px 3px ${e(t.palette.common.black, 0.08)},
|
|
136
118
|
0 2px 6px ${e(t.palette.primary.main, 0.1)}` : `0 2px 4px ${e(t.palette.common.black, 0.4)},
|
|
137
119
|
0 4px 8px ${e(t.palette.primary.light, 0.2)}`,
|
|
138
|
-
// Enhanced typography
|
|
139
120
|
letterSpacing: "0.025em",
|
|
140
121
|
lineHeight: 1.2,
|
|
141
|
-
// Crisp text rendering
|
|
142
122
|
WebkitFontSmoothing: "antialiased",
|
|
143
123
|
MozOsxFontSmoothing: "grayscale",
|
|
144
124
|
textRendering: "optimizeLegibility",
|
|
145
|
-
// Hover effects for the text
|
|
146
125
|
"&:hover": {
|
|
147
126
|
backgroundPosition: "100% 0, 50% 50%",
|
|
148
127
|
transform: "scale(1.02)",
|
|
@@ -152,7 +131,6 @@ const f = ({
|
|
|
152
131
|
0 6px 16px ${e(t.palette.primary.light, 0.25)},
|
|
153
132
|
0 0 30px ${e(t.palette.primary.light, 0.15)}`
|
|
154
133
|
},
|
|
155
|
-
// Text glow animation on parent hover
|
|
156
134
|
"button:hover &": {
|
|
157
135
|
backgroundPosition: "100% 0, 50% 50%",
|
|
158
136
|
transform: "scale(1.02)",
|
|
@@ -163,7 +141,6 @@ const f = ({
|
|
|
163
141
|
0 0 30px ${e(t.palette.primary.light, 0.15)}`,
|
|
164
142
|
animation: "textGlow 2s ease-in-out infinite alternate"
|
|
165
143
|
},
|
|
166
|
-
// Keyframe animation for subtle text glow
|
|
167
144
|
"@keyframes textGlow": {
|
|
168
145
|
"0%": {
|
|
169
146
|
filter: "brightness(1) contrast(1)"
|
|
@@ -174,9 +151,9 @@ const f = ({
|
|
|
174
151
|
}
|
|
175
152
|
},
|
|
176
153
|
children: [
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
154
|
+
p,
|
|
155
|
+
/* @__PURE__ */ i.jsx(
|
|
156
|
+
o,
|
|
180
157
|
{
|
|
181
158
|
sx: {
|
|
182
159
|
position: "absolute",
|
|
@@ -196,7 +173,7 @@ const f = ({
|
|
|
196
173
|
opacity: 0.8
|
|
197
174
|
}
|
|
198
175
|
},
|
|
199
|
-
children:
|
|
176
|
+
children: p
|
|
200
177
|
}
|
|
201
178
|
)
|
|
202
179
|
]
|
|
@@ -207,6 +184,11 @@ const f = ({
|
|
|
207
184
|
}
|
|
208
185
|
);
|
|
209
186
|
};
|
|
187
|
+
n.displayName = "SGlowButton";
|
|
188
|
+
try {
|
|
189
|
+
n.displayName = "SGlowButton", n.__docgenInfo = { description: "A visually striking button with animated glowing border effects and gradient text.", displayName: "SGlowButton", props: { borderRadius: { defaultValue: { value: "12" }, description: "Border radius for the button (defaults to 12px)", name: "borderRadius", required: !1, type: { name: "string | number" } }, children: { defaultValue: null, description: "Button content", name: "children", required: !0, type: { name: "ReactNode" } }, duration: { defaultValue: { value: "6000" }, description: "Duration of the moving border animation in milliseconds (defaults to 6000ms)", name: "duration", required: !1, type: { name: "number" } } } };
|
|
190
|
+
} catch {
|
|
191
|
+
}
|
|
210
192
|
export {
|
|
211
|
-
|
|
193
|
+
n as default
|
|
212
194
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './s-gradient-icon';
|
|
2
|
-
export type {
|
|
2
|
+
export type { SGradientIconProps } from './s-gradient-icon';
|
|
@@ -21,10 +21,8 @@ export interface CustomGradient {
|
|
|
21
21
|
/** Position of middle color (0-1, default: 0.5) */
|
|
22
22
|
middlePosition?: number;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
*/
|
|
27
|
-
export interface GradientIconProps extends SvgIconProps {
|
|
24
|
+
/** Props interface for SGradientIcon component */
|
|
25
|
+
export interface SGradientIconProps extends SvgIconProps {
|
|
28
26
|
/** Whether the icon should show the gradient fill (hover state) */
|
|
29
27
|
hovered?: boolean;
|
|
30
28
|
/** The Material-UI icon component to render with gradient effect */
|
|
@@ -52,67 +50,9 @@ export interface GradientIconProps extends SvgIconProps {
|
|
|
52
50
|
/** Fallback color when gradient is not shown */
|
|
53
51
|
fallbackColor?: string;
|
|
54
52
|
}
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* Features:
|
|
62
|
-
* - Multiple predefined gradient themes (blue-cyan, purple-pink, etc.)
|
|
63
|
-
* - Custom gradient colors and directions
|
|
64
|
-
* - Configurable animation duration and easing
|
|
65
|
-
* - Automatic hover detection option
|
|
66
|
-
* - Always-gradient mode
|
|
67
|
-
* - Smooth transitions between states
|
|
68
|
-
* - Full compatibility with Material-UI icon props
|
|
69
|
-
* - Unique gradient IDs to prevent conflicts
|
|
70
|
-
*
|
|
71
|
-
* @param hovered - Whether to apply gradient fill (true) or fallback color (false)
|
|
72
|
-
* @param IconComponent - The Material-UI icon component to render
|
|
73
|
-
* @param sx - Additional Material-UI sx styling props
|
|
74
|
-
* @param strokeWidth - Width of icon stroke if applicable (default: 0)
|
|
75
|
-
* @param gradientTheme - Predefined gradient theme (default: 'blue-cyan')
|
|
76
|
-
* @param customGradient - Custom gradient colors when theme is 'custom'
|
|
77
|
-
* @param gradientDirection - Direction of the gradient (default: 'diagonal')
|
|
78
|
-
* @param animationDuration - Animation duration in milliseconds (default: 300)
|
|
79
|
-
* @param animationEasing - Animation easing function (default: 'ease')
|
|
80
|
-
* @param autoHover - Whether to automatically detect hover state (default: false)
|
|
81
|
-
* @param gradientId - Unique identifier for the gradient (auto-generated if not provided)
|
|
82
|
-
* @param alwaysGradient - Whether to always show gradient (overrides hovered state)
|
|
83
|
-
* @param fallbackColor - Fallback color when gradient is not shown
|
|
84
|
-
* @param props - All other Material-UI SvgIcon props
|
|
85
|
-
* @returns JSX element containing SVG gradient definition and styled icon
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```tsx
|
|
89
|
-
* import HomeIcon from '@mui/icons-material/Home';
|
|
90
|
-
*
|
|
91
|
-
* // Basic usage
|
|
92
|
-
* <GradientIcon
|
|
93
|
-
* IconComponent={HomeIcon}
|
|
94
|
-
* hovered={isHovered}
|
|
95
|
-
* />
|
|
96
|
-
*
|
|
97
|
-
* // Custom gradient
|
|
98
|
-
* <GradientIcon
|
|
99
|
-
* IconComponent={HomeIcon}
|
|
100
|
-
* gradientTheme="custom"
|
|
101
|
-
* customGradient={{
|
|
102
|
-
* startColor: '#ff6b6b',
|
|
103
|
-
* endColor: '#4ecdc4'
|
|
104
|
-
* }}
|
|
105
|
-
* gradientDirection="vertical"
|
|
106
|
-
* />
|
|
107
|
-
*
|
|
108
|
-
* // Auto hover with custom animation
|
|
109
|
-
* <GradientIcon
|
|
110
|
-
* IconComponent={HomeIcon}
|
|
111
|
-
* autoHover
|
|
112
|
-
* animationDuration={500}
|
|
113
|
-
* animationEasing="ease-in-out"
|
|
114
|
-
* />
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
117
|
-
declare const GradientIcon: ({ hovered, IconComponent, sx, strokeWidth, gradientTheme, customGradient, gradientDirection, animationDuration, animationEasing, autoHover, gradientId, alwaysGradient, fallbackColor, ...props }: GradientIconProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
118
|
-
export default GradientIcon;
|
|
53
|
+
/** A customizable icon component that applies gradient effects with multiple themes and animations. */
|
|
54
|
+
export declare const SGradientIcon: {
|
|
55
|
+
({ hovered, IconComponent, sx, strokeWidth, gradientTheme, customGradient, gradientDirection, animationDuration, animationEasing, autoHover, gradientId, alwaysGradient, fallbackColor, ...props }: SGradientIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
56
|
+
displayName: string;
|
|
57
|
+
};
|
|
58
|
+
export default SGradientIcon;
|
|
@@ -1,81 +1,91 @@
|
|
|
1
1
|
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
-
const
|
|
3
|
-
hovered:
|
|
4
|
-
IconComponent:
|
|
5
|
-
sx:
|
|
2
|
+
const s = ({
|
|
3
|
+
hovered: o = !1,
|
|
4
|
+
IconComponent: u,
|
|
5
|
+
sx: p,
|
|
6
6
|
strokeWidth: h = 0,
|
|
7
|
-
gradientTheme:
|
|
8
|
-
customGradient:
|
|
9
|
-
gradientDirection:
|
|
10
|
-
animationDuration:
|
|
11
|
-
animationEasing:
|
|
7
|
+
gradientTheme: g = "blue-cyan",
|
|
8
|
+
customGradient: n,
|
|
9
|
+
gradientDirection: m = "diagonal",
|
|
10
|
+
animationDuration: v = 300,
|
|
11
|
+
animationEasing: y = "ease",
|
|
12
12
|
autoHover: f = !1,
|
|
13
|
-
gradientId:
|
|
14
|
-
alwaysGradient:
|
|
15
|
-
fallbackColor:
|
|
16
|
-
...
|
|
13
|
+
gradientId: x,
|
|
14
|
+
alwaysGradient: c = !1,
|
|
15
|
+
fallbackColor: b,
|
|
16
|
+
...t
|
|
17
17
|
}) => {
|
|
18
|
-
if (!
|
|
18
|
+
if (!u)
|
|
19
19
|
return null;
|
|
20
|
-
const
|
|
20
|
+
const l = x || `gradient-${Math.random().toString(36).substr(2, 9)}`, a = {
|
|
21
21
|
"blue-cyan": { start: "#1469be", end: "#43ecff" },
|
|
22
22
|
"purple-pink": { start: "#8b5cf6", end: "#ec4899" },
|
|
23
23
|
"orange-red": { start: "#f97316", end: "#ef4444" },
|
|
24
24
|
"green-teal": { start: "#10b981", end: "#06b6d4" },
|
|
25
25
|
"indigo-purple": { start: "#6366f1", end: "#a855f7" },
|
|
26
|
-
custom:
|
|
27
|
-
start:
|
|
28
|
-
end:
|
|
29
|
-
middle:
|
|
30
|
-
middlePos:
|
|
26
|
+
custom: n ? {
|
|
27
|
+
start: n.startColor,
|
|
28
|
+
end: n.endColor,
|
|
29
|
+
middle: n.middleColor,
|
|
30
|
+
middlePos: n.middlePosition || 0.5
|
|
31
31
|
} : { start: "#1469be", end: "#43ecff" }
|
|
32
|
-
}[
|
|
32
|
+
}[g], r = {
|
|
33
33
|
horizontal: { x1: "0", y1: "0", x2: "1", y2: "0" },
|
|
34
34
|
vertical: { x1: "0", y1: "0", x2: "0", y2: "1" },
|
|
35
35
|
diagonal: { x1: "0", y1: "0", x2: "1", y2: "1" },
|
|
36
36
|
radial: { x1: "0.5", y1: "0.5", x2: "0.5", y2: "0.5" }
|
|
37
|
-
}[
|
|
37
|
+
}[m], q = c || o ? `url(#${l})` : b || "var(--s-palette-text-primary)";
|
|
38
38
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
39
|
-
/* @__PURE__ */ e.jsx("svg", { width: 0, height: 0, children:
|
|
40
|
-
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor:
|
|
41
|
-
|
|
42
|
-
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor:
|
|
43
|
-
] }) : /* @__PURE__ */ e.jsxs("linearGradient", { id:
|
|
44
|
-
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor:
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor:
|
|
39
|
+
/* @__PURE__ */ e.jsx("svg", { width: 0, height: 0, children: m === "radial" ? /* @__PURE__ */ e.jsxs("radialGradient", { id: l, cx: "50%", cy: "50%", r: "50%", children: [
|
|
40
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: a.start }),
|
|
41
|
+
a.middle && /* @__PURE__ */ e.jsx("stop", { offset: `${(a.middlePos || 0.5) * 100}%`, stopColor: a.middle }),
|
|
42
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: a.end })
|
|
43
|
+
] }) : /* @__PURE__ */ e.jsxs("linearGradient", { id: l, x1: r.x1, y1: r.y1, x2: r.x2, y2: r.y2, children: [
|
|
44
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: a.start }),
|
|
45
|
+
a.middle && /* @__PURE__ */ e.jsx("stop", { offset: `${(a.middlePos || 0.5) * 100}%`, stopColor: a.middle }),
|
|
46
|
+
/* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: a.end })
|
|
47
47
|
] }) }),
|
|
48
48
|
/* @__PURE__ */ e.jsx(
|
|
49
|
-
|
|
49
|
+
u,
|
|
50
50
|
{
|
|
51
|
-
...
|
|
51
|
+
...t,
|
|
52
52
|
sx: {
|
|
53
|
-
fill:
|
|
53
|
+
fill: q,
|
|
54
54
|
strokeWidth: h,
|
|
55
|
-
transition: `fill ${
|
|
55
|
+
transition: `fill ${v}ms ${y}`,
|
|
56
56
|
// Auto hover functionality
|
|
57
57
|
...f && {
|
|
58
58
|
"&:hover": {
|
|
59
|
-
fill: `url(#${
|
|
59
|
+
fill: `url(#${l})`
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
...
|
|
62
|
+
...p
|
|
63
63
|
// Allow custom styling to override defaults
|
|
64
64
|
},
|
|
65
|
-
...f && !
|
|
66
|
-
onMouseEnter: (
|
|
67
|
-
var
|
|
68
|
-
(
|
|
65
|
+
...f && !c && {
|
|
66
|
+
onMouseEnter: (d) => {
|
|
67
|
+
var i;
|
|
68
|
+
(i = t.onMouseEnter) == null || i.call(t, d);
|
|
69
69
|
},
|
|
70
|
-
onMouseLeave: (
|
|
71
|
-
var
|
|
72
|
-
(
|
|
70
|
+
onMouseLeave: (d) => {
|
|
71
|
+
var i;
|
|
72
|
+
(i = t.onMouseLeave) == null || i.call(t, d);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] });
|
|
78
78
|
};
|
|
79
|
+
s.displayName = "SGradientIcon";
|
|
80
|
+
try {
|
|
81
|
+
s.displayName = "SGradientIcon", s.__docgenInfo = { description: "A customizable icon component that applies gradient effects with multiple themes and animations.", displayName: "SGradientIcon", props: { hovered: { defaultValue: { value: "false" }, description: "Whether the icon should show the gradient fill (hover state)", name: "hovered", required: !1, type: { name: "boolean" } }, IconComponent: { defaultValue: null, description: "The Material-UI icon component to render with gradient effect", name: "IconComponent", required: !0, type: { name: "IconComponent" } }, sx: { defaultValue: null, description: "Additional styling props", name: "sx", required: !1, type: { name: "SxProps" } }, strokeWidth: { defaultValue: { value: "0" }, description: "Stroke width for the icon (default: 0)", name: "strokeWidth", required: !1, type: { name: "number" } }, gradientTheme: { defaultValue: { value: "blue-cyan" }, description: "Predefined gradient theme (default: 'blue-cyan')", name: "gradientTheme", required: !1, type: { name: "enum", value: [{ value: '"custom"' }, { value: '"blue-cyan"' }, { value: '"purple-pink"' }, { value: '"orange-red"' }, { value: '"green-teal"' }, { value: '"indigo-purple"' }] } }, customGradient: { defaultValue: null, description: "Custom gradient colors when theme is 'custom'", name: "customGradient", required: !1, type: { name: "CustomGradient" } }, gradientDirection: { defaultValue: { value: "diagonal" }, description: "Direction of the gradient (default: 'diagonal')", name: "gradientDirection", required: !1, type: { name: "enum", value: [{ value: '"horizontal"' }, { value: '"vertical"' }, { value: '"diagonal"' }, { value: '"radial"' }] } }, animationDuration: { defaultValue: { value: "300" }, description: "Animation duration in milliseconds (default: 300)", name: "animationDuration", required: !1, type: { name: "number" } }, animationEasing: { defaultValue: { value: "ease" }, description: "Animation easing function (default: 'ease')", name: "animationEasing", required: !1, type: { name: "enum", value: [{ value: '"linear"' }, { value: '"ease"' }, { value: '"ease-in"' }, { value: '"ease-out"' }, { value: '"ease-in-out"' }] } }, autoHover: { defaultValue: { value: "false" }, description: "Whether to automatically detect hover state (default: false)", name: "autoHover", required: !1, type: { name: "boolean" } }, gradientId: { defaultValue: null, description: "Unique identifier for the gradient (auto-generated if not provided)", name: "gradientId", required: !1, type: { name: "string" } }, alwaysGradient: { defaultValue: { value: "false" }, description: "Whether to always show gradient (overrides hovered state)", name: "alwaysGradient", required: !1, type: { name: "boolean" } }, fallbackColor: { defaultValue: null, description: "Fallback color when gradient is not shown", name: "fallbackColor", required: !1, type: { name: "string" } } } };
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
sgradienticon.displayName = "sgradienticon", sgradienticon.__docgenInfo = { description: "A customizable icon component that applies gradient effects with multiple themes and animations.", displayName: "sgradienticon", props: { hovered: { defaultValue: { value: "false" }, description: "Whether the icon should show the gradient fill (hover state)", name: "hovered", required: !1, type: { name: "boolean" } }, IconComponent: { defaultValue: null, description: "The Material-UI icon component to render with gradient effect", name: "IconComponent", required: !0, type: { name: "IconComponent" } }, sx: { defaultValue: null, description: "Additional styling props", name: "sx", required: !1, type: { name: "SxProps" } }, strokeWidth: { defaultValue: { value: "0" }, description: "Stroke width for the icon (default: 0)", name: "strokeWidth", required: !1, type: { name: "number" } }, gradientTheme: { defaultValue: { value: "blue-cyan" }, description: "Predefined gradient theme (default: 'blue-cyan')", name: "gradientTheme", required: !1, type: { name: "enum", value: [{ value: '"custom"' }, { value: '"blue-cyan"' }, { value: '"purple-pink"' }, { value: '"orange-red"' }, { value: '"green-teal"' }, { value: '"indigo-purple"' }] } }, customGradient: { defaultValue: null, description: "Custom gradient colors when theme is 'custom'", name: "customGradient", required: !1, type: { name: "CustomGradient" } }, gradientDirection: { defaultValue: { value: "diagonal" }, description: "Direction of the gradient (default: 'diagonal')", name: "gradientDirection", required: !1, type: { name: "enum", value: [{ value: '"horizontal"' }, { value: '"vertical"' }, { value: '"diagonal"' }, { value: '"radial"' }] } }, animationDuration: { defaultValue: { value: "300" }, description: "Animation duration in milliseconds (default: 300)", name: "animationDuration", required: !1, type: { name: "number" } }, animationEasing: { defaultValue: { value: "ease" }, description: "Animation easing function (default: 'ease')", name: "animationEasing", required: !1, type: { name: "enum", value: [{ value: '"linear"' }, { value: '"ease"' }, { value: '"ease-in"' }, { value: '"ease-out"' }, { value: '"ease-in-out"' }] } }, autoHover: { defaultValue: { value: "false" }, description: "Whether to automatically detect hover state (default: false)", name: "autoHover", required: !1, type: { name: "boolean" } }, gradientId: { defaultValue: null, description: "Unique identifier for the gradient (auto-generated if not provided)", name: "gradientId", required: !1, type: { name: "string" } }, alwaysGradient: { defaultValue: { value: "false" }, description: "Whether to always show gradient (overrides hovered state)", name: "alwaysGradient", required: !1, type: { name: "boolean" } }, fallbackColor: { defaultValue: null, description: "Fallback color when gradient is not shown", name: "fallbackColor", required: !1, type: { name: "string" } } } };
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
79
88
|
export {
|
|
80
|
-
|
|
89
|
+
s as SGradientIcon,
|
|
90
|
+
s as default
|
|
81
91
|
};
|
|
@@ -8,37 +8,9 @@ export interface SI18nProviderProps {
|
|
|
8
8
|
/** Language code to set as active (default: 'en') */
|
|
9
9
|
language?: string;
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* files and React integration for seamless component-level translations.
|
|
17
|
-
*
|
|
18
|
-
* Features:
|
|
19
|
-
* - Dynamic language switching at runtime
|
|
20
|
-
* - HTTP backend for loading translation files from server
|
|
21
|
-
* - Fallback language support (defaults to English)
|
|
22
|
-
* - Error handling for initialization and language changes
|
|
23
|
-
* - React integration for hooks like useTranslation
|
|
24
|
-
*
|
|
25
|
-
* The component automatically changes the active language when the language
|
|
26
|
-
* prop updates, with proper error handling if the language change fails.
|
|
27
|
-
*
|
|
28
|
-
* @param children - Components that will have access to i18next functionality
|
|
29
|
-
* @param language - Language code to set as active (e.g., 'en', 'es', 'fr')
|
|
30
|
-
* @returns JSX fragment containing children with i18n context
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```tsx
|
|
34
|
-
* <SI18nProvider language="es">
|
|
35
|
-
* <App />
|
|
36
|
-
* </SI18nProvider>
|
|
37
|
-
*
|
|
38
|
-
* // In child components:
|
|
39
|
-
* const { t } = useTranslation();
|
|
40
|
-
* return <div>{t('welcome_message')}</div>;
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
declare const SI18nProvider: ({ children, language }: SI18nProviderProps) => React.JSX.Element;
|
|
11
|
+
/** Internationalization provider component with dynamic language switching support. */
|
|
12
|
+
export declare const SI18nProvider: {
|
|
13
|
+
({ children, language }: SI18nProviderProps): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
44
16
|
export default SI18nProvider;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
3
|
-
import { use as
|
|
4
|
-
import
|
|
5
|
-
import { initReactI18next as
|
|
6
|
-
import { logger as
|
|
7
|
-
|
|
1
|
+
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { use as l } from "i18next";
|
|
4
|
+
import c from "i18next-http-backend";
|
|
5
|
+
import { initReactI18next as d, useTranslation as s } from "react-i18next";
|
|
6
|
+
import { logger as r } from "../utils/logger.js";
|
|
7
|
+
l(c).use(d).init({
|
|
8
8
|
lng: "en",
|
|
9
9
|
// Default language
|
|
10
10
|
fallbackLng: "en",
|
|
@@ -12,16 +12,26 @@ i(s).use(c).init({
|
|
|
12
12
|
interpolation: { escapeValue: !1 }
|
|
13
13
|
// React already escapes values
|
|
14
14
|
}).catch((e) => {
|
|
15
|
-
|
|
15
|
+
r.error("Failed to initialize i18n", e);
|
|
16
16
|
});
|
|
17
|
-
const
|
|
18
|
-
const { i18n:
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const n = ({ children: e, language: a = "en" }) => {
|
|
18
|
+
const { i18n: t } = s();
|
|
19
|
+
return i.useEffect(() => {
|
|
20
|
+
t.changeLanguage(a).catch(() => {
|
|
21
|
+
r.error(`Failed to change language to ${a}`);
|
|
22
22
|
});
|
|
23
|
-
}, [
|
|
23
|
+
}, [t, a]), /* @__PURE__ */ o.jsx(i.Fragment, { children: e });
|
|
24
24
|
};
|
|
25
|
+
n.displayName = "SI18nProvider";
|
|
26
|
+
try {
|
|
27
|
+
n.displayName = "SI18nProvider", n.__docgenInfo = { description: "Internationalization provider component with dynamic language switching support.", displayName: "SI18nProvider", props: { children: { defaultValue: null, description: "Child components that will have access to internationalization", name: "children", required: !0, type: { name: "ReactNode" } }, language: { defaultValue: { value: "en" }, description: "Language code to set as active (default: 'en')", name: "language", required: !1, type: { name: "string" } } } };
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
si18nprovider.displayName = "si18nprovider", si18nprovider.__docgenInfo = { description: "Internationalization provider component with dynamic language switching support.", displayName: "si18nprovider", props: { children: { defaultValue: null, description: "Child components that will have access to internationalization", name: "children", required: !0, type: { name: "ReactNode" } }, language: { defaultValue: { value: "en" }, description: "Language code to set as active (default: 'en')", name: "language", required: !1, type: { name: "string" } } } };
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
25
34
|
export {
|
|
26
|
-
|
|
35
|
+
n as SI18nProvider,
|
|
36
|
+
n as default
|
|
27
37
|
};
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IconButtonProps, TooltipProps } from '@mui/material';
|
|
3
3
|
/**
|
|
4
|
-
* Props interface for SIconButton component
|
|
5
|
-
* with optional tooltip integration
|
|
4
|
+
* Props interface for SIconButton component
|
|
6
5
|
*/
|
|
7
6
|
export interface SIconButtonProps extends IconButtonProps {
|
|
8
7
|
/** Optional tooltip configuration (excludes 'children' which is handled internally) */
|
|
9
8
|
tooltipOptions?: Omit<TooltipProps, 'children'>;
|
|
10
9
|
}
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
* Wraps Material-UI IconButton with convenient tooltip functionality.
|
|
14
|
-
*
|
|
15
|
-
* Key features:
|
|
16
|
-
* - Full Material-UI IconButton API compatibility
|
|
17
|
-
* - Optional tooltip integration without additional wrapper components
|
|
18
|
-
* - Clean conditional rendering based on tooltip presence
|
|
19
|
-
* - Maintains all IconButton styling and behavior
|
|
20
|
-
* - Simplified tooltip configuration
|
|
21
|
-
*
|
|
22
|
-
* The tooltip is only rendered when tooltipOptions are provided, keeping the DOM
|
|
23
|
-
* clean when tooltips aren't needed. This pattern reduces unnecessary wrapper
|
|
24
|
-
* components and improves performance.
|
|
25
|
-
*
|
|
26
|
-
* @param props - SIconButtonProps with IconButton props and optional tooltip config
|
|
27
|
-
* @returns JSX.Element - IconButton with optional tooltip wrapper
|
|
11
|
+
* An enhanced icon button component with optional tooltip integration.
|
|
28
12
|
*/
|
|
29
|
-
declare const SIconButton:
|
|
13
|
+
export declare const SIconButton: {
|
|
14
|
+
({ tooltipOptions, ...props }: SIconButtonProps): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
30
17
|
export default SIconButton;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
const
|
|
1
|
+
import { j as o } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { Tooltip as l, IconButton as e } from "@mui/material";
|
|
3
|
+
const n = ({ tooltipOptions: t, ...i }) => t ? /* @__PURE__ */ o.jsx(l, { ...t, children: /* @__PURE__ */ o.jsx(e, { ...i }) }) : /* @__PURE__ */ o.jsx(e, { ...i });
|
|
4
|
+
n.displayName = "SIconButton";
|
|
5
|
+
try {
|
|
6
|
+
n.displayName = "SIconButton", n.__docgenInfo = { description: "An enhanced icon button component with optional tooltip integration.", displayName: "SIconButton", props: { tooltipOptions: { defaultValue: null, description: "Optional tooltip configuration (excludes 'children' which is handled internally)", name: "tooltipOptions", required: !1, type: { name: 'Omit<TooltipProps, "children">' } } } };
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
siconbutton.displayName = "siconbutton", siconbutton.__docgenInfo = { description: "An enhanced icon button component with optional tooltip integration.", displayName: "siconbutton", props: { tooltipOptions: { defaultValue: null, description: "Optional tooltip configuration (excludes 'children' which is handled internally)", name: "tooltipOptions", required: !1, type: { name: 'Omit<TooltipProps, "children">' } } } };
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
4
13
|
export {
|
|
5
|
-
|
|
14
|
+
n as SIconButton,
|
|
15
|
+
n as default
|
|
6
16
|
};
|