zabi-components 1.0.9 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -22
- package/dist/Card-BIAsG5HX.js +222 -0
- package/dist/Navigation-BoOnkbXw.js +81 -0
- package/dist/Tabs-DXN_BqPw.js +509 -0
- package/dist/ThemeToggle-CRI92cOb.js +35 -0
- package/dist/Tooltip-C9G35OZ6.js +1230 -0
- package/dist/atoms/index.js +23 -21
- package/dist/index/index.js +451 -185
- package/dist/molecules/index.js +12 -12
- package/dist/organisms/index.js +2 -3
- package/dist/store-ZmZCXeMy.js +2413 -0
- package/package.json +17 -12
- package/dist/Tabs-DTuXgJQh.js +0 -1105
- package/dist/Toast-1EMgTOM4.js +0 -417
- package/dist/ToastManager-ZcovxilX.js +0 -354
- package/dist/Toggle-kQ6Z43Ep.js +0 -2509
- package/dist/Tooltip-gkAHhbjD.js +0 -1152
- package/dist/x-Dsi-CPO3.js +0 -3073
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
import { t as S, B as ie, T as le, U as de, V as ne, W as X, w as ce, X as ve, v as j, Y as fe, S as ue, N as Z, O as re, i as H, f as y, a as N, k as E, b, p as U, c as Y, Q as I, n as k, d as r, g as w, m as G, o as R, h as F, s as Q, e as M, q as O, r as ae, u as oe, Z as $, _ as A, $ as W, a0 as xe } from "./store-ZmZCXeMy.js";
|
|
2
|
+
import { p as f, a as se, b as V, C as be, B as ee } from "./Card-BIAsG5HX.js";
|
|
3
|
+
import { createEventDispatcher as K } from "svelte";
|
|
4
|
+
function me(o, e, a = !1, i = !1, n = !1) {
|
|
5
|
+
var t = o, c = "";
|
|
6
|
+
S(() => {
|
|
7
|
+
var l = (
|
|
8
|
+
/** @type {Effect} */
|
|
9
|
+
ie
|
|
10
|
+
);
|
|
11
|
+
if (c !== (c = e() ?? "") && (l.nodes_start !== null && (le(
|
|
12
|
+
l.nodes_start,
|
|
13
|
+
/** @type {TemplateNode} */
|
|
14
|
+
l.nodes_end
|
|
15
|
+
), l.nodes_start = l.nodes_end = null), c !== "")) {
|
|
16
|
+
var d = c + "";
|
|
17
|
+
a ? d = `<svg>${d}</svg>` : i && (d = `<math>${d}</math>`);
|
|
18
|
+
var v = de(d);
|
|
19
|
+
if ((a || i) && (v = /** @type {Element} */
|
|
20
|
+
X(v)), ne(
|
|
21
|
+
/** @type {TemplateNode} */
|
|
22
|
+
X(v),
|
|
23
|
+
/** @type {TemplateNode} */
|
|
24
|
+
v.lastChild
|
|
25
|
+
), a || i)
|
|
26
|
+
for (; X(v); )
|
|
27
|
+
t.before(
|
|
28
|
+
/** @type {Node} */
|
|
29
|
+
X(v)
|
|
30
|
+
);
|
|
31
|
+
else
|
|
32
|
+
t.before(v);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function te(o, e) {
|
|
37
|
+
return o === e || (o == null ? void 0 : o[ue]) === e;
|
|
38
|
+
}
|
|
39
|
+
function pe(o = {}, e, a, i) {
|
|
40
|
+
return ce(() => {
|
|
41
|
+
var n, t;
|
|
42
|
+
return ve(() => {
|
|
43
|
+
n = t, t = [], j(() => {
|
|
44
|
+
o !== a(...t) && (e(o, ...t), n && te(a(...n), o) && e(null, ...n));
|
|
45
|
+
});
|
|
46
|
+
}), () => {
|
|
47
|
+
fe(() => {
|
|
48
|
+
t && te(a(...t), o) && e(null, ...t);
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
}), o;
|
|
52
|
+
}
|
|
53
|
+
var ge = y('<button class="absolute top-2 right-2 z-10 w-6 h-6 flex items-center justify-center rounded-full text-text-secondary hover:text-primary transition-colors duration-200 motion-reduce:transition-none group focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2" aria-label="Dismiss alert" type="button"><svg class="w-4 h-4 text-current group-hover:scale-110 transition-transform duration-200 motion-reduce:transition-none" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>'), he = y('<h4 class="font-semibold text-sm mb-1" style="color: inherit;"> </h4>'), ye = y('<p class="text-sm leading-relaxed" style="color: inherit;"> </p>'), we = y('<div aria-atomic="true"><!> <div><div class="flex-shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><!> <!> <!></div></div></div>');
|
|
54
|
+
function Ze(o, e) {
|
|
55
|
+
Y(e, !1);
|
|
56
|
+
const a = G(), i = G(), n = G();
|
|
57
|
+
let t = f(e, "variant", 8, "info"), c = f(e, "title", 8, ""), l = f(e, "message", 8, ""), d = f(e, "closable", 8, !1), v = f(e, "className", 8, "");
|
|
58
|
+
const p = K();
|
|
59
|
+
function u(z) {
|
|
60
|
+
p("close", { event: z });
|
|
61
|
+
}
|
|
62
|
+
Z(() => {
|
|
63
|
+
}, () => {
|
|
64
|
+
Q(a, {
|
|
65
|
+
info: "bg-info-surface text-info-text border border-info",
|
|
66
|
+
success: "bg-success-surface text-success-text border border-success",
|
|
67
|
+
warning: "bg-warning-surface text-warning-text border border-warning",
|
|
68
|
+
error: "bg-error-surface text-error-text border border-error"
|
|
69
|
+
});
|
|
70
|
+
}), Z(() => I(t()), () => {
|
|
71
|
+
Q(i, t() === "success" || t() === "info" ? "status" : "alert");
|
|
72
|
+
}), Z(() => {
|
|
73
|
+
}, () => {
|
|
74
|
+
Q(n, {
|
|
75
|
+
info: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
76
|
+
<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 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />
|
|
77
|
+
</svg>`,
|
|
78
|
+
success: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
79
|
+
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
|
|
80
|
+
</svg>`,
|
|
81
|
+
warning: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
82
|
+
<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />
|
|
83
|
+
</svg>`,
|
|
84
|
+
error: `<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
85
|
+
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
|
|
86
|
+
</svg>`
|
|
87
|
+
});
|
|
88
|
+
}), re(), H();
|
|
89
|
+
var s = we(), m = r(s);
|
|
90
|
+
{
|
|
91
|
+
var q = (z) => {
|
|
92
|
+
var B = ge();
|
|
93
|
+
M("click", B, se(u)), b(z, B);
|
|
94
|
+
};
|
|
95
|
+
N(m, (z) => {
|
|
96
|
+
d() && z(q);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
var g = k(m, 2), x = r(g), h = r(x);
|
|
100
|
+
me(h, () => (w(n), I(t()), j(() => w(n)[t()])));
|
|
101
|
+
var C = k(x, 2), _ = r(C);
|
|
102
|
+
{
|
|
103
|
+
var T = (z) => {
|
|
104
|
+
var B = he(), J = r(B);
|
|
105
|
+
S(() => O(J, c())), b(z, B);
|
|
106
|
+
};
|
|
107
|
+
N(_, (z) => {
|
|
108
|
+
c() && z(T);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
var L = k(_, 2);
|
|
112
|
+
{
|
|
113
|
+
var P = (z) => {
|
|
114
|
+
var B = ye(), J = r(B);
|
|
115
|
+
S(() => O(J, l())), b(z, B);
|
|
116
|
+
};
|
|
117
|
+
N(L, (z) => {
|
|
118
|
+
l() && z(P);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var D = k(L, 2);
|
|
122
|
+
E(D, e, "default", {}), S(() => {
|
|
123
|
+
R(s, 1, `relative rounded-md p-4 border ${w(a), I(t()), j(() => w(a)[t()]) ?? ""} transition-all duration-200 motion-reduce:transition-none ${v() ?? ""}`), F(s, "role", w(i)), F(s, "aria-live", t() === "success" || t() === "info" ? "polite" : "assertive"), R(g, 1, `flex items-start gap-3 ${d() ? "pr-8" : ""}`);
|
|
124
|
+
}), b(o, s), U();
|
|
125
|
+
}
|
|
126
|
+
var _e = y('<section><h3 class="text-xl font-semibold text-text"> </h3> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"></div></section>');
|
|
127
|
+
const ke = {
|
|
128
|
+
hash: "svelte-1ko6p3l",
|
|
129
|
+
code: ".cards-grid.svelte-1ko6p3l {padding-top:1.5rem;padding-bottom:1.5rem}"
|
|
130
|
+
};
|
|
131
|
+
function Je(o, e) {
|
|
132
|
+
Y(e, !1), V(o, ke);
|
|
133
|
+
let a = f(e, "title", 8), i = f(e, "cards", 8), n = f(e, "className", 8, "");
|
|
134
|
+
const t = K();
|
|
135
|
+
function c(u) {
|
|
136
|
+
t("cardClick", u.detail);
|
|
137
|
+
}
|
|
138
|
+
H();
|
|
139
|
+
var l = _e(), d = r(l), v = r(d), p = k(d, 2);
|
|
140
|
+
ae(p, 5, i, oe, (u, s) => {
|
|
141
|
+
be(u, {
|
|
142
|
+
get title() {
|
|
143
|
+
return w(s), j(() => w(s).title);
|
|
144
|
+
},
|
|
145
|
+
get description() {
|
|
146
|
+
return w(s), j(() => w(s).description);
|
|
147
|
+
},
|
|
148
|
+
get image() {
|
|
149
|
+
return w(s), j(() => w(s).image);
|
|
150
|
+
},
|
|
151
|
+
variant: "elevated",
|
|
152
|
+
interactive: !0,
|
|
153
|
+
$$events: { click: c }
|
|
154
|
+
});
|
|
155
|
+
}), S(() => {
|
|
156
|
+
R(l, 1, `cards-grid space-y-6 ${n() ?? ""}`, "svelte-1ko6p3l"), O(v, a());
|
|
157
|
+
}), b(o, l), U();
|
|
158
|
+
}
|
|
159
|
+
var qe = y('<section class="color-demo p-6 space-y-6 svelte-1rwa5aa"><h2 class="text-2xl font-bold text-text mb-6">Semantic Color System Demo</h2> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Primary Colors</h3> <div class="flex gap-2 flex-wrap"><div class="bg-primary text-text-inverse px-3 py-2 rounded">Primary</div> <div class="bg-primary-hover text-text-inverse px-3 py-2 rounded">Primary Hover</div> <div class="bg-primary-light text-primary px-3 py-2 rounded">Primary Light</div> <div class="bg-primary-dark text-text-inverse px-3 py-2 rounded">Primary Dark</div></div></div> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Success Colors</h3> <div class="flex gap-2 flex-wrap"><div class="bg-success text-text-inverse px-3 py-2 rounded">Success</div> <div class="bg-success-surface text-success-text px-3 py-2 rounded">Success Surface</div></div></div> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Error Colors</h3> <div class="flex gap-2 flex-wrap"><div class="bg-error text-text-inverse px-3 py-2 rounded">Error</div> <div class="bg-error-surface text-error-text px-3 py-2 rounded">Error Surface</div></div></div> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Surface Colors</h3> <div class="flex gap-2 flex-wrap"><div class="bg-surface border border-border px-3 py-2 rounded">Surface</div> <div class="bg-surface-secondary border border-border px-3 py-2 rounded">Surface Secondary</div> <div class="bg-surface-elevated border border-border px-3 py-2 rounded">Surface Elevated</div></div></div> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Text Colors</h3> <div class="space-y-1"><p class="text-text">Primary Text</p> <p class="text-text-secondary">Secondary Text</p> <p class="text-text-tertiary">Tertiary Text</p> <p class="text-text-disabled">Disabled Text</p></div></div> <div class="space-y-2"><h3 class="text-lg font-semibold text-text">Border Colors</h3> <div class="space-y-1"><div class="border border-border px-3 py-2 rounded">Border</div> <div class="border border-border-secondary px-3 py-2 rounded">Border Secondary</div> <div class="border border-border-focus px-3 py-2 rounded">Border Focus</div></div></div></section>');
|
|
160
|
+
const ze = {
|
|
161
|
+
hash: "svelte-1rwa5aa",
|
|
162
|
+
code: ".color-demo.svelte-1rwa5aa {background-color:rgb(var(--color-background))}"
|
|
163
|
+
};
|
|
164
|
+
function $e(o) {
|
|
165
|
+
V(o, ze);
|
|
166
|
+
var e = qe();
|
|
167
|
+
b(o, e);
|
|
168
|
+
}
|
|
169
|
+
var Ce = y('<div class="dropdown-content group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible svelte-1o1q13x"><!></div>'), Se = y('<div class="dropdown-container group relative inline-block svelte-1o1q13x"><!> <!></div>');
|
|
170
|
+
const Te = {
|
|
171
|
+
hash: "svelte-1o1q13x",
|
|
172
|
+
code: `.dropdown-container.svelte-1o1q13x {position:relative;display:inline-block;}.dropdown-content.svelte-1o1q13x {position:absolute;z-index:50;background-color:white;border:1px solid #e5e7eb;border-radius:0.5rem;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
173
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);min-width:12rem;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out,
|
|
174
|
+
visibility 0.2s ease-in-out,
|
|
175
|
+
transform 0.2s ease-in-out;}
|
|
176
|
+
|
|
177
|
+
/* Positioning based on data-placement */.dropdown-container[data-placement="bottom-start"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x) {top:calc(100% + 8px);left:0;transform:translateY(4px);}.dropdown-container[data-placement="bottom-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x) {top:calc(100% + 8px);right:0;transform:translateY(4px);}.dropdown-container[data-placement="top-start"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x) {bottom:calc(100% + 8px);left:0;transform:translateY(-4px);}.dropdown-container[data-placement="top-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x) {bottom:calc(100% + 8px);right:0;transform:translateY(-4px);}
|
|
178
|
+
|
|
179
|
+
/* Show on hover/focus */.dropdown-container.svelte-1o1q13x:hover .dropdown-content:where(.svelte-1o1q13x),
|
|
180
|
+
.dropdown-container.svelte-1o1q13x:focus-within .dropdown-content:where(.svelte-1o1q13x) {opacity:1;visibility:visible;transform:translateY(0);}
|
|
181
|
+
|
|
182
|
+
/* Arrow styling */.dropdown-content.svelte-1o1q13x::before {content:"";position:absolute;width:0;height:0;border-style:solid;border-width:6px;border-color:transparent;}.dropdown-container[data-placement="bottom-start"].svelte-1o1q13x
|
|
183
|
+
.dropdown-content:where(.svelte-1o1q13x)::before,
|
|
184
|
+
.dropdown-container[data-placement="bottom-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before {top:-6px;border-bottom-color:white;}.dropdown-container[data-placement="top-start"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before,
|
|
185
|
+
.dropdown-container[data-placement="top-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before {bottom:-6px;border-top-color:white;}.dropdown-container[data-placement="bottom-start"].svelte-1o1q13x
|
|
186
|
+
.dropdown-content:where(.svelte-1o1q13x)::before {left:1rem;}.dropdown-container[data-placement="bottom-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before {right:1rem;}.dropdown-container[data-placement="top-start"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before {left:1rem;}.dropdown-container[data-placement="top-end"].svelte-1o1q13x .dropdown-content:where(.svelte-1o1q13x)::before {right:1rem;}`
|
|
187
|
+
};
|
|
188
|
+
function et(o, e) {
|
|
189
|
+
V(o, Te);
|
|
190
|
+
let a = f(e, "isOpen", 8, !1), i = f(e, "placement", 8, "bottom-start");
|
|
191
|
+
var n = Se(), t = r(n);
|
|
192
|
+
E(t, e, "trigger", {});
|
|
193
|
+
var c = k(t, 2);
|
|
194
|
+
{
|
|
195
|
+
var l = (d) => {
|
|
196
|
+
var v = Ce(), p = r(v);
|
|
197
|
+
E(p, e, "default", {}), b(d, v);
|
|
198
|
+
};
|
|
199
|
+
N(c, (d) => {
|
|
200
|
+
a() && d(l);
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
S(() => F(n, "data-placement", i())), b(o, n);
|
|
204
|
+
}
|
|
205
|
+
var Le = y("<form><!></form>");
|
|
206
|
+
function tt(o, e) {
|
|
207
|
+
Y(e, !1);
|
|
208
|
+
let a = f(e, "method", 8, "post"), i = f(e, "action", 8, ""), n = f(e, "className", 8, "");
|
|
209
|
+
const t = K();
|
|
210
|
+
function c(v) {
|
|
211
|
+
const p = new FormData(v.target), u = Object.fromEntries(p.entries());
|
|
212
|
+
t("submit", { data: u, formData: p, event: v });
|
|
213
|
+
}
|
|
214
|
+
H();
|
|
215
|
+
var l = Le(), d = r(l);
|
|
216
|
+
E(d, e, "default", {}), S(() => {
|
|
217
|
+
F(l, "method", a()), F(l, "action", i()), R(l, 1, `space-y-4 ${n() ?? ""}`);
|
|
218
|
+
}), M("submit", l, se(c)), b(o, l), U();
|
|
219
|
+
}
|
|
220
|
+
var Be = y('<section><h2 class="text-3xl font-bold text-text"> </h2> <p class="text-lg text-text-secondary max-w-2xl mx-auto"> </p></section>');
|
|
221
|
+
const Ee = {
|
|
222
|
+
hash: "svelte-1k5lr7e",
|
|
223
|
+
code: ".hero.svelte-1k5lr7e {padding-top:2rem;padding-bottom:2rem}"
|
|
224
|
+
};
|
|
225
|
+
function rt(o, e) {
|
|
226
|
+
V(o, Ee);
|
|
227
|
+
let a = f(e, "title", 8), i = f(e, "subtitle", 8), n = f(e, "className", 8, "");
|
|
228
|
+
var t = Be(), c = r(t), l = r(c), d = k(c, 2), v = r(d);
|
|
229
|
+
S(() => {
|
|
230
|
+
R(t, 1, `hero text-center space-y-4 ${n() ?? ""}`, "svelte-1k5lr7e"), O(l, a()), O(v, i());
|
|
231
|
+
}), b(o, t);
|
|
232
|
+
}
|
|
233
|
+
var Ne = y('<div class="relative group"><img alt="" class="w-full h-32 object-cover rounded-lg border border-gray-300"/> <div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg flex items-center justify-center"><div class="flex gap-2"><!> <!></div></div></div>'), Me = y('<div class="border-2 border-dashed border-gray-300 rounded-lg p-6 text-center hover:border-gray-400 transition-colors cursor-pointer" role="button" tabindex="0"><div class="space-y-3"><div class="w-12 h-12 mx-auto bg-gray-100 rounded-lg flex items-center justify-center"><span class="text-2xl">📷</span></div> <div><p class="font-medium text-gray-900"> </p> <p class="text-sm text-gray-500">Click to choose a file</p></div></div></div>'), je = y('<div class="space-y-3"><!> <input type="file" class="hidden"/></div>');
|
|
234
|
+
function at(o, e) {
|
|
235
|
+
Y(e, !1);
|
|
236
|
+
let a = f(e, "value", 12, null), i = f(e, "disabled", 8, !1), n = f(e, "accept", 8, "image/*"), t = f(e, "placeholder", 8, "No image selected");
|
|
237
|
+
const c = K();
|
|
238
|
+
let l = G();
|
|
239
|
+
function d(x) {
|
|
240
|
+
const h = x.target;
|
|
241
|
+
if (!h.files || h.files.length === 0) return;
|
|
242
|
+
const C = h.files[0], _ = URL.createObjectURL(C);
|
|
243
|
+
a(_), c("change", { value: _ });
|
|
244
|
+
}
|
|
245
|
+
function v() {
|
|
246
|
+
a() && URL.revokeObjectURL(a()), a(null), c("change", { value: null });
|
|
247
|
+
}
|
|
248
|
+
function p() {
|
|
249
|
+
var x;
|
|
250
|
+
(x = w(l)) == null || x.click();
|
|
251
|
+
}
|
|
252
|
+
H();
|
|
253
|
+
var u = je(), s = r(u);
|
|
254
|
+
{
|
|
255
|
+
var m = (x) => {
|
|
256
|
+
var h = Ne(), C = r(h), _ = k(C, 2), T = r(_), L = r(T);
|
|
257
|
+
ee(L, {
|
|
258
|
+
variant: "secondary",
|
|
259
|
+
size: "sm",
|
|
260
|
+
get disabled() {
|
|
261
|
+
return i();
|
|
262
|
+
},
|
|
263
|
+
$$events: { click: p },
|
|
264
|
+
children: (D, z) => {
|
|
265
|
+
var B = $("Change");
|
|
266
|
+
b(D, B);
|
|
267
|
+
},
|
|
268
|
+
$$slots: { default: !0 }
|
|
269
|
+
});
|
|
270
|
+
var P = k(L, 2);
|
|
271
|
+
ee(P, {
|
|
272
|
+
variant: "danger",
|
|
273
|
+
size: "sm",
|
|
274
|
+
get disabled() {
|
|
275
|
+
return i();
|
|
276
|
+
},
|
|
277
|
+
$$events: { click: v },
|
|
278
|
+
children: (D, z) => {
|
|
279
|
+
var B = $("Remove");
|
|
280
|
+
b(D, B);
|
|
281
|
+
},
|
|
282
|
+
$$slots: { default: !0 }
|
|
283
|
+
}), S(() => F(C, "src", a())), b(x, h);
|
|
284
|
+
}, q = (x) => {
|
|
285
|
+
var h = Me(), C = r(h), _ = k(r(C), 2), T = r(_), L = r(T);
|
|
286
|
+
S(() => O(L, t())), M("click", h, p), M("keydown", h, (P) => P.key === "Enter" && p()), b(x, h);
|
|
287
|
+
};
|
|
288
|
+
N(s, (x) => {
|
|
289
|
+
a() ? x(m) : x(q, !1);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
var g = k(s, 2);
|
|
293
|
+
pe(g, (x) => Q(l, x), () => w(l)), S(() => F(g, "accept", n())), M("change", g, d), b(o, u), U();
|
|
294
|
+
}
|
|
295
|
+
var De = y('<header class="layout-header svelte-wzmt5k"><!></header> <main class="layout-main svelte-wzmt5k"><!></main> <footer class="layout-footer svelte-wzmt5k"><!></footer>', 1), Oe = y('<aside class="layout-sidebar svelte-wzmt5k"><!></aside> <main class="layout-main svelte-wzmt5k"><!></main>', 1), Pe = y('<div class="layout-grid svelte-wzmt5k"><!></div>'), Ue = y("<div><!></div>");
|
|
296
|
+
const Ye = {
|
|
297
|
+
hash: "svelte-wzmt5k",
|
|
298
|
+
code: `.layout.svelte-wzmt5k {min-height:100vh}.layout-main.svelte-wzmt5k {display:flex;flex-direction:column}.layout-sidebar.svelte-wzmt5k {width:16rem;border-right-width:1px;border-color:rgb(var(--color-border));background-color:rgb(var(--color-surface-secondary))}.layout-grid.svelte-wzmt5k {display:grid;grid-template-columns:repeat(1, minmax(0, 1fr))}
|
|
299
|
+
|
|
300
|
+
@media (min-width: 768px) {.layout-grid.svelte-wzmt5k {grid-template-columns:repeat(2, minmax(0, 1fr))}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@media (min-width: 1024px) {.layout-grid.svelte-wzmt5k {grid-template-columns:repeat(3, minmax(0, 1fr))}
|
|
304
|
+
}.layout-header.svelte-wzmt5k {border-bottom-width:1px;border-color:rgb(var(--color-border));background-color:rgb(var(--color-surface));padding:1rem}.layout-footer.svelte-wzmt5k {margin-top:auto;border-top-width:1px;border-color:rgb(var(--color-border));background-color:rgb(var(--color-surface-secondary));padding:1rem}`
|
|
305
|
+
};
|
|
306
|
+
function ot(o, e) {
|
|
307
|
+
Y(e, !1), V(o, Ye);
|
|
308
|
+
const a = G();
|
|
309
|
+
let i = f(e, "variant", 8, "main"), n = f(e, "gap", 8, "md"), t = f(e, "className", 8, "");
|
|
310
|
+
Z(() => I(n()), () => {
|
|
311
|
+
Q(a, `gap-${n()}`);
|
|
312
|
+
}), re();
|
|
313
|
+
var c = Ue(), l = r(c);
|
|
314
|
+
{
|
|
315
|
+
var d = (p) => {
|
|
316
|
+
var u = De(), s = A(u), m = r(s);
|
|
317
|
+
E(m, e, "header", {});
|
|
318
|
+
var q = k(s, 2), g = r(q);
|
|
319
|
+
E(g, e, "main", {});
|
|
320
|
+
var x = k(q, 2), h = r(x);
|
|
321
|
+
E(h, e, "footer", {}), b(p, u);
|
|
322
|
+
}, v = (p) => {
|
|
323
|
+
var u = W(), s = A(u);
|
|
324
|
+
{
|
|
325
|
+
var m = (g) => {
|
|
326
|
+
var x = Oe(), h = A(x), C = r(h);
|
|
327
|
+
E(C, e, "sidebar", {});
|
|
328
|
+
var _ = k(h, 2), T = r(_);
|
|
329
|
+
E(T, e, "main", {}), b(g, x);
|
|
330
|
+
}, q = (g) => {
|
|
331
|
+
var x = W(), h = A(x);
|
|
332
|
+
{
|
|
333
|
+
var C = (_) => {
|
|
334
|
+
var T = Pe(), L = r(T);
|
|
335
|
+
E(L, e, "default", {}), b(_, T);
|
|
336
|
+
};
|
|
337
|
+
N(
|
|
338
|
+
h,
|
|
339
|
+
(_) => {
|
|
340
|
+
i() === "grid" && _(C);
|
|
341
|
+
},
|
|
342
|
+
!0
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
b(g, x);
|
|
346
|
+
};
|
|
347
|
+
N(
|
|
348
|
+
s,
|
|
349
|
+
(g) => {
|
|
350
|
+
i() === "sidebar" ? g(m) : g(q, !1);
|
|
351
|
+
},
|
|
352
|
+
!0
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
b(p, u);
|
|
356
|
+
};
|
|
357
|
+
N(l, (p) => {
|
|
358
|
+
i() === "main" ? p(d) : p(v, !1);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
S(() => R(c, 1, `layout layout-${i() ?? ""} ${w(a) ?? ""} ${t() ?? ""}`, "svelte-wzmt5k")), b(o, c), U();
|
|
362
|
+
}
|
|
363
|
+
var Ae = y('<div class="flex justify-end gap-3 p-6 border-t border-gray-200"><!></div>'), Ie = y('<div class="fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50" role="dialog" aria-modal="true" tabindex="-1"><div class="bg-white rounded-lg shadow-xl max-w-md w-full max-h-[90vh] overflow-y-auto"><div class="flex items-center justify-between p-6 border-b border-gray-200"><h2 class="text-xl font-semibold text-gray-900"> </h2> <button type="button" class="text-gray-400 hover:text-gray-600 text-2xl" aria-label="Close">×</button></div> <div class="p-6"><!></div> <!></div></div>');
|
|
364
|
+
function st(o, e) {
|
|
365
|
+
const a = xe(e);
|
|
366
|
+
Y(e, !1);
|
|
367
|
+
let i = f(e, "isOpen", 12, !1), n = f(e, "title", 8, "");
|
|
368
|
+
const t = K();
|
|
369
|
+
function c() {
|
|
370
|
+
i(!1), t("close");
|
|
371
|
+
}
|
|
372
|
+
function l(s) {
|
|
373
|
+
s.target === s.currentTarget && c();
|
|
374
|
+
}
|
|
375
|
+
function d(s) {
|
|
376
|
+
s.key === "Escape" && c();
|
|
377
|
+
}
|
|
378
|
+
H();
|
|
379
|
+
var v = W(), p = A(v);
|
|
380
|
+
{
|
|
381
|
+
var u = (s) => {
|
|
382
|
+
var m = Ie(), q = r(m), g = r(q), x = r(g), h = r(x), C = k(x, 2), _ = k(g, 2), T = r(_);
|
|
383
|
+
E(T, e, "default", {});
|
|
384
|
+
var L = k(_, 2);
|
|
385
|
+
{
|
|
386
|
+
var P = (D) => {
|
|
387
|
+
var z = Ae(), B = r(z);
|
|
388
|
+
E(B, e, "footer", {}), b(D, z);
|
|
389
|
+
};
|
|
390
|
+
N(L, (D) => {
|
|
391
|
+
j(() => a.footer) && D(P);
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
S(() => O(h, n())), M("click", C, c), M("click", m, l), M("keydown", m, d), b(s, m);
|
|
395
|
+
};
|
|
396
|
+
N(p, (s) => {
|
|
397
|
+
i() && s(u);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
b(o, v), U();
|
|
401
|
+
}
|
|
402
|
+
var Re = y('<section><p class="text-info-text">You clicked: <strong> </strong></p></section>');
|
|
403
|
+
const Fe = {
|
|
404
|
+
hash: "svelte-17n10vn",
|
|
405
|
+
code: ".selected-card-info.svelte-17n10vn {padding-top:1rem;padding-bottom:1rem}"
|
|
406
|
+
};
|
|
407
|
+
function it(o, e) {
|
|
408
|
+
Y(e, !1), V(o, Fe);
|
|
409
|
+
let a = f(e, "selectedCard", 8), i = f(e, "className", 8, "");
|
|
410
|
+
H();
|
|
411
|
+
var n = W(), t = A(n);
|
|
412
|
+
{
|
|
413
|
+
var c = (l) => {
|
|
414
|
+
var d = Re(), v = r(d), p = k(r(v)), u = r(p);
|
|
415
|
+
S(() => {
|
|
416
|
+
R(d, 1, `selected-card-info text-center p-4 bg-info-surface rounded-lg ${i() ?? ""}`, "svelte-17n10vn"), O(u, (I(a()), j(() => a().title)));
|
|
417
|
+
}), b(l, d);
|
|
418
|
+
};
|
|
419
|
+
N(t, (l) => {
|
|
420
|
+
a() && l(c);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
b(o, n), U();
|
|
424
|
+
}
|
|
425
|
+
var He = y('<div class="flex items-center justify-between p-4 border-b border-gray-200"><h3 class="text-lg font-semibold text-gray-900"> </h3> <button type="button" class="text-gray-400 hover:text-gray-600 text-2xl" aria-label="Close">×</button></div>'), Ke = y('<div class="fixed inset-0 bg-black/50 z-50" role="dialog" aria-modal="true" tabindex="-1"></div> <div class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 rounded-t-xl shadow-xl z-50 max-h-[80vh] overflow-y-auto" role="dialog" aria-modal="true"><!> <div class="p-4"><!></div></div>', 1);
|
|
426
|
+
function lt(o, e) {
|
|
427
|
+
Y(e, !1);
|
|
428
|
+
let a = f(e, "isOpen", 12, !1), i = f(e, "title", 8, "");
|
|
429
|
+
const n = K();
|
|
430
|
+
function t() {
|
|
431
|
+
a(!1), n("close");
|
|
432
|
+
}
|
|
433
|
+
function c(u) {
|
|
434
|
+
u.target === u.currentTarget && t();
|
|
435
|
+
}
|
|
436
|
+
function l(u) {
|
|
437
|
+
u.key === "Escape" && t();
|
|
438
|
+
}
|
|
439
|
+
H();
|
|
440
|
+
var d = W(), v = A(d);
|
|
441
|
+
{
|
|
442
|
+
var p = (u) => {
|
|
443
|
+
var s = Ke(), m = A(s), q = k(m, 2), g = r(q);
|
|
444
|
+
{
|
|
445
|
+
var x = (_) => {
|
|
446
|
+
var T = He(), L = r(T), P = r(L), D = k(L, 2);
|
|
447
|
+
S(() => O(P, i())), M("click", D, t), b(_, T);
|
|
448
|
+
};
|
|
449
|
+
N(g, (_) => {
|
|
450
|
+
i() && _(x);
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
var h = k(g, 2), C = r(h);
|
|
454
|
+
E(C, e, "default", {}), M("click", m, c), M("keydown", m, l), b(u, s);
|
|
455
|
+
};
|
|
456
|
+
N(v, (u) => {
|
|
457
|
+
a() && u(p);
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
b(o, d), U();
|
|
461
|
+
}
|
|
462
|
+
var Ve = y('<button type="button" role="tab"> </button>'), Ge = y('<div class="tabs-container"><div class="flex border-b border-gray-200" role="tablist" tabindex="0"></div> <div class="mt-4"><!></div></div>');
|
|
463
|
+
function dt(o, e) {
|
|
464
|
+
Y(e, !1);
|
|
465
|
+
let a = f(e, "tabs", 24, () => []), i = f(e, "activeTab", 12, ""), n = f(e, "variant", 8, "default");
|
|
466
|
+
const t = K();
|
|
467
|
+
function c(s) {
|
|
468
|
+
i(s), t("change", { activeTab: s });
|
|
469
|
+
}
|
|
470
|
+
function l(s) {
|
|
471
|
+
if (s.key === "ArrowLeft" || s.key === "ArrowRight") {
|
|
472
|
+
const m = a().findIndex((x) => x.id === i()), q = s.key === "ArrowLeft" ? -1 : 1, g = (m + q + a().length) % a().length;
|
|
473
|
+
c(a()[g].id);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
H();
|
|
477
|
+
var d = Ge(), v = r(d);
|
|
478
|
+
ae(v, 5, a, oe, (s, m) => {
|
|
479
|
+
var q = Ve(), g = r(q);
|
|
480
|
+
S(() => {
|
|
481
|
+
R(q, 1, `px-4 py-2 text-sm font-medium border-b-2 transition-colors ${I(i()), w(m), I(n()), j(() => i() === w(m).id ? n() === "pills" ? "bg-blue-100 text-blue-700 border-blue-500" : "border-blue-500 text-blue-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300") ?? ""}`), q.disabled = (w(m), j(() => w(m).disabled)), F(q, "aria-selected", (I(i()), w(m), j(() => i() === w(m).id))), O(g, (w(m), j(() => w(m).label)));
|
|
482
|
+
}), M("click", q, () => c(w(m).id)), b(s, q);
|
|
483
|
+
});
|
|
484
|
+
var p = k(v, 2), u = r(p);
|
|
485
|
+
E(
|
|
486
|
+
u,
|
|
487
|
+
e,
|
|
488
|
+
"default",
|
|
489
|
+
{
|
|
490
|
+
get activeTab() {
|
|
491
|
+
return i();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
), M("keydown", v, l), b(o, d), U();
|
|
495
|
+
}
|
|
496
|
+
export {
|
|
497
|
+
Ze as A,
|
|
498
|
+
Je as C,
|
|
499
|
+
et as D,
|
|
500
|
+
tt as F,
|
|
501
|
+
rt as H,
|
|
502
|
+
at as I,
|
|
503
|
+
ot as L,
|
|
504
|
+
st as M,
|
|
505
|
+
it as S,
|
|
506
|
+
dt as T,
|
|
507
|
+
$e as a,
|
|
508
|
+
lt as b
|
|
509
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { s as c, g as s, i as h, f as n, a as p, t as b, e as v, b as r, p as k, c as _, m as T, d as w, h as x } from "./store-ZmZCXeMy.js";
|
|
2
|
+
import { onMount as y } from "svelte";
|
|
3
|
+
var S = n('<span class="text-lg">☀️</span>'), D = n('<span class="text-lg">🌙</span>'), E = n('<button class="w-10 h-10 bg-gray-100 hover:bg-gray-200 border border-gray-300 rounded-lg flex items-center justify-center text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500"><!></button>');
|
|
4
|
+
function M(m, i) {
|
|
5
|
+
_(i, !1);
|
|
6
|
+
let t = T(!1);
|
|
7
|
+
y(() => {
|
|
8
|
+
const e = localStorage.getItem("theme"), a = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
9
|
+
c(t, e === "dark" || !e && a), l();
|
|
10
|
+
});
|
|
11
|
+
function d() {
|
|
12
|
+
c(t, !s(t)), l(), localStorage.setItem("theme", s(t) ? "dark" : "light");
|
|
13
|
+
}
|
|
14
|
+
function l() {
|
|
15
|
+
s(t) ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
16
|
+
}
|
|
17
|
+
h();
|
|
18
|
+
var o = E(), u = w(o);
|
|
19
|
+
{
|
|
20
|
+
var f = (e) => {
|
|
21
|
+
var a = S();
|
|
22
|
+
r(e, a);
|
|
23
|
+
}, g = (e) => {
|
|
24
|
+
var a = D();
|
|
25
|
+
r(e, a);
|
|
26
|
+
};
|
|
27
|
+
p(u, (e) => {
|
|
28
|
+
s(t) ? e(f) : e(g, !1);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
b(() => x(o, "aria-label", s(t) ? "Switch to light mode" : "Switch to dark mode")), v("click", o, d), r(m, o), k();
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
M as T
|
|
35
|
+
};
|