@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,86 +1,77 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
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
|
-
document.body
|
|
78
|
-
)
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
);
|
|
1
|
+
import e from "./Tooltip.module.js";
|
|
2
|
+
import { useCallback as t, useEffect as n, useId as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { createPortal as u } from "react-dom";
|
|
6
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
7
|
+
var d = 8;
|
|
8
|
+
function f({ content: f, children: p, placement: m = "top", delay: h = 300, closeDelay: g = 0, disabled: _ = !1, hideArrow: v = !1, classes: y }) {
|
|
9
|
+
let b = a(null), x = a(null), S = a(null), [C, w] = o(!1), [T, E] = o(m), [D, O] = o({
|
|
10
|
+
top: 0,
|
|
11
|
+
left: 0
|
|
12
|
+
}), k = r(), A = t(() => {
|
|
13
|
+
S.current &&= (clearTimeout(S.current), null);
|
|
14
|
+
}, []), j = t(() => {
|
|
15
|
+
_ || f == null || f === "" || (A(), S.current = setTimeout(() => w(!0), h));
|
|
16
|
+
}, [
|
|
17
|
+
_,
|
|
18
|
+
f,
|
|
19
|
+
A,
|
|
20
|
+
h
|
|
21
|
+
]), M = t(() => {
|
|
22
|
+
A(), g > 0 ? S.current = setTimeout(() => w(!1), g) : w(!1);
|
|
23
|
+
}, [A, g]);
|
|
24
|
+
n(() => A, [A]), i(() => {
|
|
25
|
+
if (!C) return;
|
|
26
|
+
let e = () => {
|
|
27
|
+
let e = b.current, t = x.current;
|
|
28
|
+
if (!e || !t) return;
|
|
29
|
+
let n = e.getBoundingClientRect(), r = t.offsetWidth, i = t.offsetHeight, a = typeof window < "u" ? window.innerWidth : 0, o = typeof window < "u" ? window.innerHeight : 0, s = (e) => e === "top" ? n.top - i - d >= 0 : e === "bottom" ? n.bottom + i + d <= o : e === "left" ? n.left - r - d >= 0 : n.right + r + d <= a, c = {
|
|
30
|
+
top: "bottom",
|
|
31
|
+
bottom: "top",
|
|
32
|
+
left: "right",
|
|
33
|
+
right: "left"
|
|
34
|
+
}, l = s(m) || !s(c[m]) ? m : c[m], u = 0, f = 0;
|
|
35
|
+
l === "top" || l === "bottom" ? (f = n.left + n.width / 2 - r / 2, u = l === "top" ? n.top - i - d : n.bottom + d) : (u = n.top + n.height / 2 - i / 2, f = l === "left" ? n.left - r - d : n.right + d), f = Math.max(d, Math.min(f, a - r - d)), u = Math.max(d, Math.min(u, o - i - d)), E(l), O({
|
|
36
|
+
top: u,
|
|
37
|
+
left: f
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
if (e(), typeof window < "u") return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
41
|
+
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
42
|
+
};
|
|
43
|
+
}, [C, m]), n(() => {
|
|
44
|
+
if (!C) return;
|
|
45
|
+
let e = (e) => {
|
|
46
|
+
e.key === "Escape" && w(!1);
|
|
47
|
+
};
|
|
48
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
49
|
+
}, [C]);
|
|
50
|
+
let N = C ? k : void 0, P = {
|
|
51
|
+
position: "fixed",
|
|
52
|
+
top: D.top,
|
|
53
|
+
left: D.left
|
|
54
|
+
};
|
|
55
|
+
return /* @__PURE__ */ l("span", {
|
|
56
|
+
ref: b,
|
|
57
|
+
className: s(e.wrapper, y?.wrapper),
|
|
58
|
+
onMouseEnter: j,
|
|
59
|
+
onMouseLeave: M,
|
|
60
|
+
onFocus: j,
|
|
61
|
+
onBlur: M,
|
|
62
|
+
"aria-describedby": N,
|
|
63
|
+
children: [p, C && typeof document < "u" && u(/* @__PURE__ */ l("div", {
|
|
64
|
+
ref: x,
|
|
65
|
+
id: k,
|
|
66
|
+
role: "tooltip",
|
|
67
|
+
className: s(e.tooltip, e[`p_${T}`], y?.tooltip),
|
|
68
|
+
style: P,
|
|
69
|
+
children: [f, !v && /* @__PURE__ */ c("span", {
|
|
70
|
+
className: s(e.arrow, y?.arrow),
|
|
71
|
+
"aria-hidden": "true"
|
|
72
|
+
})]
|
|
73
|
+
}), document.body)]
|
|
74
|
+
});
|
|
82
75
|
}
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
V as Tooltip
|
|
86
|
-
};
|
|
76
|
+
f.displayName = "Tooltip";
|
|
77
|
+
export { f as Tooltip };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/components/Tooltip/Tooltip.module.scss
|
|
2
|
+
var e = "crk-wrapper-V567h", t = "crk-tooltip-LjRUX", n = "crk-crk-tooltip-in-JCAKo", r = "crk-arrow-6yECM", i = "crk-p_top-I9ELz", a = "crk-p_top-I9ELz", o = "crk-p_bottom-S3gQ1", s = "crk-p_bottom-S3gQ1", c = "crk-p_left--Bx3l", l = "crk-p_left--Bx3l", u = "crk-p_right-3Wuqv", d = "crk-p_right-3Wuqv", f = {
|
|
3
|
+
wrapper: e,
|
|
4
|
+
tooltip: t,
|
|
5
|
+
"crk-tooltip-in": "crk-crk-tooltip-in-JCAKo",
|
|
6
|
+
crkTooltipIn: n,
|
|
7
|
+
arrow: r,
|
|
8
|
+
p_top: i,
|
|
9
|
+
pTop: a,
|
|
10
|
+
p_bottom: o,
|
|
11
|
+
pBottom: s,
|
|
12
|
+
p_left: c,
|
|
13
|
+
pLeft: l,
|
|
14
|
+
p_right: u,
|
|
15
|
+
pRight: d
|
|
16
|
+
};
|
|
17
|
+
export { r as arrow, n as crkTooltipIn, f as default, s as pBottom, l as pLeft, d as pRight, a as pTop, o as p_bottom, c as p_left, u as p_right, i as p_top, t as tooltip, e as wrapper };
|
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import r from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: a,
|
|
12
|
-
style: s,
|
|
13
|
-
children: f,
|
|
14
|
-
...y
|
|
15
|
-
}, l) => n(
|
|
16
|
-
e,
|
|
17
|
-
{
|
|
18
|
-
ref: l,
|
|
19
|
-
className: d(
|
|
20
|
-
r.root,
|
|
21
|
-
r[e],
|
|
22
|
-
o && r[o],
|
|
23
|
-
p && r[p],
|
|
24
|
-
t && r[`align-${t}`],
|
|
25
|
-
m && r.truncate,
|
|
26
|
-
a
|
|
27
|
-
),
|
|
28
|
-
style: s,
|
|
29
|
-
...y
|
|
30
|
-
},
|
|
31
|
-
f
|
|
32
|
-
)
|
|
33
|
-
);
|
|
1
|
+
import e from "./Typography.module.js";
|
|
2
|
+
import { createElement as t, forwardRef as n } from "react";
|
|
3
|
+
import r from "clsx";
|
|
4
|
+
// src/components/Typography/Typography.tsx
|
|
5
|
+
var i = n(({ variant: n = "p", weight: i, color: a, align: o, truncate: s = !1, className: c, style: l, children: u, ...d }, f) => t(n, {
|
|
6
|
+
ref: f,
|
|
7
|
+
className: r(e.root, e[n], i && e[i], a && e[a], o && e[`align-${o}`], s && e.truncate, c),
|
|
8
|
+
style: l,
|
|
9
|
+
...d
|
|
10
|
+
}, u));
|
|
34
11
|
i.displayName = "Typography";
|
|
35
|
-
export {
|
|
36
|
-
i as Typography
|
|
37
|
-
};
|
|
12
|
+
export { i as Typography };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/components/Typography/Typography.module.scss
|
|
2
|
+
var e = "crk-root-U-oiq", t = "crk-h1-Aivwz", n = "crk-h2-CV8Oo", r = "crk-h3-lrbrK", i = "crk-h4--jkC1", a = "crk-h5-GnQvD", o = "crk-h6-MKlIN", s = "crk-p-FzRtm", c = "crk-span-NZvLx", l = "crk-label-Cwi6a", u = "crk-normal-7AeZz", d = "crk-medium-36OXr", f = "crk-semibold-oQixc", p = "crk-bold-bk4b4", m = "crk-muted-itOSW", h = "crk-primary-rp36t", g = "crk-danger-SyOy-", _ = "crk-success-w8PpD", v = "crk-align-left-3AGYw", y = "crk-align-center-h-x--", b = "crk-align-right-IXFhK", x = "crk-truncate-eqr85", S = {
|
|
3
|
+
root: e,
|
|
4
|
+
h1: t,
|
|
5
|
+
h2: n,
|
|
6
|
+
h3: r,
|
|
7
|
+
h4: i,
|
|
8
|
+
h5: a,
|
|
9
|
+
h6: o,
|
|
10
|
+
p: s,
|
|
11
|
+
span: c,
|
|
12
|
+
label: l,
|
|
13
|
+
normal: u,
|
|
14
|
+
medium: d,
|
|
15
|
+
semibold: f,
|
|
16
|
+
bold: p,
|
|
17
|
+
default: "crk-default-79lKR",
|
|
18
|
+
muted: m,
|
|
19
|
+
primary: h,
|
|
20
|
+
danger: g,
|
|
21
|
+
success: _,
|
|
22
|
+
"align-left": "crk-align-left-3AGYw",
|
|
23
|
+
alignLeft: v,
|
|
24
|
+
"align-center": "crk-align-center-h-x--",
|
|
25
|
+
alignCenter: y,
|
|
26
|
+
"align-right": "crk-align-right-IXFhK",
|
|
27
|
+
alignRight: b,
|
|
28
|
+
truncate: x
|
|
29
|
+
};
|
|
30
|
+
export { y as alignCenter, v as alignLeft, b as alignRight, p as bold, g as danger, S as default, t as h1, n as h2, r as h3, i as h4, a as h5, o as h6, l as label, d as medium, m as muted, u as normal, s as p, h as primary, e as root, f as semibold, c as span, _ as success, x as truncate };
|
|
@@ -1,51 +1,27 @@
|
|
|
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
|
-
style: h,
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ f(
|
|
32
|
-
"input",
|
|
33
|
-
{
|
|
34
|
-
ref: (c) => {
|
|
35
|
-
i.current = c, typeof t == "function" ? t(c) : t && (t.current = c);
|
|
36
|
-
},
|
|
37
|
-
type: "checkbox",
|
|
38
|
-
className: s(e.input, n && e.switchInput, p && e.error, r?.input),
|
|
39
|
-
...x
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
a && /* @__PURE__ */ f("span", { className: s(e.label, r?.label), children: a })
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
y.displayName = "Checkbox";
|
|
49
|
-
export {
|
|
50
|
-
y as Checkbox
|
|
51
|
-
};
|
|
1
|
+
import e from "./Checkbox.module.js";
|
|
2
|
+
import { forwardRef as t, useEffect as n, useRef as r } from "react";
|
|
3
|
+
import i from "clsx";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
// src/components/inputs/Checkbox/Checkbox.tsx
|
|
6
|
+
var s = t(({ label: t, variant: s = "checkbox", indeterminate: c = !1, error: l = !1, classes: u, className: d, style: f, ...p }, m) => {
|
|
7
|
+
let h = r(null), g = s === "switch", _ = c && !g;
|
|
8
|
+
return n(() => {
|
|
9
|
+
h.current && (h.current.indeterminate = _);
|
|
10
|
+
}, [_]), /* @__PURE__ */ o("label", {
|
|
11
|
+
className: i(e.root, g && e.switchRoot, _ && e.indeterminate, u?.root, d),
|
|
12
|
+
style: f,
|
|
13
|
+
children: [/* @__PURE__ */ a("input", {
|
|
14
|
+
ref: (e) => {
|
|
15
|
+
h.current = e, typeof m == "function" ? m(e) : m && (m.current = e);
|
|
16
|
+
},
|
|
17
|
+
type: "checkbox",
|
|
18
|
+
className: i(e.input, g && e.switchInput, l && e.error, u?.input),
|
|
19
|
+
...p
|
|
20
|
+
}), t && /* @__PURE__ */ a("span", {
|
|
21
|
+
className: i(e.label, u?.label),
|
|
22
|
+
children: t
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
s.displayName = "Checkbox";
|
|
27
|
+
export { s as Checkbox };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/components/inputs/Checkbox/Checkbox.module.scss
|
|
2
|
+
var e = "crk-root-61cKD", t = "crk-input-bAjPU", n = "crk-error-8Cdk6", r = "crk-switchInput-Ichse", i = "crk-label-W9IeS", a = "crk-indeterminate-mLarv", o = {
|
|
3
|
+
root: e,
|
|
4
|
+
input: t,
|
|
5
|
+
error: n,
|
|
6
|
+
switchInput: r,
|
|
7
|
+
label: i,
|
|
8
|
+
indeterminate: a
|
|
9
|
+
};
|
|
10
|
+
export { o as default, n as error, a as indeterminate, t as input, i as label, e as root, r as switchInput };
|
|
@@ -1,111 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import i from "
|
|
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
|
-
style: v,
|
|
56
|
-
children: p.map((e) => {
|
|
57
|
-
const r = a.includes(e.value), c = m || e.disabled;
|
|
58
|
-
return d === "chips" ? /* @__PURE__ */ w(
|
|
59
|
-
"button",
|
|
60
|
-
{
|
|
61
|
-
type: "button",
|
|
62
|
-
role: "checkbox",
|
|
63
|
-
"aria-checked": r,
|
|
64
|
-
disabled: c,
|
|
65
|
-
className: o(
|
|
66
|
-
i.chip,
|
|
67
|
-
R,
|
|
68
|
-
r && i.chipSelected,
|
|
69
|
-
h && r && i.chipChecked,
|
|
70
|
-
l?.option,
|
|
71
|
-
l?.chip,
|
|
72
|
-
r && l?.chipSelected
|
|
73
|
-
),
|
|
74
|
-
onClick: () => n(e.value),
|
|
75
|
-
children: [
|
|
76
|
-
h && // Always rendered so it can transition; collapsed to zero
|
|
77
|
-
// width when unselected, expanding in when selected. Padding
|
|
78
|
-
// stays symmetric, so the icon + label remain centered.
|
|
79
|
-
/* @__PURE__ */ s(
|
|
80
|
-
"span",
|
|
81
|
-
{
|
|
82
|
-
className: o(i.chipCheck, r && i.chipCheckVisible),
|
|
83
|
-
"aria-hidden": "true"
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
e.label
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
e.value
|
|
90
|
-
) : /* @__PURE__ */ s(
|
|
91
|
-
D,
|
|
92
|
-
{
|
|
93
|
-
name: x,
|
|
94
|
-
value: e.value,
|
|
95
|
-
label: e.label,
|
|
96
|
-
checked: r,
|
|
97
|
-
disabled: c,
|
|
98
|
-
className: o(i.option, l?.option),
|
|
99
|
-
onChange: () => n(e.value)
|
|
100
|
-
},
|
|
101
|
-
e.value
|
|
102
|
-
);
|
|
103
|
-
})
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
O.displayName = "CheckboxGroup";
|
|
109
|
-
export {
|
|
110
|
-
O as CheckboxGroup
|
|
111
|
-
};
|
|
1
|
+
import { Checkbox as e } from "./Checkbox.js";
|
|
2
|
+
import t from "./CheckboxGroup.module.js";
|
|
3
|
+
import { forwardRef as n } from "react";
|
|
4
|
+
import r from "clsx";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
// src/components/inputs/Checkbox/CheckboxGroup.tsx
|
|
7
|
+
var o = n(({ options: n, value: o = [], onChange: s, variant: c = "checkbox", chipShape: l = "pill", chipCheckmark: u = !0, orientation: d, disabled: f = !1, error: p = !1, name: m, classes: h, className: g, style: _, id: v, "aria-label": y, "aria-labelledby": b, "aria-describedby": x, "aria-invalid": S, required: C }, w) => {
|
|
8
|
+
let T = d ?? (c === "chips" ? "horizontal" : "vertical"), E = {
|
|
9
|
+
pill: t.chipPill,
|
|
10
|
+
rounded: t.chipRounded,
|
|
11
|
+
square: t.chipSquare
|
|
12
|
+
}[l], D = (e) => {
|
|
13
|
+
let t = o.includes(e) ? o.filter((t) => t !== e) : [...o, e];
|
|
14
|
+
s?.(t);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ i("div", {
|
|
17
|
+
ref: w,
|
|
18
|
+
id: v,
|
|
19
|
+
role: "group",
|
|
20
|
+
"aria-label": y,
|
|
21
|
+
"aria-labelledby": b,
|
|
22
|
+
"aria-describedby": x,
|
|
23
|
+
"aria-invalid": S,
|
|
24
|
+
"aria-required": C || void 0,
|
|
25
|
+
className: r(t.group, t[T], c === "chips" && t.chipsGroup, p && t.error, h?.group, g),
|
|
26
|
+
style: _,
|
|
27
|
+
children: n.map((n) => {
|
|
28
|
+
let s = o.includes(n.value), l = f || n.disabled;
|
|
29
|
+
return c === "chips" ? /* @__PURE__ */ a("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
role: "checkbox",
|
|
32
|
+
"aria-checked": s,
|
|
33
|
+
disabled: l,
|
|
34
|
+
className: r(t.chip, E, s && t.chipSelected, u && s && t.chipChecked, h?.option, h?.chip, s && h?.chipSelected),
|
|
35
|
+
onClick: () => D(n.value),
|
|
36
|
+
children: [u && /* @__PURE__ */ i("span", {
|
|
37
|
+
className: r(t.chipCheck, s && t.chipCheckVisible),
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}), n.label]
|
|
40
|
+
}, n.value) : /* @__PURE__ */ i(e, {
|
|
41
|
+
name: m,
|
|
42
|
+
value: n.value,
|
|
43
|
+
label: n.label,
|
|
44
|
+
checked: s,
|
|
45
|
+
disabled: l,
|
|
46
|
+
className: r(t.option, h?.option),
|
|
47
|
+
onChange: () => D(n.value)
|
|
48
|
+
}, n.value);
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
o.displayName = "CheckboxGroup";
|
|
53
|
+
export { o as CheckboxGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/components/inputs/Checkbox/CheckboxGroup.module.scss
|
|
2
|
+
var e = "crk-group-3jaV7", t = "crk-vertical--i2tD", n = "crk-horizontal-4qzrj", r = "crk-chipsGroup-jyDEd", i = "crk-chip-NYeqm", a = "crk-chipPill-DfnpS", o = "crk-chipRounded-oi-hI", s = "crk-chipSquare-ZcbQB", c = "crk-chipCheck-4nqaQ", l = "crk-chipCheckVisible-nGulJ", u = "crk-chipChecked-4h2bc", d = "crk-chipSelected-qbOpf", f = "crk-error-phPRL", p = {
|
|
3
|
+
group: e,
|
|
4
|
+
vertical: t,
|
|
5
|
+
horizontal: n,
|
|
6
|
+
chipsGroup: r,
|
|
7
|
+
chip: i,
|
|
8
|
+
chipPill: a,
|
|
9
|
+
chipRounded: o,
|
|
10
|
+
chipSquare: s,
|
|
11
|
+
chipCheck: c,
|
|
12
|
+
chipCheckVisible: l,
|
|
13
|
+
chipChecked: u,
|
|
14
|
+
chipSelected: d,
|
|
15
|
+
error: f
|
|
16
|
+
};
|
|
17
|
+
export { i as chip, c as chipCheck, l as chipCheckVisible, u as chipChecked, a as chipPill, o as chipRounded, d as chipSelected, s as chipSquare, r as chipsGroup, p as default, f as error, e as group, n as horizontal, t as vertical };
|
|
@@ -37,4 +37,4 @@ export interface CalendarPanelProps {
|
|
|
37
37
|
* `Date`s, so a parent that renders another time zone passes wall-clock
|
|
38
38
|
* proxies.
|
|
39
39
|
*/
|
|
40
|
-
export declare function CalendarPanel({ viewDate, focusedDate, selected, today, minDay, maxDay, locale, weekStartsOn, isDisabledDay, onSelect, onViewDateChange, onFocusedDateChange, onEscape, classes, }: CalendarPanelProps): import("react
|
|
40
|
+
export declare function CalendarPanel({ viewDate, focusedDate, selected, today, minDay, maxDay, locale, weekStartsOn, isDisabledDay, onSelect, onViewDateChange, onFocusedDateChange, onEscape, classes, }: CalendarPanelProps): import("react").JSX.Element;
|