@cascivo/react 0.11.1 → 0.13.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/README.md +1 -1
- package/dist/alert-dialog/alert-dialog.js +2 -4
- package/dist/app-shell/app-shell.js +24 -23
- package/dist/badge/badge.js +17 -10
- package/dist/button/button.css +1 -1
- package/dist/button/button.module.js +1 -1
- package/dist/card/card.css +1 -1
- package/dist/card/card.js +21 -11
- package/dist/card/card.module.js +8 -5
- package/dist/checkbox/checkbox.js +2 -2
- package/dist/combobox/combobox.css +1 -1
- package/dist/combobox/combobox.module.js +15 -15
- package/dist/command-menu/command-menu.js +67 -71
- package/dist/data-table/data-table.css +1 -1
- package/dist/data-table/data-table.js +7 -1
- 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.module.js +19 -19
- package/dist/dropdown/dropdown.js +48 -50
- package/dist/file-uploader/file-uploader.css +1 -1
- package/dist/file-uploader/file-uploader.module.js +14 -14
- package/dist/filter/filter.js +10 -9
- package/dist/header-panel/header-panel.js +2 -4
- package/dist/icon-button/icon-button.css +1 -1
- package/dist/icon-button/icon-button.js +10 -10
- package/dist/icon-button/icon-button.module.js +1 -1
- package/dist/index.d.ts +1300 -69
- package/dist/input/input.css +1 -1
- 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 +12 -12
- package/dist/modal/modal.js +4 -4
- package/dist/multi-select/multi-select.css +1 -1
- package/dist/multi-select/multi-select.module.js +11 -11
- package/dist/node/alert-dialog/alert-dialog.js +2 -4
- package/dist/node/app-shell/app-shell.js +24 -23
- package/dist/node/badge/badge.js +17 -10
- package/dist/node/button/button.module.js +1 -1
- package/dist/node/card/card.js +21 -11
- package/dist/node/card/card.module.js +8 -5
- package/dist/node/checkbox/checkbox.js +2 -2
- package/dist/node/combobox/combobox.module.js +15 -15
- package/dist/node/command-menu/command-menu.js +67 -71
- package/dist/node/data-table/data-table.js +7 -1
- package/dist/node/data-table/data-table.module.js +29 -29
- package/dist/node/date-picker/date-picker.module.js +19 -19
- package/dist/node/dropdown/dropdown.js +48 -50
- 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 +2 -4
- package/dist/node/icon-button/icon-button.js +10 -10
- package/dist/node/icon-button/icon-button.module.js +1 -1
- 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 +12 -12
- package/dist/node/modal/modal.js +4 -4
- package/dist/node/multi-select/multi-select.module.js +11 -11
- package/dist/node/notification/notification.js +50 -44
- package/dist/node/notification/notification.module.js +7 -7
- package/dist/node/number-input/number-input.module.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.module.js +7 -7
- package/dist/node/popover/use-popover.js +9 -9
- package/dist/node/progress/progress.js +3 -2
- package/dist/node/react/src/index.js +63 -62
- package/dist/node/search/search.js +19 -22
- package/dist/node/search/search.module.js +5 -5
- package/dist/node/sheet/sheet.js +2 -4
- 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 +14 -13
- package/dist/node/tag/tag.js +22 -15
- package/dist/node/tags-input/tags-input.module.js +4 -4
- package/dist/node/tile/tile.module.js +3 -3
- package/dist/node/time-picker/time-picker.module.js +5 -5
- package/dist/node/timeline/timeline.js +22 -16
- package/dist/node/visually-hidden/visually-hidden.js +2 -13
- 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.module.js +8 -8
- package/dist/otp-input/otp-input.css +1 -1
- 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.module.js +7 -7
- package/dist/popover/use-popover.js +9 -9
- package/dist/progress/progress.js +3 -2
- package/dist/react/src/index.js +63 -62
- package/dist/search/search.css +1 -1
- package/dist/search/search.js +19 -22
- package/dist/search/search.module.js +5 -5
- package/dist/sheet/sheet.js +2 -4
- 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 +14 -13
- package/dist/styles.css +33 -21
- package/dist/tag/tag.js +22 -15
- package/dist/tags-input/tags-input.css +1 -1
- package/dist/tags-input/tags-input.module.js +4 -4
- 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.module.js +5 -5
- package/dist/timeline/timeline.js +22 -16
- package/dist/visually-hidden/visually-hidden.js +2 -13
- package/package.json +4 -4
- package/readme.body.md +1 -1
- package/dist/node/visually-hidden/visually-hidden.module.js +0 -5
- package/dist/visually-hidden/visually-hidden.css +0 -1
- package/dist/visually-hidden/visually-hidden.module.js +0 -6
package/README.md
CHANGED
|
@@ -407,7 +407,7 @@ routing break after adding one of these, check that the import resolves to
|
|
|
407
407
|
- **Cta** — Call-to-action band — quiet hairline-bordered section with title, description, and centered actions. Replace demo content before shipping.
|
|
408
408
|
- **DashboardLayout** — Dashboard page layout with stats strip, main content area, and optional aside.
|
|
409
409
|
- **FeatureGrid** — Feature section — AutoGrid of items with optional title, description, and icon slots. Icons are optional; the grid works text-only. Replace demo content before shipping.
|
|
410
|
-
- **Flex** — Flex layout primitive for vertical or horizontal stacking with gap control.
|
|
410
|
+
- **Flex** — Flex layout primitive for vertical or horizontal stacking with gap control. ⚠ Unlike CSS `flex-direction`, `direction` defaults to `vertical` — pass `direction="horizontal"` for a row.
|
|
411
411
|
- **Grid** — CSS grid layout primitive with responsive column collapsing. Establishes its own containment, so responsive `cols` adapt to the grid’s own slot width with no wrapper or container ancestor required.
|
|
412
412
|
- **Hero** — Page hero section — centered or split layout with eyebrow, title, description, actions and media slots. Replace demo content before shipping.
|
|
413
413
|
- **Indicator** — Positions an overlay element (badge, dot, count) at a corner of its child
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./alert-dialog.module.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useEffectPropSignal as t, useId as n, useSignalEffect as r } from "@cascivo/core";
|
|
5
5
|
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { useRef as c } from "react";
|
|
8
8
|
//#region ../components/src/alert-dialog/alert-dialog.tsx
|
|
9
9
|
function l({ open: l, title: u, description: d, onConfirm: f, onCancel: p, labels: m, variant: h = "default" }) {
|
|
10
|
-
let g = c(null), _ =
|
|
11
|
-
y.value = l;
|
|
12
|
-
let b = c(null), x = c(p);
|
|
10
|
+
let g = c(null), _ = n("cascivo-alert-dialog-title"), v = n("cascivo-alert-dialog-desc"), y = t(l), b = c(null), x = c(p);
|
|
13
11
|
x.current = p;
|
|
14
12
|
let S = c(f);
|
|
15
13
|
return S.current = f, r(() => {
|
|
@@ -5,52 +5,53 @@ import { cn as t, useSignal as n, useSignalEffect as r, useSignals as i } from "
|
|
|
5
5
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
import { cloneElement as c, isValidElement as l, useRef as u } from "react";
|
|
7
7
|
//#region ../components/src/app-shell/app-shell.tsx
|
|
8
|
-
function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g, onOpenChange: _, className: v }) {
|
|
8
|
+
function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g, onOpenChange: _, className: v, ...y }) {
|
|
9
9
|
i();
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
|
|
10
|
+
let b = h !== void 0, x = n(h ?? g ?? !0);
|
|
11
|
+
b && (x.value = h);
|
|
12
|
+
let S = u(null), C = u(null);
|
|
13
|
+
function w(e) {
|
|
14
|
+
b || (x.value = e), _?.(e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
typeof document < "u" && (
|
|
16
|
+
function T() {
|
|
17
|
+
typeof document < "u" && (C.current = document.activeElement), w(!x.value);
|
|
18
18
|
}
|
|
19
19
|
r(() => {
|
|
20
|
-
|
|
20
|
+
b || g !== void 0 || typeof window > "u" || typeof window.matchMedia != "function" || window.matchMedia("(max-width: 63.999rem)").matches && (x.value = !1);
|
|
21
21
|
}), r(() => {
|
|
22
|
-
if (!
|
|
22
|
+
if (!x.value || typeof document > "u") return;
|
|
23
23
|
let e = (e) => {
|
|
24
|
-
e.key === "Escape" &&
|
|
24
|
+
e.key === "Escape" && w(!1);
|
|
25
25
|
};
|
|
26
26
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
27
27
|
}), r(() => {
|
|
28
|
-
let e =
|
|
29
|
-
if (e) if (
|
|
28
|
+
let e = S.current;
|
|
29
|
+
if (e) if (x.value) e.removeAttribute("inert");
|
|
30
30
|
else {
|
|
31
31
|
e.setAttribute("inert", "");
|
|
32
|
-
let t =
|
|
32
|
+
let t = C.current;
|
|
33
33
|
t && e.contains(document.activeElement) && t.focus();
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
let
|
|
37
|
-
onMenuClick:
|
|
38
|
-
menuExpanded:
|
|
36
|
+
let E = l(d) && f ? c(d, {
|
|
37
|
+
onMenuClick: T,
|
|
38
|
+
menuExpanded: x.value
|
|
39
39
|
}) : d;
|
|
40
40
|
return /* @__PURE__ */ s("div", {
|
|
41
41
|
className: t(e.shell, v),
|
|
42
|
-
"data-open":
|
|
42
|
+
"data-open": x.value,
|
|
43
|
+
...y,
|
|
43
44
|
children: [
|
|
44
45
|
/* @__PURE__ */ o("div", {
|
|
45
46
|
className: e.header,
|
|
46
|
-
children:
|
|
47
|
+
children: E
|
|
47
48
|
}),
|
|
48
49
|
/* @__PURE__ */ s("div", {
|
|
49
50
|
className: e.body,
|
|
50
51
|
children: [f && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
|
|
51
|
-
ref:
|
|
52
|
+
ref: S,
|
|
52
53
|
className: e.navWrapper,
|
|
53
|
-
"data-open":
|
|
54
|
+
"data-open": x.value,
|
|
54
55
|
"data-testid": "app-shell-nav",
|
|
55
56
|
children: /* @__PURE__ */ o("div", {
|
|
56
57
|
className: e.navInner,
|
|
@@ -58,10 +59,10 @@ function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g,
|
|
|
58
59
|
})
|
|
59
60
|
}), /* @__PURE__ */ o("div", {
|
|
60
61
|
className: e.scrim,
|
|
61
|
-
"data-open":
|
|
62
|
+
"data-open": x.value,
|
|
62
63
|
"data-testid": "app-shell-scrim",
|
|
63
64
|
"aria-hidden": "true",
|
|
64
|
-
onClick: () =>
|
|
65
|
+
onClick: () => w(!1)
|
|
65
66
|
})] }), /* @__PURE__ */ o("main", {
|
|
66
67
|
id: "cascade-main",
|
|
67
68
|
tabIndex: -1,
|
package/dist/badge/badge.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./badge.module.js";
|
|
4
|
-
import { cn as t } from "@cascivo/core";
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { cn as t, normalizeTone as n } from "@cascivo/core";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
//#region ../components/src/badge/badge.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
var i = {
|
|
8
|
+
neutral: "default",
|
|
9
|
+
info: "info",
|
|
10
|
+
success: "success",
|
|
11
|
+
warning: "warning",
|
|
12
|
+
danger: "destructive"
|
|
13
|
+
};
|
|
14
|
+
function a({ variant: a = "default", size: o = "md", className: s, children: c, ...l }) {
|
|
15
|
+
return /* @__PURE__ */ r("span", {
|
|
16
|
+
"data-variant": i[n(a)] ?? a,
|
|
17
|
+
"data-size": o,
|
|
18
|
+
className: t(e.badge, s),
|
|
19
|
+
...l,
|
|
20
|
+
children: c
|
|
14
21
|
});
|
|
15
22
|
}
|
|
16
23
|
//#endregion
|
|
17
|
-
export {
|
|
24
|
+
export { a as Badge };
|
package/dist/button/button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._button_131qn_2{justify-content:center;align-items:center;gap:var(--cascivo-space-2);font-family:var(--cascivo-font-sans);font-weight:var(--cascivo-font-medium);line-height:var(--cascivo-leading-none);white-space:nowrap;cursor:pointer;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);border-radius:var(--cascivo-button-radius,var(--cascivo-radius-control));border:1px solid #0000;text-decoration:none;display:inline-flex}._button_131qn_2:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._button_131qn_2:disabled,._button_131qn_2[aria-disabled=true]{opacity:.5;opacity:var(--cascivo-disabled-opacity,.5);cursor:not-allowed;pointer-events:none}._button_131qn_2[data-size=sm]{height:var(--cascivo-control-height-sm);padding-inline:var(--cascivo-space-3);font-size:var(--cascivo-text-ui)}._button_131qn_2[data-size=md]{height:var(--cascivo-control-height-md);padding-inline:var(--cascivo-space-4);padding-block:.5rem;padding-block:--cascivo-step(2);font-size:var(--cascivo-text-ui)}._button_131qn_2[data-size=lg]{height:var(--cascivo-control-height-lg);padding-inline:var(--cascivo-space-6);font-size:var(--cascivo-text-body)}@media (pointer:coarse){._button_131qn_2[data-size=sm],._button_131qn_2[data-size=md]{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}._button_131qn_2[data-variant=primary]{background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-fg)}._button_131qn_2[data-variant=primary]:hover:not(:disabled){background-color:var(--cascivo-color-primary-hover)}._button_131qn_2[data-variant=primary]:active:not(:disabled){background-color:var(--cascivo-color-primary-active)}._button_131qn_2[data-variant=secondary]{background-color:var(--cascivo-color-secondary);color:var(--cascivo-color-secondary-content)}._button_131qn_2[data-variant=secondary]:hover:not(:disabled){background-color:var(--cascivo-color-secondary-hover)}._button_131qn_2[data-variant=ghost]{color:var(--cascivo-color-text);background-color:#0000}._button_131qn_2[data-variant=ghost]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._button_131qn_2[data-variant=destructive]{background-color:var(--cascivo-color-destructive);color:var(--cascivo-color-text-on-destructive)}._button_131qn_2[data-variant=destructive]:hover:not(:disabled){background-color:var(--cascivo-color-destructive-hover)}}@media (forced-colors:active){._button_131qn_2{border:1px solid buttontext}._button_131qn_2:focus-visible{outline-offset:2px;outline:2px solid highlight}._button_131qn_2:disabled{color:graytext;border-color:graytext}}
|
package/dist/card/card.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._card_ssezx_2{background-color:var(--cascivo-color-surface);border-radius:var(--cascivo-radius-surface);padding:var(--_card-p,0);overflow:hidden}._card_ssezx_2:has(>._header_ssezx_12,>._content_ssezx_12,>._footer_ssezx_12){padding:0}._card_ssezx_2[data-padding=none]{--_card-p:0}._card_ssezx_2[data-padding=sm]{--_card-p:var(--cascivo-space-4);--_card-inner-p:var(--cascivo-space-4)}._card_ssezx_2[data-padding=md]{--_card-p:var(--cascivo-space-6);--_card-inner-p:var(--cascivo-space-6)}._card_ssezx_2[data-padding=lg]{--_card-p:var(--cascivo-space-8);--_card-inner-p:var(--cascivo-space-8)}._card_ssezx_2[data-variant=default]{border:1px solid var(--cascivo-color-border)}._card_ssezx_2[data-variant=outlined]{border:1.5px solid var(--cascivo-color-border-strong)}._card_ssezx_2[data-variant=elevated]{box-shadow:var(--cascivo-shadow-md);border:none}._header_ssezx_12{padding:var(--_card-inner-p,var(--cascivo-space-6));gap:var(--cascivo-space-1);flex-direction:column;min-inline-size:0;padding-block-end:0;display:flex}._headerRow_ssezx_67{justify-content:space-between;align-items:flex-start;gap:var(--cascivo-space-3);flex-direction:row}._headerRow_ssezx_67 ._headerMain_ssezx_75{gap:var(--cascivo-space-1);flex-direction:column;min-inline-size:0;display:flex}._headerRow_ssezx_67 ._headerActions_ssezx_82{align-items:center;gap:var(--cascivo-space-1);flex-shrink:0;display:flex}._title_ssezx_90{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-lg);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);margin:0}._content_ssezx_12{padding:var(--_card-inner-p,var(--cascivo-space-6));color:var(--cascivo-color-text-subtle);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-relaxed)}._footer_ssezx_12{padding:var(--_card-inner-p,var(--cascivo-space-6));align-items:center;gap:var(--cascivo-space-2);min-inline-size:0;padding-block-start:0;display:flex}._footer_ssezx_12>*{min-inline-size:0}}
|
package/dist/card/card.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import e from "./card.module.js";
|
|
4
4
|
import { cn as t } from "@cascivo/core";
|
|
5
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
6
|
//#region ../components/src/card/card.tsx
|
|
7
|
-
function
|
|
7
|
+
function i({ variant: r = "default", padding: i = "md", className: a, children: o, ...s }) {
|
|
8
8
|
return /* @__PURE__ */ n("div", {
|
|
9
9
|
"data-variant": r,
|
|
10
10
|
"data-padding": i,
|
|
@@ -13,28 +13,38 @@ function r({ variant: r = "default", padding: i = "md", className: a, children:
|
|
|
13
13
|
children: o
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ n("div", {
|
|
18
|
-
className: t(e.header,
|
|
19
|
-
...
|
|
20
|
-
children:
|
|
16
|
+
function a({ actions: i, className: a, children: o, ...s }) {
|
|
17
|
+
return i === void 0 ? /* @__PURE__ */ n("div", {
|
|
18
|
+
className: t(e.header, a),
|
|
19
|
+
...s,
|
|
20
|
+
children: o
|
|
21
|
+
}) : /* @__PURE__ */ r("div", {
|
|
22
|
+
className: t(e.header, e.headerRow, a),
|
|
23
|
+
...s,
|
|
24
|
+
children: [/* @__PURE__ */ n("div", {
|
|
25
|
+
className: e.headerMain,
|
|
26
|
+
children: o
|
|
27
|
+
}), /* @__PURE__ */ n("div", {
|
|
28
|
+
className: e.headerActions,
|
|
29
|
+
children: i
|
|
30
|
+
})]
|
|
21
31
|
});
|
|
22
32
|
}
|
|
23
|
-
function
|
|
33
|
+
function o({ className: r, children: i, ...a }) {
|
|
24
34
|
return /* @__PURE__ */ n("h3", {
|
|
25
35
|
className: t(e.title, r),
|
|
26
36
|
...a,
|
|
27
37
|
children: i
|
|
28
38
|
});
|
|
29
39
|
}
|
|
30
|
-
function
|
|
40
|
+
function s({ className: r, children: i, ...a }) {
|
|
31
41
|
return /* @__PURE__ */ n("div", {
|
|
32
42
|
className: t(e.content, r),
|
|
33
43
|
...a,
|
|
34
44
|
children: i
|
|
35
45
|
});
|
|
36
46
|
}
|
|
37
|
-
function
|
|
47
|
+
function c({ className: r, children: i, ...a }) {
|
|
38
48
|
return /* @__PURE__ */ n("div", {
|
|
39
49
|
className: t(e.footer, r),
|
|
40
50
|
...a,
|
|
@@ -42,4 +52,4 @@ function s({ className: r, children: i, ...a }) {
|
|
|
42
52
|
});
|
|
43
53
|
}
|
|
44
54
|
//#endregion
|
|
45
|
-
export {
|
|
55
|
+
export { i as Card, s as CardContent, c as CardFooter, a as CardHeader, o as CardTitle };
|
package/dist/card/card.module.js
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import './card.css';
|
|
4
4
|
var e = {
|
|
5
|
-
card: "
|
|
6
|
-
header: "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
card: "_card_ssezx_2",
|
|
6
|
+
header: "_header_ssezx_12",
|
|
7
|
+
content: "_content_ssezx_12",
|
|
8
|
+
footer: "_footer_ssezx_12",
|
|
9
|
+
headerRow: "_headerRow_ssezx_67",
|
|
10
|
+
headerMain: "_headerMain_ssezx_75",
|
|
11
|
+
headerActions: "_headerActions_ssezx_82",
|
|
12
|
+
title: "_title_ssezx_90"
|
|
10
13
|
};
|
|
11
14
|
//#endregion
|
|
12
15
|
export { e as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import e from "./checkbox.module.js";
|
|
4
|
-
import { cn as t,
|
|
4
|
+
import { cn as t, useEffectPropSignal as n, useSignalEffect as r } from "@cascivo/core";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
import { useRef as o } from "react";
|
|
7
7
|
//#region ../components/src/checkbox/checkbox.tsx
|
|
8
8
|
function s({ label: s, indeterminate: c = !1, className: l, id: u, disabled: d, ...f }) {
|
|
9
9
|
let p = o(null), m = n(c);
|
|
10
|
-
|
|
10
|
+
r(() => {
|
|
11
11
|
p.current && (p.current.indeterminate = m.value);
|
|
12
12
|
});
|
|
13
13
|
let h = u ?? (s ? `cascade-checkbox-${s.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer cascivo.component{.
|
|
1
|
+
@layer cascivo.component{._wrapper_11nor_2{gap:var(--cascivo-space-1);min-inline-size:0;font-family:var(--cascivo-font-sans);flex-direction:column;display:flex;position:relative}._label_11nor_14{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._field_11nor_20{align-items:center;display:flex;position:relative}._trigger_11nor_26{inline-size:100%;padding-inline:var(--cascivo-space-3);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);cursor:pointer;text-align:start;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;justify-content:space-between;align-items:center;display:flex}._trigger_11nor_26:hover:not(:disabled){border-color:var(--cascivo-color-border-strong)}._trigger_11nor_26:focus-visible{border-color:var(--cascivo-color-accent);box-shadow:0 0 0 3px color-mix(in srgb, var(--cascivo-color-accent) 20%, transparent)}._trigger_11nor_26:disabled{opacity:.5;cursor:not-allowed}._wrapper_11nor_2[data-size=sm] ._trigger_11nor_26{block-size:2rem}._wrapper_11nor_2[data-size=md] ._trigger_11nor_26{block-size:2.5rem}._wrapper_11nor_2[data-size=lg] ._trigger_11nor_26{block-size:3rem}._wrapper_11nor_2[data-state=error] ._trigger_11nor_26{border-color:var(--cascivo-color-danger)}._value_11nor_74{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._placeholder_11nor_80{color:var(--cascivo-color-text-subtle)}._chevron_11nor_84{border-inline-end:2px solid var(--cascivo-color-text-muted);border-block-end:2px solid var(--cascivo-color-text-muted);block-size:.75rem;inline-size:.75rem;transition:transform var(--cascivo-duration-150) var(--cascivo-ease-out);flex-shrink:0;margin-inline-start:var(--cascivo-space-2);display:inline-block;transform:rotate(45deg)}._wrapper_11nor_2[data-state=open] ._chevron_11nor_84{transform:rotate(-135deg)}._clear_11nor_100{cursor:pointer;min-block-size:1.5rem;min-inline-size:1.5rem;color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-xs);padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-8)}._clear_11nor_100:hover{color:var(--cascivo-color-text)}._clear_11nor_100:focus-visible{box-shadow:0 0 0 2px var(--cascivo-color-accent)}._listbox_11nor_126{inline-size:100%;z-index:var(--cascivo-z-dropdown);background-color:var(--cascivo-color-surface-overlay);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);max-block-size:16rem;box-shadow:var(--cascivo-shadow-overlay);opacity:0;visibility:hidden;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), visibility var(--cascivo-motion-enter);position:absolute;inset-block-start:calc(100% + var(--cascivo-space-1));inset-inline-start:0;overflow-y:auto;translate:0 -.25rem}._listbox_11nor_126[data-state=open]{opacity:1;visibility:visible;translate:0}@starting-style{._listbox_11nor_126[data-state=open]{opacity:0;translate:0 -.25rem}}._searchWrapper_11nor_160{padding:var(--cascivo-space-2);border-block-end:1px solid var(--cascivo-color-border)}._search_11nor_160{inline-size:100%;padding-inline:var(--cascivo-space-2);padding-block:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);outline:none}._search_11nor_160:focus-visible{border-color:var(--cascivo-color-accent)}._option_11nor_182{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);cursor:pointer;border-radius:var(--cascivo-radius-item)}._option_11nor_182[data-state=active]{background-color:var(--cascivo-color-bg-subtle)}._option_11nor_182[aria-selected=true]{background-color:color-mix(in srgb, var(--cascivo-color-accent) 12%, transparent);color:var(--cascivo-color-accent)}._option_11nor_182[data-disabled]{opacity:.4;cursor:not-allowed}._empty_11nor_205{padding:var(--cascivo-space-4);text-align:center;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-muted)}._error_11nor_212{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-danger)}._hint_11nor_217{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted)}}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import './combobox.css';
|
|
4
4
|
var e = {
|
|
5
|
-
wrapper: "
|
|
6
|
-
label: "
|
|
7
|
-
field: "
|
|
8
|
-
trigger: "
|
|
9
|
-
value: "
|
|
10
|
-
placeholder: "
|
|
11
|
-
chevron: "
|
|
12
|
-
clear: "
|
|
13
|
-
listbox: "
|
|
14
|
-
searchWrapper: "
|
|
15
|
-
search: "
|
|
16
|
-
option: "
|
|
17
|
-
empty: "
|
|
18
|
-
error: "
|
|
19
|
-
hint: "
|
|
5
|
+
wrapper: "_wrapper_11nor_2",
|
|
6
|
+
label: "_label_11nor_14",
|
|
7
|
+
field: "_field_11nor_20",
|
|
8
|
+
trigger: "_trigger_11nor_26",
|
|
9
|
+
value: "_value_11nor_74",
|
|
10
|
+
placeholder: "_placeholder_11nor_80",
|
|
11
|
+
chevron: "_chevron_11nor_84",
|
|
12
|
+
clear: "_clear_11nor_100",
|
|
13
|
+
listbox: "_listbox_11nor_126",
|
|
14
|
+
searchWrapper: "_searchWrapper_11nor_160",
|
|
15
|
+
search: "_search_11nor_160",
|
|
16
|
+
option: "_option_11nor_182",
|
|
17
|
+
empty: "_empty_11nor_205",
|
|
18
|
+
error: "_error_11nor_212",
|
|
19
|
+
hint: "_hint_11nor_217"
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|
|
22
22
|
export { e as default };
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
4
|
import { Kbd as t } from "../kbd/kbd.js";
|
|
5
5
|
import n from "./command-menu.module.js";
|
|
6
|
-
import { batch as r, cn as i,
|
|
6
|
+
import { batch as r, cn as i, useEffectPropSignal as a, useSignal as o, useSignalEffect as s, useSignals as ee } from "@cascivo/core";
|
|
7
7
|
import { builtin as c, t as l } from "@cascivo/i18n";
|
|
8
8
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
-
import { useId as
|
|
9
|
+
import { useId as te, useRef as f } from "react";
|
|
10
10
|
//#region ../components/src/command-menu/command-menu.tsx
|
|
11
11
|
function p(e, t) {
|
|
12
12
|
if (e.length === 0) return {
|
|
@@ -66,46 +66,42 @@ function _(e, t) {
|
|
|
66
66
|
}
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
|
-
function v({ open: m, onOpenChange: v, groups:
|
|
70
|
-
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
let
|
|
76
|
-
F.value = m;
|
|
77
|
-
let I = a(x);
|
|
78
|
-
I.value = x;
|
|
79
|
-
let L = a(""), R = a(0), z = a([]), B = a(null), re = z.value.at(-1)?.groups ?? te, ie = y ?? z.value.at(-1)?.placeholder ?? l(c.commandMenu.placeholder), V = T.find((e) => e.id === B.value) ?? null, H = re.filter((e) => !B.value || !e.scope || e.scope === B.value).map((e) => ({
|
|
69
|
+
function v({ open: m, onOpenChange: v, groups: ne, placeholder: re, emptyLabel: ie, hotkey: y = !0, label: b, loading: x = !1, onQueryChange: S, scopes: C = [], className: ae }) {
|
|
70
|
+
ee();
|
|
71
|
+
let w = b ?? l(c.commandMenu.label), T = ie ?? l(c.commandMenu.empty), E = te(), D = `${E}-listbox`, O = f(null), k = f(null), A = f([]), j = f(v);
|
|
72
|
+
j.current = v;
|
|
73
|
+
let M = f(S);
|
|
74
|
+
M.current = S;
|
|
75
|
+
let N = a(m), P = a(y), F = o(""), I = o(0), L = o([]), R = o(null), z = L.value.at(-1)?.groups ?? ne, B = re ?? L.value.at(-1)?.placeholder ?? l(c.commandMenu.placeholder), V = C.find((e) => e.id === R.value) ?? null, H = z.filter((e) => !R.value || !e.scope || e.scope === R.value).map((e) => ({
|
|
80
76
|
heading: e.heading,
|
|
81
77
|
items: e.items.map((e) => ({
|
|
82
78
|
item: e,
|
|
83
|
-
score: h(
|
|
79
|
+
score: h(F.value, e)
|
|
84
80
|
})).filter(({ score: e }) => e > 0).sort((e, t) => t.score - e.score).map(({ item: e }) => ({
|
|
85
81
|
item: e,
|
|
86
|
-
indices: p(
|
|
82
|
+
indices: p(F.value, e.label)?.indices ?? []
|
|
87
83
|
}))
|
|
88
|
-
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(
|
|
89
|
-
|
|
90
|
-
let e =
|
|
91
|
-
e && (
|
|
92
|
-
|
|
93
|
-
}), typeof e.showModal == "function" && e.showModal(),
|
|
94
|
-
}),
|
|
95
|
-
let e =
|
|
84
|
+
})).filter((e) => e.items.length > 0), U = H.flatMap((e) => e.items.map((e) => e.item)), W = U.flatMap((e, t) => e.disabled ? [] : [t]), G = W.includes(I.value) ? I.value : W[0] ?? -1, K = (e) => `${E}-option-${e}`;
|
|
85
|
+
s(() => {
|
|
86
|
+
let e = O.current;
|
|
87
|
+
e && (N.value ? e.open || (r(() => {
|
|
88
|
+
F.value = "", I.value = 0, L.value = [], R.value = null;
|
|
89
|
+
}), typeof e.showModal == "function" && e.showModal(), k.current?.focus()) : e.open && (L.value = [], e.close()));
|
|
90
|
+
}), s(() => {
|
|
91
|
+
let e = O.current;
|
|
96
92
|
if (!e) return;
|
|
97
|
-
let t = () =>
|
|
93
|
+
let t = () => j.current(!1);
|
|
98
94
|
return e.addEventListener("close", t), () => e.removeEventListener("close", t);
|
|
99
|
-
}),
|
|
100
|
-
if (!
|
|
95
|
+
}), s(() => {
|
|
96
|
+
if (!P.value) return;
|
|
101
97
|
let e = (e) => {
|
|
102
|
-
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(),
|
|
98
|
+
(e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k" && (e.preventDefault(), j.current(!N.value));
|
|
103
99
|
};
|
|
104
100
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
105
101
|
});
|
|
106
102
|
let q = (e) => {
|
|
107
|
-
|
|
108
|
-
let t =
|
|
103
|
+
I.value = e;
|
|
104
|
+
let t = A.current[e];
|
|
109
105
|
t && typeof t.scrollIntoView == "function" && t.scrollIntoView({ block: "nearest" });
|
|
110
106
|
}, J = (e) => {
|
|
111
107
|
if (W.length === 0) return;
|
|
@@ -118,7 +114,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
118
114
|
if (e.page) {
|
|
119
115
|
if (t === "secondary") return;
|
|
120
116
|
r(() => {
|
|
121
|
-
|
|
117
|
+
L.value = [...L.value, e.page], F.value = "", I.value = 0;
|
|
122
118
|
});
|
|
123
119
|
return;
|
|
124
120
|
}
|
|
@@ -129,21 +125,21 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
129
125
|
}
|
|
130
126
|
t !== "secondary" && (e.onSelect?.(), v(!1));
|
|
131
127
|
}
|
|
132
|
-
},
|
|
133
|
-
if (
|
|
134
|
-
let t = [null, ...
|
|
128
|
+
}, oe = (e) => {
|
|
129
|
+
if (C.length === 0) return;
|
|
130
|
+
let t = [null, ...C.map((e) => e.id)], n = t[(t.indexOf(R.value) + e + t.length) % t.length];
|
|
135
131
|
r(() => {
|
|
136
|
-
|
|
132
|
+
R.value = n ?? null, I.value = 0;
|
|
137
133
|
});
|
|
138
134
|
}, Z = () => {
|
|
139
135
|
r(() => {
|
|
140
|
-
|
|
141
|
-
}),
|
|
136
|
+
R.value = null, I.value = 0;
|
|
137
|
+
}), k.current?.focus();
|
|
142
138
|
}, Q = () => {
|
|
143
139
|
r(() => {
|
|
144
|
-
|
|
140
|
+
L.value = L.value.slice(0, -1), F.value = "", I.value = 0;
|
|
145
141
|
});
|
|
146
|
-
},
|
|
142
|
+
}, se = (e) => {
|
|
147
143
|
switch (e.key) {
|
|
148
144
|
case "ArrowDown":
|
|
149
145
|
e.preventDefault(), J(1);
|
|
@@ -152,7 +148,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
152
148
|
e.preventDefault(), J(-1);
|
|
153
149
|
break;
|
|
154
150
|
case "Tab":
|
|
155
|
-
|
|
151
|
+
C.length > 0 && (e.preventDefault(), oe(e.shiftKey ? -1 : 1));
|
|
156
152
|
break;
|
|
157
153
|
case "Home":
|
|
158
154
|
e.preventDefault(), W[0] !== void 0 && q(W[0]);
|
|
@@ -167,20 +163,20 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
167
163
|
e.preventDefault(), G >= 0 && X(U[G], e.metaKey || e.ctrlKey ? "secondary" : "primary");
|
|
168
164
|
break;
|
|
169
165
|
case "Backspace":
|
|
170
|
-
|
|
166
|
+
F.value === "" && (L.value.length > 0 ? (e.preventDefault(), Q()) : R.value && (e.preventDefault(), Z()));
|
|
171
167
|
break;
|
|
172
168
|
}
|
|
173
|
-
}, se = (e) => {
|
|
174
|
-
e.key === "Escape" && (e.preventDefault(), z.value.length > 0 ? Q() : A.current?.close());
|
|
175
169
|
}, ce = (e) => {
|
|
176
|
-
e.
|
|
170
|
+
e.key === "Escape" && (e.preventDefault(), L.value.length > 0 ? Q() : O.current?.close());
|
|
171
|
+
}, le = (e) => {
|
|
172
|
+
e.target === O.current && O.current?.close();
|
|
177
173
|
}, $ = -1;
|
|
178
174
|
return /* @__PURE__ */ u("dialog", {
|
|
179
|
-
ref:
|
|
180
|
-
"aria-label":
|
|
181
|
-
className: i(n.dialog,
|
|
182
|
-
onClick:
|
|
183
|
-
onKeyDown:
|
|
175
|
+
ref: O,
|
|
176
|
+
"aria-label": w,
|
|
177
|
+
className: i(n.dialog, ae),
|
|
178
|
+
onClick: le,
|
|
179
|
+
onKeyDown: ce,
|
|
184
180
|
children: /* @__PURE__ */ d("div", {
|
|
185
181
|
className: n.panel,
|
|
186
182
|
children: [
|
|
@@ -231,44 +227,44 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
231
227
|
})]
|
|
232
228
|
}),
|
|
233
229
|
/* @__PURE__ */ u("input", {
|
|
234
|
-
ref:
|
|
230
|
+
ref: k,
|
|
235
231
|
type: "text",
|
|
236
232
|
role: "combobox",
|
|
237
233
|
"aria-expanded": "true",
|
|
238
|
-
"aria-controls":
|
|
234
|
+
"aria-controls": D,
|
|
239
235
|
"aria-activedescendant": G >= 0 ? K(G) : void 0,
|
|
240
236
|
"aria-autocomplete": "list",
|
|
241
|
-
"aria-label":
|
|
237
|
+
"aria-label": w,
|
|
242
238
|
autoComplete: "off",
|
|
243
239
|
spellCheck: !1,
|
|
244
240
|
className: n.input,
|
|
245
|
-
placeholder:
|
|
246
|
-
value:
|
|
241
|
+
placeholder: B,
|
|
242
|
+
value: F.value,
|
|
247
243
|
onChange: (e) => {
|
|
248
244
|
let t = e.target.value;
|
|
249
|
-
if (!
|
|
250
|
-
let e = _(t,
|
|
251
|
-
e && (
|
|
245
|
+
if (!R.value && C.length > 0) {
|
|
246
|
+
let e = _(t, C);
|
|
247
|
+
e && (R.value = e.scope.id, t = e.rest);
|
|
252
248
|
}
|
|
253
|
-
|
|
249
|
+
F.value = t, I.value = 0, M.current?.(t);
|
|
254
250
|
},
|
|
255
|
-
onKeyDown:
|
|
251
|
+
onKeyDown: se
|
|
256
252
|
})
|
|
257
253
|
]
|
|
258
254
|
}),
|
|
259
|
-
|
|
255
|
+
C.length > 0 && /* @__PURE__ */ d("div", {
|
|
260
256
|
className: n.scopes,
|
|
261
257
|
children: [/* @__PURE__ */ u("span", {
|
|
262
258
|
className: n.scopesLabel,
|
|
263
259
|
children: l(c.commandMenu.scopeLabel)
|
|
264
|
-
}),
|
|
260
|
+
}), C.map((e) => /* @__PURE__ */ d("button", {
|
|
265
261
|
type: "button",
|
|
266
262
|
className: n.scopePill,
|
|
267
|
-
"data-active": e.id ===
|
|
263
|
+
"data-active": e.id === R.value || void 0,
|
|
268
264
|
onClick: () => {
|
|
269
265
|
r(() => {
|
|
270
|
-
|
|
271
|
-
}),
|
|
266
|
+
R.value = R.value === e.id ? null : e.id, I.value = 0;
|
|
267
|
+
}), k.current?.focus();
|
|
272
268
|
},
|
|
273
269
|
children: [e.prefix && /* @__PURE__ */ u("span", {
|
|
274
270
|
className: n.scopePrefix,
|
|
@@ -280,8 +276,8 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
280
276
|
className: n.list,
|
|
281
277
|
children: [/* @__PURE__ */ u("div", {
|
|
282
278
|
role: "listbox",
|
|
283
|
-
id:
|
|
284
|
-
"aria-label":
|
|
279
|
+
id: D,
|
|
280
|
+
"aria-label": b,
|
|
285
281
|
tabIndex: 0,
|
|
286
282
|
children: H.map((e, r) => /* @__PURE__ */ d("div", {
|
|
287
283
|
role: "group",
|
|
@@ -290,7 +286,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
290
286
|
children: [e.heading && /* @__PURE__ */ d("div", {
|
|
291
287
|
className: n.heading,
|
|
292
288
|
"aria-hidden": "true",
|
|
293
|
-
children: [/* @__PURE__ */ u("span", { children: e.heading }),
|
|
289
|
+
children: [/* @__PURE__ */ u("span", { children: e.heading }), F.value !== "" && /* @__PURE__ */ u("span", {
|
|
294
290
|
className: n.count,
|
|
295
291
|
children: l(c.commandMenu.matches, { count: e.items.length })
|
|
296
292
|
})]
|
|
@@ -300,7 +296,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
300
296
|
let a = $;
|
|
301
297
|
return /* @__PURE__ */ d("div", {
|
|
302
298
|
ref: (e) => {
|
|
303
|
-
|
|
299
|
+
A.current[a] = e;
|
|
304
300
|
},
|
|
305
301
|
id: K(a),
|
|
306
302
|
role: "option",
|
|
@@ -310,7 +306,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
310
306
|
"data-disabled": r.disabled || void 0,
|
|
311
307
|
className: n.option,
|
|
312
308
|
onMouseEnter: () => {
|
|
313
|
-
r.disabled || (
|
|
309
|
+
r.disabled || (I.value = a);
|
|
314
310
|
},
|
|
315
311
|
onClick: () => X(r, "primary"),
|
|
316
312
|
children: [
|
|
@@ -366,14 +362,14 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
366
362
|
}, r.id);
|
|
367
363
|
})]
|
|
368
364
|
}, e.heading ?? `group-${r}`))
|
|
369
|
-
}), U.length === 0 && (
|
|
365
|
+
}), U.length === 0 && (x ? /* @__PURE__ */ d("div", {
|
|
370
366
|
role: "status",
|
|
371
367
|
className: n.empty,
|
|
372
368
|
children: [/* @__PURE__ */ u(e, { size: "sm" }), l(c.commandMenu.loading)]
|
|
373
369
|
}) : /* @__PURE__ */ u("div", {
|
|
374
370
|
role: "status",
|
|
375
371
|
className: n.empty,
|
|
376
|
-
children:
|
|
372
|
+
children: T
|
|
377
373
|
}))]
|
|
378
374
|
}),
|
|
379
375
|
/* @__PURE__ */ d("div", {
|
|
@@ -401,7 +397,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
401
397
|
children: "↵"
|
|
402
398
|
}), " open"]
|
|
403
399
|
}),
|
|
404
|
-
|
|
400
|
+
C.length > 0 && /* @__PURE__ */ d("span", {
|
|
405
401
|
className: n.hint,
|
|
406
402
|
children: [/* @__PURE__ */ u(t, {
|
|
407
403
|
size: "sm",
|