@solostylist/ui-kit 1.0.111 → 1.0.112
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/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +7 -4
- package/dist/hooks/use-count-down.d.ts +71 -0
- package/dist/hooks/use-count-down.js +77 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +135 -130
- package/dist/s-category-card/index.d.ts +2 -0
- package/dist/s-category-card/index.js +4 -0
- package/dist/s-category-card/package.json +5 -0
- package/dist/s-category-card/s-category-card.d.ts +32 -0
- package/dist/s-category-card/s-category-card.js +103 -0
- package/dist/s-countdown/index.d.ts +3 -0
- package/dist/s-countdown/index.js +5 -0
- package/dist/s-countdown/package.json +5 -0
- package/dist/s-countdown/s-count-down.d.ts +118 -0
- package/dist/s-countdown/s-count-down.js +248 -0
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { useDialog as
|
|
2
|
-
import { usePopover as
|
|
1
|
+
import { useDialog as m } from "./use-dialog.js";
|
|
2
|
+
import { usePopover as t } from "./use-popover.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { useScrollAnimation as f } from "./use-scroll-animation.js";
|
|
3
5
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
m as useDialog,
|
|
7
|
+
t as usePopover,
|
|
8
|
+
f as useScrollAnimation
|
|
6
9
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time left object structure
|
|
3
|
+
*/
|
|
4
|
+
export interface TimeLeft {
|
|
5
|
+
days: number;
|
|
6
|
+
hours: number;
|
|
7
|
+
minutes: number;
|
|
8
|
+
seconds: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Props for useCountDown hook
|
|
12
|
+
*/
|
|
13
|
+
export interface UseCountDownProps {
|
|
14
|
+
/** Target date timestamp in milliseconds */
|
|
15
|
+
expireDate: number;
|
|
16
|
+
/** Callback fired when countdown reaches zero */
|
|
17
|
+
onComplete?: () => void;
|
|
18
|
+
/** Callback fired on each tick (every second) */
|
|
19
|
+
onTick?: (timeLeft: TimeLeft) => void;
|
|
20
|
+
/** Callback fired when countdown starts */
|
|
21
|
+
onStart?: () => void;
|
|
22
|
+
/** Whether the countdown is paused */
|
|
23
|
+
paused?: boolean;
|
|
24
|
+
/** Custom interval in milliseconds (default: 1000) */
|
|
25
|
+
interval?: number;
|
|
26
|
+
/** Whether to automatically start the countdown */
|
|
27
|
+
autoStart?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Return type for useCountDown hook
|
|
31
|
+
*/
|
|
32
|
+
export interface UseCountDownReturn {
|
|
33
|
+
/** Current time left */
|
|
34
|
+
timeLeft: TimeLeft;
|
|
35
|
+
/** Whether the countdown has expired */
|
|
36
|
+
isExpired: boolean;
|
|
37
|
+
/** Whether the countdown is currently running */
|
|
38
|
+
isRunning: boolean;
|
|
39
|
+
/** Whether the countdown is paused */
|
|
40
|
+
isPaused: boolean;
|
|
41
|
+
/** Start the countdown */
|
|
42
|
+
start: () => void;
|
|
43
|
+
/** Pause the countdown */
|
|
44
|
+
pause: () => void;
|
|
45
|
+
/** Resume the countdown */
|
|
46
|
+
resume: () => void;
|
|
47
|
+
/** Reset the countdown to initial state */
|
|
48
|
+
reset: () => void;
|
|
49
|
+
/** Get the total duration in milliseconds */
|
|
50
|
+
totalDuration: number;
|
|
51
|
+
/** Get the elapsed time in milliseconds */
|
|
52
|
+
elapsedTime: number;
|
|
53
|
+
/** Get the progress as a percentage (0-100) */
|
|
54
|
+
progress: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Enhanced countdown hook with comprehensive features
|
|
58
|
+
*
|
|
59
|
+
* Features:
|
|
60
|
+
* - Pause/resume functionality
|
|
61
|
+
* - Event callbacks (onComplete, onTick, onStart)
|
|
62
|
+
* - Custom intervals
|
|
63
|
+
* - Progress tracking
|
|
64
|
+
* - Manual start/stop controls
|
|
65
|
+
* - Expiration detection
|
|
66
|
+
*
|
|
67
|
+
* @param props - UseCountDownProps
|
|
68
|
+
* @returns UseCountDownReturn - Hook return value with time data and controls
|
|
69
|
+
*/
|
|
70
|
+
declare const useCountDown: ({ expireDate, onComplete, onTick, onStart, paused, interval, autoStart, }: UseCountDownProps) => UseCountDownReturn;
|
|
71
|
+
export default useCountDown;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { useState as o, useRef as c, useEffect as u, useCallback as f, useMemo as p } from "react";
|
|
2
|
+
const z = {
|
|
3
|
+
days: 0,
|
|
4
|
+
hours: 0,
|
|
5
|
+
minutes: 0,
|
|
6
|
+
seconds: 0
|
|
7
|
+
}, J = ({
|
|
8
|
+
expireDate: a,
|
|
9
|
+
onComplete: T,
|
|
10
|
+
onTick: L,
|
|
11
|
+
onStart: M,
|
|
12
|
+
paused: e = !1,
|
|
13
|
+
interval: S = 1e3,
|
|
14
|
+
autoStart: R = !0
|
|
15
|
+
}) => {
|
|
16
|
+
const [A, j] = o(z), [w, k] = o(!1), [g, i] = o(R && !e), [x, l] = o(e), [t, q] = o(null), s = c(null), I = c(T), E = c(L), v = c(M), y = c(!1), C = c(!1);
|
|
17
|
+
u(() => {
|
|
18
|
+
I.current = T;
|
|
19
|
+
}, [T]), u(() => {
|
|
20
|
+
E.current = L;
|
|
21
|
+
}, [L]), u(() => {
|
|
22
|
+
v.current = M;
|
|
23
|
+
}, [M]);
|
|
24
|
+
const m = f(() => {
|
|
25
|
+
const r = (/* @__PURE__ */ new Date()).getTime(), n = a - r;
|
|
26
|
+
return n < 0 ? { timeLeft: z, expired: !0 } : {
|
|
27
|
+
timeLeft: {
|
|
28
|
+
days: Math.floor(n / (1e3 * 60 * 60 * 24)),
|
|
29
|
+
hours: Math.floor(n % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)),
|
|
30
|
+
minutes: Math.floor(n % (1e3 * 60 * 60) / (1e3 * 60)),
|
|
31
|
+
seconds: Math.floor(n % (1e3 * 60) / 1e3)
|
|
32
|
+
},
|
|
33
|
+
expired: !1
|
|
34
|
+
};
|
|
35
|
+
}, [a]), h = f(() => {
|
|
36
|
+
const { timeLeft: r, expired: n } = m();
|
|
37
|
+
j(r), k(n), E.current && E.current(r), n && !C.current && (C.current = !0, i(!1), I.current && I.current());
|
|
38
|
+
}, [m]), B = f(() => {
|
|
39
|
+
!y.current && v.current && (v.current(), y.current = !0), i(!0), l(!1), t || q((/* @__PURE__ */ new Date()).getTime());
|
|
40
|
+
}, [t]), D = f(() => {
|
|
41
|
+
i(!1), l(!0);
|
|
42
|
+
}, []), P = f(() => {
|
|
43
|
+
i(!0), l(!1);
|
|
44
|
+
}, []), F = f(() => {
|
|
45
|
+
i(R && !e), l(e), k(!1), q(null), y.current = !1, C.current = !1;
|
|
46
|
+
const { timeLeft: r } = m();
|
|
47
|
+
j(r);
|
|
48
|
+
}, [R, e, m]);
|
|
49
|
+
u(() => {
|
|
50
|
+
e ? D() : x && !e && P();
|
|
51
|
+
}, [e, x, D, P]), u(() => (g && !w ? s.current = setInterval(h, S) : s.current && (clearInterval(s.current), s.current = null), () => {
|
|
52
|
+
s.current && (clearInterval(s.current), s.current = null);
|
|
53
|
+
}), [g, w, S, h]), u(() => {
|
|
54
|
+
h();
|
|
55
|
+
}, [h]);
|
|
56
|
+
const d = p(() => t ? Math.max(0, a - t) : 0, [a, t]), b = p(() => {
|
|
57
|
+
if (!t) return 0;
|
|
58
|
+
const r = (/* @__PURE__ */ new Date()).getTime();
|
|
59
|
+
return Math.max(0, r - t);
|
|
60
|
+
}, [t]), G = p(() => d === 0 ? 0 : Math.min(100, Math.max(0, b / d * 100)), [b, d]);
|
|
61
|
+
return {
|
|
62
|
+
timeLeft: A,
|
|
63
|
+
isExpired: w,
|
|
64
|
+
isRunning: g,
|
|
65
|
+
isPaused: x,
|
|
66
|
+
start: B,
|
|
67
|
+
pause: D,
|
|
68
|
+
resume: P,
|
|
69
|
+
reset: F,
|
|
70
|
+
totalDuration: d,
|
|
71
|
+
elapsedTime: b,
|
|
72
|
+
progress: G
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
J as default
|
|
77
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export { default as SLazyImage } from './s-lazy-image/index';
|
|
|
101
101
|
export type { SLazyImageProps } from './s-lazy-image/index';
|
|
102
102
|
export { default as SImageComparison } from './s-image-comparison/index';
|
|
103
103
|
export type { SImageComparisonProps } from './s-image-comparison/index';
|
|
104
|
+
export { default as SCategoryCard } from './s-category-card/index';
|
|
105
|
+
export type { SCategoryCardProps } from './s-category-card/index';
|
|
104
106
|
export { default as SRadialPulseAnimate } from './s-radial-pulse-animate/index';
|
|
105
107
|
export type { SRadialPulseAnimateProps } from './s-radial-pulse-animate/index';
|
|
106
108
|
export { default as SRating } from './s-rating/index';
|
package/dist/main.js
CHANGED
|
@@ -1,148 +1,153 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as a } from "./s-accordion/s-accordion.js";
|
|
2
|
+
import { default as l } from "./s-action-overlay/s-action-overlay.js";
|
|
3
3
|
import { default as s } from "./s-autocomplete/s-autocomplete.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
4
|
+
import { default as x } from "./s-avatar/s-avatar.js";
|
|
5
|
+
import { default as d } from "./s-button/s-button.js";
|
|
6
|
+
import { default as i } from "./s-button-link/s-button-link.js";
|
|
7
|
+
import { default as g } from "./s-carousel/s-carousel.js";
|
|
8
|
+
import { default as T } from "./s-chat-input/s-chat-input.js";
|
|
9
9
|
import { default as v } from "./s-chat-message/s-chat-message.js";
|
|
10
|
-
import { default as
|
|
10
|
+
import { default as D } from "./s-text-editor/s-text-editor.js";
|
|
11
11
|
import "./s-text-editor/s-text-editor-toolbar.js";
|
|
12
|
-
import { default as
|
|
12
|
+
import { default as M } from "./s-checkbox/s-checkbox.js";
|
|
13
13
|
import { default as I } from "./s-chip/s-chip.js";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { DialogConfirmProvider as B, default as
|
|
17
|
-
import { DialogMessageProvider as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
14
|
+
import { default as k } from "./s-chips/s-chips.js";
|
|
15
|
+
import { default as F } from "./s-data-table/s-data-table.js";
|
|
16
|
+
import { DialogConfirmProvider as B, default as z, useDialogConfirm as E } from "./s-dialog-confirm/s-dialog-confirm.js";
|
|
17
|
+
import { DialogMessageProvider as w, default as G, useDialogMessage as N } from "./s-dialog-message/s-dialog-message.js";
|
|
18
|
+
import { default as K } from "./s-error/s-error.js";
|
|
19
|
+
import { default as V } from "./s-empty/s-empty.js";
|
|
20
|
+
import { default as H } from "./s-flex-box/s-flex-box.js";
|
|
21
|
+
import { default as Q } from "./s-dialog/s-dialog.js";
|
|
22
|
+
import { default as W } from "./s-file-dropzone/s-file-dropzone.js";
|
|
23
|
+
import { default as Y } from "./s-file-icon/s-file-icon.js";
|
|
24
|
+
import { default as _ } from "./s-i18n-provider/s-i18n-provider.js";
|
|
25
|
+
import { default as ee } from "./s-icon-button/s-icon-button.js";
|
|
26
|
+
import { default as re } from "./s-label/s-label.js";
|
|
27
|
+
import { default as ae } from "./s-multi-select/s-multi-select.js";
|
|
28
|
+
import { default as le } from "./s-no-ssr/s-no-ssr.js";
|
|
29
29
|
import { default as se } from "./s-text-field/s-text-field.js";
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as ve, SnackbarMessageProvider as
|
|
36
|
-
import { default as
|
|
30
|
+
import { default as xe } from "./s-pagination/s-pagination.js";
|
|
31
|
+
import { default as de } from "./s-select/s-select.js";
|
|
32
|
+
import { default as ie } from "./s-skeleton/s-skeleton.js";
|
|
33
|
+
import { default as ge } from "./s-tip/s-tip.js";
|
|
34
|
+
import { default as Te } from "./s-text-truncation/s-text-truncation.js";
|
|
35
|
+
import { default as ve, SnackbarMessageProvider as Pe, useSnackbarMessage as De } from "./s-snackbar-message/s-snackbar-message.js";
|
|
36
|
+
import { default as Me } from "./s-form/s-form.js";
|
|
37
37
|
import { SSmartTextField as Ie } from "./s-smart-text-field/s-smart-text-field.js";
|
|
38
|
-
import { SCopilotKitProvider as
|
|
39
|
-
import { SStripeCVC as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { MediaItem as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
38
|
+
import { SCopilotKitProvider as ke } from "./s-copilot-kit-provider/s-copilot-kit-provider.js";
|
|
39
|
+
import { SStripeCVC as Fe, SStripeExpiry as Ae, SStripeNumber as Be, StripeTextField as ze } from "./s-stripe/s-stripe.js";
|
|
40
|
+
import { default as Re } from "./s-theme-provider/s-theme-provider.js";
|
|
41
|
+
import { default as Ge } from "./s-datetime-picker/s-datetime-picker.js";
|
|
42
|
+
import { default as je } from "./s-date-picker/s-date-picker.js";
|
|
43
|
+
import { default as Oe } from "./s-localization-provider/s-localization-provider.js";
|
|
44
|
+
import { default as qe } from "./s-gradient-icon/s-gradient-icon.js";
|
|
45
|
+
import { default as Je } from "./s-glow-button/s-glow-button.js";
|
|
46
|
+
import { default as Ue } from "./s-moving-border/s-moving-border.js";
|
|
47
|
+
import { default as Xe } from "./s-scroll-reveal/s-scroll-reveal.js";
|
|
48
|
+
import { default as Ze } from "./s-spotlight-cursor/s-spotlight-cursor.js";
|
|
49
|
+
import { default as $e } from "./s-copyable-text/s-copyable-text.js";
|
|
50
|
+
import { MediaItem as oo, default as ro } from "./s-interactive-gallery/s-interactive-gallery.js";
|
|
51
|
+
import { default as ao } from "./s-image-modal/s-image-modal.js";
|
|
52
|
+
import { default as lo } from "./s-lazy-image/s-lazy-image.js";
|
|
53
53
|
import { default as so } from "./s-image-comparison/s-image-comparison.js";
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
54
|
+
import { default as xo } from "./s-category-card/s-category-card.js";
|
|
55
|
+
import { default as uo } from "./s-radial-pulse-animate/s-radial-pulse-animate.js";
|
|
56
|
+
import { default as no } from "./s-rating/s-rating.js";
|
|
57
|
+
import { default as co } from "./s-review/s-review.js";
|
|
58
|
+
import { default as Co } from "./s-tabs/s-tabs.js";
|
|
59
|
+
import { default as Po } from "./s-tabs/s-tab.js";
|
|
60
|
+
import { default as bo } from "./s-tabs/s-tab-panel.js";
|
|
61
|
+
import { default as yo } from "./s-text-shimmer/s-text-shimmer.js";
|
|
62
|
+
import { default as ho } from "./s-typewriter-text/s-typewriter-text.js";
|
|
63
|
+
import { useDialog as Lo } from "./hooks/use-dialog.js";
|
|
64
|
+
import { usePopover as Ao } from "./hooks/use-popover.js";
|
|
65
|
+
import "react";
|
|
66
|
+
import { useScrollAnimation as zo } from "./hooks/use-scroll-animation.js";
|
|
67
|
+
import { formatDatePosted as Ro } from "./utils/dayjs.js";
|
|
68
|
+
import { bytesToSize as Go } from "./utils/bytes-to-size.js";
|
|
69
|
+
import { LogLevel as jo, Logger as Ko, createLogger as Oo, logger as Vo } from "./utils/logger.js";
|
|
70
|
+
import { default as Ho } from "dayjs";
|
|
68
71
|
export {
|
|
69
72
|
B as DialogConfirmProvider,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
w as DialogMessageProvider,
|
|
74
|
+
jo as LogLevel,
|
|
75
|
+
Ko as Logger,
|
|
76
|
+
oo as MediaItem,
|
|
77
|
+
a as SAccordion,
|
|
78
|
+
l as SActionOverlay,
|
|
76
79
|
s as SAutocomplete,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
x as SAvatar,
|
|
81
|
+
d as SButton,
|
|
82
|
+
i as SButtonLink,
|
|
83
|
+
g as SCarousel,
|
|
84
|
+
xo as SCategoryCard,
|
|
85
|
+
T as SChatInput,
|
|
82
86
|
v as SChatMessage,
|
|
83
|
-
|
|
87
|
+
M as SCheckbox,
|
|
84
88
|
I as SChip,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
k as SChips,
|
|
90
|
+
ke as SCopilotKitProvider,
|
|
91
|
+
$e as SCopyableText,
|
|
92
|
+
F as SDataTable,
|
|
93
|
+
je as SDatePicker,
|
|
94
|
+
Ge as SDateTimePicker,
|
|
95
|
+
Q as SDialog,
|
|
96
|
+
z as SDialogConfirm,
|
|
97
|
+
G as SDialogMessage,
|
|
98
|
+
V as SEmpty,
|
|
99
|
+
K as SError,
|
|
100
|
+
W as SFileDropzone,
|
|
101
|
+
Y as SFileIcon,
|
|
102
|
+
H as SFlexBox,
|
|
103
|
+
Me as SForm,
|
|
104
|
+
Je as SGlowButton,
|
|
105
|
+
qe as SGradientIcon,
|
|
106
|
+
_ as SI18nProvider,
|
|
107
|
+
ee as SIconButton,
|
|
104
108
|
so as SImageComparison,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
109
|
+
ao as SImageModal,
|
|
110
|
+
ro as SInteractiveGallery,
|
|
111
|
+
re as SLabel,
|
|
112
|
+
lo as SLazyImage,
|
|
113
|
+
Oe as SLocalizationProvider,
|
|
114
|
+
Ue as SMovingBorder,
|
|
115
|
+
ae as SMultiSelect,
|
|
116
|
+
le as SNoSsr,
|
|
117
|
+
xe as SPagination,
|
|
118
|
+
uo as SRadialPulseAnimate,
|
|
119
|
+
no as SRating,
|
|
120
|
+
co as SReview,
|
|
121
|
+
Xe as SScrollReveal,
|
|
122
|
+
de as SSelect,
|
|
123
|
+
ie as SSkeleton,
|
|
120
124
|
Ie as SSmartTextField,
|
|
121
125
|
ve as SSnackbarMessage,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
Ze as SSpotlightCursor,
|
|
127
|
+
Fe as SStripeCVC,
|
|
128
|
+
Ae as SStripeExpiry,
|
|
125
129
|
Be as SStripeNumber,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
Po as STab,
|
|
131
|
+
bo as STabPanel,
|
|
132
|
+
Co as STabs,
|
|
133
|
+
D as STextEditor,
|
|
130
134
|
se as STextField,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
135
|
+
yo as STextShimmer,
|
|
136
|
+
Te as STextTruncation,
|
|
137
|
+
Re as SThemeProvider,
|
|
138
|
+
ge as STip,
|
|
139
|
+
ho as STypewriterText,
|
|
140
|
+
Pe as SnackbarMessageProvider,
|
|
141
|
+
ze as StripeTextField,
|
|
142
|
+
Go as bytesToSize,
|
|
143
|
+
Oo as createLogger,
|
|
144
|
+
Ho as dayjs,
|
|
145
|
+
Ro as formatDatePosted,
|
|
146
|
+
Vo as logger,
|
|
147
|
+
Lo as useDialog,
|
|
148
|
+
E as useDialogConfirm,
|
|
149
|
+
N as useDialogMessage,
|
|
150
|
+
Ao as usePopover,
|
|
151
|
+
zo as useScrollAnimation,
|
|
152
|
+
De as useSnackbarMessage
|
|
148
153
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
export declare const Wrapper: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme> & {
|
|
4
|
+
disableHoverEffect?: boolean;
|
|
5
|
+
hoverScale?: number;
|
|
6
|
+
}, {}, {}>;
|
|
7
|
+
export declare const CategoryTitle: import('@emotion/styled').StyledComponent<import('@mui/system').BoxOwnProps<Theme> & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@mui/system').BoxOwnProps<Theme>> & import('@mui/system').MUIStyledCommonProps<Theme> & {
|
|
8
|
+
titlePosition?: "bottom" | "top" | "center";
|
|
9
|
+
titleAlignment?: "left" | "center" | "right";
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
export interface SCategoryCardProps {
|
|
12
|
+
image: string;
|
|
13
|
+
title: string;
|
|
14
|
+
width?: number | string;
|
|
15
|
+
height?: number | string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
titlePosition?: 'bottom' | 'top' | 'center';
|
|
18
|
+
titleAlignment?: 'left' | 'center' | 'right';
|
|
19
|
+
titleVariant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline';
|
|
20
|
+
titleColor?: string;
|
|
21
|
+
titleBackgroundColor?: string;
|
|
22
|
+
titleOpacity?: number;
|
|
23
|
+
borderRadius?: number | string;
|
|
24
|
+
disableHoverEffect?: boolean;
|
|
25
|
+
hoverScale?: number;
|
|
26
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
27
|
+
sx?: SxProps<Theme>;
|
|
28
|
+
titleSx?: SxProps<Theme>;
|
|
29
|
+
imageSx?: SxProps<Theme>;
|
|
30
|
+
}
|
|
31
|
+
declare const SCategoryCard: ({ image, title, width, height, alt, titlePosition, titleAlignment, titleVariant, titleColor, titleBackgroundColor, titleOpacity, borderRadius, disableHoverEffect, hoverScale, onClick, sx, titleSx, imageSx, }: SCategoryCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default SCategoryCard;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { j as r } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { styled as c, Box as i, Typography as v } from "@mui/material";
|
|
3
|
+
import C from "../s-lazy-image/s-lazy-image.js";
|
|
4
|
+
const F = c(i)(
|
|
5
|
+
({ disableHoverEffect: t = !1, hoverScale: o = 1.1 }) => ({
|
|
6
|
+
height: "100%",
|
|
7
|
+
cursor: "pointer",
|
|
8
|
+
overflow: "hidden",
|
|
9
|
+
borderRadius: 1,
|
|
10
|
+
position: "relative",
|
|
11
|
+
img: {
|
|
12
|
+
height: "100%",
|
|
13
|
+
objectFit: "cover",
|
|
14
|
+
transition: "all 0.3s",
|
|
15
|
+
objectPosition: "center center"
|
|
16
|
+
},
|
|
17
|
+
...!t && {
|
|
18
|
+
":hover": {
|
|
19
|
+
img: { transform: `scale(${o})` }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
), S = c(i)(({ titlePosition: t = "bottom", titleAlignment: o = "center" }) => ({
|
|
24
|
+
left: 10,
|
|
25
|
+
right: 10,
|
|
26
|
+
padding: 8,
|
|
27
|
+
textAlign: o,
|
|
28
|
+
position: "absolute",
|
|
29
|
+
transition: "all 0.3s",
|
|
30
|
+
...t === "bottom" && { bottom: 10 },
|
|
31
|
+
...t === "top" && { top: 10 },
|
|
32
|
+
...t === "center" && {
|
|
33
|
+
top: "50%",
|
|
34
|
+
transform: "translateY(-50%)"
|
|
35
|
+
}
|
|
36
|
+
})), B = ({
|
|
37
|
+
image: t,
|
|
38
|
+
title: o,
|
|
39
|
+
width: e = 250,
|
|
40
|
+
height: a = 250,
|
|
41
|
+
alt: l = "category",
|
|
42
|
+
titlePosition: p = "bottom",
|
|
43
|
+
titleAlignment: m = "center",
|
|
44
|
+
titleVariant: g = "body1",
|
|
45
|
+
titleColor: d,
|
|
46
|
+
titleBackgroundColor: b = "background.paper",
|
|
47
|
+
titleOpacity: f = 1,
|
|
48
|
+
borderRadius: s = 2,
|
|
49
|
+
disableHoverEffect: x = !1,
|
|
50
|
+
hoverScale: y = 1.1,
|
|
51
|
+
onClick: n,
|
|
52
|
+
sx: j,
|
|
53
|
+
titleSx: h,
|
|
54
|
+
imageSx: u
|
|
55
|
+
}) => /* @__PURE__ */ r.jsxs(
|
|
56
|
+
F,
|
|
57
|
+
{
|
|
58
|
+
disableHoverEffect: x,
|
|
59
|
+
hoverScale: y,
|
|
60
|
+
onClick: n,
|
|
61
|
+
sx: {
|
|
62
|
+
borderRadius: s,
|
|
63
|
+
cursor: n ? "pointer" : "default",
|
|
64
|
+
width: e,
|
|
65
|
+
height: a,
|
|
66
|
+
...j
|
|
67
|
+
},
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ r.jsx(
|
|
70
|
+
C,
|
|
71
|
+
{
|
|
72
|
+
src: t,
|
|
73
|
+
width: e,
|
|
74
|
+
height: a,
|
|
75
|
+
alt: l,
|
|
76
|
+
style: {
|
|
77
|
+
objectFit: "cover",
|
|
78
|
+
...u
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ r.jsx(
|
|
83
|
+
S,
|
|
84
|
+
{
|
|
85
|
+
titlePosition: p,
|
|
86
|
+
titleAlignment: m,
|
|
87
|
+
sx: {
|
|
88
|
+
borderRadius: s,
|
|
89
|
+
bgcolor: b,
|
|
90
|
+
opacity: f,
|
|
91
|
+
...h
|
|
92
|
+
},
|
|
93
|
+
children: /* @__PURE__ */ r.jsx(v, { variant: g, color: d, children: o })
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
export {
|
|
100
|
+
S as CategoryTitle,
|
|
101
|
+
F as Wrapper,
|
|
102
|
+
B as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props for individual count box component
|
|
5
|
+
*/
|
|
6
|
+
export interface SCountBoxProps {
|
|
7
|
+
/** The numeric value to display */
|
|
8
|
+
digit: number;
|
|
9
|
+
/** The label/title for this time unit */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Size variant for the count box */
|
|
12
|
+
size?: 'small' | 'medium' | 'large';
|
|
13
|
+
/** Color variant for the count box */
|
|
14
|
+
color?: 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
|
|
15
|
+
/** Animation type for value changes */
|
|
16
|
+
animation?: 'none' | 'fade' | 'slide';
|
|
17
|
+
/** Custom styling */
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
/** Custom digit styling */
|
|
20
|
+
digitSx?: SxProps<Theme>;
|
|
21
|
+
/** Custom title styling */
|
|
22
|
+
titleSx?: SxProps<Theme>;
|
|
23
|
+
/** Show separator after this box */
|
|
24
|
+
showSeparator?: boolean;
|
|
25
|
+
/** Custom separator element */
|
|
26
|
+
separator?: React.ReactNode;
|
|
27
|
+
/** Format for displaying the digit (e.g., '00' for zero-padding) */
|
|
28
|
+
digitFormat?: 'default' | 'padded';
|
|
29
|
+
/** Whether this count box is hidden */
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Individual count box component that displays a single time unit
|
|
34
|
+
*/
|
|
35
|
+
export declare const SCountBox: ({ digit, title, size, color, animation, sx, digitSx, titleSx, showSeparator, separator, digitFormat, hidden, }: SCountBoxProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
/**
|
|
37
|
+
* Props for the main countdown component
|
|
38
|
+
*/
|
|
39
|
+
export interface SCountDownProps {
|
|
40
|
+
/** Target date timestamp in milliseconds (from Date.getTime()) */
|
|
41
|
+
expireDate: number;
|
|
42
|
+
/** Size variant for all count boxes */
|
|
43
|
+
size?: 'small' | 'medium' | 'large';
|
|
44
|
+
/** Color theme for the countdown */
|
|
45
|
+
color?: 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'inherit';
|
|
46
|
+
/** Layout orientation */
|
|
47
|
+
layout?: 'horizontal' | 'vertical' | 'grid';
|
|
48
|
+
/** Animation type for value changes */
|
|
49
|
+
animation?: 'none' | 'fade' | 'slide';
|
|
50
|
+
/** Whether to show separators between units */
|
|
51
|
+
showSeparators?: boolean;
|
|
52
|
+
/** Custom separator element */
|
|
53
|
+
separator?: React.ReactNode;
|
|
54
|
+
/** Which time units to display */
|
|
55
|
+
units?: {
|
|
56
|
+
days?: boolean;
|
|
57
|
+
hours?: boolean;
|
|
58
|
+
minutes?: boolean;
|
|
59
|
+
seconds?: boolean;
|
|
60
|
+
};
|
|
61
|
+
/** Custom labels for time units */
|
|
62
|
+
labels?: {
|
|
63
|
+
days?: string;
|
|
64
|
+
hours?: string;
|
|
65
|
+
minutes?: string;
|
|
66
|
+
seconds?: string;
|
|
67
|
+
};
|
|
68
|
+
/** Format for displaying digits */
|
|
69
|
+
digitFormat?: 'default' | 'padded';
|
|
70
|
+
/** Callback fired when countdown reaches zero */
|
|
71
|
+
onComplete?: () => void;
|
|
72
|
+
/** Callback fired on each tick (every second) */
|
|
73
|
+
onTick?: (timeLeft: {
|
|
74
|
+
days: number;
|
|
75
|
+
hours: number;
|
|
76
|
+
minutes: number;
|
|
77
|
+
seconds: number;
|
|
78
|
+
}) => void;
|
|
79
|
+
/** Callback fired when countdown starts */
|
|
80
|
+
onStart?: () => void;
|
|
81
|
+
/** What to display when countdown is complete */
|
|
82
|
+
completedText?: React.ReactNode;
|
|
83
|
+
/** Whether to auto-hide completed units (e.g., hide days when 0) */
|
|
84
|
+
autoHideZeroUnits?: boolean;
|
|
85
|
+
/** Custom styling for the container */
|
|
86
|
+
sx?: SxProps<Theme>;
|
|
87
|
+
/** ARIA label for accessibility */
|
|
88
|
+
'aria-label'?: string;
|
|
89
|
+
/** Whether the countdown is paused */
|
|
90
|
+
paused?: boolean;
|
|
91
|
+
/** Responsive breakpoints for size changes */
|
|
92
|
+
responsive?: {
|
|
93
|
+
xs?: 'small' | 'medium' | 'large';
|
|
94
|
+
sm?: 'small' | 'medium' | 'large';
|
|
95
|
+
md?: 'small' | 'medium' | 'large';
|
|
96
|
+
lg?: 'small' | 'medium' | 'large';
|
|
97
|
+
xl?: 'small' | 'medium' | 'large';
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* SCountdown - A comprehensive countdown timer component with extensive customization options
|
|
102
|
+
*
|
|
103
|
+
* Features:
|
|
104
|
+
* - Multiple size variants and color themes
|
|
105
|
+
* - Flexible layout options (horizontal, vertical, grid)
|
|
106
|
+
* - Animation support for value changes
|
|
107
|
+
* - Customizable time units and labels
|
|
108
|
+
* - Auto-hide zero units option
|
|
109
|
+
* - Accessibility support with ARIA labels
|
|
110
|
+
* - Responsive design capabilities
|
|
111
|
+
* - Event callbacks for interaction
|
|
112
|
+
* - Pause/resume functionality
|
|
113
|
+
*
|
|
114
|
+
* @param props - SCountDownProps
|
|
115
|
+
* @returns JSX.Element - Countdown timer component
|
|
116
|
+
*/
|
|
117
|
+
declare const SCountdown: ({ expireDate, size, color, layout, animation, showSeparators, separator, units, labels, digitFormat, onComplete, onTick, onStart, completedText, autoHideZeroUnits, sx, "aria-label": ariaLabel, paused, responsive, }: SCountDownProps) => import("react/jsx-runtime").JSX.Element;
|
|
118
|
+
export default SCountdown;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { j as e } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
+
import { Typography as x, Fade as A, Slide as B } from "@mui/material";
|
|
3
|
+
import M from "../hooks/use-count-down.js";
|
|
4
|
+
import p from "../s-flex-box/s-flex-box.js";
|
|
5
|
+
const T = ({
|
|
6
|
+
digit: y = 0,
|
|
7
|
+
title: i = "",
|
|
8
|
+
size: m = "medium",
|
|
9
|
+
color: u = "inherit",
|
|
10
|
+
animation: h = "none",
|
|
11
|
+
sx: g,
|
|
12
|
+
digitSx: S,
|
|
13
|
+
titleSx: f,
|
|
14
|
+
showSeparator: r = !1,
|
|
15
|
+
separator: j = ":",
|
|
16
|
+
digitFormat: w = "default",
|
|
17
|
+
hidden: k = !1
|
|
18
|
+
}) => {
|
|
19
|
+
if (k) return null;
|
|
20
|
+
const v = (t) => w === "padded" ? t.toString().padStart(2, "0") : t.toString(), s = (() => {
|
|
21
|
+
switch (m) {
|
|
22
|
+
case "small":
|
|
23
|
+
return {
|
|
24
|
+
digit: { fontSize: "1.5rem", lineHeight: 1.2 },
|
|
25
|
+
title: { fontSize: "0.75rem", letterSpacing: "0.05em" }
|
|
26
|
+
};
|
|
27
|
+
case "large":
|
|
28
|
+
return {
|
|
29
|
+
digit: { fontSize: "3.5rem", lineHeight: 1.1 },
|
|
30
|
+
title: { fontSize: "1rem", letterSpacing: "0.1em" }
|
|
31
|
+
};
|
|
32
|
+
default:
|
|
33
|
+
return {
|
|
34
|
+
digit: { fontSize: "2.5rem", lineHeight: 1.15 },
|
|
35
|
+
title: { fontSize: "0.875rem", letterSpacing: "0.08em" }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
})(), l = v(y), o = /* @__PURE__ */ e.jsx(
|
|
39
|
+
x,
|
|
40
|
+
{
|
|
41
|
+
variant: "h3",
|
|
42
|
+
component: "span",
|
|
43
|
+
sx: {
|
|
44
|
+
fontWeight: 700,
|
|
45
|
+
color: u === "inherit" ? "text.primary" : `${u}.main`,
|
|
46
|
+
width: "70px",
|
|
47
|
+
...s.digit,
|
|
48
|
+
...S
|
|
49
|
+
},
|
|
50
|
+
children: l
|
|
51
|
+
}
|
|
52
|
+
), $ = /* @__PURE__ */ e.jsx(
|
|
53
|
+
x,
|
|
54
|
+
{
|
|
55
|
+
component: "span",
|
|
56
|
+
sx: {
|
|
57
|
+
color: "text.secondary",
|
|
58
|
+
fontWeight: 600,
|
|
59
|
+
textTransform: "uppercase",
|
|
60
|
+
display: "block",
|
|
61
|
+
mt: 0.5,
|
|
62
|
+
...s.title,
|
|
63
|
+
...f
|
|
64
|
+
},
|
|
65
|
+
children: i
|
|
66
|
+
}
|
|
67
|
+
), n = /* @__PURE__ */ e.jsxs(
|
|
68
|
+
p,
|
|
69
|
+
{
|
|
70
|
+
flexDirection: "column",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
sx: {
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
minWidth: "fit-content",
|
|
75
|
+
...g
|
|
76
|
+
},
|
|
77
|
+
children: [
|
|
78
|
+
h === "fade" ? /* @__PURE__ */ e.jsx(A, { in: !0, timeout: 300, children: /* @__PURE__ */ e.jsx("div", { children: o }) }, l) : h === "slide" ? /* @__PURE__ */ e.jsx(B, { in: !0, direction: "up", timeout: 300, children: /* @__PURE__ */ e.jsx("div", { children: o }) }, l) : o,
|
|
79
|
+
$
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
return r ? /* @__PURE__ */ e.jsxs(p, { alignItems: "center", children: [
|
|
84
|
+
n,
|
|
85
|
+
/* @__PURE__ */ e.jsx(
|
|
86
|
+
x,
|
|
87
|
+
{
|
|
88
|
+
variant: "h3",
|
|
89
|
+
sx: {
|
|
90
|
+
color: "text.secondary",
|
|
91
|
+
...s.digit,
|
|
92
|
+
lineHeight: 1,
|
|
93
|
+
alignSelf: "flex-start",
|
|
94
|
+
mt: 0.5
|
|
95
|
+
},
|
|
96
|
+
children: j
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] }) : n;
|
|
100
|
+
}, V = ({
|
|
101
|
+
expireDate: y,
|
|
102
|
+
size: i = "medium",
|
|
103
|
+
color: m = "inherit",
|
|
104
|
+
layout: u = "horizontal",
|
|
105
|
+
animation: h = "none",
|
|
106
|
+
showSeparators: g = !1,
|
|
107
|
+
separator: S = ":",
|
|
108
|
+
units: f = {
|
|
109
|
+
days: !0,
|
|
110
|
+
hours: !0,
|
|
111
|
+
minutes: !0,
|
|
112
|
+
seconds: !0
|
|
113
|
+
},
|
|
114
|
+
labels: r = {
|
|
115
|
+
days: "DAYS",
|
|
116
|
+
hours: "HOURS",
|
|
117
|
+
minutes: "MINS",
|
|
118
|
+
seconds: "SECS"
|
|
119
|
+
},
|
|
120
|
+
digitFormat: j = "default",
|
|
121
|
+
onComplete: w,
|
|
122
|
+
onTick: k,
|
|
123
|
+
onStart: v,
|
|
124
|
+
completedText: c = "Time is up!",
|
|
125
|
+
autoHideZeroUnits: s = !1,
|
|
126
|
+
sx: l,
|
|
127
|
+
"aria-label": o = "Countdown timer",
|
|
128
|
+
paused: $ = !1,
|
|
129
|
+
responsive: n
|
|
130
|
+
}) => {
|
|
131
|
+
const { timeLeft: t, isExpired: E } = M({
|
|
132
|
+
expireDate: y,
|
|
133
|
+
onComplete: w,
|
|
134
|
+
onTick: k,
|
|
135
|
+
onStart: v,
|
|
136
|
+
paused: $
|
|
137
|
+
});
|
|
138
|
+
if (E && c)
|
|
139
|
+
return /* @__PURE__ */ e.jsx(
|
|
140
|
+
p,
|
|
141
|
+
{
|
|
142
|
+
justifyContent: "center",
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
sx: { textAlign: "center", ...l },
|
|
145
|
+
role: "timer",
|
|
146
|
+
"aria-label": `${o} - completed`,
|
|
147
|
+
children: typeof c == "string" ? /* @__PURE__ */ e.jsx(
|
|
148
|
+
x,
|
|
149
|
+
{
|
|
150
|
+
variant: i === "large" ? "h4" : i === "small" ? "h6" : "h5",
|
|
151
|
+
color: m === "inherit" ? "text.primary" : `${m}.main`,
|
|
152
|
+
sx: { fontWeight: 600 },
|
|
153
|
+
children: c
|
|
154
|
+
}
|
|
155
|
+
) : c
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
const C = [], I = [
|
|
159
|
+
{ key: "days", value: t.days, label: r.days },
|
|
160
|
+
{ key: "hours", value: t.hours, label: r.hours },
|
|
161
|
+
{ key: "minutes", value: t.minutes, label: r.minutes },
|
|
162
|
+
{ key: "seconds", value: t.seconds, label: r.seconds }
|
|
163
|
+
];
|
|
164
|
+
I.forEach((a, D) => {
|
|
165
|
+
if (f[a.key] && (!s || a.value > 0 || a.key === "seconds")) {
|
|
166
|
+
const W = D === I.length - 1, H = g && !W && I.slice(D + 1).some(
|
|
167
|
+
(z) => f[z.key] && (!s || z.value > 0 || z.key === "seconds")
|
|
168
|
+
);
|
|
169
|
+
C.push(
|
|
170
|
+
/* @__PURE__ */ e.jsx(
|
|
171
|
+
T,
|
|
172
|
+
{
|
|
173
|
+
digit: a.value,
|
|
174
|
+
title: a.label || "",
|
|
175
|
+
size: i,
|
|
176
|
+
color: m,
|
|
177
|
+
animation: h,
|
|
178
|
+
digitFormat: j,
|
|
179
|
+
showSeparator: H,
|
|
180
|
+
separator: S
|
|
181
|
+
},
|
|
182
|
+
a.key
|
|
183
|
+
)
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
const b = () => {
|
|
188
|
+
switch (u) {
|
|
189
|
+
case "vertical":
|
|
190
|
+
return {
|
|
191
|
+
flexDirection: "column",
|
|
192
|
+
gap: 2,
|
|
193
|
+
alignItems: "center"
|
|
194
|
+
};
|
|
195
|
+
case "grid":
|
|
196
|
+
return {
|
|
197
|
+
display: "grid",
|
|
198
|
+
gridTemplateColumns: `repeat(${C.length}, 1fr)`,
|
|
199
|
+
gap: 2,
|
|
200
|
+
justifyItems: "center"
|
|
201
|
+
};
|
|
202
|
+
default:
|
|
203
|
+
return {
|
|
204
|
+
flexDirection: "row",
|
|
205
|
+
gap: g ? 0 : 2,
|
|
206
|
+
alignItems: "center",
|
|
207
|
+
justifyContent: "center",
|
|
208
|
+
flexWrap: "wrap"
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}, d = n ? {
|
|
212
|
+
xs: n.xs || i,
|
|
213
|
+
sm: n.sm || i,
|
|
214
|
+
md: n.md || i,
|
|
215
|
+
lg: n.lg || i,
|
|
216
|
+
xl: n.xl || i
|
|
217
|
+
} : void 0;
|
|
218
|
+
return /* @__PURE__ */ e.jsx(
|
|
219
|
+
p,
|
|
220
|
+
{
|
|
221
|
+
sx: {
|
|
222
|
+
width: "fit-content",
|
|
223
|
+
...b(),
|
|
224
|
+
...l,
|
|
225
|
+
...d && {
|
|
226
|
+
// Apply responsive sizing if provided
|
|
227
|
+
"@media (max-width: 600px)": {
|
|
228
|
+
"& .MuiTypography-h3": {
|
|
229
|
+
fontSize: d.xs === "small" ? "1.5rem" : d.xs === "large" ? "3.5rem" : "2.5rem"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"@media (min-width: 600px) and (max-width: 960px)": {
|
|
233
|
+
"& .MuiTypography-h3": {
|
|
234
|
+
fontSize: d.sm === "small" ? "1.5rem" : d.sm === "large" ? "3.5rem" : "2.5rem"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
role: "timer",
|
|
240
|
+
"aria-label": `${o} - ${t.days} days, ${t.hours} hours, ${t.minutes} minutes, ${t.seconds} seconds remaining`,
|
|
241
|
+
children: C
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
};
|
|
245
|
+
export {
|
|
246
|
+
T as SCountBox,
|
|
247
|
+
V as default
|
|
248
|
+
};
|