@logicplanes/kaeso-ui 0.7.0 → 0.7.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/LICENSE-Apache-2.0.txt +202 -0
- package/NOTICE.md +11 -1
- package/ai/component-guides.md +36 -2
- package/ai/component-registry.json +74 -5
- package/ai/component-registry.md +21 -6
- package/ai/icons.md +2 -2
- package/ai/tokens.md +1 -1
- package/dist/chunks/{app-frame-DibcP3SK.js → app-frame-tZReKtCM.js} +3 -3
- package/dist/chunks/{app-frame-DibcP3SK.js.map → app-frame-tZReKtCM.js.map} +1 -1
- package/dist/chunks/badge-DC-RFkFg.js +27 -0
- package/dist/chunks/badge-DC-RFkFg.js.map +1 -0
- package/dist/chunks/collapsible-BdwAesRa.js +53 -0
- package/dist/chunks/collapsible-BdwAesRa.js.map +1 -0
- package/dist/chunks/combobox-BdgWE05R.js +366 -0
- package/dist/chunks/combobox-BdgWE05R.js.map +1 -0
- package/dist/chunks/command-list-DFd-joEV.js +455 -0
- package/dist/chunks/command-list-DFd-joEV.js.map +1 -0
- package/dist/chunks/{command-palette-BEIK_hv9.js → command-palette-QsmneiR8.js} +2 -2
- package/dist/chunks/{command-palette-BEIK_hv9.js.map → command-palette-QsmneiR8.js.map} +1 -1
- package/dist/chunks/{core-B8c9Bty0.js → core-DSGLmc13.js} +19 -18
- package/dist/chunks/core-DSGLmc13.js.map +1 -0
- package/dist/chunks/{dashboard-Cuv86JNj.js → dashboard-B7ltvQ3f.js} +9 -8
- package/dist/chunks/dashboard-B7ltvQ3f.js.map +1 -0
- package/dist/chunks/data-table-BFzel_vu.js +682 -0
- package/dist/chunks/data-table-BFzel_vu.js.map +1 -0
- package/dist/chunks/{de-QtAgHLnQ.js → de-K_t_sSKN.js} +4 -1
- package/dist/chunks/de-K_t_sSKN.js.map +1 -0
- package/dist/chunks/{display-options-DZqFG-ly.js → display-options-Cw7rD12V.js} +2 -2
- package/dist/chunks/{display-options-DZqFG-ly.js.map → display-options-Cw7rD12V.js.map} +1 -1
- package/dist/chunks/{domain-BqNtp2rQ.js → domain-DLRk0kME.js} +2 -2
- package/dist/chunks/{domain-BqNtp2rQ.js.map → domain-DLRk0kME.js.map} +1 -1
- package/dist/chunks/figures-D_Tsrwwj.js +22 -0
- package/dist/chunks/figures-D_Tsrwwj.js.map +1 -0
- package/dist/chunks/{filter-chip-KMkD6acL.js → filter-chip-BMytSUWo.js} +4 -4
- package/dist/chunks/{filter-chip-KMkD6acL.js.map → filter-chip-BMytSUWo.js.map} +1 -1
- package/dist/chunks/icon-BMsYY158.js +110 -0
- package/dist/chunks/icon-BMsYY158.js.map +1 -0
- package/dist/chunks/{identity-DCNUQgql.js → identity-BEHDLa0i.js} +783 -160
- package/dist/chunks/identity-BEHDLa0i.js.map +1 -0
- package/dist/chunks/kaeso-DSqL9sIX.js +649 -0
- package/dist/chunks/kaeso-DSqL9sIX.js.map +1 -0
- package/dist/chunks/{link-DXFn_hKF.js → link-ouHMlBU8.js} +2 -2
- package/dist/chunks/link-ouHMlBU8.js.map +1 -0
- package/dist/chunks/{list-Bhtqsv9E.js → list-0pRnkcpL.js} +155 -154
- package/dist/chunks/list-0pRnkcpL.js.map +1 -0
- package/dist/chunks/{markdown-CLMrgRju.js → markdown-D3FY-DA8.js} +2 -2
- package/dist/chunks/{markdown-CLMrgRju.js.map → markdown-D3FY-DA8.js.map} +1 -1
- package/dist/chunks/menu-BMry4pQ-.js +461 -0
- package/dist/chunks/menu-BMry4pQ-.js.map +1 -0
- package/dist/chunks/{meter-YuCR1Pjd.js → meter-D2ynBSmy.js} +2 -2
- package/dist/chunks/{meter-YuCR1Pjd.js.map → meter-D2ynBSmy.js.map} +1 -1
- package/dist/chunks/{nav-sheet-CQfZ7w_q.js → nav-sheet-B0o-icmO.js} +2 -2
- package/dist/chunks/{nav-sheet-CQfZ7w_q.js.map → nav-sheet-B0o-icmO.js.map} +1 -1
- package/dist/chunks/{page-header-C92GBvns.js → page-header-DiH555lF.js} +2 -2
- package/dist/chunks/{page-header-C92GBvns.js.map → page-header-DiH555lF.js.map} +1 -1
- package/dist/chunks/{picker-popover-icF27914.js → picker-popover-DAnkZmge.js} +3 -3
- package/dist/chunks/{picker-popover-icF27914.js.map → picker-popover-DAnkZmge.js.map} +1 -1
- package/dist/chunks/{rights-C44EtmsG.js → rights-C6gfyqsY.js} +3 -3
- package/dist/chunks/{rights-C44EtmsG.js.map → rights-C6gfyqsY.js.map} +1 -1
- package/dist/chunks/{select-B3eoWXfR.js → select-DQzn7_Fs.js} +2 -2
- package/dist/chunks/{select-B3eoWXfR.js.map → select-DQzn7_Fs.js.map} +1 -1
- package/dist/chunks/{sidebar-BnIqRDVN.js → sidebar-Bbm__0Nk.js} +2 -2
- package/dist/chunks/{sidebar-BnIqRDVN.js.map → sidebar-Bbm__0Nk.js.map} +1 -1
- package/dist/chunks/{sidebar-menu-CSElX37g.js → sidebar-menu-CycUvTPc.js} +2 -2
- package/dist/chunks/{sidebar-menu-CSElX37g.js.map → sidebar-menu-CycUvTPc.js.map} +1 -1
- package/dist/chunks/stat-CtOxD2Jk.js +240 -0
- package/dist/chunks/stat-CtOxD2Jk.js.map +1 -0
- package/dist/chunks/{status-Bi2tSKCj.js → status-BuZz3nIH.js} +2 -2
- package/dist/chunks/{status-Bi2tSKCj.js.map → status-BuZz3nIH.js.map} +1 -1
- package/dist/chunks/{styles-CklJ8C7c.js → styles-CN0ovMB2.js} +2 -2
- package/dist/chunks/{styles-CklJ8C7c.js.map → styles-CN0ovMB2.js.map} +1 -1
- package/dist/chunks/{swap-value-TlZecHRF.js → swap-value-ClhwTe97.js} +2 -2
- package/dist/chunks/swap-value-ClhwTe97.js.map +1 -0
- package/dist/chunks/{theme-menu-BgltuBqB.js → theme-menu-DmEo4nXz.js} +2 -2
- package/dist/chunks/{theme-menu-BgltuBqB.js.map → theme-menu-DmEo4nXz.js.map} +1 -1
- package/dist/chunks/{timeseries-h7XdvYTo.js → timeseries-CrpFP8va.js} +4 -4
- package/dist/chunks/{timeseries-h7XdvYTo.js.map → timeseries-CrpFP8va.js.map} +1 -1
- package/dist/chunks/{tooltip-OySqu0Bq.js → tooltip-DdZgOME7.js} +35 -35
- package/dist/chunks/tooltip-DdZgOME7.js.map +1 -0
- package/dist/chunks/vendor-marks-DF2Thhge.js +2052 -0
- package/dist/chunks/vendor-marks-DF2Thhge.js.map +1 -0
- package/dist/chunks/{zh-CN-8ZWE79zI.js → zh-CN-By8VGCbn.js} +4 -1
- package/dist/chunks/zh-CN-By8VGCbn.js.map +1 -0
- package/dist/components/app-frame.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/charts/bar.js +3 -3
- package/dist/components/charts/donut.js +2 -2
- package/dist/components/charts/heatmap.js +2 -2
- package/dist/components/charts/sankey.js +3 -3
- package/dist/components/charts/sparkline.js +1 -1
- package/dist/components/charts/timeseries.js +1 -1
- package/dist/components/charts.js +2 -2
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/dashboard/legend.js +22 -20
- package/dist/components/dashboard/legend.js.map +1 -1
- package/dist/components/dashboard/metric-tabs.js +66 -65
- package/dist/components/dashboard/metric-tabs.js.map +1 -1
- package/dist/components/dashboard/model-card.js +37 -36
- package/dist/components/dashboard/model-card.js.map +1 -1
- package/dist/components/dashboard/rank-list.js +1 -1
- package/dist/components/dashboard/rank-list.js.map +1 -1
- package/dist/components/dashboard.js +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/display-options.js +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/flow-canvas.js +2 -2
- package/dist/components/icon.js +1 -1
- package/dist/components/kaeso/conversation.js +3 -3
- package/dist/components/kaeso/identity.js +1 -1
- package/dist/components/kaeso/rights.js +1 -1
- package/dist/components/kaeso/usage.js +4 -4
- package/dist/components/kaeso.js +7 -7
- package/dist/components/link.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/menu.js +2 -2
- package/dist/components/meter.js +1 -1
- package/dist/components/page-header.js +1 -1
- package/dist/components/playground.js +662 -657
- package/dist/components/playground.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/stat.js +1 -1
- package/dist/components/status.js +1 -1
- package/dist/components/theme-menu.js +1 -1
- package/dist/i18n-provider.js +1 -1
- package/dist/index.js +30 -30
- package/dist/styles.css +1 -1
- package/dist/types/components/charts/marks.d.ts +0 -1
- package/dist/types/components/dashboard/swap-value.d.ts +0 -1
- package/dist/types/components/kaeso/client-button.d.ts +3 -1
- package/dist/types/components/kaeso/docs.d.ts +11 -0
- package/dist/types/components/kaeso/identity.d.ts +29 -4
- package/dist/types/components/kaeso/index.d.ts +8 -2
- package/dist/types/components/kaeso/model-makers.d.ts +545 -0
- package/dist/types/components/kaeso/source-badge.d.ts +52 -0
- package/dist/types/components/kaeso/vendor-marks.d.ts +2 -0
- package/dist/types/components/menu/styles.d.ts +1 -1
- package/dist/types/icons/groups.d.ts +1 -1
- package/dist/types/icons/vocabulary.d.ts +10 -0
- package/dist/types/utils/figures.d.ts +3 -0
- package/foundations/typography.md +1 -1
- package/package.json +4 -3
- package/dist/chunks/badge-C6H9NlNw.js +0 -26
- package/dist/chunks/badge-C6H9NlNw.js.map +0 -1
- package/dist/chunks/collapsible-BFoDXP0y.js +0 -52
- package/dist/chunks/collapsible-BFoDXP0y.js.map +0 -1
- package/dist/chunks/combobox-B8GjFlO4.js +0 -365
- package/dist/chunks/combobox-B8GjFlO4.js.map +0 -1
- package/dist/chunks/command-list-ttU7YLEl.js +0 -454
- package/dist/chunks/command-list-ttU7YLEl.js.map +0 -1
- package/dist/chunks/core-B8c9Bty0.js.map +0 -1
- package/dist/chunks/dashboard-Cuv86JNj.js.map +0 -1
- package/dist/chunks/data-table-BMopFMG6.js +0 -641
- package/dist/chunks/data-table-BMopFMG6.js.map +0 -1
- package/dist/chunks/de-QtAgHLnQ.js.map +0 -1
- package/dist/chunks/icon-UqUodbsN.js +0 -108
- package/dist/chunks/icon-UqUodbsN.js.map +0 -1
- package/dist/chunks/identity-DCNUQgql.js.map +0 -1
- package/dist/chunks/kaeso-C-E-8Dxz.js +0 -506
- package/dist/chunks/kaeso-C-E-8Dxz.js.map +0 -1
- package/dist/chunks/link-DXFn_hKF.js.map +0 -1
- package/dist/chunks/list-Bhtqsv9E.js.map +0 -1
- package/dist/chunks/menu-Bl7vzB52.js +0 -460
- package/dist/chunks/menu-Bl7vzB52.js.map +0 -1
- package/dist/chunks/stat-DuWKmxGr.js +0 -239
- package/dist/chunks/stat-DuWKmxGr.js.map +0 -1
- package/dist/chunks/swap-value-TlZecHRF.js.map +0 -1
- package/dist/chunks/tooltip-OySqu0Bq.js.map +0 -1
- package/dist/chunks/zh-CN-8ZWE79zI.js.map +0 -1
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "./cn-CF99d-bD.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as d } from "./
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
3
|
+
import { t } from "./figures-D_Tsrwwj.js";
|
|
4
|
+
import { a as n, i as r } from "./inset-BTAjcK6a.js";
|
|
5
|
+
import { t as i } from "./icon-kQHSzziW.js";
|
|
6
|
+
import { n as a } from "./button-L10eO8bf.js";
|
|
7
|
+
import { r as o } from "./text-BRYPrw1h.js";
|
|
8
|
+
import { t as s } from "./truncated-C6K1q8DJ.js";
|
|
9
|
+
import { r as c } from "./skeleton-DTiYxSYX.js";
|
|
10
|
+
import { n as l, r as u, t as d } from "./selects-text-kRMTsm4s.js";
|
|
11
|
+
import { n as f } from "./use-layout-width-D53VE1kJ.js";
|
|
12
|
+
import { r as p } from "./portal-context-Z2xSIPsc.js";
|
|
13
|
+
import { l as m, o as h } from "./tooltip-DVpJ_urN.js";
|
|
14
|
+
import { a as g } from "./context-B2nNL7Im.js";
|
|
15
|
+
import { t as _ } from "./use-hydrating-Dth8POSk.js";
|
|
16
|
+
import { forwardRef as v, useCallback as y, useEffect as b, useLayoutEffect as x, useMemo as ee, useRef as S, useState as C } from "react";
|
|
16
17
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
17
18
|
import { Add01Icon as E, Cancel01Icon as D } from "@hugeicons/core-free-icons";
|
|
18
19
|
import { createPortal as O } from "react-dom";
|
|
19
20
|
// src/components/list/row-checkbox.tsx
|
|
20
|
-
var k = /* @__PURE__ */
|
|
21
|
-
function
|
|
22
|
-
let [i, a] =
|
|
23
|
-
return
|
|
21
|
+
var k = /* @__PURE__ */ h(() => import("./checkbox-BkMPWcR_.js").then((e) => e.c), { base: () => import.meta.url });
|
|
22
|
+
function te({ checked: t, onToggle: n, "aria-label": r }) {
|
|
23
|
+
let [i, a] = m(k, !0), [o, s] = C(!1), [c, l] = C(!1);
|
|
24
|
+
return b(() => {
|
|
24
25
|
if (!c) return;
|
|
25
26
|
let e, t = () => {
|
|
26
27
|
e = setTimeout(() => l(!1));
|
|
@@ -52,26 +53,26 @@ function A({ checked: t, onToggle: n, "aria-label": r }) {
|
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
// src/components/list/list.tsx
|
|
55
|
-
var
|
|
56
|
+
var A = /* @__PURE__ */ h(() => import("./virtual-rows-ByQ87hP0.js"), { base: () => import.meta.url }), j = { density: {
|
|
56
57
|
default: { classes: "h-44" },
|
|
57
58
|
compact: { classes: "h-36 coarse:h-44" }
|
|
58
|
-
} },
|
|
59
|
+
} }, M = { density: "default" }, N = {
|
|
59
60
|
48: "w-48",
|
|
60
61
|
64: "w-64",
|
|
61
62
|
80: "w-80",
|
|
62
63
|
96: "w-96",
|
|
63
64
|
120: "w-120"
|
|
64
65
|
}, P = 520, F = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", I = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
|
|
65
|
-
function
|
|
66
|
+
function ne(e) {
|
|
66
67
|
for (let t of e.querySelectorAll("[role=row]")) {
|
|
67
68
|
let e = t.querySelector("[data-index]");
|
|
68
69
|
if (e) for (let n of t.querySelectorAll(F)) n !== e && n.getAttribute("tabindex") !== "-1" && n.setAttribute("tabindex", "-1");
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
var L = /* @__PURE__ */
|
|
72
|
-
let
|
|
73
|
-
o ||
|
|
74
|
-
}, [o, s]), [
|
|
72
|
+
var L = /* @__PURE__ */ v(function({ items: t, groups: r, onOpen: i, selectable: a, selected: o, onSelectedChange: s, idWidth: c, density: d = "default", wrapSubtitle: p = !1, virtualizeAbove: h = 100, selectionActions: g, selectionBar: _ = !0, loading: v, empty: b, className: E, "aria-label": D, "data-force-row": O }, k) {
|
|
73
|
+
let te = n(), [j, M] = C(/* @__PURE__ */ new Set()), N = o ?? j, L = y((e) => {
|
|
74
|
+
o || M(e), s?.(e);
|
|
75
|
+
}, [o, s]), [R, z] = C(() => new Set((r ?? []).filter((e) => e.defaultCollapsed).map((e) => e.id))), [B, V] = C(-1), [le, ue] = C(null), H = S(null), U = S(null), de = f(H), W = !!de && de < P, G = ee(() => {
|
|
75
76
|
let e = (e) => e.flatMap((e) => [{
|
|
76
77
|
kind: "row",
|
|
77
78
|
item: e,
|
|
@@ -89,21 +90,21 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
89
90
|
kind: "header",
|
|
90
91
|
group: t,
|
|
91
92
|
key: `h-${t.id}`
|
|
92
|
-
}, ...
|
|
93
|
+
}, ...R.has(t.id) ? [] : e(t.items)]) : e(t ?? []);
|
|
93
94
|
}, [
|
|
94
|
-
|
|
95
|
+
t,
|
|
95
96
|
r,
|
|
96
|
-
|
|
97
|
-
]), fe = G.findIndex((e) => e.kind === "row"), K = G.some((e) => e.kind === "row" && e.item.date !== void 0), pe = r ? r.every((e) => e.items.length === 0) : (
|
|
97
|
+
R
|
|
98
|
+
]), fe = G.findIndex((e) => e.kind === "row"), K = G.some((e) => e.kind === "row" && e.item.date !== void 0), pe = r ? r.every((e) => e.items.length === 0) : (t ?? []).length === 0, q = G.length > h, me = l(), he = (e) => G[e]?.kind === "header" ? e === 0 ? 36 : 52 : W ? 64 : d === "compact" && !me ? 36 : 44, [ge, J] = m(A, q), Y = ge?.VirtualRows, _e = S(null);
|
|
98
99
|
B >= G.length && V(-1);
|
|
99
100
|
let ve = B >= 0 ? B : G.length ? 0 : -1, X = (e) => {
|
|
100
101
|
V(e), q && _e.current?.(e);
|
|
101
102
|
let t = () => H.current?.querySelector(`[data-index="${e}"]`), n = (e) => {
|
|
102
|
-
e && (e.focus(),
|
|
103
|
+
e && (e.focus(), re(e, U.current));
|
|
103
104
|
}, r = t();
|
|
104
105
|
r ? n(r) : requestAnimationFrame(() => n(t()));
|
|
105
106
|
}, Z = S(null);
|
|
106
|
-
|
|
107
|
+
x(() => {
|
|
107
108
|
let e = Z.current;
|
|
108
109
|
if (!e || G.some((t) => t.key === e.key) || (Z.current = null, !G.length)) return;
|
|
109
110
|
let t = Math.min(e.index, G.length - 1);
|
|
@@ -114,7 +115,7 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
114
115
|
document.activeElement === document.body ? H.current?.isConnected && X(t) : n.contains(document.activeElement) && performance.now() < r && requestAnimationFrame(i);
|
|
115
116
|
};
|
|
116
117
|
requestAnimationFrame(i);
|
|
117
|
-
}),
|
|
118
|
+
}), x(() => {
|
|
118
119
|
let e = H.current;
|
|
119
120
|
if (!e) return;
|
|
120
121
|
if (W || !K) {
|
|
@@ -143,13 +144,13 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
143
144
|
K
|
|
144
145
|
]);
|
|
145
146
|
let ye = S(!!Y);
|
|
146
|
-
|
|
147
|
+
x(() => {
|
|
147
148
|
Y && !ye.current && B >= 0 && document.activeElement === document.body && H.current?.querySelector(`[data-index="${B}"]`)?.focus(), ye.current = !!Y;
|
|
148
|
-
}),
|
|
149
|
+
}), x(() => {
|
|
149
150
|
let e = H.current;
|
|
150
151
|
if (!e) return;
|
|
151
|
-
|
|
152
|
-
let t = new MutationObserver(() =>
|
|
152
|
+
ne(e);
|
|
153
|
+
let t = new MutationObserver(() => ne(e));
|
|
153
154
|
return t.observe(e, {
|
|
154
155
|
subtree: !0,
|
|
155
156
|
childList: !0,
|
|
@@ -158,8 +159,8 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
158
159
|
}), () => t.disconnect();
|
|
159
160
|
}, []);
|
|
160
161
|
let be = (e) => {
|
|
161
|
-
let t = new Set(
|
|
162
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
162
|
+
let t = new Set(N);
|
|
163
|
+
t.has(e) ? t.delete(e) : t.add(e), L(t);
|
|
163
164
|
}, xe = (e) => e.flatMap((e) => e.kind === "row" && !e.item.disabled ? [e.item.id] : []), Se = (e) => {
|
|
164
165
|
let t = e.target;
|
|
165
166
|
if (!e.currentTarget.contains(t) || t.closest(I)) return;
|
|
@@ -174,15 +175,15 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
174
175
|
let s = Number(r.dataset.index), c = G[s], l = c?.kind === "row" ? c.item : void 0;
|
|
175
176
|
if (e.altKey) return;
|
|
176
177
|
if (e.metaKey || e.ctrlKey) {
|
|
177
|
-
e.key.toLowerCase() === "a" && a && !e.shiftKey && (e.preventDefault(),
|
|
178
|
+
e.key.toLowerCase() === "a" && a && !e.shiftKey && (e.preventDefault(), L(new Set(xe(G))));
|
|
178
179
|
return;
|
|
179
180
|
}
|
|
180
181
|
let u = (t) => {
|
|
181
182
|
if (e.preventDefault(), e.shiftKey && a) {
|
|
182
183
|
let e = le ?? s;
|
|
183
184
|
ue(e);
|
|
184
|
-
let n = new Set(
|
|
185
|
-
xe(G.slice(Math.min(e, t), Math.max(e, t) + 1)).forEach((e) => n.add(e)),
|
|
185
|
+
let n = new Set(N);
|
|
186
|
+
xe(G.slice(Math.min(e, t), Math.max(e, t) + 1)).forEach((e) => n.add(e)), L(n);
|
|
186
187
|
} else ue(null);
|
|
187
188
|
X(t);
|
|
188
189
|
}, d = () => [...n.querySelectorAll(F)].filter((e) => e !== r && !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
|
|
@@ -195,20 +196,20 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
195
196
|
if (!a) return;
|
|
196
197
|
e.preventDefault(), a.focus();
|
|
197
198
|
} else if (!o || !l || e.shiftKey) return;
|
|
198
|
-
else (e.key === " " || e.key === "x") && a ? (e.preventDefault(), l.disabled || be(l.id)) : e.key === "Enter" ? (e.preventDefault(), l.disabled || i?.(l)) : e.key === "Escape" && a &&
|
|
199
|
-
}, Q =
|
|
200
|
-
|
|
199
|
+
else (e.key === " " || e.key === "x") && a ? (e.preventDefault(), l.disabled || be(l.id)) : e.key === "Enter" ? (e.preventDefault(), l.disabled || i?.(l)) : e.key === "Escape" && a && N.size && L(/* @__PURE__ */ new Set());
|
|
200
|
+
}, Q = N.size > 0;
|
|
201
|
+
x(() => {
|
|
201
202
|
let e = document.activeElement;
|
|
202
|
-
Q && e instanceof HTMLElement && H.current?.contains(e) &&
|
|
203
|
+
Q && e instanceof HTMLElement && H.current?.contains(e) && re(e, U.current);
|
|
203
204
|
}, [Q]);
|
|
204
|
-
let $ = (e, t) => e.kind === "header" ? /* @__PURE__ */ w(
|
|
205
|
+
let $ = (e, t) => e.kind === "header" ? /* @__PURE__ */ w(se, {
|
|
205
206
|
title: e.group.title,
|
|
206
207
|
glyph: e.group.glyph,
|
|
207
208
|
count: e.group.count ?? e.group.items.length,
|
|
208
|
-
collapsed:
|
|
209
|
+
collapsed: R.has(e.group.id),
|
|
209
210
|
onToggle: () => {
|
|
210
|
-
let t = new Set(
|
|
211
|
-
t.has(e.group.id) ? t.delete(e.group.id) : t.add(e.group.id),
|
|
211
|
+
let t = new Set(R);
|
|
212
|
+
t.has(e.group.id) ? t.delete(e.group.id) : t.add(e.group.id), z(t);
|
|
212
213
|
},
|
|
213
214
|
onAdd: e.group.onAdd,
|
|
214
215
|
addLabel: e.group.addLabel,
|
|
@@ -218,34 +219,34 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
218
219
|
index: t,
|
|
219
220
|
active: t === ve,
|
|
220
221
|
onFocus: () => V(t)
|
|
221
|
-
}, e.key) : /* @__PURE__ */ w(
|
|
222
|
+
}, e.key) : /* @__PURE__ */ w(oe, {
|
|
222
223
|
index: t,
|
|
223
224
|
item: e.item,
|
|
224
225
|
depth: e.depth,
|
|
225
226
|
lastChild: e.lastChild,
|
|
226
|
-
idWidth:
|
|
227
|
-
density:
|
|
228
|
-
wrapSubtitle:
|
|
227
|
+
idWidth: c,
|
|
228
|
+
density: d,
|
|
229
|
+
wrapSubtitle: p,
|
|
229
230
|
narrow: W,
|
|
230
231
|
dated: K,
|
|
231
232
|
active: t === ve,
|
|
232
|
-
selected:
|
|
233
|
+
selected: N.has(e.item.id),
|
|
233
234
|
selectable: !!a,
|
|
234
235
|
selecting: Q,
|
|
235
236
|
onSelect: () => be(e.item.id),
|
|
236
237
|
onOpen: () => i?.(e.item),
|
|
237
238
|
onFocus: () => V(t),
|
|
238
|
-
...
|
|
239
|
+
...O && t === fe ? { "data-force": O } : {}
|
|
239
240
|
}, e.key);
|
|
240
241
|
return /* @__PURE__ */ T("div", {
|
|
241
242
|
ref: (e) => {
|
|
242
|
-
H.current = e, typeof
|
|
243
|
+
H.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
|
|
243
244
|
},
|
|
244
245
|
role: "grid",
|
|
245
|
-
"aria-label":
|
|
246
|
+
"aria-label": D,
|
|
246
247
|
"aria-rowcount": G.length || void 0,
|
|
247
248
|
"aria-multiselectable": a || void 0,
|
|
248
|
-
"aria-busy":
|
|
249
|
+
"aria-busy": v || void 0,
|
|
249
250
|
onKeyDown: (e) => {
|
|
250
251
|
J(), Se(e);
|
|
251
252
|
},
|
|
@@ -263,31 +264,31 @@ var L = /* @__PURE__ */ _(function({ items: n, groups: r, onOpen: i, selectable:
|
|
|
263
264
|
e.currentTarget.contains(e.target) && !e.relatedTarget && (Z.current = null);
|
|
264
265
|
},
|
|
265
266
|
onWheel: J,
|
|
266
|
-
className: e("relative flex flex-col outline-none",
|
|
267
|
-
children: [
|
|
268
|
-
density:
|
|
267
|
+
className: e("relative flex flex-col outline-none", te && "overflow-hidden rounded-group bg-raised shadow-xs first:mt-16", E),
|
|
268
|
+
children: [v && (pe || G.length === 0) ? /* @__PURE__ */ w(ae, {
|
|
269
|
+
density: d,
|
|
269
270
|
grouped: !!r
|
|
270
|
-
}) : pe &&
|
|
271
|
+
}) : pe && b ? /* @__PURE__ */ w("div", {
|
|
271
272
|
role: "row",
|
|
272
273
|
children: /* @__PURE__ */ w("div", {
|
|
273
274
|
role: "gridcell",
|
|
274
|
-
children:
|
|
275
|
+
children: b
|
|
275
276
|
})
|
|
276
277
|
}) : q && Y ? /* @__PURE__ */ w(Y, {
|
|
277
278
|
count: G.length,
|
|
278
279
|
estimateSize: he,
|
|
279
|
-
getScrollElement: () =>
|
|
280
|
+
getScrollElement: () => u(H.current),
|
|
280
281
|
scrollTo: _e,
|
|
281
282
|
row: (e) => $(G[e], e),
|
|
282
283
|
measure: W
|
|
283
|
-
}) : q ? /* @__PURE__ */ w(
|
|
284
|
+
}) : q ? /* @__PURE__ */ w(ie, {
|
|
284
285
|
count: G.length,
|
|
285
286
|
estimateSize: he,
|
|
286
287
|
row: (e) => $(G[e], e)
|
|
287
|
-
}) : G.map($), a && Q && _ && /* @__PURE__ */ w(
|
|
288
|
+
}) : G.map($), a && Q && _ && /* @__PURE__ */ w(ce, {
|
|
288
289
|
ref: U,
|
|
289
|
-
count:
|
|
290
|
-
onClear: () =>
|
|
290
|
+
count: N.size,
|
|
291
|
+
onClear: () => L(/* @__PURE__ */ new Set()),
|
|
291
292
|
children: g
|
|
292
293
|
})]
|
|
293
294
|
});
|
|
@@ -296,14 +297,14 @@ process.env.NODE_ENV !== "production" && (L.displayName = "List");
|
|
|
296
297
|
function R(e, t) {
|
|
297
298
|
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";
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function re(e, t) {
|
|
300
301
|
let n = t?.firstElementChild?.getBoundingClientRect().top;
|
|
301
302
|
if (n === void 0) return;
|
|
302
303
|
let r = e.getBoundingClientRect().bottom + 8 - n;
|
|
303
|
-
r > 0 &&
|
|
304
|
+
r > 0 && u(e)?.scrollBy({ top: r });
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
-
let r =
|
|
306
|
+
function ie({ count: e, estimateSize: t, row: n }) {
|
|
307
|
+
let r = _() ? 1024 : window.innerHeight, i = [], a = 0, o = 12;
|
|
307
308
|
for (let s = 0; s < e; s++) {
|
|
308
309
|
if (a >= r && o-- <= 0) {
|
|
309
310
|
for (let n = s; n < e; n++) a += t(n);
|
|
@@ -323,16 +324,16 @@ function re({ count: e, estimateSize: t, row: n }) {
|
|
|
323
324
|
children: i
|
|
324
325
|
});
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
-
let i =
|
|
327
|
+
function ae({ density: t, grouped: n }) {
|
|
328
|
+
let i = r();
|
|
328
329
|
return /* @__PURE__ */ T("div", {
|
|
329
330
|
role: "presentation",
|
|
330
|
-
children: [
|
|
331
|
+
children: [n && /* @__PURE__ */ w("div", {
|
|
331
332
|
role: "presentation",
|
|
332
333
|
className: i ? "px-0" : "px-24",
|
|
333
334
|
children: /* @__PURE__ */ w("div", {
|
|
334
335
|
className: "flex h-36 items-center px-12",
|
|
335
|
-
children: /* @__PURE__ */ w(
|
|
336
|
+
children: /* @__PURE__ */ w(c, {
|
|
336
337
|
shape: "line",
|
|
337
338
|
className: "w-80"
|
|
338
339
|
})
|
|
@@ -348,15 +349,15 @@ function ie({ density: t, grouped: r }) {
|
|
|
348
349
|
role: "presentation",
|
|
349
350
|
className: i ? "px-0" : "px-24",
|
|
350
351
|
children: /* @__PURE__ */ T("div", {
|
|
351
|
-
className: e("flex items-center gap-12 px-12",
|
|
352
|
+
className: e("flex items-center gap-12 px-12", j.density[t].classes),
|
|
352
353
|
children: [
|
|
353
|
-
/* @__PURE__ */ w(
|
|
354
|
+
/* @__PURE__ */ w(c, {
|
|
354
355
|
shape: "line",
|
|
355
356
|
className: "min-w-0",
|
|
356
357
|
style: { width: `${n}%` }
|
|
357
358
|
}),
|
|
358
359
|
/* @__PURE__ */ w("span", { className: "flex-1" }),
|
|
359
|
-
/* @__PURE__ */ w(
|
|
360
|
+
/* @__PURE__ */ w(c, {
|
|
360
361
|
shape: "line",
|
|
361
362
|
className: "w-64 shrink-0"
|
|
362
363
|
})
|
|
@@ -365,117 +366,117 @@ function ie({ density: t, grouped: r }) {
|
|
|
365
366
|
}, r))]
|
|
366
367
|
});
|
|
367
368
|
}
|
|
368
|
-
var
|
|
369
|
-
let D =
|
|
369
|
+
var oe = /* @__PURE__ */ v(function({ item: i, index: a, depth: c = 0, lastChild: l, idWidth: u, density: f = "default", wrapSubtitle: p = !1, narrow: m = !1, dated: h = !1, active: _, selected: v, selectable: y, selecting: b, onSelect: x, onOpen: ee, onFocus: S, "data-force": C }, E) {
|
|
370
|
+
let D = n(), O = r(), k = g(), A = m && !!(i.meta || i.date), M = (D || A) && !!i.subtitle, P = M && p, F = !!i.disabled, I = i.avatar && /* @__PURE__ */ w("span", {
|
|
370
371
|
className: e("flex shrink-0", F && "opacity-50"),
|
|
371
|
-
children:
|
|
372
|
+
children: i.avatar
|
|
372
373
|
});
|
|
373
374
|
return /* @__PURE__ */ w("div", {
|
|
374
375
|
role: "row",
|
|
375
|
-
"aria-rowindex":
|
|
376
|
-
className: D ? e("px-0",
|
|
376
|
+
"aria-rowindex": a === void 0 ? void 0 : a + 1,
|
|
377
|
+
className: D ? e("px-0", a !== void 0 && a > 0 && "hairline-t") : O ? "px-0" : "px-24",
|
|
377
378
|
children: /* @__PURE__ */ T("div", {
|
|
378
379
|
ref: E,
|
|
379
380
|
role: "gridcell",
|
|
380
|
-
"aria-selected":
|
|
381
|
+
"aria-selected": y ? !!v : void 0,
|
|
381
382
|
"aria-disabled": F || void 0,
|
|
382
|
-
"data-index":
|
|
383
|
+
"data-index": a,
|
|
383
384
|
"data-row": "",
|
|
384
|
-
tabIndex:
|
|
385
|
+
tabIndex: _ === !1 ? -1 : 0,
|
|
385
386
|
onFocus: S,
|
|
386
387
|
onClick: (e) => {
|
|
387
|
-
e.currentTarget.contains(e.target) && !e.target.closest("button, a, [role=checkbox]") && (
|
|
388
|
+
e.currentTarget.contains(e.target) && !e.target.closest("button, a, [role=checkbox]") && (d(e.currentTarget) || (b && y ? x?.() : ee?.()));
|
|
388
389
|
},
|
|
389
390
|
...C ? { "data-force": C } : {},
|
|
390
|
-
className: e("group/row relative flex cursor-pointer items-center gap-12 text-body transition-control focus-ring-inset", D ? "px-20" : "px-12 row-rule",
|
|
391
|
+
className: e("group/row relative flex cursor-pointer items-center gap-12 text-body transition-control focus-ring-inset", D ? "px-20" : "px-12 row-rule", M || A || P ? "min-h-56 py-8" : D && f === "default" ? "h-48" : j.density[f].classes, R(D, !!v), F && "pointer-events-none text-fg-disabled"),
|
|
391
392
|
children: [
|
|
392
|
-
|
|
393
|
-
className: e("flex shrink-0 transition-control select-none",
|
|
393
|
+
y && /* @__PURE__ */ w("span", {
|
|
394
|
+
className: e("flex shrink-0 transition-control select-none", b || v ? "opacity-100" : "opacity-0 group-hover/row:opacity-100 group-focus-visible/row:opacity-100 coarse:opacity-100"),
|
|
394
395
|
onClick: (e) => e.stopPropagation(),
|
|
395
|
-
children: /* @__PURE__ */ w(
|
|
396
|
-
checked: !!
|
|
397
|
-
onToggle: () =>
|
|
398
|
-
"aria-label": k("list.selectItem", "Select {name}", { name:
|
|
396
|
+
children: /* @__PURE__ */ w(te, {
|
|
397
|
+
checked: !!v,
|
|
398
|
+
onToggle: () => x?.(),
|
|
399
|
+
"aria-label": k("list.selectItem", "Select {name}", { name: i.textValue ?? (typeof i.title == "string" ? i.title : i.id) })
|
|
399
400
|
})
|
|
400
401
|
}),
|
|
401
|
-
|
|
402
|
+
c === 1 && /* @__PURE__ */ T("span", {
|
|
402
403
|
"aria-hidden": !0,
|
|
403
404
|
className: "relative -ml-4 h-full w-16 shrink-0 self-stretch",
|
|
404
|
-
children: [/* @__PURE__ */ w("span", { className: e("absolute left-6 w-1 bg-line-strong forced-line",
|
|
405
|
+
children: [/* @__PURE__ */ w("span", { className: e("absolute left-6 w-1 bg-line-strong forced-line", l ? "top-0 h-1/2" : "inset-y-0") }), /* @__PURE__ */ w("span", { className: "absolute top-1/2 left-6 h-1 w-10 bg-line-strong forced-line" })]
|
|
405
406
|
}),
|
|
406
|
-
|
|
407
|
+
i.glyph && /* @__PURE__ */ w("span", {
|
|
407
408
|
className: e("flex size-16 shrink-0 items-center justify-center", F && "opacity-50"),
|
|
408
|
-
children:
|
|
409
|
+
children: i.glyph
|
|
409
410
|
}),
|
|
410
|
-
|
|
411
|
-
className: e("-mr-4 flex shrink-0",
|
|
412
|
-
children:
|
|
411
|
+
i.leading && /* @__PURE__ */ w("span", {
|
|
412
|
+
className: e("-mr-4 flex shrink-0", M && "self-start", F && "opacity-50"),
|
|
413
|
+
children: i.leading
|
|
413
414
|
}),
|
|
414
|
-
|
|
415
|
-
className: e("shrink-0 mono text-small tabular", F ? "text-fg-disabled" :
|
|
416
|
-
children:
|
|
415
|
+
i.displayId && /* @__PURE__ */ w(s, {
|
|
416
|
+
className: e("shrink-0 mono text-small tabular", F ? "text-fg-disabled" : v ? "text-fg-secondary" : "text-fg-tertiary", u && N[u]),
|
|
417
|
+
children: i.displayId
|
|
417
418
|
}),
|
|
418
419
|
/* @__PURE__ */ T("span", {
|
|
419
|
-
className: e("flex min-w-0 flex-1",
|
|
420
|
+
className: e("flex min-w-0 flex-1", A ? "flex-col items-stretch gap-4" : "contents"),
|
|
420
421
|
children: [/* @__PURE__ */ T("span", {
|
|
421
|
-
className: e(
|
|
422
|
+
className: e(A ? e("grid min-w-0 items-start gap-y-2", i.actions || I ? "grid-cols-row-actions gap-x-8" : "grid-cols-1") : "contents"),
|
|
422
423
|
children: [/* @__PURE__ */ T("span", {
|
|
423
|
-
className: e(
|
|
424
|
-
children: [typeof
|
|
424
|
+
className: e(A && M ? "contents" : e("flex min-w-0 flex-1", M ? "flex-col items-start gap-2" : "items-baseline gap-8")),
|
|
425
|
+
children: [typeof i.title == "string" ? /* @__PURE__ */ w(o, {
|
|
425
426
|
truncate: !0,
|
|
426
427
|
weight: "medium",
|
|
427
428
|
tone: F ? "inherit" : "default",
|
|
428
|
-
className: e("min-w-0 shrink",
|
|
429
|
-
children:
|
|
429
|
+
className: e("min-w-0 shrink", M && "max-w-full"),
|
|
430
|
+
children: i.title
|
|
430
431
|
}) : /* @__PURE__ */ w("span", {
|
|
431
|
-
className: e("min-w-0 truncate font-medium", F ? "text-inherit" : "text-fg",
|
|
432
|
-
children:
|
|
433
|
-
}),
|
|
432
|
+
className: e("min-w-0 truncate font-medium", F ? "text-inherit" : "text-fg", M && "max-w-full"),
|
|
433
|
+
children: i.title
|
|
434
|
+
}), i.subtitle && /* @__PURE__ */ w(s, {
|
|
434
435
|
wrap: P,
|
|
435
|
-
className: e("min-w-0", F ? "text-fg-disabled" : "text-fg-secondary",
|
|
436
|
-
children:
|
|
436
|
+
className: e("min-w-0", F ? "text-fg-disabled" : "text-fg-secondary", M ? "max-w-full text-small" : "flex-1 basis-0", A && (i.actions || I) && "col-span-2"),
|
|
437
|
+
children: i.subtitle
|
|
437
438
|
})]
|
|
438
|
-
}),
|
|
439
|
+
}), A && (i.actions || I) && /* @__PURE__ */ T("span", {
|
|
439
440
|
className: "col-start-2 row-start-1 flex h-24 shrink-0 items-center gap-2",
|
|
440
|
-
children: [
|
|
441
|
+
children: [i.actions, I]
|
|
441
442
|
})]
|
|
442
|
-
}),
|
|
443
|
+
}), A && /* @__PURE__ */ T("span", {
|
|
443
444
|
className: "flex min-h-24 min-w-0 flex-wrap items-center gap-x-8",
|
|
444
|
-
children: [
|
|
445
|
+
children: [i.meta && /* @__PURE__ */ w("span", {
|
|
445
446
|
className: e("flex min-w-0 max-w-full items-center gap-6 overflow-hidden", F && "opacity-50"),
|
|
446
|
-
children:
|
|
447
|
-
}),
|
|
448
|
-
className: e("shrink-0 text-small whitespace-nowrap
|
|
449
|
-
children:
|
|
447
|
+
children: i.meta
|
|
448
|
+
}), i.date && /* @__PURE__ */ w("span", {
|
|
449
|
+
className: e("shrink-0 text-small whitespace-nowrap", t(i.date), F ? "text-fg-disabled" : "text-fg-secondary"),
|
|
450
|
+
children: i.date
|
|
450
451
|
})]
|
|
451
452
|
})]
|
|
452
453
|
}),
|
|
453
|
-
!
|
|
454
|
+
!A && (i.meta || i.actions) && /* @__PURE__ */ T("span", {
|
|
454
455
|
className: "relative flex shrink-0 items-center gap-6",
|
|
455
456
|
children: [/* @__PURE__ */ w("span", {
|
|
456
|
-
className: e("flex items-center gap-6",
|
|
457
|
-
children:
|
|
458
|
-
}),
|
|
459
|
-
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",
|
|
460
|
-
children:
|
|
457
|
+
className: e("flex items-center gap-6", i.actions && "transition-control group-hover/row:opacity-0 group-focus-within/row:opacity-0", F && "opacity-50"),
|
|
458
|
+
children: i.meta
|
|
459
|
+
}), i.actions && /* @__PURE__ */ w("span", {
|
|
460
|
+
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", i.meta && "absolute inset-y-0 right-0 coarse:static"),
|
|
461
|
+
children: i.actions
|
|
461
462
|
})]
|
|
462
463
|
}),
|
|
463
|
-
!
|
|
464
|
-
className: e("shrink-0 text-right text-small whitespace-nowrap
|
|
464
|
+
!A && (i.date || h) && /* @__PURE__ */ w("span", {
|
|
465
|
+
className: e("shrink-0 text-right text-small whitespace-nowrap", t(i.date), F ? "text-fg-disabled" : "text-fg-secondary"),
|
|
465
466
|
style: { minWidth: "max(112px, var(--k-list-date, 0px))" },
|
|
466
467
|
children: /* @__PURE__ */ w("span", {
|
|
467
468
|
"data-list-date": "",
|
|
468
|
-
children:
|
|
469
|
+
children: i.date
|
|
469
470
|
})
|
|
470
471
|
}),
|
|
471
|
-
!
|
|
472
|
+
!A && I
|
|
472
473
|
]
|
|
473
474
|
})
|
|
474
475
|
});
|
|
475
476
|
});
|
|
476
|
-
process.env.NODE_ENV !== "production" && (
|
|
477
|
-
var
|
|
478
|
-
let y =
|
|
477
|
+
process.env.NODE_ENV !== "production" && (oe.displayName = "ListRow");
|
|
478
|
+
var se = /* @__PURE__ */ v(function({ title: t, glyph: i, count: o, collapsed: s, onToggle: c, onAdd: l, addLabel: u, actions: d, indent: f, first: p, index: m, active: h, onFocus: _ }, v) {
|
|
479
|
+
let y = n(), b = r(), x = g();
|
|
479
480
|
return /* @__PURE__ */ w("div", {
|
|
480
481
|
ref: v,
|
|
481
482
|
role: "row",
|
|
@@ -490,7 +491,7 @@ var oe = /* @__PURE__ */ _(function({ title: r, glyph: a, count: o, collapsed: s
|
|
|
490
491
|
type: "button",
|
|
491
492
|
"aria-expanded": !s,
|
|
492
493
|
"data-index": m,
|
|
493
|
-
tabIndex:
|
|
494
|
+
tabIndex: h === !1 ? -1 : 0,
|
|
494
495
|
onClick: c,
|
|
495
496
|
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", y ? "hover:bg-fill-2 active:bg-fill-3" : "hover:bg-fill-1 active:bg-fill-2"),
|
|
496
497
|
children: [
|
|
@@ -498,13 +499,13 @@ var oe = /* @__PURE__ */ _(function({ title: r, glyph: a, count: o, collapsed: s
|
|
|
498
499
|
"aria-hidden": !0,
|
|
499
500
|
className: "w-22 shrink-0"
|
|
500
501
|
}),
|
|
501
|
-
|
|
502
|
+
i && /* @__PURE__ */ w("span", {
|
|
502
503
|
className: "flex size-16 items-center justify-center",
|
|
503
|
-
children:
|
|
504
|
+
children: i
|
|
504
505
|
}),
|
|
505
506
|
/* @__PURE__ */ w("span", {
|
|
506
507
|
className: "truncate font-medium text-fg-secondary",
|
|
507
|
-
children:
|
|
508
|
+
children: t
|
|
508
509
|
}),
|
|
509
510
|
o !== void 0 && /* @__PURE__ */ w("span", {
|
|
510
511
|
className: "text-fg-tertiary tabular",
|
|
@@ -528,7 +529,7 @@ var oe = /* @__PURE__ */ _(function({ title: r, glyph: a, count: o, collapsed: s
|
|
|
528
529
|
}),
|
|
529
530
|
l && /* @__PURE__ */ w("span", {
|
|
530
531
|
className: "flex opacity-0 transition-control group-hover/gh:opacity-100 group-focus-within/gh:opacity-100 coarse:opacity-100",
|
|
531
|
-
children: /* @__PURE__ */ w(
|
|
532
|
+
children: /* @__PURE__ */ w(a, {
|
|
532
533
|
variant: "ghost",
|
|
533
534
|
icon: E,
|
|
534
535
|
"aria-label": u ?? x("list.add", "Add"),
|
|
@@ -540,11 +541,11 @@ var oe = /* @__PURE__ */ _(function({ title: r, glyph: a, count: o, collapsed: s
|
|
|
540
541
|
})
|
|
541
542
|
});
|
|
542
543
|
});
|
|
543
|
-
process.env.NODE_ENV !== "production" && (
|
|
544
|
-
var
|
|
545
|
-
let a =
|
|
546
|
-
return
|
|
547
|
-
ref:
|
|
544
|
+
process.env.NODE_ENV !== "production" && (se.displayName = "GroupHeader");
|
|
545
|
+
var ce = /* @__PURE__ */ v(function({ count: e, onClear: t, children: n }, r) {
|
|
546
|
+
let a = p(), o = g();
|
|
547
|
+
return _() ? null : O(/* @__PURE__ */ w("div", {
|
|
548
|
+
ref: r,
|
|
548
549
|
role: "region",
|
|
549
550
|
"aria-label": o("list.selection", "Selection"),
|
|
550
551
|
className: "pointer-events-none fixed right-0 bottom-24 left-0 z-50 flex justify-center px-16",
|
|
@@ -565,7 +566,7 @@ var se = /* @__PURE__ */ _(function({ count: e, onClear: t, children: n }, i) {
|
|
|
565
566
|
onClick: t,
|
|
566
567
|
"aria-label": o("list.clearSelection", "Clear selection"),
|
|
567
568
|
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",
|
|
568
|
-
children: /* @__PURE__ */ w(
|
|
569
|
+
children: /* @__PURE__ */ w(i, {
|
|
569
570
|
icon: D,
|
|
570
571
|
size: "sm"
|
|
571
572
|
})
|
|
@@ -574,21 +575,21 @@ var se = /* @__PURE__ */ _(function({ count: e, onClear: t, children: n }, i) {
|
|
|
574
575
|
})
|
|
575
576
|
}), a ?? document.body);
|
|
576
577
|
});
|
|
577
|
-
process.env.NODE_ENV !== "production" && (
|
|
578
|
-
var z = /* @__PURE__ */
|
|
578
|
+
process.env.NODE_ENV !== "production" && (ce.displayName = "SelectionBar");
|
|
579
|
+
var z = /* @__PURE__ */ v(function({ children: t, onClick: n, icon: r, danger: a }, o) {
|
|
579
580
|
return /* @__PURE__ */ T("button", {
|
|
580
581
|
ref: o,
|
|
581
582
|
type: "button",
|
|
582
583
|
onClick: n,
|
|
583
|
-
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", a ? "text-toast-danger" : "text-toast-fg",
|
|
584
|
-
children: [
|
|
585
|
-
icon:
|
|
584
|
+
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", a ? "text-toast-danger" : "text-toast-fg", r && "pl-10"),
|
|
585
|
+
children: [r && /* @__PURE__ */ w(i, {
|
|
586
|
+
icon: r,
|
|
586
587
|
size: "sm",
|
|
587
588
|
className: a ? void 0 : "text-toast-fg-secondary"
|
|
588
589
|
}), t]
|
|
589
590
|
});
|
|
590
591
|
});
|
|
591
592
|
process.env.NODE_ENV !== "production" && (z.displayName = "SelectionAction");
|
|
592
|
-
export { z as i,
|
|
593
|
+
export { z as i, j as n, L as r, M as t };
|
|
593
594
|
|
|
594
|
-
//# sourceMappingURL=list-
|
|
595
|
+
//# sourceMappingURL=list-0pRnkcpL.js.map
|