beth-clarity 1.2.1 → 1.2.3

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