@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,43 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
U.displayName = "RelativeTime";
|
|
41
|
-
export {
|
|
42
|
-
U as RelativeTime
|
|
43
|
-
};
|
|
1
|
+
import { forwardRef as e, useMemo as t } from "react";
|
|
2
|
+
import n from "clsx";
|
|
3
|
+
import r from "./RelativeTime.module.scss.js";
|
|
4
|
+
import { useNow as i } from "../../hooks/useNow.js";
|
|
5
|
+
import { refreshIntervalFor as a, timeAgo as o, toTimestamp as s } from "../../utils/timeAgo.js";
|
|
6
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
7
|
+
// src/components/RelativeTime/RelativeTime.tsx
|
|
8
|
+
var l = {
|
|
9
|
+
dateStyle: "medium",
|
|
10
|
+
timeStyle: "short"
|
|
11
|
+
}, u = e(({ value: e, format: u = "long", numeric: d = "auto", locale: f, live: p = !0, now: m, maxAge: h, absoluteFormat: g = l, title: _ = !0, fallback: v = "—", classes: y, className: b, ...x }, S) => {
|
|
12
|
+
let C = t(() => s(e), [e]), w = Number.isFinite(C), T = C - (m ?? Date.now()), E = a(T), D = i(E, p && m === void 0 && w), O = m ?? D;
|
|
13
|
+
if (!w) return /* @__PURE__ */ c("time", {
|
|
14
|
+
ref: S,
|
|
15
|
+
className: n(r.root, y?.root, b),
|
|
16
|
+
...x,
|
|
17
|
+
children: v
|
|
18
|
+
});
|
|
19
|
+
let k = new Date(C).toISOString(), A = new Intl.DateTimeFormat(f, g).format(C), j = o(C, {
|
|
20
|
+
now: O,
|
|
21
|
+
locale: f,
|
|
22
|
+
format: u,
|
|
23
|
+
numeric: d,
|
|
24
|
+
maxAge: h
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ c("time", {
|
|
27
|
+
ref: S,
|
|
28
|
+
dateTime: k,
|
|
29
|
+
title: _ === !1 ? void 0 : _ === !0 ? A : _,
|
|
30
|
+
className: n(r.root, y?.root, b),
|
|
31
|
+
...x,
|
|
32
|
+
children: j ?? A
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
u.displayName = "RelativeTime";
|
|
36
|
+
export { u as RelativeTime };
|
|
@@ -1,131 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import c from "clsx";
|
|
1
|
+
import { forwardRef as e, useCallback as t, useRef as n, useState as r } from "react";
|
|
2
|
+
import i from "clsx";
|
|
4
3
|
import a from "./SegmentedControl.module.scss.js";
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
tabIndex: n ? -1 : e.value === N ? 0 : -1,
|
|
94
|
-
className: S,
|
|
95
|
-
onClick: (r) => {
|
|
96
|
-
if (n) {
|
|
97
|
-
r.preventDefault();
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
g(e.value);
|
|
101
|
-
},
|
|
102
|
-
onKeyDown: (r) => k(r, e),
|
|
103
|
-
children: C
|
|
104
|
-
},
|
|
105
|
-
e.value
|
|
106
|
-
) : f = /* @__PURE__ */ t(
|
|
107
|
-
"button",
|
|
108
|
-
{
|
|
109
|
-
ref: I,
|
|
110
|
-
type: "button",
|
|
111
|
-
role: "radio",
|
|
112
|
-
"aria-checked": o,
|
|
113
|
-
"aria-label": x,
|
|
114
|
-
disabled: n,
|
|
115
|
-
tabIndex: e.value === N ? 0 : -1,
|
|
116
|
-
className: S,
|
|
117
|
-
onClick: () => g(e.value),
|
|
118
|
-
onKeyDown: (r) => k(r, e),
|
|
119
|
-
children: C
|
|
120
|
-
},
|
|
121
|
-
e.value
|
|
122
|
-
), e.tooltip !== void 0 && e.tooltip !== null && e.tooltip !== "" ? /* @__PURE__ */ t(V, { content: e.tooltip, children: f }, e.value) : f;
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
);
|
|
4
|
+
import { Tooltip as o } from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
7
|
+
function u({ options: e, value: u, defaultValue: d, onChange: f, size: p = "md", shape: m = "rounded", variant: h = "filled", fullWidth: g = !1, disabled: _ = !1, classes: v, className: y, style: b, id: x, "aria-label": S, "aria-labelledby": C }, w) {
|
|
8
|
+
let T = u !== void 0, [E, D] = r(d), O = T ? u : E, k = n(/* @__PURE__ */ new Map()), A = e.some((e) => e.href !== void 0), j = t((e) => {
|
|
9
|
+
T || D(e), e !== O && f?.(e);
|
|
10
|
+
}, [
|
|
11
|
+
T,
|
|
12
|
+
O,
|
|
13
|
+
f
|
|
14
|
+
]), M = e.filter((e) => !(_ || e.disabled)), N = (e) => {
|
|
15
|
+
e && (j(e.value), k.current.get(e.value)?.focus());
|
|
16
|
+
}, P = (e, t) => {
|
|
17
|
+
if (M.length === 0) return;
|
|
18
|
+
let n = M.findIndex((e) => e.value === t.value);
|
|
19
|
+
switch (e.key) {
|
|
20
|
+
case "ArrowRight":
|
|
21
|
+
case "ArrowDown":
|
|
22
|
+
e.preventDefault(), N(M[(n + 1 + M.length) % M.length]);
|
|
23
|
+
break;
|
|
24
|
+
case "ArrowLeft":
|
|
25
|
+
case "ArrowUp":
|
|
26
|
+
e.preventDefault(), N(M[(n - 1 + M.length) % M.length]);
|
|
27
|
+
break;
|
|
28
|
+
case "Home":
|
|
29
|
+
e.preventDefault(), N(M[0]);
|
|
30
|
+
break;
|
|
31
|
+
case "End": e.preventDefault(), N(M[M.length - 1]);
|
|
32
|
+
}
|
|
33
|
+
}, F = M.find((e) => e.value === O)?.value ?? M[0]?.value;
|
|
34
|
+
return /* @__PURE__ */ c("div", {
|
|
35
|
+
ref: w,
|
|
36
|
+
id: x,
|
|
37
|
+
role: A ? "group" : "radiogroup",
|
|
38
|
+
"aria-label": S,
|
|
39
|
+
"aria-labelledby": C,
|
|
40
|
+
"aria-disabled": _ || void 0,
|
|
41
|
+
className: i(a.root, a[p], a[m], a[h], g && a.fullWidth, _ && a.disabled, v?.root, y),
|
|
42
|
+
style: b,
|
|
43
|
+
children: e.map((e) => {
|
|
44
|
+
let t = e.value === O, n = _ || !!e.disabled, r = e.icon !== void 0 && e.label === void 0, u = typeof e.tooltip == "string" ? e.tooltip : void 0, d = e["aria-label"] ?? (r ? u : void 0), f = /* @__PURE__ */ l(s, { children: [
|
|
45
|
+
e.icon !== void 0 && /* @__PURE__ */ c("span", {
|
|
46
|
+
className: i(a.icon, v?.icon),
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
children: e.icon
|
|
49
|
+
}),
|
|
50
|
+
e.label !== void 0 && /* @__PURE__ */ c("span", {
|
|
51
|
+
className: i(a.label, v?.label),
|
|
52
|
+
children: e.label
|
|
53
|
+
}),
|
|
54
|
+
e.count !== void 0 && /* @__PURE__ */ c("span", {
|
|
55
|
+
className: i(a.count, v?.count),
|
|
56
|
+
children: e.count
|
|
57
|
+
})
|
|
58
|
+
] }), p = i(a.item, t && a.itemSelected, r && a.iconOnly, v?.item, t && v?.itemSelected), m = (t) => {
|
|
59
|
+
t ? k.current.set(e.value, t) : k.current.delete(e.value);
|
|
60
|
+
}, h;
|
|
61
|
+
return h = A ? /* @__PURE__ */ c("a", {
|
|
62
|
+
ref: m,
|
|
63
|
+
href: n ? void 0 : e.href,
|
|
64
|
+
"aria-current": t ? "page" : void 0,
|
|
65
|
+
"aria-disabled": n || void 0,
|
|
66
|
+
"aria-label": d,
|
|
67
|
+
tabIndex: n ? -1 : e.value === F ? 0 : -1,
|
|
68
|
+
className: p,
|
|
69
|
+
onClick: (t) => {
|
|
70
|
+
n ? t.preventDefault() : j(e.value);
|
|
71
|
+
},
|
|
72
|
+
onKeyDown: (t) => P(t, e),
|
|
73
|
+
children: f
|
|
74
|
+
}, e.value) : /* @__PURE__ */ c("button", {
|
|
75
|
+
ref: m,
|
|
76
|
+
type: "button",
|
|
77
|
+
role: "radio",
|
|
78
|
+
"aria-checked": t,
|
|
79
|
+
"aria-label": d,
|
|
80
|
+
disabled: n,
|
|
81
|
+
tabIndex: e.value === F ? 0 : -1,
|
|
82
|
+
className: p,
|
|
83
|
+
onClick: () => j(e.value),
|
|
84
|
+
onKeyDown: (t) => P(t, e),
|
|
85
|
+
children: f
|
|
86
|
+
}, e.value), e.tooltip !== void 0 && e.tooltip !== null && e.tooltip !== "" ? /* @__PURE__ */ c(o, {
|
|
87
|
+
content: e.tooltip,
|
|
88
|
+
children: h
|
|
89
|
+
}, e.value) : h;
|
|
90
|
+
})
|
|
91
|
+
});
|
|
126
92
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
Y as SegmentedControl
|
|
131
|
-
};
|
|
93
|
+
var d = e(u);
|
|
94
|
+
d.displayName = "SegmentedControl";
|
|
95
|
+
export { d as SegmentedControl };
|
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
m as count,
|
|
22
|
-
f as default,
|
|
23
|
-
b as disabled,
|
|
24
|
-
a as filled,
|
|
25
|
-
s as fullWidth,
|
|
26
|
-
k as icon,
|
|
27
|
-
i as iconOnly,
|
|
28
|
-
r as item,
|
|
29
|
-
g as itemSelected,
|
|
30
|
-
u as label,
|
|
31
|
-
l as lg,
|
|
32
|
-
o as md,
|
|
33
|
-
y as outlined,
|
|
34
|
-
n as pill,
|
|
35
|
-
c as root,
|
|
36
|
-
e as rounded,
|
|
37
|
-
t as sm,
|
|
38
|
-
d as square
|
|
1
|
+
// src/components/SegmentedControl/SegmentedControl.module.scss
|
|
2
|
+
var e = "crk-root-ito0X", t = "crk-sm-P03Ce", n = "crk-md-my5y5", r = "crk-lg-C6A9b", i = "crk-pill-yWMHd", a = "crk-rounded-KQgE9", o = "crk-square-gChT2", s = "crk-fullWidth-ahjYN", c = "crk-item-n8hr3", l = "crk-iconOnly-wyO0n", u = "crk-icon-RUgES", d = "crk-label-urUg5", f = "crk-count-qh4-d", p = "crk-filled-THBvo", m = "crk-itemSelected-c3IgH", h = "crk-outlined-xC8GL", g = "crk-disabled-BzP8D", _ = {
|
|
3
|
+
root: e,
|
|
4
|
+
sm: t,
|
|
5
|
+
md: n,
|
|
6
|
+
lg: r,
|
|
7
|
+
pill: i,
|
|
8
|
+
rounded: a,
|
|
9
|
+
square: o,
|
|
10
|
+
fullWidth: s,
|
|
11
|
+
item: c,
|
|
12
|
+
iconOnly: l,
|
|
13
|
+
icon: u,
|
|
14
|
+
label: d,
|
|
15
|
+
count: f,
|
|
16
|
+
filled: p,
|
|
17
|
+
itemSelected: m,
|
|
18
|
+
outlined: h,
|
|
19
|
+
disabled: g
|
|
39
20
|
};
|
|
21
|
+
export { f as count, _ as default, g as disabled, p as filled, s as fullWidth, u as icon, l as iconOnly, c as item, m as itemSelected, d as label, r as lg, n as md, h as outlined, i as pill, e as root, a as rounded, t as sm, o as square };
|
|
@@ -1,50 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
ref: c,
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
className: a(t.line, t[e], h, i?.root, p),
|
|
41
|
-
style: x,
|
|
42
|
-
...f
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
w.displayName = "Skeleton";
|
|
48
|
-
export {
|
|
49
|
-
w as Skeleton
|
|
50
|
-
};
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import n from "./Skeleton.module.scss.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
6
|
+
var i = (e) => typeof e == "number" ? `${e}px` : e, a = e(({ variant: e = "text", width: a, height: o, animation: s = "pulse", lines: c = 1, classes: l, className: u, style: d, ...f }, p) => {
|
|
7
|
+
let m = s === "wave" ? n.wave : s === "none" ? void 0 : n.pulse;
|
|
8
|
+
if (e === "text" && c > 1) return /* @__PURE__ */ r("div", {
|
|
9
|
+
ref: p,
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
className: t(n.stack, l?.root, u),
|
|
12
|
+
style: d,
|
|
13
|
+
...f,
|
|
14
|
+
children: Array.from({ length: c }).map((e, s) => /* @__PURE__ */ r("span", {
|
|
15
|
+
className: t(n.line, n.text, m, l?.line),
|
|
16
|
+
style: {
|
|
17
|
+
width: s === c - 1 ? "60%" : i(a) ?? "100%",
|
|
18
|
+
height: i(o)
|
|
19
|
+
}
|
|
20
|
+
}, s))
|
|
21
|
+
});
|
|
22
|
+
let h = {
|
|
23
|
+
width: i(a),
|
|
24
|
+
height: i(o),
|
|
25
|
+
...d
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ r("div", {
|
|
28
|
+
ref: p,
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: t(n.line, n[e], m, l?.root, u),
|
|
31
|
+
style: h,
|
|
32
|
+
...f
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
a.displayName = "Skeleton";
|
|
36
|
+
export { a as Skeleton };
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
k as circle,
|
|
16
|
-
l as crkSkeletonPulse,
|
|
17
|
-
o as crkSkeletonWave,
|
|
18
|
-
a as default,
|
|
19
|
-
e as line,
|
|
20
|
-
s as pulse,
|
|
21
|
-
r as rect,
|
|
22
|
-
c as stack,
|
|
23
|
-
t as text,
|
|
24
|
-
n as wave
|
|
1
|
+
// src/components/Skeleton/Skeleton.module.scss
|
|
2
|
+
var e = "crk-line-8roAA", t = "crk-stack-8QHed", n = "crk-text-4oj9n", r = "crk-circle-o-WgD", i = "crk-rect-8lO4C", a = "crk-pulse-dX0ir", o = "crk-crk-skeleton-pulse-ZXPJJ", s = "crk-wave-S82D6", c = "crk-crk-skeleton-wave-rDp6Z", l = {
|
|
3
|
+
line: e,
|
|
4
|
+
stack: t,
|
|
5
|
+
text: n,
|
|
6
|
+
circle: r,
|
|
7
|
+
rect: i,
|
|
8
|
+
pulse: a,
|
|
9
|
+
"crk-skeleton-pulse": "crk-crk-skeleton-pulse-ZXPJJ",
|
|
10
|
+
crkSkeletonPulse: o,
|
|
11
|
+
wave: s,
|
|
12
|
+
"crk-skeleton-wave": "crk-crk-skeleton-wave-rDp6Z",
|
|
13
|
+
crkSkeletonWave: c
|
|
25
14
|
};
|
|
15
|
+
export { r as circle, o as crkSkeletonPulse, c as crkSkeletonWave, l as default, e as line, a as pulse, i as rect, t as stack, n as text, s as wave };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import r from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import n from "./Spinner.module.scss.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Spinner/Spinner.tsx
|
|
6
|
+
var a = e(({ size: e = "md", color: a, label: o = "Loading", classes: s, className: c, style: l, ...u }, d) => /* @__PURE__ */ i("span", {
|
|
7
|
+
ref: d,
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-live": "polite",
|
|
10
|
+
className: t(n.root, n[e], s?.root, c),
|
|
11
|
+
style: a ? {
|
|
12
|
+
...l,
|
|
13
|
+
color: a
|
|
14
|
+
} : l,
|
|
15
|
+
...u,
|
|
16
|
+
children: [/* @__PURE__ */ r("span", {
|
|
17
|
+
className: t(n.circle, s?.circle),
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}), o ? /* @__PURE__ */ r("span", {
|
|
20
|
+
className: t(n.label, s?.label),
|
|
21
|
+
children: o
|
|
22
|
+
}) : null]
|
|
23
|
+
}));
|
|
24
|
+
a.displayName = "Spinner";
|
|
25
|
+
export { a as Spinner };
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
c as circle,
|
|
13
|
-
t as crkSpinnerRotate,
|
|
14
|
-
k as default,
|
|
15
|
-
s as label,
|
|
16
|
-
n as lg,
|
|
17
|
-
e as md,
|
|
18
|
-
r as root,
|
|
19
|
-
o as sm
|
|
1
|
+
// src/components/Spinner/Spinner.module.scss
|
|
2
|
+
var e = "crk-root-wia8E", t = "crk-circle-8olrz", n = "crk-crk-spinner-rotate-vrMQr", r = "crk-sm-q2vog", i = "crk-md-kcEfs", a = "crk-lg-8yfDn", o = "crk-label-ahktK", s = {
|
|
3
|
+
root: e,
|
|
4
|
+
circle: t,
|
|
5
|
+
"crk-spinner-rotate": "crk-crk-spinner-rotate-vrMQr",
|
|
6
|
+
crkSpinnerRotate: n,
|
|
7
|
+
sm: r,
|
|
8
|
+
md: i,
|
|
9
|
+
lg: a,
|
|
10
|
+
label: o
|
|
20
11
|
};
|
|
12
|
+
export { t as circle, n as crkSpinnerRotate, s as default, o as label, a as lg, i as md, e as root, r as sm };
|