@meddhiaka/glixor 0.0.0-stage → 0.1.0

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.
Files changed (43) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +139 -2
  3. package/dist-lib/components/Badge/Badge.d.ts +26 -0
  4. package/dist-lib/components/Badge/index.d.ts +2 -0
  5. package/dist-lib/components/Button/Button.d.ts +22 -0
  6. package/dist-lib/components/Button/index.d.ts +2 -0
  7. package/dist-lib/components/Card/Card.d.ts +45 -0
  8. package/dist-lib/components/Card/index.d.ts +2 -0
  9. package/dist-lib/components/CyberFx.d.ts +10 -0
  10. package/dist-lib/components/Input/Input.d.ts +24 -0
  11. package/dist-lib/components/Input/index.d.ts +2 -0
  12. package/dist-lib/components/Modal/Modal.d.ts +20 -0
  13. package/dist-lib/components/Modal/index.d.ts +2 -0
  14. package/dist-lib/components/Navbar/Navbar.d.ts +36 -0
  15. package/dist-lib/components/Navbar/index.d.ts +2 -0
  16. package/dist-lib/components/Pagination/Pagination.d.ts +33 -0
  17. package/dist-lib/components/Pagination/index.d.ts +2 -0
  18. package/dist-lib/components/Progress/Progress.d.ts +21 -0
  19. package/dist-lib/components/Progress/index.d.ts +2 -0
  20. package/dist-lib/components/Radio/Radio.d.ts +11 -0
  21. package/dist-lib/components/Radio/RadioGroup.d.ts +30 -0
  22. package/dist-lib/components/Radio/context.d.ts +18 -0
  23. package/dist-lib/components/Radio/index.d.ts +5 -0
  24. package/dist-lib/components/Sidebar/Sidebar.d.ts +46 -0
  25. package/dist-lib/components/Sidebar/index.d.ts +2 -0
  26. package/dist-lib/components/Skeleton/Skeleton.d.ts +9 -0
  27. package/dist-lib/components/Skeleton/index.d.ts +2 -0
  28. package/dist-lib/components/Slider/Slider.d.ts +18 -0
  29. package/dist-lib/components/Slider/index.d.ts +2 -0
  30. package/dist-lib/components/Spinner.d.ts +4 -0
  31. package/dist-lib/components/Table/Table.d.ts +43 -0
  32. package/dist-lib/components/Table/TableCheckbox.d.ts +7 -0
  33. package/dist-lib/components/Table/index.d.ts +4 -0
  34. package/dist-lib/components/Tooltip/Tooltip.d.ts +21 -0
  35. package/dist-lib/components/Tooltip/index.d.ts +2 -0
  36. package/dist-lib/index.cjs +2 -0
  37. package/dist-lib/index.cjs.map +1 -0
  38. package/dist-lib/index.d.ts +18 -0
  39. package/dist-lib/index.js +1712 -0
  40. package/dist-lib/index.js.map +1 -0
  41. package/dist-lib/styles.css +952 -0
  42. package/package.json +89 -4
  43. package/tailwind-preset.cjs +66 -0
@@ -0,0 +1,1712 @@
1
+ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { Children as r, Fragment as i, cloneElement as a, createContext as o, forwardRef as s, isValidElement as c, useContext as l, useEffect as u, useId as d, useMemo as f, useRef as p, useState as m } from "react";
3
+ import { createPortal as h } from "react-dom";
4
+ //#region src/components/CyberFx.tsx
5
+ function g({ disabled: e = !1, tone: r = "default", active: i = !1, className: a = "", children: o }) {
6
+ return /* @__PURE__ */ n("span", {
7
+ className: `cyber-fx group ${a}`,
8
+ "data-disabled": e,
9
+ "data-tone": r,
10
+ "data-active": i,
11
+ children: [
12
+ /* @__PURE__ */ t("span", {
13
+ className: "cyber-bar-top",
14
+ "aria-hidden": "true"
15
+ }),
16
+ /* @__PURE__ */ t("span", {
17
+ className: "cyber-bar-bottom",
18
+ "aria-hidden": "true"
19
+ }),
20
+ /* @__PURE__ */ t("span", {
21
+ className: "cyber-pip-left",
22
+ "aria-hidden": "true"
23
+ }),
24
+ /* @__PURE__ */ t("span", {
25
+ className: "cyber-pip-right",
26
+ "aria-hidden": "true"
27
+ }),
28
+ /* @__PURE__ */ t("span", {
29
+ className: "chromatic-cyan",
30
+ "aria-hidden": "true"
31
+ }),
32
+ /* @__PURE__ */ t("span", {
33
+ className: "chromatic-magenta",
34
+ "aria-hidden": "true"
35
+ }),
36
+ o
37
+ ]
38
+ });
39
+ }
40
+ //#endregion
41
+ //#region src/components/Badge/Badge.tsx
42
+ var _ = {
43
+ xs: "px-1.5 py-0.5 text-[9px] gap-1",
44
+ sm: "px-3 py-1 text-xs gap-1.5",
45
+ md: "px-3.5 py-1.5 text-xs gap-2"
46
+ }, v = {
47
+ none: "",
48
+ chamfer: "clip-chamfer",
49
+ "chamfer-tl-br": "clip-chamfer-tl-br",
50
+ tag: "clip-tag pr-2.5"
51
+ }, y = {
52
+ pill: "border border-slate-300 bg-white shadow-sm text-slate-800 dark:border-slate-700 dark:bg-brand-darkSurface dark:text-slate-100",
53
+ outline: "border-2 bg-transparent",
54
+ solid: "",
55
+ micro: "border bg-transparent"
56
+ }, b = {
57
+ default: "bg-slate-400 dark:bg-slate-500",
58
+ primary: "bg-brand-primary",
59
+ secondary: "bg-brand-secondary",
60
+ alert: "bg-brand-alert",
61
+ warning: "bg-brand-warning",
62
+ success: "bg-brand-success"
63
+ }, x = {
64
+ default: "border-slate-900 text-slate-900 dark:border-white dark:text-white",
65
+ primary: "border-brand-primary text-brand-primary",
66
+ secondary: "border-brand-secondary text-brand-secondary",
67
+ alert: "border-brand-alert text-brand-alert",
68
+ warning: "border-brand-warning text-brand-warning",
69
+ success: "border-brand-success text-brand-success"
70
+ }, S = {
71
+ default: "bg-slate-900 text-white dark:bg-white dark:text-slate-950",
72
+ primary: "bg-brand-primary text-slate-950",
73
+ secondary: "bg-brand-secondary text-white",
74
+ alert: "bg-brand-alert text-white",
75
+ warning: "bg-brand-warning text-slate-950",
76
+ success: "bg-brand-success text-slate-950"
77
+ }, C = {
78
+ default: "text-slate-700 dark:text-slate-300",
79
+ primary: "text-brand-primary",
80
+ secondary: "text-brand-secondary",
81
+ alert: "text-brand-alert",
82
+ warning: "text-brand-warning",
83
+ success: "text-brand-success"
84
+ };
85
+ function w({ variant: e = "default", look: r = "pill", size: i = "sm", chamfer: a = "none", glitch: o = !1, dot: s = !1, pulse: c = !1, bracket: l = !1, rounded: u = !1, className: d = "", children: f, ...p }) {
86
+ let m = "inline-flex items-center font-mono font-bold uppercase tracking-wider whitespace-nowrap";
87
+ if (l) return /* @__PURE__ */ n("span", {
88
+ className: [
89
+ m,
90
+ "text-[10px]",
91
+ C[e],
92
+ d
93
+ ].filter(Boolean).join(" "),
94
+ ...p,
95
+ children: [
96
+ "[",
97
+ f,
98
+ "]"
99
+ ]
100
+ });
101
+ let h = u ? "rounded-full" : r === "pill" ? "rounded-lg" : "rounded-none", w = r === "pill" ? "" : r === "solid" ? S[e] : x[e], T = [
102
+ m,
103
+ _[i],
104
+ h,
105
+ v[a],
106
+ y[r],
107
+ w,
108
+ r === "pill" ? "text-glitch-static" : "",
109
+ o ? "relative z-10" : "",
110
+ d
111
+ ].filter(Boolean).join(" "), E = s ? /* @__PURE__ */ t("span", {
112
+ className: [
113
+ "h-1.5 w-1.5",
114
+ r === "pill" ? "rounded-full" : "",
115
+ b[e],
116
+ c ? "animate-pulse" : ""
117
+ ].filter(Boolean).join(" "),
118
+ "aria-hidden": "true"
119
+ }) : null, D = /* @__PURE__ */ n("span", {
120
+ className: T,
121
+ ...p,
122
+ children: [E, f]
123
+ });
124
+ return o ? /* @__PURE__ */ t(g, { children: D }) : D;
125
+ }
126
+ //#endregion
127
+ //#region src/components/Spinner.tsx
128
+ function T({ className: e = "" }) {
129
+ return /* @__PURE__ */ n("svg", {
130
+ className: `h-3.5 w-3.5 animate-spin ${e}`,
131
+ viewBox: "0 0 24 24",
132
+ fill: "none",
133
+ "aria-hidden": "true",
134
+ children: [/* @__PURE__ */ t("circle", {
135
+ className: "opacity-25",
136
+ cx: "12",
137
+ cy: "12",
138
+ r: "10",
139
+ stroke: "currentColor",
140
+ strokeWidth: "4"
141
+ }), /* @__PURE__ */ t("path", {
142
+ className: "opacity-75",
143
+ fill: "currentColor",
144
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
145
+ })]
146
+ });
147
+ }
148
+ //#endregion
149
+ //#region src/components/Button/Button.tsx
150
+ var E = {
151
+ primary: "bg-brand-primary text-slate-950 border-2 border-slate-900 dark:border-white hover:brightness-105",
152
+ secondary: "bg-brand-secondary text-white border-2 border-transparent hover:opacity-90",
153
+ outline: "bg-transparent border-2 border-brand-primary text-slate-900 dark:text-brand-primary hover:bg-brand-primary hover:text-slate-950",
154
+ ghost: "bg-transparent border border-slate-900 dark:border-white text-slate-900 dark:text-white hover:border-brand-primary hover:text-brand-primary",
155
+ alert: "bg-brand-alert text-white border-2 border-transparent hover:opacity-90"
156
+ }, D = {
157
+ xs: "px-3.5 py-1.5 text-xs gap-1.5",
158
+ sm: "px-4 py-2 text-xs gap-1.5",
159
+ md: "px-6 py-3 text-xs gap-2",
160
+ lg: "px-8 py-4 text-sm gap-2.5"
161
+ }, O = {
162
+ xs: "w-8 h-8",
163
+ sm: "w-9 h-9",
164
+ md: "w-10 h-10",
165
+ lg: "w-12 h-12"
166
+ }, ee = {
167
+ none: "",
168
+ chamfer: "clip-chamfer",
169
+ "chamfer-tl-br": "clip-chamfer-tl-br",
170
+ tag: "clip-tag pr-3"
171
+ }, te = s(function({ variant: e = "primary", size: r = "md", chamfer: i = "none", glitch: a = !0, loading: o = !1, fullWidth: s = !1, iconOnly: c = !1, leftIcon: l, rightIcon: u, disabled: d = !1, type: f = "button", className: p = "", children: m, ...h }, _) {
172
+ let v = d || o, y = [
173
+ "relative z-10 inline-flex items-center justify-center",
174
+ "font-mono font-bold uppercase tracking-wider whitespace-nowrap",
175
+ "transition-all duration-150",
176
+ v ? "cursor-not-allowed pointer-events-none select-none" : "active:translate-y-0.5",
177
+ d && !o ? "bg-striped border-2 border-slate-300 text-slate-400 dark:border-slate-800 dark:text-slate-600" : E[e],
178
+ ee[i],
179
+ c ? O[r] : D[r],
180
+ s ? "w-full" : "",
181
+ p
182
+ ].filter(Boolean).join(" "), b = /* @__PURE__ */ n("button", {
183
+ ref: _,
184
+ type: f,
185
+ disabled: v,
186
+ "aria-busy": o || void 0,
187
+ className: y,
188
+ ...h,
189
+ children: [
190
+ o ? /* @__PURE__ */ t(T, {}) : l,
191
+ m,
192
+ !o && u
193
+ ]
194
+ });
195
+ return a ? /* @__PURE__ */ t(g, {
196
+ disabled: v,
197
+ className: s ? `flex w-full ${p}` : void 0,
198
+ children: b
199
+ }) : b;
200
+ }), k = {
201
+ transparent: "border-2 border-dashed border-slate-300 bg-transparent hover:border-solid hover:border-brand-primary dark:border-slate-700",
202
+ default: "border-2 border-slate-900 bg-brand-lightSurface dark:border-white dark:bg-brand-darkSurface",
203
+ secondary: "border-2 border-transparent bg-brand-lightSurfaceSub hover:border-brand-primary dark:bg-brand-darkSurfaceSub",
204
+ tertiary: "border-2 border-transparent bg-brand-lightSurfaceTert hover:border-brand-secondary dark:bg-brand-darkSurfaceTert"
205
+ }, A = {
206
+ sm: "p-5 space-y-3",
207
+ md: "p-6 space-y-4",
208
+ lg: "p-8 space-y-6"
209
+ }, j = {
210
+ lg: "rounded-lg",
211
+ xl: "rounded-xl",
212
+ "2xl": "rounded-2xl"
213
+ };
214
+ function M({ surface: e = "default", padding: n = "md", rounded: r = "2xl", glitch: i = !0, className: a = "", children: o, ...s }) {
215
+ let c = [
216
+ "relative z-10 w-full transition-colors",
217
+ A[n],
218
+ j[r],
219
+ k[e],
220
+ a
221
+ ].filter(Boolean).join(" "), l = /* @__PURE__ */ t("div", {
222
+ className: c,
223
+ ...s,
224
+ children: o
225
+ });
226
+ return i ? /* @__PURE__ */ t(g, {
227
+ className: `flex w-full ${a}`,
228
+ children: l
229
+ }) : l;
230
+ }
231
+ var N = {
232
+ sm: "h-12 w-12 text-xl",
233
+ md: "h-16 w-16 text-2xl",
234
+ lg: "h-20 w-20 text-3xl"
235
+ }, P = {
236
+ square: "rounded-none",
237
+ rounded: "rounded-2xl",
238
+ circle: "rounded-full"
239
+ };
240
+ function F({ size: e = "md", shape: n = "rounded", className: r = "", children: i, ...a }) {
241
+ return /* @__PURE__ */ t("div", {
242
+ className: [
243
+ "flex items-center justify-center border border-slate-200 bg-slate-100 shadow-inner dark:border-slate-700 dark:bg-slate-800",
244
+ N[e],
245
+ P[n],
246
+ r
247
+ ].filter(Boolean).join(" "),
248
+ ...a,
249
+ children: i
250
+ });
251
+ }
252
+ var I = {
253
+ sm: "text-sm",
254
+ base: "text-base",
255
+ lg: "text-xl"
256
+ };
257
+ function L({ as: e = "h3", size: n = "base", className: r = "", children: i, ...a }) {
258
+ return /* @__PURE__ */ t(e, {
259
+ className: [
260
+ "font-bold text-slate-900 dark:text-white",
261
+ I[n],
262
+ r
263
+ ].filter(Boolean).join(" "),
264
+ ...a,
265
+ children: i
266
+ });
267
+ }
268
+ function R({ className: e = "", children: n, ...r }) {
269
+ return /* @__PURE__ */ t("p", {
270
+ className: ["text-xs text-slate-500 dark:text-slate-400", e].filter(Boolean).join(" "),
271
+ ...r,
272
+ children: n
273
+ });
274
+ }
275
+ function z({ className: e = "", children: n, ...r }) {
276
+ return /* @__PURE__ */ t("div", {
277
+ className: ["flex items-center gap-2 pt-1", e].filter(Boolean).join(" "),
278
+ ...r,
279
+ children: n
280
+ });
281
+ }
282
+ //#endregion
283
+ //#region src/components/Input/Input.tsx
284
+ var B = {
285
+ xs: "px-2.5 py-1 text-xs",
286
+ sm: "px-3 py-1.5 text-xs",
287
+ md: "px-4 py-2.5 text-sm",
288
+ lg: "px-4 py-3.5 text-base"
289
+ }, V = {
290
+ default: "border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput",
291
+ subtle: "border-2 border-transparent bg-slate-100 dark:bg-slate-800/80",
292
+ outline: "border-2 border-slate-900 bg-transparent dark:border-white",
293
+ flushed: "border-b-2 border-slate-900 bg-transparent dark:border-white"
294
+ }, ne = s(function({ label: e, look: r = "default", size: i = "md", error: a, hint: o, required: s = !1, glitch: c = !0, leftIcon: l, rightAdornment: u, bare: d = !1, className: f = "", containerClassName: p = "", id: m, ...h }, _) {
295
+ let v = [
296
+ "w-full bg-transparent font-bold tracking-wider text-slate-900 placeholder-slate-400 focus:outline-none dark:text-white dark:placeholder-slate-500",
297
+ B[i],
298
+ f
299
+ ].filter(Boolean).join(" ");
300
+ if (d) return /* @__PURE__ */ t("input", {
301
+ ref: _,
302
+ id: m,
303
+ className: v,
304
+ ...h
305
+ });
306
+ let y = ["group relative z-10 flex w-full items-center transition-colors", a ? "border-2 border-brand-alert bg-red-500/10 shadow-[0_0_10px_theme(colors.brand.alert/0.2)]" : `${V[r]} focus-within:border-brand-primary`].filter(Boolean).join(" "), b = /* @__PURE__ */ n("div", {
307
+ className: y,
308
+ children: [
309
+ l && /* @__PURE__ */ t("div", {
310
+ className: "flex items-center pl-3.5 pr-2 text-slate-900 transition-transform duration-300 group-focus-within:rotate-90 dark:text-brand-primary",
311
+ children: l
312
+ }),
313
+ /* @__PURE__ */ t("input", {
314
+ ref: _,
315
+ id: m,
316
+ className: v,
317
+ ...h
318
+ }),
319
+ u && /* @__PURE__ */ t("div", {
320
+ className: "flex items-center pr-3",
321
+ children: u
322
+ })
323
+ ]
324
+ });
325
+ return /* @__PURE__ */ n("div", {
326
+ className: p,
327
+ children: [
328
+ e && /* @__PURE__ */ n("label", {
329
+ htmlFor: m,
330
+ className: "mb-1.5 flex items-center justify-between text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white",
331
+ children: [/* @__PURE__ */ t("span", { children: e }), s && /* @__PURE__ */ t("span", {
332
+ className: "font-mono text-[9px] font-bold text-brand-alert",
333
+ children: "// REQUIRED"
334
+ })]
335
+ }),
336
+ c ? /* @__PURE__ */ t(g, {
337
+ tone: a ? "alert" : "default",
338
+ className: "flex w-full",
339
+ children: b
340
+ }) : b,
341
+ a ? /* @__PURE__ */ n("p", {
342
+ className: "mt-1.5 flex items-center gap-1.5 text-xs font-black uppercase tracking-wider text-brand-alert",
343
+ children: [/* @__PURE__ */ t("span", {
344
+ className: "bg-brand-alert px-1 text-[9px] text-white",
345
+ children: "ERR"
346
+ }), /* @__PURE__ */ t("span", { children: a })]
347
+ }) : o ? /* @__PURE__ */ t("p", {
348
+ className: "mt-1.5 text-xs text-slate-500 dark:text-slate-400",
349
+ children: o
350
+ }) : null
351
+ ]
352
+ });
353
+ }), re = {
354
+ sm: "max-w-sm",
355
+ md: "max-w-md",
356
+ lg: "max-w-lg"
357
+ }, ie = {
358
+ default: "border-slate-900 dark:border-white shadow-2xl",
359
+ alert: "border-brand-alert shadow-[0_0_30px_theme(colors.brand.alert/0.15)]"
360
+ }, H = 1500, U = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
361
+ function W({ open: r, onClose: i, title: a, size: o = "md", tone: s = "default", glitchIntro: c = !0, closeOnBackdropClick: l = !0, closeOnEscape: f = !0, footer: _, children: v }) {
362
+ let [y, b] = m("closed"), x = p(null), S = p(null), C = d();
363
+ return u(() => {
364
+ if (!r) {
365
+ b("closed");
366
+ return;
367
+ }
368
+ if (!c) {
369
+ b("open");
370
+ return;
371
+ }
372
+ b("tearing");
373
+ let e = setTimeout(() => b("open"), H);
374
+ return () => clearTimeout(e);
375
+ }, [r, c]), u(() => {
376
+ if (y !== "closed") return document.body.style.overflow = "hidden", () => {
377
+ document.body.style.overflow = "";
378
+ };
379
+ }, [y]), u(() => {
380
+ if (y !== "open") return;
381
+ S.current = document.activeElement, x.current?.focus();
382
+ function e(e) {
383
+ if (f && e.key === "Escape") {
384
+ i();
385
+ return;
386
+ }
387
+ if (e.key !== "Tab") return;
388
+ let t = x.current?.querySelectorAll(U);
389
+ if (!t || t.length === 0) return;
390
+ let n = t[0], r = t[t.length - 1];
391
+ e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
392
+ }
393
+ return document.addEventListener("keydown", e), () => {
394
+ document.removeEventListener("keydown", e), S.current?.focus();
395
+ };
396
+ }, [
397
+ y,
398
+ f,
399
+ i
400
+ ]), y === "closed" ? null : h(/* @__PURE__ */ n(e, { children: [y === "tearing" && /* @__PURE__ */ n("div", {
401
+ className: "animate-screen-tear fixed inset-0 z-[9999] flex items-center justify-center overflow-hidden bg-slate-900/90 dark:bg-brand-dark/95",
402
+ "aria-hidden": "true",
403
+ children: [
404
+ /* @__PURE__ */ t("div", { className: "absolute left-0 top-[20%] h-4 w-full bg-brand-primary/50 mix-blend-overlay" }),
405
+ /* @__PURE__ */ t("div", { className: "absolute left-0 top-[70%] h-8 w-full bg-brand-secondary/50 mix-blend-overlay" }),
406
+ /* @__PURE__ */ t("div", { className: "absolute right-0 top-[40%] h-1 w-1/2 bg-white" }),
407
+ /* @__PURE__ */ t("div", { className: "absolute left-[20%] top-[10%] h-2 w-[30%] bg-brand-primary mix-blend-overlay" }),
408
+ /* @__PURE__ */ t("div", { className: "absolute bottom-[20%] right-[10%] h-3 w-[40%] bg-brand-secondary mix-blend-overlay" })
409
+ ]
410
+ }), y === "open" && /* @__PURE__ */ n("div", {
411
+ className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",
412
+ children: [/* @__PURE__ */ t("div", {
413
+ className: "animate-backdrop-enter absolute inset-0 bg-slate-900/60 backdrop-blur-sm dark:bg-black/80",
414
+ onClick: l ? i : void 0,
415
+ "aria-hidden": "true"
416
+ }), /* @__PURE__ */ t(g, {
417
+ tone: s,
418
+ className: `flex w-full ${re[o]}`,
419
+ children: /* @__PURE__ */ n("div", {
420
+ ref: x,
421
+ role: "dialog",
422
+ "aria-modal": "true",
423
+ "aria-labelledby": a ? C : void 0,
424
+ tabIndex: -1,
425
+ className: `animate-modal-enter relative z-10 flex w-full flex-col rounded-xl border-2 bg-white dark:bg-brand-darkSurface ${ie[s]}`,
426
+ children: [
427
+ a && /* @__PURE__ */ n("div", {
428
+ className: "flex items-center justify-between border-b border-slate-200 p-5 dark:border-slate-800",
429
+ children: [/* @__PURE__ */ t("h2", {
430
+ id: C,
431
+ className: "text-lg font-bold",
432
+ children: a
433
+ }), /* @__PURE__ */ t("button", {
434
+ type: "button",
435
+ onClick: i,
436
+ "aria-label": "Close",
437
+ className: "text-slate-400 transition-colors hover:text-brand-secondary",
438
+ children: /* @__PURE__ */ t("svg", {
439
+ className: "h-5 w-5",
440
+ fill: "none",
441
+ stroke: "currentColor",
442
+ viewBox: "0 0 24 24",
443
+ "aria-hidden": "true",
444
+ children: /* @__PURE__ */ t("path", {
445
+ strokeLinecap: "round",
446
+ strokeLinejoin: "round",
447
+ strokeWidth: 2,
448
+ d: "M6 18L18 6M6 6l12 12"
449
+ })
450
+ })
451
+ })]
452
+ }),
453
+ /* @__PURE__ */ t("div", {
454
+ className: "p-6 text-sm leading-relaxed text-slate-600 dark:text-slate-300",
455
+ children: v
456
+ }),
457
+ _ && /* @__PURE__ */ t("div", {
458
+ className: "rounded-b-xl border-t border-slate-200 bg-slate-50 p-5 dark:border-slate-800 dark:bg-slate-900/50",
459
+ children: _
460
+ })
461
+ ]
462
+ })
463
+ })]
464
+ })] }), document.body);
465
+ }
466
+ //#endregion
467
+ //#region src/components/Navbar/Navbar.tsx
468
+ var G = o(null);
469
+ function K() {
470
+ let e = l(G);
471
+ if (!e) throw Error("Navbar parts must be rendered inside <Navbar>");
472
+ return e;
473
+ }
474
+ function q({ brand: e, actions: r, glitch: i = !0, sticky: a = !1, "aria-label": o = "Main", className: s = "", children: c }) {
475
+ let [l, d] = m(null), f = p(null);
476
+ return u(() => {
477
+ if (!l) return;
478
+ let e = (e) => e.key === "Escape" && d(null);
479
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
480
+ }, [l]), /* @__PURE__ */ t(G.Provider, {
481
+ value: {
482
+ openId: l,
483
+ setOpenId: d,
484
+ glitch: i
485
+ },
486
+ children: /* @__PURE__ */ t("header", {
487
+ ref: f,
488
+ className: `relative z-40 w-full ${a ? "sticky top-0" : ""} ${s}`,
489
+ onMouseLeave: () => d(null),
490
+ onBlur: (e) => {
491
+ f.current?.contains(e.relatedTarget) || d(null);
492
+ },
493
+ children: /* @__PURE__ */ n("div", {
494
+ className: `relative ${i ? "animate-navbar-in" : ""} motion-reduce:!animate-none`,
495
+ children: [
496
+ /* @__PURE__ */ t("span", {
497
+ "aria-hidden": "true",
498
+ className: "pointer-events-none absolute -top-0.5 right-8 z-10 h-[3px] w-16 bg-brand-primary"
499
+ }),
500
+ /* @__PURE__ */ t("span", {
501
+ "aria-hidden": "true",
502
+ className: "pointer-events-none absolute -bottom-0.5 left-8 z-10 h-[3px] w-24 bg-brand-secondary"
503
+ }),
504
+ /* @__PURE__ */ n("nav", {
505
+ "aria-label": o,
506
+ className: "flex items-center justify-between gap-6 border-2 border-slate-900 bg-white px-6 py-3 dark:border-white dark:bg-brand-darkSurface",
507
+ children: [
508
+ /* @__PURE__ */ t("div", {
509
+ className: "flex min-w-0 flex-1 items-center",
510
+ children: e
511
+ }),
512
+ /* @__PURE__ */ t("ul", {
513
+ className: "flex items-center gap-1",
514
+ children: c
515
+ }),
516
+ /* @__PURE__ */ t("div", {
517
+ className: "flex min-w-0 flex-1 items-center justify-end gap-2",
518
+ children: r
519
+ })
520
+ ]
521
+ })
522
+ ]
523
+ })
524
+ })
525
+ });
526
+ }
527
+ var J = "relative flex items-center gap-1.5 px-3 py-2 font-mono text-xs font-black uppercase tracking-wider transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand-primary";
528
+ function ae({ label: e, menu: r, active: i = !1, className: a = "", ...o }) {
529
+ let { openId: s, setOpenId: c, glitch: l } = K(), u = d(), f = `${u}-panel`, p = s === u, m = p || i ? "text-brand-primary" : "text-slate-900 hover:text-brand-primary dark:text-white", h = /* @__PURE__ */ t("span", {
530
+ "aria-hidden": "true",
531
+ className: `absolute inset-x-3 -bottom-0.5 h-[3px] bg-brand-primary transition-transform duration-150 origin-left ${p || i ? "scale-x-100" : "scale-x-0"}`
532
+ });
533
+ return r ? /* @__PURE__ */ n("li", {
534
+ onMouseEnter: () => c(u),
535
+ children: [/* @__PURE__ */ n("button", {
536
+ type: "button",
537
+ "aria-expanded": p,
538
+ "aria-controls": p ? f : void 0,
539
+ onClick: () => c(p ? null : u),
540
+ className: `${J} ${m}`,
541
+ children: [
542
+ e,
543
+ /* @__PURE__ */ t("span", {
544
+ "aria-hidden": "true",
545
+ className: `text-[10px] transition-transform ${p ? "rotate-180" : ""}`,
546
+ children: "[v]"
547
+ }),
548
+ h
549
+ ]
550
+ }), p && /* @__PURE__ */ t("div", {
551
+ id: f,
552
+ className: "absolute inset-x-0 top-full pt-2",
553
+ children: /* @__PURE__ */ n("div", {
554
+ className: `relative border-2 border-slate-900 bg-white p-6 dark:border-white dark:bg-brand-darkSurface ${l ? "animate-navbar-panel" : ""} motion-reduce:!animate-none`,
555
+ children: [
556
+ /* @__PURE__ */ t("span", {
557
+ "aria-hidden": "true",
558
+ className: "pointer-events-none absolute -top-0.5 left-8 h-[3px] w-12 bg-brand-secondary"
559
+ }),
560
+ /* @__PURE__ */ t("span", {
561
+ "aria-hidden": "true",
562
+ className: "pointer-events-none absolute -bottom-0.5 right-8 h-[3px] w-20 bg-brand-primary"
563
+ }),
564
+ r
565
+ ]
566
+ })
567
+ })]
568
+ }) : /* @__PURE__ */ t("li", {
569
+ onMouseEnter: () => c(null),
570
+ children: /* @__PURE__ */ n("a", {
571
+ "aria-current": i ? "page" : void 0,
572
+ className: `${J} ${m} ${a}`,
573
+ ...o,
574
+ children: [e, h]
575
+ })
576
+ });
577
+ }
578
+ function oe({ columns: e = 2, children: n }) {
579
+ let i = {
580
+ 1: "grid-cols-1",
581
+ 2: "grid-cols-1 md:grid-cols-2",
582
+ 3: "grid-cols-1 md:grid-cols-3"
583
+ }[e];
584
+ return /* @__PURE__ */ t("div", {
585
+ className: `grid gap-4 ${i}`,
586
+ children: r.toArray(n).map((e, n) => /* @__PURE__ */ t("div", {
587
+ style: { "--i": n },
588
+ className: "animate-sidebar-item [animation-delay:calc(var(--i)*60ms)] motion-reduce:!animate-none",
589
+ children: e
590
+ }, n))
591
+ });
592
+ }
593
+ function se({ title: e, description: r, media: i, className: a = "", ...o }) {
594
+ return /* @__PURE__ */ n("a", {
595
+ className: `group/link flex gap-4 border-l-4 border-transparent p-3 transition-colors hover:border-brand-secondary hover:bg-slate-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand-primary dark:hover:bg-brand-darkSurfaceSub ${a}`,
596
+ ...o,
597
+ children: [i && /* @__PURE__ */ t("span", {
598
+ className: "block h-24 w-32 shrink-0 overflow-hidden border-2 border-slate-900 bg-slate-100 dark:border-white dark:bg-brand-darkSurfaceSub",
599
+ children: i
600
+ }), /* @__PURE__ */ n("span", {
601
+ className: "min-w-0",
602
+ children: [/* @__PURE__ */ t("span", {
603
+ className: "block font-mono text-sm font-black uppercase tracking-wider text-slate-900 group-hover/link:text-brand-primary dark:text-white",
604
+ children: e
605
+ }), r && /* @__PURE__ */ t("span", {
606
+ className: "mt-1 block text-sm font-medium leading-relaxed text-slate-600 dark:text-slate-400",
607
+ children: r
608
+ })]
609
+ })]
610
+ });
611
+ }
612
+ //#endregion
613
+ //#region src/components/Pagination/Pagination.tsx
614
+ function Y({ className: e = "" }) {
615
+ return /* @__PURE__ */ t("svg", {
616
+ className: `h-3.5 w-3.5 ${e}`,
617
+ fill: "none",
618
+ stroke: "currentColor",
619
+ viewBox: "0 0 24 24",
620
+ "aria-hidden": "true",
621
+ children: /* @__PURE__ */ t("path", {
622
+ strokeLinecap: "square",
623
+ strokeWidth: 2.5,
624
+ d: "M15 19l-7-7 7-7"
625
+ })
626
+ });
627
+ }
628
+ function X({ className: e = "" }) {
629
+ return /* @__PURE__ */ t("svg", {
630
+ className: `h-3.5 w-3.5 ${e}`,
631
+ fill: "none",
632
+ stroke: "currentColor",
633
+ viewBox: "0 0 24 24",
634
+ "aria-hidden": "true",
635
+ children: /* @__PURE__ */ t("path", {
636
+ strokeLinecap: "square",
637
+ strokeWidth: 2.5,
638
+ d: "M9 5l7 7-7 7"
639
+ })
640
+ });
641
+ }
642
+ function ce(e, t, n) {
643
+ if (t <= n * 2 + 5) return Array.from({ length: t }, (e, t) => t + 1);
644
+ let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1, s = [1];
645
+ a && s.push("ellipsis");
646
+ for (let e = Math.max(r, 2); e <= Math.min(i, t - 1); e++) s.push(e);
647
+ return o && s.push("ellipsis"), t > 1 && s.push(t), s;
648
+ }
649
+ function le({ page: e, active: n, glitch: r, onClick: i }) {
650
+ let a = /* @__PURE__ */ t("button", {
651
+ type: "button",
652
+ onClick: i,
653
+ "aria-current": n ? "page" : void 0,
654
+ className: ["relative z-10 flex h-8 w-8 items-center justify-center border-2 text-xs transition-colors", n ? "border-brand-primary bg-transparent font-black text-slate-900 dark:text-white" : "border-transparent font-bold text-slate-600 hover:border-slate-900 hover:text-slate-900 dark:text-slate-400 dark:hover:border-white dark:hover:text-white"].join(" "),
655
+ children: e
656
+ });
657
+ return r ? /* @__PURE__ */ t(g, {
658
+ active: n,
659
+ children: a
660
+ }) : a;
661
+ }
662
+ function ue({ currentPage: e, totalPages: r, onPageChange: i, totalItems: a, pageSize: o, siblingCount: s = 1, glitch: c = !0, className: l = "" }) {
663
+ let u = ce(e, r, s), d = o === void 0 ? void 0 : (e - 1) * o + 1, f = o !== void 0 && a !== void 0 ? Math.min(e * o, a) : void 0;
664
+ return /* @__PURE__ */ n("div", {
665
+ className: ["flex flex-col items-center justify-between gap-4 border-2 border-slate-900 bg-brand-lightSurface p-5 font-mono dark:border-white dark:bg-brand-darkSurface sm:flex-row", l].filter(Boolean).join(" "),
666
+ children: [a !== void 0 && d !== void 0 && f !== void 0 && /* @__PURE__ */ n("div", {
667
+ className: "text-xs font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400",
668
+ children: [
669
+ "Showing ",
670
+ /* @__PURE__ */ n("span", {
671
+ className: "text-brand-primary",
672
+ children: [
673
+ d,
674
+ "-",
675
+ f
676
+ ]
677
+ }),
678
+ " of",
679
+ " ",
680
+ /* @__PURE__ */ t("span", {
681
+ className: "text-brand-secondary",
682
+ children: a
683
+ }),
684
+ " results"
685
+ ]
686
+ }), /* @__PURE__ */ n("nav", {
687
+ className: "flex items-center gap-2",
688
+ "aria-label": "Pagination",
689
+ children: [
690
+ /* @__PURE__ */ n("button", {
691
+ type: "button",
692
+ disabled: e <= 1,
693
+ onClick: () => i(e - 1),
694
+ className: "flex items-center gap-1 px-3 py-1.5 text-xs font-bold uppercase tracking-widest text-slate-900 transition-colors hover:text-brand-primary disabled:cursor-not-allowed disabled:text-slate-400 disabled:opacity-50 disabled:hover:text-slate-400 dark:text-white dark:disabled:text-slate-600",
695
+ children: [/* @__PURE__ */ t(Y, {}), "Prev"]
696
+ }),
697
+ u.map((n, r) => n === "ellipsis" ? /* @__PURE__ */ t("span", {
698
+ className: "flex h-8 w-6 items-center justify-center text-xs font-bold tracking-widest text-slate-500",
699
+ children: "..."
700
+ }, `ellipsis-${r}`) : /* @__PURE__ */ t(le, {
701
+ page: n,
702
+ active: n === e,
703
+ glitch: c,
704
+ onClick: () => i(n)
705
+ }, n)),
706
+ /* @__PURE__ */ n("button", {
707
+ type: "button",
708
+ disabled: e >= r,
709
+ onClick: () => i(e + 1),
710
+ className: "group flex items-center gap-1 px-3 py-1.5 text-xs font-bold uppercase tracking-widest text-slate-900 transition-colors hover:text-brand-primary disabled:cursor-not-allowed disabled:text-slate-400 disabled:opacity-50 dark:text-white dark:disabled:text-slate-600",
711
+ children: ["Next", /* @__PURE__ */ t(X, { className: "transition-transform group-hover:translate-x-1" })]
712
+ })
713
+ ]
714
+ })]
715
+ });
716
+ }
717
+ function de({ currentPage: e, totalPages: r, onPageChange: i, glitch: a = !0, className: o = "" }) {
718
+ let s = /* @__PURE__ */ n("button", {
719
+ type: "button",
720
+ disabled: e <= 1,
721
+ onClick: () => i(e - 1),
722
+ className: "relative z-10 flex items-center gap-2 border-2 border-slate-900 bg-transparent px-4 py-2 text-xs font-bold uppercase tracking-wider text-slate-900 transition-colors hover:bg-slate-900 hover:text-white disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-slate-900 dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-slate-900",
723
+ children: [/* @__PURE__ */ t(Y, { className: "h-3 w-3" }), "Prev"]
724
+ }), c = /* @__PURE__ */ n("button", {
725
+ type: "button",
726
+ disabled: e >= r,
727
+ onClick: () => i(e + 1),
728
+ className: "relative z-10 flex items-center gap-2 border-2 border-slate-900 bg-transparent px-4 py-2 text-xs font-bold uppercase tracking-wider text-slate-900 transition-colors hover:bg-slate-900 hover:text-white disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-slate-900 dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-slate-900",
729
+ children: ["Next", /* @__PURE__ */ t(X, { className: "h-3 w-3" })]
730
+ });
731
+ return /* @__PURE__ */ n("div", {
732
+ className: ["flex max-w-md items-center justify-between border-2 border-slate-900 bg-brand-lightSurface p-4 font-mono dark:border-white dark:bg-brand-darkSurface", o].filter(Boolean).join(" "),
733
+ children: [
734
+ a ? /* @__PURE__ */ t(g, { children: s }) : s,
735
+ /* @__PURE__ */ n("div", {
736
+ className: "px-4 text-xs font-bold uppercase tracking-widest text-slate-500",
737
+ children: [
738
+ "Page ",
739
+ /* @__PURE__ */ t("span", {
740
+ className: "font-black text-slate-900 dark:text-white",
741
+ children: e
742
+ }),
743
+ " of ",
744
+ r
745
+ ]
746
+ }),
747
+ a ? /* @__PURE__ */ t(g, { children: c }) : c
748
+ ]
749
+ });
750
+ }
751
+ function fe({ currentPage: e, totalPages: r, onPageChange: i, glitch: a = !0, className: o = "" }) {
752
+ let [s, c] = m(String(e));
753
+ u(() => {
754
+ c(String(e));
755
+ }, [e]);
756
+ function l() {
757
+ let t = Number.parseInt(s, 10);
758
+ if (Number.isFinite(t)) {
759
+ let e = Math.min(Math.max(t, 1), r);
760
+ i(e), c(String(e));
761
+ } else c(String(e));
762
+ }
763
+ let d = /* @__PURE__ */ t("div", {
764
+ className: "relative z-10 flex items-center border-2 border-slate-900 bg-white transition-colors focus-within:border-brand-primary dark:border-white dark:bg-brand-darkSurface",
765
+ children: /* @__PURE__ */ t("input", {
766
+ type: "text",
767
+ inputMode: "numeric",
768
+ value: s,
769
+ onChange: (e) => c(e.target.value),
770
+ onBlur: l,
771
+ onKeyDown: (e) => {
772
+ e.key === "Enter" && e.currentTarget.blur();
773
+ },
774
+ "aria-label": `Page, ${r} total`,
775
+ className: "w-12 bg-transparent py-1.5 text-center text-sm font-bold text-slate-900 focus:outline-none dark:text-white"
776
+ })
777
+ });
778
+ return /* @__PURE__ */ n("div", {
779
+ className: ["flex items-center gap-2 font-mono", o].filter(Boolean).join(" "),
780
+ children: [
781
+ /* @__PURE__ */ t("button", {
782
+ type: "button",
783
+ disabled: e <= 1,
784
+ onClick: () => i(e - 1),
785
+ "aria-label": "Previous page",
786
+ className: "flex h-9 w-9 items-center justify-center border-2 border-slate-300 text-slate-500 transition-colors hover:border-brand-primary hover:text-brand-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700",
787
+ children: /* @__PURE__ */ t(Y, {})
788
+ }),
789
+ a ? /* @__PURE__ */ t(g, { children: d }) : d,
790
+ /* @__PURE__ */ n("span", {
791
+ className: "px-2 text-xs font-bold tracking-widest text-slate-500",
792
+ children: ["/ ", r]
793
+ }),
794
+ /* @__PURE__ */ t("button", {
795
+ type: "button",
796
+ disabled: e >= r,
797
+ onClick: () => i(e + 1),
798
+ "aria-label": "Next page",
799
+ className: "flex h-9 w-9 items-center justify-center border-2 border-slate-300 text-slate-900 transition-colors hover:border-brand-primary hover:text-brand-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-white",
800
+ children: /* @__PURE__ */ t(X, {})
801
+ })
802
+ ]
803
+ });
804
+ }
805
+ function pe({ loading: e = !1, glitch: r = !0, className: i = "", children: a = "Load More Data Nodes", disabled: o = !1, ...s }) {
806
+ let c = /* @__PURE__ */ n("button", {
807
+ type: "button",
808
+ disabled: o || e,
809
+ "aria-busy": e || void 0,
810
+ className: ["relative z-10 flex w-full items-center justify-center gap-3 border-2 border-dashed border-slate-900 bg-transparent px-6 py-3 font-mono text-xs font-black uppercase tracking-widest text-slate-900 transition-all hover:border-solid hover:border-brand-primary hover:text-brand-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-dashed disabled:hover:border-slate-900 disabled:hover:text-slate-900 dark:border-white dark:text-white dark:disabled:hover:border-white dark:disabled:hover:text-white", i].filter(Boolean).join(" "),
811
+ ...s,
812
+ children: [e ? /* @__PURE__ */ t(T, {}) : /* @__PURE__ */ t("svg", {
813
+ className: "h-4 w-4 animate-bounce",
814
+ fill: "none",
815
+ stroke: "currentColor",
816
+ viewBox: "0 0 24 24",
817
+ "aria-hidden": "true",
818
+ children: /* @__PURE__ */ t("path", {
819
+ strokeLinecap: "square",
820
+ strokeLinejoin: "miter",
821
+ strokeWidth: 2.5,
822
+ d: "M19 14l-7 7m0 0l-7-7m7 7V3"
823
+ })
824
+ }), a]
825
+ });
826
+ return r ? /* @__PURE__ */ t(g, {
827
+ className: "flex w-full",
828
+ children: c
829
+ }) : c;
830
+ }
831
+ //#endregion
832
+ //#region src/components/Progress/Progress.tsx
833
+ var me = {
834
+ sm: "h-2",
835
+ md: "h-3.5",
836
+ lg: "h-5"
837
+ }, he = {
838
+ primary: "bg-brand-primary",
839
+ secondary: "bg-brand-secondary",
840
+ success: "bg-brand-success",
841
+ warning: "bg-brand-warning",
842
+ alert: "bg-brand-alert"
843
+ }, ge = {
844
+ primary: "shadow-glow-primary",
845
+ secondary: "shadow-glow-secondary",
846
+ success: "shadow-[0_0_15px_theme(colors.brand.success/0.4)]",
847
+ warning: "shadow-[0_0_15px_theme(colors.brand.warning/0.4)]",
848
+ alert: "shadow-glow-alert"
849
+ }, _e = "[mask-image:repeating-linear-gradient(90deg,#000_0_8px,transparent_8px_11px)]";
850
+ function ve({ value: r = 0, max: i = 100, indeterminate: a = !1, label: o, showValue: s = !1, size: c = "md", tone: l = "primary", variant: u = "bar", glitch: f = !0, className: p = "", ...m }) {
851
+ let h = d(), g = Math.min(100, Math.max(0, r / i * 100)), _ = !a && g >= 100, v = f && !_, y = u === "segmented", b = [
852
+ "relative w-full overflow-hidden border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput",
853
+ me[c],
854
+ _ && f ? "animate-progress-done motion-reduce:!animate-none" : ""
855
+ ].filter(Boolean).join(" "), x = [
856
+ he[l],
857
+ y ? _e : "",
858
+ ge[l]
859
+ ].filter(Boolean).join(" ");
860
+ return /* @__PURE__ */ n("div", {
861
+ className: p,
862
+ ...m,
863
+ children: [(o || s) && /* @__PURE__ */ n("div", {
864
+ className: "mb-2 flex items-center justify-between font-mono text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white",
865
+ children: [/* @__PURE__ */ t("span", {
866
+ id: h,
867
+ children: o
868
+ }), s && !a && /* @__PURE__ */ n("span", {
869
+ className: _ ? "text-brand-success" : "text-slate-500 dark:text-slate-400",
870
+ children: [Math.round(g), "%"]
871
+ })]
872
+ }), /* @__PURE__ */ t("div", {
873
+ role: "progressbar",
874
+ "aria-labelledby": o ? h : void 0,
875
+ "aria-valuemin": 0,
876
+ "aria-valuemax": i,
877
+ "aria-valuenow": a ? void 0 : Math.min(i, Math.max(0, r)),
878
+ "aria-busy": a || void 0,
879
+ className: b,
880
+ children: a ? /* @__PURE__ */ t("div", { className: `absolute inset-y-0 left-0 w-1/3 ${x} ${f ? "animate-progress-indeterminate" : "animate-progress-indeterminate-slow"} motion-reduce:!animate-none` }) : /* @__PURE__ */ t("div", {
881
+ className: `absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-300 ease-linear ${x}`,
882
+ style: { width: `${g}%` },
883
+ children: v && g > 0 && /* @__PURE__ */ n(e, { children: [
884
+ /* @__PURE__ */ t("span", {
885
+ "aria-hidden": "true",
886
+ className: "absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-transparent via-white/50 to-transparent animate-progress-sweep motion-reduce:hidden"
887
+ }),
888
+ /* @__PURE__ */ t("span", {
889
+ "aria-hidden": "true",
890
+ className: "absolute inset-y-0 right-0 w-1.5 bg-brand-primary mix-blend-screen animate-glitch-jitter"
891
+ }),
892
+ /* @__PURE__ */ t("span", {
893
+ "aria-hidden": "true",
894
+ className: "absolute inset-y-0 right-0 w-1.5 bg-brand-secondary mix-blend-screen animate-glitch-jitter [animation-direction:reverse]"
895
+ })
896
+ ] })
897
+ })
898
+ })]
899
+ });
900
+ }
901
+ //#endregion
902
+ //#region src/components/Radio/context.ts
903
+ var ye = o(null);
904
+ function be() {
905
+ let e = l(ye);
906
+ if (!e) throw Error("<Radio> must be rendered inside a <RadioGroup>");
907
+ return e;
908
+ }
909
+ //#endregion
910
+ //#region src/components/Radio/Radio.tsx
911
+ var xe = {
912
+ sm: "h-4 w-4",
913
+ md: "h-5 w-5",
914
+ lg: "h-6 w-6"
915
+ }, Se = {
916
+ sm: "h-1.5 w-1.5",
917
+ md: "h-2.5 w-2.5",
918
+ lg: "h-3 w-3"
919
+ }, Ce = {
920
+ sm: "text-xs",
921
+ md: "text-sm",
922
+ lg: "text-base"
923
+ };
924
+ function we({ round: r }) {
925
+ let i = r ? "rounded-full" : "";
926
+ return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
927
+ "aria-hidden": "true",
928
+ className: `pointer-events-none absolute -inset-0.5 z-20 bg-brand-primary opacity-0 ${i} group-data-[fx=in]/radio:animate-radio-slice-cyan motion-reduce:!animate-none`
929
+ }), /* @__PURE__ */ t("span", {
930
+ "aria-hidden": "true",
931
+ className: `pointer-events-none absolute -inset-0.5 z-20 bg-brand-secondary opacity-0 ${i} group-data-[fx=in]/radio:animate-radio-slice-magenta motion-reduce:!animate-none`
932
+ })] });
933
+ }
934
+ var Te = s(function({ value: e, label: r, description: i, trailing: a, disabled: o, className: s = "", id: c, ...l }, u) {
935
+ let d = be(), f = d.current === e, p = d.disabled || !!o, m = d.glitch ? f && d.previous !== void 0 ? "in" : d.previous === e ? "out" : void 0 : void 0, h = /* @__PURE__ */ t("input", {
936
+ ref: u,
937
+ id: c,
938
+ type: "radio",
939
+ name: d.name,
940
+ value: e,
941
+ checked: f,
942
+ disabled: p,
943
+ onChange: () => d.select(e),
944
+ className: "peer sr-only",
945
+ ...l
946
+ }), _ = /* @__PURE__ */ t("span", {
947
+ "aria-hidden": "true",
948
+ className: [
949
+ "block transition-colors",
950
+ Se[d.size],
951
+ d.shape === "round" ? "rounded-full" : "",
952
+ f ? "bg-brand-primary opacity-100 shadow-glow-primary" : "bg-brand-primary opacity-0",
953
+ "group-data-[fx=in]/radio:animate-radio-in group-data-[fx=out]/radio:animate-radio-out motion-reduce:!animate-none"
954
+ ].join(" ")
955
+ }), v = p ? "border-slate-300 bg-striped dark:border-slate-700" : d.error ? "border-brand-alert" : f ? "border-brand-primary" : "border-slate-900 dark:border-white", y = /* @__PURE__ */ n("span", {
956
+ className: "min-w-0 font-mono",
957
+ children: [/* @__PURE__ */ t("span", {
958
+ className: `block ${Ce[d.size]} font-black uppercase tracking-wider transition-colors ${p ? "text-slate-400 dark:text-slate-600" : f && d.look === "card" ? "text-slate-900 dark:text-brand-primary" : "text-slate-900 dark:text-white"}`,
959
+ children: r
960
+ }), i && /* @__PURE__ */ t("span", {
961
+ className: "mt-0.5 block text-[10px] normal-case tracking-normal text-slate-500 dark:text-slate-400",
962
+ children: i
963
+ })]
964
+ }), b = `group/radio relative ${p ? "cursor-not-allowed" : "cursor-pointer"} ${s}`;
965
+ return d.look === "card" ? /* @__PURE__ */ t("label", {
966
+ "data-fx": m,
967
+ className: `${b} block`,
968
+ children: /* @__PURE__ */ n(g, {
969
+ disabled: p,
970
+ tone: d.error ? "alert" : "default",
971
+ className: "flex w-full",
972
+ children: [h, /* @__PURE__ */ n("span", {
973
+ className: `relative z-10 flex w-full items-center justify-between gap-3 border-2 p-4 transition-all peer-focus-visible:ring-2 peer-focus-visible:ring-brand-primary peer-focus-visible:ring-offset-2 dark:peer-focus-visible:ring-offset-brand-dark ${p ? "border-slate-300 bg-striped dark:border-slate-800" : d.error ? "border-brand-alert bg-red-500/10" : f ? "border-brand-primary bg-brand-primary/10 shadow-glow-primary" : "border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput"}`,
974
+ children: [
975
+ /* @__PURE__ */ n("span", {
976
+ className: "flex items-center gap-3",
977
+ children: [/* @__PURE__ */ t("span", {
978
+ className: `relative flex shrink-0 items-center justify-center border-2 ${xe[d.size]} ${d.shape === "round" ? "rounded-full" : ""} ${v}`,
979
+ children: _
980
+ }), y]
981
+ }),
982
+ a && /* @__PURE__ */ t("span", {
983
+ className: `font-mono text-[10px] font-bold ${f ? "text-brand-primary" : "text-slate-400"}`,
984
+ children: a
985
+ }),
986
+ /* @__PURE__ */ t(we, { round: !1 })
987
+ ]
988
+ })]
989
+ })
990
+ }) : /* @__PURE__ */ n("label", {
991
+ "data-fx": m,
992
+ className: `${b} inline-flex items-start gap-3`,
993
+ children: [
994
+ h,
995
+ /* @__PURE__ */ n("span", {
996
+ className: `relative mt-px flex shrink-0 items-center justify-center border-2 bg-transparent transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-brand-primary peer-focus-visible:ring-offset-2 dark:peer-focus-visible:ring-offset-brand-dark ${xe[d.size]} ${d.shape === "round" ? "rounded-full" : ""} ${v}`,
997
+ children: [_, /* @__PURE__ */ t(we, { round: d.shape === "round" })]
998
+ }),
999
+ y
1000
+ ]
1001
+ });
1002
+ });
1003
+ //#endregion
1004
+ //#region src/components/Radio/RadioGroup.tsx
1005
+ function Ee({ label: e, value: r, defaultValue: i, onValueChange: a, name: o, size: s = "md", look: c = "dot", shape: l = "square", glitch: u = !0, disabled: f = !1, error: p, hint: h, required: g = !1, orientation: _ = "vertical", className: v = "", children: y }) {
1006
+ let b = d(), x = d(), [S, C] = m(i), w = r === void 0 ? S : r, [T, E] = m(w), [D, O] = m(void 0);
1007
+ return T !== w && (O(T), E(w)), /* @__PURE__ */ t(ye.Provider, {
1008
+ value: {
1009
+ name: o ?? b,
1010
+ current: w,
1011
+ previous: D,
1012
+ select: (e) => {
1013
+ r === void 0 && C(e), a?.(e);
1014
+ },
1015
+ size: s,
1016
+ look: c,
1017
+ shape: l,
1018
+ glitch: u,
1019
+ disabled: f,
1020
+ error: !!p
1021
+ },
1022
+ children: /* @__PURE__ */ n("div", {
1023
+ role: "radiogroup",
1024
+ "aria-labelledby": e ? x : void 0,
1025
+ "aria-required": g || void 0,
1026
+ "aria-invalid": p ? !0 : void 0,
1027
+ className: v,
1028
+ children: [
1029
+ e && /* @__PURE__ */ n("div", {
1030
+ id: x,
1031
+ className: "mb-3 flex items-center justify-between text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white",
1032
+ children: [/* @__PURE__ */ t("span", { children: e }), g && /* @__PURE__ */ t("span", {
1033
+ className: "font-mono text-[9px] font-bold text-brand-alert",
1034
+ children: "// REQUIRED"
1035
+ })]
1036
+ }),
1037
+ /* @__PURE__ */ t("div", {
1038
+ className: _ === "horizontal" ? "flex flex-wrap gap-x-6 gap-y-3" : "flex flex-col gap-3",
1039
+ children: y
1040
+ }),
1041
+ p ? /* @__PURE__ */ n("p", {
1042
+ className: "mt-2 flex items-center gap-1.5 text-xs font-black uppercase tracking-wider text-brand-alert",
1043
+ children: [/* @__PURE__ */ t("span", {
1044
+ className: "bg-brand-alert px-1 text-[9px] text-white",
1045
+ children: "ERR"
1046
+ }), /* @__PURE__ */ t("span", { children: p })]
1047
+ }) : h ? /* @__PURE__ */ t("p", {
1048
+ className: "mt-2 text-xs text-slate-500 dark:text-slate-400",
1049
+ children: h
1050
+ }) : null
1051
+ ]
1052
+ })
1053
+ });
1054
+ }
1055
+ //#endregion
1056
+ //#region src/components/Sidebar/Sidebar.tsx
1057
+ var De = 280;
1058
+ function Oe({ open: r, defaultOpen: i = !0, onOpenChange: a, side: o = "left", title: s, actions: c, footer: l, overlay: d = !1, glitch: f = !0, className: p = "w-64", children: h }) {
1059
+ let [g] = m(i), _ = r === void 0 ? g : r, [v, y] = m(_ ? "open" : "closed");
1060
+ if (_ && v !== "open" && y("open"), !_ && v === "open" && y(f ? "closing" : "closed"), u(() => {
1061
+ if (v !== "closing") return;
1062
+ let e = setTimeout(() => y("closed"), De);
1063
+ return () => clearTimeout(e);
1064
+ }, [v]), u(() => {
1065
+ if (!d || !_) return;
1066
+ let e = (e) => e.key === "Escape" && a?.(!1);
1067
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1068
+ }, [
1069
+ d,
1070
+ _,
1071
+ a
1072
+ ]), v === "closed") return null;
1073
+ let b = v === "closing", x = /* @__PURE__ */ n("aside", {
1074
+ "data-state": b ? "closing" : "open",
1075
+ style: { "--dir": o === "left" ? 1 : -1 },
1076
+ className: [
1077
+ "relative flex flex-col border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkSurface",
1078
+ d ? `fixed inset-y-0 z-50 ${o === "left" ? "left-0" : "right-0"}` : "h-full",
1079
+ f ? b ? "animate-sidebar-out" : "animate-sidebar-in" : "",
1080
+ "motion-reduce:!animate-none",
1081
+ p
1082
+ ].filter(Boolean).join(" "),
1083
+ children: [
1084
+ /* @__PURE__ */ t("span", {
1085
+ "aria-hidden": "true",
1086
+ className: "pointer-events-none absolute -top-0.5 right-4 h-[3px] w-12 bg-brand-primary"
1087
+ }),
1088
+ /* @__PURE__ */ t("span", {
1089
+ "aria-hidden": "true",
1090
+ className: "pointer-events-none absolute -bottom-0.5 left-4 h-[3px] w-16 bg-brand-secondary"
1091
+ }),
1092
+ (s || c) && /* @__PURE__ */ n("div", {
1093
+ className: "flex items-center justify-between gap-2 border-b-2 border-slate-900 px-4 py-3 dark:border-white",
1094
+ children: [/* @__PURE__ */ t("span", {
1095
+ className: "font-mono text-xs font-black uppercase tracking-widest text-slate-900 dark:text-white",
1096
+ children: s
1097
+ }), /* @__PURE__ */ t("div", {
1098
+ className: "flex items-center gap-1",
1099
+ children: c
1100
+ })]
1101
+ }),
1102
+ /* @__PURE__ */ t("div", {
1103
+ className: "cyber-scroll min-h-0 flex-1 overflow-y-auto p-3",
1104
+ children: h
1105
+ }),
1106
+ l && /* @__PURE__ */ t("div", {
1107
+ className: "border-t-2 border-slate-900 p-3 dark:border-white",
1108
+ children: l
1109
+ })
1110
+ ]
1111
+ });
1112
+ return d ? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
1113
+ "aria-hidden": "true",
1114
+ onClick: () => a?.(!1),
1115
+ className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm animate-backdrop-enter motion-reduce:!animate-none"
1116
+ }), x] }) : x;
1117
+ }
1118
+ function ke({ label: e, children: r }) {
1119
+ return /* @__PURE__ */ n("div", {
1120
+ className: "mb-4 last:mb-0",
1121
+ children: [e && /* @__PURE__ */ n("p", {
1122
+ className: "mb-1.5 px-2 font-mono text-[10px] font-black uppercase tracking-widest text-slate-400 dark:text-slate-500",
1123
+ children: ["// ", e]
1124
+ }), /* @__PURE__ */ t(Ae, { children: r })]
1125
+ });
1126
+ }
1127
+ function Ae({ children: e }) {
1128
+ return /* @__PURE__ */ t("nav", {
1129
+ className: "flex flex-col gap-1",
1130
+ children: r.toArray(e).map((e, n) => /* @__PURE__ */ t("div", {
1131
+ style: { "--i": n },
1132
+ className: "animate-sidebar-item [animation-delay:calc(var(--i)*45ms)] motion-reduce:!animate-none",
1133
+ children: e
1134
+ }, n))
1135
+ });
1136
+ }
1137
+ function je({ active: e = !1, icon: r, trailing: i, type: a = "button", className: o = "", children: s, ...c }) {
1138
+ return /* @__PURE__ */ n("button", {
1139
+ type: a,
1140
+ "aria-current": e ? "page" : void 0,
1141
+ className: [
1142
+ "group/item relative flex w-full items-center gap-3 border-l-4 px-3 py-2.5 text-left font-mono text-xs uppercase tracking-wider transition-colors",
1143
+ "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-brand-primary",
1144
+ "disabled:cursor-not-allowed disabled:bg-striped disabled:text-slate-400 dark:disabled:text-slate-600",
1145
+ e ? "border-brand-primary bg-brand-primary/10 font-black text-slate-900 dark:text-white" : "border-transparent font-bold text-slate-500 hover:border-brand-secondary hover:bg-slate-100 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-brand-darkSurfaceSub dark:hover:text-white",
1146
+ o
1147
+ ].join(" "),
1148
+ ...c,
1149
+ children: [
1150
+ r && /* @__PURE__ */ t("span", {
1151
+ className: "shrink-0",
1152
+ children: r
1153
+ }),
1154
+ /* @__PURE__ */ t("span", {
1155
+ className: "min-w-0 flex-1 truncate",
1156
+ children: s
1157
+ }),
1158
+ e && /* @__PURE__ */ t("span", {
1159
+ "aria-hidden": "true",
1160
+ className: "h-1.5 w-1.5 shrink-0 bg-brand-primary shadow-glow-primary"
1161
+ }),
1162
+ i && /* @__PURE__ */ t("span", {
1163
+ className: "shrink-0 text-[10px]",
1164
+ children: i
1165
+ })
1166
+ ]
1167
+ });
1168
+ }
1169
+ function Me({ open: e = !0, type: n = "button", className: r = "", ...i }) {
1170
+ return /* @__PURE__ */ t("button", {
1171
+ type: n,
1172
+ "aria-label": e ? "Close sidebar" : "Open sidebar",
1173
+ "aria-expanded": e,
1174
+ className: `flex h-8 w-8 items-center justify-center border-2 border-transparent text-slate-900 transition-colors hover:border-brand-primary hover:text-brand-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand-primary dark:text-white ${r}`,
1175
+ ...i,
1176
+ children: /* @__PURE__ */ t("svg", {
1177
+ viewBox: "0 0 24 24",
1178
+ width: "16",
1179
+ height: "16",
1180
+ fill: "none",
1181
+ stroke: "currentColor",
1182
+ strokeWidth: "2.5",
1183
+ strokeLinecap: "square",
1184
+ strokeLinejoin: "miter",
1185
+ "aria-hidden": "true",
1186
+ children: /* @__PURE__ */ t("path", { d: "M3 4h18v16H3zM9 4v16" })
1187
+ })
1188
+ });
1189
+ }
1190
+ //#endregion
1191
+ //#region src/components/Skeleton/Skeleton.tsx
1192
+ var Ne = {
1193
+ laser: "skel-laser",
1194
+ bitmap: "skel-bitmap",
1195
+ stripes: "skel-stripes",
1196
+ hazard: "skel-hazard"
1197
+ }, Pe = {
1198
+ none: "rounded-none",
1199
+ md: "rounded-md",
1200
+ lg: "rounded-lg",
1201
+ xl: "rounded-xl",
1202
+ "2xl": "rounded-2xl",
1203
+ full: "rounded-full"
1204
+ };
1205
+ function Fe({ variant: e = "laser", rounded: n = "md", className: r = "", ...i }) {
1206
+ return /* @__PURE__ */ t("div", {
1207
+ "aria-hidden": "true",
1208
+ className: [
1209
+ "skel-block",
1210
+ Pe[n],
1211
+ Ne[e],
1212
+ r
1213
+ ].filter(Boolean).join(" "),
1214
+ ...i
1215
+ });
1216
+ }
1217
+ //#endregion
1218
+ //#region src/components/Slider/Slider.tsx
1219
+ var Ie = 150, Le = 400;
1220
+ function Z(e) {
1221
+ return String(e).padStart(2, "0");
1222
+ }
1223
+ function Re({ direction: e, className: n = "" }) {
1224
+ return /* @__PURE__ */ t("svg", {
1225
+ className: `h-4 w-4 ${n}`,
1226
+ fill: "none",
1227
+ stroke: "currentColor",
1228
+ viewBox: "0 0 24 24",
1229
+ "aria-hidden": "true",
1230
+ children: /* @__PURE__ */ t("path", {
1231
+ strokeLinecap: "square",
1232
+ strokeWidth: 2.5,
1233
+ d: e === "left" ? "M15 19l-7-7 7-7" : "M9 5l7 7-7 7"
1234
+ })
1235
+ });
1236
+ }
1237
+ function ze({ slides: r, currentIndex: i, onIndexChange: a, tone: o = "default", label: s, glitch: c = !0, className: l = "" }) {
1238
+ let [d, f] = m(i), [h, _] = m(!1), v = p(i);
1239
+ u(() => {
1240
+ if (i === v.current) return;
1241
+ _(!0);
1242
+ let e = setTimeout(() => {
1243
+ v.current = i, f(i);
1244
+ }, Ie), t = setTimeout(() => _(!1), Le);
1245
+ return () => {
1246
+ clearTimeout(e), clearTimeout(t);
1247
+ };
1248
+ }, [i]);
1249
+ let y = r.length, b = r[d], x = o === "hazard", S = s ?? (x ? "// OVERRIDE_PROTOCOL" : "SYS_VISUALIZER");
1250
+ function C(e) {
1251
+ h || e === i || a((e + y) % y);
1252
+ }
1253
+ let w = h && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
1254
+ "aria-hidden": "true",
1255
+ className: `animate-slice-cyan absolute inset-0 h-full w-full bg-cover bg-center opacity-60 mix-blend-screen ${x ? "drop-shadow-[-10px_0_0_theme(colors.brand.warning)]" : "drop-shadow-[-8px_0_0_theme(colors.brand.primary)]"}`,
1256
+ style: { backgroundImage: `url('${b.src}')` }
1257
+ }), /* @__PURE__ */ t("div", {
1258
+ "aria-hidden": "true",
1259
+ className: `animate-slice-magenta absolute inset-0 h-full w-full bg-cover bg-center opacity-60 mix-blend-screen ${x ? "drop-shadow-[10px_0_0_theme(colors.brand.alert)]" : "drop-shadow-[8px_0_0_theme(colors.brand.secondary)]"}`,
1260
+ style: { backgroundImage: `url('${b.src}')` }
1261
+ })] }), T = /* @__PURE__ */ t(e, { children: r.map((e, n) => /* @__PURE__ */ t("button", {
1262
+ type: "button",
1263
+ onClick: () => C(n),
1264
+ "aria-label": `Go to slide ${n + 1}`,
1265
+ "aria-current": n === i ? "true" : void 0,
1266
+ className: x ? ["h-2.5 w-2.5 rotate-45 border transition-all", n === i ? "border-brand-warning bg-brand-warning shadow-[0_0_10px_theme(colors.brand.warning)]" : "border-brand-alert bg-transparent hover:bg-brand-alert"].join(" ") : ["h-1.5 w-6 transition-all", n === i ? "bg-brand-primary shadow-[0_0_8px_theme(colors.brand.primary)]" : "bg-slate-300 hover:bg-brand-secondary dark:bg-slate-700"].join(" ")
1267
+ }, e.src)) }), E = /* @__PURE__ */ n("div", {
1268
+ className: x ? "relative h-[300px] w-full overflow-hidden border border-brand-alert/50 bg-black sm:h-[450px]" : "relative h-[250px] w-full overflow-hidden border border-slate-800 bg-[#050608] sm:h-[380px]",
1269
+ children: [
1270
+ /* @__PURE__ */ t("img", {
1271
+ src: b.src,
1272
+ alt: b.alt,
1273
+ className: [
1274
+ "absolute inset-0 h-full w-full object-cover transition-opacity duration-300",
1275
+ x ? "opacity-80 mix-blend-luminosity" : "",
1276
+ h ? "opacity-80 grayscale contrast-150" : ""
1277
+ ].filter(Boolean).join(" ")
1278
+ }),
1279
+ w,
1280
+ x ? /* @__PURE__ */ n(e, { children: [
1281
+ /* @__PURE__ */ n("div", {
1282
+ "aria-hidden": "true",
1283
+ className: "pointer-events-none absolute inset-2",
1284
+ children: [/* @__PURE__ */ t("div", { className: "absolute left-0 top-0 h-8 w-8 border-l-4 border-t-4 border-brand-warning" }), /* @__PURE__ */ t("div", { className: "absolute bottom-0 right-0 h-8 w-8 border-b-4 border-r-4 border-brand-alert" })]
1285
+ }),
1286
+ /* @__PURE__ */ t("div", {
1287
+ className: "absolute right-4 top-1/2 z-10 flex -translate-y-1/2 flex-col gap-2",
1288
+ children: T
1289
+ }),
1290
+ /* @__PURE__ */ t("button", {
1291
+ type: "button",
1292
+ onClick: () => C(i - 1),
1293
+ "aria-label": "Previous slide",
1294
+ className: "absolute left-4 top-1/2 z-10 flex h-10 w-10 -translate-y-1/2 items-center justify-center border-2 border-brand-alert bg-black/60 text-brand-alert backdrop-blur-sm transition-all hover:bg-brand-alert hover:text-black",
1295
+ children: /* @__PURE__ */ t(Re, { direction: "left" })
1296
+ }),
1297
+ /* @__PURE__ */ t("button", {
1298
+ type: "button",
1299
+ onClick: () => C(i + 1),
1300
+ "aria-label": "Next slide",
1301
+ className: "absolute right-12 top-1/2 z-10 flex h-10 w-10 -translate-y-1/2 items-center justify-center border-2 border-brand-warning bg-black/60 text-brand-warning backdrop-blur-sm transition-all hover:bg-brand-warning hover:text-black",
1302
+ children: /* @__PURE__ */ t(Re, { direction: "right" })
1303
+ })
1304
+ ] }) : /* @__PURE__ */ n("div", {
1305
+ "aria-hidden": "true",
1306
+ className: "pointer-events-none absolute inset-4 border border-brand-primary/20",
1307
+ children: [
1308
+ /* @__PURE__ */ t("div", { className: "absolute left-0 top-0 h-4 w-4 border-l border-t border-brand-primary/50" }),
1309
+ /* @__PURE__ */ t("div", { className: "absolute right-0 top-0 h-4 w-4 border-r border-t border-brand-primary/50" }),
1310
+ /* @__PURE__ */ t("div", { className: "absolute bottom-0 left-0 h-4 w-4 border-b border-l border-brand-primary/50" }),
1311
+ /* @__PURE__ */ t("div", { className: "absolute bottom-0 right-0 h-4 w-4 border-b border-r border-brand-primary/50" })
1312
+ ]
1313
+ })
1314
+ ]
1315
+ }), D = /* @__PURE__ */ n("div", {
1316
+ className: [
1317
+ "relative z-10 flex w-full flex-col p-1 sm:p-2",
1318
+ x ? "clip-chamfer-lg border-2 border-brand-alert bg-brand-darkSurface shadow-[0_0_25px_theme(colors.brand.alert/0.15)]" : "border-2 border-slate-900 bg-white shadow-2xl dark:border-white dark:bg-brand-darkSurface",
1319
+ l
1320
+ ].filter(Boolean).join(" "),
1321
+ children: [
1322
+ /* @__PURE__ */ n("div", {
1323
+ className: ["mb-1 flex items-center justify-between px-3 py-2 font-mono text-[10px] font-bold uppercase tracking-widest sm:mb-2 sm:text-xs", x ? "bg-hazard border-b-2 border-brand-alert" : "border-b-2 border-slate-900 text-slate-500 dark:border-white"].join(" "),
1324
+ children: [x ? /* @__PURE__ */ t("span", {
1325
+ className: "border border-brand-warning bg-black px-2 py-0.5 text-brand-warning",
1326
+ children: S
1327
+ }) : /* @__PURE__ */ n("span", {
1328
+ className: "flex items-center gap-2",
1329
+ children: [/* @__PURE__ */ t("span", {
1330
+ className: "h-1.5 w-1.5 animate-pulse bg-brand-primary",
1331
+ "aria-hidden": "true"
1332
+ }), S]
1333
+ }), /* @__PURE__ */ n("span", {
1334
+ "aria-live": "polite",
1335
+ className: x ? "flex items-center gap-2 border border-brand-alert bg-black px-2 py-0.5 text-brand-alert" : "text-brand-secondary",
1336
+ children: [x && /* @__PURE__ */ t("span", {
1337
+ className: "h-1.5 w-1.5 animate-ping bg-brand-alert",
1338
+ "aria-hidden": "true"
1339
+ }), x ? `FEED ${Z(i + 1)} / ${Z(y)}` : `DATA_STREAM: [ ${Z(i + 1)} / ${Z(y)} ]`]
1340
+ })]
1341
+ }),
1342
+ E,
1343
+ !x && /* @__PURE__ */ n("div", {
1344
+ className: "mt-1 flex flex-col items-center justify-between gap-4 border-t-2 border-slate-900 bg-slate-50 px-2 py-3 dark:border-white dark:bg-black/50 sm:mt-2 sm:flex-row",
1345
+ children: [/* @__PURE__ */ t("div", {
1346
+ className: "flex items-center gap-1.5 px-2",
1347
+ children: T
1348
+ }), /* @__PURE__ */ n("div", {
1349
+ className: "flex items-center gap-3 font-mono",
1350
+ children: [/* @__PURE__ */ t("button", {
1351
+ type: "button",
1352
+ onClick: () => C(i - 1),
1353
+ className: "clip-chamfer border-2 border-slate-900 px-4 py-2 text-xs font-black uppercase tracking-widest text-slate-900 transition-colors hover:bg-slate-900 hover:text-brand-primary dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-slate-900",
1354
+ children: "< Prev"
1355
+ }), /* @__PURE__ */ t("button", {
1356
+ type: "button",
1357
+ onClick: () => C(i + 1),
1358
+ className: "clip-chamfer border-2 border-transparent bg-slate-900 px-4 py-2 text-xs font-black uppercase tracking-widest text-brand-primary transition-colors hover:bg-brand-primary hover:text-slate-950 dark:bg-white dark:text-slate-950",
1359
+ children: "Next >"
1360
+ })]
1361
+ })]
1362
+ })
1363
+ ]
1364
+ });
1365
+ return c ? /* @__PURE__ */ t(g, {
1366
+ tone: x ? "hazard" : "default",
1367
+ className: `flex w-full ${l}`,
1368
+ children: D
1369
+ }) : D;
1370
+ }
1371
+ //#endregion
1372
+ //#region src/components/Table/TableCheckbox.tsx
1373
+ function Q({ indeterminate: e = !1, checked: r = !1, className: i = "", ...a }) {
1374
+ let o = r || e;
1375
+ return /* @__PURE__ */ n("span", {
1376
+ className: `relative inline-flex h-5 w-5 shrink-0 ${i}`,
1377
+ children: [/* @__PURE__ */ t("input", {
1378
+ type: "checkbox",
1379
+ checked: r,
1380
+ "aria-checked": e ? "mixed" : r,
1381
+ className: "peer absolute inset-0 z-10 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",
1382
+ ...a
1383
+ }), /* @__PURE__ */ t("span", {
1384
+ "aria-hidden": "true",
1385
+ className: `flex h-full w-full items-center justify-center border-2 transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-brand-primary peer-focus-visible:ring-offset-2 peer-disabled:bg-striped dark:peer-focus-visible:ring-offset-brand-dark ${o ? "border-brand-primary bg-brand-primary text-slate-950 shadow-glow-primary" : "border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput"}`,
1386
+ children: o && /* @__PURE__ */ t("svg", {
1387
+ viewBox: "0 0 24 24",
1388
+ width: "12",
1389
+ height: "12",
1390
+ fill: "none",
1391
+ stroke: "currentColor",
1392
+ strokeWidth: "4",
1393
+ strokeLinecap: "square",
1394
+ strokeLinejoin: "miter",
1395
+ className: "animate-radio-in",
1396
+ children: /* @__PURE__ */ t("path", { d: e ? "M5 12h14" : "M4 12l5 5L20 6" })
1397
+ })
1398
+ })]
1399
+ });
1400
+ }
1401
+ //#endregion
1402
+ //#region src/components/Table/Table.tsx
1403
+ function $(e, t) {
1404
+ if (e.value) return e.value(t);
1405
+ let n = t[e.key];
1406
+ return typeof n == "number" ? n : String(n ?? "");
1407
+ }
1408
+ var Be = {
1409
+ left: "text-left",
1410
+ right: "text-right",
1411
+ center: "text-center"
1412
+ };
1413
+ function Ve() {
1414
+ return /* @__PURE__ */ t("svg", {
1415
+ viewBox: "0 0 24 24",
1416
+ width: "16",
1417
+ height: "16",
1418
+ fill: "none",
1419
+ stroke: "currentColor",
1420
+ strokeWidth: "2.5",
1421
+ strokeLinecap: "square",
1422
+ "aria-hidden": "true",
1423
+ children: /* @__PURE__ */ t("path", { d: "M10 3a7 7 0 100 14 7 7 0 000-14zM15 15l6 6" })
1424
+ });
1425
+ }
1426
+ function He({ direction: e }) {
1427
+ return /* @__PURE__ */ n("svg", {
1428
+ viewBox: "0 0 12 14",
1429
+ width: "10",
1430
+ height: "12",
1431
+ fill: "none",
1432
+ stroke: "currentColor",
1433
+ strokeWidth: "2",
1434
+ strokeLinecap: "square",
1435
+ "aria-hidden": "true",
1436
+ children: [/* @__PURE__ */ t("path", {
1437
+ d: "M2 5l4-3 4 3",
1438
+ className: e === "asc" ? "stroke-brand-primary" : "opacity-40"
1439
+ }), /* @__PURE__ */ t("path", {
1440
+ d: "M2 9l4 3 4-3",
1441
+ className: e === "desc" ? "stroke-brand-primary" : "opacity-40"
1442
+ })]
1443
+ });
1444
+ }
1445
+ function Ue({ open: e }) {
1446
+ return /* @__PURE__ */ t("svg", {
1447
+ viewBox: "0 0 24 24",
1448
+ width: "14",
1449
+ height: "14",
1450
+ fill: "none",
1451
+ stroke: "currentColor",
1452
+ strokeWidth: "3",
1453
+ strokeLinecap: "square",
1454
+ className: `transition-transform ${e ? "rotate-180" : ""}`,
1455
+ "aria-hidden": "true",
1456
+ children: /* @__PURE__ */ t("path", { d: "M5 9l7 7 7-7" })
1457
+ });
1458
+ }
1459
+ function We({ columns: e, rows: r, getRowId: a, title: o, description: s, caption: c, searchable: l = !1, searchPlaceholder: u = "Search", pageSize: d, selectable: p = !1, selectedIds: h, onSelectionChange: g, renderExpanded: _, loading: v = !1, emptyMessage: y = "// NO RECORDS", glitch: b = !0, className: x = "" }) {
1460
+ let [S, C] = m(""), [w, T] = m(null), [E, D] = m(1), [O, ee] = m([]), [te, k] = m([]), A = h ?? O, j = (e) => {
1461
+ h === void 0 && ee(e), g?.(e);
1462
+ }, N = f(() => {
1463
+ let t = S.trim().toLowerCase(), n = t ? r.filter((n) => e.some((e) => String($(e, n)).toLowerCase().includes(t))) : r, i = w && e.find((e) => e.key === w.key);
1464
+ if (w && i) {
1465
+ let e = w.direction === "asc" ? 1 : -1;
1466
+ n = [...n].sort((t, n) => {
1467
+ let r = $(i, t), a = $(i, n);
1468
+ return typeof r == "number" && typeof a == "number" ? (r - a) * e : String(r).localeCompare(String(a), void 0, { numeric: !0 }) * e;
1469
+ });
1470
+ }
1471
+ return n;
1472
+ }, [
1473
+ r,
1474
+ e,
1475
+ S,
1476
+ w
1477
+ ]), P = d ? Math.max(1, Math.ceil(N.length / d)) : 1, F = Math.min(E, P), I = d ? N.slice((F - 1) * d, F * d) : N, z = I.map(a), B = z.filter((e) => A.includes(e)), V = z.length > 0 && B.length === z.length, re = () => j(V ? A.filter((e) => !z.includes(e)) : [.../* @__PURE__ */ new Set([...A, ...z])]), ie = (e) => j(A.includes(e) ? A.filter((t) => t !== e) : [...A, e]), H = (e) => k((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]), U = (e) => T((t) => t?.key === e ? t.direction === "asc" ? {
1478
+ key: e,
1479
+ direction: "desc"
1480
+ } : null : {
1481
+ key: e,
1482
+ direction: "asc"
1483
+ }), W = e.length + +!!p + +!!_, G = `${F}|${w?.key}|${w?.direction}|${S}`, K = (e) => ({
1484
+ "--i": e,
1485
+ "--dir": 1
1486
+ }), q = b ? "animate-sidebar-item [animation-delay:calc(var(--i)*40ms)] motion-reduce:!animate-none" : "";
1487
+ return /* @__PURE__ */ n(M, {
1488
+ glitch: !1,
1489
+ rounded: "lg",
1490
+ padding: "md",
1491
+ className: x,
1492
+ children: [
1493
+ (o || s) && /* @__PURE__ */ n("div", {
1494
+ className: "space-y-1",
1495
+ children: [o && /* @__PURE__ */ t(L, {
1496
+ size: "sm",
1497
+ children: o
1498
+ }), s && /* @__PURE__ */ t(R, { children: s })]
1499
+ }),
1500
+ (l || A.length > 0) && /* @__PURE__ */ n("div", {
1501
+ className: "flex flex-wrap items-center justify-between gap-3",
1502
+ children: [l ? /* @__PURE__ */ t(ne, {
1503
+ size: "sm",
1504
+ type: "search",
1505
+ "aria-label": u,
1506
+ placeholder: u,
1507
+ leftIcon: /* @__PURE__ */ t(Ve, {}),
1508
+ value: S,
1509
+ onChange: (e) => {
1510
+ C(e.target.value), D(1);
1511
+ },
1512
+ containerClassName: "w-full max-w-sm"
1513
+ }) : /* @__PURE__ */ t("span", {}), A.length > 0 && /* @__PURE__ */ n("span", {
1514
+ className: "font-mono text-xs font-black uppercase tracking-wider text-brand-primary",
1515
+ children: [
1516
+ "[",
1517
+ A.length,
1518
+ "] selected"
1519
+ ]
1520
+ })]
1521
+ }),
1522
+ /* @__PURE__ */ t("div", {
1523
+ className: "overflow-x-auto border-2 border-slate-900 dark:border-white",
1524
+ children: /* @__PURE__ */ n("table", {
1525
+ className: "w-full border-collapse text-sm",
1526
+ children: [
1527
+ /* @__PURE__ */ t("caption", {
1528
+ className: "sr-only",
1529
+ children: c ?? (typeof o == "string" ? o : "Data table")
1530
+ }),
1531
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", {
1532
+ className: "border-b-2 border-slate-900 bg-slate-50 dark:border-white dark:bg-brand-darkSurfaceSub",
1533
+ children: [
1534
+ p && /* @__PURE__ */ t("th", {
1535
+ scope: "col",
1536
+ className: "w-12 px-4 py-3",
1537
+ children: /* @__PURE__ */ t(Q, {
1538
+ "aria-label": "Select all rows on this page",
1539
+ checked: V,
1540
+ indeterminate: !V && B.length > 0,
1541
+ disabled: v || I.length === 0,
1542
+ onChange: re
1543
+ })
1544
+ }),
1545
+ _ && /* @__PURE__ */ t("th", {
1546
+ scope: "col",
1547
+ className: "w-10",
1548
+ "aria-label": "Expand"
1549
+ }),
1550
+ e.map((e) => {
1551
+ let r = w?.key === e.key ? w.direction : void 0;
1552
+ return /* @__PURE__ */ t("th", {
1553
+ scope: "col",
1554
+ "aria-sort": r ? r === "asc" ? "ascending" : "descending" : e.sortable ? "none" : void 0,
1555
+ className: `px-4 py-3 font-mono text-[10px] font-black uppercase tracking-widest text-slate-500 dark:text-slate-400 ${Be[e.align ?? "left"]}`,
1556
+ children: e.sortable ? /* @__PURE__ */ n("button", {
1557
+ type: "button",
1558
+ onClick: () => U(e.key),
1559
+ className: `inline-flex items-center gap-1.5 uppercase transition-colors hover:text-brand-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-brand-primary ${r ? "text-slate-900 dark:text-white" : ""}`,
1560
+ children: [e.header, /* @__PURE__ */ t(He, { direction: r })]
1561
+ }) : e.header
1562
+ }, e.key);
1563
+ })
1564
+ ]
1565
+ }) }),
1566
+ /* @__PURE__ */ t("tbody", { children: v ? Array.from({ length: d ?? 5 }, (e, n) => /* @__PURE__ */ t("tr", {
1567
+ className: "border-b border-slate-200 last:border-0 dark:border-slate-800",
1568
+ children: /* @__PURE__ */ t("td", {
1569
+ colSpan: W,
1570
+ className: "px-4 py-3",
1571
+ children: /* @__PURE__ */ t(Fe, {
1572
+ variant: "laser",
1573
+ rounded: "none",
1574
+ className: "h-5 w-full"
1575
+ })
1576
+ })
1577
+ }, n)) : I.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1578
+ colSpan: W,
1579
+ className: "px-4 py-10 text-center font-mono text-xs font-black uppercase tracking-widest text-slate-400",
1580
+ children: y
1581
+ }) }) : I.map((r, o) => {
1582
+ let s = a(r), c = A.includes(s), l = te.includes(s);
1583
+ return /* @__PURE__ */ n(i, { children: [/* @__PURE__ */ n("tr", {
1584
+ style: K(o),
1585
+ "aria-selected": p ? c : void 0,
1586
+ className: `border-b border-slate-200 transition-colors last:border-0 dark:border-slate-800 ${q} ${c ? "bg-brand-primary/10" : "hover:bg-slate-50 dark:hover:bg-brand-darkSurfaceSub"}`,
1587
+ children: [
1588
+ p && /* @__PURE__ */ t("td", {
1589
+ className: `w-12 px-4 py-3 ${c ? "shadow-[inset_4px_0_0_theme(colors.brand.primary)]" : ""}`,
1590
+ children: /* @__PURE__ */ t(Q, {
1591
+ "aria-label": `Select row ${s}`,
1592
+ checked: c,
1593
+ onChange: () => ie(s)
1594
+ })
1595
+ }),
1596
+ _ && /* @__PURE__ */ t("td", {
1597
+ className: "w-10 pr-2",
1598
+ children: /* @__PURE__ */ t("button", {
1599
+ type: "button",
1600
+ "aria-expanded": l,
1601
+ "aria-label": l ? `Collapse row ${s}` : `Expand row ${s}`,
1602
+ onClick: () => H(s),
1603
+ className: "flex h-7 w-7 items-center justify-center text-slate-500 transition-colors hover:text-brand-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-brand-primary",
1604
+ children: /* @__PURE__ */ t(Ue, { open: l })
1605
+ })
1606
+ }),
1607
+ e.map((e) => /* @__PURE__ */ t("td", {
1608
+ className: `px-4 py-3 font-medium text-slate-900 dark:text-white ${Be[e.align ?? "left"]} ${e.className ?? ""}`,
1609
+ children: e.cell ? e.cell(r) : String($(e, r))
1610
+ }, e.key))
1611
+ ]
1612
+ }), _ && l && /* @__PURE__ */ t("tr", {
1613
+ className: "border-b border-slate-200 bg-slate-50 last:border-0 dark:border-slate-800 dark:bg-brand-darkSurfaceSub",
1614
+ children: /* @__PURE__ */ t("td", {
1615
+ colSpan: W,
1616
+ className: "p-0",
1617
+ children: /* @__PURE__ */ t("div", {
1618
+ className: `px-5 py-3 text-sm text-slate-600 dark:text-slate-300 ${b ? "animate-navbar-panel motion-reduce:!animate-none" : ""}`,
1619
+ children: _(r)
1620
+ })
1621
+ })
1622
+ })] }, s);
1623
+ }) }, G)
1624
+ ]
1625
+ })
1626
+ }),
1627
+ d && !v && N.length > 0 && /* @__PURE__ */ t(ue, {
1628
+ currentPage: F,
1629
+ totalPages: P,
1630
+ onPageChange: D,
1631
+ totalItems: N.length,
1632
+ pageSize: d,
1633
+ glitch: b,
1634
+ className: "!border-0 !bg-transparent !p-0"
1635
+ })
1636
+ ]
1637
+ });
1638
+ }
1639
+ //#endregion
1640
+ //#region src/components/Tooltip/Tooltip.tsx
1641
+ var Ge = {
1642
+ top: "bottom-full left-1/2 mb-2.5 -translate-x-1/2",
1643
+ bottom: "top-full left-1/2 mt-2.5 -translate-x-1/2",
1644
+ left: "right-full top-1/2 mr-2.5 -translate-y-1/2",
1645
+ right: "left-full top-1/2 ml-2.5 -translate-y-1/2"
1646
+ }, Ke = {
1647
+ top: "-bottom-[5px] left-1/2 -translate-x-1/2",
1648
+ bottom: "-top-[5px] left-1/2 -translate-x-1/2",
1649
+ left: "-right-[5px] top-1/2 -translate-y-1/2",
1650
+ right: "-left-[5px] top-1/2 -translate-y-1/2"
1651
+ };
1652
+ function qe({ content: r, shortcut: i, side: o = "top", tone: s = "default", delay: l = 150, glitch: f = !0, open: h, className: g = "", children: _ }) {
1653
+ let v = d(), [y, b] = m(!1), x = p(void 0), S = h ?? y;
1654
+ u(() => () => clearTimeout(x.current), []);
1655
+ let C = (e) => {
1656
+ clearTimeout(x.current), e <= 0 ? b(!0) : x.current = setTimeout(() => b(!0), e);
1657
+ }, w = () => {
1658
+ clearTimeout(x.current), b(!1);
1659
+ }, T = s === "alert", E = T ? "bg-brand-alert" : "bg-brand-primary", D = c(_) ? a(_, { "aria-describedby": S ? v : void 0 }) : _;
1660
+ return /* @__PURE__ */ n("span", {
1661
+ className: `relative inline-flex ${g}`,
1662
+ onMouseEnter: () => C(l),
1663
+ onMouseLeave: w,
1664
+ onFocus: () => C(0),
1665
+ onBlur: w,
1666
+ onKeyDown: (e) => e.key === "Escape" && w(),
1667
+ children: [D, S && /* @__PURE__ */ t("span", {
1668
+ id: v,
1669
+ role: "tooltip",
1670
+ className: `pointer-events-none absolute z-50 whitespace-nowrap ${Ge[o]}`,
1671
+ children: /* @__PURE__ */ n("span", {
1672
+ className: "relative block",
1673
+ children: [
1674
+ /* @__PURE__ */ t("span", {
1675
+ "aria-hidden": "true",
1676
+ className: `absolute inset-0 border-2 bg-slate-900 dark:bg-brand-darkSurface ${T ? "border-brand-alert" : "border-slate-900 dark:border-brand-primary"} ${f ? "animate-tooltip-frame" : ""} motion-reduce:!animate-none`
1677
+ }),
1678
+ f && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
1679
+ "aria-hidden": "true",
1680
+ className: "absolute -inset-0.5 bg-brand-primary opacity-0 animate-radio-slice-cyan motion-reduce:hidden"
1681
+ }), /* @__PURE__ */ t("span", {
1682
+ "aria-hidden": "true",
1683
+ className: "absolute -inset-0.5 bg-brand-secondary opacity-0 animate-radio-slice-magenta motion-reduce:hidden"
1684
+ })] }),
1685
+ /* @__PURE__ */ t("span", {
1686
+ "aria-hidden": "true",
1687
+ className: `absolute -top-0.5 right-2 h-[3px] w-6 ${E}`
1688
+ }),
1689
+ /* @__PURE__ */ t("span", {
1690
+ "aria-hidden": "true",
1691
+ className: "absolute -bottom-0.5 left-2 h-[3px] w-6 bg-brand-secondary"
1692
+ }),
1693
+ /* @__PURE__ */ t("span", {
1694
+ "aria-hidden": "true",
1695
+ className: `absolute h-2 w-2 rotate-45 border-slate-900 bg-slate-900 dark:bg-brand-darkSurface ${Ke[o]}`
1696
+ }),
1697
+ /* @__PURE__ */ n("span", {
1698
+ className: "relative z-10 flex items-center gap-2 px-2.5 py-1.5 font-mono text-xs font-bold uppercase tracking-wider text-white animate-tooltip-text motion-reduce:!animate-none",
1699
+ children: [/* @__PURE__ */ t("span", { children: r }), i && /* @__PURE__ */ t("kbd", {
1700
+ className: `border px-1 text-[10px] font-black leading-4 ${T ? "border-brand-alert text-brand-alert" : "border-white/40 text-brand-primary"}`,
1701
+ children: i
1702
+ })]
1703
+ })
1704
+ ]
1705
+ })
1706
+ })]
1707
+ });
1708
+ }
1709
+ //#endregion
1710
+ export { w as Badge, te as Button, M as Card, R as CardDescription, z as CardFooter, F as CardMedia, L as CardTitle, g as CyberFx, ne as Input, W as Modal, q as Navbar, ae as NavbarItem, oe as NavbarMenu, se as NavbarMenuLink, ue as Pagination, fe as PaginationJumpTo, pe as PaginationLoadMore, de as PaginationStepper, ve as Progress, Te as Radio, Ee as RadioGroup, Oe as Sidebar, je as SidebarItem, Ae as SidebarNav, ke as SidebarSection, Me as SidebarToggle, Fe as Skeleton, ze as Slider, T as Spinner, We as Table, Q as TableCheckbox, qe as Tooltip };
1711
+
1712
+ //# sourceMappingURL=index.js.map