beth-clarity 1.1.22 → 1.2.1

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