@selectwin/kit 0.1.247 → 0.1.249

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.
@@ -2,41 +2,41 @@ import { CheckIcon as e, SettingsIcon as t } from "./icons.js";
2
2
  import { selectIntlLocale as n, useSelectLocale as r, useSelectMessages as i } from "./SelectLocale.js";
3
3
  import { useMatchMedia as a } from "./internal/useMatchMedia.js";
4
4
  import { SelectPopover as ee } from "./SelectPopover.js";
5
- import { SelectIconButton as o } from "./SelectIconButton.js";
6
- import { SelectListFooter as te } from "./internal/listChrome.js";
7
- import { SelectTableEmpty as ne } from "./SelectTableEmpty.js";
8
- import { SelectTable as re, SelectTableCell as s, SelectTableRow as c } from "./SelectTable.js";
9
- import { useMemo as l, useState as u } from "react";
10
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ import { SelectIconButton as te } from "./SelectIconButton.js";
6
+ import { SelectListFooter as ne } from "./internal/listChrome.js";
7
+ import { SelectTableEmpty as re } from "./SelectTableEmpty.js";
8
+ import { SelectTable as ie, SelectTableCell as o, SelectTableRow as s } from "./SelectTable.js";
9
+ import { useMemo as c, useState as l } from "react";
10
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
11
11
  //#region src/SelectDataTable.tsx
12
- var p = "9.5rem", m = {
12
+ var f = "9.5rem", p = {
13
13
  minWidth: "9.5rem",
14
14
  grow: 2
15
15
  };
16
- function h(e) {
16
+ function m(e) {
17
17
  return [e.wrap ? "select-table__td--wrap" : "", e.tone ? `select-table__td--${e.tone}` : ""].filter(Boolean).join(" ") || void 0;
18
18
  }
19
- var g = "select-datatable:hidden-cols:";
20
- function ie(e) {
19
+ var h = "select-datatable:hidden-cols:";
20
+ function ae(e) {
21
21
  try {
22
- let t = localStorage.getItem(g + e), n = t ? JSON.parse(t) : null;
22
+ let t = localStorage.getItem(h + e), n = t ? JSON.parse(t) : null;
23
23
  return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
24
24
  } catch {
25
25
  return [];
26
26
  }
27
27
  }
28
- function _(e, t) {
28
+ function oe(e, t) {
29
29
  try {
30
- t.length === 0 ? localStorage.removeItem(g + e) : localStorage.setItem(g + e, JSON.stringify(t));
30
+ t.length === 0 ? localStorage.removeItem(h + e) : localStorage.setItem(h + e, JSON.stringify(t));
31
31
  } catch {}
32
32
  }
33
- function v(e) {
33
+ function g(e) {
34
34
  return e.hideable ?? !!e.title;
35
35
  }
36
- var y = "select-datatable:col-widths:";
37
- function ae(e) {
36
+ var _ = "select-datatable:col-widths:";
37
+ function se(e) {
38
38
  try {
39
- let t = localStorage.getItem(y + e), n = t ? JSON.parse(t) : null;
39
+ let t = localStorage.getItem(_ + e), n = t ? JSON.parse(t) : null;
40
40
  if (!n || typeof n != "object" || Array.isArray(n)) return {};
41
41
  let r = {};
42
42
  for (let [e, t] of Object.entries(n)) typeof t == "string" && t && (r[e] = t);
@@ -45,16 +45,16 @@ function ae(e) {
45
45
  return {};
46
46
  }
47
47
  }
48
- function b(e, t) {
48
+ function v(e, t) {
49
49
  try {
50
- Object.keys(t).length === 0 ? localStorage.removeItem(y + e) : localStorage.setItem(y + e, JSON.stringify(t));
50
+ Object.keys(t).length === 0 ? localStorage.removeItem(_ + e) : localStorage.setItem(_ + e, JSON.stringify(t));
51
51
  } catch {}
52
52
  }
53
- var x = "select-datatable:page-size:";
54
- function S(e, t, n) {
55
- let [r, i] = u(() => {
53
+ var y = "select-datatable:page-size:";
54
+ function b(e, t, n) {
55
+ let [r, i] = l(() => {
56
56
  try {
57
- let r = Number(localStorage.getItem(x + e));
57
+ let r = Number(localStorage.getItem(y + e));
58
58
  return Number.isInteger(r) && r > 0 && (!n || n.includes(r)) ? r : t;
59
59
  } catch {
60
60
  return t;
@@ -63,28 +63,28 @@ function S(e, t, n) {
63
63
  return [r, (t) => {
64
64
  i(t);
65
65
  try {
66
- localStorage.setItem(x + e, String(t));
66
+ localStorage.setItem(y + e, String(t));
67
67
  } catch {}
68
68
  }];
69
69
  }
70
- function oe(e, t, n, r = "pt-BR") {
70
+ function ce(e, t, n, r = "pt-BR") {
71
71
  let i = e == null || e === "", a = t == null || t === "";
72
72
  return i || a ? i && a ? 0 : i ? 1 : -1 : typeof e == "number" && typeof t == "number" ? n * (e - t) : n * String(e).localeCompare(String(t), r, {
73
73
  numeric: !0,
74
74
  sensitivity: "base"
75
75
  });
76
76
  }
77
- function C({ columns: p = [], items: m, getId: g, loading: y = !1, empty: x, pagination: S, onRowClick: C, title: se, help: ce, description: le, action: ue, filters: w, columnsKey: T, getChildren: E, defaultExpanded: D, compactRow: O, compactQuery: de = "(max-width: 40rem)", onCompactRowClick: k, listRow: A, footer: j, flush: M = !1 }) {
78
- let [N, fe] = u(() => T ? ie(T) : []), [P, F] = u(!1), I = i().dataTable, L = n(r()), R = a(O && !A ? de : void 0) && O != null, z = A != null || R, B = A ?? O, pe = A != null || p.some((e) => e.wrap), [V, H] = u(() => T ? ae(T) : {}), U = l(() => new Set(N), [N]), W = p.filter(v), me = W.length > 0 && W.every((e) => U.has(e.key)), G = (e) => !me && U.has(e.key) && v(e), K = p.filter((e) => !G(e)), he = W.filter((e) => !G(e)), [q, J] = u(null), [ge, _e] = u(() => /* @__PURE__ */ new Set()), ve = (e) => ((D == null ? void 0 : D(e)) ?? !1) !== ge.has(g(e)), ye = (e) => _e((t) => {
79
- let n = new Set(t), r = g(e);
77
+ function x({ columns: f = [], items: p, getId: h, loading: _ = !1, empty: y, pagination: b, onRowClick: x, title: le, headingLevel: ue, help: S, description: C, action: w, filters: de, columnsKey: T, getChildren: E, defaultExpanded: D, compactRow: O, compactQuery: fe = "(max-width: 40rem)", onCompactRowClick: k, listRow: A, footer: pe, flush: j = !1 }) {
78
+ let [M, me] = l(() => T ? ae(T) : []), [N, P] = l(!1), F = i().dataTable, I = n(r()), L = a(O && !A ? fe : void 0) && O != null, R = A != null || L, z = A ?? O, he = A != null || f.some((e) => e.wrap), [B, V] = l(() => T ? se(T) : {}), H = c(() => new Set(M), [M]), U = f.filter(g), ge = U.length > 0 && U.every((e) => H.has(e.key)), W = (e) => !ge && H.has(e.key) && g(e), G = f.filter((e) => !W(e)), _e = U.filter((e) => !W(e)), [K, q] = l(null), [ve, ye] = l(() => /* @__PURE__ */ new Set()), be = (e) => ((D == null ? void 0 : D(e)) ?? !1) !== ve.has(h(e)), xe = (e) => ye((t) => {
79
+ let n = new Set(t), r = h(e);
80
80
  return n.delete(r) || n.add(r), n;
81
- }), be = (e) => {
82
- fe((t) => {
81
+ }), Se = (e) => {
82
+ me((t) => {
83
83
  let n = !t.includes(e.key), r = n ? [...t, e.key] : t.filter((t) => t !== e.key);
84
- return T && _(T, r), n && J((t) => t && t.key === e.key ? null : t), r;
84
+ return T && oe(T, r), n && q((t) => t && t.key === e.key ? null : t), r;
85
85
  });
86
- }, xe = (e) => {
87
- J((t) => {
86
+ }, Ce = (e) => {
87
+ q((t) => {
88
88
  let n = e.sortDefault ?? "asc";
89
89
  return !t || t.key !== e.key ? {
90
90
  key: e.key,
@@ -94,155 +94,156 @@ function C({ columns: p = [], items: m, getId: g, loading: y = !1, empty: x, pag
94
94
  dir: n === "asc" ? "desc" : "asc"
95
95
  } : null;
96
96
  });
97
- }, Y = q ? p.find((e) => e.key === q.key) : void 0, X = l(() => {
98
- let e = Y == null ? void 0 : Y.sortValue;
99
- if (!q || !e) return (e) => e;
100
- let t = q.dir === "asc" ? 1 : -1;
101
- return (n) => [...n].sort((n, r) => oe(e(n), e(r), t, L));
97
+ }, J = K ? f.find((e) => e.key === K.key) : void 0, Y = c(() => {
98
+ let e = J == null ? void 0 : J.sortValue;
99
+ if (!K || !e) return (e) => e;
100
+ let t = K.dir === "asc" ? 1 : -1;
101
+ return (n) => [...n].sort((n, r) => ce(e(n), e(r), t, I));
102
102
  }, [
103
- q,
104
- Y,
105
- L
106
- ]), Z = l(() => X(m), [m, X]), Q = (e) => (E == null ? void 0 : E(e)) ?? [], Se = !!E && m.some((e) => Q(e).length > 0), Ce = z ? [{
103
+ K,
104
+ J,
105
+ I
106
+ ]), X = c(() => Y(p), [p, Y]), Z = (e) => (E == null ? void 0 : E(e)) ?? [], we = !!E && p.some((e) => Z(e).length > 0), Q = R ? [{
107
107
  label: "",
108
108
  grow: 1
109
- }] : K.map((e) => ({
109
+ }] : G.map((e) => ({
110
110
  label: e.title,
111
111
  align: e.align,
112
- width: V[e.key] ?? e.width,
112
+ width: B[e.key] ?? e.width,
113
113
  minWidth: e.minWidth,
114
114
  grow: e.grow,
115
115
  sortable: !!e.sortValue,
116
- sortDir: (q == null ? void 0 : q.key) === e.key ? q.dir : null,
117
- onSort: e.sortValue ? () => xe(e) : void 0,
116
+ sortDir: (K == null ? void 0 : K.key) === e.key ? K.dir : null,
117
+ onSort: e.sortValue ? () => Ce(e) : void 0,
118
118
  resizable: !!e.title,
119
119
  tone: e.tone
120
120
  })), $ = (e, t) => {
121
- let n = K[e];
122
- n && H((e) => {
121
+ let n = G[e];
122
+ n && V((e) => {
123
123
  let r = { ...e };
124
- return t ? r[n.key] = t : delete r[n.key], T && b(T, r), r;
124
+ return t ? r[n.key] = t : delete r[n.key], T && v(T, r), r;
125
125
  });
126
- }, we = () => {
127
- H({}), T && b(T, {});
128
- }, Te = Object.keys(V).length > 0, Ee = !y && x ? /* @__PURE__ */ d(ne, {
129
- icon: x.icon,
130
- title: x.heading,
131
- subtitle: x.text,
132
- action: x.action
133
- }) : void 0, De = T && W.length > 0 ? /* @__PURE__ */ d(ee, {
134
- active: P,
135
- onClose: () => F(!1),
126
+ }, Te = () => {
127
+ V({}), T && v(T, {});
128
+ }, Ee = Object.keys(B).length > 0, De = !_ && y ? /* @__PURE__ */ u(re, {
129
+ icon: y.icon,
130
+ title: y.heading,
131
+ subtitle: y.text,
132
+ action: y.action
133
+ }) : void 0, Oe = T && U.length > 0 ? /* @__PURE__ */ u(ee, {
134
+ active: N,
135
+ onClose: () => P(!1),
136
136
  placement: "bottom-end",
137
137
  role: "menu",
138
- activator: /* @__PURE__ */ d(o, {
139
- icon: /* @__PURE__ */ d(t, {}),
140
- label: I.columns,
138
+ activator: /* @__PURE__ */ u(te, {
139
+ icon: /* @__PURE__ */ u(t, {}),
140
+ label: F.columns,
141
141
  size: "sm",
142
- active: P,
143
- "aria-expanded": P,
144
- onClick: () => F((e) => !e)
142
+ active: N,
143
+ "aria-expanded": N,
144
+ onClick: () => P((e) => !e)
145
145
  }),
146
- children: /* @__PURE__ */ f("div", {
146
+ children: /* @__PURE__ */ d("div", {
147
147
  className: "select-facet__panel",
148
- children: [/* @__PURE__ */ d("div", {
148
+ children: [/* @__PURE__ */ u("div", {
149
149
  className: "select-facet__options",
150
150
  role: "menu",
151
- children: W.map((t) => {
152
- let n = !G(t), r = n && he.length === 1;
153
- return /* @__PURE__ */ f("button", {
151
+ children: U.map((t) => {
152
+ let n = !W(t), r = n && _e.length === 1;
153
+ return /* @__PURE__ */ d("button", {
154
154
  type: "button",
155
155
  role: "menuitemcheckbox",
156
156
  "aria-checked": n,
157
157
  disabled: r,
158
158
  className: "select-facet__opt",
159
- onClick: () => be(t),
160
- children: [/* @__PURE__ */ d("span", { children: t.title }), n && /* @__PURE__ */ d("span", {
159
+ onClick: () => Se(t),
160
+ children: [/* @__PURE__ */ u("span", { children: t.title }), n && /* @__PURE__ */ u("span", {
161
161
  className: "select-facet__check",
162
162
  "aria-hidden": "true",
163
- children: /* @__PURE__ */ d(e, {})
163
+ children: /* @__PURE__ */ u(e, {})
164
164
  })]
165
165
  }, t.key);
166
166
  })
167
- }), Te && /* @__PURE__ */ d("div", {
167
+ }), Ee && /* @__PURE__ */ u("div", {
168
168
  className: "select-facet__options select-facet__options--footer",
169
169
  role: "menu",
170
- children: /* @__PURE__ */ d("button", {
170
+ children: /* @__PURE__ */ u("button", {
171
171
  type: "button",
172
172
  role: "menuitem",
173
173
  className: "select-facet__opt",
174
174
  onClick: () => {
175
- we(), F(!1);
175
+ Te(), P(!1);
176
176
  },
177
- children: /* @__PURE__ */ d("span", { children: I.resetWidths })
177
+ children: /* @__PURE__ */ u("span", { children: F.resetWidths })
178
178
  })
179
179
  })]
180
180
  })
181
181
  }) : null;
182
- return /* @__PURE__ */ f("div", {
183
- className: `select-datatable${M ? " select-datatable--flush" : ""}`,
184
- children: [/* @__PURE__ */ d(re, {
185
- columns: Ce,
186
- empty: Ee,
187
- footer: j,
188
- title: se,
189
- help: ce,
190
- description: le,
191
- filters: w,
192
- action: ue,
193
- tools: z ? null : De,
194
- className: z ? "select-table--compact" : void 0,
195
- flush: M,
196
- onColumnResize: z ? void 0 : (e, t) => $(e, t),
197
- onColumnResizeReset: z ? void 0 : (e) => $(e, null),
198
- children: z && B ? y ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ d(c, { children: /* @__PURE__ */ d(s, { children: /* @__PURE__ */ d("span", { className: "select-skeleton select-datatable__skel" }) }) }, `skeleton-${t}`)) : Z.map((e) => /* @__PURE__ */ d(c, {
199
- onClick: k ?? C ? () => (k ?? C)(e) : void 0,
200
- children: /* @__PURE__ */ d(s, {
201
- className: pe ? "select-table__td--wrap" : void 0,
202
- children: B(e)
182
+ return /* @__PURE__ */ d("div", {
183
+ className: `select-datatable${j ? " select-datatable--flush" : ""}`,
184
+ children: [/* @__PURE__ */ u(ie, {
185
+ columns: Q,
186
+ empty: De,
187
+ footer: pe,
188
+ title: le,
189
+ headingLevel: ue,
190
+ help: S,
191
+ description: C,
192
+ filters: de,
193
+ action: w,
194
+ tools: R ? null : Oe,
195
+ className: R ? "select-table--compact" : void 0,
196
+ flush: j,
197
+ onColumnResize: R ? void 0 : (e, t) => $(e, t),
198
+ onColumnResizeReset: R ? void 0 : (e) => $(e, null),
199
+ children: R && z ? _ ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ u(s, { children: /* @__PURE__ */ u(o, { children: /* @__PURE__ */ u("span", { className: "select-skeleton select-datatable__skel" }) }) }, `skeleton-${t}`)) : X.map((e) => /* @__PURE__ */ u(s, {
200
+ onClick: k ?? x ? () => (k ?? x)(e) : void 0,
201
+ children: /* @__PURE__ */ u(o, {
202
+ className: he ? "select-table__td--wrap" : void 0,
203
+ children: z(e)
203
204
  })
204
- }, g(e))) : y ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ d(c, { children: K.map((e, t) => /* @__PURE__ */ d(s, {
205
+ }, h(e))) : _ ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ u(s, { children: G.map((e, t) => /* @__PURE__ */ u(o, {
205
206
  align: e.align,
206
207
  width: e.width,
207
- children: /* @__PURE__ */ d("span", { className: "select-skeleton select-datatable__skel" })
208
- }, t)) }, `skeleton-${t}`)) : Z.flatMap((e) => {
209
- let t = Q(e);
210
- if (t.length === 0) return [/* @__PURE__ */ d(c, {
211
- onClick: C ? () => C(e) : void 0,
212
- children: K.map((t, n) => /* @__PURE__ */ d(s, {
208
+ children: /* @__PURE__ */ u("span", { className: "select-skeleton select-datatable__skel" })
209
+ }, t)) }, `skeleton-${t}`)) : X.flatMap((e) => {
210
+ let t = Z(e);
211
+ if (t.length === 0) return [/* @__PURE__ */ u(s, {
212
+ onClick: x ? () => x(e) : void 0,
213
+ children: G.map((t, n) => /* @__PURE__ */ u(o, {
213
214
  align: t.align,
214
215
  width: t.width,
215
- className: h(t),
216
- disclosure: Se && n === 0 ? "none" : void 0,
216
+ className: m(t),
217
+ disclosure: we && n === 0 ? "none" : void 0,
217
218
  children: t.render(e)
218
219
  }, n))
219
- }, g(e))];
220
- let n = ve(e);
221
- return [/* @__PURE__ */ d(c, {
222
- onClick: () => ye(e),
220
+ }, h(e))];
221
+ let n = be(e);
222
+ return [/* @__PURE__ */ u(s, {
223
+ onClick: () => xe(e),
223
224
  expanded: n,
224
- children: K.map((t, r) => /* @__PURE__ */ d(s, {
225
+ children: G.map((t, r) => /* @__PURE__ */ u(o, {
225
226
  align: t.align,
226
227
  width: t.width,
227
- className: h(t),
228
+ className: m(t),
228
229
  disclosure: r === 0 ? n ? "open" : "closed" : void 0,
229
230
  children: t.render(e)
230
231
  }, r))
231
- }, g(e)), ...n ? X(t).map((t) => /* @__PURE__ */ d(c, {
232
+ }, h(e)), ...n ? Y(t).map((t) => /* @__PURE__ */ u(s, {
232
233
  nested: !0,
233
- onClick: C ? () => C(t) : void 0,
234
- children: K.map((e, n) => /* @__PURE__ */ d(s, {
234
+ onClick: x ? () => x(t) : void 0,
235
+ children: G.map((e, n) => /* @__PURE__ */ u(o, {
235
236
  align: e.align,
236
237
  width: e.width,
237
- className: h(e),
238
+ className: m(e),
238
239
  children: e.render(t)
239
240
  }, n))
240
- }, `${g(e)}/${g(t)}`)) : []];
241
+ }, `${h(e)}/${h(t)}`)) : []];
241
242
  })
242
- }), S && /* @__PURE__ */ d(te, { pagination: S })]
243
+ }), b && /* @__PURE__ */ u(ne, { pagination: b })]
243
244
  });
244
245
  }
245
246
  //#endregion
246
- export { p as SELECT_COL_DATETIME, m as SELECT_COL_ID, C as SelectDataTable, S as useSelectPageSize };
247
+ export { f as SELECT_COL_DATETIME, p as SELECT_COL_ID, x as SelectDataTable, b as useSelectPageSize };
247
248
 
248
249
  //# sourceMappingURL=SelectDataTable.js.map
@@ -1,6 +1,10 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ import { SelectHeadingLevel } from './internal/headingLevel';
2
3
  type SelectListCardOwnProps = {
3
4
  title?: ReactNode;
5
+ /** O nível do título (`2` = `<h2>`, até `6`). Sem ele, o kit conta: `<h2>` na página, `<h3>` no corpo de uma seção
6
+ * ou de um modal com título (`internal/headingLevel.tsx`). Era sempre `<h3>`. */
7
+ headingLevel?: SelectHeadingLevel;
4
8
  /**
5
9
  * O "i" ao lado do título (0.1.196), como o do `SelectSection`: a explicação do card mora aqui, não numa linha do
6
10
  * corpo nem na descrição (dono, 03/11/2026 — o card mostra o dado).
@@ -1,91 +1,94 @@
1
1
  import { safeHref as e } from "./internal/safeHref.js";
2
2
  import { SelectInfoTip as t } from "./SelectInfoTip.js";
3
3
  import { registerSheetFrame as n } from "./internal/sheetBands.js";
4
- import { forwardRef as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ import { SelectHeading as r, useHeadingLevel as i } from "./internal/headingLevel.js";
5
+ import { forwardRef as a } from "react";
6
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
6
7
  //#region src/SelectListCard.tsx
7
- var s = r(function({ title: e, help: n, description: r, headerAction: i, footer: s, dense: c = !1, spread: l = !1, flush: u = !1, children: d, className: f, ...p }, m) {
8
- return /* @__PURE__ */ o("div", {
9
- ref: m,
10
- ...p,
11
- className: `select-listcard${c ? " select-listcard--dense" : ""}${l ? " select-listcard--spread" : ""}${u ? " select-listcard--flush" : ""}${f ? " " + f : ""}`,
8
+ var l = a(function({ title: e, headingLevel: n, help: a, description: o, headerAction: l, footer: u, dense: d = !1, spread: f = !1, flush: p = !1, children: m, className: h, ...g }, _) {
9
+ let v = i(n);
10
+ return /* @__PURE__ */ c("div", {
11
+ ref: _,
12
+ ...g,
13
+ className: `select-listcard${d ? " select-listcard--dense" : ""}${f ? " select-listcard--spread" : ""}${p ? " select-listcard--flush" : ""}${h ? " " + h : ""}`,
12
14
  children: [
13
- (e || i) && /* @__PURE__ */ o("div", {
15
+ (e || l) && /* @__PURE__ */ c("div", {
14
16
  className: "select-listcard__head",
15
- children: [/* @__PURE__ */ o("div", {
17
+ children: [/* @__PURE__ */ c("div", {
16
18
  className: "select-listcard__heading",
17
- children: [e && /* @__PURE__ */ o("h3", {
18
- className: `select-listcard__title${n == null ? "" : " select-listcard__title--help"}`,
19
- children: [e, n != null && /* @__PURE__ */ a(t, { content: n })]
20
- }), r && /* @__PURE__ */ a("p", {
19
+ children: [e && /* @__PURE__ */ c(r, {
20
+ level: v,
21
+ className: `select-listcard__title${a == null ? "" : " select-listcard__title--help"}`,
22
+ children: [e, a != null && /* @__PURE__ */ s(t, { content: a })]
23
+ }), o && /* @__PURE__ */ s("p", {
21
24
  className: "select-listcard__desc",
22
- children: r
25
+ children: o
23
26
  })]
24
- }), i && /* @__PURE__ */ a("div", {
27
+ }), l && /* @__PURE__ */ s("div", {
25
28
  className: "select-listcard__headeraction",
26
- children: i
29
+ children: l
27
30
  })]
28
31
  }),
29
- /* @__PURE__ */ a("div", {
32
+ /* @__PURE__ */ s("div", {
30
33
  className: "select-listcard__body",
31
- children: /* @__PURE__ */ a("div", {
34
+ children: /* @__PURE__ */ s("div", {
32
35
  className: "select-listcard__rows",
33
- children: d
36
+ children: m
34
37
  })
35
38
  }),
36
- s && /* @__PURE__ */ a("div", {
39
+ u && /* @__PURE__ */ s("div", {
37
40
  className: "select-listcard__footer",
38
- children: s
41
+ children: u
39
42
  })
40
43
  ]
41
44
  });
42
45
  });
43
- n(s);
44
- function c({ media: t, mediaSize: n = "icon", title: r, secondary: s, action: c, muted: l = !1, wrap: u = !1, onClick: d, href: f }) {
45
- let p = /* @__PURE__ */ o(i, { children: [
46
- t && /* @__PURE__ */ a("span", {
46
+ n(l);
47
+ function u({ media: t, mediaSize: n = "icon", title: r, secondary: i, action: a, muted: l = !1, wrap: u = !1, onClick: d, href: f }) {
48
+ let p = /* @__PURE__ */ c(o, { children: [
49
+ t && /* @__PURE__ */ s("span", {
47
50
  className: `select-listrow__media${n === "auto" ? " select-listrow__media--auto" : ""}`,
48
51
  "aria-hidden": "true",
49
52
  children: t
50
53
  }),
51
- /* @__PURE__ */ o("span", {
54
+ /* @__PURE__ */ c("span", {
52
55
  className: "select-listrow__text",
53
- children: [/* @__PURE__ */ a("span", {
56
+ children: [/* @__PURE__ */ s("span", {
54
57
  className: "select-listrow__title",
55
58
  children: r
56
- }), s && /* @__PURE__ */ a("span", {
59
+ }), i && /* @__PURE__ */ s("span", {
57
60
  className: "select-listrow__secondary",
58
- children: s
61
+ children: i
59
62
  })]
60
63
  }),
61
- c && /* @__PURE__ */ a("span", {
64
+ a && /* @__PURE__ */ s("span", {
62
65
  className: "select-listrow__action",
63
- children: c
66
+ children: a
64
67
  })
65
68
  ] }), m = `select-listrow${l ? " select-listrow--muted" : ""}${u ? " select-listrow--wrap" : ""}`, h = e(f);
66
- return h ? /* @__PURE__ */ a("a", {
69
+ return h ? /* @__PURE__ */ s("a", {
67
70
  className: `${m} select-listrow--clickable`,
68
71
  href: h,
69
72
  target: "_blank",
70
73
  rel: "noreferrer",
71
74
  children: p
72
- }) : d ? /* @__PURE__ */ a("button", {
75
+ }) : d ? /* @__PURE__ */ s("button", {
73
76
  type: "button",
74
77
  className: `${m} select-listrow--clickable`,
75
78
  onClick: d,
76
79
  children: p
77
- }) : /* @__PURE__ */ a("div", {
80
+ }) : /* @__PURE__ */ s("div", {
78
81
  className: m,
79
82
  children: p
80
83
  });
81
84
  }
82
- function l({ children: e }) {
83
- return /* @__PURE__ */ a("div", {
85
+ function d({ children: e }) {
86
+ return /* @__PURE__ */ s("div", {
84
87
  className: "select-listlabel",
85
88
  children: e
86
89
  });
87
90
  }
88
91
  //#endregion
89
- export { s as SelectListCard, l as SelectListLabel, c as SelectListRow };
92
+ export { l as SelectListCard, d as SelectListLabel, u as SelectListRow };
90
93
 
91
94
  //# sourceMappingURL=SelectListCard.js.map
@@ -44,6 +44,10 @@ export declare function SelectModal({ open, onClose, eyebrow, title, subtitle, d
44
44
  /** `blur` desfoca a página atrás do scrim — para gates que prometem esconder o que há por
45
45
  * trás (queda do servidor): escurecer só não esconde, o conteúdo segue legível. */
46
46
  backdrop?: 'dim' | 'blur';
47
+ /**
48
+ * Fixa o tema do modal. Sem ele, o modal segue o do app: o do `[data-theme]` mais perto de quem o abriu, ou o do
49
+ * `<html>`, lido ao abrir (antes o padrão era `light`, também num app escuro).
50
+ */
47
51
  theme?: 'light' | 'dark';
48
52
  /** `side` = folha lateral à direita, na altura inteira (o detalhe de uma linha da lista). */
49
53
  placement?: 'center' | 'side';