@moondreamsdev/dreamer-ui 1.5.5 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,25 @@
1
- import { jsx as b, jsxs as _, Fragment as ve } from "react/jsx-runtime";
2
- import { j, E as ye, C as xe, b as we, a as Ce, Q as Ae } from "./join-DATGxH1G.js";
3
- import te, { useState as B, useEffect as S, useCallback as $, useId as T, useMemo as le } from "react";
4
- function ke() {
5
- const [r, t] = B(0);
6
- return S(() => {
1
+ import { jsx as u, jsxs as C } from "react/jsx-runtime";
2
+ import { j as v, E as S, C as F, b as V, a as q, Q as G } from "./join-DATGxH1G.js";
3
+ import j, { useState as N, useEffect as A, useCallback as E, useId as $, useMemo as R } from "react";
4
+ function H() {
5
+ const [o, r] = N(0);
6
+ return A(() => {
7
7
  const e = setInterval(() => {
8
- t((a) => (a + 1) % 3);
8
+ r((a) => (a + 1) % 3);
9
9
  }, 500);
10
10
  return () => clearInterval(e);
11
- }, []), /* @__PURE__ */ b("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((e) => /* @__PURE__ */ b(
11
+ }, []), /* @__PURE__ */ u("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((e) => /* @__PURE__ */ u(
12
12
  "div",
13
13
  {
14
- className: j(
14
+ className: v(
15
15
  "rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
16
- r === e && "transform -translate-y-1"
16
+ o === e && "transform -translate-y-1"
17
17
  )
18
18
  },
19
19
  e
20
20
  )) });
21
21
  }
22
- const Ne = {
22
+ const K = {
23
23
  base: "",
24
24
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
25
25
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -27,7 +27,7 @@ const Ne = {
27
27
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
28
28
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
29
29
  danger: "bg-danger text-danger-foreground hover:bg-danger/85 disabled:bg-muted disabled:text-muted-foreground"
30
- }, je = {
30
+ }, T = {
31
31
  stripped: "",
32
32
  fitted: "size-fit",
33
33
  sm: "px-2 py-1 text-sm",
@@ -35,59 +35,59 @@ const Ne = {
35
35
  lg: "px-6 py-3 text-lg",
36
36
  icon: "p-1 w-fit aspect-square",
37
37
  full: "p-2 w-full"
38
- }, Ee = {
38
+ }, Q = {
39
39
  none: "rounded-none",
40
40
  sm: "rounded-sm",
41
41
  md: "rounded-md",
42
42
  lg: "rounded-lg",
43
43
  full: "rounded-full"
44
- }, Z = {
44
+ }, L = {
45
45
  variant: "primary",
46
46
  size: "md",
47
47
  rounded: "md"
48
48
  };
49
- function Xe({
50
- variant: r = Z.variant,
51
- size: t,
52
- rounded: e = Z.rounded,
49
+ function ae({
50
+ variant: o = L.variant,
51
+ size: r,
52
+ rounded: e = L.rounded,
53
53
  loading: a,
54
- linkTo: s,
54
+ linkTo: t,
55
55
  linkProps: n,
56
- type: o = "button",
57
- className: d,
56
+ type: d = "button",
57
+ className: i,
58
58
  ...l
59
59
  }) {
60
- let w;
61
- r === "link" && !t ? w = "fitted" : w = t || Z.size;
62
- const i = j(
60
+ let f;
61
+ o === "link" && !r ? f = "fitted" : f = r || L.size;
62
+ const s = v(
63
63
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
64
- Ne[r],
65
- je[w],
66
- Ee[e],
64
+ K[o],
65
+ T[f],
66
+ Q[e],
67
67
  a && "relative pointer-events-none",
68
- s && "relative",
69
- d
68
+ t && "relative",
69
+ i
70
70
  );
71
- return /* @__PURE__ */ _(
71
+ return /* @__PURE__ */ C(
72
72
  "button",
73
73
  {
74
74
  ...l,
75
- role: s ? "link" : l.role,
75
+ role: t ? "link" : l.role,
76
76
  "aria-label": l["aria-label"] || (n == null ? void 0 : n["aria-label"]),
77
77
  "aria-description": l["aria-description"] || (n == null ? void 0 : n["aria-description"]),
78
78
  "aria-disabled": l.disabled || a,
79
79
  "aria-busy": a,
80
- type: o,
81
- className: i,
80
+ type: d,
81
+ className: s,
82
82
  children: [
83
- a && /* @__PURE__ */ b(ke, {}),
84
- /* @__PURE__ */ b("span", { className: j(a && "invisible"), children: l.children }),
85
- s && !l.disabled && /* @__PURE__ */ b(
83
+ a && /* @__PURE__ */ u(H, {}),
84
+ /* @__PURE__ */ u("span", { className: v(a && "invisible"), children: l.children }),
85
+ t && !l.disabled && /* @__PURE__ */ u(
86
86
  "a",
87
87
  {
88
88
  ...n,
89
89
  "aria-hidden": !0,
90
- href: s,
90
+ href: t,
91
91
  target: (n == null ? void 0 : n.target) || "_blank",
92
92
  rel: (n == null ? void 0 : n.rel) || "noreferrer",
93
93
  className: "absolute inset-0"
@@ -97,239 +97,239 @@ function Xe({
97
97
  }
98
98
  );
99
99
  }
100
- function Ve({ size: r = 15, color: t = "currentColor" }) {
101
- return /* @__PURE__ */ b("svg", { width: r, height: r, className: "inline", viewBox: "0 0 15 15", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ b(
100
+ function U({ size: o = 15, color: r = "currentColor" }) {
101
+ return /* @__PURE__ */ u("svg", { width: o, height: o, className: "inline", viewBox: "0 0 15 15", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ u(
102
102
  "path",
103
103
  {
104
104
  d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
105
- fill: t,
105
+ fill: r,
106
106
  fillRule: "evenodd",
107
107
  clipRule: "evenodd"
108
108
  }
109
109
  ) });
110
110
  }
111
- function De(r) {
112
- const [t, e] = B(""), a = $((s) => {
113
- let n = s, o = "";
114
- for (; n && !o; ) {
115
- const d = window.getComputedStyle(n).backgroundColor;
116
- d && d !== "transparent" && d !== "rgba(0, 0, 0, 0)" && (o = d), n = n.parentElement;
111
+ function W(o) {
112
+ const [r, e] = N(""), a = E((t) => {
113
+ let n = t, d = "";
114
+ for (; n && !d; ) {
115
+ const i = window.getComputedStyle(n).backgroundColor;
116
+ i && i !== "transparent" && i !== "rgba(0, 0, 0, 0)" && (d = i), n = n.parentElement;
117
117
  }
118
- return o || "transparent";
118
+ return d || "transparent";
119
119
  }, []);
120
- return S(() => {
121
- const s = document.getElementById(r);
122
- if (s) {
123
- const n = a(s.parentElement);
120
+ return A(() => {
121
+ const t = document.getElementById(o);
122
+ if (t) {
123
+ const n = a(t.parentElement);
124
124
  e(n);
125
125
  }
126
- }, [r, a]), t;
126
+ }, [o, a]), r;
127
127
  }
128
- function Ye({
129
- ref: r,
130
- id: t,
128
+ function ne({
129
+ ref: o,
130
+ id: r,
131
131
  size: e = 20,
132
132
  color: a,
133
- filled: s = !1,
133
+ filled: t = !1,
134
134
  rounded: n = !0,
135
- checked: o = !1,
136
- onCheckedChange: d,
135
+ checked: d = !1,
136
+ onCheckedChange: i,
137
137
  disabled: l,
138
- className: w = "",
139
- ...u
138
+ className: f = "",
139
+ ...m
140
140
  }) {
141
- const i = T(), k = le(() => t || `checkbox-${i}`, [t, i]), h = De(k), [c, C] = B(o);
142
- S(() => {
143
- C(o);
144
- }, [o]);
145
- const N = () => {
146
- l || (C(!c), d == null || d(!c));
147
- }, E = (R) => {
148
- R.key === " " && (R.preventDefault(), N());
149
- }, g = j(
141
+ const s = $(), g = R(() => r || `checkbox-${s}`, [r, s]), b = W(g), [c, h] = N(d);
142
+ A(() => {
143
+ h(d);
144
+ }, [d]);
145
+ const w = () => {
146
+ l || (h(!c), i == null || i(!c));
147
+ }, p = (y) => {
148
+ y.key === " " && (y.preventDefault(), w());
149
+ }, x = v(
150
150
  "flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2",
151
151
  n && "rounded",
152
152
  l && "opacity-40 cursor-not-allowed",
153
153
  !l && "cursor-pointer",
154
- w
154
+ f
155
155
  );
156
- return /* @__PURE__ */ b(
156
+ return /* @__PURE__ */ u(
157
157
  "button",
158
158
  {
159
- id: k,
159
+ id: g,
160
160
  type: "button",
161
- ref: r,
161
+ ref: o,
162
162
  tabIndex: 0,
163
163
  role: "checkbox",
164
- onClick: N,
164
+ onClick: w,
165
165
  "aria-checked": c,
166
166
  "aria-disabled": l,
167
- onKeyDownCapture: E,
167
+ onKeyDownCapture: p,
168
168
  style: {
169
169
  width: e,
170
170
  height: e,
171
171
  color: a,
172
- backgroundColor: c && s ? "currentcolor" : "transparent"
172
+ backgroundColor: c && t ? "currentcolor" : "transparent"
173
173
  },
174
- className: g,
175
- ...u,
176
- children: c && /* @__PURE__ */ b(Ve, { size: e, color: s ? h : void 0 })
174
+ className: x,
175
+ ...m,
176
+ children: c && /* @__PURE__ */ u(U, { size: e, color: t ? b : void 0 })
177
177
  }
178
178
  );
179
179
  }
180
- const Le = {
180
+ const Z = {
181
181
  base: "",
182
182
  default: "ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-danger not-disabled:data-success:ring-success",
183
183
  underline: "border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success",
184
184
  outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success"
185
- }, Ge = {
185
+ }, _ = {
186
186
  none: "rounded-none",
187
187
  sm: "rounded-sm",
188
188
  md: "rounded-md",
189
189
  lg: "rounded-lg",
190
190
  full: "px-3 rounded-full"
191
- }, ae = {
191
+ }, k = {
192
192
  variant: "default",
193
193
  rounded: "none"
194
194
  };
195
- function U({ elementId: r, type: t, message: e }) {
196
- return S(() => {
197
- const a = document.getElementById(r);
195
+ function D({ elementId: o, type: r, message: e }) {
196
+ return A(() => {
197
+ const a = document.getElementById(o);
198
198
  if (a) {
199
- if (!e && t === "error") {
199
+ if (!e && r === "error") {
200
200
  a.removeAttribute("data-error");
201
201
  return;
202
202
  }
203
- if (!e && t === "success") {
203
+ if (!e && r === "success") {
204
204
  a.removeAttribute("data-success");
205
205
  return;
206
206
  }
207
- return a.setAttribute("aria-describedby", `${r}-${t}-message`), a.setAttribute("aria-invalid", t === "error" ? "true" : "false"), t === "error" && a.setAttribute("data-error", "true"), t === "success" && a.setAttribute("data-success", "true"), () => {
207
+ return a.setAttribute("aria-describedby", `${o}-${r}-message`), a.setAttribute("aria-invalid", r === "error" ? "true" : "false"), r === "error" && a.setAttribute("data-error", "true"), r === "success" && a.setAttribute("data-success", "true"), () => {
208
208
  a.removeAttribute("aria-describedby"), a.removeAttribute("aria-invalid"), a.removeAttribute("data-error"), a.removeAttribute("data-success");
209
209
  };
210
210
  }
211
- }, [r, t, e]), e ? /* @__PURE__ */ _(
211
+ }, [o, r, e]), e ? /* @__PURE__ */ C(
212
212
  "small",
213
213
  {
214
- className: j(
214
+ className: v(
215
215
  "mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start",
216
- t === "error" && "text-danger",
217
- t === "success" && "text-success"
216
+ r === "error" && "text-danger",
217
+ r === "success" && "text-success"
218
218
  ),
219
219
  role: "status",
220
220
  children: [
221
- t === "error" ? /* @__PURE__ */ b(ye, {}) : /* @__PURE__ */ b(xe, {}),
222
- /* @__PURE__ */ b("span", { id: `${r}-${t}-message`, children: e })
221
+ r === "error" ? /* @__PURE__ */ u(S, {}) : /* @__PURE__ */ u(F, {}),
222
+ /* @__PURE__ */ u("span", { id: `${o}-${r}-message`, children: e })
223
223
  ]
224
224
  }
225
225
  ) : null;
226
226
  }
227
- function Je({
228
- variant: r = ae.variant,
229
- rounded: t,
227
+ function oe({
228
+ variant: o = k.variant,
229
+ rounded: r,
230
230
  displayOnlyMode: e = !1,
231
231
  errorMessage: a,
232
- successMessage: s,
232
+ successMessage: t,
233
233
  type: n = "text",
234
- className: o,
235
- ...d
234
+ className: d,
235
+ ...i
236
236
  }) {
237
- const l = T(), [w, u] = B(!1);
238
- let i = t;
239
- r === "outline" && !t && (i = "md"), i = i || ae.rounded;
240
- const c = j(
237
+ const l = $(), [f, m] = N(!1);
238
+ let s = r;
239
+ o === "outline" && !r && (s = "md"), s = s || k.rounded;
240
+ const c = v(
241
241
  "appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
242
242
  "file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors",
243
- !e && Le[r],
244
- !e && Ge[i],
243
+ !e && Z[o],
244
+ !e && _[s],
245
245
  n === "password" && "pr-10",
246
246
  !e && "px-2 py-1",
247
247
  e && "pointer-events-none",
248
- o
248
+ d
249
249
  );
250
- return /* @__PURE__ */ _("div", { className: j(e && "cursor-text"), style: { height: d.height, width: d.width }, children: [
251
- /* @__PURE__ */ _("div", { className: j(n === "password" && "relative"), children: [
252
- /* @__PURE__ */ b(
250
+ return /* @__PURE__ */ C("div", { className: v(e && "cursor-text"), style: { height: i.height, width: i.width }, children: [
251
+ /* @__PURE__ */ C("div", { className: v(n === "password" && "relative"), children: [
252
+ /* @__PURE__ */ u(
253
253
  "input",
254
254
  {
255
- ...d,
255
+ ...i,
256
256
  id: l,
257
- type: n === "password" && w ? "text" : n,
258
- "aria-disabled": d.disabled,
257
+ type: n === "password" && f ? "text" : n,
258
+ "aria-disabled": i.disabled,
259
259
  readOnly: e,
260
- "aria-readonly": e || d["aria-readonly"],
260
+ "aria-readonly": e || i["aria-readonly"],
261
261
  "data-error": a ? !0 : void 0,
262
- "data-success": s ? !0 : void 0,
262
+ "data-success": t ? !0 : void 0,
263
263
  className: c
264
264
  }
265
265
  ),
266
- n === "password" && /* @__PURE__ */ b(
266
+ n === "password" && /* @__PURE__ */ u(
267
267
  "button",
268
268
  {
269
- onClick: () => u(!w),
269
+ onClick: () => m(!f),
270
270
  className: "absolute inset-y-0 right-0 px-2 hover:cursor-pointer",
271
271
  "aria-label": "Toggle password visibility",
272
- "data-state": w ? "visible" : "hidden",
273
- children: w ? /* @__PURE__ */ b(we, { size: 20 }) : /* @__PURE__ */ b(Ce, { size: 20 })
272
+ "data-state": f ? "visible" : "hidden",
273
+ children: f ? /* @__PURE__ */ u(V, { size: 20 }) : /* @__PURE__ */ u(q, { size: 20 })
274
274
  }
275
275
  )
276
276
  ] }),
277
- !e && /* @__PURE__ */ b(U, { elementId: l, type: "error", message: a }),
278
- !e && /* @__PURE__ */ b(U, { elementId: l, type: "success", message: s })
277
+ !e && /* @__PURE__ */ u(D, { elementId: l, type: "error", message: a }),
278
+ !e && /* @__PURE__ */ u(D, { elementId: l, type: "success", message: t })
279
279
  ] });
280
280
  }
281
- function Oe({
282
- display: r = "inline",
283
- width: t = "fit-content",
281
+ function se({
282
+ display: o = "inline",
283
+ width: r = "fit-content",
284
284
  className: e = "",
285
285
  required: a,
286
- helpMessage: s,
286
+ helpMessage: t,
287
287
  suffix: n,
288
- htmlFor: o,
289
- children: d,
288
+ htmlFor: d,
289
+ children: i,
290
290
  ...l
291
291
  }) {
292
- const w = T(), u = j("font-medium", r, e), i = s ? `${o ?? w}-help` : void 0;
293
- return /* @__PURE__ */ _("div", { style: { display: r === "inline" ? "inline-flex" : "flex", width: t }, className: "relative", children: [
294
- /* @__PURE__ */ _("label", { className: u, htmlFor: o, ...l, children: [
295
- d,
296
- a && /* @__PURE__ */ b("span", { className: "text-red-500 font-medium ml-1", "aria-label": "required", children: "*" })
292
+ const f = $(), m = v("font-medium", o, e), s = t ? `${d ?? f}-help` : void 0;
293
+ return /* @__PURE__ */ C("div", { style: { display: o === "inline" ? "inline-flex" : "flex", width: r }, className: "relative", children: [
294
+ /* @__PURE__ */ C("label", { className: m, htmlFor: d, ...l, children: [
295
+ i,
296
+ a && /* @__PURE__ */ u("span", { className: "text-red-500 font-medium ml-1", "aria-label": "required", children: "*" })
297
297
  ] }),
298
- s && /* @__PURE__ */ b(
298
+ t && /* @__PURE__ */ u(
299
299
  "span",
300
300
  {
301
301
  className: "text-gray-500 ml-1 size-fit -translate-y-1/3",
302
- "aria-describedby": i,
302
+ "aria-describedby": s,
303
303
  "aria-label": "Help information",
304
- title: s,
305
- children: /* @__PURE__ */ b(Ae, {})
304
+ title: t,
305
+ children: /* @__PURE__ */ u(G, {})
306
306
  }
307
307
  ),
308
- s && /* @__PURE__ */ b("div", { id: i, className: "sr-only", children: s }),
309
- n && /* @__PURE__ */ b("span", { className: "ml-1", children: n })
308
+ t && /* @__PURE__ */ u("div", { id: s, className: "sr-only", children: t }),
309
+ n && /* @__PURE__ */ u("span", { className: "ml-1", children: n })
310
310
  ] });
311
311
  }
312
- function Ie({ itemId: r, checked: t, onChange: e, name: a, disabled: s = !1, className: n = "" }) {
313
- const o = "relative inline-flex items-center justify-center rounded-full", d = () => {
314
- s || e();
315
- }, l = j(
316
- o,
317
- !t && "hover:border-current/60",
318
- !s && "border-current cursor-pointer",
319
- s && "border-muted/60 cursor-not-allowed",
312
+ function J({ itemId: o, checked: r, onChange: e, name: a, disabled: t = !1, className: n = "" }) {
313
+ const d = "relative inline-flex items-center justify-center rounded-full", i = () => {
314
+ t || e();
315
+ }, l = v(
316
+ d,
317
+ !r && "hover:border-current/60",
318
+ !t && "border-current cursor-pointer",
319
+ t && "border-muted/60 cursor-not-allowed",
320
320
  n
321
321
  );
322
- return /* @__PURE__ */ b(
322
+ return /* @__PURE__ */ u(
323
323
  "div",
324
324
  {
325
- id: r,
325
+ id: o,
326
326
  role: "radio",
327
327
  tabIndex: -1,
328
- "aria-checked": t,
329
- "aria-disabled": s,
328
+ "aria-checked": r,
329
+ "aria-disabled": t,
330
330
  "aria-description": `Radio button for ${a}`,
331
- "aria-labelledby": `${r}-label`,
332
- onClick: d,
331
+ "aria-labelledby": `${o}-label`,
332
+ onClick: i,
333
333
  className: l,
334
334
  style: {
335
335
  width: "1em",
@@ -337,76 +337,76 @@ function Ie({ itemId: r, checked: t, onChange: e, name: a, disabled: s = !1, cla
337
337
  padding: "0.1em",
338
338
  borderWidth: "0.06em"
339
339
  },
340
- children: t && /* @__PURE__ */ b(
340
+ children: r && /* @__PURE__ */ u(
341
341
  "div",
342
342
  {
343
- className: j("size-full aspect-square rounded-full", s && "bg-muted/60", !s && "bg-current")
343
+ className: v("size-full aspect-square rounded-full", t && "bg-muted/60", !t && "bg-current")
344
344
  }
345
345
  )
346
346
  }
347
347
  );
348
348
  }
349
- function M({
350
- value: r,
351
- children: t,
349
+ function I({
350
+ value: o,
351
+ children: r,
352
352
  className: e = "",
353
353
  isSelected: a = !1,
354
- onChange: s,
354
+ onChange: t,
355
355
  disabled: n = !1,
356
- hideInput: o = !1,
357
- description: d,
356
+ hideInput: d = !1,
357
+ description: i,
358
358
  name: l
359
359
  }) {
360
- const u = `radio-${T()}-${r}`, i = () => {
361
- n || s == null || s(r);
360
+ const m = `radio-${$()}-${o}`, s = () => {
361
+ n || t == null || t(o);
362
362
  };
363
- return /* @__PURE__ */ _(
363
+ return /* @__PURE__ */ C(
364
364
  "div",
365
365
  {
366
- title: d,
367
- className: j(
366
+ title: i,
367
+ className: v(
368
368
  "relative flex items-center",
369
369
  e,
370
370
  // Uses text color for borders
371
- o && `p-2 border-2 focus-within:border-dashed focus-within:${n ? "border-current/50" : "border-current/80"}`,
372
- o && !a && `border-transparent ${n ? "" : "not-focus-within:hover:border-border/60"}`,
373
- o && a && "border-border",
371
+ d && `p-2 border-2 focus-within:border-dashed focus-within:${n ? "border-current/50" : "border-current/80"}`,
372
+ d && !a && `border-transparent ${n ? "" : "not-focus-within:hover:border-border/60"}`,
373
+ d && a && "border-border",
374
374
  n && "opacity-60 cursor-not-allowed"
375
375
  ),
376
376
  style: {
377
377
  gap: "0.5em"
378
378
  },
379
379
  children: [
380
- !o && /* @__PURE__ */ b(
381
- Ie,
380
+ !d && /* @__PURE__ */ u(
381
+ J,
382
382
  {
383
- itemId: u,
383
+ itemId: m,
384
384
  name: l || "",
385
385
  checked: a,
386
- onChange: i,
386
+ onChange: s,
387
387
  disabled: n,
388
- className: j(o && "")
388
+ className: v(d && "")
389
389
  }
390
390
  ),
391
- /* @__PURE__ */ b(
391
+ /* @__PURE__ */ u(
392
392
  "div",
393
393
  {
394
- id: o ? u : void 0,
395
- tabIndex: o ? -1 : void 0,
396
- role: o ? "radio" : void 0,
397
- onClick: o ? i : void 0,
398
- "aria-checked": o ? a ? "true" : "false" : void 0,
399
- "aria-disabled": o ? n : void 0,
400
- "aria-description": o ? d || `Radio button for ${l}` : void 0,
401
- "aria-labelledby": o ? `${u}-label` : void 0,
402
- className: j(o && "size-full", typeof t == "object" && "grow focus:outline-none"),
403
- children: /* @__PURE__ */ b(
394
+ id: d ? m : void 0,
395
+ tabIndex: d ? -1 : void 0,
396
+ role: d ? "radio" : void 0,
397
+ onClick: d ? s : void 0,
398
+ "aria-checked": d ? a ? "true" : "false" : void 0,
399
+ "aria-disabled": d ? n : void 0,
400
+ "aria-description": d ? i || `Radio button for ${l}` : void 0,
401
+ "aria-labelledby": d ? `${m}-label` : void 0,
402
+ className: v(d && "size-full", typeof r == "object" && "grow focus:outline-none"),
403
+ children: /* @__PURE__ */ u(
404
404
  "label",
405
405
  {
406
- id: `${u}-label`,
407
- onClick: o ? void 0 : i,
408
- className: j(n && "cursor-not-allowed", !n && "cursor-pointer"),
409
- children: t
406
+ id: `${m}-label`,
407
+ onClick: d ? void 0 : s,
408
+ className: v(n && "cursor-not-allowed", !n && "cursor-pointer"),
409
+ children: r
410
410
  }
411
411
  )
412
412
  }
@@ -415,128 +415,128 @@ function M({
415
415
  }
416
416
  );
417
417
  }
418
- function Re(r, t) {
419
- const [e, a] = B(t), [s, n] = B(-1), [o, d] = B(!1), l = $((h, c) => {
420
- var E;
421
- const C = h[c];
422
- C.hasAttribute("disabled") || C.getAttribute("aria-disabled") === "true" || ((E = h[c]) == null || E.click(), n(c));
423
- }, []), w = $(
424
- (h, c) => {
425
- var N;
426
- if (h.preventDefault(), o || !c.length) return;
427
- const C = t !== -1 ? t : 0;
428
- (N = c[C]) == null || N.focus(), a(C), t !== -1 && l(c, C);
418
+ function X(o, r) {
419
+ const [e, a] = N(r), [t, n] = N(-1), [d, i] = N(!1), l = E((b, c) => {
420
+ var p;
421
+ const h = b[c];
422
+ h.hasAttribute("disabled") || h.getAttribute("aria-disabled") === "true" || ((p = b[c]) == null || p.click(), n(c));
423
+ }, []), f = E(
424
+ (b, c) => {
425
+ var w;
426
+ if (b.preventDefault(), d || !c.length) return;
427
+ const h = r !== -1 ? r : 0;
428
+ (w = c[h]) == null || w.focus(), a(h), r !== -1 && l(c, h);
429
429
  },
430
- [t, o, l]
431
- ), u = $(
432
- (h) => {
433
- var E;
434
- if (!h.shiftKey)
430
+ [r, d, l]
431
+ ), m = E(
432
+ (b) => {
433
+ var p;
434
+ if (!b.shiftKey)
435
435
  return;
436
- h.preventDefault();
436
+ b.preventDefault();
437
437
  const c = Array.from(
438
438
  document.querySelectorAll(
439
439
  'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
440
440
  )
441
- ).filter((g) => !g.hasAttribute("disabled") && g.tabIndex >= 0), C = c.findIndex((g) => g.id === r), N = C > 0 ? C - 1 : c.length - 1;
442
- (E = c[N]) == null || E.focus();
441
+ ).filter((x) => !x.hasAttribute("disabled") && x.tabIndex >= 0), h = c.findIndex((x) => x.id === o), w = h > 0 ? h - 1 : c.length - 1;
442
+ (p = c[w]) == null || p.focus();
443
443
  },
444
- [r]
445
- ), i = $(
446
- (h, c) => {
447
- var R;
444
+ [o]
445
+ ), s = E(
446
+ (b, c) => {
447
+ var y;
448
448
  if (!c.length) return;
449
- const C = h.target;
450
- if (!c.some((K) => K.id === C.id)) return;
451
- const E = e !== -1 ? e : 0;
452
- let g = E;
453
- switch (h.key) {
449
+ const h = b.target;
450
+ if (!c.some((B) => B.id === h.id)) return;
451
+ const p = e !== -1 ? e : 0;
452
+ let x = p;
453
+ switch (b.key) {
454
454
  case "ArrowUp":
455
455
  case "ArrowLeft":
456
- h.preventDefault(), g = E > 0 ? E - 1 : c.length - 1;
456
+ b.preventDefault(), x = p > 0 ? p - 1 : c.length - 1;
457
457
  break;
458
458
  case "ArrowDown":
459
459
  case "ArrowRight":
460
- h.preventDefault(), g = (E + 1) % c.length;
460
+ b.preventDefault(), x = (p + 1) % c.length;
461
461
  break;
462
462
  // Select the option when the space key is pressed
463
463
  case " ":
464
- h.preventDefault(), l(c, E);
464
+ b.preventDefault(), l(c, p);
465
465
  return;
466
466
  case "Tab":
467
- u(h);
467
+ m(b);
468
468
  return;
469
469
  default:
470
470
  return;
471
471
  }
472
- (R = c[g]) == null || R.focus(), a(g), s !== -1 && l(c, g);
472
+ (y = c[x]) == null || y.focus(), a(x), t !== -1 && l(c, x);
473
473
  },
474
- [e, s, u, l]
475
- ), k = $(() => {
476
- const h = document.querySelector(`[id="${r}"][role="radiogroup"]`);
477
- return h ? Array.from(h.querySelectorAll('[role="radio"]')) : [];
478
- }, [r]);
479
- S(() => {
480
- const h = document.querySelector(`[id="${r}"][role="radiogroup"]`);
481
- if (!h) return;
482
- const c = k(), C = (R) => w(R, c), N = (R) => i(R, c), E = () => d(!0), g = () => d(!1);
483
- return document.addEventListener("keydown", N), h.addEventListener("focus", C), h.addEventListener("mousedown", E), document.addEventListener("mouseup", g), () => {
484
- document.removeEventListener("keydown", N), h.removeEventListener("focus", C), h.removeEventListener("mousedown", E), document.removeEventListener("mouseup", g);
474
+ [e, t, m, l]
475
+ ), g = E(() => {
476
+ const b = document.querySelector(`[id="${o}"][role="radiogroup"]`);
477
+ return b ? Array.from(b.querySelectorAll('[role="radio"]')) : [];
478
+ }, [o]);
479
+ A(() => {
480
+ const b = document.querySelector(`[id="${o}"][role="radiogroup"]`);
481
+ if (!b) return;
482
+ const c = g(), h = (y) => f(y, c), w = (y) => s(y, c), p = () => i(!0), x = () => i(!1);
483
+ return document.addEventListener("keydown", w), b.addEventListener("focus", h), b.addEventListener("mousedown", p), document.addEventListener("mouseup", x), () => {
484
+ document.removeEventListener("keydown", w), b.removeEventListener("focus", h), b.removeEventListener("mousedown", p), document.removeEventListener("mouseup", x);
485
485
  };
486
- }, [r, k, w, i]);
486
+ }, [o, g, f, s]);
487
487
  }
488
- function Pe({
489
- options: r = [],
490
- value: t,
488
+ function de({
489
+ options: o = [],
490
+ value: r,
491
491
  onChange: e,
492
492
  name: a,
493
- children: s,
493
+ children: t,
494
494
  className: n = "",
495
- childrenClassName: o = "",
496
- hideInputs: d = !1
495
+ childrenClassName: d = "",
496
+ hideInputs: i = !1
497
497
  }) {
498
- const l = T(), w = a || `radio-group-${l}`;
499
- Re(
500
- w,
501
- r.findIndex((i) => i === t)
498
+ const l = $(), f = a || `radio-group-${l}`;
499
+ X(
500
+ f,
501
+ o.findIndex((s) => s === r)
502
502
  );
503
- const u = le(() => r.reduce((i, k) => (typeof k == "string" ? i.some((h) => h.value === k) || i.push({ label: k, value: k }) : i.push(k), i), []), [r]);
504
- return /* @__PURE__ */ _("div", { id: w, role: "radiogroup", tabIndex: 0, className: j(n, "focus:outline-none"), children: [
505
- u.length > 0 && u.map((i, k) => /* @__PURE__ */ b(
506
- M,
503
+ const m = R(() => o.reduce((s, g) => (typeof g == "string" ? s.some((b) => b.value === g) || s.push({ label: g, value: g }) : s.push(g), s), []), [o]);
504
+ return /* @__PURE__ */ C("div", { id: f, role: "radiogroup", tabIndex: 0, className: v(n, "focus:outline-none"), children: [
505
+ m.length > 0 && m.map((s, g) => /* @__PURE__ */ u(
506
+ I,
507
507
  {
508
- value: i.value,
509
- isSelected: t === i.value,
508
+ value: s.value,
509
+ isSelected: r === s.value,
510
510
  onChange: e,
511
- name: w,
512
- disabled: i.disabled,
513
- description: i.description,
514
- hideInput: d,
515
- className: o,
516
- children: i.label
511
+ name: f,
512
+ disabled: s.disabled,
513
+ description: s.description,
514
+ hideInput: i,
515
+ className: d,
516
+ children: s.label
517
517
  },
518
- `${i.value}-${k}`
518
+ `${s.value}-${g}`
519
519
  )),
520
- u.length === 0 && s && te.Children.map(s, (i) => te.isValidElement(i) && i.type === M ? /* @__PURE__ */ b(
521
- M,
520
+ m.length === 0 && t && j.Children.map(t, (s) => j.isValidElement(s) && s.type === I ? /* @__PURE__ */ u(
521
+ I,
522
522
  {
523
- ...i.props,
524
- className: j(o, i.props.className),
525
- hideInput: i.props.hideInput || d,
526
- isSelected: t === i.props.value,
523
+ ...s.props,
524
+ className: v(d, s.props.className),
525
+ hideInput: s.props.hideInput || i,
526
+ isSelected: r === s.props.value,
527
527
  onChange: e,
528
- name: w,
529
- children: i.props.children
528
+ name: f,
529
+ children: s.props.children
530
530
  }
531
531
  ) : null)
532
532
  ] });
533
533
  }
534
- function _e(r, t) {
535
- S(() => {
536
- const e = document.getElementById(r);
534
+ function Y(o, r) {
535
+ A(() => {
536
+ const e = document.getElementById(o);
537
537
  if (!e)
538
538
  return;
539
- if (!t) {
539
+ if (!r) {
540
540
  e.style.height = "auto";
541
541
  return;
542
542
  }
@@ -546,396 +546,111 @@ function _e(r, t) {
546
546
  return a(), e.addEventListener("input", a), e.addEventListener("resize", a), window.addEventListener("resize", a), () => {
547
547
  e.removeEventListener("input", a), e.removeEventListener("resize", a), window.removeEventListener("resize", a);
548
548
  };
549
- }, [r, t]);
549
+ }, [o, r]);
550
550
  }
551
- const qe = {
551
+ const O = {
552
552
  base: "",
553
553
  "left-line": "border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success",
554
554
  outline: "border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-danger not-disabled:data-success:border-success"
555
- }, ze = {
555
+ }, M = {
556
556
  none: "rounded-none",
557
557
  sm: "rounded-sm",
558
558
  md: "rounded-md",
559
559
  lg: "rounded-lg",
560
560
  full: "px-3 rounded-full"
561
- }, se = {
561
+ }, z = {
562
562
  variant: "outline",
563
563
  rounded: "none"
564
564
  };
565
- function Be({ elementId: r, maxLength: t }) {
566
- const [e, a] = B(0);
567
- return S(() => {
568
- const s = document.getElementById(r);
569
- if (!s)
565
+ function P({ elementId: o, maxLength: r }) {
566
+ const [e, a] = N(0);
567
+ return A(() => {
568
+ const t = document.getElementById(o);
569
+ if (!t)
570
570
  return;
571
571
  const n = () => {
572
- const o = s.value.length;
573
- a(o);
574
- const d = o >= t;
575
- s.setAttribute("aria-describedby", `${r}-character-count`), s.setAttribute("aria-invalid", d ? "true" : "false"), d ? s.setAttribute("data-error", "true") : s.removeAttribute("data-error");
572
+ const d = t.value.length;
573
+ a(d);
574
+ const i = d >= r;
575
+ t.setAttribute("aria-describedby", `${o}-character-count`), t.setAttribute("aria-invalid", i ? "true" : "false"), i ? t.setAttribute("data-error", "true") : t.removeAttribute("data-error");
576
576
  };
577
- return n(), s.addEventListener("input", n), s.setAttribute("maxlength", String(t)), () => {
578
- s.removeEventListener("input", n), s.removeAttribute("maxlength"), s.removeAttribute("aria-describedby"), s.removeAttribute("aria-invalid"), s.removeAttribute("data-error");
577
+ return n(), t.addEventListener("input", n), t.setAttribute("maxlength", String(r)), () => {
578
+ t.removeEventListener("input", n), t.removeAttribute("maxlength"), t.removeAttribute("aria-describedby"), t.removeAttribute("aria-invalid"), t.removeAttribute("data-error");
579
579
  };
580
- }, [r, t]), /* @__PURE__ */ b(
580
+ }, [o, r]), /* @__PURE__ */ u(
581
581
  "small",
582
582
  {
583
- className: j(
583
+ className: v(
584
584
  "mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end",
585
- e >= t && "text-danger",
586
- e < t && "text-current"
585
+ e >= r && "text-danger",
586
+ e < r && "text-current"
587
587
  ),
588
588
  role: "status",
589
- children: /* @__PURE__ */ _("span", { id: `${r}-character-count`, children: [
589
+ children: /* @__PURE__ */ C("span", { id: `${o}-character-count`, children: [
590
590
  e,
591
591
  " / ",
592
- t,
592
+ r,
593
593
  " characters"
594
594
  ] })
595
595
  }
596
596
  );
597
597
  }
598
- function er({
599
- variant: r = se.variant,
600
- rounded: t,
598
+ function ie({
599
+ variant: o = z.variant,
600
+ rounded: r,
601
601
  displayOnlyMode: e = !1,
602
602
  errorMessage: a,
603
- successMessage: s,
603
+ successMessage: t,
604
604
  hideResizeHandle: n = !1,
605
- autoExpand: o = !1,
606
- characterLimit: d = 0,
605
+ autoExpand: d = !1,
606
+ characterLimit: i = 0,
607
607
  className: l,
608
- ...w
608
+ ...f
609
609
  }) {
610
- const u = T();
611
- _e(u, o || e);
612
- let i = t;
613
- r === "outline" && !t && (i = "md"), i = i || se.rounded;
614
- let k = n;
615
- (e || r === "left-line" && !n) && (k = !0);
616
- const c = j(
610
+ const m = $();
611
+ Y(m, d || e);
612
+ let s = r;
613
+ o === "outline" && !r && (s = "md"), s = s || z.rounded;
614
+ let g = n;
615
+ (e || o === "left-line" && !n) && (g = !0);
616
+ const c = v(
617
617
  "appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all",
618
- !e && qe[r],
619
- !e && ze[i],
618
+ !e && O[o],
619
+ !e && M[s],
620
620
  !e && "px-2 py-1",
621
621
  e && "pointer-events-none",
622
- k && "no-resize-handle",
622
+ g && "no-resize-handle",
623
623
  l
624
624
  );
625
- return /* @__PURE__ */ _("div", { className: j("-space-y-1.5", e && "cursor-text"), children: [
626
- /* @__PURE__ */ b(
625
+ return /* @__PURE__ */ C("div", { className: v("-space-y-1.5", e && "cursor-text"), children: [
626
+ /* @__PURE__ */ u(
627
627
  "textarea",
628
628
  {
629
- ...w,
630
- id: u,
631
- "aria-disabled": w.disabled,
629
+ ...f,
630
+ id: m,
631
+ "aria-disabled": f.disabled,
632
632
  readOnly: e,
633
- "aria-readonly": e || w["aria-readonly"],
633
+ "aria-readonly": e || f["aria-readonly"],
634
634
  style: {
635
- resize: o ? "none" : void 0
635
+ resize: d ? "none" : void 0
636
636
  },
637
637
  className: c
638
638
  }
639
639
  ),
640
- d > 0 && /* @__PURE__ */ b(Be, { elementId: u, maxLength: d }),
641
- !e && /* @__PURE__ */ b(U, { elementId: u, type: "error", message: a }),
642
- !e && /* @__PURE__ */ b(U, { elementId: u, type: "success", message: s })
640
+ i > 0 && /* @__PURE__ */ u(P, { elementId: m, maxLength: i }),
641
+ !e && /* @__PURE__ */ u(D, { elementId: m, type: "error", message: a }),
642
+ !e && /* @__PURE__ */ u(D, { elementId: m, type: "success", message: t })
643
643
  ] });
644
644
  }
645
- var Se = ((r) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(r, { get: (t, e) => (typeof require < "u" ? require : t)[e] }) : r)(function(r) {
646
- if (typeof require < "u") return require.apply(this, arguments);
647
- throw Error('Dynamic require of "' + r + '" is not supported');
648
- }), ne = (r) => r === !1 ? "false" : r === !0 ? "true" : r === 0 ? "0" : r, G = (r) => {
649
- if (!r || typeof r != "object") return !0;
650
- for (let t in r) return !1;
651
- return !0;
652
- }, $e = (r, t) => {
653
- if (r === t) return !0;
654
- if (!r || !t) return !1;
655
- let e = Object.keys(r), a = Object.keys(t);
656
- if (e.length !== a.length) return !1;
657
- for (let s = 0; s < e.length; s++) {
658
- let n = e[s];
659
- if (!a.includes(n) || r[n] !== t[n]) return !1;
660
- }
661
- return !0;
662
- };
663
- function de(r, t) {
664
- for (let e = 0; e < r.length; e++) {
665
- let a = r[e];
666
- Array.isArray(a) ? de(a, t) : t.push(a);
667
- }
668
- }
669
- var ue = (...r) => {
670
- let t = [];
671
- de(r, t);
672
- let e = [];
673
- for (let a = 0; a < t.length; a++) t[a] && e.push(t[a]);
674
- return e;
675
- }, ce = (r, t) => {
676
- let e = {};
677
- for (let a in r) {
678
- let s = r[a];
679
- if (a in t) {
680
- let n = t[a];
681
- Array.isArray(s) || Array.isArray(n) ? e[a] = ue(n, s) : typeof s == "object" && typeof n == "object" && s && n ? e[a] = ce(s, n) : e[a] = n + " " + s;
682
- } else e[a] = s;
683
- }
684
- for (let a in t) a in r || (e[a] = t[a]);
685
- return e;
686
- }, Fe = /\s+/g, oe = (r) => !r || typeof r != "string" ? r : r.replace(Fe, " ").trim(), F = null, Q = null, Te = async () => F || Q || (Q = import("./__vite-optional-peer-dep_tailwind-merge_tailwind-variants-DYxpcVy9.js").then((r) => (F = r, r)).catch(() => null), Q), Ke = (r) => (t) => {
687
- if (Q && !F) return t;
688
- if (F) {
689
- let { twMerge: e, extendTailwindMerge: a } = F;
690
- return (G(r) ? e : a({ ...r, extend: { theme: r.theme, classGroups: r.classGroups, conflictingClassGroupModifiers: r.conflictingClassGroupModifiers, conflictingClassGroups: r.conflictingClassGroups, ...r.extend } }))(t);
691
- }
692
- try {
693
- let { twMerge: e, extendTailwindMerge: a } = Se("tailwind-merge");
694
- return F = { twMerge: e, extendTailwindMerge: a }, (G(r) ? e : a({ ...r, extend: { theme: r.theme, classGroups: r.classGroups, conflictingClassGroupModifiers: r.conflictingClassGroupModifiers, conflictingClassGroups: r.conflictingClassGroups, ...r.extend } }))(t);
695
- } catch {
696
- return Te(), t;
697
- }
698
- }, He = { twMerge: !0, twMergeConfig: {}, responsiveVariants: !1 }, W = (...r) => {
699
- let t = [];
700
- fe(r, t);
701
- let e = "";
702
- for (let a = 0; a < t.length; a++) t[a] && (e && (e += " "), e += t[a]);
703
- return e || void 0;
704
- };
705
- function fe(r, t) {
706
- for (let e = 0; e < r.length; e++) {
707
- let a = r[e];
708
- Array.isArray(a) ? fe(a, t) : a && t.push(a);
709
- }
710
- }
711
- var X = null, Y = {}, J = !1, H = (...r) => (t) => {
712
- let e = W(r);
713
- return !e || !t.twMerge ? e : ((!X || J) && (J = !1, X = Ke(Y)), X(e) || void 0);
714
- }, ie = (r, t) => {
715
- for (let e in t) e in r ? r[e] = W(r[e], t[e]) : r[e] = t[e];
716
- return r;
717
- }, Qe = (r, t) => {
718
- let { extend: e = null, slots: a = {}, variants: s = {}, compoundVariants: n = [], compoundSlots: o = [], defaultVariants: d = {} } = r, l = { ...He, ...t }, w = e != null && e.base ? W(e.base, r == null ? void 0 : r.base) : r == null ? void 0 : r.base, u = e != null && e.variants && !G(e.variants) ? ce(s, e.variants) : s, i = e != null && e.defaultVariants && !G(e.defaultVariants) ? { ...e.defaultVariants, ...d } : d;
719
- !G(l.twMergeConfig) && !$e(l.twMergeConfig, Y) && (J = !0, Y = l.twMergeConfig);
720
- let k = G(e == null ? void 0 : e.slots), h = G(a) ? {} : { base: W(r == null ? void 0 : r.base, k && (e == null ? void 0 : e.base)), ...a }, c = k ? h : ie({ ...e == null ? void 0 : e.slots }, G(h) ? { base: r == null ? void 0 : r.base } : h), C = G(e == null ? void 0 : e.compoundVariants) ? n : ue(e == null ? void 0 : e.compoundVariants, n), N = (g) => {
721
- if (G(u) && G(a) && k) return H(w, g == null ? void 0 : g.class, g == null ? void 0 : g.className)(l);
722
- if (C && !Array.isArray(C)) throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof C}`);
723
- if (o && !Array.isArray(o)) throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);
724
- let R = (v, m, y = [], f) => {
725
- let x = y;
726
- if (typeof m == "string") {
727
- let p = oe(m).split(" ");
728
- for (let A = 0; A < p.length; A++) x.push(`${v}:${p[A]}`);
729
- } else if (Array.isArray(m)) for (let p = 0; p < m.length; p++) x.push(`${v}:${m[p]}`);
730
- else if (typeof m == "object" && typeof f == "string" && f in m) {
731
- let p = m[f];
732
- if (p && typeof p == "string") {
733
- let A = oe(p).split(" "), L = [];
734
- for (let D = 0; D < A.length; D++) L.push(`${v}:${A[D]}`);
735
- x[f] = x[f] ? x[f].concat(L) : L;
736
- } else if (Array.isArray(p) && p.length > 0) {
737
- let A = [];
738
- for (let L = 0; L < p.length; L++) A.push(`${v}:${p[L]}`);
739
- x[f] = A;
740
- }
741
- }
742
- return x;
743
- }, K = (v, m = u, y = null, f = null) => {
744
- let x = m[v];
745
- if (!x || G(x)) return null;
746
- let p = (f == null ? void 0 : f[v]) ?? (g == null ? void 0 : g[v]);
747
- if (p === null) return null;
748
- let A = ne(p), L = Array.isArray(l.responsiveVariants) && l.responsiveVariants.length > 0 || l.responsiveVariants === !0, D = i == null ? void 0 : i[v], V = [];
749
- if (typeof A == "object" && L) for (let [z, re] of Object.entries(A)) {
750
- let he = x[re];
751
- if (z === "initial") {
752
- D = re;
753
- continue;
754
- }
755
- Array.isArray(l.responsiveVariants) && !l.responsiveVariants.includes(z) || (V = R(z, he, V, y));
756
- }
757
- let q = A != null && typeof A != "object" ? A : ne(D), I = x[q || "false"];
758
- return typeof V == "object" && typeof y == "string" && V[y] ? ie(V, I) : V.length > 0 ? (V.push(I), y === "base" ? V.join(" ") : V) : I;
759
- }, ge = () => {
760
- if (!u) return null;
761
- let v = Object.keys(u), m = [];
762
- for (let y = 0; y < v.length; y++) {
763
- let f = K(v[y], u);
764
- f && m.push(f);
765
- }
766
- return m;
767
- }, be = (v, m) => {
768
- if (!u || typeof u != "object") return null;
769
- let y = [];
770
- for (let f in u) {
771
- let x = K(f, u, v, m), p = v === "base" && typeof x == "string" ? x : x && x[v];
772
- p && y.push(p);
773
- }
774
- return y;
775
- }, O = {};
776
- for (let v in g) {
777
- let m = g[v];
778
- m !== void 0 && (O[v] = m);
779
- }
780
- let P = (v, m) => {
781
- var f;
782
- let y = typeof (g == null ? void 0 : g[v]) == "object" ? { [v]: (f = g[v]) == null ? void 0 : f.initial } : {};
783
- return { ...i, ...O, ...y, ...m };
784
- }, ee = (v = [], m) => {
785
- let y = [], f = v.length;
786
- for (let x = 0; x < f; x++) {
787
- let { class: p, className: A, ...L } = v[x], D = !0, V = P(null, m);
788
- for (let q in L) {
789
- let I = L[q], z = V[q];
790
- if (Array.isArray(I)) {
791
- if (!I.includes(z)) {
792
- D = !1;
793
- break;
794
- }
795
- } else {
796
- if ((I == null || I === !1) && (z == null || z === !1)) continue;
797
- if (z !== I) {
798
- D = !1;
799
- break;
800
- }
801
- }
802
- }
803
- D && (p && y.push(p), A && y.push(A));
804
- }
805
- return y;
806
- }, me = (v) => {
807
- let m = ee(C, v);
808
- if (!Array.isArray(m)) return m;
809
- let y = {}, f = H;
810
- for (let x = 0; x < m.length; x++) {
811
- let p = m[x];
812
- if (typeof p == "string") y.base = f(y.base, p)(l);
813
- else if (typeof p == "object") for (let A in p) y[A] = f(y[A], p[A])(l);
814
- }
815
- return y;
816
- }, pe = (v) => {
817
- if (o.length < 1) return null;
818
- let m = {}, y = P(null, v);
819
- for (let f = 0; f < o.length; f++) {
820
- let { slots: x = [], class: p, className: A, ...L } = o[f];
821
- if (!G(L)) {
822
- let D = !0;
823
- for (let V in L) {
824
- let q = y[V], I = L[V];
825
- if (q === void 0 || (Array.isArray(I) ? !I.includes(q) : I !== q)) {
826
- D = !1;
827
- break;
828
- }
829
- }
830
- if (!D) continue;
831
- }
832
- for (let D = 0; D < x.length; D++) {
833
- let V = x[D];
834
- m[V] || (m[V] = []), m[V].push([p, A]);
835
- }
836
- }
837
- return m;
838
- };
839
- if (!G(a) || !k) {
840
- let v = {};
841
- if (typeof c == "object" && !G(c)) {
842
- let m = H;
843
- for (let y in c) v[y] = (f) => {
844
- let x = me(f), p = pe(f);
845
- return m(c[y], be(y, f), x ? x[y] : void 0, p ? p[y] : void 0, f == null ? void 0 : f.class, f == null ? void 0 : f.className)(l);
846
- };
847
- }
848
- return v;
849
- }
850
- return H(w, ge(), ee(C), g == null ? void 0 : g.class, g == null ? void 0 : g.className)(l);
851
- }, E = () => {
852
- if (!(!u || typeof u != "object")) return Object.keys(u);
853
- };
854
- return N.variantKeys = E(), N.extend = e, N.base = w, N.slots = c, N.variants = u, N.defaultVariants = i, N.compoundSlots = o, N.compoundVariants = C, N;
855
- };
856
- const Ue = Qe({
857
- base: "inline-flex items-center max-w-[500px] hover:cursor-pointer",
858
- variants: {
859
- size: {
860
- large: "h-[44px] py-[12px] px-[16px] gap-1 rounded-lg",
861
- medium: "h-[32px] py-[6px] px-[12px] gap-1 rounded-lg",
862
- small: "h-[28px] py-[6px] px-[12px] gap-1 rounded-lg"
863
- },
864
- design: {
865
- outline_light: "border border-greyscale-light-2 text-greyscale-light-2 hover:bg-greyscale-light-2 hover:text-greyscale-dark-1 hover:border-0",
866
- outline_dark: "border border-greyscale-dark-2 text-greyscale-dark-2 hover:bg-greyscale-dark-2 hover:text-greyscale-white hover:border-0",
867
- filled_light: "bg-greyscale-light-2 text-greyscale-dark-1 hover:bg-pink hover:text-greyscale-white",
868
- filled_dark: "bg-greyscale-dark-2 text-greyscale-white hover:bg-dark-pink hover:text-pink",
869
- filled_pink: "bg-pink text-greyscale-white hover:bg-dark-pink hover:text-pink",
870
- neutral_dark: "text-greyscale-dark-2 hover:bg-greyscale-light-2 hover:text-greyscale-dark-1",
871
- neutral_light: "text-greyscale-light-2 hover:bg-greyscale-light-2 hover:text-greyscale-dark-1"
872
- },
873
- disabled: {
874
- true: "pointer-events-none"
875
- }
876
- },
877
- compoundVariants: [
878
- {
879
- design: ["filled_dark", "filled_pink"],
880
- disabled: !0,
881
- class: "bg-greyscale-light-1 text-greyscale-light-2"
882
- },
883
- {
884
- design: "filled_light",
885
- disabled: !0,
886
- class: "text-greyscale-medium-3 bg-greyscale-light-1"
887
- },
888
- {
889
- design: "outline_light",
890
- disabled: !0,
891
- class: "text-greyscale-medium-3 border-greyscale-medium-3"
892
- },
893
- {
894
- design: "outline_dark",
895
- disabled: !0,
896
- class: "text-greyscale-light-1 border-greyscale-light-1"
897
- },
898
- {
899
- design: "neutral_dark",
900
- disabled: !0,
901
- class: "text-greyscale-light-1"
902
- },
903
- {
904
- design: "neutral_light",
905
- disabled: !0,
906
- class: "text-greyscale-medium-3"
907
- }
908
- ]
909
- }), rr = ({
910
- label: r,
911
- size: t,
912
- design: e,
913
- disabled: a = !1,
914
- icon: s = void 0,
915
- ...n
916
- }) => /* @__PURE__ */ _(
917
- "button",
918
- {
919
- "data-testid": `test-button-${r}`,
920
- className: Ue({ size: t, design: e, disabled: a }),
921
- ...n,
922
- children: [
923
- s && /* @__PURE__ */ b(ve, { children: s }),
924
- /* @__PURE__ */ b("span", { children: r })
925
- ]
926
- }
927
- );
928
645
  export {
929
- Xe as Button,
930
- ke as ButtonLoadingDots,
931
- Ye as Checkbox,
932
- Je as Input,
933
- Oe as Label,
934
- Pe as RadioGroup,
935
- M as RadioGroupItem,
936
- Ie as RadioInput,
937
- rr as TestButton,
938
- er as Textarea,
939
- Ue as testButton
646
+ ae as Button,
647
+ H as ButtonLoadingDots,
648
+ ne as Checkbox,
649
+ oe as Input,
650
+ se as Label,
651
+ de as RadioGroup,
652
+ I as RadioGroupItem,
653
+ J as RadioInput,
654
+ ie as Textarea
940
655
  };
941
656
  //# sourceMappingURL=components.esm.js.map