beth-clarity 1.1.8 → 1.1.10

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,5 +1,5 @@
1
- import { jsx as s, jsxs as _, Fragment as Ze } from "react/jsx-runtime";
2
- import L, { useState as T, useRef as A, useEffect as O, forwardRef as Ke, isValidElement as Z, createContext as z, cloneElement as W, useContext as q, useMemo as Y, useCallback as ne, useLayoutEffect as et } from "react";
1
+ import { jsx as s, jsxs as w, Fragment as Ze } from "react/jsx-runtime";
2
+ import L, { useState as T, useRef as P, useEffect as O, forwardRef as Ke, isValidElement as Z, createContext as z, cloneElement as W, useContext as q, useMemo as Y, useCallback as ne, useLayoutEffect as et } from "react";
3
3
  import tt from "react-dom";
4
4
  const wt = ({
5
5
  variant: e = "primary",
@@ -12,37 +12,37 @@ const wt = ({
12
12
  className: u = "",
13
13
  rounded: i = !1,
14
14
  outlined: c = !1,
15
- ...p
15
+ ...m
16
16
  }) => {
17
- const y = "clarity-badge", f = !!n, m = t && a && !f;
17
+ const v = "clarity-badge", p = !!n, f = t && a && !p;
18
18
  let d = "";
19
- f ? d = `${y}--custom-bg` : m ? d = `${y}--custom` : d = `${y}--${e}`;
20
- const C = [
21
- y,
19
+ p ? d = `${v}--custom-bg` : f ? d = `${v}--custom` : d = `${v}--${e}`;
20
+ const h = [
21
+ v,
22
22
  d,
23
- `${y}--${l}`,
24
- i ? `${y}--rounded` : "",
25
- c ? `${y}--outlined` : "",
23
+ `${v}--${l}`,
24
+ i ? `${v}--rounded` : "",
25
+ c ? `${v}--outlined` : "",
26
26
  u
27
- ].filter(Boolean).join(" "), h = {};
28
- f && (h.backgroundColor = n, r && (h.color = r));
29
- const N = m && t && a ? {
27
+ ].filter(Boolean).join(" "), y = {};
28
+ p && (y.backgroundColor = n, r && (y.color = r));
29
+ const N = f && t && a ? {
30
30
  "--custom-bg-color": `var(--clarity-${t}-${a})`,
31
31
  "--custom-text-color": a && parseInt(a) >= 500 ? "white" : `var(--clarity-${t}-800)`
32
32
  } : {};
33
33
  return /* @__PURE__ */ s(
34
34
  "span",
35
35
  {
36
- className: C,
36
+ className: h,
37
37
  style: {
38
- ...h,
38
+ ...y,
39
39
  ...N
40
40
  },
41
- ...p,
41
+ ...m,
42
42
  children: o
43
43
  }
44
44
  );
45
- }, gt = ({
45
+ }, $t = ({
46
46
  variant: e = "primary",
47
47
  product: t,
48
48
  tone: a,
@@ -53,40 +53,101 @@ const wt = ({
53
53
  children: u,
54
54
  onClick: i,
55
55
  type: c = "button",
56
- className: p = "",
57
- title: y,
58
- ...f
56
+ className: m = "",
57
+ title: v,
58
+ ...p
59
59
  }) => {
60
- const m = "clarity-button", d = t && a, C = d ? `${m}--custom` : `${m}--${e}`, h = [
61
- m,
62
- C,
63
- `${m}--${n}`,
64
- o && `${m}--loading`,
65
- r && `${m}--disabled`,
66
- p
60
+ const f = "clarity-button", d = t && a, h = d ? `${f}--custom` : `${f}--${e}`, y = [
61
+ f,
62
+ h,
63
+ `${f}--${n}`,
64
+ o && `${f}--loading`,
65
+ r && `${f}--disabled`,
66
+ m
67
67
  ].filter(Boolean).join(" "), N = (B) => {
68
- const g = parseInt(B);
69
- return g >= 800 ? "900" : g >= 700 ? "800" : g >= 600 ? "700" : g >= 500 ? "600" : g >= 400 ? "500" : g >= 300 ? "400" : g >= 200 ? "300" : "200";
70
- }, w = d ? {
68
+ const $ = parseInt(B);
69
+ return $ >= 800 ? "900" : $ >= 700 ? "800" : $ >= 600 ? "700" : $ >= 500 ? "600" : $ >= 400 ? "500" : $ >= 300 ? "400" : $ >= 200 ? "300" : "200";
70
+ }, b = d ? {
71
71
  "--custom-bg-color": `var(--clarity-${t}-${a})`,
72
72
  "--custom-hover-color": `var(--clarity-${t}-${l || N(a)})`
73
73
  } : {};
74
- return /* @__PURE__ */ _(
74
+ return /* @__PURE__ */ w(
75
75
  "button",
76
76
  {
77
- className: h,
78
- style: w,
77
+ className: y,
78
+ style: b,
79
79
  disabled: r || o,
80
80
  onClick: i,
81
81
  type: c,
82
- title: y,
83
- ...f,
82
+ title: v,
83
+ ...p,
84
84
  children: [
85
- o && /* @__PURE__ */ s("div", { className: `${m}__spinner` }),
85
+ o && /* @__PURE__ */ s("div", { className: `${f}__spinner` }),
86
86
  u
87
87
  ]
88
88
  }
89
89
  );
90
+ }, gt = ({
91
+ variant: e = "primary",
92
+ size: t = "medium",
93
+ filled: a = !0,
94
+ items: l,
95
+ value: n,
96
+ multiple: r = !1,
97
+ disabled: o = !1,
98
+ onChange: u,
99
+ className: i = "",
100
+ ...c
101
+ }) => {
102
+ const m = "clarity-button-group", v = `${m}--${e}`, p = [
103
+ m,
104
+ v,
105
+ `${m}--${t}`,
106
+ !a && `${m}--outline`,
107
+ o && `${m}--disabled`,
108
+ i
109
+ ].filter(Boolean).join(" "), f = (h) => {
110
+ if (o || !u) return;
111
+ const y = l.find((N) => N.id === h);
112
+ if (!(y != null && y.disabled))
113
+ if (r) {
114
+ const N = Array.isArray(n) ? n : [], b = N.includes(h) ? N.filter((B) => B !== h) : [...N, h];
115
+ u(b);
116
+ } else
117
+ u(h);
118
+ }, d = (h) => r ? Array.isArray(n) && n.includes(h) : n === h;
119
+ return /* @__PURE__ */ s(
120
+ "div",
121
+ {
122
+ className: p,
123
+ role: "group",
124
+ ...c,
125
+ children: l.map((h, y) => {
126
+ const N = d(h.id), b = [
127
+ `${m}__item`,
128
+ N && `${m}__item--selected`,
129
+ h.disabled && `${m}__item--disabled`,
130
+ y === 0 && `${m}__item--first`,
131
+ y === l.length - 1 && `${m}__item--last`
132
+ ].filter(Boolean).join(" ");
133
+ return /* @__PURE__ */ w(
134
+ "button",
135
+ {
136
+ className: b,
137
+ onClick: () => f(h.id),
138
+ disabled: o || h.disabled,
139
+ type: "button",
140
+ "aria-pressed": N,
141
+ children: [
142
+ h.icon && /* @__PURE__ */ s("span", { className: `${m}__item-icon`, children: h.icon }),
143
+ /* @__PURE__ */ s("span", { className: `${m}__item-label`, children: h.label })
144
+ ]
145
+ },
146
+ h.id
147
+ );
148
+ })
149
+ }
150
+ );
90
151
  }, st = L.forwardRef(({
91
152
  variant: e,
92
153
  size: t = "medium",
@@ -98,21 +159,21 @@ const wt = ({
98
159
  endIcon: u,
99
160
  className: i = "",
100
161
  disabled: c = !1,
101
- value: p,
102
- defaultValue: y,
103
- onFocus: f,
104
- onBlur: m,
162
+ value: m,
163
+ defaultValue: v,
164
+ onFocus: p,
165
+ onBlur: f,
105
166
  ...d
106
- }, C) => {
107
- const [h, N] = T(!1), [w, B] = T(!1), g = A(null);
108
- L.useImperativeHandle(C, () => g.current), O(() => {
109
- const x = g.current;
167
+ }, h) => {
168
+ const [y, N] = T(!1), [b, B] = T(!1), $ = P(null);
169
+ L.useImperativeHandle(h, () => $.current), O(() => {
170
+ const x = $.current;
110
171
  x && B(x.value.length > 0);
111
- }, [p, y]);
112
- const b = (x) => {
113
- N(!0), f == null || f(x);
172
+ }, [m, v]);
173
+ const _ = (x) => {
174
+ N(!0), p == null || p(x);
114
175
  }, k = (x) => {
115
- N(!1), B(x.target.value.length > 0), m == null || m(x);
176
+ N(!1), B(x.target.value.length > 0), f == null || f(x);
116
177
  }, E = [
117
178
  "clarity-input",
118
179
  "clarity-input--outlined",
@@ -120,25 +181,25 @@ const wt = ({
120
181
  e && `clarity-input--${e}`,
121
182
  n && "clarity-input--error",
122
183
  c && "clarity-input--disabled",
123
- h && "clarity-input--focused",
124
- w && "clarity-input--has-value",
184
+ y && "clarity-input--focused",
185
+ b && "clarity-input--has-value",
125
186
  o && "clarity-input--with-start-icon",
126
187
  u && "clarity-input--with-end-icon",
127
188
  i
128
189
  ].filter(Boolean).join(" ");
129
- return /* @__PURE__ */ _("div", { className: "clarity-input-wrapper", children: [
130
- /* @__PURE__ */ _("div", { className: E, children: [
190
+ return /* @__PURE__ */ w("div", { className: "clarity-input-wrapper", children: [
191
+ /* @__PURE__ */ w("div", { className: E, children: [
131
192
  o && /* @__PURE__ */ s("div", { className: "clarity-input__start-icon", children: o }),
132
- /* @__PURE__ */ _("div", { className: "clarity-input__field", children: [
193
+ /* @__PURE__ */ w("div", { className: "clarity-input__field", children: [
133
194
  /* @__PURE__ */ s(
134
195
  "input",
135
196
  {
136
- ref: g,
197
+ ref: $,
137
198
  className: "clarity-input__element",
138
199
  disabled: c,
139
- value: p,
140
- defaultValue: y,
141
- onFocus: b,
200
+ value: m,
201
+ defaultValue: v,
202
+ onFocus: _,
142
203
  onBlur: k,
143
204
  ...d
144
205
  }
@@ -162,59 +223,59 @@ const at = L.forwardRef(({
162
223
  endIcon: u,
163
224
  className: i = "",
164
225
  disabled: c = !1,
165
- value: p,
166
- defaultValue: y,
167
- onFocus: f,
168
- onBlur: m,
226
+ value: m,
227
+ defaultValue: v,
228
+ onFocus: p,
229
+ onBlur: f,
169
230
  rows: d = 3,
170
- minHeight: C,
171
- maxHeight: h,
231
+ minHeight: h,
232
+ maxHeight: y,
172
233
  resizable: N = !0,
173
- ...w
234
+ ...b
174
235
  }, B) => {
175
- const [g, b] = T(!1), [k, E] = T(!1), x = A(null);
236
+ const [$, _] = T(!1), [k, E] = T(!1), x = P(null);
176
237
  L.useImperativeHandle(B, () => x.current), O(() => {
177
- const $ = x.current;
178
- $ && E($.value.length > 0);
179
- }, [p, y]);
180
- const j = ($) => {
181
- b(!0), f == null || f($);
182
- }, S = ($) => {
183
- b(!1), E($.target.value.length > 0), m == null || m($);
184
- }, P = [
238
+ const g = x.current;
239
+ g && E(g.value.length > 0);
240
+ }, [m, v]);
241
+ const j = (g) => {
242
+ _(!0), p == null || p(g);
243
+ }, I = (g) => {
244
+ _(!1), E(g.target.value.length > 0), f == null || f(g);
245
+ }, A = [
185
246
  "clarity-textarea",
186
247
  "clarity-textarea--outlined",
187
248
  `clarity-textarea--${t}`,
188
249
  e && `clarity-textarea--${e}`,
189
250
  n && "clarity-textarea--error",
190
251
  c && "clarity-textarea--disabled",
191
- g && "clarity-textarea--focused",
252
+ $ && "clarity-textarea--focused",
192
253
  k && "clarity-textarea--has-value",
193
254
  o && "clarity-textarea--with-start-icon",
194
255
  u && "clarity-textarea--with-end-icon",
195
256
  i
196
- ].filter(Boolean).join(" "), I = {
257
+ ].filter(Boolean).join(" "), S = {
197
258
  resize: N ? "vertical" : "none",
198
- minHeight: C ? `${C}px` : void 0,
199
- maxHeight: h ? `${h}px` : void 0
259
+ minHeight: h ? `${h}px` : void 0,
260
+ maxHeight: y ? `${y}px` : void 0
200
261
  };
201
- return /* @__PURE__ */ _("div", { className: "clarity-textarea-wrapper", children: [
202
- /* @__PURE__ */ _("div", { className: P, children: [
262
+ return /* @__PURE__ */ w("div", { className: "clarity-textarea-wrapper", children: [
263
+ /* @__PURE__ */ w("div", { className: A, children: [
203
264
  o && /* @__PURE__ */ s("div", { className: "clarity-textarea__start-icon", children: o }),
204
- /* @__PURE__ */ _("div", { className: "clarity-textarea__field", children: [
265
+ /* @__PURE__ */ w("div", { className: "clarity-textarea__field", children: [
205
266
  /* @__PURE__ */ s(
206
267
  "textarea",
207
268
  {
208
269
  ref: x,
209
270
  className: "clarity-textarea__element",
210
271
  disabled: c,
211
- value: p,
212
- defaultValue: y,
272
+ value: m,
273
+ defaultValue: v,
213
274
  onFocus: j,
214
- onBlur: S,
275
+ onBlur: I,
215
276
  rows: d,
216
- style: I,
217
- ...w
277
+ style: S,
278
+ ...b
218
279
  }
219
280
  ),
220
281
  a && /* @__PURE__ */ s("label", { className: "clarity-textarea__label", children: a })
@@ -236,88 +297,88 @@ const lt = L.forwardRef(({
236
297
  endIcon: u,
237
298
  className: i = "",
238
299
  disabled: c = !1,
239
- value: p,
240
- defaultValue: y,
241
- onFocus: f,
242
- onBlur: m,
300
+ value: m,
301
+ defaultValue: v,
302
+ onFocus: p,
303
+ onBlur: f,
243
304
  onChange: d,
244
- options: C,
245
- placeholder: h = "Selecione uma opção",
305
+ options: h,
306
+ placeholder: y = "Selecione uma opção",
246
307
  isClearable: N = !1,
247
- isSearchable: w = !1,
308
+ isSearchable: b = !1,
248
309
  ...B
249
- }, g) => {
250
- const [b, k] = T(!1), [E, x] = T(!1), [j, S] = T(p || y || ""), [P, I] = T(""), $ = A(null), M = A(null);
251
- L.useImperativeHandle(g, () => $.current), O(() => {
252
- p !== void 0 && S(p);
253
- }, [p]), O(() => {
254
- const v = (D) => {
255
- $.current && !$.current.contains(D.target) && (k(!1), x(!1), m == null || m());
310
+ }, $) => {
311
+ const [_, k] = T(!1), [E, x] = T(!1), [j, I] = T(m || v || ""), [A, S] = T(""), g = P(null), M = P(null);
312
+ L.useImperativeHandle($, () => g.current), O(() => {
313
+ m !== void 0 && I(m);
314
+ }, [m]), O(() => {
315
+ const C = (D) => {
316
+ g.current && !g.current.contains(D.target) && (k(!1), x(!1), f == null || f());
256
317
  };
257
- return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
258
- }, [m]);
259
- const V = w && P ? C.filter(
260
- (v) => v.label.toLowerCase().includes(P.toLowerCase())
261
- ) : C, F = () => {
262
- c || (k(!b), x(!b), b ? (m == null || m(), w && I("")) : (f == null || f(), w && setTimeout(() => {
263
- var v;
264
- (v = M.current) == null || v.focus();
318
+ return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
319
+ }, [f]);
320
+ const V = b && A ? h.filter(
321
+ (C) => C.label.toLowerCase().includes(A.toLowerCase())
322
+ ) : h, F = () => {
323
+ c || (k(!_), x(!_), _ ? (f == null || f(), b && S("")) : (p == null || p(), b && setTimeout(() => {
324
+ var C;
325
+ (C = M.current) == null || C.focus();
265
326
  }, 0)));
266
- }, X = (v) => {
267
- v.disabled || (S(v.value), k(!1), x(!1), I(""), d == null || d(v.value), m == null || m());
268
- }, te = (v) => {
269
- I(v.target.value);
270
- }, G = (v) => {
271
- v.key === "Escape" ? (k(!1), x(!1), I("")) : v.key === "Enter" && V.length > 0 && V[0] && X(V[0]);
272
- }, H = C.find((v) => v.value === j), le = j !== "" && j !== void 0, re = (v) => {
273
- v.stopPropagation(), S(""), d == null || d("");
274
- }, ie = le || E || h || w && P, oe = [
327
+ }, X = (C) => {
328
+ C.disabled || (I(C.value), k(!1), x(!1), S(""), d == null || d(C.value), f == null || f());
329
+ }, te = (C) => {
330
+ S(C.target.value);
331
+ }, G = (C) => {
332
+ C.key === "Escape" ? (k(!1), x(!1), S("")) : C.key === "Enter" && V.length > 0 && V[0] && X(V[0]);
333
+ }, H = h.find((C) => C.value === j), le = j !== "" && j !== void 0, re = (C) => {
334
+ C.stopPropagation(), I(""), d == null || d("");
335
+ }, ie = le || E || y || b && A, oe = [
275
336
  "clarity-select",
276
337
  "clarity-select--outlined",
277
338
  `clarity-select--${t}`,
278
339
  e && `clarity-select--${e}`,
279
340
  n && "clarity-select--error",
280
341
  c && "clarity-select--disabled",
281
- (E || b) && "clarity-select--focused",
342
+ (E || _) && "clarity-select--focused",
282
343
  ie && "clarity-select--label-up",
283
- b && "clarity-select--open",
284
- w && "clarity-select--searchable",
344
+ _ && "clarity-select--open",
345
+ b && "clarity-select--searchable",
285
346
  o && "clarity-select--with-start-icon",
286
347
  (u || N) && "clarity-select--with-end-icon",
287
348
  i
288
349
  ].filter(Boolean).join(" ");
289
- return /* @__PURE__ */ _("div", { className: "clarity-select-wrapper", children: [
290
- /* @__PURE__ */ _(
350
+ return /* @__PURE__ */ w("div", { className: "clarity-select-wrapper", children: [
351
+ /* @__PURE__ */ w(
291
352
  "div",
292
353
  {
293
- ref: $,
354
+ ref: g,
294
355
  className: oe,
295
- onClick: w ? void 0 : F,
356
+ onClick: b ? void 0 : F,
296
357
  role: "combobox",
297
- "aria-expanded": b,
358
+ "aria-expanded": _,
298
359
  "aria-haspopup": "listbox",
299
- tabIndex: c || w ? -1 : 0,
360
+ tabIndex: c || b ? -1 : 0,
300
361
  ...B,
301
362
  children: [
302
363
  o && /* @__PURE__ */ s("div", { className: "clarity-select__start-icon", children: o }),
303
- /* @__PURE__ */ _("div", { className: "clarity-select__field", children: [
304
- w ? /* @__PURE__ */ s(
364
+ /* @__PURE__ */ w("div", { className: "clarity-select__field", children: [
365
+ b ? /* @__PURE__ */ s(
305
366
  "input",
306
367
  {
307
368
  ref: M,
308
369
  type: "text",
309
370
  className: "clarity-select__search-input",
310
- value: b ? P : H ? H.label : "",
371
+ value: _ ? A : H ? H.label : "",
311
372
  onChange: te,
312
373
  onKeyDown: G,
313
374
  onFocus: () => {
314
- b || (k(!0), x(!0), f == null || f());
375
+ _ || (k(!0), x(!0), p == null || p());
315
376
  },
316
- placeholder: H ? H.label : h,
377
+ placeholder: H ? H.label : y,
317
378
  disabled: c,
318
- readOnly: !b
379
+ readOnly: !_
319
380
  }
320
- ) : /* @__PURE__ */ s("div", { className: "clarity-select__display", children: H ? H.label : h }),
381
+ ) : /* @__PURE__ */ s("div", { className: "clarity-select__display", children: H ? H.label : y }),
321
382
  a && /* @__PURE__ */ s("label", { className: "clarity-select__label", children: a })
322
383
  ] }),
323
384
  N && le && /* @__PURE__ */ s(
@@ -352,7 +413,7 @@ const lt = L.forwardRef(({
352
413
  "div",
353
414
  {
354
415
  className: "clarity-select__end-icon",
355
- onClick: w ? F : void 0,
416
+ onClick: b ? F : void 0,
356
417
  children: u || /* @__PURE__ */ s(
357
418
  "svg",
358
419
  {
@@ -375,20 +436,20 @@ const lt = L.forwardRef(({
375
436
  )
376
437
  }
377
438
  ),
378
- b && /* @__PURE__ */ s("div", { className: "clarity-select__dropdown", children: /* @__PURE__ */ s("ul", { className: "clarity-select__options", role: "listbox", children: V.length > 0 ? V.map((v) => /* @__PURE__ */ s(
439
+ _ && /* @__PURE__ */ s("div", { className: "clarity-select__dropdown", children: /* @__PURE__ */ s("ul", { className: "clarity-select__options", role: "listbox", children: V.length > 0 ? V.map((C) => /* @__PURE__ */ s(
379
440
  "li",
380
441
  {
381
442
  className: [
382
443
  "clarity-select__option",
383
- v.disabled && "clarity-select__option--disabled",
384
- j === v.value && "clarity-select__option--selected"
444
+ C.disabled && "clarity-select__option--disabled",
445
+ j === C.value && "clarity-select__option--selected"
385
446
  ].filter(Boolean).join(" "),
386
- onClick: () => X(v),
447
+ onClick: () => X(C),
387
448
  role: "option",
388
- "aria-selected": j === v.value,
389
- children: v.label
449
+ "aria-selected": j === C.value,
450
+ children: C.label
390
451
  },
391
- v.value
452
+ C.value
392
453
  )) : /* @__PURE__ */ s("li", { className: "clarity-select__option clarity-select__option--no-results", children: "Nenhum resultado encontrado" }) }) })
393
454
  ]
394
455
  }
@@ -408,56 +469,56 @@ const nt = Ke(({
408
469
  errorMessage: u,
409
470
  disabled: i = !1,
410
471
  variant: c = "primary",
411
- size: p = "medium",
412
- maxSelectedLabels: y = 3,
413
- selectionLimit: f,
414
- className: m = "",
472
+ size: m = "medium",
473
+ maxSelectedLabels: v = 3,
474
+ selectionLimit: p,
475
+ className: f = "",
415
476
  id: d,
416
- name: C,
417
- required: h = !1,
477
+ name: h,
478
+ required: y = !1,
418
479
  "data-testid": N,
419
- ...w
480
+ ...b
420
481
  }, B) => {
421
- const [g, b] = T(!1), [k, E] = T(""), [x, j] = T(!1), S = A(null), P = A(null), I = A(null), $ = (v) => {
422
- S.current = v, B && (typeof B == "function" ? B(v) : B.current = v);
482
+ const [$, _] = T(!1), [k, E] = T(""), [x, j] = T(!1), I = P(null), A = P(null), S = P(null), g = (C) => {
483
+ I.current = C, B && (typeof B == "function" ? B(C) : B.current = C);
423
484
  };
424
485
  O(() => {
425
- const v = (D) => {
426
- S.current && !S.current.contains(D.target) && (b(!1), j(!1), E(""));
486
+ const C = (D) => {
487
+ I.current && !I.current.contains(D.target) && (_(!1), j(!1), E(""));
427
488
  };
428
- return document.addEventListener("click", v), () => document.removeEventListener("click", v);
489
+ return document.addEventListener("click", C), () => document.removeEventListener("click", C);
429
490
  }, []);
430
491
  const M = e.filter(
431
- (v) => v.label.toLowerCase().includes(k.toLowerCase())
492
+ (C) => C.label.toLowerCase().includes(k.toLowerCase())
432
493
  ), V = () => {
433
- i || (b(!g), j(!g), g ? E("") : setTimeout(() => {
434
- var v;
435
- (v = P.current) == null || v.focus();
494
+ i || (_(!$), j(!$), $ ? E("") : setTimeout(() => {
495
+ var C;
496
+ (C = A.current) == null || C.focus();
436
497
  }, 100));
437
- }, F = (v, D) => {
498
+ }, F = (C, D) => {
438
499
  if (i)
439
500
  return;
440
501
  D && (D.stopPropagation(), D.preventDefault());
441
- const U = t.includes(v);
502
+ const U = t.includes(C);
442
503
  let R;
443
- U ? R = t.filter((se) => se !== v) : R = [...t, v], a && a(R);
444
- }, X = (v, D) => {
504
+ U ? R = t.filter((se) => se !== C) : R = [...t, C], a && a(R);
505
+ }, X = (C, D) => {
445
506
  if (D.stopPropagation(), i) return;
446
- const U = t.filter((R) => R !== v);
507
+ const U = t.filter((R) => R !== C);
447
508
  a == null || a(U);
448
- }, te = (v) => {
449
- v.stopPropagation(), !i && (a == null || a([]));
450
- }, G = (v) => {
451
- E(v.target.value);
452
- }, H = (v) => {
453
- v.key === "Escape" && (b(!1), j(!1), E(""));
454
- }, le = x || g || t.length > 0, re = () => {
509
+ }, te = (C) => {
510
+ C.stopPropagation(), !i && (a == null || a([]));
511
+ }, G = (C) => {
512
+ E(C.target.value);
513
+ }, H = (C) => {
514
+ C.key === "Escape" && (_(!1), j(!1), E(""));
515
+ }, le = x || $ || t.length > 0, re = () => {
455
516
  if (t.length === 0) return null;
456
- const v = t.map(
517
+ const C = t.map(
457
518
  (R) => e.find((se) => se.value === R)
458
- ).filter(Boolean), D = v.slice(0, y), U = v.length - y;
459
- return /* @__PURE__ */ _("div", { className: "clarity-multiselect__chips", children: [
460
- D.map((R) => /* @__PURE__ */ _("div", { className: "clarity-multiselect__chip", children: [
519
+ ).filter(Boolean), D = C.slice(0, v), U = C.length - v;
520
+ return /* @__PURE__ */ w("div", { className: "clarity-multiselect__chips", children: [
521
+ D.map((R) => /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip", children: [
461
522
  /* @__PURE__ */ s("span", { className: "clarity-multiselect__chip-label", children: R.label }),
462
523
  !i && /* @__PURE__ */ s(
463
524
  "button",
@@ -470,7 +531,7 @@ const nt = Ke(({
470
531
  }
471
532
  )
472
533
  ] }, R.value)),
473
- U > 0 && /* @__PURE__ */ _("div", { className: "clarity-multiselect__chip clarity-multiselect__chip--count", children: [
534
+ U > 0 && /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip clarity-multiselect__chip--count", children: [
474
535
  "+",
475
536
  U,
476
537
  " mais"
@@ -478,39 +539,39 @@ const nt = Ke(({
478
539
  ] });
479
540
  }, ie = [
480
541
  "clarity-multiselect-wrapper",
481
- m
542
+ f
482
543
  ].filter(Boolean).join(" "), oe = [
483
544
  "clarity-multiselect",
484
545
  `clarity-multiselect--${c}`,
485
- `clarity-multiselect--${p}`,
486
- g && "clarity-multiselect--open",
546
+ `clarity-multiselect--${m}`,
547
+ $ && "clarity-multiselect--open",
487
548
  x && "clarity-multiselect--focused",
488
549
  le && "clarity-multiselect--label-up",
489
550
  o && "clarity-multiselect--error",
490
551
  i && "clarity-multiselect--disabled",
491
552
  t.length > 0 && "clarity-multiselect--has-value"
492
553
  ].filter(Boolean).join(" ");
493
- return /* @__PURE__ */ _("div", { className: ie, children: [
494
- /* @__PURE__ */ _(
554
+ return /* @__PURE__ */ w("div", { className: ie, children: [
555
+ /* @__PURE__ */ w(
495
556
  "div",
496
557
  {
497
- ref: $,
558
+ ref: g,
498
559
  className: oe,
499
560
  "data-testid": N,
500
- ...w,
561
+ ...b,
501
562
  children: [
502
- /* @__PURE__ */ _(
563
+ /* @__PURE__ */ w(
503
564
  "div",
504
565
  {
505
566
  className: "clarity-multiselect__field",
506
567
  onClick: V,
507
568
  children: [
508
- n && /* @__PURE__ */ _("label", { className: "clarity-multiselect__label", children: [
569
+ n && /* @__PURE__ */ w("label", { className: "clarity-multiselect__label", children: [
509
570
  n,
510
- h && /* @__PURE__ */ s("span", { className: "clarity-multiselect__required", children: "*" })
571
+ y && /* @__PURE__ */ s("span", { className: "clarity-multiselect__required", children: "*" })
511
572
  ] }),
512
573
  /* @__PURE__ */ s("div", { className: "clarity-multiselect__content", children: t.length > 0 ? re() : /* @__PURE__ */ s("span", { className: "clarity-multiselect__placeholder", children: l }) }),
513
- /* @__PURE__ */ _("div", { className: "clarity-multiselect__icons", children: [
574
+ /* @__PURE__ */ w("div", { className: "clarity-multiselect__icons", children: [
514
575
  t.length > 0 && !i && /* @__PURE__ */ s(
515
576
  "button",
516
577
  {
@@ -535,11 +596,11 @@ const nt = Ke(({
535
596
  ]
536
597
  }
537
598
  ),
538
- g && /* @__PURE__ */ _("div", { ref: I, className: "clarity-multiselect__dropdown", children: [
599
+ $ && /* @__PURE__ */ w("div", { ref: S, className: "clarity-multiselect__dropdown", children: [
539
600
  /* @__PURE__ */ s("div", { className: "clarity-multiselect__search", children: /* @__PURE__ */ s(
540
601
  "input",
541
602
  {
542
- ref: P,
603
+ ref: A,
543
604
  type: "text",
544
605
  className: "clarity-multiselect__search-input",
545
606
  placeholder: "Buscar opções...",
@@ -548,9 +609,9 @@ const nt = Ke(({
548
609
  onKeyDown: H
549
610
  }
550
611
  ) }),
551
- /* @__PURE__ */ s("ul", { className: "clarity-multiselect__options", children: M.length > 0 ? M.map((v) => {
552
- const D = t.includes(v.value), U = v.disabled || i;
553
- return /* @__PURE__ */ _(
612
+ /* @__PURE__ */ s("ul", { className: "clarity-multiselect__options", children: M.length > 0 ? M.map((C) => {
613
+ const D = t.includes(C.value), U = C.disabled || i;
614
+ return /* @__PURE__ */ w(
554
615
  "li",
555
616
  {
556
617
  className: [
@@ -558,7 +619,7 @@ const nt = Ke(({
558
619
  D && "clarity-multiselect__option--selected",
559
620
  U && "clarity-multiselect__option--disabled"
560
621
  ].filter(Boolean).join(" "),
561
- onClick: (R) => !U && F(v.value, R),
622
+ onClick: (R) => !U && F(C.value, R),
562
623
  children: [
563
624
  /* @__PURE__ */ s("div", { className: "clarity-multiselect__option-checkbox", children: /* @__PURE__ */ s("div", { className: [
564
625
  "clarity-multiselect__checkbox",
@@ -573,10 +634,10 @@ const nt = Ke(({
573
634
  strokeLinejoin: "round"
574
635
  }
575
636
  ) }) }) }),
576
- /* @__PURE__ */ s("span", { className: "clarity-multiselect__option-label", children: v.label })
637
+ /* @__PURE__ */ s("span", { className: "clarity-multiselect__option-label", children: C.label })
577
638
  ]
578
639
  },
579
- v.value
640
+ C.value
580
641
  );
581
642
  }) : /* @__PURE__ */ s("li", { className: "clarity-multiselect__option clarity-multiselect__option--no-results", children: "Nenhum resultado encontrado" }) })
582
643
  ] })
@@ -605,7 +666,7 @@ const fe = z(null), pe = () => {
605
666
  "clarity-modal-close",
606
667
  n && `clarity-modal-close--${n}`
607
668
  ].filter(Boolean).join(" ");
608
- return /* @__PURE__ */ _("div", { className: o, children: [
669
+ return /* @__PURE__ */ w("div", { className: o, children: [
609
670
  a && /* @__PURE__ */ s("h2", { className: "clarity-modal-title", children: a }),
610
671
  e,
611
672
  r && /* @__PURE__ */ s("button", { className: u, onClick: (i) => {
@@ -616,7 +677,7 @@ const fe = z(null), pe = () => {
616
677
  he.displayName = "Modal.Header";
617
678
  const ye = ({ children: e, className: t = "" }) => /* @__PURE__ */ s("div", { className: `clarity-modal-content ${t}`, children: e });
618
679
  ye.displayName = "Modal.Content";
619
- const ve = ({ children: e, className: t = "" }) => /* @__PURE__ */ _("div", { className: `clarity-modal-footer ${t}`, children: [
680
+ const ve = ({ children: e, className: t = "" }) => /* @__PURE__ */ w("div", { className: `clarity-modal-footer ${t}`, children: [
620
681
  /* @__PURE__ */ s("div", { className: "clarity-modal-scroll-indicator" }),
621
682
  e
622
683
  ] });
@@ -650,29 +711,29 @@ const J = ({
650
711
  showCloseButton: u = !0,
651
712
  closeOnOverlayClick: i = !0
652
713
  }) => {
653
- const [c, p] = T(!1), f = e !== void 0 ? e : c, m = t || (() => {
654
- p(!1);
714
+ const [c, m] = T(!1), p = e !== void 0 ? e : c, f = t || (() => {
715
+ m(!1);
655
716
  });
656
717
  O(() => {
657
- f && (a == null || a());
658
- }, [f, a]), O(() => {
659
- const w = (B) => {
660
- B.key === "Escape" && m();
718
+ p && (a == null || a());
719
+ }, [p, a]), O(() => {
720
+ const b = (B) => {
721
+ B.key === "Escape" && f();
661
722
  };
662
- return f ? (document.addEventListener("keydown", w), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
663
- document.removeEventListener("keydown", w), document.body.style.overflow = "unset";
723
+ return p ? (document.addEventListener("keydown", b), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
724
+ document.removeEventListener("keydown", b), document.body.style.overflow = "unset";
664
725
  };
665
- }, [f, m]);
666
- const d = (w) => {
667
- i && w.target === w.currentTarget && m();
668
- }, C = L.Children.toArray(l).find(
669
- (w) => Z(w) && w.type.displayName === "Modal.Trigger"
670
- ), h = L.Children.toArray(l).filter(
671
- (w) => Z(w) && w.type.displayName !== "Modal.Trigger"
726
+ }, [p, f]);
727
+ const d = (b) => {
728
+ i && b.target === b.currentTarget && f();
729
+ }, h = L.Children.toArray(l).find(
730
+ (b) => Z(b) && b.type.displayName === "Modal.Trigger"
731
+ ), y = L.Children.toArray(l).filter(
732
+ (b) => Z(b) && b.type.displayName !== "Modal.Trigger"
672
733
  ), N = ["clarity-modal", n, `clarity-modal--${o}`].filter(Boolean).join(" ");
673
- return /* @__PURE__ */ _(fe.Provider, { value: { onClose: m, variant: r, showCloseButton: u }, children: [
674
- C && W(C, { onClick: () => p(!0), variant: r }),
675
- f && /* @__PURE__ */ s("div", { className: "clarity-modal-overlay", onClick: d, children: /* @__PURE__ */ s("div", { className: N, children: h }) })
734
+ return /* @__PURE__ */ w(fe.Provider, { value: { onClose: f, variant: r, showCloseButton: u }, children: [
735
+ h && W(h, { onClick: () => m(!0), variant: r }),
736
+ p && /* @__PURE__ */ s("div", { className: "clarity-modal-overlay", onClick: d, children: /* @__PURE__ */ s("div", { className: N, children: y }) })
676
737
  ] });
677
738
  };
678
739
  J.Header = he;
@@ -681,7 +742,7 @@ J.Footer = ve;
681
742
  J.Trigger = Ce;
682
743
  J.Close = Ne;
683
744
  J.displayName = "Modal";
684
- const be = z(void 0), $t = () => {
745
+ const be = z(void 0), kt = () => {
685
746
  const e = q(be);
686
747
  if (!e)
687
748
  throw new Error("useToast must be used within a ToastProvider");
@@ -691,13 +752,13 @@ const be = z(void 0), $t = () => {
691
752
  O(() => {
692
753
  const c = setTimeout(() => {
693
754
  u("visible");
694
- }, 10), p = setTimeout(() => {
755
+ }, 10), m = setTimeout(() => {
695
756
  u("exiting");
696
- }, l * 1e3 - 300), y = setTimeout(() => {
757
+ }, l * 1e3 - 300), v = setTimeout(() => {
697
758
  n(e);
698
759
  }, l * 1e3);
699
760
  return () => {
700
- clearTimeout(c), clearTimeout(p), clearTimeout(y);
761
+ clearTimeout(c), clearTimeout(m), clearTimeout(v);
701
762
  };
702
763
  }, [e, l, n]);
703
764
  const i = [
@@ -706,7 +767,7 @@ const be = z(void 0), $t = () => {
706
767
  r ? "colored-background" : "",
707
768
  `cl-toast-${o}`
708
769
  ].filter(Boolean).join(" ");
709
- return /* @__PURE__ */ _("div", { className: i, children: [
770
+ return /* @__PURE__ */ w("div", { className: i, children: [
710
771
  /* @__PURE__ */ s("div", { className: "cl-toast-message", children: t }),
711
772
  /* @__PURE__ */ s("button", { onClick: () => u("exiting"), className: "cl-toast-close-button", children: "×" }),
712
773
  /* @__PURE__ */ s(
@@ -717,7 +778,7 @@ const be = z(void 0), $t = () => {
717
778
  }
718
779
  )
719
780
  ] });
720
- }, kt = ({ children: e }) => {
781
+ }, xt = ({ children: e }) => {
721
782
  const [t, a] = T([]), l = Y(() => {
722
783
  if (typeof document < "u") {
723
784
  const i = document.createElement("div");
@@ -732,23 +793,23 @@ const be = z(void 0), $t = () => {
732
793
  };
733
794
  }, [l]);
734
795
  const n = ne((i) => {
735
- const p = {
796
+ const m = {
736
797
  id: (/* @__PURE__ */ new Date()).toISOString() + Math.random(),
737
798
  // duration: 5,
738
799
  // position: 'right-top',
739
800
  ...i
740
801
  };
741
- a((y) => {
742
- const f = [p, ...y];
743
- return f.length > 4 ? f.slice(0, 4) : f;
802
+ a((v) => {
803
+ const p = [m, ...v];
804
+ return p.length > 4 ? p.slice(0, 4) : p;
744
805
  });
745
806
  }, []), r = ne((i) => {
746
- a((c) => c.filter((p) => p.id !== i));
807
+ a((c) => c.filter((m) => m.id !== i));
747
808
  }, []), o = Y(() => t.reduce((i, c) => (i[c.position] || (i[c.position] = []), i[c.position].push(c), i), {}), [t]), u = Y(() => ({ show: n }), [n]);
748
- return /* @__PURE__ */ _(be.Provider, { value: u, children: [
809
+ return /* @__PURE__ */ w(be.Provider, { value: u, children: [
749
810
  e,
750
811
  l && tt.createPortal(
751
- Object.entries(o).map(([i, c]) => /* @__PURE__ */ s("div", { className: `cl-toast-container ${i}`, children: c.map((p) => /* @__PURE__ */ s(rt, { ...p, onClose: r }, p.id)) }, i)),
812
+ Object.entries(o).map(([i, c]) => /* @__PURE__ */ s("div", { className: `cl-toast-container ${i}`, children: c.map((m) => /* @__PURE__ */ s(rt, { ...m, onClose: r }, m.id)) }, i)),
752
813
  l
753
814
  )
754
815
  ] });
@@ -757,7 +818,7 @@ const be = z(void 0), $t = () => {
757
818
  if (!e)
758
819
  throw new Error("useOffcanvas must be used within an Offcanvas provider");
759
820
  return e;
760
- }, ge = ({
821
+ }, $e = ({
761
822
  children: e,
762
823
  className: t = ""
763
824
  }) => {
@@ -771,7 +832,7 @@ const be = z(void 0), $t = () => {
771
832
  "clarity-offcanvas-title",
772
833
  l && `clarity-offcanvas-title--${l}`
773
834
  ].filter(Boolean).join(" ");
774
- return /* @__PURE__ */ _("div", { className: o, children: [
835
+ return /* @__PURE__ */ w("div", { className: o, children: [
775
836
  r && /* @__PURE__ */ s("h2", { className: i, children: r }),
776
837
  e,
777
838
  n && /* @__PURE__ */ s("button", { className: u, onClick: (c) => {
@@ -779,9 +840,9 @@ const be = z(void 0), $t = () => {
779
840
  }, children: "×" })
780
841
  ] });
781
842
  };
782
- ge.displayName = "Offcanvas.Header";
783
- const $e = ({ children: e, className: t = "" }) => /* @__PURE__ */ s("div", { className: `clarity-offcanvas-content ${t}`, children: e });
784
- $e.displayName = "Offcanvas.Content";
843
+ $e.displayName = "Offcanvas.Header";
844
+ const ge = ({ children: e, className: t = "" }) => /* @__PURE__ */ s("div", { className: `clarity-offcanvas-content ${t}`, children: e });
845
+ ge.displayName = "Offcanvas.Content";
785
846
  const ke = ({ children: e, onClick: t, variant: a }) => W(e, {
786
847
  onClick: (l) => {
787
848
  var n, r;
@@ -814,68 +875,68 @@ const K = ({
814
875
  showCloseButton: i = !0,
815
876
  title: c
816
877
  }) => {
817
- const [p, y] = T(!1), [f, m] = T(!1), [d, C] = T(!1), h = e !== void 0, N = h ? e : p, w = ne(() => {
818
- t ? t() : y(!1);
878
+ const [m, v] = T(!1), [p, f] = T(!1), [d, h] = T(!1), y = e !== void 0, N = y ? e : m, b = ne(() => {
879
+ t ? t() : v(!1);
819
880
  }, [t]), B = ne(() => {
820
- h || y(!0), a == null || a();
821
- }, [h, a]);
881
+ y || v(!0), a == null || a();
882
+ }, [y, a]);
822
883
  O(() => {
823
884
  if (N) {
824
- C(!0);
825
- const $ = setTimeout(() => {
826
- m(!0);
885
+ h(!0);
886
+ const g = setTimeout(() => {
887
+ f(!0);
827
888
  }, 50);
828
- return () => clearTimeout($);
889
+ return () => clearTimeout(g);
829
890
  } else {
830
- m(!1);
831
- const $ = setTimeout(() => {
832
- C(!1);
891
+ f(!1);
892
+ const g = setTimeout(() => {
893
+ h(!1);
833
894
  }, 300);
834
- return () => clearTimeout($);
895
+ return () => clearTimeout(g);
835
896
  }
836
897
  }, [N]), O(() => {
837
- const $ = (M) => {
838
- M.key === "Escape" && w();
898
+ const g = (M) => {
899
+ M.key === "Escape" && b();
839
900
  };
840
- return N ? (document.addEventListener("keydown", $), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", $), document.body.style.overflow = "unset"), () => {
841
- document.removeEventListener("keydown", $), document.body.style.overflow = "unset";
901
+ return N ? (document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "unset"), () => {
902
+ document.removeEventListener("keydown", g), document.body.style.overflow = "unset";
842
903
  };
843
- }, [N, w]);
844
- const g = ($) => {
845
- u && $.target === $.currentTarget && w();
846
- }, b = L.Children.toArray(l);
847
- let k, E, x, j, S;
848
- b.forEach(($) => {
849
- if (Z($))
850
- if ($.type.displayName === "Offcanvas.Trigger")
851
- k = $;
852
- else if ($.type.displayName === "Offcanvas.Header")
853
- E = $;
854
- else if ($.type.displayName === "Offcanvas.Content") {
855
- x = $;
856
- const V = L.Children.toArray(x.props.children).filter((F) => Z(F) && F.type.displayName === "Offcanvas.Close" ? (S = F, !1) : !0);
904
+ }, [N, b]);
905
+ const $ = (g) => {
906
+ u && g.target === g.currentTarget && b();
907
+ }, _ = L.Children.toArray(l);
908
+ let k, E, x, j, I;
909
+ _.forEach((g) => {
910
+ if (Z(g))
911
+ if (g.type.displayName === "Offcanvas.Trigger")
912
+ k = g;
913
+ else if (g.type.displayName === "Offcanvas.Header")
914
+ E = g;
915
+ else if (g.type.displayName === "Offcanvas.Content") {
916
+ x = g;
917
+ const V = L.Children.toArray(x.props.children).filter((F) => Z(F) && F.type.displayName === "Offcanvas.Close" ? (I = F, !1) : !0);
857
918
  x = W(x, { children: V });
858
- } else $.type.displayName === "Offcanvas.Footer" && (j = $);
859
- }), S && (j ? j = W(j, {
860
- children: /* @__PURE__ */ _(Ze, { children: [
919
+ } else g.type.displayName === "Offcanvas.Footer" && (j = g);
920
+ }), I && (j ? j = W(j, {
921
+ children: /* @__PURE__ */ w(Ze, { children: [
861
922
  j.props.children,
862
- S
923
+ I
863
924
  ] })
864
- }) : j = /* @__PURE__ */ s(ce, { children: S }));
865
- const P = [
925
+ }) : j = /* @__PURE__ */ s(ce, { children: I }));
926
+ const A = [
866
927
  "clarity-offcanvas",
867
928
  n,
868
929
  `clarity-offcanvas--${o}`,
869
930
  r && `clarity-offcanvas--${r}`,
870
- f ? "clarity-offcanvas--open" : "clarity-offcanvas--closed"
871
- ].filter(Boolean).join(" "), I = [
931
+ p ? "clarity-offcanvas--open" : "clarity-offcanvas--closed"
932
+ ].filter(Boolean).join(" "), S = [
872
933
  "clarity-offcanvas-overlay",
873
- f ? "clarity-offcanvas-overlay--visible" : ""
934
+ p ? "clarity-offcanvas-overlay--visible" : ""
874
935
  ].filter(Boolean).join(" ");
875
- return /* @__PURE__ */ _(_e.Provider, { value: { onClose: w, variant: r, showCloseButton: i, placement: o, title: c }, children: [
936
+ return /* @__PURE__ */ w(_e.Provider, { value: { onClose: b, variant: r, showCloseButton: i, placement: o, title: c }, children: [
876
937
  k && W(k, { onClick: B, variant: r }),
877
938
  d && // Only render if shouldRender is true
878
- /* @__PURE__ */ s("div", { className: I, onClick: g, children: /* @__PURE__ */ _("div", { className: P, children: [
939
+ /* @__PURE__ */ s("div", { className: S, onClick: $, children: /* @__PURE__ */ w("div", { className: A, children: [
879
940
  E,
880
941
  x,
881
942
  j && /* @__PURE__ */ s("div", { className: "clarity-offcanvas-scroll-indicator" }),
@@ -884,8 +945,8 @@ const K = ({
884
945
  ] }) })
885
946
  ] });
886
947
  };
887
- K.Header = ge;
888
- K.Content = $e;
948
+ K.Header = $e;
949
+ K.Content = ge;
889
950
  K.Footer = ce;
890
951
  K.Trigger = ke;
891
952
  K.Close = xe;
@@ -901,16 +962,16 @@ const it = L.forwardRef(({
901
962
  labelPosition: u = "right",
902
963
  className: i = "",
903
964
  disabled: c = !1,
904
- checked: p,
905
- id: y,
906
- ...f
907
- }, m) => {
908
- const d = y || `check-input-${Math.random().toString(36).substr(2, 9)}`, C = [
965
+ checked: m,
966
+ id: v,
967
+ ...p
968
+ }, f) => {
969
+ const d = v || `check-input-${Math.random().toString(36).substr(2, 9)}`, h = [
909
970
  "clarity-check-input-wrapper",
910
971
  `clarity-check-input-wrapper--${u}`,
911
972
  c && "clarity-check-input-wrapper--disabled",
912
973
  r && "clarity-check-input-wrapper--error"
913
- ].filter(Boolean).join(" "), h = [
974
+ ].filter(Boolean).join(" "), y = [
914
975
  "clarity-check-input",
915
976
  `clarity-check-input--${e}`,
916
977
  `clarity-check-input--${a}`,
@@ -923,21 +984,21 @@ const it = L.forwardRef(({
923
984
  `clarity-check-input__label--${a}`,
924
985
  c && "clarity-check-input__label--disabled"
925
986
  ].filter(Boolean).join(" ");
926
- return /* @__PURE__ */ _("div", { className: "clarity-check-input-container", children: [
927
- /* @__PURE__ */ _("label", { className: C, htmlFor: d, children: [
987
+ return /* @__PURE__ */ w("div", { className: "clarity-check-input-container", children: [
988
+ /* @__PURE__ */ w("label", { className: h, htmlFor: d, children: [
928
989
  /* @__PURE__ */ s(
929
990
  "input",
930
991
  {
931
- ref: m,
992
+ ref: f,
932
993
  id: d,
933
994
  type: e,
934
- className: h,
995
+ className: y,
935
996
  disabled: c,
936
- checked: p,
937
- ...f
997
+ checked: m,
998
+ ...p
938
999
  }
939
1000
  ),
940
- /* @__PURE__ */ _("div", { className: "clarity-check-input__custom", children: [
1001
+ /* @__PURE__ */ w("div", { className: "clarity-check-input__custom", children: [
941
1002
  e === "checkbox" && /* @__PURE__ */ s(
942
1003
  "svg",
943
1004
  {
@@ -976,42 +1037,42 @@ const ot = L.forwardRef(({
976
1037
  className: u = "",
977
1038
  disabled: i = !1,
978
1039
  checked: c,
979
- id: p,
980
- ...y
981
- }, f) => {
982
- const m = p || `input-switch-${Math.random().toString(36).substr(2, 9)}`, d = [
1040
+ id: m,
1041
+ ...v
1042
+ }, p) => {
1043
+ const f = m || `input-switch-${Math.random().toString(36).substr(2, 9)}`, d = [
983
1044
  "clarity-input-switch-wrapper",
984
1045
  `clarity-input-switch-wrapper--${o}`,
985
1046
  i && "clarity-input-switch-wrapper--disabled",
986
1047
  n && "clarity-input-switch-wrapper--error"
987
- ].filter(Boolean).join(" "), C = [
1048
+ ].filter(Boolean).join(" "), h = [
988
1049
  "clarity-input-switch",
989
1050
  `clarity-input-switch--${t}`,
990
1051
  e && `clarity-input-switch--${e}`,
991
1052
  n && "clarity-input-switch--error",
992
1053
  i && "clarity-input-switch--disabled",
993
1054
  u
994
- ].filter(Boolean).join(" "), h = [
1055
+ ].filter(Boolean).join(" "), y = [
995
1056
  "clarity-input-switch__label",
996
1057
  `clarity-input-switch__label--${t}`,
997
1058
  i && "clarity-input-switch__label--disabled"
998
1059
  ].filter(Boolean).join(" ");
999
- return /* @__PURE__ */ _("div", { className: "clarity-input-switch-container", children: [
1000
- /* @__PURE__ */ _("label", { className: d, htmlFor: m, children: [
1060
+ return /* @__PURE__ */ w("div", { className: "clarity-input-switch-container", children: [
1061
+ /* @__PURE__ */ w("label", { className: d, htmlFor: f, children: [
1001
1062
  /* @__PURE__ */ s(
1002
1063
  "input",
1003
1064
  {
1004
- ref: f,
1005
- id: m,
1065
+ ref: p,
1066
+ id: f,
1006
1067
  type: "checkbox",
1007
- className: C,
1068
+ className: h,
1008
1069
  disabled: i,
1009
1070
  checked: c,
1010
- ...y
1071
+ ...v
1011
1072
  }
1012
1073
  ),
1013
1074
  /* @__PURE__ */ s("div", { className: "clarity-input-switch__track", children: /* @__PURE__ */ s("div", { className: "clarity-input-switch__thumb" }) }),
1014
- a && /* @__PURE__ */ s("span", { className: h, children: a })
1075
+ a && /* @__PURE__ */ s("span", { className: y, children: a })
1015
1076
  ] }),
1016
1077
  (l || n && r) && /* @__PURE__ */ s("div", { className: "clarity-input-switch__helper-text", children: n && r ? r : l })
1017
1078
  ] });
@@ -1038,7 +1099,7 @@ const Ee = ({ children: e }) => W(e, {
1038
1099
  }
1039
1100
  });
1040
1101
  Ee.displayName = "ConfirmationDialog.Trigger";
1041
- const Ie = ({ children: e }) => {
1102
+ const Se = ({ children: e }) => {
1042
1103
  const { onClose: t } = de();
1043
1104
  return W(e, {
1044
1105
  onClick: (a) => {
@@ -1047,7 +1108,7 @@ const Ie = ({ children: e }) => {
1047
1108
  }
1048
1109
  });
1049
1110
  };
1050
- Ie.displayName = "ConfirmationDialog.Close";
1111
+ Se.displayName = "ConfirmationDialog.Close";
1051
1112
  const Oe = ({ children: e }) => {
1052
1113
  const { onConfirm: t } = de();
1053
1114
  return W(e, {
@@ -1067,37 +1128,37 @@ const Q = ({
1067
1128
  }) => {
1068
1129
  const [r, o] = T(!1), u = e !== void 0, i = u ? e : r, c = () => {
1069
1130
  u || o(!0);
1070
- }, p = () => {
1131
+ }, m = () => {
1071
1132
  t ? t() : o(!1);
1072
- }, y = () => {
1073
- a && a(), p();
1133
+ }, v = () => {
1134
+ a && a(), m();
1074
1135
  };
1075
1136
  O(() => {
1076
- const C = (h) => {
1077
- h.key === "Escape" && p();
1137
+ const h = (y) => {
1138
+ y.key === "Escape" && m();
1078
1139
  };
1079
- return i ? (document.addEventListener("keydown", C), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
1080
- document.removeEventListener("keydown", C), document.body.style.overflow = "unset";
1140
+ return i ? (document.addEventListener("keydown", h), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
1141
+ document.removeEventListener("keydown", h), document.body.style.overflow = "unset";
1081
1142
  };
1082
- }, [i, p]);
1083
- const f = L.Children.toArray(n).find(
1084
- (C) => Z(C) && C.type.displayName === "ConfirmationDialog.Trigger"
1085
- ), m = L.Children.toArray(n).filter(
1086
- (C) => Z(C) && C.type.displayName !== "ConfirmationDialog.Trigger"
1143
+ }, [i, m]);
1144
+ const p = L.Children.toArray(n).find(
1145
+ (h) => Z(h) && h.type.displayName === "ConfirmationDialog.Trigger"
1146
+ ), f = L.Children.toArray(n).filter(
1147
+ (h) => Z(h) && h.type.displayName !== "ConfirmationDialog.Trigger"
1087
1148
  ), d = `clarity-confirmation-dialog clarity-confirmation-dialog--${l}`;
1088
- return /* @__PURE__ */ _(Te.Provider, { value: { variant: l, onClose: p, onConfirm: y, onOpen: c }, children: [
1089
- f,
1090
- i && /* @__PURE__ */ s("div", { className: "clarity-modal-overlay", children: /* @__PURE__ */ s("div", { className: d, children: m }) })
1149
+ return /* @__PURE__ */ w(Te.Provider, { value: { variant: l, onClose: m, onConfirm: v, onOpen: c }, children: [
1150
+ p,
1151
+ i && /* @__PURE__ */ s("div", { className: "clarity-modal-overlay", children: /* @__PURE__ */ s("div", { className: d, children: f }) })
1091
1152
  ] });
1092
1153
  };
1093
1154
  Q.Header = Be;
1094
1155
  Q.Content = je;
1095
1156
  Q.Footer = Le;
1096
1157
  Q.Trigger = Ee;
1097
- Q.Close = Ie;
1158
+ Q.Close = Se;
1098
1159
  Q.Confirm = Oe;
1099
1160
  Q.displayName = "ConfirmationDialog";
1100
- const xt = ({
1161
+ const Tt = ({
1101
1162
  variant: e = "primary",
1102
1163
  product: t,
1103
1164
  tone: a,
@@ -1108,26 +1169,26 @@ const xt = ({
1108
1169
  children: u,
1109
1170
  onClick: i,
1110
1171
  type: c = "button",
1111
- className: p = "",
1112
- "aria-label": y,
1113
- title: f,
1114
- ...m
1172
+ className: m = "",
1173
+ "aria-label": v,
1174
+ title: p,
1175
+ ...f
1115
1176
  }) => {
1116
- const d = "clarity-button-icon", C = t && a, h = C ? `${d}--custom` : `${d}--${e}`, N = [
1177
+ const d = "clarity-button-icon", h = t && a, y = h ? `${d}--custom` : `${d}--${e}`, N = [
1117
1178
  d,
1118
- h,
1179
+ y,
1119
1180
  `${d}--${n}`,
1120
1181
  o && `${d}--loading`,
1121
1182
  r && `${d}--disabled`,
1122
- p
1123
- ].filter(Boolean).join(" "), w = (g) => {
1124
- const b = parseInt(g);
1125
- return b >= 800 ? "900" : b >= 700 ? "800" : b >= 600 ? "700" : b >= 500 ? "600" : b >= 400 ? "500" : b >= 300 ? "400" : b >= 200 ? "300" : "200";
1126
- }, B = C ? {
1183
+ m
1184
+ ].filter(Boolean).join(" "), b = ($) => {
1185
+ const _ = parseInt($);
1186
+ return _ >= 800 ? "900" : _ >= 700 ? "800" : _ >= 600 ? "700" : _ >= 500 ? "600" : _ >= 400 ? "500" : _ >= 300 ? "400" : _ >= 200 ? "300" : "200";
1187
+ }, B = h ? {
1127
1188
  "--custom-bg-color": `var(--clarity-${t}-${a})`,
1128
- "--custom-hover-color": `var(--clarity-${t}-${l || w(a)})`
1189
+ "--custom-hover-color": `var(--clarity-${t}-${l || b(a)})`
1129
1190
  } : {};
1130
- return /* @__PURE__ */ _(
1191
+ return /* @__PURE__ */ w(
1131
1192
  "button",
1132
1193
  {
1133
1194
  className: N,
@@ -1135,16 +1196,16 @@ const xt = ({
1135
1196
  disabled: r || o,
1136
1197
  onClick: i,
1137
1198
  type: c,
1138
- "aria-label": y,
1139
- title: f,
1140
- ...m,
1199
+ "aria-label": v,
1200
+ title: p,
1201
+ ...f,
1141
1202
  children: [
1142
1203
  o && /* @__PURE__ */ s("div", { className: `${d}__spinner` }),
1143
1204
  !o && u
1144
1205
  ]
1145
1206
  }
1146
1207
  );
1147
- }, Tt = ({
1208
+ }, Bt = ({
1148
1209
  variant: e = "primary",
1149
1210
  product: t,
1150
1211
  tone: a,
@@ -1155,20 +1216,20 @@ const xt = ({
1155
1216
  onClick: u,
1156
1217
  href: i,
1157
1218
  target: c,
1158
- rel: p,
1159
- className: y = "",
1160
- ...f
1219
+ rel: m,
1220
+ className: v = "",
1221
+ ...p
1161
1222
  }) => {
1162
- const m = "clarity-button-link", d = t && a, C = d ? `${m}--custom` : `${m}--${e}`, h = [
1163
- m,
1164
- C,
1165
- `${m}--${n}`,
1166
- r && `${m}--disabled`,
1167
- y
1223
+ const f = "clarity-button-link", d = t && a, h = d ? `${f}--custom` : `${f}--${e}`, y = [
1224
+ f,
1225
+ h,
1226
+ `${f}--${n}`,
1227
+ r && `${f}--disabled`,
1228
+ v
1168
1229
  ].filter(Boolean).join(" "), N = (B) => {
1169
- const g = parseInt(B);
1170
- return g >= 800 ? "900" : g >= 700 ? "800" : g >= 600 ? "700" : g >= 500 ? "600" : g >= 400 ? "500" : g >= 300 ? "400" : g >= 200 ? "300" : "200";
1171
- }, w = d ? {
1230
+ const $ = parseInt(B);
1231
+ return $ >= 800 ? "900" : $ >= 700 ? "800" : $ >= 600 ? "700" : $ >= 500 ? "600" : $ >= 400 ? "500" : $ >= 300 ? "400" : $ >= 200 ? "300" : "200";
1232
+ }, b = d ? {
1172
1233
  "--custom-color": `var(--clarity-${t}-${a})`,
1173
1234
  "--custom-hover-color": `var(--clarity-${t}-${l || N(a)})`
1174
1235
  } : {};
@@ -1177,26 +1238,26 @@ const xt = ({
1177
1238
  {
1178
1239
  href: i,
1179
1240
  target: c,
1180
- rel: p || (c === "_blank" ? "noopener noreferrer" : void 0),
1181
- className: h,
1182
- style: w,
1241
+ rel: m || (c === "_blank" ? "noopener noreferrer" : void 0),
1242
+ className: y,
1243
+ style: b,
1183
1244
  onClick: r ? void 0 : u,
1184
- ...f,
1245
+ ...p,
1185
1246
  children: o
1186
1247
  }
1187
1248
  ) : /* @__PURE__ */ s(
1188
1249
  "button",
1189
1250
  {
1190
- className: h,
1191
- style: w,
1251
+ className: y,
1252
+ style: b,
1192
1253
  disabled: r,
1193
1254
  onClick: u,
1194
- ...f,
1255
+ ...p,
1195
1256
  children: o
1196
1257
  }
1197
1258
  );
1198
- }, Se = z(void 0), De = () => {
1199
- const e = q(Se);
1259
+ }, Ie = z(void 0), De = () => {
1260
+ const e = q(Ie);
1200
1261
  if (!e)
1201
1262
  throw new Error("Accordion components must be used within an Accordion");
1202
1263
  return e;
@@ -1211,26 +1272,26 @@ const xt = ({
1211
1272
  className: u = "",
1212
1273
  children: i,
1213
1274
  onSelect: c,
1214
- ...p
1275
+ ...m
1215
1276
  }) => {
1216
- const [y, f] = T(() => n ? Array.isArray(n) ? n : [n] : []), m = (b) => {
1277
+ const [v, p] = T(() => n ? Array.isArray(n) ? n : [n] : []), f = (_) => {
1217
1278
  let k;
1218
- r ? k = y.includes(b) ? y.filter((E) => E !== b) : [...y, b] : k = y.includes(b) ? [] : [b], f(k), c && c(y.includes(b) ? null : b, {});
1219
- }, d = "clarity-accordion", C = t && a, h = C ? `${d}--custom` : `${d}--${e}`, N = [
1279
+ r ? k = v.includes(_) ? v.filter((E) => E !== _) : [...v, _] : k = v.includes(_) ? [] : [_], p(k), c && c(v.includes(_) ? null : _, {});
1280
+ }, d = "clarity-accordion", h = t && a, y = h ? `${d}--custom` : `${d}--${e}`, N = [
1220
1281
  d,
1221
- h,
1282
+ y,
1222
1283
  o && `${d}--flush`,
1223
1284
  u
1224
- ].filter(Boolean).join(" "), w = (b) => {
1225
- const k = parseInt(b);
1285
+ ].filter(Boolean).join(" "), b = (_) => {
1286
+ const k = parseInt(_);
1226
1287
  return k >= 800 ? "900" : k >= 700 ? "800" : k >= 600 ? "700" : k >= 500 ? "600" : k >= 400 ? "500" : k >= 300 ? "400" : k >= 200 ? "300" : "200";
1227
- }, B = C ? {
1288
+ }, B = h ? {
1228
1289
  "--custom-border-color": `var(--clarity-${t}-${a})`,
1229
1290
  "--custom-header-color": `var(--clarity-${t}-${a})`,
1230
- "--custom-hover-color": `var(--clarity-${t}-${l || w(a)})`
1231
- } : {}, g = {
1232
- activeKeys: y,
1233
- toggleItem: m,
1291
+ "--custom-hover-color": `var(--clarity-${t}-${l || b(a)})`
1292
+ } : {}, $ = {
1293
+ activeKeys: v,
1294
+ toggleItem: f,
1234
1295
  alwaysOpen: r,
1235
1296
  variant: e,
1236
1297
  product: t,
@@ -1238,7 +1299,7 @@ const xt = ({
1238
1299
  hoverTone: l,
1239
1300
  flush: o
1240
1301
  };
1241
- return /* @__PURE__ */ s(Se.Provider, { value: g, children: /* @__PURE__ */ s("div", { className: N, style: B, ...p, children: i }) });
1302
+ return /* @__PURE__ */ s(Ie.Provider, { value: $, children: /* @__PURE__ */ s("div", { className: N, style: B, ...m, children: i }) });
1242
1303
  }, dt = ({
1243
1304
  eventKey: e,
1244
1305
  disabled: t = !1,
@@ -1267,10 +1328,10 @@ const xt = ({
1267
1328
  isActive: r = !1,
1268
1329
  ...o
1269
1330
  }) => {
1270
- const { toggleItem: u } = De(), i = "clarity-accordion", c = (p) => {
1271
- !n && l && u(l), a == null || a(p);
1331
+ const { toggleItem: u } = De(), i = "clarity-accordion", c = (m) => {
1332
+ !n && l && u(l), a == null || a(m);
1272
1333
  };
1273
- return /* @__PURE__ */ _(
1334
+ return /* @__PURE__ */ w(
1274
1335
  "button",
1275
1336
  {
1276
1337
  className: [`${i}__header`, e].filter(Boolean).join(" "),
@@ -1314,19 +1375,19 @@ const xt = ({
1314
1375
  children: /* @__PURE__ */ s("div", { className: [`${r}__body`, e].filter(Boolean).join(" "), ...n, children: t })
1315
1376
  }
1316
1377
  );
1317
- }, Bt = Object.assign(ct, {
1378
+ }, jt = Object.assign(ct, {
1318
1379
  Item: dt,
1319
1380
  Header: mt,
1320
1381
  Body: ut
1321
1382
  }), Re = z(
1322
1383
  void 0
1323
- ), Pe = () => {
1384
+ ), Ae = () => {
1324
1385
  const e = q(Re);
1325
1386
  if (!e)
1326
1387
  throw new Error("useDropdown must be used within a DropdownProvider");
1327
1388
  return e;
1328
1389
  }, ft = ({ children: e }) => {
1329
- const { setIsOpen: t, triggerRef: a } = Pe();
1390
+ const { setIsOpen: t, triggerRef: a } = Ae();
1330
1391
  return /* @__PURE__ */ s(
1331
1392
  "button",
1332
1393
  {
@@ -1339,41 +1400,41 @@ const xt = ({
1339
1400
  }
1340
1401
  );
1341
1402
  }, pt = ({ children: e }) => {
1342
- const { isOpen: t, contentRef: a, styles: l } = Pe();
1403
+ const { isOpen: t, contentRef: a, styles: l } = Ae();
1343
1404
  return t ? /* @__PURE__ */ s("div", { ref: a, className: "dropdown__content", style: l, children: e }) : null;
1344
- }, ht = ({ children: e }) => /* @__PURE__ */ s("div", { className: "dropdown__menu", children: e }), yt = ({ href: e, children: t }) => /* @__PURE__ */ s("a", { href: e, className: "dropdown__item", children: t }), vt = () => /* @__PURE__ */ s("hr", { className: "dropdown__separator" }), ae = ({ title: e, position: t = "bottom", children: a }) => {
1345
- const [l, n] = T(!1), [r, o] = T({}), u = A(null), i = A(null), c = A(null);
1405
+ }, ht = ({ children: e }) => /* @__PURE__ */ s("div", { className: "dropdown__menu", children: e }), yt = ({ as: e, children: t, ...a }) => /* @__PURE__ */ s(e || "a", { ...a, className: "dropdown__item", children: t }), vt = () => /* @__PURE__ */ s("hr", { className: "dropdown__separator" }), ae = ({ title: e, position: t = "bottom", children: a }) => {
1406
+ const [l, n] = T(!1), [r, o] = T({}), u = P(null), i = P(null), c = P(null);
1346
1407
  return et(() => {
1347
1408
  if (l) {
1348
- const p = i.current, y = c.current;
1349
- if (!p || !y) return;
1350
- const f = p.getBoundingClientRect(), m = y.getBoundingClientRect(), d = window.innerHeight, C = window.innerWidth;
1351
- let h = t;
1352
- t === "bottom" && f.bottom + m.height > d && (h = "top"), t === "top" && f.top - m.height < 0 && (h = "bottom"), t === "right" && f.right + m.width > C && (h = "left"), t === "left" && f.left - m.width < 0 && (h = "right");
1409
+ const m = i.current, v = c.current;
1410
+ if (!m || !v) return;
1411
+ const p = m.getBoundingClientRect(), f = v.getBoundingClientRect(), d = window.innerHeight, h = window.innerWidth;
1412
+ let y = t;
1413
+ t === "bottom" && p.bottom + f.height > d && (y = "top"), t === "top" && p.top - f.height < 0 && (y = "bottom"), t === "right" && p.right + f.width > h && (y = "left"), t === "left" && p.left - f.width < 0 && (y = "right");
1353
1414
  const N = {};
1354
- switch (h) {
1415
+ switch (y) {
1355
1416
  case "top":
1356
- N.bottom = f.height + 4, N.left = f.width / 2 - m.width / 2;
1417
+ N.bottom = p.height + 4, N.left = p.width / 2 - f.width / 2;
1357
1418
  break;
1358
1419
  case "right":
1359
- N.left = f.width + 4, N.top = f.height / 2 - m.height / 2;
1420
+ N.left = p.width + 4, N.top = p.height / 2 - f.height / 2;
1360
1421
  break;
1361
1422
  case "left":
1362
- N.right = f.width + 4, N.top = f.height / 2 - m.height / 2;
1423
+ N.right = p.width + 4, N.top = p.height / 2 - f.height / 2;
1363
1424
  break;
1364
1425
  case "bottom":
1365
1426
  default:
1366
- N.top = f.height + 4, N.left = f.width / 2 - m.width / 2;
1427
+ N.top = p.height + 4, N.left = p.width / 2 - f.width / 2;
1367
1428
  break;
1368
1429
  }
1369
1430
  o(N);
1370
1431
  }
1371
1432
  }, [l, t]), O(() => {
1372
- const p = (y) => {
1373
- u.current && !u.current.contains(y.target) && n(!1);
1433
+ const m = (v) => {
1434
+ u.current && !u.current.contains(v.target) && n(!1);
1374
1435
  };
1375
- return document.addEventListener("mousedown", p), () => {
1376
- document.removeEventListener("mousedown", p);
1436
+ return document.addEventListener("mousedown", m), () => {
1437
+ document.removeEventListener("mousedown", m);
1377
1438
  };
1378
1439
  }, []), /* @__PURE__ */ s(Re.Provider, { value: { isOpen: l, setIsOpen: n, triggerRef: i, contentRef: c, styles: r }, children: /* @__PURE__ */ s(
1379
1440
  "div",
@@ -1390,8 +1451,8 @@ ae.Content = pt;
1390
1451
  ae.Menu = ht;
1391
1452
  ae.Item = yt;
1392
1453
  ae.Separator = vt;
1393
- const Ae = z(null), Ve = () => {
1394
- const e = q(Ae);
1454
+ const Pe = z(null), Ve = () => {
1455
+ const e = q(Pe);
1395
1456
  if (!e)
1396
1457
  throw new Error("useTabs must be used within a Tabs provider");
1397
1458
  return e;
@@ -1440,12 +1501,12 @@ const me = ({
1440
1501
  n,
1441
1502
  `orientation-${l}`
1442
1503
  ].filter(Boolean).join(" ");
1443
- return /* @__PURE__ */ s(Ae.Provider, { value: u, children: /* @__PURE__ */ s("div", { className: i, children: e }) });
1504
+ return /* @__PURE__ */ s(Pe.Provider, { value: u, children: /* @__PURE__ */ s("div", { className: i, children: e }) });
1444
1505
  };
1445
1506
  me.Tab = He;
1446
1507
  me.Content = Me;
1447
1508
  me.displayName = "Tabs";
1448
- const jt = ({
1509
+ const Lt = ({
1449
1510
  content: e,
1450
1511
  position: t = "top",
1451
1512
  variant: a = "primary",
@@ -1456,43 +1517,43 @@ const jt = ({
1456
1517
  children: u,
1457
1518
  className: i = "",
1458
1519
  disabled: c = !1,
1459
- delay: p = 200,
1460
- hideDelay: y = 100,
1461
- trigger: f = "hover",
1462
- arrow: m = !0,
1520
+ delay: m = 200,
1521
+ hideDelay: v = 100,
1522
+ trigger: p = "hover",
1523
+ arrow: f = !0,
1463
1524
  ...d
1464
1525
  }) => {
1465
- const [C, h] = T(!1), [N, w] = T(null), B = A(null), g = A(null), b = "clarity-tooltip", k = !!r, E = l && n && !k;
1526
+ const [h, y] = T(!1), [N, b] = T(null), B = P(null), $ = P(null), _ = "clarity-tooltip", k = !!r, E = l && n && !k;
1466
1527
  let x = "";
1467
- k ? x = `${b}__content--custom-bg` : E ? x = `${b}__content--custom` : x = `${b}__content--${a}`;
1528
+ k ? x = `${_}__content--custom-bg` : E ? x = `${_}__content--custom` : x = `${_}__content--${a}`;
1468
1529
  const j = [
1469
- b,
1470
- `${b}--${t}`,
1530
+ _,
1531
+ `${_}--${t}`,
1471
1532
  i
1472
- ].filter(Boolean).join(" "), S = [
1473
- `${b}__content`,
1533
+ ].filter(Boolean).join(" "), I = [
1534
+ `${_}__content`,
1474
1535
  x,
1475
- m && `${b}__content--arrow`
1476
- ].filter(Boolean).join(" "), P = {}, I = {};
1477
- k && r && (I["--tooltip-bg-color"] = r), o && (I["--tooltip-text-color"] = o), E && l && n && (I["--tooltip-product"] = l, I["--tooltip-tone"] = n);
1478
- const $ = {
1479
- ...P,
1480
- ...Object.keys(I).length > 0 ? I : {}
1536
+ f && `${_}__content--arrow`
1537
+ ].filter(Boolean).join(" "), A = {}, S = {};
1538
+ k && r && (S["--tooltip-bg-color"] = r), o && (S["--tooltip-text-color"] = o), E && l && n && (S["--tooltip-product"] = l, S["--tooltip-tone"] = n);
1539
+ const g = {
1540
+ ...A,
1541
+ ...Object.keys(S).length > 0 ? S : {}
1481
1542
  }, M = () => {
1482
1543
  if (c) return;
1483
1544
  N && clearTimeout(N);
1484
1545
  const H = setTimeout(() => {
1485
- h(!0);
1486
- }, p);
1487
- w(H);
1546
+ y(!0);
1547
+ }, m);
1548
+ b(H);
1488
1549
  }, V = () => {
1489
1550
  N && clearTimeout(N);
1490
1551
  const H = setTimeout(() => {
1491
- h(!1);
1492
- }, y);
1493
- w(H);
1552
+ y(!1);
1553
+ }, v);
1554
+ b(H);
1494
1555
  }, F = () => {
1495
- c || h(!C);
1556
+ c || y(!h);
1496
1557
  }, X = () => {
1497
1558
  c || M();
1498
1559
  }, te = () => {
@@ -1502,24 +1563,24 @@ const jt = ({
1502
1563
  N && clearTimeout(N);
1503
1564
  }, [N]);
1504
1565
  const G = {};
1505
- return f === "hover" ? (G.onMouseEnter = M, G.onMouseLeave = V) : f === "click" ? G.onClick = F : f === "focus" && (G.onFocus = X, G.onBlur = te), /* @__PURE__ */ _(
1566
+ return p === "hover" ? (G.onMouseEnter = M, G.onMouseLeave = V) : p === "click" ? G.onClick = F : p === "focus" && (G.onFocus = X, G.onBlur = te), /* @__PURE__ */ w(
1506
1567
  "div",
1507
1568
  {
1508
- ref: g,
1509
- className: `${b}__trigger`,
1569
+ ref: $,
1570
+ className: `${_}__trigger`,
1510
1571
  ...G,
1511
1572
  ...d,
1512
1573
  children: [
1513
1574
  u,
1514
- C && /* @__PURE__ */ s(
1575
+ h && /* @__PURE__ */ s(
1515
1576
  "div",
1516
1577
  {
1517
1578
  ref: B,
1518
1579
  className: j,
1519
- style: $,
1580
+ style: g,
1520
1581
  role: "tooltip",
1521
- "aria-hidden": !C,
1522
- children: /* @__PURE__ */ s("div", { className: S, children: e })
1582
+ "aria-hidden": !h,
1583
+ children: /* @__PURE__ */ s("div", { className: I, children: e })
1523
1584
  }
1524
1585
  )
1525
1586
  ]
@@ -1538,11 +1599,11 @@ const jt = ({
1538
1599
  inputPlaceholder: n = "Search...",
1539
1600
  ...r
1540
1601
  }) => {
1541
- const [o, u] = T(""), [i, c] = T(null), [p, y] = T(!1), f = [
1602
+ const [o, u] = T(""), [i, c] = T(null), [m, v] = T(!1), p = [
1542
1603
  "clarity-command",
1543
1604
  `clarity-command--${a}`,
1544
1605
  t
1545
- ].filter(Boolean).join(" "), m = Y(() => ({
1606
+ ].filter(Boolean).join(" "), f = Y(() => ({
1546
1607
  searchTerm: o,
1547
1608
  setSearchTerm: u,
1548
1609
  value: i,
@@ -1552,10 +1613,10 @@ const jt = ({
1552
1613
  empty: l,
1553
1614
  inputPlaceholder: n
1554
1615
  },
1555
- isOpen: p,
1556
- setIsOpen: y
1557
- }), [o, i, a, l, n, p]);
1558
- return /* @__PURE__ */ s(We.Provider, { value: m, children: /* @__PURE__ */ s("div", { className: f, ...r, children: e }) });
1616
+ isOpen: m,
1617
+ setIsOpen: v
1618
+ }), [o, i, a, l, n, m]);
1619
+ return /* @__PURE__ */ s(We.Provider, { value: f, children: /* @__PURE__ */ s("div", { className: p, ...r, children: e }) });
1559
1620
  };
1560
1621
  Fe.displayName = "Command";
1561
1622
  const Ge = ({ placeholder: e = "Search...", variant: t, onClick: a }) => {
@@ -1567,11 +1628,11 @@ const Ge = ({ placeholder: e = "Search...", variant: t, onClick: a }) => {
1567
1628
  "clarity-command-button",
1568
1629
  `clarity-command-button--${t || n}`
1569
1630
  ].filter(Boolean).join(" ");
1570
- return /* @__PURE__ */ _("button", { className: i, onClick: (p) => {
1571
- l(!0), a == null || a(p);
1631
+ return /* @__PURE__ */ w("button", { className: i, onClick: (m) => {
1632
+ l(!0), a == null || a(m);
1572
1633
  }, children: [
1573
1634
  /* @__PURE__ */ s("span", { children: e }),
1574
- /* @__PURE__ */ _("kbd", { className: "clarity-command-shortcut", children: [
1635
+ /* @__PURE__ */ w("kbd", { className: "clarity-command-shortcut", children: [
1575
1636
  r ? "⌘" : "Ctrl+",
1576
1637
  "K"
1577
1638
  ] })
@@ -1589,7 +1650,7 @@ const Ue = ({ children: e, ...t }) => {
1589
1650
  };
1590
1651
  Ue.displayName = "Command.Dialog";
1591
1652
  const ze = ({ className: e = "", ...t }) => {
1592
- const { searchTerm: a, setSearchTerm: l, variant: n, texts: r, isOpen: o } = ee(), u = A(null);
1653
+ const { searchTerm: a, setSearchTerm: l, variant: n, texts: r, isOpen: o } = ee(), u = P(null);
1593
1654
  O(() => {
1594
1655
  var c;
1595
1656
  o && ((c = u.current) == null || c.focus());
@@ -1616,20 +1677,20 @@ const qe = ({ children: e, className: t = "", ...a }) => {
1616
1677
  const { searchTerm: l } = ee();
1617
1678
  let n = !1;
1618
1679
  const r = (i) => L.Children.toArray(i).map((c) => {
1619
- var y;
1680
+ var v;
1620
1681
  if (!L.isValidElement(c)) return c;
1621
- const p = c.type.displayName;
1622
- if (p === "Command.Empty")
1682
+ const m = c.type.displayName;
1683
+ if (m === "Command.Empty")
1623
1684
  return null;
1624
- if (p === "Command.Item")
1625
- return (((y = c.props.children) == null ? void 0 : y.toString().toLowerCase()) || "").includes(l.toLowerCase()) ? (n = !0, c) : null;
1626
- if (p === "Command.Group") {
1627
- const f = r(c.props.children);
1628
- return L.Children.toArray(f).some((d) => L.isValidElement(d) && d.type.displayName === "Command.Item") ? L.cloneElement(c, { ...c.props, children: f }) : null;
1685
+ if (m === "Command.Item")
1686
+ return (((v = c.props.children) == null ? void 0 : v.toString().toLowerCase()) || "").includes(l.toLowerCase()) ? (n = !0, c) : null;
1687
+ if (m === "Command.Group") {
1688
+ const p = r(c.props.children);
1689
+ return L.Children.toArray(p).some((d) => L.isValidElement(d) && d.type.displayName === "Command.Item") ? L.cloneElement(c, { ...c.props, children: p }) : null;
1629
1690
  }
1630
1691
  return c;
1631
1692
  }).filter(Boolean), o = r(e), u = ["clarity-command-list", t].filter(Boolean).join(" ");
1632
- return /* @__PURE__ */ _("div", { className: u, ...a, children: [
1693
+ return /* @__PURE__ */ w("div", { className: u, ...a, children: [
1633
1694
  o,
1634
1695
  !n && /* @__PURE__ */ s(ue, {})
1635
1696
  ] });
@@ -1660,7 +1721,7 @@ const Ye = ({ children: e, className: t = "", ...a }) => {
1660
1721
  return /* @__PURE__ */ s("span", { className: l, ...a, children: e });
1661
1722
  };
1662
1723
  Ye.displayName = "Command.Shortcut";
1663
- const Lt = Object.assign(Fe, {
1724
+ const Et = Object.assign(Fe, {
1664
1725
  Button: Ge,
1665
1726
  Dialog: Ue,
1666
1727
  Input: ze,
@@ -1672,14 +1733,14 @@ const Lt = Object.assign(Fe, {
1672
1733
  Shortcut: Ye
1673
1734
  }), Ct = ({ columns: e, viewMode: t }) => {
1674
1735
  const a = Array.from({ length: 5 }, (l, n) => n);
1675
- return t === "card" ? /* @__PURE__ */ _("div", { className: "card-view-wrapper is-loading", children: [
1736
+ return t === "card" ? /* @__PURE__ */ w("div", { className: "card-view-wrapper is-loading", children: [
1676
1737
  /* @__PURE__ */ s("div", { className: "skeleton card-view-header" }),
1677
1738
  /* @__PURE__ */ s("div", { className: "card-view-body", children: a.map((l) => /* @__PURE__ */ s("div", { className: "skeleton card-view-row" }, l)) })
1678
- ] }) : /* @__PURE__ */ s("div", { className: "table-wrapper is-loading", children: /* @__PURE__ */ _("table", { children: [
1739
+ ] }) : /* @__PURE__ */ s("div", { className: "table-wrapper is-loading", children: /* @__PURE__ */ w("table", { children: [
1679
1740
  /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", { className: "table-row", children: e.map((l) => /* @__PURE__ */ s("th", { className: "table-header-cell", children: /* @__PURE__ */ s("div", { className: "skeleton skeleton-text" }) }, l.key)) }) }),
1680
1741
  /* @__PURE__ */ s("tbody", { children: a.map((l) => /* @__PURE__ */ s("tr", { className: "table-row", children: e.map((n) => /* @__PURE__ */ s("td", { className: "table-cell", children: /* @__PURE__ */ s("div", { className: "skeleton skeleton-text" }) }, n.key)) }, l)) })
1681
1742
  ] }) });
1682
- }, Et = ({
1743
+ }, St = ({
1683
1744
  variant: e = "secondary",
1684
1745
  columns: t,
1685
1746
  data: a,
@@ -1687,47 +1748,47 @@ const Lt = Object.assign(Fe, {
1687
1748
  isScrollable: n = !1,
1688
1749
  isLoading: r = !1
1689
1750
  }) => {
1690
- const [o, u] = T(null), [i, c] = T("none"), p = (d) => {
1691
- d.sortable && (o === d.key ? c((C) => C === "asc" ? "desc" : C === "desc" ? "none" : "asc") : (u(d.key), c("asc")));
1692
- }, y = Y(() => i === "none" || !o ? a : [...a].sort((d, C) => {
1693
- const h = d[o], N = C[o];
1694
- return h < N ? i === "asc" ? -1 : 1 : h > N ? i === "asc" ? 1 : -1 : 0;
1695
- }), [a, o, i]), f = (d) => d.sortable ? o !== d.key || i === "none" ? /* @__PURE__ */ s("span", { className: "sort-icon", children: "↕" }) : i === "asc" ? /* @__PURE__ */ s("span", { className: "sort-icon", children: "↑" }) : /* @__PURE__ */ s("span", { className: "sort-icon", children: "↓" }) : null;
1751
+ const [o, u] = T(null), [i, c] = T("none"), m = (d) => {
1752
+ d.sortable && (o === d.key ? c((h) => h === "asc" ? "desc" : h === "desc" ? "none" : "asc") : (u(d.key), c("asc")));
1753
+ }, v = Y(() => i === "none" || !o ? a : [...a].sort((d, h) => {
1754
+ const y = d[o], N = h[o];
1755
+ return y < N ? i === "asc" ? -1 : 1 : y > N ? i === "asc" ? 1 : -1 : 0;
1756
+ }), [a, o, i]), p = (d) => d.sortable ? o !== d.key || i === "none" ? /* @__PURE__ */ s("span", { className: "sort-icon", children: "↕" }) : i === "asc" ? /* @__PURE__ */ s("span", { className: "sort-icon", children: "↑" }) : /* @__PURE__ */ s("span", { className: "sort-icon", children: "↓" }) : null;
1696
1757
  if (r)
1697
1758
  return /* @__PURE__ */ s(Ct, { columns: t, viewMode: l });
1698
- const m = `table-variant-${e} ${n ? "is-scrollable" : ""}`;
1699
- return l === "card" ? /* @__PURE__ */ _("div", { className: `card-view-wrapper ${m}`, children: [
1700
- /* @__PURE__ */ s("div", { className: `card-view-header table-header-cell-${e}`, children: t.map((d) => /* @__PURE__ */ _(
1759
+ const f = `table-variant-${e} ${n ? "is-scrollable" : ""}`;
1760
+ return l === "card" ? /* @__PURE__ */ w("div", { className: `card-view-wrapper ${f}`, children: [
1761
+ /* @__PURE__ */ s("div", { className: `card-view-header table-header-cell-${e}`, children: t.map((d) => /* @__PURE__ */ w(
1701
1762
  "div",
1702
1763
  {
1703
1764
  className: `card-view-header-cell ${d.sortable ? "sortable" : ""}`,
1704
- onClick: () => p(d),
1765
+ onClick: () => m(d),
1705
1766
  style: { minWidth: d.minWidth },
1706
1767
  children: [
1707
1768
  d.header,
1708
- f(d)
1769
+ p(d)
1709
1770
  ]
1710
1771
  },
1711
1772
  d.key
1712
1773
  )) }),
1713
- /* @__PURE__ */ s("div", { className: "card-view-body", children: y.map((d, C) => /* @__PURE__ */ s("div", { className: `card-view-row table-row-${e}`, children: t.map((h) => /* @__PURE__ */ s("div", { className: `card-view-cell ${h.align ? `table-cell-align-${h.align}` : ""}`, style: { minWidth: h.minWidth }, children: h.render ? h.render(d) : d[h.key] }, h.key)) }, C)) })
1714
- ] }) : /* @__PURE__ */ s("div", { className: `table-wrapper ${m}`, children: /* @__PURE__ */ _("table", { children: [
1715
- /* @__PURE__ */ s("thead", { className: "table-header", children: /* @__PURE__ */ s("tr", { className: "table-row", children: t.map((d) => /* @__PURE__ */ _(
1774
+ /* @__PURE__ */ s("div", { className: "card-view-body", children: v.map((d, h) => /* @__PURE__ */ s("div", { className: `card-view-row table-row-${e}`, children: t.map((y) => /* @__PURE__ */ s("div", { className: `card-view-cell ${y.align ? `table-cell-align-${y.align}` : ""}`, style: { minWidth: y.minWidth }, children: y.render ? y.render(d) : d[y.key] }, y.key)) }, h)) })
1775
+ ] }) : /* @__PURE__ */ s("div", { className: `table-wrapper ${f}`, children: /* @__PURE__ */ w("table", { children: [
1776
+ /* @__PURE__ */ s("thead", { className: "table-header", children: /* @__PURE__ */ s("tr", { className: "table-row", children: t.map((d) => /* @__PURE__ */ w(
1716
1777
  "th",
1717
1778
  {
1718
1779
  className: `table-header-cell ${d.sortable ? "sortable" : ""} table-header-cell-${e}`,
1719
- onClick: () => p(d),
1780
+ onClick: () => m(d),
1720
1781
  style: { minWidth: d.minWidth },
1721
1782
  children: [
1722
1783
  d.header,
1723
- f(d)
1784
+ p(d)
1724
1785
  ]
1725
1786
  },
1726
1787
  d.key
1727
1788
  )) }) }),
1728
- /* @__PURE__ */ s("tbody", { children: y.map((d, C) => /* @__PURE__ */ s("tr", { className: `table-row table-row-${e}`, children: t.map((h) => /* @__PURE__ */ s("td", { className: `table-cell ${h.align ? `table-cell-align-${h.align}` : ""}`, style: { minWidth: h.minWidth }, children: h.render ? h.render(d) : d[h.key] }, h.key)) }, C)) })
1789
+ /* @__PURE__ */ s("tbody", { children: v.map((d, h) => /* @__PURE__ */ s("tr", { className: `table-row table-row-${e}`, children: t.map((y) => /* @__PURE__ */ s("td", { className: `table-cell ${y.align ? `table-cell-align-${y.align}` : ""}`, style: { minWidth: y.minWidth }, children: y.render ? y.render(d) : d[y.key] }, y.key)) }, h)) })
1729
1790
  ] }) });
1730
- }, It = ({
1791
+ }, Ot = ({
1731
1792
  variant: e = "primary",
1732
1793
  product: t,
1733
1794
  tone: a,
@@ -1737,17 +1798,17 @@ const Lt = Object.assign(Fe, {
1737
1798
  "aria-label": o = "Carregando...",
1738
1799
  ...u
1739
1800
  }) => {
1740
- const i = "clarity-spinner", y = n ? `${i}--custom` : t && a ? `${i}--custom` : `${i}--${e}`, f = [
1801
+ const i = "clarity-spinner", v = n ? `${i}--custom` : t && a ? `${i}--custom` : `${i}--${e}`, p = [
1741
1802
  i,
1742
1803
  `${i}--${l}`,
1743
- y,
1804
+ v,
1744
1805
  r
1745
- ].filter(Boolean).join(" "), m = {};
1746
- return n ? m["--spinner-color"] = n : t && a && (m["--spinner-color"] = `var(--clarity-${t}-${a})`), /* @__PURE__ */ s(
1806
+ ].filter(Boolean).join(" "), f = {};
1807
+ return n ? f["--spinner-color"] = n : t && a && (f["--spinner-color"] = `var(--clarity-${t}-${a})`), /* @__PURE__ */ s(
1747
1808
  "div",
1748
1809
  {
1749
- className: f,
1750
- style: m,
1810
+ className: p,
1811
+ style: f,
1751
1812
  role: "status",
1752
1813
  "aria-label": o,
1753
1814
  ...u,
@@ -1772,7 +1833,7 @@ const Lt = Object.assign(Fe, {
1772
1833
  ) })
1773
1834
  }
1774
1835
  );
1775
- }, Ot = {
1836
+ }, It = {
1776
1837
  primary: {
1777
1838
  50: "#f0f9ff",
1778
1839
  100: "#e0f2fe",
@@ -1821,7 +1882,7 @@ const Lt = Object.assign(Fe, {
1821
1882
  800: "#065f46",
1822
1883
  900: "#064e3b"
1823
1884
  }
1824
- }, St = {
1885
+ }, Dt = {
1825
1886
  xs: "4px",
1826
1887
  sm: "8px",
1827
1888
  md: "16px",
@@ -1829,7 +1890,7 @@ const Lt = Object.assign(Fe, {
1829
1890
  xl: "32px",
1830
1891
  "2xl": "48px",
1831
1892
  "3xl": "64px"
1832
- }, Dt = {
1893
+ }, Rt = {
1833
1894
  fontFamily: {
1834
1895
  sans: ["Inter", "system-ui", "sans-serif"],
1835
1896
  mono: ["Fira Code", "monospace"]
@@ -1849,15 +1910,16 @@ const Lt = Object.assign(Fe, {
1849
1910
  semibold: 600,
1850
1911
  bold: 700
1851
1912
  }
1852
- }, Rt = (...e) => e.filter(Boolean).join(" "), Pt = () => Math.random().toString(36).substr(2, 9);
1913
+ }, At = (...e) => e.filter(Boolean).join(" "), Pt = () => Math.random().toString(36).substr(2, 9);
1853
1914
  export {
1854
- Bt as Accordion,
1915
+ jt as Accordion,
1855
1916
  wt as Badge,
1856
- gt as Button,
1857
- xt as ButtonIcon,
1858
- Tt as ButtonLink,
1917
+ $t as Button,
1918
+ gt as ButtonGroup,
1919
+ Tt as ButtonIcon,
1920
+ Bt as ButtonLink,
1859
1921
  it as CheckInput,
1860
- Lt as Command,
1922
+ Et as Command,
1861
1923
  Q as ConfirmationDialog,
1862
1924
  ae as Dropdown,
1863
1925
  st as Input,
@@ -1866,16 +1928,16 @@ export {
1866
1928
  nt as MultiSelect,
1867
1929
  K as Offcanvas,
1868
1930
  lt as Select,
1869
- It as Spinner,
1870
- Et as Table,
1931
+ Ot as Spinner,
1932
+ St as Table,
1871
1933
  me as Tabs,
1872
1934
  at as Textarea,
1873
- kt as ToastProvider,
1874
- jt as Tooltip,
1875
- Rt as cn,
1876
- Ot as colors,
1935
+ xt as ToastProvider,
1936
+ Lt as Tooltip,
1937
+ At as cn,
1938
+ It as colors,
1877
1939
  Pt as generateId,
1878
- St as spacing,
1879
- Dt as typography,
1880
- $t as useToast
1940
+ Dt as spacing,
1941
+ Rt as typography,
1942
+ kt as useToast
1881
1943
  };