@logicplanes/kaeso-ui 0.5.5 → 0.5.6
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/ai/component-guides.md +2 -2
- package/ai/component-registry.json +16 -2
- package/ai/component-registry.md +4 -2
- package/ai/icons.md +1 -1
- package/ai/tokens.md +1 -1
- package/dist/blocks/delete-resource.js +1 -1
- package/dist/blocks/pages.js +2 -2
- package/dist/blocks/resource-list.js +3 -3
- package/dist/chunks/{app-frame-B1FXVFYx.js → app-frame-P0frr7bS.js} +3 -3
- package/dist/chunks/{app-frame-B1FXVFYx.js.map → app-frame-P0frr7bS.js.map} +1 -1
- package/dist/chunks/{banner-BinTH032.js → banner-DEbXXqmm.js} +2 -2
- package/dist/chunks/{banner-BinTH032.js.map → banner-DEbXXqmm.js.map} +1 -1
- package/dist/chunks/{button-DrmFgdIi.js → button-DAzCLcr-.js} +2 -2
- package/dist/chunks/{button-DrmFgdIi.js.map → button-DAzCLcr-.js.map} +1 -1
- package/dist/chunks/{code-block-CE3H3nMu.js → code-block-CgFazxDO.js} +3 -3
- package/dist/chunks/{code-block-CE3H3nMu.js.map → code-block-CgFazxDO.js.map} +1 -1
- package/dist/chunks/{code-block-O_EPmMIQ.js → code-block-DlepLS16.js} +3 -3
- package/dist/chunks/{code-block-O_EPmMIQ.js.map → code-block-DlepLS16.js.map} +1 -1
- package/dist/chunks/{combobox-DghYPLVQ.js → combobox-Bl6ewCVK.js} +5 -4
- package/dist/chunks/combobox-Bl6ewCVK.js.map +1 -0
- package/dist/chunks/{command-list-BUmEaaBi.js → command-list-CmFekgMn.js} +2 -2
- package/dist/chunks/{command-list-BUmEaaBi.js.map → command-list-CmFekgMn.js.map} +1 -1
- package/dist/chunks/{copy-button-DBPAA1g0.js → copy-button-8W-3B59C.js} +2 -2
- package/dist/chunks/{copy-button-DBPAA1g0.js.map → copy-button-8W-3B59C.js.map} +1 -1
- package/dist/chunks/{core-Cw3pNRp3.js → core-eNNh7t33.js} +3 -3
- package/dist/chunks/{core-Cw3pNRp3.js.map → core-eNNh7t33.js.map} +1 -1
- package/dist/chunks/{data-table-CGecI-FI.js → data-table-DvErn5iF.js} +208 -206
- package/dist/chunks/data-table-DvErn5iF.js.map +1 -0
- package/dist/chunks/{date-popup-C6vVOOWF.js → date-popup-DOoksCNY.js} +2 -2
- package/dist/chunks/{date-popup-C6vVOOWF.js.map → date-popup-DOoksCNY.js.map} +1 -1
- package/dist/chunks/{dialog-s3_LUPBi.js → dialog-bUFUnQC0.js} +4 -4
- package/dist/chunks/{dialog-s3_LUPBi.js.map → dialog-bUFUnQC0.js.map} +1 -1
- package/dist/chunks/{domain-CrQX3p6E.js → domain-D-rdW5fm.js} +2 -2
- package/dist/chunks/{domain-CrQX3p6E.js.map → domain-D-rdW5fm.js.map} +1 -1
- package/dist/chunks/{icon-button-6kOn2zrP.js → icon-button--mBwM08L.js} +2 -2
- package/dist/chunks/{icon-button-6kOn2zrP.js.map → icon-button--mBwM08L.js.map} +1 -1
- package/dist/chunks/{identity-BwYixi8Q.js → identity-mwyVq4mE.js} +24 -2
- package/dist/chunks/identity-mwyVq4mE.js.map +1 -0
- package/dist/chunks/{input-D1SeLe3X.js → input-BJpzRpEj.js} +2 -2
- package/dist/chunks/{input-D1SeLe3X.js.map → input-BJpzRpEj.js.map} +1 -1
- package/dist/chunks/{input-group-BbxwEAUP.js → input-group-BpHmsM9g.js} +2 -2
- package/dist/chunks/{input-group-BbxwEAUP.js.map → input-group-BpHmsM9g.js.map} +1 -1
- package/dist/chunks/{iso-field-BVOKAY4H.js → iso-field-C97XNnpF.js} +2 -2
- package/dist/chunks/{iso-field-BVOKAY4H.js.map → iso-field-C97XNnpF.js.map} +1 -1
- package/dist/chunks/{list-o8wcuBOz.js → list-DBltIx9B.js} +213 -217
- package/dist/chunks/list-DBltIx9B.js.map +1 -0
- package/dist/chunks/{markdown-BZKZi9d8.js → markdown-C0_t7T9r.js} +3 -3
- package/dist/chunks/{markdown-BZKZi9d8.js.map → markdown-C0_t7T9r.js.map} +1 -1
- package/dist/chunks/{page-header-DUaKLpK3.js → page-header-D-8GD_Dz.js} +2 -2
- package/dist/chunks/{page-header-DUaKLpK3.js.map → page-header-D-8GD_Dz.js.map} +1 -1
- package/dist/chunks/{pagination-D9hM6W2z.js → pagination-DMb0xe4q.js} +3 -3
- package/dist/chunks/{pagination-D9hM6W2z.js.map → pagination-DMb0xe4q.js.map} +1 -1
- package/dist/chunks/{picker-popover-PzVOo62-.js → picker-popover-DuhzZbyA.js} +3 -3
- package/dist/chunks/{picker-popover-PzVOo62-.js.map → picker-popover-DuhzZbyA.js.map} +1 -1
- package/dist/chunks/{range-popup-Dt6Q0Ryw.js → range-popup-BHgt4Buj.js} +3 -3
- package/dist/chunks/{range-popup-Dt6Q0Ryw.js.map → range-popup-BHgt4Buj.js.map} +1 -1
- package/dist/chunks/{rights-DAHTG_kH.js → rights-DWXZSM9D.js} +3 -3
- package/dist/chunks/{rights-DAHTG_kH.js.map → rights-DWXZSM9D.js.map} +1 -1
- package/dist/chunks/{use-coarse-pointer-Ml5oE6oX.js → selects-text-R1lZHLKm.js} +8 -2
- package/dist/chunks/selects-text-R1lZHLKm.js.map +1 -0
- package/dist/chunks/{swap-text-SlUjrTlG.js → swap-text-D88Zlu4i.js} +5 -5
- package/dist/chunks/swap-text-D88Zlu4i.js.map +1 -0
- package/dist/chunks/{textarea-CRmvC4jd.js → textarea-CmUdpNFk.js} +3 -3
- package/dist/chunks/{textarea-CRmvC4jd.js.map → textarea-CmUdpNFk.js.map} +1 -1
- package/dist/chunks/{timeseries-CK86u7M0.js → timeseries-DY9PLLDJ.js} +3 -3
- package/dist/chunks/{timeseries-CK86u7M0.js.map → timeseries-DY9PLLDJ.js.map} +1 -1
- package/dist/components/app-frame.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/charts/bar.js +2 -2
- package/dist/components/charts/donut.js +1 -1
- package/dist/components/charts/gauge.js +1 -1
- package/dist/components/charts/heatmap.js +1 -1
- package/dist/components/charts/sankey.js +2 -2
- package/dist/components/charts/timeseries.js +1 -1
- package/dist/components/charts.js +2 -2
- package/dist/components/code-block.js +2 -2
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-list.js +2 -2
- package/dist/components/command-palette.js +1 -1
- package/dist/components/copy-button.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/date-picker.js +86 -82
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/dialog.js +96 -92
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/display-options.js +1 -1
- package/dist/components/filter-chip.js +2 -2
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/kaeso/conversation.js +2 -2
- package/dist/components/kaeso/identity.js +1 -1
- package/dist/components/kaeso/moments.js +3 -3
- package/dist/components/kaeso/rights.js +1 -1
- package/dist/components/kaeso/usage.js +1 -1
- package/dist/components/kaeso.js +5 -5
- package/dist/components/key-value.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/playground.js +8 -8
- package/dist/components/sheet.js +1 -1
- package/dist/components/swap-text.js +1 -1
- package/dist/components/theme-menu.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/index.js +23 -23
- package/dist/styles.css +1 -1
- package/dist/types/components/dialog/docs.d.ts +1 -0
- package/dist/types/components/dialog/step-dialog.d.ts +1 -0
- package/dist/types/components/swap-text/docs.d.ts +1 -0
- package/dist/types/components/swap-text/swap-text.d.ts +1 -0
- package/dist/types/utils/selects-text.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunks/combobox-DghYPLVQ.js.map +0 -1
- package/dist/chunks/data-table-CGecI-FI.js.map +0 -1
- package/dist/chunks/identity-BwYixi8Q.js.map +0 -1
- package/dist/chunks/list-o8wcuBOz.js.map +0 -1
- package/dist/chunks/swap-text-SlUjrTlG.js.map +0 -1
- package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js.map +0 -1
|
@@ -6,20 +6,20 @@ import { i } from "./context-BELWW79w.js";
|
|
|
6
6
|
import { t as a } from "./icon-CBzOwqrX.js";
|
|
7
7
|
import { s as o, u as s } from "./tooltip-Tkm-urbi.js";
|
|
8
8
|
import { r as c } from "./text-DkKdTVUf.js";
|
|
9
|
-
import { t as l } from "./icon-button
|
|
9
|
+
import { t as l } from "./icon-button--mBwM08L.js";
|
|
10
10
|
import { n as u } from "./use-layout-width-CbSDbRb0.js";
|
|
11
11
|
import { r as d } from "./skeleton-D-qk3mes.js";
|
|
12
12
|
import { t as f } from "./truncated-d1afmUJT.js";
|
|
13
|
-
import { n as p,
|
|
14
|
-
import { forwardRef as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { Add01Icon as
|
|
17
|
-
import { createPortal as
|
|
13
|
+
import { n as p, r as m, t as h } from "./selects-text-R1lZHLKm.js";
|
|
14
|
+
import { forwardRef as g, useCallback as _, useEffect as v, useLayoutEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
15
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
|
+
import { Add01Icon as T, Cancel01Icon as E } from "@hugeicons/core-free-icons";
|
|
17
|
+
import { createPortal as D } from "react-dom";
|
|
18
18
|
//#region src/components/list/row-checkbox.tsx
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
let [i, a] = s(
|
|
22
|
-
return
|
|
19
|
+
var O = /* @__PURE__ */ o(() => import("./checkbox-ahl1SOqU.js").then((e) => e.c), { base: () => import.meta.url });
|
|
20
|
+
function k({ checked: t, onToggle: n, "aria-label": r }) {
|
|
21
|
+
let [i, a] = s(O, !0), [o, c] = S(!1), [l, u] = S(!1);
|
|
22
|
+
return v(() => {
|
|
23
23
|
if (!l) return;
|
|
24
24
|
let e, t = () => {
|
|
25
25
|
e = setTimeout(() => u(!1));
|
|
@@ -27,11 +27,11 @@ function ee({ checked: t, onToggle: n, "aria-label": r }) {
|
|
|
27
27
|
return window.addEventListener("pointerup", t, !0), window.addEventListener("pointercancel", t, !0), () => {
|
|
28
28
|
clearTimeout(e), window.removeEventListener("pointerup", t, !0), window.removeEventListener("pointercancel", t, !0);
|
|
29
29
|
};
|
|
30
|
-
}, [l]), i && !o && !l ? /* @__PURE__ */
|
|
30
|
+
}, [l]), i && !o && !l ? /* @__PURE__ */ C(i.CheckboxBox, {
|
|
31
31
|
checked: t,
|
|
32
32
|
onCheckedChange: n,
|
|
33
33
|
"aria-label": r
|
|
34
|
-
}) : /* @__PURE__ */
|
|
34
|
+
}) : /* @__PURE__ */ C("span", {
|
|
35
35
|
role: "checkbox",
|
|
36
36
|
"aria-checked": t,
|
|
37
37
|
"aria-label": r,
|
|
@@ -44,7 +44,7 @@ function ee({ checked: t, onToggle: n, "aria-label": r }) {
|
|
|
44
44
|
n(), c(!1), u(!1);
|
|
45
45
|
},
|
|
46
46
|
className: "relative -m-3 inline-flex size-24 shrink-0 cursor-pointer items-center justify-center rounded-checkbox",
|
|
47
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ C("span", {
|
|
48
48
|
"aria-hidden": !0,
|
|
49
49
|
className: e("flex size-18 items-center justify-center rounded-checkbox", t ? "bg-ink" : "bg-raised shadow-selector")
|
|
50
50
|
})
|
|
@@ -52,26 +52,26 @@ function ee({ checked: t, onToggle: n, "aria-label": r }) {
|
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/components/list/list.tsx
|
|
55
|
-
var
|
|
55
|
+
var A = /* @__PURE__ */ o(() => import("./virtual-rows-CC_kc2PR.js"), { base: () => import.meta.url }), j = { density: {
|
|
56
56
|
default: { classes: "h-44" },
|
|
57
57
|
compact: { classes: "h-36 coarse:h-44" }
|
|
58
|
-
} },
|
|
58
|
+
} }, M = { density: "default" }, ee = {
|
|
59
59
|
48: "w-48",
|
|
60
60
|
64: "w-64",
|
|
61
61
|
80: "w-80",
|
|
62
62
|
96: "w-96",
|
|
63
63
|
120: "w-120"
|
|
64
|
-
},
|
|
65
|
-
function
|
|
64
|
+
}, N = 520, P = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", F = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
|
|
65
|
+
function te(e) {
|
|
66
66
|
for (let t of e.querySelectorAll("[role=row]")) {
|
|
67
67
|
let e = t.querySelector("[data-index]");
|
|
68
|
-
if (e) for (let n of t.querySelectorAll(
|
|
68
|
+
if (e) for (let n of t.querySelectorAll(P)) n !== e && n.getAttribute("tabindex") !== "-1" && n.setAttribute("tabindex", "-1");
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
var
|
|
72
|
-
let
|
|
73
|
-
o ||
|
|
74
|
-
}, [o, c]), [
|
|
71
|
+
var I = /* @__PURE__ */ g(function({ items: t, groups: r, onOpen: i, selectable: a, selected: o, onSelectedChange: c, idWidth: l, density: d = "default", wrapSubtitle: f = !1, virtualizeAbove: h = 100, selectionActions: g, selectionBar: v = !0, loading: T, empty: E, className: D, "aria-label": O, "data-force-row": k }, j) {
|
|
72
|
+
let M = n(), [ee, I] = S(/* @__PURE__ */ new Set()), L = o ?? ee, V = _((e) => {
|
|
73
|
+
o || I(e), c?.(e);
|
|
74
|
+
}, [o, c]), [H, ae] = S(() => new Set((r ?? []).filter((e) => e.defaultCollapsed).map((e) => e.id))), [U, W] = S(-1), [oe, se] = S(null), G = x(null), K = x(null), ce = u(G), q = !!ce && ce < N, J = b(() => {
|
|
75
75
|
let e = (e) => e.flatMap((e) => [{
|
|
76
76
|
kind: "row",
|
|
77
77
|
item: e,
|
|
@@ -89,40 +89,40 @@ var P = /* @__PURE__ */ h(function({ items: t, groups: r, onOpen: i, selectable:
|
|
|
89
89
|
kind: "header",
|
|
90
90
|
group: t,
|
|
91
91
|
key: `h-${t.id}`
|
|
92
|
-
}, ...
|
|
92
|
+
}, ...H.has(t.id) ? [] : e(t.items)]) : e(t ?? []);
|
|
93
93
|
}, [
|
|
94
94
|
t,
|
|
95
95
|
r,
|
|
96
|
-
|
|
97
|
-
]),
|
|
98
|
-
|
|
99
|
-
let
|
|
100
|
-
|
|
101
|
-
let t = () =>
|
|
102
|
-
e && (e.focus(),
|
|
96
|
+
H
|
|
97
|
+
]), le = J.findIndex((e) => e.kind === "row"), ue = r ? r.every((e) => e.items.length === 0) : (t ?? []).length === 0, Y = J.length > h, de = p(), fe = (e) => J[e]?.kind === "header" ? e === 0 ? 36 : 52 : q ? 64 : d === "compact" && !de ? 36 : 44, [pe, X] = s(A, Y), Z = pe?.VirtualRows, me = x(null);
|
|
98
|
+
U >= J.length && W(-1);
|
|
99
|
+
let he = U >= 0 ? U : J.length ? 0 : -1, ge = (e) => {
|
|
100
|
+
W(e), Y && me.current?.(e);
|
|
101
|
+
let t = () => G.current?.querySelector(`[data-index="${e}"]`), n = (e) => {
|
|
102
|
+
e && (e.focus(), ne(e, K.current));
|
|
103
103
|
}, r = t();
|
|
104
104
|
r ? n(r) : requestAnimationFrame(() => n(t()));
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
let e =
|
|
108
|
-
if (!e ||
|
|
109
|
-
let t = Math.min(e.index,
|
|
110
|
-
if (document.activeElement === document.body) return
|
|
105
|
+
}, Q = x(null);
|
|
106
|
+
y(() => {
|
|
107
|
+
let e = Q.current;
|
|
108
|
+
if (!e || J.some((t) => t.key === e.key) || (Q.current = null, !J.length)) return;
|
|
109
|
+
let t = Math.min(e.index, J.length - 1);
|
|
110
|
+
if (document.activeElement === document.body) return ge(t);
|
|
111
111
|
let n = document.activeElement?.closest("[role=dialog], [role=alertdialog]");
|
|
112
112
|
if (!n) return;
|
|
113
113
|
let r = performance.now() + 2e3, i = () => {
|
|
114
|
-
document.activeElement === document.body ?
|
|
114
|
+
document.activeElement === document.body ? G.current?.isConnected && ge(t) : n.contains(document.activeElement) && performance.now() < r && requestAnimationFrame(i);
|
|
115
115
|
};
|
|
116
116
|
requestAnimationFrame(i);
|
|
117
117
|
});
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}),
|
|
122
|
-
let e =
|
|
118
|
+
let _e = x(!!Z);
|
|
119
|
+
y(() => {
|
|
120
|
+
Z && !_e.current && U >= 0 && document.activeElement === document.body && G.current?.querySelector(`[data-index="${U}"]`)?.focus(), _e.current = !!Z;
|
|
121
|
+
}), y(() => {
|
|
122
|
+
let e = G.current;
|
|
123
123
|
if (!e) return;
|
|
124
|
-
|
|
125
|
-
let t = new MutationObserver(() =>
|
|
124
|
+
te(e);
|
|
125
|
+
let t = new MutationObserver(() => te(e));
|
|
126
126
|
return t.observe(e, {
|
|
127
127
|
subtree: !0,
|
|
128
128
|
childList: !0,
|
|
@@ -130,12 +130,12 @@ var P = /* @__PURE__ */ h(function({ items: t, groups: r, onOpen: i, selectable:
|
|
|
130
130
|
attributeFilter: ["tabindex"]
|
|
131
131
|
}), () => t.disconnect();
|
|
132
132
|
}, []);
|
|
133
|
-
let
|
|
134
|
-
let t = new Set(
|
|
135
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
136
|
-
},
|
|
133
|
+
let ve = (e) => {
|
|
134
|
+
let t = new Set(L);
|
|
135
|
+
t.has(e) ? t.delete(e) : t.add(e), V(t);
|
|
136
|
+
}, ye = (e) => e.flatMap((e) => e.kind === "row" && !e.item.disabled ? [e.item.id] : []), be = (e) => {
|
|
137
137
|
let t = e.target;
|
|
138
|
-
if (!e.currentTarget.contains(t) || t.closest(
|
|
138
|
+
if (!e.currentTarget.contains(t) || t.closest(F)) return;
|
|
139
139
|
let n = t.closest("[role=row]"), r = n?.querySelector("[data-index]");
|
|
140
140
|
if (!n || !r) return;
|
|
141
141
|
let o = t === r;
|
|
@@ -144,53 +144,53 @@ var P = /* @__PURE__ */ h(function({ items: t, groups: r, onOpen: i, selectable:
|
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
146
|
if (e.defaultPrevented) return;
|
|
147
|
-
let s = Number(r.dataset.index), c =
|
|
147
|
+
let s = Number(r.dataset.index), c = J[s], l = c?.kind === "row" ? c.item : void 0;
|
|
148
148
|
if (e.altKey) return;
|
|
149
149
|
if (e.metaKey || e.ctrlKey) {
|
|
150
|
-
e.key.toLowerCase() === "a" && a && !e.shiftKey && (e.preventDefault(),
|
|
150
|
+
e.key.toLowerCase() === "a" && a && !e.shiftKey && (e.preventDefault(), V(new Set(ye(J))));
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
let u = (t) => {
|
|
154
154
|
if (e.preventDefault(), e.shiftKey && a) {
|
|
155
|
-
let e =
|
|
156
|
-
|
|
157
|
-
let n = new Set(
|
|
158
|
-
|
|
159
|
-
} else
|
|
160
|
-
|
|
161
|
-
}, d = () => [...n.querySelectorAll(
|
|
162
|
-
if (e.key === "ArrowDown" || e.key === "j" && !e.shiftKey) u(Math.min(
|
|
155
|
+
let e = oe ?? s;
|
|
156
|
+
se(e);
|
|
157
|
+
let n = new Set(L);
|
|
158
|
+
ye(J.slice(Math.min(e, t), Math.max(e, t) + 1)).forEach((e) => n.add(e)), V(n);
|
|
159
|
+
} else se(null);
|
|
160
|
+
ge(t);
|
|
161
|
+
}, d = () => [...n.querySelectorAll(P)].filter((e) => e !== r && !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
|
|
162
|
+
if (e.key === "ArrowDown" || e.key === "j" && !e.shiftKey) u(Math.min(J.length - 1, s + 1));
|
|
163
163
|
else if (e.key === "ArrowUp" || e.key === "k" && !e.shiftKey) u(Math.max(0, s - 1));
|
|
164
164
|
else if (e.key === "Home") u(0);
|
|
165
|
-
else if (e.key === "End") u(
|
|
165
|
+
else if (e.key === "End") u(J.length - 1);
|
|
166
166
|
else if (e.key === "ArrowRight" || e.key === "ArrowLeft") {
|
|
167
167
|
let n = d(), i = o ? -1 : n.indexOf(t), a = e.key === "ArrowRight" ? n[i + 1] : i > 0 ? n[i - 1] : i === 0 ? r : void 0;
|
|
168
168
|
if (!a) return;
|
|
169
169
|
e.preventDefault(), a.focus();
|
|
170
170
|
} else if (!o || !l || e.shiftKey) return;
|
|
171
|
-
else (e.key === " " || e.key === "x") && a ? (e.preventDefault(), l.disabled ||
|
|
172
|
-
},
|
|
173
|
-
|
|
171
|
+
else (e.key === " " || e.key === "x") && a ? (e.preventDefault(), l.disabled || ve(l.id)) : e.key === "Enter" ? (e.preventDefault(), l.disabled || i?.(l)) : e.key === "Escape" && a && L.size && V(/* @__PURE__ */ new Set());
|
|
172
|
+
}, $ = L.size > 0;
|
|
173
|
+
y(() => {
|
|
174
174
|
let e = document.activeElement;
|
|
175
|
-
|
|
176
|
-
}, [
|
|
177
|
-
let
|
|
175
|
+
$ && e instanceof HTMLElement && G.current?.contains(e) && ne(e, K.current);
|
|
176
|
+
}, [$]);
|
|
177
|
+
let xe = (e, t) => e.kind === "header" ? /* @__PURE__ */ C(z, {
|
|
178
178
|
title: e.group.title,
|
|
179
179
|
glyph: e.group.glyph,
|
|
180
180
|
count: e.group.count ?? e.group.items.length,
|
|
181
|
-
collapsed:
|
|
181
|
+
collapsed: H.has(e.group.id),
|
|
182
182
|
onToggle: () => {
|
|
183
|
-
let t = new Set(
|
|
184
|
-
t.has(e.group.id) ? t.delete(e.group.id) : t.add(e.group.id),
|
|
183
|
+
let t = new Set(H);
|
|
184
|
+
t.has(e.group.id) ? t.delete(e.group.id) : t.add(e.group.id), ae(t);
|
|
185
185
|
},
|
|
186
186
|
onAdd: e.group.onAdd,
|
|
187
187
|
addLabel: e.group.addLabel,
|
|
188
188
|
indent: !!a,
|
|
189
189
|
first: t === 0,
|
|
190
190
|
index: t,
|
|
191
|
-
active: t ===
|
|
192
|
-
onFocus: () =>
|
|
193
|
-
}, e.key) : /* @__PURE__ */
|
|
191
|
+
active: t === he,
|
|
192
|
+
onFocus: () => W(t)
|
|
193
|
+
}, e.key) : /* @__PURE__ */ C(R, {
|
|
194
194
|
index: t,
|
|
195
195
|
item: e.item,
|
|
196
196
|
depth: e.depth,
|
|
@@ -198,116 +198,112 @@ var P = /* @__PURE__ */ h(function({ items: t, groups: r, onOpen: i, selectable:
|
|
|
198
198
|
idWidth: l,
|
|
199
199
|
density: d,
|
|
200
200
|
wrapSubtitle: f,
|
|
201
|
-
narrow:
|
|
202
|
-
active: t ===
|
|
203
|
-
selected:
|
|
201
|
+
narrow: q,
|
|
202
|
+
active: t === he,
|
|
203
|
+
selected: L.has(e.item.id),
|
|
204
204
|
selectable: !!a,
|
|
205
|
-
selecting:
|
|
206
|
-
onSelect: () =>
|
|
205
|
+
selecting: $,
|
|
206
|
+
onSelect: () => ve(e.item.id),
|
|
207
207
|
onOpen: () => i?.(e.item),
|
|
208
|
-
onFocus: () =>
|
|
209
|
-
...k && t ===
|
|
208
|
+
onFocus: () => W(t),
|
|
209
|
+
...k && t === le ? { "data-force": k } : {}
|
|
210
210
|
}, e.key);
|
|
211
|
-
return /* @__PURE__ */
|
|
211
|
+
return /* @__PURE__ */ w("div", {
|
|
212
212
|
ref: (e) => {
|
|
213
|
-
|
|
213
|
+
G.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
|
|
214
214
|
},
|
|
215
215
|
role: "grid",
|
|
216
|
-
"aria-label":
|
|
217
|
-
"aria-rowcount":
|
|
216
|
+
"aria-label": O,
|
|
217
|
+
"aria-rowcount": J.length || void 0,
|
|
218
218
|
"aria-multiselectable": a || void 0,
|
|
219
219
|
"aria-busy": T || void 0,
|
|
220
220
|
onKeyDown: (e) => {
|
|
221
|
-
|
|
221
|
+
X(), be(e);
|
|
222
222
|
},
|
|
223
|
-
onPointerEnter:
|
|
224
|
-
onPointerDown:
|
|
223
|
+
onPointerEnter: X,
|
|
224
|
+
onPointerDown: X,
|
|
225
225
|
onFocus: (e) => {
|
|
226
|
-
if (
|
|
227
|
-
let t = Number(e.target.closest("[role=row]")?.querySelector("[data-index]")?.dataset.index), n =
|
|
228
|
-
|
|
226
|
+
if (X(), !e.currentTarget.contains(e.target)) return;
|
|
227
|
+
let t = Number(e.target.closest("[role=row]")?.querySelector("[data-index]")?.dataset.index), n = J[t];
|
|
228
|
+
Q.current = n ? {
|
|
229
229
|
key: n.key,
|
|
230
230
|
index: t
|
|
231
231
|
} : null;
|
|
232
232
|
},
|
|
233
233
|
onBlur: (e) => {
|
|
234
|
-
e.currentTarget.contains(e.target) && !e.relatedTarget && (
|
|
234
|
+
e.currentTarget.contains(e.target) && !e.relatedTarget && (Q.current = null);
|
|
235
235
|
},
|
|
236
|
-
onWheel:
|
|
237
|
-
className: e("relative flex flex-col outline-none",
|
|
238
|
-
children: [T && (
|
|
236
|
+
onWheel: X,
|
|
237
|
+
className: e("relative flex flex-col outline-none", M && "overflow-hidden rounded-group bg-raised shadow-xs", D),
|
|
238
|
+
children: [T && (ue || J.length === 0) ? /* @__PURE__ */ C(ie, {
|
|
239
239
|
density: d,
|
|
240
240
|
grouped: !!r
|
|
241
|
-
}) :
|
|
241
|
+
}) : ue && E ? /* @__PURE__ */ C("div", {
|
|
242
242
|
role: "row",
|
|
243
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ C("div", {
|
|
244
244
|
role: "gridcell",
|
|
245
245
|
children: E
|
|
246
246
|
})
|
|
247
|
-
}) :
|
|
248
|
-
count:
|
|
249
|
-
estimateSize:
|
|
250
|
-
getScrollElement: () =>
|
|
251
|
-
scrollTo:
|
|
252
|
-
row: (e) =>
|
|
253
|
-
measure:
|
|
254
|
-
}) :
|
|
255
|
-
count:
|
|
256
|
-
estimateSize:
|
|
257
|
-
row: (e) =>
|
|
258
|
-
}) :
|
|
259
|
-
ref:
|
|
260
|
-
count:
|
|
261
|
-
onClear: () =>
|
|
262
|
-
children:
|
|
247
|
+
}) : Y && Z ? /* @__PURE__ */ C(Z, {
|
|
248
|
+
count: J.length,
|
|
249
|
+
estimateSize: fe,
|
|
250
|
+
getScrollElement: () => m(G.current),
|
|
251
|
+
scrollTo: me,
|
|
252
|
+
row: (e) => xe(J[e], e),
|
|
253
|
+
measure: q
|
|
254
|
+
}) : Y ? /* @__PURE__ */ C(re, {
|
|
255
|
+
count: J.length,
|
|
256
|
+
estimateSize: fe,
|
|
257
|
+
row: (e) => xe(J[e], e)
|
|
258
|
+
}) : J.map(xe), a && $ && v && /* @__PURE__ */ C(B, {
|
|
259
|
+
ref: K,
|
|
260
|
+
count: L.size,
|
|
261
|
+
onClear: () => V(/* @__PURE__ */ new Set()),
|
|
262
|
+
children: g
|
|
263
263
|
})]
|
|
264
264
|
});
|
|
265
265
|
});
|
|
266
|
-
process.env.NODE_ENV !== "production" && (
|
|
267
|
-
function
|
|
266
|
+
process.env.NODE_ENV !== "production" && (I.displayName = "List");
|
|
267
|
+
function L(e, t) {
|
|
268
268
|
return t ? e ? "bg-raised-pressed controls-on-fill hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 controls-on-fill hover:bg-fill-3 active:bg-fill-3" : e ? "hover:bg-raised-hover hover:controls-on-fill active:bg-raised-pressed" : "hover:bg-fill-1 hover:controls-on-fill active:bg-fill-2";
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
let t = typeof window > "u" ? null : window.getSelection();
|
|
272
|
-
return !!t && !t.isCollapsed && !!t.anchorNode && e.contains(t.anchorNode);
|
|
273
|
-
}
|
|
274
|
-
function ie(e, t) {
|
|
270
|
+
function ne(e, t) {
|
|
275
271
|
let n = t?.firstElementChild?.getBoundingClientRect().top;
|
|
276
272
|
if (n === void 0) return;
|
|
277
273
|
let r = e.getBoundingClientRect().bottom + 8 - n;
|
|
278
|
-
r > 0 &&
|
|
274
|
+
r > 0 && m(e)?.scrollBy({ top: r });
|
|
279
275
|
}
|
|
280
|
-
function
|
|
276
|
+
function re({ count: e, estimateSize: t, row: n }) {
|
|
281
277
|
let r = typeof window > "u" ? 1024 : window.innerHeight, i = [], a = 0, o = 12;
|
|
282
278
|
for (let s = 0; s < e; s++) {
|
|
283
279
|
if (a >= r && o-- <= 0) {
|
|
284
280
|
for (let n = s; n < e; n++) a += t(n);
|
|
285
281
|
break;
|
|
286
282
|
}
|
|
287
|
-
i.push(/* @__PURE__ */
|
|
283
|
+
i.push(/* @__PURE__ */ C("div", {
|
|
288
284
|
role: "presentation",
|
|
289
285
|
className: "absolute top-0 left-0 w-full",
|
|
290
286
|
style: { transform: `translateY(${Math.round(a)}px)` },
|
|
291
287
|
children: n(s)
|
|
292
288
|
}, s)), a += t(s);
|
|
293
289
|
}
|
|
294
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ C("div", {
|
|
295
291
|
role: "presentation",
|
|
296
292
|
className: "relative w-full",
|
|
297
293
|
style: { height: a },
|
|
298
294
|
children: i
|
|
299
295
|
});
|
|
300
296
|
}
|
|
301
|
-
function
|
|
297
|
+
function ie({ density: t, grouped: n }) {
|
|
302
298
|
let i = r();
|
|
303
|
-
return /* @__PURE__ */
|
|
299
|
+
return /* @__PURE__ */ w("div", {
|
|
304
300
|
role: "presentation",
|
|
305
|
-
children: [n && /* @__PURE__ */
|
|
301
|
+
children: [n && /* @__PURE__ */ C("div", {
|
|
306
302
|
role: "presentation",
|
|
307
303
|
className: i ? "px-0" : "px-24",
|
|
308
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ C("div", {
|
|
309
305
|
className: "flex h-36 items-center px-12",
|
|
310
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ C(d, {
|
|
311
307
|
shape: "line",
|
|
312
308
|
className: "w-80"
|
|
313
309
|
})
|
|
@@ -319,19 +315,19 @@ function oe({ density: t, grouped: n }) {
|
|
|
319
315
|
54,
|
|
320
316
|
40,
|
|
321
317
|
58
|
|
322
|
-
].map((n, r) => /* @__PURE__ */
|
|
318
|
+
].map((n, r) => /* @__PURE__ */ C("div", {
|
|
323
319
|
role: "presentation",
|
|
324
320
|
className: i ? "px-0" : "px-24",
|
|
325
|
-
children: /* @__PURE__ */
|
|
326
|
-
className: e("flex items-center gap-12 px-12",
|
|
321
|
+
children: /* @__PURE__ */ w("div", {
|
|
322
|
+
className: e("flex items-center gap-12 px-12", j.density[t].classes),
|
|
327
323
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ C(d, {
|
|
329
325
|
shape: "line",
|
|
330
326
|
className: "min-w-0",
|
|
331
327
|
style: { width: `${n}%` }
|
|
332
328
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ C("span", { className: "flex-1" }),
|
|
330
|
+
/* @__PURE__ */ C(d, {
|
|
335
331
|
shape: "line",
|
|
336
332
|
className: "w-64 shrink-0"
|
|
337
333
|
})
|
|
@@ -340,126 +336,126 @@ function oe({ density: t, grouped: n }) {
|
|
|
340
336
|
}, r))]
|
|
341
337
|
});
|
|
342
338
|
}
|
|
343
|
-
var
|
|
344
|
-
let
|
|
345
|
-
className: e("flex shrink-0",
|
|
339
|
+
var R = /* @__PURE__ */ g(function({ item: t, index: a, depth: o = 0, lastChild: s, idWidth: l, density: u = "default", wrapSubtitle: d = !1, narrow: p = !1, active: m, selected: g, selectable: _, selecting: v, onSelect: y, onOpen: b, onFocus: x, "data-force": S }, T) {
|
|
340
|
+
let E = n(), D = r(), O = i(), A = p && !!(t.meta || t.date), M = (E || A) && !!t.subtitle, N = M && d, P = !!t.disabled, F = t.avatar && /* @__PURE__ */ C("span", {
|
|
341
|
+
className: e("flex shrink-0", P && "opacity-50"),
|
|
346
342
|
children: t.avatar
|
|
347
343
|
});
|
|
348
|
-
return /* @__PURE__ */
|
|
344
|
+
return /* @__PURE__ */ C("div", {
|
|
349
345
|
role: "row",
|
|
350
346
|
"aria-rowindex": a === void 0 ? void 0 : a + 1,
|
|
351
|
-
className:
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
-
ref:
|
|
347
|
+
className: E ? e("px-0", a !== void 0 && a > 0 && "hairline-t") : D ? "px-0" : "px-24",
|
|
348
|
+
children: /* @__PURE__ */ w("div", {
|
|
349
|
+
ref: T,
|
|
354
350
|
role: "gridcell",
|
|
355
|
-
"aria-selected":
|
|
356
|
-
"aria-disabled":
|
|
351
|
+
"aria-selected": _ ? !!g : void 0,
|
|
352
|
+
"aria-disabled": P || void 0,
|
|
357
353
|
"data-index": a,
|
|
358
354
|
"data-row": "",
|
|
359
355
|
tabIndex: m === !1 ? -1 : 0,
|
|
360
|
-
onFocus:
|
|
356
|
+
onFocus: x,
|
|
361
357
|
onClick: (e) => {
|
|
362
|
-
e.currentTarget.contains(e.target) && !e.target.closest("button, a, [role=checkbox]") && (
|
|
358
|
+
e.currentTarget.contains(e.target) && !e.target.closest("button, a, [role=checkbox]") && (h(e.currentTarget) || (v && _ ? y?.() : b?.()));
|
|
363
359
|
},
|
|
364
|
-
...
|
|
365
|
-
className: e("group/row relative flex cursor-pointer items-center gap-12 text-body transition-control focus-ring-inset",
|
|
360
|
+
...S ? { "data-force": S } : {},
|
|
361
|
+
className: e("group/row relative flex cursor-pointer items-center gap-12 text-body transition-control focus-ring-inset", E ? "rounded-none px-20" : "rounded-item px-12", M || A || N ? "min-h-56 py-8" : E && u === "default" ? "h-48" : j.density[u].classes, L(E, !!g), P && "pointer-events-none text-fg-disabled"),
|
|
366
362
|
children: [
|
|
367
|
-
|
|
368
|
-
className: e("flex shrink-0 transition-control select-none",
|
|
363
|
+
_ && /* @__PURE__ */ C("span", {
|
|
364
|
+
className: e("flex shrink-0 transition-control select-none", v || g ? "opacity-100" : "opacity-0 group-hover/row:opacity-100 group-focus-visible/row:opacity-100 coarse:opacity-100"),
|
|
369
365
|
onClick: (e) => e.stopPropagation(),
|
|
370
|
-
children: /* @__PURE__ */
|
|
371
|
-
checked: !!
|
|
372
|
-
onToggle: () =>
|
|
373
|
-
"aria-label":
|
|
366
|
+
children: /* @__PURE__ */ C(k, {
|
|
367
|
+
checked: !!g,
|
|
368
|
+
onToggle: () => y?.(),
|
|
369
|
+
"aria-label": O("list.selectItem", "Select {name}", { name: t.textValue ?? (typeof t.title == "string" ? t.title : t.id) })
|
|
374
370
|
})
|
|
375
371
|
}),
|
|
376
|
-
o === 1 && /* @__PURE__ */
|
|
372
|
+
o === 1 && /* @__PURE__ */ w("span", {
|
|
377
373
|
"aria-hidden": !0,
|
|
378
374
|
className: "relative -ml-4 h-full w-16 shrink-0 self-stretch",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ C("span", { className: e("absolute left-6 w-1 bg-line-strong forced-line", s ? "top-0 h-1/2" : "inset-y-0") }), /* @__PURE__ */ C("span", { className: "absolute top-1/2 left-6 h-1 w-10 bg-line-strong forced-line" })]
|
|
380
376
|
}),
|
|
381
|
-
t.glyph && /* @__PURE__ */
|
|
382
|
-
className: e("flex size-16 shrink-0 items-center justify-center",
|
|
377
|
+
t.glyph && /* @__PURE__ */ C("span", {
|
|
378
|
+
className: e("flex size-16 shrink-0 items-center justify-center", P && "opacity-50"),
|
|
383
379
|
children: t.glyph
|
|
384
380
|
}),
|
|
385
|
-
t.leading && /* @__PURE__ */
|
|
386
|
-
className: e("-mr-4 flex shrink-0",
|
|
381
|
+
t.leading && /* @__PURE__ */ C("span", {
|
|
382
|
+
className: e("-mr-4 flex shrink-0", M && "self-start", P && "opacity-50"),
|
|
387
383
|
children: t.leading
|
|
388
384
|
}),
|
|
389
|
-
t.displayId && /* @__PURE__ */
|
|
390
|
-
className: e("shrink-0 mono text-small tabular",
|
|
385
|
+
t.displayId && /* @__PURE__ */ C(f, {
|
|
386
|
+
className: e("shrink-0 mono text-small tabular", P ? "text-fg-disabled" : g ? "text-fg-secondary" : "text-fg-tertiary", l && ee[l]),
|
|
391
387
|
children: t.displayId
|
|
392
388
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
className: e("flex min-w-0 flex-1",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
396
|
-
className: e("flex min-w-0",
|
|
397
|
-
children: [typeof t.title == "string" ? /* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ w("span", {
|
|
390
|
+
className: e("flex min-w-0 flex-1", A ? "flex-col items-stretch gap-4" : "contents"),
|
|
391
|
+
children: [/* @__PURE__ */ w("span", {
|
|
392
|
+
className: e("flex min-w-0", A ? "w-full" : "flex-1", M ? "flex-col items-start gap-2" : "items-baseline gap-8"),
|
|
393
|
+
children: [typeof t.title == "string" ? /* @__PURE__ */ C(c, {
|
|
398
394
|
truncate: !0,
|
|
399
395
|
weight: "medium",
|
|
400
|
-
tone:
|
|
401
|
-
className: e("min-w-0 shrink",
|
|
396
|
+
tone: P ? "inherit" : "default",
|
|
397
|
+
className: e("min-w-0 shrink", M && "max-w-full"),
|
|
402
398
|
children: t.title
|
|
403
|
-
}) : /* @__PURE__ */
|
|
404
|
-
className: e("min-w-0 truncate font-medium",
|
|
399
|
+
}) : /* @__PURE__ */ C("span", {
|
|
400
|
+
className: e("min-w-0 truncate font-medium", P ? "text-inherit" : "text-fg", M && "max-w-full"),
|
|
405
401
|
children: t.title
|
|
406
|
-
}), t.subtitle && /* @__PURE__ */
|
|
407
|
-
wrap:
|
|
408
|
-
className: e("min-w-0",
|
|
402
|
+
}), t.subtitle && /* @__PURE__ */ C(f, {
|
|
403
|
+
wrap: N,
|
|
404
|
+
className: e("min-w-0", P ? "text-fg-disabled" : "text-fg-secondary", M ? "max-w-full text-small" : "flex-1 basis-0"),
|
|
409
405
|
children: t.subtitle
|
|
410
406
|
})]
|
|
411
|
-
}),
|
|
407
|
+
}), A && /* @__PURE__ */ w("span", {
|
|
412
408
|
className: "flex min-h-24 min-w-0 flex-wrap items-center gap-x-8",
|
|
413
409
|
children: [
|
|
414
|
-
t.meta && /* @__PURE__ */
|
|
415
|
-
className: e("flex min-w-0 max-w-full items-center gap-6 overflow-hidden",
|
|
410
|
+
t.meta && /* @__PURE__ */ C("span", {
|
|
411
|
+
className: e("flex min-w-0 max-w-full items-center gap-6 overflow-hidden", P && "opacity-50"),
|
|
416
412
|
children: t.meta
|
|
417
413
|
}),
|
|
418
|
-
t.date && /* @__PURE__ */
|
|
419
|
-
className: e("shrink-0 text-small whitespace-nowrap tabular",
|
|
414
|
+
t.date && /* @__PURE__ */ C("span", {
|
|
415
|
+
className: e("shrink-0 text-small whitespace-nowrap tabular", P ? "text-fg-disabled" : "text-fg-secondary"),
|
|
420
416
|
children: t.date
|
|
421
417
|
}),
|
|
422
|
-
|
|
423
|
-
t.actions && /* @__PURE__ */
|
|
418
|
+
F,
|
|
419
|
+
t.actions && /* @__PURE__ */ C("span", {
|
|
424
420
|
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
425
421
|
children: t.actions
|
|
426
422
|
})
|
|
427
423
|
]
|
|
428
424
|
})]
|
|
429
425
|
}),
|
|
430
|
-
!
|
|
426
|
+
!A && (t.meta || t.actions) && /* @__PURE__ */ w("span", {
|
|
431
427
|
className: "relative flex shrink-0 items-center gap-6",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
433
|
-
className: e("flex items-center gap-6", t.actions && "transition-control group-hover/row:opacity-0 group-focus-within/row:opacity-0",
|
|
428
|
+
children: [/* @__PURE__ */ C("span", {
|
|
429
|
+
className: e("flex items-center gap-6", t.actions && "transition-control group-hover/row:opacity-0 group-focus-within/row:opacity-0", P && "opacity-50"),
|
|
434
430
|
children: t.meta
|
|
435
|
-
}), t.actions && /* @__PURE__ */
|
|
431
|
+
}), t.actions && /* @__PURE__ */ C("span", {
|
|
436
432
|
className: e("flex items-center gap-2 opacity-0 transition-control group-hover/row:opacity-100 group-focus-within/row:opacity-100 coarse:opacity-100", t.meta && "absolute inset-y-0 right-0 coarse:static"),
|
|
437
433
|
children: t.actions
|
|
438
434
|
})]
|
|
439
435
|
}),
|
|
440
|
-
!
|
|
441
|
-
className: e("min-w-80 shrink-0 text-right text-small whitespace-nowrap tabular",
|
|
436
|
+
!A && t.date && /* @__PURE__ */ C("span", {
|
|
437
|
+
className: e("min-w-80 shrink-0 text-right text-small whitespace-nowrap tabular", P ? "text-fg-disabled" : "text-fg-secondary"),
|
|
442
438
|
children: t.date
|
|
443
439
|
}),
|
|
444
|
-
!
|
|
440
|
+
!A && F
|
|
445
441
|
]
|
|
446
442
|
})
|
|
447
443
|
});
|
|
448
444
|
});
|
|
449
|
-
process.env.NODE_ENV !== "production" && (
|
|
450
|
-
var
|
|
445
|
+
process.env.NODE_ENV !== "production" && (R.displayName = "ListRow");
|
|
446
|
+
var z = /* @__PURE__ */ g(function({ title: t, glyph: a, count: o, collapsed: s, onToggle: c, onAdd: u, addLabel: d, indent: f, first: p, index: m, active: h, onFocus: g }, _) {
|
|
451
447
|
let v = n(), y = r(), b = i();
|
|
452
|
-
return /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ C("div", {
|
|
453
449
|
ref: _,
|
|
454
450
|
role: "row",
|
|
455
451
|
"aria-rowindex": m === void 0 ? void 0 : m + 1,
|
|
456
452
|
onFocus: g,
|
|
457
453
|
className: v ? e("group/gh bg-fill-1", !p && "hairline-t") : e("group/gh", !p && "pt-16", y ? "px-0" : "px-24"),
|
|
458
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ w("div", {
|
|
459
455
|
role: "gridcell",
|
|
460
456
|
className: e("flex h-36 items-center gap-4", v && "pr-12 pl-8"),
|
|
461
457
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ w("button", {
|
|
463
459
|
type: "button",
|
|
464
460
|
"aria-expanded": !s,
|
|
465
461
|
"data-index": m,
|
|
@@ -467,38 +463,38 @@ var L = /* @__PURE__ */ h(function({ title: t, glyph: a, count: o, collapsed: s,
|
|
|
467
463
|
onClick: c,
|
|
468
464
|
className: e("relative flex h-28 min-w-0 cursor-pointer items-center gap-8 rounded-pill px-12 text-small transition-control focus-ring tap-target", v ? "hover:bg-fill-2 active:bg-fill-3" : "hover:bg-fill-1 active:bg-fill-2"),
|
|
469
465
|
children: [
|
|
470
|
-
f && !v && /* @__PURE__ */
|
|
466
|
+
f && !v && /* @__PURE__ */ C("span", {
|
|
471
467
|
"aria-hidden": !0,
|
|
472
468
|
className: "w-22 shrink-0"
|
|
473
469
|
}),
|
|
474
|
-
a && /* @__PURE__ */
|
|
470
|
+
a && /* @__PURE__ */ C("span", {
|
|
475
471
|
className: "flex size-16 items-center justify-center",
|
|
476
472
|
children: a
|
|
477
473
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ C("span", {
|
|
479
475
|
className: "truncate font-medium text-fg-secondary",
|
|
480
476
|
children: t
|
|
481
477
|
}),
|
|
482
|
-
o !== void 0 && /* @__PURE__ */
|
|
478
|
+
o !== void 0 && /* @__PURE__ */ C("span", {
|
|
483
479
|
className: "text-fg-tertiary tabular",
|
|
484
480
|
children: o
|
|
485
481
|
}),
|
|
486
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ C("svg", {
|
|
487
483
|
viewBox: "0 0 8 8",
|
|
488
484
|
"aria-hidden": !0,
|
|
489
485
|
className: e("size-10 text-fg-tertiary transition-transform duration-200 ease-standard", !s && "rotate-90"),
|
|
490
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ C("path", {
|
|
491
487
|
d: "M2.5 1.5 5.5 4l-3 2.5z",
|
|
492
488
|
fill: "currentColor"
|
|
493
489
|
})
|
|
494
490
|
})
|
|
495
491
|
]
|
|
496
492
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
u && /* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ C("span", { className: "flex-1" }),
|
|
494
|
+
u && /* @__PURE__ */ C("span", {
|
|
499
495
|
className: "flex opacity-0 transition-control group-hover/gh:opacity-100 group-focus-within/gh:opacity-100 coarse:opacity-100",
|
|
500
|
-
children: /* @__PURE__ */
|
|
501
|
-
icon:
|
|
496
|
+
children: /* @__PURE__ */ C(l, {
|
|
497
|
+
icon: T,
|
|
502
498
|
"aria-label": d ?? b("list.add", "Add"),
|
|
503
499
|
size: "xs",
|
|
504
500
|
onClick: u
|
|
@@ -508,33 +504,33 @@ var L = /* @__PURE__ */ h(function({ title: t, glyph: a, count: o, collapsed: s,
|
|
|
508
504
|
})
|
|
509
505
|
});
|
|
510
506
|
});
|
|
511
|
-
process.env.NODE_ENV !== "production" && (
|
|
512
|
-
var
|
|
507
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "GroupHeader");
|
|
508
|
+
var B = /* @__PURE__ */ g(function({ count: e, onClear: n, children: r }, o) {
|
|
513
509
|
let s = t(), c = i();
|
|
514
|
-
return typeof document > "u" ? null :
|
|
510
|
+
return typeof document > "u" ? null : D(/* @__PURE__ */ C("div", {
|
|
515
511
|
ref: o,
|
|
516
512
|
role: "region",
|
|
517
513
|
"aria-label": c("list.selection", "Selection"),
|
|
518
514
|
className: "pointer-events-none fixed right-0 bottom-24 left-0 z-50 flex justify-center px-16",
|
|
519
|
-
children: /* @__PURE__ */
|
|
515
|
+
children: /* @__PURE__ */ w("div", {
|
|
520
516
|
className: "pointer-events-auto flex min-h-44 items-center gap-4 rounded-pill bg-toast py-6 pr-6 pl-16 text-body font-medium text-toast-fg shadow-toast popup-motion",
|
|
521
517
|
children: [
|
|
522
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ C("span", {
|
|
523
519
|
className: "pr-8 tabular",
|
|
524
520
|
children: c("list.selected", "{count} selected", { count: String(e) })
|
|
525
521
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ C("span", {
|
|
527
523
|
className: "mr-4 h-20 w-1 bg-toast-action",
|
|
528
524
|
"aria-hidden": !0
|
|
529
525
|
}),
|
|
530
526
|
r,
|
|
531
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ C("button", {
|
|
532
528
|
type: "button",
|
|
533
529
|
onClick: n,
|
|
534
530
|
"aria-label": c("list.clearSelection", "Clear selection"),
|
|
535
531
|
className: "inline-flex size-32 cursor-pointer items-center justify-center rounded-pill text-toast-fg-secondary transition-control hover:bg-toast-action hover:text-toast-fg focus-ring",
|
|
536
|
-
children: /* @__PURE__ */
|
|
537
|
-
icon:
|
|
532
|
+
children: /* @__PURE__ */ C(a, {
|
|
533
|
+
icon: E,
|
|
538
534
|
size: "sm"
|
|
539
535
|
})
|
|
540
536
|
})
|
|
@@ -542,22 +538,22 @@ var R = /* @__PURE__ */ h(function({ count: e, onClear: n, children: r }, o) {
|
|
|
542
538
|
})
|
|
543
539
|
}), s ?? document.body);
|
|
544
540
|
});
|
|
545
|
-
process.env.NODE_ENV !== "production" && (
|
|
546
|
-
var
|
|
547
|
-
return /* @__PURE__ */
|
|
541
|
+
process.env.NODE_ENV !== "production" && (B.displayName = "SelectionBar");
|
|
542
|
+
var V = /* @__PURE__ */ g(function({ children: t, onClick: n, icon: r, danger: i }, o) {
|
|
543
|
+
return /* @__PURE__ */ w("button", {
|
|
548
544
|
ref: o,
|
|
549
545
|
type: "button",
|
|
550
546
|
onClick: n,
|
|
551
547
|
className: e("inline-flex h-32 cursor-pointer items-center gap-6 rounded-pill px-12 text-body font-medium transition-control hover:bg-toast-action focus-ring", i ? "text-toast-danger" : "text-toast-fg", r && "pl-10"),
|
|
552
|
-
children: [r && /* @__PURE__ */
|
|
548
|
+
children: [r && /* @__PURE__ */ C(a, {
|
|
553
549
|
icon: r,
|
|
554
550
|
size: "sm",
|
|
555
551
|
className: i ? void 0 : "text-toast-fg-secondary"
|
|
556
552
|
}), t]
|
|
557
553
|
});
|
|
558
554
|
});
|
|
559
|
-
process.env.NODE_ENV !== "production" && (
|
|
555
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "SelectionAction");
|
|
560
556
|
//#endregion
|
|
561
|
-
export {
|
|
557
|
+
export { R as a, I as i, M as n, V as o, j as r, B as s, z as t };
|
|
562
558
|
|
|
563
|
-
//# sourceMappingURL=list-
|
|
559
|
+
//# sourceMappingURL=list-DBltIx9B.js.map
|