@cascivo/react 0.12.0 → 0.13.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/dist/accordion/accordion.js +46 -44
- package/dist/action-sheet/action-sheet.js +16 -16
- package/dist/alert-dialog/alert-dialog.js +34 -34
- package/dist/app-shell/app-shell.css +1 -1
- package/dist/app-shell/app-shell.js +36 -33
- package/dist/app-shell/app-shell.module.js +8 -8
- package/dist/avatar-group/avatar-group.js +6 -6
- package/dist/badge/badge.js +17 -10
- package/dist/bottom-sheet/bottom-sheet.js +18 -18
- package/dist/button/button.css +1 -1
- package/dist/button/button.js +15 -12
- package/dist/button/button.module.js +1 -1
- package/dist/button-group/button-group.js +8 -8
- package/dist/card/card.css +1 -1
- package/dist/card/card.module.js +8 -8
- package/dist/carousel/carousel.js +20 -20
- package/dist/checkbox/checkbox.js +21 -21
- package/dist/checkbox-card/checkbox-card.js +15 -13
- package/dist/collapsible/collapsible.js +7 -7
- package/dist/color-picker/color-picker.js +26 -26
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.js +86 -86
- package/dist/combobox/combobox.module.js +15 -15
- package/dist/command-menu/command-menu.js +111 -111
- package/dist/comparison/comparison.js +10 -10
- package/dist/context-menu/context-menu.js +9 -9
- package/dist/copy-button/copy-button.js +18 -16
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +8 -2
- package/dist/data-table/data-table.module.js +29 -29
- package/dist/date-picker/date-picker.css +1 -1
- package/dist/date-picker/date-picker.js +25 -25
- package/dist/date-picker/date-picker.module.js +19 -19
- package/dist/date-range-picker/date-range-picker.js +26 -26
- package/dist/drawer/drawer.css +1 -1
- package/dist/drawer/drawer.js +18 -17
- package/dist/drawer/drawer.module.js +9 -9
- package/dist/dropdown/dropdown.js +48 -48
- package/dist/editable/editable.js +11 -11
- package/dist/fab/fab.js +53 -53
- package/dist/field/field.js +8 -8
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.js +19 -19
- package/dist/file-uploader/file-uploader.module.js +14 -14
- package/dist/filter/filter.js +10 -9
- package/dist/header-panel/header-panel.js +31 -31
- package/dist/hover-card/hover-card.js +21 -21
- package/dist/icon-button/icon-button.css +1 -1
- package/dist/icon-button/icon-button.js +5 -5
- package/dist/icon-button/icon-button.module.js +1 -1
- package/dist/index.d.ts +1475 -251
- package/dist/input/input.css +1 -1
- package/dist/input/input.js +22 -21
- package/dist/input/input.module.js +5 -5
- package/dist/item/item.css +1 -1
- package/dist/item/item.module.js +6 -6
- package/dist/layouts/src/page-header/page-header.css +1 -0
- package/dist/layouts/src/page-header/page-header.js +33 -0
- package/dist/layouts/src/page-header/page-header.module.js +13 -0
- package/dist/link/link.js +14 -12
- package/dist/log-viewer/log-viewer.js +26 -26
- package/dist/menu/menu.js +20 -20
- package/dist/menu-button/menu-button.js +48 -48
- package/dist/menubar/menubar.js +42 -42
- package/dist/modal/modal.css +1 -1
- package/dist/modal/modal.js +41 -35
- package/dist/modal/modal.module.js +8 -7
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.js +57 -57
- package/dist/multi-select/multi-select.module.js +11 -11
- package/dist/native-select/native-select.js +13 -11
- package/dist/navigation-menu/navigation-menu.js +46 -46
- package/dist/node/accordion/accordion.js +46 -44
- package/dist/node/action-sheet/action-sheet.js +16 -16
- package/dist/node/alert-dialog/alert-dialog.js +34 -34
- package/dist/node/app-shell/app-shell.js +36 -33
- package/dist/node/app-shell/app-shell.module.js +8 -8
- package/dist/node/avatar-group/avatar-group.js +6 -6
- package/dist/node/badge/badge.js +17 -10
- package/dist/node/bottom-sheet/bottom-sheet.js +18 -18
- package/dist/node/button/button.js +15 -12
- package/dist/node/button/button.module.js +1 -1
- package/dist/node/button-group/button-group.js +8 -8
- package/dist/node/card/card.module.js +8 -8
- package/dist/node/carousel/carousel.js +20 -20
- package/dist/node/checkbox/checkbox.js +21 -21
- package/dist/node/checkbox-card/checkbox-card.js +15 -13
- package/dist/node/collapsible/collapsible.js +7 -7
- package/dist/node/color-picker/color-picker.js +26 -26
- package/dist/node/combobox/combobox.js +86 -86
- package/dist/node/combobox/combobox.module.js +15 -15
- package/dist/node/command-menu/command-menu.js +111 -111
- package/dist/node/comparison/comparison.js +10 -10
- package/dist/node/context-menu/context-menu.js +9 -9
- package/dist/node/copy-button/copy-button.js +18 -16
- package/dist/node/data-table/data-table.js +8 -2
- package/dist/node/data-table/data-table.module.js +29 -29
- package/dist/node/date-picker/date-picker.js +25 -25
- package/dist/node/date-picker/date-picker.module.js +19 -19
- package/dist/node/date-range-picker/date-range-picker.js +26 -26
- package/dist/node/drawer/drawer.js +18 -17
- package/dist/node/drawer/drawer.module.js +9 -9
- package/dist/node/dropdown/dropdown.js +48 -48
- package/dist/node/editable/editable.js +11 -11
- package/dist/node/fab/fab.js +53 -53
- package/dist/node/field/field.js +8 -8
- package/dist/node/file-uploader/file-uploader.js +19 -19
- package/dist/node/file-uploader/file-uploader.module.js +14 -14
- package/dist/node/filter/filter.js +10 -9
- package/dist/node/header-panel/header-panel.js +31 -31
- package/dist/node/hover-card/hover-card.js +21 -21
- package/dist/node/icon-button/icon-button.js +5 -5
- package/dist/node/icon-button/icon-button.module.js +1 -1
- package/dist/node/input/input.js +22 -21
- package/dist/node/input/input.module.js +5 -5
- package/dist/node/item/item.module.js +6 -6
- package/dist/node/layouts/src/page-header/page-header.js +33 -0
- package/dist/node/layouts/src/page-header/page-header.module.js +12 -0
- package/dist/node/link/link.js +14 -12
- package/dist/node/log-viewer/log-viewer.js +26 -26
- package/dist/node/menu/menu.js +20 -20
- package/dist/node/menu-button/menu-button.js +48 -48
- package/dist/node/menubar/menubar.js +42 -42
- package/dist/node/modal/modal.js +41 -35
- package/dist/node/modal/modal.module.js +8 -7
- package/dist/node/multi-select/multi-select.js +57 -57
- package/dist/node/multi-select/multi-select.module.js +11 -11
- package/dist/node/native-select/native-select.js +13 -11
- package/dist/node/navigation-menu/navigation-menu.js +46 -46
- package/dist/node/notification/notification.js +50 -44
- package/dist/node/notification/notification.module.js +7 -7
- package/dist/node/number-input/number-input.js +52 -50
- package/dist/node/number-input/number-input.module.js +8 -8
- package/dist/node/otp-input/otp-input.js +8 -8
- package/dist/node/otp-input/otp-input.module.js +2 -2
- package/dist/node/overflow-menu/overflow-menu.js +18 -13
- package/dist/node/password-input/password-input.js +28 -27
- package/dist/node/password-input/password-input.module.js +7 -7
- package/dist/node/popover/popover.js +26 -24
- package/dist/node/progress/progress.js +3 -2
- package/dist/node/pull-to-refresh/pull-to-refresh.js +13 -13
- package/dist/node/radial-progress/radial-progress.js +5 -5
- package/dist/node/radio/radio.js +23 -22
- package/dist/node/radio-card/radio-card.js +27 -26
- package/dist/node/react/src/index.js +4 -3
- package/dist/node/react/src/theme.js +30 -19
- package/dist/node/resizable/resizable.js +11 -11
- package/dist/node/scroll-area/scroll-area.js +4 -4
- package/dist/node/search/search.js +49 -49
- package/dist/node/search/search.module.js +5 -5
- package/dist/node/select/select.js +27 -26
- package/dist/node/sheet/sheet.js +11 -10
- package/dist/node/sheet/sheet.module.js +5 -5
- package/dist/node/side-nav/side-nav.js +91 -91
- package/dist/node/skip-nav/skip-nav.js +12 -12
- package/dist/node/slider/slider.js +13 -11
- package/dist/node/stat/stat.js +6 -5
- package/dist/node/stat/stat.module.js +7 -7
- package/dist/node/status/status.js +18 -11
- package/dist/node/steps/steps.js +23 -23
- package/dist/node/structured-list/structured-list.js +33 -32
- package/dist/node/tabs/tabs.js +49 -47
- package/dist/node/tag/tag.js +22 -15
- package/dist/node/tags-input/tags-input.js +35 -35
- package/dist/node/tags-input/tags-input.module.js +4 -4
- package/dist/node/textarea/textarea.js +22 -21
- package/dist/node/tile/tile.module.js +3 -3
- package/dist/node/time-picker/time-picker.js +22 -21
- package/dist/node/time-picker/time-picker.module.js +5 -5
- package/dist/node/timeline/timeline.js +22 -16
- package/dist/node/toast/toast.js +15 -15
- package/dist/node/toc/toc.js +8 -8
- package/dist/node/toggle/toggle.js +15 -13
- package/dist/node/toggle-group/toggle-group.js +10 -10
- package/dist/node/toggletip/toggletip.js +9 -9
- package/dist/node/tooltip/tooltip.js +5 -5
- package/dist/node/tree-view/tree-view.js +32 -32
- package/dist/notification/notification.css +1 -1
- package/dist/notification/notification.js +50 -44
- package/dist/notification/notification.module.js +7 -7
- package/dist/number-input/number-input.css +1 -1
- package/dist/number-input/number-input.js +52 -50
- package/dist/number-input/number-input.module.js +8 -8
- package/dist/otp-input/otp-input.css +1 -1
- package/dist/otp-input/otp-input.js +8 -8
- package/dist/otp-input/otp-input.module.js +2 -2
- package/dist/overflow-menu/overflow-menu.js +18 -13
- package/dist/password-input/password-input.css +1 -1
- package/dist/password-input/password-input.js +28 -27
- package/dist/password-input/password-input.module.js +7 -7
- package/dist/popover/popover.js +26 -24
- package/dist/progress/progress.js +3 -2
- package/dist/pull-to-refresh/pull-to-refresh.js +13 -13
- package/dist/radial-progress/radial-progress.js +5 -5
- package/dist/radio/radio.js +23 -22
- package/dist/radio-card/radio-card.js +27 -26
- package/dist/react/src/index.js +4 -3
- package/dist/react/src/theme.js +30 -19
- package/dist/resizable/resizable.js +11 -11
- package/dist/scroll-area/scroll-area.js +4 -4
- package/dist/search/search.css +1 -1
- package/dist/search/search.js +49 -49
- package/dist/search/search.module.js +5 -5
- package/dist/select/select.js +27 -26
- package/dist/sheet/sheet.css +1 -1
- package/dist/sheet/sheet.js +11 -10
- package/dist/sheet/sheet.module.js +5 -5
- package/dist/side-nav/side-nav.js +91 -91
- package/dist/skip-nav/skip-nav.js +12 -12
- package/dist/slider/slider.js +13 -11
- package/dist/stat/stat.css +1 -1
- package/dist/stat/stat.js +6 -5
- package/dist/stat/stat.module.js +7 -7
- package/dist/status/status.js +18 -11
- package/dist/steps/steps.js +23 -23
- package/dist/structured-list/structured-list.js +33 -32
- package/dist/styles.css +87 -23
- package/dist/tabs/tabs.js +49 -47
- package/dist/tag/tag.js +22 -15
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.js +35 -35
- package/dist/tags-input/tags-input.module.js +4 -4
- package/dist/textarea/textarea.js +22 -21
- package/dist/tile/tile.css +1 -1
- package/dist/tile/tile.module.js +3 -3
- package/dist/time-picker/time-picker.css +1 -1
- package/dist/time-picker/time-picker.js +22 -21
- package/dist/time-picker/time-picker.module.js +5 -5
- package/dist/timeline/timeline.js +22 -16
- package/dist/toast/toast.js +15 -15
- package/dist/toc/toc.js +8 -8
- package/dist/toggle/toggle.js +15 -13
- package/dist/toggle-group/toggle-group.js +10 -10
- package/dist/toggletip/toggletip.js +9 -9
- package/dist/tooltip/tooltip.js +5 -5
- package/dist/tree-view/tree-view.js +32 -32
- package/package.json +10 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./header-panel.module.js";
|
|
4
|
-
import { cn as t,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { cn as t, focusElement as n, useEffectPropSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
|
|
5
|
+
import { useRef as o } from "react";
|
|
6
|
+
import { builtin as s, t as c } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/header-panel/header-panel.tsx
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
let e =
|
|
14
|
-
if (e) if (
|
|
15
|
-
|
|
9
|
+
function d({ open: d, onClose: f, label: p, children: m, labels: h, className: g }) {
|
|
10
|
+
a();
|
|
11
|
+
let _ = o(null), v = o(null), y = r(d), b = o(f);
|
|
12
|
+
return b.current = f, i(() => {
|
|
13
|
+
let e = _.current;
|
|
14
|
+
if (e) if (y.value) {
|
|
15
|
+
v.current = document.activeElement;
|
|
16
16
|
try {
|
|
17
17
|
e.showPopover();
|
|
18
18
|
} catch {}
|
|
@@ -21,40 +21,40 @@ function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h
|
|
|
21
21
|
try {
|
|
22
22
|
e.hidePopover();
|
|
23
23
|
} catch {}
|
|
24
|
-
|
|
24
|
+
n(v.current), v.current = null;
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
27
|
-
let e =
|
|
26
|
+
}), i(() => {
|
|
27
|
+
let e = _.current;
|
|
28
28
|
if (!e) return;
|
|
29
29
|
let t = (e) => {
|
|
30
30
|
let t = "newState" in e ? e.newState === "closed" : !0;
|
|
31
|
-
|
|
31
|
+
y.peek() && t && b.current();
|
|
32
32
|
};
|
|
33
33
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
-
ref:
|
|
34
|
+
}), /* @__PURE__ */ u("div", {
|
|
35
|
+
ref: _,
|
|
36
36
|
popover: "auto",
|
|
37
37
|
role: "region",
|
|
38
|
-
"aria-label":
|
|
38
|
+
"aria-label": p,
|
|
39
39
|
tabIndex: -1,
|
|
40
|
-
"data-state":
|
|
41
|
-
className: t(e.panel,
|
|
42
|
-
children: [/* @__PURE__ */
|
|
40
|
+
"data-state": d ? "open" : "closed",
|
|
41
|
+
className: t(e.panel, g),
|
|
42
|
+
children: [/* @__PURE__ */ u("div", {
|
|
43
43
|
className: e.header,
|
|
44
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ l("span", {
|
|
45
45
|
className: e.title,
|
|
46
|
-
children:
|
|
47
|
-
}), /* @__PURE__ */
|
|
46
|
+
children: p
|
|
47
|
+
}), /* @__PURE__ */ l("button", {
|
|
48
48
|
type: "button",
|
|
49
|
-
"aria-label":
|
|
49
|
+
"aria-label": h?.close ?? c(s.headerPanel.close),
|
|
50
50
|
className: e.close,
|
|
51
|
-
onClick: () =>
|
|
52
|
-
children: /* @__PURE__ */
|
|
51
|
+
onClick: () => b.current(),
|
|
52
|
+
children: /* @__PURE__ */ l("svg", {
|
|
53
53
|
viewBox: "0 0 16 16",
|
|
54
54
|
width: "14",
|
|
55
55
|
height: "14",
|
|
56
56
|
"aria-hidden": "true",
|
|
57
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ l("path", {
|
|
58
58
|
d: "M4 4l8 8M12 4l-8 8",
|
|
59
59
|
stroke: "currentColor",
|
|
60
60
|
strokeWidth: "1.5",
|
|
@@ -62,11 +62,11 @@ function u({ open: u, onClose: d, label: f, children: p, labels: m, className: h
|
|
|
62
62
|
})
|
|
63
63
|
})
|
|
64
64
|
})]
|
|
65
|
-
}), /* @__PURE__ */
|
|
65
|
+
}), /* @__PURE__ */ l("div", {
|
|
66
66
|
className: e.body,
|
|
67
|
-
children:
|
|
67
|
+
children: m
|
|
68
68
|
})]
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
export {
|
|
72
|
+
export { d as HeaderPanel };
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { usePopover as e } from "../popover/use-popover.js";
|
|
4
4
|
import t from "./hover-card.module.js";
|
|
5
5
|
import { useSignalEffect as n, useSignals as r } from "@cascivo/core";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { createContext as i, useRef as a } from "react";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
8
|
//#region ../components/src/hover-card/hover-card.tsx
|
|
9
|
-
var s =
|
|
10
|
-
function c({ children: t, openDelay: r = 300, closeDelay:
|
|
11
|
-
let c = e(), l =
|
|
9
|
+
var s = i(null);
|
|
10
|
+
function c({ children: t, openDelay: r = 300, closeDelay: i = 100 }) {
|
|
11
|
+
let c = e(), l = a(void 0), u = a(void 0), d = a(r);
|
|
12
12
|
d.current = r;
|
|
13
|
-
let f =
|
|
14
|
-
f.current =
|
|
13
|
+
let f = a(i);
|
|
14
|
+
f.current = i;
|
|
15
15
|
let p = {
|
|
16
16
|
...c,
|
|
17
17
|
open: () => {
|
|
@@ -27,17 +27,17 @@ function c({ children: t, openDelay: r = 300, closeDelay: a = 100 }) {
|
|
|
27
27
|
};
|
|
28
28
|
return n(() => () => {
|
|
29
29
|
clearTimeout(l.current), clearTimeout(u.current);
|
|
30
|
-
}), /* @__PURE__ */
|
|
30
|
+
}), /* @__PURE__ */ o(s.Provider, {
|
|
31
31
|
value: p,
|
|
32
32
|
children: t
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function l({ ctx: e, children: n }) {
|
|
36
36
|
r();
|
|
37
|
-
let { triggerRef:
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
ref:
|
|
40
|
-
style: { anchorName:
|
|
37
|
+
let { triggerRef: i, anchorName: a, open: s, close: c } = e;
|
|
38
|
+
return /* @__PURE__ */ o("span", {
|
|
39
|
+
ref: i,
|
|
40
|
+
style: { anchorName: a },
|
|
41
41
|
onMouseEnter: s,
|
|
42
42
|
onMouseLeave: c,
|
|
43
43
|
onFocus: s,
|
|
@@ -47,33 +47,33 @@ function l({ ctx: e, children: n }) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function u({ children: e }) {
|
|
50
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ o(s.Consumer, { children: (t) => {
|
|
51
51
|
if (!t) throw Error("HoverCardTrigger must be inside <HoverCard>");
|
|
52
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ o(l, {
|
|
53
53
|
ctx: t,
|
|
54
54
|
children: e
|
|
55
55
|
});
|
|
56
56
|
} });
|
|
57
57
|
}
|
|
58
|
-
function d({ ctx: e, children: n, className:
|
|
58
|
+
function d({ ctx: e, children: n, className: i }) {
|
|
59
59
|
r();
|
|
60
|
-
let { popoverRef:
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
ref:
|
|
60
|
+
let { popoverRef: a, anchorName: s, isOpen: c, open: l, close: u } = e;
|
|
61
|
+
return /* @__PURE__ */ o("div", {
|
|
62
|
+
ref: a,
|
|
63
63
|
popover: "auto",
|
|
64
64
|
role: "complementary",
|
|
65
65
|
"data-state": c.value ? "open" : "closed",
|
|
66
66
|
style: { positionAnchor: s },
|
|
67
67
|
onMouseEnter: l,
|
|
68
68
|
onMouseLeave: u,
|
|
69
|
-
className: [t.content,
|
|
69
|
+
className: [t.content, i].filter(Boolean).join(" "),
|
|
70
70
|
children: n
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function f({ children: e, className: t }) {
|
|
74
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ o(s.Consumer, { children: (n) => {
|
|
75
75
|
if (!n) throw Error("HoverCardContent must be inside <HoverCard>");
|
|
76
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ o(d, {
|
|
77
77
|
ctx: n,
|
|
78
78
|
...t !== void 0 && { className: t },
|
|
79
79
|
children: e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._iconButton_1f9hf_2{aspect-ratio:1;font-family:var(--cascivo-font-sans);line-height:var(--cascivo-leading-none);cursor:pointer;border-radius:var(--cascivo-button-radius,var(--cascivo-radius-control));color:var(--cascivo-color-text);transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);background-color:#0000;border:1px solid #0000;flex-shrink:0;justify-content:center;align-items:center;padding:0;text-decoration:none;display:inline-flex}._iconButton_1f9hf_2:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._iconButton_1f9hf_2:disabled,._iconButton_1f9hf_2[aria-disabled=true]{opacity:.5;cursor:not-allowed;pointer-events:none}._iconButton_1f9hf_2[data-size=sm]{block-size:var(--cascivo-control-height-sm);inline-size:var(--cascivo-control-height-sm);font-size:var(--cascivo-text-sm)}._iconButton_1f9hf_2[data-size=md]{block-size:var(--cascivo-control-height-md);inline-size:var(--cascivo-control-height-md);font-size:var(--cascivo-text-base)}._iconButton_1f9hf_2[data-size=lg]{block-size:var(--cascivo-control-height-lg);inline-size:var(--cascivo-control-height-lg);font-size:var(--cascivo-text-lg)}._iconButton_1f9hf_2[data-variant=ghost]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._iconButton_1f9hf_2[data-variant=outline]{border-color:var(--cascivo-color-border);background-color:var(--cascivo-color-surface)}._iconButton_1f9hf_2[data-variant=outline]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._iconButton_1f9hf_2[data-variant=filled]{background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-fg)}._iconButton_1f9hf_2[data-variant=filled]:hover:not(:disabled){background-color:var(--cascivo-color-primary-hover)}._iconButton_1f9hf_2[data-variant=filled]:active:not(:disabled){background-color:var(--cascivo-color-primary-active)}}@media (forced-colors:active){._iconButton_1f9hf_2{border:1px solid buttontext}._iconButton_1f9hf_2:focus-visible{outline-offset:2px;outline:2px solid highlight}._iconButton_1f9hf_2:disabled{color:graytext;border-color:graytext}}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./icon-button.module.js";
|
|
4
4
|
import { Slot as t, cn as n } from "@cascivo/core";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { forwardRef as r } from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
7
|
//#region ../components/src/icon-button/icon-button.tsx
|
|
8
|
-
var a =
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
var a = r(function({ label: r, ariaLabel: a, icon: o, size: s = "md", variant: c = "ghost", asChild: l = !1, className: u, children: d, ...f }, p) {
|
|
9
|
+
return /* @__PURE__ */ i(l ? t : "button", {
|
|
10
10
|
type: l ? void 0 : "button",
|
|
11
|
-
"aria-label":
|
|
11
|
+
"aria-label": r ?? a,
|
|
12
12
|
"data-size": s,
|
|
13
13
|
"data-variant": c,
|
|
14
14
|
className: n(e.iconButton, u),
|