@overdoser/react-toolkit 0.20.0 → 0.21.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 +1 -1
- package/CHANGELOG.md +14 -0
- package/components/Accordion/Accordion.js +160 -177
- package/components/Accordion/Accordion.module.js +20 -0
- package/components/ActionButton/ActionButton.js +155 -209
- package/components/ActionButton/ActionButton.module.js +25 -0
- package/components/ActionButton/CopyButton.js +52 -64
- package/components/Alert/Alert.js +92 -95
- package/components/Alert/Alert.module.js +18 -0
- package/components/Avatar/Avatar.js +44 -55
- package/components/Avatar/Avatar.module.js +23 -0
- package/components/Badge/Badge.js +16 -38
- package/components/Badge/Badge.module.js +17 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/Breadcrumbs/Breadcrumbs.js +52 -48
- package/components/Breadcrumbs/Breadcrumbs.module.js +10 -0
- package/components/Button/Button.js +35 -57
- package/components/Button/Button.module.js +25 -0
- package/components/Card/Card.js +94 -131
- package/components/Card/Card.module.js +35 -0
- 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.js +32 -0
- 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 +46 -41
- 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.js +32 -0
- package/components/CodeBlock/CodeBlock.js +111 -119
- package/components/CodeBlock/CodeBlock.module.js +23 -0
- package/components/CommandPalette/CommandPalette.js +387 -392
- package/components/CommandPalette/CommandPalette.module.js +28 -0
- package/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/components/ConfirmDialog/ConfirmDialog.js +184 -199
- package/components/ConfirmDialog/ConfirmDialog.module.js +12 -0
- package/components/Divider/Divider.js +25 -36
- package/components/Divider/Divider.module.js +17 -0
- package/components/Draggable/Draggable.d.ts +1 -1
- package/components/Draggable/Draggable.js +157 -164
- package/components/Draggable/Draggable.module.js +10 -0
- package/components/Drawer/Drawer.js +104 -126
- package/components/Drawer/Drawer.module.js +66 -0
- package/components/Dropdown/Dropdown.js +175 -234
- package/components/Dropdown/Dropdown.module.js +29 -0
- package/components/Dropdown/DropdownItem.js +55 -58
- package/components/Dropdown/DropdownLabel.js +14 -11
- package/components/Dropdown/DropdownSeparator.js +12 -10
- 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.js +12 -0
- package/components/EmptyState/EmptyState.js +58 -55
- package/components/EmptyState/EmptyState.module.js +14 -0
- package/components/Form/Form.d.ts +1 -1
- package/components/Form/Form.js +32 -35
- package/components/Form/Form.module.js +16 -0
- 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.js +26 -0
- package/components/ImageViewer/useZoomPan.js +206 -137
- package/components/Kbd/Kbd.js +25 -22
- package/components/Kbd/Kbd.module.js +10 -0
- package/components/KeyValueList/KeyValueList.js +119 -123
- package/components/KeyValueList/KeyValueList.module.js +23 -0
- package/components/Link/Link.js +45 -59
- package/components/Link/Link.module.js +10 -0
- package/components/List/List.js +22 -46
- package/components/List/List.module.js +12 -0
- package/components/Loader/Loader.js +152 -182
- package/components/Loader/Loader.module.js +40 -0
- package/components/Modal/Modal.js +93 -105
- package/components/Modal/Modal.module.js +18 -0
- package/components/PageHeader/PageHeader.js +78 -72
- package/components/PageHeader/PageHeader.module.js +23 -0
- package/components/Pagination/Pagination.js +63 -84
- package/components/Pagination/Pagination.module.js +13 -0
- package/components/Pagination/paginationRange.js +15 -22
- package/components/Popover/Popover.js +110 -134
- package/components/Popover/Popover.module.js +12 -0
- package/components/ProgressBar/ProgressBar.d.ts +15 -1
- package/components/ProgressBar/ProgressBar.js +57 -90
- package/components/ProgressBar/ProgressBar.module.js +29 -0
- package/components/RelativeTime/RelativeTime.js +36 -43
- package/components/RelativeTime/RelativeTime.module.js +3 -0
- package/components/SegmentedControl/SegmentedControl.js +94 -130
- package/components/SegmentedControl/SegmentedControl.module.js +21 -0
- package/components/Skeleton/Skeleton.js +36 -50
- package/components/Skeleton/Skeleton.module.js +15 -0
- package/components/Spinner/Spinner.js +25 -25
- package/components/Spinner/Spinner.module.js +12 -0
- package/components/SplitButton/SplitButton.js +149 -196
- package/components/SplitButton/SplitButton.module.js +31 -0
- package/components/SplitPane/SplitPane.js +134 -170
- package/components/SplitPane/SplitPane.module.js +14 -0
- package/components/StatCard/StatCard.js +132 -125
- package/components/StatCard/StatCard.module.js +42 -0
- package/components/StatusDot/StatusDot.js +28 -39
- package/components/StatusDot/StatusDot.module.js +18 -0
- package/components/Table/Table.d.ts +1 -1
- package/components/Table/Table.js +381 -451
- package/components/Table/Table.module.js +42 -0
- package/components/Table/useTableSort.js +51 -42
- package/components/Tabs/Tabs.js +109 -161
- package/components/Tabs/Tabs.module.js +28 -0
- package/components/ThemeToggle/ThemeToggle.js +122 -98
- package/components/ThemeToggle/ThemeToggle.module.js +13 -0
- package/components/Timeline/GanttTimeline.js +357 -318
- package/components/Timeline/GanttTimeline.module.js +29 -0
- package/components/Timeline/HistoryTimeline.js +486 -450
- package/components/Timeline/HistoryTimeline.module.js +31 -0
- package/components/Timeline/Timeline.module.js +76 -0
- 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 +245 -178
- package/components/Timeline/TraceTimeline.js +823 -783
- package/components/Timeline/TraceTimeline.module.js +98 -0
- 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.js +29 -0
- package/components/Toast/Toast.d.ts +1 -1
- package/components/Toast/Toast.js +128 -128
- package/components/Toast/Toast.module.js +37 -0
- package/components/Toast/toastStore.js +58 -62
- package/components/ToggleIconButton/ToggleIconButton.js +35 -57
- package/components/ToggleIconButton/ToggleIconButton.module.js +15 -0
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.js +76 -85
- package/components/Tooltip/Tooltip.module.js +17 -0
- package/components/Typography/Typography.js +11 -36
- package/components/Typography/Typography.module.js +30 -0
- package/components/inputs/Checkbox/Checkbox.js +27 -51
- package/components/inputs/Checkbox/Checkbox.module.js +10 -0
- package/components/inputs/Checkbox/CheckboxGroup.js +53 -111
- package/components/inputs/Checkbox/CheckboxGroup.module.js +17 -0
- package/components/inputs/DatePicker/CalendarPanel.d.ts +1 -1
- package/components/inputs/DatePicker/CalendarPanel.js +263 -286
- package/components/inputs/DatePicker/CalendarPanel.module.js +23 -0
- package/components/inputs/DatePicker/DatePicker.js +115 -142
- package/components/inputs/DatePicker/DatePicker.module.js +14 -0
- package/components/inputs/DatePicker/dateUtils.js +32 -41
- package/components/inputs/DateTimePicker/DateTimePicker.js +226 -232
- package/components/inputs/DateTimePicker/DateTimePicker.module.js +20 -0
- 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.js +15 -0
- package/components/inputs/NumberInput/NumberInput.js +112 -132
- package/components/inputs/NumberInput/NumberInput.module.js +14 -0
- package/components/inputs/Radio/Radio.js +50 -73
- package/components/inputs/Radio/Radio.module.js +9 -0
- package/components/inputs/SearchInput/SearchInput.js +98 -115
- package/components/inputs/SearchInput/SearchInput.module.js +8 -0
- package/components/inputs/Select/Select.js +555 -682
- package/components/inputs/Select/Select.module.js +38 -0
- package/components/inputs/Slider/Slider.js +97 -128
- package/components/inputs/Slider/Slider.module.js +9 -0
- package/components/inputs/Switch/Switch.js +11 -8
- package/components/inputs/Textarea/Textarea.js +42 -58
- package/components/inputs/Textarea/Textarea.module.js +14 -0
- 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.js +25 -19
- package/hooks/useResizable.js +106 -104
- package/hooks/useTheme.js +28 -23
- package/index.css +2 -1
- package/index.js +97 -215
- package/index.layered.css +2 -3
- package/llms.txt +3 -0
- package/manifest.json +8 -0
- package/package.json +1 -1
- package/utils/formatBytes.js +29 -13
- package/utils/themeScript.js +6 -8
- package/utils/timeAgo.js +59 -32
- package/components/Accordion/Accordion.module.scss.js +0 -36
- package/components/ActionButton/ActionButton.module.scss.js +0 -47
- package/components/Alert/Alert.module.scss.js +0 -33
- package/components/Avatar/Avatar.module.scss.js +0 -43
- package/components/Badge/Badge.module.scss.js +0 -31
- package/components/Breadcrumbs/Breadcrumbs.module.scss.js +0 -17
- package/components/Button/Button.module.scss.js +0 -47
- package/components/Card/Card.module.scss.js +0 -60
- package/components/Chart/Chart.module.scss.js +0 -61
- package/components/Chip/Chip.module.scss.js +0 -59
- package/components/CodeBlock/CodeBlock.module.scss.js +0 -43
- package/components/CommandPalette/CommandPalette.module.scss.js +0 -49
- package/components/ConfirmDialog/ConfirmDialog.module.scss.js +0 -21
- package/components/Divider/Divider.module.scss.js +0 -31
- package/components/Draggable/Draggable.module.scss.js +0 -17
- package/components/Drawer/Drawer.module.scss.js +0 -119
- package/components/Dropdown/Dropdown.module.scss.js +0 -53
- package/components/Dropzone/Dropzone.module.scss.js +0 -21
- package/components/EmptyState/EmptyState.module.scss.js +0 -25
- package/components/Form/Form.module.scss.js +0 -29
- package/components/ImageViewer/ImageViewer.module.scss.js +0 -47
- package/components/Kbd/Kbd.module.scss.js +0 -17
- package/components/KeyValueList/KeyValueList.module.scss.js +0 -43
- package/components/Link/Link.module.scss.js +0 -16
- package/components/List/List.module.scss.js +0 -21
- package/components/Loader/Loader.module.scss.js +0 -70
- package/components/Modal/Modal.module.scss.js +0 -33
- package/components/PageHeader/PageHeader.module.scss.js +0 -43
- package/components/Pagination/Pagination.module.scss.js +0 -23
- package/components/Popover/Popover.module.scss.js +0 -21
- package/components/ProgressBar/ProgressBar.module.scss.js +0 -51
- package/components/RelativeTime/RelativeTime.module.scss.js +0 -7
- package/components/SegmentedControl/SegmentedControl.module.scss.js +0 -39
- package/components/Skeleton/Skeleton.module.scss.js +0 -25
- package/components/Spinner/Spinner.module.scss.js +0 -20
- package/components/SplitButton/SplitButton.module.scss.js +0 -57
- package/components/SplitPane/SplitPane.module.scss.js +0 -25
- package/components/StatCard/StatCard.module.scss.js +0 -72
- package/components/StatusDot/StatusDot.module.scss.js +0 -32
- package/components/Table/Table.module.scss.js +0 -81
- package/components/Tabs/Tabs.module.scss.js +0 -53
- package/components/ThemeToggle/ThemeToggle.module.scss.js +0 -23
- package/components/Timeline/GanttTimeline.module.scss.js +0 -55
- package/components/Timeline/HistoryTimeline.module.scss.js +0 -59
- package/components/Timeline/Timeline.module.scss.js +0 -141
- package/components/Timeline/TraceTimeline.module.scss.js +0 -189
- package/components/Timer/Timer.module.scss.js +0 -55
- package/components/Toast/Toast.module.scss.js +0 -62
- package/components/ToggleIconButton/ToggleIconButton.module.scss.js +0 -27
- package/components/Tooltip/Tooltip.module.scss.js +0 -30
- package/components/Typography/Typography.module.scss.js +0 -53
- package/components/inputs/Checkbox/Checkbox.module.scss.js +0 -17
- package/components/inputs/Checkbox/CheckboxGroup.module.scss.js +0 -31
- package/components/inputs/DatePicker/CalendarPanel.module.scss.js +0 -41
- package/components/inputs/DatePicker/DatePicker.module.scss.js +0 -25
- package/components/inputs/DateTimePicker/DateTimePicker.module.scss.js +0 -37
- package/components/inputs/Input/Input.module.scss.js +0 -27
- package/components/inputs/NumberInput/NumberInput.module.scss.js +0 -25
- package/components/inputs/Radio/Radio.module.scss.js +0 -15
- package/components/inputs/SearchInput/SearchInput.module.scss.js +0 -13
- package/components/inputs/Select/Select.module.scss.js +0 -73
- package/components/inputs/Slider/Slider.module.scss.js +0 -15
- package/components/inputs/Textarea/Textarea.module.scss.js +0 -25
|
@@ -1,96 +1,93 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import e from "./Alert.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
3
|
import n from "clsx";
|
|
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
|
-
|
|
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
|
-
export {
|
|
95
|
-
g as Alert
|
|
96
|
-
};
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Alert/Alert.tsx
|
|
6
|
+
var a = {
|
|
7
|
+
info: /* @__PURE__ */ r("svg", {
|
|
8
|
+
viewBox: "0 0 20 20",
|
|
9
|
+
fill: "currentColor",
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
children: /* @__PURE__ */ r("path", {
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM9 9a1 1 0 012 0v4a1 1 0 11-2 0V9zm1-4a1 1 0 100 2 1 1 0 000-2z",
|
|
14
|
+
clipRule: "evenodd"
|
|
15
|
+
})
|
|
16
|
+
}),
|
|
17
|
+
success: /* @__PURE__ */ r("svg", {
|
|
18
|
+
viewBox: "0 0 20 20",
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: /* @__PURE__ */ r("path", {
|
|
22
|
+
fillRule: "evenodd",
|
|
23
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.7-9.3a1 1 0 00-1.4-1.4L9 10.6 7.7 9.3a1 1 0 00-1.4 1.4l2 2a1 1 0 001.4 0l4-4z",
|
|
24
|
+
clipRule: "evenodd"
|
|
25
|
+
})
|
|
26
|
+
}),
|
|
27
|
+
warning: /* @__PURE__ */ r("svg", {
|
|
28
|
+
viewBox: "0 0 20 20",
|
|
29
|
+
fill: "currentColor",
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: /* @__PURE__ */ r("path", {
|
|
32
|
+
fillRule: "evenodd",
|
|
33
|
+
d: "M8.26 3.1c.77-1.33 2.71-1.33 3.48 0l5.58 9.67c.77 1.33-.19 3-1.74 3H4.42c-1.55 0-2.51-1.67-1.74-3L8.26 3.1zM10 7a1 1 0 011 1v3a1 1 0 11-2 0V8a1 1 0 011-1zm0 7a1 1 0 100-2 1 1 0 000 2z",
|
|
34
|
+
clipRule: "evenodd"
|
|
35
|
+
})
|
|
36
|
+
}),
|
|
37
|
+
danger: /* @__PURE__ */ r("svg", {
|
|
38
|
+
viewBox: "0 0 20 20",
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: /* @__PURE__ */ r("path", {
|
|
42
|
+
fillRule: "evenodd",
|
|
43
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.7 7.3a1 1 0 00-1.4 1.4L8.6 10l-1.3 1.3a1 1 0 101.4 1.4L10 11.4l1.3 1.3a1 1 0 001.4-1.4L11.4 10l1.3-1.3a1 1 0 00-1.4-1.4L10 8.6 8.7 7.3z",
|
|
44
|
+
clipRule: "evenodd"
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
}, o = t(({ variant: t = "info", title: o, icon: s = !0, onClose: c, closeLabel: l = "Dismiss", action: u, layout: d = "inline", size: f = "md", classes: p, className: m, children: h, ...g }, _) => {
|
|
48
|
+
let v = s === !0 ? a[t] : s === !1 ? null : s, y = u == null ? null : /* @__PURE__ */ r("div", {
|
|
49
|
+
className: n(e.action, p?.action),
|
|
50
|
+
children: u
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ i("div", {
|
|
53
|
+
ref: _,
|
|
54
|
+
role: "alert",
|
|
55
|
+
className: n(e.root, e[t], d === "banner" && e.banner, f === "sm" && e.sm, p?.root, m),
|
|
56
|
+
...g,
|
|
57
|
+
children: [
|
|
58
|
+
v != null && /* @__PURE__ */ r("span", {
|
|
59
|
+
className: n(e.icon, p?.icon),
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
children: v
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ i("div", {
|
|
64
|
+
className: n(e.content, p?.content),
|
|
65
|
+
children: [/* @__PURE__ */ i("div", {
|
|
66
|
+
className: e.text,
|
|
67
|
+
children: [o != null && /* @__PURE__ */ r("div", {
|
|
68
|
+
className: n(e.title, p?.title),
|
|
69
|
+
children: o
|
|
70
|
+
}), h != null && /* @__PURE__ */ r("div", {
|
|
71
|
+
className: n(e.message, p?.message),
|
|
72
|
+
children: h
|
|
73
|
+
})]
|
|
74
|
+
}), d === "inline" && y]
|
|
75
|
+
}),
|
|
76
|
+
d === "banner" && y,
|
|
77
|
+
c && /* @__PURE__ */ r("button", {
|
|
78
|
+
type: "button",
|
|
79
|
+
className: n(e.close, p?.close),
|
|
80
|
+
onClick: c,
|
|
81
|
+
"aria-label": l,
|
|
82
|
+
children: /* @__PURE__ */ r("svg", {
|
|
83
|
+
viewBox: "0 0 20 20",
|
|
84
|
+
fill: "currentColor",
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
children: /* @__PURE__ */ r("path", { d: "M6.3 6.3a1 1 0 011.4 0L10 8.6l2.3-2.3a1 1 0 111.4 1.4L11.4 10l2.3 2.3a1 1 0 01-1.4 1.4L10 11.4l-2.3 2.3a1 1 0 01-1.4-1.4L8.6 10 6.3 7.7a1 1 0 010-1.4z" })
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
o.displayName = "Alert";
|
|
93
|
+
export { o as Alert };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/components/Alert/Alert.module.scss
|
|
2
|
+
var e = "crk-root-KIhSk", t = "crk-info--J-F1", n = "crk-success-lftZT", r = "crk-warning-uOpos", i = "crk-danger-53-01", a = "crk-icon-RUu7X", o = "crk-content-9Fty2", s = "crk-text--Oyu2", c = "crk-action-a5XCP", l = "crk-banner-epaT8", u = "crk-sm-jB88A", d = "crk-title-QHuwO", f = "crk-message-Wd9FZ", p = "crk-close-yMuK-", m = {
|
|
3
|
+
root: e,
|
|
4
|
+
info: t,
|
|
5
|
+
success: n,
|
|
6
|
+
warning: r,
|
|
7
|
+
danger: i,
|
|
8
|
+
icon: a,
|
|
9
|
+
content: o,
|
|
10
|
+
text: s,
|
|
11
|
+
action: c,
|
|
12
|
+
banner: l,
|
|
13
|
+
sm: u,
|
|
14
|
+
title: d,
|
|
15
|
+
message: f,
|
|
16
|
+
close: p
|
|
17
|
+
};
|
|
18
|
+
export { c as action, l as banner, p as close, o as content, i as danger, m as default, a as icon, t as info, f as message, e as root, u as sm, n as success, s as text, d as title, r as warning };
|
|
@@ -1,57 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import e from "./Avatar.module.js";
|
|
2
|
+
import { forwardRef as t, useEffect as n, useState as r } from "react";
|
|
3
|
+
import i from "clsx";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Avatar/Avatar.tsx
|
|
6
|
+
function s(e) {
|
|
7
|
+
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
8
|
+
return t.length === 0 ? "" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[t.length - 1][0]).toUpperCase();
|
|
8
9
|
}
|
|
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
|
-
C.displayName = "Avatar";
|
|
52
|
-
function U() {
|
|
53
|
-
return /* @__PURE__ */ a("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", width: "60%", height: "60%", children: /* @__PURE__ */ a("path", { d: "M12 12a5 5 0 100-10 5 5 0 000 10zm0 2c-4.4 0-8 2.7-8 6v1h16v-1c0-3.3-3.6-6-8-6z" }) });
|
|
10
|
+
var c = t(({ src: t, alt: c, name: u, fallback: d, size: f = "md", shape: p = "circle", status: m, classes: h, className: g, ..._ }, v) => {
|
|
11
|
+
let [y, b] = r(!1);
|
|
12
|
+
n(() => b(!1), [t]);
|
|
13
|
+
let x = t && !y, S = u ? s(u) : "";
|
|
14
|
+
return /* @__PURE__ */ o("span", {
|
|
15
|
+
ref: v,
|
|
16
|
+
className: i(e.root, e[f], e[p], h?.root, g),
|
|
17
|
+
..._,
|
|
18
|
+
children: [x ? /* @__PURE__ */ a("img", {
|
|
19
|
+
className: i(e.image, h?.image),
|
|
20
|
+
src: t,
|
|
21
|
+
alt: c ?? u ?? "",
|
|
22
|
+
onError: () => b(!0)
|
|
23
|
+
}) : /* @__PURE__ */ a("span", {
|
|
24
|
+
className: i(e.fallback, h?.fallback),
|
|
25
|
+
role: "img",
|
|
26
|
+
"aria-label": c ?? u ?? "Avatar",
|
|
27
|
+
children: d ?? (S || /* @__PURE__ */ a(l, {}))
|
|
28
|
+
}), m && /* @__PURE__ */ a("span", {
|
|
29
|
+
className: i(e.status, e[`status_${m}`], h?.status),
|
|
30
|
+
"data-status": m,
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
c.displayName = "Avatar";
|
|
36
|
+
function l() {
|
|
37
|
+
return /* @__PURE__ */ a("svg", {
|
|
38
|
+
viewBox: "0 0 24 24",
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
width: "60%",
|
|
42
|
+
height: "60%",
|
|
43
|
+
children: /* @__PURE__ */ a("path", { d: "M12 12a5 5 0 100-10 5 5 0 000 10zm0 2c-4.4 0-8 2.7-8 6v1h16v-1c0-3.3-3.6-6-8-6z" })
|
|
44
|
+
});
|
|
54
45
|
}
|
|
55
|
-
export {
|
|
56
|
-
C as Avatar
|
|
57
|
-
};
|
|
46
|
+
export { c as Avatar };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/components/Avatar/Avatar.module.scss
|
|
2
|
+
var e = "crk-root-1YbL5", t = "crk-xs-1SMBv", n = "crk-sm-8TB22", r = "crk-md-zeW0d", i = "crk-lg-MWKN-", a = "crk-xl-KCqIL", o = "crk-circle-nzLby", s = "crk-square-JrlyG", c = "crk-image-HFFlp", l = "crk-fallback-R4J-V", u = "crk-status-e4HnT", d = "crk-status_online-bny3b", f = "crk-status_online-bny3b", p = "crk-status_offline-xxp2c", m = "crk-status_offline-xxp2c", h = "crk-status_away-coReU", g = "crk-status_away-coReU", _ = "crk-status_busy-aOHjE", v = "crk-status_busy-aOHjE", y = {
|
|
3
|
+
root: e,
|
|
4
|
+
xs: t,
|
|
5
|
+
sm: n,
|
|
6
|
+
md: r,
|
|
7
|
+
lg: i,
|
|
8
|
+
xl: a,
|
|
9
|
+
circle: o,
|
|
10
|
+
square: s,
|
|
11
|
+
image: c,
|
|
12
|
+
fallback: l,
|
|
13
|
+
status: u,
|
|
14
|
+
status_online: d,
|
|
15
|
+
statusOnline: f,
|
|
16
|
+
status_offline: p,
|
|
17
|
+
statusOffline: m,
|
|
18
|
+
status_away: h,
|
|
19
|
+
statusAway: g,
|
|
20
|
+
status_busy: _,
|
|
21
|
+
statusBusy: v
|
|
22
|
+
};
|
|
23
|
+
export { o as circle, y as default, l as fallback, c as image, i as lg, r as md, e as root, n as sm, s as square, u as status, g as statusAway, v as statusBusy, m as statusOffline, f as statusOnline, h as status_away, _ as status_busy, p as status_offline, d as status_online, a as xl, t as xs };
|
|
@@ -1,38 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import r from "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
ref: p,
|
|
19
|
-
className: t(
|
|
20
|
-
r.root,
|
|
21
|
-
r[a],
|
|
22
|
-
r[e],
|
|
23
|
-
r[s],
|
|
24
|
-
o?.root,
|
|
25
|
-
d
|
|
26
|
-
),
|
|
27
|
-
...i,
|
|
28
|
-
children: [
|
|
29
|
-
m && /* @__PURE__ */ n("span", { className: t(r.dot, o?.dot), "aria-hidden": "true" }),
|
|
30
|
-
f
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
);
|
|
35
|
-
x.displayName = "Badge";
|
|
36
|
-
export {
|
|
37
|
-
x as Badge
|
|
38
|
-
};
|
|
1
|
+
import e from "./Badge.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Badge/Badge.tsx
|
|
6
|
+
var a = t(({ variant: t = "neutral", appearance: a = "soft", size: o = "md", dot: s = !1, classes: c, className: l, children: u, ...d }, f) => /* @__PURE__ */ i("span", {
|
|
7
|
+
ref: f,
|
|
8
|
+
className: n(e.root, e[t], e[a], e[o], c?.root, l),
|
|
9
|
+
...d,
|
|
10
|
+
children: [s && /* @__PURE__ */ r("span", {
|
|
11
|
+
className: n(e.dot, c?.dot),
|
|
12
|
+
"aria-hidden": "true"
|
|
13
|
+
}), u]
|
|
14
|
+
}));
|
|
15
|
+
a.displayName = "Badge";
|
|
16
|
+
export { a as Badge };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/components/Badge/Badge.module.scss
|
|
2
|
+
var e = "crk-root-KSuIQ", t = "crk-sm--vFVn", n = "crk-md-zmWkB", r = "crk-lg-vhZlR", i = "crk-neutral-RdrgV", a = "crk-primary-wn6-R", o = "crk-success-DMnu3", s = "crk-warning-4IHkk", c = "crk-danger-nwbtA", l = "crk-soft-D7eFo", u = "crk-solid-OAgyP", d = "crk-outline-2IwcH", f = "crk-dot-KeAKh", p = {
|
|
3
|
+
root: e,
|
|
4
|
+
sm: t,
|
|
5
|
+
md: n,
|
|
6
|
+
lg: r,
|
|
7
|
+
neutral: i,
|
|
8
|
+
primary: a,
|
|
9
|
+
success: o,
|
|
10
|
+
warning: s,
|
|
11
|
+
danger: c,
|
|
12
|
+
soft: l,
|
|
13
|
+
solid: u,
|
|
14
|
+
outline: d,
|
|
15
|
+
dot: f
|
|
16
|
+
};
|
|
17
|
+
export { c as danger, p as default, f as dot, r as lg, n as md, i as neutral, d as outline, a as primary, e as root, t as sm, l as soft, u as solid, o as success, s as warning };
|
|
@@ -24,7 +24,7 @@ export interface BreadcrumbItemProps extends Omit<ComponentPropsWithRef<'li'>, '
|
|
|
24
24
|
current?: boolean;
|
|
25
25
|
children?: ReactNode;
|
|
26
26
|
}
|
|
27
|
-
export declare function BreadcrumbItem({ href, current, children, className, ...rest }: BreadcrumbItemProps): import("react
|
|
27
|
+
export declare function BreadcrumbItem({ href, current, children, className, ...rest }: BreadcrumbItemProps): import("react").JSX.Element;
|
|
28
28
|
export declare namespace BreadcrumbItem {
|
|
29
29
|
var displayName: string;
|
|
30
30
|
}
|
|
@@ -1,49 +1,53 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import e from "./Breadcrumbs.module.js";
|
|
2
|
+
import { Children as t, forwardRef as n, isValidElement as r } from "react";
|
|
3
|
+
import i from "clsx";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
6
|
+
function s({ href: e, current: t = !1, children: n, className: r, ...i }) {
|
|
7
|
+
return /* @__PURE__ */ a("li", {
|
|
8
|
+
className: r,
|
|
9
|
+
...i,
|
|
10
|
+
children: t || !e ? /* @__PURE__ */ a("span", {
|
|
11
|
+
"aria-current": t ? "page" : void 0,
|
|
12
|
+
children: n
|
|
13
|
+
}) : /* @__PURE__ */ a("a", {
|
|
14
|
+
href: e,
|
|
15
|
+
children: n
|
|
16
|
+
})
|
|
17
|
+
});
|
|
7
18
|
}
|
|
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
|
-
h.displayName = "Breadcrumbs";
|
|
45
|
-
const E = Object.assign(h, { Item: f });
|
|
46
|
-
export {
|
|
47
|
-
f as BreadcrumbItem,
|
|
48
|
-
E as Breadcrumbs
|
|
49
|
-
};
|
|
19
|
+
s.displayName = "Breadcrumbs.Item";
|
|
20
|
+
var c = n(({ children: n, separator: s = "/", label: c = "Breadcrumb", classes: l, className: u, ...d }, f) => {
|
|
21
|
+
let p = t.toArray(n).filter(r);
|
|
22
|
+
return /* @__PURE__ */ a("nav", {
|
|
23
|
+
ref: f,
|
|
24
|
+
"aria-label": c,
|
|
25
|
+
className: i(e.root, l?.root, u),
|
|
26
|
+
...d,
|
|
27
|
+
children: /* @__PURE__ */ a("ol", {
|
|
28
|
+
className: i(e.list, l?.list),
|
|
29
|
+
children: p.map((t, n) => {
|
|
30
|
+
let r = n === p.length - 1, { href: c, current: u, children: d, className: f } = t.props ?? {}, m = u ?? r;
|
|
31
|
+
return /* @__PURE__ */ o("li", {
|
|
32
|
+
className: i(e.item, l?.item, f),
|
|
33
|
+
children: [m || !c ? /* @__PURE__ */ a("span", {
|
|
34
|
+
className: i(e.current, l?.current),
|
|
35
|
+
"aria-current": m ? "page" : void 0,
|
|
36
|
+
children: d
|
|
37
|
+
}) : /* @__PURE__ */ a("a", {
|
|
38
|
+
className: i(e.link, l?.link),
|
|
39
|
+
href: c,
|
|
40
|
+
children: d
|
|
41
|
+
}), !r && /* @__PURE__ */ a("span", {
|
|
42
|
+
className: i(e.separator, l?.separator),
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
children: s
|
|
45
|
+
})]
|
|
46
|
+
}, t.key ?? n);
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
c.displayName = "Breadcrumbs";
|
|
52
|
+
var l = Object.assign(c, { Item: s });
|
|
53
|
+
export { s as BreadcrumbItem, l as Breadcrumbs };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/Breadcrumbs/Breadcrumbs.module.scss
|
|
2
|
+
var e = "crk-root-stw2c", t = "crk-list-RGYQR", n = "crk-item-ECyrs", r = "crk-link-B1vub", i = "crk-current-ilnF5", a = "crk-separator-KChd-", o = {
|
|
3
|
+
root: e,
|
|
4
|
+
list: t,
|
|
5
|
+
item: n,
|
|
6
|
+
link: r,
|
|
7
|
+
current: i,
|
|
8
|
+
separator: a
|
|
9
|
+
};
|
|
10
|
+
export { i as current, o as default, n as item, r as link, t as list, e as root, a as separator };
|
|
@@ -1,57 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { forwardRef as
|
|
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
|
-
f
|
|
37
|
-
),
|
|
38
|
-
style: c,
|
|
39
|
-
disabled: p || d,
|
|
40
|
-
"aria-busy": d || void 0,
|
|
41
|
-
...u,
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ a("div", { className: r(o.shimmer, t?.shimmer) }),
|
|
44
|
-
/* @__PURE__ */ a("span", { className: r(o.content, t?.content), children: h }),
|
|
45
|
-
/* @__PURE__ */ m("span", { className: r(o.dots, t?.dots), "aria-hidden": "true", children: [
|
|
46
|
-
/* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) }),
|
|
47
|
-
/* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) }),
|
|
48
|
-
/* @__PURE__ */ a("span", { className: r(o.dot, t?.dot) })
|
|
49
|
-
] })
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
);
|
|
54
|
-
x.displayName = "Button";
|
|
55
|
-
export {
|
|
56
|
-
x as Button
|
|
57
|
-
};
|
|
1
|
+
import e from "./Button.module.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Button/Button.tsx
|
|
6
|
+
var a = {
|
|
7
|
+
dots: e.loadingDots,
|
|
8
|
+
shimmer: e.loadingShimmer,
|
|
9
|
+
border: e.loadingBorder
|
|
10
|
+
}, o = t(({ variant: t = "primary", size: o = "md", loading: s = !1, loadingStyle: c = "dots", fullWidth: l = !1, iconOnly: u = !1, disabled: d, classes: f, className: p, style: m, children: h, ...g }, _) => /* @__PURE__ */ i("button", {
|
|
11
|
+
ref: _,
|
|
12
|
+
className: n(e.root, e[t], e[o], l && e.fullWidth, u && e.iconOnly, s && e.loading, s && a[c], f?.root, p),
|
|
13
|
+
style: m,
|
|
14
|
+
disabled: d || s,
|
|
15
|
+
"aria-busy": s || void 0,
|
|
16
|
+
...g,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ r("div", { className: n(e.shimmer, f?.shimmer) }),
|
|
19
|
+
/* @__PURE__ */ r("span", {
|
|
20
|
+
className: n(e.content, f?.content),
|
|
21
|
+
children: h
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ i("span", {
|
|
24
|
+
className: n(e.dots, f?.dots),
|
|
25
|
+
"aria-hidden": "true",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) }),
|
|
28
|
+
/* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) }),
|
|
29
|
+
/* @__PURE__ */ r("span", { className: n(e.dot, f?.dot) })
|
|
30
|
+
]
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
}));
|
|
34
|
+
o.displayName = "Button";
|
|
35
|
+
export { o as Button };
|