@slotted/react 0.1.0-beta.31 → 0.1.0-beta.33

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.
@@ -15,28 +15,28 @@ import { t as ne } from "./number-field-DzOcs9uG.js";
15
15
  import { c as re, i as ie, n as ae, o as oe, s as se } from "./select-jdqT8lFi.js";
16
16
  import { t as v } from "./time-picker-Cw9NezUE.js";
17
17
  import { t as y } from "./time-range-picker-DmmUqGjV.js";
18
- import { n as ce, t as le } from "./radio-group-doL7tde1.js";
19
- import { t as b } from "./tags-input-_cYR2JSK.js";
20
- import { keyedProps as x, withSelectorKey as S } from "@slotted/core/selector-key";
21
- import { createFocusOrigin as C } from "@slotted/core/focus";
22
- import { createControllable as ue } from "@slotted/core/state";
23
- import { createContext as w, useCallback as T, useContext as E, useEffect as D, useId as de, useImperativeHandle as fe, useMemo as O, useRef as pe, useState as k } from "react";
24
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
25
- import { createScrollAffordance as me } from "@slotted/core/overflow";
26
- import { tableMessages as he } from "@slotted/core/i18n";
27
- import { createFilter as N, nextSelection as ge } from "@slotted/core/collection";
28
- import { isRowAction as P } from "@slotted/core/pointer-intent";
18
+ import { n as ce, t as b } from "./radio-group-doL7tde1.js";
19
+ import { t as x } from "./tags-input-_cYR2JSK.js";
20
+ import { keyedProps as S, withSelectorKey as C } from "@slotted/core/selector-key";
21
+ import { createFocusOrigin as w } from "@slotted/core/focus";
22
+ import { createControllable as le } from "@slotted/core/state";
23
+ import { createContext as T, useCallback as E, useContext as D, useEffect as O, useId as ue, useImperativeHandle as de, useMemo as k, useRef as fe, useState as A } from "react";
24
+ import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
25
+ import { createScrollAffordance as pe } from "@slotted/core/overflow";
26
+ import { tableMessages as me } from "@slotted/core/i18n";
27
+ import { createFilter as P, nextSelection as he } from "@slotted/core/collection";
28
+ import { isRowAction as ge } from "@slotted/core/pointer-intent";
29
29
  import { getLiveAnnouncer as _e } from "@slotted/core/live-announcer";
30
- import { isPlainDate as F, isPlainDateTime as I, isPlainTime as ve, parseISODate as L, parseISODateTime as R, parseISOTime as ye, toISODate as z, toISOTime as B } from "@slotted/core/date";
31
- import { defaultOperator as be, describeFilter as xe, emptyFilter as Se, isConditionActive as V, isFilterActive as Ce, normalizeFilter as we, operandCount as H, operatorsFor as Te, serializeFilter as Ee, withCondition as De, withJoin as Oe } from "@slotted/core/filter";
30
+ import { isPlainDate as F, isPlainDateTime as I, isPlainTime as ve, parseISODate as ye, parseISODateTime as L, parseISOTime as be, toISODate as R, toISOTime as z } from "@slotted/core/date";
31
+ import { defaultOperator as xe, describeFilter as Se, emptyFilter as Ce, isConditionActive as B, isFilterActive as we, normalizeFilter as Te, operandCount as V, operatorsFor as Ee, serializeFilter as H, withCondition as De, withJoin as Oe } from "@slotted/core/filter";
32
32
  //#region src/table/table-defaults.tsx
33
- var U = w({});
33
+ var U = T({});
34
34
  function W() {
35
- return E(U);
35
+ return D(U);
36
36
  }
37
37
  function ke({ children: e, ...t }) {
38
38
  let n = W();
39
- return /* @__PURE__ */ j(U.Provider, {
39
+ return /* @__PURE__ */ M(U.Provider, {
40
40
  value: {
41
41
  cellAlign: t.cellAlign ?? n.cellAlign,
42
42
  columns: t.columns ?? n.columns,
@@ -54,123 +54,123 @@ function ke({ children: e, ...t }) {
54
54
  }
55
55
  //#endregion
56
56
  //#region src/table/table.tsx
57
- var Ae = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", G = w(void 0);
57
+ var Ae = "[data-part=\"body\"] > [data-part=\"row\"][data-value]", G = T(void 0);
58
58
  function K() {
59
- let e = E(G);
59
+ let e = D(G);
60
60
  if (e === void 0) throw Error("Every Table part must be rendered inside Table.");
61
61
  return e;
62
62
  }
63
63
  function je() {
64
- return E(G);
64
+ return D(G);
65
65
  }
66
66
  function Me({ children: t, columns: n, defaultExpanded: r, defaultSort: i, defaultValue: a, edges: o, expanded: s, layout: c, loading: l, messages: u, onExpandedChange: d, onSortChange: f, onValueChange: p, ref: m, render: h, selectionMode: g, sort: _, cellAlign: ee, stickyFooter: te, stickyHeader: ne, stickyTo: re, striped: ie, value: ae, variant: oe, ...se }) {
67
- let v = W(), y = e(he, u), ce = de(), [le, b] = k(i ?? null), [S, C] = k(a ?? []), [w, E] = k(r ?? []), D = pe(null), fe = pe(void 0), O = _ === void 0 ? le : _, A = ae ?? S, M = s ?? w, me = n ?? v.columns ?? 1, N = o ?? v.edges ?? "inset", P = c ?? v.layout ?? "auto", F = g ?? v.selectionMode ?? "none", I = (ne ?? v.stickyHeader ?? !1) === !0, ve = (te ?? v.stickyFooter ?? !1) === !0, L = ee ?? v.cellAlign ?? "center", R = re ?? v.stickyTo ?? "scroll", ye = (ie ?? v.striped ?? !1) === !0, z = oe ?? v.variant ?? "ruled", B = T((e) => {
68
- D.current = e, typeof m == "function" ? m(e) : m != null && (m.current = e);
69
- }, [m]), be = T(() => [...D.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
70
- function xe(e, t, n) {
71
- ue({
67
+ let v = W(), y = e(me, u), ce = ue(), [b, x] = A(i ?? null), [C, w] = A(a ?? []), [T, D] = A(r ?? []), O = fe(null), de = fe(void 0), k = _ === void 0 ? b : _, j = ae ?? C, N = s ?? T, pe = n ?? v.columns ?? 1, P = o ?? v.edges ?? "inset", ge = c ?? v.layout ?? "auto", F = g ?? v.selectionMode ?? "none", I = (ne ?? v.stickyHeader ?? !1) === !0, ve = (te ?? v.stickyFooter ?? !1) === !0, ye = ee ?? v.cellAlign ?? "center", L = re ?? v.stickyTo ?? "scroll", be = (ie ?? v.striped ?? !1) === !0, R = oe ?? v.variant ?? "ruled", z = E((e) => {
68
+ O.current = e, typeof m == "function" ? m(e) : m != null && (m.current = e);
69
+ }, [m]), xe = E(() => [...O.current?.querySelectorAll("[data-part=\"body\"] > [data-part=\"row\"][data-value]") ?? []].filter((e) => !e.hasAttribute("data-disabled")).map((e) => e.getAttribute("data-value") ?? ""), []);
70
+ function Se(e, t, n) {
71
+ le({
72
72
  controlled: ae,
73
- initial: A,
73
+ initial: j,
74
74
  equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
75
75
  onRequest: (e) => p?.(e.value, e)
76
- }).request(e, t, n) && C(e);
76
+ }).request(e, t, n) && w(e);
77
77
  }
78
- let Se = {
79
- columns: me,
80
- expanded: M,
78
+ let Ce = {
79
+ columns: pe,
80
+ expanded: N,
81
81
  id: ce,
82
- isExpanded: (e) => M.includes(e),
83
- isSelected: (e) => A.includes(e),
82
+ isExpanded: (e) => N.includes(e),
83
+ isSelected: (e) => j.includes(e),
84
84
  loading: l === !0,
85
- rows: be,
85
+ rows: xe,
86
86
  requestSort(e, t) {
87
- let n = O?.column === e ? O.direction === "ascending" ? {
87
+ let n = k?.column === e ? k.direction === "ascending" ? {
88
88
  column: e,
89
89
  direction: "descending"
90
90
  } : null : {
91
91
  column: e,
92
92
  direction: "ascending"
93
- }, r = ue({
93
+ }, r = le({
94
94
  controlled: _,
95
- initial: O,
95
+ initial: k,
96
96
  equals: (e, t) => e?.column === t?.column && e?.direction === t?.direction,
97
97
  onRequest: (e) => f?.(e.value, e)
98
98
  }), i = n === null ? "clear" : "pointer", a = r.request(n, i, t), o = t?.currentTarget?.textContent?.trim() ?? e, s = n === null ? y("sortCleared", { column: o }) : n.direction === "ascending" ? y("sortedAscending", { column: o }) : y("sortedDescending", { column: o });
99
- _e(D.current?.ownerDocument).announce(s), a && b(n);
99
+ _e(O.current?.ownerDocument).announce(s), a && x(n);
100
100
  },
101
101
  selectionMode: F,
102
- sort: O,
103
- stickyTo: R,
102
+ sort: k,
103
+ stickyTo: L,
104
104
  toggleExpanded(e, t) {
105
- let n = M.includes(e) ? M.filter((t) => t !== e) : [...M, e];
106
- ue({
105
+ let n = N.includes(e) ? N.filter((t) => t !== e) : [...N, e];
106
+ le({
107
107
  controlled: s,
108
- initial: M,
108
+ initial: N,
109
109
  equals: (e, t) => e.length === t.length && e.every((e, n) => e === t[n]),
110
110
  onRequest: (e) => d?.(e.value, e)
111
- }).request(n, "pointer", t) && E(n);
111
+ }).request(n, "pointer", t) && D(n);
112
112
  },
113
113
  toggleSelected(e, { range: t, source: n }) {
114
- let r = ge({
114
+ let r = he({
115
115
  action: t && F === "multiple" ? "range" : "toggle",
116
- anchor: fe.current,
116
+ anchor: de.current,
117
117
  behavior: "toggle",
118
118
  key: e,
119
- keys: be(),
119
+ keys: xe(),
120
120
  mode: F,
121
- selected: A
121
+ selected: j
122
122
  });
123
- t || (fe.current = e), xe(r.selected, t ? "select" : "pointer", n);
123
+ t || (de.current = e), Se(r.selected, t ? "select" : "pointer", n);
124
124
  },
125
125
  toggleSelectAll(e) {
126
- let t = ge({
126
+ let t = he({
127
127
  action: "all",
128
- keys: be(),
128
+ keys: xe(),
129
129
  mode: F,
130
- selected: A
130
+ selected: j
131
131
  });
132
- xe(t.selected, t.selected.length === 0 ? "clear" : "select", e);
132
+ Se(t.selected, t.selected.length === 0 ? "clear" : "select", e);
133
133
  },
134
134
  t: y,
135
- value: A
136
- }, V = x({
135
+ value: j
136
+ }, B = S({
137
137
  ...se,
138
138
  children: t,
139
- "data-cell-align": L,
140
- "data-edges": N,
141
- "data-layout": P,
139
+ "data-cell-align": ye,
140
+ "data-edges": P,
141
+ "data-layout": ge,
142
142
  ...l === !0 ? { "data-loading": "" } : {},
143
143
  "data-part": "root",
144
144
  ...I ? { "data-sticky-header": "" } : {},
145
145
  ...ve ? { "data-sticky-footer": "" } : {},
146
- "data-sticky-to": R,
147
- ...ye ? { "data-striped": "" } : {},
146
+ "data-sticky-to": L,
147
+ ...be ? { "data-striped": "" } : {},
148
148
  "data-ui": "table",
149
- "data-variant": z,
150
- ref: B
149
+ "data-variant": R,
150
+ ref: z
151
151
  });
152
- return /* @__PURE__ */ j(G.Provider, {
153
- value: Se,
154
- children: h === void 0 ? /* @__PURE__ */ j("div", { ...V }) : h(V)
152
+ return /* @__PURE__ */ M(G.Provider, {
153
+ value: Ce,
154
+ children: h === void 0 ? /* @__PURE__ */ M("div", { ...B }) : h(B)
155
155
  });
156
156
  }
157
157
  //#endregion
158
158
  //#region src/table/table-content.tsx
159
159
  function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProps: i, totalRowCount: a, ...o }) {
160
- let s = K(), [c, l] = k(null), [u, d] = k({
160
+ let s = K(), [c, l] = A(null), [u, d] = A({
161
161
  overflowing: !1,
162
162
  atStart: !0,
163
163
  atEnd: !0
164
- }), f = pe(null), { ref: p, ...m } = i ?? {}, h = T((e) => {
164
+ }), f = fe(null), { ref: p, ...m } = i ?? {}, h = E((e) => {
165
165
  l(e), typeof p == "function" ? p(e) : p != null && (p.current = e);
166
166
  }, [p]);
167
- D(() => {
167
+ O(() => {
168
168
  if (c === null || s.stickyTo === "page") return;
169
- let e = me(c, { onChange: d });
169
+ let e = pe(c, { onChange: d });
170
170
  return f.current = e, d(e.state()), () => {
171
171
  e.destroy(), f.current = null;
172
172
  };
173
- }, [c, s.stickyTo]), D(() => c === null ? void 0 : C(c).destroy, [c]), fe(t, () => ({
173
+ }, [c, s.stickyTo]), O(() => c === null ? void 0 : w(c).destroy, [c]), de(t, () => ({
174
174
  overflowing: () => f.current?.state().overflowing ?? !1,
175
175
  refresh: () => f.current?.refresh(),
176
176
  scrollToRow: (e) => {
@@ -178,17 +178,17 @@ function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
178
178
  t != null && f.current?.reveal(t);
179
179
  }
180
180
  }), [c]);
181
- let g = x({
181
+ let g = S({
182
182
  ...m,
183
183
  "data-part": "scroll",
184
184
  ref: h
185
185
  });
186
- return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */ j("div", {
186
+ return u.overflowing && (g["data-overflowing"] = "", u.atStart && (g["data-at-start"] = ""), u.atEnd && (g["data-at-end"] = ""), g.role = m.role ?? "region", g.tabIndex = m.tabIndex ?? 0, r === void 0 ? m["aria-label"] === void 0 && (g["aria-label"] = s.t("scroll")) : g["aria-labelledby"] = r), /* @__PURE__ */ M("div", {
187
187
  ...g,
188
- children: /* @__PURE__ */ j("table", {
188
+ children: /* @__PURE__ */ M("table", {
189
189
  ...o,
190
190
  ...a === void 0 ? {} : { "aria-rowcount": a },
191
- ...S(s.loading ? { "aria-busy": !0 } : {}, "part", "table"),
191
+ ...C(s.loading ? { "aria-busy": !0 } : {}, "part", "table"),
192
192
  ref: n,
193
193
  children: e
194
194
  })
@@ -196,12 +196,12 @@ function Ne({ children: e, handleRef: t, ref: n, scrollLabelledBy: r, scrollProp
196
196
  }
197
197
  //#endregion
198
198
  //#region src/table/table-parts.tsx
199
- var Pe = w(void 0), Fe = w(void 0);
199
+ var Pe = T(void 0), Fe = T(void 0);
200
200
  function Ie() {
201
- return E(Fe);
201
+ return D(Fe);
202
202
  }
203
203
  function q() {
204
- let e = E(Pe);
204
+ let e = D(Pe);
205
205
  if (e === void 0) throw Error("TableSelect, TableExpander and TableRowHeader belong inside TableRow.");
206
206
  return e;
207
207
  }
@@ -219,76 +219,77 @@ function J({ align: e, blockAlign: t, numeric: n, sticky: r, stickyOffset: i, te
219
219
  };
220
220
  }
221
221
  function Le({ ref: e, ...t }) {
222
- return /* @__PURE__ */ j("caption", {
223
- ...S(t, "part", "caption"),
222
+ return /* @__PURE__ */ M("caption", {
223
+ ...C(t, "part", "caption"),
224
224
  ref: e
225
225
  });
226
226
  }
227
227
  function Re({ ref: e, ...t }) {
228
- return /* @__PURE__ */ j("thead", {
229
- ...S(t, "part", "head"),
228
+ return /* @__PURE__ */ M("thead", {
229
+ ...C(t, "part", "head"),
230
230
  ref: e
231
231
  });
232
232
  }
233
233
  function ze({ ref: e, ...t }) {
234
- return /* @__PURE__ */ j("tbody", {
235
- ...S(t, "part", "body"),
234
+ return /* @__PURE__ */ M("tbody", {
235
+ ...C(t, "part", "body"),
236
236
  ref: e
237
237
  });
238
238
  }
239
239
  function Be({ ref: e, ...t }) {
240
- return /* @__PURE__ */ j("tfoot", {
241
- ...S(t, "part", "summary"),
240
+ return /* @__PURE__ */ M("tfoot", {
241
+ ...C(t, "part", "summary"),
242
242
  ref: e
243
243
  });
244
244
  }
245
245
  function Ve({ ref: e, ...t }) {
246
- return /* @__PURE__ */ j("div", {
247
- ...S(t, "part", "footer"),
246
+ return /* @__PURE__ */ M("div", {
247
+ ...C(t, "part", "footer"),
248
248
  ref: e
249
249
  });
250
250
  }
251
- function He({ children: e, current: t, disabled: n, interactive: r, onAction: i, onClick: a, ref: o, render: s, rowIndex: c, value: l, ...u }) {
252
- let d = K(), f = l !== void 0 && d.isSelected(l), p = l !== void 0 && d.isExpanded(l), m = r ?? i !== void 0, h = i === void 0 ? a : (e) => {
253
- a?.(e), !(e.defaultPrevented || n === !0) && P(e.currentTarget, e.target) && i(e);
254
- }, g = x({
255
- ...u,
251
+ function He({ children: e, current: t, disabled: n, interactive: r, muted: i, onAction: a, onClick: o, ref: s, render: c, rowIndex: l, value: u, ...d }) {
252
+ let f = K(), p = u !== void 0 && f.isSelected(u), m = u !== void 0 && f.isExpanded(u), h = r ?? a !== void 0, g = a === void 0 ? o : (e) => {
253
+ o?.(e), !(e.defaultPrevented || n === !0) && ge(e.currentTarget, e.target) && a(e);
254
+ }, _ = S({
255
+ ...d,
256
256
  children: e,
257
257
  ...t === !0 ? {
258
258
  "aria-current": "true",
259
259
  "data-current": ""
260
260
  } : {},
261
261
  ...n === !0 ? { "data-disabled": "" } : {},
262
- ...p ? { "data-expanded": "" } : {},
263
- ...m ? { "data-interactive": "" } : {},
264
- ...h === void 0 ? {} : { onClick: h },
262
+ ...m ? { "data-expanded": "" } : {},
263
+ ...h ? { "data-interactive": "" } : {},
264
+ ...i === !0 ? { "data-muted": "" } : {},
265
+ ...g === void 0 ? {} : { onClick: g },
265
266
  "data-part": "row",
266
- ...f ? { "data-selected": "" } : {},
267
- ...l === void 0 ? {} : { "data-value": l },
268
- ...c === void 0 ? {} : { "aria-rowindex": c }
269
- }), _ = {
270
- detailId: `${d.id}detail${l ?? ""}`,
267
+ ...p ? { "data-selected": "" } : {},
268
+ ...u === void 0 ? {} : { "data-value": u },
269
+ ...l === void 0 ? {} : { "aria-rowindex": l }
270
+ }), ee = {
271
+ detailId: `${f.id}detail${u ?? ""}`,
271
272
  disabled: n === !0,
272
- expanded: p,
273
- selected: f,
274
- value: l
273
+ expanded: m,
274
+ selected: p,
275
+ value: u
275
276
  };
276
- return /* @__PURE__ */ j(Pe.Provider, {
277
- value: _,
278
- children: s === void 0 ? /* @__PURE__ */ j("tr", {
279
- ...g,
280
- ref: o
281
- }) : s(g)
277
+ return /* @__PURE__ */ M(Pe.Provider, {
278
+ value: ee,
279
+ children: c === void 0 ? /* @__PURE__ */ M("tr", {
280
+ ..._,
281
+ ref: s
282
+ }) : c(_)
282
283
  });
283
284
  }
284
285
  function Ue(e, ...t) {
285
286
  for (let n of t) typeof n == "function" ? n(e) : n != null && (n.current = e);
286
287
  }
287
288
  function We({ header: e }) {
288
- return /* @__PURE__ */ j(A, { children: (e.current?.textContent ?? "").trim() });
289
+ return /* @__PURE__ */ M(j, { children: (e.current?.textContent ?? "").trim() });
289
290
  }
290
291
  function Ge({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref: l, scope: u, sticky: d, stickyOffset: f, style: p, text: m, ...h }) {
291
- let g = K(), _ = pe(null), ee = r !== void 0 && g.sort?.column === r, te = x({
292
+ let g = K(), _ = fe(null), ee = r !== void 0 && g.sort?.column === r, te = S({
292
293
  ...h,
293
294
  ...J({
294
295
  align: e,
@@ -303,27 +304,27 @@ function Ge({ align: e, blockAlign: t, children: n, column: r, numeric: c, ref:
303
304
  "data-part": "column-header",
304
305
  scope: u ?? "col"
305
306
  });
306
- return /* @__PURE__ */ j(Fe.Provider, {
307
+ return /* @__PURE__ */ M(Fe.Provider, {
307
308
  value: r,
308
- children: /* @__PURE__ */ M(i, {
309
+ children: /* @__PURE__ */ N(i, {
309
310
  describes: "none",
310
311
  openOn: "hover",
311
312
  side: "bottom",
312
313
  whenClipped: !0,
313
- children: [/* @__PURE__ */ j(a, {
314
+ children: [/* @__PURE__ */ M(a, {
314
315
  ...te,
315
- render: (e) => /* @__PURE__ */ j("th", {
316
+ render: (e) => /* @__PURE__ */ M("th", {
316
317
  ...e,
317
318
  ref: (t) => {
318
319
  e.ref?.(t), _.current = t, Ue(t, l);
319
320
  }
320
321
  })
321
- }), /* @__PURE__ */ j(s, { children: /* @__PURE__ */ j(o, { children: /* @__PURE__ */ j(We, { header: _ }) }) })]
322
+ }), /* @__PURE__ */ M(s, { children: /* @__PURE__ */ M(o, { children: /* @__PURE__ */ M(We, { header: _ }) }) })]
322
323
  })
323
324
  });
324
325
  }
325
326
  function Ke({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a, stickyOffset: o, style: s, text: c, ...l }) {
326
- return /* @__PURE__ */ j("th", {
327
+ return /* @__PURE__ */ M("th", {
327
328
  ...l,
328
329
  ...J({
329
330
  align: e,
@@ -340,7 +341,7 @@ function Ke({ align: e, blockAlign: t, numeric: n, ref: r, scope: i, sticky: a,
340
341
  });
341
342
  }
342
343
  function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...c }) {
343
- return /* @__PURE__ */ j("td", {
344
+ return /* @__PURE__ */ M("td", {
344
345
  ...c,
345
346
  ...J({
346
347
  align: e,
@@ -356,31 +357,31 @@ function qe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
356
357
  });
357
358
  }
358
359
  function Je({ children: e, column: r, onClick: i, ref: a, render: o, ...s }) {
359
- let c = K(), l = E(Fe), u = r ?? l;
360
+ let c = K(), l = D(Fe), u = r ?? l;
360
361
  function d(e) {
361
362
  i?.(e), !(e.defaultPrevented || u === void 0) && c.requestSort(u, e);
362
363
  }
363
- let f = x({
364
+ let f = S({
364
365
  ...s,
365
- children: /* @__PURE__ */ M(A, { children: [e, /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-down" }) })] }),
366
+ children: /* @__PURE__ */ N(j, { children: [e, /* @__PURE__ */ M(n, { children: /* @__PURE__ */ M(t, { name: "chevron-down" }) })] }),
366
367
  "data-part": "sort",
367
368
  onClick: d,
368
369
  type: "button"
369
370
  });
370
- return o === void 0 ? /* @__PURE__ */ j("button", {
371
+ return o === void 0 ? /* @__PURE__ */ M("button", {
371
372
  ...f,
372
373
  ref: a
373
374
  }) : o(f);
374
375
  }
375
376
  function Ye({ ref: e, ...t }) {
376
- return /* @__PURE__ */ j("span", {
377
- ...S(t, "part", "column-actions"),
377
+ return /* @__PURE__ */ M("span", {
378
+ ...C(t, "part", "column-actions"),
378
379
  ref: e
379
380
  });
380
381
  }
381
382
  function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, value: l, ...u }) {
382
383
  let d = K(), f = q(), p = l ?? f.value;
383
- return /* @__PURE__ */ j("td", {
384
+ return /* @__PURE__ */ M("td", {
384
385
  ...u,
385
386
  ...J({
386
387
  align: e,
@@ -393,7 +394,7 @@ function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
393
394
  "data-part": "selection",
394
395
  "data-part-selection": "",
395
396
  ref: r,
396
- children: /* @__PURE__ */ j(c, {
397
+ children: /* @__PURE__ */ M(c, {
397
398
  checked: p !== void 0 && d.isSelected(p),
398
399
  disabled: f.disabled,
399
400
  onCheckedChange: (e, t) => {
@@ -404,13 +405,13 @@ function Xe({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
404
405
  source: t.source
405
406
  });
406
407
  },
407
- children: /* @__PURE__ */ j(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
408
+ children: /* @__PURE__ */ M(h, { children: d.t("selectRow", { row: p ?? "" }).trim() })
408
409
  })
409
410
  });
410
411
  }
411
412
  function Ze({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffset: a, style: o, text: s, ...l }) {
412
413
  let u = K(), d = u.value.length;
413
- return /* @__PURE__ */ j("th", {
414
+ return /* @__PURE__ */ M("th", {
414
415
  ...l,
415
416
  ...J({
416
417
  align: e,
@@ -424,11 +425,11 @@ function Ze({ align: e, blockAlign: t, numeric: n, ref: r, sticky: i, stickyOffs
424
425
  "data-part-selection": "",
425
426
  ref: r,
426
427
  scope: "col",
427
- children: /* @__PURE__ */ j(c, {
428
+ children: /* @__PURE__ */ M(c, {
428
429
  checked: d > 0 && d === u.rows().length,
429
430
  indeterminate: d > 0 && d < u.rows().length,
430
431
  onCheckedChange: (e, t) => u.toggleSelectAll(t.source),
431
- children: /* @__PURE__ */ j(h, { children: u.t("selectAll", { count: d }) })
432
+ children: /* @__PURE__ */ M(h, { children: u.t("selectAll", { count: d }) })
432
433
  })
433
434
  });
434
435
  }
@@ -437,12 +438,12 @@ function Qe({ onClick: e, ref: r, value: i, ...a }) {
437
438
  function u(t) {
438
439
  e?.(t), !(t.defaultPrevented || c === void 0) && o.toggleExpanded(c, t);
439
440
  }
440
- return /* @__PURE__ */ j("button", {
441
+ return /* @__PURE__ */ M("button", {
441
442
  ...a,
442
443
  "aria-controls": l ? s.detailId : void 0,
443
444
  "aria-expanded": l,
444
445
  "aria-label": a["aria-label"] ?? (l ? o.t("collapse") : o.t("expand")),
445
- children: a.children ?? /* @__PURE__ */ j(n, { children: /* @__PURE__ */ j(t, { name: "chevron-right" }) }),
446
+ children: a.children ?? /* @__PURE__ */ M(n, { children: /* @__PURE__ */ M(t, { name: "chevron-right" }) }),
446
447
  "data-part": "expander",
447
448
  "data-part-expander": "",
448
449
  onClick: u,
@@ -452,11 +453,11 @@ function Qe({ onClick: e, ref: r, value: i, ...a }) {
452
453
  }
453
454
  function $e({ children: e, colSpan: t, ref: n, value: r, ...i }) {
454
455
  let a = K();
455
- return a.isExpanded(r) ? /* @__PURE__ */ j("tr", {
456
- ...S(i, "part", "detail"),
456
+ return a.isExpanded(r) ? /* @__PURE__ */ M("tr", {
457
+ ...C(i, "part", "detail"),
457
458
  id: `${a.id}detail${r}`,
458
459
  ref: n,
459
- children: /* @__PURE__ */ j("td", {
460
+ children: /* @__PURE__ */ M("td", {
460
461
  colSpan: t ?? a.columns,
461
462
  "data-part": "cell",
462
463
  "data-part-cell": "",
@@ -466,23 +467,23 @@ function $e({ children: e, colSpan: t, ref: n, value: r, ...i }) {
466
467
  }
467
468
  function et({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
468
469
  let o = K();
469
- return /* @__PURE__ */ j("tr", {
470
- ...S(a, "part", "group-row"),
470
+ return /* @__PURE__ */ M("tr", {
471
+ ...C(a, "part", "group-row"),
471
472
  ...i === !0 ? { "data-sticky": "" } : {},
472
473
  ref: r,
473
- children: /* @__PURE__ */ j("th", {
474
+ children: /* @__PURE__ */ M("th", {
474
475
  colSpan: t ?? o.columns,
475
476
  "data-part": "group-header",
476
477
  "data-part-group-header": "",
477
478
  scope: "rowgroup",
478
- children: /* @__PURE__ */ M("div", {
479
+ children: /* @__PURE__ */ N("div", {
479
480
  "data-part": "group-content",
480
481
  "data-part-group-content": "",
481
- children: [/* @__PURE__ */ j("span", {
482
+ children: [/* @__PURE__ */ M("span", {
482
483
  "data-part": "group-start",
483
484
  "data-part-group-start": "",
484
485
  children: e
485
- }), n == null ? null : /* @__PURE__ */ j("span", {
486
+ }), n == null ? null : /* @__PURE__ */ M("span", {
486
487
  "data-part": "group-end",
487
488
  "data-part-group-end": "",
488
489
  children: n
@@ -493,25 +494,25 @@ function et({ children: e, colSpan: t, end: n, ref: r, sticky: i, ...a }) {
493
494
  }
494
495
  function tt({ colSpan: e, ref: t, ...n }) {
495
496
  let r = K();
496
- return /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
497
- ...S(n, "part", "empty"),
497
+ return /* @__PURE__ */ M("tr", { children: /* @__PURE__ */ M("td", {
498
+ ...C(n, "part", "empty"),
498
499
  colSpan: e ?? r.columns,
499
500
  ref: t
500
501
  }) });
501
502
  }
502
503
  function nt({ children: e, ref: t, skeletonRows: n, ...r }) {
503
504
  let i = K();
504
- return /* @__PURE__ */ j("tbody", {
505
- ...S(r, "part", "loader"),
505
+ return /* @__PURE__ */ M("tbody", {
506
+ ...C(r, "part", "loader"),
506
507
  "aria-hidden": !0,
507
508
  ref: t,
508
- children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ j("tr", {
509
+ children: e ?? Array.from({ length: n ?? 5 }, (e, t) => /* @__PURE__ */ M("tr", {
509
510
  "data-part": "row",
510
511
  "data-part-row": "",
511
- children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */ j("td", {
512
+ children: Array.from({ length: i.columns }, (e, t) => /* @__PURE__ */ M("td", {
512
513
  "data-part": "cell",
513
514
  "data-part-cell": "",
514
- children: /* @__PURE__ */ j(l, {
515
+ children: /* @__PURE__ */ M(l, {
515
516
  inlineSize: "100%",
516
517
  loading: !0
517
518
  })
@@ -522,7 +523,7 @@ function nt({ children: e, ref: t, skeletonRows: n, ...r }) {
522
523
  //#endregion
523
524
  //#region src/table/table-filter.tsx
524
525
  function rt() {
525
- return /* @__PURE__ */ j("svg", {
526
+ return /* @__PURE__ */ M("svg", {
526
527
  "aria-hidden": "true",
527
528
  fill: "none",
528
529
  stroke: "currentColor",
@@ -530,93 +531,93 @@ function rt() {
530
531
  strokeLinejoin: "round",
531
532
  strokeWidth: "2",
532
533
  viewBox: "0 0 24 24",
533
- children: /* @__PURE__ */ j("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
534
+ children: /* @__PURE__ */ M("path", { d: "M22 3H2l8 9.46V19l4 2v-8.54L22 3z" })
534
535
  });
535
536
  }
536
537
  function it(e, t) {
537
- return Ee(e) === Ee(t);
538
+ return H(e) === H(t);
538
539
  }
539
540
  function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOperand: o, singleCondition: s }) {
540
- let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: b, portal: x, renderOperand: C, side: w, sideOffset: T, value: E } = a, D = K(), fe = Ie(), O = de(), [me, he] = k(ee ?? null), N = E === void 0 ? me : E, ge = _ ?? be(t), P = () => Se(t, ge), [F, I] = k(N ?? P()), [ve, L] = k(!1), R = b ?? ve, ye = pe(null), z = D.t, B = u ?? fe ?? "", Te = Ce(N), Ee = s ? 1 : h;
541
+ let { align: c, collisionPadding: l, columnLabel: u, conditions: h = 2, defaultOpen: g, defaultOperator: _, defaultValue: ee, label: te, mount: ne, onOpenChange: v, onValueChange: y, open: x, portal: S, renderOperand: w, side: T, sideOffset: E, value: D } = a, O = K(), de = Ie(), k = ue(), [pe, me] = A(ee ?? null), P = D === void 0 ? pe : D, he = _ ?? xe(t), ge = () => Ce(t, he), [F, I] = A(P ?? ge()), [ve, ye] = A(!1), L = x ?? ve, be = fe(null), R = O.t, z = u ?? de ?? "", Ee = we(P), H = s ? 1 : h;
541
542
  function U(e) {
542
- _e(ye.current?.ownerDocument).announce(e);
543
+ _e(be.current?.ownerDocument).announce(e);
543
544
  }
544
545
  let W = {
545
- join: (e) => z(`filterJoins.${e}`),
546
- operator: (e) => z(`filterOperators.${e}`)
546
+ join: (e) => R(`filterJoins.${e}`),
547
+ operator: (e) => R(`filterOperators.${e}`)
547
548
  };
548
549
  function ke(e, t, n) {
549
- ue({
550
- controlled: E,
551
- initial: N,
550
+ le({
551
+ controlled: D,
552
+ initial: P,
552
553
  equals: it,
553
554
  onRequest: (e) => y?.(e.value, e)
554
- }).request(e, t, n) && he(e);
555
+ }).request(e, t, n) && me(e);
555
556
  }
556
557
  function Ae(e, t) {
557
- b === void 0 && L(e), v?.(e, t), I(N ?? P());
558
+ x === void 0 && ye(e), v?.(e, t), I(P ?? ge());
558
559
  }
559
- let G = (e) => F.conditions[e] ?? { operator: ge }, je = G(0), Me = Ee === 2 && V(t, je);
560
+ let G = (e) => F.conditions[e] ?? { operator: he }, je = G(0), Me = H === 2 && B(t, je);
560
561
  function Ne(e, t) {
561
- let n = G(e), r = H(n.operator), i = H(t), a = {
562
+ let n = G(e), r = V(n.operator), i = V(t), a = {
562
563
  operator: t,
563
564
  ...i >= 1 && r >= 1 ? { value: n.value } : {},
564
565
  ...i === 2 && r === 2 ? { end: n.end } : {}
565
566
  };
566
- I(De(F, e, a)), i !== r && U(z("filterOperands", {
567
+ I(De(F, e, a)), i !== r && U(R("filterOperands", {
567
568
  operator: W.operator(t),
568
569
  count: i
569
570
  }));
570
571
  }
571
572
  function Pe(e, n, r) {
572
- let i = G(e), a = V(t, i), o = n === 0 ? {
573
+ let i = G(e), a = B(t, i), o = n === 0 ? {
573
574
  ...i,
574
575
  value: r
575
576
  } : {
576
577
  ...i,
577
578
  end: r
578
579
  };
579
- I(De(F, e, o)), e === 0 && Ee === 2 && !a && V(t, o) && U(z("filterConditionAdded"));
580
+ I(De(F, e, o)), e === 0 && H === 2 && !a && B(t, o) && U(R("filterConditionAdded"));
580
581
  }
581
582
  function Fe(e, n, r) {
582
- let i = G(e), a = V(t, i), o = {
583
+ let i = G(e), a = B(t, i), o = {
583
584
  ...i,
584
585
  value: n,
585
586
  end: r
586
587
  };
587
- I(De(F, e, o)), e === 0 && Ee === 2 && !a && V(t, o) && U(z("filterConditionAdded"));
588
+ I(De(F, e, o)), e === 0 && H === 2 && !a && B(t, o) && U(R("filterConditionAdded"));
588
589
  }
589
590
  function q(e, t) {
590
- let n = we(F);
591
- ke(n, t, e), U(n ? z("filterApplied", {
592
- column: B,
593
- filter: xe(n, W)
594
- }) : z("filterCleared", { column: B })), b === void 0 && L(!1), v?.(!1, e);
591
+ let n = Te(F);
592
+ ke(n, t, e), U(n ? R("filterApplied", {
593
+ column: z,
594
+ filter: Se(n, W)
595
+ }) : R("filterCleared", { column: z })), x === void 0 && ye(!1), v?.(!1, e);
595
596
  }
596
597
  function J(e) {
597
- I(P()), U(z("filterCleared", { column: B })), ke(null, "clear", e), b === void 0 && L(!1), v?.(!1, e);
598
+ I(ge()), U(R("filterCleared", { column: z })), ke(null, "clear", e), x === void 0 && ye(!1), v?.(!1, e);
598
599
  }
599
- let Le = te ?? (Te ? z("filterApplied", {
600
- column: B,
601
- filter: xe(N, W)
602
- }) : z("filterColumn", { column: B }).trim());
600
+ let Le = te ?? (Ee ? R("filterApplied", {
601
+ column: z,
602
+ filter: Se(P, W)
603
+ }) : R("filterColumn", { column: z }).trim());
603
604
  function Re(r) {
604
- let a = G(r), s = H(a.operator), c = (e) => ({
605
+ let a = G(r), s = V(a.operator), c = (e) => ({
605
606
  apply: () => q(null, "keyboard"),
606
607
  index: e,
607
- label: z(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
608
+ label: R(s === 2 ? e === 0 ? "filterFrom" : "filterTo" : "filterValue"),
608
609
  onValueChange: (t) => Pe(r, e, t),
609
610
  operator: a.operator,
610
611
  value: (e === 0 ? a.value : a.end) ?? null
611
612
  });
612
- return /* @__PURE__ */ M("div", {
613
+ return /* @__PURE__ */ N("div", {
613
614
  "data-operands": s,
614
615
  "data-part": "filter-condition",
615
616
  "data-part-filter-condition": "",
616
- children: [/* @__PURE__ */ j("div", {
617
+ children: [/* @__PURE__ */ M("div", {
617
618
  "data-part": "filter-operator",
618
619
  "data-part-filter-operator": "",
619
- children: /* @__PURE__ */ M(re, {
620
+ children: /* @__PURE__ */ N(re, {
620
621
  fullWidth: !0,
621
622
  items: i.map((e) => ({
622
623
  label: W.operator(e),
@@ -625,94 +626,94 @@ function Y({ body: e, kind: t, operandName: n, operators: i, props: a, rangeOper
625
626
  onValueChange: (e) => Ne(r, e),
626
627
  size: "sm",
627
628
  value: a.operator,
628
- children: [/* @__PURE__ */ j(oe, {
629
- "aria-label": z("filterOperator"),
630
- children: /* @__PURE__ */ j(se, {})
631
- }), /* @__PURE__ */ j(ie, { children: i.map((e) => /* @__PURE__ */ j(ae, {
629
+ children: [/* @__PURE__ */ M(oe, {
630
+ "aria-label": R("filterOperator"),
631
+ children: /* @__PURE__ */ M(se, {})
632
+ }), /* @__PURE__ */ M(ie, { children: i.map((e) => /* @__PURE__ */ M(ae, {
632
633
  value: e,
633
634
  children: W.operator(e)
634
635
  }, e)) })]
635
636
  })
636
- }), s === 0 ? null : /* @__PURE__ */ j("div", {
637
+ }), s === 0 ? null : /* @__PURE__ */ M("div", {
637
638
  "data-kind": t,
638
639
  "data-part": "filter-operand",
639
640
  "data-part-filter-operand": "",
640
- ...n === void 0 || C ? {} : { "data-operand": n },
641
- ...o && s === 2 && !C ? { "data-range": "" } : {},
642
- children: C ? Array.from({ length: s }, (e, t) => C(c(t))) : e({
641
+ ...n === void 0 || w ? {} : { "data-operand": n },
642
+ ...o && s === 2 && !w ? { "data-range": "" } : {},
643
+ children: w ? Array.from({ length: s }, (e, t) => w(c(t))) : e({
643
644
  announce: U,
644
645
  apply: () => q(null, "keyboard"),
645
646
  condition: a,
646
647
  setOperand: (e, t) => Pe(r, e, t),
647
648
  setOperands: (e, t) => Fe(r, e, t),
648
- t: z
649
+ t: R
649
650
  })
650
651
  })]
651
652
  }, r);
652
653
  }
653
- return /* @__PURE__ */ M(p, {
654
+ return /* @__PURE__ */ N(p, {
654
655
  onOpenChange: (e, t) => Ae(e, t),
655
- open: R,
656
+ open: L,
656
657
  ...c === void 0 ? {} : { align: c },
657
658
  ...l === void 0 ? {} : { collisionPadding: l },
658
659
  ...g === void 0 ? {} : { defaultOpen: g },
659
660
  ...ne === void 0 ? {} : { mount: ne },
660
- ...x === void 0 ? {} : { portal: x },
661
- ...w === void 0 ? {} : { side: w },
662
- ...T === void 0 ? {} : { sideOffset: T },
663
- children: [/* @__PURE__ */ j(f, { render: (e) => /* @__PURE__ */ j("button", {
664
- ...S(e, "part", "filter"),
661
+ ...S === void 0 ? {} : { portal: S },
662
+ ...T === void 0 ? {} : { side: T },
663
+ ...E === void 0 ? {} : { sideOffset: E },
664
+ children: [/* @__PURE__ */ M(f, { render: (e) => /* @__PURE__ */ M("button", {
665
+ ...C(e, "part", "filter"),
665
666
  "aria-label": Le,
666
- ...Te ? { "data-filtered": "" } : {},
667
+ ...Ee ? { "data-filtered": "" } : {},
667
668
  type: "button",
668
- children: /* @__PURE__ */ j(rt, {})
669
- }) }), /* @__PURE__ */ j(m, { children: /* @__PURE__ */ j(d, {
669
+ children: /* @__PURE__ */ M(rt, {})
670
+ }) }), /* @__PURE__ */ M(m, { children: /* @__PURE__ */ M(d, {
670
671
  "aria-label": Le,
671
- children: /* @__PURE__ */ M("div", {
672
+ children: /* @__PURE__ */ N("div", {
672
673
  "data-kind": t,
673
674
  "data-part": "filter-panel",
674
675
  "data-part-filter-panel": "",
675
676
  "data-ui": "table",
676
677
  "data-ui-table": "",
677
- id: O,
678
- ref: ye,
678
+ id: k,
679
+ ref: be,
679
680
  children: [
680
681
  Re(0),
681
- Me ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("div", {
682
+ Me ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("div", {
682
683
  "data-part": "filter-join",
683
684
  "data-part-filter-join": "",
684
- children: [/* @__PURE__ */ j("span", {
685
+ children: [/* @__PURE__ */ M("span", {
685
686
  "data-label": "",
686
- children: z("filterJoin")
687
- }), /* @__PURE__ */ M(ce, {
688
- "aria-label": z("filterJoin"),
687
+ children: R("filterJoin")
688
+ }), /* @__PURE__ */ N(ce, {
689
+ "aria-label": R("filterJoin"),
689
690
  onValueChange: (e) => I(Oe(F, e)),
690
691
  orientation: "horizontal",
691
692
  size: "sm",
692
693
  value: F.join,
693
- children: [/* @__PURE__ */ j(le, {
694
+ children: [/* @__PURE__ */ M(b, {
694
695
  value: "and",
695
696
  children: W.join("and")
696
- }), /* @__PURE__ */ j(le, {
697
+ }), /* @__PURE__ */ M(b, {
697
698
  value: "or",
698
699
  children: W.join("or")
699
700
  })]
700
701
  })]
701
702
  }), Re(1)] }) : null,
702
- /* @__PURE__ */ M("div", {
703
+ /* @__PURE__ */ N("div", {
703
704
  "data-part": "filter-actions",
704
705
  "data-part-filter-actions": "",
705
- children: [/* @__PURE__ */ j(r, {
706
- disabled: !Ce(F),
706
+ children: [/* @__PURE__ */ M(r, {
707
+ disabled: !we(F),
707
708
  onClick: (e) => J(e),
708
709
  size: "sm",
709
710
  tone: "secondary",
710
711
  variant: "ghost",
711
- children: z("filterClear")
712
- }), /* @__PURE__ */ j(r, {
712
+ children: R("filterClear")
713
+ }), /* @__PURE__ */ M(r, {
713
714
  onClick: (e) => q(e, "pointer"),
714
715
  size: "sm",
715
- children: z("filterApply")
716
+ children: R("filterApply")
716
717
  })]
717
718
  })
718
719
  ]
@@ -726,11 +727,11 @@ function X(e) {
726
727
  };
727
728
  }
728
729
  function Z(e, t) {
729
- return t ?? Te(e);
730
+ return t ?? Ee(e);
730
731
  }
731
732
  function at(e) {
732
- return /* @__PURE__ */ j(Y, {
733
- body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ j(u, {
733
+ return /* @__PURE__ */ M(Y, {
734
+ body: ({ apply: e, condition: t, setOperand: n, t: r }) => /* @__PURE__ */ M(u, {
734
735
  "aria-label": r("filterValue"),
735
736
  onChange: (e) => n(0, e.target.value),
736
737
  onKeyDown: X(e),
@@ -746,12 +747,12 @@ function at(e) {
746
747
  }
747
748
  function ot(e) {
748
749
  let { format: t, locale: n, step: r } = e;
749
- return /* @__PURE__ */ j(Y, {
750
- body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ j(A, { children: [0, 1].slice(0, H(i.operator)).map((s) => /* @__PURE__ */ j(ne, {
751
- "aria-label": H(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
750
+ return /* @__PURE__ */ M(Y, {
751
+ body: ({ apply: e, condition: i, setOperand: a, t: o }) => /* @__PURE__ */ M(j, { children: [0, 1].slice(0, V(i.operator)).map((s) => /* @__PURE__ */ M(ne, {
752
+ "aria-label": V(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
752
753
  onKeyDown: X(e),
753
754
  onValueChange: (e) => a(s, e),
754
- placeholder: H(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
755
+ placeholder: V(i.operator) === 2 ? o(s === 0 ? "filterFrom" : "filterTo") : o("filterValue"),
755
756
  size: "sm",
756
757
  value: (s === 0 ? i.value : i.end) ?? null,
757
758
  ...t === void 0 ? {} : { format: t },
@@ -765,9 +766,9 @@ function ot(e) {
765
766
  });
766
767
  }
767
768
  function st(e) {
768
- let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? L(String(e)) : null, o = (e) => F(e) ? z(e) : null;
769
- return /* @__PURE__ */ j(Y, {
770
- body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => H(s.operator) === 2 ? /* @__PURE__ */ j(_, {
769
+ let { locale: t, max: n, min: r, presets: i } = e, a = (e) => e ? ye(String(e)) : null, o = (e) => F(e) ? R(e) : null;
770
+ return /* @__PURE__ */ M(Y, {
771
+ body: ({ apply: e, condition: s, setOperand: c, setOperands: l, t: u }) => V(s.operator) === 2 ? /* @__PURE__ */ M(_, {
771
772
  messages: {
772
773
  end: u("filterTo"),
773
774
  start: u("filterFrom")
@@ -783,7 +784,7 @@ function st(e) {
783
784
  ...a(r) ? { min: a(r) } : {},
784
785
  ...a(n) ? { max: a(n) } : {},
785
786
  ...i === void 0 ? {} : { presets: i }
786
- }) : /* @__PURE__ */ j(g, {
787
+ }) : /* @__PURE__ */ M(g, {
787
788
  "aria-label": u("filterValue"),
788
789
  onKeyDown: X(e),
789
790
  onValueChange: (e) => c(0, o(e)),
@@ -803,15 +804,15 @@ function st(e) {
803
804
  function Q(e) {
804
805
  if (!e) return null;
805
806
  let t = String(e);
806
- return ye(/^\d{2}$/.test(t) ? `${t}:00` : t);
807
+ return be(/^\d{2}$/.test(t) ? `${t}:00` : t);
807
808
  }
808
809
  function $(e) {
809
810
  if (!e) return null;
810
811
  let t = String(e);
811
- return /^\d{4}-\d{2}-\d{2}$/.test(t) ? R(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? R(`${t}:00`) : R(t);
812
+ return /^\d{4}-\d{2}-\d{2}$/.test(t) ? L(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? L(`${t}:00`) : L(t);
812
813
  }
813
814
  function ct(e) {
814
- let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => ve(e) ? B(e, t ?? "minute") : null, u = {
815
+ let { granularity: t, hourCycle: n, locale: r, max: i, min: a, options: o, presets: s, step: c } = e, l = (e) => ve(e) ? z(e, t ?? "minute") : null, u = {
815
816
  ...t === void 0 ? {} : { granularity: t },
816
817
  ...n === void 0 ? {} : { hourCycle: n },
817
818
  ...r === void 0 ? {} : { locale: r },
@@ -820,8 +821,8 @@ function ct(e) {
820
821
  ...Q(a) ? { min: Q(a) } : {},
821
822
  ...Q(i) ? { max: Q(i) } : {}
822
823
  };
823
- return /* @__PURE__ */ j(Y, {
824
- body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */ j(y, {
824
+ return /* @__PURE__ */ M(Y, {
825
+ body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ M(y, {
825
826
  messages: {
826
827
  start: i("filterFrom"),
827
828
  end: i("filterTo")
@@ -834,7 +835,7 @@ function ct(e) {
834
835
  },
835
836
  ...u,
836
837
  ...s === void 0 ? {} : { presets: s }
837
- }) : /* @__PURE__ */ j(v, {
838
+ }) : /* @__PURE__ */ M(v, {
838
839
  "aria-label": i("filterValue"),
839
840
  onKeyDown: X(e),
840
841
  onValueChange: (e) => n(0, l(e)),
@@ -850,7 +851,7 @@ function ct(e) {
850
851
  });
851
852
  }
852
853
  function lt(e) {
853
- let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => I(e) ? `${z(e.date)}T${B(e.time, t ?? "minute")}` : null, u = {
854
+ let { granularity: t, hourCycle: n, locale: r, max: i, min: a, presets: o, step: s, timeZone: c } = e, l = (e) => I(e) ? `${R(e.date)}T${z(e.time, t ?? "minute")}` : null, u = {
854
855
  ...t === void 0 ? {} : { granularity: t },
855
856
  ...n === void 0 ? {} : { hourCycle: n },
856
857
  ...r === void 0 ? {} : { locale: r },
@@ -859,8 +860,8 @@ function lt(e) {
859
860
  ...$(a) ? { min: $(a) } : {},
860
861
  ...$(i) ? { max: $(i) } : {}
861
862
  };
862
- return /* @__PURE__ */ j(Y, {
863
- body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => H(t.operator) === 2 ? /* @__PURE__ */ j(te, {
863
+ return /* @__PURE__ */ M(Y, {
864
+ body: ({ apply: e, condition: t, setOperand: n, setOperands: r, t: i }) => V(t.operator) === 2 ? /* @__PURE__ */ M(te, {
864
865
  messages: {
865
866
  start: i("filterFrom"),
866
867
  end: i("filterTo")
@@ -873,7 +874,7 @@ function lt(e) {
873
874
  },
874
875
  ...u,
875
876
  ...o === void 0 ? {} : { presets: o }
876
- }) : /* @__PURE__ */ j(ee, {
877
+ }) : /* @__PURE__ */ M(ee, {
877
878
  "aria-label": i("filterValue"),
878
879
  onKeyDown: X(e),
879
880
  onValueChange: (e) => n(0, l(e)),
@@ -889,17 +890,17 @@ function lt(e) {
889
890
  });
890
891
  }
891
892
  function ut(e) {
892
- return /* @__PURE__ */ j(Y, {
893
- body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ M(ce, {
893
+ return /* @__PURE__ */ M(Y, {
894
+ body: ({ condition: e, setOperand: t, t: n }) => /* @__PURE__ */ N(ce, {
894
895
  "aria-label": n("filterValue"),
895
896
  onValueChange: (e) => t(0, e === "true"),
896
897
  orientation: "horizontal",
897
898
  size: "sm",
898
899
  value: e.value === void 0 || e.value === null ? "" : String(e.value),
899
- children: [/* @__PURE__ */ j(le, {
900
+ children: [/* @__PURE__ */ M(b, {
900
901
  value: "true",
901
902
  children: n("true")
902
- }), /* @__PURE__ */ j(le, {
903
+ }), /* @__PURE__ */ M(b, {
903
904
  value: "false",
904
905
  children: n("false")
905
906
  })]
@@ -912,14 +913,14 @@ function ut(e) {
912
913
  }
913
914
  function dt(e) {
914
915
  let { operand: t = "list", options: n = [], searchThreshold: r = 8, searchable: i } = e;
915
- return /* @__PURE__ */ j(Y, {
916
- body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ j(ft, {
916
+ return /* @__PURE__ */ M(Y, {
917
+ body: ({ announce: e, apply: a, condition: o, setOperand: s, t: c }) => t === "tags" ? /* @__PURE__ */ M(ft, {
917
918
  apply: a,
918
919
  chosen: o.value ?? [],
919
920
  onChange: (e) => s(0, e),
920
921
  options: n,
921
922
  t: c
922
- }) : /* @__PURE__ */ j(pt, {
923
+ }) : /* @__PURE__ */ M(pt, {
923
924
  announce: e,
924
925
  chosen: o.value ?? [],
925
926
  onChange: (e) => s(0, e),
@@ -936,8 +937,8 @@ function dt(e) {
936
937
  });
937
938
  }
938
939
  function ft({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
939
- let a = de(), o = O(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
940
- return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(b, {
940
+ let a = ue(), o = k(() => new Map(r.map((e) => [e.value, e])), [r]), s = r.length > 0;
941
+ return /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(x, {
941
942
  "aria-label": i("filterValue"),
942
943
  formatLabel: (e) => o.get(e)?.label ?? e,
943
944
  fullWidth: !0,
@@ -952,20 +953,20 @@ function ft({ apply: e, chosen: t, onChange: n, options: r, t: i }) {
952
953
  list: `${a}-options`,
953
954
  validate: (e) => o.has(e)
954
955
  } : {}
955
- }), s ? /* @__PURE__ */ j("datalist", {
956
+ }), s ? /* @__PURE__ */ M("datalist", {
956
957
  id: `${a}-options`,
957
- children: r.map((e) => /* @__PURE__ */ j("option", {
958
+ children: r.map((e) => /* @__PURE__ */ M("option", {
958
959
  value: e.value,
959
960
  children: e.label ?? e.value
960
961
  }, e.value))
961
962
  }) : null] });
962
963
  }
963
964
  function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold: i, searchable: a, t: o }) {
964
- let s = de(), [l, d] = k(""), f = O(() => N({ sensitivity: "base" }), []), p = (e) => e === "" ? r : r.filter((t) => f.contains(t.label ?? t.value, e)), m = p(l), h = m.filter((e) => t.includes(e.value)), g = a ?? r.length >= i;
965
- return /* @__PURE__ */ M(A, { children: [g ? /* @__PURE__ */ j("div", {
965
+ let s = ue(), [l, d] = A(""), f = k(() => P({ sensitivity: "base" }), []), p = (e) => e === "" ? r : r.filter((t) => f.contains(t.label ?? t.value, e)), m = p(l), h = m.filter((e) => t.includes(e.value)), g = a ?? r.length >= i;
966
+ return /* @__PURE__ */ N(j, { children: [g ? /* @__PURE__ */ M("div", {
966
967
  "data-part": "filter-search",
967
968
  "data-part-filter-search": "",
968
- children: /* @__PURE__ */ j(u, {
969
+ children: /* @__PURE__ */ M(u, {
969
970
  "aria-controls": `${s}-list`,
970
971
  "aria-label": o("filterSearch"),
971
972
  clearable: !0,
@@ -977,19 +978,19 @@ function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
977
978
  size: "sm",
978
979
  value: l
979
980
  })
980
- }) : null, m.length === 0 ? /* @__PURE__ */ j("p", {
981
+ }) : null, m.length === 0 ? /* @__PURE__ */ M("p", {
981
982
  "data-part": "filter-empty",
982
983
  "data-part-filter-empty": "",
983
984
  children: o("filterEmpty")
984
- }) : /* @__PURE__ */ M("div", {
985
+ }) : /* @__PURE__ */ N("div", {
985
986
  "data-part": "filter-list",
986
987
  "data-part-filter-list": "",
987
988
  id: `${s}-list`,
988
- children: [/* @__PURE__ */ M("div", {
989
+ children: [/* @__PURE__ */ N("div", {
989
990
  "data-covering": "",
990
991
  "data-part": "filter-option",
991
992
  "data-part-filter-option": "",
992
- children: [/* @__PURE__ */ j(c, {
993
+ children: [/* @__PURE__ */ M(c, {
993
994
  checked: h.length > 0 && h.length === m.length,
994
995
  indeterminate: h.length > 0 && h.length < m.length,
995
996
  onCheckedChange: (e) => {
@@ -997,18 +998,18 @@ function pt({ announce: e, chosen: t, onChange: n, options: r, searchThreshold:
997
998
  n(e ? [.../* @__PURE__ */ new Set([...t, ...r])] : t.filter((e) => !r.includes(e)));
998
999
  },
999
1000
  children: o("filterSelectAll")
1000
- }), /* @__PURE__ */ j("span", {
1001
+ }), /* @__PURE__ */ M("span", {
1001
1002
  "data-count": "",
1002
1003
  children: m.length
1003
1004
  })]
1004
- }), m.map((e) => /* @__PURE__ */ M("div", {
1005
+ }), m.map((e) => /* @__PURE__ */ N("div", {
1005
1006
  "data-part": "filter-option",
1006
1007
  "data-part-filter-option": "",
1007
- children: [/* @__PURE__ */ j(c, {
1008
+ children: [/* @__PURE__ */ M(c, {
1008
1009
  checked: t.includes(e.value),
1009
1010
  onCheckedChange: (r) => n(r ? [...t, e.value] : t.filter((t) => t !== e.value)),
1010
1011
  children: e.label ?? e.value
1011
- }), e.count === void 0 ? null : /* @__PURE__ */ j("span", {
1012
+ }), e.count === void 0 ? null : /* @__PURE__ */ M("span", {
1012
1013
  "data-count": "",
1013
1014
  children: e.count
1014
1015
  })]