@codeplex-qwik/ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs ADDED
@@ -0,0 +1,1055 @@
1
+ import { jsx as e, jsxs as b, Fragment as L } from "react/jsx-runtime";
2
+ import $, { useState as N, useRef as j, useEffect as M, useId as I } from "react";
3
+ const V = {};
4
+ function H() {
5
+ return /* @__PURE__ */ e("div", { className: V.container, children: /* @__PURE__ */ e("h1", { children: "Welcome to Ui!" }) });
6
+ }
7
+ const Z = $.forwardRef(
8
+ ({
9
+ variant: l = "primary",
10
+ size: t = "md",
11
+ disabled: r = !1,
12
+ fullWidth: s = !1,
13
+ loading: n = !1,
14
+ leftIcon: a,
15
+ rightIcon: o,
16
+ type: c = "button",
17
+ className: d = "",
18
+ children: i,
19
+ ...u
20
+ }, g) => {
21
+ const m = "inline-flex items-center justify-center gap-2 rounded-lg border text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors transition-shadow", h = {
22
+ primary: "bg-blue-600 border-blue-600 text-white hover:bg-blue-700 hover:border-blue-700 active:bg-blue-800 dark:bg-blue-500 dark:border-blue-500 dark:hover:bg-blue-600",
23
+ secondary: "bg-gray-100 border-gray-200 text-gray-900 hover:bg-gray-200 hover:border-gray-300 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-50 dark:hover:bg-gray-700",
24
+ outline: "bg-transparent border-gray-300 text-gray-900 hover:bg-gray-50 dark:border-gray-600 dark:text-gray-50 dark:hover:bg-gray-800",
25
+ ghost: "bg-transparent border-transparent text-gray-700 hover:bg-gray-100 dark:text-gray-100 dark:hover:bg-gray-800",
26
+ danger: "bg-red-600 border-red-600 text-white hover:bg-red-700 hover:border-red-700 active:bg-red-800 dark:bg-red-500 dark:border-red-500 dark:hover:bg-red-600",
27
+ success: "bg-emerald-600 border-emerald-600 text-white hover:bg-emerald-700 hover:border-emerald-700 active:bg-emerald-800 dark:bg-emerald-500 dark:border-emerald-500 dark:hover:bg-emerald-600"
28
+ }, f = {
29
+ xs: "px-2 py-1 text-[11px]",
30
+ sm: "px-3 py-1.5 text-xs",
31
+ md: "px-4 py-2 text-sm",
32
+ lg: "px-5 py-2.5 text-base"
33
+ }, x = s ? "w-full" : "w-full sm:w-auto", p = r || n, y = [
34
+ m,
35
+ h[l],
36
+ f[t],
37
+ x,
38
+ n ? "cursor-wait" : "",
39
+ d
40
+ ].filter(Boolean).join(" ");
41
+ return /* @__PURE__ */ b(
42
+ "button",
43
+ {
44
+ ref: g,
45
+ type: c,
46
+ className: y,
47
+ disabled: p,
48
+ "aria-busy": n ? "true" : "false",
49
+ ...u,
50
+ children: [
51
+ n && /* @__PURE__ */ e("span", { className: "inline-flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ e("span", { className: "h-3 w-3 animate-spin rounded-full border-[2px] border-white/40 border-t-white dark:border-t-gray-100" }) }),
52
+ !n && a && /* @__PURE__ */ e("span", { className: "text-sm leading-none", children: a }),
53
+ /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center", children: i }),
54
+ !n && o && /* @__PURE__ */ e("span", { className: "text-sm leading-none", children: o })
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ );
60
+ Z.displayName = "CodeplexButton";
61
+ const E = $.forwardRef(
62
+ ({
63
+ label: l,
64
+ variant: t = "neutral",
65
+ size: r = "md",
66
+ pill: s = !0,
67
+ iconLeft: n,
68
+ iconRight: a,
69
+ className: o = "",
70
+ onClick: c,
71
+ ...d
72
+ }, i) => (
73
+ // @ts-ignore
74
+ /* @__PURE__ */ b(
75
+ c ? "button" : "span",
76
+ {
77
+ ref: i,
78
+ type: c ? "button" : void 0,
79
+ className: `
80
+ inline-flex items-center gap-1 font-medium border whitespace-nowrap select-none
81
+ ${r === "sm" ? "text-[11px] px-2 py-0.5" : "text-xs px-2.5 py-1"}
82
+ ${s ? "rounded-full" : "rounded-md"}
83
+ ${t === "primary" ? "bg-blue-50 text-blue-700 border-blue-100 dark:bg-blue-900/40 dark:text-blue-200 dark:border-blue-800" : t === "secondary" ? "bg-purple-50 text-purple-700 border-purple-100 dark:bg-purple-900/40 dark:text-purple-200 dark:border-purple-800" : t === "success" ? "bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-900/40 dark:text-emerald-200 dark:border-emerald-800" : t === "warning" ? "bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-900/40 dark:text-amber-200 dark:border-amber-800" : t === "danger" ? "bg-red-50 text-red-700 border-red-100 dark:bg-red-900/40 dark:text-red-200 dark:border-red-800" : "bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:border-gray-700"}
84
+ ${c ? "cursor-pointer hover:brightness-95 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1" : ""}
85
+ ${o}
86
+ `,
87
+ onClick: c,
88
+ ...d,
89
+ children: [
90
+ n && /* @__PURE__ */ e("span", { className: "text-xs", children: n }),
91
+ /* @__PURE__ */ e("span", { children: l }),
92
+ a && /* @__PURE__ */ e("span", { className: "text-xs", children: a })
93
+ ]
94
+ }
95
+ )
96
+ )
97
+ );
98
+ E.displayName = "CodeplexBadge";
99
+ const W = ({
100
+ size: l = "md",
101
+ color: t = "primary",
102
+ type: r = "border",
103
+ label: s,
104
+ labelPosition: n = "right",
105
+ fullScreen: a = !1,
106
+ className: o = ""
107
+ }) => {
108
+ const c = {
109
+ xs: "w-3 h-3",
110
+ sm: "w-4 h-4",
111
+ md: "w-6 h-6",
112
+ lg: "w-8 h-8",
113
+ xl: "w-12 h-12"
114
+ }, d = {
115
+ primary: "text-blue-600 dark:text-blue-500",
116
+ white: "text-white",
117
+ gray: "text-gray-400 dark:text-gray-300",
118
+ success: "text-emerald-600 dark:text-emerald-500",
119
+ danger: "text-red-600 dark:text-red-500",
120
+ warning: "text-yellow-500"
121
+ }, u = /* @__PURE__ */ b(
122
+ "div",
123
+ {
124
+ role: "status",
125
+ className: `
126
+ inline-flex items-center
127
+ ${n === "bottom" ? "flex-col gap-3" : "flex-row gap-2"}
128
+ `,
129
+ children: [
130
+ (() => {
131
+ const g = c[l], m = d[t];
132
+ return r === "dots" ? /* @__PURE__ */ b("div", { className: `flex items-center justify-center gap-1 ${m} ${o}`, children: [
133
+ /* @__PURE__ */ e("div", { className: `${l === "xl" ? "w-3 h-3" : "w-1.5 h-1.5"} bg-current rounded-full animate-bounce [animation-delay:-0.3s]` }),
134
+ /* @__PURE__ */ e("div", { className: `${l === "xl" ? "w-3 h-3" : "w-1.5 h-1.5"} bg-current rounded-full animate-bounce [animation-delay:-0.15s]` }),
135
+ /* @__PURE__ */ e("div", { className: `${l === "xl" ? "w-3 h-3" : "w-1.5 h-1.5"} bg-current rounded-full animate-bounce` })
136
+ ] }) : r === "ping" ? /* @__PURE__ */ b("span", { className: `relative flex ${g} ${o}`, children: [
137
+ /* @__PURE__ */ e("span", { className: `animate-ping absolute inline-flex h-full w-full rounded-full bg-current opacity-75 ${m}` }),
138
+ /* @__PURE__ */ e("span", { className: `relative inline-flex rounded-full h-full w-full bg-current ${m}` })
139
+ ] }) : /* @__PURE__ */ b(
140
+ "svg",
141
+ {
142
+ className: `animate-spin ${g} ${m} ${o}`,
143
+ xmlns: "http://www.w3.org/2000/svg",
144
+ fill: "none",
145
+ viewBox: "0 0 24 24",
146
+ children: [
147
+ /* @__PURE__ */ e(
148
+ "circle",
149
+ {
150
+ className: "opacity-25",
151
+ cx: "12",
152
+ cy: "12",
153
+ r: "10",
154
+ stroke: "currentColor",
155
+ strokeWidth: "4"
156
+ }
157
+ ),
158
+ /* @__PURE__ */ e(
159
+ "path",
160
+ {
161
+ className: "opacity-75",
162
+ fill: "currentColor",
163
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
164
+ }
165
+ )
166
+ ]
167
+ }
168
+ );
169
+ })(),
170
+ s && /* @__PURE__ */ e("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-200", children: s }),
171
+ !s && /* @__PURE__ */ e("span", { className: "sr-only", children: "Cargando..." })
172
+ ]
173
+ }
174
+ );
175
+ return a ? /* @__PURE__ */ e("div", { className: "fixed inset-0 z-[9999] flex flex-col items-center justify-center bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm transition-opacity", children: u }) : u;
176
+ }, F = ({ keys: l, size: t = "md", className: r = "", children: s, ...n }) => {
177
+ const a = t === "sm" ? "text-[10px] px-1.5 py-0.5" : t === "lg" ? "text-xs px-2.5 py-1.5" : "text-[11px] px-2 py-1", o = "inline-flex items-center justify-center rounded border border-gray-300 bg-gray-50 text-gray-800 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 font-mono shadow-sm";
178
+ return l && l.length > 0 ? /* @__PURE__ */ e("span", { className: `inline-flex items-center gap-1 ${r}`, ...n, children: l.map((c, d) => /* @__PURE__ */ e("kbd", { className: `${o} ${a}`, children: c }, c + d)) }) : /* @__PURE__ */ e("kbd", { className: `${o} ${a} ${r}`, ...n, children: s });
179
+ }, _ = ({
180
+ src: l,
181
+ alt: t,
182
+ name: r,
183
+ size: s = "md",
184
+ shape: n = "circle",
185
+ status: a = "none",
186
+ showBorder: o = !1,
187
+ showInitialsFallback: c = !0,
188
+ className: d = "",
189
+ ...i
190
+ }) => {
191
+ const u = s === "xs" ? "w-6 h-6 text-[10px]" : s === "sm" ? "w-8 h-8 text-xs" : s === "lg" ? "w-12 h-12 text-base" : s === "xl" ? "w-16 h-16 text-lg" : "w-10 h-10 text-sm", g = n === "rounded" ? "rounded-lg" : "rounded-full", m = o ? "ring-2 ring-white dark:ring-gray-900" : "", h = a === "online" ? "bg-emerald-500" : a === "busy" ? "bg-red-500" : a === "away" ? "bg-amber-400" : a === "offline" ? "bg-gray-400 dark:bg-gray-500" : "bg-transparent", f = a !== "none", x = (r || t || "?").trim().split(" ").filter(Boolean).slice(0, 2).map((y) => y[0]?.toUpperCase()).join("") || "?", p = a === "online" ? "En línea" : a === "busy" ? "Ocupado" : a === "away" ? "Ausente" : a === "offline" ? "Desconectado" : void 0;
192
+ return /* @__PURE__ */ b(
193
+ "div",
194
+ {
195
+ className: `relative inline-flex ${d}`,
196
+ "aria-label": r,
197
+ ...i,
198
+ children: [
199
+ l ? /* @__PURE__ */ e(
200
+ "img",
201
+ {
202
+ src: l,
203
+ alt: t || r || "Avatar",
204
+ className: `
205
+ ${u}
206
+ ${g}
207
+ object-cover
208
+ bg-gray-200 dark:bg-gray-700
209
+ ${m}
210
+ `
211
+ }
212
+ ) : c ? /* @__PURE__ */ e(
213
+ "div",
214
+ {
215
+ className: `
216
+ ${u}
217
+ ${g}
218
+ inline-flex items-center justify-center
219
+ bg-gray-200 text-gray-700
220
+ dark:bg-gray-700 dark:text-gray-100
221
+ font-medium
222
+ ${m}
223
+ `,
224
+ role: "img",
225
+ "aria-label": r,
226
+ children: x
227
+ }
228
+ ) : /* @__PURE__ */ e(
229
+ "div",
230
+ {
231
+ className: `
232
+ ${u}
233
+ ${g}
234
+ bg-gray-200 dark:bg-gray-700
235
+ ${m}
236
+ `,
237
+ role: "img",
238
+ "aria-label": r
239
+ }
240
+ ),
241
+ f && /* @__PURE__ */ b(L, { children: [
242
+ /* @__PURE__ */ e(
243
+ "span",
244
+ {
245
+ className: `
246
+ absolute bottom-0 right-0
247
+ inline-flex items-center justify-center
248
+ rounded-full
249
+ border-2 border-white dark:border-gray-900
250
+ ${s === "xs" ? "w-2.5 h-2.5" : "w-3 h-3"}
251
+ ${h}
252
+ `,
253
+ "aria-hidden": "true"
254
+ }
255
+ ),
256
+ p && /* @__PURE__ */ e("span", { className: "sr-only", children: p })
257
+ ] })
258
+ ]
259
+ }
260
+ );
261
+ }, O = ({
262
+ requirements: l,
263
+ className: t = ""
264
+ }) => {
265
+ const [r, s] = N(!1), n = j(null), a = $.useId(), o = (i) => {
266
+ i.stopPropagation(), i.preventDefault(), s(!r);
267
+ }, c = () => s(!0), d = () => s(!1);
268
+ return M(() => {
269
+ const i = (u) => {
270
+ r && n.current && !n.current.contains(u.target) && s(!1);
271
+ };
272
+ return document.addEventListener("click", i), () => {
273
+ document.removeEventListener("click", i);
274
+ };
275
+ }, [r]), /* @__PURE__ */ b(
276
+ "div",
277
+ {
278
+ ref: n,
279
+ className: `relative inline-flex items-center ml-0.5 align-top ${t}`,
280
+ onMouseEnter: c,
281
+ onMouseLeave: d,
282
+ children: [
283
+ /* @__PURE__ */ e(
284
+ "button",
285
+ {
286
+ type: "button",
287
+ onClick: o,
288
+ "aria-expanded": r,
289
+ "aria-controls": a,
290
+ "aria-label": "Ver requisitos",
291
+ className: `
292
+ group flex items-center justify-center
293
+ text-red-500 dark:text-red-400
294
+ font-bold text-lg leading-none
295
+ cursor-help select-none
296
+ transition-transform duration-200
297
+ focus:outline-none focus:text-red-600 dark:focus:text-red-300
298
+ ${r ? "scale-110" : "hover:scale-110"}
299
+ `,
300
+ children: "*"
301
+ }
302
+ ),
303
+ r && /* @__PURE__ */ b(
304
+ "div",
305
+ {
306
+ id: a,
307
+ className: `
308
+ absolute bottom-full left-0 mb-1.5 z-[100]
309
+ /* Responsive Width: Fijo en desktop, limitado al viewport en móvil */
310
+ w-64 max-w-[85vw] sm:max-w-xs
311
+ bg-white dark:bg-gray-800
312
+ border border-gray-200 dark:border-gray-700
313
+ rounded-lg shadow-xl
314
+ animate-in fade-in zoom-in-95 slide-in-from-bottom-1 duration-150
315
+ origin-bottom-left
316
+ `,
317
+ onClick: (i) => i.stopPropagation(),
318
+ children: [
319
+ /* @__PURE__ */ e("div", { className: "px-3 py-2 border-b border-gray-100 dark:border-gray-700/50 bg-gray-50/80 dark:bg-gray-800/80 rounded-t-lg backdrop-blur-sm", children: /* @__PURE__ */ b("h4", { className: "text-[10px] font-bold text-gray-500 dark:text-gray-400 uppercase tracking-wider flex items-center gap-1.5", children: [
320
+ /* @__PURE__ */ e("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
321
+ "Requisitos"
322
+ ] }) }),
323
+ /* @__PURE__ */ e("ul", { className: "p-1.5 space-y-0.5", children: l.map((i, u) => /* @__PURE__ */ b(
324
+ "li",
325
+ {
326
+ className: `
327
+ flex items-start gap-2 px-2 py-1.5 rounded
328
+ text-xs text-gray-600 dark:text-gray-300
329
+ hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors
330
+ `,
331
+ children: [
332
+ /* @__PURE__ */ e("span", { className: "text-blue-500 dark:text-blue-400 mt-[2px]", children: "•" }),
333
+ /* @__PURE__ */ e("span", { className: "leading-snug", children: i })
334
+ ]
335
+ },
336
+ u
337
+ )) }),
338
+ /* @__PURE__ */ e("div", { className: "absolute -bottom-1 left-1.5 w-2 h-2 bg-white dark:bg-gray-800 border-b border-r border-gray-200 dark:border-gray-700 rotate-45" })
339
+ ]
340
+ }
341
+ )
342
+ ]
343
+ }
344
+ );
345
+ }, D = ({
346
+ htmlFor: l,
347
+ label: t,
348
+ required: r,
349
+ requirements: s,
350
+ className: n = "",
351
+ children: a,
352
+ ...o
353
+ }) => /* @__PURE__ */ b("div", { className: `flex items-center gap-2 mb-1.5 ${n}`, ...o, children: [
354
+ /* @__PURE__ */ e(
355
+ "label",
356
+ {
357
+ htmlFor: l,
358
+ className: "text-sm font-medium text-gray-800 dark:text-gray-100 cursor-pointer select-none",
359
+ children: t
360
+ }
361
+ ),
362
+ r && // VERIFICACIÓN: Si requirements tiene datos, muestra el Popup. Si no, el asterisco simple.
363
+ (s && s.length > 0 ? /* @__PURE__ */ e(O, { requirements: s }) : /* @__PURE__ */ e("span", { className: "text-xs text-red-500 font-bold select-none", title: "Campo obligatorio", children: "*" })),
364
+ a
365
+ ] }), P = ({
366
+ variant: l = "default",
367
+ padding: t = "md",
368
+ hoverable: r = !1,
369
+ clickable: s = !1,
370
+ className: n = "",
371
+ media: a,
372
+ header: o,
373
+ footer: c,
374
+ children: d,
375
+ ...i
376
+ }) => /* @__PURE__ */ b(
377
+ "article",
378
+ {
379
+ className: `
380
+ relative
381
+ rounded-xl
382
+ shadow-sm
383
+ ${l === "outline" ? "bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700" : l === "soft" ? "bg-gray-50 dark:bg-gray-800/70 border border-gray-100 dark:border-gray-700/60" : "bg-white dark:bg-gray-800 border border-gray-100 dark:border-gray-800"}
384
+ ${t === "none" ? "p-0" : t === "sm" ? "p-3" : t === "lg" ? "p-6" : "p-4"}
385
+ ${r || s ? "transition-shadow transition-transform hover:shadow-md hover:-translate-y-[1px]" : "transition-shadow"}
386
+ ${s ? "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/60" : ""}
387
+ ${n}
388
+ `,
389
+ ...i,
390
+ children: [
391
+ a,
392
+ o,
393
+ d,
394
+ c
395
+ ]
396
+ }
397
+ ), K = ({
398
+ eyebrow: l,
399
+ title: t,
400
+ subtitle: r,
401
+ align: s = "left",
402
+ primaryLabel: n,
403
+ secondaryLabel: a,
404
+ onPrimary: o,
405
+ onSecondary: c,
406
+ fullHeight: d = !1,
407
+ backgroundImageUrl: i,
408
+ darkOverlay: u = !0,
409
+ className: g = "",
410
+ children: m,
411
+ ...h
412
+ }) => {
413
+ const f = s === "center" ? "text-center items-center" : "text-left items-start", x = !!i;
414
+ return /* @__PURE__ */ b(
415
+ "section",
416
+ {
417
+ className: `
418
+ relative overflow-hidden
419
+ border border-gray-200/80 dark:border-gray-700/80
420
+ rounded-2xl
421
+ px-6 py-10 md:px-10 md:py-14
422
+ shadow-sm
423
+ flex
424
+ ${d ? "min-h-[60vh]" : ""}
425
+ ${x ? "bg-cover bg-center" : "bg-gradient-to-b from-white to-gray-50 dark:from-gray-900 dark:to-gray-950"}
426
+ ${g}
427
+ `,
428
+ style: x ? { backgroundImage: `url(${i})` } : void 0,
429
+ ...h,
430
+ children: [
431
+ x && u && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black/40 backdrop-blur-[1px]" }),
432
+ /* @__PURE__ */ b(
433
+ "div",
434
+ {
435
+ className: `
436
+ relative z-10
437
+ max-w-3xl mx-auto flex flex-col gap-6
438
+ ${f}
439
+ `,
440
+ children: [
441
+ l && /* @__PURE__ */ e("span", { className: "inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-blue-50 text-blue-700 dark:bg-blue-900/60 dark:text-blue-100", children: l }),
442
+ /* @__PURE__ */ b("div", { className: "space-y-3 md:space-y-4", children: [
443
+ /* @__PURE__ */ e(
444
+ "h1",
445
+ {
446
+ className: `
447
+ text-3xl md:text-4xl lg:text-5xl font-extrabold tracking-tight
448
+ ${x ? "text-white" : "text-gray-900 dark:text-white"}
449
+ `,
450
+ children: t
451
+ }
452
+ ),
453
+ r && /* @__PURE__ */ e(
454
+ "p",
455
+ {
456
+ className: `
457
+ text-base md:text-lg max-w-2xl
458
+ ${x ? "text-gray-100/90" : "text-gray-600 dark:text-gray-300"}
459
+ `,
460
+ children: r
461
+ }
462
+ )
463
+ ] }),
464
+ (n || a) && /* @__PURE__ */ b(
465
+ "div",
466
+ {
467
+ className: `
468
+ flex flex-wrap gap-3 mt-2
469
+ ${s === "center" ? "justify-center" : "justify-start"}
470
+ `,
471
+ children: [
472
+ n && o && /* @__PURE__ */ e(
473
+ "button",
474
+ {
475
+ type: "button",
476
+ className: "inline-flex items-center justify-center px-4 py-2.5 text-sm font-semibold rounded-lg bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",
477
+ onClick: o,
478
+ children: n
479
+ }
480
+ ),
481
+ a && c && /* @__PURE__ */ e(
482
+ "button",
483
+ {
484
+ type: "button",
485
+ className: `
486
+ inline-flex items-center justify-center px-4 py-2.5 text-sm font-semibold rounded-lg border
487
+ ${x ? "border-white/60 text-white bg-white/5 hover:bg-white/10" : "border-gray-300 text-gray-700 bg-white hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-100 dark:hover:bg-gray-700"}
488
+ focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
489
+ `,
490
+ onClick: c,
491
+ children: a
492
+ }
493
+ )
494
+ ]
495
+ }
496
+ ),
497
+ m
498
+ ]
499
+ }
500
+ )
501
+ ]
502
+ }
503
+ );
504
+ }, A = {
505
+ info: "bg-blue-50 text-blue-800 border-blue-200 dark:bg-blue-900/30 dark:text-blue-100 dark:border-blue-800/60",
506
+ success: "bg-emerald-50 text-emerald-800 border-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-100 dark:border-emerald-800/60",
507
+ warning: "bg-amber-50 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-100 dark:border-amber-800/60",
508
+ error: "bg-red-50 text-red-800 border-red-200 dark:bg-red-900/30 dark:text-red-100 dark:border-red-800/60",
509
+ neutral: "bg-gray-50 text-gray-800 border-gray-200 dark:bg-gray-900/40 dark:text-gray-100 dark:border-gray-700"
510
+ }, U = ({
511
+ title: l,
512
+ description: t,
513
+ variant: r = "info",
514
+ icon: s,
515
+ dismissible: n = !1,
516
+ open: a,
517
+ onClose: o,
518
+ fullWidth: c = !0,
519
+ className: d = "",
520
+ children: i,
521
+ ...u
522
+ }) => {
523
+ const [g, m] = N(!0);
524
+ if (!(a !== void 0 ? a : g)) return null;
525
+ const f = A[r], x = s ?? (r === "success" ? "✅" : r === "warning" ? "⚠️" : r === "error" ? "⛔" : r === "neutral" ? "💡" : "ℹ️"), p = r === "error" || r === "warning" ? "alert" : "status", y = () => {
526
+ a === void 0 && m(!1), o && o();
527
+ };
528
+ return /* @__PURE__ */ e("div", { className: c ? "w-full" : "inline-flex", ...u, children: /* @__PURE__ */ b(
529
+ "div",
530
+ {
531
+ className: `
532
+ flex w-full items-start gap-3 border rounded-lg px-4 py-3
533
+ shadow-sm ${f} ${d}
534
+ `,
535
+ role: p,
536
+ children: [
537
+ x && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xl shrink-0", "aria-hidden": "true", children: x }),
538
+ /* @__PURE__ */ b("div", { className: "flex-1 min-w-0", children: [
539
+ l && /* @__PURE__ */ e("p", { className: "text-sm font-semibold leading-5 truncate", children: l }),
540
+ t && /* @__PURE__ */ e("p", { className: "mt-0.5 text-xs sm:text-sm leading-5", children: t }),
541
+ i
542
+ ] }),
543
+ n && /* @__PURE__ */ e(
544
+ "button",
545
+ {
546
+ type: "button",
547
+ className: "shrink-0 p-1.5 rounded-md hover:bg-black/5 dark:hover:bg-white/10 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-blue-500",
548
+ onClick: y,
549
+ "aria-label": "Cerrar aviso",
550
+ children: /* @__PURE__ */ e(
551
+ "svg",
552
+ {
553
+ className: "w-4 h-4",
554
+ viewBox: "0 0 20 20",
555
+ fill: "currentColor",
556
+ "aria-hidden": "true",
557
+ children: /* @__PURE__ */ e(
558
+ "path",
559
+ {
560
+ fillRule: "evenodd",
561
+ d: `M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414
562
+ 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414
563
+ 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586
564
+ 10 4.293 5.707a1 1 0 010-1.414z`,
565
+ clipRule: "evenodd"
566
+ }
567
+ )
568
+ }
569
+ )
570
+ }
571
+ )
572
+ ]
573
+ }
574
+ ) });
575
+ }, q = ({
576
+ variant: l = "info",
577
+ title: t,
578
+ description: r,
579
+ icon: s,
580
+ dismissible: n = !1,
581
+ open: a,
582
+ onClose: o,
583
+ className: c = "",
584
+ children: d,
585
+ ...i
586
+ }) => {
587
+ const [u, g] = N(!0);
588
+ if (!(a !== void 0 ? a : u)) return null;
589
+ const h = s ?? (l === "success" ? "✅" : l === "warning" ? "⚠️" : l === "danger" ? "⛔" : "ℹ️"), f = l === "success" ? "border-emerald-200 bg-emerald-50 text-emerald-900 dark:border-emerald-800/70 dark:bg-emerald-900/30 dark:text-emerald-50" : l === "warning" ? "border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800/70 dark:bg-amber-900/30 dark:text-amber-50" : l === "danger" ? "border-red-200 bg-red-50 text-red-900 dark:border-red-800/70 dark:bg-red-900/30 dark:text-red-50" : "border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800/70 dark:bg-blue-900/30 dark:text-blue-50", x = () => {
590
+ a === void 0 && g(!1), o && o();
591
+ };
592
+ return /* @__PURE__ */ e(
593
+ "div",
594
+ {
595
+ role: "alert",
596
+ className: `
597
+ w-full mb-3
598
+ rounded-lg border
599
+ px-3 py-3.5 sm:px-4 sm:py-3.5
600
+ ${f}
601
+ ${c}
602
+ `,
603
+ ...i,
604
+ children: /* @__PURE__ */ b("div", { className: "flex flex-col sm:flex-row sm:items-start gap-2 sm:gap-3", children: [
605
+ /* @__PURE__ */ e("div", { className: "flex-shrink-0 mt-0.5 sm:mt-0 text-lg sm:text-xl", children: h }),
606
+ /* @__PURE__ */ b("div", { className: "flex-1 min-w-0 text-xs sm:text-sm leading-relaxed", children: [
607
+ t && /* @__PURE__ */ e("p", { className: "font-semibold mb-0.5 sm:mb-1 truncate", children: t }),
608
+ r && /* @__PURE__ */ e("p", { className: "text-[11px] sm:text-xs md:text-sm opacity-90", children: r }),
609
+ d
610
+ ] }),
611
+ n && /* @__PURE__ */ e(
612
+ "button",
613
+ {
614
+ type: "button",
615
+ className: `
616
+ self-start sm:self-center
617
+ -mr-1 sm:ml-2
618
+ inline-flex h-7 w-7 items-center justify-center
619
+ rounded-md
620
+ text-xs sm:text-sm
621
+ hover:bg-black/5 dark:hover:bg-white/10
622
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-blue-500
623
+ `,
624
+ "aria-label": "Cerrar alerta",
625
+ onClick: x,
626
+ children: "✕"
627
+ }
628
+ )
629
+ ] })
630
+ }
631
+ );
632
+ }, J = ({
633
+ content: l,
634
+ side: t = "top",
635
+ delayMs: r = 200,
636
+ arrow: s = !0,
637
+ disabled: n = !1,
638
+ className: a = "",
639
+ onOpenChange: o,
640
+ children: c
641
+ }) => {
642
+ const [d, i] = N(!1), u = j(null), g = I(), m = (y) => {
643
+ i(y), o && o(y);
644
+ }, h = () => {
645
+ n || (u.current && (clearTimeout(u.current), u.current = null), u.current = window.setTimeout(() => {
646
+ m(!0);
647
+ }, r));
648
+ }, f = () => {
649
+ u.current && (clearTimeout(u.current), u.current = null), m(!1);
650
+ };
651
+ M(() => () => {
652
+ u.current && clearTimeout(u.current);
653
+ }, []);
654
+ const x = {
655
+ top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
656
+ bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
657
+ left: "right-full top-1/2 -translate-y-1/2 mr-2",
658
+ right: "left-full top-1/2 -translate-y-1/2 ml-2"
659
+ }, p = {
660
+ top: "bottom-[-4px] left-1/2 -translate-x-1/2 border-b border-r",
661
+ bottom: "top-[-4px] left-1/2 -translate-x-1/2 border-t border-l",
662
+ left: "right-[-4px] top-1/2 -translate-y-1/2 border-t border-r",
663
+ right: "left-[-4px] top-1/2 -translate-y-1/2 border-b border-l"
664
+ };
665
+ return /* @__PURE__ */ b(
666
+ "span",
667
+ {
668
+ className: `relative inline-flex ${a}`,
669
+ onMouseEnter: h,
670
+ onMouseLeave: f,
671
+ onFocus: h,
672
+ onBlur: f,
673
+ "aria-describedby": d ? g : void 0,
674
+ children: [
675
+ c,
676
+ !n && d && /* @__PURE__ */ e(
677
+ "div",
678
+ {
679
+ id: g,
680
+ role: "tooltip",
681
+ className: `
682
+ absolute z-50
683
+ ${x[t]}
684
+ animate-in fade-in zoom-in-95 duration-200
685
+ min-w-max
686
+ `,
687
+ children: /* @__PURE__ */ b(
688
+ "div",
689
+ {
690
+ className: `
691
+ relative
692
+ px-3 py-2
693
+ text-xs font-medium text-white
694
+ bg-gray-900 dark:bg-gray-700
695
+ rounded-md shadow-lg
696
+ pointer-events-none
697
+ `,
698
+ children: [
699
+ l,
700
+ s && /* @__PURE__ */ e(
701
+ "div",
702
+ {
703
+ className: `
704
+ absolute w-2 h-2
705
+ bg-gray-900 dark:bg-gray-700
706
+ rotate-45
707
+ ${p[t]}
708
+ `
709
+ }
710
+ )
711
+ ]
712
+ }
713
+ )
714
+ }
715
+ )
716
+ ]
717
+ }
718
+ );
719
+ }, G = ({
720
+ open: l,
721
+ variant: t = "info",
722
+ title: r,
723
+ subtitle: s,
724
+ position: n = "bottom-right",
725
+ showIcon: a = !0,
726
+ dismissible: o = !0,
727
+ onClose: c
728
+ }) => {
729
+ if (!l) return null;
730
+ const d = t === "success" ? "bg-emerald-50 text-emerald-900 border-emerald-200 dark:bg-emerald-900/40 dark:text-emerald-50 dark:border-emerald-700" : t === "warning" ? "bg-amber-50 text-amber-900 border-amber-200 dark:bg-amber-900/40 dark:text-amber-50 dark:border-amber-700" : t === "error" ? "bg-red-50 text-red-900 border-red-200 dark:bg-red-900/40 dark:text-red-50 dark:border-red-700" : "bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-900/40 dark:text-blue-50 dark:border-blue-700", i = t === "success" ? "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/80 dark:text-emerald-100" : t === "warning" ? "bg-amber-100 text-amber-700 dark:bg-amber-900/80 dark:text-amber-100" : t === "error" ? "bg-red-100 text-red-700 dark:bg-red-900/80 dark:text-red-100" : "bg-blue-100 text-blue-700 dark:bg-blue-900/80 dark:text-blue-100", u = () => t === "success" ? /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ e(
731
+ "path",
732
+ {
733
+ fill: "currentColor",
734
+ d: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm4.3 8.3-4.58 4.59a1 1 0 0 1-1.42 0L7.7 12.29a1 1 0 0 1 1.4-1.42l1.9 1.89 3.88-3.88a1 1 0 1 1 1.42 1.42Z"
735
+ }
736
+ ) }) : t === "warning" ? /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ e(
737
+ "path",
738
+ {
739
+ fill: "currentColor",
740
+ d: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm1 13h-2v-2h2Zm0-4h-2V7h2Z"
741
+ }
742
+ ) }) : t === "error" ? /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ e(
743
+ "path",
744
+ {
745
+ fill: "currentColor",
746
+ d: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm3.71 12.29a1 1 0 1 1-1.42 1.42L12 13.41l-2.29 2.3a1 1 0 0 1-1.42-1.42L10.59 12 8.3 9.71a1 1 0 0 1 1.42-1.42L12 10.59l2.29-2.3a1 1 0 0 1 1.42 1.42L13.41 12Z"
747
+ }
748
+ ) }) : /* @__PURE__ */ e("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ e(
749
+ "path",
750
+ {
751
+ fill: "currentColor",
752
+ d: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2Zm1 14h-2v-4h2Zm0-6h-2V8h2Z"
753
+ }
754
+ ) }), g = () => {
755
+ switch (n) {
756
+ case "top-left":
757
+ return `
758
+ top-4 inset-x-2
759
+ sm:inset-x-auto sm:top-4 sm:left-4
760
+ flex justify-center sm:justify-start
761
+ `;
762
+ case "top-center":
763
+ return `
764
+ top-4 inset-x-2
765
+ flex justify-center
766
+ `;
767
+ case "top-right":
768
+ return `
769
+ top-4 inset-x-2
770
+ sm:inset-x-auto sm:top-4 sm:right-4
771
+ flex justify-center sm:justify-end
772
+ `;
773
+ case "bottom-left":
774
+ return `
775
+ bottom-4 inset-x-2
776
+ sm:inset-x-auto sm:bottom-4 sm:left-4
777
+ flex justify-center sm:justify-start
778
+ `;
779
+ case "bottom-center":
780
+ return `
781
+ bottom-4 inset-x-2
782
+ flex justify-center
783
+ `;
784
+ default:
785
+ return `
786
+ bottom-4 inset-x-2
787
+ sm:inset-x-auto sm:bottom-4 sm:right-4
788
+ flex justify-center sm:justify-end
789
+ `;
790
+ }
791
+ }, m = t === "error" || t === "warning" ? "alert" : "status";
792
+ return /* @__PURE__ */ e(
793
+ "div",
794
+ {
795
+ className: `
796
+ fixed z-50 pointer-events-none
797
+ ${g()}
798
+ `,
799
+ "aria-live": m === "alert" ? "assertive" : "polite",
800
+ "aria-atomic": "true",
801
+ children: /* @__PURE__ */ b(
802
+ "div",
803
+ {
804
+ className: `
805
+ max-w-sm w-full
806
+ rounded-lg border shadow-lg
807
+ px-4 py-3
808
+ flex items-start gap-3
809
+ ${d}
810
+ pointer-events-auto
811
+ `,
812
+ role: m,
813
+ children: [
814
+ a && /* @__PURE__ */ e(
815
+ "div",
816
+ {
817
+ className: `
818
+ mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center
819
+ rounded-full
820
+ ${i}
821
+ `,
822
+ children: /* @__PURE__ */ e(u, {})
823
+ }
824
+ ),
825
+ /* @__PURE__ */ b("div", { className: "flex-1 min-w-0", children: [
826
+ /* @__PURE__ */ e("p", { className: "text-sm font-semibold truncate", children: r }),
827
+ s && /* @__PURE__ */ e("p", { className: "mt-0.5 text-xs sm:text-sm text-current/90 break-words", children: s })
828
+ ] }),
829
+ o && c && /* @__PURE__ */ e(
830
+ "button",
831
+ {
832
+ type: "button",
833
+ className: "ml-2 inline-flex text-xs text-current/70 hover:text-current focus:outline-none focus:ring-2 focus:ring-current/40 rounded",
834
+ "aria-label": "Cerrar notificación",
835
+ onClick: c,
836
+ children: "✕"
837
+ }
838
+ )
839
+ ]
840
+ }
841
+ )
842
+ }
843
+ );
844
+ }, Q = ({
845
+ value: l = 0,
846
+ max: t = 100,
847
+ label: r,
848
+ showPercentage: s = !1,
849
+ labelInside: n = !1,
850
+ labelAlign: a = "left",
851
+ striped: o = !1,
852
+ animated: c = !1,
853
+ indeterminate: d = !1,
854
+ size: i = "md",
855
+ variant: u = "primary",
856
+ className: g = "",
857
+ ...m
858
+ }) => {
859
+ const h = Math.max(0, Math.min(l, t)), f = Math.round(h / t * 100), x = {
860
+ xs: "h-1.5 text-[0px]",
861
+ sm: "h-2.5 text-[10px]",
862
+ md: "h-4 text-xs",
863
+ lg: "h-6 text-sm",
864
+ xl: "h-8 text-base"
865
+ }, p = {
866
+ primary: "bg-blue-600 dark:bg-blue-500",
867
+ success: "bg-emerald-500 dark:bg-emerald-400",
868
+ warning: "bg-amber-500 dark:bg-amber-400",
869
+ danger: "bg-red-600 dark:bg-red-500",
870
+ neutral: "bg-gray-600 dark:bg-gray-500",
871
+ gradient: "bg-gradient-to-r from-blue-500 to-purple-600 dark:from-blue-400 dark:to-purple-500"
872
+ }, y = o || c || d ? {
873
+ backgroundImage: "linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",
874
+ backgroundSize: "1rem 1rem"
875
+ } : {}, v = c || d ? "animate-[progress-stripes_1s_linear_infinite]" : "", w = () => n || !r && !s ? null : /* @__PURE__ */ b("div", { className: `flex mb-1 ${a === "center" ? "justify-center" : a === "right" ? "justify-end" : "justify-between"}`, children: [
876
+ r && /* @__PURE__ */ e("span", { className: "text-xs font-medium text-gray-700 dark:text-gray-300 mr-2", children: r }),
877
+ s && /* @__PURE__ */ e("span", { className: `text-xs font-semibold text-gray-700 dark:text-gray-200 ${a === "center" || a === "right" ? "ml-2" : ""}`, children: d ? "" : `${f}%` })
878
+ ] });
879
+ return /* @__PURE__ */ b("div", { className: `w-full ${g}`, ...m, children: [
880
+ w(),
881
+ /* @__PURE__ */ e("div", { className: `w-full bg-gray-200 rounded-full dark:bg-gray-700 overflow-hidden ${x[i]}`, children: /* @__PURE__ */ b(
882
+ "div",
883
+ {
884
+ className: `
885
+ h-full rounded-full
886
+ relative overflow-hidden
887
+ flex items-center justify-center
888
+ text-white font-medium leading-none
889
+ transition-all duration-500 ease-out
890
+ ${p[u]}
891
+ ${d ? "w-full origin-left animate-pulse" : ""}
892
+ `,
893
+ style: {
894
+ width: d ? "100%" : `${f}%`
895
+ },
896
+ role: "progressbar",
897
+ "aria-valuenow": d ? void 0 : h,
898
+ "aria-valuemin": 0,
899
+ "aria-valuemax": t,
900
+ "aria-label": r || "Progress bar",
901
+ children: [
902
+ (o || c || d) && /* @__PURE__ */ e(
903
+ "div",
904
+ {
905
+ className: `absolute inset-0 w-full h-full z-0 ${v}`,
906
+ style: y
907
+ }
908
+ ),
909
+ n && !d && i !== "xs" && /* @__PURE__ */ b("span", { className: "relative z-10 px-2 truncate drop-shadow-sm", children: [
910
+ r,
911
+ " ",
912
+ s ? ` ${f}%` : ""
913
+ ] })
914
+ ]
915
+ }
916
+ ) })
917
+ ] });
918
+ }, X = ({
919
+ value: l = 0,
920
+ max: t = 5,
921
+ readOnly: r = !1,
922
+ size: s = "md",
923
+ variant: n = "warning",
924
+ showValue: a = !1,
925
+ tooltips: o = [],
926
+ className: c = "",
927
+ onChange: d
928
+ }) => {
929
+ const [i, u] = N(null), g = {
930
+ xs: "w-3 h-3",
931
+ sm: "w-4 h-4",
932
+ md: "w-6 h-6",
933
+ lg: "w-8 h-8",
934
+ xl: "w-10 h-10"
935
+ }, h = {
936
+ warning: "text-yellow-400",
937
+ primary: "text-blue-500",
938
+ danger: "text-red-500",
939
+ success: "text-emerald-500"
940
+ }[n], f = "text-gray-300 dark:text-gray-600", x = (C) => {
941
+ r || !d || d(C);
942
+ }, p = (C) => {
943
+ r || u(C);
944
+ }, y = () => {
945
+ r || u(null);
946
+ }, v = i ?? l, w = i && o.length >= i ? o[i - 1] : null;
947
+ return /* @__PURE__ */ b("div", { className: `inline-flex flex-col ${c}`, children: [
948
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-1", children: [
949
+ /* @__PURE__ */ e(
950
+ "div",
951
+ {
952
+ className: "flex items-center",
953
+ onMouseLeave: y,
954
+ role: r ? "img" : "slider",
955
+ "aria-label": "Rating",
956
+ "aria-valuemin": 1,
957
+ "aria-valuemax": t,
958
+ "aria-valuenow": v,
959
+ "aria-valuetext": w || `${v} de ${t}`,
960
+ children: Array.from({ length: t }, (C, B) => {
961
+ const k = B + 1, z = k <= v, R = i === k;
962
+ return /* @__PURE__ */ e(
963
+ "button",
964
+ {
965
+ type: "button",
966
+ disabled: r,
967
+ onClick: () => x(k),
968
+ onMouseEnter: () => p(k),
969
+ "aria-label": `Calificar ${k} estrellas`,
970
+ className: `
971
+ relative
972
+ transition-transform duration-200 ease-out
973
+ focus:outline-none focus-visible:scale-110
974
+ ${r ? "cursor-default" : "cursor-pointer hover:scale-110"}
975
+ ${g[s]}
976
+ ${z ? h : f}
977
+ ${R && !r ? "scale-125" : ""}
978
+ `,
979
+ children: /* @__PURE__ */ e(
980
+ "svg",
981
+ {
982
+ xmlns: "http://www.w3.org/2000/svg",
983
+ viewBox: "0 0 24 24",
984
+ fill: "currentColor",
985
+ className: "w-full h-full drop-shadow-sm",
986
+ children: /* @__PURE__ */ e(
987
+ "path",
988
+ {
989
+ fillRule: "evenodd",
990
+ d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z",
991
+ clipRule: "evenodd"
992
+ }
993
+ )
994
+ }
995
+ )
996
+ },
997
+ k
998
+ );
999
+ })
1000
+ }
1001
+ ),
1002
+ a && /* @__PURE__ */ b("span", { className: "ml-2 text-sm font-medium text-gray-600 dark:text-gray-300", children: [
1003
+ l,
1004
+ "/",
1005
+ t
1006
+ ] })
1007
+ ] }),
1008
+ o.length > 0 && /* @__PURE__ */ e("div", { className: "h-5 mt-1", children: /* @__PURE__ */ e("span", { className: `
1009
+ text-xs font-medium transition-opacity duration-300
1010
+ ${w ? "opacity-100" : "opacity-0"}
1011
+ ${n === "danger" ? "text-red-600" : n === "success" ? "text-emerald-600" : "text-gray-500 dark:text-gray-400"}
1012
+ `, children: w || "Select" }) })
1013
+ ] });
1014
+ }, Y = ({ helperText: l, error: t, value: r, maxLength: s, showCount: n }) => {
1015
+ const a = r?.toString().length || 0, o = !!t, c = s ? a >= s * 0.9 : !1, d = s ? a >= s : !1;
1016
+ return !l && !t && !n ? null : /* @__PURE__ */ b("div", { className: "flex items-start justify-between mt-1.5 px-1 gap-4", children: [
1017
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: o ? /* @__PURE__ */ b("p", { className: "text-xs font-medium text-red-500 flex items-center gap-1 animate-in slide-in-from-left-1 duration-200", children: [
1018
+ /* @__PURE__ */ e("svg", { className: "w-3 h-3 flex-shrink-0", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ e("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
1019
+ t
1020
+ ] }) : l ? /* @__PURE__ */ e("p", { className: "text-xs text-gray-500 dark:text-gray-400 leading-tight", children: l }) : null }),
1021
+ n && s && /* @__PURE__ */ b(
1022
+ "div",
1023
+ {
1024
+ className: `
1025
+ text-[10px] font-mono font-medium transition-colors duration-300
1026
+ ${o || d ? "text-red-500" : c ? "text-amber-500" : "text-gray-400 dark:text-gray-500"}
1027
+ `,
1028
+ children: [
1029
+ a,
1030
+ "/",
1031
+ s
1032
+ ]
1033
+ }
1034
+ )
1035
+ ] });
1036
+ };
1037
+ export {
1038
+ q as CodeplexAlert,
1039
+ _ as CodeplexAvatar,
1040
+ E as CodeplexBadge,
1041
+ U as CodeplexBanner,
1042
+ Z as CodeplexButton,
1043
+ P as CodeplexCard,
1044
+ Y as CodeplexInputHelper,
1045
+ K as CodeplexJumbotron,
1046
+ F as CodeplexKbd,
1047
+ Q as CodeplexProgress,
1048
+ X as CodeplexRating,
1049
+ O as CodeplexRequirementsPopup,
1050
+ D as CodeplexSmartLabel,
1051
+ W as CodeplexSpinner,
1052
+ G as CodeplexToast,
1053
+ J as CodeplexTooltip,
1054
+ H as Ui
1055
+ };