@mechane-ai/elements 0.36.0 → 0.38.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.
Files changed (39) hide show
  1. package/README.md +8 -6
  2. package/dist/ai.js +3 -3
  3. package/dist/{chart-theme-Bwr9YSP1.js → categorical-values-BECG-J6R.js} +4 -54
  4. package/dist/{chart-frame-C0UBu4ku.js → chart-frame-CJFnI39T.js} +78 -93
  5. package/dist/{chart-input-Ccr2NJ6J.js → chart-input-DwAobO8Y.js} +2 -2
  6. package/dist/chart-navigation-CBIeNtJq.js +67 -0
  7. package/dist/charts/cartesian.js +631 -618
  8. package/dist/charts/distribution.js +298 -267
  9. package/dist/charts/graph.js +113 -122
  10. package/dist/charts/hierarchy.js +12 -12
  11. package/dist/charts/matrix.js +208 -200
  12. package/dist/charts/timeline.js +2 -2
  13. package/dist/charts.js +3 -3
  14. package/dist/{code-block-DT1TCkTC.js → code-block-aC0Htt4N.js} +33 -32
  15. package/dist/collections.js +597 -351
  16. package/dist/content/code.js +1 -1
  17. package/dist/content/diff.js +1 -1
  18. package/dist/content/markdown.js +1 -1
  19. package/dist/content.js +1 -1
  20. package/dist/elements.css +22 -2
  21. package/dist/feedback.js +1 -1
  22. package/dist/navigation/commands.js +4 -3
  23. package/dist/packages/charts/src/chart-data.d.ts +13 -3
  24. package/dist/packages/charts/src/chart-frame.d.ts +2 -5
  25. package/dist/packages/charts/src/chart-navigation.d.ts +19 -0
  26. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +4 -2
  27. package/dist/packages/collections/src/collection-filters.d.ts +20 -0
  28. package/dist/packages/collections/src/data-table.d.ts +4 -6
  29. package/dist/packages/collections/src/index.d.ts +4 -0
  30. package/dist/packages/collections/src/use-collection-controls.d.ts +30 -0
  31. package/dist/packages/feedback/src/index.d.ts +2 -2
  32. package/dist/packages/feedback/src/notifications.d.ts +35 -0
  33. package/dist/packages/feedback/src/toast.d.ts +1 -1
  34. package/dist/packages/navigation/src/commands/command.d.ts +1 -0
  35. package/dist/plot-width-BQQS-mw9.js +67 -0
  36. package/dist/{src-D9DktxEq.js → src-DWjAoOyd.js} +1 -1
  37. package/dist/{src-DXdsMc_Z.js → src-nkgFDl-g.js} +246 -207
  38. package/package.json +1 -1
  39. package/dist/plot-width--OgdohB5.js +0 -18
@@ -1,20 +1,21 @@
1
- import { T as e, _ as t, c as n, p as r, w as i } from "./src-C-Sx37kz.js";
2
- import { r as a } from "./src-CoFxE4Cj.js";
3
- import { t as o } from "./header-styles-COxCYFZx.js";
4
- import { r as s, t as c } from "./src-d7EAi61b.js";
5
- import { f as l } from "./src-DXdsMc_Z.js";
6
- import { t as u } from "./accessibility-C-aIZ1Yx.js";
7
- import { p as d, x as ee } from "./tokens.stylex-CJbIDPB9.js";
8
- import { t as te } from "./use-scroll-tab-index-Dxpdh4W7.js";
9
- import { mergeProps as f } from "@base-ui/react/merge-props";
10
- import * as p from "@stylexjs/stylex";
11
- import { Children as m, Fragment as ne, useEffect as h, useLayoutEffect as re, useMemo as ie, useRef as g, useState as _, useSyncExternalStore as ae } from "react";
12
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
13
- import { ArrowDown as oe, ArrowUp as se, ArrowUpDown as ce, ChevronLeft as x, ChevronRight as S, Settings2 as C, X as w } from "lucide-react";
14
- import { createColumnHelper as le, tableFeatures as T, useTable as ue } from "@tanstack/react-table";
15
- import { defaultRangeExtractor as de, useVirtualizer as fe } from "@tanstack/react-virtual";
1
+ import { T as e, _ as t, c as n, i as r, p as i, w as a } from "./src-C-Sx37kz.js";
2
+ import { r as o } from "./src-CoFxE4Cj.js";
3
+ import { t as s } from "./header-styles-COxCYFZx.js";
4
+ import { i as c, r as l, t as u } from "./src-d7EAi61b.js";
5
+ import { f as d } from "./src-nkgFDl-g.js";
6
+ import { t as f } from "./accessibility-C-aIZ1Yx.js";
7
+ import { p, x as m } from "./tokens.stylex-CJbIDPB9.js";
8
+ import { t as h } from "./use-scroll-tab-index-Dxpdh4W7.js";
9
+ import { n as g } from "./forms-BQQFas9g.js";
10
+ import { mergeProps as _ } from "@base-ui/react/merge-props";
11
+ import * as v from "@stylexjs/stylex";
12
+ import { Children as y, Fragment as ee, useEffect as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w, useSyncExternalStore as T } from "react";
13
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
14
+ import { ArrowDown as k, ArrowUp as te, ArrowUpDown as ne, ChevronLeft as A, ChevronRight as j, CircleDashed as re, ListFilter as M, Search as N, Settings2 as P, X as ie } from "lucide-react";
15
+ import { createColumnHelper as ae, tableFeatures as oe, useTable as se } from "@tanstack/react-table";
16
+ import { defaultRangeExtractor as ce, useVirtualizer as le } from "@tanstack/react-virtual";
16
17
  // packages/collections/src/collection-controls.tsx
17
- var E = {
18
+ var F = {
18
19
  toolbar: {
19
20
  kOIVth: "x1hnptsi",
20
21
  kMwMTN: "xbixft",
@@ -29,35 +30,35 @@ var E = {
29
30
  $$css: !0
30
31
  }
31
32
  };
32
- function D({ label: e, children: t, actions: n }) {
33
- let r = m.toArray(t).length > 0, i = m.toArray(n).length > 0;
34
- return !r && !i ? null : /* @__PURE__ */ b("div", {
33
+ function I({ label: e, children: t, actions: n }) {
34
+ let r = y.toArray(t).length > 0, i = y.toArray(n).length > 0;
35
+ return !r && !i ? null : /* @__PURE__ */ O("div", {
35
36
  role: "group",
36
37
  "aria-label": e,
37
- ...p.props(o.row, o.blockEnd, E.toolbar),
38
- children: [t, i && /* @__PURE__ */ y("div", {
38
+ ...v.props(s.row, s.blockEnd, F.toolbar),
39
+ children: [t, i && /* @__PURE__ */ D("div", {
39
40
  className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
40
41
  children: n
41
42
  })]
42
43
  });
43
44
  }
44
- function O({ filters: t, onRemove: n, label: r = "Applied filters" }) {
45
- return t.length === 0 ? null : /* @__PURE__ */ y("div", {
45
+ function L({ filters: t, onRemove: n, label: r = "Applied filters" }) {
46
+ return t.length === 0 ? null : /* @__PURE__ */ D("div", {
46
47
  role: "group",
47
48
  "aria-label": r,
48
49
  className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
49
- children: t.map((t) => /* @__PURE__ */ b("span", {
50
+ children: t.map((t) => /* @__PURE__ */ O("span", {
50
51
  className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 xunmzkg x1f9pz31 x992rv9 xyibt8p x1ok0vyi xeuugli x193iq5w xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt x1s928wv x1j6awrg xarstr8 x5hscyn x86avzo x10z0kkz x1k48kgn x2q1x1w",
51
- children: [/* @__PURE__ */ y("span", {
52
+ children: [/* @__PURE__ */ D("span", {
52
53
  title: t.label,
53
54
  className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
54
55
  children: t.label
55
- }), /* @__PURE__ */ y(e, {
56
+ }), /* @__PURE__ */ D(e, {
56
57
  "aria-label": `Remove ${t.label}`,
57
58
  variant: "ghost",
58
59
  onClick: () => n(t.id),
59
- xstyle: E.remove,
60
- children: /* @__PURE__ */ y(w, {
60
+ xstyle: F.remove,
61
+ children: /* @__PURE__ */ D(ie, {
61
62
  size: 14,
62
63
  "aria-hidden": "true"
63
64
  })
@@ -65,29 +66,29 @@ function O({ filters: t, onRemove: n, label: r = "Applied filters" }) {
65
66
  }, t.id))
66
67
  });
67
68
  }
68
- function k({ options: t, onChange: n, onReset: r, label: o = "Display options" }) {
69
- return /* @__PURE__ */ b(s.Root, { children: [/* @__PURE__ */ y(s.Trigger, {
70
- render: /* @__PURE__ */ y(e, {
71
- "aria-label": o,
72
- title: o
69
+ function ue({ options: t, onChange: n, onReset: r, label: i = "Display options" }) {
70
+ return /* @__PURE__ */ O(l.Root, { children: [/* @__PURE__ */ D(l.Trigger, {
71
+ render: /* @__PURE__ */ D(e, {
72
+ "aria-label": i,
73
+ title: i
73
74
  }),
74
- children: /* @__PURE__ */ y(C, {
75
+ children: /* @__PURE__ */ D(P, {
75
76
  size: 14,
76
77
  "aria-hidden": "true"
77
78
  })
78
- }), /* @__PURE__ */ y(s.Portal, { children: /* @__PURE__ */ y(s.Positioner, {
79
+ }), /* @__PURE__ */ D(l.Portal, { children: /* @__PURE__ */ D(l.Positioner, {
79
80
  align: "end",
80
- children: /* @__PURE__ */ b(s.Popup, { children: [/* @__PURE__ */ y(s.Title, { children: "Display" }), /* @__PURE__ */ b("div", {
81
+ children: /* @__PURE__ */ O(l.Popup, { children: [/* @__PURE__ */ D(l.Title, { children: "Display" }), /* @__PURE__ */ O("div", {
81
82
  className: "xrvj5dj x1n8ia3y xfb3i0g",
82
- children: [t.map((e) => /* @__PURE__ */ b("label", {
83
+ children: [t.map((e) => /* @__PURE__ */ O("label", {
83
84
  className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
84
- children: [/* @__PURE__ */ y(a.Root, {
85
+ children: [/* @__PURE__ */ D(o.Root, {
85
86
  checked: e.isChecked,
86
87
  onCheckedChange: (t) => n(e.id, t),
87
88
  disabled: e.isRequired,
88
- children: /* @__PURE__ */ y(a.Indicator, {})
89
+ children: /* @__PURE__ */ D(o.Indicator, {})
89
90
  }), e.label]
90
- }, e.id)), r !== void 0 && /* @__PURE__ */ y(i, {
91
+ }, e.id)), r !== void 0 && /* @__PURE__ */ D(a, {
91
92
  type: "button",
92
93
  variant: "ghost",
93
94
  onClick: r,
@@ -96,25 +97,25 @@ function k({ options: t, onChange: n, onReset: r, label: o = "Display options" }
96
97
  })] })
97
98
  }) })] });
98
99
  }
99
- function pe({ description: e, previous: t, next: r }) {
100
- return /* @__PURE__ */ b("nav", {
100
+ function de({ description: e, previous: t, next: r }) {
101
+ return /* @__PURE__ */ O("nav", {
101
102
  "aria-label": "Pagination",
102
103
  className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
103
- children: [/* @__PURE__ */ y(n, { children: e }), /* @__PURE__ */ b("div", {
104
+ children: [/* @__PURE__ */ D(n, { children: e }), /* @__PURE__ */ O("div", {
104
105
  className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
105
- children: [/* @__PURE__ */ b(i, {
106
+ children: [/* @__PURE__ */ O(a, {
106
107
  variant: "outline",
107
108
  disabled: t.disabled,
108
109
  onClick: t.onClick,
109
- children: [/* @__PURE__ */ y(x, {
110
+ children: [/* @__PURE__ */ D(A, {
110
111
  size: 16,
111
112
  "aria-hidden": "true"
112
113
  }), "Previous"]
113
- }), /* @__PURE__ */ b(i, {
114
+ }), /* @__PURE__ */ O(a, {
114
115
  variant: "outline",
115
116
  disabled: r.disabled,
116
117
  onClick: r.onClick,
117
- children: ["Next", /* @__PURE__ */ y(S, {
118
+ children: ["Next", /* @__PURE__ */ D(j, {
118
119
  size: 16,
119
120
  "aria-hidden": "true"
120
121
  })]
@@ -123,8 +124,8 @@ function pe({ description: e, previous: t, next: r }) {
123
124
  });
124
125
  }
125
126
  // packages/collections/src/use-end-reached.ts
126
- function me({ end: e, viewport: t, onEndReached: n, content: r }) {
127
- h(() => {
127
+ function fe({ end: e, viewport: t, onEndReached: n, content: r }) {
128
+ b(() => {
128
129
  if (n === void 0 || e.current === null) return;
129
130
  let r = new IntersectionObserver((e) => {
130
131
  e.some((e) => e.isIntersecting) && n();
@@ -138,11 +139,11 @@ function me({ end: e, viewport: t, onEndReached: n, content: r }) {
138
139
  ]);
139
140
  }
140
141
  // packages/collections/src/data-table.tsx
141
- var he = T({}), ge = 76, A = d.compactTable.slice(7), _e = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), j = {
142
+ var pe = oe({}), me = 76, R = p.compactTable.slice(7), he = /* @__PURE__ */ new Map([["ArrowUp", -1], ["ArrowDown", 1]]), z = {
142
143
  kmVPX3: "x1717udv",
143
144
  kMzoRj: "xc342km",
144
145
  $$css: !0
145
- }, M = {
146
+ }, B = {
146
147
  frame: {
147
148
  k7Eaqz: "xeuugli",
148
149
  kMv6JI: "x1hz01jw",
@@ -266,14 +267,14 @@ var he = T({}), ge = 76, A = d.compactTable.slice(7), _e = /* @__PURE__ */ new M
266
267
  $$css: !0
267
268
  },
268
269
  spacer: (e) => [
269
- j,
270
+ z,
270
271
  {
271
272
  kZKoxP: e == null ? e : "x16ye13r",
272
273
  $$css: !0
273
274
  },
274
275
  { "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
275
276
  ]
276
- }, N = {
277
+ }, V = {
277
278
  primary: {
278
279
  minimumWidth: 240,
279
280
  isFlexible: !0,
@@ -304,183 +305,159 @@ var he = T({}), ge = 76, A = d.compactTable.slice(7), _e = /* @__PURE__ */ new M
304
305
  isFlexible: !1,
305
306
  shouldTruncate: !1
306
307
  }
308
+ }, ge = {
309
+ fixed: B.content,
310
+ content: B.contentCell
311
+ }, _e = {
312
+ primary: B.start,
313
+ text: B.start,
314
+ status: B.start,
315
+ number: B.end,
316
+ timestamp: B.end,
317
+ actions: B.end
307
318
  }, ve = {
308
- fixed: M.content,
309
- content: M.contentCell
310
- }, P = {
311
- primary: M.start,
312
- text: M.start,
313
- status: M.start,
314
- number: M.end,
315
- timestamp: M.end,
316
- actions: M.end
319
+ content: B.content,
320
+ fill: B.fillFrame
317
321
  }, ye = {
318
- content: M.content,
319
- fill: M.fillFrame
320
- }, be = {
321
- content: M.content,
322
- fill: M.fillViewport
322
+ content: B.content,
323
+ fill: B.fillViewport
323
324
  };
324
- function xe(e) {
325
+ function be(e) {
325
326
  return e.map((e) => {
326
- let t = N[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
327
+ let t = V[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
327
328
  return {
328
329
  ...e,
329
330
  ...n === void 0 ? {} : { width: n }
330
331
  };
331
332
  });
332
333
  }
333
- function Se(e, t = 0) {
334
+ function xe(e, t = 0) {
334
335
  return {
335
- minimumWidth: e.reduce((e, t) => e + (t.width ?? N[t.role].minimumWidth), t),
336
- compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? N[t.role].minimumWidth), t)
336
+ minimumWidth: e.reduce((e, t) => e + (t.width ?? V[t.role].minimumWidth), t),
337
+ compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? V[t.role].minimumWidth), t)
337
338
  };
338
339
  }
339
- function Ce(e) {
340
- let t = globalThis.matchMedia(A);
340
+ function Se(e) {
341
+ let t = globalThis.matchMedia(R);
341
342
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
342
343
  }
343
- function we() {
344
- return globalThis.matchMedia(A).matches;
344
+ function Ce() {
345
+ return globalThis.matchMedia(R).matches;
345
346
  }
346
- function Te({ columns: e, canSelect: t = !1 }) {
347
- return /* @__PURE__ */ b("colgroup", { children: [t && /* @__PURE__ */ y("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ y("col", { ...p.props(e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary) }, e.id))] });
347
+ function we({ columns: e, canSelect: t = !1 }) {
348
+ return /* @__PURE__ */ O("colgroup", { children: [t && /* @__PURE__ */ D("col", { className: "x1d7z9mz xeuugli x1dc62k6" }), e.map((e) => /* @__PURE__ */ D("col", { ...v.props(e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary) }, e.id))] });
348
349
  }
349
- function F({ columns: e, sizing: t = "content", rowSizing: n = "fixed", hideHeaders: r = !1 }) {
350
- let i = xe(e), { minimumWidth: a, compactWidth: o } = Se(i);
351
- return /* @__PURE__ */ y("div", {
350
+ function H({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
351
+ let i = typeof r.window?.height == "string" ? r.window.height : "content", a = Array.from({ length: t }, (e, t) => ({ id: String(t) })), o = e.map(({ placeholder: e, ...t }) => ({
352
+ ...t,
353
+ cell: () => e ?? /* @__PURE__ */ D(d, { width: "60%" })
354
+ }));
355
+ return /* @__PURE__ */ D("div", {
352
356
  "aria-hidden": !0,
353
357
  inert: !0,
354
- ...p.props(M.frame, ye[t], M.placeholder),
355
- children: /* @__PURE__ */ y("div", {
356
- ...p.props(M.viewport, be[t]),
357
- children: /* @__PURE__ */ b("table", {
358
- ...p.props(M.table, M.fixed, M.minimumWidth(a, o)),
359
- children: [
360
- /* @__PURE__ */ y(Te, { columns: i }),
361
- /* @__PURE__ */ y("thead", {
362
- ...p.props(r && u.hidden),
363
- children: /* @__PURE__ */ y("tr", { children: i.map((e) => /* @__PURE__ */ y("th", {
364
- ...p.props(M.header, P[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
365
- children: /* @__PURE__ */ y("span", {
366
- className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
367
- children: e.label
368
- })
369
- }, e.id)) })
370
- }),
371
- /* @__PURE__ */ y("tbody", { children: [
372
- "first",
373
- "second",
374
- "third"
375
- ].map((e) => /* @__PURE__ */ y("tr", {
376
- className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6",
377
- children: i.map((e) => /* @__PURE__ */ y("td", {
378
- ...p.props(M.cell, ve[n], P[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
379
- children: /* @__PURE__ */ y(B, {
380
- role: e.role,
381
- isFixed: n === "fixed",
382
- shouldTruncate: void 0,
383
- children: e.placeholder ?? /* @__PURE__ */ y(l, { width: "60%" })
384
- })
385
- }, e.id))
386
- }, e)) })
387
- ]
388
- })
358
+ ...v.props(ve[i], B.placeholder),
359
+ children: /* @__PURE__ */ D(K, {
360
+ ...r,
361
+ hideCaption: n,
362
+ rows: a,
363
+ getRowId: (e) => e.id,
364
+ columns: o,
365
+ empty: null
389
366
  })
390
367
  });
391
368
  }
392
- function I({ children: e, leading: t, isDecorative: n = !1 }) {
393
- let r = m.toArray(t).length > 0;
394
- return /* @__PURE__ */ b("span", {
369
+ function U({ children: e, leading: t, isDecorative: n = !1 }) {
370
+ let r = y.toArray(t).length > 0;
371
+ return /* @__PURE__ */ O("span", {
395
372
  "aria-hidden": n || void 0,
396
373
  inert: n || void 0,
397
374
  className: "x78zum5 x6s0dn4 x1n8ia3y xeuugli xh8yej3 x1hz01jw xtqrqnz x1778rvt xj57cvi",
398
- children: [r && /* @__PURE__ */ y("span", {
375
+ children: [r && /* @__PURE__ */ D("span", {
399
376
  "aria-hidden": !0,
400
377
  className: "x3nfvp2 x6s0dn4 x2lah0s",
401
378
  children: t
402
- }), /* @__PURE__ */ y("span", {
379
+ }), /* @__PURE__ */ D("span", {
403
380
  className: "x98rzlu xeuugli",
404
381
  children: e
405
382
  })]
406
383
  });
407
384
  }
408
- function L({ children: e, secondary: t, leading: n, trailing: r }) {
409
- let i = m.toArray(r).length > 0;
410
- return /* @__PURE__ */ b(I, {
385
+ function W({ children: e, secondary: t, leading: n, trailing: r }) {
386
+ let i = y.toArray(r).length > 0;
387
+ return /* @__PURE__ */ O(U, {
411
388
  leading: n,
412
- children: [/* @__PURE__ */ b("span", {
389
+ children: [/* @__PURE__ */ O("span", {
413
390
  className: "x78zum5 x6s0dn4 x1hnptsi xeuugli",
414
- children: [/* @__PURE__ */ y("span", {
391
+ children: [/* @__PURE__ */ D("span", {
415
392
  title: e,
416
393
  className: "x1lliihq xeuugli x14atkfc xs83m0k xb3r6kr xuxw1ft xlyipyv",
417
394
  children: e
418
- }), i && /* @__PURE__ */ y("span", {
395
+ }), i && /* @__PURE__ */ D("span", {
419
396
  className: "x3nfvp2 x6s0dn4 x2lah0s",
420
397
  children: r
421
398
  })]
422
- }), t !== void 0 && /* @__PURE__ */ y("span", {
399
+ }), t !== void 0 && /* @__PURE__ */ D("span", {
423
400
  title: t,
424
401
  className: "x1lliihq xeuugli xh8yej3 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
425
402
  children: t
426
403
  })]
427
404
  });
428
405
  }
429
- function R({ leading: e, isSecondary: t = !1 }) {
430
- return /* @__PURE__ */ b(I, {
406
+ function G({ leading: e, isSecondary: t = !1 }) {
407
+ return /* @__PURE__ */ O(U, {
431
408
  leading: e,
432
409
  isDecorative: !0,
433
- children: [/* @__PURE__ */ y("span", {
410
+ children: [/* @__PURE__ */ D("span", {
434
411
  className: "x1lliihq xeuugli xh8yej3",
435
- children: /* @__PURE__ */ y(l, { width: "70%" })
436
- }), t && /* @__PURE__ */ y("span", {
412
+ children: /* @__PURE__ */ D(d, { width: "70%" })
413
+ }), t && /* @__PURE__ */ D("span", {
437
414
  className: "x1lliihq xeuugli xh8yej3 x153jb6y xy8obcc xas2l8k",
438
- children: /* @__PURE__ */ y(l, { width: "45%" })
415
+ children: /* @__PURE__ */ D(d, { width: "45%" })
439
416
  })]
440
417
  });
441
418
  }
442
- function z({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, onSortChange: s, selectedIds: c, onSelectionChange: l, selectionLabel: d, rowAction: f, activeRowId: m, focusRowId: v, onRowHighlightChange: x, hideCaption: S = !1, hideHeaders: C = !1, rowSizing: w = "fixed", window: T, endContent: E, onEndReached: D, footer: O }) {
443
- let k = ie(() => xe(t), [t]), pe = ae(Ce, we, () => !1), A = ie(() => {
444
- let e = le();
445
- return e.columns(k.map((t) => e.display({
419
+ function K({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: s, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId: p, focusRowId: g, onRowHighlightChange: _, hideCaption: y = !1, hideHeaders: E = !1, rowSizing: A = "fixed", window: j, endContent: re, onEndReached: M, footer: N }) {
420
+ let P = S(() => be(t), [t]), ie = T(Se, Ce, () => !1), oe = S(() => {
421
+ let e = ae();
422
+ return e.columns(P.map((t) => e.display({
446
423
  id: t.id,
447
424
  header: t.label
448
425
  })));
449
- }, [k]), j = ue({
450
- features: he,
451
- columns: A,
426
+ }, [P]), F = se({
427
+ features: pe,
428
+ columns: oe,
452
429
  data: e,
453
430
  getRowId: n
454
- }), N = te(), F = N.viewport, I = g(null), L = g(null), R = g(null), [z, V] = _(0), [H, U] = _(), [W, G] = _(), K = g(void 0), q = g(void 0), J = g(void 0), Y = e.findIndex((e) => n(e) === H), X = k.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), De = X === -1 ? k.findIndex((e) => e.isSecondary !== !0) : X, Oe = typeof T?.height == "string" ? T.height : "content", ke = new Set(e.map(n)), Ae = H !== void 0 && ke.has(H) ? H : void 0;
455
- H !== void 0 && Ae === void 0 && U(void 0), me({
456
- end: I,
457
- onEndReached: T === void 0 ? D : void 0,
431
+ }), I = h(), L = I.viewport, ue = C(null), de = C(null), R = C(null), [z, V] = w(0), [H, U] = w(), [W, G] = w(), K = C(void 0), q = C(void 0), J = C(void 0), Y = e.findIndex((e) => n(e) === H), De = P.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Oe = De === -1 ? P.findIndex((e) => e.isSecondary !== !0) : De, ke = typeof j?.height == "string" ? j.height : "content", Ae = new Set(e.map(n)), X = H !== void 0 && Ae.has(H) ? H : void 0;
432
+ H !== void 0 && X === void 0 && U(void 0), fe({
433
+ end: ue,
434
+ onEndReached: j === void 0 ? M : void 0,
458
435
  content: e.length
459
- }), h(() => {
460
- let e = L.current, t = R.current;
461
- if (T === void 0 || e === null || t === null) return;
436
+ }), b(() => {
437
+ let e = de.current, t = R.current;
438
+ if (j === void 0 || e === null || t === null) return;
462
439
  let n = new ResizeObserver(() => V(e.offsetHeight + t.offsetHeight));
463
440
  return n.observe(e), n.observe(t), () => n.disconnect();
464
441
  }, [
465
- T,
466
- S,
467
- C
442
+ j,
443
+ y,
444
+ E
468
445
  ]);
469
- let Z = fe({
446
+ let Z = le({
470
447
  count: e.length,
471
- enabled: T !== void 0,
472
- getScrollElement: () => F.current,
448
+ enabled: j !== void 0,
449
+ getScrollElement: () => L.current,
473
450
  getItemKey: (t) => {
474
451
  let r = e[t];
475
452
  if (r === void 0) throw RangeError("The virtual row is outside the supplied table page.");
476
453
  return n(r);
477
454
  },
478
- estimateSize: () => w === "fixed" ? ee.rowHeight : T?.estimatedRowHeight ?? ee.rowHeight,
455
+ estimateSize: () => A === "fixed" ? m.rowHeight : j?.estimatedRowHeight ?? m.rowHeight,
479
456
  scrollMargin: z,
480
457
  scrollPaddingStart: z,
481
458
  overscan: 6,
482
459
  rangeExtractor: (t) => {
483
- let n = de(t);
460
+ let n = ce(t);
484
461
  return Y === -1 ? n : [.../* @__PURE__ */ new Set([
485
462
  ...n,
486
463
  Y - 1,
@@ -488,121 +465,121 @@ function z({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
488
465
  Y + 1
489
466
  ])].filter((t) => t >= 0 && t < e.length).toSorted((e, t) => e - t);
490
467
  }
491
- }), Q = T === void 0 ? j.getRowModel().rows.map((e, t) => ({
468
+ }), je = j === void 0 ? F.getRowModel().rows.map((e, t) => ({
492
469
  row: e,
493
470
  index: t,
494
471
  spacerHeight: 0
495
472
  })) : Z.getVirtualItems().flatMap((e, t, n) => {
496
- let r = j.getRowModel().rows[e.index];
473
+ let r = F.getRowModel().rows[e.index];
497
474
  return r === void 0 ? [] : [{
498
475
  row: r,
499
476
  index: e.index,
500
477
  spacerHeight: e.start - (n[t - 1]?.end ?? z)
501
478
  }];
502
- }), je = Q.some(({ row: e }) => e.id === W) ? W : void 0, $ = je ?? Ae;
503
- W !== void 0 && je === void 0 && G(void 0), h(() => {
504
- if (x === void 0) {
479
+ }), Me = je.some(({ row: e }) => e.id === W) ? W : void 0, Q = Me ?? X;
480
+ W !== void 0 && Me === void 0 && G(void 0), b(() => {
481
+ if (_ === void 0) {
505
482
  K.current = void 0;
506
483
  return;
507
484
  }
508
- if (K.current !== void 0 && K.current.id === $) return;
485
+ if (K.current !== void 0 && K.current.id === Q) return;
509
486
  let e = { isCurrent: !0 };
510
487
  return queueMicrotask(() => {
511
- e.isCurrent && (K.current = { id: $ }, x($));
488
+ e.isCurrent && (K.current = { id: Q }, _(Q));
512
489
  }), () => {
513
490
  e.isCurrent = !1;
514
491
  };
515
- }, [$, x]);
516
- let Me = Q.some(({ row: e }) => e.id === v);
517
- re(() => {
518
- if (v === void 0) {
492
+ }, [Q, _]);
493
+ let Ne = je.some(({ row: e }) => e.id === g);
494
+ x(() => {
495
+ if (g === void 0) {
519
496
  J.current = void 0;
520
497
  return;
521
498
  }
522
- if (J.current === v) return;
523
- if (!Me && T !== void 0) {
524
- let t = e.findIndex((e) => n(e) === v);
499
+ if (J.current === g) return;
500
+ if (!Ne && j !== void 0) {
501
+ let t = e.findIndex((e) => n(e) === g);
525
502
  t !== -1 && Z.scrollToIndex(t, { align: "auto" });
526
503
  return;
527
504
  }
528
- let t = F.current?.querySelector(`[data-row-id="${CSS.escape(v)}"] [data-row-action]`);
505
+ let t = L.current?.querySelector(`[data-row-id="${CSS.escape(g)}"] [data-row-action]`);
529
506
  if (t == null || t.matches(":disabled")) return;
530
507
  let r = requestAnimationFrame(() => {
531
- t.focus({ preventScroll: !0 }), document.activeElement === t && (J.current = v);
508
+ t.focus({ preventScroll: !0 }), document.activeElement === t && (J.current = g);
532
509
  });
533
510
  return () => cancelAnimationFrame(r);
534
511
  }, [
535
512
  e,
536
- v,
537
- f?.disabled,
538
- Me,
539
- T,
513
+ g,
514
+ d?.disabled,
515
+ Ne,
516
+ j,
540
517
  n,
541
- F,
518
+ L,
542
519
  Z
543
520
  ]);
544
- let Ne = T !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
545
- h(() => {
546
- Ne && D?.();
521
+ let Pe = j !== void 0 && (e.length === 0 || Z.range?.endIndex === e.length - 1);
522
+ b(() => {
523
+ Pe && M?.();
547
524
  }, [
548
- Ne,
549
- D,
525
+ Pe,
526
+ M,
550
527
  e.length
551
- ]), re(() => {
528
+ ]), x(() => {
552
529
  if (q.current === void 0) return;
553
- let e = Array.from(F.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === q.current)?.querySelector("[data-row-action]");
554
- e != null && (e.focus({ preventScroll: T !== void 0 }), q.current = void 0);
530
+ let e = Array.from(L.current?.querySelectorAll("[data-row-id]") ?? []).find((e) => e.dataset.rowId === q.current)?.querySelector("[data-row-action]");
531
+ e != null && (e.focus({ preventScroll: j !== void 0 }), q.current = void 0);
555
532
  });
556
- function Pe(t, r) {
533
+ function Fe(t, r) {
557
534
  let i = t.metaKey || t.ctrlKey, a = t.altKey || t.shiftKey;
558
535
  if (i || a) return;
559
- let o = _e.get(t.key);
536
+ let o = he.get(t.key);
560
537
  if (o === void 0) return;
561
538
  t.preventDefault();
562
539
  let s = r + o, c = e[s];
563
- c !== void 0 && (q.current = n(c), U(q.current), T !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
540
+ c !== void 0 && (q.current = n(c), U(q.current), j !== void 0 && Z.scrollToIndex(s, { align: "auto" }));
564
541
  }
565
- let Fe = k.filter((e) => !pe || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Ie = c === void 0 ? 0 : ge, Le = O != null && typeof O != "boolean", { minimumWidth: Re, compactWidth: ze } = Se(k, Ie), Be = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? z) + z;
566
- return /* @__PURE__ */ b("div", {
567
- ...p.props(M.frame, ye[Oe]),
568
- children: [/* @__PURE__ */ b("div", {
569
- ref: N.ref,
542
+ let Ie = P.filter((e) => !ie || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), $ = c === void 0 ? 0 : me, Le = N != null && typeof N != "boolean", { minimumWidth: Re, compactWidth: ze } = xe(P, $), Be = Z.getTotalSize() - (Z.getVirtualItems().at(-1)?.end ?? z) + z;
543
+ return /* @__PURE__ */ O("div", {
544
+ ...v.props(B.frame, ve[ke]),
545
+ children: [/* @__PURE__ */ O("div", {
546
+ ref: I.ref,
570
547
  "data-table-viewport": !0,
571
548
  role: "region",
572
549
  "aria-label": r,
573
- tabIndex: N.tabIndex,
574
- ...p.props(M.viewport, be[Oe], typeof T?.height == "number" && M.virtual(T.height)),
575
- children: [/* @__PURE__ */ b("table", {
576
- "aria-rowcount": T === void 0 ? void 0 : Math.max(1, e.length) + 1,
577
- ...p.props(M.table, M.fixed, M.minimumWidth(Re, ze)),
550
+ tabIndex: I.tabIndex,
551
+ ...v.props(B.viewport, ye[ke], typeof j?.height == "number" && B.virtual(j.height)),
552
+ children: [/* @__PURE__ */ O("table", {
553
+ "aria-rowcount": j === void 0 ? void 0 : Math.max(1, e.length) + 1,
554
+ ...v.props(B.table, B.fixed, B.minimumWidth(Re, ze)),
578
555
  children: [
579
- /* @__PURE__ */ y("caption", {
580
- ref: L,
581
- ...p.props(M.caption, S && u.hidden),
556
+ /* @__PURE__ */ D("caption", {
557
+ ref: de,
558
+ ...v.props(B.caption, y && f.hidden),
582
559
  children: r
583
560
  }),
584
- /* @__PURE__ */ y(Te, {
585
- columns: k,
561
+ /* @__PURE__ */ D(we, {
562
+ columns: P,
586
563
  canSelect: c !== void 0
587
564
  }),
588
- /* @__PURE__ */ y("thead", {
565
+ /* @__PURE__ */ D("thead", {
589
566
  ref: R,
590
- ...p.props(C && u.hidden),
591
- children: /* @__PURE__ */ b("tr", { children: [c !== void 0 && /* @__PURE__ */ y("th", {
567
+ ...v.props(E && f.hidden),
568
+ children: /* @__PURE__ */ O("tr", { children: [c !== void 0 && /* @__PURE__ */ D("th", {
592
569
  scope: "col",
593
570
  className: "x9f619 x7wzq59 x13vifvy x11ru5tl x1krvmzm xt970qd xso031l x1q0q8m5 x1qndepd x153jb6y xpvm0e4 xj57cvi xy8obcc xas2l8k xuxw1ft x1d7z9mz xeuugli x1dc62k6",
594
- children: /* @__PURE__ */ y("span", {
595
- ...p.props(u.hidden),
571
+ children: /* @__PURE__ */ D("span", {
572
+ ...v.props(f.hidden),
596
573
  children: "Select"
597
574
  })
598
- }), k.map((e) => {
599
- let t = o?.columnId === e.id ? o.direction : void 0;
600
- return /* @__PURE__ */ y("th", {
575
+ }), P.map((e) => {
576
+ let t = a?.columnId === e.id ? a.direction : void 0;
577
+ return /* @__PURE__ */ D("th", {
601
578
  scope: "col",
602
579
  title: e.label,
603
580
  "aria-sort": t,
604
- ...p.props(M.header, P[e.role], e.width !== void 0 && M.width(e.width), e.isSecondary === !0 && M.secondary),
605
- children: e.canSort === !0 && s !== void 0 ? /* @__PURE__ */ b("button", {
581
+ ...v.props(B.header, _e[e.role], e.width !== void 0 && B.width(e.width), e.isSecondary === !0 && B.secondary),
582
+ children: e.canSort === !0 && s !== void 0 ? /* @__PURE__ */ O("button", {
606
583
  type: "button",
607
584
  className: "x3nfvp2 x6s0dn4 x1hnptsi x193iq5w xeuugli x2zujid x17oiadl x1717udv xc342km x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1ypdohk xp9636p x1s9zmfe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
608
585
  onClick: () => {
@@ -614,39 +591,39 @@ function z({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
614
591
  direction: "ascending"
615
592
  });
616
593
  },
617
- children: [/* @__PURE__ */ y("span", {
594
+ children: [/* @__PURE__ */ D("span", {
618
595
  className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
619
596
  children: e.label
620
- }), y(t === "ascending" ? se : t === "descending" ? oe : ce, {
597
+ }), D(t === "ascending" ? te : t === "descending" ? k : ne, {
621
598
  size: 14,
622
599
  "aria-hidden": "true",
623
600
  className: "x2lah0s"
624
601
  })]
625
- }) : /* @__PURE__ */ y("span", {
602
+ }) : /* @__PURE__ */ D("span", {
626
603
  className: "x1lliihq xeuugli xb3r6kr xlyipyv xuxw1ft",
627
604
  children: e.label
628
605
  })
629
606
  }, e.id);
630
607
  })] })
631
608
  }),
632
- /* @__PURE__ */ b("tbody", {
609
+ /* @__PURE__ */ O("tbody", {
633
610
  onPointerLeave: () => G(void 0),
634
611
  onKeyDownCapture: () => G(void 0),
635
612
  onBlur: (e) => {
636
613
  e.currentTarget.contains(e.relatedTarget) || U(void 0);
637
614
  },
638
615
  children: [
639
- Q.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ b(ne, { children: [n > 0 && /* @__PURE__ */ y("tr", {
616
+ je.map(({ row: e, index: t, spacerHeight: n }) => /* @__PURE__ */ O(ee, { children: [n > 0 && /* @__PURE__ */ D("tr", {
640
617
  "aria-hidden": "true",
641
- children: /* @__PURE__ */ y("td", {
642
- colSpan: Fe,
643
- ...p.props(M.spacer(n))
618
+ children: /* @__PURE__ */ D("td", {
619
+ colSpan: Ie,
620
+ ...v.props(B.spacer(n))
644
621
  })
645
- }), /* @__PURE__ */ b("tr", {
622
+ }), /* @__PURE__ */ O("tr", {
646
623
  "data-index": t,
647
624
  "data-row-id": e.id,
648
- "aria-rowindex": T === void 0 ? void 0 : t + 2,
649
- ref: T === void 0 || w === "fixed" ? void 0 : Z.measureElement,
625
+ "aria-rowindex": j === void 0 ? void 0 : t + 2,
626
+ ref: j === void 0 || A === "fixed" ? void 0 : Z.measureElement,
650
627
  onPointerMove: (t) => {
651
628
  t.pointerType === "mouse" && G(e.id);
652
629
  },
@@ -667,50 +644,50 @@ function z({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
667
644
  2: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor" },
668
645
  1: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1r8u7ye" },
669
646
  3: { className: "x1n2onr6 xc8icb0 x1wtzb06 xso031l x1q0q8m5 x1qndepd x19k386i x1t1lzn6 x1ypdohk x1ecmtor x1r8u7ye" }
670
- }[(f !== void 0 && f.disabled !== !0) << 1 | (c?.has(e.id) === !0 || m === e.id)],
671
- children: [c !== void 0 && /* @__PURE__ */ y("td", {
647
+ }[(d !== void 0 && d.disabled !== !0) << 1 | (c?.has(e.id) === !0 || p === e.id)],
648
+ children: [c !== void 0 && /* @__PURE__ */ D("td", {
672
649
  className: "x9f619 xt970qd xxymvpz xj0a0fe x1d7z9mz xeuugli x1dc62k6 x1n2onr6 x1vjfegm",
673
- children: /* @__PURE__ */ y(a.Root, {
674
- "aria-label": d(e.original),
650
+ children: /* @__PURE__ */ D(o.Root, {
651
+ "aria-label": u(e.original),
675
652
  checked: c.has(e.id),
676
653
  onCheckedChange: (t) => {
677
654
  let n = new Set(c);
678
655
  t ? n.add(e.id) : n.delete(e.id), l(n);
679
656
  },
680
- children: /* @__PURE__ */ y(a.Indicator, {})
657
+ children: /* @__PURE__ */ D(o.Indicator, {})
681
658
  })
682
- }), k.map((n, r) => /* @__PURE__ */ y("td", {
683
- ...p.props(M.cell, ve[w], P[n.role], n.width !== void 0 && M.width(n.width), n.isSecondary === !0 && M.secondary),
684
- children: f !== void 0 && r === De ? /* @__PURE__ */ y(Ee, {
659
+ }), P.map((n, r) => /* @__PURE__ */ D("td", {
660
+ ...v.props(B.cell, ge[A], _e[n.role], n.width !== void 0 && B.width(n.width), n.isSecondary === !0 && B.secondary),
661
+ children: d !== void 0 && r === Oe ? /* @__PURE__ */ D(Ee, {
685
662
  row: e.original,
686
- action: f,
687
- isActive: m === e.id,
688
- onKeyDown: (e) => Pe(e, t),
689
- children: /* @__PURE__ */ y(B, {
663
+ action: d,
664
+ isActive: p === e.id,
665
+ onKeyDown: (e) => Fe(e, t),
666
+ children: /* @__PURE__ */ D(Te, {
690
667
  role: n.role,
691
- isFixed: w === "fixed",
668
+ isFixed: A === "fixed",
692
669
  shouldTruncate: n.shouldTruncate,
693
670
  children: n.cell(e.original)
694
671
  })
695
- }) : /* @__PURE__ */ y(B, {
672
+ }) : /* @__PURE__ */ D(Te, {
696
673
  role: n.role,
697
- isFixed: w === "fixed",
674
+ isFixed: A === "fixed",
698
675
  shouldTruncate: n.shouldTruncate,
699
676
  children: n.cell(e.original)
700
677
  })
701
678
  }, n.id))]
702
679
  })] }, e.id)),
703
- T !== void 0 && Be > 0 && /* @__PURE__ */ y("tr", {
680
+ j !== void 0 && Be > 0 && /* @__PURE__ */ D("tr", {
704
681
  "aria-hidden": "true",
705
- children: /* @__PURE__ */ y("td", {
706
- colSpan: Fe,
707
- ...p.props(M.spacer(Be))
682
+ children: /* @__PURE__ */ D("td", {
683
+ colSpan: Ie,
684
+ ...v.props(B.spacer(Be))
708
685
  })
709
686
  }),
710
- e.length === 0 && /* @__PURE__ */ y("tr", { children: /* @__PURE__ */ y("td", {
711
- colSpan: Fe,
687
+ e.length === 0 && /* @__PURE__ */ D("tr", { children: /* @__PURE__ */ D("td", {
688
+ colSpan: Ie,
712
689
  className: "x1717udv",
713
- children: /* @__PURE__ */ y("div", {
690
+ children: /* @__PURE__ */ D("div", {
714
691
  className: "x9f619 x7wzq59 x1o0tod xzfn7dr x193iq5w x1ttojsm x2b8uid xeaf4i8 xj0a0fe x153jb6y",
715
692
  children: i
716
693
  })
@@ -718,28 +695,28 @@ function z({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: o, on
718
695
  ]
719
696
  })
720
697
  ]
721
- }), /* @__PURE__ */ y("div", {
722
- ref: I,
698
+ }), /* @__PURE__ */ D("div", {
699
+ ref: ue,
723
700
  ...{
724
701
  0: {},
725
702
  1: { className: "xid9utz xg7ukam x153jb6y xy8obcc xas2l8k x15x95ik x1az1eml" }
726
- }[E !== void 0 | 0],
727
- children: E
703
+ }[re !== void 0 | 0],
704
+ children: re
728
705
  })]
729
- }), Le && /* @__PURE__ */ y("div", {
706
+ }), Le && /* @__PURE__ */ D("div", {
730
707
  className: "xg7ukam x178xt8z x13fuv20 xhjagg4",
731
- children: O
708
+ children: N
732
709
  })]
733
710
  });
734
711
  }
735
- function B({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
736
- let i = N[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
737
- return /* @__PURE__ */ y("span", {
712
+ function Te({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
713
+ let i = V[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
714
+ return /* @__PURE__ */ D("span", {
738
715
  ...{
739
716
  0: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xw3im37" },
740
717
  1: { className: "x78zum5 x6s0dn4 xeuugli xh8yej3 xt7dq6l" }
741
718
  }[!t | 0],
742
- children: /* @__PURE__ */ y("span", {
719
+ children: /* @__PURE__ */ D("span", {
743
720
  title: typeof r == "string" ? r : void 0,
744
721
  ...{
745
722
  0: { className: "x1lliihq xeuugli xh8yej3 x193iq5w xkfz77 x1ljc890" },
@@ -755,13 +732,13 @@ function B({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
755
732
  })
756
733
  });
757
734
  }
758
- function V(e) {
735
+ function q(e) {
759
736
  if (e.defaultPrevented || e.button !== 0) return !1;
760
737
  let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
761
738
  return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
762
739
  }
763
740
  function Ee({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
764
- let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ y("button", {
741
+ let a = t.label?.(e), o = t.href === void 0 ? /* @__PURE__ */ D("button", {
765
742
  type: "button",
766
743
  disabled: t.disabled,
767
744
  "aria-label": a,
@@ -769,67 +746,67 @@ function Ee({ row: e, action: t, isActive: n, children: r, onKeyDown: i }) {
769
746
  "data-row-action": !0,
770
747
  onKeyDown: i,
771
748
  onClick: (n) => {
772
- V(n) && t.onActivate(e);
749
+ q(n) && t.onActivate(e);
773
750
  },
774
751
  className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv xtgyt42 x19mxcj1",
775
752
  children: r
776
- }) : /* @__PURE__ */ y("a", {
753
+ }) : /* @__PURE__ */ D("a", {
777
754
  href: t.href(e),
778
755
  "aria-label": a,
779
756
  "data-row-action": !0,
780
757
  onKeyDown: i,
781
758
  onClick: (n) => {
782
- t.onActivate !== void 0 && V(n) && (n.preventDefault(), t.onActivate(e));
759
+ t.onActivate !== void 0 && q(n) && (n.preventDefault(), t.onActivate(e));
783
760
  },
784
761
  className: "x1rh3ycu x1hx0egp x78zum5 x6s0dn4 xh8yej3 xeuugli x17tes2r x17oiadl x1717udv xc342km x1ok0vyi x1heor9g xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x16tdsg8 x1hl2dhg x1ypdohk x1t137rt x1s928wv x1j6awrg xarstr8 x11q50lq xa2q2qx x1x5eltu x1jdy9wv xtgyt42 x19mxcj1",
785
762
  children: r
786
763
  });
787
- return a === void 0 ? o : /* @__PURE__ */ b(c.Root, { children: [/* @__PURE__ */ y(c.Trigger, { render: o }), /* @__PURE__ */ y(c.Portal, { children: /* @__PURE__ */ y(c.Positioner, {
764
+ return a === void 0 ? o : /* @__PURE__ */ O(u.Root, { children: [/* @__PURE__ */ D(u.Trigger, { render: o }), /* @__PURE__ */ D(u.Portal, { children: /* @__PURE__ */ D(u.Positioner, {
788
765
  side: "top",
789
766
  align: "start",
790
- children: /* @__PURE__ */ y(c.Popup, { children: a })
767
+ children: /* @__PURE__ */ D(u.Popup, { children: a })
791
768
  }) })] });
792
769
  }
793
770
  // packages/collections/src/collection-scroll.tsx
794
- function H(e) {
771
+ function J(e) {
795
772
  switch (e.status) {
796
- case "loading": return /* @__PURE__ */ y(n, {
773
+ case "loading": return /* @__PURE__ */ D(n, {
797
774
  role: "status",
798
775
  variant: "caption",
799
776
  tone: "muted",
800
777
  children: e.message ?? "Loading…"
801
778
  });
802
- case "complete": return e.message === void 0 ? null : /* @__PURE__ */ y(n, {
779
+ case "complete": return e.message === void 0 ? null : /* @__PURE__ */ D(n, {
803
780
  variant: "caption",
804
781
  tone: "muted",
805
782
  children: e.message
806
783
  });
807
- case "ready": return /* @__PURE__ */ y(i, {
784
+ case "ready": return /* @__PURE__ */ D(a, {
808
785
  onClick: e.onLoadMore,
809
786
  children: e.message ?? "Load more"
810
787
  });
811
- case "error": return /* @__PURE__ */ b(r, {
788
+ case "error": return /* @__PURE__ */ O(i, {
812
789
  role: "status",
813
- children: [/* @__PURE__ */ y(n, {
790
+ children: [/* @__PURE__ */ D(n, {
814
791
  variant: "caption",
815
792
  tone: "muted",
816
793
  children: e.message ?? "More records could not be loaded."
817
- }), /* @__PURE__ */ y(i, {
794
+ }), /* @__PURE__ */ D(a, {
818
795
  onClick: e.onLoadMore,
819
796
  children: "Retry"
820
797
  })]
821
798
  });
822
799
  }
823
800
  }
824
- function U({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
825
- let o = te(), s = o.viewport, c = g(null);
826
- me({
801
+ function Y({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
802
+ let o = h(), s = o.viewport, c = C(null);
803
+ fe({
827
804
  end: c,
828
805
  viewport: r ? s : void 0,
829
806
  onEndReached: n,
830
807
  content: e
831
808
  });
832
- let l = /* @__PURE__ */ y("div", {
809
+ let l = /* @__PURE__ */ D("div", {
833
810
  ref: c,
834
811
  ...{
835
812
  0: {},
@@ -837,7 +814,7 @@ function U({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, en
837
814
  }[t !== void 0 | 0],
838
815
  children: t
839
816
  });
840
- return /* @__PURE__ */ b("div", {
817
+ return /* @__PURE__ */ O("div", {
841
818
  ref: o.ref,
842
819
  role: r ? "region" : void 0,
843
820
  "aria-label": r ? a : void 0,
@@ -854,15 +831,15 @@ function U({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, en
854
831
  });
855
832
  }
856
833
  // packages/collections/src/inspector.tsx
857
- var W = 860;
858
- function G({ master: e, detail: t, label: n, masterLabel: r, revealKey: a, returnFocusRef: o, ...s }) {
859
- let c = g(null), l = g(null), u = g(null);
860
- re(() => {
861
- a !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= W && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
834
+ var De = 860;
835
+ function Oe({ master: e, detail: t, label: n, masterLabel: r, revealKey: i, returnFocusRef: o, ...s }) {
836
+ let c = C(null), l = C(null), u = C(null);
837
+ x(() => {
838
+ i !== void 0 && c.current !== null && u.current !== null && c.current.clientWidth <= De && (u.current.focus({ preventScroll: !0 }), u.current.scrollIntoView({
862
839
  block: "start",
863
840
  behavior: "instant"
864
841
  }));
865
- }, [a]);
842
+ }, [i]);
866
843
  function d() {
867
844
  let e = o?.current ?? l.current;
868
845
  e?.focus({ preventScroll: !0 }), e?.scrollIntoView({
@@ -870,26 +847,26 @@ function G({ master: e, detail: t, label: n, masterLabel: r, revealKey: a, retur
870
847
  behavior: "instant"
871
848
  });
872
849
  }
873
- return /* @__PURE__ */ y("div", {
874
- ...f({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
875
- children: /* @__PURE__ */ b("div", {
850
+ return /* @__PURE__ */ D("div", {
851
+ ..._({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
852
+ children: /* @__PURE__ */ O("div", {
876
853
  ref: c,
877
854
  className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
878
- children: [/* @__PURE__ */ y("div", {
855
+ children: [/* @__PURE__ */ D("div", {
879
856
  ref: l,
880
857
  role: "group",
881
858
  "aria-label": r,
882
859
  tabIndex: -1,
883
860
  className: "xeuugli",
884
861
  children: e
885
- }), /* @__PURE__ */ b("aside", {
862
+ }), /* @__PURE__ */ O("aside", {
886
863
  ref: u,
887
864
  "aria-label": n,
888
865
  tabIndex: -1,
889
866
  className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
890
- children: [/* @__PURE__ */ y("div", {
867
+ children: [/* @__PURE__ */ D("div", {
891
868
  className: "x1s85apg x1yamub6 x1xxlxpq",
892
- children: /* @__PURE__ */ b(i, {
869
+ children: /* @__PURE__ */ O(a, {
893
870
  variant: "ghost",
894
871
  onClick: d,
895
872
  children: ["Back to ", r.toLowerCase()]
@@ -899,15 +876,15 @@ function G({ master: e, detail: t, label: n, masterLabel: r, revealKey: a, retur
899
876
  })
900
877
  });
901
878
  }
902
- function K({ items: e, ...t }) {
903
- return /* @__PURE__ */ y("dl", {
904
- ...f({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
905
- children: e.map(({ label: e, value: t }) => /* @__PURE__ */ b("div", {
879
+ function ke({ items: e, ...t }) {
880
+ return /* @__PURE__ */ D("dl", {
881
+ ..._({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
882
+ children: e.map(({ label: e, value: t }) => /* @__PURE__ */ O("div", {
906
883
  className: "xjp7ctv",
907
- children: [/* @__PURE__ */ y("dt", {
884
+ children: [/* @__PURE__ */ D("dt", {
908
885
  className: "xeuugli x153jb6y xj0a0fe",
909
886
  children: e
910
- }), /* @__PURE__ */ y("dd", {
887
+ }), /* @__PURE__ */ D("dd", {
911
888
  className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
912
889
  children: t
913
890
  })]
@@ -915,20 +892,20 @@ function K({ items: e, ...t }) {
915
892
  });
916
893
  }
917
894
  // packages/collections/src/list-footer.tsx
918
- function q({ children: e, actions: t, ...n }) {
919
- return /* @__PURE__ */ b("div", {
920
- ...f({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
921
- children: [/* @__PURE__ */ y("div", {
895
+ function Ae({ children: e, actions: t, ...n }) {
896
+ return /* @__PURE__ */ O("div", {
897
+ ..._({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
898
+ children: [/* @__PURE__ */ D("div", {
922
899
  className: "xeuugli xj0a0fe",
923
900
  children: e
924
- }), t != null && /* @__PURE__ */ y("div", {
901
+ }), t != null && /* @__PURE__ */ D("div", {
925
902
  className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
926
903
  children: t
927
904
  })]
928
905
  });
929
906
  }
930
907
  // packages/collections/src/metrics.tsx
931
- var J = {
908
+ var X = {
932
909
  grid: {
933
910
  k1xSpc: "x78zum5",
934
911
  kwnvtZ: "x1a02dak",
@@ -1021,53 +998,53 @@ var J = {
1021
998
  kCS8Yb: "x1l7klhg",
1022
999
  $$css: !0
1023
1000
  }
1024
- }, Y = {
1001
+ }, Z = {
1025
1002
  inline: {
1026
1003
  metric: void 0,
1027
1004
  label: void 0,
1028
1005
  value: void 0,
1029
- detail: J.inlineDetail,
1006
+ detail: X.inlineDetail,
1030
1007
  valueWidth: "5ch"
1031
1008
  },
1032
1009
  statistic: {
1033
- metric: J.statistic,
1034
- label: J.stackedLabel,
1035
- value: J.statisticValue,
1010
+ metric: X.statistic,
1011
+ label: X.stackedLabel,
1012
+ value: X.statisticValue,
1036
1013
  detail: void 0,
1037
1014
  valueWidth: "5ch"
1038
1015
  },
1039
1016
  headline: {
1040
- metric: J.headline,
1041
- label: J.headlineLabel,
1042
- value: J.headlineValue,
1017
+ metric: X.headline,
1018
+ label: X.headlineLabel,
1019
+ value: X.headlineValue,
1043
1020
  detail: void 0,
1044
1021
  valueWidth: "9ch"
1045
1022
  }
1046
- }, X = {
1047
- inline: J.grid,
1048
- columns: J.columns
1023
+ }, je = {
1024
+ inline: X.grid,
1025
+ columns: X.columns
1049
1026
  };
1050
- function De({ layout: e = "inline", ...t }) {
1051
- return /* @__PURE__ */ y("dl", { ...f(p.props(X[e]), t) });
1027
+ function Me({ layout: e = "inline", ...t }) {
1028
+ return /* @__PURE__ */ D("dl", { ..._(v.props(je[e]), t) });
1052
1029
  }
1053
- function Oe({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
1054
- let c = Y[a];
1055
- return /* @__PURE__ */ b("div", {
1056
- ...f(p.props(J.metric, c.metric), s),
1030
+ function Q({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
1031
+ let c = Z[a];
1032
+ return /* @__PURE__ */ O("div", {
1033
+ ..._(v.props(X.metric, c.metric), s),
1057
1034
  children: [
1058
- /* @__PURE__ */ y("dt", {
1059
- ...p.props(J.label, c.label),
1035
+ /* @__PURE__ */ D("dt", {
1036
+ ...v.props(X.label, c.label),
1060
1037
  children: e
1061
1038
  }),
1062
- /* @__PURE__ */ y("dd", {
1063
- ...p.props(J.value, c.value),
1064
- children: r ? /* @__PURE__ */ y(l, { width: c.valueWidth }) : t
1039
+ /* @__PURE__ */ D("dd", {
1040
+ ...v.props(X.value, c.value),
1041
+ children: r ? /* @__PURE__ */ D(d, { width: c.valueWidth }) : t
1065
1042
  }),
1066
- (r ? i : n !== void 0) && /* @__PURE__ */ y("dd", {
1067
- ...p.props(J.detail, c.detail),
1068
- children: r ? /* @__PURE__ */ y(l, { width: "24ch" }) : n
1043
+ (r ? i : n !== void 0) && /* @__PURE__ */ D("dd", {
1044
+ ...v.props(X.detail, c.detail),
1045
+ children: r ? /* @__PURE__ */ D(d, { width: "24ch" }) : n
1069
1046
  }),
1070
- o !== void 0 && /* @__PURE__ */ y("dd", {
1047
+ o !== void 0 && /* @__PURE__ */ D("dd", {
1071
1048
  className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
1072
1049
  children: o
1073
1050
  })
@@ -1075,64 +1052,64 @@ function Oe({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !
1075
1052
  });
1076
1053
  }
1077
1054
  // packages/collections/src/timestamp.tsx
1078
- function ke({ dateTime: e, label: t, title: n }) {
1079
- return n === void 0 ? /* @__PURE__ */ y("time", {
1055
+ function Ne({ dateTime: e, label: t, title: n }) {
1056
+ return n === void 0 ? /* @__PURE__ */ D("time", {
1080
1057
  dateTime: e,
1081
1058
  className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
1082
1059
  children: t
1083
- }) : /* @__PURE__ */ b(c.Root, { children: [/* @__PURE__ */ y(c.Trigger, {
1084
- render: /* @__PURE__ */ y("time", {
1060
+ }) : /* @__PURE__ */ O(u.Root, { children: [/* @__PURE__ */ D(u.Trigger, {
1061
+ render: /* @__PURE__ */ D("time", {
1085
1062
  dateTime: e,
1086
1063
  tabIndex: 0,
1087
1064
  "aria-label": n,
1088
1065
  className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
1089
1066
  }),
1090
1067
  children: t
1091
- }), /* @__PURE__ */ y(c.Portal, { children: /* @__PURE__ */ y(c.Positioner, { children: /* @__PURE__ */ y(c.Popup, { children: n }) }) })] });
1068
+ }), /* @__PURE__ */ D(u.Portal, { children: /* @__PURE__ */ D(u.Positioner, { children: /* @__PURE__ */ D(u.Popup, { children: n }) }) })] });
1092
1069
  }
1093
1070
  // packages/collections/src/timeline.tsx
1094
- function Ae({ label: e, children: t }) {
1095
- return /* @__PURE__ */ y("ol", {
1071
+ function Pe({ label: e, children: t }) {
1072
+ return /* @__PURE__ */ D("ol", {
1096
1073
  "aria-label": e,
1097
1074
  className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
1098
1075
  children: t
1099
1076
  });
1100
1077
  }
1101
- function Z({ icon: e, title: n, time: r, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
1102
- let [c, l] = _(s), u = /* @__PURE__ */ b("div", {
1078
+ function Fe({ icon: e, title: n, time: r, metadata: i, children: a, details: o, defaultOpen: s = !1 }) {
1079
+ let [c, l] = w(s), u = /* @__PURE__ */ O("div", {
1103
1080
  className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
1104
- children: [/* @__PURE__ */ y("div", {
1081
+ children: [/* @__PURE__ */ D("div", {
1105
1082
  className: "xeuugli xk4h15q xj0a0fe",
1106
- children: o === void 0 ? n : /* @__PURE__ */ y(t.Trigger, {
1083
+ children: o === void 0 ? n : /* @__PURE__ */ D(t.Trigger, {
1107
1084
  className: "x14atkfc x16exltd x17oiadl xt970qd xlqzeqv",
1108
1085
  children: n
1109
1086
  })
1110
- }), r != null && /* @__PURE__ */ y("div", {
1087
+ }), r != null && /* @__PURE__ */ D("div", {
1111
1088
  className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
1112
1089
  children: r
1113
1090
  })]
1114
- }), d = /* @__PURE__ */ b(v, { children: [
1091
+ }), d = /* @__PURE__ */ O(E, { children: [
1115
1092
  u,
1116
- a != null && (!c || o === void 0) && /* @__PURE__ */ y("div", {
1093
+ a != null && (!c || o === void 0) && /* @__PURE__ */ D("div", {
1117
1094
  className: "xeuugli x1ewvobj xj0a0fe",
1118
1095
  children: a
1119
1096
  }),
1120
- i != null && /* @__PURE__ */ y("div", {
1097
+ i != null && /* @__PURE__ */ D("div", {
1121
1098
  className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
1122
1099
  children: i
1123
1100
  }),
1124
- o !== void 0 && /* @__PURE__ */ y(t.Panel, { children: o })
1101
+ o !== void 0 && /* @__PURE__ */ D(t.Panel, { children: o })
1125
1102
  ] });
1126
- return /* @__PURE__ */ b("li", {
1103
+ return /* @__PURE__ */ O("li", {
1127
1104
  className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7",
1128
- children: [/* @__PURE__ */ y("span", {
1105
+ children: [/* @__PURE__ */ D("span", {
1129
1106
  "aria-hidden": !0,
1130
1107
  className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
1131
1108
  children: e
1132
- }), o === void 0 ? /* @__PURE__ */ y("div", {
1109
+ }), o === void 0 ? /* @__PURE__ */ D("div", {
1133
1110
  className: "xrvj5dj x1hnptsi xeuugli",
1134
1111
  children: d
1135
- }) : /* @__PURE__ */ y(t.Root, {
1112
+ }) : /* @__PURE__ */ D(t.Root, {
1136
1113
  open: c,
1137
1114
  onOpenChange: l,
1138
1115
  className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
@@ -1140,8 +1117,277 @@ function Z({ icon: e, title: n, time: r, metadata: i, children: a, details: o, d
1140
1117
  })]
1141
1118
  });
1142
1119
  }
1143
- var Q = {
1144
- Root: Ae,
1145
- Item: Z
1146
- };
1147
- export { H as CollectionEnd, pe as CollectionPagination, U as CollectionScroll, D as CollectionToolbar, z as DataTable, F as DataTablePlaceholder, L as DataTableText, R as DataTableTextPlaceholder, K as Details, k as DisplayOptions, O as FilterChips, G as Inspector, q as ListFooter, Oe as Metric, De as MetricGrid, Q as Timeline, ke as Timestamp };
1120
+ var Ie = {
1121
+ Root: Pe,
1122
+ Item: Fe
1123
+ }, $ = {
1124
+ search: {
1125
+ kzqmXN: "xh8yej3",
1126
+ k1K539: "x1kk91vl",
1127
+ $$css: !0
1128
+ },
1129
+ icon: {
1130
+ k1xSpc: "x78zum5",
1131
+ kMwMTN: "x153jb6y",
1132
+ $$css: !0
1133
+ },
1134
+ positive: {
1135
+ kMwMTN: "x7ixh4y",
1136
+ $$css: !0
1137
+ },
1138
+ warning: {
1139
+ kMwMTN: "x1f9ixgr",
1140
+ $$css: !0
1141
+ },
1142
+ negative: {
1143
+ kMwMTN: "xr5kp14",
1144
+ $$css: !0
1145
+ }
1146
+ }, Le = {
1147
+ positive: $.positive,
1148
+ negative: $.negative,
1149
+ warning: $.warning,
1150
+ neutral: void 0
1151
+ }, Re = /* @__PURE__ */ new Set([
1152
+ "Home",
1153
+ "End",
1154
+ "ArrowLeft",
1155
+ "ArrowRight",
1156
+ "Backspace",
1157
+ "Delete"
1158
+ ]);
1159
+ function ze({ option: e }) {
1160
+ return /* @__PURE__ */ D("span", {
1161
+ ...v.props($.icon, Le[e.tone ?? "neutral"]),
1162
+ children: e.icon ?? /* @__PURE__ */ D(re, {
1163
+ size: 14,
1164
+ "aria-hidden": !0
1165
+ })
1166
+ });
1167
+ }
1168
+ function Be({ groups: t }) {
1169
+ let [n, i] = w(""), a = t.filter((e) => e.label.toLowerCase().includes(n.toLowerCase())), o = t.length === 1 && t[0] !== void 0 ? `Filter by ${t[0].label.toLowerCase()}` : "Filters";
1170
+ return /* @__PURE__ */ O(c.Root, {
1171
+ onOpenChange: (e) => {
1172
+ e || i("");
1173
+ },
1174
+ children: [/* @__PURE__ */ D(c.Trigger, {
1175
+ render: /* @__PURE__ */ D(e, {
1176
+ "aria-label": o,
1177
+ title: "Filters"
1178
+ }),
1179
+ children: /* @__PURE__ */ D(M, {
1180
+ size: 14,
1181
+ "aria-hidden": !0
1182
+ })
1183
+ }), /* @__PURE__ */ D(c.Portal, { children: /* @__PURE__ */ D(c.Positioner, {
1184
+ align: "end",
1185
+ children: /* @__PURE__ */ O(c.Popup, { children: [
1186
+ /* @__PURE__ */ D(Ve, {
1187
+ label: "Find a filter",
1188
+ value: n,
1189
+ onChange: i
1190
+ }),
1191
+ a.map((e) => /* @__PURE__ */ D(He, { group: e }, e.id)),
1192
+ a.length === 0 && /* @__PURE__ */ D("div", {
1193
+ className: "x1hmw7ec x5g2kb4",
1194
+ children: /* @__PURE__ */ D(r, { children: "No filters found" })
1195
+ })
1196
+ ] })
1197
+ }) })]
1198
+ });
1199
+ }
1200
+ function Ve({ label: e, value: t, onChange: n }) {
1201
+ return /* @__PURE__ */ D(g, {
1202
+ type: "search",
1203
+ "aria-label": e,
1204
+ placeholder: "Filter…",
1205
+ autoFocus: !0,
1206
+ value: t,
1207
+ onChange: (e) => n(e.target.value),
1208
+ onKeyDown: (e) => {
1209
+ (e.key.length === 1 || Re.has(e.key)) && e.stopPropagation();
1210
+ },
1211
+ xstyle: $.search
1212
+ });
1213
+ }
1214
+ function He({ group: e }) {
1215
+ let [t, n] = w(""), i = e.options.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()));
1216
+ return /* @__PURE__ */ O(c.SubmenuRoot, {
1217
+ onOpenChange: (e) => {
1218
+ e || n("");
1219
+ },
1220
+ children: [/* @__PURE__ */ O(c.SubmenuTrigger, { children: [
1221
+ e.icon ?? /* @__PURE__ */ D(M, {
1222
+ size: 14,
1223
+ "aria-hidden": !0
1224
+ }),
1225
+ /* @__PURE__ */ D("span", {
1226
+ className: "x98rzlu xeuugli xj0a0fe",
1227
+ children: e.label
1228
+ }),
1229
+ /* @__PURE__ */ D("span", {
1230
+ className: "xazcve0 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
1231
+ children: e.options.find((t) => t.value === e.value)?.label
1232
+ }),
1233
+ /* @__PURE__ */ D(j, {
1234
+ size: 14,
1235
+ "aria-hidden": !0
1236
+ })
1237
+ ] }), /* @__PURE__ */ D(c.Portal, { children: /* @__PURE__ */ D(c.Positioner, {
1238
+ align: "start",
1239
+ children: /* @__PURE__ */ O(c.Popup, {
1240
+ "aria-label": e.label,
1241
+ children: [
1242
+ /* @__PURE__ */ D(Ve, {
1243
+ label: `Find ${e.label.toLowerCase()}`,
1244
+ value: t,
1245
+ onChange: n
1246
+ }),
1247
+ /* @__PURE__ */ D(c.RadioGroup, {
1248
+ value: e.value,
1249
+ onValueChange: e.onChange,
1250
+ children: i.map((e) => /* @__PURE__ */ O(c.RadioItem, {
1251
+ value: e.value,
1252
+ closeOnClick: !0,
1253
+ children: [/* @__PURE__ */ D(ze, { option: e }), /* @__PURE__ */ D("span", {
1254
+ className: "x98rzlu xeuugli xj0a0fe",
1255
+ children: e.label
1256
+ })]
1257
+ }, e.value))
1258
+ }),
1259
+ i.length === 0 && /* @__PURE__ */ D("div", {
1260
+ className: "x1hmw7ec x5g2kb4",
1261
+ children: /* @__PURE__ */ D(r, { children: "No options found" })
1262
+ })
1263
+ ]
1264
+ })
1265
+ }) })]
1266
+ });
1267
+ }
1268
+ // packages/collections/src/use-collection-controls.tsx
1269
+ var Ue = { input: {
1270
+ k7Eaqz: "xeuugli",
1271
+ kUk6DE: "x98rzlu",
1272
+ $$css: !0
1273
+ } };
1274
+ function We({ search: t, filters: n = [], filterContent: r, chips: i = [], viewActions: a, display: o, isPlaceholder: s = !1, isReady: c }) {
1275
+ let [u, d] = w(!1), [f, p] = w(!1), m = C(null), h = C(null), _ = C(null), v = s || !c, ee = t !== void 0 && (u || t.value.length > 0);
1276
+ x(() => {
1277
+ u && !s && c && (_.current?.focus(), _.current?.select());
1278
+ }, [
1279
+ u,
1280
+ s,
1281
+ c
1282
+ ]);
1283
+ function b() {
1284
+ (m.current ?? h.current?.querySelector("button"))?.focus();
1285
+ }
1286
+ function S() {
1287
+ t !== void 0 && !s && c && (_.current?.focus(), _.current?.select(), d(!0));
1288
+ }
1289
+ function T() {
1290
+ t?.onChange(""), d(!1), b();
1291
+ }
1292
+ function E(e) {
1293
+ ee && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), T());
1294
+ }
1295
+ let k = n.filter((e) => e.value !== e.defaultValue).map((e) => ({
1296
+ id: `filter:${e.id}`,
1297
+ label: e.options.find((t) => t.value === e.value)?.label ?? e.value,
1298
+ onRemove: () => e.onChange(e.defaultValue)
1299
+ }));
1300
+ for (let e of i) k.push({
1301
+ ...e,
1302
+ id: `chip:${e.id}`
1303
+ });
1304
+ let te = r !== void 0 || n.length > 0, ne = y.toArray([a, o]).length > 0, A = t !== void 0 || te || ne, j = t?.label ?? "Search this view", re = t?.placeholder ?? "Find in view…";
1305
+ return {
1306
+ openSearch: S,
1307
+ onKeyDown: E,
1308
+ actions: A ? /* @__PURE__ */ O("div", {
1309
+ ref: h,
1310
+ "aria-hidden": v,
1311
+ inert: v,
1312
+ className: "x78zum5 x6s0dn4 x1a02dak x13a6bvl x1hnptsi xeuugli x193iq5w",
1313
+ children: [
1314
+ t !== void 0 && /* @__PURE__ */ D(e, {
1315
+ ref: m,
1316
+ type: "button",
1317
+ disabled: s,
1318
+ "aria-label": "Find in view",
1319
+ title: "Find in view",
1320
+ "data-view-find-trigger": !0,
1321
+ "aria-expanded": ee,
1322
+ onClick: S,
1323
+ children: /* @__PURE__ */ D(N, {
1324
+ size: 14,
1325
+ "aria-hidden": !0
1326
+ })
1327
+ }),
1328
+ ee && /* @__PURE__ */ O("div", {
1329
+ className: "x78zum5 x6s0dn4 xunmzkg xdl07me x193iq5w",
1330
+ children: [/* @__PURE__ */ D(g, {
1331
+ ref: _,
1332
+ type: "search",
1333
+ disabled: s,
1334
+ "data-view-find": !0,
1335
+ "aria-label": j,
1336
+ placeholder: re,
1337
+ value: t.value,
1338
+ onChange: (e) => t.onChange(e.target.value),
1339
+ onKeyDown: (e) => {
1340
+ e.key === "Enter" && t.onSubmit !== void 0 && (e.preventDefault(), t.onSubmit()), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), T());
1341
+ },
1342
+ xstyle: Ue.input
1343
+ }), /* @__PURE__ */ D(e, {
1344
+ type: "button",
1345
+ variant: "ghost",
1346
+ "data-view-find-close": !0,
1347
+ "aria-label": "Close search",
1348
+ title: "Close search (Esc)",
1349
+ onClick: T,
1350
+ children: /* @__PURE__ */ D(ie, {
1351
+ size: 14,
1352
+ "aria-hidden": !0
1353
+ })
1354
+ })]
1355
+ }),
1356
+ r === void 0 ? n.length > 0 ? /* @__PURE__ */ D(Be, { groups: n }) : null : /* @__PURE__ */ O(l.Root, {
1357
+ open: f,
1358
+ onOpenChange: p,
1359
+ children: [/* @__PURE__ */ D(l.Trigger, {
1360
+ render: /* @__PURE__ */ D(e, {
1361
+ "aria-label": "Filters",
1362
+ title: "Filters"
1363
+ }),
1364
+ children: /* @__PURE__ */ D(M, {
1365
+ size: 14,
1366
+ "aria-hidden": !0
1367
+ })
1368
+ }), /* @__PURE__ */ D(l.Portal, { children: /* @__PURE__ */ D(l.Positioner, {
1369
+ align: "end",
1370
+ children: /* @__PURE__ */ O(l.Popup, {
1371
+ className: "x1m258z3 xw7nakj",
1372
+ children: [/* @__PURE__ */ D(l.Title, { children: "Filters" }), r(() => p(!1))]
1373
+ })
1374
+ }) })]
1375
+ }),
1376
+ a,
1377
+ o
1378
+ ]
1379
+ }) : void 0,
1380
+ chips: k.length > 0 && /* @__PURE__ */ D("div", {
1381
+ "aria-hidden": v,
1382
+ inert: v,
1383
+ className: "xjp7ctv",
1384
+ children: /* @__PURE__ */ D(L, {
1385
+ filters: k,
1386
+ onRemove: (e) => {
1387
+ b(), k.find((t) => t.id === e)?.onRemove();
1388
+ }
1389
+ })
1390
+ })
1391
+ };
1392
+ }
1393
+ export { J as CollectionEnd, Be as CollectionFilters, de as CollectionPagination, Y as CollectionScroll, I as CollectionToolbar, K as DataTable, H as DataTablePlaceholder, W as DataTableText, G as DataTableTextPlaceholder, ke as Details, ue as DisplayOptions, L as FilterChips, Oe as Inspector, Ae as ListFooter, Q as Metric, Me as MetricGrid, Ie as Timeline, Ne as Timestamp, We as useCollectionControls };