@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.
- package/dist/SelectAuthShowcase.d.ts +21 -0
- package/dist/SelectAuthShowcase.js +118 -0
- package/dist/SelectAuthSplit.d.ts +9 -1
- package/dist/SelectAuthSplit.js +11 -5
- package/dist/SelectCardGrid.d.ts +1 -1
- package/dist/SelectCardGrid.js +14 -13
- package/dist/SelectChartCard.d.ts +4 -0
- package/dist/SelectChartCard.js +29 -27
- package/dist/SelectDataTable.d.ts +4 -1
- package/dist/SelectDataTable.js +121 -120
- package/dist/SelectListCard.d.ts +4 -0
- package/dist/SelectListCard.js +40 -37
- package/dist/SelectModal.d.ts +4 -0
- package/dist/SelectModal.js +77 -72
- package/dist/SelectRetryStatus.d.ts +3 -1
- package/dist/SelectRetryStatus.js +53 -54
- package/dist/SelectSection.d.ts +7 -0
- package/dist/SelectSection.js +61 -53
- package/dist/SelectTable.d.ts +4 -0
- package/dist/SelectTable.js +87 -86
- package/dist/index.d.ts +3 -0
- package/dist/index.js +27 -26
- package/dist/internal/headingLevel.d.ts +16 -0
- package/dist/internal/headingLevel.js +25 -0
- package/dist/internal/listChrome.d.ts +8 -1
- package/dist/internal/listChrome.js +65 -63
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectDataTable.js
CHANGED
|
@@ -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
|
|
6
|
-
import { SelectListFooter as
|
|
7
|
-
import { SelectTableEmpty as
|
|
8
|
-
import { SelectTable as
|
|
9
|
-
import { useMemo as
|
|
10
|
-
import { jsx as
|
|
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
|
|
12
|
+
var f = "9.5rem", p = {
|
|
13
13
|
minWidth: "9.5rem",
|
|
14
14
|
grow: 2
|
|
15
15
|
};
|
|
16
|
-
function
|
|
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
|
|
20
|
-
function
|
|
19
|
+
var h = "select-datatable:hidden-cols:";
|
|
20
|
+
function ae(e) {
|
|
21
21
|
try {
|
|
22
|
-
let t = localStorage.getItem(
|
|
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
|
|
28
|
+
function oe(e, t) {
|
|
29
29
|
try {
|
|
30
|
-
t.length === 0 ? localStorage.removeItem(
|
|
30
|
+
t.length === 0 ? localStorage.removeItem(h + e) : localStorage.setItem(h + e, JSON.stringify(t));
|
|
31
31
|
} catch {}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function g(e) {
|
|
34
34
|
return e.hideable ?? !!e.title;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
37
|
-
function
|
|
36
|
+
var _ = "select-datatable:col-widths:";
|
|
37
|
+
function se(e) {
|
|
38
38
|
try {
|
|
39
|
-
let t = localStorage.getItem(
|
|
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
|
|
48
|
+
function v(e, t) {
|
|
49
49
|
try {
|
|
50
|
-
Object.keys(t).length === 0 ? localStorage.removeItem(
|
|
50
|
+
Object.keys(t).length === 0 ? localStorage.removeItem(_ + e) : localStorage.setItem(_ + e, JSON.stringify(t));
|
|
51
51
|
} catch {}
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
let [r, i] =
|
|
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(
|
|
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(
|
|
66
|
+
localStorage.setItem(y + e, String(t));
|
|
67
67
|
} catch {}
|
|
68
68
|
}];
|
|
69
69
|
}
|
|
70
|
-
function
|
|
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
|
|
78
|
-
let [
|
|
79
|
-
let n = new Set(t), r =
|
|
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
|
-
}),
|
|
82
|
-
|
|
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 &&
|
|
84
|
+
return T && oe(T, r), n && q((t) => t && t.key === e.key ? null : t), r;
|
|
85
85
|
});
|
|
86
|
-
},
|
|
87
|
-
|
|
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
|
-
},
|
|
98
|
-
let e =
|
|
99
|
-
if (!
|
|
100
|
-
let t =
|
|
101
|
-
return (n) => [...n].sort((n, r) =>
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
]),
|
|
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
|
-
}] :
|
|
109
|
+
}] : G.map((e) => ({
|
|
110
110
|
label: e.title,
|
|
111
111
|
align: e.align,
|
|
112
|
-
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: (
|
|
117
|
-
onSort: e.sortValue ? () =>
|
|
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 =
|
|
122
|
-
n &&
|
|
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 &&
|
|
124
|
+
return t ? r[n.key] = t : delete r[n.key], T && v(T, r), r;
|
|
125
125
|
});
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
icon:
|
|
130
|
-
title:
|
|
131
|
-
subtitle:
|
|
132
|
-
action:
|
|
133
|
-
}) : void 0,
|
|
134
|
-
active:
|
|
135
|
-
onClose: () =>
|
|
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__ */
|
|
139
|
-
icon: /* @__PURE__ */
|
|
140
|
-
label:
|
|
138
|
+
activator: /* @__PURE__ */ u(te, {
|
|
139
|
+
icon: /* @__PURE__ */ u(t, {}),
|
|
140
|
+
label: F.columns,
|
|
141
141
|
size: "sm",
|
|
142
|
-
active:
|
|
143
|
-
"aria-expanded":
|
|
144
|
-
onClick: () =>
|
|
142
|
+
active: N,
|
|
143
|
+
"aria-expanded": N,
|
|
144
|
+
onClick: () => P((e) => !e)
|
|
145
145
|
}),
|
|
146
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ d("div", {
|
|
147
147
|
className: "select-facet__panel",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ u("div", {
|
|
149
149
|
className: "select-facet__options",
|
|
150
150
|
role: "menu",
|
|
151
|
-
children:
|
|
152
|
-
let n = !
|
|
153
|
-
return /* @__PURE__ */
|
|
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: () =>
|
|
160
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
163
|
+
children: /* @__PURE__ */ u(e, {})
|
|
164
164
|
})]
|
|
165
165
|
}, t.key);
|
|
166
166
|
})
|
|
167
|
-
}),
|
|
167
|
+
}), Ee && /* @__PURE__ */ u("div", {
|
|
168
168
|
className: "select-facet__options select-facet__options--footer",
|
|
169
169
|
role: "menu",
|
|
170
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ u("button", {
|
|
171
171
|
type: "button",
|
|
172
172
|
role: "menuitem",
|
|
173
173
|
className: "select-facet__opt",
|
|
174
174
|
onClick: () => {
|
|
175
|
-
|
|
175
|
+
Te(), P(!1);
|
|
176
176
|
},
|
|
177
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ u("span", { children: F.resetWidths })
|
|
178
178
|
})
|
|
179
179
|
})]
|
|
180
180
|
})
|
|
181
181
|
}) : null;
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
-
className: `select-datatable${
|
|
184
|
-
children: [/* @__PURE__ */
|
|
185
|
-
columns:
|
|
186
|
-
empty:
|
|
187
|
-
footer:
|
|
188
|
-
title:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
},
|
|
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__ */
|
|
208
|
-
}, t)) }, `skeleton-${t}`)) :
|
|
209
|
-
let t =
|
|
210
|
-
if (t.length === 0) return [/* @__PURE__ */
|
|
211
|
-
onClick:
|
|
212
|
-
children:
|
|
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:
|
|
216
|
-
disclosure:
|
|
216
|
+
className: m(t),
|
|
217
|
+
disclosure: we && n === 0 ? "none" : void 0,
|
|
217
218
|
children: t.render(e)
|
|
218
219
|
}, n))
|
|
219
|
-
},
|
|
220
|
-
let n =
|
|
221
|
-
return [/* @__PURE__ */
|
|
222
|
-
onClick: () =>
|
|
220
|
+
}, h(e))];
|
|
221
|
+
let n = be(e);
|
|
222
|
+
return [/* @__PURE__ */ u(s, {
|
|
223
|
+
onClick: () => xe(e),
|
|
223
224
|
expanded: n,
|
|
224
|
-
children:
|
|
225
|
+
children: G.map((t, r) => /* @__PURE__ */ u(o, {
|
|
225
226
|
align: t.align,
|
|
226
227
|
width: t.width,
|
|
227
|
-
className:
|
|
228
|
+
className: m(t),
|
|
228
229
|
disclosure: r === 0 ? n ? "open" : "closed" : void 0,
|
|
229
230
|
children: t.render(e)
|
|
230
231
|
}, r))
|
|
231
|
-
},
|
|
232
|
+
}, h(e)), ...n ? Y(t).map((t) => /* @__PURE__ */ u(s, {
|
|
232
233
|
nested: !0,
|
|
233
|
-
onClick:
|
|
234
|
-
children:
|
|
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:
|
|
238
|
+
className: m(e),
|
|
238
239
|
children: e.render(t)
|
|
239
240
|
}, n))
|
|
240
|
-
}, `${
|
|
241
|
+
}, `${h(e)}/${h(t)}`)) : []];
|
|
241
242
|
})
|
|
242
|
-
}),
|
|
243
|
+
}), b && /* @__PURE__ */ u(ne, { pagination: b })]
|
|
243
244
|
});
|
|
244
245
|
}
|
|
245
246
|
//#endregion
|
|
246
|
-
export {
|
|
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
|
package/dist/SelectListCard.d.ts
CHANGED
|
@@ -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).
|
package/dist/SelectListCard.js
CHANGED
|
@@ -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 {
|
|
5
|
-
import {
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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 ||
|
|
15
|
+
(e || l) && /* @__PURE__ */ c("div", {
|
|
14
16
|
className: "select-listcard__head",
|
|
15
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ c("div", {
|
|
16
18
|
className: "select-listcard__heading",
|
|
17
|
-
children: [e && /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
25
|
+
children: o
|
|
23
26
|
})]
|
|
24
|
-
}),
|
|
27
|
+
}), l && /* @__PURE__ */ s("div", {
|
|
25
28
|
className: "select-listcard__headeraction",
|
|
26
|
-
children:
|
|
29
|
+
children: l
|
|
27
30
|
})]
|
|
28
31
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ s("div", {
|
|
30
33
|
className: "select-listcard__body",
|
|
31
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ s("div", {
|
|
32
35
|
className: "select-listcard__rows",
|
|
33
|
-
children:
|
|
36
|
+
children: m
|
|
34
37
|
})
|
|
35
38
|
}),
|
|
36
|
-
|
|
39
|
+
u && /* @__PURE__ */ s("div", {
|
|
37
40
|
className: "select-listcard__footer",
|
|
38
|
-
children:
|
|
41
|
+
children: u
|
|
39
42
|
})
|
|
40
43
|
]
|
|
41
44
|
});
|
|
42
45
|
});
|
|
43
|
-
n(
|
|
44
|
-
function
|
|
45
|
-
let p = /* @__PURE__ */ o
|
|
46
|
-
t && /* @__PURE__ */
|
|
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__ */
|
|
54
|
+
/* @__PURE__ */ c("span", {
|
|
52
55
|
className: "select-listrow__text",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ s("span", {
|
|
54
57
|
className: "select-listrow__title",
|
|
55
58
|
children: r
|
|
56
|
-
}),
|
|
59
|
+
}), i && /* @__PURE__ */ s("span", {
|
|
57
60
|
className: "select-listrow__secondary",
|
|
58
|
-
children:
|
|
61
|
+
children: i
|
|
59
62
|
})]
|
|
60
63
|
}),
|
|
61
|
-
|
|
64
|
+
a && /* @__PURE__ */ s("span", {
|
|
62
65
|
className: "select-listrow__action",
|
|
63
|
-
children:
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
80
|
+
}) : /* @__PURE__ */ s("div", {
|
|
78
81
|
className: m,
|
|
79
82
|
children: p
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
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 {
|
|
92
|
+
export { l as SelectListCard, d as SelectListLabel, u as SelectListRow };
|
|
90
93
|
|
|
91
94
|
//# sourceMappingURL=SelectListCard.js.map
|
package/dist/SelectModal.d.ts
CHANGED
|
@@ -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';
|