@selectwin/kit 0.1.245 → 0.1.247

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,58 +1,67 @@
1
1
  /* empty css */
2
- import { CloseIcon as e } from "./icons.js";
3
- import { useSelectMessages as t } from "./SelectLocale.js";
4
- import { useFocusTrap as n } from "./internal/useFocusTrap.js";
5
- import { LayerProvider as r, isTopLayer as ee, openLayer as i, useParentLayer as a } from "./internal/layers.js";
6
- import { FrameBody as o } from "./internal/frame.js";
7
- import { useEffect as s, useId as c, useRef as l, useState as u } from "react";
8
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
9
- import { createPortal as m } from "react-dom";
2
+ import { SelectButton as e } from "./SelectButton.js";
3
+ import { ArrowLeftIcon as t, CloseIcon as n } from "./icons.js";
4
+ import { useSelectMessages as r } from "./SelectLocale.js";
5
+ import { SelectInfoTip as ee } from "./SelectInfoTip.js";
6
+ import { SelectAlert as te } from "./SelectAlert.js";
7
+ import { useFocusTrap as ne } from "./internal/useFocusTrap.js";
8
+ import { LayerProvider as re, isTopLayer as ie, openLayer as ae, useParentLayer as oe } from "./internal/layers.js";
9
+ import { sheetBands as se } from "./internal/sheetBands.js";
10
+ import { FrameBody as i } from "./internal/frame.js";
11
+ import { isDevBuild as ce } from "./internal/dev.js";
12
+ import { useEffect as a, useId as o, useRef as s, useState as c } from "react";
13
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
14
+ import { createPortal as le } from "react-dom";
10
15
  //#region src/SelectModal.tsx
11
- var h = 220;
12
- function g({ children: e, className: t }) {
13
- return /* @__PURE__ */ f("div", {
16
+ var ue = 220, f = "(max-width: 40rem)", de = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(f).matches, fe = 64, pe = 120;
17
+ function p({ children: e, className: t, destructive: n }) {
18
+ return /* @__PURE__ */ d("div", {
14
19
  className: `select-modal__actions${t ? " " + t : ""}`,
15
- children: e
20
+ children: [n != null && n !== !1 && /* @__PURE__ */ u("div", {
21
+ className: "select-modal__destructive",
22
+ children: n
23
+ }), e]
16
24
  });
17
25
  }
18
- function _({ open: g, onClose: _, eyebrow: v, title: y, subtitle: b, description: x, badge: S, children: C, footer: w, aside: T, size: E = "md", showClose: D = !0, noise: O = !0, dividedHeader: k = !1, backdrop: te = "dim", theme: ne = "light", placement: A = "center", headerAction: j, flush: M = !1, dismissible: N = !0 }) {
19
- let P = t(), [F, I] = u(g), [L, R] = u(!1), z = l(null), B = c(), V = c(), H = c(), [U] = u(() => ({})), W = a(), G = l({
20
- onClose: _,
21
- dismissible: N
26
+ function m({ open: f, onClose: p, eyebrow: m, title: h, subtitle: g, description: _, badge: v, help: me, children: y, footer: he, aside: b, size: ge = "md", showClose: _e = !0, noise: ve = !0, dividedHeader: ye = !1, backdrop: be = "dim", theme: xe = "light", placement: x = "center", headerAction: S, menu: C, onBack: w, backLabel: Se, loading: Ce = !1, error: T, onRetry: we, flush: Te = !1, dismissible: E = !0 }) {
27
+ let D = r(), [O, k] = c(f), [A, j] = c(!1), M = s(null), N = s(null), P = s(null), F = o(), I = o(), Ee = o(), [L] = c(() => ({})), De = oe(), R = s({
28
+ onClose: p,
29
+ dismissible: E
22
30
  });
23
- G.current = {
24
- onClose: _,
25
- dismissible: N
31
+ R.current = {
32
+ onClose: p,
33
+ dismissible: E
26
34
  };
27
- let [K] = u(() => g && typeof document < "u" ? document.activeElement : null), q = l(null);
28
- s(() => {
29
- if (g) {
30
- if (!q.current) {
31
- var e;
32
- let t = document.activeElement, n = t instanceof HTMLElement && t !== document.body && !((e = z.current) != null && e.contains(t));
33
- q.current = n ? t : K instanceof HTMLElement && K !== document.body ? K : null;
35
+ let [z] = c(() => f && typeof document < "u" ? document.activeElement : null), B = s(null), V = x === "side" && !b, H = Ce ? "loading" : T != null && T !== !1 && T !== "" ? "error" : "ready", U = V && w != null;
36
+ a(() => {
37
+ if (f) {
38
+ var e;
39
+ if (!B.current) {
40
+ var t;
41
+ let e = document.activeElement, n = e instanceof HTMLElement && e !== document.body && !((t = M.current) != null && t.contains(e));
42
+ B.current = n ? e : z instanceof HTMLElement && z !== document.body ? z : null;
34
43
  }
35
- I(!0), R(!1);
36
- } else if (F) {
37
- var t;
38
- R(!0);
39
- let e = q.current;
40
- q.current = null;
41
- let n = document.activeElement;
42
- e != null && e.isConnected && (!n || n === document.body || (t = z.current) != null && t.contains(n)) && e.focus({ preventScroll: !0 });
44
+ (e = M.current) == null || e.style.removeProperty("transform"), k(!0), j(!1);
45
+ } else if (O) {
46
+ var n;
47
+ j(!0);
48
+ let e = B.current;
49
+ B.current = null;
50
+ let t = document.activeElement;
51
+ e != null && e.isConnected && (!t || t === document.body || (n = M.current) != null && n.contains(t)) && e.focus({ preventScroll: !0 });
43
52
  let r = setTimeout(() => {
44
- I(!1), R(!1);
45
- }, h);
53
+ k(!1), j(!1);
54
+ }, ue);
46
55
  return () => clearTimeout(r);
47
56
  }
48
57
  }, [
49
- g,
50
- F,
51
- K
52
- ]), s(() => {
53
- if (!F) return;
54
- let e = i(U, W), t = (e) => {
55
- e.key === "Escape" && !e.defaultPrevented && ee(U) && G.current.dismissible && G.current.onClose();
58
+ f,
59
+ O,
60
+ z
61
+ ]), a(() => {
62
+ if (!O) return;
63
+ let e = ae(L, De), t = (e) => {
64
+ e.key === "Escape" && !e.defaultPrevented && ie(L) && R.current.dismissible && R.current.onClose();
56
65
  };
57
66
  document.addEventListener("keydown", t);
58
67
  let n = document.body.style.overflow;
@@ -60,128 +69,273 @@ function _({ open: g, onClose: _, eyebrow: v, title: y, subtitle: b, description
60
69
  e(), document.removeEventListener("keydown", t), document.body.style.overflow = n;
61
70
  };
62
71
  }, [
63
- F,
64
- U,
65
- W
72
+ O,
73
+ L,
74
+ De
66
75
  ]);
67
- let J = F && !L;
68
- if (s(() => {
69
- if (!J) return;
70
- let e = z.current;
76
+ let W = O && !A;
77
+ a(() => {
78
+ if (!W) return;
79
+ let e = M.current;
71
80
  e && !e.contains(document.activeElement) && (e.querySelector("[data-autofocus]") ?? e).focus({ preventScroll: !0 });
72
- }, [J]), n(J, z, { initialFocus: !1 }), !F) return null;
73
- let Y = S ? /* @__PURE__ */ p("p", {
74
- id: V,
81
+ }, [W]), ne(W, M, { initialFocus: !1 });
82
+ let Oe = s(U);
83
+ a(() => {
84
+ if (Oe.current === U) return;
85
+ Oe.current = U, N.current && (N.current.scrollTop = 0);
86
+ let e = M.current, t = document.activeElement;
87
+ e && (!t || t === document.body || !e.contains(t)) && e.focus({ preventScroll: !0 });
88
+ }, [U]);
89
+ let ke = s(!1);
90
+ a(() => {
91
+ if (!V || ke.current || !P.current || !ce()) return;
92
+ let e = P.current.querySelectorAll(".select-btn--primary").length;
93
+ e > 1 && (ke.current = !0, console.warn(`[SelectModal] A folha tem ${e} botões primários no pé: no máximo um, na ponta direita (o secundário à esquerda dele).`));
94
+ });
95
+ let G = s(null), Ae = (e) => {
96
+ if (E && e.button === 0 && de() && !e.target.closest("button, a, input, select, textarea, [role=\"button\"], .select-modal__headaction")) {
97
+ G.current = {
98
+ id: e.pointerId,
99
+ y: e.clientY,
100
+ dy: 0
101
+ };
102
+ try {
103
+ var t, n;
104
+ (t = (n = e.currentTarget).setPointerCapture) == null || t.call(n, e.pointerId);
105
+ } catch {}
106
+ }
107
+ }, je = (e) => {
108
+ let t = G.current, n = M.current;
109
+ t && e.pointerId === t.id && n && (t.dy = Math.max(0, e.clientY - t.y), n.dataset.dragging = "", t.dy > 0 ? n.style.transform = `translateY(${t.dy}px)` : n.style.removeProperty("transform"));
110
+ }, Me = (e) => {
111
+ let t = G.current;
112
+ if (!t || e.pointerId !== t.id) return;
113
+ G.current = null;
114
+ let n = M.current;
115
+ if (!n) return;
116
+ delete n.dataset.dragging;
117
+ let r = Math.max(fe, Math.min(pe, n.offsetHeight * .25));
118
+ e.type === "pointerup" && t.dy > r && R.current.dismissible ? R.current.onClose() : n.style.removeProperty("transform");
119
+ };
120
+ if (!O) return null;
121
+ let K = h && (me == null ? /* @__PURE__ */ u("h2", {
122
+ id: F,
123
+ className: "select-modal__title",
124
+ children: h
125
+ }) : /* @__PURE__ */ d("div", {
126
+ className: "select-modal__titlerow",
127
+ children: [/* @__PURE__ */ u("h2", {
128
+ id: F,
129
+ className: "select-modal__title",
130
+ children: h
131
+ }), /* @__PURE__ */ u(ee, { content: me })]
132
+ })), q = v ? /* @__PURE__ */ d("p", {
133
+ id: I,
75
134
  className: "select-modal__subtitle select-modal__subtitle--badge",
76
- children: [S, b ? /* @__PURE__ */ f("span", { children: b }) : null]
77
- }) : b && /* @__PURE__ */ f("p", {
78
- id: V,
135
+ children: [v, g ? /* @__PURE__ */ u("span", { children: g }) : null]
136
+ }) : g && /* @__PURE__ */ u("p", {
137
+ id: I,
79
138
  className: "select-modal__subtitle",
80
- children: b
81
- }), X = x != null && x !== !1 && x !== "", Z = X && /* @__PURE__ */ f("p", {
82
- id: H,
139
+ children: g
140
+ }), J = _ != null && _ !== !1 && _ !== "", Y = J && /* @__PURE__ */ u("p", {
141
+ id: Ee,
83
142
  className: "select-modal__description",
84
- children: x
85
- }), re = [b || S ? V : null, X ? H : null].filter(Boolean).join(" ") || void 0, Q = D && N && /* @__PURE__ */ f("button", {
143
+ children: _
144
+ }), Ne = [g || v ? I : null, J ? Ee : null].filter(Boolean).join(" ") || void 0, X = _e && E && /* @__PURE__ */ u("button", {
86
145
  type: "button",
87
- className: "select-modal__close",
88
- "aria-label": P.common.close,
89
- onClick: _,
90
- children: /* @__PURE__ */ f(e, {})
91
- }), $ = `select-modal__header${k ? " select-modal__header--divided" : ""}`, ie = /* @__PURE__ */ f("div", {
92
- className: `select select-modal__overlay${A === "side" ? " select-modal__overlay--side" : ""}${O ? " select-modal__overlay--noise" : ""}${te === "blur" ? " select-modal__overlay--blur" : ""}${L ? " select-modal__overlay--closing" : ""}`,
93
- "data-theme": ne,
94
- onMouseDown: N ? _ : void 0,
95
- children: /* @__PURE__ */ f("div", {
96
- className: `select-modal select-modal--${E}${A === "side" ? " select-modal--side" : ""}${M ? " select-modal--flush" : ""}${T ? " select-modal--split" : ""}${L ? " select-modal--closing" : ""}`,
97
- ref: z,
146
+ className: `select-modal__close${V ? " select-modal__tool" : ""}`,
147
+ "aria-label": D.common.close,
148
+ onClick: p,
149
+ children: /* @__PURE__ */ u(n, {})
150
+ }), Z = `select-modal__header${ye ? " select-modal__header--divided" : ""}`, Pe = (e) => [
151
+ 0,
152
+ 1,
153
+ 2
154
+ ].map((t) => /* @__PURE__ */ d("span", {
155
+ className: "select-modal__skelrow",
156
+ children: [/* @__PURE__ */ u("span", { className: `select-skeleton${e ? " select-modal__skeldot" : ""}` }), /* @__PURE__ */ u("span", { className: "select-skeleton" })]
157
+ }, t)), Q = H === "loading" ? [/* @__PURE__ */ d("div", {
158
+ className: "select-modal__skel",
159
+ children: [
160
+ /* @__PURE__ */ u("span", {
161
+ className: "select-skeleton select-modal__skelhead",
162
+ "aria-hidden": "true"
163
+ }),
164
+ /* @__PURE__ */ u("span", {
165
+ className: "select-modal__skelrows",
166
+ "aria-hidden": "true",
167
+ children: Pe(!1)
168
+ }),
169
+ /* @__PURE__ */ u("span", {
170
+ className: "select-visually-hidden",
171
+ role: "status",
172
+ children: D.common.loading
173
+ })
174
+ ]
175
+ }, "skel-facts"), /* @__PURE__ */ d("div", {
176
+ className: "select-modal__skel select-modal__skel--steps",
177
+ "aria-hidden": "true",
178
+ children: [/* @__PURE__ */ u("span", { className: "select-skeleton select-modal__skelhead" }), /* @__PURE__ */ u("span", {
179
+ className: "select-modal__skelrows",
180
+ children: Pe(!0)
181
+ })]
182
+ }, "skel-steps")] : H === "error" ? [/* @__PURE__ */ u(te, {
183
+ tone: "critical",
184
+ action: we ? /* @__PURE__ */ u(e, {
185
+ variant: "secondary",
186
+ size: "sm",
187
+ inline: !0,
188
+ onClick: we,
189
+ children: D.modal.retry
190
+ }) : void 0,
191
+ children: T === !0 ? D.modal.loadFailed : T
192
+ }, "error")] : null, Fe = !!y || J || H !== "ready", Ie = !!he && H === "ready", Le = V && !Te ? Q ? Q.map((e, t) => ({
193
+ key: `state-${t}`,
194
+ node: e
195
+ })) : se(y) : null, Re = Fe && /* @__PURE__ */ u("div", {
196
+ className: "select-modal__body",
197
+ ref: N,
198
+ children: Le ? /* @__PURE__ */ d(l, { children: [Y && /* @__PURE__ */ u("div", {
199
+ className: "select-modal__band",
200
+ children: Y
201
+ }), /* @__PURE__ */ u(i, { children: Le.map(({ key: e, node: t }) => /* @__PURE__ */ u("div", {
202
+ className: "select-modal__band",
203
+ children: t
204
+ }, e)) })] }) : /* @__PURE__ */ d(l, { children: [Y, /* @__PURE__ */ u(i, { children: Q ?? y })] })
205
+ }), ze = Ie && /* @__PURE__ */ u("div", {
206
+ className: "select-modal__footer",
207
+ ref: P,
208
+ children: he
209
+ }), $ = V && C != null && C !== !1 && H === "ready" ? /* @__PURE__ */ u("span", {
210
+ className: "select-modal__menu",
211
+ children: C
212
+ }) : null, Be = q || (H === "loading" ? /* @__PURE__ */ u("span", {
213
+ className: "select-skeleton select-modal__subskel",
214
+ "aria-hidden": "true"
215
+ }) : null), Ve = /* @__PURE__ */ d("div", {
216
+ className: "select-modal__header select-modal__header--sheet",
217
+ onPointerDown: Ae,
218
+ onPointerMove: je,
219
+ onPointerUp: Me,
220
+ onPointerCancel: Me,
221
+ children: [
222
+ /* @__PURE__ */ u("span", {
223
+ className: "select-modal__grip",
224
+ "aria-hidden": "true"
225
+ }),
226
+ /* @__PURE__ */ d("div", {
227
+ className: "select-modal__sheetrow",
228
+ children: [
229
+ w && /* @__PURE__ */ u("button", {
230
+ type: "button",
231
+ className: "select-modal__tool select-modal__back",
232
+ "aria-label": Se ?? D.common.back,
233
+ onClick: w,
234
+ children: /* @__PURE__ */ u(t, {})
235
+ }),
236
+ /* @__PURE__ */ d("div", {
237
+ className: "select-modal__headtext",
238
+ children: [
239
+ m && /* @__PURE__ */ u("span", {
240
+ className: "select-modal__eyebrow",
241
+ children: m
242
+ }),
243
+ K,
244
+ Be
245
+ ]
246
+ }),
247
+ ($ || X) && /* @__PURE__ */ d("div", {
248
+ className: "select-modal__tools",
249
+ children: [$, X]
250
+ })
251
+ ]
252
+ }),
253
+ S && /* @__PURE__ */ u("div", {
254
+ className: "select-modal__headaction",
255
+ children: S
256
+ })
257
+ ]
258
+ }), He = /* @__PURE__ */ u("div", {
259
+ className: `select select-modal__overlay${x === "side" ? " select-modal__overlay--side" : ""}${ve ? " select-modal__overlay--noise" : ""}${be === "blur" ? " select-modal__overlay--blur" : ""}${A ? " select-modal__overlay--closing" : ""}`,
260
+ "data-theme": xe,
261
+ onMouseDown: E ? p : void 0,
262
+ children: /* @__PURE__ */ u("div", {
263
+ className: `select-modal select-modal--${ge}${x === "side" ? " select-modal--side" : ""}${Te ? " select-modal--flush" : ""}${b ? " select-modal--split" : ""}${A ? " select-modal--closing" : ""}`,
264
+ ref: M,
98
265
  role: "dialog",
99
266
  "aria-modal": "true",
100
- "aria-labelledby": y ? B : void 0,
101
- "aria-describedby": re,
267
+ "aria-labelledby": h ? F : void 0,
268
+ "aria-describedby": Ne,
269
+ "aria-busy": H === "loading" || void 0,
102
270
  tabIndex: -1,
103
271
  onMouseDown: (e) => e.stopPropagation(),
104
- children: T ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("aside", {
272
+ children: b ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("aside", {
105
273
  className: "select-modal__aside",
106
- children: T
107
- }), /* @__PURE__ */ p("div", {
274
+ children: b
275
+ }), /* @__PURE__ */ d("div", {
108
276
  className: "select-modal__content",
109
277
  children: [
110
- Q,
111
- (v || y || b || S) && /* @__PURE__ */ p("div", {
112
- className: $,
278
+ X,
279
+ (m || h || g || v) && /* @__PURE__ */ d("div", {
280
+ className: Z,
113
281
  children: [
114
- v && /* @__PURE__ */ f("span", {
282
+ m && /* @__PURE__ */ u("span", {
115
283
  className: "select-modal__eyebrow",
116
- children: v
117
- }),
118
- y && /* @__PURE__ */ f("h2", {
119
- id: B,
120
- className: "select-modal__title",
121
- children: y
284
+ children: m
122
285
  }),
123
- Y
286
+ K,
287
+ q
124
288
  ]
125
289
  }),
126
- /* @__PURE__ */ p("div", {
290
+ /* @__PURE__ */ d("div", {
127
291
  className: "select-modal__body",
128
- children: [Z, /* @__PURE__ */ f(o, { children: C })]
292
+ children: [Y, /* @__PURE__ */ u(i, { children: Q ?? y })]
129
293
  })
130
294
  ]
131
- })] }) : /* @__PURE__ */ p(d, { children: [
132
- Q,
133
- (v || y || b || S) && (j ? /* @__PURE__ */ p("div", {
134
- className: `${$} select-modal__header--action`,
135
- children: [/* @__PURE__ */ p("div", {
295
+ })] }) : V ? /* @__PURE__ */ d(l, { children: [
296
+ Ve,
297
+ Re,
298
+ ze
299
+ ] }) : /* @__PURE__ */ d(l, { children: [
300
+ X,
301
+ (m || h || g || v) && (S ? /* @__PURE__ */ d("div", {
302
+ className: `${Z} select-modal__header--action`,
303
+ children: [/* @__PURE__ */ d("div", {
136
304
  className: "select-modal__headtext",
137
305
  children: [
138
- v && /* @__PURE__ */ f("span", {
306
+ m && /* @__PURE__ */ u("span", {
139
307
  className: "select-modal__eyebrow",
140
- children: v
308
+ children: m
141
309
  }),
142
- y && /* @__PURE__ */ f("h2", {
143
- id: B,
144
- className: "select-modal__title",
145
- children: y
146
- }),
147
- Y
310
+ K,
311
+ q
148
312
  ]
149
- }), /* @__PURE__ */ f("div", {
313
+ }), /* @__PURE__ */ u("div", {
150
314
  className: "select-modal__headaction",
151
- children: j
315
+ children: S
152
316
  })]
153
- }) : /* @__PURE__ */ p("div", {
154
- className: $,
317
+ }) : /* @__PURE__ */ d("div", {
318
+ className: Z,
155
319
  children: [
156
- v && /* @__PURE__ */ f("span", {
320
+ m && /* @__PURE__ */ u("span", {
157
321
  className: "select-modal__eyebrow",
158
- children: v
159
- }),
160
- y && /* @__PURE__ */ f("h2", {
161
- id: B,
162
- className: "select-modal__title",
163
- children: y
322
+ children: m
164
323
  }),
165
- Y
324
+ K,
325
+ q
166
326
  ]
167
327
  })),
168
- (C || X) && /* @__PURE__ */ p("div", {
169
- className: "select-modal__body",
170
- children: [Z, /* @__PURE__ */ f(o, { children: C })]
171
- }),
172
- w && /* @__PURE__ */ f("div", {
173
- className: "select-modal__footer",
174
- children: w
175
- })
328
+ Re,
329
+ ze
176
330
  ] })
177
331
  })
178
332
  });
179
- return m(/* @__PURE__ */ f(r, {
180
- value: U,
181
- children: ie
333
+ return le(/* @__PURE__ */ u(re, {
334
+ value: L,
335
+ children: He
182
336
  }), document.body);
183
337
  }
184
338
  //#endregion
185
- export { _ as SelectModal, g as SelectModalActions };
339
+ export { m as SelectModal, p as SelectModalActions };
186
340
 
187
341
  //# sourceMappingURL=SelectModal.js.map
@@ -1,94 +1,96 @@
1
1
  /* empty css */
2
2
  import { ChevronDownIcon as e } from "./icons.js";
3
3
  import { SelectInfoTip as t } from "./SelectInfoTip.js";
4
- import { FrameBody as n, useInsideFrame as r } from "./internal/frame.js";
5
- import { inertProps as i } from "./internal/inert.js";
6
- import { forwardRef as a, useId as o, useState as s } from "react";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { registerSheetFrame as n } from "./internal/sheetBands.js";
5
+ import { FrameBody as r, useInsideFrame as i } from "./internal/frame.js";
6
+ import { inertProps as a } from "./internal/inert.js";
7
+ import { forwardRef as o, useId as s, useState as c } from "react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
9
  //#region src/SelectSection.tsx
9
- var u = a(function({ title: a, help: u, description: d, action: f, collapsible: p = !1, defaultOpen: m = !0, open: h, onOpenChange: g, footer: _, flush: v = !1, list: y = !1, children: b, className: x, ...S }, C) {
10
- let [w, T] = s(m), E = h ?? w, D = o(), O = () => {
10
+ var d = o(function({ title: n, help: o, description: d, action: f, collapsible: p = !1, defaultOpen: m = !0, open: h, onOpenChange: g, footer: _, flush: v = !1, list: y = !1, children: b, className: x, ...S }, C) {
11
+ let [w, T] = c(m), E = h ?? w, D = s(), O = () => {
11
12
  h === void 0 && T(!E), g == null || g(!E);
12
- }, k = (r() ? " select-section--nested" : "") + (v ? " select-section--flush" : "") + (y ? " select-section--list" : ""), A = y ? "list" : "body";
13
- return p ? /* @__PURE__ */ l("div", {
13
+ }, k = (i() ? " select-section--nested" : "") + (v ? " select-section--flush" : "") + (y ? " select-section--list" : ""), A = y ? "list" : "body";
14
+ return p ? /* @__PURE__ */ u("div", {
14
15
  ref: C,
15
16
  ...S,
16
17
  className: `select-section select-section--collapsible${k}${E ? " is-open" : ""}${x ? " " + x : ""}`,
17
- children: [/* @__PURE__ */ l("button", {
18
+ children: [/* @__PURE__ */ u("button", {
18
19
  type: "button",
19
20
  className: "select-section__head select-section__head--toggle",
20
21
  "aria-expanded": E,
21
22
  "aria-controls": D,
22
23
  onClick: O,
23
- children: [/* @__PURE__ */ l("span", {
24
+ children: [/* @__PURE__ */ u("span", {
24
25
  className: "select-section__heading",
25
- children: [a && /* @__PURE__ */ c("span", {
26
+ children: [n && /* @__PURE__ */ l("span", {
26
27
  className: "select-section__title",
27
- children: a
28
- }), d && /* @__PURE__ */ c("span", {
28
+ children: n
29
+ }), d && /* @__PURE__ */ l("span", {
29
30
  className: "select-section__desc",
30
31
  children: d
31
32
  })]
32
- }), /* @__PURE__ */ c("span", {
33
+ }), /* @__PURE__ */ l("span", {
33
34
  className: "select-section__chevron",
34
35
  "aria-hidden": "true",
35
- children: /* @__PURE__ */ c(e, {})
36
+ children: /* @__PURE__ */ l(e, {})
36
37
  })]
37
- }), /* @__PURE__ */ c("div", {
38
+ }), /* @__PURE__ */ l("div", {
38
39
  id: D,
39
40
  className: "select-section__collapse",
40
41
  "data-open": E,
41
- ...i(!E),
42
- children: /* @__PURE__ */ l("div", {
42
+ ...a(!E),
43
+ children: /* @__PURE__ */ u("div", {
43
44
  className: "select-section__collapsewrap",
44
- children: [/* @__PURE__ */ c("div", {
45
+ children: [/* @__PURE__ */ l("div", {
45
46
  className: "select-section__body",
46
- children: /* @__PURE__ */ c(n, {
47
+ children: /* @__PURE__ */ l(r, {
47
48
  kind: A,
48
49
  children: b
49
50
  })
50
- }), _ != null && _ !== "" && /* @__PURE__ */ c("div", {
51
+ }), _ != null && _ !== "" && /* @__PURE__ */ l("div", {
51
52
  className: "select-section__foot",
52
53
  children: _
53
54
  })]
54
55
  })
55
56
  })]
56
- }) : /* @__PURE__ */ l("div", {
57
+ }) : /* @__PURE__ */ u("div", {
57
58
  ref: C,
58
59
  ...S,
59
60
  className: `select-section${k}${x ? " " + x : ""}`,
60
61
  children: [
61
- (a || d || f) && /* @__PURE__ */ l("div", {
62
+ (n || d || f) && /* @__PURE__ */ u("div", {
62
63
  className: "select-section__head",
63
- children: [/* @__PURE__ */ l("div", {
64
+ children: [/* @__PURE__ */ u("div", {
64
65
  className: "select-section__heading",
65
- children: [a && /* @__PURE__ */ l("h2", {
66
- className: `select-section__title${u == null ? "" : " select-section__title--help"}`,
67
- children: [a, u != null && /* @__PURE__ */ c(t, { content: u })]
68
- }), d && /* @__PURE__ */ c("p", {
66
+ children: [n && /* @__PURE__ */ u("h2", {
67
+ className: `select-section__title${o == null ? "" : " select-section__title--help"}`,
68
+ children: [n, o != null && /* @__PURE__ */ l(t, { content: o })]
69
+ }), d && /* @__PURE__ */ l("p", {
69
70
  className: "select-section__desc",
70
71
  children: d
71
72
  })]
72
- }), f ? /* @__PURE__ */ c("div", {
73
+ }), f ? /* @__PURE__ */ l("div", {
73
74
  className: "select-section__action",
74
75
  children: f
75
76
  }) : null]
76
77
  }),
77
- /* @__PURE__ */ c("div", {
78
+ /* @__PURE__ */ l("div", {
78
79
  className: "select-section__body",
79
- children: /* @__PURE__ */ c(n, {
80
+ children: /* @__PURE__ */ l(r, {
80
81
  kind: A,
81
82
  children: b
82
83
  })
83
84
  }),
84
- _ != null && _ !== "" && /* @__PURE__ */ c("div", {
85
+ _ != null && _ !== "" && /* @__PURE__ */ l("div", {
85
86
  className: "select-section__foot",
86
87
  children: _
87
88
  })
88
89
  ]
89
90
  });
90
91
  });
92
+ n(d);
91
93
  //#endregion
92
- export { u as SelectSection };
94
+ export { d as SelectSection };
93
95
 
94
96
  //# sourceMappingURL=SelectSection.js.map
package/dist/index.d.ts CHANGED
@@ -266,7 +266,7 @@ export type { SelectQuantityFieldProps } from './SelectQuantityField';
266
266
  export { SelectRepeatingFieldArray } from './SelectRepeatingFieldArray';
267
267
  export { SelectBuilderLayout } from './SelectBuilderLayout';
268
268
  export { SelectBuilderWorkspace } from './SelectBuilderWorkspace';
269
- export { SelectFlowCanvas, SelectFlowNode, SelectFlowLayout } from './SelectFlowCanvas';
269
+ export { SelectFlowCanvas, SelectFlowNode, SelectFlowLayout, SelectFlowInspectorFoot } from './SelectFlowCanvas';
270
270
  export { SelectSwitchField } from './SelectSwitchField';
271
271
  export { SelectColorField, SELECT_COLOR_PRESETS, normalizeHex, contrastRatio, hexToHsv, hsvToHex } from './SelectColorField';
272
272
  export { SelectProgressBar, type SelectProgressBarProps, type SelectProgressTone } from './SelectProgressBar';