beth-clarity 1.2.4 → 1.2.5

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,7 +1,7 @@
1
- import { jsx as e, jsxs as w, Fragment as St } from "react/jsx-runtime";
2
- import W, { useState as z, useRef as at, useEffect as Q, useLayoutEffect as Et, forwardRef as we, isValidElement as ot, createContext as ct, cloneElement as rt, useContext as dt, useMemo as gt, useCallback as _t, Children as Ne } from "react";
3
- import Ce, { createPortal as $e } from "react-dom";
4
- const ta = ({
1
+ import { jsx as e, jsxs as v, Fragment as jt } from "react/jsx-runtime";
2
+ import I, { useState as A, useRef as et, useEffect as J, useLayoutEffect as St, forwardRef as _e, isValidElement as ot, createContext as ct, cloneElement as rt, useContext as dt, useMemo as gt, useCallback as _t, Children as we } from "react";
3
+ import Ne, { createPortal as Ce } from "react-dom";
4
+ const Pe = ({
5
5
  variant: t = "primary",
6
6
  size: a = "medium",
7
7
  bgColor: r,
@@ -12,27 +12,27 @@ const ta = ({
12
12
  outlined: c = !1,
13
13
  ...d
14
14
  }) => {
15
- const i = "clarity-badge", u = !!r;
16
- let y = "";
17
- u ? y = `${i}--custom-bg` : y = `${i}--${t}`;
18
- const p = [
15
+ const i = "clarity-badge", f = !!r;
16
+ let p = "";
17
+ f ? p = `${i}--custom-bg` : p = `${i}--${t}`;
18
+ const y = [
19
19
  i,
20
- y,
20
+ p,
21
21
  `${i}--${a}`,
22
22
  s ? `${i}--rounded` : "",
23
23
  c ? `${i}--outlined` : "",
24
24
  o
25
- ].filter(Boolean).join(" "), f = {};
26
- return u && (f.backgroundColor = r, l && (f.color = l)), /* @__PURE__ */ e(
25
+ ].filter(Boolean).join(" "), u = {};
26
+ return f && (u.backgroundColor = r, l && (u.color = l)), /* @__PURE__ */ e(
27
27
  "span",
28
28
  {
29
- className: p,
30
- style: f,
29
+ className: y,
30
+ style: u,
31
31
  ...d,
32
32
  children: n
33
33
  }
34
34
  );
35
- }, Bt = {
35
+ }, Tt = {
36
36
  fontFamily: {
37
37
  sans: ["Inter", "system-ui", "sans-serif"],
38
38
  mono: ["Fira Code", "monospace"]
@@ -59,7 +59,7 @@ const ta = ({
59
59
  wide: "0.025em",
60
60
  wider: "0.05em"
61
61
  }
62
- }, $t = (t) => {
62
+ }, Ct = (t) => {
63
63
  if (t) {
64
64
  if (t.startsWith("#") || t.startsWith("rgb") || t.startsWith("hsl") || t === "transparent")
65
65
  return t;
@@ -69,7 +69,7 @@ const ta = ({
69
69
  }
70
70
  return `var(--clarity-${t})`;
71
71
  }
72
- }, nt = (t) => t !== void 0 ? `var(--clarity-spacing-${t})` : void 0, xe = W.forwardRef(
72
+ }, nt = (t) => t !== void 0 ? `var(--clarity-spacing-${t})` : void 0, $e = I.forwardRef(
73
73
  (t, a) => {
74
74
  const {
75
75
  children: r,
@@ -80,81 +80,81 @@ const ta = ({
80
80
  alignItems: c,
81
81
  justifyContent: d,
82
82
  gap: i,
83
- m: u,
84
- mt: y,
85
- mr: p,
86
- mb: f,
87
- ml: b,
88
- mx: v,
83
+ m: f,
84
+ mt: p,
85
+ mr: y,
86
+ mb: u,
87
+ ml: h,
88
+ mx: w,
89
89
  my: N,
90
90
  p: m,
91
- pt: g,
92
- pr: C,
91
+ pt: b,
92
+ pr: _,
93
93
  pb: x,
94
- pl: B,
95
- px: k,
96
- py: j,
97
- bg: $,
98
- color: S,
99
- fontSize: _,
100
- fontWeight: M,
101
- textAlign: I,
102
- lineHeight: E,
103
- letterSpacing: X,
104
- borderRadius: L,
105
- borderTopLeftRadius: U,
106
- borderTopRightRadius: H,
107
- borderBottomLeftRadius: D,
108
- borderBottomRightRadius: V,
109
- boxShadow: F,
110
- borderWidth: tt,
111
- borderTopWidth: K,
112
- borderRightWidth: Y,
113
- borderBottomWidth: P,
114
- borderLeftWidth: R,
115
- borderXWidth: Z,
116
- borderYWidth: q,
117
- borderColor: A,
118
- overflow: et,
119
- ...lt
120
- } = t, h = (T, G) => {
121
- if (T === void 0 || T === 0) return;
122
- const J = `var(--clarity-border-width-${T})`, it = G ? $t(G) : "currentColor";
123
- return `${J} solid ${it}`;
124
- }, O = W.useMemo(() => ({
94
+ pl: E,
95
+ px: C,
96
+ py: T,
97
+ bg: L,
98
+ color: $,
99
+ fontSize: k,
100
+ fontWeight: z,
101
+ textAlign: H,
102
+ lineHeight: R,
103
+ letterSpacing: V,
104
+ borderRadius: M,
105
+ borderTopLeftRadius: F,
106
+ borderTopRightRadius: j,
107
+ borderBottomLeftRadius: U,
108
+ borderBottomRightRadius: S,
109
+ boxShadow: K,
110
+ borderWidth: P,
111
+ borderTopWidth: Z,
112
+ borderRightWidth: q,
113
+ borderBottomWidth: tt,
114
+ borderLeftWidth: W,
115
+ borderXWidth: X,
116
+ borderYWidth: D,
117
+ borderColor: Y,
118
+ overflow: lt,
119
+ ...g
120
+ } = t, O = (G, Q) => {
121
+ if (G === void 0 || G === 0) return;
122
+ const at = `var(--clarity-border-width-${G})`, it = Q ? Ct(Q) : "currentColor";
123
+ return `${at} solid ${it}`;
124
+ }, B = I.useMemo(() => ({
125
125
  display: n,
126
126
  position: o,
127
127
  flexDirection: s,
128
128
  alignItems: c,
129
129
  justifyContent: d,
130
130
  gap: nt(i),
131
- marginTop: nt(y ?? N ?? u),
132
- marginRight: nt(p ?? v ?? u),
133
- marginBottom: nt(f ?? N ?? u),
134
- marginLeft: nt(b ?? v ?? u),
135
- paddingTop: nt(g ?? j ?? m),
136
- paddingRight: nt(C ?? k ?? m),
137
- paddingBottom: nt(x ?? j ?? m),
138
- paddingLeft: nt(B ?? k ?? m),
139
- backgroundColor: $ ? $t($) : void 0,
140
- color: S ? $t(S) : void 0,
141
- fontSize: _ ? `var(--clarity-font-size-${_})` : void 0,
142
- fontWeight: M ? Bt.fontWeight[M] : void 0,
143
- textAlign: I,
144
- lineHeight: E,
145
- letterSpacing: X ? Bt.letterSpacing[X] : void 0,
146
- borderRadius: L ? `var(--clarity-radius-${L})` : void 0,
147
- borderTopLeftRadius: U ? `var(--clarity-radius-${U})` : void 0,
148
- borderTopRightRadius: H ? `var(--clarity-radius-${H})` : void 0,
149
- borderBottomLeftRadius: D ? `var(--clarity-radius-${D})` : void 0,
150
- borderBottomRightRadius: V ? `var(--clarity-radius-${V})` : void 0,
151
- boxShadow: F ? `var(--clarity-shadow-${F})` : void 0,
152
- border: h(tt, A),
153
- borderTop: h(K ?? q),
154
- borderRight: h(Y ?? Z),
155
- borderBottom: h(P ?? q),
156
- borderLeft: h(R ?? Z),
157
- overflow: et
131
+ marginTop: nt(p ?? N ?? f),
132
+ marginRight: nt(y ?? w ?? f),
133
+ marginBottom: nt(u ?? N ?? f),
134
+ marginLeft: nt(h ?? w ?? f),
135
+ paddingTop: nt(b ?? T ?? m),
136
+ paddingRight: nt(_ ?? C ?? m),
137
+ paddingBottom: nt(x ?? T ?? m),
138
+ paddingLeft: nt(E ?? C ?? m),
139
+ backgroundColor: L ? Ct(L) : void 0,
140
+ color: $ ? Ct($) : void 0,
141
+ fontSize: k ? `var(--clarity-font-size-${k})` : void 0,
142
+ fontWeight: z ? Tt.fontWeight[z] : void 0,
143
+ textAlign: H,
144
+ lineHeight: R,
145
+ letterSpacing: V ? Tt.letterSpacing[V] : void 0,
146
+ borderRadius: M ? `var(--clarity-radius-${M})` : void 0,
147
+ borderTopLeftRadius: F ? `var(--clarity-radius-${F})` : void 0,
148
+ borderTopRightRadius: j ? `var(--clarity-radius-${j})` : void 0,
149
+ borderBottomLeftRadius: U ? `var(--clarity-radius-${U})` : void 0,
150
+ borderBottomRightRadius: S ? `var(--clarity-radius-${S})` : void 0,
151
+ boxShadow: K ? `var(--clarity-shadow-${K})` : void 0,
152
+ border: O(P, Y),
153
+ borderTop: O(Z ?? D),
154
+ borderRight: O(q ?? X),
155
+ borderBottom: O(tt ?? D),
156
+ borderLeft: O(W ?? X),
157
+ overflow: lt
158
158
  }), [
159
159
  n,
160
160
  o,
@@ -162,48 +162,48 @@ const ta = ({
162
162
  c,
163
163
  d,
164
164
  i,
165
- u,
166
- y,
167
- p,
168
165
  f,
169
- b,
170
- v,
166
+ p,
167
+ y,
168
+ u,
169
+ h,
170
+ w,
171
171
  N,
172
172
  m,
173
- g,
174
- C,
175
- x,
176
- B,
177
- k,
178
- j,
179
- $,
180
- S,
173
+ b,
181
174
  _,
182
- M,
183
- I,
175
+ x,
184
176
  E,
185
- X,
177
+ C,
178
+ T,
186
179
  L,
187
- U,
180
+ $,
181
+ k,
182
+ z,
188
183
  H,
189
- D,
184
+ R,
190
185
  V,
186
+ M,
191
187
  F,
192
- tt,
188
+ j,
189
+ U,
190
+ S,
193
191
  K,
194
- Y,
195
192
  P,
196
- R,
197
193
  Z,
198
194
  q,
199
- A,
200
- et
195
+ tt,
196
+ W,
197
+ X,
198
+ D,
199
+ Y,
200
+ lt
201
201
  ]);
202
- return /* @__PURE__ */ e("div", { ref: a, className: `clarity-box ${l || ""}`.trim(), style: O, ...lt, children: r });
202
+ return /* @__PURE__ */ e("div", { ref: a, className: `clarity-box ${l || ""}`.trim(), style: B, ...g, children: r });
203
203
  }
204
204
  );
205
- xe.displayName = "Box";
206
- const ke = ({
205
+ $e.displayName = "Box";
206
+ const xe = ({
207
207
  variant: t = "primary",
208
208
  size: a = "medium",
209
209
  disabled: r = !1,
@@ -214,34 +214,34 @@ const ke = ({
214
214
  className: c = "",
215
215
  title: d,
216
216
  customColor: i,
217
- customColorHover: u,
218
- ...y
217
+ customColorHover: f,
218
+ ...p
219
219
  }) => {
220
- const p = "clarity-button", f = [
221
- p,
222
- !i && `${p}--${t}`,
223
- `${p}--${a}`,
224
- l && `${p}--loading`,
225
- r && `${p}--disabled`,
220
+ const y = "clarity-button", u = [
221
+ y,
222
+ !i && `${y}--${t}`,
223
+ `${y}--${a}`,
224
+ l && `${y}--loading`,
225
+ r && `${y}--disabled`,
226
226
  c
227
- ].filter(Boolean).join(" "), b = {};
228
- return i && (b["--button-bg"] = i, b["--button-hover-bg"] = u || `${i}E6`, b["--button-border"] = i, b["--button-hover-border"] = u || `${i}E6`, b["--button-fg"] = "#fff"), /* @__PURE__ */ w(
227
+ ].filter(Boolean).join(" "), h = {};
228
+ return i && (h["--button-bg"] = i, h["--button-hover-bg"] = f || `${i}E6`, h["--button-border"] = i, h["--button-hover-border"] = f || `${i}E6`, h["--button-fg"] = "#fff"), /* @__PURE__ */ v(
229
229
  "button",
230
230
  {
231
- className: f,
232
- style: b,
231
+ className: u,
232
+ style: h,
233
233
  disabled: r || l,
234
234
  onClick: o,
235
235
  type: s,
236
236
  title: d,
237
- ...y,
237
+ ...p,
238
238
  children: [
239
- l && /* @__PURE__ */ e("div", { className: `${p}__spinner` }),
239
+ l && /* @__PURE__ */ e("div", { className: `${y}__spinner` }),
240
240
  n
241
241
  ]
242
242
  }
243
243
  );
244
- }, ea = ({
244
+ }, ta = ({
245
245
  variant: t = "primary",
246
246
  size: a = "medium",
247
247
  items: r,
@@ -252,59 +252,59 @@ const ke = ({
252
252
  className: c = "",
253
253
  ...d
254
254
  }) => {
255
- const i = "clarity-button-group", u = [
255
+ const i = "clarity-button-group", f = [
256
256
  i,
257
257
  c
258
- ].filter(Boolean).join(" "), y = (f) => {
258
+ ].filter(Boolean).join(" "), p = (u) => {
259
259
  if (o || !s) return;
260
- const b = r.find((v) => v.id === f);
261
- if (!(b != null && b.disabled))
260
+ const h = r.find((w) => w.id === u);
261
+ if (!(h != null && h.disabled))
262
262
  if (n) {
263
- const v = Array.isArray(l) ? l : [], N = v.includes(f) ? v.filter((m) => m !== f) : [...v, f];
263
+ const w = Array.isArray(l) ? l : [], N = w.includes(u) ? w.filter((m) => m !== u) : [...w, u];
264
264
  s(N);
265
265
  } else
266
- s(f);
267
- }, p = (f) => n ? Array.isArray(l) && l.includes(f) : l === f;
266
+ s(u);
267
+ }, y = (u) => n ? Array.isArray(l) && l.includes(u) : l === u;
268
268
  return /* @__PURE__ */ e(
269
269
  "div",
270
270
  {
271
- className: u,
271
+ className: f,
272
272
  role: "group",
273
273
  ...d,
274
- children: r.map((f, b) => {
275
- const v = p(f.id), N = v ? t : `${t}-outline`, m = [
274
+ children: r.map((u, h) => {
275
+ const w = y(u.id), N = w ? t : `${t}-outline`, m = [
276
276
  `${i}__item`,
277
- v && `${i}__item--selected`,
278
- b === 0 && `${i}__item--first`,
279
- b === r.length - 1 && `${i}__item--last`
277
+ w && `${i}__item--selected`,
278
+ h === 0 && `${i}__item--first`,
279
+ h === r.length - 1 && `${i}__item--last`
280
280
  ].filter(Boolean).join(" ");
281
- return /* @__PURE__ */ w(
282
- ke,
281
+ return /* @__PURE__ */ v(
282
+ xe,
283
283
  {
284
284
  variant: N,
285
285
  size: a,
286
286
  className: m,
287
- onClick: () => y(f.id),
288
- disabled: o || f.disabled,
289
- "aria-pressed": v,
287
+ onClick: () => p(u.id),
288
+ disabled: o || u.disabled,
289
+ "aria-pressed": w,
290
290
  children: [
291
- f.icon && /* @__PURE__ */ e("span", { className: `${i}__item-icon`, children: f.icon }),
292
- /* @__PURE__ */ e("span", { className: `${i}__item-label`, children: f.label })
291
+ u.icon && /* @__PURE__ */ e("span", { className: `${i}__item-icon`, children: u.icon }),
292
+ /* @__PURE__ */ e("span", { className: `${i}__item-label`, children: u.label })
293
293
  ]
294
294
  },
295
- f.id
295
+ u.id
296
296
  );
297
297
  })
298
298
  }
299
299
  );
300
300
  };
301
- var Lt = {
301
+ var Et = {
302
302
  color: void 0,
303
303
  size: void 0,
304
304
  className: void 0,
305
305
  style: void 0,
306
306
  attr: void 0
307
- }, jt = W.createContext && W.createContext(Lt), st = function() {
307
+ }, Bt = I.createContext && I.createContext(Et), st = function() {
308
308
  return st = Object.assign || function(t) {
309
309
  for (var a, r = 1, l = arguments.length; r < l; r++) {
310
310
  a = arguments[r];
@@ -312,31 +312,31 @@ var Lt = {
312
312
  }
313
313
  return t;
314
314
  }, st.apply(this, arguments);
315
- }, Te = function(t, a) {
315
+ }, ke = function(t, a) {
316
316
  var r = {};
317
317
  for (var l in t) Object.prototype.hasOwnProperty.call(t, l) && a.indexOf(l) < 0 && (r[l] = t[l]);
318
318
  if (t != null && typeof Object.getOwnPropertySymbols == "function") for (var n = 0, l = Object.getOwnPropertySymbols(t); n < l.length; n++)
319
319
  a.indexOf(l[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, l[n]) && (r[l[n]] = t[l[n]]);
320
320
  return r;
321
321
  };
322
- function Rt(t) {
322
+ function Lt(t) {
323
323
  return t && t.map(function(a, r) {
324
- return W.createElement(a.tag, st({
324
+ return I.createElement(a.tag, st({
325
325
  key: r
326
- }, a.attr), Rt(a.child));
326
+ }, a.attr), Lt(a.child));
327
327
  });
328
328
  }
329
- function Be(t) {
329
+ function Te(t) {
330
330
  return function(a) {
331
- return W.createElement(je, st({
331
+ return I.createElement(Be, st({
332
332
  attr: st({}, t.attr)
333
- }, a), Rt(t.child));
333
+ }, a), Lt(t.child));
334
334
  };
335
335
  }
336
- function je(t) {
336
+ function Be(t) {
337
337
  var a = function(r) {
338
- var l = t.attr, n = t.size, o = t.title, s = Te(t, ["attr", "size", "title"]), c = n || r.size || "1em", d;
339
- return r.className && (d = r.className), t.className && (d = (d ? d + " " : "") + t.className), W.createElement("svg", st({
338
+ var l = t.attr, n = t.size, o = t.title, s = ke(t, ["attr", "size", "title"]), c = n || r.size || "1em", d;
339
+ return r.className && (d = r.className), t.className && (d = (d ? d + " " : "") + t.className), I.createElement("svg", st({
340
340
  stroke: "currentColor",
341
341
  fill: "currentColor",
342
342
  strokeWidth: "0"
@@ -348,14 +348,14 @@ function je(t) {
348
348
  height: c,
349
349
  width: c,
350
350
  xmlns: "http://www.w3.org/2000/svg"
351
- }), o && W.createElement("title", null, o), t.children);
351
+ }), o && I.createElement("title", null, o), t.children);
352
352
  };
353
- return jt !== void 0 ? W.createElement(jt.Consumer, null, function(r) {
353
+ return Bt !== void 0 ? I.createElement(Bt.Consumer, null, function(r) {
354
354
  return a(r);
355
- }) : a(Lt);
355
+ }) : a(Et);
356
356
  }
357
357
  function pt(t) {
358
- return Be({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z" } }] })(t);
358
+ return Te({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z" } }] })(t);
359
359
  }
360
360
  const yt = ({
361
361
  content: t,
@@ -368,29 +368,29 @@ const yt = ({
368
368
  className: c = "",
369
369
  disabled: d = !1,
370
370
  delay: i = 200,
371
- hideDelay: u = 100,
372
- trigger: y = "hover",
373
- arrow: p = !0,
374
- ...f
371
+ hideDelay: f = 100,
372
+ trigger: p = "hover",
373
+ arrow: y = !0,
374
+ ...u
375
375
  }) => {
376
- const [b, v] = z(!1), [N, m] = z(a), [g, C] = z({ top: 0, left: 0 }), [x, B] = z(null), k = at(null), j = at(null), $ = "clarity-tooltip", S = 8, _ = !!l || o;
377
- let M = "";
378
- _ ? M = `${$}__content--custom-bg` : M = `${$}__content--${r}`;
379
- const I = [
380
- $,
381
- `${$}--${N}`,
376
+ const [h, w] = A(!1), [N, m] = A(a), [b, _] = A({ top: 0, left: 0 }), [x, E] = A(null), C = et(null), T = et(null), L = "clarity-tooltip", $ = 8, k = !!l || o;
377
+ let z = "";
378
+ k ? z = `${L}__content--custom-bg` : z = `${L}__content--${r}`;
379
+ const H = [
380
+ L,
381
+ `${L}--${N}`,
382
382
  c
383
- ].filter(Boolean).join(" "), E = [
384
- `${$}__content`,
385
- M,
386
- p && `${$}__content--arrow`
387
- ].filter(Boolean).join(" "), X = {}, L = {};
388
- _ && (L["--tooltip-bg-color"] = l || "#FFFFFF"), (n || o) && (L["--tooltip-text-color"] = n || "var(--clarity-gray-900)");
389
- const U = {
390
- ...X,
391
- ...Object.keys(L).length > 0 ? L : {},
392
- top: g.top,
393
- left: g.left,
383
+ ].filter(Boolean).join(" "), R = [
384
+ `${L}__content`,
385
+ z,
386
+ y && `${L}__content--arrow`
387
+ ].filter(Boolean).join(" "), V = {}, M = {};
388
+ k && (M["--tooltip-bg-color"] = l || "#FFFFFF"), (n || o) && (M["--tooltip-text-color"] = n || "var(--clarity-gray-900)");
389
+ const F = {
390
+ ...V,
391
+ ...Object.keys(M).length > 0 ? M : {},
392
+ top: b.top,
393
+ left: b.left,
394
394
  // Resetar estilos que vêm do CSS para posicionamento relativo
395
395
  position: "absolute",
396
396
  bottom: "auto",
@@ -399,72 +399,72 @@ const yt = ({
399
399
  transform: "none",
400
400
  zIndex: 99999
401
401
  // Garantir que fique acima de modais (geralmente 1000-2000)
402
- }, H = () => {
402
+ }, j = () => {
403
403
  if (d) return;
404
404
  x && clearTimeout(x);
405
- const R = setTimeout(() => {
406
- v(!0);
405
+ const W = setTimeout(() => {
406
+ w(!0);
407
407
  }, i);
408
- B(R);
409
- }, D = () => {
408
+ E(W);
409
+ }, U = () => {
410
410
  x && clearTimeout(x);
411
- const R = setTimeout(() => {
412
- v(!1);
413
- }, u);
414
- B(R);
415
- }, V = () => {
416
- d || (b ? D() : H());
417
- }, F = () => {
418
- d || H();
419
- }, tt = () => {
420
- D();
411
+ const W = setTimeout(() => {
412
+ w(!1);
413
+ }, f);
414
+ E(W);
415
+ }, S = () => {
416
+ d || (h ? U() : j());
417
+ }, K = () => {
418
+ d || j();
419
+ }, P = () => {
420
+ U();
421
421
  };
422
- Q(() => () => {
422
+ J(() => () => {
423
423
  x && clearTimeout(x);
424
424
  }, [x]);
425
- const K = () => {
426
- if (!b || !j.current || !k.current) return;
427
- const R = j.current.getBoundingClientRect(), Z = k.current.getBoundingClientRect(), q = window.scrollX, A = window.scrollY, et = window.innerWidth, lt = window.innerHeight, h = {
425
+ const Z = () => {
426
+ if (!h || !T.current || !C.current) return;
427
+ const W = T.current.getBoundingClientRect(), X = C.current.getBoundingClientRect(), D = window.scrollX, Y = window.scrollY, lt = window.innerWidth, g = window.innerHeight, O = {
428
428
  top: {
429
- top: R.top + A - Z.height - S,
430
- left: R.left + q + (R.width - Z.width) / 2
429
+ top: W.top + Y - X.height - $,
430
+ left: W.left + D + (W.width - X.width) / 2
431
431
  },
432
432
  bottom: {
433
- top: R.bottom + A + S,
434
- left: R.left + q + (R.width - Z.width) / 2
433
+ top: W.bottom + Y + $,
434
+ left: W.left + D + (W.width - X.width) / 2
435
435
  },
436
436
  left: {
437
- top: R.top + A + (R.height - Z.height) / 2,
438
- left: R.left + q - Z.width - S
437
+ top: W.top + Y + (W.height - X.height) / 2,
438
+ left: W.left + D - X.width - $
439
439
  },
440
440
  right: {
441
- top: R.top + A + (R.height - Z.height) / 2,
442
- left: R.right + q + S
441
+ top: W.top + Y + (W.height - X.height) / 2,
442
+ left: W.right + D + $
443
443
  },
444
444
  "top-left": {
445
- top: R.top + A - Z.height - S,
446
- left: R.left + q
445
+ top: W.top + Y - X.height - $,
446
+ left: W.left + D
447
447
  },
448
448
  "top-right": {
449
- top: R.top + A - Z.height - S,
450
- left: R.right + q - Z.width
449
+ top: W.top + Y - X.height - $,
450
+ left: W.right + D - X.width
451
451
  },
452
452
  "bottom-left": {
453
- top: R.bottom + A + S,
454
- left: R.left + q
453
+ top: W.bottom + Y + $,
454
+ left: W.left + D
455
455
  },
456
456
  "bottom-right": {
457
- top: R.bottom + A + S,
458
- left: R.right + q - Z.width
457
+ top: W.bottom + Y + $,
458
+ left: W.right + D - X.width
459
459
  }
460
460
  };
461
- let O = a;
462
- const T = (G) => {
463
- const J = h[G], it = J.top - A, ft = J.left - q;
464
- return it >= 0 && it + Z.height <= lt && ft >= 0 && ft + Z.width <= et;
461
+ let B = a;
462
+ const G = (Q) => {
463
+ const at = O[Q], it = at.top - Y, ft = at.left - D;
464
+ return it >= 0 && it + X.height <= g && ft >= 0 && ft + X.width <= lt;
465
465
  };
466
- if (!T(O)) {
467
- const J = {
466
+ if (!G(B)) {
467
+ const at = {
468
468
  top: "bottom",
469
469
  bottom: "top",
470
470
  left: "right",
@@ -473,53 +473,53 @@ const yt = ({
473
473
  "top-right": "bottom-right",
474
474
  "bottom-left": "top-left",
475
475
  "bottom-right": "top-right"
476
- }[O];
477
- J && T(J) && (O = J);
476
+ }[B];
477
+ at && G(at) && (B = at);
478
478
  }
479
- if (m(O), C(h[O]), k.current) {
480
- const G = Math.round(R.width / 2);
481
- k.current.style.setProperty("--tooltip-arrow-offset", `${G}px`);
479
+ if (m(B), _(O[B]), C.current) {
480
+ const Q = Math.round(W.width / 2);
481
+ C.current.style.setProperty("--tooltip-arrow-offset", `${Q}px`);
482
482
  }
483
483
  };
484
- Et(() => {
485
- if (b)
486
- return K(), window.addEventListener("scroll", K, !0), window.addEventListener("resize", K), () => {
487
- window.removeEventListener("scroll", K, !0), window.removeEventListener("resize", K);
484
+ St(() => {
485
+ if (h)
486
+ return Z(), window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z), () => {
487
+ window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
488
488
  };
489
- }, [b, a, t]);
490
- const Y = {};
491
- let P = y;
489
+ }, [h, a, t]);
490
+ const q = {};
491
+ let tt = p;
492
492
  if (typeof window < "u") {
493
- const R = "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
494
- y === "hover" && R && (P = "focus");
493
+ const W = "ontouchstart" in window || navigator.maxTouchPoints > 0 || window.matchMedia && window.matchMedia("(pointer: coarse)").matches;
494
+ p === "hover" && W && (tt = "focus");
495
495
  }
496
- return P === "hover" ? (Y.onMouseEnter = H, Y.onMouseLeave = D) : P === "click" ? Y.onClick = V : P === "focus" && (Y.onFocus = F, Y.onBlur = tt), /* @__PURE__ */ w(St, { children: [
496
+ return tt === "hover" ? (q.onMouseEnter = j, q.onMouseLeave = U) : tt === "click" ? q.onClick = S : tt === "focus" && (q.onFocus = K, q.onBlur = P), /* @__PURE__ */ v(jt, { children: [
497
497
  /* @__PURE__ */ e(
498
498
  "div",
499
499
  {
500
- ref: j,
501
- className: `${$}__trigger`,
502
- ...Y,
503
- ...f,
500
+ ref: T,
501
+ className: `${L}__trigger`,
502
+ ...q,
503
+ ...u,
504
504
  children: s
505
505
  }
506
506
  ),
507
- b && $e(
507
+ h && Ce(
508
508
  /* @__PURE__ */ e(
509
509
  "div",
510
510
  {
511
- ref: k,
512
- className: I,
513
- style: U,
511
+ ref: C,
512
+ className: H,
513
+ style: F,
514
514
  role: "tooltip",
515
- "aria-hidden": !b,
516
- children: /* @__PURE__ */ e("div", { className: E, children: t })
515
+ "aria-hidden": !h,
516
+ children: /* @__PURE__ */ e("div", { className: R, children: t })
517
517
  }
518
518
  ),
519
519
  document.body
520
520
  )
521
521
  ] });
522
- }, Se = W.forwardRef(({
522
+ }, je = I.forwardRef(({
523
523
  variant: t = "primary",
524
524
  size: a = "medium",
525
525
  label: r,
@@ -530,338 +530,336 @@ const yt = ({
530
530
  endIcon: c,
531
531
  helper: d = !1,
532
532
  helperPosition: i = "top-right",
533
- className: u = "",
534
- disabled: y = !1,
535
- value: p,
536
- defaultValue: f,
537
- onFocus: b,
538
- onBlur: v,
533
+ className: f = "",
534
+ disabled: p = !1,
535
+ value: y,
536
+ defaultValue: u,
537
+ onFocus: h,
538
+ onBlur: w,
539
539
  ...N
540
540
  }, m) => {
541
- const [g, C] = z(!1), [x, B] = z(!1), k = at(null), j = N.id || `input-${Math.random().toString(36).substr(2, 9)}`, $ = at(null), [S, _] = z(!1);
542
- W.useImperativeHandle(m, () => k.current), Q(() => {
543
- const H = k.current;
544
- H && B(H.value.length > 0);
545
- }, [p, f]), Q(() => {
546
- const H = $.current;
547
- if (!H) return;
548
- const D = () => {
549
- const F = H.scrollWidth > H.clientWidth;
550
- _((tt) => tt !== F ? F : tt);
541
+ const [b, _] = A(!1), [x, E] = A(!1), C = et(null), T = N.id || `input-${Math.random().toString(36).substr(2, 9)}`, L = et(null), [$, k] = A(!1);
542
+ I.useImperativeHandle(m, () => C.current), J(() => {
543
+ const j = C.current;
544
+ j && E(j.value.length > 0);
545
+ }, [y, u]), J(() => {
546
+ const j = L.current;
547
+ if (!j) return;
548
+ const U = () => {
549
+ const K = j.scrollWidth > j.clientWidth;
550
+ k((P) => P !== K ? K : P);
551
551
  };
552
- D();
553
- const V = new ResizeObserver(() => D());
554
- return V.observe(H), () => V.disconnect();
555
- }, [r, g, x, a, s, c]);
556
- const M = (H) => {
557
- C(!0), b == null || b(H);
558
- }, I = (H) => {
559
- C(!1), B(H.target.value.length > 0), v == null || v(H);
560
- }, E = [
552
+ U();
553
+ const S = new ResizeObserver(() => U());
554
+ return S.observe(j), () => S.disconnect();
555
+ }, [r, b, x, a, s, c]);
556
+ const z = (j) => {
557
+ _(!0), h == null || h(j);
558
+ }, H = (j) => {
559
+ _(!1), E(j.target.value.length > 0), w == null || w(j);
560
+ }, R = [
561
561
  "clarity-input",
562
562
  "clarity-input--outlined",
563
563
  `clarity-input--${a}`,
564
564
  t && `clarity-input--${t}`,
565
565
  n && "clarity-input--error",
566
- y && "clarity-input--disabled",
567
- g && "clarity-input--focused",
566
+ p && "clarity-input--disabled",
567
+ b && "clarity-input--focused",
568
568
  x && "clarity-input--has-value",
569
569
  s && "clarity-input--with-start-icon",
570
570
  c && "clarity-input--with-end-icon",
571
- u
572
- ].filter(Boolean).join(" "), X = [
571
+ f
572
+ ].filter(Boolean).join(" "), V = [
573
573
  "clarity-input__label",
574
- S && "clarity-input__label--truncate"
575
- ].filter(Boolean).join(" "), L = i != null && i.endsWith("left") ? "left" : "right", U = (H, D) => {
574
+ $ && "clarity-input__label--truncate"
575
+ ].filter(Boolean).join(" "), M = i != null && i.endsWith("left") ? "left" : "right", F = (j, U) => {
576
576
  if (!d) return null;
577
- const V = typeof d == "object" ? d : void 0, F = (V == null ? void 0 : V.content) ?? "Ajuda", tt = (V == null ? void 0 : V.plain) === !0, K = V == null ? void 0 : V.variant, Y = V == null ? void 0 : V.bgColor, P = V == null ? void 0 : V.textColor;
577
+ const S = typeof d == "object" ? d : void 0, K = (S == null ? void 0 : S.content) ?? "Ajuda", P = (S == null ? void 0 : S.plain) === !0, Z = S == null ? void 0 : S.variant, q = S == null ? void 0 : S.bgColor, tt = S == null ? void 0 : S.textColor;
578
578
  return /* @__PURE__ */ e(
579
579
  yt,
580
580
  {
581
- content: F,
582
- position: H === "middle" ? D === "left" ? "left" : "right" : H === "top" ? D === "left" ? "top-left" : "top-right" : D === "left" ? "bottom-left" : "bottom-right",
581
+ content: K,
582
+ position: j === "middle" ? U === "left" ? "left" : "right" : j === "top" ? U === "left" ? "top-left" : "top-right" : U === "left" ? "bottom-left" : "bottom-right",
583
583
  trigger: "hover",
584
- variant: K || t,
585
- plain: tt,
586
- bgColor: Y,
587
- textColor: P,
588
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-input__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: H === "middle" ? 20 : 16 }) })
584
+ variant: Z || t,
585
+ plain: P,
586
+ bgColor: q,
587
+ textColor: tt,
588
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-input__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: j === "middle" ? 20 : 16 }) })
589
589
  }
590
590
  );
591
591
  };
592
- return /* @__PURE__ */ w("div", { className: "clarity-input-wrapper", children: [
593
- d && (i == null ? void 0 : i.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-input__helper-row clarity-input__helper-row--top clarity-input__helper-row--${L}`, children: U("top", L) }),
594
- d && (i != null && i.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-input__middle-row clarity-input__middle-row--${L}`, children: [
595
- L === "left" && U("middle", L),
596
- /* @__PURE__ */ w("div", { className: E, children: [
592
+ return /* @__PURE__ */ v("div", { className: "clarity-input-wrapper", children: [
593
+ d && (i == null ? void 0 : i.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-input__helper-row clarity-input__helper-row--top clarity-input__helper-row--${M}`, children: F("top", M) }),
594
+ d && (i != null && i.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-input__middle-row clarity-input__middle-row--${M}`, children: [
595
+ M === "left" && F("middle", M),
596
+ /* @__PURE__ */ v("div", { className: R, children: [
597
597
  s && /* @__PURE__ */ e("div", { className: "clarity-input__start-icon", children: s }),
598
- /* @__PURE__ */ w("div", { className: "clarity-input__field", children: [
598
+ /* @__PURE__ */ v("div", { className: "clarity-input__field", children: [
599
599
  /* @__PURE__ */ e(
600
600
  "input",
601
601
  {
602
- ref: k,
603
- id: j,
602
+ ref: C,
603
+ id: T,
604
604
  className: "clarity-input__element",
605
- disabled: y,
606
- value: p,
607
- defaultValue: f,
608
- onFocus: M,
609
- onBlur: I,
605
+ disabled: p,
606
+ value: y,
607
+ defaultValue: u,
608
+ onFocus: z,
609
+ onBlur: H,
610
610
  "aria-label": l,
611
611
  ...N
612
612
  }
613
613
  ),
614
- r && /* @__PURE__ */ e("label", { ref: $, className: X, htmlFor: j, children: r })
614
+ r && /* @__PURE__ */ e("label", { ref: L, className: V, htmlFor: T, children: r })
615
615
  ] }),
616
616
  c && /* @__PURE__ */ e("div", { className: "clarity-input__end-icon", children: c })
617
617
  ] }),
618
- L === "right" && U("middle", L)
619
- ] }) : /* @__PURE__ */ w("div", { className: E, children: [
618
+ M === "right" && F("middle", M)
619
+ ] }) : /* @__PURE__ */ v("div", { className: R, children: [
620
620
  s && /* @__PURE__ */ e("div", { className: "clarity-input__start-icon", children: s }),
621
- /* @__PURE__ */ w("div", { className: "clarity-input__field", children: [
621
+ /* @__PURE__ */ v("div", { className: "clarity-input__field", children: [
622
622
  /* @__PURE__ */ e(
623
623
  "input",
624
624
  {
625
- ref: k,
626
- id: j,
625
+ ref: C,
626
+ id: T,
627
627
  className: "clarity-input__element",
628
- disabled: y,
629
- value: p,
630
- defaultValue: f,
631
- onFocus: M,
632
- onBlur: I,
628
+ disabled: p,
629
+ value: y,
630
+ defaultValue: u,
631
+ onFocus: z,
632
+ onBlur: H,
633
633
  "aria-label": l,
634
634
  ...N
635
635
  }
636
636
  ),
637
- r && /* @__PURE__ */ e("label", { ref: $, className: X, htmlFor: j, children: r })
637
+ r && /* @__PURE__ */ e("label", { ref: L, className: V, htmlFor: T, children: r })
638
638
  ] }),
639
639
  c && /* @__PURE__ */ e("div", { className: "clarity-input__end-icon", children: c })
640
640
  ] }),
641
- d && (i == null ? void 0 : i.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-input__helper-row clarity-input__helper-row--bottom clarity-input__helper-row--${L}`, children: U("bottom", L) }),
642
- (n && o || reserveErrorSpace) && /* @__PURE__ */ e("div", { className: "clarity-input__helper-text", style: o ? void 0 : { minHeight: "1.2em" }, children: o || " " })
641
+ d && (i == null ? void 0 : i.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-input__helper-row clarity-input__helper-row--bottom clarity-input__helper-row--${M}`, children: F("bottom", M) }),
642
+ n && o && /* @__PURE__ */ e("div", { className: "clarity-input__helper-text", children: o })
643
643
  ] });
644
644
  });
645
- Se.displayName = "Input";
646
- const Ee = W.forwardRef(({
645
+ je.displayName = "Input";
646
+ const Se = I.forwardRef(({
647
647
  variant: t = "primary",
648
648
  size: a = "medium",
649
649
  label: r,
650
650
  helper: l = !1,
651
651
  helperPosition: n = "middle-right",
652
- reserveErrorSpace: o = !1,
653
- error: s = !1,
654
- errorMessage: c,
655
- startIcon: d,
656
- endIcon: i,
657
- className: u = "",
658
- disabled: y = !1,
652
+ error: o = !1,
653
+ errorMessage: s,
654
+ startIcon: c,
655
+ endIcon: d,
656
+ className: i = "",
657
+ disabled: f = !1,
659
658
  value: p,
660
- defaultValue: f,
661
- onFocus: b,
662
- onBlur: v,
663
- rows: N = 3,
664
- minHeight: m,
665
- maxHeight: g,
666
- resizable: C = !0,
667
- ...x
668
- }, B) => {
669
- const [k, j] = z(!1), [$, S] = z(!1), _ = at(null);
670
- W.useImperativeHandle(B, () => _.current), Q(() => {
671
- const D = _.current;
672
- D && S(D.value.length > 0);
673
- }, [p, f]);
674
- const M = (D) => {
675
- j(!0), b == null || b(D);
676
- }, I = (D) => {
677
- j(!1), S(D.target.value.length > 0), v == null || v(D);
678
- }, E = [
659
+ defaultValue: y,
660
+ onFocus: u,
661
+ onBlur: h,
662
+ rows: w = 3,
663
+ minHeight: N,
664
+ maxHeight: m,
665
+ resizable: b = !0,
666
+ ..._
667
+ }, x) => {
668
+ const [E, C] = A(!1), [T, L] = A(!1), $ = et(null);
669
+ I.useImperativeHandle(x, () => $.current), J(() => {
670
+ const j = $.current;
671
+ j && L(j.value.length > 0);
672
+ }, [p, y]);
673
+ const k = (j) => {
674
+ C(!0), u == null || u(j);
675
+ }, z = (j) => {
676
+ C(!1), L(j.target.value.length > 0), h == null || h(j);
677
+ }, H = [
679
678
  "clarity-textarea",
680
679
  "clarity-textarea--outlined",
681
680
  `clarity-textarea--${a}`,
682
681
  t && `clarity-textarea--${t}`,
683
- s && "clarity-textarea--error",
684
- y && "clarity-textarea--disabled",
685
- k && "clarity-textarea--focused",
686
- $ && "clarity-textarea--has-value",
687
- d && "clarity-textarea--with-start-icon",
688
- i && "clarity-textarea--with-end-icon",
689
- u
690
- ].filter(Boolean).join(" "), X = {
691
- resize: C ? "vertical" : "none",
692
- minHeight: m ? `${m}px` : void 0,
693
- maxHeight: g ? `${g}px` : void 0
694
- }, L = n != null && n.endsWith("left") ? "left" : "right", U = (D, V) => {
682
+ o && "clarity-textarea--error",
683
+ f && "clarity-textarea--disabled",
684
+ E && "clarity-textarea--focused",
685
+ T && "clarity-textarea--has-value",
686
+ c && "clarity-textarea--with-start-icon",
687
+ d && "clarity-textarea--with-end-icon",
688
+ i
689
+ ].filter(Boolean).join(" "), R = {
690
+ resize: b ? "vertical" : "none",
691
+ minHeight: N ? `${N}px` : void 0,
692
+ maxHeight: m ? `${m}px` : void 0
693
+ }, V = n != null && n.endsWith("left") ? "left" : "right", M = (j, U) => {
695
694
  if (!l) return null;
696
- const F = typeof l == "object" ? l : void 0, tt = (F == null ? void 0 : F.content) ?? "Ajuda", K = (F == null ? void 0 : F.plain) === !0, Y = F == null ? void 0 : F.variant, P = F == null ? void 0 : F.bgColor, R = F == null ? void 0 : F.textColor;
695
+ const S = typeof l == "object" ? l : void 0, K = (S == null ? void 0 : S.content) ?? "Ajuda", P = (S == null ? void 0 : S.plain) === !0, Z = S == null ? void 0 : S.variant, q = S == null ? void 0 : S.bgColor, tt = S == null ? void 0 : S.textColor;
697
696
  return /* @__PURE__ */ e(
698
697
  yt,
699
698
  {
700
- content: tt,
701
- position: D === "middle" ? V === "left" ? "left" : "right" : D === "top" ? V === "left" ? "top-left" : "top-right" : V === "left" ? "bottom-left" : "bottom-right",
699
+ content: K,
700
+ position: j === "middle" ? U === "left" ? "left" : "right" : j === "top" ? U === "left" ? "top-left" : "top-right" : U === "left" ? "bottom-left" : "bottom-right",
702
701
  trigger: "hover",
703
- variant: Y || t,
704
- plain: K,
705
- bgColor: P,
706
- textColor: R,
707
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-textarea__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: D === "middle" ? 20 : 16 }) })
702
+ variant: Z || t,
703
+ plain: P,
704
+ bgColor: q,
705
+ textColor: tt,
706
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-textarea__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: j === "middle" ? 20 : 16 }) })
708
707
  }
709
708
  );
710
- }, H = /* @__PURE__ */ w("div", { className: "clarity-textarea-wrapper", children: [
711
- /* @__PURE__ */ w("div", { className: E, children: [
712
- d && /* @__PURE__ */ e("div", { className: "clarity-textarea__start-icon", children: d }),
713
- /* @__PURE__ */ w("div", { className: "clarity-textarea__field", children: [
709
+ }, F = /* @__PURE__ */ v("div", { className: "clarity-textarea-wrapper", children: [
710
+ /* @__PURE__ */ v("div", { className: H, children: [
711
+ c && /* @__PURE__ */ e("div", { className: "clarity-textarea__start-icon", children: c }),
712
+ /* @__PURE__ */ v("div", { className: "clarity-textarea__field", children: [
714
713
  /* @__PURE__ */ e(
715
714
  "textarea",
716
715
  {
717
- ref: _,
716
+ ref: $,
718
717
  className: "clarity-textarea__element",
719
- disabled: y,
718
+ disabled: f,
720
719
  value: p,
721
- defaultValue: f,
722
- onFocus: M,
723
- onBlur: I,
724
- rows: N,
725
- style: X,
726
- ...x
720
+ defaultValue: y,
721
+ onFocus: k,
722
+ onBlur: z,
723
+ rows: w,
724
+ style: R,
725
+ ..._
727
726
  }
728
727
  ),
729
728
  r && /* @__PURE__ */ e("label", { className: "clarity-textarea__label", children: r })
730
729
  ] }),
731
- i && /* @__PURE__ */ e("div", { className: "clarity-textarea__end-icon", children: i })
730
+ d && /* @__PURE__ */ e("div", { className: "clarity-textarea__end-icon", children: d })
732
731
  ] }),
733
- (s && c || o) && /* @__PURE__ */ e("div", { className: "clarity-textarea__helper-text", style: c ? void 0 : { minHeight: "1.2em" }, children: c || " " })
732
+ o && s && /* @__PURE__ */ e("div", { className: "clarity-textarea__helper-text", children: s })
734
733
  ] });
735
- return /* @__PURE__ */ w("div", { className: "clarity-textarea-container", children: [
736
- l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-textarea__helper-row clarity-textarea__helper-row--top clarity-textarea__helper-row--${L}`, children: U("top", L) }),
737
- l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-textarea__middle-row clarity-textarea__middle-row--${L}`, children: [
738
- L === "left" && U("middle", L),
739
- H,
740
- L === "right" && U("middle", L)
741
- ] }) : H,
742
- l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-textarea__helper-row clarity-textarea__helper-row--bottom clarity-textarea__helper-row--${L}`, children: U("bottom", L) })
734
+ return /* @__PURE__ */ v("div", { className: "clarity-textarea-container", children: [
735
+ l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-textarea__helper-row clarity-textarea__helper-row--top clarity-textarea__helper-row--${V}`, children: M("top", V) }),
736
+ l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-textarea__middle-row clarity-textarea__middle-row--${V}`, children: [
737
+ V === "left" && M("middle", V),
738
+ F,
739
+ V === "right" && M("middle", V)
740
+ ] }) : F,
741
+ l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-textarea__helper-row clarity-textarea__helper-row--bottom clarity-textarea__helper-row--${V}`, children: M("bottom", V) })
743
742
  ] });
744
743
  });
745
- Ee.displayName = "Textarea";
746
- const Le = W.forwardRef(({
744
+ Se.displayName = "Textarea";
745
+ const Ee = I.forwardRef(({
747
746
  variant: t = "primary",
748
747
  size: a = "medium",
749
748
  label: r,
750
749
  helper: l = !1,
751
750
  helperPosition: n = "top-right",
752
- reserveErrorSpace: o = !1,
753
- error: s = !1,
754
- errorMessage: c,
755
- startIcon: d,
756
- endIcon: i,
757
- className: u = "",
758
- disabled: y = !1,
751
+ error: o = !1,
752
+ errorMessage: s,
753
+ startIcon: c,
754
+ endIcon: d,
755
+ className: i = "",
756
+ disabled: f = !1,
759
757
  value: p,
760
- defaultValue: f,
761
- onFocus: b,
762
- onBlur: v,
763
- onChange: N,
764
- options: m = [],
765
- placeholder: g = "Selecione uma opção",
766
- isClearable: C = !1,
767
- isSearchable: x = !1,
768
- ...B
769
- }, k) => {
770
- const [j, $] = z(!1), [S, _] = z(!1), [M, I] = z(p || f || ""), [E, X] = z(""), L = at(null), U = at(null), H = Array.isArray(m) ? m : [];
771
- W.useImperativeHandle(k, () => L.current), Q(() => {
772
- p !== void 0 && I(p);
773
- }, [p]), Q(() => {
774
- const h = (O) => {
775
- L.current && !L.current.contains(O.target) && ($(!1), _(!1), v == null || v());
758
+ defaultValue: y,
759
+ onFocus: u,
760
+ onBlur: h,
761
+ onChange: w,
762
+ options: N = [],
763
+ placeholder: m = "Selecione uma opção",
764
+ isClearable: b = !1,
765
+ isSearchable: _ = !1,
766
+ ...x
767
+ }, E) => {
768
+ const [C, T] = A(!1), [L, $] = A(!1), [k, z] = A(p || y || ""), [H, R] = A(""), V = et(null), M = et(null), F = Array.isArray(N) ? N : [];
769
+ I.useImperativeHandle(E, () => V.current), J(() => {
770
+ p !== void 0 && z(p);
771
+ }, [p]), J(() => {
772
+ const g = (O) => {
773
+ V.current && !V.current.contains(O.target) && (T(!1), $(!1), h == null || h());
776
774
  };
777
- return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
778
- }, [v]);
779
- const D = x && E ? H.filter(
780
- (h) => h.label.toLowerCase().includes(E.toLowerCase())
781
- ) : H, V = () => {
782
- y || ($(!j), _(!j), j ? (v == null || v(), x && X("")) : (b == null || b(), x && setTimeout(() => {
783
- var h;
784
- (h = U.current) == null || h.focus();
775
+ return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
776
+ }, [h]);
777
+ const j = _ && H ? F.filter(
778
+ (g) => g.label.toLowerCase().includes(H.toLowerCase())
779
+ ) : F, U = () => {
780
+ f || (T(!C), $(!C), C ? (h == null || h(), _ && R("")) : (u == null || u(), _ && setTimeout(() => {
781
+ var g;
782
+ (g = M.current) == null || g.focus();
785
783
  }, 0)));
786
- }, F = (h, O) => {
787
- h.disabled || (I(h.value), $(!1), _(!1), X(""), N == null || N(h, O), v == null || v());
788
- }, tt = (h) => {
789
- X(h.target.value);
790
- }, K = (h) => {
791
- h.key === "Escape" ? ($(!1), _(!1), X("")) : h.key === "Enter" && D.length > 0 && D[0] && F(D[0], h);
792
- }, Y = H.find((h) => h.value === M), P = M !== "" && M !== void 0, R = (h) => {
793
- h.stopPropagation(), I("");
784
+ }, S = (g, O) => {
785
+ g.disabled || (z(g.value), T(!1), $(!1), R(""), w == null || w(g, O), h == null || h());
786
+ }, K = (g) => {
787
+ R(g.target.value);
788
+ }, P = (g) => {
789
+ g.key === "Escape" ? (T(!1), $(!1), R("")) : g.key === "Enter" && j.length > 0 && j[0] && S(j[0], g);
790
+ }, Z = F.find((g) => g.value === k), q = k !== "" && k !== void 0, tt = (g) => {
791
+ g.stopPropagation(), z("");
794
792
  const O = { value: "", label: "" };
795
- N == null || N(O, h);
796
- }, Z = P || S || g || x && E, q = [
793
+ w == null || w(O, g);
794
+ }, W = q || L || m || _ && H, X = [
797
795
  "clarity-select",
798
796
  "clarity-select--outlined",
799
797
  `clarity-select--${a}`,
800
798
  t && `clarity-select--${t}`,
801
- s && "clarity-select--error",
802
- y && "clarity-select--disabled",
803
- (S || j) && "clarity-select--focused",
804
- Z && "clarity-select--label-up",
805
- j && "clarity-select--open",
806
- x && "clarity-select--searchable",
807
- d && "clarity-select--with-start-icon",
808
- (i || C) && "clarity-select--with-end-icon",
809
- u
810
- ].filter(Boolean).join(" "), A = n != null && n.endsWith("left") ? "left" : "right", et = (h, O) => {
799
+ o && "clarity-select--error",
800
+ f && "clarity-select--disabled",
801
+ (L || C) && "clarity-select--focused",
802
+ W && "clarity-select--label-up",
803
+ C && "clarity-select--open",
804
+ _ && "clarity-select--searchable",
805
+ c && "clarity-select--with-start-icon",
806
+ (d || b) && "clarity-select--with-end-icon",
807
+ i
808
+ ].filter(Boolean).join(" "), D = n != null && n.endsWith("left") ? "left" : "right", Y = (g, O) => {
811
809
  if (!l) return null;
812
- const T = typeof l == "object" ? l : void 0, G = (T == null ? void 0 : T.content) ?? "Ajuda", J = (T == null ? void 0 : T.plain) === !0, it = T == null ? void 0 : T.variant, ft = T == null ? void 0 : T.bgColor, Ct = T == null ? void 0 : T.textColor;
810
+ const B = typeof l == "object" ? l : void 0, G = (B == null ? void 0 : B.content) ?? "Ajuda", Q = (B == null ? void 0 : B.plain) === !0, at = B == null ? void 0 : B.variant, it = B == null ? void 0 : B.bgColor, ft = B == null ? void 0 : B.textColor;
813
811
  return /* @__PURE__ */ e(
814
812
  yt,
815
813
  {
816
814
  content: G,
817
- position: h === "middle" ? O === "left" ? "left" : "right" : h === "top" ? O === "left" ? "top-left" : "top-right" : O === "left" ? "bottom-left" : "bottom-right",
815
+ position: g === "middle" ? O === "left" ? "left" : "right" : g === "top" ? O === "left" ? "top-left" : "top-right" : O === "left" ? "bottom-left" : "bottom-right",
818
816
  trigger: "hover",
819
- variant: it || t,
820
- plain: J,
821
- bgColor: ft,
822
- textColor: Ct,
823
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-select__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: h === "middle" ? 20 : 16 }) })
817
+ variant: at || t,
818
+ plain: Q,
819
+ bgColor: it,
820
+ textColor: ft,
821
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-select__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: g === "middle" ? 20 : 16 }) })
824
822
  }
825
823
  );
826
- }, lt = /* @__PURE__ */ w(
824
+ }, lt = /* @__PURE__ */ v(
827
825
  "div",
828
826
  {
829
- ref: L,
830
- className: q,
831
- onClick: x ? void 0 : V,
827
+ ref: V,
828
+ className: X,
829
+ onClick: _ ? void 0 : U,
832
830
  role: "combobox",
833
- "aria-expanded": j,
831
+ "aria-expanded": C,
834
832
  "aria-haspopup": "listbox",
835
- tabIndex: y || x ? -1 : 0,
836
- ...B,
833
+ tabIndex: f || _ ? -1 : 0,
834
+ ...x,
837
835
  children: [
838
- d && /* @__PURE__ */ e("div", { className: "clarity-select__start-icon", children: d }),
839
- /* @__PURE__ */ w("div", { className: "clarity-select__field", children: [
840
- x ? /* @__PURE__ */ e(
836
+ c && /* @__PURE__ */ e("div", { className: "clarity-select__start-icon", children: c }),
837
+ /* @__PURE__ */ v("div", { className: "clarity-select__field", children: [
838
+ _ ? /* @__PURE__ */ e(
841
839
  "input",
842
840
  {
843
- ref: U,
841
+ ref: M,
844
842
  type: "text",
845
843
  className: "clarity-select__search-input",
846
- value: j ? E : Y ? Y.label : "",
847
- onChange: tt,
848
- onKeyDown: K,
844
+ value: C ? H : Z ? Z.label : "",
845
+ onChange: K,
846
+ onKeyDown: P,
849
847
  onFocus: () => {
850
- j || ($(!0), _(!0), b == null || b());
848
+ C || (T(!0), $(!0), u == null || u());
851
849
  },
852
- placeholder: Y ? Y.label : g,
853
- disabled: y,
854
- readOnly: !j
850
+ placeholder: Z ? Z.label : m,
851
+ disabled: f,
852
+ readOnly: !C
855
853
  }
856
- ) : /* @__PURE__ */ e("div", { className: "clarity-select__display", children: Y ? Y.label : g }),
854
+ ) : /* @__PURE__ */ e("div", { className: "clarity-select__display", children: Z ? Z.label : m }),
857
855
  r && /* @__PURE__ */ e("label", { className: "clarity-select__label", children: r })
858
856
  ] }),
859
- C && P && /* @__PURE__ */ e(
857
+ b && q && /* @__PURE__ */ e(
860
858
  "button",
861
859
  {
862
860
  type: "button",
863
861
  className: "clarity-select__clear-button",
864
- onClick: R,
862
+ onClick: tt,
865
863
  "aria-label": "Limpar seleção",
866
864
  children: /* @__PURE__ */ e(
867
865
  "svg",
@@ -888,8 +886,8 @@ const Le = W.forwardRef(({
888
886
  "div",
889
887
  {
890
888
  className: "clarity-select__end-icon",
891
- onClick: x ? V : void 0,
892
- children: i || /* @__PURE__ */ e(
889
+ onClick: _ ? U : void 0,
890
+ children: d || /* @__PURE__ */ e(
893
891
  "svg",
894
892
  {
895
893
  className: "clarity-select__arrow",
@@ -911,37 +909,37 @@ const Le = W.forwardRef(({
911
909
  )
912
910
  }
913
911
  ),
914
- j && /* @__PURE__ */ e("div", { className: "clarity-select__dropdown", children: /* @__PURE__ */ e("ul", { className: "clarity-select__options", role: "listbox", children: D.length > 0 ? D.map((h) => /* @__PURE__ */ e(
912
+ C && /* @__PURE__ */ e("div", { className: "clarity-select__dropdown", children: /* @__PURE__ */ e("ul", { className: "clarity-select__options", role: "listbox", children: j.length > 0 ? j.map((g) => /* @__PURE__ */ e(
915
913
  "li",
916
914
  {
917
915
  className: [
918
916
  "clarity-select__option",
919
- h.disabled && "clarity-select__option--disabled",
920
- M === h.value && "clarity-select__option--selected"
917
+ g.disabled && "clarity-select__option--disabled",
918
+ k === g.value && "clarity-select__option--selected"
921
919
  ].filter(Boolean).join(" "),
922
- onClick: (O) => F(h, O),
920
+ onClick: (O) => S(g, O),
923
921
  role: "option",
924
- "aria-selected": M === h.value,
925
- children: h.label
922
+ "aria-selected": k === g.value,
923
+ children: g.label
926
924
  },
927
- h.value
925
+ g.value
928
926
  )) : /* @__PURE__ */ e("li", { className: "clarity-select__option clarity-select__option--no-results", children: "Nenhum resultado encontrado" }) }) })
929
927
  ]
930
928
  }
931
929
  );
932
- return /* @__PURE__ */ w("div", { className: "clarity-select-wrapper", children: [
933
- l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-select__helper-row clarity-select__helper-row--top clarity-select__helper-row--${A}`, children: et("top", A) }),
934
- l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-select__middle-row clarity-select__middle-row--${A}`, children: [
935
- A === "left" && et("middle", A),
930
+ return /* @__PURE__ */ v("div", { className: "clarity-select-wrapper", children: [
931
+ l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-select__helper-row clarity-select__helper-row--top clarity-select__helper-row--${D}`, children: Y("top", D) }),
932
+ l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-select__middle-row clarity-select__middle-row--${D}`, children: [
933
+ D === "left" && Y("middle", D),
936
934
  lt,
937
- A === "right" && et("middle", A)
935
+ D === "right" && Y("middle", D)
938
936
  ] }) : lt,
939
- l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-select__helper-row clarity-select__helper-row--bottom clarity-select__helper-row--${A}`, children: et("bottom", A) }),
940
- (s && c || o) && /* @__PURE__ */ e("div", { className: "clarity-select__helper-text", style: c ? void 0 : { minHeight: "1.2em" }, children: c || " " })
937
+ l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-select__helper-row clarity-select__helper-row--bottom clarity-select__helper-row--${D}`, children: Y("bottom", D) }),
938
+ o && s && /* @__PURE__ */ e("div", { className: "clarity-select__helper-text", children: s })
941
939
  ] });
942
940
  });
943
- Le.displayName = "Select";
944
- const Re = we(({
941
+ Ee.displayName = "Select";
942
+ const Le = _e(({
945
943
  options: t = [],
946
944
  value: a = [],
947
945
  onChange: r,
@@ -949,134 +947,133 @@ const Re = we(({
949
947
  label: n,
950
948
  helper: o = !1,
951
949
  helperPosition: s = "top-right",
952
- reserveErrorSpace: c = !1,
953
- error: d = !1,
954
- errorMessage: i,
955
- disabled: u = !1,
956
- variant: y = "primary",
950
+ error: c = !1,
951
+ errorMessage: d,
952
+ disabled: i = !1,
953
+ variant: f = "primary",
957
954
  size: p = "medium",
958
- maxSelectedLabels: f = 3,
959
- selectionLimit: b,
960
- className: v = "",
961
- id: N,
962
- name: m,
963
- required: g = !1,
964
- "data-testid": C,
965
- ...x
966
- }, B) => {
967
- const [k, j] = z(!1), [$, S] = z(""), [_, M] = z(!1), I = at(null), E = at(null), X = at(null), L = Array.isArray(t) ? t : [], U = (h) => {
968
- I.current = h, B && (typeof B == "function" ? B(h) : B.current = h);
955
+ maxSelectedLabels: y = 3,
956
+ selectionLimit: u,
957
+ className: h = "",
958
+ id: w,
959
+ name: N,
960
+ required: m = !1,
961
+ "data-testid": b,
962
+ ..._
963
+ }, x) => {
964
+ const [E, C] = A(!1), [T, L] = A(""), [$, k] = A(!1), z = et(null), H = et(null), R = et(null), V = Array.isArray(t) ? t : [], M = (g) => {
965
+ z.current = g, x && (typeof x == "function" ? x(g) : x.current = g);
969
966
  };
970
- Q(() => {
971
- const h = (O) => {
972
- I.current && !I.current.contains(O.target) && (j(!1), M(!1), S(""));
967
+ J(() => {
968
+ const g = (O) => {
969
+ z.current && !z.current.contains(O.target) && (C(!1), k(!1), L(""));
973
970
  };
974
- return document.addEventListener("click", h), () => document.removeEventListener("click", h);
971
+ return document.addEventListener("click", g), () => document.removeEventListener("click", g);
975
972
  }, []);
976
- const H = L.filter(
977
- (h) => h.label.toLowerCase().includes($.toLowerCase())
978
- ), D = () => {
979
- u || (j(!k), M(!k), k ? S("") : setTimeout(() => {
980
- var h;
981
- (h = E.current) == null || h.focus();
973
+ const F = V.filter(
974
+ (g) => g.label.toLowerCase().includes(T.toLowerCase())
975
+ ), j = () => {
976
+ i || (C(!E), k(!E), E ? L("") : setTimeout(() => {
977
+ var g;
978
+ (g = H.current) == null || g.focus();
982
979
  }, 100));
983
- }, V = (h, O) => {
984
- if (u)
980
+ }, U = (g, O) => {
981
+ if (i)
985
982
  return;
986
983
  O && (O.stopPropagation(), O.preventDefault());
987
- const T = a.includes(h);
984
+ const B = a.includes(g);
988
985
  let G;
989
- T ? G = a.filter((J) => J !== h) : G = [...a, h], r && r(G);
990
- }, F = (h, O) => {
991
- if (O.stopPropagation(), u) return;
992
- const T = a.filter((G) => G !== h);
993
- r == null || r(T);
994
- }, tt = (h) => {
995
- h.stopPropagation(), !u && (r == null || r([]));
996
- }, K = (h) => {
997
- S(h.target.value);
998
- }, Y = (h) => {
999
- h.key === "Escape" && (j(!1), M(!1), S(""));
1000
- }, P = _ || k || a.length > 0, R = () => {
986
+ B ? G = a.filter((Q) => Q !== g) : G = [...a, g], r && r(G);
987
+ }, S = (g, O) => {
988
+ if (O.stopPropagation(), i) return;
989
+ const B = a.filter((G) => G !== g);
990
+ r == null || r(B);
991
+ }, K = (g) => {
992
+ g.stopPropagation(), !i && (r == null || r([]));
993
+ }, P = (g) => {
994
+ L(g.target.value);
995
+ }, Z = (g) => {
996
+ g.key === "Escape" && (C(!1), k(!1), L(""));
997
+ }, q = $ || E || a.length > 0, tt = () => {
1001
998
  if (a.length === 0) return null;
1002
- const h = a.map(
1003
- (G) => L.find((J) => J.value === G)
1004
- ).filter(Boolean), O = h.slice(0, f), T = h.length - f;
1005
- return /* @__PURE__ */ w("div", { className: "clarity-multiselect__chips", children: [
1006
- O.map((G) => /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip", children: [
999
+ const g = a.map(
1000
+ (G) => V.find((Q) => Q.value === G)
1001
+ ).filter(Boolean), O = g.slice(0, y), B = g.length - y;
1002
+ return /* @__PURE__ */ v("div", { className: "clarity-multiselect__chips", children: [
1003
+ O.map((G) => /* @__PURE__ */ v("div", { className: "clarity-multiselect__chip", children: [
1007
1004
  /* @__PURE__ */ e("span", { className: "clarity-multiselect__chip-label", children: G.label }),
1008
- !u && /* @__PURE__ */ e(
1005
+ !i && /* @__PURE__ */ e(
1009
1006
  "button",
1010
1007
  {
1011
1008
  type: "button",
1012
1009
  className: "clarity-multiselect__chip-remove",
1013
- onClick: (J) => F(G.value, J),
1010
+ onClick: (Q) => S(G.value, Q),
1014
1011
  "aria-label": `Remover ${G.label}`,
1015
1012
  children: "×"
1016
1013
  }
1017
1014
  )
1018
1015
  ] }, G.value)),
1019
- T > 0 && /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip clarity-multiselect__chip--count", children: [
1016
+ B > 0 && /* @__PURE__ */ v("div", { className: "clarity-multiselect__chip clarity-multiselect__chip--count", children: [
1020
1017
  "+",
1021
- T,
1018
+ B,
1022
1019
  " mais"
1023
1020
  ] })
1024
1021
  ] });
1025
- }, Z = [
1022
+ }, W = [
1026
1023
  "clarity-multiselect-wrapper",
1027
- v
1028
- ].filter(Boolean).join(" "), q = [
1024
+ h
1025
+ ].filter(Boolean).join(" "), X = [
1029
1026
  "clarity-multiselect",
1030
- `clarity-multiselect--${y}`,
1027
+ `clarity-multiselect--${f}`,
1031
1028
  `clarity-multiselect--${p}`,
1032
- k && "clarity-multiselect--open",
1033
- _ && "clarity-multiselect--focused",
1034
- P && "clarity-multiselect--label-up",
1035
- d && "clarity-multiselect--error",
1036
- u && "clarity-multiselect--disabled",
1029
+ E && "clarity-multiselect--open",
1030
+ $ && "clarity-multiselect--focused",
1031
+ q && "clarity-multiselect--label-up",
1032
+ c && "clarity-multiselect--error",
1033
+ i && "clarity-multiselect--disabled",
1037
1034
  a.length > 0 && "clarity-multiselect--has-value"
1038
- ].filter(Boolean).join(" "), A = s != null && s.endsWith("left") ? "left" : "right", et = (h, O) => {
1035
+ ].filter(Boolean).join(" "), D = s != null && s.endsWith("left") ? "left" : "right", Y = (g, O) => {
1039
1036
  if (!o) return null;
1040
- const T = typeof o == "object" ? o : void 0, G = (T == null ? void 0 : T.content) ?? "Ajuda", J = (T == null ? void 0 : T.plain) === !0, it = T == null ? void 0 : T.variant, ft = T == null ? void 0 : T.bgColor, Ct = T == null ? void 0 : T.textColor;
1037
+ const B = typeof o == "object" ? o : void 0, G = (B == null ? void 0 : B.content) ?? "Ajuda", Q = (B == null ? void 0 : B.plain) === !0, at = B == null ? void 0 : B.variant, it = B == null ? void 0 : B.bgColor, ft = B == null ? void 0 : B.textColor;
1041
1038
  return /* @__PURE__ */ e(
1042
1039
  yt,
1043
1040
  {
1044
1041
  content: G,
1045
- position: h === "middle" ? O === "left" ? "left" : "right" : h === "top" ? O === "left" ? "top-left" : "top-right" : O === "left" ? "bottom-left" : "bottom-right",
1042
+ position: g === "middle" ? O === "left" ? "left" : "right" : g === "top" ? O === "left" ? "top-left" : "top-right" : O === "left" ? "bottom-left" : "bottom-right",
1046
1043
  trigger: "hover",
1047
- variant: it || y,
1048
- plain: J,
1049
- bgColor: ft,
1050
- textColor: Ct,
1051
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-multiselect__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: h === "middle" ? 20 : 16 }) })
1044
+ variant: at || f,
1045
+ plain: Q,
1046
+ bgColor: it,
1047
+ textColor: ft,
1048
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-multiselect__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: g === "middle" ? 20 : 16 }) })
1052
1049
  }
1053
1050
  );
1054
- }, lt = /* @__PURE__ */ w(
1051
+ }, lt = /* @__PURE__ */ v(
1055
1052
  "div",
1056
1053
  {
1057
- ref: U,
1058
- className: q,
1059
- "data-testid": C,
1060
- ...x,
1054
+ ref: M,
1055
+ className: X,
1056
+ "data-testid": b,
1057
+ ..._,
1061
1058
  children: [
1062
- /* @__PURE__ */ w(
1059
+ /* @__PURE__ */ v(
1063
1060
  "div",
1064
1061
  {
1065
1062
  className: "clarity-multiselect__field",
1066
- onClick: D,
1063
+ onClick: j,
1067
1064
  children: [
1068
- n && /* @__PURE__ */ w("label", { className: "clarity-multiselect__label", children: [
1065
+ n && /* @__PURE__ */ v("label", { className: "clarity-multiselect__label", children: [
1069
1066
  n,
1070
- g && /* @__PURE__ */ e("span", { className: "clarity-multiselect__required", children: "*" })
1067
+ m && /* @__PURE__ */ e("span", { className: "clarity-multiselect__required", children: "*" })
1071
1068
  ] }),
1072
- /* @__PURE__ */ e("div", { className: "clarity-multiselect__content", children: a.length > 0 ? R() : /* @__PURE__ */ e("span", { className: "clarity-multiselect__placeholder", children: l }) }),
1073
- /* @__PURE__ */ w("div", { className: "clarity-multiselect__icons", children: [
1074
- a.length > 0 && !u && /* @__PURE__ */ e(
1069
+ /* @__PURE__ */ e("div", { className: "clarity-multiselect__content", children: a.length > 0 ? tt() : /* @__PURE__ */ e("span", { className: "clarity-multiselect__placeholder", children: l }) }),
1070
+ /* @__PURE__ */ v("div", { className: "clarity-multiselect__icons", children: [
1071
+ a.length > 0 && !i && /* @__PURE__ */ e(
1075
1072
  "button",
1076
1073
  {
1077
1074
  type: "button",
1078
1075
  className: "clarity-multiselect__clear-button",
1079
- onClick: tt,
1076
+ onClick: K,
1080
1077
  "aria-label": "Limpar seleção",
1081
1078
  children: "×"
1082
1079
  }
@@ -1095,30 +1092,30 @@ const Re = we(({
1095
1092
  ]
1096
1093
  }
1097
1094
  ),
1098
- k && /* @__PURE__ */ w("div", { ref: X, className: "clarity-multiselect__dropdown", children: [
1095
+ E && /* @__PURE__ */ v("div", { ref: R, className: "clarity-multiselect__dropdown", children: [
1099
1096
  /* @__PURE__ */ e("div", { className: "clarity-multiselect__search", children: /* @__PURE__ */ e(
1100
1097
  "input",
1101
1098
  {
1102
- ref: E,
1099
+ ref: H,
1103
1100
  type: "text",
1104
1101
  className: "clarity-multiselect__search-input",
1105
1102
  placeholder: "Buscar opções...",
1106
- value: $,
1107
- onChange: K,
1108
- onKeyDown: Y
1103
+ value: T,
1104
+ onChange: P,
1105
+ onKeyDown: Z
1109
1106
  }
1110
1107
  ) }),
1111
- /* @__PURE__ */ e("ul", { className: "clarity-multiselect__options", children: H.length > 0 ? H.map((h) => {
1112
- const O = a.includes(h.value), T = h.disabled || u;
1113
- return /* @__PURE__ */ w(
1108
+ /* @__PURE__ */ e("ul", { className: "clarity-multiselect__options", children: F.length > 0 ? F.map((g) => {
1109
+ const O = a.includes(g.value), B = g.disabled || i;
1110
+ return /* @__PURE__ */ v(
1114
1111
  "li",
1115
1112
  {
1116
1113
  className: [
1117
1114
  "clarity-multiselect__option",
1118
1115
  O && "clarity-multiselect__option--selected",
1119
- T && "clarity-multiselect__option--disabled"
1116
+ B && "clarity-multiselect__option--disabled"
1120
1117
  ].filter(Boolean).join(" "),
1121
- onClick: (G) => !T && V(h.value, G),
1118
+ onClick: (G) => !B && U(g.value, G),
1122
1119
  children: [
1123
1120
  /* @__PURE__ */ e("div", { className: "clarity-multiselect__option-checkbox", children: /* @__PURE__ */ e("div", { className: [
1124
1121
  "clarity-multiselect__checkbox",
@@ -1133,39 +1130,39 @@ const Re = we(({
1133
1130
  strokeLinejoin: "round"
1134
1131
  }
1135
1132
  ) }) }) }),
1136
- /* @__PURE__ */ e("span", { className: "clarity-multiselect__option-label", children: h.label })
1133
+ /* @__PURE__ */ e("span", { className: "clarity-multiselect__option-label", children: g.label })
1137
1134
  ]
1138
1135
  },
1139
- h.value
1136
+ g.value
1140
1137
  );
1141
1138
  }) : /* @__PURE__ */ e("li", { className: "clarity-multiselect__option clarity-multiselect__option--no-results", children: "Nenhum resultado encontrado" }) })
1142
1139
  ] })
1143
1140
  ]
1144
1141
  }
1145
1142
  );
1146
- return /* @__PURE__ */ w("div", { className: Z, children: [
1147
- o && (s == null ? void 0 : s.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-multiselect__helper-row clarity-multiselect__helper-row--top clarity-multiselect__helper-row--${A}`, children: et("top", A) }),
1148
- o && (s != null && s.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-multiselect__middle-row clarity-multiselect__middle-row--${A}`, children: [
1149
- A === "left" && et("middle", A),
1143
+ return /* @__PURE__ */ v("div", { className: W, children: [
1144
+ o && (s == null ? void 0 : s.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-multiselect__helper-row clarity-multiselect__helper-row--top clarity-multiselect__helper-row--${D}`, children: Y("top", D) }),
1145
+ o && (s != null && s.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-multiselect__middle-row clarity-multiselect__middle-row--${D}`, children: [
1146
+ D === "left" && Y("middle", D),
1150
1147
  lt,
1151
- A === "right" && et("middle", A)
1148
+ D === "right" && Y("middle", D)
1152
1149
  ] }) : lt,
1153
- o && (s == null ? void 0 : s.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-multiselect__helper-row clarity-multiselect__helper-row--bottom clarity-multiselect__helper-row--${A}`, children: et("bottom", A) }),
1154
- (d && i || c) && /* @__PURE__ */ e("div", { className: "clarity-multiselect__helper", style: i ? void 0 : { minHeight: "1.2em" }, children: /* @__PURE__ */ e("span", { className: "clarity-multiselect__error-message", children: i || " " }) })
1150
+ o && (s == null ? void 0 : s.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-multiselect__helper-row clarity-multiselect__helper-row--bottom clarity-multiselect__helper-row--${D}`, children: Y("bottom", D) }),
1151
+ c && d && /* @__PURE__ */ e("div", { className: "clarity-multiselect__helper", children: /* @__PURE__ */ e("span", { className: "clarity-multiselect__error-message", children: d }) })
1155
1152
  ] });
1156
1153
  });
1157
- Re.displayName = "MultiSelect";
1158
- const Ot = ct(null), Wt = () => {
1159
- const t = dt(Ot);
1154
+ Le.displayName = "MultiSelect";
1155
+ const Rt = ct(null), Ot = () => {
1156
+ const t = dt(Rt);
1160
1157
  if (!t)
1161
1158
  throw new Error("useModal must be used within a Modal provider");
1162
1159
  return t;
1163
- }, It = ({
1160
+ }, Wt = ({
1164
1161
  children: t,
1165
1162
  className: a = "",
1166
1163
  title: r
1167
1164
  }) => {
1168
- const { onClose: l, variant: n, showCloseButton: o } = Wt(), s = [
1165
+ const { onClose: l, variant: n, showCloseButton: o } = Ot(), s = [
1169
1166
  "clarity-modal-header",
1170
1167
  a,
1171
1168
  n && `clarity-modal-header--${n}`
@@ -1173,7 +1170,7 @@ const Ot = ct(null), Wt = () => {
1173
1170
  "clarity-modal-close",
1174
1171
  n && `clarity-modal-close--${n}`
1175
1172
  ].filter(Boolean).join(" ");
1176
- return /* @__PURE__ */ w("div", { className: s, children: [
1173
+ return /* @__PURE__ */ v("div", { className: s, children: [
1177
1174
  r && /* @__PURE__ */ e("h2", { className: "clarity-modal-title", children: r }),
1178
1175
  t,
1179
1176
  o && /* @__PURE__ */ e("button", { className: c, onClick: (d) => {
@@ -1181,23 +1178,23 @@ const Ot = ct(null), Wt = () => {
1181
1178
  }, children: "×" })
1182
1179
  ] });
1183
1180
  };
1184
- It.displayName = "Modal.Header";
1185
- const Ht = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-modal-content ${a}`, children: t });
1186
- Ht.displayName = "Modal.Content";
1187
- const Dt = ({ children: t, className: a = "" }) => /* @__PURE__ */ w("div", { className: `clarity-modal-footer ${a}`, children: [
1181
+ Wt.displayName = "Modal.Header";
1182
+ const It = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-modal-content ${a}`, children: t });
1183
+ It.displayName = "Modal.Content";
1184
+ const Ht = ({ children: t, className: a = "" }) => /* @__PURE__ */ v("div", { className: `clarity-modal-footer ${a}`, children: [
1188
1185
  /* @__PURE__ */ e("div", { className: "clarity-modal-scroll-indicator" }),
1189
1186
  t
1190
1187
  ] });
1191
- Dt.displayName = "Modal.Footer";
1192
- const Vt = ({ children: t, onClick: a }) => rt(t, {
1188
+ Ht.displayName = "Modal.Footer";
1189
+ const Dt = ({ children: t, onClick: a }) => rt(t, {
1193
1190
  onClick: (r) => {
1194
1191
  var l, n;
1195
1192
  a == null || a(), (n = (l = t.props).onClick) == null || n.call(l, r);
1196
1193
  }
1197
1194
  });
1198
- Vt.displayName = "Modal.Trigger";
1199
- const At = ({ children: t }) => {
1200
- const { onClose: a } = Wt();
1195
+ Dt.displayName = "Modal.Trigger";
1196
+ const Vt = ({ children: t }) => {
1197
+ const { onClose: a } = Ot();
1201
1198
  return rt(t, {
1202
1199
  onClick: (r) => {
1203
1200
  var l, n;
@@ -1205,7 +1202,7 @@ const At = ({ children: t }) => {
1205
1202
  }
1206
1203
  });
1207
1204
  };
1208
- At.displayName = "Modal.Close";
1205
+ Vt.displayName = "Modal.Close";
1209
1206
  const mt = ({
1210
1207
  isOpen: t,
1211
1208
  onClose: a,
@@ -1217,54 +1214,54 @@ const mt = ({
1217
1214
  showCloseButton: c = !0,
1218
1215
  closeOnOverlayClick: d = !0
1219
1216
  }) => {
1220
- const [i, u] = z(!1), p = t !== void 0 ? t : i, f = W.useCallback(() => {
1221
- a ? a() : u(!1);
1217
+ const [i, f] = A(!1), y = t !== void 0 ? t : i, u = I.useCallback(() => {
1218
+ a ? a() : f(!1);
1222
1219
  }, [a]);
1223
- Q(() => {
1224
- p && (r == null || r());
1225
- }, [p, r]), Q(() => {
1226
- const g = (C) => {
1227
- C.key === "Escape" && f();
1220
+ J(() => {
1221
+ y && (r == null || r());
1222
+ }, [y, r]), J(() => {
1223
+ const b = (_) => {
1224
+ _.key === "Escape" && u();
1228
1225
  };
1229
- return p ? (document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
1230
- document.removeEventListener("keydown", g), document.body.style.overflow = "unset";
1226
+ return y ? (document.addEventListener("keydown", b), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
1227
+ document.removeEventListener("keydown", b), document.body.style.overflow = "unset";
1231
1228
  };
1232
- }, [p, f]);
1233
- const b = (g) => {
1234
- d && g.target === g.currentTarget && f();
1235
- }, v = W.Children.toArray(l).find(
1236
- (g) => ot(g) && g.type.displayName === "Modal.Trigger"
1237
- ), N = W.Children.toArray(l).filter(
1238
- (g) => ot(g) && g.type.displayName !== "Modal.Trigger"
1229
+ }, [y, u]);
1230
+ const h = (b) => {
1231
+ d && b.target === b.currentTarget && u();
1232
+ }, w = I.Children.toArray(l).find(
1233
+ (b) => ot(b) && b.type.displayName === "Modal.Trigger"
1234
+ ), N = I.Children.toArray(l).filter(
1235
+ (b) => ot(b) && b.type.displayName !== "Modal.Trigger"
1239
1236
  ), m = ["clarity-modal", n, `clarity-modal--${s}`].filter(Boolean).join(" ");
1240
- return /* @__PURE__ */ w(Ot.Provider, { value: { onClose: f, variant: o, showCloseButton: c }, children: [
1241
- v && rt(v, { onClick: () => u(!0) }),
1242
- p && /* @__PURE__ */ e("div", { className: "clarity-modal-overlay", onClick: b, children: /* @__PURE__ */ e("div", { className: m, children: N }) })
1237
+ return /* @__PURE__ */ v(Rt.Provider, { value: { onClose: u, variant: o, showCloseButton: c }, children: [
1238
+ w && rt(w, { onClick: () => f(!0) }),
1239
+ y && /* @__PURE__ */ e("div", { className: "clarity-modal-overlay", onClick: h, children: /* @__PURE__ */ e("div", { className: m, children: N }) })
1243
1240
  ] });
1244
1241
  };
1245
- mt.Header = It;
1246
- mt.Content = Ht;
1247
- mt.Footer = Dt;
1248
- mt.Trigger = Vt;
1249
- mt.Close = At;
1242
+ mt.Header = Wt;
1243
+ mt.Content = It;
1244
+ mt.Footer = Ht;
1245
+ mt.Trigger = Dt;
1246
+ mt.Close = Vt;
1250
1247
  mt.displayName = "Modal";
1251
- const zt = ct(void 0), aa = () => {
1252
- const t = dt(zt);
1248
+ const At = ct(void 0), ea = () => {
1249
+ const t = dt(At);
1253
1250
  if (!t)
1254
1251
  throw new Error("useToast must be used within a ToastProvider");
1255
1252
  return t;
1256
- }, Oe = ({ id: t, message: a, variant: r, duration: l, onClose: n, invertColors: o }) => {
1257
- const [s, c] = z("entering");
1258
- Q(() => {
1253
+ }, Re = ({ id: t, message: a, variant: r, duration: l, onClose: n, invertColors: o }) => {
1254
+ const [s, c] = A("entering");
1255
+ J(() => {
1259
1256
  const i = setTimeout(() => {
1260
1257
  c("visible");
1261
- }, 10), u = setTimeout(() => {
1258
+ }, 10), f = setTimeout(() => {
1262
1259
  c("exiting");
1263
- }, l * 1e3 - 300), y = setTimeout(() => {
1260
+ }, l * 1e3 - 300), p = setTimeout(() => {
1264
1261
  n(t);
1265
1262
  }, l * 1e3);
1266
1263
  return () => {
1267
- clearTimeout(i), clearTimeout(u), clearTimeout(y);
1264
+ clearTimeout(i), clearTimeout(f), clearTimeout(p);
1268
1265
  };
1269
1266
  }, [t, l, n]);
1270
1267
  const d = [
@@ -1273,7 +1270,7 @@ const zt = ct(void 0), aa = () => {
1273
1270
  o ? "colored-background" : "",
1274
1271
  `cl-toast-${s}`
1275
1272
  ].filter(Boolean).join(" ");
1276
- return /* @__PURE__ */ w("div", { className: d, children: [
1273
+ return /* @__PURE__ */ v("div", { className: d, children: [
1277
1274
  /* @__PURE__ */ e("div", { className: "cl-toast-message", children: a }),
1278
1275
  /* @__PURE__ */ e("button", { onClick: () => c("exiting"), className: "cl-toast-close-button", children: "×" }),
1279
1276
  /* @__PURE__ */ e(
@@ -1284,51 +1281,51 @@ const zt = ct(void 0), aa = () => {
1284
1281
  }
1285
1282
  )
1286
1283
  ] });
1287
- }, ra = ({ children: t }) => {
1288
- const [a, r] = z([]), l = gt(() => {
1284
+ }, aa = ({ children: t }) => {
1285
+ const [a, r] = A([]), l = gt(() => {
1289
1286
  if (typeof document < "u") {
1290
1287
  const d = document.createElement("div");
1291
1288
  return d.id = "toast-portal-root", d;
1292
1289
  }
1293
1290
  return null;
1294
1291
  }, []);
1295
- Q(() => {
1292
+ J(() => {
1296
1293
  if (l)
1297
1294
  return document.body.appendChild(l), () => {
1298
1295
  document.body.removeChild(l);
1299
1296
  };
1300
1297
  }, [l]);
1301
1298
  const n = _t((d) => {
1302
- const u = {
1299
+ const f = {
1303
1300
  id: (/* @__PURE__ */ new Date()).toISOString() + Math.random(),
1304
1301
  // duration: 5,
1305
1302
  // position: 'right-top',
1306
1303
  ...d
1307
1304
  };
1308
- r((y) => {
1309
- const p = [u, ...y];
1310
- return p.length > 4 ? p.slice(0, 4) : p;
1305
+ r((p) => {
1306
+ const y = [f, ...p];
1307
+ return y.length > 4 ? y.slice(0, 4) : y;
1311
1308
  });
1312
1309
  }, []), o = _t((d) => {
1313
- r((i) => i.filter((u) => u.id !== d));
1310
+ r((i) => i.filter((f) => f.id !== d));
1314
1311
  }, []), s = gt(() => a.reduce((d, i) => (d[i.position] || (d[i.position] = []), d[i.position].push(i), d), {}), [a]), c = gt(() => ({ show: n }), [n]);
1315
- return /* @__PURE__ */ w(zt.Provider, { value: c, children: [
1312
+ return /* @__PURE__ */ v(At.Provider, { value: c, children: [
1316
1313
  t,
1317
- l && Ce.createPortal(
1318
- Object.entries(s).map(([d, i]) => /* @__PURE__ */ e("div", { className: `cl-toast-container ${d}`, children: i.map((u) => /* @__PURE__ */ e(Oe, { ...u, onClose: o }, u.id)) }, d)),
1314
+ l && Ne.createPortal(
1315
+ Object.entries(s).map(([d, i]) => /* @__PURE__ */ e("div", { className: `cl-toast-container ${d}`, children: i.map((f) => /* @__PURE__ */ e(Re, { ...f, onClose: o }, f.id)) }, d)),
1319
1316
  l
1320
1317
  )
1321
1318
  ] });
1322
- }, Mt = ct(null), Ft = () => {
1319
+ }, Mt = ct(null), zt = () => {
1323
1320
  const t = dt(Mt);
1324
1321
  if (!t)
1325
1322
  throw new Error("useOffcanvas must be used within an Offcanvas provider");
1326
1323
  return t;
1327
- }, Gt = ({
1324
+ }, Ft = ({
1328
1325
  children: t,
1329
1326
  className: a = ""
1330
1327
  }) => {
1331
- const { onClose: r, variant: l, showCloseButton: n, title: o } = Ft(), s = [
1328
+ const { onClose: r, variant: l, showCloseButton: n, title: o } = zt(), s = [
1332
1329
  "clarity-offcanvas-header",
1333
1330
  a
1334
1331
  ].filter(Boolean).join(" "), c = [
@@ -1338,7 +1335,7 @@ const zt = ct(void 0), aa = () => {
1338
1335
  "clarity-offcanvas-title",
1339
1336
  l && `clarity-offcanvas-title--${l}`
1340
1337
  ].filter(Boolean).join(" ");
1341
- return /* @__PURE__ */ w("div", { className: s, children: [
1338
+ return /* @__PURE__ */ v("div", { className: s, children: [
1342
1339
  o && /* @__PURE__ */ e("h2", { className: d, children: o }),
1343
1340
  t,
1344
1341
  n && /* @__PURE__ */ e("button", { className: c, onClick: (i) => {
@@ -1346,21 +1343,21 @@ const zt = ct(void 0), aa = () => {
1346
1343
  }, children: "×" })
1347
1344
  ] });
1348
1345
  };
1349
- Gt.displayName = "Offcanvas.Header";
1350
- const Ut = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-offcanvas-content ${a}`, children: t });
1351
- Ut.displayName = "Offcanvas.Content";
1352
- const Xt = ({ children: t, onClick: a, variant: r }) => rt(t, {
1346
+ Ft.displayName = "Offcanvas.Header";
1347
+ const Gt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-offcanvas-content ${a}`, children: t });
1348
+ Gt.displayName = "Offcanvas.Content";
1349
+ const Ut = ({ children: t, onClick: a, variant: r }) => rt(t, {
1353
1350
  onClick: (l) => {
1354
1351
  var n, o;
1355
1352
  a == null || a(), (o = (n = t.props).onClick) == null || o.call(n, l);
1356
1353
  },
1357
1354
  variant: r
1358
1355
  });
1359
- Xt.displayName = "Offcanvas.Trigger";
1360
- const xt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-offcanvas-footer ${a}`, children: t });
1361
- xt.displayName = "Offcanvas.Footer";
1362
- const Yt = ({ children: t }) => {
1363
- const { onClose: a } = Ft();
1356
+ Ut.displayName = "Offcanvas.Trigger";
1357
+ const $t = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-offcanvas-footer ${a}`, children: t });
1358
+ $t.displayName = "Offcanvas.Footer";
1359
+ const Xt = ({ children: t }) => {
1360
+ const { onClose: a } = zt();
1364
1361
  return rt(t, {
1365
1362
  onClick: (r) => {
1366
1363
  var l, n;
@@ -1368,7 +1365,7 @@ const Yt = ({ children: t }) => {
1368
1365
  }
1369
1366
  });
1370
1367
  };
1371
- Yt.displayName = "Offcanvas.Close";
1368
+ Xt.displayName = "Offcanvas.Close";
1372
1369
  const ht = ({
1373
1370
  isOpen: t,
1374
1371
  onClose: a,
@@ -1381,83 +1378,83 @@ const ht = ({
1381
1378
  showCloseButton: d = !0,
1382
1379
  title: i
1383
1380
  }) => {
1384
- const [u, y] = z(!1), [p, f] = z(!1), [b, v] = z(!1), N = t !== void 0, m = N ? t : u, g = _t(() => {
1385
- a ? a() : y(!1);
1386
- }, [a]), C = _t(() => {
1387
- N || y(!0), r == null || r();
1381
+ const [f, p] = A(!1), [y, u] = A(!1), [h, w] = A(!1), N = t !== void 0, m = N ? t : f, b = _t(() => {
1382
+ a ? a() : p(!1);
1383
+ }, [a]), _ = _t(() => {
1384
+ N || p(!0), r == null || r();
1388
1385
  }, [N, r]);
1389
- Q(() => {
1386
+ J(() => {
1390
1387
  if (m) {
1391
- v(!0);
1392
- const E = setTimeout(() => {
1393
- f(!0);
1388
+ w(!0);
1389
+ const R = setTimeout(() => {
1390
+ u(!0);
1394
1391
  }, 50);
1395
- return () => clearTimeout(E);
1392
+ return () => clearTimeout(R);
1396
1393
  } else {
1397
- f(!1);
1398
- const E = setTimeout(() => {
1399
- v(!1);
1394
+ u(!1);
1395
+ const R = setTimeout(() => {
1396
+ w(!1);
1400
1397
  }, 300);
1401
- return () => clearTimeout(E);
1398
+ return () => clearTimeout(R);
1402
1399
  }
1403
- }, [m]), Q(() => {
1404
- const E = (X) => {
1405
- X.key === "Escape" && g();
1400
+ }, [m]), J(() => {
1401
+ const R = (V) => {
1402
+ V.key === "Escape" && b();
1406
1403
  };
1407
- return m ? (document.addEventListener("keydown", E), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", E), document.body.style.overflow = "unset"), () => {
1408
- document.removeEventListener("keydown", E), document.body.style.overflow = "unset";
1404
+ return m ? (document.addEventListener("keydown", R), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", R), document.body.style.overflow = "unset"), () => {
1405
+ document.removeEventListener("keydown", R), document.body.style.overflow = "unset";
1409
1406
  };
1410
- }, [m, g]);
1411
- const x = (E) => {
1412
- c && E.target === E.currentTarget && g();
1413
- }, B = W.Children.toArray(l);
1414
- let k, j, $, S, _;
1415
- B.forEach((E) => {
1416
- if (ot(E))
1417
- if (E.type.displayName === "Offcanvas.Trigger")
1418
- k = E;
1419
- else if (E.type.displayName === "Offcanvas.Header")
1420
- j = E;
1421
- else if (E.type.displayName === "Offcanvas.Content") {
1422
- $ = E;
1423
- const L = W.Children.toArray($.props.children).filter((U) => ot(U) && U.type.displayName === "Offcanvas.Close" ? (_ = U, !1) : !0);
1424
- $ = rt($, { children: L });
1425
- } else E.type.displayName === "Offcanvas.Footer" && (S = E);
1426
- }), _ && (S ? S = rt(S, {
1427
- children: /* @__PURE__ */ w(St, { children: [
1428
- S.props.children,
1429
- _
1407
+ }, [m, b]);
1408
+ const x = (R) => {
1409
+ c && R.target === R.currentTarget && b();
1410
+ }, E = I.Children.toArray(l);
1411
+ let C, T, L, $, k;
1412
+ E.forEach((R) => {
1413
+ if (ot(R))
1414
+ if (R.type.displayName === "Offcanvas.Trigger")
1415
+ C = R;
1416
+ else if (R.type.displayName === "Offcanvas.Header")
1417
+ T = R;
1418
+ else if (R.type.displayName === "Offcanvas.Content") {
1419
+ L = R;
1420
+ const M = I.Children.toArray(L.props.children).filter((F) => ot(F) && F.type.displayName === "Offcanvas.Close" ? (k = F, !1) : !0);
1421
+ L = rt(L, { children: M });
1422
+ } else R.type.displayName === "Offcanvas.Footer" && ($ = R);
1423
+ }), k && ($ ? $ = rt($, {
1424
+ children: /* @__PURE__ */ v(jt, { children: [
1425
+ $.props.children,
1426
+ k
1430
1427
  ] })
1431
- }) : S = /* @__PURE__ */ e(xt, { children: _ }));
1432
- const M = [
1428
+ }) : $ = /* @__PURE__ */ e($t, { children: k }));
1429
+ const z = [
1433
1430
  "clarity-offcanvas",
1434
1431
  n,
1435
1432
  `clarity-offcanvas--${s}`,
1436
1433
  o && `clarity-offcanvas--${o}`,
1437
- p ? "clarity-offcanvas--open" : "clarity-offcanvas--closed"
1438
- ].filter(Boolean).join(" "), I = [
1434
+ y ? "clarity-offcanvas--open" : "clarity-offcanvas--closed"
1435
+ ].filter(Boolean).join(" "), H = [
1439
1436
  "clarity-offcanvas-overlay",
1440
- p ? "clarity-offcanvas-overlay--visible" : ""
1437
+ y ? "clarity-offcanvas-overlay--visible" : ""
1441
1438
  ].filter(Boolean).join(" ");
1442
- return /* @__PURE__ */ w(Mt.Provider, { value: { onClose: g, variant: o, showCloseButton: d, placement: s, title: i }, children: [
1443
- k && rt(k, { onClick: C, variant: o }),
1444
- b && // Only render if shouldRender is true
1445
- /* @__PURE__ */ e("div", { className: I, onClick: x, children: /* @__PURE__ */ w("div", { className: M, children: [
1446
- j,
1447
- $,
1448
- S && /* @__PURE__ */ e("div", { className: "clarity-offcanvas-scroll-indicator" }),
1439
+ return /* @__PURE__ */ v(Mt.Provider, { value: { onClose: b, variant: o, showCloseButton: d, placement: s, title: i }, children: [
1440
+ C && rt(C, { onClick: _, variant: o }),
1441
+ h && // Only render if shouldRender is true
1442
+ /* @__PURE__ */ e("div", { className: H, onClick: x, children: /* @__PURE__ */ v("div", { className: z, children: [
1443
+ T,
1444
+ L,
1445
+ $ && /* @__PURE__ */ e("div", { className: "clarity-offcanvas-scroll-indicator" }),
1449
1446
  " ",
1450
- S
1447
+ $
1451
1448
  ] }) })
1452
1449
  ] });
1453
1450
  };
1454
- ht.Header = Gt;
1455
- ht.Content = Ut;
1456
- ht.Footer = xt;
1457
- ht.Trigger = Xt;
1458
- ht.Close = Yt;
1451
+ ht.Header = Ft;
1452
+ ht.Content = Gt;
1453
+ ht.Footer = $t;
1454
+ ht.Trigger = Ut;
1455
+ ht.Close = Xt;
1459
1456
  ht.displayName = "Offcanvas";
1460
- const We = W.forwardRef(({
1457
+ const Oe = I.forwardRef(({
1461
1458
  type: t,
1462
1459
  variant: a = "primary",
1463
1460
  size: r = "medium",
@@ -1465,63 +1462,62 @@ const We = W.forwardRef(({
1465
1462
  helperText: n,
1466
1463
  helper: o = !1,
1467
1464
  helperPosition: s = "middle-right",
1468
- reserveErrorSpace: c = !1,
1469
- error: d = !1,
1470
- errorMessage: i,
1471
- labelPosition: u = "right",
1472
- className: y = "",
1465
+ error: c = !1,
1466
+ errorMessage: d,
1467
+ labelPosition: i = "right",
1468
+ className: f = "",
1473
1469
  disabled: p = !1,
1474
- checked: f,
1475
- id: b,
1476
- ...v
1477
- }, N) => {
1478
- const m = b || `check-input-${Math.random().toString(36).substr(2, 9)}`, g = [
1470
+ checked: y,
1471
+ id: u,
1472
+ ...h
1473
+ }, w) => {
1474
+ const N = u || `check-input-${Math.random().toString(36).substr(2, 9)}`, m = [
1479
1475
  "clarity-check-input-wrapper",
1480
- `clarity-check-input-wrapper--${u}`,
1476
+ `clarity-check-input-wrapper--${i}`,
1481
1477
  p && "clarity-check-input-wrapper--disabled",
1482
- d && "clarity-check-input-wrapper--error"
1483
- ].filter(Boolean).join(" "), C = [
1478
+ c && "clarity-check-input-wrapper--error"
1479
+ ].filter(Boolean).join(" "), b = [
1484
1480
  "clarity-check-input",
1485
1481
  `clarity-check-input--${t}`,
1486
1482
  `clarity-check-input--${r}`,
1487
1483
  a && `clarity-check-input--${a}`,
1488
- d && "clarity-check-input--error",
1484
+ c && "clarity-check-input--error",
1489
1485
  p && "clarity-check-input--disabled",
1490
- y
1491
- ].filter(Boolean).join(" "), x = [
1486
+ f
1487
+ ].filter(Boolean).join(" "), _ = [
1492
1488
  "clarity-check-input__label",
1493
1489
  `clarity-check-input__label--${r}`,
1494
1490
  p && "clarity-check-input__label--disabled"
1495
- ].filter(Boolean).join(" "), B = s != null && s.endsWith("left") ? "left" : "right", k = ($, S) => {
1491
+ ].filter(Boolean).join(" "), x = s != null && s.endsWith("left") ? "left" : "right", E = (T, L) => {
1496
1492
  if (!o) return null;
1497
- const _ = typeof o == "object" ? o : void 0, M = (_ == null ? void 0 : _.content) ?? "Ajuda", I = (_ == null ? void 0 : _.plain) === !0, E = _ == null ? void 0 : _.variant, X = _ == null ? void 0 : _.bgColor, L = _ == null ? void 0 : _.textColor;
1493
+ const $ = typeof o == "object" ? o : void 0, k = ($ == null ? void 0 : $.content) ?? "Ajuda", z = ($ == null ? void 0 : $.plain) === !0, H = $ == null ? void 0 : $.variant, R = $ == null ? void 0 : $.bgColor, V = $ == null ? void 0 : $.textColor;
1498
1494
  return /* @__PURE__ */ e(
1499
1495
  yt,
1500
1496
  {
1501
- content: M,
1502
- position: $ === "middle" ? S === "left" ? "left" : "right" : $ === "top" ? S === "left" ? "top-left" : "top-right" : S === "left" ? "bottom-left" : "bottom-right",
1497
+ content: k,
1498
+ position: T === "middle" ? L === "left" ? "left" : "right" : T === "top" ? L === "left" ? "top-left" : "top-right" : L === "left" ? "bottom-left" : "bottom-right",
1503
1499
  trigger: "hover",
1504
- variant: E || a,
1505
- plain: I,
1506
- bgColor: X,
1507
- textColor: L,
1508
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-check-input__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: $ === "middle" ? 20 : 16 }) })
1500
+ variant: H || a,
1501
+ plain: z,
1502
+ bgColor: R,
1503
+ textColor: V,
1504
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-check-input__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: T === "middle" ? 20 : 16 }) })
1509
1505
  }
1510
1506
  );
1511
- }, j = /* @__PURE__ */ w("label", { className: g, htmlFor: m, children: [
1507
+ }, C = /* @__PURE__ */ v("label", { className: m, htmlFor: N, children: [
1512
1508
  /* @__PURE__ */ e(
1513
1509
  "input",
1514
1510
  {
1515
- ref: N,
1516
- id: m,
1511
+ ref: w,
1512
+ id: N,
1517
1513
  type: t,
1518
- className: C,
1514
+ className: b,
1519
1515
  disabled: p,
1520
- checked: f,
1521
- ...v
1516
+ checked: y,
1517
+ ...h
1522
1518
  }
1523
1519
  ),
1524
- /* @__PURE__ */ w("div", { className: "clarity-check-input__custom", children: [
1520
+ /* @__PURE__ */ v("div", { className: "clarity-check-input__custom", children: [
1525
1521
  t === "checkbox" && /* @__PURE__ */ e(
1526
1522
  "svg",
1527
1523
  {
@@ -1543,112 +1539,111 @@ const We = W.forwardRef(({
1543
1539
  ),
1544
1540
  t === "radio" && /* @__PURE__ */ e("div", { className: "clarity-check-input__radio-dot" })
1545
1541
  ] }),
1546
- l && /* @__PURE__ */ e("span", { className: x, children: l })
1542
+ l && /* @__PURE__ */ e("span", { className: _, children: l })
1547
1543
  ] });
1548
- return /* @__PURE__ */ w("div", { className: "clarity-check-input-container", children: [
1549
- o && (s == null ? void 0 : s.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-check-input__helper-row clarity-check-input__helper-row--top clarity-check-input__helper-row--${B}`, children: k("top", B) }),
1550
- o && (s != null && s.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-check-input__middle-row clarity-check-input__middle-row--${B}`, children: [
1551
- B === "left" && k("middle", B),
1552
- j,
1553
- B === "right" && k("middle", B)
1554
- ] }) : j,
1555
- o && (s == null ? void 0 : s.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-check-input__helper-row clarity-check-input__helper-row--bottom clarity-check-input__helper-row--${B}`, children: k("bottom", B) }),
1556
- (n || d && i || c) && /* @__PURE__ */ e("div", { className: "clarity-check-input__helper-text", style: !n && !i ? { minHeight: "1.2em" } : void 0, children: (d && i ? i : n) || " " })
1544
+ return /* @__PURE__ */ v("div", { className: "clarity-check-input-container", children: [
1545
+ o && (s == null ? void 0 : s.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-check-input__helper-row clarity-check-input__helper-row--top clarity-check-input__helper-row--${x}`, children: E("top", x) }),
1546
+ o && (s != null && s.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-check-input__middle-row clarity-check-input__middle-row--${x}`, children: [
1547
+ x === "left" && E("middle", x),
1548
+ C,
1549
+ x === "right" && E("middle", x)
1550
+ ] }) : C,
1551
+ o && (s == null ? void 0 : s.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-check-input__helper-row clarity-check-input__helper-row--bottom clarity-check-input__helper-row--${x}`, children: E("bottom", x) }),
1552
+ (n || c && d) && /* @__PURE__ */ e("div", { className: "clarity-check-input__helper-text", children: c && d ? d : n })
1557
1553
  ] });
1558
1554
  });
1559
- We.displayName = "CheckInput";
1560
- const Ie = W.forwardRef(({
1555
+ Oe.displayName = "CheckInput";
1556
+ const We = I.forwardRef(({
1561
1557
  variant: t = "primary",
1562
1558
  size: a = "medium",
1563
1559
  label: r,
1564
1560
  helper: l = !1,
1565
1561
  helperPosition: n = "middle-right",
1566
- reserveErrorSpace: o = !1,
1567
- error: s = !1,
1568
- errorMessage: c,
1569
- labelPosition: d = "right",
1570
- className: i = "",
1571
- disabled: u = !1,
1572
- checked: y,
1562
+ error: o = !1,
1563
+ errorMessage: s,
1564
+ labelPosition: c = "right",
1565
+ className: d = "",
1566
+ disabled: i = !1,
1567
+ checked: f,
1573
1568
  id: p,
1574
- ...f
1575
- }, b) => {
1576
- const v = p || `input-switch-${Math.random().toString(36).substr(2, 9)}`, N = [
1569
+ ...y
1570
+ }, u) => {
1571
+ const h = p || `input-switch-${Math.random().toString(36).substr(2, 9)}`, w = [
1577
1572
  "clarity-input-switch-wrapper",
1578
- `clarity-input-switch-wrapper--${d}`,
1579
- u && "clarity-input-switch-wrapper--disabled",
1580
- s && "clarity-input-switch-wrapper--error"
1581
- ].filter(Boolean).join(" "), m = [
1573
+ `clarity-input-switch-wrapper--${c}`,
1574
+ i && "clarity-input-switch-wrapper--disabled",
1575
+ o && "clarity-input-switch-wrapper--error"
1576
+ ].filter(Boolean).join(" "), N = [
1582
1577
  "clarity-input-switch",
1583
1578
  `clarity-input-switch--${a}`,
1584
1579
  t && `clarity-input-switch--${t}`,
1585
- s && "clarity-input-switch--error",
1586
- u && "clarity-input-switch--disabled",
1587
- i
1588
- ].filter(Boolean).join(" "), g = [
1580
+ o && "clarity-input-switch--error",
1581
+ i && "clarity-input-switch--disabled",
1582
+ d
1583
+ ].filter(Boolean).join(" "), m = [
1589
1584
  "clarity-input-switch__label",
1590
1585
  `clarity-input-switch__label--${a}`,
1591
1586
  t && `clarity-input-switch__label--${t}`,
1592
- u && "clarity-input-switch__label--disabled"
1593
- ].filter(Boolean).join(" "), C = n != null && n.endsWith("left") ? "left" : "right", x = (k, j) => {
1587
+ i && "clarity-input-switch__label--disabled"
1588
+ ].filter(Boolean).join(" "), b = n != null && n.endsWith("left") ? "left" : "right", _ = (E, C) => {
1594
1589
  if (!l) return null;
1595
- const $ = typeof l == "object" ? l : void 0, S = ($ == null ? void 0 : $.content) ?? "Ajuda", _ = ($ == null ? void 0 : $.plain) === !0, M = $ == null ? void 0 : $.variant, I = $ == null ? void 0 : $.bgColor, E = $ == null ? void 0 : $.textColor;
1590
+ const T = typeof l == "object" ? l : void 0, L = (T == null ? void 0 : T.content) ?? "Ajuda", $ = (T == null ? void 0 : T.plain) === !0, k = T == null ? void 0 : T.variant, z = T == null ? void 0 : T.bgColor, H = T == null ? void 0 : T.textColor;
1596
1591
  return /* @__PURE__ */ e(
1597
1592
  yt,
1598
1593
  {
1599
- content: S,
1600
- position: k === "middle" ? j === "left" ? "left" : "right" : k === "top" ? j === "left" ? "top-left" : "top-right" : j === "left" ? "bottom-left" : "bottom-right",
1594
+ content: L,
1595
+ position: E === "middle" ? C === "left" ? "left" : "right" : E === "top" ? C === "left" ? "top-left" : "top-right" : C === "left" ? "bottom-left" : "bottom-right",
1601
1596
  trigger: "hover",
1602
- variant: M || t,
1603
- plain: _,
1604
- bgColor: I,
1605
- textColor: E,
1606
- children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-input-switch__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: k === "middle" ? 20 : 16 }) })
1597
+ variant: k || t,
1598
+ plain: $,
1599
+ bgColor: z,
1600
+ textColor: H,
1601
+ children: /* @__PURE__ */ e("button", { type: "button", className: "clarity-input-switch__helper-icon", "aria-label": "Helper", children: /* @__PURE__ */ e(pt, { size: E === "middle" ? 20 : 16 }) })
1607
1602
  }
1608
1603
  );
1609
- }, B = /* @__PURE__ */ w("label", { className: N, htmlFor: v, children: [
1604
+ }, x = /* @__PURE__ */ v("label", { className: w, htmlFor: h, children: [
1610
1605
  /* @__PURE__ */ e(
1611
1606
  "input",
1612
1607
  {
1613
- ref: b,
1614
- id: v,
1608
+ ref: u,
1609
+ id: h,
1615
1610
  type: "checkbox",
1616
- className: m,
1617
- disabled: u,
1618
- checked: y,
1619
- ...f
1611
+ className: N,
1612
+ disabled: i,
1613
+ checked: f,
1614
+ ...y
1620
1615
  }
1621
1616
  ),
1622
1617
  /* @__PURE__ */ e("div", { className: "clarity-input-switch__track", children: /* @__PURE__ */ e("div", { className: "clarity-input-switch__thumb" }) }),
1623
- r && /* @__PURE__ */ e("span", { className: g, children: r })
1618
+ r && /* @__PURE__ */ e("span", { className: m, children: r })
1624
1619
  ] });
1625
- return /* @__PURE__ */ w("div", { className: "clarity-input-switch-container", children: [
1626
- l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-input-switch__helper-row clarity-input-switch__helper-row--top clarity-input-switch__helper-row--${C}`, children: x("top", C) }),
1627
- l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ w("div", { className: `clarity-input-switch__middle-row clarity-input-switch__middle-row--${C}`, children: [
1628
- C === "left" && x("middle", C),
1629
- B,
1630
- C === "right" && x("middle", C)
1631
- ] }) : B,
1632
- l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-input-switch__helper-row clarity-input-switch__helper-row--bottom clarity-input-switch__helper-row--${C}`, children: x("bottom", C) }),
1633
- (s && c || o) && /* @__PURE__ */ e("div", { className: "clarity-input-switch__error-text", style: c ? void 0 : { minHeight: "1.2em" }, children: c || " " })
1620
+ return /* @__PURE__ */ v("div", { className: "clarity-input-switch-container", children: [
1621
+ l && (n == null ? void 0 : n.startsWith("top")) && /* @__PURE__ */ e("div", { className: `clarity-input-switch__helper-row clarity-input-switch__helper-row--top clarity-input-switch__helper-row--${b}`, children: _("top", b) }),
1622
+ l && (n != null && n.startsWith("middle")) ? /* @__PURE__ */ v("div", { className: `clarity-input-switch__middle-row clarity-input-switch__middle-row--${b}`, children: [
1623
+ b === "left" && _("middle", b),
1624
+ x,
1625
+ b === "right" && _("middle", b)
1626
+ ] }) : x,
1627
+ l && (n == null ? void 0 : n.startsWith("bottom")) && /* @__PURE__ */ e("div", { className: `clarity-input-switch__helper-row clarity-input-switch__helper-row--bottom clarity-input-switch__helper-row--${b}`, children: _("bottom", b) }),
1628
+ o && s && /* @__PURE__ */ e("div", { className: "clarity-input-switch__error-text", children: s })
1634
1629
  ] });
1635
1630
  });
1636
- Ie.displayName = "InputSwitch";
1637
- const Zt = ct(null), wt = () => {
1638
- const t = dt(Zt);
1631
+ We.displayName = "InputSwitch";
1632
+ const Yt = ct(null), wt = () => {
1633
+ const t = dt(Yt);
1639
1634
  if (!t)
1640
1635
  throw new Error("useConfirmationDialog must be used within a ConfirmationDialog provider");
1641
1636
  return t;
1642
- }, qt = ({ children: t, className: a = "" }) => {
1637
+ }, Zt = ({ children: t, className: a = "" }) => {
1643
1638
  const { variant: r } = wt(), l = `clarity-confirmation-dialog-header ${a} clarity-confirmation-dialog-header--${r}`;
1644
1639
  return /* @__PURE__ */ e("div", { className: l, children: t });
1645
1640
  };
1646
- qt.displayName = "ConfirmationDialog.Header";
1647
- const Jt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-confirmation-dialog-content ${a}`, children: t });
1648
- Jt.displayName = "ConfirmationDialog.Content";
1649
- const Qt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-confirmation-dialog-footer ${a}`, children: t });
1650
- Qt.displayName = "ConfirmationDialog.Footer";
1651
- const Kt = ({ children: t }) => {
1641
+ Zt.displayName = "ConfirmationDialog.Header";
1642
+ const qt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-confirmation-dialog-content ${a}`, children: t });
1643
+ qt.displayName = "ConfirmationDialog.Content";
1644
+ const Jt = ({ children: t, className: a = "" }) => /* @__PURE__ */ e("div", { className: `clarity-confirmation-dialog-footer ${a}`, children: t });
1645
+ Jt.displayName = "ConfirmationDialog.Footer";
1646
+ const Qt = ({ children: t }) => {
1652
1647
  const { onOpen: a } = wt();
1653
1648
  return rt(t, {
1654
1649
  onClick: (r) => {
@@ -1657,8 +1652,8 @@ const Kt = ({ children: t }) => {
1657
1652
  }
1658
1653
  });
1659
1654
  };
1660
- Kt.displayName = "ConfirmationDialog.Trigger";
1661
- const Pt = ({ children: t }) => {
1655
+ Qt.displayName = "ConfirmationDialog.Trigger";
1656
+ const Kt = ({ children: t }) => {
1662
1657
  const { onClose: a } = wt();
1663
1658
  return rt(t, {
1664
1659
  onClick: (r) => {
@@ -1667,8 +1662,8 @@ const Pt = ({ children: t }) => {
1667
1662
  }
1668
1663
  });
1669
1664
  };
1670
- Pt.displayName = "ConfirmationDialog.Close";
1671
- const te = ({ children: t }) => {
1665
+ Kt.displayName = "ConfirmationDialog.Close";
1666
+ const Pt = ({ children: t }) => {
1672
1667
  const { onConfirm: a } = wt();
1673
1668
  return rt(t, {
1674
1669
  onClick: (r) => {
@@ -1677,7 +1672,7 @@ const te = ({ children: t }) => {
1677
1672
  }
1678
1673
  });
1679
1674
  };
1680
- te.displayName = "ConfirmationDialog.Confirm";
1675
+ Pt.displayName = "ConfirmationDialog.Confirm";
1681
1676
  const ut = ({
1682
1677
  isOpen: t,
1683
1678
  onClose: a,
@@ -1686,39 +1681,39 @@ const ut = ({
1686
1681
  children: n,
1687
1682
  blockScroll: o = !0
1688
1683
  }) => {
1689
- const [s, c] = z(!1), d = t !== void 0, i = d ? t : s, u = () => {
1684
+ const [s, c] = A(!1), d = t !== void 0, i = d ? t : s, f = () => {
1690
1685
  d || c(!0);
1691
- }, y = W.useCallback(() => {
1686
+ }, p = I.useCallback(() => {
1692
1687
  a ? a() : c(!1);
1693
- }, [a]), p = () => {
1694
- r && r(), y();
1688
+ }, [a]), y = () => {
1689
+ r && r(), p();
1695
1690
  };
1696
- Q(() => {
1691
+ J(() => {
1697
1692
  const N = (m) => {
1698
- m.key === "Escape" && y();
1693
+ m.key === "Escape" && p();
1699
1694
  };
1700
1695
  return i ? (document.addEventListener("keydown", N), o && (document.body.style.overflow = "hidden")) : document.body.style.overflow = "unset", () => {
1701
1696
  document.removeEventListener("keydown", N), document.body.style.overflow = "unset";
1702
1697
  };
1703
- }, [i, y, o]);
1704
- const f = W.Children.toArray(n).find(
1698
+ }, [i, p, o]);
1699
+ const u = I.Children.toArray(n).find(
1705
1700
  (N) => ot(N) && N.type.displayName === "ConfirmationDialog.Trigger"
1706
- ), b = W.Children.toArray(n).filter(
1701
+ ), h = I.Children.toArray(n).filter(
1707
1702
  (N) => ot(N) && N.type.displayName !== "ConfirmationDialog.Trigger"
1708
- ), v = `clarity-confirmation-dialog clarity-confirmation-dialog--${l}`;
1709
- return /* @__PURE__ */ w(Zt.Provider, { value: { variant: l, onClose: y, onConfirm: p, onOpen: u }, children: [
1710
- f,
1711
- i && /* @__PURE__ */ e("div", { className: "clarity-modal-overlay", children: /* @__PURE__ */ e("div", { className: v, children: b }) })
1703
+ ), w = `clarity-confirmation-dialog clarity-confirmation-dialog--${l}`;
1704
+ return /* @__PURE__ */ v(Yt.Provider, { value: { variant: l, onClose: p, onConfirm: y, onOpen: f }, children: [
1705
+ u,
1706
+ i && /* @__PURE__ */ e("div", { className: "clarity-modal-overlay", children: /* @__PURE__ */ e("div", { className: w, children: h }) })
1712
1707
  ] });
1713
1708
  };
1714
- ut.Header = qt;
1715
- ut.Content = Jt;
1716
- ut.Footer = Qt;
1717
- ut.Trigger = Kt;
1718
- ut.Close = Pt;
1719
- ut.Confirm = te;
1709
+ ut.Header = Zt;
1710
+ ut.Content = qt;
1711
+ ut.Footer = Jt;
1712
+ ut.Trigger = Qt;
1713
+ ut.Close = Kt;
1714
+ ut.Confirm = Pt;
1720
1715
  ut.displayName = "ConfirmationDialog";
1721
- const la = ({
1716
+ const ra = ({
1722
1717
  variant: t = "primary",
1723
1718
  size: a = "medium",
1724
1719
  disabled: r = !1,
@@ -1729,36 +1724,36 @@ const la = ({
1729
1724
  className: c = "",
1730
1725
  "aria-label": d,
1731
1726
  title: i,
1732
- customColor: u,
1733
- customColorHover: y,
1734
- ...p
1727
+ customColor: f,
1728
+ customColorHover: p,
1729
+ ...y
1735
1730
  }) => {
1736
- const f = "clarity-button-icon", b = [
1737
- f,
1738
- !u && `${f}--${t}`,
1739
- `${f}--${a}`,
1740
- l && `${f}--loading`,
1741
- r && `${f}--disabled`,
1731
+ const u = "clarity-button-icon", h = [
1732
+ u,
1733
+ !f && `${u}--${t}`,
1734
+ `${u}--${a}`,
1735
+ l && `${u}--loading`,
1736
+ r && `${u}--disabled`,
1742
1737
  c
1743
- ].filter(Boolean).join(" "), v = {};
1744
- return u && (v["--button-icon-bg"] = u, v["--button-icon-hover-bg"] = y || `${u}E6`), /* @__PURE__ */ w(
1738
+ ].filter(Boolean).join(" "), w = {};
1739
+ return f && (w["--button-icon-bg"] = f, w["--button-icon-hover-bg"] = p || `${f}E6`), /* @__PURE__ */ v(
1745
1740
  "button",
1746
1741
  {
1747
- className: b,
1742
+ className: h,
1748
1743
  disabled: r || l,
1749
1744
  onClick: o,
1750
1745
  type: s,
1751
1746
  "aria-label": d,
1752
1747
  title: i,
1753
- style: v,
1754
- ...p,
1748
+ style: w,
1749
+ ...y,
1755
1750
  children: [
1756
- l && /* @__PURE__ */ e("div", { className: `${f}__spinner` }),
1751
+ l && /* @__PURE__ */ e("div", { className: `${u}__spinner` }),
1757
1752
  !l && n
1758
1753
  ]
1759
1754
  }
1760
1755
  );
1761
- }, na = ({
1756
+ }, la = ({
1762
1757
  variant: t = "primary",
1763
1758
  product: a,
1764
1759
  tone: r,
@@ -1769,20 +1764,20 @@ const la = ({
1769
1764
  onClick: c,
1770
1765
  href: d,
1771
1766
  target: i,
1772
- rel: u,
1773
- className: y = "",
1774
- ...p
1767
+ rel: f,
1768
+ className: p = "",
1769
+ ...y
1775
1770
  }) => {
1776
- const f = "clarity-button-link", b = a && r, v = b ? `${f}--custom` : `${f}--${t}`, N = [
1777
- f,
1778
- v,
1779
- `${f}--${n}`,
1780
- o && `${f}--disabled`,
1781
- y
1782
- ].filter(Boolean).join(" "), m = (C) => {
1783
- const x = parseInt(C);
1771
+ const u = "clarity-button-link", h = a && r, w = h ? `${u}--custom` : `${u}--${t}`, N = [
1772
+ u,
1773
+ w,
1774
+ `${u}--${n}`,
1775
+ o && `${u}--disabled`,
1776
+ p
1777
+ ].filter(Boolean).join(" "), m = (_) => {
1778
+ const x = parseInt(_);
1784
1779
  return x >= 800 ? "900" : x >= 700 ? "800" : x >= 600 ? "700" : x >= 500 ? "600" : x >= 400 ? "500" : x >= 300 ? "400" : x >= 200 ? "300" : "200";
1785
- }, g = b ? {
1780
+ }, b = h ? {
1786
1781
  "--custom-color": `var(--clarity-${a}-${r})`,
1787
1782
  "--custom-hover-color": `var(--clarity-${a}-${l || m(r)})`
1788
1783
  } : {};
@@ -1791,30 +1786,30 @@ const la = ({
1791
1786
  {
1792
1787
  href: d,
1793
1788
  target: i,
1794
- rel: u || (i === "_blank" ? "noopener noreferrer" : void 0),
1789
+ rel: f || (i === "_blank" ? "noopener noreferrer" : void 0),
1795
1790
  className: N,
1796
- style: g,
1791
+ style: b,
1797
1792
  onClick: o ? void 0 : c,
1798
- ...p,
1793
+ ...y,
1799
1794
  children: s
1800
1795
  }
1801
1796
  ) : /* @__PURE__ */ e(
1802
1797
  "button",
1803
1798
  {
1804
1799
  className: N,
1805
- style: g,
1800
+ style: b,
1806
1801
  disabled: o,
1807
1802
  onClick: c,
1808
- ...p,
1803
+ ...y,
1809
1804
  children: s
1810
1805
  }
1811
1806
  );
1812
- }, ee = ct(void 0), ae = () => {
1813
- const t = dt(ee);
1807
+ }, te = ct(void 0), ee = () => {
1808
+ const t = dt(te);
1814
1809
  if (!t)
1815
1810
  throw new Error("Accordion components must be used within an Accordion");
1816
1811
  return t;
1817
- }, He = ({
1812
+ }, Ie = ({
1818
1813
  variant: t = "primary",
1819
1814
  product: a,
1820
1815
  tone: r,
@@ -1825,26 +1820,26 @@ const la = ({
1825
1820
  className: c = "",
1826
1821
  children: d,
1827
1822
  onSelect: i,
1828
- ...u
1823
+ ...f
1829
1824
  }) => {
1830
- const [y, p] = z(() => n ? Array.isArray(n) ? n : [n] : []), f = (B) => {
1831
- let k;
1832
- o ? k = y.includes(B) ? y.filter((j) => j !== B) : [...y, B] : k = y.includes(B) ? [] : [B], p(k), i && i(y.includes(B) ? null : B, {});
1833
- }, b = "clarity-accordion", v = a && r, N = v ? `${b}--custom` : `${b}--${t}`, m = [
1834
- b,
1825
+ const [p, y] = A(() => n ? Array.isArray(n) ? n : [n] : []), u = (E) => {
1826
+ let C;
1827
+ o ? C = p.includes(E) ? p.filter((T) => T !== E) : [...p, E] : C = p.includes(E) ? [] : [E], y(C), i && i(p.includes(E) ? null : E, {});
1828
+ }, h = "clarity-accordion", w = a && r, N = w ? `${h}--custom` : `${h}--${t}`, m = [
1829
+ h,
1835
1830
  N,
1836
- s && `${b}--flush`,
1831
+ s && `${h}--flush`,
1837
1832
  c
1838
- ].filter(Boolean).join(" "), g = (B) => {
1839
- const k = parseInt(B);
1840
- return k >= 800 ? "900" : k >= 700 ? "800" : k >= 600 ? "700" : k >= 500 ? "600" : k >= 400 ? "500" : k >= 300 ? "400" : k >= 200 ? "300" : "200";
1841
- }, C = v ? {
1833
+ ].filter(Boolean).join(" "), b = (E) => {
1834
+ const C = parseInt(E);
1835
+ return C >= 800 ? "900" : C >= 700 ? "800" : C >= 600 ? "700" : C >= 500 ? "600" : C >= 400 ? "500" : C >= 300 ? "400" : C >= 200 ? "300" : "200";
1836
+ }, _ = w ? {
1842
1837
  "--custom-border-color": `var(--clarity-${a}-${r})`,
1843
1838
  "--custom-header-color": `var(--clarity-${a}-${r})`,
1844
- "--custom-hover-color": `var(--clarity-${a}-${l || g(r)})`
1839
+ "--custom-hover-color": `var(--clarity-${a}-${l || b(r)})`
1845
1840
  } : {}, x = {
1846
- activeKeys: y,
1847
- toggleItem: f,
1841
+ activeKeys: p,
1842
+ toggleItem: u,
1848
1843
  alwaysOpen: o,
1849
1844
  variant: t,
1850
1845
  product: a,
@@ -1852,27 +1847,27 @@ const la = ({
1852
1847
  hoverTone: l,
1853
1848
  flush: s
1854
1849
  };
1855
- return /* @__PURE__ */ e(ee.Provider, { value: x, children: /* @__PURE__ */ e("div", { className: m, style: C, ...u, children: d }) });
1856
- }, De = ({
1850
+ return /* @__PURE__ */ e(te.Provider, { value: x, children: /* @__PURE__ */ e("div", { className: m, style: _, ...f, children: d }) });
1851
+ }, He = ({
1857
1852
  eventKey: t,
1858
1853
  disabled: a = !1,
1859
1854
  className: r = "",
1860
1855
  children: l,
1861
1856
  ...n
1862
1857
  }) => {
1863
- const { activeKeys: o } = ae(), s = "clarity-accordion", c = o.includes(t), d = [
1858
+ const { activeKeys: o } = ee(), s = "clarity-accordion", c = o.includes(t), d = [
1864
1859
  `${s}__item`,
1865
1860
  c && `${s}__item--active`,
1866
1861
  a && `${s}__item--disabled`,
1867
1862
  r
1868
1863
  ].filter(Boolean).join(" ");
1869
- return /* @__PURE__ */ e("div", { className: d, ...n, children: W.Children.map(l, (i) => W.isValidElement(i) ? W.cloneElement(i, {
1864
+ return /* @__PURE__ */ e("div", { className: d, ...n, children: I.Children.map(l, (i) => I.isValidElement(i) ? I.cloneElement(i, {
1870
1865
  ...i.props,
1871
1866
  eventKey: t,
1872
1867
  disabled: a,
1873
1868
  isActive: c
1874
1869
  }) : i) });
1875
- }, Ve = ({
1870
+ }, De = ({
1876
1871
  className: t = "",
1877
1872
  children: a,
1878
1873
  onClick: r,
@@ -1881,10 +1876,10 @@ const la = ({
1881
1876
  isActive: o = !1,
1882
1877
  ...s
1883
1878
  }) => {
1884
- const { toggleItem: c } = ae(), d = "clarity-accordion", i = (u) => {
1885
- !n && l && c(l), r == null || r(u);
1879
+ const { toggleItem: c } = ee(), d = "clarity-accordion", i = (f) => {
1880
+ !n && l && c(l), r == null || r(f);
1886
1881
  };
1887
- return /* @__PURE__ */ w(
1882
+ return /* @__PURE__ */ v(
1888
1883
  "button",
1889
1884
  {
1890
1885
  className: [`${d}__header`, t].filter(Boolean).join(" "),
@@ -1909,7 +1904,7 @@ const la = ({
1909
1904
  ]
1910
1905
  }
1911
1906
  );
1912
- }, Ae = ({
1907
+ }, Ve = ({
1913
1908
  className: t = "",
1914
1909
  children: a,
1915
1910
  eventKey: r,
@@ -1928,19 +1923,19 @@ const la = ({
1928
1923
  children: /* @__PURE__ */ e("div", { className: [`${o}__body`, t].filter(Boolean).join(" "), ...n, children: a })
1929
1924
  }
1930
1925
  );
1931
- }, ia = Object.assign(He, {
1932
- Item: De,
1933
- Header: Ve,
1934
- Body: Ae
1935
- }), re = ct(
1926
+ }, na = Object.assign(Ie, {
1927
+ Item: He,
1928
+ Header: De,
1929
+ Body: Ve
1930
+ }), ae = ct(
1936
1931
  void 0
1937
- ), le = () => {
1938
- const t = dt(re);
1932
+ ), re = () => {
1933
+ const t = dt(ae);
1939
1934
  if (!t)
1940
1935
  throw new Error("useDropdown must be used within a DropdownProvider");
1941
1936
  return t;
1942
- }, ze = ({ children: t }) => {
1943
- const { setIsOpen: a, triggerRef: r } = le();
1937
+ }, Ae = ({ children: t }) => {
1938
+ const { setIsOpen: a, triggerRef: r } = re();
1944
1939
  return /* @__PURE__ */ e(
1945
1940
  "button",
1946
1941
  {
@@ -1953,43 +1948,43 @@ const la = ({
1953
1948
  }
1954
1949
  );
1955
1950
  }, Me = ({ children: t }) => {
1956
- const { isOpen: a, contentRef: r, styles: l } = le();
1951
+ const { isOpen: a, contentRef: r, styles: l } = re();
1957
1952
  return a ? /* @__PURE__ */ e("div", { ref: r, className: "dropdown__content", style: l, children: t }) : null;
1958
- }, Fe = ({ children: t }) => /* @__PURE__ */ e("div", { className: "dropdown__menu", children: t }), Ge = ({ as: t, children: a, ...r }) => /* @__PURE__ */ e(t || "a", { ...r, className: "dropdown__item", children: a }), Ue = () => /* @__PURE__ */ e("hr", { className: "dropdown__separator" }), vt = ({ title: t, position: a = "bottom", children: r }) => {
1959
- const [l, n] = z(!1), [o, s] = z({}), c = at(null), d = at(null), i = at(null);
1960
- return Et(() => {
1953
+ }, ze = ({ children: t }) => /* @__PURE__ */ e("div", { className: "dropdown__menu", children: t }), Fe = ({ as: t, children: a, ...r }) => /* @__PURE__ */ e(t || "a", { ...r, className: "dropdown__item", children: a }), Ge = () => /* @__PURE__ */ e("hr", { className: "dropdown__separator" }), vt = ({ title: t, position: a = "bottom", children: r }) => {
1954
+ const [l, n] = A(!1), [o, s] = A({}), c = et(null), d = et(null), i = et(null);
1955
+ return St(() => {
1961
1956
  if (l) {
1962
- const u = d.current, y = i.current;
1963
- if (!u || !y) return;
1964
- const p = u.getBoundingClientRect(), f = y.getBoundingClientRect(), b = window.innerHeight, v = window.innerWidth;
1957
+ const f = d.current, p = i.current;
1958
+ if (!f || !p) return;
1959
+ const y = f.getBoundingClientRect(), u = p.getBoundingClientRect(), h = window.innerHeight, w = window.innerWidth;
1965
1960
  let N = a;
1966
- a === "bottom" && p.bottom + f.height > b && (N = "top"), a === "top" && p.top - f.height < 0 && (N = "bottom"), a === "right" && p.right + f.width > v && (N = "left"), a === "left" && p.left - f.width < 0 && (N = "right");
1961
+ a === "bottom" && y.bottom + u.height > h && (N = "top"), a === "top" && y.top - u.height < 0 && (N = "bottom"), a === "right" && y.right + u.width > w && (N = "left"), a === "left" && y.left - u.width < 0 && (N = "right");
1967
1962
  const m = {};
1968
1963
  switch (N) {
1969
1964
  case "top":
1970
- m.bottom = p.height + 4, m.left = p.width / 2 - f.width / 2;
1965
+ m.bottom = y.height + 4, m.left = y.width / 2 - u.width / 2;
1971
1966
  break;
1972
1967
  case "right":
1973
- m.left = p.width + 4, m.top = p.height / 2 - f.height / 2;
1968
+ m.left = y.width + 4, m.top = y.height / 2 - u.height / 2;
1974
1969
  break;
1975
1970
  case "left":
1976
- m.right = p.width + 4, m.top = p.height / 2 - f.height / 2;
1971
+ m.right = y.width + 4, m.top = y.height / 2 - u.height / 2;
1977
1972
  break;
1978
1973
  case "bottom":
1979
1974
  default:
1980
- m.top = p.height + 4, m.left = p.width / 2 - f.width / 2;
1975
+ m.top = y.height + 4, m.left = y.width / 2 - u.width / 2;
1981
1976
  break;
1982
1977
  }
1983
1978
  s(m);
1984
1979
  }
1985
- }, [l, a]), Q(() => {
1986
- const u = (y) => {
1987
- c.current && !c.current.contains(y.target) && n(!1);
1980
+ }, [l, a]), J(() => {
1981
+ const f = (p) => {
1982
+ c.current && !c.current.contains(p.target) && n(!1);
1988
1983
  };
1989
- return document.addEventListener("mousedown", u), () => {
1990
- document.removeEventListener("mousedown", u);
1984
+ return document.addEventListener("mousedown", f), () => {
1985
+ document.removeEventListener("mousedown", f);
1991
1986
  };
1992
- }, []), /* @__PURE__ */ e(re.Provider, { value: { isOpen: l, setIsOpen: n, triggerRef: d, contentRef: i, styles: o }, children: /* @__PURE__ */ e(
1987
+ }, []), /* @__PURE__ */ e(ae.Provider, { value: { isOpen: l, setIsOpen: n, triggerRef: d, contentRef: i, styles: o }, children: /* @__PURE__ */ e(
1993
1988
  "div",
1994
1989
  {
1995
1990
  ref: c,
@@ -1999,12 +1994,12 @@ const la = ({
1999
1994
  }
2000
1995
  ) });
2001
1996
  };
2002
- vt.Trigger = ze;
1997
+ vt.Trigger = Ae;
2003
1998
  vt.Content = Me;
2004
- vt.Menu = Fe;
2005
- vt.Item = Ge;
2006
- vt.Separator = Ue;
2007
- const kt = ({
1999
+ vt.Menu = ze;
2000
+ vt.Item = Fe;
2001
+ vt.Separator = Ge;
2002
+ const xt = ({
2008
2003
  as: t = "button",
2009
2004
  id: a,
2010
2005
  children: r,
@@ -2037,8 +2032,8 @@ const kt = ({
2037
2032
  }
2038
2033
  );
2039
2034
  };
2040
- kt.displayName = "Tabs.Tab";
2041
- const ne = ({
2035
+ xt.displayName = "Tabs.Tab";
2036
+ const le = ({
2042
2037
  children: t,
2043
2038
  activeTab: a,
2044
2039
  onTabChange: r,
@@ -2054,29 +2049,29 @@ const ne = ({
2054
2049
  s,
2055
2050
  `orientation-${n}`,
2056
2051
  n === "horizontal" ? c : ""
2057
- ].filter(Boolean).join(" "), i = [], u = [];
2058
- return Ne.forEach(t, (y) => {
2059
- ot(y) && y.type === kt ? i.push(y) : u.push(y);
2060
- }), /* @__PURE__ */ w("div", { className: d, children: [
2052
+ ].filter(Boolean).join(" "), i = [], f = [];
2053
+ return we.forEach(t, (p) => {
2054
+ ot(p) && p.type === xt ? i.push(p) : f.push(p);
2055
+ }), /* @__PURE__ */ v("div", { className: d, children: [
2061
2056
  /* @__PURE__ */ e("div", { className: "clarity-tab-list", role: "tablist", children: i.map(
2062
- (y) => rt(y, {
2063
- isActive: W.isValidElement(y) && y.props.id === a,
2057
+ (p) => rt(p, {
2058
+ isActive: I.isValidElement(p) && p.props.id === a,
2064
2059
  onClick: r,
2065
2060
  variant: l,
2066
2061
  orientation: n
2067
2062
  })
2068
2063
  ) }),
2069
- u
2064
+ f
2070
2065
  ] });
2071
2066
  };
2072
- ne.Tab = kt;
2073
- ne.displayName = "Tabs";
2074
- const ie = ct(null), bt = () => {
2075
- const t = dt(ie);
2067
+ le.Tab = xt;
2068
+ le.displayName = "Tabs";
2069
+ const ne = ct(null), bt = () => {
2070
+ const t = dt(ne);
2076
2071
  if (!t)
2077
2072
  throw new Error("useCommand must be used within a Command provider");
2078
2073
  return t;
2079
- }, se = ({
2074
+ }, ie = ({
2080
2075
  children: t,
2081
2076
  className: a = "",
2082
2077
  variant: r = "secondary",
@@ -2084,11 +2079,11 @@ const ie = ct(null), bt = () => {
2084
2079
  inputPlaceholder: n = "Search...",
2085
2080
  ...o
2086
2081
  }) => {
2087
- const [s, c] = z(""), [d, i] = z(null), [u, y] = z(!1), p = [
2082
+ const [s, c] = A(""), [d, i] = A(null), [f, p] = A(!1), y = [
2088
2083
  "clarity-command",
2089
2084
  `clarity-command--${r}`,
2090
2085
  a
2091
- ].filter(Boolean).join(" "), f = gt(() => ({
2086
+ ].filter(Boolean).join(" "), u = gt(() => ({
2092
2087
  searchTerm: s,
2093
2088
  setSearchTerm: c,
2094
2089
  value: d,
@@ -2098,45 +2093,45 @@ const ie = ct(null), bt = () => {
2098
2093
  empty: l,
2099
2094
  inputPlaceholder: n
2100
2095
  },
2101
- isOpen: u,
2102
- setIsOpen: y
2103
- }), [s, d, r, l, n, u]);
2104
- return /* @__PURE__ */ e(ie.Provider, { value: f, children: /* @__PURE__ */ e("div", { className: p, ...o, children: t }) });
2096
+ isOpen: f,
2097
+ setIsOpen: p
2098
+ }), [s, d, r, l, n, f]);
2099
+ return /* @__PURE__ */ e(ne.Provider, { value: u, children: /* @__PURE__ */ e("div", { className: y, ...o, children: t }) });
2105
2100
  };
2106
- se.displayName = "Command";
2107
- const oe = ({ placeholder: t = "Search...", variant: a, onClick: r }) => {
2108
- const { setIsOpen: l, variant: n } = bt(), [o, s] = z(!1);
2109
- Q(() => {
2101
+ ie.displayName = "Command";
2102
+ const se = ({ placeholder: t = "Search...", variant: a, onClick: r }) => {
2103
+ const { setIsOpen: l, variant: n } = bt(), [o, s] = A(!1);
2104
+ J(() => {
2110
2105
  s(/Mac|iPod|iPhone|iPad/.test(navigator.platform));
2111
2106
  }, []);
2112
2107
  const d = [
2113
2108
  "clarity-command-button",
2114
2109
  `clarity-command-button--${a || n}`
2115
2110
  ].filter(Boolean).join(" ");
2116
- return /* @__PURE__ */ w("button", { className: d, onClick: (u) => {
2117
- l(!0), r == null || r(u);
2111
+ return /* @__PURE__ */ v("button", { className: d, onClick: (f) => {
2112
+ l(!0), r == null || r(f);
2118
2113
  }, children: [
2119
2114
  /* @__PURE__ */ e("span", { children: t }),
2120
- /* @__PURE__ */ w("kbd", { className: "clarity-command-shortcut", children: [
2115
+ /* @__PURE__ */ v("kbd", { className: "clarity-command-shortcut", children: [
2121
2116
  o ? "⌘" : "Ctrl+",
2122
2117
  "K"
2123
2118
  ] })
2124
2119
  ] });
2125
2120
  };
2126
- oe.displayName = "Command.Button";
2127
- const ce = ({ children: t }) => {
2121
+ se.displayName = "Command.Button";
2122
+ const oe = ({ children: t }) => {
2128
2123
  const { isOpen: a, setIsOpen: r, variant: l } = bt();
2129
- return Q(() => {
2124
+ return J(() => {
2130
2125
  const n = (o) => {
2131
2126
  o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!a));
2132
2127
  };
2133
2128
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
2134
2129
  }, [a, r]), /* @__PURE__ */ e(mt, { isOpen: a, onClose: () => r(!1), size: "large", closeOnOverlayClick: !0, children: /* @__PURE__ */ e("div", { className: `clarity-command--${l}`, children: t }) });
2135
2130
  };
2136
- ce.displayName = "Command.Dialog";
2137
- const de = ({ className: t = "", ...a }) => {
2138
- const { searchTerm: r, setSearchTerm: l, variant: n, texts: o, isOpen: s } = bt(), c = at(null);
2139
- Q(() => {
2131
+ oe.displayName = "Command.Dialog";
2132
+ const ce = ({ className: t = "", ...a }) => {
2133
+ const { searchTerm: r, setSearchTerm: l, variant: n, texts: o, isOpen: s } = bt(), c = et(null);
2134
+ J(() => {
2140
2135
  var i;
2141
2136
  s && ((i = c.current) == null || i.focus());
2142
2137
  }, [s]);
@@ -2157,75 +2152,75 @@ const de = ({ className: t = "", ...a }) => {
2157
2152
  }
2158
2153
  ) });
2159
2154
  };
2160
- de.displayName = "Command.Input";
2161
- const me = ({ children: t, className: a = "", ...r }) => {
2155
+ ce.displayName = "Command.Input";
2156
+ const de = ({ children: t, className: a = "", ...r }) => {
2162
2157
  const { searchTerm: l } = bt();
2163
2158
  let n = !1;
2164
- const o = (d) => W.Children.toArray(d).map((i) => {
2165
- var y;
2166
- if (!W.isValidElement(i)) return i;
2167
- const u = i.type.displayName;
2168
- if (u === "Command.Empty")
2159
+ const o = (d) => I.Children.toArray(d).map((i) => {
2160
+ var p;
2161
+ if (!I.isValidElement(i)) return i;
2162
+ const f = i.type.displayName;
2163
+ if (f === "Command.Empty")
2169
2164
  return null;
2170
- if (u === "Command.Item")
2171
- return (((y = i.props.children) == null ? void 0 : y.toString().toLowerCase()) || "").includes(l.toLowerCase()) ? (n = !0, i) : null;
2172
- if (u === "Command.Group") {
2173
- const p = o(i.props.children);
2174
- return W.Children.toArray(p).some((b) => W.isValidElement(b) && b.type.displayName === "Command.Item") ? W.cloneElement(i, { ...i.props, children: p }) : null;
2165
+ if (f === "Command.Item")
2166
+ return (((p = i.props.children) == null ? void 0 : p.toString().toLowerCase()) || "").includes(l.toLowerCase()) ? (n = !0, i) : null;
2167
+ if (f === "Command.Group") {
2168
+ const y = o(i.props.children);
2169
+ return I.Children.toArray(y).some((h) => I.isValidElement(h) && h.type.displayName === "Command.Item") ? I.cloneElement(i, { ...i.props, children: y }) : null;
2175
2170
  }
2176
2171
  return i;
2177
2172
  }).filter(Boolean), s = o(t), c = ["clarity-command-list", a].filter(Boolean).join(" ");
2178
- return /* @__PURE__ */ w("div", { className: c, ...r, children: [
2173
+ return /* @__PURE__ */ v("div", { className: c, ...r, children: [
2179
2174
  s,
2180
- !n && /* @__PURE__ */ e(Tt, {})
2175
+ !n && /* @__PURE__ */ e(kt, {})
2181
2176
  ] });
2182
2177
  };
2183
- me.displayName = "Command.List";
2184
- const Tt = ({ children: t, className: a = "", ...r }) => {
2178
+ de.displayName = "Command.List";
2179
+ const kt = ({ children: t, className: a = "", ...r }) => {
2185
2180
  const { texts: l } = bt(), n = ["clarity-command-empty", a].filter(Boolean).join(" ");
2186
2181
  return /* @__PURE__ */ e("div", { className: n, ...r, children: t || r.emptyText || l.empty });
2187
2182
  };
2188
- Tt.displayName = "Command.Empty";
2189
- const ue = ({ children: t, className: a = "", ...r }) => {
2183
+ kt.displayName = "Command.Empty";
2184
+ const me = ({ children: t, className: a = "", ...r }) => {
2190
2185
  const l = ["clarity-command-group", a].filter(Boolean).join(" ");
2191
2186
  return /* @__PURE__ */ e("div", { className: l, ...r, children: t });
2192
2187
  };
2193
- ue.displayName = "Command.Group";
2194
- const fe = ({ children: t, className: a = "", ...r }) => {
2188
+ me.displayName = "Command.Group";
2189
+ const ue = ({ children: t, className: a = "", ...r }) => {
2195
2190
  const { setValue: l, variant: n } = bt(), o = ["clarity-command-item", `clarity-command-item--${n}`, a].filter(Boolean).join(" ");
2196
2191
  return /* @__PURE__ */ e("div", { className: o, onClick: () => l((t == null ? void 0 : t.toString()) || ""), ...r, children: t });
2197
2192
  };
2198
- fe.displayName = "Command.Item";
2199
- const pe = ({ className: t = "", ...a }) => {
2193
+ ue.displayName = "Command.Item";
2194
+ const fe = ({ className: t = "", ...a }) => {
2200
2195
  const r = ["clarity-command-separator", t].filter(Boolean).join(" ");
2201
2196
  return /* @__PURE__ */ e("hr", { className: r, ...a });
2202
2197
  };
2203
- pe.displayName = "Command.Separator";
2204
- const ye = ({ children: t, className: a = "", ...r }) => {
2198
+ fe.displayName = "Command.Separator";
2199
+ const pe = ({ children: t, className: a = "", ...r }) => {
2205
2200
  const l = ["clarity-command-shortcut", a].filter(Boolean).join(" ");
2206
2201
  return /* @__PURE__ */ e("span", { className: l, ...r, children: t });
2207
2202
  };
2208
- ye.displayName = "Command.Shortcut";
2209
- const sa = Object.assign(se, {
2210
- Button: oe,
2211
- Dialog: ce,
2212
- Input: de,
2213
- List: me,
2214
- Empty: Tt,
2215
- Group: ue,
2216
- Item: fe,
2217
- Separator: pe,
2218
- Shortcut: ye
2219
- }), Xe = ({ columns: t, viewMode: a }) => {
2203
+ pe.displayName = "Command.Shortcut";
2204
+ const ia = Object.assign(ie, {
2205
+ Button: se,
2206
+ Dialog: oe,
2207
+ Input: ce,
2208
+ List: de,
2209
+ Empty: kt,
2210
+ Group: me,
2211
+ Item: ue,
2212
+ Separator: fe,
2213
+ Shortcut: pe
2214
+ }), Ue = ({ columns: t, viewMode: a }) => {
2220
2215
  const r = Array.from({ length: 5 }, (l, n) => n);
2221
- return a === "card" ? /* @__PURE__ */ w("div", { className: "card-view-wrapper is-loading", children: [
2216
+ return a === "card" ? /* @__PURE__ */ v("div", { className: "card-view-wrapper is-loading", children: [
2222
2217
  /* @__PURE__ */ e("div", { className: "skeleton card-view-header" }),
2223
2218
  /* @__PURE__ */ e("div", { className: "card-view-body", children: r.map((l) => /* @__PURE__ */ e("div", { className: "skeleton card-view-row" }, l)) })
2224
- ] }) : /* @__PURE__ */ e("div", { className: "table-wrapper is-loading", children: /* @__PURE__ */ w("table", { children: [
2219
+ ] }) : /* @__PURE__ */ e("div", { className: "table-wrapper is-loading", children: /* @__PURE__ */ v("table", { children: [
2225
2220
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "table-row", children: t.map((l) => /* @__PURE__ */ e("th", { className: "table-header-cell", children: /* @__PURE__ */ e("div", { className: "skeleton skeleton-text" }) }, l.key)) }) }),
2226
2221
  /* @__PURE__ */ e("tbody", { children: r.map((l) => /* @__PURE__ */ e("tr", { className: "table-row", children: t.map((n) => /* @__PURE__ */ e("td", { className: "table-cell", children: /* @__PURE__ */ e("div", { className: "skeleton skeleton-text" }) }, n.key)) }, l)) })
2227
2222
  ] }) });
2228
- }, oa = ({
2223
+ }, sa = ({
2229
2224
  variant: t = "secondary",
2230
2225
  columns: a,
2231
2226
  data: r,
@@ -2234,58 +2229,58 @@ const sa = Object.assign(se, {
2234
2229
  isLoading: o = !1,
2235
2230
  pagination: s
2236
2231
  }) => {
2237
- const [c, d] = z(null), [i, u] = z("none"), y = (m) => {
2238
- m.sortable && (c === m.key ? u((g) => g === "asc" ? "desc" : g === "desc" ? "none" : "asc") : (d(m.key), u("asc")));
2239
- }, p = gt(() => i === "none" || !c ? r : [...r].sort((m, g) => {
2240
- const C = m[c], x = g[c];
2241
- return C < x ? i === "asc" ? -1 : 1 : C > x ? i === "asc" ? 1 : -1 : 0;
2242
- }), [r, c, i]), f = (m) => m.sortable ? c !== m.key || i === "none" ? /* @__PURE__ */ e("span", { className: "sort-icon", children: "↕" }) : i === "asc" ? /* @__PURE__ */ e("span", { className: "sort-icon", children: "↑" }) : /* @__PURE__ */ e("span", { className: "sort-icon", children: "↓" }) : null;
2232
+ const [c, d] = A(null), [i, f] = A("none"), p = (m) => {
2233
+ m.sortable && (c === m.key ? f((b) => b === "asc" ? "desc" : b === "desc" ? "none" : "asc") : (d(m.key), f("asc")));
2234
+ }, y = gt(() => i === "none" || !c ? r : [...r].sort((m, b) => {
2235
+ const _ = m[c], x = b[c];
2236
+ return _ < x ? i === "asc" ? -1 : 1 : _ > x ? i === "asc" ? 1 : -1 : 0;
2237
+ }), [r, c, i]), u = (m) => m.sortable ? c !== m.key || i === "none" ? /* @__PURE__ */ e("span", { className: "sort-icon", children: "↕" }) : i === "asc" ? /* @__PURE__ */ e("span", { className: "sort-icon", children: "↑" }) : /* @__PURE__ */ e("span", { className: "sort-icon", children: "↓" }) : null;
2243
2238
  if (o)
2244
- return /* @__PURE__ */ e(Xe, { columns: a, viewMode: l });
2245
- const b = `table-variant-${t} ${n ? "is-scrollable" : ""}`, v = () => {
2239
+ return /* @__PURE__ */ e(Ue, { columns: a, viewMode: l });
2240
+ const h = `table-variant-${t} ${n ? "is-scrollable" : ""}`, w = () => {
2246
2241
  if (!s) return null;
2247
2242
  const {
2248
2243
  currentPage: m,
2249
- totalPages: g,
2250
- onPageChange: C,
2244
+ totalPages: b,
2245
+ onPageChange: _,
2251
2246
  totalItems: x,
2252
- itemsPerPage: B,
2253
- position: k = "right"
2247
+ itemsPerPage: E,
2248
+ position: C = "right"
2254
2249
  } = s;
2255
- if (typeof g != "number" || typeof m != "number")
2250
+ if (typeof b != "number" || typeof m != "number")
2256
2251
  return console.warn("Table Pagination: Invalid pagination props", s), null;
2257
- if (x <= B)
2252
+ if (x <= E)
2258
2253
  return null;
2259
- const j = (m - 1) * B + 1, $ = Math.min(m * B, x), S = () => {
2260
- const _ = [];
2261
- if (g <= 5)
2262
- for (let I = 1; I <= g; I++) _.push(I);
2254
+ const T = (m - 1) * E + 1, L = Math.min(m * E, x), $ = () => {
2255
+ const k = [];
2256
+ if (b <= 5)
2257
+ for (let H = 1; H <= b; H++) k.push(H);
2263
2258
  else if (m <= 3) {
2264
- for (let I = 1; I <= 4; I++) _.push(I);
2265
- _.push("..."), _.push(g);
2266
- } else if (m >= g - 2) {
2267
- _.push(1), _.push("...");
2268
- for (let I = g - 3; I <= g; I++) _.push(I);
2259
+ for (let H = 1; H <= 4; H++) k.push(H);
2260
+ k.push("..."), k.push(b);
2261
+ } else if (m >= b - 2) {
2262
+ k.push(1), k.push("...");
2263
+ for (let H = b - 3; H <= b; H++) k.push(H);
2269
2264
  } else
2270
- _.push(1), _.push("..."), _.push(m - 1), _.push(m), _.push(m + 1), _.push("..."), _.push(g);
2271
- return _;
2265
+ k.push(1), k.push("..."), k.push(m - 1), k.push(m), k.push(m + 1), k.push("..."), k.push(b);
2266
+ return k;
2272
2267
  };
2273
- return /* @__PURE__ */ w("div", { className: `table-pagination align-${k}`, children: [
2274
- /* @__PURE__ */ w("div", { className: "pagination-info", children: [
2268
+ return /* @__PURE__ */ v("div", { className: `table-pagination align-${C}`, children: [
2269
+ /* @__PURE__ */ v("div", { className: "pagination-info", children: [
2275
2270
  "Exibindo ",
2276
- j,
2271
+ T,
2277
2272
  " a ",
2278
- $,
2273
+ L,
2279
2274
  " de ",
2280
2275
  x,
2281
2276
  " resultados"
2282
2277
  ] }),
2283
- /* @__PURE__ */ w("div", { className: "pagination-controls", children: [
2278
+ /* @__PURE__ */ v("div", { className: "pagination-controls", children: [
2284
2279
  /* @__PURE__ */ e(
2285
2280
  "button",
2286
2281
  {
2287
2282
  className: "pagination-button",
2288
- onClick: () => C(1),
2283
+ onClick: () => _(1),
2289
2284
  disabled: m === 1,
2290
2285
  "aria-label": "Primeira página",
2291
2286
  children: "«"
@@ -2295,28 +2290,28 @@ const sa = Object.assign(se, {
2295
2290
  "button",
2296
2291
  {
2297
2292
  className: "pagination-button",
2298
- onClick: () => C(m - 1),
2293
+ onClick: () => _(m - 1),
2299
2294
  disabled: m === 1,
2300
2295
  "aria-label": "Página anterior",
2301
2296
  children: "‹"
2302
2297
  }
2303
2298
  ),
2304
- S().map((_, M) => /* @__PURE__ */ e(
2299
+ $().map((k, z) => /* @__PURE__ */ e(
2305
2300
  "button",
2306
2301
  {
2307
- className: `pagination-button ${_ === m ? "active" : ""}`,
2308
- onClick: () => typeof _ == "number" && C(_),
2309
- disabled: typeof _ != "number",
2310
- children: _
2302
+ className: `pagination-button ${k === m ? "active" : ""}`,
2303
+ onClick: () => typeof k == "number" && _(k),
2304
+ disabled: typeof k != "number",
2305
+ children: k
2311
2306
  },
2312
- M
2307
+ z
2313
2308
  )),
2314
2309
  /* @__PURE__ */ e(
2315
2310
  "button",
2316
2311
  {
2317
2312
  className: "pagination-button",
2318
- onClick: () => C(m + 1),
2319
- disabled: m === g,
2313
+ onClick: () => _(m + 1),
2314
+ disabled: m === b,
2320
2315
  "aria-label": "Próxima página",
2321
2316
  children: "›"
2322
2317
  }
@@ -2325,51 +2320,51 @@ const sa = Object.assign(se, {
2325
2320
  "button",
2326
2321
  {
2327
2322
  className: "pagination-button",
2328
- onClick: () => C(g),
2329
- disabled: m === g,
2323
+ onClick: () => _(b),
2324
+ disabled: m === b,
2330
2325
  "aria-label": "Última página",
2331
2326
  children: "»"
2332
2327
  }
2333
2328
  )
2334
2329
  ] })
2335
2330
  ] });
2336
- }, N = /* @__PURE__ */ w("div", { className: `table-wrapper ${b}`, children: [
2337
- /* @__PURE__ */ w("table", { children: [
2338
- /* @__PURE__ */ e("thead", { className: "table-header", children: /* @__PURE__ */ e("tr", { className: "table-row", children: a.map((m) => /* @__PURE__ */ w(
2331
+ }, N = /* @__PURE__ */ v("div", { className: `table-wrapper ${h}`, children: [
2332
+ /* @__PURE__ */ v("table", { children: [
2333
+ /* @__PURE__ */ e("thead", { className: "table-header", children: /* @__PURE__ */ e("tr", { className: "table-row", children: a.map((m) => /* @__PURE__ */ v(
2339
2334
  "th",
2340
2335
  {
2341
2336
  className: `table-header-cell ${m.sortable ? "sortable" : ""} table-header-cell-${t}`,
2342
- onClick: () => y(m),
2337
+ onClick: () => p(m),
2343
2338
  style: { minWidth: m.minWidth },
2344
2339
  children: [
2345
2340
  m.header,
2346
- f(m)
2341
+ u(m)
2347
2342
  ]
2348
2343
  },
2349
2344
  m.key
2350
2345
  )) }) }),
2351
- /* @__PURE__ */ e("tbody", { children: p.length === 0 ? /* @__PURE__ */ e("tr", { className: "table-row", children: /* @__PURE__ */ e("td", { colSpan: a.length, className: "table-cell", style: { textAlign: "center", padding: "2rem" }, children: "Nenhum resultado encontrado" }) }) : p.map((m, g) => /* @__PURE__ */ e("tr", { className: `table-row table-row-${t}`, children: a.map((C) => /* @__PURE__ */ e("td", { className: `table-cell ${C.align ? `table-cell-align-${C.align}` : ""}`, style: { minWidth: C.minWidth }, children: C.render ? C.render(m) : m[C.key] }, C.key)) }, g)) })
2346
+ /* @__PURE__ */ e("tbody", { children: y.length === 0 ? /* @__PURE__ */ e("tr", { className: "table-row", children: /* @__PURE__ */ e("td", { colSpan: a.length, className: "table-cell", style: { textAlign: "center", padding: "2rem" }, children: "Nenhum resultado encontrado" }) }) : y.map((m, b) => /* @__PURE__ */ e("tr", { className: `table-row table-row-${t}`, children: a.map((_) => /* @__PURE__ */ e("td", { className: `table-cell ${_.align ? `table-cell-align-${_.align}` : ""}`, style: { minWidth: _.minWidth }, children: _.render ? _.render(m) : m[_.key] }, _.key)) }, b)) })
2352
2347
  ] }),
2353
- v()
2348
+ w()
2354
2349
  ] });
2355
- return l === "card" ? /* @__PURE__ */ w("div", { className: `card-view-wrapper ${b}`, children: [
2356
- /* @__PURE__ */ e("div", { className: `card-view-header table-header-cell-${t}`, children: a.map((m) => /* @__PURE__ */ w(
2350
+ return l === "card" ? /* @__PURE__ */ v("div", { className: `card-view-wrapper ${h}`, children: [
2351
+ /* @__PURE__ */ e("div", { className: `card-view-header table-header-cell-${t}`, children: a.map((m) => /* @__PURE__ */ v(
2357
2352
  "div",
2358
2353
  {
2359
2354
  className: `card-view-header-cell ${m.sortable ? "sortable" : ""}`,
2360
- onClick: () => y(m),
2355
+ onClick: () => p(m),
2361
2356
  style: { minWidth: m.minWidth },
2362
2357
  children: [
2363
2358
  m.header,
2364
- f(m)
2359
+ u(m)
2365
2360
  ]
2366
2361
  },
2367
2362
  m.key
2368
2363
  )) }),
2369
- /* @__PURE__ */ e("div", { className: "card-view-body", children: p.length === 0 ? /* @__PURE__ */ e("div", { className: `card-view-row table-row-${t}`, style: { justifyContent: "center", padding: "2rem" }, children: "Nenhum resultado encontrado" }) : p.map((m, g) => /* @__PURE__ */ e("div", { className: `card-view-row table-row-${t}`, children: a.map((C) => /* @__PURE__ */ e("div", { className: `card-view-cell ${C.align ? `table-cell-align-${C.align}` : ""}`, style: { minWidth: C.minWidth }, children: C.render ? C.render(m) : m[C.key] }, C.key)) }, g)) }),
2370
- v()
2364
+ /* @__PURE__ */ e("div", { className: "card-view-body", children: y.length === 0 ? /* @__PURE__ */ e("div", { className: `card-view-row table-row-${t}`, style: { justifyContent: "center", padding: "2rem" }, children: "Nenhum resultado encontrado" }) : y.map((m, b) => /* @__PURE__ */ e("div", { className: `card-view-row table-row-${t}`, children: a.map((_) => /* @__PURE__ */ e("div", { className: `card-view-cell ${_.align ? `table-cell-align-${_.align}` : ""}`, style: { minWidth: _.minWidth }, children: _.render ? _.render(m) : m[_.key] }, _.key)) }, b)) }),
2365
+ w()
2371
2366
  ] }) : N;
2372
- }, ca = ({
2367
+ }, oa = ({
2373
2368
  variant: t = "primary",
2374
2369
  size: a = "medium",
2375
2370
  color: r,
@@ -2382,12 +2377,12 @@ const sa = Object.assign(se, {
2382
2377
  `${s}--${a}`,
2383
2378
  d,
2384
2379
  l
2385
- ].filter(Boolean).join(" "), u = {};
2386
- return r && (u["--spinner-color"] = r), /* @__PURE__ */ e(
2380
+ ].filter(Boolean).join(" "), f = {};
2381
+ return r && (f["--spinner-color"] = r), /* @__PURE__ */ e(
2387
2382
  "div",
2388
2383
  {
2389
2384
  className: i,
2390
- style: u,
2385
+ style: f,
2391
2386
  role: "status",
2392
2387
  "aria-label": n,
2393
2388
  ...o,
@@ -2412,7 +2407,7 @@ const sa = Object.assign(se, {
2412
2407
  ) })
2413
2408
  }
2414
2409
  );
2415
- }, Ye = ({
2410
+ }, Xe = ({
2416
2411
  className: t = "",
2417
2412
  noGutters: a,
2418
2413
  justify: r,
@@ -2428,10 +2423,10 @@ const sa = Object.assign(se, {
2428
2423
  l ? `clarity-row--align-${l}` : "",
2429
2424
  t
2430
2425
  ].filter(Boolean).join(" ");
2431
- return W.createElement(o, { className: c, ...s }, n);
2426
+ return I.createElement(o, { className: c, ...s }, n);
2432
2427
  };
2433
- Ye.displayName = "Row";
2434
- const Ze = (t) => `${t / 12 * 100}%`, qe = (t) => `${t / 12 * 100}%`, Je = ({
2428
+ Xe.displayName = "Row";
2429
+ const Ye = (t) => `${t / 12 * 100}%`, Ze = (t) => `${t / 12 * 100}%`, qe = ({
2435
2430
  className: t = "",
2436
2431
  xs: a,
2437
2432
  sm: r,
@@ -2442,38 +2437,38 @@ const Ze = (t) => `${t / 12 * 100}%`, qe = (t) => `${t / 12 * 100}%`, Je = ({
2442
2437
  offset: c,
2443
2438
  children: d,
2444
2439
  as: i = "div",
2445
- style: u,
2446
- ...y
2440
+ style: f,
2441
+ ...p
2447
2442
  }) => {
2448
- const p = { ...u }, f = (N, m) => {
2443
+ const y = { ...f }, u = (N, m) => {
2449
2444
  if (m === void 0) return;
2450
- const g = `--clarity-col-width-${N}`;
2451
- p[g] = typeof m == "number" ? Ze(m) : "auto";
2452
- }, b = (N, m) => {
2445
+ const b = `--clarity-col-width-${N}`;
2446
+ y[b] = typeof m == "number" ? Ye(m) : "auto";
2447
+ }, h = (N, m) => {
2453
2448
  if (m === void 0) return;
2454
- const g = `--clarity-col-offset-${N}`;
2455
- p[g] = qe(m);
2449
+ const b = `--clarity-col-offset-${N}`;
2450
+ y[b] = Ze(m);
2456
2451
  };
2457
- f("xs", a), f("sm", r), f("md", l), f("lg", n), f("xl", o), f("xxl", s), b("xs", c == null ? void 0 : c.xs), b("sm", c == null ? void 0 : c.sm), b("md", c == null ? void 0 : c.md), b("lg", c == null ? void 0 : c.lg), b("xl", c == null ? void 0 : c.xl), b("xxl", c == null ? void 0 : c.xxl);
2458
- const v = ["clarity-col", t].filter(Boolean).join(" ");
2459
- return W.createElement(i, { className: v, style: p, ...y }, d);
2452
+ u("xs", a), u("sm", r), u("md", l), u("lg", n), u("xl", o), u("xxl", s), h("xs", c == null ? void 0 : c.xs), h("sm", c == null ? void 0 : c.sm), h("md", c == null ? void 0 : c.md), h("lg", c == null ? void 0 : c.lg), h("xl", c == null ? void 0 : c.xl), h("xxl", c == null ? void 0 : c.xxl);
2453
+ const w = ["clarity-col", t].filter(Boolean).join(" ");
2454
+ return I.createElement(i, { className: w, style: y, ...p }, d);
2460
2455
  };
2461
- Je.displayName = "Col";
2462
- const he = ({ children: t, className: a, ...r }) => /* @__PURE__ */ e("div", { className: `clarity-card__header ${a || ""}`, ...r, children: t });
2463
- he.displayName = "Card.Header";
2464
- const be = ({ children: t, className: a, ...r }) => /* @__PURE__ */ e("div", { className: `clarity-card__content ${a || ""}`, ...r, children: t });
2465
- be.displayName = "Card.Content";
2466
- const ge = ({ children: t, className: a, align: r = "left", ...l }) => {
2456
+ qe.displayName = "Col";
2457
+ const ye = ({ children: t, className: a, ...r }) => /* @__PURE__ */ e("div", { className: `clarity-card__header ${a || ""}`, ...r, children: t });
2458
+ ye.displayName = "Card.Header";
2459
+ const he = ({ children: t, className: a, ...r }) => /* @__PURE__ */ e("div", { className: `clarity-card__content ${a || ""}`, ...r, children: t });
2460
+ he.displayName = "Card.Content";
2461
+ const be = ({ children: t, className: a, align: r = "left", ...l }) => {
2467
2462
  const n = r ? `clarity-card__footer--align-${r}` : "";
2468
2463
  return /* @__PURE__ */ e("div", { className: `clarity-card__footer ${n} ${a || ""}`, ...l, children: t });
2469
2464
  };
2470
- ge.displayName = "Card.Footer";
2465
+ be.displayName = "Card.Footer";
2471
2466
  const Nt = ({ children: t, className: a, ...r }) => /* @__PURE__ */ e("div", { className: `clarity-card ${a || ""}`, ...r, children: t });
2472
- Nt.Header = he;
2473
- Nt.Content = be;
2474
- Nt.Footer = ge;
2467
+ Nt.Header = ye;
2468
+ Nt.Content = he;
2469
+ Nt.Footer = be;
2475
2470
  Nt.displayName = "Card";
2476
- const da = {
2471
+ const ca = {
2477
2472
  primary: {
2478
2473
  50: "#f0f9ff",
2479
2474
  100: "#e0f2fe",
@@ -2522,7 +2517,7 @@ const da = {
2522
2517
  800: "#065f46",
2523
2518
  900: "#064e3b"
2524
2519
  }
2525
- }, ma = {
2520
+ }, da = {
2526
2521
  xs: "4px",
2527
2522
  sm: "8px",
2528
2523
  md: "16px",
@@ -2530,38 +2525,38 @@ const da = {
2530
2525
  xl: "32px",
2531
2526
  "2xl": "48px",
2532
2527
  "3xl": "64px"
2533
- }, ua = (...t) => t.filter(Boolean).join(" "), fa = () => Math.random().toString(36).substr(2, 9);
2528
+ }, ma = (...t) => t.filter(Boolean).join(" "), ua = () => Math.random().toString(36).substr(2, 9);
2534
2529
  export {
2535
- ia as Accordion,
2536
- ta as Badge,
2537
- xe as Box,
2538
- ke as Button,
2539
- ea as ButtonGroup,
2540
- la as ButtonIcon,
2541
- na as ButtonLink,
2530
+ na as Accordion,
2531
+ Pe as Badge,
2532
+ $e as Box,
2533
+ xe as Button,
2534
+ ta as ButtonGroup,
2535
+ ra as ButtonIcon,
2536
+ la as ButtonLink,
2542
2537
  Nt as Card,
2543
- We as CheckInput,
2544
- Je as Col,
2545
- sa as Command,
2538
+ Oe as CheckInput,
2539
+ qe as Col,
2540
+ ia as Command,
2546
2541
  ut as ConfirmationDialog,
2547
2542
  vt as Dropdown,
2548
- Se as Input,
2549
- Ie as InputSwitch,
2543
+ je as Input,
2544
+ We as InputSwitch,
2550
2545
  mt as Modal,
2551
- Re as MultiSelect,
2546
+ Le as MultiSelect,
2552
2547
  ht as Offcanvas,
2553
- Ye as Row,
2554
- Le as Select,
2555
- ca as Spinner,
2556
- oa as Table,
2557
- ne as Tabs,
2558
- Ee as Textarea,
2559
- ra as ToastProvider,
2548
+ Xe as Row,
2549
+ Ee as Select,
2550
+ oa as Spinner,
2551
+ sa as Table,
2552
+ le as Tabs,
2553
+ Se as Textarea,
2554
+ aa as ToastProvider,
2560
2555
  yt as Tooltip,
2561
- ua as cn,
2562
- da as colors,
2563
- fa as generateId,
2564
- ma as spacing,
2565
- Bt as typography,
2566
- aa as useToast
2556
+ ma as cn,
2557
+ ca as colors,
2558
+ ua as generateId,
2559
+ da as spacing,
2560
+ Tt as typography,
2561
+ ea as useToast
2567
2562
  };