beth-clarity 1.1.11 → 1.1.13

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