@overdoser/react-toolkit 0.20.0 → 0.22.0
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/AGENTS.md +2 -1
- package/CHANGELOG.md +41 -0
- package/components/Accordion/Accordion.js +160 -177
- package/components/Accordion/Accordion.module.scss.js +19 -35
- package/components/ActionButton/ActionButton.js +155 -209
- package/components/ActionButton/ActionButton.module.scss.js +24 -46
- package/components/ActionButton/CopyButton.js +52 -64
- package/components/Alert/Alert.js +93 -96
- package/components/Alert/Alert.module.scss.js +17 -32
- package/components/Avatar/Avatar.js +44 -55
- package/components/Avatar/Avatar.module.scss.js +22 -42
- package/components/Badge/Badge.js +15 -37
- package/components/Badge/Badge.module.scss.js +16 -30
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Breadcrumbs/Breadcrumbs.js +52 -48
- package/components/Breadcrumbs/Breadcrumbs.module.scss.js +9 -16
- package/components/Button/Button.js +35 -57
- package/components/Button/Button.module.scss.js +24 -46
- package/components/Card/Card.js +94 -131
- package/components/Card/Card.module.scss.js +34 -59
- package/components/Chart/AreaChart.d.ts +1 -1
- package/components/Chart/AreaChart.js +248 -249
- package/components/Chart/Axis.d.ts +2 -2
- package/components/Chart/Axis.js +34 -43
- package/components/Chart/BarChart.d.ts +1 -1
- package/components/Chart/BarChart.js +307 -348
- package/components/Chart/Chart.module.scss.js +31 -60
- package/components/Chart/ChartContainer.js +33 -41
- package/components/Chart/ChartLegend.d.ts +1 -1
- package/components/Chart/ChartLegend.js +31 -30
- package/components/Chart/ChartTooltip.d.ts +1 -1
- package/components/Chart/ChartTooltip.js +45 -40
- package/components/Chart/LineChart.d.ts +1 -1
- package/components/Chart/LineChart.js +220 -232
- package/components/Chart/PieChart.d.ts +1 -1
- package/components/Chart/PieChart.js +224 -240
- package/components/Chart/RadarChart.d.ts +1 -1
- package/components/Chart/RadarChart.js +166 -215
- package/components/Chart/Sparkline.js +73 -68
- package/components/Chart/TradingChart.d.ts +1 -1
- package/components/Chart/TradingChart.js +804 -701
- package/components/Chart/scales.js +28 -35
- package/components/Chart/trading/indicators.js +61 -62
- package/components/Chart/trading/period.js +46 -68
- package/components/Chart/useChartDimensions.js +30 -22
- package/components/Chip/Chip.js +98 -141
- package/components/Chip/Chip.module.scss.js +31 -58
- package/components/CodeBlock/CodeBlock.js +111 -119
- package/components/CodeBlock/CodeBlock.module.scss.js +22 -42
- package/components/CommandPalette/CommandPalette.js +387 -392
- package/components/CommandPalette/CommandPalette.module.scss.js +27 -48
- package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/components/ConfirmDialog/ConfirmDialog.js +184 -199
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +11 -20
- package/components/Divider/Divider.js +25 -36
- package/components/Divider/Divider.module.scss.js +16 -30
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +157 -164
- package/components/Draggable/Draggable.module.scss.js +9 -16
- package/components/Drawer/Drawer.js +104 -126
- package/components/Drawer/Drawer.module.scss.js +65 -118
- package/components/Dropdown/Dropdown.js +175 -234
- package/components/Dropdown/Dropdown.module.scss.js +28 -52
- package/components/Dropdown/DropdownItem.js +55 -58
- package/components/Dropdown/DropdownLabel.js +14 -11
- package/components/Dropdown/DropdownSeparator.js +13 -11
- package/components/Dropdown/dropdownContext.js +4 -5
- package/components/Dropdown/useContextMenu.js +27 -17
- package/components/Dropzone/Dropzone.js +99 -105
- package/components/Dropzone/Dropzone.module.scss.js +11 -20
- package/components/EmptyState/EmptyState.js +57 -54
- package/components/EmptyState/EmptyState.module.scss.js +13 -24
- package/components/Form/Form.d.ts +1 -1
- package/components/Form/Form.js +31 -34
- package/components/Form/Form.module.scss.js +15 -28
- package/components/Form/FormField.d.ts +1 -1
- package/components/Form/FormField.js +71 -75
- package/components/Form/FormRow.d.ts +1 -1
- package/components/Form/FormRow.js +11 -8
- package/components/Form/formFieldDefaults.js +4 -5
- package/components/ImageViewer/ImageViewer.js +312 -201
- package/components/ImageViewer/ImageViewer.module.scss.js +25 -46
- package/components/ImageViewer/useZoomPan.js +206 -137
- package/components/Kbd/Kbd.js +24 -21
- package/components/Kbd/Kbd.module.scss.js +9 -16
- package/components/KeyValueList/KeyValueList.js +119 -123
- package/components/KeyValueList/KeyValueList.module.scss.js +22 -42
- package/components/Link/Link.js +45 -59
- package/components/Link/Link.module.scss.js +9 -15
- package/components/List/List.js +22 -46
- package/components/List/List.module.scss.js +11 -20
- package/components/Loader/Loader.js +152 -182
- package/components/Loader/Loader.module.scss.js +39 -69
- package/components/Modal/Modal.js +93 -105
- package/components/Modal/Modal.module.scss.js +17 -32
- package/components/PageHeader/PageHeader.js +79 -73
- package/components/PageHeader/PageHeader.module.scss.js +22 -42
- package/components/Pagination/Pagination.js +62 -83
- package/components/Pagination/Pagination.module.scss.js +12 -22
- package/components/Pagination/paginationRange.js +15 -22
- package/components/Popover/Popover.js +110 -134
- package/components/Popover/Popover.module.scss.js +11 -20
- package/components/ProgressBar/ProgressBar.d.ts +15 -1
- package/components/ProgressBar/ProgressBar.js +56 -89
- package/components/ProgressBar/ProgressBar.module.scss.js +28 -50
- package/components/RelativeTime/RelativeTime.js +36 -43
- package/components/RelativeTime/RelativeTime.module.scss.js +3 -7
- package/components/SegmentedControl/SegmentedControl.js +93 -129
- package/components/SegmentedControl/SegmentedControl.module.scss.js +20 -38
- package/components/Skeleton/Skeleton.js +36 -50
- package/components/Skeleton/Skeleton.module.scss.js +14 -24
- package/components/Spinner/Spinner.js +25 -25
- package/components/Spinner/Spinner.module.scss.js +11 -19
- package/components/SplitButton/SplitButton.js +149 -196
- package/components/SplitButton/SplitButton.module.scss.js +30 -56
- package/components/SplitPane/SplitPane.js +134 -170
- package/components/SplitPane/SplitPane.module.scss.js +13 -24
- package/components/StatCard/StatCard.js +132 -125
- package/components/StatCard/StatCard.module.scss.js +41 -71
- package/components/StatusDot/StatusDot.js +28 -39
- package/components/StatusDot/StatusDot.module.scss.js +17 -31
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/Table.js +381 -451
- package/components/Table/Table.module.scss.js +41 -80
- package/components/Table/useTableSort.js +51 -42
- package/components/Tabs/Tabs.js +109 -161
- package/components/Tabs/Tabs.module.scss.js +27 -52
- package/components/ThemeToggle/ThemeToggle.js +122 -98
- package/components/ThemeToggle/ThemeToggle.module.scss.js +12 -22
- package/components/Timeline/GanttTimeline.js +357 -318
- package/components/Timeline/GanttTimeline.module.scss.js +28 -54
- package/components/Timeline/HistoryTimeline.js +486 -450
- package/components/Timeline/HistoryTimeline.module.scss.js +30 -58
- package/components/Timeline/Timeline.module.scss.js +75 -140
- package/components/Timeline/TimelineShared.d.ts +7 -7
- package/components/Timeline/TimelineShared.js +288 -279
- package/components/Timeline/TraceEventDetails.d.ts +3 -3
- package/components/Timeline/TraceEventDetails.js +244 -177
- package/components/Timeline/TraceTimeline.js +823 -783
- package/components/Timeline/TraceTimeline.module.scss.js +97 -188
- package/components/Timeline/historyLayout.js +336 -263
- package/components/Timeline/timelineCore.js +208 -183
- package/components/Timeline/traceEvent.js +59 -61
- package/components/Timeline/traceLayout.js +101 -90
- package/components/Timeline/useTimeline.js +76 -79
- package/components/Timer/Timer.js +190 -156
- package/components/Timer/Timer.module.scss.js +28 -54
- package/components/Toast/Toast.d.ts +1 -1
- package/components/Toast/Toast.js +128 -128
- package/components/Toast/Toast.module.scss.js +36 -61
- package/components/Toast/toastStore.js +58 -62
- package/components/ToggleIconButton/ToggleIconButton.js +36 -58
- package/components/ToggleIconButton/ToggleIconButton.module.scss.js +14 -26
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +76 -85
- package/components/Tooltip/Tooltip.module.scss.js +16 -29
- package/components/Typography/Typography.js +10 -35
- package/components/Typography/Typography.module.scss.js +29 -52
- package/components/inputs/Checkbox/Checkbox.js +27 -51
- package/components/inputs/Checkbox/Checkbox.module.scss.js +9 -16
- package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
- package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +16 -30
- package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
- package/components/inputs/DatePicker/CalendarPanel.js +263 -286
- package/components/inputs/DatePicker/CalendarPanel.module.scss.js +22 -40
- package/components/inputs/DatePicker/DatePicker.js +115 -142
- package/components/inputs/DatePicker/DatePicker.module.scss.js +13 -24
- package/components/inputs/DatePicker/dateUtils.js +32 -41
- package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
- package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +19 -36
- package/components/inputs/DateTimePicker/DateTimeSegments.js +273 -252
- package/components/inputs/DateTimePicker/TimeField.d.ts +1 -1
- package/components/inputs/DateTimePicker/TimeField.js +131 -132
- package/components/inputs/DateTimePicker/timeZoneUtils.js +95 -92
- package/components/inputs/Input/Input.js +98 -109
- package/components/inputs/Input/Input.module.scss.js +14 -26
- package/components/inputs/NumberInput/NumberInput.js +112 -132
- package/components/inputs/NumberInput/NumberInput.module.scss.js +13 -24
- package/components/inputs/Radio/Radio.js +50 -73
- package/components/inputs/Radio/Radio.module.scss.js +8 -14
- package/components/inputs/SearchInput/SearchInput.js +98 -115
- package/components/inputs/SearchInput/SearchInput.module.scss.js +7 -12
- package/components/inputs/Select/Select.d.ts +55 -3
- package/components/inputs/Select/Select.js +696 -682
- package/components/inputs/Select/Select.module.scss.js +49 -72
- package/components/inputs/Slider/Slider.js +97 -128
- package/components/inputs/Slider/Slider.module.scss.js +8 -14
- package/components/inputs/Switch/Switch.js +11 -8
- package/components/inputs/Textarea/Textarea.js +42 -58
- package/components/inputs/Textarea/Textarea.module.scss.js +13 -24
- package/hooks/useClickOutside.js +17 -14
- package/hooks/useDebouncedValue.js +13 -14
- package/hooks/useElementSize.js +27 -22
- package/hooks/useEscapeLayer.js +28 -29
- package/hooks/useFocusTrap.js +27 -38
- package/hooks/useKeyboard.js +76 -64
- package/hooks/useMediaQuery.js +10 -15
- package/hooks/useNow.js +28 -33
- package/hooks/usePersistedState.js +98 -94
- package/hooks/usePortalPosition.d.ts +2 -1
- package/hooks/usePortalPosition.js +28 -19
- package/hooks/useResizable.js +106 -104
- package/hooks/useTheme.js +28 -23
- package/index.css +2 -1
- package/index.js +96 -214
- package/index.layered.css +2 -3
- package/llms.txt +28 -4
- package/manifest.json +41 -4
- package/package.json +1 -1
- package/utils/formatBytes.js +29 -13
- package/utils/themeScript.js +6 -8
- package/utils/timeAgo.js +59 -32
|
@@ -1,159 +1,193 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Fragment as e, forwardRef as t, useCallback as n, useEffect as r, useImperativeHandle as i, useRef as a, useState as o } from "react";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import c from "./Timer.module.scss.js";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Timer/Timer.tsx
|
|
6
|
+
var d = () => Date.now();
|
|
7
|
+
function ee(e) {
|
|
8
|
+
let t = Math.max(0, Math.floor(e)), n = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60), a = t % 60, o = (e) => String(e).padStart(2, "0");
|
|
9
|
+
return n > 0 ? `${n}d ${o(r)}:${o(i)}:${o(a)}` : r > 0 ? `${r}:${o(i)}:${o(a)}` : `${o(i)}:${o(a)}`;
|
|
9
10
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
var f = [
|
|
12
|
+
"days",
|
|
13
|
+
"hours",
|
|
14
|
+
"minutes",
|
|
15
|
+
"seconds"
|
|
16
|
+
], p = {
|
|
17
|
+
days: 86400,
|
|
18
|
+
hours: 3600,
|
|
19
|
+
minutes: 60,
|
|
20
|
+
seconds: 1
|
|
21
|
+
}, m = {
|
|
22
|
+
days: "d",
|
|
23
|
+
hours: "h",
|
|
24
|
+
minutes: "m",
|
|
25
|
+
seconds: "s"
|
|
26
|
+
}, h = {
|
|
27
|
+
days: "days",
|
|
28
|
+
hours: "hours",
|
|
29
|
+
minutes: "minutes",
|
|
30
|
+
seconds: "seconds"
|
|
31
|
+
};
|
|
32
|
+
function te(e) {
|
|
33
|
+
return e >= 86400 ? [
|
|
34
|
+
"days",
|
|
35
|
+
"hours",
|
|
36
|
+
"minutes",
|
|
37
|
+
"seconds"
|
|
38
|
+
] : e >= 3600 ? [
|
|
39
|
+
"hours",
|
|
40
|
+
"minutes",
|
|
41
|
+
"seconds"
|
|
42
|
+
] : ["minutes", "seconds"];
|
|
13
43
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
44
|
+
function ne(e, t, n, r) {
|
|
45
|
+
let i = f.filter((e) => t.includes(e)), a = Math.max(0, Math.floor(e));
|
|
46
|
+
return i.map((e, t) => {
|
|
47
|
+
let i = p[e], o = Math.floor(a / i);
|
|
48
|
+
a %= i;
|
|
49
|
+
let s = t === 0 ? String(o) : String(o).padStart(2, "0"), c = r?.[e], l;
|
|
50
|
+
return l = c === void 0 ? n === "long" ? h[e] : m[e] : typeof c == "function" ? c(o) : c, {
|
|
51
|
+
unit: e,
|
|
52
|
+
value: o,
|
|
53
|
+
text: s,
|
|
54
|
+
label: l
|
|
55
|
+
};
|
|
56
|
+
});
|
|
24
57
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
58
|
+
var g = t(({ mode: t = "countdown", duration: f, to: p, value: m, autoStart: h = !0, running: g, interval: _ = 1e3, variant: v = "digital", size: re = "md", format: ie = ee, units: ae, unitFormat: oe = "short", unitLabels: se, segmentVariant: ce = "boxed", renderSegment: y, segmentSeparator: b, label: x, labelPlacement: S = "bottom", onComplete: C, onTick: w, classes: T, className: le, style: ue, "aria-label": de }, fe) => {
|
|
59
|
+
let E = m !== void 0, D = p !== void 0, O = D ? p instanceof Date ? p.getTime() : p : 0, k = (f ?? 0) * 1e3, [, A] = o(0), [j, M] = o(!1), N = a(null), P = a(!1), F = a(0), I = a(!1), L = a(null), R = a(C), z = a(w);
|
|
60
|
+
R.current = C, z.current = w;
|
|
61
|
+
let B = n(() => F.current + (N.current == null ? 0 : d() - N.current), []), V = n(() => {
|
|
62
|
+
if (E) return m;
|
|
63
|
+
if (D) return Math.max(0, (O - d()) / 1e3);
|
|
64
|
+
let e = B();
|
|
65
|
+
return t === "countdown" ? Math.max(0, (k - e) / 1e3) : e / 1e3;
|
|
66
|
+
}, [
|
|
67
|
+
E,
|
|
68
|
+
m,
|
|
69
|
+
D,
|
|
70
|
+
O,
|
|
71
|
+
B,
|
|
72
|
+
t,
|
|
73
|
+
k
|
|
74
|
+
]), H = n(() => {
|
|
75
|
+
L.current &&= (clearInterval(L.current), null);
|
|
76
|
+
}, []), U = n(() => {
|
|
77
|
+
N.current != null && (F.current += d() - N.current, N.current = null), H(), M(!1);
|
|
78
|
+
}, [H]), W = n(() => {
|
|
79
|
+
E || (N.current ??= d(), I.current = !1, M(!0));
|
|
80
|
+
}, [E]), G = n(() => U(), [U]), K = n(() => {
|
|
81
|
+
H(), N.current = null, F.current = 0, I.current = !1, M(!1), A((e) => e + 1);
|
|
82
|
+
}, [H]), q = n(() => {
|
|
83
|
+
F.current = 0, I.current = !1, N.current = d(), M(!0);
|
|
84
|
+
}, []);
|
|
85
|
+
r(() => {
|
|
86
|
+
P.current || (P.current = !0, h && g === void 0 && !E && !D && W());
|
|
87
|
+
}, [
|
|
88
|
+
h,
|
|
89
|
+
g,
|
|
90
|
+
E,
|
|
91
|
+
D,
|
|
92
|
+
W
|
|
93
|
+
]), r(() => E || !(D || j) ? void 0 : (L.current = setInterval(() => {
|
|
94
|
+
let e = V();
|
|
95
|
+
z.current?.(e), A((e) => e + 1), (t === "countdown" || D) && e <= 0 && !I.current && (I.current = !0, R.current?.(), D || U());
|
|
96
|
+
}, _), H), [
|
|
97
|
+
j,
|
|
98
|
+
D,
|
|
99
|
+
E,
|
|
100
|
+
_,
|
|
101
|
+
t,
|
|
102
|
+
V,
|
|
103
|
+
U,
|
|
104
|
+
H
|
|
105
|
+
]), r(() => {
|
|
106
|
+
g === void 0 || E || (g ? W() : G());
|
|
107
|
+
}, [
|
|
108
|
+
g,
|
|
109
|
+
E,
|
|
110
|
+
W,
|
|
111
|
+
G
|
|
112
|
+
]), i(fe, () => ({
|
|
113
|
+
start: W,
|
|
114
|
+
pause: G,
|
|
115
|
+
reset: K,
|
|
116
|
+
restart: q,
|
|
117
|
+
getTime: () => V(),
|
|
118
|
+
get isRunning() {
|
|
119
|
+
return j;
|
|
120
|
+
}
|
|
121
|
+
}), [
|
|
122
|
+
W,
|
|
123
|
+
G,
|
|
124
|
+
K,
|
|
125
|
+
q,
|
|
126
|
+
V,
|
|
127
|
+
j
|
|
128
|
+
]);
|
|
129
|
+
let J = V(), Y = t === "countdown" || D ? Math.ceil(J) : Math.floor(J), X = ie(Y), Z = D ? 0 : k / 1e3, Q = 0;
|
|
130
|
+
Z > 0 && (Q = t === "countdown" ? J / Z : Math.min(1, J / Z)), Q = Math.max(0, Math.min(1, Q));
|
|
131
|
+
let pe = ne(Y, ae ?? te(Math.max(Y, f ?? 0)), oe, se), $ = S === "top" || S === "left", me = x != null && /* @__PURE__ */ l("span", {
|
|
132
|
+
className: s(c.label, T?.label),
|
|
133
|
+
children: x
|
|
134
|
+
});
|
|
135
|
+
return /* @__PURE__ */ u("div", {
|
|
136
|
+
className: s(c.root, c[re], c[`label_${S}`], T?.root, le),
|
|
137
|
+
style: ue,
|
|
138
|
+
role: "timer",
|
|
139
|
+
"aria-label": de,
|
|
140
|
+
"aria-live": "off",
|
|
141
|
+
children: [
|
|
142
|
+
$ && me,
|
|
143
|
+
v === "ring" ? /* @__PURE__ */ u("span", {
|
|
144
|
+
className: c.ringWrap,
|
|
145
|
+
children: [/* @__PURE__ */ u("svg", {
|
|
146
|
+
viewBox: "0 0 100 100",
|
|
147
|
+
className: c.ring,
|
|
148
|
+
"aria-hidden": "true",
|
|
149
|
+
children: [/* @__PURE__ */ l("circle", {
|
|
150
|
+
className: s(c.ringTrack, T?.ringTrack),
|
|
151
|
+
cx: "50",
|
|
152
|
+
cy: "50",
|
|
153
|
+
r: "44"
|
|
154
|
+
}), /* @__PURE__ */ l("circle", {
|
|
155
|
+
className: s(c.ringProgress, T?.ringProgress),
|
|
156
|
+
cx: "50",
|
|
157
|
+
cy: "50",
|
|
158
|
+
r: "44",
|
|
159
|
+
style: {
|
|
160
|
+
strokeDasharray: 2 * Math.PI * 44,
|
|
161
|
+
strokeDashoffset: 2 * Math.PI * 44 * (1 - Q)
|
|
162
|
+
}
|
|
163
|
+
})]
|
|
164
|
+
}), /* @__PURE__ */ l("span", {
|
|
165
|
+
className: s(c.display, c.ringDisplay, T?.display),
|
|
166
|
+
children: X
|
|
167
|
+
})]
|
|
168
|
+
}) : v === "segments" ? /* @__PURE__ */ l("span", {
|
|
169
|
+
className: s(c.segments, T?.segments),
|
|
170
|
+
children: pe.map((t, n) => /* @__PURE__ */ u(e, { children: [n > 0 && b != null && /* @__PURE__ */ l("span", {
|
|
171
|
+
className: c.segmentSep,
|
|
172
|
+
"aria-hidden": "true",
|
|
173
|
+
children: b
|
|
174
|
+
}), y ? y(t, n) : /* @__PURE__ */ u("span", {
|
|
175
|
+
className: s(c.segment, ce === "boxed" ? c.segmentBoxed : c.segmentPlain, T?.segment),
|
|
176
|
+
children: [/* @__PURE__ */ l("span", {
|
|
177
|
+
className: s(c.segmentValue, T?.segmentValue),
|
|
178
|
+
children: t.text
|
|
179
|
+
}), /* @__PURE__ */ l("span", {
|
|
180
|
+
className: s(c.segmentLabel, T?.segmentLabel),
|
|
181
|
+
children: t.label
|
|
182
|
+
})]
|
|
183
|
+
})] }, t.unit))
|
|
184
|
+
}) : /* @__PURE__ */ l("span", {
|
|
185
|
+
className: s(c.display, T?.display),
|
|
186
|
+
children: X
|
|
187
|
+
}),
|
|
188
|
+
!$ && me
|
|
189
|
+
]
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
g.displayName = "Timer";
|
|
193
|
+
export { g as Timer };
|
|
@@ -1,55 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
P as default,
|
|
30
|
-
k as display,
|
|
31
|
-
m as label,
|
|
32
|
-
r as labelBottom,
|
|
33
|
-
o as labelLeft,
|
|
34
|
-
a as labelRight,
|
|
35
|
-
t as labelTop,
|
|
36
|
-
s as label_bottom,
|
|
37
|
-
n as label_left,
|
|
38
|
-
c as label_right,
|
|
39
|
-
l as label_top,
|
|
40
|
-
i as lg,
|
|
41
|
-
b as md,
|
|
42
|
-
_ as ring,
|
|
43
|
-
d as ringDisplay,
|
|
44
|
-
T as ringProgress,
|
|
45
|
-
f as ringTrack,
|
|
46
|
-
p as ringWrap,
|
|
47
|
-
e as root,
|
|
48
|
-
h as segment,
|
|
49
|
-
u as segmentBoxed,
|
|
50
|
-
L as segmentLabel,
|
|
51
|
-
B as segmentSep,
|
|
52
|
-
y as segmentValue,
|
|
53
|
-
x as segments,
|
|
54
|
-
g as sm
|
|
1
|
+
// src/components/Timer/Timer.module.scss
|
|
2
|
+
var e = "crk-root-ze-qA", t = "crk-label_top-f5ix1", n = "crk-label_top-f5ix1", r = "crk-label_bottom-vf4Tk", i = "crk-label_bottom-vf4Tk", a = "crk-label_left-Tsjlx", o = "crk-label_left-Tsjlx", s = "crk-label_right-l0T9l", c = "crk-label_right-l0T9l", l = "crk-sm-LpMEk", u = "crk-md-Of6tL", d = "crk-lg-KKqPc", f = "crk-display-09uul", p = "crk-label-F7Uuf", m = "crk-ringWrap-F71Yf", h = "crk-ring-PqZbn", g = "crk-ringTrack-SaJmr", _ = "crk-ringProgress-54wH1", v = "crk-ringDisplay-biAno", y = "crk-segments-U9rJE", b = "crk-segment-2RMKN", x = "crk-segmentBoxed-iVvX0", S = "crk-segmentValue-fsXMN", C = "crk-segmentLabel-kihRG", w = "crk-segmentSep-ZGeiV", T = {
|
|
3
|
+
root: e,
|
|
4
|
+
label_top: t,
|
|
5
|
+
labelTop: n,
|
|
6
|
+
label_bottom: r,
|
|
7
|
+
labelBottom: i,
|
|
8
|
+
label_left: a,
|
|
9
|
+
labelLeft: o,
|
|
10
|
+
label_right: s,
|
|
11
|
+
labelRight: c,
|
|
12
|
+
sm: l,
|
|
13
|
+
md: u,
|
|
14
|
+
lg: d,
|
|
15
|
+
display: f,
|
|
16
|
+
label: p,
|
|
17
|
+
ringWrap: m,
|
|
18
|
+
ring: h,
|
|
19
|
+
ringTrack: g,
|
|
20
|
+
ringProgress: _,
|
|
21
|
+
ringDisplay: v,
|
|
22
|
+
segments: y,
|
|
23
|
+
segment: b,
|
|
24
|
+
segmentBoxed: x,
|
|
25
|
+
segmentValue: S,
|
|
26
|
+
segmentLabel: C,
|
|
27
|
+
segmentSep: w
|
|
55
28
|
};
|
|
29
|
+
export { T as default, f as display, p as label, i as labelBottom, o as labelLeft, c as labelRight, n as labelTop, r as label_bottom, a as label_left, s as label_right, t as label_top, d as lg, u as md, h as ring, v as ringDisplay, _ as ringProgress, g as ringTrack, m as ringWrap, e as root, b as segment, x as segmentBoxed, C as segmentLabel, w as segmentSep, S as segmentValue, y as segments, l as sm };
|
|
@@ -79,4 +79,4 @@ export interface ToastProviderProps {
|
|
|
79
79
|
* <App />
|
|
80
80
|
* </ToastProvider>
|
|
81
81
|
*/
|
|
82
|
-
export declare function ToastProvider({ children, position, duration, max, classes, }: ToastProviderProps): import("react
|
|
82
|
+
export declare function ToastProvider({ children, position, duration, max, classes, }: ToastProviderProps): import("react").JSX.Element;
|