@schumann-dev/ui 0.12.0 → 0.13.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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as h, Fragment as ee } from "react/jsx-runtime";
2
- import { forwardRef as ue, useContext as ye, createContext as ke, useState as S, useCallback as xe, useId as we, useRef as K, useEffect as H, useMemo as se, useLayoutEffect as Ce } from "react";
2
+ import { forwardRef as de, useContext as ye, createContext as ke, useState as S, useCallback as xe, useId as we, useRef as K, useEffect as H, useMemo as se, useLayoutEffect as Ce } from "react";
3
3
  import { c as w, a as P, b as Se } from "./chunks/Icon-xe35IPZg.js";
4
4
  import { I as Lt, g as It, i as Tt, d as Rt, r as At } from "./chunks/Icon-xe35IPZg.js";
5
5
  import * as W from "@radix-ui/react-tooltip";
@@ -17,81 +17,81 @@ function Me({ size: t = 16, label: a, className: n }) {
17
17
  }
18
18
  );
19
19
  }
20
- const me = ue(function({
20
+ const me = de(function({
21
21
  variant: a = "primary",
22
22
  size: n = "md",
23
23
  loading: s = !1,
24
- fullWidth: l = !1,
25
- leftIcon: i,
26
- rightIcon: r,
24
+ fullWidth: r = !1,
25
+ leftIcon: o,
26
+ rightIcon: i,
27
27
  disabled: c,
28
- type: o = "button",
29
- className: p,
30
- children: d,
31
- ...v
32
- }, f) {
33
- const k = c || s;
28
+ type: l = "button",
29
+ className: _,
30
+ children: u,
31
+ ...g
32
+ }, p) {
33
+ const y = c || s;
34
34
  return /* @__PURE__ */ h(
35
35
  "button",
36
36
  {
37
- ref: f,
38
- type: o,
39
- className: w("sui-btn", l && "sui-btn--full", p),
37
+ ref: p,
38
+ type: l,
39
+ className: w("sui-btn", r && "sui-btn--full", _),
40
40
  "data-variant": a,
41
41
  "data-size": n,
42
42
  "data-loading": s || void 0,
43
- disabled: k,
43
+ disabled: y,
44
44
  "aria-busy": s || void 0,
45
- ...v,
45
+ ...g,
46
46
  children: [
47
47
  s && /* @__PURE__ */ e(Me, { size: n === "lg" ? 18 : 15, className: "sui-btn__spinner" }),
48
- !s && i && /* @__PURE__ */ e("span", { className: "sui-btn__icon", children: i }),
49
- d != null && /* @__PURE__ */ e("span", { className: "sui-btn__label", children: d }),
50
- !s && r && /* @__PURE__ */ e("span", { className: "sui-btn__icon", children: r })
48
+ !s && o && /* @__PURE__ */ e("span", { className: "sui-btn__icon", children: o }),
49
+ u != null && /* @__PURE__ */ e("span", { className: "sui-btn__label", children: u }),
50
+ !s && i && /* @__PURE__ */ e("span", { className: "sui-btn__icon", children: i })
51
51
  ]
52
52
  }
53
53
  );
54
- }), De = ue(function({ variant: a = "ghost", size: n = "md", shape: s = "square", className: l, type: i = "button", ...r }, c) {
54
+ }), De = de(function({ variant: a = "ghost", size: n = "md", shape: s = "square", className: r, type: o = "button", ...i }, c) {
55
55
  return /* @__PURE__ */ e(
56
56
  "button",
57
57
  {
58
58
  ref: c,
59
- type: i,
60
- className: w("sui-iconbtn", l),
59
+ type: o,
60
+ className: w("sui-iconbtn", r),
61
61
  "data-variant": a,
62
62
  "data-size": n,
63
63
  "data-shape": s,
64
- ...r
64
+ ...i
65
65
  }
66
66
  );
67
- }), fe = ke(null);
67
+ }), _e = ke(null);
68
68
  function ie() {
69
- return ye(fe);
69
+ return ye(_e);
70
70
  }
71
- const _e = ue(function({ inputSize: a = "md", invalid: n, leftAddon: s, rightAddon: l, disabled: i, className: r, id: c, ...o }, p) {
72
- const d = ie(), v = c ?? (d == null ? void 0 : d.id), f = n ?? (d == null ? void 0 : d.invalid) ?? !1;
71
+ const fe = de(function({ inputSize: a = "md", invalid: n, leftAddon: s, rightAddon: r, disabled: o, className: i, id: c, ...l }, _) {
72
+ const u = ie(), g = c ?? (u == null ? void 0 : u.id), p = n ?? (u == null ? void 0 : u.invalid) ?? !1;
73
73
  return /* @__PURE__ */ h(
74
74
  "div",
75
75
  {
76
- className: w("sui-input", r),
76
+ className: w("sui-input", i),
77
77
  "data-size": a,
78
- "data-invalid": f || void 0,
79
- "data-disabled": i || void 0,
78
+ "data-invalid": p || void 0,
79
+ "data-disabled": o || void 0,
80
80
  children: [
81
81
  s && /* @__PURE__ */ e("span", { className: "sui-input__addon sui-input__addon--left", children: s }),
82
82
  /* @__PURE__ */ e(
83
83
  "input",
84
84
  {
85
- ref: p,
86
- id: v,
85
+ ref: _,
86
+ id: g,
87
87
  className: "sui-input__control",
88
- disabled: i,
89
- "aria-invalid": f || void 0,
90
- "aria-describedby": d == null ? void 0 : d.describedBy,
91
- ...o
88
+ disabled: o,
89
+ "aria-invalid": p || void 0,
90
+ "aria-describedby": u == null ? void 0 : u.describedBy,
91
+ ...l
92
92
  }
93
93
  ),
94
- l && /* @__PURE__ */ e("span", { className: "sui-input__addon sui-input__addon--right", children: l })
94
+ r && /* @__PURE__ */ e("span", { className: "sui-input__addon sui-input__addon--right", children: r })
95
95
  ]
96
96
  }
97
97
  );
@@ -101,27 +101,27 @@ function pe({
101
101
  size: a = "sm",
102
102
  weight: n = "regular",
103
103
  tone: s = "primary",
104
- align: l,
105
- truncate: i,
106
- mono: r,
104
+ align: r,
105
+ truncate: o,
106
+ mono: i,
107
107
  className: c,
108
- ...o
108
+ ...l
109
109
  }) {
110
110
  return /* @__PURE__ */ e(
111
111
  t,
112
112
  {
113
- className: w("sui-text", i && "sui-text--truncate", r && "sui-text--mono", c),
113
+ className: w("sui-text", o && "sui-text--truncate", i && "sui-text--mono", c),
114
114
  "data-size": a,
115
115
  "data-weight": n,
116
116
  "data-tone": s,
117
- "data-align": l,
118
- ...o
117
+ "data-align": r,
118
+ ...l
119
119
  }
120
120
  );
121
121
  }
122
122
  function ze({ level: t = 2, as: a, className: n, ...s }) {
123
- const l = a ?? `h${t}`;
124
- return /* @__PURE__ */ e(l, { className: w("sui-heading", n), "data-level": t, ...s });
123
+ const r = a ?? `h${t}`;
124
+ return /* @__PURE__ */ e(r, { className: w("sui-heading", n), "data-level": t, ...s });
125
125
  }
126
126
  function Ee({ required: t, className: a, children: n, ...s }) {
127
127
  return /* @__PURE__ */ h("label", { className: w("sui-label", a), ...s, children: [
@@ -134,21 +134,21 @@ function it({
134
134
  size: a = "md",
135
135
  dot: n = !1,
136
136
  leftIcon: s,
137
- className: l,
138
- children: i,
139
- ...r
137
+ className: r,
138
+ children: o,
139
+ ...i
140
140
  }) {
141
141
  return /* @__PURE__ */ h(
142
142
  "span",
143
143
  {
144
- className: w("sui-badge", l),
144
+ className: w("sui-badge", r),
145
145
  "data-status": t,
146
146
  "data-size": a,
147
- ...r,
147
+ ...i,
148
148
  children: [
149
149
  n && /* @__PURE__ */ e("span", { className: "sui-badge__dot", "aria-hidden": "true" }),
150
150
  s && /* @__PURE__ */ e("span", { className: "sui-badge__icon", children: s }),
151
- i
151
+ o
152
152
  ]
153
153
  }
154
154
  );
@@ -156,39 +156,39 @@ function it({
156
156
  function $e(t) {
157
157
  return t.trim().split(/\s+/).slice(0, 2).map((a) => a[0] ?? "").join("").toUpperCase();
158
158
  }
159
- function rt({ src: t, name: a, size: n = 30, className: s, style: l }) {
159
+ function rt({ src: t, name: a, size: n = 30, className: s, style: r }) {
160
160
  return /* @__PURE__ */ e(
161
161
  "span",
162
162
  {
163
163
  className: w("sui-avatar", s),
164
- style: { width: n, height: n, fontSize: n * 0.38, ...l },
164
+ style: { width: n, height: n, fontSize: n * 0.38, ...r },
165
165
  children: t ? /* @__PURE__ */ e("img", { src: t, alt: "" }) : $e(a) || "?"
166
166
  }
167
167
  );
168
168
  }
169
- function de({
169
+ function ue({
170
170
  value: t,
171
171
  defaultValue: a,
172
172
  onChange: n
173
173
  }) {
174
- const [s, l] = S(a), i = t !== void 0, r = i ? t : s, c = xe(
175
- (o) => {
176
- i || l(o), n == null || n(o);
174
+ const [s, r] = S(a), o = t !== void 0, i = o ? t : s, c = xe(
175
+ (l) => {
176
+ o || r(l), n == null || n(l);
177
177
  },
178
- [i, n]
178
+ [o, n]
179
179
  );
180
- return [r, c];
180
+ return [i, c];
181
181
  }
182
182
  function Le({
183
183
  checked: t,
184
184
  defaultChecked: a = !1,
185
185
  onCheckedChange: n,
186
186
  disabled: s,
187
- id: l,
188
- className: i,
189
- ...r
187
+ id: r,
188
+ className: o,
189
+ ...i
190
190
  }) {
191
- const c = ie(), [o, p] = de({
191
+ const c = ie(), [l, _] = ue({
192
192
  value: t,
193
193
  defaultValue: a,
194
194
  onChange: n
@@ -198,25 +198,25 @@ function Le({
198
198
  {
199
199
  type: "button",
200
200
  role: "switch",
201
- "aria-checked": o,
202
- id: l ?? (c == null ? void 0 : c.id),
201
+ "aria-checked": l,
202
+ id: r ?? (c == null ? void 0 : c.id),
203
203
  "aria-describedby": c == null ? void 0 : c.describedBy,
204
204
  disabled: s,
205
- onClick: () => p(!o),
206
- className: w("sui-switch", i),
207
- "data-checked": o || void 0,
208
- ...r,
205
+ onClick: () => _(!l),
206
+ className: w("sui-switch", o),
207
+ "data-checked": l || void 0,
208
+ ...i,
209
209
  children: /* @__PURE__ */ e("span", { className: "sui-switch__thumb" })
210
210
  }
211
211
  );
212
212
  }
213
- function lt({ width: t = "100%", height: a = 16, radius: n = 9, className: s, style: l }) {
213
+ function lt({ width: t = "100%", height: a = 16, radius: n = 9, className: s, style: r }) {
214
214
  return /* @__PURE__ */ e(
215
215
  "span",
216
216
  {
217
217
  className: w("sui-skeleton", s),
218
218
  "aria-hidden": "true",
219
- style: { width: t, height: a, borderRadius: n, ...l }
219
+ style: { width: t, height: a, borderRadius: n, ...r }
220
220
  }
221
221
  );
222
222
  }
@@ -225,23 +225,23 @@ function ot({
225
225
  max: a = 1,
226
226
  color: n = "var(--interactive-primary)",
227
227
  dangerColor: s = "var(--text-error)",
228
- dangerThreshold: l = 0.85,
229
- height: i = 6,
230
- label: r,
228
+ dangerThreshold: r = 0.85,
229
+ height: o = 6,
230
+ label: i,
231
231
  className: c
232
232
  }) {
233
- const o = a > 0 ? Math.min(Math.max(t / a, 0), 1) : 0, p = o >= l ? s : n;
233
+ const l = a > 0 ? Math.min(Math.max(t / a, 0), 1) : 0, _ = l >= r ? s : n;
234
234
  return /* @__PURE__ */ e(
235
235
  "div",
236
236
  {
237
237
  className: w("sui-progressbar", c),
238
- style: { height: i },
238
+ style: { height: o },
239
239
  role: "progressbar",
240
- "aria-valuenow": Math.round(o * 100),
240
+ "aria-valuenow": Math.round(l * 100),
241
241
  "aria-valuemin": 0,
242
242
  "aria-valuemax": 100,
243
- "aria-label": r,
244
- children: /* @__PURE__ */ e("div", { className: "sui-progressbar__fill", style: { width: `${o * 100}%`, background: p } })
243
+ "aria-label": i,
244
+ children: /* @__PURE__ */ e("div", { className: "sui-progressbar__fill", style: { width: `${l * 100}%`, background: _ } })
245
245
  }
246
246
  );
247
247
  }
@@ -250,87 +250,88 @@ function ct({
250
250
  hint: a,
251
251
  error: n,
252
252
  required: s,
253
- id: l,
254
- className: i,
255
- children: r
253
+ id: r,
254
+ className: o,
255
+ style: i,
256
+ children: c
256
257
  }) {
257
- const c = we(), o = l ?? c, p = n != null && n !== !1, d = `${o}-hint`, v = `${o}-error`, f = p ? v : a ? d : void 0;
258
- return /* @__PURE__ */ h("div", { className: w("sui-formfield", i), children: [
259
- t && /* @__PURE__ */ e(Ee, { htmlFor: o, required: s, children: t }),
260
- /* @__PURE__ */ e(fe.Provider, { value: { id: o, invalid: p, describedBy: f }, children: r }),
261
- p ? /* @__PURE__ */ e(pe, { as: "p", id: v, size: "xs", tone: "error", role: "alert", children: n }) : a ? /* @__PURE__ */ e(pe, { as: "p", id: d, size: "xs", tone: "secondary", children: a }) : null
258
+ const l = we(), _ = r ?? l, u = n != null && n !== !1, g = `${_}-hint`, p = `${_}-error`, y = u ? p : a ? g : void 0;
259
+ return /* @__PURE__ */ h("div", { className: w("sui-formfield", o), style: i, children: [
260
+ t && /* @__PURE__ */ e(Ee, { htmlFor: _, required: s, children: t }),
261
+ /* @__PURE__ */ e(_e.Provider, { value: { id: _, invalid: u, describedBy: y }, children: c }),
262
+ u ? /* @__PURE__ */ e(pe, { as: "p", id: p, size: "xs", tone: "error", role: "alert", children: n }) : a ? /* @__PURE__ */ e(pe, { as: "p", id: g, size: "xs", tone: "secondary", children: a }) : null
262
263
  ] });
263
264
  }
264
265
  function q(t) {
265
266
  return t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
266
267
  }
267
- function ut({
268
+ function dt({
268
269
  value: t,
269
270
  onChange: a,
270
271
  options: n,
271
272
  placeholder: s = "Selecionar...",
272
- emptyText: l = "Nenhum resultado",
273
- disabled: i = !1,
274
- className: r
273
+ emptyText: r = "Nenhum resultado",
274
+ disabled: o = !1,
275
+ className: i
275
276
  }) {
276
- const c = ie(), [o, p] = S(!1), [d, v] = S(""), [f, k] = S(0), M = K(null), E = n.find((m) => m.value === t) ?? null, $ = d.trim() ? n.filter((m) => q(m.label).includes(q(d))) : n, z = () => {
277
- i || p(!0);
278
- }, L = () => {
279
- p(!1), v("");
277
+ const c = ie(), [l, _] = S(!1), [u, g] = S(""), [p, y] = S(0), z = K(null), E = n.find((m) => m.value === t) ?? null, L = u.trim() ? n.filter((m) => q(m.label).includes(q(u))) : n, $ = () => {
278
+ o || _(!0);
279
+ }, M = () => {
280
+ _(!1), g("");
280
281
  }, T = (m) => {
281
- i || a(m), L();
282
+ o || a(m), M();
282
283
  }, R = () => {
283
- if (i) return;
284
- const m = $[f];
284
+ if (o) return;
285
+ const m = L[p];
285
286
  m && T(m.value);
286
287
  };
287
288
  H(() => {
288
- k(0);
289
- }, [d, o]);
290
- const b = (m) => {
289
+ y(0);
290
+ }, [u, l]);
291
+ const v = (m) => {
291
292
  if (m.target === m.currentTarget) {
292
- if (i) {
293
+ if (o) {
293
294
  m.preventDefault();
294
295
  return;
295
296
  }
296
- m.key === "Enter" ? (m.preventDefault(), o ? R() : z()) : m.key === " " || m.key === "ArrowDown" ? (m.preventDefault(), o ? k((y) => Math.min(y + 1, $.length - 1)) : z()) : m.key === "ArrowUp" && (m.preventDefault(), o ? k((y) => Math.max(y - 1, 0)) : z());
297
+ m.key === "Enter" ? (m.preventDefault(), l ? R() : $()) : m.key === " " || m.key === "ArrowDown" ? (m.preventDefault(), l ? y((k) => Math.min(k + 1, L.length - 1)) : $()) : m.key === "ArrowUp" && (m.preventDefault(), l ? y((k) => Math.max(k - 1, 0)) : $());
297
298
  }
298
299
  };
299
- return /* @__PURE__ */ h("div", { className: w("sui-combobox", r), children: [
300
+ return /* @__PURE__ */ h("div", { className: w("sui-combobox", i), children: [
300
301
  /* @__PURE__ */ h(
301
302
  "div",
302
303
  {
303
- onClick: z,
304
+ onClick: $,
304
305
  onFocus: (m) => {
305
- m.target === m.currentTarget && !o && z();
306
+ m.target === m.currentTarget && !l && $();
306
307
  },
307
- onKeyDown: b,
308
- tabIndex: i ? -1 : 0,
308
+ onKeyDown: v,
309
+ tabIndex: o ? -1 : 0,
309
310
  role: "combobox",
310
- "aria-expanded": o,
311
+ "aria-expanded": l,
311
312
  "aria-haspopup": "listbox",
312
- "aria-disabled": i ? "true" : void 0,
313
+ "aria-disabled": o ? "true" : void 0,
313
314
  "aria-describedby": c == null ? void 0 : c.describedBy,
314
315
  id: c == null ? void 0 : c.id,
315
316
  className: "sui-combobox__trigger",
316
- "data-disabled": i || void 0,
317
+ "data-disabled": o || void 0,
317
318
  "data-invalid": (c == null ? void 0 : c.invalid) || void 0,
318
319
  children: [
319
- E && !o && E.leading && /* @__PURE__ */ e("span", { className: "sui-combobox__leading", children: E.leading }),
320
- o ? /* @__PURE__ */ e(
320
+ E && !l && E.leading && /* @__PURE__ */ e("span", { className: "sui-combobox__leading", children: E.leading }),
321
+ l ? /* @__PURE__ */ e(
321
322
  "input",
322
323
  {
323
- ref: M,
324
+ ref: z,
324
325
  autoFocus: !0,
325
326
  onFocus: (m) => m.currentTarget.select(),
326
- value: d,
327
- onChange: (m) => v(m.target.value),
327
+ value: u,
328
+ onChange: (m) => g(m.target.value),
328
329
  onKeyDown: (m) => {
329
- if (i) {
330
+ if (o) {
330
331
  m.preventDefault();
331
332
  return;
332
333
  }
333
- m.key === "Enter" ? (m.preventDefault(), R()) : m.key === "ArrowDown" ? (m.preventDefault(), k((y) => Math.min(y + 1, $.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), k((y) => Math.max(y - 1, 0))) : m.key === "Escape" && L();
334
+ m.key === "Enter" ? (m.preventDefault(), R()) : m.key === "ArrowDown" ? (m.preventDefault(), y((k) => Math.min(k + 1, L.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), y((k) => Math.max(k - 1, 0))) : m.key === "Escape" && M();
334
335
  },
335
336
  placeholder: E ? E.label : s,
336
337
  className: "sui-combobox__search"
@@ -340,20 +341,20 @@ function ut({
340
341
  ]
341
342
  }
342
343
  ),
343
- o && !i && /* @__PURE__ */ h(ee, { children: [
344
- /* @__PURE__ */ e("div", { className: "sui-combobox__backdrop", onClick: L }),
344
+ l && !o && /* @__PURE__ */ h(ee, { children: [
345
+ /* @__PURE__ */ e("div", { className: "sui-combobox__backdrop", onClick: M }),
345
346
  /* @__PURE__ */ h("div", { className: "sui-combobox__list", role: "listbox", children: [
346
- $.length === 0 && /* @__PURE__ */ e("div", { className: "sui-combobox__empty", children: l }),
347
- $.map((m, y) => /* @__PURE__ */ h(
347
+ L.length === 0 && /* @__PURE__ */ e("div", { className: "sui-combobox__empty", children: r }),
348
+ L.map((m, k) => /* @__PURE__ */ h(
348
349
  "button",
349
350
  {
350
351
  type: "button",
351
352
  role: "option",
352
353
  "aria-selected": m.value === t,
353
- onMouseEnter: () => k(y),
354
+ onMouseEnter: () => y(k),
354
355
  onClick: () => T(m.value),
355
356
  className: "sui-combobox__option",
356
- "data-highlight": y === f || void 0,
357
+ "data-highlight": k === p || void 0,
357
358
  "data-selected": m.value === t || void 0,
358
359
  children: [
359
360
  m.leading && /* @__PURE__ */ e("span", { className: "sui-combobox__leading", children: m.leading }),
@@ -367,8 +368,8 @@ function ut({
367
368
  ] });
368
369
  }
369
370
  function U(t, a) {
370
- const n = t.replace("#", ""), s = parseInt(n.slice(0, 2), 16), l = parseInt(n.slice(2, 4), 16), i = parseInt(n.slice(4, 6), 16);
371
- return `rgba(${s},${l},${i},${a})`;
371
+ const n = t.replace("#", ""), s = parseInt(n.slice(0, 2), 16), r = parseInt(n.slice(2, 4), 16), o = parseInt(n.slice(4, 6), 16);
372
+ return `rgba(${s},${r},${o},${a})`;
372
373
  }
373
374
  function re(t) {
374
375
  const a = t.replace("#", "").padEnd(6, "0");
@@ -379,19 +380,19 @@ function re(t) {
379
380
  ];
380
381
  }
381
382
  function ne(t, a, n) {
382
- const s = (l) => Math.round(Math.max(0, Math.min(255, l))).toString(16).padStart(2, "0");
383
+ const s = (r) => Math.round(Math.max(0, Math.min(255, r))).toString(16).padStart(2, "0");
383
384
  return `#${s(t)}${s(a)}${s(n)}`;
384
385
  }
385
386
  function le(t, a, n) {
386
387
  t /= 255, a /= 255, n /= 255;
387
- const s = Math.max(t, a, n), l = Math.min(t, a, n), i = s - l;
388
- let r = 0;
389
- return i && (s === t ? r = (a - n) / i % 6 : s === a ? r = (n - t) / i + 2 : r = (t - a) / i + 4, r *= 60, r < 0 && (r += 360)), { h: r, s: s ? i / s : 0, v: s };
388
+ const s = Math.max(t, a, n), r = Math.min(t, a, n), o = s - r;
389
+ let i = 0;
390
+ return o && (s === t ? i = (a - n) / o % 6 : s === a ? i = (n - t) / o + 2 : i = (t - a) / o + 4, i *= 60, i < 0 && (i += 360)), { h: i, s: s ? o / s : 0, v: s };
390
391
  }
391
392
  function oe(t, a, n) {
392
- const s = n * a, l = s * (1 - Math.abs(t / 60 % 2 - 1)), i = n - s;
393
- let r = 0, c = 0, o = 0;
394
- return t < 60 ? [r, c, o] = [s, l, 0] : t < 120 ? [r, c, o] = [l, s, 0] : t < 180 ? [r, c, o] = [0, s, l] : t < 240 ? [r, c, o] = [0, l, s] : t < 300 ? [r, c, o] = [l, 0, s] : [r, c, o] = [s, 0, l], [Math.round((r + i) * 255), Math.round((c + i) * 255), Math.round((o + i) * 255)];
393
+ const s = n * a, r = s * (1 - Math.abs(t / 60 % 2 - 1)), o = n - s;
394
+ let i = 0, c = 0, l = 0;
395
+ return t < 60 ? [i, c, l] = [s, r, 0] : t < 120 ? [i, c, l] = [r, s, 0] : t < 180 ? [i, c, l] = [0, s, r] : t < 240 ? [i, c, l] = [0, r, s] : t < 300 ? [i, c, l] = [r, 0, s] : [i, c, l] = [s, 0, r], [Math.round((i + o) * 255), Math.round((c + o) * 255), Math.round((l + o) * 255)];
395
396
  }
396
397
  function Ie(t) {
397
398
  let a = (t == null ? void 0 : t.parentElement) ?? null;
@@ -410,54 +411,54 @@ function ve(t) {
410
411
  return { top: n.top, left: n.left };
411
412
  }
412
413
  const Q = "#5961f7";
413
- function dt({
414
+ function ut({
414
415
  options: t,
415
416
  selected: a,
416
417
  onChange: n,
417
418
  placeholder: s = "Selecionar...",
418
- emptyText: l = "Nenhuma opção disponível",
419
- noResultsText: i = "Nenhum resultado",
420
- className: r
419
+ emptyText: r = "Nenhuma opção disponível",
420
+ noResultsText: o = "Nenhum resultado",
421
+ className: i
421
422
  }) {
422
- const c = ie(), [o, p] = S(!1), [d, v] = S(""), [f, k] = S(0), [M, E] = S(null), $ = K(null), z = K(null), L = a.map((u) => t.find((g) => g.value === u)).filter((u) => !!u), T = (u) => n(a.includes(u) ? a.filter((g) => g !== u) : [...a, u]), R = d.trim() ? t.filter((u) => q(u.label).includes(q(d))) : t;
423
+ const c = ie(), [l, _] = S(!1), [u, g] = S(""), [p, y] = S(0), [z, E] = S(null), L = K(null), $ = K(null), M = a.map((d) => t.find((b) => b.value === d)).filter((d) => !!d), T = (d) => n(a.includes(d) ? a.filter((b) => b !== d) : [...a, d]), R = u.trim() ? t.filter((d) => q(d.label).includes(q(u))) : t;
423
424
  H(() => {
424
- if (!o) return;
425
- const u = () => {
425
+ if (!l) return;
426
+ const d = () => {
426
427
  var D;
427
- const g = (D = $.current) == null ? void 0 : D.getBoundingClientRect();
428
- if (!g) return;
429
- const C = ve($.current);
430
- E({ top: g.bottom - C.top + 6, left: g.left - C.left, width: g.width });
428
+ const b = (D = L.current) == null ? void 0 : D.getBoundingClientRect();
429
+ if (!b) return;
430
+ const C = ve(L.current);
431
+ E({ top: b.bottom - C.top + 6, left: b.left - C.left, width: b.width });
431
432
  };
432
- return u(), window.addEventListener("scroll", u, !0), window.addEventListener("resize", u), () => {
433
- window.removeEventListener("scroll", u, !0), window.removeEventListener("resize", u);
433
+ return d(), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
434
+ window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
434
435
  };
435
- }, [o]), H(() => {
436
- k(0);
437
- }, [d, o]);
438
- const b = () => {
439
- const u = R[f];
440
- u && T(u.value), v("");
436
+ }, [l]), H(() => {
437
+ y(0);
438
+ }, [u, l]);
439
+ const v = () => {
440
+ const d = R[p];
441
+ d && T(d.value), g("");
441
442
  }, m = () => requestAnimationFrame(() => {
442
- var u;
443
- return (u = z.current) == null ? void 0 : u.focus();
444
- }), y = () => {
445
- p(!0), m();
443
+ var d;
444
+ return (d = $.current) == null ? void 0 : d.focus();
445
+ }), k = () => {
446
+ _(!0), m();
446
447
  };
447
- return /* @__PURE__ */ h("div", { ref: $, className: w("sui-multiselect", r), children: [
448
+ return /* @__PURE__ */ h("div", { ref: L, className: w("sui-multiselect", i), children: [
448
449
  /* @__PURE__ */ h(
449
450
  "div",
450
451
  {
451
- onClick: y,
452
- onFocus: (u) => {
453
- u.target === u.currentTarget && y();
452
+ onClick: k,
453
+ onFocus: (d) => {
454
+ d.target === d.currentTarget && k();
454
455
  },
455
- onKeyDown: (u) => {
456
- u.target === u.currentTarget && (u.key === "Enter" ? (u.preventDefault(), o ? b() : y()) : u.key === " " || u.key === "ArrowDown" ? (u.preventDefault(), o ? k((g) => Math.min(g + 1, R.length - 1)) : y()) : u.key === "ArrowUp" && (u.preventDefault(), o ? k((g) => Math.max(g - 1, 0)) : y()));
456
+ onKeyDown: (d) => {
457
+ d.target === d.currentTarget && (d.key === "Enter" ? (d.preventDefault(), l ? v() : k()) : d.key === " " || d.key === "ArrowDown" ? (d.preventDefault(), l ? y((b) => Math.min(b + 1, R.length - 1)) : k()) : d.key === "ArrowUp" && (d.preventDefault(), l ? y((b) => Math.max(b - 1, 0)) : k()));
457
458
  },
458
459
  tabIndex: 0,
459
460
  role: "combobox",
460
- "aria-expanded": o,
461
+ "aria-expanded": l,
461
462
  "aria-haspopup": "listbox",
462
463
  id: c == null ? void 0 : c.id,
463
464
  "aria-describedby": c == null ? void 0 : c.describedBy,
@@ -465,30 +466,30 @@ function dt({
465
466
  className: "sui-multiselect__trigger",
466
467
  children: [
467
468
  /* @__PURE__ */ h("div", { className: "sui-multiselect__chips", children: [
468
- L.map((u) => /* @__PURE__ */ h(
469
+ M.map((d) => /* @__PURE__ */ h(
469
470
  "span",
470
471
  {
471
472
  className: "sui-multiselect__chip",
472
473
  style: {
473
- background: U(u.color ?? Q, 0.14),
474
- color: u.color ?? Q
474
+ background: U(d.color ?? Q, 0.14),
475
+ color: d.color ?? Q
475
476
  },
476
477
  children: [
477
- u.icon ?? /* @__PURE__ */ e(
478
+ d.icon ?? /* @__PURE__ */ e(
478
479
  "span",
479
480
  {
480
481
  className: "sui-multiselect__dot",
481
- style: { background: u.color ?? Q }
482
+ style: { background: d.color ?? Q }
482
483
  }
483
484
  ),
484
- u.label,
485
+ d.label,
485
486
  /* @__PURE__ */ e(
486
487
  "button",
487
488
  {
488
489
  type: "button",
489
- "aria-label": `Remover ${u.label}`,
490
- onClick: (g) => {
491
- g.stopPropagation(), T(u.value);
490
+ "aria-label": `Remover ${d.label}`,
491
+ onClick: (b) => {
492
+ b.stopPropagation(), T(d.value);
492
493
  },
493
494
  className: "sui-multiselect__chip-x",
494
495
  children: "×"
@@ -496,22 +497,22 @@ function dt({
496
497
  )
497
498
  ]
498
499
  },
499
- u.value
500
+ d.value
500
501
  )),
501
502
  /* @__PURE__ */ e(
502
503
  "input",
503
504
  {
504
- ref: z,
505
- value: d,
506
- onChange: (u) => {
507
- v(u.target.value), p(!0);
505
+ ref: $,
506
+ value: u,
507
+ onChange: (d) => {
508
+ g(d.target.value), _(!0);
508
509
  },
509
- onFocus: () => p(!0),
510
- onKeyDown: (u) => {
511
- var g;
512
- u.key === "Enter" ? (u.preventDefault(), b()) : u.key === "ArrowDown" ? (u.preventDefault(), p(!0), k((C) => Math.min(C + 1, R.length - 1))) : u.key === "ArrowUp" ? (u.preventDefault(), k((C) => Math.max(C - 1, 0))) : u.key === "Escape" && (p(!1), (g = z.current) == null || g.blur());
510
+ onFocus: () => _(!0),
511
+ onKeyDown: (d) => {
512
+ var b;
513
+ d.key === "Enter" ? (d.preventDefault(), v()) : d.key === "ArrowDown" ? (d.preventDefault(), _(!0), y((C) => Math.min(C + 1, R.length - 1))) : d.key === "ArrowUp" ? (d.preventDefault(), y((C) => Math.max(C - 1, 0))) : d.key === "Escape" && (_(!1), (b = $.current) == null || b.blur());
513
514
  },
514
- placeholder: L.length === 0 ? s : "",
515
+ placeholder: M.length === 0 ? s : "",
515
516
  className: "sui-multiselect__search"
516
517
  }
517
518
  )
@@ -520,32 +521,32 @@ function dt({
520
521
  ]
521
522
  }
522
523
  ),
523
- o && M && /* @__PURE__ */ h(ee, { children: [
524
- /* @__PURE__ */ e("div", { className: "sui-multiselect__backdrop", onClick: () => p(!1) }),
524
+ l && z && /* @__PURE__ */ h(ee, { children: [
525
+ /* @__PURE__ */ e("div", { className: "sui-multiselect__backdrop", onClick: () => _(!1) }),
525
526
  /* @__PURE__ */ h(
526
527
  "div",
527
528
  {
528
529
  className: "sui-multiselect__list",
529
530
  role: "listbox",
530
531
  "aria-multiselectable": "true",
531
- style: { top: M.top, left: M.left, width: M.width },
532
+ style: { top: z.top, left: z.left, width: z.width },
532
533
  children: [
533
- R.length === 0 && /* @__PURE__ */ e("div", { className: "sui-multiselect__empty", children: t.length === 0 ? l : i }),
534
- R.map((u, g) => {
535
- const C = a.includes(u.value);
534
+ R.length === 0 && /* @__PURE__ */ e("div", { className: "sui-multiselect__empty", children: t.length === 0 ? r : o }),
535
+ R.map((d, b) => {
536
+ const C = a.includes(d.value);
536
537
  return /* @__PURE__ */ h(
537
538
  "button",
538
539
  {
539
540
  type: "button",
540
541
  role: "option",
541
542
  "aria-selected": C,
542
- onMouseEnter: () => k(g),
543
+ onMouseEnter: () => y(b),
543
544
  onClick: () => {
544
545
  var D;
545
- T(u.value), v(""), (D = z.current) == null || D.focus();
546
+ T(d.value), g(""), (D = $.current) == null || D.focus();
546
547
  },
547
548
  className: "sui-multiselect__option",
548
- "data-highlight": g === f || void 0,
549
+ "data-highlight": b === p || void 0,
549
550
  "data-checked": C || void 0,
550
551
  children: [
551
552
  /* @__PURE__ */ e(
@@ -553,33 +554,33 @@ function dt({
553
554
  {
554
555
  className: "sui-multiselect__check",
555
556
  style: C ? {
556
- background: u.color ?? Q,
557
- borderColor: u.color ?? Q
557
+ background: d.color ?? Q,
558
+ borderColor: d.color ?? Q
558
559
  } : void 0,
559
560
  children: C && /* @__PURE__ */ e(P, { name: "check", size: 12, color: "#fff", strokeWidth: 3 })
560
561
  }
561
562
  ),
562
- u.icon ?? /* @__PURE__ */ e(
563
+ d.icon ?? /* @__PURE__ */ e(
563
564
  "span",
564
565
  {
565
566
  className: "sui-multiselect__dot sui-multiselect__dot--lg",
566
- style: { background: u.color ?? Q }
567
+ style: { background: d.color ?? Q }
567
568
  }
568
569
  ),
569
570
  /* @__PURE__ */ h("span", { className: "sui-multiselect__option-text", children: [
570
- /* @__PURE__ */ e("span", { className: "sui-multiselect__option-label", children: u.label }),
571
- u.sublabel && /* @__PURE__ */ e(
571
+ /* @__PURE__ */ e("span", { className: "sui-multiselect__option-label", children: d.label }),
572
+ d.sublabel && /* @__PURE__ */ e(
572
573
  "span",
573
574
  {
574
575
  className: "sui-multiselect__option-sub",
575
- style: u.sublabelColor ? { color: u.sublabelColor } : void 0,
576
- children: u.sublabel
576
+ style: d.sublabelColor ? { color: d.sublabelColor } : void 0,
577
+ children: d.sublabel
577
578
  }
578
579
  )
579
580
  ] })
580
581
  ]
581
582
  },
582
- u.value
583
+ d.value
583
584
  );
584
585
  })
585
586
  ]
@@ -594,25 +595,27 @@ function ht({
594
595
  value: a,
595
596
  onChange: n,
596
597
  variant: s = "pill",
597
- className: l
598
+ disabled: r = !1,
599
+ className: o
598
600
  }) {
599
- return /* @__PURE__ */ e("div", { className: w("sui-segmented", l), "data-variant": s, role: "group", children: t.map((i) => {
600
- const r = a === i.value, c = i.color ?? Te;
601
+ return /* @__PURE__ */ e("div", { className: w("sui-segmented", o), "data-variant": s, "data-disabled": r || void 0, role: "group", children: t.map((i) => {
602
+ const c = a === i.value, l = i.color ?? Te;
601
603
  return /* @__PURE__ */ h(
602
604
  "button",
603
605
  {
604
606
  type: "button",
605
- "aria-pressed": r,
607
+ "aria-pressed": c,
608
+ disabled: r,
606
609
  onClick: () => n(i.value),
607
610
  className: "sui-segmented__option",
608
- "data-on": r || void 0,
609
- style: r ? s === "pill" ? { background: U(c, 0.13), color: c } : s === "card" ? { background: U(c, 0.16), borderColor: U(c, 0.5) } : void 0 : void 0,
611
+ "data-on": c || void 0,
612
+ style: c ? s === "pill" ? { background: U(l, 0.13), color: l } : s === "card" ? { background: U(l, 0.16), borderColor: U(l, 0.5) } : void 0 : void 0,
610
613
  children: [
611
614
  s === "pill" && /* @__PURE__ */ e(
612
615
  "span",
613
616
  {
614
617
  className: "sui-segmented__dot",
615
- style: { background: c, opacity: r ? 1 : 0.4 }
618
+ style: { background: l, opacity: c ? 1 : 0.4 }
616
619
  }
617
620
  ),
618
621
  /* @__PURE__ */ e("span", { className: "sui-segmented__label", children: i.label }),
@@ -620,7 +623,7 @@ function ht({
620
623
  "span",
621
624
  {
622
625
  className: "sui-segmented__sublabel",
623
- style: r ? { color: c } : void 0,
626
+ style: c ? { color: l } : void 0,
624
627
  children: i.sublabel
625
628
  }
626
629
  )
@@ -635,26 +638,26 @@ function mt({
635
638
  description: a,
636
639
  checked: n,
637
640
  onCheckedChange: s,
638
- disabled: l,
639
- className: i
641
+ disabled: r,
642
+ className: o
640
643
  }) {
641
644
  return /* @__PURE__ */ h(
642
645
  "div",
643
646
  {
644
- className: w("sui-switchcard", i),
645
- "data-disabled": l || void 0,
646
- onClick: () => !l && s(!n),
647
+ className: w("sui-switchcard", o),
648
+ "data-disabled": r || void 0,
649
+ onClick: () => !r && s(!n),
647
650
  children: [
648
651
  /* @__PURE__ */ h("div", { className: "sui-switchcard__text", children: [
649
652
  /* @__PURE__ */ e("div", { className: "sui-switchcard__title", children: t }),
650
653
  a && /* @__PURE__ */ e("div", { className: "sui-switchcard__desc", children: a })
651
654
  ] }),
652
- /* @__PURE__ */ e("span", { onClick: (r) => r.stopPropagation(), style: { display: "inline-flex" }, children: /* @__PURE__ */ e(
655
+ /* @__PURE__ */ e("span", { onClick: (i) => i.stopPropagation(), style: { display: "inline-flex" }, children: /* @__PURE__ */ e(
653
656
  Le,
654
657
  {
655
658
  checked: n,
656
- onCheckedChange: (r) => s(r),
657
- disabled: l,
659
+ onCheckedChange: (i) => s(i),
660
+ disabled: r,
658
661
  "aria-label": typeof t == "string" ? t : void 0
659
662
  }
660
663
  ) })
@@ -676,29 +679,29 @@ function pt({
676
679
  onChange: a,
677
680
  currency: n = "R$",
678
681
  placeholder: s = "0,00",
679
- disabled: l,
680
- invalid: i
682
+ disabled: r,
683
+ invalid: o
681
684
  }) {
682
- const r = K(null), c = Re(t);
685
+ const i = K(null), c = Re(t);
683
686
  return H(() => {
684
- const o = r.current;
685
- o && document.activeElement === o && o.setSelectionRange(o.value.length, o.value.length);
687
+ const l = i.current;
688
+ l && document.activeElement === l && l.setSelectionRange(l.value.length, l.value.length);
686
689
  }), /* @__PURE__ */ e(
687
- _e,
690
+ fe,
688
691
  {
689
- ref: r,
692
+ ref: i,
690
693
  type: "text",
691
694
  inputMode: "decimal",
692
695
  className: "sui-moneyinput",
693
696
  leftAddon: /* @__PURE__ */ e("span", { className: "sui-moneyinput__currency", children: n }),
694
697
  value: c ? Ae(c) : "",
695
- onChange: (o) => {
696
- const p = o.target.value.replace(/\D/g, "");
697
- a(p ? (Number(p) / 100).toFixed(2) : "");
698
+ onChange: (l) => {
699
+ const _ = l.target.value.replace(/\D/g, "");
700
+ a(_ ? (Number(_) / 100).toFixed(2) : "");
698
701
  },
699
702
  placeholder: s,
700
- disabled: l,
701
- invalid: i
703
+ disabled: r,
704
+ invalid: o
702
705
  }
703
706
  );
704
707
  }
@@ -706,47 +709,47 @@ function Pe(t) {
706
709
  return t.replace(/\D+/g, "").slice(0, 12);
707
710
  }
708
711
  function Be(t) {
709
- const a = t.slice(0, 2), n = t.slice(2, 4), s = t.slice(4, 8), l = t.slice(8, 10), i = t.slice(10, 12);
710
- let r = "";
711
- return a && (r += a, a.length === 2 && n && (r += "/")), n && (r += n, n.length === 2 && s && (r += "/")), s && (r += s, s.length === 4 && (l || i) && (r += " ")), l && (r += l, l.length === 2 && i && (r += ":")), i && (r += i), r;
712
+ const a = t.slice(0, 2), n = t.slice(2, 4), s = t.slice(4, 8), r = t.slice(8, 10), o = t.slice(10, 12);
713
+ let i = "";
714
+ return a && (i += a, a.length === 2 && n && (i += "/")), n && (i += n, n.length === 2 && s && (i += "/")), s && (i += s, s.length === 4 && (r || o) && (i += " ")), r && (i += r, r.length === 2 && o && (i += ":")), o && (i += o), i;
712
715
  }
713
716
  function ce(t) {
714
717
  const a = /^(\d{2})\/(\d{2})\/(\d{4})\s+(\d{2}):(\d{2})$/.exec(t.trim());
715
718
  if (!a) return null;
716
- const [, n, s, l, i, r] = a, c = Number(n), o = Number(s), p = Number(l), d = Number(i), v = Number(r);
717
- if (o < 1 || o > 12 || c < 1 || c > 31 || d < 0 || d > 23 || v < 0 || v > 59) return null;
718
- const f = new Date(p, o - 1, c, d, v);
719
- return Number.isNaN(f.getTime()) || f.getFullYear() !== p || f.getMonth() !== o - 1 || f.getDate() !== c ? null : `${l}-${s}-${n}T${i}:${r}`;
719
+ const [, n, s, r, o, i] = a, c = Number(n), l = Number(s), _ = Number(r), u = Number(o), g = Number(i);
720
+ if (l < 1 || l > 12 || c < 1 || c > 31 || u < 0 || u > 23 || g < 0 || g > 59) return null;
721
+ const p = new Date(_, l - 1, c, u, g);
722
+ return Number.isNaN(p.getTime()) || p.getFullYear() !== _ || p.getMonth() !== l - 1 || p.getDate() !== c ? null : `${r}-${s}-${n}T${o}:${i}`;
720
723
  }
721
724
  function Fe(t) {
722
725
  const a = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/.exec(t ?? "");
723
726
  return a ? `${a[3]}/${a[2]}/${a[1]} ${a[4]}:${a[5]}` : "";
724
727
  }
725
- function ft({
728
+ function _t({
726
729
  value: t,
727
730
  onChange: a,
728
731
  placeholder: n = "dd/mm/aaaa hh:mm",
729
732
  disabled: s
730
733
  }) {
731
- const [l, i] = S(""), r = Fe(t);
734
+ const [r, o] = S(""), i = Fe(t);
732
735
  H(() => {
733
- i(r);
734
- }, [r]);
735
- const c = l === "" || !!ce(l);
736
+ o(i);
737
+ }, [i]);
738
+ const c = r === "" || !!ce(r);
736
739
  return /* @__PURE__ */ e(
737
- _e,
740
+ fe,
738
741
  {
739
742
  type: "text",
740
743
  inputMode: "numeric",
741
- value: l,
742
- onChange: (o) => {
743
- const p = Be(Pe(o.target.value));
744
- i(p);
745
- const d = ce(p);
746
- d && a(d);
744
+ value: r,
745
+ onChange: (l) => {
746
+ const _ = Be(Pe(l.target.value));
747
+ o(_);
748
+ const u = ce(_);
749
+ u && a(u);
747
750
  },
748
751
  onBlur: () => {
749
- !ce(l) && t && i(r);
752
+ !ce(r) && t && o(i);
750
753
  },
751
754
  placeholder: n,
752
755
  disabled: s,
@@ -768,30 +771,30 @@ const Oe = [
768
771
  "Novembro",
769
772
  "Dezembro"
770
773
  ];
771
- function _t({
774
+ function ft({
772
775
  value: t,
773
776
  onChange: a,
774
777
  monthLabels: n = Oe,
775
778
  formatLabel: s,
776
- prevLabel: l = "Mês anterior",
777
- nextLabel: i = "Próximo mês",
778
- className: r
779
+ prevLabel: r = "Mês anterior",
780
+ nextLabel: o = "Próximo mês",
781
+ className: i
779
782
  }) {
780
- const [c, o] = S(!1), [p, d] = S(t.year), v = (b) => s ? s(b) : `${n[b.month - 1]} ${b.year}`, f = v(t), k = n.indexOf(n.reduce((b, m) => m.length > b.length ? m : b)) + 1, M = v({ year: t.year, month: k }), E = (b) => b.slice(0, 3), $ = (b) => {
781
- let m = t.month + b, y = t.year;
782
- m < 1 ? (m = 12, y -= 1) : m > 12 && (m = 1, y += 1), a({ year: y, month: m }), d(y);
783
- }, z = () => {
784
- d(t.year), o((b) => !b);
783
+ const [c, l] = S(!1), [_, u] = S(t.year), g = (v) => s ? s(v) : `${n[v.month - 1]} ${v.year}`, p = g(t), y = n.indexOf(n.reduce((v, m) => m.length > v.length ? m : v)) + 1, z = g({ year: t.year, month: y }), E = (v) => v.slice(0, 3), L = (v) => {
784
+ let m = t.month + v, k = t.year;
785
+ m < 1 ? (m = 12, k -= 1) : m > 12 && (m = 1, k += 1), a({ year: k, month: m }), u(k);
786
+ }, $ = () => {
787
+ u(t.year), l((v) => !v);
785
788
  };
786
789
  H(() => {
787
790
  if (!c) return;
788
- const b = (m) => {
789
- m.key === "Escape" && o(!1);
791
+ const v = (m) => {
792
+ m.key === "Escape" && l(!1);
790
793
  };
791
- return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
794
+ return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
792
795
  }, [c]);
793
- const L = /* @__PURE__ */ new Date(), T = L.getFullYear(), R = L.getMonth() + 1;
794
- return /* @__PURE__ */ h("div", { className: w("sui-monthpicker", r), children: [
796
+ const M = /* @__PURE__ */ new Date(), T = M.getFullYear(), R = M.getMonth() + 1;
797
+ return /* @__PURE__ */ h("div", { className: w("sui-monthpicker", i), children: [
795
798
  /* @__PURE__ */ h("div", { className: "sui-monthpicker__bar", children: [
796
799
  /* @__PURE__ */ h(
797
800
  "button",
@@ -800,23 +803,23 @@ function _t({
800
803
  className: "sui-monthpicker__label",
801
804
  "aria-expanded": c,
802
805
  "aria-haspopup": "dialog",
803
- onClick: z,
806
+ onClick: $,
804
807
  children: [
805
808
  /* @__PURE__ */ e(P, { name: "calendar", size: 16, color: "var(--text-brand)" }),
806
809
  /* @__PURE__ */ h("span", { className: "sui-monthpicker__label-text", children: [
807
- /* @__PURE__ */ e("span", { className: "sui-monthpicker__label-ghost", "aria-hidden": "true", children: M }),
808
- /* @__PURE__ */ e("span", { className: "sui-monthpicker__label-value", children: f })
810
+ /* @__PURE__ */ e("span", { className: "sui-monthpicker__label-ghost", "aria-hidden": "true", children: z }),
811
+ /* @__PURE__ */ e("span", { className: "sui-monthpicker__label-value", children: p })
809
812
  ] })
810
813
  ]
811
814
  }
812
815
  ),
813
816
  /* @__PURE__ */ e("span", { className: "sui-monthpicker__divider", "aria-hidden": "true" }),
814
- /* @__PURE__ */ e("button", { type: "button", className: "sui-monthpicker__step", "aria-label": l, onClick: () => $(-1), children: /* @__PURE__ */ e(P, { name: "chevLeft", size: 16 }) }),
815
- /* @__PURE__ */ e("button", { type: "button", className: "sui-monthpicker__step", "aria-label": i, onClick: () => $(1), children: /* @__PURE__ */ e(P, { name: "chevRight", size: 16 }) })
817
+ /* @__PURE__ */ e("button", { type: "button", className: "sui-monthpicker__step", "aria-label": r, onClick: () => L(-1), children: /* @__PURE__ */ e(P, { name: "chevLeft", size: 16 }) }),
818
+ /* @__PURE__ */ e("button", { type: "button", className: "sui-monthpicker__step", "aria-label": o, onClick: () => L(1), children: /* @__PURE__ */ e(P, { name: "chevRight", size: 16 }) })
816
819
  ] }),
817
820
  c && /* @__PURE__ */ h(ee, { children: [
818
- /* @__PURE__ */ e("div", { className: "sui-monthpicker__backdrop", onClick: () => o(!1) }),
819
- /* @__PURE__ */ h("div", { className: "sui-monthpicker__panel", role: "dialog", "aria-label": f, children: [
821
+ /* @__PURE__ */ e("div", { className: "sui-monthpicker__backdrop", onClick: () => l(!1) }),
822
+ /* @__PURE__ */ h("div", { className: "sui-monthpicker__panel", role: "dialog", "aria-label": p, children: [
820
823
  /* @__PURE__ */ h("div", { className: "sui-monthpicker__yearbar", children: [
821
824
  /* @__PURE__ */ e(
822
825
  "button",
@@ -824,38 +827,38 @@ function _t({
824
827
  type: "button",
825
828
  className: "sui-monthpicker__step sui-monthpicker__step--year",
826
829
  "aria-label": "Ano anterior",
827
- onClick: () => d((b) => b - 1),
830
+ onClick: () => u((v) => v - 1),
828
831
  children: /* @__PURE__ */ e(P, { name: "chevLeft", size: 16 })
829
832
  }
830
833
  ),
831
- /* @__PURE__ */ e("span", { className: "sui-monthpicker__year", children: p }),
834
+ /* @__PURE__ */ e("span", { className: "sui-monthpicker__year", children: _ }),
832
835
  /* @__PURE__ */ e(
833
836
  "button",
834
837
  {
835
838
  type: "button",
836
839
  className: "sui-monthpicker__step sui-monthpicker__step--year",
837
840
  "aria-label": "Próximo ano",
838
- onClick: () => d((b) => b + 1),
841
+ onClick: () => u((v) => v + 1),
839
842
  children: /* @__PURE__ */ e(P, { name: "chevRight", size: 16 })
840
843
  }
841
844
  )
842
845
  ] }),
843
- /* @__PURE__ */ e("div", { className: "sui-monthpicker__grid", children: n.map((b, m) => {
844
- const y = m + 1, u = t.year === p && t.month === y;
846
+ /* @__PURE__ */ e("div", { className: "sui-monthpicker__grid", children: n.map((v, m) => {
847
+ const k = m + 1, d = t.year === _ && t.month === k;
845
848
  return /* @__PURE__ */ e(
846
849
  "button",
847
850
  {
848
851
  type: "button",
849
- "aria-pressed": u,
852
+ "aria-pressed": d,
850
853
  className: "sui-monthpicker__month",
851
- "data-selected": u || void 0,
852
- "data-current": T === p && R === y || void 0,
854
+ "data-selected": d || void 0,
855
+ "data-current": T === _ && R === k || void 0,
853
856
  onClick: () => {
854
- a({ year: p, month: y }), o(!1);
857
+ a({ year: _, month: k }), l(!1);
855
858
  },
856
- children: E(b)
859
+ children: E(v)
857
860
  },
858
- y
861
+ k
859
862
  );
860
863
  }) })
861
864
  ] })
@@ -879,58 +882,58 @@ function vt({
879
882
  onChange: a,
880
883
  swatches: n = He,
881
884
  defaultOpen: s = !1,
882
- open: l,
883
- onOpenChange: i,
884
- showInput: r = !0,
885
+ open: r,
886
+ onOpenChange: o,
887
+ showInput: i = !0,
885
888
  customLabel: c = "Cor personalizada",
886
- className: o
889
+ className: l
887
890
  }) {
888
- const p = n[0] ?? "#5961f7", [d, v] = de({
889
- value: l,
891
+ const _ = n[0] ?? "#5961f7", [u, g] = ue({
892
+ value: r,
890
893
  defaultValue: s,
891
- onChange: i
892
- }), [f, k] = S(() => le(...re(t || p))), [M, E] = S("hex"), [$, z] = S(() => (t || p).replace("#", "")), L = K(null), T = K(null), R = K(null);
894
+ onChange: o
895
+ }), [p, y] = S(() => le(...re(t || _))), [z, E] = S("hex"), [L, $] = S(() => (t || _).replace("#", "")), M = K(null), T = K(null), R = K(null);
893
896
  H(() => {
894
- const N = ne(...oe(f.h, f.s, f.v));
895
- (t || p).toLowerCase() !== N.toLowerCase() && k(le(...re(t || p)));
897
+ const N = ne(...oe(p.h, p.s, p.v));
898
+ (t || _).toLowerCase() !== N.toLowerCase() && y(le(...re(t || _)));
896
899
  }, [t]), H(() => {
897
- ("#" + $).toLowerCase() !== (t || p).toLowerCase() && z((t || p).replace("#", ""));
900
+ ("#" + L).toLowerCase() !== (t || _).toLowerCase() && $((t || _).replace("#", ""));
898
901
  }, [t]);
899
- const b = (N) => {
900
- const x = { ...f, ...N };
901
- k(x), a(ne(...oe(x.h, x.s, x.v)));
902
+ const v = (N) => {
903
+ const x = { ...p, ...N };
904
+ y(x), a(ne(...oe(x.h, x.s, x.v)));
902
905
  }, m = (N) => {
903
906
  var A;
904
- const x = (A = L.current) == null ? void 0 : A.getBoundingClientRect();
905
- x && b({
907
+ const x = (A = M.current) == null ? void 0 : A.getBoundingClientRect();
908
+ x && v({
906
909
  s: Math.min(1, Math.max(0, (N.clientX - x.left) / x.width)),
907
910
  v: 1 - Math.min(1, Math.max(0, (N.clientY - x.top) / x.height))
908
911
  });
909
- }, y = (N) => {
912
+ }, k = (N) => {
910
913
  var A;
911
914
  const x = (A = T.current) == null ? void 0 : A.getBoundingClientRect();
912
- x && b({ h: Math.min(1, Math.max(0, (N.clientX - x.left) / x.width)) * 360 });
915
+ x && v({ h: Math.min(1, Math.max(0, (N.clientX - x.left) / x.width)) * 360 });
913
916
  };
914
917
  H(() => {
915
918
  const N = (A) => {
916
- R.current === "sv" ? m(A) : R.current === "hue" && y(A);
919
+ R.current === "sv" ? m(A) : R.current === "hue" && k(A);
917
920
  }, x = () => {
918
921
  R.current = null;
919
922
  };
920
923
  return window.addEventListener("pointermove", N), window.addEventListener("pointerup", x), () => {
921
924
  window.removeEventListener("pointermove", N), window.removeEventListener("pointerup", x);
922
925
  };
923
- }, [f]);
924
- const [u, g, C] = oe(f.h, f.s, f.v), D = ne(u, g, C), Y = `hsl(${f.h},100%,50%)`, O = n.some((N) => N.toLowerCase() === D.toLowerCase()), X = (N) => {
925
- k(le(...re(N))), a(N);
926
+ }, [p]);
927
+ const [d, b, C] = oe(p.h, p.s, p.v), D = ne(d, b, C), Y = `hsl(${p.h},100%,50%)`, O = n.some((N) => N.toLowerCase() === D.toLowerCase()), X = (N) => {
928
+ y(le(...re(N))), a(N);
926
929
  }, G = (N) => {
927
930
  const x = N.replace("#", "");
928
- z(x), /^[0-9a-fA-F]{6}$/.test(x) && X("#" + x.toLowerCase());
931
+ $(x), /^[0-9a-fA-F]{6}$/.test(x) && X("#" + x.toLowerCase());
929
932
  }, J = (N, x) => {
930
- const A = Math.max(0, Math.min(255, parseInt(x, 10) || 0)), V = [u, g, C];
933
+ const A = Math.max(0, Math.min(255, parseInt(x, 10) || 0)), V = [d, b, C];
931
934
  V[N] = A, X(ne(...V));
932
935
  };
933
- return /* @__PURE__ */ h("div", { className: w("sui-colorpicker", o), children: [
936
+ return /* @__PURE__ */ h("div", { className: w("sui-colorpicker", l), children: [
934
937
  /* @__PURE__ */ h("div", { className: "sui-colorpicker__swatches", children: [
935
938
  n.map((N) => {
936
939
  const x = N.toLowerCase() === D.toLowerCase();
@@ -957,11 +960,11 @@ function vt({
957
960
  type: "button",
958
961
  title: c,
959
962
  "aria-label": c,
960
- "aria-expanded": d,
961
- onClick: () => v(!d),
963
+ "aria-expanded": u,
964
+ onClick: () => g(!u),
962
965
  className: "sui-colorpicker__wheel",
963
966
  style: {
964
- boxShadow: !O || d ? "0 0 0 2px var(--surface-card), 0 0 0 4px var(--text-secondary)" : "inset 0 0 0 1px rgba(255,255,255,0.10)"
967
+ boxShadow: !O || u ? "0 0 0 2px var(--surface-card), 0 0 0 4px var(--text-secondary)" : "inset 0 0 0 1px rgba(255,255,255,0.10)"
965
968
  },
966
969
  children: /* @__PURE__ */ e(
967
970
  "span",
@@ -974,11 +977,11 @@ function vt({
974
977
  }
975
978
  )
976
979
  ] }),
977
- d && /* @__PURE__ */ h("div", { className: "sui-colorpicker__panel", children: [
980
+ u && /* @__PURE__ */ h("div", { className: "sui-colorpicker__panel", children: [
978
981
  /* @__PURE__ */ e(
979
982
  "div",
980
983
  {
981
- ref: L,
984
+ ref: M,
982
985
  onPointerDown: (N) => {
983
986
  R.current = "sv", m(N);
984
987
  },
@@ -988,7 +991,7 @@ function vt({
988
991
  "div",
989
992
  {
990
993
  className: "sui-colorpicker__knob",
991
- style: { left: `${f.s * 100}%`, top: `${(1 - f.v) * 100}%`, background: D }
994
+ style: { left: `${p.s * 100}%`, top: `${(1 - p.v) * 100}%`, background: D }
992
995
  }
993
996
  )
994
997
  }
@@ -998,19 +1001,19 @@ function vt({
998
1001
  {
999
1002
  ref: T,
1000
1003
  onPointerDown: (N) => {
1001
- R.current = "hue", y(N);
1004
+ R.current = "hue", k(N);
1002
1005
  },
1003
1006
  className: "sui-colorpicker__hue",
1004
1007
  children: /* @__PURE__ */ e(
1005
1008
  "div",
1006
1009
  {
1007
1010
  className: "sui-colorpicker__knob",
1008
- style: { left: `${f.h / 360 * 100}%`, top: "50%", background: Y }
1011
+ style: { left: `${p.h / 360 * 100}%`, top: "50%", background: Y }
1009
1012
  }
1010
1013
  )
1011
1014
  }
1012
1015
  ),
1013
- r && /* @__PURE__ */ h("div", { className: "sui-colorpicker__inputrow", children: [
1016
+ i && /* @__PURE__ */ h("div", { className: "sui-colorpicker__inputrow", children: [
1014
1017
  /* @__PURE__ */ e(
1015
1018
  "div",
1016
1019
  {
@@ -1018,12 +1021,12 @@ function vt({
1018
1021
  style: { background: D, boxShadow: `inset 0 0 0 1px rgba(255,255,255,0.18), 0 4px 16px ${U(D, 0.35)}` }
1019
1022
  }
1020
1023
  ),
1021
- /* @__PURE__ */ e("div", { className: "sui-colorpicker__field", children: M === "hex" ? /* @__PURE__ */ h(ee, { children: [
1024
+ /* @__PURE__ */ e("div", { className: "sui-colorpicker__field", children: z === "hex" ? /* @__PURE__ */ h(ee, { children: [
1022
1025
  /* @__PURE__ */ e("span", { className: "sui-colorpicker__prefix", children: "#" }),
1023
1026
  /* @__PURE__ */ e(
1024
1027
  "input",
1025
1028
  {
1026
- value: $,
1029
+ value: L,
1027
1030
  onChange: (N) => G(N.target.value),
1028
1031
  spellCheck: !1,
1029
1032
  maxLength: 6,
@@ -1035,7 +1038,7 @@ function vt({
1035
1038
  /* @__PURE__ */ e(
1036
1039
  "input",
1037
1040
  {
1038
- value: String([u, g, C][x]),
1041
+ value: String([d, b, C][x]),
1039
1042
  onChange: (A) => J(x, A.target.value),
1040
1043
  spellCheck: !1,
1041
1044
  maxLength: 3,
@@ -1051,10 +1054,10 @@ function vt({
1051
1054
  "button",
1052
1055
  {
1053
1056
  type: "button",
1054
- "aria-pressed": M === "hex",
1057
+ "aria-pressed": z === "hex",
1055
1058
  onClick: () => E("hex"),
1056
1059
  className: "sui-colorpicker__modetab",
1057
- "data-active": M === "hex" || void 0,
1060
+ "data-active": z === "hex" || void 0,
1058
1061
  children: "HEX"
1059
1062
  }
1060
1063
  ),
@@ -1062,10 +1065,10 @@ function vt({
1062
1065
  "button",
1063
1066
  {
1064
1067
  type: "button",
1065
- "aria-pressed": M === "rgb",
1068
+ "aria-pressed": z === "rgb",
1066
1069
  onClick: () => E("rgb"),
1067
1070
  className: "sui-colorpicker__modetab",
1068
- "data-active": M === "rgb" || void 0,
1071
+ "data-active": z === "rgb" || void 0,
1069
1072
  children: "RGB"
1070
1073
  }
1071
1074
  )
@@ -1109,53 +1112,53 @@ function bt({
1109
1112
  onChange: a,
1110
1113
  color: n,
1111
1114
  icons: s = Ve,
1112
- searchable: l,
1113
- searchPlaceholder: i = "Buscar ícone...",
1114
- emptyText: r = "Nenhum ícone encontrado",
1115
+ searchable: r,
1116
+ searchPlaceholder: o = "Buscar ícone...",
1117
+ emptyText: i = "Nenhum ícone encontrado",
1115
1118
  className: c
1116
1119
  }) {
1117
- const [o, p] = S(""), d = l ?? s.length > 40, v = se(() => {
1118
- if (!d || !o.trim()) return s;
1119
- const f = q(o);
1120
- return s.filter((k) => q(k).includes(f));
1121
- }, [s, o, d]);
1120
+ const [l, _] = S(""), u = r ?? s.length > 40, g = se(() => {
1121
+ if (!u || !l.trim()) return s;
1122
+ const p = q(l);
1123
+ return s.filter((y) => q(y).includes(p));
1124
+ }, [s, l, u]);
1122
1125
  return /* @__PURE__ */ h("div", { className: w("sui-iconpicker", c), children: [
1123
- d && /* @__PURE__ */ e(
1126
+ u && /* @__PURE__ */ e(
1124
1127
  "input",
1125
1128
  {
1126
1129
  className: "sui-iconpicker__search",
1127
- value: o,
1128
- onChange: (f) => p(f.target.value),
1129
- placeholder: i,
1130
- "aria-label": i
1130
+ value: l,
1131
+ onChange: (p) => _(p.target.value),
1132
+ placeholder: o,
1133
+ "aria-label": o
1131
1134
  }
1132
1135
  ),
1133
- /* @__PURE__ */ h("div", { className: "sui-iconpicker__grid", "data-scroll": d || void 0, children: [
1134
- v.length === 0 && /* @__PURE__ */ e("div", { className: "sui-iconpicker__empty", children: r }),
1135
- v.map((f) => {
1136
- const k = t === f;
1136
+ /* @__PURE__ */ h("div", { className: "sui-iconpicker__grid", "data-scroll": u || void 0, children: [
1137
+ g.length === 0 && /* @__PURE__ */ e("div", { className: "sui-iconpicker__empty", children: i }),
1138
+ g.map((p) => {
1139
+ const y = t === p;
1137
1140
  return /* @__PURE__ */ e(
1138
1141
  "button",
1139
1142
  {
1140
1143
  type: "button",
1141
- title: f,
1142
- "aria-label": f,
1143
- "aria-pressed": k,
1144
- onClick: () => a(f),
1144
+ title: p,
1145
+ "aria-label": p,
1146
+ "aria-pressed": y,
1147
+ onClick: () => a(p),
1145
1148
  className: "sui-iconpicker__cell",
1146
- "data-on": k || void 0,
1147
- style: k ? { background: n, borderColor: "transparent" } : void 0,
1149
+ "data-on": y || void 0,
1150
+ style: y ? { background: n, borderColor: "transparent" } : void 0,
1148
1151
  children: /* @__PURE__ */ e(
1149
1152
  P,
1150
1153
  {
1151
- name: f,
1154
+ name: p,
1152
1155
  size: 17,
1153
- color: k ? "#fff" : "var(--text-secondary)",
1156
+ color: y ? "#fff" : "var(--text-secondary)",
1154
1157
  strokeWidth: 1.9
1155
1158
  }
1156
1159
  )
1157
1160
  },
1158
- f
1161
+ p
1159
1162
  );
1160
1163
  })
1161
1164
  ] })
@@ -1166,23 +1169,23 @@ function gt({
1166
1169
  value: a,
1167
1170
  sublabel: n,
1168
1171
  icon: s,
1169
- accent: l,
1170
- interactive: i,
1171
- onClick: r,
1172
+ accent: r,
1173
+ interactive: o,
1174
+ onClick: i,
1172
1175
  className: c
1173
1176
  }) {
1174
- const o = l ? { "--sui-stat-accent": l } : void 0;
1177
+ const l = r ? { "--sui-stat-accent": r } : void 0;
1175
1178
  return /* @__PURE__ */ h(
1176
1179
  "div",
1177
1180
  {
1178
- className: w("sui-statcard", (i || r) && "sui-statcard--interactive", c),
1179
- style: o,
1180
- "data-accent": l ? "" : void 0,
1181
- onClick: r,
1182
- role: r ? "button" : void 0,
1183
- tabIndex: r ? 0 : void 0,
1184
- onKeyDown: r ? (p) => {
1185
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), r());
1181
+ className: w("sui-statcard", (o || i) && "sui-statcard--interactive", c),
1182
+ style: l,
1183
+ "data-accent": r ? "" : void 0,
1184
+ onClick: i,
1185
+ role: i ? "button" : void 0,
1186
+ tabIndex: i ? 0 : void 0,
1187
+ onKeyDown: i ? (_) => {
1188
+ (_.key === "Enter" || _.key === " ") && (_.preventDefault(), i());
1186
1189
  } : void 0,
1187
1190
  children: [
1188
1191
  /* @__PURE__ */ h("div", { className: "sui-statcard__head", children: [
@@ -1195,8 +1198,8 @@ function gt({
1195
1198
  }
1196
1199
  );
1197
1200
  }
1198
- function Nt({ icon: t, title: a, description: n, actions: s, dashed: l, className: i }) {
1199
- return /* @__PURE__ */ h("div", { className: w("sui-emptystate", l && "sui-emptystate--dashed", i), children: [
1201
+ function Nt({ icon: t, title: a, description: n, actions: s, dashed: r, className: o }) {
1202
+ return /* @__PURE__ */ h("div", { className: w("sui-emptystate", r && "sui-emptystate--dashed", o), children: [
1200
1203
  t && /* @__PURE__ */ e("div", { className: "sui-emptystate__icon", children: t }),
1201
1204
  /* @__PURE__ */ e("div", { className: "sui-emptystate__title", children: a }),
1202
1205
  n && /* @__PURE__ */ e("div", { className: "sui-emptystate__desc", children: n }),
@@ -1208,18 +1211,18 @@ function yt({
1208
1211
  children: a,
1209
1212
  side: n = "top",
1210
1213
  align: s = "center",
1211
- delayDuration: l = 200,
1212
- className: i
1214
+ delayDuration: r = 200,
1215
+ className: o
1213
1216
  }) {
1214
1217
  return (
1215
1218
  // Provider embutido para uso avulso; envolver a app com <TooltipProvider>
1216
1219
  // é opcional (compartilha o timing entre tooltips). Providers aninhados são ok.
1217
- /* @__PURE__ */ e(W.Provider, { delayDuration: l, children: /* @__PURE__ */ h(W.Root, { children: [
1220
+ /* @__PURE__ */ e(W.Provider, { delayDuration: r, children: /* @__PURE__ */ h(W.Root, { children: [
1218
1221
  /* @__PURE__ */ e(W.Trigger, { asChild: !0, children: a }),
1219
1222
  /* @__PURE__ */ e(W.Portal, { children: /* @__PURE__ */ h(
1220
1223
  W.Content,
1221
1224
  {
1222
- className: w("sui-tooltip", i),
1225
+ className: w("sui-tooltip", o),
1223
1226
  side: n,
1224
1227
  align: s,
1225
1228
  sideOffset: 6,
@@ -1266,9 +1269,10 @@ function je({ open: t, defaultOpen: a, onOpenChange: n, children: s }) {
1266
1269
  function Qe({
1267
1270
  title: t,
1268
1271
  description: a,
1269
- maxWidth: n = 480,
1270
- hideClose: s,
1271
- className: l,
1272
+ icon: n,
1273
+ maxWidth: s = 480,
1274
+ hideClose: r,
1275
+ className: o,
1272
1276
  children: i
1273
1277
  }) {
1274
1278
  return /* @__PURE__ */ h(F.Portal, { children: [
@@ -1276,15 +1280,18 @@ function Qe({
1276
1280
  /* @__PURE__ */ h(
1277
1281
  F.Content,
1278
1282
  {
1279
- className: w("sui-modal__content", l),
1280
- style: { maxWidth: n },
1283
+ className: w("sui-modal__content", o),
1284
+ style: { maxWidth: s },
1281
1285
  children: [
1282
1286
  /* @__PURE__ */ h("div", { className: "sui-modal__header", children: [
1283
- /* @__PURE__ */ h("div", { className: "sui-modal__heading", children: [
1284
- /* @__PURE__ */ e(F.Title, { className: "sui-modal__title", children: t }),
1285
- a && /* @__PURE__ */ e(F.Description, { className: "sui-modal__desc", children: a })
1287
+ /* @__PURE__ */ h("div", { className: "sui-modal__headlead", children: [
1288
+ n != null && /* @__PURE__ */ e("div", { className: "sui-modal__icon", children: n }),
1289
+ /* @__PURE__ */ h("div", { className: "sui-modal__heading", children: [
1290
+ /* @__PURE__ */ e(F.Title, { className: "sui-modal__title", children: t }),
1291
+ a && /* @__PURE__ */ e(F.Description, { className: "sui-modal__desc", children: a })
1292
+ ] })
1286
1293
  ] }),
1287
- !s && /* @__PURE__ */ e(F.Close, { className: "sui-modal__close", "aria-label": "Fechar", children: /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
1294
+ !r && /* @__PURE__ */ e(F.Close, { className: "sui-modal__close", "aria-label": "Fechar", children: /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ e(
1288
1295
  "path",
1289
1296
  {
1290
1297
  d: "M6 6l12 12M18 6L6 18",
@@ -1317,107 +1324,108 @@ function Ct({
1317
1324
  onOpenChange: a,
1318
1325
  title: n,
1319
1326
  message: s,
1320
- confirmLabel: l = "Confirmar",
1321
- cancelLabel: i = "Cancelar",
1322
- busyLabel: r = "Aguarde...",
1327
+ confirmLabel: r = "Confirmar",
1328
+ cancelLabel: o = "Cancelar",
1329
+ busyLabel: i = "Aguarde...",
1323
1330
  confirmVariant: c = "danger",
1324
- icon: o,
1325
- onConfirm: p,
1326
- formatError: d = Je
1331
+ icon: l,
1332
+ hideCancel: _ = !1,
1333
+ onConfirm: u,
1334
+ formatError: g = Je
1327
1335
  }) {
1328
- const [v, f] = S(!1), [k, M] = S(null), E = async () => {
1329
- if (!v) {
1330
- f(!0), M(null);
1336
+ const [p, y] = S(!1), [z, E] = S(null), L = async () => {
1337
+ if (!p) {
1338
+ y(!0), E(null);
1331
1339
  try {
1332
- await p(), a(!1);
1333
- } catch (z) {
1334
- M(d(z));
1340
+ await u(), a(!1);
1341
+ } catch (M) {
1342
+ E(g(M));
1335
1343
  } finally {
1336
- f(!1);
1344
+ y(!1);
1337
1345
  }
1338
1346
  }
1339
- }, $ = (z) => {
1340
- v || (z || M(null), a(z));
1347
+ }, $ = (M) => {
1348
+ p || (M || E(null), a(M));
1341
1349
  };
1342
1350
  return /* @__PURE__ */ e(F.Root, { open: t, onOpenChange: $, children: /* @__PURE__ */ h(F.Portal, { children: [
1343
1351
  /* @__PURE__ */ e(F.Overlay, { className: "sui-confirm__overlay" }),
1344
1352
  /* @__PURE__ */ h(F.Content, { className: "sui-confirm", children: [
1345
1353
  /* @__PURE__ */ h("div", { className: "sui-confirm__head", children: [
1346
- o ?? /* @__PURE__ */ e(Se, { size: 44, radius: 12, bg: U(Ge, 0.15), children: /* @__PURE__ */ e(P, { name: "alert", size: 20, color: "var(--status-error-fg)" }) }),
1354
+ l ?? /* @__PURE__ */ e(Se, { size: 44, radius: 12, bg: U(Ge, 0.15), children: /* @__PURE__ */ e(P, { name: "alert", size: 20, color: "var(--status-error-fg)" }) }),
1347
1355
  /* @__PURE__ */ h("div", { children: [
1348
1356
  /* @__PURE__ */ e(F.Title, { className: "sui-confirm__title", children: n }),
1349
1357
  /* @__PURE__ */ e(F.Description, { className: "sui-confirm__message", children: s })
1350
1358
  ] })
1351
1359
  ] }),
1352
- k != null && /* @__PURE__ */ e("div", { className: "sui-confirm__error", role: "alert", children: k }),
1360
+ z != null && /* @__PURE__ */ e("div", { className: "sui-confirm__error", role: "alert", children: z }),
1353
1361
  /* @__PURE__ */ h("div", { className: "sui-confirm__actions", children: [
1354
- /* @__PURE__ */ e(me, { variant: "secondary", fullWidth: !0, disabled: v, onClick: () => $(!1), children: i }),
1362
+ !_ && /* @__PURE__ */ e(me, { variant: "secondary", fullWidth: !0, disabled: p, onClick: () => $(!1), children: o }),
1355
1363
  /* @__PURE__ */ e(
1356
1364
  me,
1357
1365
  {
1358
1366
  variant: c,
1359
1367
  fullWidth: !0,
1360
- loading: v,
1361
- onClick: () => void E(),
1362
- children: v ? r : l
1368
+ loading: p,
1369
+ onClick: () => void L(),
1370
+ children: p ? i : r
1363
1371
  }
1364
1372
  )
1365
1373
  ] })
1366
1374
  ] })
1367
1375
  ] }) });
1368
1376
  }
1369
- function Ze({ x: t, y: a, items: n, onClose: s, align: l = "end", className: i }) {
1370
- const r = K(null), [c, o] = S({ top: 0, left: 0 });
1377
+ function Ze({ x: t, y: a, items: n, onClose: s, align: r = "end", className: o }) {
1378
+ const i = K(null), [c, l] = S({ top: 0, left: 0 });
1371
1379
  Ce(() => {
1372
- o(ve(r.current));
1380
+ l(ve(i.current));
1373
1381
  }, []), H(() => {
1374
- var d, v;
1375
- (v = (d = r.current) == null ? void 0 : d.querySelector(".sui-menu__item")) == null || v.focus({ preventScroll: !0 });
1382
+ var u, g;
1383
+ (g = (u = i.current) == null ? void 0 : u.querySelector(".sui-menu__item")) == null || g.focus({ preventScroll: !0 });
1376
1384
  }, []), H(() => {
1377
- const d = (v) => {
1378
- v.key === "Escape" && s();
1385
+ const u = (g) => {
1386
+ g.key === "Escape" && s();
1379
1387
  };
1380
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
1388
+ return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
1381
1389
  }, [s]);
1382
- const p = (d) => {
1383
- var M, E;
1384
- if (d.key !== "ArrowDown" && d.key !== "ArrowUp") return;
1385
- d.preventDefault();
1386
- const v = Array.from(((M = r.current) == null ? void 0 : M.querySelectorAll(".sui-menu__item")) ?? []), f = v.indexOf(document.activeElement), k = d.key === "ArrowDown" ? Math.min(f + 1, v.length - 1) : Math.max(f - 1, 0);
1387
- (E = v[k]) == null || E.focus();
1390
+ const _ = (u) => {
1391
+ var z, E;
1392
+ if (u.key !== "ArrowDown" && u.key !== "ArrowUp") return;
1393
+ u.preventDefault();
1394
+ const g = Array.from(((z = i.current) == null ? void 0 : z.querySelectorAll(".sui-menu__item")) ?? []), p = g.indexOf(document.activeElement), y = u.key === "ArrowDown" ? Math.min(p + 1, g.length - 1) : Math.max(p - 1, 0);
1395
+ (E = g[y]) == null || E.focus();
1388
1396
  };
1389
1397
  return /* @__PURE__ */ h(ee, { children: [
1390
1398
  /* @__PURE__ */ e("div", { className: "sui-menu__backdrop", onClick: s }),
1391
1399
  /* @__PURE__ */ e(
1392
1400
  "div",
1393
1401
  {
1394
- ref: r,
1395
- className: w("sui-menu", i),
1402
+ ref: i,
1403
+ className: w("sui-menu", o),
1396
1404
  role: "menu",
1397
- onKeyDown: p,
1405
+ onKeyDown: _,
1398
1406
  style: {
1399
1407
  left: t - c.left,
1400
1408
  top: a + 6 - c.top,
1401
- transform: l === "end" ? "translateX(-100%)" : void 0
1409
+ transform: r === "end" ? "translateX(-100%)" : void 0
1402
1410
  },
1403
1411
  children: n.map(
1404
- (d, v) => d.sep ? /* @__PURE__ */ e("div", { className: "sui-menu__sep", role: "separator" }, v) : /* @__PURE__ */ h(
1412
+ (u, g) => u.sep ? /* @__PURE__ */ e("div", { className: "sui-menu__sep", role: "separator" }, g) : /* @__PURE__ */ h(
1405
1413
  "button",
1406
1414
  {
1407
1415
  type: "button",
1408
1416
  role: "menuitem",
1409
1417
  onClick: () => {
1410
- var f;
1411
- (f = d.onClick) == null || f.call(d), s();
1418
+ var p;
1419
+ (p = u.onClick) == null || p.call(u), s();
1412
1420
  },
1413
1421
  className: "sui-menu__item",
1414
- "data-danger": d.danger || void 0,
1422
+ "data-danger": u.danger || void 0,
1415
1423
  children: [
1416
- typeof d.icon == "string" ? /* @__PURE__ */ e(P, { name: d.icon, size: 15, color: d.danger ? "var(--status-error-fg)" : "var(--text-secondary)" }) : d.icon,
1417
- /* @__PURE__ */ e("span", { children: d.label })
1424
+ typeof u.icon == "string" ? /* @__PURE__ */ e(P, { name: u.icon, size: 15, color: u.danger ? "var(--status-error-fg)" : "var(--text-secondary)" }) : u.icon,
1425
+ /* @__PURE__ */ e("span", { children: u.label })
1418
1426
  ]
1419
1427
  },
1420
- v
1428
+ g
1421
1429
  )
1422
1430
  )
1423
1431
  }
@@ -1436,63 +1444,63 @@ function St({
1436
1444
  data: a,
1437
1445
  keyField: n = "id",
1438
1446
  searchable: s = !0,
1439
- searchPlaceholder: l = "Buscar...",
1440
- selectable: i = !1,
1441
- initialSelectedIds: r,
1447
+ searchPlaceholder: r = "Buscar...",
1448
+ selectable: o = !1,
1449
+ initialSelectedIds: i,
1442
1450
  pageSize: c = 10,
1443
- pageSizeOptions: o = null,
1444
- onRowClick: p,
1445
- toolbarTitle: d,
1446
- toolbarActions: v,
1447
- bulkActions: f,
1448
- emptyMessage: k = "Nenhum registro encontrado.",
1449
- loadingMessage: M = "Carregando...",
1451
+ pageSizeOptions: l = null,
1452
+ onRowClick: _,
1453
+ toolbarTitle: u,
1454
+ toolbarActions: g,
1455
+ bulkActions: p,
1456
+ emptyMessage: y = "Nenhum registro encontrado.",
1457
+ loadingMessage: z = "Carregando...",
1450
1458
  loading: E = !1,
1451
- labels: $,
1452
- className: z
1459
+ labels: L,
1460
+ className: $
1453
1461
  }) {
1454
- const L = { ...et, ...$ }, [T, R] = S(""), [b, m] = S(null), [y, u] = S("asc"), [g, C] = S(
1455
- () => new Set(r ?? [])
1462
+ const M = { ...et, ...L }, [T, R] = S(""), [v, m] = S(null), [k, d] = S("asc"), [b, C] = S(
1463
+ () => new Set(i ?? [])
1456
1464
  ), [D, Y] = S(0), [O, X] = S(c), [G, J] = S(null), N = se(() => {
1457
1465
  if (!T.trim()) return a;
1458
- const _ = T.toLowerCase();
1466
+ const f = T.toLowerCase();
1459
1467
  return a.filter(
1460
1468
  (I) => t.some((B) => {
1461
1469
  const Z = B.searchValue ? B.searchValue(I) : I[B.key];
1462
- return Z != null && String(Z).toLowerCase().includes(_);
1470
+ return Z != null && String(Z).toLowerCase().includes(f);
1463
1471
  })
1464
1472
  );
1465
1473
  }, [a, T, t]), x = se(() => {
1466
- if (!b) return N;
1467
- const _ = t.find((B) => B.key === b), I = [...N];
1474
+ if (!v) return N;
1475
+ const f = t.find((B) => B.key === v), I = [...N];
1468
1476
  return I.sort((B, Z) => {
1469
- const te = _ != null && _.sortValue ? _.sortValue(B) : B[b], ae = _ != null && _.sortValue ? _.sortValue(Z) : Z[b];
1477
+ const te = f != null && f.sortValue ? f.sortValue(B) : B[v], ae = f != null && f.sortValue ? f.sortValue(Z) : Z[v];
1470
1478
  return te == null ? 1 : ae == null ? -1 : typeof te == "number" && typeof ae == "number" ? te - ae : String(te).localeCompare(String(ae));
1471
- }), y === "desc" && I.reverse(), I;
1472
- }, [N, b, y, t]), A = Math.max(1, Math.ceil(x.length / O)), V = Math.min(D, A - 1), j = x.slice(V * O, V * O + O);
1479
+ }), k === "desc" && I.reverse(), I;
1480
+ }, [N, v, k, t]), A = Math.max(1, Math.ceil(x.length / O)), V = Math.min(D, A - 1), j = x.slice(V * O, V * O + O);
1473
1481
  H(() => {
1474
1482
  Y(0);
1475
- }, [T, b, y, O]);
1476
- const be = (_) => {
1477
- _.sortable && (b !== _.key ? (m(_.key), u("asc")) : y === "asc" ? u("desc") : (m(null), u("asc")));
1478
- }, he = j.length > 0 && j.every((_) => g.has(_[n])), ge = () => {
1479
- const _ = new Set(g);
1480
- he ? j.forEach((I) => _.delete(I[n])) : j.forEach((I) => _.add(I[n])), C(_);
1481
- }, Ne = (_) => {
1482
- const I = new Set(g);
1483
- I.has(_) ? I.delete(_) : I.add(_), C(I);
1483
+ }, [T, v, k, O]);
1484
+ const be = (f) => {
1485
+ f.sortable && (v !== f.key ? (m(f.key), d("asc")) : k === "asc" ? d("desc") : (m(null), d("asc")));
1486
+ }, he = j.length > 0 && j.every((f) => b.has(f[n])), ge = () => {
1487
+ const f = new Set(b);
1488
+ he ? j.forEach((I) => f.delete(I[n])) : j.forEach((I) => f.add(I[n])), C(f);
1489
+ }, Ne = (f) => {
1490
+ const I = new Set(b);
1491
+ I.has(f) ? I.delete(f) : I.add(f), C(I);
1484
1492
  };
1485
- return /* @__PURE__ */ h("div", { className: w("sui-datatable", z), children: [
1486
- (d || s || v) && /* @__PURE__ */ h("div", { className: "sui-datatable__toolbar", children: [
1487
- d && /* @__PURE__ */ e("h3", { className: "sui-datatable__title", children: d }),
1488
- o && /* @__PURE__ */ h("div", { className: "sui-datatable__pagesize", children: [
1489
- /* @__PURE__ */ e("span", { children: L.pageSizePrefix }),
1493
+ return /* @__PURE__ */ h("div", { className: w("sui-datatable", $), children: [
1494
+ (u || s || g) && /* @__PURE__ */ h("div", { className: "sui-datatable__toolbar", children: [
1495
+ u && /* @__PURE__ */ e("h3", { className: "sui-datatable__title", children: u }),
1496
+ l && /* @__PURE__ */ h("div", { className: "sui-datatable__pagesize", children: [
1497
+ /* @__PURE__ */ e("span", { children: M.pageSizePrefix }),
1490
1498
  /* @__PURE__ */ h(
1491
1499
  "button",
1492
1500
  {
1493
1501
  type: "button",
1494
- onClick: (_) => {
1495
- const I = _.currentTarget.getBoundingClientRect();
1502
+ onClick: (f) => {
1503
+ const I = f.currentTarget.getBoundingClientRect();
1496
1504
  J({ x: I.right, y: I.bottom });
1497
1505
  },
1498
1506
  className: "sui-datatable__pagesize-btn",
@@ -1508,16 +1516,16 @@ function St({
1508
1516
  x: G.x,
1509
1517
  y: G.y,
1510
1518
  onClose: () => J(null),
1511
- items: o.map((_) => ({
1512
- label: L.pageSizeItem(_),
1513
- icon: _ === O ? "check" : void 0,
1519
+ items: l.map((f) => ({
1520
+ label: M.pageSizeItem(f),
1521
+ icon: f === O ? "check" : void 0,
1514
1522
  onClick: () => {
1515
- X(_), J(null);
1523
+ X(f), J(null);
1516
1524
  }
1517
1525
  }))
1518
1526
  }
1519
1527
  ),
1520
- /* @__PURE__ */ e("span", { children: L.pageSizeSuffix })
1528
+ /* @__PURE__ */ e("span", { children: M.pageSizeSuffix })
1521
1529
  ] }),
1522
1530
  s && /* @__PURE__ */ h("div", { className: "sui-datatable__search", children: [
1523
1531
  /* @__PURE__ */ e(P, { name: "search", size: 14, color: "var(--text-muted)" }),
@@ -1525,21 +1533,21 @@ function St({
1525
1533
  "input",
1526
1534
  {
1527
1535
  value: T,
1528
- onChange: (_) => R(_.target.value),
1529
- placeholder: l,
1530
- "aria-label": l
1536
+ onChange: (f) => R(f.target.value),
1537
+ placeholder: r,
1538
+ "aria-label": r
1531
1539
  }
1532
1540
  )
1533
1541
  ] }),
1534
- /* @__PURE__ */ e("div", { className: "sui-datatable__actions", children: v })
1542
+ /* @__PURE__ */ e("div", { className: "sui-datatable__actions", children: g })
1535
1543
  ] }),
1536
- i && g.size > 0 && /* @__PURE__ */ h("div", { className: "sui-datatable__bulkbar", children: [
1537
- /* @__PURE__ */ e("span", { className: "sui-datatable__bulkcount", children: L.selected(g.size) }),
1538
- /* @__PURE__ */ e("div", { className: "sui-datatable__bulkactions", children: f == null ? void 0 : f(g, () => C(/* @__PURE__ */ new Set())) })
1544
+ o && b.size > 0 && /* @__PURE__ */ h("div", { className: "sui-datatable__bulkbar", children: [
1545
+ /* @__PURE__ */ e("span", { className: "sui-datatable__bulkcount", children: M.selected(b.size) }),
1546
+ /* @__PURE__ */ e("div", { className: "sui-datatable__bulkactions", children: p == null ? void 0 : p(b, () => C(/* @__PURE__ */ new Set())) })
1539
1547
  ] }),
1540
1548
  /* @__PURE__ */ e("div", { className: "sui-datatable__scroll", children: /* @__PURE__ */ h("table", { children: [
1541
1549
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ h("tr", { children: [
1542
- i && /* @__PURE__ */ e("th", { className: "sui-datatable__th sui-datatable__th--check", children: /* @__PURE__ */ e(
1550
+ o && /* @__PURE__ */ e("th", { className: "sui-datatable__th sui-datatable__th--check", children: /* @__PURE__ */ e(
1543
1551
  "input",
1544
1552
  {
1545
1553
  type: "checkbox",
@@ -1548,75 +1556,75 @@ function St({
1548
1556
  "aria-label": "Selecionar página"
1549
1557
  }
1550
1558
  ) }),
1551
- t.map((_) => /* @__PURE__ */ e(
1559
+ t.map((f) => /* @__PURE__ */ e(
1552
1560
  "th",
1553
1561
  {
1554
1562
  className: "sui-datatable__th",
1555
- "data-align": _.align ?? "left",
1556
- "data-sortable": _.sortable || void 0,
1557
- style: { width: _.width },
1558
- onClick: () => be(_),
1559
- "aria-sort": b === _.key ? y === "asc" ? "ascending" : "descending" : void 0,
1563
+ "data-align": f.align ?? "left",
1564
+ "data-sortable": f.sortable || void 0,
1565
+ style: { width: f.width },
1566
+ onClick: () => be(f),
1567
+ "aria-sort": v === f.key ? k === "asc" ? "ascending" : "descending" : void 0,
1560
1568
  children: /* @__PURE__ */ h("span", { className: "sui-datatable__th-inner", children: [
1561
- _.header,
1562
- _.sortable && /* @__PURE__ */ e(
1569
+ f.header,
1570
+ f.sortable && /* @__PURE__ */ e(
1563
1571
  "span",
1564
1572
  {
1565
1573
  className: "sui-datatable__sort",
1566
- "data-active": b === _.key || void 0,
1567
- children: b === _.key ? y === "asc" ? "▲" : "▼" : "▾"
1574
+ "data-active": v === f.key || void 0,
1575
+ children: v === f.key ? k === "asc" ? "▲" : "▼" : "▾"
1568
1576
  }
1569
1577
  )
1570
1578
  ] })
1571
1579
  },
1572
- _.key
1580
+ f.key
1573
1581
  ))
1574
1582
  ] }) }),
1575
1583
  /* @__PURE__ */ h("tbody", { children: [
1576
1584
  j.length === 0 && /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
1577
1585
  "td",
1578
1586
  {
1579
- colSpan: t.length + (i ? 1 : 0),
1587
+ colSpan: t.length + (o ? 1 : 0),
1580
1588
  className: "sui-datatable__empty",
1581
- children: E ? M : k
1589
+ children: E ? z : y
1582
1590
  }
1583
1591
  ) }),
1584
- j.map((_) => {
1585
- const I = g.has(_[n]);
1592
+ j.map((f) => {
1593
+ const I = b.has(f[n]);
1586
1594
  return /* @__PURE__ */ h(
1587
1595
  "tr",
1588
1596
  {
1589
- onClick: () => p == null ? void 0 : p(_),
1597
+ onClick: () => _ == null ? void 0 : _(f),
1590
1598
  className: "sui-datatable__row",
1591
1599
  "data-selected": I || void 0,
1592
- "data-clickable": p ? !0 : void 0,
1600
+ "data-clickable": _ ? !0 : void 0,
1593
1601
  children: [
1594
- i && /* @__PURE__ */ e("td", { className: "sui-datatable__td", onClick: (B) => B.stopPropagation(), children: /* @__PURE__ */ e(
1602
+ o && /* @__PURE__ */ e("td", { className: "sui-datatable__td", onClick: (B) => B.stopPropagation(), children: /* @__PURE__ */ e(
1595
1603
  "input",
1596
1604
  {
1597
1605
  type: "checkbox",
1598
1606
  checked: I,
1599
- onChange: () => Ne(_[n]),
1607
+ onChange: () => Ne(f[n]),
1600
1608
  "aria-label": "Selecionar linha"
1601
1609
  }
1602
1610
  ) }),
1603
- t.map((B) => /* @__PURE__ */ e("td", { className: "sui-datatable__td", "data-align": B.align ?? "left", children: B.render ? B.render(_) : String(_[B.key] ?? "") }, B.key))
1611
+ t.map((B) => /* @__PURE__ */ e("td", { className: "sui-datatable__td", "data-align": B.align ?? "left", children: B.render ? B.render(f) : String(f[B.key] ?? "") }, B.key))
1604
1612
  ]
1605
1613
  },
1606
- String(_[n])
1614
+ String(f[n])
1607
1615
  );
1608
1616
  })
1609
1617
  ] })
1610
1618
  ] }) }),
1611
1619
  x.length > 0 && /* @__PURE__ */ h("div", { className: "sui-datatable__footer", children: [
1612
- /* @__PURE__ */ e("span", { className: "sui-datatable__range", children: L.range(V * O + 1, Math.min(x.length, (V + 1) * O), x.length) }),
1620
+ /* @__PURE__ */ e("span", { className: "sui-datatable__range", children: M.range(V * O + 1, Math.min(x.length, (V + 1) * O), x.length) }),
1613
1621
  /* @__PURE__ */ h("div", { className: "sui-datatable__pager", children: [
1614
1622
  /* @__PURE__ */ e(
1615
1623
  "button",
1616
1624
  {
1617
1625
  type: "button",
1618
1626
  disabled: V === 0,
1619
- onClick: () => Y((_) => Math.max(0, _ - 1)),
1627
+ onClick: () => Y((f) => Math.max(0, f - 1)),
1620
1628
  "aria-label": "Página anterior",
1621
1629
  children: "‹"
1622
1630
  }
@@ -1631,7 +1639,7 @@ function St({
1631
1639
  {
1632
1640
  type: "button",
1633
1641
  disabled: V >= A - 1,
1634
- onClick: () => Y((_) => Math.min(A - 1, _ + 1)),
1642
+ onClick: () => Y((f) => Math.min(A - 1, f + 1)),
1635
1643
  "aria-label": "Próxima página",
1636
1644
  children: "›"
1637
1645
  }
@@ -1662,48 +1670,48 @@ function Dt({
1662
1670
  logo: a,
1663
1671
  topbarCenter: n,
1664
1672
  topbarEnd: s,
1665
- sidebarFooter: l,
1666
- searchable: i = !1,
1667
- searchPlaceholder: r = "Procurar",
1673
+ sidebarFooter: r,
1674
+ searchable: o = !1,
1675
+ searchPlaceholder: i = "Procurar",
1668
1676
  collapsed: c,
1669
- defaultCollapsed: o = !1,
1670
- onCollapsedChange: p,
1671
- mobileBreakpoint: d = 860,
1672
- menuButtonLabel: v = "Menu",
1673
- children: f,
1674
- className: k
1677
+ defaultCollapsed: l = !1,
1678
+ onCollapsedChange: _,
1679
+ mobileBreakpoint: u = 860,
1680
+ menuButtonLabel: g = "Menu",
1681
+ children: p,
1682
+ className: y
1675
1683
  }) {
1676
- const [M, E] = de({
1684
+ const [z, E] = ue({
1677
1685
  value: c,
1678
- defaultValue: o,
1679
- onChange: p
1680
- }), [$, z] = S(!1), [L, T] = S(""), b = tt() < d, m = b ? !0 : !M, y = se(() => {
1681
- const g = q(L.trim());
1682
- return g ? t.map((C) => ({
1686
+ defaultValue: l,
1687
+ onChange: _
1688
+ }), [L, $] = S(!1), [M, T] = S(""), v = tt() < u, m = v ? !0 : !z, k = se(() => {
1689
+ const b = q(M.trim());
1690
+ return b ? t.map((C) => ({
1683
1691
  ...C,
1684
1692
  items: C.items.filter(
1685
- (D) => typeof D.label == "string" ? q(D.label).includes(g) : !0
1693
+ (D) => typeof D.label == "string" ? q(D.label).includes(b) : !0
1686
1694
  )
1687
1695
  })).filter((C) => C.items.length > 0) : t;
1688
- }, [t, L]), u = (g) => {
1696
+ }, [t, M]), d = (b) => {
1689
1697
  var C;
1690
- (C = g.onSelect) == null || C.call(g), z(!1);
1698
+ (C = b.onSelect) == null || C.call(b), $(!1);
1691
1699
  };
1692
1700
  return /* @__PURE__ */ h(
1693
1701
  "div",
1694
1702
  {
1695
- className: w("sui-appshell", k),
1696
- "data-mobile": b || void 0,
1697
- "data-collapsed": !b && M || void 0,
1703
+ className: w("sui-appshell", y),
1704
+ "data-mobile": v || void 0,
1705
+ "data-collapsed": !v && z || void 0,
1698
1706
  children: [
1699
1707
  /* @__PURE__ */ h("header", { className: "sui-appshell__topbar", children: [
1700
1708
  /* @__PURE__ */ h("div", { className: "sui-appshell__topbar-start", children: [
1701
1709
  /* @__PURE__ */ e(
1702
1710
  De,
1703
1711
  {
1704
- "aria-label": v,
1712
+ "aria-label": g,
1705
1713
  variant: "ghost",
1706
- onClick: () => b ? z(!$) : E(!M),
1714
+ onClick: () => v ? $(!L) : E(!z),
1707
1715
  children: /* @__PURE__ */ e(P, { name: "menu", size: 20 })
1708
1716
  }
1709
1717
  ),
@@ -1712,27 +1720,27 @@ function Dt({
1712
1720
  n && /* @__PURE__ */ e("div", { className: "sui-appshell__topbar-center", children: n }),
1713
1721
  /* @__PURE__ */ e("div", { className: "sui-appshell__topbar-end", children: s })
1714
1722
  ] }),
1715
- /* @__PURE__ */ h("aside", { className: "sui-appshell__sidebar", "data-open": b && $ || void 0, children: [
1716
- i && m && /* @__PURE__ */ h("div", { className: "sui-appshell__search", children: [
1723
+ /* @__PURE__ */ h("aside", { className: "sui-appshell__sidebar", "data-open": v && L || void 0, children: [
1724
+ o && m && /* @__PURE__ */ h("div", { className: "sui-appshell__search", children: [
1717
1725
  /* @__PURE__ */ e(P, { name: "search", size: 15, color: "var(--text-muted)" }),
1718
1726
  /* @__PURE__ */ e(
1719
1727
  "input",
1720
1728
  {
1721
- value: L,
1722
- onChange: (g) => T(g.target.value),
1723
- placeholder: r,
1724
- "aria-label": r
1729
+ value: M,
1730
+ onChange: (b) => T(b.target.value),
1731
+ placeholder: i,
1732
+ "aria-label": i
1725
1733
  }
1726
1734
  )
1727
1735
  ] }),
1728
- /* @__PURE__ */ e("div", { className: "sui-appshell__nav", children: y.map((g, C) => /* @__PURE__ */ h("div", { className: "sui-appshell__navgroup", children: [
1729
- m && g.label && /* @__PURE__ */ e("h4", { className: "sui-appshell__navlabel", children: g.label }),
1730
- g.items.map((D) => /* @__PURE__ */ h(
1736
+ /* @__PURE__ */ e("div", { className: "sui-appshell__nav", children: k.map((b, C) => /* @__PURE__ */ h("div", { className: "sui-appshell__navgroup", children: [
1737
+ m && b.label && /* @__PURE__ */ e("h4", { className: "sui-appshell__navlabel", children: b.label }),
1738
+ b.items.map((D) => /* @__PURE__ */ h(
1731
1739
  "button",
1732
1740
  {
1733
1741
  type: "button",
1734
1742
  title: typeof D.label == "string" ? D.label : void 0,
1735
- onClick: () => u(D),
1743
+ onClick: () => d(D),
1736
1744
  className: "sui-appshell__navitem",
1737
1745
  "data-active": D.active || void 0,
1738
1746
  "data-icon-only": !m || void 0,
@@ -1745,16 +1753,16 @@ function Dt({
1745
1753
  D.key
1746
1754
  ))
1747
1755
  ] }, C)) }),
1748
- l && /* @__PURE__ */ e("div", { className: "sui-appshell__sidebar-footer", children: l })
1756
+ r && /* @__PURE__ */ e("div", { className: "sui-appshell__sidebar-footer", children: r })
1749
1757
  ] }),
1750
- /* @__PURE__ */ e("main", { className: "sui-appshell__content", children: f }),
1751
- b && $ && /* @__PURE__ */ e("div", { className: "sui-appshell__scrim", onClick: () => z(!1) })
1758
+ /* @__PURE__ */ e("main", { className: "sui-appshell__content", children: p }),
1759
+ v && L && /* @__PURE__ */ e("div", { className: "sui-appshell__scrim", onClick: () => $(!1) })
1752
1760
  ]
1753
1761
  }
1754
1762
  );
1755
1763
  }
1756
- function zt({ eyebrow: t, title: a, description: n, actions: s, className: l }) {
1757
- return /* @__PURE__ */ h("div", { className: w("sui-pageheader", l), children: [
1764
+ function zt({ eyebrow: t, title: a, description: n, actions: s, className: r }) {
1765
+ return /* @__PURE__ */ h("div", { className: w("sui-pageheader", r), children: [
1758
1766
  /* @__PURE__ */ h("div", { className: "sui-pageheader__text", children: [
1759
1767
  t && /* @__PURE__ */ e("span", { className: "sui-pageheader__eyebrow", children: t }),
1760
1768
  /* @__PURE__ */ e("h1", { className: "sui-pageheader__title", children: a }),
@@ -1770,12 +1778,12 @@ export {
1770
1778
  me as Button,
1771
1779
  xt as Card,
1772
1780
  vt as ColorPicker,
1773
- ut as Combobox,
1781
+ dt as Combobox,
1774
1782
  Ct as ConfirmModal,
1775
1783
  Ve as DEFAULT_PICKER_ICONS,
1776
1784
  He as DEFAULT_SWATCHES,
1777
1785
  St as DataTable,
1778
- ft as DateTimeInput,
1786
+ _t as DateTimeInput,
1779
1787
  Nt as EmptyState,
1780
1788
  ct as FormField,
1781
1789
  ze as Heading,
@@ -1784,13 +1792,13 @@ export {
1784
1792
  Se as IconBox,
1785
1793
  De as IconButton,
1786
1794
  bt as IconPicker,
1787
- _e as Input,
1795
+ fe as Input,
1788
1796
  Ee as Label,
1789
1797
  Ze as Menu,
1790
1798
  wt as Modal,
1791
1799
  pt as MoneyInput,
1792
- _t as MonthPicker,
1793
- dt as MultiSelect,
1800
+ ft as MonthPicker,
1801
+ ut as MultiSelect,
1794
1802
  Mt as PageContainer,
1795
1803
  zt as PageHeader,
1796
1804
  ot as ProgressBar,
@@ -1810,5 +1818,5 @@ export {
1810
1818
  q as normalizeSearch,
1811
1819
  Rt as registerIconAliases,
1812
1820
  At as registerIcons,
1813
- de as useControllableState
1821
+ ue as useControllableState
1814
1822
  };