@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,96 +1,93 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
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
|
-
};
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import n from "./Alert.module.scss.js";
|
|
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 = e(({ variant: e = "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[e] : s === !1 ? null : s, y = u == null ? null : /* @__PURE__ */ r("div", {
|
|
49
|
+
className: t(n.action, p?.action),
|
|
50
|
+
children: u
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ i("div", {
|
|
53
|
+
ref: _,
|
|
54
|
+
role: "alert",
|
|
55
|
+
className: t(n.root, n[e], d === "banner" && n.banner, f === "sm" && n.sm, p?.root, m),
|
|
56
|
+
...g,
|
|
57
|
+
children: [
|
|
58
|
+
v != null && /* @__PURE__ */ r("span", {
|
|
59
|
+
className: t(n.icon, p?.icon),
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
children: v
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ i("div", {
|
|
64
|
+
className: t(n.content, p?.content),
|
|
65
|
+
children: [/* @__PURE__ */ i("div", {
|
|
66
|
+
className: n.text,
|
|
67
|
+
children: [o != null && /* @__PURE__ */ r("div", {
|
|
68
|
+
className: t(n.title, p?.title),
|
|
69
|
+
children: o
|
|
70
|
+
}), h != null && /* @__PURE__ */ r("div", {
|
|
71
|
+
className: t(n.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: t(n.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 };
|
|
@@ -1,33 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
i as action,
|
|
19
|
-
k as banner,
|
|
20
|
-
m as close,
|
|
21
|
-
r as content,
|
|
22
|
-
o as danger,
|
|
23
|
-
d as default,
|
|
24
|
-
e as icon,
|
|
25
|
-
n as info,
|
|
26
|
-
u as message,
|
|
27
|
-
c as root,
|
|
28
|
-
g as sm,
|
|
29
|
-
t as success,
|
|
30
|
-
a as text,
|
|
31
|
-
l as title,
|
|
32
|
-
s as warning
|
|
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
|
|
33
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
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { forwardRef as e, useEffect as t, useState as n } from "react";
|
|
2
|
+
import r from "clsx";
|
|
3
|
+
import i from "./Avatar.module.scss.js";
|
|
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 = e(({ src: e, alt: c, name: u, fallback: d, size: f = "md", shape: p = "circle", status: m, classes: h, className: g, ..._ }, v) => {
|
|
11
|
+
let [y, b] = n(!1);
|
|
12
|
+
t(() => b(!1), [e]);
|
|
13
|
+
let x = e && !y, S = u ? s(u) : "";
|
|
14
|
+
return /* @__PURE__ */ o("span", {
|
|
15
|
+
ref: v,
|
|
16
|
+
className: r(i.root, i[f], i[p], h?.root, g),
|
|
17
|
+
..._,
|
|
18
|
+
children: [x ? /* @__PURE__ */ a("img", {
|
|
19
|
+
className: r(i.image, h?.image),
|
|
20
|
+
src: e,
|
|
21
|
+
alt: c ?? u ?? "",
|
|
22
|
+
onError: () => b(!0)
|
|
23
|
+
}) : /* @__PURE__ */ a("span", {
|
|
24
|
+
className: r(i.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: r(i.status, i[`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 };
|
|
@@ -1,43 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
u as circle,
|
|
24
|
-
w as default,
|
|
25
|
-
e as fallback,
|
|
26
|
-
r as image,
|
|
27
|
-
n as lg,
|
|
28
|
-
c as md,
|
|
29
|
-
s as root,
|
|
30
|
-
a as sm,
|
|
31
|
-
l as square,
|
|
32
|
-
k as status,
|
|
33
|
-
x as statusAway,
|
|
34
|
-
g as statusBusy,
|
|
35
|
-
_ as statusOffline,
|
|
36
|
-
y as statusOnline,
|
|
37
|
-
b as status_away,
|
|
38
|
-
m as status_busy,
|
|
39
|
-
f as status_offline,
|
|
40
|
-
i as status_online,
|
|
41
|
-
o as xl,
|
|
42
|
-
t as xs
|
|
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
|
|
43
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 c } from "react";
|
|
1
|
+
import { forwardRef as e } from "react";
|
|
3
2
|
import t from "clsx";
|
|
4
|
-
import
|
|
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
|
-
};
|
|
3
|
+
import n from "./Badge.module.scss.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
// src/components/Badge/Badge.tsx
|
|
6
|
+
var a = e(({ variant: e = "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: t(n.root, n[e], n[a], n[o], c?.root, l),
|
|
9
|
+
...d,
|
|
10
|
+
children: [s && /* @__PURE__ */ r("span", {
|
|
11
|
+
className: t(n.dot, c?.dot),
|
|
12
|
+
"aria-hidden": "true"
|
|
13
|
+
}), u]
|
|
14
|
+
}));
|
|
15
|
+
a.displayName = "Badge";
|
|
16
|
+
export { a as Badge };
|
|
@@ -1,31 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
l as danger,
|
|
18
|
-
g as default,
|
|
19
|
-
u as dot,
|
|
20
|
-
n as lg,
|
|
21
|
-
o as md,
|
|
22
|
-
r as neutral,
|
|
23
|
-
i as outline,
|
|
24
|
-
t as primary,
|
|
25
|
-
s as root,
|
|
26
|
-
c as sm,
|
|
27
|
-
a as soft,
|
|
28
|
-
d as solid,
|
|
29
|
-
e as success,
|
|
30
|
-
k as warning
|
|
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
|
|
31
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 { Children as e, forwardRef as t, isValidElement as n } from "react";
|
|
2
|
+
import r from "clsx";
|
|
3
|
+
import i from "./Breadcrumbs.module.scss.js";
|
|
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 = t(({ children: t, separator: s = "/", label: c = "Breadcrumb", classes: l, className: u, ...d }, f) => {
|
|
21
|
+
let p = e.toArray(t).filter(n);
|
|
22
|
+
return /* @__PURE__ */ a("nav", {
|
|
23
|
+
ref: f,
|
|
24
|
+
"aria-label": c,
|
|
25
|
+
className: r(i.root, l?.root, u),
|
|
26
|
+
...d,
|
|
27
|
+
children: /* @__PURE__ */ a("ol", {
|
|
28
|
+
className: r(i.list, l?.list),
|
|
29
|
+
children: p.map((e, t) => {
|
|
30
|
+
let n = t === p.length - 1, { href: c, current: u, children: d, className: f } = e.props ?? {}, m = u ?? n;
|
|
31
|
+
return /* @__PURE__ */ o("li", {
|
|
32
|
+
className: r(i.item, l?.item, f),
|
|
33
|
+
children: [m || !c ? /* @__PURE__ */ a("span", {
|
|
34
|
+
className: r(i.current, l?.current),
|
|
35
|
+
"aria-current": m ? "page" : void 0,
|
|
36
|
+
children: d
|
|
37
|
+
}) : /* @__PURE__ */ a("a", {
|
|
38
|
+
className: r(i.link, l?.link),
|
|
39
|
+
href: c,
|
|
40
|
+
children: d
|
|
41
|
+
}), !n && /* @__PURE__ */ a("span", {
|
|
42
|
+
className: r(i.separator, l?.separator),
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
children: s
|
|
45
|
+
})]
|
|
46
|
+
}, e.key ?? t);
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
c.displayName = "Breadcrumbs";
|
|
52
|
+
var l = Object.assign(c, { Item: s });
|
|
53
|
+
export { s as BreadcrumbItem, l as Breadcrumbs };
|