beth-clarity 1.1.1 → 1.1.4

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