@forgedevstack/bear 1.1.9 → 1.2.1
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/README.md +4 -0
- package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
- package/dist/components/AlertDialog/AlertDialog.const.cjs +1 -1
- package/dist/components/AlertDialog/AlertDialog.const.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.const.js +4 -4
- package/dist/components/AlertDialog/AlertDialog.js +76 -62
- package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
- package/dist/components/Autocomplete/Autocomplete.const.cjs +1 -0
- package/dist/components/Autocomplete/Autocomplete.const.d.ts +1 -0
- package/dist/components/Autocomplete/Autocomplete.const.js +4 -0
- package/dist/components/Autocomplete/Autocomplete.js +110 -72
- package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +74 -53
- package/dist/components/BottomSheet/BottomSheet.types.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +126 -46
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +11 -4
- package/dist/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.js +3 -2
- package/dist/components/Cascader/Cascader.cjs +1 -1
- package/dist/components/Cascader/Cascader.const.cjs +1 -1
- package/dist/components/Cascader/Cascader.const.d.ts +1 -1
- package/dist/components/Cascader/Cascader.const.js +1 -1
- package/dist/components/Cascader/Cascader.js +109 -146
- package/dist/components/Cascader/components/CascaderPanel/CascaderPanel.cjs +1 -0
- package/dist/components/Cascader/components/CascaderPanel/CascaderPanel.d.ts +3 -0
- package/dist/components/Cascader/components/CascaderPanel/CascaderPanel.js +50 -0
- package/dist/components/Cascader/components/CascaderPanel/index.d.ts +1 -0
- package/dist/components/Chart/BarChart.cjs +1 -0
- package/dist/components/Chart/BarChart.d.ts +3 -0
- package/dist/components/Chart/BarChart.js +65 -0
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -1
- package/dist/components/Chart/Chart.const.d.ts +7 -0
- package/dist/components/Chart/Chart.const.js +12 -2
- package/dist/components/Chart/Chart.d.ts +1 -13
- package/dist/components/Chart/Chart.js +18 -204
- package/dist/components/Chart/Chart.types.d.ts +7 -1
- package/dist/components/Chart/LineChart.cjs +1 -0
- package/dist/components/Chart/LineChart.d.ts +3 -0
- package/dist/components/Chart/LineChart.js +73 -0
- package/dist/components/Chart/PieChart.cjs +1 -0
- package/dist/components/Chart/PieChart.d.ts +3 -0
- package/dist/components/Chart/PieChart.js +110 -0
- package/dist/components/Chart/index.d.ts +4 -1
- package/dist/components/CloseButton/CloseButton.cjs +1 -0
- package/dist/components/CloseButton/CloseButton.d.ts +4 -0
- package/dist/components/CloseButton/CloseButton.js +60 -0
- package/dist/components/CloseButton/CloseButton.types.d.ts +15 -0
- package/dist/components/CloseButton/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.const.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.const.d.ts +4 -2
- package/dist/components/ColorPicker/ColorPicker.const.js +8 -6
- package/dist/components/ColorPicker/ColorPicker.js +135 -73
- package/dist/components/ColorPicker/ColorPicker.utils.cjs +1 -0
- package/dist/components/ColorPicker/ColorPicker.utils.d.ts +17 -0
- package/dist/components/ColorPicker/ColorPicker.utils.js +43 -0
- package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
- package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -1
- package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +2 -0
- package/dist/components/CountdownTimer/CountdownTimer.const.js +29 -17
- package/dist/components/CountdownTimer/CountdownTimer.js +91 -61
- package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +11 -2
- package/dist/components/CreditInput/CreditInput.cjs +1 -1
- package/dist/components/CreditInput/CreditInput.js +80 -78
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +12 -11
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +89 -84
- package/dist/components/DiffSquares/DiffSquares.cjs +1 -0
- package/dist/components/DiffSquares/DiffSquares.const.cjs +1 -0
- package/dist/components/DiffSquares/DiffSquares.const.d.ts +3 -0
- package/dist/components/DiffSquares/DiffSquares.const.js +6 -0
- package/dist/components/DiffSquares/DiffSquares.d.ts +3 -0
- package/dist/components/DiffSquares/DiffSquares.js +70 -0
- package/dist/components/DiffSquares/DiffSquares.types.d.ts +23 -0
- package/dist/components/DiffSquares/DiffSquares.utils.cjs +1 -0
- package/dist/components/DiffSquares/DiffSquares.utils.d.ts +3 -0
- package/dist/components/DiffSquares/DiffSquares.utils.js +12 -0
- package/dist/components/DiffSquares/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.js +41 -41
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.const.cjs +1 -0
- package/dist/components/Dropdown/Dropdown.const.d.ts +7 -0
- package/dist/components/Dropdown/Dropdown.const.js +10 -0
- package/dist/components/Dropdown/Dropdown.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.js +102 -92
- package/dist/components/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/components/Gauge/Gauge.cjs +1 -1
- package/dist/components/Gauge/Gauge.js +61 -50
- package/dist/components/Gauge/Gauge.types.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.cjs +6 -6
- package/dist/components/HoverCard/HoverCard.js +72 -54
- package/dist/components/Icon/icons/commerce.cjs +1 -0
- package/dist/components/Icon/icons/commerce.d.ts +25 -0
- package/dist/components/Icon/icons/commerce.js +124 -0
- package/dist/components/Icon/icons/device.cjs +1 -0
- package/dist/components/Icon/icons/device.d.ts +27 -0
- package/dist/components/Icon/icons/device.js +122 -0
- package/dist/components/Icon/icons/file.cjs +1 -0
- package/dist/components/Icon/icons/file.d.ts +25 -0
- package/dist/components/Icon/icons/file.js +120 -0
- package/dist/components/Icon/icons/social.cjs +1 -0
- package/dist/components/Icon/icons/social.d.ts +24 -0
- package/dist/components/Icon/icons/social.js +89 -0
- package/dist/components/Icon/icons/status.js +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +93 -56
- package/dist/components/Icon/index.js +38 -26
- package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
- package/dist/components/MentionsInput/MentionsInput.js +106 -83
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.js +91 -80
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.const.cjs +1 -1
- package/dist/components/Modal/Modal.const.d.ts +1 -1
- package/dist/components/Modal/Modal.const.js +1 -1
- package/dist/components/Modal/Modal.js +50 -44
- package/dist/components/Modal/Modal.types.d.ts +6 -0
- package/dist/components/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +123 -78
- package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -1
- package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -1
- package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +1 -1
- package/dist/components/NavigableSelect/NavigableSelect.const.js +1 -1
- package/dist/components/NavigableSelect/NavigableSelect.js +167 -143
- package/dist/components/NotificationCenter/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.const.cjs +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.const.d.ts +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.const.js +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.js +87 -81
- package/dist/components/OTPInput/OTPInput.cjs +1 -1
- package/dist/components/OTPInput/OTPInput.const.cjs +1 -0
- package/dist/components/OTPInput/OTPInput.const.d.ts +6 -0
- package/dist/components/OTPInput/OTPInput.const.js +14 -0
- package/dist/components/OTPInput/OTPInput.js +99 -65
- package/dist/components/OTPInput/OTPInput.types.d.ts +7 -0
- package/dist/components/Overlay/Overlay.cjs +1 -0
- package/dist/components/Overlay/Overlay.d.ts +4 -0
- package/dist/components/Overlay/Overlay.js +38 -0
- package/dist/components/Overlay/Overlay.types.d.ts +23 -0
- package/dist/components/Overlay/index.d.ts +2 -0
- package/dist/components/PhoneInput/PhoneInput.cjs +1 -1
- package/dist/components/PhoneInput/PhoneInput.const.cjs +1 -1
- package/dist/components/PhoneInput/PhoneInput.const.d.ts +1 -1
- package/dist/components/PhoneInput/PhoneInput.const.js +1 -1
- package/dist/components/PhoneInput/PhoneInput.js +88 -83
- package/dist/components/Popconfirm/Popconfirm.cjs +1 -1
- package/dist/components/Popconfirm/Popconfirm.const.cjs +1 -1
- package/dist/components/Popconfirm/Popconfirm.const.d.ts +1 -3
- package/dist/components/Popconfirm/Popconfirm.const.js +12 -18
- package/dist/components/Popconfirm/Popconfirm.js +71 -51
- package/dist/components/Popover/Popover.cjs +1 -1
- package/dist/components/Popover/Popover.js +36 -31
- package/dist/components/Portal/Portal.cjs +1 -0
- package/dist/components/Portal/Portal.d.ts +8 -0
- package/dist/components/Portal/Portal.js +6 -0
- package/dist/components/Portal/index.d.ts +2 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +71 -51
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.const.cjs +1 -1
- package/dist/components/Stepper/Stepper.const.d.ts +3 -2
- package/dist/components/Stepper/Stepper.const.js +15 -14
- package/dist/components/Stepper/Stepper.d.ts +0 -7
- package/dist/components/Stepper/Stepper.js +164 -117
- package/dist/components/Stepper/Stepper.types.d.ts +3 -0
- package/dist/components/Tabs/TabList.cjs +1 -1
- package/dist/components/Tabs/TabList.js +72 -57
- package/dist/components/Tabs/Tabs.types.d.ts +4 -2
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/ThemeIcon/ThemeIcon.cjs +1 -0
- package/dist/components/ThemeIcon/ThemeIcon.d.ts +4 -0
- package/dist/components/ThemeIcon/ThemeIcon.js +54 -0
- package/dist/components/ThemeIcon/ThemeIcon.types.d.ts +22 -0
- package/dist/components/ThemeIcon/index.d.ts +2 -0
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.cjs +1 -1
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.js +26 -26
- package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
- package/dist/components/TimePicker/helpers/ClockFaceSvg.js +17 -17
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +86 -82
- package/dist/components/Toast/Toast.types.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +52 -44
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.const.cjs +1 -1
- package/dist/components/TreeSelect/TreeSelect.const.d.ts +1 -1
- package/dist/components/TreeSelect/TreeSelect.const.js +3 -3
- package/dist/components/TreeSelect/TreeSelect.js +120 -88
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +22 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/Watermark/Watermark.cjs +1 -1
- package/dist/components/Watermark/Watermark.const.cjs +1 -1
- package/dist/components/Watermark/Watermark.const.d.ts +6 -3
- package/dist/components/Watermark/Watermark.const.js +13 -11
- package/dist/components/Watermark/Watermark.js +87 -61
- package/dist/components/Watermark/Watermark.types.d.ts +2 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +15 -3
- package/dist/components/index.js +296 -280
- package/dist/hooks/bearStyled.cjs +1 -1
- package/dist/hooks/bearStyled.d.ts +31 -9
- package/dist/hooks/bearStyled.js +17 -12
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +55 -54
- package/dist/hooks/useClickOutside.cjs +1 -1
- package/dist/hooks/useClickOutside.d.ts +4 -11
- package/dist/hooks/useClickOutside.js +26 -7
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +9 -1
- package/dist/hooks/useResponsive.cjs +1 -1
- package/dist/hooks/useResponsive.d.ts +2 -17
- package/dist/hooks/useResponsive.js +47 -41
- package/dist/index.cjs +1 -1
- package/dist/index.js +383 -366
- package/dist/styles/_effects.css +26 -0
- package/dist/styles.css +1 -1
- package/dist/types/theme.types.d.ts +1 -0
- package/dist/utils/maxVisible.utils.cjs +1 -0
- package/dist/utils/maxVisible.utils.d.ts +12 -0
- package/dist/utils/maxVisible.utils.js +15 -0
- package/package.json +1 -1
- package/dist/components/HoverCard/HoverCard.utils.cjs +0 -1
- package/dist/components/HoverCard/HoverCard.utils.js +0 -23
|
@@ -1,86 +1,93 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as j, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as E, useCallback as u, useEffect as I, useMemo as $, isValidElement as O, cloneElement as ee } from "react";
|
|
3
|
+
import { cn as C } from "../../utils/cn.js";
|
|
4
|
+
import { useClickOutsideMultiple as re } from "../../hooks/useClickOutside.js";
|
|
5
5
|
import "../../context/BearProvider.js";
|
|
6
6
|
import "../../hooks/useBearComponent/useBearComponent.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
trigger: p,
|
|
24
|
-
items: i,
|
|
25
|
-
open: y,
|
|
26
|
-
defaultOpen: A = !1,
|
|
27
|
-
placement: L = "bottom-start",
|
|
28
|
-
offset: X = 4,
|
|
29
|
-
matchWidth: R = !1,
|
|
30
|
-
minWidth: j = 150,
|
|
31
|
-
maxHeight: W = 300,
|
|
32
|
-
size: z = "md",
|
|
33
|
-
closeOnSelect: g = !0,
|
|
34
|
-
closeOnClickOutside: k = !0,
|
|
35
|
-
disabled: w = !1,
|
|
7
|
+
import { Portal as te } from "../Portal/Portal.js";
|
|
8
|
+
import { SIZE_CLASSES as ae } from "./Dropdown.const.js";
|
|
9
|
+
const pe = ({
|
|
10
|
+
trigger: v,
|
|
11
|
+
items: d,
|
|
12
|
+
open: L,
|
|
13
|
+
defaultOpen: z = !1,
|
|
14
|
+
placement: i = "bottom-start",
|
|
15
|
+
offset: x = 4,
|
|
16
|
+
matchWidth: N = !1,
|
|
17
|
+
minWidth: h = 150,
|
|
18
|
+
maxHeight: A = 300,
|
|
19
|
+
size: U = "md",
|
|
20
|
+
closeOnSelect: D = !0,
|
|
21
|
+
closeOnClickOutside: g = !0,
|
|
22
|
+
disabled: M = !1,
|
|
36
23
|
onOpenChange: f,
|
|
37
|
-
className:
|
|
38
|
-
testId:
|
|
39
|
-
...
|
|
24
|
+
className: B,
|
|
25
|
+
testId: F,
|
|
26
|
+
...K
|
|
40
27
|
}) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
const [T, V] = m(z), [b, c] = m(-1), [w, Z] = m({ top: 0, left: 0, minWidth: h }), R = E(null), W = E(null), P = E(null), y = L !== void 0, a = y ? L : T, p = u((e) => {
|
|
29
|
+
y || V(e), f == null || f(e);
|
|
30
|
+
}, [y, f]), _ = u(() => {
|
|
31
|
+
M || p(!a);
|
|
32
|
+
}, [M, a, p]), l = u(() => {
|
|
33
|
+
p(!1), c(-1);
|
|
34
|
+
}, [p]), k = u((e) => {
|
|
35
|
+
var r;
|
|
36
|
+
e.disabled || e.divider || e.header || ((r = e.onClick) == null || r.call(e), D && !e.items && l());
|
|
37
|
+
}, [D, l]), q = u(() => {
|
|
38
|
+
a && g && l();
|
|
39
|
+
}, [a, g, l]);
|
|
40
|
+
re([R, W], q, {
|
|
41
|
+
enabled: a && g
|
|
42
|
+
}), I(() => {
|
|
55
43
|
if (!a) return;
|
|
56
|
-
const e =
|
|
57
|
-
switch (
|
|
44
|
+
const e = d.filter((t) => !t.disabled && !t.divider && !t.header), r = (t) => {
|
|
45
|
+
switch (t.key) {
|
|
58
46
|
case "Escape":
|
|
59
|
-
|
|
47
|
+
t.preventDefault(), l();
|
|
60
48
|
break;
|
|
61
49
|
case "ArrowDown":
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
return
|
|
50
|
+
t.preventDefault(), c((n) => {
|
|
51
|
+
const s = n + 1;
|
|
52
|
+
return s >= e.length ? 0 : s;
|
|
65
53
|
});
|
|
66
54
|
break;
|
|
67
55
|
case "ArrowUp":
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
return
|
|
56
|
+
t.preventDefault(), c((n) => {
|
|
57
|
+
const s = n - 1;
|
|
58
|
+
return s < 0 ? e.length - 1 : s;
|
|
71
59
|
});
|
|
72
60
|
break;
|
|
73
61
|
case "Enter":
|
|
74
62
|
case " ":
|
|
75
|
-
|
|
63
|
+
t.preventDefault(), b >= 0 && b < e.length && k(e[b]);
|
|
76
64
|
break;
|
|
77
65
|
}
|
|
78
66
|
};
|
|
79
|
-
return document.addEventListener("keydown",
|
|
80
|
-
}, [a,
|
|
81
|
-
|
|
67
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
68
|
+
}, [a, d, b, l, k]), I(() => {
|
|
69
|
+
if (!a) return;
|
|
70
|
+
const e = () => {
|
|
71
|
+
var S;
|
|
72
|
+
const r = (S = P.current) == null ? void 0 : S.getBoundingClientRect();
|
|
73
|
+
if (!r) return;
|
|
74
|
+
const t = window.innerWidth, n = N ? r.width : h, Q = i.endsWith("end") ? r.right - n : i === "top" || i === "bottom" ? r.left + r.width / 2 - n / 2 : r.left, X = Math.min(Math.max(8, Q), Math.max(8, t - n - 8)), Y = i.startsWith("top") ? r.top - x : r.bottom + x;
|
|
75
|
+
Z({
|
|
76
|
+
top: Y,
|
|
77
|
+
left: X,
|
|
78
|
+
minWidth: n
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
82
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
83
|
+
};
|
|
84
|
+
}, [a, N, h, i, x]), I(() => {
|
|
85
|
+
a || c(-1);
|
|
82
86
|
}, [a]);
|
|
83
|
-
const
|
|
87
|
+
const G = $(
|
|
88
|
+
() => d.map((e, r) => ({ item: e, index: r })).filter(({ item: e }) => !e.disabled && !e.divider && !e.header),
|
|
89
|
+
[d]
|
|
90
|
+
), H = (e, r) => {
|
|
84
91
|
if (e.divider)
|
|
85
92
|
return /* @__PURE__ */ o(
|
|
86
93
|
"div",
|
|
@@ -101,20 +108,21 @@ const J = {
|
|
|
101
108
|
},
|
|
102
109
|
e.key
|
|
103
110
|
);
|
|
104
|
-
const
|
|
105
|
-
return /* @__PURE__ */
|
|
111
|
+
const t = G.findIndex((s) => s.index === r), n = b === t;
|
|
112
|
+
return /* @__PURE__ */ j(
|
|
106
113
|
"button",
|
|
107
114
|
{
|
|
108
115
|
type: "button",
|
|
109
116
|
role: "menuitem",
|
|
110
117
|
disabled: e.disabled,
|
|
111
|
-
onClick: () =>
|
|
112
|
-
onMouseEnter: () =>
|
|
113
|
-
className:
|
|
118
|
+
onClick: () => k(e),
|
|
119
|
+
onMouseEnter: () => c(t),
|
|
120
|
+
className: C(
|
|
114
121
|
"bear-w-full bear-flex bear-items-center bear-gap-2 bear-text-left bear-border-none bear-bg-transparent",
|
|
115
|
-
|
|
122
|
+
ae[U],
|
|
116
123
|
"bear-transition-colors bear-cursor-pointer",
|
|
117
|
-
|
|
124
|
+
e.selected && !e.danger && "bear-bg-[var(--bear-bg-tertiary)] bear-text-[var(--bear-text-primary)]",
|
|
125
|
+
n && !e.danger && "bear-bg-[var(--bear-bg-tertiary)]",
|
|
118
126
|
e.danger && "bear-text-red-600 dark:bear-text-red-400 hover:bear-bg-red-50 dark:hover:bear-bg-red-900/20",
|
|
119
127
|
!e.danger && !e.disabled && "hover:bear-bg-[var(--bear-bg-tertiary)]",
|
|
120
128
|
e.disabled && "bear-opacity-50 bear-cursor-not-allowed bear-pointer-events-none"
|
|
@@ -129,46 +137,48 @@ const J = {
|
|
|
129
137
|
},
|
|
130
138
|
e.key
|
|
131
139
|
);
|
|
132
|
-
},
|
|
133
|
-
onClick:
|
|
134
|
-
ref:
|
|
140
|
+
}, J = O(v) ? ee(v, {
|
|
141
|
+
onClick: _,
|
|
142
|
+
ref: P,
|
|
135
143
|
"aria-expanded": a,
|
|
136
144
|
"aria-haspopup": !0
|
|
137
|
-
}) :
|
|
138
|
-
return /* @__PURE__ */
|
|
145
|
+
}) : v;
|
|
146
|
+
return /* @__PURE__ */ j(
|
|
139
147
|
"div",
|
|
140
148
|
{
|
|
141
|
-
ref:
|
|
142
|
-
className:
|
|
143
|
-
"data-testid":
|
|
144
|
-
...
|
|
149
|
+
ref: R,
|
|
150
|
+
className: C("bear-relative bear-inline-block", B),
|
|
151
|
+
"data-testid": F,
|
|
152
|
+
...K,
|
|
145
153
|
children: [
|
|
146
|
-
|
|
147
|
-
a && /* @__PURE__ */ o(
|
|
154
|
+
J,
|
|
155
|
+
a && /* @__PURE__ */ o(te, { children: /* @__PURE__ */ o(
|
|
148
156
|
"div",
|
|
149
157
|
{
|
|
150
|
-
ref:
|
|
158
|
+
ref: W,
|
|
151
159
|
role: "menu",
|
|
152
|
-
className:
|
|
153
|
-
"bear-
|
|
160
|
+
className: C(
|
|
161
|
+
"bear-fixed",
|
|
154
162
|
"bear-border bear-rounded-lg bear-shadow-lg",
|
|
155
163
|
"bear-py-1 bear-overflow-y-auto",
|
|
156
|
-
"bear-
|
|
157
|
-
Q[L]
|
|
164
|
+
"bear-duration-100"
|
|
158
165
|
),
|
|
159
166
|
style: {
|
|
160
167
|
backgroundColor: "var(--bear-bg-primary)",
|
|
161
168
|
borderColor: "var(--bear-border-default)",
|
|
162
|
-
minWidth:
|
|
163
|
-
maxHeight:
|
|
169
|
+
minWidth: w.minWidth,
|
|
170
|
+
maxHeight: A,
|
|
171
|
+
top: w.top,
|
|
172
|
+
left: w.left,
|
|
173
|
+
zIndex: 11e3
|
|
164
174
|
},
|
|
165
|
-
children:
|
|
175
|
+
children: d.map((e, r) => H(e, r))
|
|
166
176
|
}
|
|
167
|
-
)
|
|
177
|
+
) })
|
|
168
178
|
]
|
|
169
179
|
}
|
|
170
180
|
);
|
|
171
181
|
};
|
|
172
182
|
export {
|
|
173
|
-
|
|
183
|
+
pe as Dropdown
|
|
174
184
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),g=require("../../utils/cn.cjs"),F=({value:x,min:a=0,max:d=100,size:h=120,strokeWidth:s=10,color:p="#ec4899",trackColor:v,showLabel:k=!0,label:b,animated:t=!0,fillDurationMs:D=900,arcAngle:f=270,gradient:n,className:M,...N})=>{const m=i.useId(),{percentage:O,circumference:r,offset:o,startAngle:y}=i.useMemo(()=>{const c=Math.min(Math.max((x-a)/(d-a)*100,0),100),w=50-s/2,u=2*Math.PI*w*(f/360),$=u-c/100*u,C=90+(360-f)/2;return{percentage:c,circumference:u,offset:$,startAngle:C}},[x,a,d,f,s]),[q,l]=i.useState(()=>t?r:o);i.useLayoutEffect(()=>{if(!t){l(o);return}l(r);const c=requestAnimationFrame(()=>l(o));return()=>cancelAnimationFrame(c)},[t,r,o]);const j=50-s/2;return e.jsxs("div",{className:g.cn("relative inline-flex items-center justify-center",M),style:{width:h,height:h},...N,children:[e.jsxs("svg",{viewBox:"0 0 100 100",className:"h-full w-full -rotate-90",children:[e.jsx("defs",{children:n&&e.jsxs("linearGradient",{id:m,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:n[0]}),e.jsx("stop",{offset:"100%",stopColor:n[1]})]})}),e.jsx("circle",{cx:"50",cy:"50",r:j,fill:"none",stroke:v||"currentColor",strokeWidth:s,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:0,className:g.cn("text-gray-200 dark:text-slate-700"),style:{transformOrigin:"center",transform:`rotate(${y}deg)`}}),e.jsx("circle",{cx:"50",cy:"50",r:j,fill:"none",stroke:n?`url(#${m})`:p,strokeWidth:s,strokeLinecap:"round",strokeDasharray:r,strokeDashoffset:q,style:{transformOrigin:"center",transform:`rotate(${y}deg)`,transitionProperty:t?"stroke-dashoffset":void 0,transitionDuration:t?`${D}ms`:void 0,transitionTimingFunction:t?"cubic-bezier(0.4, 0, 0.2, 1)":void 0}})]}),k&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b||e.jsxs("span",{className:"text-2xl font-semibold text-gray-800 dark:text-white",children:[Math.round(O),"%"]})})]})};exports.Gauge=F;
|
|
@@ -1,86 +1,97 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
value:
|
|
6
|
-
min:
|
|
7
|
-
max:
|
|
8
|
-
size:
|
|
9
|
-
strokeWidth:
|
|
10
|
-
color:
|
|
11
|
-
trackColor:
|
|
12
|
-
showLabel:
|
|
13
|
-
label:
|
|
14
|
-
animated:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useId as I, useMemo as L, useState as A, useLayoutEffect as G } from "react";
|
|
3
|
+
import { cn as g } from "../../utils/cn.js";
|
|
4
|
+
const E = ({
|
|
5
|
+
value: m,
|
|
6
|
+
min: a = 0,
|
|
7
|
+
max: d = 100,
|
|
8
|
+
size: h = 120,
|
|
9
|
+
strokeWidth: r = 10,
|
|
10
|
+
color: k = "#ec4899",
|
|
11
|
+
trackColor: v,
|
|
12
|
+
showLabel: D = !0,
|
|
13
|
+
label: M,
|
|
14
|
+
animated: e = !0,
|
|
15
|
+
fillDurationMs: N = 900,
|
|
16
|
+
arcAngle: f = 270,
|
|
17
|
+
gradient: o,
|
|
18
|
+
className: b,
|
|
18
19
|
...j
|
|
19
20
|
}) => {
|
|
20
|
-
const
|
|
21
|
-
const
|
|
21
|
+
const x = I(), { percentage: w, circumference: s, offset: n, startAngle: p } = L(() => {
|
|
22
|
+
const c = Math.min(Math.max((m - a) / (d - a) * 100, 0), 100), $ = 50 - r / 2, u = 2 * Math.PI * $ * (f / 360), C = u - c / 100 * u, F = 90 + (360 - f) / 2;
|
|
22
23
|
return {
|
|
23
|
-
percentage:
|
|
24
|
-
circumference:
|
|
24
|
+
percentage: c,
|
|
25
|
+
circumference: u,
|
|
25
26
|
offset: C,
|
|
26
|
-
startAngle:
|
|
27
|
+
startAngle: F
|
|
27
28
|
};
|
|
28
|
-
}, [
|
|
29
|
-
|
|
29
|
+
}, [m, a, d, f, r]), [O, l] = A(() => e ? s : n);
|
|
30
|
+
G(() => {
|
|
31
|
+
if (!e) {
|
|
32
|
+
l(n);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
l(s);
|
|
36
|
+
const c = requestAnimationFrame(() => l(n));
|
|
37
|
+
return () => cancelAnimationFrame(c);
|
|
38
|
+
}, [e, s, n]);
|
|
39
|
+
const y = 50 - r / 2;
|
|
40
|
+
return /* @__PURE__ */ i(
|
|
30
41
|
"div",
|
|
31
42
|
{
|
|
32
|
-
className:
|
|
33
|
-
style: { width:
|
|
43
|
+
className: g("relative inline-flex items-center justify-center", b),
|
|
44
|
+
style: { width: h, height: h },
|
|
34
45
|
...j,
|
|
35
46
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ i("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
48
|
+
/* @__PURE__ */ t("defs", { children: o && /* @__PURE__ */ i("linearGradient", { id: x, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
49
|
+
/* @__PURE__ */ t("stop", { offset: "0%", stopColor: o[0] }),
|
|
50
|
+
/* @__PURE__ */ t("stop", { offset: "100%", stopColor: o[1] })
|
|
40
51
|
] }) }),
|
|
41
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ t(
|
|
42
53
|
"circle",
|
|
43
54
|
{
|
|
44
55
|
cx: "50",
|
|
45
56
|
cy: "50",
|
|
46
|
-
r:
|
|
57
|
+
r: y,
|
|
47
58
|
fill: "none",
|
|
48
|
-
stroke:
|
|
49
|
-
strokeWidth:
|
|
59
|
+
stroke: v || "currentColor",
|
|
60
|
+
strokeWidth: r,
|
|
50
61
|
strokeLinecap: "round",
|
|
51
|
-
strokeDasharray:
|
|
62
|
+
strokeDasharray: s,
|
|
52
63
|
strokeDashoffset: 0,
|
|
53
|
-
className:
|
|
64
|
+
className: g("text-gray-200 dark:text-slate-700"),
|
|
54
65
|
style: {
|
|
55
66
|
transformOrigin: "center",
|
|
56
|
-
transform: `rotate(${
|
|
67
|
+
transform: `rotate(${p}deg)`
|
|
57
68
|
}
|
|
58
69
|
}
|
|
59
70
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ t(
|
|
61
72
|
"circle",
|
|
62
73
|
{
|
|
63
74
|
cx: "50",
|
|
64
75
|
cy: "50",
|
|
65
|
-
r:
|
|
76
|
+
r: y,
|
|
66
77
|
fill: "none",
|
|
67
|
-
stroke:
|
|
68
|
-
strokeWidth:
|
|
78
|
+
stroke: o ? `url(#${x})` : k,
|
|
79
|
+
strokeWidth: r,
|
|
69
80
|
strokeLinecap: "round",
|
|
70
|
-
strokeDasharray:
|
|
71
|
-
strokeDashoffset:
|
|
72
|
-
className: c(
|
|
73
|
-
N && "transition-all duration-1000 ease-out"
|
|
74
|
-
),
|
|
81
|
+
strokeDasharray: s,
|
|
82
|
+
strokeDashoffset: O,
|
|
75
83
|
style: {
|
|
76
84
|
transformOrigin: "center",
|
|
77
|
-
transform: `rotate(${
|
|
85
|
+
transform: `rotate(${p}deg)`,
|
|
86
|
+
transitionProperty: e ? "stroke-dashoffset" : void 0,
|
|
87
|
+
transitionDuration: e ? `${N}ms` : void 0,
|
|
88
|
+
transitionTimingFunction: e ? "cubic-bezier(0.4, 0, 0.2, 1)" : void 0
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
)
|
|
81
92
|
] }),
|
|
82
|
-
|
|
83
|
-
Math.round(
|
|
93
|
+
D && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center", children: M || /* @__PURE__ */ i("span", { className: "text-2xl font-semibold text-gray-800 dark:text-white", children: [
|
|
94
|
+
Math.round(w),
|
|
84
95
|
"%"
|
|
85
96
|
] }) })
|
|
86
97
|
]
|
|
@@ -88,5 +99,5 @@ const B = ({
|
|
|
88
99
|
);
|
|
89
100
|
};
|
|
90
101
|
export {
|
|
91
|
-
|
|
102
|
+
E as Gauge
|
|
92
103
|
};
|
|
@@ -20,6 +20,8 @@ export interface GaugeProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
20
20
|
label?: ReactNode;
|
|
21
21
|
/** Animate on render */
|
|
22
22
|
animated?: boolean;
|
|
23
|
+
/** Fill transition duration in ms when animated */
|
|
24
|
+
fillDurationMs?: number;
|
|
23
25
|
/** Arc angle (180 for half, 270 for 3/4, 360 for full) */
|
|
24
26
|
arcAngle?: number;
|
|
25
27
|
/** Gradient colors [start, end] */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),o=require("react"),P=require("../Portal/Portal.cjs"),C=11e3,i=288,u=200;function N(e,l,n){let t=0,r=0;const h=i/2;return l==="bottom"?(t=e.bottom+8,r=e.left+e.width/2-h,n==="start"&&(r=e.left),n==="end"&&(r=e.right-i)):l==="top"?(t=e.top-u-8,r=e.left+e.width/2-h,n==="start"&&(r=e.left),n==="end"&&(r=e.right-i)):l==="right"?(r=e.right+8,t=e.top+e.height/2-u/2,n==="start"&&(t=e.top),n==="end"&&(t=e.bottom-u)):(r=e.left-i-8,t=e.top+e.height/2-u/2,n==="start"&&(t=e.top),n==="end"&&(t=e.bottom-u)),r=Math.max(8,Math.min(r,window.innerWidth-i-8)),t=Math.max(8,Math.min(t,window.innerHeight-u-8)),{position:"fixed",zIndex:C,top:t,left:r,width:i}}const T=o.forwardRef(({children:e,cardContent:l,side:n="bottom",align:m="center",openDelay:t=200,closeDelay:r=300,arrow:h=!0,className:x="",...L},H)=>{const[a,p]=o.useState(!1),[S,j]=o.useState({}),d=o.useRef(),c=o.useRef(),f=o.useRef(null),v=o.useRef(null);o.useEffect(()=>{if(!a||!f.current)return;const s=()=>{const w=f.current.getBoundingClientRect();j(N(w,n,m))};return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}},[a,n,m]),o.useEffect(()=>{if(!a)return;const s=w=>{var y,M;const R=w.target;(y=f.current)!=null&&y.contains(R)||(M=v.current)!=null&&M.contains(R)||p(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a]);const g=()=>{c.current&&clearTimeout(c.current),d.current=setTimeout(()=>p(!0),t)},E=()=>{d.current&&clearTimeout(d.current),c.current=setTimeout(()=>p(!1),r)};return o.useEffect(()=>()=>{d.current&&clearTimeout(d.current),c.current&&clearTimeout(c.current)},[]),b.jsxs("div",{ref:H,className:`bear-hover-card bear-relative bear-inline-block ${x}`.trim(),onMouseEnter:g,onMouseLeave:E,...L,children:[b.jsx("div",{ref:f,className:"bear-inline-block",children:e}),a&&b.jsx(P.Portal,{children:b.jsx("div",{ref:v,style:S,className:`
|
|
2
|
+
bear-bg-white dark:bear-bg-gray-800 bear-rounded-lg bear-shadow-xl
|
|
3
|
+
bear-border bear-border-gray-200 dark:bear-border-gray-700 bear-p-4
|
|
4
|
+
bear-transition-all bear-duration-200
|
|
5
|
+
${a?"bear-opacity-100 bear-scale-100":"bear-opacity-0 bear-scale-95"}
|
|
6
|
+
`,onMouseEnter:g,onMouseLeave:E,children:l})})]})});T.displayName="HoverCard";exports.HoverCard=T;
|
|
@@ -1,68 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, g) => {
|
|
15
|
-
const [h, o] = x(!1), e = c(), r = c(), a = () => {
|
|
16
|
-
r.current && clearTimeout(r.current), e.current = setTimeout(() => {
|
|
17
|
-
o(!0);
|
|
18
|
-
}, m);
|
|
19
|
-
}, s = () => {
|
|
20
|
-
e.current && clearTimeout(e.current), r.current = setTimeout(() => {
|
|
21
|
-
o(!1);
|
|
22
|
-
}, b);
|
|
1
|
+
import { jsxs as C, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as O, useState as R, useRef as c, useEffect as v } from "react";
|
|
3
|
+
import { Portal as P } from "../Portal/Portal.js";
|
|
4
|
+
const S = 11e3, a = 288, s = 200;
|
|
5
|
+
function z(e, u, n) {
|
|
6
|
+
let t = 0, r = 0;
|
|
7
|
+
const b = a / 2;
|
|
8
|
+
return u === "bottom" ? (t = e.bottom + 8, r = e.left + e.width / 2 - b, n === "start" && (r = e.left), n === "end" && (r = e.right - a)) : u === "top" ? (t = e.top - s - 8, r = e.left + e.width / 2 - b, n === "start" && (r = e.left), n === "end" && (r = e.right - a)) : u === "right" ? (r = e.right + 8, t = e.top + e.height / 2 - s / 2, n === "start" && (t = e.top), n === "end" && (t = e.bottom - s)) : (r = e.left - a - 8, t = e.top + e.height / 2 - s / 2, n === "start" && (t = e.top), n === "end" && (t = e.bottom - s)), r = Math.max(8, Math.min(r, window.innerWidth - a - 8)), t = Math.max(8, Math.min(t, window.innerHeight - s - 8)), {
|
|
9
|
+
position: "fixed",
|
|
10
|
+
zIndex: S,
|
|
11
|
+
top: t,
|
|
12
|
+
left: r,
|
|
13
|
+
width: a
|
|
23
14
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
}
|
|
16
|
+
const I = O(({
|
|
17
|
+
children: e,
|
|
18
|
+
cardContent: u,
|
|
19
|
+
side: n = "bottom",
|
|
20
|
+
align: m = "center",
|
|
21
|
+
openDelay: t = 200,
|
|
22
|
+
closeDelay: r = 300,
|
|
23
|
+
arrow: b = !0,
|
|
24
|
+
className: x = "",
|
|
25
|
+
...H
|
|
26
|
+
}, N) => {
|
|
27
|
+
const [i, p] = R(!1), [_, k] = R({}), d = c(), l = c(), f = c(null), g = c(null);
|
|
28
|
+
v(() => {
|
|
29
|
+
if (!i || !f.current) return;
|
|
30
|
+
const o = () => {
|
|
31
|
+
const h = f.current.getBoundingClientRect();
|
|
32
|
+
k(z(h, n, m));
|
|
33
|
+
};
|
|
34
|
+
return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
35
|
+
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
|
|
36
|
+
};
|
|
37
|
+
}, [i, n, m]), v(() => {
|
|
38
|
+
if (!i) return;
|
|
39
|
+
const o = (h) => {
|
|
40
|
+
var T, y;
|
|
41
|
+
const M = h.target;
|
|
42
|
+
(T = f.current) != null && T.contains(M) || (y = g.current) != null && y.contains(M) || p(!1);
|
|
43
|
+
};
|
|
44
|
+
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
45
|
+
}, [i]);
|
|
46
|
+
const E = () => {
|
|
47
|
+
l.current && clearTimeout(l.current), d.current = setTimeout(() => p(!0), t);
|
|
48
|
+
}, L = () => {
|
|
49
|
+
d.current && clearTimeout(d.current), l.current = setTimeout(() => p(!1), r);
|
|
50
|
+
};
|
|
51
|
+
return v(() => () => {
|
|
52
|
+
d.current && clearTimeout(d.current), l.current && clearTimeout(l.current);
|
|
53
|
+
}, []), /* @__PURE__ */ C(
|
|
27
54
|
"div",
|
|
28
55
|
{
|
|
29
|
-
ref:
|
|
30
|
-
className: `bear-hover-card relative inline-block ${
|
|
31
|
-
onMouseEnter:
|
|
32
|
-
onMouseLeave:
|
|
33
|
-
...
|
|
56
|
+
ref: N,
|
|
57
|
+
className: `bear-hover-card bear-relative bear-inline-block ${x}`.trim(),
|
|
58
|
+
onMouseEnter: E,
|
|
59
|
+
onMouseLeave: L,
|
|
60
|
+
...H,
|
|
34
61
|
children: [
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ w("div", { ref: f, className: "bear-inline-block", children: e }),
|
|
63
|
+
i && /* @__PURE__ */ w(P, { children: /* @__PURE__ */ w(
|
|
37
64
|
"div",
|
|
38
65
|
{
|
|
66
|
+
ref: g,
|
|
67
|
+
style: _,
|
|
39
68
|
className: `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
onMouseEnter:
|
|
46
|
-
onMouseLeave:
|
|
47
|
-
children:
|
|
48
|
-
f && /* @__PURE__ */ i(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
className: `absolute w-3 h-3 bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 ${w(t)}`,
|
|
52
|
-
style: {
|
|
53
|
-
borderWidth: t === "top" || t === "left" ? "0 1px 1px 0" : "1px 0 0 1px"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
l
|
|
58
|
-
] })
|
|
69
|
+
bear-bg-white dark:bear-bg-gray-800 bear-rounded-lg bear-shadow-xl
|
|
70
|
+
bear-border bear-border-gray-200 dark:bear-border-gray-700 bear-p-4
|
|
71
|
+
bear-transition-all bear-duration-200
|
|
72
|
+
${i ? "bear-opacity-100 bear-scale-100" : "bear-opacity-0 bear-scale-95"}
|
|
73
|
+
`,
|
|
74
|
+
onMouseEnter: E,
|
|
75
|
+
onMouseLeave: L,
|
|
76
|
+
children: u
|
|
59
77
|
}
|
|
60
|
-
)
|
|
78
|
+
) })
|
|
61
79
|
]
|
|
62
80
|
}
|
|
63
81
|
);
|
|
64
82
|
});
|
|
65
|
-
|
|
83
|
+
I.displayName = "HoverCard";
|
|
66
84
|
export {
|
|
67
|
-
|
|
85
|
+
I as HoverCard
|
|
68
86
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("../Icon.cjs"),x=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("circle",{cx:"9",cy:"21",r:"1"}),n.jsx("circle",{cx:"20",cy:"21",r:"1"}),n.jsx("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),o=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"}),n.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),n.jsx("path",{d:"M16 10a4 4 0 0 1-8 0"})]}),t=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),n.jsx("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),h=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),n.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),j=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M4 10h12"}),n.jsx("path",{d:"M4 14h12"}),n.jsx("path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12a7.9 7.9 0 0 0 7.8 8 7.7 7.7 0 0 0 5.2-2"})]}),a=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M4 18h12"}),n.jsx("path",{d:"M4 14h8"}),n.jsx("path",{d:"M17 4a4 4 0 0 0-7.4 2.1L8 18"})]}),e=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("rect",{x:"2",y:"6",width:"20",height:"14",rx:"2"}),n.jsx("path",{d:"M2 10h20"}),n.jsx("path",{d:"M16 14h2"})]}),i=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1-2-1z"}),n.jsx("line",{x1:"8",y1:"8",x2:"16",y2:"8"}),n.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),n.jsx("line",{x1:"8",y1:"16",x2:"12",y2:"16"})]}),l=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"}),n.jsx("line",{x1:"7",y1:"7",x2:"7.01",y2:"7"})]}),d=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"}),n.jsx("line",{x1:"7",y1:"7",x2:"7.01",y2:"7"}),n.jsx("path",{d:"M22 7l-8.97 8.97"})]}),r=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("line",{x1:"19",y1:"5",x2:"5",y2:"19"}),n.jsx("circle",{cx:"6.5",cy:"6.5",r:"2.5"}),n.jsx("circle",{cx:"17.5",cy:"17.5",r:"2.5"})]}),p=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),n.jsx("polyline",{points:"17 6 23 6 23 12"})]}),I=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),n.jsx("polyline",{points:"17 18 23 18 23 12"})]}),y=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M3 5v14"}),n.jsx("path",{d:"M8 5v14"}),n.jsx("path",{d:"M12 5v14"}),n.jsx("path",{d:"M17 5v14"}),n.jsx("path",{d:"M21 5v14"}),n.jsx("path",{d:"M6 5v14"}),n.jsx("path",{d:"M14 5v14"}),n.jsx("path",{d:"M10 5v14"}),n.jsx("path",{d:"M19 5v14"})]}),M=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("polyline",{points:"20 12 20 22 4 22 4 12"}),n.jsx("rect",{x:"2",y:"7",width:"20",height:"5"}),n.jsx("line",{x1:"12",y1:"22",x2:"12",y2:"7"}),n.jsx("path",{d:"M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"}),n.jsx("path",{d:"M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"})]}),v=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M3 9l1-4h16l1 4"}),n.jsx("path",{d:"M3 9v10a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V9"}),n.jsx("path",{d:"M9 21V12h6v9"}),n.jsx("path",{d:"M3 9a3 3 0 0 0 3 3 3 3 0 0 0 3-3"}),n.jsx("path",{d:"M9 9a3 3 0 0 0 3 3 3 3 0 0 0 3-3"}),n.jsx("path",{d:"M15 9a3 3 0 0 0 3 3 3 3 0 0 0 3-3"})]}),g=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("rect",{x:"1",y:"3",width:"15",height:"13"}),n.jsx("polygon",{points:"16 8 20 8 23 11 23 16 16 16 16 8"}),n.jsx("circle",{cx:"5.5",cy:"18.5",r:"2.5"}),n.jsx("circle",{cx:"18.5",cy:"18.5",r:"2.5"})]}),u=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("line",{x1:"16.5",y1:"9.4",x2:"7.5",y2:"4.21"}),n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),n.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),n.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]}),T=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"}),n.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),n.jsx("line",{x1:"8",y1:"17",x2:"12",y2:"17"}),n.jsx("line",{x1:"14",y1:"17",x2:"16",y2:"17"})]}),C=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("rect",{x:"2",y:"7",width:"20",height:"14",rx:"2",ry:"2"}),n.jsx("path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"})]}),S=s=>n.jsxs(c.Icon,{...s,children:[n.jsx("path",{d:"M3 22h18"}),n.jsx("path",{d:"M6 18v-4"}),n.jsx("path",{d:"M10 18v-4"}),n.jsx("path",{d:"M14 18v-4"}),n.jsx("path",{d:"M18 18v-4"}),n.jsx("path",{d:"M3 10l9-7 9 7"}),n.jsx("path",{d:"M3 10h18v4H3z"})]});exports.BankIcon=S;exports.BarCodeIcon=y;exports.BriefcaseIcon=C;exports.CreditCardIcon=t;exports.DollarSignIcon=h;exports.EuroIcon=j;exports.GiftIcon=M;exports.InvoiceIcon=T;exports.PackageIcon=u;exports.PercentIcon=r;exports.PoundIcon=a;exports.ReceiptIcon=i;exports.ShoppingBagIcon=o;exports.ShoppingCartIcon=x;exports.StoreIcon=v;exports.TagIcon=l;exports.TagsIcon=d;exports.TrendDownIcon=I;exports.TrendUpIcon=p;exports.TruckIcon=g;exports.WalletIcon=e;
|