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