@stackone/malachite 2.101.1 → 2.103.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.
@@ -1,35 +1,38 @@
1
- import { jsxs as h, Fragment as X, jsx as o } from "react/jsx-runtime";
2
- import { useId as Qe, useState as j, useRef as w, useEffect as O, useMemo as U, useCallback as Q, useLayoutEffect as Ne, useInsertionEffect as et } from "react";
3
- import { createPortal as tt } from "react-dom";
4
- import rt from "./CustomIcons/CaretDownIcon.js";
5
- import nt from "./CustomIcons/CheckmarkIcon.js";
6
- import Ie from "./CustomIcons/DismissIcon.js";
7
- import Me from "./CustomIcons/SearchIcon.js";
8
- import it from "./Spinner.js";
9
- import { CONTROL_TEXT_SIZE_CLASS as oe, CONTROL_TEXT_SIZE as ot } from "./controlTextSize.js";
10
- import { controlWidthStyle as lt } from "./controlWidth.js";
11
- import { getTriggerVisual as st, DROPDOWN_TRIGGER_ATTR as at } from "./dropdownTriggerStyle.js";
12
- import { pushEscapeLayer as ct } from "./escapeLayers.js";
13
- import { orderSelections as dt, resolveMode as pt, openFilterOf as ut, filterRows as Te, searchRows as mt, chipText as ft, removeFilter as ht, clearAll as gt, commitText as xt, selectAll as bt, deselectAll as vt, toggleValue as yt } from "./filterSearchModel.js";
14
- import { ensureFilterSearchStyles as wt, FILTER_SEARCH_CLASS as $ } from "./filterSearchStyles.js";
15
- import { measureMenuGeometry as kt, MENU_MAX_HEIGHT_PX as St, MENU_SPECS as V } from "./floatingMenuGeometry.js";
16
- import { FOCUS_RING as le } from "./focusRing.js";
17
- import { usePopupLayer as Et } from "./overlayLayers.js";
18
- import { useTopLayer as Rt } from "./topLayer.js";
19
- import { useFollowTrigger as Ct } from "./useFollowTrigger.js";
20
- import { useLatestRef as $e } from "./useLatestRef.js";
21
- const Nt = {
22
- small: `min-h-[var(--malachite-control-height-small,28px)] gap-1 px-2.5 py-[2px] ${oe.small} rounded-[var(--malachite-radius-10,10px)]`,
23
- medium: `min-h-[var(--malachite-control-height-medium,32px)] gap-1 px-3 py-[3px] ${oe.medium} rounded-xl`,
24
- large: `min-h-[var(--malachite-control-height-large,42px)] gap-1.5 px-4 py-[6px] ${oe.large} rounded-[var(--malachite-radius-xxl,14px)]`
25
- }, It = {
1
+ import { jsxs as m, Fragment as Z, jsx as l } from "react/jsx-runtime";
2
+ import ft, { useId as ht, useState as z, useRef as w, useEffect as W, useMemo as q, useCallback as ne, useLayoutEffect as Pe, useInsertionEffect as gt } from "react";
3
+ import { createPortal as xt } from "react-dom";
4
+ import bt from "./CustomIcons/CaretDownIcon.js";
5
+ import vt from "./CustomIcons/CheckmarkIcon.js";
6
+ import ze from "./CustomIcons/DismissIcon.js";
7
+ import yt from "./CustomIcons/FilterIcon.js";
8
+ import Be from "./CustomIcons/SearchIcon.js";
9
+ import We from "./Spinner.js";
10
+ import { CONTROL_TEXT_SIZE_CLASS as de, CONTROL_TEXT_SIZE as wt } from "./controlTextSize.js";
11
+ import { controlWidthStyle as kt } from "./controlWidth.js";
12
+ import { getTriggerVisual as St, DROPDOWN_TRIGGER_ATTR as Nt } from "./dropdownTriggerStyle.js";
13
+ import { pushEscapeLayer as Rt } from "./escapeLayers.js";
14
+ import { orderSelections as It, resolveMode as $t, openFilterOf as Et, filterRows as Ge, searchRows as Ct, chipText as Tt, removeFilter as _t, commitText as Lt, selectAll as At, deselectAll as Dt, toggleValue as Mt, clearAll as Ht } from "./filterSearchModel.js";
15
+ import { ensureFilterSearchStyles as Ft, FILTER_SEARCH_CLASS as L } from "./filterSearchStyles.js";
16
+ import { measureMenuGeometry as Ot, MENU_MAX_HEIGHT_PX as Pt, MENU_SPECS as B } from "./floatingMenuGeometry.js";
17
+ import { FOCUS_RING_INSET as Ue, FOCUS_RING as Ve } from "./focusRing.js";
18
+ import { usePopupLayer as zt } from "./overlayLayers.js";
19
+ import { useTopLayer as Wt } from "./topLayer.js";
20
+ import { useFollowTrigger as Gt } from "./useFollowTrigger.js";
21
+ import { useLatestRef as ue } from "./useLatestRef.js";
22
+ const Ut = {
23
+ small: `min-h-[var(--malachite-control-height-small,28px)] gap-1 px-2.5 py-[2px] ${de.small} rounded-[var(--malachite-radius-10,10px)]`,
24
+ medium: `min-h-[var(--malachite-control-height-medium,32px)] gap-1 px-3 py-[3px] ${de.medium} rounded-xl`,
25
+ large: `min-h-[var(--malachite-control-height-large,42px)] gap-1.5 px-4 py-[6px] ${de.large} rounded-[var(--malachite-radius-xxl,14px)]`
26
+ }, Vt = {
26
27
  small: "gap-1",
27
28
  medium: "gap-1",
28
29
  large: "gap-1.5"
29
- }, se = {
30
- resting: "bg-[var(--malachite-tag-default-background,rgba(123,123,123,0.1))] text-[var(--malachite-text-primary,rgb(10,10,10))]",
31
- active: "bg-[var(--malachite-accent-background,rgb(0,175,102))] text-[var(--malachite-card-background,rgb(255,255,255))]"
32
- }, Tt = 5, ae = (i) => !!i && !(i.kind === "item" && i.row.item.disabled), $t = (i) => {
30
+ }, je = "bg-[var(--malachite-card-background,rgb(255,255,255))] text-[var(--malachite-text-primary,rgb(10,10,10))]", _ = {
31
+ resting: `border-[var(--malachite-card-border,rgb(232,232,232))] ${je}`,
32
+ active: `border-[var(--malachite-accent-background,rgb(0,175,102))] ${je}`,
33
+ muted: "bg-[var(--malachite-tag-default-background,rgba(123,123,123,0.1))] text-[var(--malachite-text-secondary,rgb(123,123,123))]",
34
+ divider: "border-0 border-r border-solid border-[var(--malachite-card-border,rgb(232,232,232))]"
35
+ }, jt = 5, Xt = 440, Kt = 2, me = (i) => !!i && !(i.kind === "item" && i.row.item.disabled), qt = (i) => {
33
36
  switch (i.kind) {
34
37
  case "text":
35
38
  return "text";
@@ -40,11 +43,11 @@ const Nt = {
40
43
  case "item":
41
44
  return `item:${i.row.filter.value}:${i.row.item.value}`;
42
45
  }
43
- }, Dt = (i, x) => {
44
- for (let l = Math.max(x, 0); l < i.length; l++)
45
- if (ae(i[l])) return l;
46
+ }, Bt = (i, y) => {
47
+ for (let o = Math.max(y, 0); o < i.length; o++)
48
+ if (me(i[o])) return o;
46
49
  return -1;
47
- }, At = {
50
+ }, Zt = {
48
51
  display: "flex",
49
52
  alignItems: "center",
50
53
  gap: 8,
@@ -57,38 +60,43 @@ const Nt = {
57
60
  font: "inherit",
58
61
  cursor: "pointer",
59
62
  minWidth: 0
60
- }, De = {
63
+ }, Xe = {
61
64
  borderRadius: 6,
62
65
  padding: "2px 6px",
63
66
  flexShrink: 0,
64
67
  whiteSpace: "nowrap"
65
- }, q = {
68
+ }, Y = {
66
69
  overflow: "hidden",
67
70
  textOverflow: "ellipsis",
68
71
  whiteSpace: "nowrap",
69
72
  minWidth: 0
70
- }, Ae = { ...q, marginLeft: "auto", flexShrink: 1 }, Le = (i) => i.preventDefault(), Lt = (i) => {
73
+ }, Ke = { ...Y, marginLeft: "auto", flexShrink: 1 }, Yt = {
74
+ display: "inline-flex",
75
+ alignItems: "center",
76
+ flexShrink: 0
77
+ }, qe = (i) => i.preventDefault(), Jt = (i) => {
71
78
  i.preventDefault(), i.stopPropagation();
72
- }, Mt = ({ row: i, showFilter: x }) => {
79
+ }, Qt = ({ row: i, showFilter: y }) => {
73
80
  if (i.kind === "text")
74
- return /* @__PURE__ */ h(X, { children: [
75
- /* @__PURE__ */ o(Me, { size: 13, style: { flexShrink: 0 } }),
76
- /* @__PURE__ */ o("span", { style: q, children: `${i.label} "${i.text}"` })
81
+ return /* @__PURE__ */ m(Z, { children: [
82
+ /* @__PURE__ */ l(Be, { size: 13, style: { flexShrink: 0 } }),
83
+ /* @__PURE__ */ l("span", { style: Y, children: `${i.label} "${i.text}"` })
77
84
  ] });
78
85
  if (i.kind === "filter")
79
- return /* @__PURE__ */ h(X, { children: [
80
- /* @__PURE__ */ o("span", { className: $.pill, style: De, children: i.filter.label }),
81
- i.filter.info && /* @__PURE__ */ o("span", { style: q, children: i.filter.info }),
82
- i.filter.example && /* @__PURE__ */ o("span", { className: $.hint, style: Ae, children: i.filter.example })
86
+ return /* @__PURE__ */ m(Z, { children: [
87
+ /* @__PURE__ */ l("span", { className: L.pill, style: Xe, children: i.filter.label }),
88
+ i.filter.info && /* @__PURE__ */ l("span", { style: Y, children: i.filter.info }),
89
+ i.filter.example && /* @__PURE__ */ l("span", { className: L.hint, style: Ke, children: i.filter.example })
83
90
  ] });
84
91
  if (i.kind === "toggle")
85
- return /* @__PURE__ */ o("span", { style: { color: "var(--malachite-text-primary, rgb(10, 10, 10))" }, children: i.toggle === "select" ? "Select All" : "Deselect All" });
86
- const { item: l, filter: D, selected: H } = i.row;
87
- return /* @__PURE__ */ h(X, { children: [
88
- x && /* @__PURE__ */ o("span", { className: $.pill, style: De, children: D.label }),
89
- /* @__PURE__ */ o("span", { style: q, children: l.label }),
90
- H ? /* @__PURE__ */ o(
91
- nt,
92
+ return /* @__PURE__ */ l("span", { style: { color: "var(--malachite-text-primary, rgb(10, 10, 10))" }, children: i.toggle === "select" ? "Select All" : "Deselect All" });
93
+ const { item: o, filter: A, selected: G } = i.row;
94
+ return /* @__PURE__ */ m(Z, { children: [
95
+ y && /* @__PURE__ */ l("span", { className: L.pill, style: Xe, children: A.label }),
96
+ o.icon && /* @__PURE__ */ l("span", { style: Yt, children: o.icon }),
97
+ /* @__PURE__ */ l("span", { style: Y, children: o.label }),
98
+ G ? /* @__PURE__ */ l(
99
+ vt,
92
100
  {
93
101
  size: 16,
94
102
  style: {
@@ -97,317 +105,404 @@ const Nt = {
97
105
  color: "var(--malachite-accent-background, rgb(0, 175, 102))"
98
106
  }
99
107
  }
100
- ) : x && D.info && /* @__PURE__ */ o("span", { className: $.hint, style: Ae, children: D.info })
108
+ ) : y && A.info && /* @__PURE__ */ l("span", { className: L.hint, style: Ke, children: A.info })
101
109
  ] });
102
- }, tr = ({
110
+ }, wr = ({
103
111
  filters: i,
104
- searchFilters: x,
105
- value: l,
106
- onChange: D,
107
- onClear: H,
108
- onActiveFilterChange: _e,
109
- onQueryChange: Oe,
110
- textFilter: A,
111
- placeholder: ee = "Search",
112
- size: te = "medium",
113
- width: He,
114
- loading: u = !1,
115
- disabled: m = !1,
116
- clearable: Pe = !1,
117
- maxVisibleChips: ze = 4,
118
- className: We = "",
119
- style: Fe,
120
- id: Ge,
121
- "aria-label": ce,
122
- "aria-labelledby": de
112
+ searchFilters: y,
113
+ value: o,
114
+ onChange: A,
115
+ onClear: G,
116
+ onActiveFilterChange: Ze,
117
+ onQueryChange: Ye,
118
+ textFilter: D,
119
+ placeholder: ie = "Search",
120
+ size: le = "medium",
121
+ width: Je,
122
+ loading: g = !1,
123
+ disabled: f = !1,
124
+ clearable: Qe = !1,
125
+ maxVisibleChips: et = 4,
126
+ filtersButton: M = !1,
127
+ className: tt = "",
128
+ style: rt,
129
+ id: nt,
130
+ "aria-label": pe,
131
+ "aria-labelledby": fe
123
132
  }) => {
124
- var Ce;
125
- const pe = Qe(), ue = `${pe}-listbox`, me = (e) => `${pe}-option-${e}`, [a, re] = j(!1), [d, b] = j(""), k = $e(Oe), ne = w("");
126
- O(() => {
133
+ var Oe;
134
+ const he = ht(), ge = `${he}-listbox`, xe = (e) => `${he}-option-${e}`, [c, J] = z(!1), [p, k] = z(""), N = ue(Ye), oe = w("");
135
+ W(() => {
127
136
  var e;
128
- ne.current !== d && (ne.current = d, (e = k.current) == null || e.call(k, d));
129
- }, [d, k]), O(
137
+ oe.current !== p && (oe.current = p, (e = N.current) == null || e.call(N, p));
138
+ }, [p, N]), W(
130
139
  () => () => {
131
140
  var e;
132
- ne.current !== "" && ((e = k.current) == null || e.call(k, ""));
141
+ oe.current !== "" && ((e = N.current) == null || e.call(N, ""));
133
142
  },
134
- [k]
143
+ [N]
135
144
  );
136
- const [c, je] = j(null), [fe, f] = j(0), [p, he] = j(null), C = w(null), P = w(null), S = w(null), B = w(null), ge = w([]);
137
- Rt(S, a);
138
- const Ue = Et("multiselect", a, S), xe = w(/* @__PURE__ */ new Map()), z = U(() => {
139
- var t;
140
- const e = new Map(xe.current);
141
- for (const n of [...x ?? [], ...i]) {
142
- const r = ((t = e.get(n.value)) == null ? void 0 : t.items) ?? /* @__PURE__ */ new Map();
145
+ const [d, it] = z(null), [be, x] = z(0), [h, ve] = z(null), [Q, se] = z(!1), C = w(null), ye = w(null), H = w(null), R = w(null), ee = w(null), we = w([]);
146
+ Wt(R, c);
147
+ const lt = zt("multiselect", c, R), ke = w(/* @__PURE__ */ new Map()), U = q(() => {
148
+ const e = new Map(ke.current), t = /* @__PURE__ */ new Set();
149
+ for (const n of [...y ?? [], ...i]) {
150
+ const r = e.get(n.value), a = new Map(r == null ? void 0 : r.items), s = new Map(r == null ? void 0 : r.icons);
151
+ for (const u of n.items) {
152
+ a.set(u.value, u.label);
153
+ const v = `${n.value}\0${u.value}`;
154
+ u.icon ? (s.set(u.value, u.icon), t.add(v)) : t.has(v) || s.delete(u.value);
155
+ }
143
156
  e.set(n.value, {
144
157
  label: n.label,
145
- items: new Map([
146
- ...r,
147
- ...n.items.map((s) => [s.value, s.label])
148
- ])
158
+ chipLabel: n.chipLabel !== !1,
159
+ items: a,
160
+ icons: s
149
161
  });
150
162
  }
151
163
  return e;
152
- }, [i, x]);
153
- O(() => {
154
- xe.current = z;
155
- }, [z]);
156
- const be = w([]), W = U(
157
- () => dt(l, be.current, c),
158
- [l, c]
164
+ }, [i, y]);
165
+ W(() => {
166
+ ke.current = U;
167
+ }, [U]);
168
+ const Se = w([]), V = q(
169
+ () => It(o, Se.current, d),
170
+ [o, d]
159
171
  );
160
- O(() => {
161
- be.current = W;
162
- }, [W]);
163
- const g = pt(c, d), ie = x ?? i, N = U(
164
- () => ut(c, i, x, l),
165
- [c, i, x, l]
166
- ), ve = w(c), K = $e(_e), E = Q(
172
+ W(() => {
173
+ Se.current = V;
174
+ }, [V]);
175
+ const b = $t(d, p), ae = y ?? i, T = q(
176
+ () => Et(d, i, y, o),
177
+ [d, i, y, o]
178
+ ), Ne = w(d), te = ue(Ze), I = ne(
167
179
  (e) => {
168
180
  var t;
169
- ve.current !== e && (ve.current = e, je(e), (t = K.current) == null || t.call(K, e));
181
+ Ne.current !== e && (Ne.current = e, it(e), (t = te.current) == null || t.call(te, e));
170
182
  },
171
- [K]
172
- ), F = A == null ? void 0 : A.value, L = A == null ? void 0 : A.label, v = U(() => {
173
- if (u) return [];
174
- if (g === "filters") return i.map((r) => ({ kind: "filter", filter: r }));
175
- const { toggle: e, items: t } = g === "items" ? Te(N, l, d) : mt(ie, l, d);
183
+ [te]
184
+ ), F = D == null ? void 0 : D.value, j = D == null ? void 0 : D.label, S = q(() => {
185
+ if (g) return [];
186
+ if (b === "filters") return i.map((r) => ({ kind: "filter", filter: r }));
187
+ const { toggle: e, items: t } = b === "items" ? Ge(T, o, p) : Ct(ae, o, p);
176
188
  return [
177
- ...g === "search" && L !== void 0 ? [{ kind: "text", label: L, text: d.trim() }] : [],
189
+ ...b === "search" && j !== void 0 ? [{ kind: "text", label: j, text: p.trim() }] : [],
178
190
  ...e ? [{ kind: "toggle", toggle: e }] : [],
179
191
  ...t.map((r) => ({ kind: "item", row: r }))
180
192
  ];
181
- }, [u, g, i, ie, N, l, d, L]), Z = U(() => {
182
- const e = new Map(l.map((r) => [r.filter, r.items])), t = (r) => {
183
- const s = r === F && L !== void 0 ? { label: L, items: /* @__PURE__ */ new Map() } : z.get(r), y = e.get(r);
184
- if (!y)
185
- return r === c ? [{ filter: r, text: (s == null ? void 0 : s.label) ?? r }] : [];
186
- if (!s && u) return [];
187
- const T = y.map((R) => (s == null ? void 0 : s.items.get(R)) ?? R);
188
- return [{ filter: r, text: ft((s == null ? void 0 : s.label) ?? r, T) }];
189
- }, n = c !== null && !W.includes(c);
190
- return [...W, ...n ? [c] : []].flatMap(t);
191
- }, [W, l, z, u, c, F, L]), ye = Z.slice(0, ze), we = Z.length - ye.length, G = Q(
193
+ }, [g, b, i, ae, T, o, p, j]), re = q(() => {
194
+ const e = new Map(o.map((r) => [r.filter, r.items])), t = (r) => {
195
+ const a = r === F, s = a ? void 0 : U.get(r), u = a ? j ?? r : (s == null ? void 0 : s.label) ?? r, v = e.get(r);
196
+ if (!v)
197
+ return r === d ? [{ filter: r, text: u, label: u, values: [] }] : [];
198
+ if (!a && !s && g) return [];
199
+ const E = v.map((P) => ({
200
+ value: P,
201
+ label: (s == null ? void 0 : s.items.get(P)) ?? P,
202
+ icon: s == null ? void 0 : s.icons.get(P)
203
+ }));
204
+ return [
205
+ {
206
+ filter: r,
207
+ text: Tt(
208
+ u,
209
+ E.map((P) => P.label)
210
+ ),
211
+ // With no values to show, the chip keeps its name rather than drawing empty.
212
+ label: (s == null ? void 0 : s.chipLabel) === !1 && E.length > 0 ? null : u,
213
+ values: E
214
+ }
215
+ ];
216
+ }, n = d !== null && !V.includes(d);
217
+ return [...V, ...n ? [d] : []].flatMap(t);
218
+ }, [V, o, U, g, d, F, j]), Re = re.slice(0, et), Ie = re.length - Re.length, X = ne(
192
219
  ({ next: e, changes: t }) => {
193
- t.length > 0 && D(e, t);
220
+ t.length > 0 && A(e, t);
194
221
  },
195
- [D]
196
- ), I = Q(() => {
197
- re(!1), b(""), E(null), he(null);
198
- }, [E]), Y = () => {
199
- m || a || (f(0), re(!0));
200
- }, M = Q(() => {
222
+ [A]
223
+ ), $ = ne(() => {
224
+ J(!1), k(""), I(null), ve(null), se(!1);
225
+ }, [I]), ce = () => {
226
+ f || c || (x(0), J(!0));
227
+ }, K = ne(() => {
201
228
  const e = C.current;
202
- e && he(
203
- kt(S.current, {
204
- triggerRect: e.getBoundingClientRect(),
229
+ if (!e) return;
230
+ const t = e.getBoundingClientRect(), n = Q ? ye.current : null, r = n == null ? void 0 : n.getBoundingClientRect();
231
+ ve(
232
+ Ot(R.current, {
233
+ // The field's edges top and bottom, so the menu clears the bar however tall it wraps.
234
+ triggerRect: r ? {
235
+ top: t.top,
236
+ bottom: t.bottom,
237
+ left: r.left,
238
+ right: r.right,
239
+ width: r.width
240
+ } : t,
205
241
  preset: "standard",
242
+ ...r && { minWidth: Xt, align: "right" },
206
243
  viewportWidth: window.innerWidth,
207
244
  viewportHeight: window.innerHeight
208
245
  })
209
246
  );
210
- }, []);
211
- Ct(a, C, M, I), O(() => {
212
- m && a && I();
213
- }, [m, a, I]), O(() => {
214
- if (!a) return;
215
- const e = (s) => {
216
- const y = s.composedPath(), T = C.current, R = S.current;
217
- (!T || !y.includes(T)) && (!R || !y.includes(R)) && I();
247
+ }, [Q]), $e = ue(K);
248
+ Gt(c, C, K, $), W(() => {
249
+ f && c && $();
250
+ }, [f, c, $]), W(() => {
251
+ if (!c) return;
252
+ const e = (a) => {
253
+ const s = a.composedPath(), u = C.current, v = R.current;
254
+ (!u || !s.includes(u)) && (!v || !s.includes(v)) && $();
218
255
  };
219
256
  let t = null;
220
257
  const n = () => {
221
258
  t === null && (t = requestAnimationFrame(() => {
222
- t = null, M();
259
+ t = null, $e.current();
223
260
  }));
224
- }, r = ct(I);
261
+ }, r = Rt($);
225
262
  return document.addEventListener("mousedown", e), window.addEventListener("resize", n), () => {
226
263
  document.removeEventListener("mousedown", e), window.removeEventListener("resize", n), t !== null && cancelAnimationFrame(t), r();
227
264
  };
228
- }, [a, I, M]), Ne(() => {
229
- if (!a || (M(), typeof ResizeObserver > "u")) return;
230
- const e = new ResizeObserver(() => M());
231
- return S.current && e.observe(S.current), C.current && e.observe(C.current), () => e.disconnect();
232
- }, [a, M]), Ne(() => {
233
- B.current && (B.current.scrollTop = 0);
234
- }, [g, c, d]), et(() => {
235
- a && wt();
236
- }, [a]);
237
- const ke = (e) => {
265
+ }, [c, $, $e]), Pe(() => {
266
+ if (!c || (K(), typeof ResizeObserver > "u")) return;
267
+ const e = new ResizeObserver(() => K());
268
+ return R.current && e.observe(R.current), C.current && e.observe(C.current), () => e.disconnect();
269
+ }, [c, K]), Pe(() => {
270
+ ee.current && (ee.current.scrollTop = 0);
271
+ }, [b, d, p]), gt(() => {
272
+ c && Ft();
273
+ }, [c]);
274
+ const Ee = (e) => {
238
275
  requestAnimationFrame(() => {
239
- const t = ge.current[e], n = B.current;
276
+ const t = we.current[e], n = ee.current;
240
277
  if (!t || !n) return;
241
- const r = t.offsetTop, s = r + t.offsetHeight;
242
- s > n.scrollTop + n.clientHeight ? n.scrollTop = s - n.clientHeight : r < n.scrollTop && (n.scrollTop = r);
278
+ const r = t.offsetTop, a = r + t.offsetHeight;
279
+ a > n.scrollTop + n.clientHeight ? n.scrollTop = a - n.clientHeight : r < n.scrollTop && (n.scrollTop = r);
243
280
  });
244
- }, Se = (e) => {
281
+ }, Ce = (e) => {
245
282
  if (e.kind === "text") {
246
- F !== void 0 && G(xt(l, F, e.text)), b(""), f(0);
283
+ F !== void 0 && X(Lt(o, F, e.text)), k(""), x(0);
247
284
  return;
248
285
  }
249
286
  if (e.kind === "filter") {
250
- E(e.filter.value), b(""), f(0);
287
+ I(e.filter.value), k(""), x(0);
251
288
  return;
252
289
  }
253
290
  if (e.kind === "toggle") {
254
- const J = g === "items" && N ? [N] : ie;
255
- G(
256
- e.toggle === "select" ? bt(J, l, d) : vt(J, l, d)
257
- ), b(""), f(0);
291
+ const E = b === "items" && T ? [T] : ae;
292
+ X(
293
+ e.toggle === "select" ? At(E, o, p) : Dt(E, o, p)
294
+ ), k(""), x(0);
258
295
  return;
259
296
  }
260
297
  const { item: t, filter: n } = e.row;
261
298
  if (t.disabled) return;
262
- const r = yt(l, n.value, t.value);
263
- if (G(r), b(""), g !== "items") {
264
- f(0);
299
+ const r = Mt(o, n.value, t.value);
300
+ if (X(r), k(""), b !== "items") {
301
+ x(0);
265
302
  return;
266
303
  }
267
- const { toggle: s, items: y } = Te(n, r.next, ""), T = y.findIndex((J) => J.item.value === t.value), R = T < 0 ? 0 : T + (s ? 1 : 0);
268
- f(R), ke(R);
269
- }, Ve = (e) => {
270
- if (v.length === 0) return;
271
- let t = _ < 0 ? fe : _;
272
- for (let n = 0; n < v.length; n++)
273
- if (t = (t + e + v.length) % v.length, ae(v[t])) {
274
- f(t), ke(t);
304
+ const { toggle: a, items: s } = Ge(n, r.next, ""), u = s.findIndex((E) => E.item.value === t.value), v = u < 0 ? 0 : u + (a ? 1 : 0);
305
+ x(v), Ee(v);
306
+ }, ot = (e) => {
307
+ if (S.length === 0) return;
308
+ let t = O < 0 ? be : O;
309
+ for (let n = 0; n < S.length; n++)
310
+ if (t = (t + e + S.length) % S.length, me(S[t])) {
311
+ x(t), Ee(t);
275
312
  return;
276
313
  }
277
- }, Ee = (e) => {
278
- e === c && E(null), G(ht(l, e));
279
- }, Xe = (e) => {
314
+ }, Te = (e) => {
315
+ e === d && I(null), X(_t(o, e));
316
+ }, st = (e) => {
280
317
  var n, r;
281
- if (m || u) return;
282
- const t = e === F ? (n = l.find((s) => s.filter === e)) == null ? void 0 : n.items[0] : void 0;
283
- E(t === void 0 ? e : null), b(t ?? ""), f(0), re(!0), (r = P.current) == null || r.focus();
284
- }, qe = (e) => {
318
+ if (f || g) return;
319
+ const t = e === F ? (n = o.find((a) => a.filter === e)) == null ? void 0 : n.items[0] : void 0;
320
+ I(t === void 0 ? e : null), k(t ?? ""), x(0), se(!1), J(!0), (r = H.current) == null || r.focus();
321
+ }, at = (e) => {
285
322
  if (!(e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229))
286
323
  switch (e.key) {
287
324
  case "ArrowDown":
288
325
  case "ArrowUp": {
289
- if (e.preventDefault(), !a) {
290
- Y();
326
+ if (e.preventDefault(), !c) {
327
+ Ae();
291
328
  return;
292
329
  }
293
- Ve(e.key === "ArrowDown" ? 1 : -1);
330
+ ot(e.key === "ArrowDown" ? 1 : -1);
294
331
  return;
295
332
  }
296
333
  case "Enter": {
297
- if (e.preventDefault(), !a) {
298
- Y();
334
+ if (e.preventDefault(), !c) {
335
+ Ae();
299
336
  return;
300
337
  }
301
- const t = v[_];
302
- ae(t) && Se(t);
338
+ const t = S[O];
339
+ me(t) && Ce(t);
303
340
  return;
304
341
  }
305
342
  case "Backspace": {
306
- if (d !== "") return;
307
- if (c !== null && !l.some((s) => s.filter === c)) {
308
- e.preventDefault(), E(null), f(0);
343
+ if (p !== "") return;
344
+ if (d !== null && !o.some((a) => a.filter === d)) {
345
+ e.preventDefault(), I(null), x(0);
309
346
  return;
310
347
  }
311
- const n = Z.filter((s) => l.some((y) => y.filter === s.filter)), r = n[n.length - 1];
348
+ const n = re.filter((a) => o.some((s) => s.filter === a.filter)), r = n[n.length - 1];
312
349
  if (!r) return;
313
- e.preventDefault(), Ee(r.filter);
350
+ e.preventDefault(), Te(r.filter);
314
351
  return;
315
352
  }
316
353
  }
317
- }, Be = (e) => {
318
- e.stopPropagation(), G(gt(l)), E(null), b(""), H == null || H();
319
- }, Ke = () => {
320
- E(null), b(""), f(0);
321
- }, Re = Pe && l.length > 0 && !m && !u, _ = a ? Dt(v, fe) : -1, Ze = st({ disabled: m, open: a }), Ye = g === "filters" ? "No filters available" : "No matching values", Je = {
354
+ }, ct = (e) => {
355
+ e.stopPropagation(), X(Ht(o)), I(null), k(""), G == null || G();
356
+ }, _e = () => {
357
+ I(null), k(""), x(0);
358
+ }, Le = () => {
359
+ _e(), se(!0), J(!0);
360
+ }, dt = () => {
361
+ var e;
362
+ if (c && Q && d === null && p === "") {
363
+ $();
364
+ return;
365
+ }
366
+ Le(), (e = H.current) == null || e.focus();
367
+ }, Ae = () => {
368
+ M ? Le() : ce();
369
+ }, De = o.filter(
370
+ (e) => e.filter !== F && e.items.length > 0
371
+ ).length, Me = Qe && o.length > 0 && !f && !g, O = c ? Bt(S, be) : -1, ut = St({ disabled: f, open: c }), He = (e) => ({
372
+ "aria-haspopup": "listbox",
373
+ "aria-expanded": e,
374
+ "aria-controls": e ? ge : void 0
375
+ }), Fe = Me && /* @__PURE__ */ l(
376
+ "button",
377
+ {
378
+ type: "button",
379
+ "aria-label": "Clear filters",
380
+ onMouseDown: qe,
381
+ onClick: ct,
382
+ className: `${M ? "" : "absolute top-0 bottom-0 right-[30px] "}flex items-center justify-center px-[2px] bg-transparent border-none text-[var(--malachite-text-placeholder,rgb(187,187,187))] hover:text-[var(--malachite-text-primary,rgb(10,10,10))] cursor-pointer ${Ve}`,
383
+ children: /* @__PURE__ */ l(ze, { size: 10 })
384
+ }
385
+ ), mt = b === "filters" ? "No filters available" : "No matching values", pt = {
322
386
  position: "fixed",
323
- top: (p == null ? void 0 : p.top) ?? 0,
324
- left: (p == null ? void 0 : p.left) ?? 0,
325
- width: p == null ? void 0 : p.width,
326
- background: V.standard.background,
327
- border: V.standard.border,
328
- borderRadius: V.standard.radius,
329
- boxShadow: V.standard.shadow,
330
- padding: V.standard.padding,
387
+ top: (h == null ? void 0 : h.top) ?? 0,
388
+ left: (h == null ? void 0 : h.left) ?? 0,
389
+ width: h == null ? void 0 : h.width,
390
+ background: B.standard.background,
391
+ border: B.standard.border,
392
+ borderRadius: B.standard.radius,
393
+ boxShadow: B.standard.shadow,
394
+ padding: B.standard.padding,
331
395
  display: "flex",
332
396
  flexDirection: "column",
333
397
  gap: 4,
334
- maxHeight: (p == null ? void 0 : p.maxHeight) ?? St,
335
- fontSize: ot[te],
336
- visibility: p ? "visible" : "hidden",
337
- opacity: p ? 1 : 0
398
+ maxHeight: (h == null ? void 0 : h.maxHeight) ?? Pt,
399
+ fontSize: wt[le],
400
+ visibility: h ? "visible" : "hidden",
401
+ opacity: h ? 1 : 0
338
402
  };
339
- return /* @__PURE__ */ h(X, { children: [
340
- /* @__PURE__ */ h(
403
+ return /* @__PURE__ */ m(Z, { children: [
404
+ /* @__PURE__ */ m(
341
405
  "div",
342
406
  {
343
- className: `relative min-w-0 ${We}`,
344
- style: { ...lt(He), ...Fe },
407
+ className: `relative min-w-0 ${tt}`,
408
+ style: { ...kt(Je), ...rt },
345
409
  children: [
346
- /* @__PURE__ */ h(
410
+ /* @__PURE__ */ m(
347
411
  "div",
348
412
  {
349
413
  ref: C,
350
- [at]: "",
351
- "data-open": a || void 0,
414
+ [Nt]: "",
415
+ "data-open": c || void 0,
352
416
  onBlur: (e) => {
353
417
  var n, r;
354
418
  const t = e.relatedTarget;
355
- t && ((n = C.current) != null && n.contains(t) || (r = S.current) != null && r.contains(t)) || I();
419
+ t && ((n = C.current) != null && n.contains(t) || (r = R.current) != null && r.contains(t)) || $();
356
420
  },
357
421
  onMouseDown: (e) => {
358
422
  var t;
359
- m || (e.target !== P.current && e.preventDefault(), (t = P.current) == null || t.focus(), Y());
423
+ f || (e.target !== H.current && e.preventDefault(), (t = H.current) == null || t.focus(), M || ce());
360
424
  },
361
425
  style: {
362
426
  transition: "border-color 0.15s ease, box-shadow 0.15s ease",
363
- ...Ze
427
+ ...ut
364
428
  },
365
- className: `w-full min-w-0 flex items-center border border-solid font-normal ${Nt[te]} ${m ? "cursor-not-allowed" : "cursor-text"}`,
429
+ className: `w-full min-w-0 flex items-center border border-solid font-normal ${Ut[le]} ${f ? "cursor-not-allowed" : "cursor-text"}`,
366
430
  children: [
367
- /* @__PURE__ */ o(
368
- Me,
431
+ /* @__PURE__ */ l(
432
+ Be,
369
433
  {
370
434
  size: 13,
371
435
  className: "shrink-0 mr-1",
372
436
  style: { color: "var(--malachite-text-placeholder, rgb(187, 187, 187))" }
373
437
  }
374
438
  ),
375
- /* @__PURE__ */ h(
439
+ /* @__PURE__ */ m(
376
440
  "div",
377
441
  {
378
- className: `flex flex-1 min-w-0 flex-wrap items-center ${It[te]} ${Re ? "pr-[18px]" : ""}`,
442
+ className: `flex flex-1 min-w-0 flex-wrap items-center ${Vt[le]} ${Me && !M ? "pr-[18px]" : ""}`,
379
443
  children: [
380
- ye.map((e) => {
381
- const t = a && e.filter === c;
382
- return /* @__PURE__ */ h(
444
+ Re.map((e) => {
445
+ const t = c && e.filter === d, n = e.values.slice(0, Kt), r = e.values.length - n.length;
446
+ return /* @__PURE__ */ m(
383
447
  "span",
384
448
  {
385
- onMouseDown: Lt,
386
- className: `inline-flex items-center gap-1 max-w-[max(60px,calc(100%-64px))] min-w-0 h-[22px] pl-1.5 pr-1 rounded-md text-xs ${t ? se.active : se.resting}`,
449
+ onMouseDown: Jt,
450
+ className: `inline-flex items-stretch max-w-[max(60px,calc(100%-64px))] min-w-0 h-[22px] rounded-md border border-solid overflow-hidden text-xs ${t ? _.active : _.resting}`,
387
451
  children: [
388
- /* @__PURE__ */ o(
452
+ /* @__PURE__ */ m(
389
453
  "button",
390
454
  {
391
455
  type: "button",
392
- disabled: m,
456
+ disabled: f,
393
457
  title: e.text,
394
458
  "aria-label": `Edit filter ${e.text}`,
395
- onClick: () => Xe(e.filter),
396
- className: `truncate min-w-0 bg-transparent border-none p-0 text-[length:inherit] text-current ${m || u ? "cursor-default" : "cursor-pointer"} ${le}`,
397
- children: e.text
459
+ onClick: () => st(e.filter),
460
+ className: `flex items-stretch min-w-0 bg-transparent border-none p-0 text-[length:inherit] text-current ${f || g ? "cursor-default" : "cursor-pointer"} ${Ue}`,
461
+ children: [
462
+ e.label !== null && /* @__PURE__ */ l(
463
+ "span",
464
+ {
465
+ className: `flex items-center min-w-0 px-1.5 ${_.muted} ${_.divider}`,
466
+ children: /* @__PURE__ */ l("span", { className: "truncate", children: e.label })
467
+ }
468
+ ),
469
+ n.length > 0 && /* @__PURE__ */ m(
470
+ "span",
471
+ {
472
+ className: `flex items-center gap-1 min-w-0 pl-1.5 font-medium ${f ? "pr-1.5" : ""}`,
473
+ children: [
474
+ /* @__PURE__ */ l("span", { className: "truncate", children: n.map((a, s) => /* @__PURE__ */ m(ft.Fragment, { children: [
475
+ s > 0 && ", ",
476
+ a.icon && /* @__PURE__ */ l("span", { className: "inline-flex items-center align-middle mr-1", children: a.icon }),
477
+ a.label
478
+ ] }, a.value)) }),
479
+ r > 0 && /* @__PURE__ */ m(
480
+ "span",
481
+ {
482
+ className: `shrink-0 px-1 rounded text-[11px] leading-4 ${_.muted}`,
483
+ children: [
484
+ "+",
485
+ r
486
+ ]
487
+ }
488
+ )
489
+ ]
490
+ }
491
+ )
492
+ ]
398
493
  }
399
494
  ),
400
- !m && /* @__PURE__ */ o(
495
+ !f && /* @__PURE__ */ l(
401
496
  "button",
402
497
  {
403
498
  type: "button",
404
499
  "aria-label": `Remove filter ${e.text}`,
405
- onClick: (n) => {
406
- var r;
407
- n.stopPropagation(), Ee(e.filter), (r = P.current) == null || r.focus();
500
+ onClick: (a) => {
501
+ var s;
502
+ a.stopPropagation(), Te(e.filter), (s = H.current) == null || s.focus();
408
503
  },
409
- className: `flex items-center justify-center shrink-0 bg-transparent border-none p-0 text-current opacity-70 hover:opacity-100 cursor-pointer ${le}`,
410
- children: /* @__PURE__ */ o(Ie, { size: 10 })
504
+ className: `flex items-center justify-center shrink-0 bg-transparent border-none px-1.5 text-[var(--malachite-text-secondary,rgb(123,123,123))] hover:text-[var(--malachite-text-primary,rgb(10,10,10))] cursor-pointer ${Ue}`,
505
+ children: /* @__PURE__ */ l(ze, { size: 10 })
411
506
  }
412
507
  )
413
508
  ]
@@ -415,84 +510,104 @@ const Nt = {
415
510
  e.filter
416
511
  );
417
512
  }),
418
- we > 0 && /* @__PURE__ */ h(
513
+ Ie > 0 && /* @__PURE__ */ m(
419
514
  "span",
420
515
  {
421
- className: `inline-flex items-center h-[22px] px-1.5 rounded-md text-xs ${se.resting}`,
516
+ className: `inline-flex items-center h-[22px] px-1.5 rounded-md border border-solid text-xs font-medium ${_.resting}`,
422
517
  children: [
423
518
  "+",
424
- we
519
+ Ie
425
520
  ]
426
521
  }
427
522
  ),
428
- /* @__PURE__ */ o(
523
+ /* @__PURE__ */ l(
429
524
  "input",
430
525
  {
431
- ref: P,
432
- id: Ge,
526
+ ref: H,
527
+ id: nt,
433
528
  type: "text",
434
529
  role: "combobox",
435
- value: d,
436
- disabled: m,
437
- placeholder: Z.length === 0 ? ee : "",
530
+ value: p,
531
+ disabled: f,
532
+ placeholder: re.length === 0 ? ie : "",
438
533
  autoComplete: "off",
439
534
  spellCheck: !1,
440
- "aria-label": de ? void 0 : ce ?? ee,
441
- "aria-labelledby": de,
442
- "aria-haspopup": "listbox",
535
+ "aria-label": fe ? void 0 : pe ?? ie,
536
+ "aria-labelledby": fe,
537
+ ...He(c),
443
538
  "aria-autocomplete": "list",
444
- "aria-expanded": a,
445
- "aria-controls": a ? ue : void 0,
446
- "aria-activedescendant": _ >= 0 ? me(_) : void 0,
447
- "aria-busy": u || void 0,
539
+ "aria-activedescendant": O >= 0 ? xe(O) : void 0,
540
+ "aria-busy": g || void 0,
448
541
  onChange: (e) => {
449
- b(e.target.value), f(0), Y();
542
+ k(e.target.value), x(0), ce();
450
543
  },
451
- onKeyDown: qe,
544
+ onKeyDown: at,
452
545
  className: "flex-1 min-w-[60px] border-none outline-none bg-transparent p-0 text-[length:inherit] text-[var(--malachite-text-primary,rgb(10,10,10))] placeholder:text-[var(--malachite-text-placeholder,rgb(187,187,187))] disabled:cursor-not-allowed"
453
546
  }
454
547
  )
455
548
  ]
456
549
  }
457
550
  ),
458
- /* @__PURE__ */ o("span", { className: "flex items-center justify-center shrink-0 size-[14px] ml-1", children: u ? /* @__PURE__ */ o(it, { size: "xxxsmall" }) : /* @__PURE__ */ o(
459
- rt,
551
+ M ? /* @__PURE__ */ m("span", { className: "flex items-center self-stretch shrink-0 gap-1.5 ml-1", children: [
552
+ g && /* @__PURE__ */ l(We, { size: "xxxsmall" }),
553
+ Fe,
554
+ /* @__PURE__ */ l(
555
+ "span",
556
+ {
557
+ "aria-hidden": "true",
558
+ className: "w-px self-stretch my-1 bg-[var(--malachite-card-border,rgb(232,232,232))]"
559
+ }
560
+ ),
561
+ /* @__PURE__ */ m(
562
+ "button",
563
+ {
564
+ ref: ye,
565
+ type: "button",
566
+ disabled: f,
567
+ ...He(c && Q),
568
+ onClick: dt,
569
+ className: `flex items-center gap-1 h-[22px] px-1.5 rounded-md bg-transparent border-none font-medium text-[length:inherit] text-[var(--malachite-text-primary,rgb(10,10,10))] hover:bg-[var(--malachite-tag-default-background,rgba(123,123,123,0.1))] disabled:cursor-not-allowed cursor-pointer ${Ve}`,
570
+ children: [
571
+ /* @__PURE__ */ l(yt, { size: 12 }),
572
+ "Filters",
573
+ De > 0 && /* @__PURE__ */ l(
574
+ "span",
575
+ {
576
+ className: `min-w-4 px-1 rounded text-[11px] leading-4 text-center ${_.muted}`,
577
+ children: De
578
+ }
579
+ )
580
+ ]
581
+ }
582
+ )
583
+ ] }) : /* @__PURE__ */ l("span", { className: "flex items-center justify-center shrink-0 size-[14px] ml-1", children: g ? /* @__PURE__ */ l(We, { size: "xxxsmall" }) : /* @__PURE__ */ l(
584
+ bt,
460
585
  {
461
586
  size: 13,
462
587
  style: {
463
- color: a ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
588
+ color: c ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
464
589
  transition: "transform 0.2s ease, color 0.2s ease",
465
- transform: a ? "rotate(180deg)" : "rotate(0deg)"
590
+ transform: c ? "rotate(180deg)" : "rotate(0deg)"
466
591
  }
467
592
  }
468
593
  ) })
469
594
  ]
470
595
  }
471
596
  ),
472
- Re && /* @__PURE__ */ o(
473
- "button",
474
- {
475
- type: "button",
476
- "aria-label": "Clear filters",
477
- onMouseDown: Le,
478
- onClick: Be,
479
- className: `absolute top-0 bottom-0 right-[30px] flex items-center justify-center px-[2px] bg-transparent border-none text-[var(--malachite-text-placeholder)] hover:text-[var(--malachite-text-primary)] cursor-pointer ${le}`,
480
- children: /* @__PURE__ */ o(Ie, { size: 10 })
481
- }
482
- )
597
+ !M && Fe
483
598
  ]
484
599
  }
485
600
  ),
486
- a && tt(
487
- /* @__PURE__ */ h(
601
+ c && xt(
602
+ /* @__PURE__ */ m(
488
603
  "div",
489
604
  {
490
- ref: S,
491
- ...Ue,
492
- style: Je,
493
- onMouseDown: Le,
605
+ ref: R,
606
+ ...lt,
607
+ style: pt,
608
+ onMouseDown: qe,
494
609
  children: [
495
- /* @__PURE__ */ o(
610
+ /* @__PURE__ */ l(
496
611
  "div",
497
612
  {
498
613
  style: {
@@ -502,14 +617,14 @@ const Nt = {
502
617
  gap: 4,
503
618
  minWidth: 0
504
619
  },
505
- children: g === "items" ? /* @__PURE__ */ h(X, { children: [
506
- /* @__PURE__ */ o(
620
+ children: b === "items" ? /* @__PURE__ */ m(Z, { children: [
621
+ /* @__PURE__ */ l(
507
622
  "button",
508
623
  {
509
624
  type: "button",
510
625
  tabIndex: -1,
511
- onClick: Ke,
512
- className: $.crumb,
626
+ onClick: _e,
627
+ className: L.crumb,
513
628
  style: {
514
629
  background: "none",
515
630
  border: "none",
@@ -520,19 +635,19 @@ const Nt = {
520
635
  children: "Filters"
521
636
  }
522
637
  ),
523
- /* @__PURE__ */ o("span", { style: q, children: `> ${(N == null ? void 0 : N.label) ?? ((Ce = z.get(c ?? "")) == null ? void 0 : Ce.label) ?? ""}` })
638
+ /* @__PURE__ */ l("span", { style: Y, children: `> ${(T == null ? void 0 : T.label) ?? ((Oe = U.get(d ?? "")) == null ? void 0 : Oe.label) ?? ""}` })
524
639
  ] }) : "Filters"
525
640
  }
526
641
  ),
527
- /* @__PURE__ */ h(
642
+ /* @__PURE__ */ m(
528
643
  "div",
529
644
  {
530
- ref: B,
531
- id: ue,
645
+ ref: ee,
646
+ id: ge,
532
647
  role: "listbox",
533
- "aria-multiselectable": g !== "filters",
534
- "aria-label": ce ?? ee,
535
- "aria-busy": u || void 0,
648
+ "aria-multiselectable": b !== "filters",
649
+ "aria-label": pe ?? ie,
650
+ "aria-busy": g || void 0,
536
651
  style: {
537
652
  display: "flex",
538
653
  flexDirection: "column",
@@ -544,11 +659,11 @@ const Nt = {
544
659
  scrollbarWidth: "thin"
545
660
  },
546
661
  children: [
547
- u && Array.from({ length: Tt }, (e, t) => /* @__PURE__ */ o(
662
+ g && Array.from({ length: jt }, (e, t) => /* @__PURE__ */ l(
548
663
  "div",
549
664
  {
550
665
  role: "presentation",
551
- className: $.loading,
666
+ className: L.loading,
552
667
  style: {
553
668
  height: 24,
554
669
  margin: "4px 10px",
@@ -558,7 +673,7 @@ const Nt = {
558
673
  },
559
674
  t
560
675
  )),
561
- !u && v.length === 0 && /* @__PURE__ */ o(
676
+ !g && S.length === 0 && /* @__PURE__ */ l(
562
677
  "div",
563
678
  {
564
679
  role: "presentation",
@@ -566,34 +681,34 @@ const Nt = {
566
681
  padding: "6px 10px",
567
682
  color: "var(--malachite-text-secondary, rgb(123, 123, 123))"
568
683
  },
569
- children: Ye
684
+ children: mt
570
685
  }
571
686
  ),
572
- v.map((e, t) => {
687
+ S.map((e, t) => {
573
688
  const n = e.kind === "item" && !!e.row.item.disabled;
574
- return /* @__PURE__ */ o(
689
+ return /* @__PURE__ */ l(
575
690
  "button",
576
691
  {
577
- id: me(t),
692
+ id: xe(t),
578
693
  ref: (r) => {
579
- ge.current[t] = r;
694
+ we.current[t] = r;
580
695
  },
581
696
  type: "button",
582
697
  tabIndex: -1,
583
698
  role: "option",
584
699
  "aria-selected": e.kind === "item" ? e.row.selected : !1,
585
700
  "aria-disabled": n || void 0,
586
- "data-highlighted": t === _,
701
+ "data-highlighted": t === O,
587
702
  "data-disabled": n,
588
- className: $.row,
703
+ className: L.row,
589
704
  onMouseEnter: () => {
590
- n || f(t);
705
+ n || x(t);
591
706
  },
592
- onClick: () => Se(e),
593
- style: At,
594
- children: /* @__PURE__ */ o(Mt, { row: e, showFilter: g === "search" })
707
+ onClick: () => Ce(e),
708
+ style: Zt,
709
+ children: /* @__PURE__ */ l(Qt, { row: e, showFilter: b === "search" })
595
710
  },
596
- $t(e)
711
+ qt(e)
597
712
  );
598
713
  })
599
714
  ]
@@ -607,7 +722,7 @@ const Nt = {
607
722
  ] });
608
723
  };
609
724
  export {
610
- tr as FilterSearch,
611
- tr as default
725
+ wr as FilterSearch,
726
+ wr as default
612
727
  };
613
728
  //# sourceMappingURL=FilterSearch.js.map