@solostylist/ui-kit 1.0.196 → 1.0.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrowUpward-JWPHrR6I.js → ArrowUpward-D8eqD-si.js} +1 -1
- package/dist/{Box-p3bpOtdn.js → Box-BkXoTbe8.js} +3 -3
- package/dist/{ButtonBase-PbSTzuUP.js → ButtonBase-D73M0QY5.js} +7 -7
- package/dist/{ChevronLeft-BJjuFNNQ.js → ChevronLeft-BmgmPHp9.js} +1 -1
- package/dist/{ChevronRight-5ZX3FodP.js → ChevronRight-DbWSr8yz.js} +1 -1
- package/dist/{Close-C-pCw-CD.js → Close-lHCUMitI.js} +1 -1
- package/dist/{ContentCopy-CNxsEhmq.js → ContentCopy-D4SuJd86.js} +1 -1
- package/dist/{DefaultPropsProvider-2MEHB2yv.js → DefaultPropsProvider-DPuuPIbS.js} +2 -2
- package/dist/{Download-D97XSAig.js → Download-BoRQUwCf.js} +1 -1
- package/dist/{ExpandMore-CTZrSZlF.js → ExpandMore-C7yRQv1-.js} +1 -1
- package/dist/{Favorite-Cvjg7GqN.js → Favorite-Bz_HcMgN.js} +1 -1
- package/dist/{Menu-_ZW9WiF2.js → Menu-GVFDMHCN.js} +137 -131
- package/dist/{MenuItem-DTapLhin.js → MenuItem-2wG8I2HO.js} +5 -5
- package/dist/{Paper-5nSdRRBA.js → Paper-CR019bki.js} +6 -6
- package/dist/{Select-J5gDqfEk.js → Select-80JhW337.js} +7 -7
- package/dist/{Stack-BlwLEm6H.js → Stack-Dfjnuorw.js} +5 -5
- package/dist/{Typography-Cum5_Ehu.js → Typography-PcmlIqm1.js} +4 -4
- package/dist/assets/s-overlay-scrollbar.css +1 -1
- package/dist/{createSvgIcon-DTNHY3_v.js → createSvgIcon-BkbeLOhM.js} +3 -3
- package/dist/{createTheme-CIXJrNxb.js → createTheme-DgoJyWM-.js} +874 -871
- package/dist/defaultTheme-CulFxfLR.js +5 -0
- package/dist/{extendSxProp-CyoueGTe.js → extendSxProp-BJEIxcAx.js} +1 -1
- package/dist/{index-8LcCMmwl.js → index-DtGYsHSv.js} +4 -4
- package/dist/s-accordion/s-accordion.js +89 -89
- package/dist/s-action-overlay/s-action-overlay.js +7 -7
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +44 -0
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +241 -272
- package/dist/s-avatar/s-avatar.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +4 -4
- package/dist/s-carousel/s-carousel.js +4 -4
- package/dist/s-chat-input/s-chat-input.js +4 -4
- package/dist/s-chat-message/s-chat-message.js +135 -124
- package/dist/s-chips/s-chips.js +35 -35
- package/dist/s-code-block/s-code-block.js +1 -1
- package/dist/s-comment-message/s-comment-message.js +5 -5
- package/dist/s-copyable-text/s-copyable-text.js +1 -1
- package/dist/s-countdown/s-count-down.d.ts +15 -10
- package/dist/s-countdown/s-count-down.js +84 -101
- package/dist/s-data-table/s-data-table.js +75 -76
- package/dist/s-date-picker/s-date-picker.js +43 -47
- package/dist/s-datetime-picker/s-datetime-picker.js +782 -782
- package/dist/s-dialog/s-dialog.js +1 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
- package/dist/s-dialog-message/s-dialog-message.js +2 -2
- package/dist/s-empty/s-empty.js +1 -1
- package/dist/s-file-dropzone/s-file-dropzone.js +4 -4
- package/dist/s-file-icon/s-file-icon.js +15 -15
- package/dist/s-flex-box/s-flex-box.js +1 -1
- package/dist/s-gallery/s-gallery.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.js +5 -5
- package/dist/s-image-comparison/s-image-comparison.js +3 -3
- package/dist/s-image-modal/s-image-modal.js +7 -7
- package/dist/s-label/s-label.d.ts +1 -1
- package/dist/s-label/s-label.js +1 -1
- package/dist/s-language-switcher/s-language-switcher.js +8 -8
- package/dist/s-localization-provider/s-localization-provider.js +1 -1
- package/dist/s-moving-border/s-moving-border.d.ts +5 -5
- package/dist/s-multi-select/s-multi-select.js +3 -3
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +6 -6
- package/dist/s-pixel-reveal/s-pixel-reveal.js +76 -71
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +2 -2
- package/dist/s-review/s-review.d.ts +3 -2
- package/dist/s-review/s-review.js +19 -19
- package/dist/s-scroll-to-top/s-scroll-to-top.js +5 -5
- package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +1 -1
- package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +3 -3
- package/dist/s-scroll-velocity/scroll-velocity-row.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -0
- package/dist/s-select/s-select.js +60 -72
- package/dist/s-select-list/s-select-list.js +1 -1
- package/dist/s-stripe/s-stripe-cvc.d.ts +1 -1
- package/dist/s-stripe/s-stripe-expiry.d.ts +1 -1
- package/dist/s-stripe/s-stripe-number.d.ts +1 -1
- package/dist/s-stripe/stripe-input.d.ts +1 -1
- package/dist/s-text-editor/s-text-editor-toolbar.js +64 -60
- package/dist/s-text-editor/s-text-editor.js +1 -1
- package/dist/s-text-field/s-text-field.js +1 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +3 -3
- package/dist/s-theme-demo/s-theme-demo.js +2 -2
- package/dist/s-theme-provider/s-theme-provider.d.ts +1 -1
- package/dist/s-theme-switch/s-theme-switch.js +1 -1
- package/dist/s-tip/s-tip.js +3 -3
- package/dist/{styled-BR6UL29H.js → styled-8Y5KoVix.js} +2 -2
- package/dist/theme/components/avatar.js +1 -1
- package/dist/theme/components/button.d.ts +2 -2
- package/dist/theme/components/button.js +1 -1
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/components/chip.js +1 -1
- package/dist/theme/components/icon-button.d.ts +2 -2
- package/dist/theme/components/popover.js +2 -2
- package/dist/theme/components/skeleton.js +1 -1
- package/dist/theme/components/tooltip.js +5 -5
- package/dist/theme/customizations/data-display.js +12 -12
- package/dist/theme/customizations/feedback.js +2 -2
- package/dist/theme/customizations/inputs.js +12 -12
- package/dist/theme/customizations/navigation.js +28 -28
- package/dist/theme/customizations/surfaces.js +11 -11
- package/dist/theme/theme-primitives.js +1 -1
- package/dist/{useMobilePicker-C0pYjskU.js → useMobilePicker-DVnEuXv1.js} +3936 -3653
- package/dist/{useTheme-DSvhq4Np.js → useTheme-CWPkv7g3.js} +1 -1
- package/dist/{useThemeProps-C-oV4Fbz.js → useThemeProps-XYgXGzjS.js} +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils-CHdpkEZx.js +33 -0
- package/dist/{warning-BZ61Y8gI.js → warning-Ba-7BBAN.js} +3 -3
- package/package.json +59 -59
- package/dist/defaultTheme-DLue8Fr1.js +0 -5
- package/dist/utils-DJIrqgo5.js +0 -18
|
@@ -3,17 +3,22 @@ import { SxProps, Theme } from '@mui/material';
|
|
|
3
3
|
/**
|
|
4
4
|
* Props interface for SCountdown component
|
|
5
5
|
*/
|
|
6
|
+
export type SCountDownSize = 'small' | 'medium' | 'large';
|
|
7
|
+
export type SCountDownColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
|
|
8
|
+
export type SCountDownLayout = 'horizontal' | 'vertical' | 'grid';
|
|
9
|
+
export type SCountDownAnimation = 'none' | 'fade' | 'slide';
|
|
10
|
+
export type SCountDownDigitFormat = 'default' | 'padded';
|
|
6
11
|
export interface SCountDownProps {
|
|
7
12
|
/** Target date timestamp in milliseconds (from Date.getTime()) */
|
|
8
13
|
expireDate: number;
|
|
9
14
|
/** Size variant for all count boxes */
|
|
10
|
-
size?:
|
|
15
|
+
size?: SCountDownSize;
|
|
11
16
|
/** Color theme for the countdown */
|
|
12
|
-
color?:
|
|
17
|
+
color?: SCountDownColor;
|
|
13
18
|
/** Layout orientation */
|
|
14
|
-
layout?:
|
|
19
|
+
layout?: SCountDownLayout;
|
|
15
20
|
/** Animation type for value changes */
|
|
16
|
-
animation?:
|
|
21
|
+
animation?: SCountDownAnimation;
|
|
17
22
|
/** Whether to show separators between units */
|
|
18
23
|
showSeparators?: boolean;
|
|
19
24
|
/** Custom separator element */
|
|
@@ -33,7 +38,7 @@ export interface SCountDownProps {
|
|
|
33
38
|
seconds?: string;
|
|
34
39
|
};
|
|
35
40
|
/** Format for displaying digits */
|
|
36
|
-
digitFormat?:
|
|
41
|
+
digitFormat?: SCountDownDigitFormat;
|
|
37
42
|
/** Callback fired when countdown reaches zero */
|
|
38
43
|
onComplete?: () => void;
|
|
39
44
|
/** Callback fired on each tick (every second) */
|
|
@@ -57,11 +62,11 @@ export interface SCountDownProps {
|
|
|
57
62
|
paused?: boolean;
|
|
58
63
|
/** Responsive breakpoints for size changes */
|
|
59
64
|
responsive?: {
|
|
60
|
-
xs?:
|
|
61
|
-
sm?:
|
|
62
|
-
md?:
|
|
63
|
-
lg?:
|
|
64
|
-
xl?:
|
|
65
|
+
xs?: SCountDownSize;
|
|
66
|
+
sm?: SCountDownSize;
|
|
67
|
+
md?: SCountDownSize;
|
|
68
|
+
lg?: SCountDownSize;
|
|
69
|
+
xl?: SCountDownSize;
|
|
65
70
|
};
|
|
66
71
|
}
|
|
67
72
|
/**
|
|
@@ -1,149 +1,132 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import
|
|
4
|
-
import { SFlexBox as
|
|
1
|
+
import { j as a } from "../jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import { Typography as M } from "@mui/material";
|
|
3
|
+
import A from "../hooks/use-count-down.js";
|
|
4
|
+
import { SFlexBox as y } from "../s-flex-box/s-flex-box.js";
|
|
5
5
|
import { SCountBox as N } from "./s-count-box.js";
|
|
6
6
|
const R = ({
|
|
7
|
-
expireDate:
|
|
7
|
+
expireDate: x,
|
|
8
8
|
size: e = "medium",
|
|
9
|
-
color:
|
|
10
|
-
layout:
|
|
11
|
-
animation:
|
|
12
|
-
showSeparators:
|
|
13
|
-
separator:
|
|
14
|
-
units:
|
|
9
|
+
color: l = "inherit",
|
|
10
|
+
layout: u = "horizontal",
|
|
11
|
+
animation: g = "none",
|
|
12
|
+
showSeparators: d = !1,
|
|
13
|
+
separator: p = ":",
|
|
14
|
+
units: S = {
|
|
15
15
|
days: !0,
|
|
16
16
|
hours: !0,
|
|
17
17
|
minutes: !0,
|
|
18
18
|
seconds: !0
|
|
19
19
|
},
|
|
20
|
-
labels:
|
|
20
|
+
labels: i = {
|
|
21
21
|
days: "DAYS",
|
|
22
22
|
hours: "HOURS",
|
|
23
23
|
minutes: "MINS",
|
|
24
24
|
seconds: "SECS"
|
|
25
25
|
},
|
|
26
|
-
digitFormat:
|
|
27
|
-
onComplete:
|
|
28
|
-
onTick:
|
|
29
|
-
onStart:
|
|
30
|
-
completedText:
|
|
31
|
-
autoHideZeroUnits:
|
|
32
|
-
sx:
|
|
33
|
-
"aria-label":
|
|
26
|
+
digitFormat: w = "default",
|
|
27
|
+
onComplete: j,
|
|
28
|
+
onTick: C,
|
|
29
|
+
onStart: $,
|
|
30
|
+
completedText: o = "Time is up!",
|
|
31
|
+
autoHideZeroUnits: k = !1,
|
|
32
|
+
sx: h,
|
|
33
|
+
"aria-label": c = "Countdown timer",
|
|
34
34
|
paused: b = !1,
|
|
35
|
-
responsive:
|
|
35
|
+
responsive: n
|
|
36
36
|
}) => {
|
|
37
|
-
const { timeLeft: t, isExpired:
|
|
38
|
-
expireDate:
|
|
39
|
-
onComplete:
|
|
40
|
-
onTick:
|
|
41
|
-
onStart:
|
|
37
|
+
const { timeLeft: t, isExpired: v } = A({
|
|
38
|
+
expireDate: x,
|
|
39
|
+
onComplete: j,
|
|
40
|
+
onTick: C,
|
|
41
|
+
onStart: $,
|
|
42
42
|
paused: b
|
|
43
43
|
});
|
|
44
|
-
if (
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
44
|
+
if (v && o)
|
|
45
|
+
return /* @__PURE__ */ a.jsx(
|
|
46
|
+
y,
|
|
47
47
|
{
|
|
48
48
|
justifyContent: "center",
|
|
49
49
|
alignItems: "center",
|
|
50
|
-
sx: { textAlign: "center", ...
|
|
50
|
+
sx: { textAlign: "center", ...h },
|
|
51
51
|
role: "timer",
|
|
52
|
-
"aria-label": `${
|
|
53
|
-
children: typeof
|
|
54
|
-
|
|
52
|
+
"aria-label": `${c} - completed`,
|
|
53
|
+
children: typeof o == "string" ? /* @__PURE__ */ a.jsx(
|
|
54
|
+
M,
|
|
55
55
|
{
|
|
56
56
|
variant: e === "large" ? "h4" : e === "small" ? "h6" : "h5",
|
|
57
|
-
color:
|
|
57
|
+
color: l === "inherit" ? "text.primary" : `${l}.main`,
|
|
58
58
|
sx: { fontWeight: 600 },
|
|
59
|
-
children:
|
|
59
|
+
children: o
|
|
60
60
|
}
|
|
61
|
-
) :
|
|
61
|
+
) : o
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
|
-
const m = [],
|
|
65
|
-
{ key: "days", value: t.days, label:
|
|
66
|
-
{ key: "hours", value: t.hours, label:
|
|
67
|
-
{ key: "minutes", value: t.minutes, label:
|
|
68
|
-
{ key: "seconds", value: t.seconds, label:
|
|
69
|
-
];
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
s.key
|
|
89
|
-
)
|
|
90
|
-
);
|
|
91
|
-
}
|
|
64
|
+
const m = [], I = [
|
|
65
|
+
{ key: "days", value: t.days, label: i.days },
|
|
66
|
+
{ key: "hours", value: t.hours, label: i.hours },
|
|
67
|
+
{ key: "minutes", value: t.minutes, label: i.minutes },
|
|
68
|
+
{ key: "seconds", value: t.seconds, label: i.seconds }
|
|
69
|
+
], D = (r) => S[r.key] && (!k || r.value > 0 || r.key === "seconds"), f = I.filter(D);
|
|
70
|
+
f.forEach((r, U) => {
|
|
71
|
+
const B = d && U < f.length - 1;
|
|
72
|
+
m.push(
|
|
73
|
+
/* @__PURE__ */ a.jsx(
|
|
74
|
+
N,
|
|
75
|
+
{
|
|
76
|
+
digit: r.value,
|
|
77
|
+
title: r.label ?? "",
|
|
78
|
+
size: e,
|
|
79
|
+
color: l,
|
|
80
|
+
animation: g,
|
|
81
|
+
digitFormat: w,
|
|
82
|
+
showSeparator: B,
|
|
83
|
+
separator: p
|
|
84
|
+
},
|
|
85
|
+
r.key
|
|
86
|
+
)
|
|
87
|
+
);
|
|
92
88
|
});
|
|
93
|
-
const E = () => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
flexDirection: "row",
|
|
111
|
-
gap: h ? 0 : 2,
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
justifyContent: "center",
|
|
114
|
-
flexWrap: "wrap"
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
}, o = r ? {
|
|
118
|
-
xs: r.xs || e,
|
|
119
|
-
sm: r.sm || e,
|
|
120
|
-
md: r.md || e,
|
|
121
|
-
lg: r.lg || e,
|
|
122
|
-
xl: r.xl || e
|
|
89
|
+
const E = () => u === "vertical" ? { flexDirection: "column", gap: 2, alignItems: "center" } : u === "grid" ? {
|
|
90
|
+
display: "grid",
|
|
91
|
+
gridTemplateColumns: `repeat(${m.length}, 1fr)`,
|
|
92
|
+
gap: 2,
|
|
93
|
+
justifyItems: "center"
|
|
94
|
+
} : {
|
|
95
|
+
flexDirection: "row",
|
|
96
|
+
gap: d ? 0 : 2,
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
flexWrap: "wrap"
|
|
100
|
+
}, s = n ? {
|
|
101
|
+
xs: n.xs ?? e,
|
|
102
|
+
sm: n.sm ?? e,
|
|
103
|
+
md: n.md ?? e,
|
|
104
|
+
lg: n.lg ?? e,
|
|
105
|
+
xl: n.xl ?? e
|
|
123
106
|
} : void 0;
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
|
|
107
|
+
return /* @__PURE__ */ a.jsx(
|
|
108
|
+
y,
|
|
126
109
|
{
|
|
127
110
|
sx: {
|
|
128
111
|
width: "fit-content",
|
|
129
112
|
...E(),
|
|
130
|
-
...
|
|
131
|
-
...
|
|
113
|
+
...h,
|
|
114
|
+
...s && {
|
|
132
115
|
// Apply responsive sizing if provided
|
|
133
116
|
"@media (max-width: 600px)": {
|
|
134
117
|
"& .MuiTypography-h3": {
|
|
135
|
-
fontSize:
|
|
118
|
+
fontSize: s.xs === "small" ? "1.5rem" : s.xs === "large" ? "3.5rem" : "2.5rem"
|
|
136
119
|
}
|
|
137
120
|
},
|
|
138
121
|
"@media (min-width: 600px) and (max-width: 960px)": {
|
|
139
122
|
"& .MuiTypography-h3": {
|
|
140
|
-
fontSize:
|
|
123
|
+
fontSize: s.sm === "small" ? "1.5rem" : s.sm === "large" ? "3.5rem" : "2.5rem"
|
|
141
124
|
}
|
|
142
125
|
}
|
|
143
126
|
}
|
|
144
127
|
},
|
|
145
128
|
role: "timer",
|
|
146
|
-
"aria-label": `${
|
|
129
|
+
"aria-label": `${c} - ${t.days} days, ${t.hours} hours, ${t.minutes} minutes, ${t.seconds} seconds remaining`,
|
|
147
130
|
children: m
|
|
148
131
|
}
|
|
149
132
|
);
|