zabi-components 1.0.11 → 2.0.2

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,2507 +0,0 @@
1
- import { a0 as _t, u as $, a1 as kt, a as at, p as a, C as j, D as Fe, i as Te, f as g, $ as pt, c as E, s as rt, e as I, g as s, h as we, j as _e, r as d, l as e, m, n as o, o as S, k as f, x as it, w as ye, b as he, t as T, B as le, M as ot, v as L, d as Ae, G as De, q as Y, F as ge, R as st, P as Ue, y as lt, z as qt, I as Je, H as Qe, J as Ze, K as $e, L as et, A as Ct, a2 as zt, X as dt, E as tt, a3 as bt, a4 as gt, N as ct, O as vt, a5 as yt, a6 as Et, _ as ht, a7 as jt, S as Bt } from "./x-Dsi-CPO3.js";
2
- import { createEventDispatcher as Ne, onMount as ut } from "svelte";
3
- function St(i, t, r = t) {
4
- _t(i, "change", (n) => {
5
- var x = n ? i.defaultChecked : i.checked;
6
- r(x);
7
- }), // If we are hydrating and the value has since changed,
8
- // then use the update value from the input instead.
9
- // If defaultChecked is set, then checked == defaultChecked
10
- $(t) == null && r(i.checked), kt(() => {
11
- var n = t();
12
- i.checked = !!n;
13
- });
14
- }
15
- function mt(i) {
16
- return function(...t) {
17
- var r = (
18
- /** @type {Event} */
19
- t[0]
20
- );
21
- return r.preventDefault(), i == null ? void 0 : i.apply(this, t);
22
- };
23
- }
24
- var Tt = it('<svg class="animate-spin h-4 w-4 text-current svelte-v0x5nl" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"></path></svg>'), Pt = g('<span class="h-4 w-4 flex items-center justify-center"> </span>'), It = g('<span class="h-4 w-4 flex items-center justify-center"> </span>'), Lt = g("<button><!> <!> <!> <!></button>");
25
- const Nt = {
26
- hash: "svelte-v0x5nl",
27
- code: `
28
- /* Ensure proper focus styles for reduced motion users */
29
- @media (prefers-reduced-motion: reduce) {button.svelte-v0x5nl {transition:none;}
30
- }
31
-
32
- /* Ensure proper contrast for disabled state */button.svelte-v0x5nl:disabled {opacity:0.6;}
33
-
34
- /* Loading state animation */
35
- @keyframes svelte-v0x5nl-spin {
36
- from {
37
- transform: rotate(0deg);
38
- }
39
- to {
40
- transform: rotate(360deg);
41
- }
42
- }.animate-spin.svelte-v0x5nl {
43
- animation: svelte-v0x5nl-spin 1s linear infinite;}`
44
- };
45
- function qr(i, t) {
46
- _e(t, !1), at(i, Nt);
47
- const r = m(), n = m();
48
- let x = a(t, "variant", 8, "primary"), H = a(t, "size", 8, "md"), u = a(t, "disabled", 8, !1), p = a(t, "loading", 8, !1), P = a(t, "type", 8, "button"), C = a(t, "className", 8, ""), K = a(t, "iconLeft", 8, null), B = a(t, "iconRight", 8, null), V = a(t, "ariaLabel", 8, ""), _ = a(t, "ariaDescribedBy", 8, ""), W = a(t, "ariaExpanded", 8, void 0), X = a(t, "ariaControls", 8, void 0), z = a(t, "ariaPressed", 8, void 0);
49
- const c = Ne();
50
- function v(Q) {
51
- u() || p() || c("click", { value: !0, event: Q });
52
- }
53
- function k(Q) {
54
- u() || p() || (Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), c("click", { value: !0, event: Q }));
55
- }
56
- const h = "inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-offset-2 relative overflow-hidden", N = {
57
- sm: "px-3 py-1.5 text-sm rounded-md",
58
- md: "px-4 py-2 text-sm rounded-md",
59
- lg: "px-5 py-3 text-base rounded-lg"
60
- }, b = {
61
- primary: [
62
- "bg-primary text-text-inverse border border-primary",
63
- "hover:bg-primary-hover hover:border-primary-hover",
64
- "active:bg-primary-active active:border-primary-active",
65
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
66
- "shadow-adaptive-sm hover:shadow-adaptive-md"
67
- ].join(" "),
68
- secondary: [
69
- "bg-surface text-text border border-border",
70
- "hover:bg-surface-hover hover:border-border-hover",
71
- "active:bg-surface-active active:border-border-hover",
72
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
73
- "shadow-adaptive-sm hover:shadow-adaptive-md"
74
- ].join(" "),
75
- success: [
76
- "bg-success text-text-inverse border border-success",
77
- "hover:bg-success-hover hover:border-success-hover",
78
- "active:bg-success-active active:border-success-active",
79
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
80
- "shadow-adaptive-sm hover:shadow-adaptive-md"
81
- ].join(" "),
82
- warning: [
83
- "bg-warning text-text-inverse border border-warning",
84
- "hover:bg-warning-hover hover:border-warning-hover",
85
- "active:bg-warning-active active:border-warning-active",
86
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
87
- "shadow-adaptive-sm hover:shadow-adaptive-md"
88
- ].join(" "),
89
- danger: [
90
- "bg-error text-text-inverse border border-error",
91
- "hover:bg-error-hover hover:border-error-hover",
92
- "active:bg-error-active active:border-error-active",
93
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
94
- "shadow-adaptive-sm hover:shadow-adaptive-md"
95
- ].join(" "),
96
- info: [
97
- "bg-info text-text-inverse border border-info",
98
- "hover:bg-info-hover hover:border-info-hover",
99
- "active:bg-info-active active:border-info-active",
100
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
101
- "shadow-adaptive-sm hover:shadow-adaptive-md"
102
- ].join(" "),
103
- ghost: [
104
- "bg-transparent text-text border border-transparent",
105
- "hover:bg-surface-hover hover:border-border-hover",
106
- "active:bg-surface-active active:border-border-hover",
107
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
108
- "shadow-none hover:shadow-adaptive-sm"
109
- ].join(" "),
110
- link: [
111
- "bg-transparent text-primary border border-transparent underline-offset-4",
112
- "hover:bg-transparent hover:text-primary-hover hover:underline",
113
- "active:bg-transparent active:text-primary-active active:underline",
114
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
115
- "shadow-none"
116
- ].join(" "),
117
- neutral: [
118
- "bg-surface text-text border border-border",
119
- "hover:bg-surface-hover hover:border-border-hover",
120
- "active:bg-surface-active active:border-border-hover",
121
- "focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
122
- "shadow-adaptive-sm hover:shadow-adaptive-md"
123
- ].join(" ")
124
- }, w = u() ? [
125
- "bg-surface-disabled text-text-disabled border-border-disabled",
126
- "hover:bg-surface-disabled hover:text-text-disabled hover:border-border-disabled",
127
- "active:bg-surface-disabled active:text-text-disabled active:border-border-disabled",
128
- "shadow-none"
129
- ].join(" ") : "";
130
- p(), j(
131
- () => (d(H()), d(u()), d(x()), d(C())),
132
- () => {
133
- f(r, [
134
- h,
135
- N[H()],
136
- u() ? w : b[x()] || b.primary,
137
- C()
138
- ].filter(Boolean).join(" "));
139
- }
140
- ), j(
141
- () => (d(p()), d(V()), d(_()), d(W()), d(X()), d(z()), d(u())),
142
- () => {
143
- f(n, {
144
- "aria-busy": p(),
145
- "aria-label": V() || (p() ? "Loading..." : void 0),
146
- "aria-describedby": _() || void 0,
147
- "aria-expanded": W(),
148
- "aria-controls": X(),
149
- "aria-pressed": z(),
150
- "aria-disabled": u()
151
- });
152
- }
153
- ), Fe(), Te();
154
- var M = Lt();
155
- pt(
156
- M,
157
- () => ({
158
- type: P(),
159
- class: e(r),
160
- disabled: u() || p(),
161
- ...e(n)
162
- }),
163
- void 0,
164
- void 0,
165
- "svelte-v0x5nl"
166
- );
167
- var se = o(M);
168
- {
169
- var oe = (Q) => {
170
- var fe = Tt();
171
- s(Q, fe);
172
- };
173
- E(se, (Q) => {
174
- p() && Q(oe);
175
- });
176
- }
177
- var ie = S(se, 2);
178
- {
179
- var J = (Q) => {
180
- var fe = ye(), F = he(fe);
181
- {
182
- var ee = (R) => {
183
- var D = Pt(), ae = o(D);
184
- T(() => le(ae, K())), s(R, D);
185
- }, U = (R) => {
186
- var D = ye(), ae = he(D);
187
- ot(ae, K, (me, ke) => {
188
- ke(me, { class: "h-4 w-4" });
189
- }), s(R, D);
190
- };
191
- E(F, (R) => {
192
- typeof K() == "string" ? R(ee) : R(U, !1);
193
- });
194
- }
195
- s(Q, fe);
196
- };
197
- E(ie, (Q) => {
198
- K() && !p() && Q(J);
199
- });
200
- }
201
- var de = S(ie, 2);
202
- rt(de, t, "default", {}, null);
203
- var pe = S(de, 2);
204
- {
205
- var qe = (Q) => {
206
- var fe = ye(), F = he(fe);
207
- {
208
- var ee = (R) => {
209
- var D = It(), ae = o(D);
210
- T(() => le(ae, B())), s(R, D);
211
- }, U = (R) => {
212
- var D = ye(), ae = he(D);
213
- ot(ae, B, (me, ke) => {
214
- ke(me, { class: "h-4 w-4" });
215
- }), s(R, D);
216
- };
217
- E(F, (R) => {
218
- typeof B() == "string" ? R(ee) : R(U, !1);
219
- });
220
- }
221
- s(Q, fe);
222
- };
223
- E(pe, (Q) => {
224
- B() && !p() && Q(qe);
225
- });
226
- }
227
- I("click", M, v), I("keydown", M, k), s(i, M), we();
228
- }
229
- var Ht = g('<div class="card-image svelte-1qx5g6b"><img class="svelte-1qx5g6b"/></div>'), Mt = g('<h3 class="card-title svelte-1qx5g6b"> </h3>'), Ot = g('<p class="card-subtitle svelte-1qx5g6b"> </p>'), Dt = g('<p class="card-description svelte-1qx5g6b"> </p>'), Ft = g('<article><!> <div class="card-content svelte-1qx5g6b"><!> <!> <!> <!></div></article>');
230
- const Rt = {
231
- hash: "svelte-1qx5g6b",
232
- code: ".card.svelte-1qx5g6b {overflow:hidden;border-radius:var(--radius-lg);border-width:1px;border-color:rgb(var(--color-border));background-color:rgb(var(--color-card))}.card-elevated.svelte-1qx5g6b {background-color:rgb(var(--color-card-elevated));--tw-shadow: var(--shadow-lg);--tw-shadow-colored: var(--shadow-lg);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.interactive.svelte-1qx5g6b {cursor:pointer;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.interactive.svelte-1qx5g6b:hover {--tw-translate-y: -0.25rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));background-color:rgb(var(--color-card-hover));--tw-shadow: var(--shadow-md);--tw-shadow-colored: var(--shadow-md);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.card-image.svelte-1qx5g6b {aspect-ratio:16 / 9;overflow:hidden}.card-image.svelte-1qx5g6b img:where(.svelte-1qx5g6b) {height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.card-content.svelte-1qx5g6b > :where(.svelte-1qx5g6b):not([hidden]) ~ :where(.svelte-1qx5g6b):not([hidden]) {--tw-space-y-reverse: 0;margin-top:calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))}.card-content.svelte-1qx5g6b {padding:1rem}.card-title.svelte-1qx5g6b {font-size:1.125rem;line-height:1.75rem;font-weight:600;color:rgb(var(--color-text))}.card-subtitle.svelte-1qx5g6b {font-size:0.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--color-text-secondary))}.card-description.svelte-1qx5g6b {font-size:0.875rem;line-height:1.25rem;color:rgb(var(--color-text-tertiary))}"
233
- };
234
- function Cr(i, t) {
235
- _e(t, !1), at(i, Rt);
236
- let r = a(t, "title", 8, ""), n = a(t, "subtitle", 8, ""), x = a(t, "description", 8, ""), H = a(t, "image", 8, ""), u = a(t, "variant", 8, "default"), p = a(t, "interactive", 8, !1), P = a(t, "className", 8, "");
237
- const C = Ne();
238
- function K(b) {
239
- p() && C("click", { event: b });
240
- }
241
- Te();
242
- var B = Ft();
243
- pt(
244
- B,
245
- () => ({
246
- class: `card card-${u() ?? ""} ${p() ? "interactive" : ""} ${P() ?? ""}`,
247
- role: p() ? "button" : void 0,
248
- ...p() ? { tabindex: 0 } : {}
249
- }),
250
- void 0,
251
- void 0,
252
- "svelte-1qx5g6b"
253
- );
254
- var V = o(B);
255
- {
256
- var _ = (b) => {
257
- var w = Ht(), M = o(w);
258
- T(() => {
259
- L(M, "src", H()), L(M, "alt", r());
260
- }), s(b, w);
261
- };
262
- E(V, (b) => {
263
- H() && b(_);
264
- });
265
- }
266
- var W = S(V, 2), X = o(W);
267
- {
268
- var z = (b) => {
269
- var w = Mt(), M = o(w);
270
- T(() => le(M, r())), s(b, w);
271
- };
272
- E(X, (b) => {
273
- r() && b(z);
274
- });
275
- }
276
- var c = S(X, 2);
277
- {
278
- var v = (b) => {
279
- var w = Ot(), M = o(w);
280
- T(() => le(M, n())), s(b, w);
281
- };
282
- E(c, (b) => {
283
- n() && b(v);
284
- });
285
- }
286
- var k = S(c, 2);
287
- {
288
- var h = (b) => {
289
- var w = Dt(), M = o(w);
290
- T(() => le(M, x())), s(b, w);
291
- };
292
- E(k, (b) => {
293
- x() && b(h);
294
- });
295
- }
296
- var N = S(k, 2);
297
- rt(N, t, "default", {}, null), I("click", B, K), s(i, B), we();
298
- }
299
- var Kt = it('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg>'), Vt = it('<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg>'), Wt = g('<span class="text-error ml-1 svelte-1wpeqgu">*</span>'), Xt = g("<label> <!></label>"), At = g('<div class="flex items-center gap-1 svelte-1wpeqgu"><svg class="w-3 h-3 flex-shrink-0 svelte-1wpeqgu" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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" clip-rule="evenodd" class="svelte-1wpeqgu"></path></svg> <span class="svelte-1wpeqgu"> </span></div>'), Yt = g('<span class="svelte-1wpeqgu"> </span>'), Gt = g("<div><!></div>"), Ut = g('<div><div class="relative svelte-1wpeqgu"><input type="checkbox" class="sr-only svelte-1wpeqgu"/> <div><!></div> <div></div></div> <div class="flex-1 min-w-0 svelte-1wpeqgu"><!> <!></div></div>');
300
- const Jt = {
301
- hash: "svelte-1wpeqgu",
302
- code: `
303
- /* Custom focus styles for better accessibility */.checkbox-focus-visible {outline:2px solid var(--color-plasma-red-500);outline-offset:2px;}
304
-
305
- /* Smooth transitions for all interactive elements */.checkbox-input.svelte-1wpeqgu {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
306
-
307
- /* Hover effects */.checkbox-container.svelte-1wpeqgu:hover .checkbox-visual:where(.svelte-1wpeqgu) {transform:scale(1.05);}.checkbox-container.svelte-1wpeqgu:active .checkbox-visual:where(.svelte-1wpeqgu) {transform:scale(0.95);}
308
-
309
- /* Check animation */.checkbox-check.svelte-1wpeqgu {
310
- animation: svelte-1wpeqgu-checkbox-check 0.2s ease-out;}
311
-
312
- @keyframes svelte-1wpeqgu-checkbox-check {
313
- 0% {
314
- opacity: 0;
315
- transform: scale(0.8);
316
- }
317
- 100% {
318
- opacity: 1;
319
- transform: scale(1);
320
- }
321
- }
322
-
323
- /* Indeterminate animation */.checkbox-indeterminate.svelte-1wpeqgu {
324
- animation: svelte-1wpeqgu-checkbox-indeterminate 0.2s ease-out;}
325
-
326
- @keyframes svelte-1wpeqgu-checkbox-indeterminate {
327
- 0% {
328
- opacity: 0;
329
- transform: scaleX(0);
330
- }
331
- 100% {
332
- opacity: 1;
333
- transform: scaleX(1);
334
- }
335
- }
336
-
337
- /* Focus ring animation */.checkbox-focus-ring.svelte-1wpeqgu {
338
- animation: svelte-1wpeqgu-checkbox-focus-ring 0.2s ease-out;}
339
-
340
- @keyframes svelte-1wpeqgu-checkbox-focus-ring {
341
- 0% {
342
- transform: scale(0.95);
343
- opacity: 0;
344
- }
345
- 100% {
346
- transform: scale(1);
347
- opacity: 1;
348
- }
349
- }
350
-
351
- /* Disabled state styling */.checkbox-disabled.svelte-1wpeqgu {opacity:0.5;cursor:not-allowed;}.checkbox-disabled.svelte-1wpeqgu:hover {transform:none;}
352
-
353
- /* Required indicator styling */.checkbox-required.svelte-1wpeqgu {color:var(--color-blood-red-500);}`
354
- };
355
- function zr(i, t) {
356
- _e(t, !1), at(i, Jt);
357
- const r = m(), n = m(), x = m(), H = m(), u = m(), p = m(), P = m(), C = m(), K = m(), B = m();
358
- let V = a(t, "checked", 12, !1), _ = a(t, "disabled", 8, !1), W = a(t, "required", 8, !1), X = a(t, "label", 8, ""), z = a(t, "helpText", 8, ""), c = a(t, "error", 8, ""), v = a(t, "size", 8, "md"), k = a(t, "variant", 8, "default"), h = a(t, "indeterminate", 8, !1), N = a(t, "name", 8, void 0), b = a(t, "id", 8, void 0), w = a(t, "value", 8, void 0), M = a(t, "className", 8, "");
359
- const se = Ne();
360
- let oe = m(), ie = m(!1);
361
- function J(y) {
362
- const re = y.target;
363
- V(re.checked), se("change", { value: V(), checked: V(), event: y, field: N() });
364
- }
365
- function de(y) {
366
- f(ie, !0), se("focus", { event: y });
367
- }
368
- function pe(y) {
369
- f(ie, !1), se("blur", { event: y });
370
- }
371
- function qe() {
372
- var y;
373
- (y = e(oe)) == null || y.focus();
374
- }
375
- function Q() {
376
- var y;
377
- (y = e(oe)) == null || y.blur();
378
- }
379
- j(() => d(b()), () => {
380
- f(r, b() || `checkbox-${Math.random().toString(36).substr(2, 9)}`);
381
- }), j(() => {
382
- }, () => {
383
- f(n, { sm: "w-4 h-4", md: "w-5 h-5", lg: "w-6 h-6" });
384
- }), j(() => {
385
- }, () => {
386
- f(x, {
387
- default: "bg-surface border border-primary text-primary focus:ring-primary focus:border-transparent",
388
- outlined: "bg-surface-secondary border border-primary text-primary focus:ring-primary focus:border-transparent",
389
- filled: "bg-surface-secondary border border-primary text-primary focus:ring-primary focus:border-transparent"
390
- });
391
- }), j(() => d(c()), () => {
392
- f(H, c() ? "focus:ring-error border-error" : "");
393
- }), j(() => d(M()), () => {
394
- f(u, [
395
- "relative",
396
- "flex",
397
- "items-start",
398
- "gap-3",
399
- "group",
400
- "transition-all",
401
- "duration-200",
402
- "ease-in-out",
403
- M()
404
- ].join(" "));
405
- }), j(
406
- () => (e(n), d(v()), e(x), d(k()), e(H), d(c())),
407
- () => {
408
- f(p, [
409
- "flex-shrink-0",
410
- "rounded",
411
- "transition-all",
412
- "duration-200",
413
- "ease-in-out",
414
- "focus:outline-none",
415
- "focus:ring-2",
416
- "focus:ring-offset-2",
417
- "focus:ring-offset-dark-900",
418
- "disabled:opacity-50",
419
- "disabled:cursor-not-allowed",
420
- "cursor-pointer",
421
- e(n)[v()],
422
- e(x)[k()],
423
- e(H),
424
- c() ? "grainy-red" : "grainy-texture"
425
- ].join(" "));
426
- }
427
- ), j(() => (d(c()), d(_())), () => {
428
- f(P, [
429
- "text-sm",
430
- "font-medium",
431
- "cursor-pointer",
432
- "select-none",
433
- "transition-colors",
434
- "duration-200",
435
- c() ? "text-error" : "text-primary",
436
- _() ? "opacity-50 cursor-not-allowed" : ""
437
- ].join(" "));
438
- }), j(() => d(c()), () => {
439
- f(C, ["text-xs", "mt-1", c() ? "text-error" : "text-tertiary"].join(" "));
440
- }), j(() => {
441
- }, () => {
442
- f(K, [
443
- "w-full",
444
- "h-full",
445
- "text-current",
446
- "transition-all",
447
- "duration-200",
448
- "ease-in-out"
449
- ].join(" "));
450
- }), j(() => {
451
- }, () => {
452
- f(B, [
453
- "w-full",
454
- "h-full",
455
- "text-current",
456
- "transition-all",
457
- "duration-200",
458
- "ease-in-out"
459
- ].join(" "));
460
- }), Fe();
461
- var fe = { focus: qe, blur: Q };
462
- Te();
463
- var F = Ut(), ee = o(F), U = o(ee);
464
- Ae(U, (y) => f(oe, y), () => e(oe));
465
- var R, D = S(U, 2), ae = o(D);
466
- {
467
- var me = (y) => {
468
- var re = Kt();
469
- T(() => Y(re, 0, `${e(K) ?? ""} text-text`, "svelte-1wpeqgu")), s(y, re);
470
- }, ke = (y) => {
471
- var re = ye(), O = he(re);
472
- {
473
- var ne = (ue) => {
474
- var ce = Vt();
475
- T(() => Y(ce, 0, `${e(B) ?? ""} text-text`, "svelte-1wpeqgu")), s(ue, ce);
476
- };
477
- E(
478
- O,
479
- (ue) => {
480
- h() && ue(ne);
481
- },
482
- !0
483
- );
484
- }
485
- s(y, re);
486
- };
487
- E(ae, (y) => {
488
- V() && !h() ? y(me) : y(ke, !1);
489
- });
490
- }
491
- var Be = S(D, 2), je = S(ee, 2), te = o(je);
492
- {
493
- var be = (y) => {
494
- var re = Xt(), O = o(re), ne = S(O);
495
- {
496
- var ue = (ce) => {
497
- var ze = Wt();
498
- s(ce, ze);
499
- };
500
- E(ne, (ce) => {
501
- W() && ce(ue);
502
- });
503
- }
504
- T(() => {
505
- L(re, "for", e(r)), Y(re, 1, ge(e(P)), "svelte-1wpeqgu"), le(O, `${X() ?? ""} `);
506
- }), s(y, re);
507
- };
508
- E(te, (y) => {
509
- X() && y(be);
510
- });
511
- }
512
- var xe = S(te, 2);
513
- {
514
- var A = (y) => {
515
- var re = Gt(), O = o(re);
516
- {
517
- var ne = (ce) => {
518
- var ze = At(), ve = S(o(ze), 2), G = o(ve);
519
- T(() => le(G, c())), s(ce, ze);
520
- }, ue = (ce) => {
521
- var ze = ye(), ve = he(ze);
522
- {
523
- var G = (Pe) => {
524
- var Ke = Yt(), Ye = o(Ke);
525
- T(() => le(Ye, z())), s(Pe, Ke);
526
- };
527
- E(
528
- ve,
529
- (Pe) => {
530
- z() && Pe(G);
531
- },
532
- !0
533
- );
534
- }
535
- s(ce, ze);
536
- };
537
- E(O, (ce) => {
538
- c() ? ce(ne) : ce(ue, !1);
539
- });
540
- }
541
- T(() => {
542
- L(re, "id", `${e(r) ?? ""}-help`), Y(re, 1, ge(e(C)), "svelte-1wpeqgu");
543
- }), s(y, re);
544
- };
545
- E(xe, (y) => {
546
- (c() || z()) && y(A);
547
- });
548
- }
549
- return T(() => {
550
- Y(F, 1, ge(e(u)), "svelte-1wpeqgu"), L(U, "id", e(r)), U.disabled = _(), U.required = W(), L(U, "name", N()), L(U, "aria-invalid", c() ? "true" : "false"), L(U, "aria-describedby", c() || z() ? `${e(r)}-help` : void 0), R !== (R = w()) && (U.value = (U.__value = w()) ?? ""), Y(D, 1, ge(e(p)), "svelte-1wpeqgu"), Y(Be, 1, `absolute inset-0 rounded pointer-events-none transition-all duration-200 ${e(ie) ? "ring-2 ring-primary" : ""}`, "svelte-1wpeqgu");
551
- }), St(U, V), I("change", U, J), I("focus", U, de), I("blur", U, pe), s(i, F), De(t, "focus", qe), De(t, "blur", Q), we(fe);
552
- }
553
- var Qt = g('<div role="menu" aria-orientation="vertical"><div class="max-h-full overflow-y-auto"><!></div></div>'), Zt = g("<div><!></div> <!>", 1);
554
- function $t(i, t) {
555
- _e(t, !1);
556
- let r = a(t, "isOpen", 8, !1), n = a(t, "placement", 8, "bottom-start"), x = a(t, "offset", 8, 8), H = a(t, "maxHeight", 8, "20rem"), u = a(t, "width", 8, "auto"), p = a(t, "zIndex", 8, 50);
557
- const P = Ne();
558
- let C = m(), K = m(), B;
559
- function V() {
560
- var oe, ie, J, de, pe, qe, Q, fe;
561
- if (!e(K)) return { top: 0, left: 0 };
562
- B = e(K).getBoundingClientRect();
563
- const h = window.scrollY, N = window.scrollX;
564
- let b = B.bottom + h + x(), w = B.left + N;
565
- switch (n()) {
566
- case "bottom-end":
567
- w = B.right + N - (((oe = e(C)) == null ? void 0 : oe.offsetWidth) || 0);
568
- break;
569
- case "top-start":
570
- b = B.top + h - (((ie = e(C)) == null ? void 0 : ie.offsetHeight) || 0) - x();
571
- break;
572
- case "top-end":
573
- b = B.top + h - (((J = e(C)) == null ? void 0 : J.offsetHeight) || 0) - x(), w = B.right + N - (((de = e(C)) == null ? void 0 : de.offsetWidth) || 0);
574
- break;
575
- }
576
- const M = window.innerWidth, se = window.innerHeight;
577
- return w < 0 && (w = 8), w + (((pe = e(C)) == null ? void 0 : pe.offsetWidth) || 0) > M && (w = M - (((qe = e(C)) == null ? void 0 : qe.offsetWidth) || 0) - 8), b < 0 && (b = 8), b + (((Q = e(C)) == null ? void 0 : Q.offsetHeight) || 0) > se + h && (b = se + h - (((fe = e(C)) == null ? void 0 : fe.offsetHeight) || 0) - 8), { top: b, left: w };
578
- }
579
- function _(h) {
580
- r() && e(C) && !e(C).contains(h.target) && e(K) && !e(K).contains(h.target) && P("close");
581
- }
582
- function W(h) {
583
- h.key === "Escape" && r() && P("close");
584
- }
585
- ut(() => (document.addEventListener("click", _), document.addEventListener("keydown", W), () => {
586
- document.removeEventListener("click", _), document.removeEventListener("keydown", W);
587
- })), j(
588
- () => (d(r()), e(K), e(C)),
589
- () => {
590
- r() && e(K) && requestAnimationFrame(() => {
591
- const h = V();
592
- e(C) && (st(C, e(C).style.top = `${h.top}px`), st(C, e(C).style.left = `${h.left}px`));
593
- });
594
- }
595
- ), Fe(), Te();
596
- var X = Zt(), z = he(X), c = o(z);
597
- rt(c, t, "trigger", {}, null), Ae(z, (h) => f(K, h), () => e(K));
598
- var v = S(z, 2);
599
- {
600
- var k = (h) => {
601
- var N = Qt(), b = o(N), w = o(b);
602
- rt(w, t, "default", {}, null), Ae(N, (M) => f(C, M), () => e(C)), T(() => {
603
- Y(N, 1, `fixed z-${p() ?? ""} bg-stone-800 border border-stone-700 rounded-lg shadow-xl`), Ue(N, `max-height: ${H() ?? ""}; width: ${u() ?? ""};`);
604
- }), lt(3, N, () => qt, () => ({ y: -10, duration: 200 })), s(h, N);
605
- };
606
- E(v, (h) => {
607
- r() && h(k);
608
- });
609
- }
610
- s(i, X), we();
611
- }
612
- function xt(i, t) {
613
- _e(t, !0);
614
- /**
615
- * @license @lucide/svelte v0.544.0 - ISC
616
- *
617
- * ISC License
618
- *
619
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
620
- *
621
- * Permission to use, copy, modify, and/or distribute this software for any
622
- * purpose with or without fee is hereby granted, provided that the above
623
- * copyright notice and this permission notice appear in all copies.
624
- *
625
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
626
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
627
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
628
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
629
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
630
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
631
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
632
- *
633
- * ---
634
- *
635
- * The MIT License (MIT) (for portions derived from Feather)
636
- *
637
- * Copyright (c) 2013-2023 Cole Bemis
638
- *
639
- * Permission is hereby granted, free of charge, to any person obtaining a copy
640
- * of this software and associated documentation files (the "Software"), to deal
641
- * in the Software without restriction, including without limitation the rights
642
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
643
- * copies of the Software, and to permit persons to whom the Software is
644
- * furnished to do so, subject to the following conditions:
645
- *
646
- * The above copyright notice and this permission notice shall be included in all
647
- * copies or substantial portions of the Software.
648
- *
649
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
650
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
651
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
652
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
653
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
654
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
655
- * SOFTWARE.
656
- *
657
- */
658
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
659
- const n = [["path", { d: "M20 6 9 17l-5-5" }]];
660
- Je(i, Qe(
661
- { name: "check" },
662
- () => r,
663
- {
664
- get iconNode() {
665
- return n;
666
- },
667
- children: (x, H) => {
668
- var u = ye(), p = he(u);
669
- Ze(p, () => t.children ?? $e), s(x, u);
670
- },
671
- $$slots: { default: !0 }
672
- }
673
- )), we();
674
- }
675
- function ea(i, t) {
676
- _e(t, !0);
677
- /**
678
- * @license @lucide/svelte v0.544.0 - ISC
679
- *
680
- * ISC License
681
- *
682
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
683
- *
684
- * Permission to use, copy, modify, and/or distribute this software for any
685
- * purpose with or without fee is hereby granted, provided that the above
686
- * copyright notice and this permission notice appear in all copies.
687
- *
688
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
689
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
690
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
691
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
692
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
693
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
694
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
695
- *
696
- * ---
697
- *
698
- * The MIT License (MIT) (for portions derived from Feather)
699
- *
700
- * Copyright (c) 2013-2023 Cole Bemis
701
- *
702
- * Permission is hereby granted, free of charge, to any person obtaining a copy
703
- * of this software and associated documentation files (the "Software"), to deal
704
- * in the Software without restriction, including without limitation the rights
705
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
706
- * copies of the Software, and to permit persons to whom the Software is
707
- * furnished to do so, subject to the following conditions:
708
- *
709
- * The above copyright notice and this permission notice shall be included in all
710
- * copies or substantial portions of the Software.
711
- *
712
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
713
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
714
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
715
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
716
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
717
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
718
- * SOFTWARE.
719
- *
720
- */
721
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
722
- const n = [["path", { d: "m6 9 6 6 6-6" }]];
723
- Je(i, Qe(
724
- { name: "chevron-down" },
725
- () => r,
726
- {
727
- get iconNode() {
728
- return n;
729
- },
730
- children: (x, H) => {
731
- var u = ye(), p = he(u);
732
- Ze(p, () => t.children ?? $e), s(x, u);
733
- },
734
- $$slots: { default: !0 }
735
- }
736
- )), we();
737
- }
738
- function ta(i, t) {
739
- _e(t, !0);
740
- /**
741
- * @license @lucide/svelte v0.544.0 - ISC
742
- *
743
- * ISC License
744
- *
745
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
746
- *
747
- * Permission to use, copy, modify, and/or distribute this software for any
748
- * purpose with or without fee is hereby granted, provided that the above
749
- * copyright notice and this permission notice appear in all copies.
750
- *
751
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
752
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
753
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
754
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
755
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
756
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
757
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
758
- *
759
- * ---
760
- *
761
- * The MIT License (MIT) (for portions derived from Feather)
762
- *
763
- * Copyright (c) 2013-2023 Cole Bemis
764
- *
765
- * Permission is hereby granted, free of charge, to any person obtaining a copy
766
- * of this software and associated documentation files (the "Software"), to deal
767
- * in the Software without restriction, including without limitation the rights
768
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
769
- * copies of the Software, and to permit persons to whom the Software is
770
- * furnished to do so, subject to the following conditions:
771
- *
772
- * The above copyright notice and this permission notice shall be included in all
773
- * copies or substantial portions of the Software.
774
- *
775
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
776
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
777
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
778
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
779
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
780
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
781
- * SOFTWARE.
782
- *
783
- */
784
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
785
- const n = [
786
- [
787
- "path",
788
- {
789
- d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"
790
- }
791
- ],
792
- ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }],
793
- [
794
- "path",
795
- {
796
- d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"
797
- }
798
- ],
799
- ["path", { d: "m2 2 20 20" }]
800
- ];
801
- Je(i, Qe(
802
- { name: "eye-off" },
803
- () => r,
804
- {
805
- get iconNode() {
806
- return n;
807
- },
808
- children: (x, H) => {
809
- var u = ye(), p = he(u);
810
- Ze(p, () => t.children ?? $e), s(x, u);
811
- },
812
- $$slots: { default: !0 }
813
- }
814
- )), we();
815
- }
816
- function aa(i, t) {
817
- _e(t, !0);
818
- /**
819
- * @license @lucide/svelte v0.544.0 - ISC
820
- *
821
- * ISC License
822
- *
823
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
824
- *
825
- * Permission to use, copy, modify, and/or distribute this software for any
826
- * purpose with or without fee is hereby granted, provided that the above
827
- * copyright notice and this permission notice appear in all copies.
828
- *
829
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
830
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
831
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
832
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
833
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
834
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
835
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
836
- *
837
- * ---
838
- *
839
- * The MIT License (MIT) (for portions derived from Feather)
840
- *
841
- * Copyright (c) 2013-2023 Cole Bemis
842
- *
843
- * Permission is hereby granted, free of charge, to any person obtaining a copy
844
- * of this software and associated documentation files (the "Software"), to deal
845
- * in the Software without restriction, including without limitation the rights
846
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
847
- * copies of the Software, and to permit persons to whom the Software is
848
- * furnished to do so, subject to the following conditions:
849
- *
850
- * The above copyright notice and this permission notice shall be included in all
851
- * copies or substantial portions of the Software.
852
- *
853
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
854
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
855
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
856
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
857
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
858
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
859
- * SOFTWARE.
860
- *
861
- */
862
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
863
- const n = [
864
- [
865
- "path",
866
- {
867
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"
868
- }
869
- ],
870
- ["circle", { cx: "12", cy: "12", r: "3" }]
871
- ];
872
- Je(i, Qe(
873
- { name: "eye" },
874
- () => r,
875
- {
876
- get iconNode() {
877
- return n;
878
- },
879
- children: (x, H) => {
880
- var u = ye(), p = he(u);
881
- Ze(p, () => t.children ?? $e), s(x, u);
882
- },
883
- $$slots: { default: !0 }
884
- }
885
- )), we();
886
- }
887
- function ra(i, t) {
888
- _e(t, !0);
889
- /**
890
- * @license @lucide/svelte v0.544.0 - ISC
891
- *
892
- * ISC License
893
- *
894
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
895
- *
896
- * Permission to use, copy, modify, and/or distribute this software for any
897
- * purpose with or without fee is hereby granted, provided that the above
898
- * copyright notice and this permission notice appear in all copies.
899
- *
900
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
901
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
902
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
903
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
904
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
905
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
906
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
907
- *
908
- * ---
909
- *
910
- * The MIT License (MIT) (for portions derived from Feather)
911
- *
912
- * Copyright (c) 2013-2023 Cole Bemis
913
- *
914
- * Permission is hereby granted, free of charge, to any person obtaining a copy
915
- * of this software and associated documentation files (the "Software"), to deal
916
- * in the Software without restriction, including without limitation the rights
917
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
918
- * copies of the Software, and to permit persons to whom the Software is
919
- * furnished to do so, subject to the following conditions:
920
- *
921
- * The above copyright notice and this permission notice shall be included in all
922
- * copies or substantial portions of the Software.
923
- *
924
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
925
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
926
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
927
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
928
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
929
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
930
- * SOFTWARE.
931
- *
932
- */
933
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
934
- const n = [
935
- ["path", { d: "M21 5H3" }],
936
- ["path", { d: "M17 12H7" }],
937
- ["path", { d: "M19 19H5" }]
938
- ];
939
- Je(i, Qe(
940
- { name: "text-align-center" },
941
- () => r,
942
- {
943
- get iconNode() {
944
- return n;
945
- },
946
- children: (x, H) => {
947
- var u = ye(), p = he(u);
948
- Ze(p, () => t.children ?? $e), s(x, u);
949
- },
950
- $$slots: { default: !0 }
951
- }
952
- )), we();
953
- }
954
- function na(i, t) {
955
- _e(t, !0);
956
- /**
957
- * @license @lucide/svelte v0.544.0 - ISC
958
- *
959
- * ISC License
960
- *
961
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
962
- *
963
- * Permission to use, copy, modify, and/or distribute this software for any
964
- * purpose with or without fee is hereby granted, provided that the above
965
- * copyright notice and this permission notice appear in all copies.
966
- *
967
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
968
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
969
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
970
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
971
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
972
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
973
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
974
- *
975
- * ---
976
- *
977
- * The MIT License (MIT) (for portions derived from Feather)
978
- *
979
- * Copyright (c) 2013-2023 Cole Bemis
980
- *
981
- * Permission is hereby granted, free of charge, to any person obtaining a copy
982
- * of this software and associated documentation files (the "Software"), to deal
983
- * in the Software without restriction, including without limitation the rights
984
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
985
- * copies of the Software, and to permit persons to whom the Software is
986
- * furnished to do so, subject to the following conditions:
987
- *
988
- * The above copyright notice and this permission notice shall be included in all
989
- * copies or substantial portions of the Software.
990
- *
991
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
992
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
993
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
994
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
995
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
996
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
997
- * SOFTWARE.
998
- *
999
- */
1000
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
1001
- const n = [
1002
- ["path", { d: "M21 5H3" }],
1003
- ["path", { d: "M21 12H9" }],
1004
- ["path", { d: "M21 19H7" }]
1005
- ];
1006
- Je(i, Qe(
1007
- { name: "text-align-end" },
1008
- () => r,
1009
- {
1010
- get iconNode() {
1011
- return n;
1012
- },
1013
- children: (x, H) => {
1014
- var u = ye(), p = he(u);
1015
- Ze(p, () => t.children ?? $e), s(x, u);
1016
- },
1017
- $$slots: { default: !0 }
1018
- }
1019
- )), we();
1020
- }
1021
- function sa(i, t) {
1022
- _e(t, !0);
1023
- /**
1024
- * @license @lucide/svelte v0.544.0 - ISC
1025
- *
1026
- * ISC License
1027
- *
1028
- * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
1029
- *
1030
- * Permission to use, copy, modify, and/or distribute this software for any
1031
- * purpose with or without fee is hereby granted, provided that the above
1032
- * copyright notice and this permission notice appear in all copies.
1033
- *
1034
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1035
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1036
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1037
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1038
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1039
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1040
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1041
- *
1042
- * ---
1043
- *
1044
- * The MIT License (MIT) (for portions derived from Feather)
1045
- *
1046
- * Copyright (c) 2013-2023 Cole Bemis
1047
- *
1048
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1049
- * of this software and associated documentation files (the "Software"), to deal
1050
- * in the Software without restriction, including without limitation the rights
1051
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1052
- * copies of the Software, and to permit persons to whom the Software is
1053
- * furnished to do so, subject to the following conditions:
1054
- *
1055
- * The above copyright notice and this permission notice shall be included in all
1056
- * copies or substantial portions of the Software.
1057
- *
1058
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1059
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1060
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1061
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1062
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1063
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1064
- * SOFTWARE.
1065
- *
1066
- */
1067
- let r = et(t, ["$$slots", "$$events", "$$legacy"]);
1068
- const n = [
1069
- ["path", { d: "M21 5H3" }],
1070
- ["path", { d: "M15 12H3" }],
1071
- ["path", { d: "M17 19H3" }]
1072
- ];
1073
- Je(i, Qe(
1074
- { name: "text-align-start" },
1075
- () => r,
1076
- {
1077
- get iconNode() {
1078
- return n;
1079
- },
1080
- children: (x, H) => {
1081
- var u = ye(), p = he(u);
1082
- Ze(p, () => t.children ?? $e), s(x, u);
1083
- },
1084
- $$slots: { default: !0 }
1085
- }
1086
- )), we();
1087
- }
1088
- var oa = g('<div role="dialog" aria-modal="true" aria-labelledby="slideup-title" tabindex="-1"></div>'), la = g('<div class="flex items-center justify-between p-4 border-b border-stone-700"><h3 id="slideup-title" class="text-lg font-semibold text-white"> </h3> <button type="button" class="p-2 text-gray-400 hover:text-white transition-colors duration-200" aria-label="Close"><!></button></div>'), ia = g('<div role="dialog" aria-modal="true" aria-labelledby="slideup-title"><!> <div class="max-h-full overflow-y-auto"><!></div></div>'), da = g("<!> <!>", 1);
1089
- function ca(i, t) {
1090
- _e(t, !1);
1091
- let r = a(t, "isOpen", 8, !1), n = a(t, "title", 8, ""), x = a(t, "maxHeight", 8, "80vh"), H = a(t, "zIndex", 8, 50);
1092
- const u = Ne();
1093
- let p = m(), P = m();
1094
- function C(c) {
1095
- r() && e(P) && c.target === e(P) && u("close");
1096
- }
1097
- function K(c) {
1098
- c.key === "Escape" && r() && u("close");
1099
- }
1100
- function B(c) {
1101
- typeof document < "u" && (c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "");
1102
- }
1103
- ut(() => (typeof document < "u" && document.addEventListener("keydown", K), () => {
1104
- typeof document < "u" && (document.removeEventListener("keydown", K), document.body.style.overflow = "");
1105
- })), j(() => d(r()), () => {
1106
- typeof document < "u" && B(r());
1107
- }), Fe(), Te();
1108
- var V = da(), _ = he(V);
1109
- {
1110
- var W = (c) => {
1111
- var v = oa();
1112
- Ae(v, (k) => f(P, k), () => e(P)), T(() => Y(v, 1, `fixed inset-0 z-${H() ?? ""} bg-black/50`)), I("click", v, C), I("keydown", v, (k) => k.key === "Escape" && C(k)), lt(3, v, () => Ct, () => ({ duration: 200 })), s(c, v);
1113
- };
1114
- E(_, (c) => {
1115
- r() && c(W);
1116
- });
1117
- }
1118
- var X = S(_, 2);
1119
- {
1120
- var z = (c) => {
1121
- var v = ia(), k = o(v);
1122
- {
1123
- var h = (w) => {
1124
- var M = la(), se = o(M), oe = o(se), ie = S(se, 2), J = o(ie);
1125
- dt(J, { size: 20 }), T(() => le(oe, n())), I("click", ie, () => u("close")), s(w, M);
1126
- };
1127
- E(k, (w) => {
1128
- n() && w(h);
1129
- });
1130
- }
1131
- var N = S(k, 2), b = o(N);
1132
- rt(b, t, "default", {}, null), Ae(v, (w) => f(p, w), () => e(p)), T(() => {
1133
- Y(v, 1, `fixed bottom-0 left-0 right-0 z-${H() + 1} bg-stone-800 border-t border-stone-700 rounded-t-xl shadow-2xl`), Ue(v, `max-height: ${x() ?? ""};`);
1134
- }), lt(3, v, () => zt, () => ({ axis: "y", duration: 300 })), s(c, v);
1135
- };
1136
- E(X, (c) => {
1137
- r() && c(z);
1138
- });
1139
- }
1140
- s(i, V), we();
1141
- }
1142
- var va = g('<span class="ml-1" style="color: rgb(var(--color-error));">*</span>'), ua = g("<label> <!></label>"), fa = g('<div class="absolute -top-1 -right-1 w-4 h-4 bg-cyber-amber-500 rounded-full flex items-center justify-center"><!></div>'), ba = g('<button type="button"><div></div> <!></button>'), ga = g('<div class="space-y-2"><div class="grid grid-cols-11 gap-3 p-1 bg-stone-800 rounded-lg border border-stone-700"></div></div>'), ha = g('<div class="p-4"><div class="max-h-96 overflow-y-auto space-y-4 pr-2"></div></div>'), ma = g('<div class="w-8 h-8 rounded border flex-shrink-0"></div>'), xa = g('<div class="w-8 h-8 rounded border flex-shrink-0" style="background-color: rgb(var(--color-surface-secondary)); border-color: rgb(var(--color-border));"></div> <span style="color: rgb(var(--color-text-secondary));">Select a color</span>', 1), pa = g('<div class="relative"><button type="button"><div class="flex items-center space-x-3"><!></div></button> <div></div></div>'), ya = g('<div class="w-8 h-8 rounded border border-stone-600 flex-shrink-0"></div>'), wa = g('<div class="w-8 h-8 rounded border flex-shrink-0" style="border-color: rgb(var(--color-border)); background-color: rgb(var(--color-surface-secondary));"></div> <span style="color: rgb(var(--color-text-secondary));">Select a color</span>', 1), _a = g('<div class="absolute -top-1 -right-1 w-4 h-4 bg-cyber-amber-500 rounded-full flex items-center justify-center"><!></div>'), ka = g('<button type="button"><div></div> <!></button>'), qa = g('<div class="space-y-2"><div class="grid grid-cols-8 gap-3 p-1 bg-stone-800 rounded-lg border border-stone-700"></div></div>'), Ca = g('<div class="p-4"><div class="max-h-96 overflow-y-auto space-y-4 pr-2"></div></div>'), za = g('<div class="relative"><button type="button"><div class="flex items-center space-x-3"><!></div></button> <div></div></div> <!>', 1), Ea = g('<div class="text-center py-6 text-stone-500 text-sm">No colors available</div>'), ja = g('<div class="space-y-3"><!> <!> <!> <!></div>');
1143
- function Er(i, t) {
1144
- _e(t, !1);
1145
- const r = m(), n = m(), x = m(), H = m(), u = m(), p = m();
1146
- let P = a(t, "value", 12, ""), C = a(t, "label", 8, ""), K = a(t, "required", 8, !1), B = a(t, "disabled", 8, !1), V = a(t, "size", 8, "md"), _ = a(t, "variant", 8, "outlined"), W = a(t, "colors", 24, () => [
1147
- // Default color palette - can be customized by parent
1148
- { label: "Red", value: "#ef4444", family: "Basic" },
1149
- { label: "Blue", value: "#3b82f6", family: "Basic" },
1150
- { label: "Green", value: "#10b981", family: "Basic" },
1151
- { label: "Yellow", value: "#f59e0b", family: "Basic" },
1152
- { label: "Purple", value: "#8b5cf6", family: "Basic" },
1153
- { label: "Pink", value: "#ec4899", family: "Basic" },
1154
- { label: "Indigo", value: "#6366f1", family: "Basic" },
1155
- { label: "Gray", value: "#6b7280", family: "Basic" },
1156
- { label: "Black", value: "#000000", family: "Basic" },
1157
- { label: "White", value: "#ffffff", family: "Basic" }
1158
- ]), X = m(!1), z = m(!1), c = m(!1);
1159
- const v = Ne(), k = `color-picker-${Math.random().toString(36).substr(2, 9)}`;
1160
- ut(() => {
1161
- f(c, window.innerWidth < 768);
1162
- const F = () => {
1163
- f(c, window.innerWidth < 768);
1164
- };
1165
- return window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
1166
- });
1167
- function h(F) {
1168
- B() || (P(F.value), f(
1169
- X,
1170
- !1
1171
- // Collapse after selection
1172
- ), v("change", { value: F.value }));
1173
- }
1174
- function N() {
1175
- B() || f(X, !e(X));
1176
- }
1177
- function b() {
1178
- f(z, !0);
1179
- }
1180
- function w() {
1181
- f(z, !1);
1182
- }
1183
- function M() {
1184
- f(X, !1);
1185
- }
1186
- j(() => {
1187
- }, () => {
1188
- f(r, {
1189
- sm: "px-3 py-1.5 text-sm",
1190
- md: "px-4 py-2.5 text-base",
1191
- lg: "px-5 py-3 text-lg"
1192
- });
1193
- }), j(() => {
1194
- }, () => {
1195
- f(n, {
1196
- default: "bg-surface border border-border text-text placeholder-text-placeholder focus:ring-focus-ring",
1197
- outlined: "bg-surface border border-border text-text placeholder-text-placeholder focus:ring-focus-ring",
1198
- filled: "bg-surface-secondary border-0 text-text placeholder-text-placeholder focus:ring-focus-ring",
1199
- ghost: "bg-transparent border-0 text-text placeholder-text-placeholder focus:ring-focus-ring"
1200
- });
1201
- }), j(() => {
1202
- }, () => {
1203
- f(x, [
1204
- "block",
1205
- "text-sm",
1206
- "font-medium",
1207
- "mb-2",
1208
- "transition-colors",
1209
- "duration-200"
1210
- ].join(" "));
1211
- }), j(
1212
- () => (e(r), d(V()), e(n), d(_())),
1213
- () => {
1214
- f(H, [
1215
- "w-full",
1216
- "min-w-40 sm:min-w-48 md:min-w-56 lg:min-w-64",
1217
- "rounded-lg",
1218
- "transition-all",
1219
- "duration-200",
1220
- "ease-in-out",
1221
- "focus:outline-none",
1222
- "focus:ring-2",
1223
- "focus:ring-offset-2",
1224
- "focus:ring-offset-dark-900",
1225
- "disabled:opacity-50",
1226
- "disabled:cursor-not-allowed",
1227
- e(r)[V()],
1228
- e(n)[_()],
1229
- "grainy-texture"
1230
- ].join(" "));
1231
- }
1232
- ), j(() => (d(W()), d(P())), () => {
1233
- f(u, W().find((F) => F.value === P()));
1234
- }), j(() => d(W()), () => {
1235
- f(p, W().reduce(
1236
- (F, ee) => {
1237
- const U = ee.family || "Other";
1238
- return F[U] || (F[U] = []), F[U].push(ee), F;
1239
- },
1240
- {}
1241
- ));
1242
- }), Fe(), Te();
1243
- var se = ja(), oe = o(se);
1244
- {
1245
- var ie = (F) => {
1246
- var ee = ua(), U = o(ee), R = S(U);
1247
- {
1248
- var D = (ae) => {
1249
- var me = va();
1250
- s(ae, me);
1251
- };
1252
- E(R, (ae) => {
1253
- K() && ae(D);
1254
- });
1255
- }
1256
- T(() => {
1257
- L(ee, "for", k), Y(ee, 1, ge(e(x))), le(U, `${C() ?? ""} `);
1258
- }), s(F, ee);
1259
- };
1260
- E(oe, (F) => {
1261
- C() && F(ie);
1262
- });
1263
- }
1264
- var J = S(oe, 2);
1265
- {
1266
- var de = (F) => {
1267
- $t(F, {
1268
- placement: "bottom-start",
1269
- width: "auto",
1270
- maxHeight: "20rem",
1271
- get isOpen() {
1272
- return e(X);
1273
- },
1274
- set isOpen(ee) {
1275
- f(X, ee);
1276
- },
1277
- $$events: { close: M },
1278
- children: (ee, U) => {
1279
- var R = ha(), D = o(R);
1280
- tt(
1281
- D,
1282
- 5,
1283
- () => (e(p), $(() => Object.entries(e(p)))),
1284
- ([ae, me]) => ae,
1285
- (ae, me) => {
1286
- var ke = bt(() => gt(e(me), 2));
1287
- let Be = () => e(ke)[1];
1288
- var je = ga(), te = o(je);
1289
- tt(te, 5, Be, (be) => be.value, (be, xe) => {
1290
- var A = ba(), y = o(A), re = S(y, 2);
1291
- {
1292
- var O = (ne) => {
1293
- var ue = fa(), ce = o(ue);
1294
- xt(ce, { size: 8, class: "text-stone-900" }), s(ne, ue);
1295
- };
1296
- E(re, (ne) => {
1297
- d(P()), e(xe), $(() => P() === e(xe).value) && ne(O);
1298
- });
1299
- }
1300
- T(() => {
1301
- Y(A, 1, `group relative flex flex-col items-center rounded-lg transition-all duration-200 hover:bg-stone-700 focus:outline-none focus:ring-2 focus:ring-cyber-amber-500 focus:ring-opacity-50 ${d(P()), e(xe), $(() => P() === e(xe).value ? "bg-cyber-amber-500/20 ring-2 ring-cyber-amber-500" : "") ?? ""} ${B() ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), A.disabled = B(), Y(y, 1, `w-8 h-8 rounded-lg group-hover:scale-110 transition-transform duration-200 ${d(P()), e(xe), $(() => P() === e(xe).value ? "border-cyber-amber-500" : "") ?? ""}`), Ue(y, `background-color: ${e(xe), $(() => e(xe).value) ?? ""}`);
1302
- }), I("click", A, () => h(e(xe))), I("keydown", A, (ne) => {
1303
- ne.key === "Enter" && h(e(xe));
1304
- }), s(be, A);
1305
- }), s(ae, je);
1306
- }
1307
- ), s(ee, R);
1308
- },
1309
- $$slots: {
1310
- default: !0,
1311
- trigger: (ee, U) => {
1312
- var R = pa(), D = o(R), ae = o(D), me = o(ae);
1313
- {
1314
- var ke = (te) => {
1315
- var be = ma();
1316
- T(() => Ue(be, `background-color: ${e(u), $(() => e(u).value) ?? ""}; border-color: rgb(var(--color-border));`)), s(te, be);
1317
- }, Be = (te) => {
1318
- var be = xa();
1319
- s(te, be);
1320
- };
1321
- E(me, (te) => {
1322
- e(u) ? te(ke) : te(Be, !1);
1323
- });
1324
- }
1325
- var je = S(D, 2);
1326
- T(() => {
1327
- Y(D, 1, ge(e(H))), D.disabled = B(), Y(je, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(z) ? "ring-2 ring-plasma-red-500/20" : ""}`);
1328
- }), I("click", D, N), I("focus", D, b), I("blur", D, w), s(ee, R);
1329
- }
1330
- },
1331
- $$legacy: !0
1332
- });
1333
- };
1334
- E(J, (F) => {
1335
- e(c) || F(de);
1336
- });
1337
- }
1338
- var pe = S(J, 2);
1339
- {
1340
- var qe = (F) => {
1341
- var ee = za(), U = he(ee), R = o(U), D = o(R), ae = o(D);
1342
- {
1343
- var me = (te) => {
1344
- var be = ya();
1345
- T(() => Ue(be, `background-color: ${e(u), $(() => e(u).value) ?? ""}`)), s(te, be);
1346
- }, ke = (te) => {
1347
- var be = wa();
1348
- s(te, be);
1349
- };
1350
- E(ae, (te) => {
1351
- e(u) ? te(me) : te(ke, !1);
1352
- });
1353
- }
1354
- var Be = S(R, 2), je = S(U, 2);
1355
- ca(je, {
1356
- title: "Select Color",
1357
- maxHeight: "80vh",
1358
- get isOpen() {
1359
- return e(X);
1360
- },
1361
- set isOpen(te) {
1362
- f(X, te);
1363
- },
1364
- $$events: { close: M },
1365
- children: (te, be) => {
1366
- var xe = Ca(), A = o(xe);
1367
- tt(
1368
- A,
1369
- 5,
1370
- () => (e(p), $(() => Object.entries(e(p)))),
1371
- ([y, re]) => y,
1372
- (y, re) => {
1373
- var O = bt(() => gt(e(re), 2));
1374
- let ne = () => e(O)[1];
1375
- var ue = qa(), ce = o(ue);
1376
- tt(ce, 5, ne, (ze) => ze.value, (ze, ve) => {
1377
- var G = ka(), Pe = o(G), Ke = S(Pe, 2);
1378
- {
1379
- var Ye = (q) => {
1380
- var l = _a(), Z = o(l);
1381
- xt(Z, { size: 8, class: "text-stone-900" }), s(q, l);
1382
- };
1383
- E(Ke, (q) => {
1384
- d(P()), e(ve), $(() => P() === e(ve).value) && q(Ye);
1385
- });
1386
- }
1387
- T(() => {
1388
- Y(G, 1, `group relative flex flex-col items-center rounded-lg transition-all duration-200 hover:bg-stone-700 focus:outline-none focus:ring-2 focus:ring-cyber-amber-500 focus:ring-opacity-50 ${d(P()), e(ve), $(() => P() === e(ve).value ? "bg-cyber-amber-500/20 ring-2 ring-cyber-amber-500" : "") ?? ""} ${B() ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), G.disabled = B(), Y(Pe, 1, `w-8 h-8 rounded-lg group-hover:scale-110 transition-transform duration-200 ${d(P()), e(ve), $(() => P() === e(ve).value ? "border-cyber-amber-500" : "") ?? ""}`), Ue(Pe, `background-color: ${e(ve), $(() => e(ve).value) ?? ""}`);
1389
- }), I("click", G, () => h(e(ve))), I("keydown", G, (q) => {
1390
- q.key === "Enter" && h(e(ve));
1391
- }), s(ze, G);
1392
- }), s(y, ue);
1393
- }
1394
- ), s(te, xe);
1395
- },
1396
- $$slots: { default: !0 },
1397
- $$legacy: !0
1398
- }), T(() => {
1399
- Y(R, 1, ge(e(H))), R.disabled = B(), Y(Be, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(z) ? "ring-2 ring-focus-ring" : ""}`);
1400
- }), I("click", R, N), I("focus", R, b), I("blur", R, w), s(F, ee);
1401
- };
1402
- E(pe, (F) => {
1403
- e(c) && F(qe);
1404
- });
1405
- }
1406
- var Q = S(pe, 2);
1407
- {
1408
- var fe = (F) => {
1409
- var ee = Ea();
1410
- s(F, ee);
1411
- };
1412
- E(Q, (F) => {
1413
- d(W()), $(() => !W() || W().length === 0) && F(fe);
1414
- });
1415
- }
1416
- s(i, se), we();
1417
- }
1418
- function Ba(i) {
1419
- return {
1420
- value: i.value,
1421
- hasValue: !!(i.value && i.value.trim()),
1422
- isFocused: !1,
1423
- hasError: !!i.error || i.variant === "error",
1424
- hasSuccess: !!i.success || i.variant === "success"
1425
- };
1426
- }
1427
- function jr(i, t) {
1428
- return {
1429
- ...i,
1430
- value: t,
1431
- hasValue: !!(t && t.trim())
1432
- };
1433
- }
1434
- function Br(i, t) {
1435
- return {
1436
- ...i,
1437
- isFocused: t
1438
- };
1439
- }
1440
- function Sa(i, t, r, n) {
1441
- return {
1442
- ...i,
1443
- hasError: !!t || n === "error",
1444
- hasSuccess: !!r || n === "success"
1445
- };
1446
- }
1447
- function Ta(i) {
1448
- return i || `input-${Math.random().toString(36).substr(2, 9)}`;
1449
- }
1450
- function Pa(i, t, r) {
1451
- return { value: i, event: t, field: r };
1452
- }
1453
- function Ia(i, t, r, n) {
1454
- return { value: i, event: t, field: r, checked: n };
1455
- }
1456
- const ft = {
1457
- sm: {
1458
- input: "px-3 py-1.5 text-sm",
1459
- label: "text-xs",
1460
- helper: "text-xs"
1461
- },
1462
- md: {
1463
- input: "px-4 py-2.5 text-sm",
1464
- label: "text-sm",
1465
- helper: "text-xs"
1466
- },
1467
- lg: {
1468
- input: "px-5 py-3 text-base",
1469
- label: "text-base",
1470
- helper: "text-sm"
1471
- }
1472
- }, La = [
1473
- "w-full",
1474
- "min-w-0",
1475
- "rounded-md",
1476
- "transition-all",
1477
- "duration-200",
1478
- "ease-in-out",
1479
- "focus:outline-none",
1480
- "focus:ring-2",
1481
- "focus:ring-focus-ring",
1482
- "focus:ring-offset-2",
1483
- "disabled:opacity-50",
1484
- "disabled:cursor-not-allowed",
1485
- "read-only:cursor-default",
1486
- "read-only:opacity-75"
1487
- ].join(" ");
1488
- function Na(i, t) {
1489
- return i ? "border-error text-text placeholder-text-placeholder focus:ring-error focus:border-error" : t ? "border-success text-text placeholder-text-placeholder focus:ring-success focus:border-success" : "border-border text-text placeholder-text-placeholder focus:ring-focus-ring focus:border-border-focus";
1490
- }
1491
- function Ha(i) {
1492
- return i ? "bg-surface-disabled text-text-disabled border-border-disabled cursor-not-allowed" : "";
1493
- }
1494
- function Ma(i, t, r) {
1495
- return [
1496
- "block",
1497
- ft[r].label,
1498
- "font-medium",
1499
- "mb-2",
1500
- "transition-colors",
1501
- "duration-200",
1502
- i ? "text-error" : t ? "text-success" : "text-text"
1503
- ].join(" ");
1504
- }
1505
- function Sr(i, t, r) {
1506
- return [
1507
- "mt-2",
1508
- ft[r].helper,
1509
- i ? "text-error" : t ? "text-success" : "text-text-secondary"
1510
- ].join(" ");
1511
- }
1512
- var Oa = g('<button type="button" aria-label="Clear input"><!></button>'), Da = g('<button type="button"><!></button>'), Fa = g('<div class="absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-1"><!> <!></div>');
1513
- function Ra(i, t) {
1514
- _e(t, !1);
1515
- let r = a(t, "showPasswordToggle", 8, !1), n = a(t, "showClearButton", 8, !1), x = a(t, "hasValue", 8, !1), H = a(t, "disabled", 8, !1), u = a(t, "readonly", 8, !1), p = a(t, "showPassword", 8, !1), P = a(t, "onTogglePassword", 8, () => {
1516
- }), C = a(t, "onClear", 8, () => {
1517
- });
1518
- const K = [
1519
- "absolute",
1520
- "right-3",
1521
- "top-1/2",
1522
- "-translate-y-1/2",
1523
- "text-text-tertiary",
1524
- "hover:text-primary",
1525
- "transition-colors",
1526
- "duration-200",
1527
- "focus:outline-none",
1528
- "focus:text-primary",
1529
- "focus:ring-2",
1530
- "focus:ring-focus-ring",
1531
- "focus:ring-offset-1",
1532
- "rounded-sm",
1533
- "p-1"
1534
- ].join(" ");
1535
- function B(c, v) {
1536
- c.key === "Enter" && v();
1537
- }
1538
- Te();
1539
- var V = Fa(), _ = o(V);
1540
- {
1541
- var W = (c) => {
1542
- var v = Oa(), k = o(v);
1543
- dt(k, { size: 16 }), T(() => Y(v, 1, ge(K))), I("click", v, mt(function(...h) {
1544
- var N;
1545
- (N = C()) == null || N.apply(this, h);
1546
- })), I("keydown", v, (h) => B(h, C())), s(c, v);
1547
- };
1548
- E(_, (c) => {
1549
- n() && x() && !H() && !u() && c(W);
1550
- });
1551
- }
1552
- var X = S(_, 2);
1553
- {
1554
- var z = (c) => {
1555
- var v = Da(), k = o(v);
1556
- {
1557
- var h = (b) => {
1558
- ta(b, { size: 16 });
1559
- }, N = (b) => {
1560
- aa(b, { size: 16 });
1561
- };
1562
- E(k, (b) => {
1563
- p() ? b(h) : b(N, !1);
1564
- });
1565
- }
1566
- T(() => {
1567
- Y(v, 1, ge(K)), L(v, "aria-label", p() ? "Hide password" : "Show password");
1568
- }), I("click", v, mt(function(...b) {
1569
- var w;
1570
- (w = P()) == null || w.apply(this, b);
1571
- })), I("keydown", v, (b) => B(b, P())), s(c, v);
1572
- };
1573
- E(X, (c) => {
1574
- r() && c(z);
1575
- });
1576
- }
1577
- s(i, V), we();
1578
- }
1579
- var Ka = g('<div class="flex items-center gap-1"><!> <span> </span></div>'), Va = g('<div class="flex items-center gap-1"><!> <span> </span></div>'), Wa = g("<span> </span>"), Xa = g("<div><!></div>");
1580
- function Aa(i, t) {
1581
- _e(t, !1);
1582
- const r = m();
1583
- let n = a(t, "hasError", 8, !1), x = a(t, "hasSuccess", 8, !1), H = a(t, "error", 8, ""), u = a(t, "success", 8, ""), p = a(t, "helpText", 8, ""), P = a(t, "inputId", 8, "");
1584
- j(
1585
- () => (d(n()), d(x())),
1586
- () => {
1587
- f(r, [
1588
- "mt-2",
1589
- "text-xs",
1590
- n() ? "text-error" : x() ? "text-success" : "text-text-secondary"
1591
- ].join(" "));
1592
- }
1593
- ), Fe(), Te();
1594
- var C = ye(), K = he(C);
1595
- {
1596
- var B = (V) => {
1597
- var _ = Xa(), W = o(_);
1598
- {
1599
- var X = (c) => {
1600
- var v = Ka(), k = o(v);
1601
- ct(k, { size: 14, class: "flex-shrink-0" });
1602
- var h = S(k, 2), N = o(h);
1603
- T(() => le(N, H())), s(c, v);
1604
- }, z = (c) => {
1605
- var v = ye(), k = he(v);
1606
- {
1607
- var h = (b) => {
1608
- var w = Va(), M = o(w);
1609
- vt(M, { size: 14, class: "flex-shrink-0" });
1610
- var se = S(M, 2), oe = o(se);
1611
- T(() => le(oe, u())), s(b, w);
1612
- }, N = (b) => {
1613
- var w = ye(), M = he(w);
1614
- {
1615
- var se = (oe) => {
1616
- var ie = Wa(), J = o(ie);
1617
- T(() => le(J, p())), s(oe, ie);
1618
- };
1619
- E(
1620
- M,
1621
- (oe) => {
1622
- p() && oe(se);
1623
- },
1624
- !0
1625
- );
1626
- }
1627
- s(b, w);
1628
- };
1629
- E(
1630
- k,
1631
- (b) => {
1632
- x() ? b(h) : b(N, !1);
1633
- },
1634
- !0
1635
- );
1636
- }
1637
- s(c, v);
1638
- };
1639
- E(W, (c) => {
1640
- n() ? c(X) : c(z, !1);
1641
- });
1642
- }
1643
- T(() => {
1644
- L(_, "id", `${P() ?? ""}-help`), Y(_, 1, ge(e(r)));
1645
- }), s(V, _);
1646
- };
1647
- E(K, (V) => {
1648
- (n() || x() || p()) && V(B);
1649
- });
1650
- }
1651
- s(i, C), we();
1652
- }
1653
- var Ya = g('<span class="text-error ml-1" aria-label="required">*</span>'), Ga = g("<label> <!></label>"), Ua = g('<div class="relative group transition-all duration-200 ease-in-out"><!> <div class="relative"><input/> <!></div> <!></div>');
1654
- const Ja = {
1655
- hash: "svelte-7hu4vd",
1656
- code: `
1657
- /* Enhanced focus styles using semantic tokens */.input-focus-visible {outline:2px solid rgb(var(--color-focus-ring));outline-offset:2px;}
1658
-
1659
- /* Smooth transitions for all interactive elements */input.svelte-7hu4vd {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
1660
-
1661
- /* Placeholder styling using semantic tokens */input.svelte-7hu4vd::-moz-placeholder {-moz-transition:color 0.2s ease;transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}input.svelte-7hu4vd::placeholder {transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}input.svelte-7hu4vd:focus::-moz-placeholder {color:rgb(var(--color-text-tertiary));}input.svelte-7hu4vd:focus::placeholder {color:rgb(var(--color-text-tertiary));}
1662
-
1663
- /* Number input spinner styling */input[type="number"].svelte-7hu4vd::-webkit-outer-spin-button,
1664
- input[type="number"].svelte-7hu4vd::-webkit-inner-spin-button {-webkit-appearance:none;margin:0;}input[type="number"].svelte-7hu4vd {-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield;}
1665
-
1666
- /* Search input styling */input[type="search"].svelte-7hu4vd::-webkit-search-cancel-button,
1667
- input[type="search"].svelte-7hu4vd::-webkit-search-decoration {-webkit-appearance:none;}`
1668
- };
1669
- function Tr(i, t) {
1670
- _e(t, !1), at(i, Ja);
1671
- const r = m(), n = m(), x = m(), H = m();
1672
- let u = a(t, "value", 12, ""), p = a(t, "type", 8, "text"), P = a(t, "label", 8, ""), C = a(t, "placeholder", 8, ""), K = a(t, "required", 8, !1), B = a(t, "disabled", 8, !1), V = a(t, "readonly", 8, !1), _ = a(t, "size", 8, "md"), W = a(t, "variant", 8, "default"), X = a(t, "error", 8, ""), z = a(t, "success", 8, ""), c = a(t, "helpText", 8, ""), v = a(t, "className", 8, ""), k = a(t, "id", 8, ""), h = a(t, "name", 8, void 0), N = a(t, "maxLength", 8, void 0), b = a(t, "minLength", 8, void 0), w = a(t, "pattern", 8, void 0), M = a(t, "autocomplete", 8, void 0), se = a(t, "showPasswordToggle", 8, !1), oe = a(t, "showClearButton", 8, !1), ie = a(t, "ariaLabel", 8, void 0);
1673
- const J = Ne();
1674
- let de = m(), pe = m(!1);
1675
- function qe(O) {
1676
- const ne = O.target;
1677
- u(ne.value), J("input", Pa(u(), O, h()));
1678
- }
1679
- function Q(O) {
1680
- const ne = O.target;
1681
- u(ne.value), J("change", Ia(u(), O, h()));
1682
- }
1683
- function fe(O) {
1684
- J("focus", { event: O });
1685
- }
1686
- function F(O) {
1687
- J("blur", { event: O });
1688
- }
1689
- function ee(O) {
1690
- J("keydown", { event: O });
1691
- }
1692
- function U(O) {
1693
- J("keyup", { event: O });
1694
- }
1695
- function R() {
1696
- f(pe, !e(pe));
1697
- }
1698
- function D() {
1699
- var O;
1700
- u(""), J("clear", { event: new Event("clear") }), (O = e(de)) == null || O.focus();
1701
- }
1702
- function ae() {
1703
- var O;
1704
- (O = e(de)) == null || O.focus();
1705
- }
1706
- function me() {
1707
- var O;
1708
- (O = e(de)) == null || O.blur();
1709
- }
1710
- function ke() {
1711
- var O;
1712
- (O = e(de)) == null || O.select();
1713
- }
1714
- j(() => d(k()), () => {
1715
- f(r, Ta(k()));
1716
- }), j(
1717
- () => (d(u()), d(X()), d(z()), d(W())),
1718
- () => {
1719
- f(n, Sa(
1720
- Ba({
1721
- value: u(),
1722
- error: X(),
1723
- success: z(),
1724
- variant: W()
1725
- }),
1726
- X(),
1727
- z(),
1728
- W()
1729
- ));
1730
- }
1731
- ), j(
1732
- () => (d(_()), e(n), d(B()), d(v())),
1733
- () => {
1734
- f(x, [
1735
- La,
1736
- ft[_()].input,
1737
- Na(e(n).hasError, e(n).hasSuccess),
1738
- Ha(B()),
1739
- v()
1740
- ].join(" "));
1741
- }
1742
- ), j(
1743
- () => (e(n), d(_())),
1744
- () => {
1745
- f(H, Ma(e(n).hasError, e(n).hasSuccess, _()));
1746
- }
1747
- ), Fe();
1748
- var Be = { focus: ae, blur: me, select: ke };
1749
- Te();
1750
- var je = Ua(), te = o(je);
1751
- {
1752
- var be = (O) => {
1753
- var ne = Ga(), ue = o(ne), ce = S(ue);
1754
- {
1755
- var ze = (ve) => {
1756
- var G = Ya();
1757
- s(ve, G);
1758
- };
1759
- E(ce, (ve) => {
1760
- K() && ve(ze);
1761
- });
1762
- }
1763
- T(() => {
1764
- L(ne, "for", e(r)), Y(ne, 1, ge(e(H))), le(ue, `${P() ?? ""} `);
1765
- }), s(O, ne);
1766
- };
1767
- E(te, (O) => {
1768
- P() && O(be);
1769
- });
1770
- }
1771
- var xe = S(te, 2), A = o(xe);
1772
- Ae(A, (O) => f(de, O), () => e(de));
1773
- var y = S(A, 2);
1774
- Ra(y, {
1775
- get showPasswordToggle() {
1776
- return se();
1777
- },
1778
- get showClearButton() {
1779
- return oe();
1780
- },
1781
- get hasValue() {
1782
- return e(n), $(() => e(n).hasValue);
1783
- },
1784
- get disabled() {
1785
- return B();
1786
- },
1787
- get readonly() {
1788
- return V();
1789
- },
1790
- get showPassword() {
1791
- return e(pe);
1792
- },
1793
- onTogglePassword: R,
1794
- onClear: D
1795
- });
1796
- var re = S(xe, 2);
1797
- return Aa(re, {
1798
- get hasError() {
1799
- return e(n), $(() => e(n).hasError);
1800
- },
1801
- get hasSuccess() {
1802
- return e(n), $(() => e(n).hasSuccess);
1803
- },
1804
- get error() {
1805
- return X();
1806
- },
1807
- get success() {
1808
- return z();
1809
- },
1810
- get helpText() {
1811
- return c();
1812
- },
1813
- get inputId() {
1814
- return e(r);
1815
- }
1816
- }), T(() => {
1817
- L(A, "id", e(r)), L(A, "type", se() && e(pe) ? "text" : p()), yt(A, u()), L(A, "placeholder", C()), A.disabled = B(), A.required = K(), A.readOnly = V(), L(A, "maxlength", N()), L(A, "minlength", b()), L(A, "pattern", w()), L(A, "autocomplete", M() || void 0), L(A, "name", h()), Y(A, 1, ge(e(x)), "svelte-7hu4vd"), L(A, "aria-invalid", (e(n), $(() => e(n).hasError ? "true" : "false"))), L(A, "aria-describedby", (e(n), d(c()), e(r), $(() => e(n).hasError || e(n).hasSuccess || c() ? `${e(r)}-help` : void 0))), L(A, "aria-label", ie() || (P() ? void 0 : "Input field")), L(A, "aria-required", K());
1818
- }), I("input", A, qe), I("change", A, Q), I("focus", A, fe), I("blur", A, F), I("keydown", A, ee), I("keyup", A, U), s(i, je), De(t, "focus", ae), De(t, "blur", me), De(t, "select", ke), we(Be);
1819
- }
1820
- var Qa = g('<span class="text-error ml-1 svelte-1qdann5">*</span>'), Za = g("<label> <!></label>"), $a = g('<option disabled class="svelte-1qdann5"> </option>'), er = g('<option class="bg-surface text-text svelte-1qdann5"> </option>'), tr = g('<button type="button" tabindex="-1" aria-label="Clear selection"><!></button>'), ar = g('<div class="flex items-center gap-1 svelte-1qdann5"><!> <span class="svelte-1qdann5"> </span></div>'), rr = g('<div class="flex items-center gap-1 svelte-1qdann5"><!> <span class="svelte-1qdann5"> </span></div>'), nr = g('<span class="svelte-1qdann5"> </span>'), sr = g("<div><!></div>"), or = g('<div><!> <div class="relative svelte-1qdann5"><select><!><!></select> <!> <div><!></div> <div></div></div> <!></div>');
1821
- const lr = {
1822
- hash: "svelte-1qdann5",
1823
- code: `
1824
- /* Custom focus styles for better accessibility */.select-focus-visible {outline:2px solid var(--color-plasma-red-500);outline-offset:2px;}
1825
-
1826
- /* Smooth transitions for all interactive elements */select.svelte-1qdann5 {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
1827
-
1828
- /* Custom dropdown arrow styling */select.svelte-1qdann5::-ms-expand {display:none;}
1829
-
1830
- /* Option styling */option.svelte-1qdann5 {background-color:var(--color-dark-800);color:white;padding:0.5rem;}
1831
-
1832
- /* Hover effects */.select-container.svelte-1qdann5:hover .select-icon:where(.svelte-1qdann5) {transform:scale(1.1);}.select-container.svelte-1qdann5:active .select-icon:where(.svelte-1qdann5) {transform:scale(0.95);}
1833
-
1834
- /* Clear button hover effects */button[aria-label="Clear selection"].svelte-1qdann5 {transition:all 0.2s ease;}button[aria-label="Clear selection"].svelte-1qdann5:hover {transform:scale(1.1);}button[aria-label="Clear selection"].svelte-1qdann5:active {transform:scale(0.95);}
1835
-
1836
- /* Focus ring animation */.select-focus-ring.svelte-1qdann5 {
1837
- animation: svelte-1qdann5-select-focus-ring-pulse 0.2s ease-out;}
1838
-
1839
- @keyframes svelte-1qdann5-select-focus-ring-pulse {
1840
- 0% {
1841
- transform: scale(0.95);
1842
- opacity: 0;
1843
- }
1844
- 100% {
1845
- transform: scale(1);
1846
- opacity: 1;
1847
- }
1848
- }
1849
-
1850
- /* Disabled state styling */.select-disabled.svelte-1qdann5 {opacity:0.5;cursor:not-allowed;}.select-disabled.svelte-1qdann5:hover {transform:none;}
1851
-
1852
- /* Required indicator styling */.select-required.svelte-1qdann5 {color:var(--color-blood-red-500);}`
1853
- };
1854
- function Pr(i, t) {
1855
- _e(t, !1), at(i, lr);
1856
- const r = m(), n = m(), x = m(), H = m(), u = m(), p = m(), P = m(), C = m(), K = m(), B = m(), V = m();
1857
- let _ = a(t, "value", 12, void 0), W = a(t, "options", 24, () => []), X = a(t, "placeholder", 8, "Select an option"), z = a(t, "label", 8, ""), c = a(t, "disabled", 8, !1), v = a(t, "required", 8, !1), k = a(t, "error", 8, ""), h = a(t, "success", 8, ""), N = a(t, "helpText", 8, ""), b = a(t, "size", 8, "md"), w = a(t, "variant", 8, "outlined"), M = a(t, "searchable", 8, !1), se = a(t, "clearable", 8, !1), oe = a(t, "name", 8, void 0), ie = a(t, "id", 8, void 0), J = a(t, "className", 8, "");
1858
- const de = Ne();
1859
- let pe = m(), qe = m(!1), Q = m(""), fe = m([]);
1860
- function F(q) {
1861
- const l = q.target;
1862
- _(l.value), de("input", { value: String(_()) });
1863
- }
1864
- function ee(q) {
1865
- const l = q.target;
1866
- _(l.value), de("change", { value: String(_()) });
1867
- }
1868
- function U(q) {
1869
- f(qe, !0), de("focus", { event: q });
1870
- }
1871
- function R(q) {
1872
- f(qe, !1), de("blur", { event: q });
1873
- }
1874
- function D(q) {
1875
- de("keydown", { event: q });
1876
- }
1877
- function ae(q) {
1878
- de("keyup", { event: q });
1879
- }
1880
- function me(q) {
1881
- q.stopPropagation(), _(void 0), de("clear", { event: q });
1882
- }
1883
- function ke() {
1884
- var q;
1885
- (q = e(pe)) == null || q.focus();
1886
- }
1887
- function Be() {
1888
- var q;
1889
- (q = e(pe)) == null || q.blur();
1890
- }
1891
- j(() => d(ie()), () => {
1892
- f(r, ie() || `select-${Math.random().toString(36).substr(2, 9)}`);
1893
- }), j(
1894
- () => (d(M()), e(Q), d(W())),
1895
- () => {
1896
- M() && e(Q) ? f(fe, W().filter((q) => q.label.toLowerCase().includes(e(Q).toLowerCase()))) : f(fe, W());
1897
- }
1898
- ), j(() => (d(W()), d(_())), () => {
1899
- f(n, W().find((q) => q.value === _()));
1900
- }), j(() => {
1901
- }, () => {
1902
- f(x, {
1903
- sm: "px-3 py-1.5 text-sm",
1904
- md: "px-4 py-2.5 text-base",
1905
- lg: "px-5 py-3 text-lg"
1906
- });
1907
- }), j(() => {
1908
- }, () => {
1909
- f(H, {
1910
- outlined: "border border-primary bg-surface",
1911
- filled: "border-0 bg-surface-secondary",
1912
- underlined: "border-0 border-b border-primary bg-transparent rounded-none"
1913
- });
1914
- }), j(() => (d(k()), d(h())), () => {
1915
- f(u, k() ? "focus:ring-error border-error" : h() ? "focus:ring-success border-success" : "");
1916
- }), j(() => {
1917
- }, () => {
1918
- f(p, [
1919
- "relative",
1920
- "group",
1921
- "transition-all",
1922
- "duration-200",
1923
- "ease-in-out"
1924
- ].join(" "));
1925
- }), j(
1926
- () => (d(w()), e(x), d(b()), e(H), e(u), d(J())),
1927
- () => {
1928
- f(P, [
1929
- "w-full",
1930
- "min-w-40 sm:min-w-48 md:min-w-56 lg:min-w-64",
1931
- w() === "underlined" ? "rounded-none" : "rounded-lg",
1932
- "transition-all",
1933
- "duration-200",
1934
- "ease-in-out",
1935
- "focus:outline-none",
1936
- "focus:ring-2",
1937
- "focus:ring-offset-2",
1938
- "focus:ring-offset-dark-900",
1939
- "disabled:opacity-50",
1940
- "disabled:cursor-not-allowed",
1941
- "cursor-pointer",
1942
- "appearance-none",
1943
- "pr-10",
1944
- e(x)[b()],
1945
- e(H)[w()],
1946
- e(u),
1947
- J()
1948
- ].join(" "));
1949
- }
1950
- ), j(() => (d(k()), d(h())), () => {
1951
- f(C, [
1952
- "block",
1953
- "text-sm",
1954
- "font-medium",
1955
- "mb-2",
1956
- "transition-colors",
1957
- "duration-200",
1958
- k() ? "text-error" : h() ? "text-success" : "text-primary"
1959
- ].join(" "));
1960
- }), j(() => (d(k()), d(h())), () => {
1961
- f(K, [
1962
- "mt-2",
1963
- "text-xs",
1964
- k() ? "text-error" : h() ? "text-success" : "text-tertiary"
1965
- ].join(" "));
1966
- }), j(() => d(b()), () => {
1967
- f(B, [
1968
- "absolute",
1969
- "right-3",
1970
- "top-1/2",
1971
- "-translate-y-1/2",
1972
- "pointer-events-none",
1973
- "transition-transform",
1974
- "duration-200",
1975
- "",
1976
- b() === "sm" ? "w-4 h-4" : b() === "md" ? "w-5 h-5" : "w-6 h-6"
1977
- ].join(" "));
1978
- }), j(() => d(b()), () => {
1979
- f(V, [
1980
- "absolute",
1981
- "right-8",
1982
- "top-1/2",
1983
- "-translate-y-1/2",
1984
- "text-text-secondary",
1985
- "hover:text-text",
1986
- "transition-colors",
1987
- "duration-200",
1988
- "focus:outline-none",
1989
- "focus:text-text",
1990
- b() === "sm" ? "w-4 h-4" : b() === "md" ? "w-5 h-5" : "w-6 h-6"
1991
- ].join(" "));
1992
- }), Fe();
1993
- var je = { focus: ke, blur: Be };
1994
- Te();
1995
- var te = or(), be = o(te);
1996
- {
1997
- var xe = (q) => {
1998
- var l = Za(), Z = o(l), Ee = S(Z);
1999
- {
2000
- var He = (Se) => {
2001
- var Ce = Qa();
2002
- s(Se, Ce);
2003
- };
2004
- E(Ee, (Se) => {
2005
- v() && Se(He);
2006
- });
2007
- }
2008
- T(() => {
2009
- L(l, "for", e(r)), Y(l, 1, ge(e(C)), "svelte-1qdann5"), le(Z, `${z() ?? ""} `);
2010
- }), s(q, l);
2011
- };
2012
- E(be, (q) => {
2013
- z() && q(xe);
2014
- });
2015
- }
2016
- var A = S(be, 2), y = o(A), re = o(y);
2017
- {
2018
- var O = (q) => {
2019
- var l = $a(), Z = o(l);
2020
- l.value = l.__value = "", T(() => le(Z, X())), s(q, l);
2021
- };
2022
- E(re, (q) => {
2023
- X() && !_() && q(O);
2024
- });
2025
- }
2026
- var ne = S(re);
2027
- tt(ne, 1, () => e(fe), (q) => q.value, (q, l) => {
2028
- var Z = er(), Ee = o(Z), He = {};
2029
- T(() => {
2030
- Z.disabled = (e(l), $(() => e(l).disabled)), le(Ee, (e(l), $(() => e(l).label))), He !== (He = (e(l), $(() => e(l).value))) && (Z.value = (Z.__value = (e(l), $(() => e(l).value))) ?? "");
2031
- }), s(q, Z);
2032
- }), Ae(y, (q) => f(pe, q), () => e(pe));
2033
- var ue;
2034
- Et(y);
2035
- var ce = S(y, 2);
2036
- {
2037
- var ze = (q) => {
2038
- var l = tr(), Z = o(l);
2039
- {
2040
- let Ee = ht(() => b() === "sm" ? 12 : b() === "md" ? 16 : 20);
2041
- dt(Z, {
2042
- get size() {
2043
- return e(Ee);
2044
- }
2045
- });
2046
- }
2047
- T(() => Y(l, 1, ge(e(V)), "svelte-1qdann5")), I("click", l, me), I("keydown", l, (Ee) => Ee.key === "Enter" && me(Ee)), s(q, l);
2048
- };
2049
- E(ce, (q) => {
2050
- se() && _() !== void 0 && _() !== "" && q(ze);
2051
- });
2052
- }
2053
- var ve = S(ce, 2), G = o(ve);
2054
- {
2055
- let q = ht(() => b() === "sm" ? 16 : b() === "md" ? 20 : 24);
2056
- ea(G, {
2057
- get size() {
2058
- return e(q);
2059
- }
2060
- });
2061
- }
2062
- var Pe = S(ve, 2), Ke = S(A, 2);
2063
- {
2064
- var Ye = (q) => {
2065
- var l = sr(), Z = o(l);
2066
- {
2067
- var Ee = (Se) => {
2068
- var Ce = ar(), Ie = o(Ce);
2069
- ct(Ie, { size: 16, class: "flex-shrink-0" });
2070
- var Ve = S(Ie, 2), Ge = o(Ve);
2071
- T(() => le(Ge, k())), s(Se, Ce);
2072
- }, He = (Se) => {
2073
- var Ce = ye(), Ie = he(Ce);
2074
- {
2075
- var Ve = (Me) => {
2076
- var Le = rr(), Oe = o(Le);
2077
- vt(Oe, { size: 16, class: "flex-shrink-0" });
2078
- var We = S(Oe, 2), Re = o(We);
2079
- T(() => le(Re, h())), s(Me, Le);
2080
- }, Ge = (Me) => {
2081
- var Le = ye(), Oe = he(Le);
2082
- {
2083
- var We = (Re) => {
2084
- var Xe = nr(), nt = o(Xe);
2085
- T(() => le(nt, N())), s(Re, Xe);
2086
- };
2087
- E(
2088
- Oe,
2089
- (Re) => {
2090
- N() && Re(We);
2091
- },
2092
- !0
2093
- );
2094
- }
2095
- s(Me, Le);
2096
- };
2097
- E(
2098
- Ie,
2099
- (Me) => {
2100
- h() ? Me(Ve) : Me(Ge, !1);
2101
- },
2102
- !0
2103
- );
2104
- }
2105
- s(Se, Ce);
2106
- };
2107
- E(Z, (Se) => {
2108
- k() ? Se(Ee) : Se(He, !1);
2109
- });
2110
- }
2111
- T(() => {
2112
- L(l, "id", `${e(r) ?? ""}-help`), Y(l, 1, ge(e(K)), "svelte-1qdann5");
2113
- }), s(q, l);
2114
- };
2115
- E(Ke, (q) => {
2116
- (k() || h() || N()) && q(Ye);
2117
- });
2118
- }
2119
- return T(() => {
2120
- Y(te, 1, ge(e(p)), "svelte-1qdann5"), L(y, "id", e(r)), y.disabled = c(), y.required = v(), L(y, "name", oe()), Y(y, 1, ge(e(P)), "svelte-1qdann5"), L(y, "aria-invalid", k() ? "true" : "false"), L(y, "aria-describedby", k() || h() || N() ? `${e(r)}-help` : void 0), ue !== (ue = _()) && (y.value = (y.__value = _()) ?? "", jt(y, _())), Y(ve, 1, ge(e(B)), "svelte-1qdann5"), Y(Pe, 1, `absolute inset-0 rounded-lg pointer-events-none transition-all duration-200 ${e(qe) ? "ring-2 ring-primary" : ""}`, "svelte-1qdann5");
2121
- }), I("input", y, F), I("change", y, ee), I("focus", y, U), I("blur", y, R), I("keydown", y, D), I("keyup", y, ae), s(i, te), De(t, "focus", ke), De(t, "blur", Be), we(je);
2122
- }
2123
- var ir = g('<span class="text-error ml-1 svelte-1bsl3nr" aria-label="required">*</span>'), dr = g("<label> <!></label>"), cr = g("<div> </div>"), vr = g('<div class="flex items-center gap-1 svelte-1bsl3nr"><!> <span class="svelte-1bsl3nr"> </span></div>'), ur = g('<div class="flex items-center gap-1 svelte-1bsl3nr"><!> <span class="svelte-1bsl3nr"> </span></div>'), fr = g('<span class="svelte-1bsl3nr"> </span>'), br = g("<div><!></div>"), gr = g('<div><!> <div class="relative svelte-1bsl3nr"><textarea></textarea></div> <!> <!></div>');
2124
- const hr = {
2125
- hash: "svelte-1bsl3nr",
2126
- code: `
2127
- /* Enhanced focus styles using semantic tokens */.textarea-focus-visible {outline:2px solid rgb(var(--color-focus-ring));outline-offset:2px;}
2128
-
2129
- /* Smooth transitions for all interactive elements */textarea.svelte-1bsl3nr {transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);}
2130
-
2131
- /* Custom scrollbar for textarea using semantic tokens */textarea.svelte-1bsl3nr::-webkit-scrollbar {width:6px;}textarea.svelte-1bsl3nr::-webkit-scrollbar-track {background:transparent;}textarea.svelte-1bsl3nr::-webkit-scrollbar-thumb {background:rgb(var(--color-border-secondary));border-radius:3px;}textarea.svelte-1bsl3nr::-webkit-scrollbar-thumb:hover {background:rgb(var(--color-border-hover));}
2132
-
2133
- /* Placeholder styling using semantic tokens */textarea.svelte-1bsl3nr::-moz-placeholder {-moz-transition:color 0.2s ease;transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}textarea.svelte-1bsl3nr::placeholder {transition:color 0.2s ease;color:rgb(var(--color-text-placeholder));}textarea.svelte-1bsl3nr:focus::-moz-placeholder {color:rgb(var(--color-text-tertiary));}textarea.svelte-1bsl3nr:focus::placeholder {color:rgb(var(--color-text-tertiary));}
2134
-
2135
- /* Character count styling using semantic tokens */.char-count-warning.svelte-1bsl3nr {color:rgb(var(--color-warning));}.char-count-error.svelte-1bsl3nr {color:rgb(var(--color-error));}
2136
-
2137
- /* Resize handle styling */textarea.svelte-1bsl3nr:not(.resize-none) {resize:both;}textarea.resize-x.svelte-1bsl3nr {resize:horizontal;}textarea.resize-y.svelte-1bsl3nr {resize:vertical;}
2138
-
2139
- /* Focus ring animation */.focus-ring.svelte-1bsl3nr {
2140
- animation: svelte-1bsl3nr-focus-ring-pulse 0.2s ease-out;}
2141
-
2142
- @keyframes svelte-1bsl3nr-focus-ring-pulse {
2143
- 0% {
2144
- transform: scale(0.95);
2145
- opacity: 0;
2146
- }
2147
- 100% {
2148
- transform: scale(1);
2149
- opacity: 1;
2150
- }
2151
- }`
2152
- };
2153
- function Ir(i, t) {
2154
- _e(t, !1), at(i, hr);
2155
- const r = m(), n = m(), x = m(), H = m(), u = m(), p = m(), P = m(), C = m(), K = m(), B = m(), V = m(), _ = m(), W = m(), X = m();
2156
- let z = a(t, "value", 12, ""), c = a(t, "label", 8, ""), v = a(t, "placeholder", 8, ""), k = a(t, "helperText", 8, ""), h = a(t, "disabled", 8, !1), N = a(t, "required", 8, !1), b = a(t, "readonly", 8, !1), w = a(t, "id", 8, void 0), M = a(t, "name", 8, void 0), se = a(t, "error", 8, ""), oe = a(t, "success", 8, ""), ie = a(t, "helpText", 8, ""), J = a(t, "maxLength", 8, void 0), de = a(t, "minLength", 8, void 0), pe = a(t, "rows", 8, 4), qe = a(t, "resize", 8, "vertical"), Q = a(t, "autoResize", 8, !1), fe = a(t, "size", 8, "md"), F = a(t, "variant", 8, "outlined"), ee = a(t, "className", 8, ""), U = a(t, "ariaLabel", 8, void 0);
2157
- const R = Ne();
2158
- let D = m(), ae = m(!1);
2159
- function me(l) {
2160
- const Z = l.target;
2161
- z(Z.value), f(ae, z() !== ""), Q() && A(), R("input", { value: z(), event: l, field: M() });
2162
- }
2163
- function ke(l) {
2164
- const Z = l.target;
2165
- z(Z.value), f(ae, z() !== ""), R("change", { value: z(), event: l, field: M() });
2166
- }
2167
- function Be(l) {
2168
- R("focus", { event: l });
2169
- }
2170
- function je(l) {
2171
- R("blur", { event: l });
2172
- }
2173
- function te(l) {
2174
- R("keydown", { event: l });
2175
- }
2176
- function be(l) {
2177
- R("keyup", { event: l });
2178
- }
2179
- function xe(l) {
2180
- R("resize", { event: l });
2181
- }
2182
- function A() {
2183
- e(D) && (st(D, e(D).style.height = "auto"), st(D, e(D).style.height = e(D).scrollHeight + "px"));
2184
- }
2185
- function y() {
2186
- var l;
2187
- (l = e(D)) == null || l.focus();
2188
- }
2189
- function re() {
2190
- var l;
2191
- (l = e(D)) == null || l.blur();
2192
- }
2193
- function O() {
2194
- var l;
2195
- (l = e(D)) == null || l.select();
2196
- }
2197
- j(() => d(w()), () => {
2198
- f(r, w() || `textarea-${Math.random().toString(36).substr(2, 9)}`);
2199
- }), j(() => d(z()), () => {
2200
- f(ae, z() !== "" && z() !== null && z() !== void 0);
2201
- }), j(() => d(se()), () => {
2202
- f(n, !!se());
2203
- }), j(() => d(oe()), () => {
2204
- f(x, !!oe());
2205
- }), j(() => {
2206
- }, () => {
2207
- f(H, {
2208
- sm: "px-3 py-1.5 text-sm",
2209
- md: "px-4 py-2.5 text-sm",
2210
- lg: "px-5 py-3 text-base"
2211
- });
2212
- }), j(() => {
2213
- }, () => {
2214
- f(u, {
2215
- outlined: "border border-primary bg-surface",
2216
- filled: "border-0 bg-surface-secondary",
2217
- underlined: "border-0 border-b border-primary bg-transparent rounded-none"
2218
- });
2219
- }), j(() => {
2220
- }, () => {
2221
- f(p, {
2222
- none: "resize-none",
2223
- both: "resize",
2224
- horizontal: "resize-x",
2225
- vertical: "resize-y"
2226
- });
2227
- }), j(
2228
- () => (d(F()), e(H), d(fe()), e(u), e(p), d(qe()), d(ee())),
2229
- () => {
2230
- f(P, [
2231
- "w-full",
2232
- "min-w-0",
2233
- F() === "underlined" ? "rounded-none" : "rounded-md",
2234
- "transition-all",
2235
- "duration-200",
2236
- "ease-in-out",
2237
- "focus:outline-none",
2238
- "focus:ring-2",
2239
- "focus:ring-focus",
2240
- "focus:ring-offset-2",
2241
- "focus:ring-offset-surface",
2242
- "disabled:opacity-50",
2243
- "disabled:cursor-not-allowed",
2244
- "read-only:cursor-default",
2245
- "read-only:opacity-75",
2246
- "overflow-hidden",
2247
- e(H)[fe()],
2248
- e(u)[F()],
2249
- e(p)[qe()],
2250
- ee()
2251
- ].join(" "));
2252
- }
2253
- ), j(() => (e(n), e(x)), () => {
2254
- f(C, e(n) ? "border-error text-primary placeholder-placeholder focus:ring-error focus:border-error" : e(x) ? "border-success text-primary placeholder-placeholder focus:ring-success focus:border-success" : "text-primary placeholder-placeholder focus:ring-focus focus:border-focus");
2255
- }), j(() => d(h()), () => {
2256
- f(K, h() ? "bg-surface-disabled text-disabled border-disabled cursor-not-allowed" : "");
2257
- }), j(
2258
- () => (e(P), e(C), e(K)),
2259
- () => {
2260
- f(B, [
2261
- e(P),
2262
- e(C),
2263
- e(K)
2264
- ].join(" "));
2265
- }
2266
- ), j(() => {
2267
- }, () => {
2268
- f(V, [
2269
- "relative",
2270
- "group",
2271
- "transition-all",
2272
- "duration-200",
2273
- "ease-in-out"
2274
- ].join(" "));
2275
- }), j(() => (e(n), e(x)), () => {
2276
- f(_, [
2277
- "block",
2278
- "text-sm",
2279
- "font-medium",
2280
- "mb-2",
2281
- "transition-colors",
2282
- "duration-200",
2283
- e(n) ? "text-error" : e(x) ? "text-success" : "text-primary"
2284
- ].join(" "));
2285
- }), j(() => (e(n), e(x)), () => {
2286
- f(W, [
2287
- "mt-2",
2288
- "text-xs",
2289
- e(n) ? "text-error" : e(x) ? "text-success" : "text-secondary"
2290
- ].join(" "));
2291
- }), j(() => (d(J()), d(z())), () => {
2292
- f(X, [
2293
- "text-xs",
2294
- "text-secondary",
2295
- "mt-1",
2296
- "text-right",
2297
- J() && z().length > J() * 0.9 ? "text-warning" : "",
2298
- J() && z().length >= J() ? "text-error" : ""
2299
- ].join(" "));
2300
- }), Fe();
2301
- var ne = { focus: y, blur: re, select: O };
2302
- Te();
2303
- var ue = gr(), ce = o(ue);
2304
- {
2305
- var ze = (l) => {
2306
- var Z = dr(), Ee = o(Z), He = S(Ee);
2307
- {
2308
- var Se = (Ce) => {
2309
- var Ie = ir();
2310
- s(Ce, Ie);
2311
- };
2312
- E(He, (Ce) => {
2313
- N() && Ce(Se);
2314
- });
2315
- }
2316
- T(() => {
2317
- L(Z, "for", e(r)), Y(Z, 1, ge(e(_)), "svelte-1bsl3nr"), le(Ee, `${c() ?? ""} `);
2318
- }), s(l, Z);
2319
- };
2320
- E(ce, (l) => {
2321
- c() && l(ze);
2322
- });
2323
- }
2324
- var ve = S(ce, 2), G = o(ve);
2325
- Ae(G, (l) => f(D, l), () => e(D));
2326
- var Pe = S(ve, 2);
2327
- {
2328
- var Ke = (l) => {
2329
- var Z = cr(), Ee = o(Z);
2330
- T(() => {
2331
- Y(Z, 1, ge(e(X)), "svelte-1bsl3nr"), le(Ee, `${d(z()), $(() => z().length) ?? ""}/${J() ?? ""}`);
2332
- }), s(l, Z);
2333
- };
2334
- E(Pe, (l) => {
2335
- J() && l(Ke);
2336
- });
2337
- }
2338
- var Ye = S(Pe, 2);
2339
- {
2340
- var q = (l) => {
2341
- var Z = br(), Ee = o(Z);
2342
- {
2343
- var He = (Ce) => {
2344
- var Ie = vr(), Ve = o(Ie);
2345
- ct(Ve, { size: 14, class: "flex-shrink-0" });
2346
- var Ge = S(Ve, 2), Me = o(Ge);
2347
- T(() => le(Me, se())), s(Ce, Ie);
2348
- }, Se = (Ce) => {
2349
- var Ie = ye(), Ve = he(Ie);
2350
- {
2351
- var Ge = (Le) => {
2352
- var Oe = ur(), We = o(Oe);
2353
- vt(We, { size: 14, class: "flex-shrink-0" });
2354
- var Re = S(We, 2), Xe = o(Re);
2355
- T(() => le(Xe, oe())), s(Le, Oe);
2356
- }, Me = (Le) => {
2357
- var Oe = ye(), We = he(Oe);
2358
- {
2359
- var Re = (Xe) => {
2360
- var nt = fr(), wt = o(nt);
2361
- T(() => le(wt, ie())), s(Xe, nt);
2362
- };
2363
- E(
2364
- We,
2365
- (Xe) => {
2366
- ie() && Xe(Re);
2367
- },
2368
- !0
2369
- );
2370
- }
2371
- s(Le, Oe);
2372
- };
2373
- E(
2374
- Ve,
2375
- (Le) => {
2376
- e(x) ? Le(Ge) : Le(Me, !1);
2377
- },
2378
- !0
2379
- );
2380
- }
2381
- s(Ce, Ie);
2382
- };
2383
- E(Ee, (Ce) => {
2384
- e(n) ? Ce(He) : Ce(Se, !1);
2385
- });
2386
- }
2387
- T(() => {
2388
- L(Z, "id", `${e(r) ?? ""}-help`), Y(Z, 1, ge(e(W)), "svelte-1bsl3nr");
2389
- }), s(l, Z);
2390
- };
2391
- E(Ye, (l) => {
2392
- (e(n) || e(x) || ie()) && l(q);
2393
- });
2394
- }
2395
- return T(() => {
2396
- Y(ue, 1, ge(e(V)), "svelte-1bsl3nr"), L(G, "id", e(r)), yt(G, z()), L(G, "placeholder", v()), G.disabled = h(), G.required = N(), G.readOnly = b(), L(G, "maxlength", J()), L(G, "minlength", de()), L(G, "name", M()), L(G, "rows", pe()), Y(G, 1, ge(e(B)), "svelte-1bsl3nr"), L(G, "aria-invalid", e(n) ? "true" : "false"), L(G, "aria-describedby", e(n) || e(x) || k() || J() ? `${e(r)}-help` : void 0), L(G, "aria-label", U() || (c() ? void 0 : "Textarea field")), L(G, "aria-required", N());
2397
- }), I("input", G, me), I("change", G, ke), I("focus", G, (l) => Be(l)), I("blur", G, (l) => je(l)), I("keydown", G, (l) => te(l)), I("keyup", G, (l) => be(l)), I("resize", G, xe), s(i, ue), De(t, "focus", y), De(t, "blur", re), De(t, "select", O), we(ne);
2398
- }
2399
- var mr = g('<span class="ml-1" style="color: rgb(var(--color-error));">*</span>'), xr = g('<button type="button" role="radio"><!> <span class="hidden sm:inline"> </span></button>'), pr = g('<div class="space-y-2"><label class="block text-sm font-medium" style="color: rgb(var(--color-text));"> <!></label> <div class="flex gap-1 p-1 rounded-lg min-w-48 sm:min-w-56 md:min-w-64 lg:min-w-72" style="background-color: rgb(var(--color-surface-secondary)); border-color: rgb(var(--color-border));" role="radiogroup"></div></div>');
2400
- function Lr(i, t) {
2401
- _e(t, !1);
2402
- let r = a(t, "value", 12, "center"), n = a(t, "label", 8, "Text Alignment"), x = a(t, "required", 8, !1), H = a(t, "size", 8, "sm");
2403
- const u = Ne(), p = `text-alignment-${Math.random().toString(36).substr(2, 9)}`, P = [
2404
- { value: "left", label: "Left", component: sa },
2405
- { value: "center", label: "Center", component: ra },
2406
- { value: "right", label: "Right", component: na }
2407
- ];
2408
- function C(c, v) {
2409
- r(c), u("change", { value: c, event: v || new Event("change") });
2410
- }
2411
- const K = {
2412
- sm: "text-xs px-2 py-1",
2413
- md: "text-sm px-3 py-2",
2414
- lg: "text-base px-4 py-3"
2415
- };
2416
- Te();
2417
- var B = pr(), V = o(B), _ = o(V), W = S(_);
2418
- {
2419
- var X = (c) => {
2420
- var v = mr();
2421
- s(c, v);
2422
- };
2423
- E(W, (c) => {
2424
- x() && c(X);
2425
- });
2426
- }
2427
- var z = S(V, 2);
2428
- tt(z, 5, () => P, Bt, (c, v) => {
2429
- var k = xr(), h = o(k);
2430
- ot(h, () => e(v).component, (w, M) => {
2431
- M(w, { size: 16 });
2432
- });
2433
- var N = S(h, 2), b = o(N);
2434
- T(() => {
2435
- Y(k, 1, `flex-1 flex items-center justify-center gap-2 ${d(H()), $(() => K[H()]) ?? ""} rounded-md transition-all duration-200 ${d(r()), e(v), $(() => r() === e(v).value ? "shadow-sm" : "") ?? ""}`), Ue(k, `color: ${d(r()), e(v), $(() => r() === e(v).value ? "rgb(var(--color-text-inverse))" : "rgb(var(--color-text-secondary))") ?? ""}; background-color: ${d(r()), e(v), $(() => r() === e(v).value ? "rgb(var(--color-primary))" : "transparent") ?? ""};`), L(k, "aria-checked", (d(r()), e(v), $(() => r() === e(v).value))), L(k, "aria-label", (e(v), $(() => e(v).label))), le(b, (e(v), $(() => e(v).label)));
2436
- }), I("click", k, (w) => C(e(v).value, w)), I("keydown", k, (w) => {
2437
- const M = w;
2438
- M.key === "Enter" && C(e(v).value, M);
2439
- }), s(c, k);
2440
- }), T(() => {
2441
- L(V, "for", p), le(_, `${n() ?? ""} `), L(z, "id", p), L(z, "aria-label", n());
2442
- }), s(i, B), we();
2443
- }
2444
- var yr = g('<button type="button" class="text-sm font-medium text-primary cursor-pointer select-none hover:text-secondary transition-colors"> </button>'), wr = g('<div><button type="button" role="switch"><span></span></button> <!></div>');
2445
- function Nr(i, t) {
2446
- _e(t, !1);
2447
- const r = m();
2448
- let n = a(t, "checked", 12, !1), x = a(t, "disabled", 8, !1), H = a(t, "label", 8, ""), u = a(t, "size", 8, "md"), p = a(t, "className", 8, "");
2449
- const P = Ne();
2450
- function C() {
2451
- x() || (n(!n()), P("change", { checked: n() }));
2452
- }
2453
- const K = { sm: "w-8 h-4", md: "w-11 h-6", lg: "w-14 h-7" }, B = { sm: "w-3 h-3", md: "w-5 h-5", lg: "w-6 h-6" };
2454
- j(() => d(n()), () => {
2455
- f(r, {
2456
- sm: n() ? "translate-x-4" : "translate-x-0",
2457
- md: n() ? "translate-x-5" : "translate-x-0",
2458
- lg: n() ? "translate-x-7" : "translate-x-0"
2459
- });
2460
- }), Fe(), Te();
2461
- var V = wr(), _ = o(V), W = o(_), X = S(_, 2);
2462
- {
2463
- var z = (c) => {
2464
- var v = yr(), k = o(v);
2465
- T(() => le(k, H())), I("click", v, C), I("keydown", v, (h) => {
2466
- const N = h;
2467
- (N.key === "Enter" || N.key === " ") && (N.preventDefault(), C());
2468
- }), s(c, v);
2469
- };
2470
- E(X, (c) => {
2471
- H() && c(z);
2472
- });
2473
- }
2474
- T(() => {
2475
- Y(V, 1, `flex items-center space-x-3 min-w-32 sm:min-w-36 md:min-w-40 lg:min-w-44 ${p() ?? ""}`), L(_, "aria-checked", n()), L(_, "aria-label", H() || "Toggle"), _.disabled = x(), Y(_, 1, `relative inline-flex ${d(u()), $(() => K[u()]) ?? ""} flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 ${n() ? "bg-primary" : "bg-surface-tertiary"} ${x() ? "opacity-50 cursor-not-allowed" : "hover:bg-opacity-80"}`), Y(W, 1, `pointer-events-none inline-block ${d(u()), $(() => B[u()]) ?? ""} transform rounded-full bg-surface shadow-lg ring-0 transition duration-200 ease-in-out ${e(r), d(u()), $(() => e(r)[u()]) ?? ""}`);
2476
- }), I("click", _, C), I("keydown", _, (c) => {
2477
- const v = c;
2478
- (v.key === "Enter" || v.key === " ") && (v.preventDefault(), C());
2479
- }), s(i, V), we();
2480
- }
2481
- export {
2482
- qr as B,
2483
- Cr as C,
2484
- $t as D,
2485
- Tr as I,
2486
- Pr as S,
2487
- Ir as T,
2488
- zr as a,
2489
- Er as b,
2490
- Lr as c,
2491
- Nr as d,
2492
- ca as e,
2493
- Ba as f,
2494
- Br as g,
2495
- Sa as h,
2496
- Ta as i,
2497
- Pa as j,
2498
- Ia as k,
2499
- ft as l,
2500
- La as m,
2501
- Na as n,
2502
- Ha as o,
2503
- Ma as p,
2504
- Sr as q,
2505
- mt as r,
2506
- jr as u
2507
- };