@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.
- package/LICENSE +201 -0
- package/README.md +139 -2
- package/dist-lib/components/Badge/Badge.d.ts +26 -0
- package/dist-lib/components/Badge/index.d.ts +2 -0
- package/dist-lib/components/Button/Button.d.ts +22 -0
- package/dist-lib/components/Button/index.d.ts +2 -0
- package/dist-lib/components/Card/Card.d.ts +45 -0
- package/dist-lib/components/Card/index.d.ts +2 -0
- package/dist-lib/components/CyberFx.d.ts +10 -0
- package/dist-lib/components/Input/Input.d.ts +24 -0
- package/dist-lib/components/Input/index.d.ts +2 -0
- package/dist-lib/components/Modal/Modal.d.ts +20 -0
- package/dist-lib/components/Modal/index.d.ts +2 -0
- package/dist-lib/components/Navbar/Navbar.d.ts +36 -0
- package/dist-lib/components/Navbar/index.d.ts +2 -0
- package/dist-lib/components/Pagination/Pagination.d.ts +33 -0
- package/dist-lib/components/Pagination/index.d.ts +2 -0
- package/dist-lib/components/Progress/Progress.d.ts +21 -0
- package/dist-lib/components/Progress/index.d.ts +2 -0
- package/dist-lib/components/Radio/Radio.d.ts +11 -0
- package/dist-lib/components/Radio/RadioGroup.d.ts +30 -0
- package/dist-lib/components/Radio/context.d.ts +18 -0
- package/dist-lib/components/Radio/index.d.ts +5 -0
- package/dist-lib/components/Sidebar/Sidebar.d.ts +46 -0
- package/dist-lib/components/Sidebar/index.d.ts +2 -0
- package/dist-lib/components/Skeleton/Skeleton.d.ts +9 -0
- package/dist-lib/components/Skeleton/index.d.ts +2 -0
- package/dist-lib/components/Slider/Slider.d.ts +18 -0
- package/dist-lib/components/Slider/index.d.ts +2 -0
- package/dist-lib/components/Spinner.d.ts +4 -0
- package/dist-lib/components/Table/Table.d.ts +43 -0
- package/dist-lib/components/Table/TableCheckbox.d.ts +7 -0
- package/dist-lib/components/Table/index.d.ts +4 -0
- package/dist-lib/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist-lib/components/Tooltip/index.d.ts +2 -0
- package/dist-lib/index.cjs +2 -0
- package/dist-lib/index.cjs.map +1 -0
- package/dist-lib/index.d.ts +18 -0
- package/dist-lib/index.js +1712 -0
- package/dist-lib/index.js.map +1 -0
- package/dist-lib/styles.css +952 -0
- package/package.json +89 -4
- package/tailwind-preset.cjs +66 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { RadioLook, RadioShape, RadioSize } from './context';
|
|
3
|
+
export interface RadioGroupProps {
|
|
4
|
+
/** Group heading, also used as the accessible name. */
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
/** Controlled value. */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Initial value when uncontrolled. */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
/** Native `name` shared by every radio — generated when omitted. */
|
|
12
|
+
name?: string;
|
|
13
|
+
size?: RadioSize;
|
|
14
|
+
/** `dot` is a compact marker + label; `card` is a full-width HUD row wrapped in the glitch engine. */
|
|
15
|
+
look?: RadioLook;
|
|
16
|
+
shape?: RadioShape;
|
|
17
|
+
/** Plays a one-shot glitch on the newly selected option and a glitch-out on the previous one. */
|
|
18
|
+
glitch?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Presence puts the group in its error state and shows this message below it. */
|
|
21
|
+
error?: string;
|
|
22
|
+
/** Helper text shown below the group when there's no error. */
|
|
23
|
+
hint?: string;
|
|
24
|
+
/** Shows a "// REQUIRED" marker next to the label. */
|
|
25
|
+
required?: boolean;
|
|
26
|
+
orientation?: 'vertical' | 'horizontal';
|
|
27
|
+
className?: string;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare function RadioGroup({ label, value, defaultValue, onValueChange, name, size, look, shape, glitch, disabled, error, hint, required, orientation, className, children, }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type RadioSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type RadioLook = 'dot' | 'card';
|
|
3
|
+
export type RadioShape = 'square' | 'round';
|
|
4
|
+
export type RadioFx = 'in' | 'out' | undefined;
|
|
5
|
+
export interface RadioContextValue {
|
|
6
|
+
name: string;
|
|
7
|
+
current: string | undefined;
|
|
8
|
+
previous: string | undefined;
|
|
9
|
+
select: (value: string) => void;
|
|
10
|
+
size: RadioSize;
|
|
11
|
+
look: RadioLook;
|
|
12
|
+
shape: RadioShape;
|
|
13
|
+
glitch: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
error: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const RadioContext: import("react").Context<RadioContextValue | null>;
|
|
18
|
+
export declare function useRadioContext(): RadioContextValue;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type SidebarSide = 'left' | 'right';
|
|
3
|
+
export interface SidebarProps {
|
|
4
|
+
/** Controlled open state. */
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/** Initial open state when uncontrolled. */
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
side?: SidebarSide;
|
|
10
|
+
/** Heading shown at the start of the header row. */
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
/** Buttons at the end of the header row (add, close, …). */
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
/** Pinned to the bottom of the panel. */
|
|
15
|
+
footer?: ReactNode;
|
|
16
|
+
/** Floats over the page with a backdrop; Escape and backdrop click close it. Default is an inline panel you place in your own layout. */
|
|
17
|
+
overlay?: boolean;
|
|
18
|
+
/** Glitch-in on open, glitch-out on close, and staggered item entrance. */
|
|
19
|
+
glitch?: boolean;
|
|
20
|
+
/** Tailwind width/height classes for the panel. */
|
|
21
|
+
className?: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function Sidebar({ open, defaultOpen, onOpenChange, side, title, actions, footer, overlay, glitch, className, children, }: SidebarProps): import("react").JSX.Element | null;
|
|
25
|
+
export interface SidebarSectionProps {
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare function SidebarSection({ label, children }: SidebarSectionProps): import("react").JSX.Element;
|
|
30
|
+
/** Wraps items so each one glitches in with a short stagger. */
|
|
31
|
+
export declare function SidebarNav({ children }: {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
34
|
+
export interface SidebarItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
35
|
+
active?: boolean;
|
|
36
|
+
icon?: ReactNode;
|
|
37
|
+
/** Trailing slot — a count badge, a shortcut, a status pip. */
|
|
38
|
+
trailing?: ReactNode;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export declare function SidebarItem({ active, icon, trailing, type, className, children, ...rest }: SidebarItemProps): import("react").JSX.Element;
|
|
42
|
+
export interface SidebarToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
43
|
+
open?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** Square icon button for header actions — the panel-toggle glyph by default. */
|
|
46
|
+
export declare function SidebarToggle({ open, type, className, ...rest }: SidebarToggleProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'laser' | 'bitmap' | 'stripes' | 'hazard';
|
|
3
|
+
export type SkeletonRounding = 'none' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
4
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Sweep treatment layered over the block. Width/height are entirely up to `className` (e.g. `h-3 w-2/3`). */
|
|
6
|
+
variant?: SkeletonVariant;
|
|
7
|
+
rounded?: SkeletonRounding;
|
|
8
|
+
}
|
|
9
|
+
export declare function Skeleton({ variant, rounded, className, ...rest }: SkeletonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SliderSlide {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
}
|
|
5
|
+
export type SliderTone = 'default' | 'hazard';
|
|
6
|
+
export interface SliderProps {
|
|
7
|
+
slides: SliderSlide[];
|
|
8
|
+
currentIndex: number;
|
|
9
|
+
onIndexChange: (index: number) => void;
|
|
10
|
+
/** 'hazard' swaps to the yellow/red override-terminal skin: floating overlay controls, diamond pips, always-dark surface. */
|
|
11
|
+
tone?: SliderTone;
|
|
12
|
+
/** Header readout label. Defaults to a tone-appropriate value. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Wraps the frame in the shared .cyber-fx glitch engine. */
|
|
15
|
+
glitch?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Slider({ slides, currentIndex, onIndexChange, tone, label, glitch, className, }: SliderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type SortDirection = 'asc' | 'desc';
|
|
3
|
+
export interface SortState {
|
|
4
|
+
key: string;
|
|
5
|
+
direction: SortDirection;
|
|
6
|
+
}
|
|
7
|
+
export interface TableColumn<T> {
|
|
8
|
+
key: string;
|
|
9
|
+
header: ReactNode;
|
|
10
|
+
/** Custom cell renderer. Defaults to `String(row[key])`. */
|
|
11
|
+
cell?: (row: T) => ReactNode;
|
|
12
|
+
/** Raw value used for sorting and search. Defaults to `row[key]`. */
|
|
13
|
+
value?: (row: T) => string | number;
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
align?: 'left' | 'right' | 'center';
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TableProps<T> {
|
|
19
|
+
columns: TableColumn<T>[];
|
|
20
|
+
rows: T[];
|
|
21
|
+
getRowId: (row: T) => string;
|
|
22
|
+
title?: ReactNode;
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
/** Accessible table name when there's no `title`. */
|
|
25
|
+
caption?: string;
|
|
26
|
+
/** Adds a search box that filters across every column's value. */
|
|
27
|
+
searchable?: boolean;
|
|
28
|
+
searchPlaceholder?: string;
|
|
29
|
+
/** Rows per page — enables the pager and the "Showing X-Y of Z" summary. */
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
/** Adds a checkbox column with select-all for the current page. */
|
|
32
|
+
selectable?: boolean;
|
|
33
|
+
selectedIds?: string[];
|
|
34
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
35
|
+
/** Adds an expand chevron per row; the returned node renders in a full-width row beneath it. */
|
|
36
|
+
renderExpanded?: (row: T) => ReactNode;
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
emptyMessage?: ReactNode;
|
|
39
|
+
/** Rows glitch in (staggered) whenever the visible page changes — sort, search, paging. */
|
|
40
|
+
glitch?: boolean;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function Table<T>({ columns, rows, getRowId, title, description, caption, searchable, searchPlaceholder, pageSize, selectable, selectedIds, onSelectionChange, renderExpanded, loading, emptyMessage, glitch, className, }: TableProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface TableCheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
3
|
+
/** Dash instead of a check — "some, but not all". */
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Square HUD checkbox used for row selection. Native input underneath, so keyboard and screen readers just work. */
|
|
7
|
+
export declare function TableCheckbox({ indeterminate, checked, className, ...rest }: TableCheckboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export type TooltipTone = 'default' | 'alert';
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/** Tooltip text. */
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
/** Keyboard shortcut shown as a `<kbd>` chip next to the text. */
|
|
8
|
+
shortcut?: string;
|
|
9
|
+
side?: TooltipSide;
|
|
10
|
+
tone?: TooltipTone;
|
|
11
|
+
/** Hover delay in ms before showing. Focus shows immediately. */
|
|
12
|
+
delay?: number;
|
|
13
|
+
/** Plays the glitch-in each time the tooltip appears. */
|
|
14
|
+
glitch?: boolean;
|
|
15
|
+
/** Forces the tooltip open (controlled) — useful for docs and screenshots. */
|
|
16
|
+
open?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
/** The trigger — ideally a single focusable element (button, link, input). */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function Tooltip({ content, shortcut, side, tone, delay, glitch, open: forcedOpen, className, children, }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function r({disabled:t=!1,tone:n=`default`,active:r=!1,className:i=``,children:a}){return(0,e.jsxs)(`span`,{className:`cyber-fx group ${i}`,"data-disabled":t,"data-tone":n,"data-active":r,children:[(0,e.jsx)(`span`,{className:`cyber-bar-top`,"aria-hidden":`true`}),(0,e.jsx)(`span`,{className:`cyber-bar-bottom`,"aria-hidden":`true`}),(0,e.jsx)(`span`,{className:`cyber-pip-left`,"aria-hidden":`true`}),(0,e.jsx)(`span`,{className:`cyber-pip-right`,"aria-hidden":`true`}),(0,e.jsx)(`span`,{className:`chromatic-cyan`,"aria-hidden":`true`}),(0,e.jsx)(`span`,{className:`chromatic-magenta`,"aria-hidden":`true`}),a]})}var i={xs:`px-1.5 py-0.5 text-[9px] gap-1`,sm:`px-3 py-1 text-xs gap-1.5`,md:`px-3.5 py-1.5 text-xs gap-2`},a={none:``,chamfer:`clip-chamfer`,"chamfer-tl-br":`clip-chamfer-tl-br`,tag:`clip-tag pr-2.5`},o={pill:`border border-slate-300 bg-white shadow-sm text-slate-800 dark:border-slate-700 dark:bg-brand-darkSurface dark:text-slate-100`,outline:`border-2 bg-transparent`,solid:``,micro:`border bg-transparent`},s={default:`bg-slate-400 dark:bg-slate-500`,primary:`bg-brand-primary`,secondary:`bg-brand-secondary`,alert:`bg-brand-alert`,warning:`bg-brand-warning`,success:`bg-brand-success`},c={default:`border-slate-900 text-slate-900 dark:border-white dark:text-white`,primary:`border-brand-primary text-brand-primary`,secondary:`border-brand-secondary text-brand-secondary`,alert:`border-brand-alert text-brand-alert`,warning:`border-brand-warning text-brand-warning`,success:`border-brand-success text-brand-success`},l={default:`bg-slate-900 text-white dark:bg-white dark:text-slate-950`,primary:`bg-brand-primary text-slate-950`,secondary:`bg-brand-secondary text-white`,alert:`bg-brand-alert text-white`,warning:`bg-brand-warning text-slate-950`,success:`bg-brand-success text-slate-950`},u={default:`text-slate-700 dark:text-slate-300`,primary:`text-brand-primary`,secondary:`text-brand-secondary`,alert:`text-brand-alert`,warning:`text-brand-warning`,success:`text-brand-success`};function d({variant:t=`default`,look:n=`pill`,size:d=`sm`,chamfer:f=`none`,glitch:p=!1,dot:m=!1,pulse:h=!1,bracket:g=!1,rounded:_=!1,className:v=``,children:y,...b}){let x=`inline-flex items-center font-mono font-bold uppercase tracking-wider whitespace-nowrap`;if(g)return(0,e.jsxs)(`span`,{className:[x,`text-[10px]`,u[t],v].filter(Boolean).join(` `),...b,children:[`[`,y,`]`]});let S=_?`rounded-full`:n===`pill`?`rounded-lg`:`rounded-none`,C=n===`pill`?``:n===`solid`?l[t]:c[t],w=[x,i[d],S,a[f],o[n],C,n===`pill`?`text-glitch-static`:``,p?`relative z-10`:``,v].filter(Boolean).join(` `),T=m?(0,e.jsx)(`span`,{className:[`h-1.5 w-1.5`,n===`pill`?`rounded-full`:``,s[t],h?`animate-pulse`:``].filter(Boolean).join(` `),"aria-hidden":`true`}):null,E=(0,e.jsxs)(`span`,{className:w,...b,children:[T,y]});return p?(0,e.jsx)(r,{children:E}):E}function f({className:t=``}){return(0,e.jsxs)(`svg`,{className:`h-3.5 w-3.5 animate-spin ${t}`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[(0,e.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,e.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]})}var p={primary:`bg-brand-primary text-slate-950 border-2 border-slate-900 dark:border-white hover:brightness-105`,secondary:`bg-brand-secondary text-white border-2 border-transparent hover:opacity-90`,outline:`bg-transparent border-2 border-brand-primary text-slate-900 dark:text-brand-primary hover:bg-brand-primary hover:text-slate-950`,ghost:`bg-transparent border border-slate-900 dark:border-white text-slate-900 dark:text-white hover:border-brand-primary hover:text-brand-primary`,alert:`bg-brand-alert text-white border-2 border-transparent hover:opacity-90`},m={xs:`px-3.5 py-1.5 text-xs gap-1.5`,sm:`px-4 py-2 text-xs gap-1.5`,md:`px-6 py-3 text-xs gap-2`,lg:`px-8 py-4 text-sm gap-2.5`},h={xs:`w-8 h-8`,sm:`w-9 h-9`,md:`w-10 h-10`,lg:`w-12 h-12`},g={none:``,chamfer:`clip-chamfer`,"chamfer-tl-br":`clip-chamfer-tl-br`,tag:`clip-tag pr-3`},_=(0,t.forwardRef)(function({variant:t=`primary`,size:n=`md`,chamfer:i=`none`,glitch:a=!0,loading:o=!1,fullWidth:s=!1,iconOnly:c=!1,leftIcon:l,rightIcon:u,disabled:d=!1,type:_=`button`,className:v=``,children:y,...b},x){let S=d||o,C=[`relative z-10 inline-flex items-center justify-center`,`font-mono font-bold uppercase tracking-wider whitespace-nowrap`,`transition-all duration-150`,S?`cursor-not-allowed pointer-events-none select-none`:`active:translate-y-0.5`,d&&!o?`bg-striped border-2 border-slate-300 text-slate-400 dark:border-slate-800 dark:text-slate-600`:p[t],g[i],c?h[n]:m[n],s?`w-full`:``,v].filter(Boolean).join(` `),w=(0,e.jsxs)(`button`,{ref:x,type:_,disabled:S,"aria-busy":o||void 0,className:C,...b,children:[o?(0,e.jsx)(f,{}):l,y,!o&&u]});return a?(0,e.jsx)(r,{disabled:S,className:s?`flex w-full ${v}`:void 0,children:w}):w}),v={transparent:`border-2 border-dashed border-slate-300 bg-transparent hover:border-solid hover:border-brand-primary dark:border-slate-700`,default:`border-2 border-slate-900 bg-brand-lightSurface dark:border-white dark:bg-brand-darkSurface`,secondary:`border-2 border-transparent bg-brand-lightSurfaceSub hover:border-brand-primary dark:bg-brand-darkSurfaceSub`,tertiary:`border-2 border-transparent bg-brand-lightSurfaceTert hover:border-brand-secondary dark:bg-brand-darkSurfaceTert`},y={sm:`p-5 space-y-3`,md:`p-6 space-y-4`,lg:`p-8 space-y-6`},b={lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`};function x({surface:t=`default`,padding:n=`md`,rounded:i=`2xl`,glitch:a=!0,className:o=``,children:s,...c}){let l=[`relative z-10 w-full transition-colors`,y[n],b[i],v[t],o].filter(Boolean).join(` `),u=(0,e.jsx)(`div`,{className:l,...c,children:s});return a?(0,e.jsx)(r,{className:`flex w-full ${o}`,children:u}):u}var S={sm:`h-12 w-12 text-xl`,md:`h-16 w-16 text-2xl`,lg:`h-20 w-20 text-3xl`},C={square:`rounded-none`,rounded:`rounded-2xl`,circle:`rounded-full`};function w({size:t=`md`,shape:n=`rounded`,className:r=``,children:i,...a}){return(0,e.jsx)(`div`,{className:[`flex items-center justify-center border border-slate-200 bg-slate-100 shadow-inner dark:border-slate-700 dark:bg-slate-800`,S[t],C[n],r].filter(Boolean).join(` `),...a,children:i})}var T={sm:`text-sm`,base:`text-base`,lg:`text-xl`};function E({as:t=`h3`,size:n=`base`,className:r=``,children:i,...a}){return(0,e.jsx)(t,{className:[`font-bold text-slate-900 dark:text-white`,T[n],r].filter(Boolean).join(` `),...a,children:i})}function ee({className:t=``,children:n,...r}){return(0,e.jsx)(`p`,{className:[`text-xs text-slate-500 dark:text-slate-400`,t].filter(Boolean).join(` `),...r,children:n})}function te({className:t=``,children:n,...r}){return(0,e.jsx)(`div`,{className:[`flex items-center gap-2 pt-1`,t].filter(Boolean).join(` `),...r,children:n})}var ne={xs:`px-2.5 py-1 text-xs`,sm:`px-3 py-1.5 text-xs`,md:`px-4 py-2.5 text-sm`,lg:`px-4 py-3.5 text-base`},D={default:`border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput`,subtle:`border-2 border-transparent bg-slate-100 dark:bg-slate-800/80`,outline:`border-2 border-slate-900 bg-transparent dark:border-white`,flushed:`border-b-2 border-slate-900 bg-transparent dark:border-white`},O=(0,t.forwardRef)(function({label:t,look:n=`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},g){let _=[`w-full bg-transparent font-bold tracking-wider text-slate-900 placeholder-slate-400 focus:outline-none dark:text-white dark:placeholder-slate-500`,ne[i],f].filter(Boolean).join(` `);if(d)return(0,e.jsx)(`input`,{ref:g,id:m,className:_,...h});let v=[`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)]`:`${D[n]} focus-within:border-brand-primary`].filter(Boolean).join(` `),y=(0,e.jsxs)(`div`,{className:v,children:[l&&(0,e.jsx)(`div`,{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`,children:l}),(0,e.jsx)(`input`,{ref:g,id:m,className:_,...h}),u&&(0,e.jsx)(`div`,{className:`flex items-center pr-3`,children:u})]});return(0,e.jsxs)(`div`,{className:p,children:[t&&(0,e.jsxs)(`label`,{htmlFor:m,className:`mb-1.5 flex items-center justify-between text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white`,children:[(0,e.jsx)(`span`,{children:t}),s&&(0,e.jsx)(`span`,{className:`font-mono text-[9px] font-bold text-brand-alert`,children:`// REQUIRED`})]}),c?(0,e.jsx)(r,{tone:a?`alert`:`default`,className:`flex w-full`,children:y}):y,a?(0,e.jsxs)(`p`,{className:`mt-1.5 flex items-center gap-1.5 text-xs font-black uppercase tracking-wider text-brand-alert`,children:[(0,e.jsx)(`span`,{className:`bg-brand-alert px-1 text-[9px] text-white`,children:`ERR`}),(0,e.jsx)(`span`,{children:a})]}):o?(0,e.jsx)(`p`,{className:`mt-1.5 text-xs text-slate-500 dark:text-slate-400`,children:o}):null]})}),k={sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`},A={default:`border-slate-900 dark:border-white shadow-2xl`,alert:`border-brand-alert shadow-[0_0_30px_theme(colors.brand.alert/0.15)]`},j=1500,M=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function N({open:i,onClose:a,title:o,size:s=`md`,tone:c=`default`,glitchIntro:l=!0,closeOnBackdropClick:u=!0,closeOnEscape:d=!0,footer:f,children:p}){let[m,h]=(0,t.useState)(`closed`),g=(0,t.useRef)(null),_=(0,t.useRef)(null),v=(0,t.useId)();return(0,t.useEffect)(()=>{if(!i){h(`closed`);return}if(!l){h(`open`);return}h(`tearing`);let e=setTimeout(()=>h(`open`),j);return()=>clearTimeout(e)},[i,l]),(0,t.useEffect)(()=>{if(m!==`closed`)return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=``}},[m]),(0,t.useEffect)(()=>{if(m!==`open`)return;_.current=document.activeElement,g.current?.focus();function e(e){if(d&&e.key===`Escape`){a();return}if(e.key!==`Tab`)return;let t=g.current?.querySelectorAll(M);if(!t||t.length===0)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),_.current?.focus()}},[m,d,a]),m===`closed`?null:(0,n.createPortal)((0,e.jsxs)(e.Fragment,{children:[m===`tearing`&&(0,e.jsxs)(`div`,{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`,"aria-hidden":`true`,children:[(0,e.jsx)(`div`,{className:`absolute left-0 top-[20%] h-4 w-full bg-brand-primary/50 mix-blend-overlay`}),(0,e.jsx)(`div`,{className:`absolute left-0 top-[70%] h-8 w-full bg-brand-secondary/50 mix-blend-overlay`}),(0,e.jsx)(`div`,{className:`absolute right-0 top-[40%] h-1 w-1/2 bg-white`}),(0,e.jsx)(`div`,{className:`absolute left-[20%] top-[10%] h-2 w-[30%] bg-brand-primary mix-blend-overlay`}),(0,e.jsx)(`div`,{className:`absolute bottom-[20%] right-[10%] h-3 w-[40%] bg-brand-secondary mix-blend-overlay`})]}),m===`open`&&(0,e.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6`,children:[(0,e.jsx)(`div`,{className:`animate-backdrop-enter absolute inset-0 bg-slate-900/60 backdrop-blur-sm dark:bg-black/80`,onClick:u?a:void 0,"aria-hidden":`true`}),(0,e.jsx)(r,{tone:c,className:`flex w-full ${k[s]}`,children:(0,e.jsxs)(`div`,{ref:g,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o?v:void 0,tabIndex:-1,className:`animate-modal-enter relative z-10 flex w-full flex-col rounded-xl border-2 bg-white dark:bg-brand-darkSurface ${A[c]}`,children:[o&&(0,e.jsxs)(`div`,{className:`flex items-center justify-between border-b border-slate-200 p-5 dark:border-slate-800`,children:[(0,e.jsx)(`h2`,{id:v,className:`text-lg font-bold`,children:o}),(0,e.jsx)(`button`,{type:`button`,onClick:a,"aria-label":`Close`,className:`text-slate-400 transition-colors hover:text-brand-secondary`,children:(0,e.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,e.jsx)(`div`,{className:`p-6 text-sm leading-relaxed text-slate-600 dark:text-slate-300`,children:p}),f&&(0,e.jsx)(`div`,{className:`rounded-b-xl border-t border-slate-200 bg-slate-50 p-5 dark:border-slate-800 dark:bg-slate-900/50`,children:f})]})})]})]}),document.body)}var P=(0,t.createContext)(null);function F(){let e=(0,t.useContext)(P);if(!e)throw Error(`Navbar parts must be rendered inside <Navbar>`);return e}function I({brand:n,actions:r,glitch:i=!0,sticky:a=!1,"aria-label":o=`Main`,className:s=``,children:c}){let[l,u]=(0,t.useState)(null),d=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(!l)return;let e=e=>e.key===`Escape`&&u(null);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[l]),(0,e.jsx)(P.Provider,{value:{openId:l,setOpenId:u,glitch:i},children:(0,e.jsx)(`header`,{ref:d,className:`relative z-40 w-full ${a?`sticky top-0`:``} ${s}`,onMouseLeave:()=>u(null),onBlur:e=>{d.current?.contains(e.relatedTarget)||u(null)},children:(0,e.jsxs)(`div`,{className:`relative ${i?`animate-navbar-in`:``} motion-reduce:!animate-none`,children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-0.5 right-8 z-10 h-[3px] w-16 bg-brand-primary`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -bottom-0.5 left-8 z-10 h-[3px] w-24 bg-brand-secondary`}),(0,e.jsxs)(`nav`,{"aria-label":o,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`,children:[(0,e.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center`,children:n}),(0,e.jsx)(`ul`,{className:`flex items-center gap-1`,children:c}),(0,e.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center justify-end gap-2`,children:r})]})]})})})}var L=`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`;function R({label:n,menu:r,active:i=!1,className:a=``,...o}){let{openId:s,setOpenId:c,glitch:l}=F(),u=(0,t.useId)(),d=`${u}-panel`,f=s===u,p=f||i?`text-brand-primary`:`text-slate-900 hover:text-brand-primary dark:text-white`,m=(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-3 -bottom-0.5 h-[3px] bg-brand-primary transition-transform duration-150 origin-left ${f||i?`scale-x-100`:`scale-x-0`}`});return r?(0,e.jsxs)(`li`,{onMouseEnter:()=>c(u),children:[(0,e.jsxs)(`button`,{type:`button`,"aria-expanded":f,"aria-controls":f?d:void 0,onClick:()=>c(f?null:u),className:`${L} ${p}`,children:[n,(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`text-[10px] transition-transform ${f?`rotate-180`:``}`,children:`[v]`}),m]}),f&&(0,e.jsx)(`div`,{id:d,className:`absolute inset-x-0 top-full pt-2`,children:(0,e.jsxs)(`div`,{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`,children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-0.5 left-8 h-[3px] w-12 bg-brand-secondary`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -bottom-0.5 right-8 h-[3px] w-20 bg-brand-primary`}),r]})})]}):(0,e.jsx)(`li`,{onMouseEnter:()=>c(null),children:(0,e.jsxs)(`a`,{"aria-current":i?`page`:void 0,className:`${L} ${p} ${a}`,...o,children:[n,m]})})}function re({columns:n=2,children:r}){let i={1:`grid-cols-1`,2:`grid-cols-1 md:grid-cols-2`,3:`grid-cols-1 md:grid-cols-3`}[n];return(0,e.jsx)(`div`,{className:`grid gap-4 ${i}`,children:t.Children.toArray(r).map((t,n)=>(0,e.jsx)(`div`,{style:{"--i":n},className:`animate-sidebar-item [animation-delay:calc(var(--i)*60ms)] motion-reduce:!animate-none`,children:t},n))})}function ie({title:t,description:n,media:r,className:i=``,...a}){return(0,e.jsxs)(`a`,{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 ${i}`,...a,children:[r&&(0,e.jsx)(`span`,{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`,children:r}),(0,e.jsxs)(`span`,{className:`min-w-0`,children:[(0,e.jsx)(`span`,{className:`block font-mono text-sm font-black uppercase tracking-wider text-slate-900 group-hover/link:text-brand-primary dark:text-white`,children:t}),n&&(0,e.jsx)(`span`,{className:`mt-1 block text-sm font-medium leading-relaxed text-slate-600 dark:text-slate-400`,children:n})]})]})}function z({className:t=``}){return(0,e.jsx)(`svg`,{className:`h-3.5 w-3.5 ${t}`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{strokeLinecap:`square`,strokeWidth:2.5,d:`M15 19l-7-7 7-7`})})}function B({className:t=``}){return(0,e.jsx)(`svg`,{className:`h-3.5 w-3.5 ${t}`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{strokeLinecap:`square`,strokeWidth:2.5,d:`M9 5l7 7-7 7`})})}function V(e,t,n){if(t<=n*2+5)return Array.from({length:t},(e,t)=>t+1);let r=Math.max(e-n,1),i=Math.min(e+n,t),a=r>2,o=i<t-1,s=[1];a&&s.push(`ellipsis`);for(let e=Math.max(r,2);e<=Math.min(i,t-1);e++)s.push(e);return o&&s.push(`ellipsis`),t>1&&s.push(t),s}function H({page:t,active:n,glitch:i,onClick:a}){let o=(0,e.jsx)(`button`,{type:`button`,onClick:a,"aria-current":n?`page`:void 0,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(` `),children:t});return i?(0,e.jsx)(r,{active:n,children:o}):o}function U({currentPage:t,totalPages:n,onPageChange:r,totalItems:i,pageSize:a,siblingCount:o=1,glitch:s=!0,className:c=``}){let l=V(t,n,o),u=a===void 0?void 0:(t-1)*a+1,d=a!==void 0&&i!==void 0?Math.min(t*a,i):void 0;return(0,e.jsxs)(`div`,{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`,c].filter(Boolean).join(` `),children:[i!==void 0&&u!==void 0&&d!==void 0&&(0,e.jsxs)(`div`,{className:`text-xs font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400`,children:[`Showing `,(0,e.jsxs)(`span`,{className:`text-brand-primary`,children:[u,`-`,d]}),` of`,` `,(0,e.jsx)(`span`,{className:`text-brand-secondary`,children:i}),` results`]}),(0,e.jsxs)(`nav`,{className:`flex items-center gap-2`,"aria-label":`Pagination`,children:[(0,e.jsxs)(`button`,{type:`button`,disabled:t<=1,onClick:()=>r(t-1),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`,children:[(0,e.jsx)(z,{}),`Prev`]}),l.map((n,i)=>n===`ellipsis`?(0,e.jsx)(`span`,{className:`flex h-8 w-6 items-center justify-center text-xs font-bold tracking-widest text-slate-500`,children:`...`},`ellipsis-${i}`):(0,e.jsx)(H,{page:n,active:n===t,glitch:s,onClick:()=>r(n)},n)),(0,e.jsxs)(`button`,{type:`button`,disabled:t>=n,onClick:()=>r(t+1),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`,children:[`Next`,(0,e.jsx)(B,{className:`transition-transform group-hover:translate-x-1`})]})]})]})}function W({currentPage:t,totalPages:n,onPageChange:i,glitch:a=!0,className:o=``}){let s=(0,e.jsxs)(`button`,{type:`button`,disabled:t<=1,onClick:()=>i(t-1),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`,children:[(0,e.jsx)(z,{className:`h-3 w-3`}),`Prev`]}),c=(0,e.jsxs)(`button`,{type:`button`,disabled:t>=n,onClick:()=>i(t+1),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`,children:[`Next`,(0,e.jsx)(B,{className:`h-3 w-3`})]});return(0,e.jsxs)(`div`,{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(` `),children:[a?(0,e.jsx)(r,{children:s}):s,(0,e.jsxs)(`div`,{className:`px-4 text-xs font-bold uppercase tracking-widest text-slate-500`,children:[`Page `,(0,e.jsx)(`span`,{className:`font-black text-slate-900 dark:text-white`,children:t}),` of `,n]}),a?(0,e.jsx)(r,{children:c}):c]})}function G({currentPage:n,totalPages:i,onPageChange:a,glitch:o=!0,className:s=``}){let[c,l]=(0,t.useState)(String(n));(0,t.useEffect)(()=>{l(String(n))},[n]);function u(){let e=Number.parseInt(c,10);if(Number.isFinite(e)){let t=Math.min(Math.max(e,1),i);a(t),l(String(t))}else l(String(n))}let d=(0,e.jsx)(`div`,{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`,children:(0,e.jsx)(`input`,{type:`text`,inputMode:`numeric`,value:c,onChange:e=>l(e.target.value),onBlur:u,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},"aria-label":`Page, ${i} total`,className:`w-12 bg-transparent py-1.5 text-center text-sm font-bold text-slate-900 focus:outline-none dark:text-white`})});return(0,e.jsxs)(`div`,{className:[`flex items-center gap-2 font-mono`,s].filter(Boolean).join(` `),children:[(0,e.jsx)(`button`,{type:`button`,disabled:n<=1,onClick:()=>a(n-1),"aria-label":`Previous page`,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`,children:(0,e.jsx)(z,{})}),o?(0,e.jsx)(r,{children:d}):d,(0,e.jsxs)(`span`,{className:`px-2 text-xs font-bold tracking-widest text-slate-500`,children:[`/ `,i]}),(0,e.jsx)(`button`,{type:`button`,disabled:n>=i,onClick:()=>a(n+1),"aria-label":`Next page`,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`,children:(0,e.jsx)(B,{})})]})}function ae({loading:t=!1,glitch:n=!0,className:i=``,children:a=`Load More Data Nodes`,disabled:o=!1,...s}){let c=(0,e.jsxs)(`button`,{type:`button`,disabled:o||t,"aria-busy":t||void 0,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(` `),...s,children:[t?(0,e.jsx)(f,{}):(0,e.jsx)(`svg`,{className:`h-4 w-4 animate-bounce`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{strokeLinecap:`square`,strokeLinejoin:`miter`,strokeWidth:2.5,d:`M19 14l-7 7m0 0l-7-7m7 7V3`})}),a]});return n?(0,e.jsx)(r,{className:`flex w-full`,children:c}):c}var oe={sm:`h-2`,md:`h-3.5`,lg:`h-5`},se={primary:`bg-brand-primary`,secondary:`bg-brand-secondary`,success:`bg-brand-success`,warning:`bg-brand-warning`,alert:`bg-brand-alert`},ce={primary:`shadow-glow-primary`,secondary:`shadow-glow-secondary`,success:`shadow-[0_0_15px_theme(colors.brand.success/0.4)]`,warning:`shadow-[0_0_15px_theme(colors.brand.warning/0.4)]`,alert:`shadow-glow-alert`},le=`[mask-image:repeating-linear-gradient(90deg,#000_0_8px,transparent_8px_11px)]`;function ue({value:n=0,max:r=100,indeterminate:i=!1,label:a,showValue:o=!1,size:s=`md`,tone:c=`primary`,variant:l=`bar`,glitch:u=!0,className:d=``,...f}){let p=(0,t.useId)(),m=Math.min(100,Math.max(0,n/r*100)),h=!i&&m>=100,g=u&&!h,_=l===`segmented`,v=[`relative w-full overflow-hidden border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput`,oe[s],h&&u?`animate-progress-done motion-reduce:!animate-none`:``].filter(Boolean).join(` `),y=[se[c],_?le:``,ce[c]].filter(Boolean).join(` `);return(0,e.jsxs)(`div`,{className:d,...f,children:[(a||o)&&(0,e.jsxs)(`div`,{className:`mb-2 flex items-center justify-between font-mono text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white`,children:[(0,e.jsx)(`span`,{id:p,children:a}),o&&!i&&(0,e.jsxs)(`span`,{className:h?`text-brand-success`:`text-slate-500 dark:text-slate-400`,children:[Math.round(m),`%`]})]}),(0,e.jsx)(`div`,{role:`progressbar`,"aria-labelledby":a?p:void 0,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i?void 0:Math.min(r,Math.max(0,n)),"aria-busy":i||void 0,className:v,children:i?(0,e.jsx)(`div`,{className:`absolute inset-y-0 left-0 w-1/3 ${y} ${u?`animate-progress-indeterminate`:`animate-progress-indeterminate-slow`} motion-reduce:!animate-none`}):(0,e.jsx)(`div`,{className:`absolute inset-y-0 left-0 overflow-hidden transition-[width] duration-300 ease-linear ${y}`,style:{width:`${m}%`},children:g&&m>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,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`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-y-0 right-0 w-1.5 bg-brand-primary mix-blend-screen animate-glitch-jitter`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-y-0 right-0 w-1.5 bg-brand-secondary mix-blend-screen animate-glitch-jitter [animation-direction:reverse]`})]})})})]})}var K=(0,t.createContext)(null);function de(){let e=(0,t.useContext)(K);if(!e)throw Error(`<Radio> must be rendered inside a <RadioGroup>`);return e}var q={sm:`h-4 w-4`,md:`h-5 w-5`,lg:`h-6 w-6`},fe={sm:`h-1.5 w-1.5`,md:`h-2.5 w-2.5`,lg:`h-3 w-3`},pe={sm:`text-xs`,md:`text-sm`,lg:`text-base`};function J({round:t}){let n=t?`rounded-full`:``;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -inset-0.5 z-20 bg-brand-primary opacity-0 ${n} group-data-[fx=in]/radio:animate-radio-slice-cyan motion-reduce:!animate-none`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -inset-0.5 z-20 bg-brand-secondary opacity-0 ${n} group-data-[fx=in]/radio:animate-radio-slice-magenta motion-reduce:!animate-none`})]})}var me=(0,t.forwardRef)(function({value:t,label:n,description:i,trailing:a,disabled:o,className:s=``,id:c,...l},u){let d=de(),f=d.current===t,p=d.disabled||!!o,m=d.glitch?f&&d.previous!==void 0?`in`:d.previous===t?`out`:void 0:void 0,h=(0,e.jsx)(`input`,{ref:u,id:c,type:`radio`,name:d.name,value:t,checked:f,disabled:p,onChange:()=>d.select(t),className:`peer sr-only`,...l}),g=(0,e.jsx)(`span`,{"aria-hidden":`true`,className:[`block transition-colors`,fe[d.size],d.shape===`round`?`rounded-full`:``,f?`bg-brand-primary opacity-100 shadow-glow-primary`:`bg-brand-primary opacity-0`,`group-data-[fx=in]/radio:animate-radio-in group-data-[fx=out]/radio:animate-radio-out motion-reduce:!animate-none`].join(` `)}),_=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`,v=(0,e.jsxs)(`span`,{className:`min-w-0 font-mono`,children:[(0,e.jsx)(`span`,{className:`block ${pe[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`}`,children:n}),i&&(0,e.jsx)(`span`,{className:`mt-0.5 block text-[10px] normal-case tracking-normal text-slate-500 dark:text-slate-400`,children:i})]}),y=`group/radio relative ${p?`cursor-not-allowed`:`cursor-pointer`} ${s}`;return d.look===`card`?(0,e.jsx)(`label`,{"data-fx":m,className:`${y} block`,children:(0,e.jsxs)(r,{disabled:p,tone:d.error?`alert`:`default`,className:`flex w-full`,children:[h,(0,e.jsxs)(`span`,{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`}`,children:[(0,e.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,e.jsx)(`span`,{className:`relative flex shrink-0 items-center justify-center border-2 ${q[d.size]} ${d.shape===`round`?`rounded-full`:``} ${_}`,children:g}),v]}),a&&(0,e.jsx)(`span`,{className:`font-mono text-[10px] font-bold ${f?`text-brand-primary`:`text-slate-400`}`,children:a}),(0,e.jsx)(J,{round:!1})]})]})}):(0,e.jsxs)(`label`,{"data-fx":m,className:`${y} inline-flex items-start gap-3`,children:[h,(0,e.jsxs)(`span`,{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 ${q[d.size]} ${d.shape===`round`?`rounded-full`:``} ${_}`,children:[g,(0,e.jsx)(J,{round:d.shape===`round`})]}),v]})});function he({label:n,value:r,defaultValue:i,onValueChange:a,name:o,size:s=`md`,look:c=`dot`,shape:l=`square`,glitch:u=!0,disabled:d=!1,error:f,hint:p,required:m=!1,orientation:h=`vertical`,className:g=``,children:_}){let v=(0,t.useId)(),y=(0,t.useId)(),[b,x]=(0,t.useState)(i),S=r===void 0?b:r,[C,w]=(0,t.useState)(S),[T,E]=(0,t.useState)(void 0);return C!==S&&(E(C),w(S)),(0,e.jsx)(K.Provider,{value:{name:o??v,current:S,previous:T,select:e=>{r===void 0&&x(e),a?.(e)},size:s,look:c,shape:l,glitch:u,disabled:d,error:!!f},children:(0,e.jsxs)(`div`,{role:`radiogroup`,"aria-labelledby":n?y:void 0,"aria-required":m||void 0,"aria-invalid":f?!0:void 0,className:g,children:[n&&(0,e.jsxs)(`div`,{id:y,className:`mb-3 flex items-center justify-between text-xs font-black uppercase tracking-wider text-slate-900 dark:text-white`,children:[(0,e.jsx)(`span`,{children:n}),m&&(0,e.jsx)(`span`,{className:`font-mono text-[9px] font-bold text-brand-alert`,children:`// REQUIRED`})]}),(0,e.jsx)(`div`,{className:h===`horizontal`?`flex flex-wrap gap-x-6 gap-y-3`:`flex flex-col gap-3`,children:_}),f?(0,e.jsxs)(`p`,{className:`mt-2 flex items-center gap-1.5 text-xs font-black uppercase tracking-wider text-brand-alert`,children:[(0,e.jsx)(`span`,{className:`bg-brand-alert px-1 text-[9px] text-white`,children:`ERR`}),(0,e.jsx)(`span`,{children:f})]}):p?(0,e.jsx)(`p`,{className:`mt-2 text-xs text-slate-500 dark:text-slate-400`,children:p}):null]})})}var ge=280;function _e({open:n,defaultOpen:r=!0,onOpenChange:i,side:a=`left`,title:o,actions:s,footer:c,overlay:l=!1,glitch:u=!0,className:d=`w-64`,children:f}){let[p]=(0,t.useState)(r),m=n===void 0?p:n,[h,g]=(0,t.useState)(m?`open`:`closed`);if(m&&h!==`open`&&g(`open`),!m&&h===`open`&&g(u?`closing`:`closed`),(0,t.useEffect)(()=>{if(h!==`closing`)return;let e=setTimeout(()=>g(`closed`),ge);return()=>clearTimeout(e)},[h]),(0,t.useEffect)(()=>{if(!l||!m)return;let e=e=>e.key===`Escape`&&i?.(!1);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[l,m,i]),h===`closed`)return null;let _=h===`closing`,v=(0,e.jsxs)(`aside`,{"data-state":_?`closing`:`open`,style:{"--dir":a===`left`?1:-1},className:[`relative flex flex-col border-2 border-slate-900 bg-white dark:border-white dark:bg-brand-darkSurface`,l?`fixed inset-y-0 z-50 ${a===`left`?`left-0`:`right-0`}`:`h-full`,u?_?`animate-sidebar-out`:`animate-sidebar-in`:``,`motion-reduce:!animate-none`,d].filter(Boolean).join(` `),children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-0.5 right-4 h-[3px] w-12 bg-brand-primary`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute -bottom-0.5 left-4 h-[3px] w-16 bg-brand-secondary`}),(o||s)&&(0,e.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b-2 border-slate-900 px-4 py-3 dark:border-white`,children:[(0,e.jsx)(`span`,{className:`font-mono text-xs font-black uppercase tracking-widest text-slate-900 dark:text-white`,children:o}),(0,e.jsx)(`div`,{className:`flex items-center gap-1`,children:s})]}),(0,e.jsx)(`div`,{className:`cyber-scroll min-h-0 flex-1 overflow-y-auto p-3`,children:f}),c&&(0,e.jsx)(`div`,{className:`border-t-2 border-slate-900 p-3 dark:border-white`,children:c})]});return l?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`div`,{"aria-hidden":`true`,onClick:()=>i?.(!1),className:`fixed inset-0 z-40 bg-black/60 backdrop-blur-sm animate-backdrop-enter motion-reduce:!animate-none`}),v]}):v}function ve({label:t,children:n}){return(0,e.jsxs)(`div`,{className:`mb-4 last:mb-0`,children:[t&&(0,e.jsxs)(`p`,{className:`mb-1.5 px-2 font-mono text-[10px] font-black uppercase tracking-widest text-slate-400 dark:text-slate-500`,children:[`// `,t]}),(0,e.jsx)(Y,{children:n})]})}function Y({children:n}){return(0,e.jsx)(`nav`,{className:`flex flex-col gap-1`,children:t.Children.toArray(n).map((t,n)=>(0,e.jsx)(`div`,{style:{"--i":n},className:`animate-sidebar-item [animation-delay:calc(var(--i)*45ms)] motion-reduce:!animate-none`,children:t},n))})}function ye({active:t=!1,icon:n,trailing:r,type:i=`button`,className:a=``,children:o,...s}){return(0,e.jsxs)(`button`,{type:i,"aria-current":t?`page`:void 0,className:[`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`,`focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-brand-primary`,`disabled:cursor-not-allowed disabled:bg-striped disabled:text-slate-400 dark:disabled:text-slate-600`,t?`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`,a].join(` `),...s,children:[n&&(0,e.jsx)(`span`,{className:`shrink-0`,children:n}),(0,e.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:o}),t&&(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 shrink-0 bg-brand-primary shadow-glow-primary`}),r&&(0,e.jsx)(`span`,{className:`shrink-0 text-[10px]`,children:r})]})}function be({open:t=!0,type:n=`button`,className:r=``,...i}){return(0,e.jsx)(`button`,{type:n,"aria-label":t?`Close sidebar`:`Open sidebar`,"aria-expanded":t,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}`,...i,children:(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`square`,strokeLinejoin:`miter`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M3 4h18v16H3zM9 4v16`})})})}var xe={laser:`skel-laser`,bitmap:`skel-bitmap`,stripes:`skel-stripes`,hazard:`skel-hazard`},Se={none:`rounded-none`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`,full:`rounded-full`};function Ce({variant:t=`laser`,rounded:n=`md`,className:r=``,...i}){return(0,e.jsx)(`div`,{"aria-hidden":`true`,className:[`skel-block`,Se[n],xe[t],r].filter(Boolean).join(` `),...i})}var we=150,Te=400;function X(e){return String(e).padStart(2,`0`)}function Z({direction:t,className:n=``}){return(0,e.jsx)(`svg`,{className:`h-4 w-4 ${n}`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{strokeLinecap:`square`,strokeWidth:2.5,d:t===`left`?`M15 19l-7-7 7-7`:`M9 5l7 7-7 7`})})}function Ee({slides:n,currentIndex:i,onIndexChange:a,tone:o=`default`,label:s,glitch:c=!0,className:l=``}){let[u,d]=(0,t.useState)(i),[f,p]=(0,t.useState)(!1),m=(0,t.useRef)(i);(0,t.useEffect)(()=>{if(i===m.current)return;p(!0);let e=setTimeout(()=>{m.current=i,d(i)},we),t=setTimeout(()=>p(!1),Te);return()=>{clearTimeout(e),clearTimeout(t)}},[i]);let h=n.length,g=n[u],_=o===`hazard`,v=s??(_?`// OVERRIDE_PROTOCOL`:`SYS_VISUALIZER`);function y(e){f||e===i||a((e+h)%h)}let b=f&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`div`,{"aria-hidden":`true`,className:`animate-slice-cyan absolute inset-0 h-full w-full bg-cover bg-center opacity-60 mix-blend-screen ${_?`drop-shadow-[-10px_0_0_theme(colors.brand.warning)]`:`drop-shadow-[-8px_0_0_theme(colors.brand.primary)]`}`,style:{backgroundImage:`url('${g.src}')`}}),(0,e.jsx)(`div`,{"aria-hidden":`true`,className:`animate-slice-magenta absolute inset-0 h-full w-full bg-cover bg-center opacity-60 mix-blend-screen ${_?`drop-shadow-[10px_0_0_theme(colors.brand.alert)]`:`drop-shadow-[8px_0_0_theme(colors.brand.secondary)]`}`,style:{backgroundImage:`url('${g.src}')`}})]}),x=(0,e.jsx)(e.Fragment,{children:n.map((t,n)=>(0,e.jsx)(`button`,{type:`button`,onClick:()=>y(n),"aria-label":`Go to slide ${n+1}`,"aria-current":n===i?`true`:void 0,className:_?[`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(` `)},t.src))}),S=(0,e.jsxs)(`div`,{className:_?`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]`,children:[(0,e.jsx)(`img`,{src:g.src,alt:g.alt,className:[`absolute inset-0 h-full w-full object-cover transition-opacity duration-300`,_?`opacity-80 mix-blend-luminosity`:``,f?`opacity-80 grayscale contrast-150`:``].filter(Boolean).join(` `)}),b,_?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-2`,children:[(0,e.jsx)(`div`,{className:`absolute left-0 top-0 h-8 w-8 border-l-4 border-t-4 border-brand-warning`}),(0,e.jsx)(`div`,{className:`absolute bottom-0 right-0 h-8 w-8 border-b-4 border-r-4 border-brand-alert`})]}),(0,e.jsx)(`div`,{className:`absolute right-4 top-1/2 z-10 flex -translate-y-1/2 flex-col gap-2`,children:x}),(0,e.jsx)(`button`,{type:`button`,onClick:()=>y(i-1),"aria-label":`Previous slide`,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`,children:(0,e.jsx)(Z,{direction:`left`})}),(0,e.jsx)(`button`,{type:`button`,onClick:()=>y(i+1),"aria-label":`Next slide`,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`,children:(0,e.jsx)(Z,{direction:`right`})})]}):(0,e.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-4 border border-brand-primary/20`,children:[(0,e.jsx)(`div`,{className:`absolute left-0 top-0 h-4 w-4 border-l border-t border-brand-primary/50`}),(0,e.jsx)(`div`,{className:`absolute right-0 top-0 h-4 w-4 border-r border-t border-brand-primary/50`}),(0,e.jsx)(`div`,{className:`absolute bottom-0 left-0 h-4 w-4 border-b border-l border-brand-primary/50`}),(0,e.jsx)(`div`,{className:`absolute bottom-0 right-0 h-4 w-4 border-b border-r border-brand-primary/50`})]})]}),C=(0,e.jsxs)(`div`,{className:[`relative z-10 flex w-full flex-col p-1 sm:p-2`,_?`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`,l].filter(Boolean).join(` `),children:[(0,e.jsxs)(`div`,{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`,_?`bg-hazard border-b-2 border-brand-alert`:`border-b-2 border-slate-900 text-slate-500 dark:border-white`].join(` `),children:[_?(0,e.jsx)(`span`,{className:`border border-brand-warning bg-black px-2 py-0.5 text-brand-warning`,children:v}):(0,e.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,e.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse bg-brand-primary`,"aria-hidden":`true`}),v]}),(0,e.jsxs)(`span`,{"aria-live":`polite`,className:_?`flex items-center gap-2 border border-brand-alert bg-black px-2 py-0.5 text-brand-alert`:`text-brand-secondary`,children:[_&&(0,e.jsx)(`span`,{className:`h-1.5 w-1.5 animate-ping bg-brand-alert`,"aria-hidden":`true`}),_?`FEED ${X(i+1)} / ${X(h)}`:`DATA_STREAM: [ ${X(i+1)} / ${X(h)} ]`]})]}),S,!_&&(0,e.jsxs)(`div`,{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`,children:[(0,e.jsx)(`div`,{className:`flex items-center gap-1.5 px-2`,children:x}),(0,e.jsxs)(`div`,{className:`flex items-center gap-3 font-mono`,children:[(0,e.jsx)(`button`,{type:`button`,onClick:()=>y(i-1),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`,children:`< Prev`}),(0,e.jsx)(`button`,{type:`button`,onClick:()=>y(i+1),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`,children:`Next >`})]})]})]});return c?(0,e.jsx)(r,{tone:_?`hazard`:`default`,className:`flex w-full ${l}`,children:C}):C}function Q({indeterminate:t=!1,checked:n=!1,className:r=``,...i}){let a=n||t;return(0,e.jsxs)(`span`,{className:`relative inline-flex h-5 w-5 shrink-0 ${r}`,children:[(0,e.jsx)(`input`,{type:`checkbox`,checked:n,"aria-checked":t?`mixed`:n,className:`peer absolute inset-0 z-10 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed`,...i}),(0,e.jsx)(`span`,{"aria-hidden":`true`,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 ${a?`border-brand-primary bg-brand-primary text-slate-950 shadow-glow-primary`:`border-slate-900 bg-white dark:border-white dark:bg-brand-darkInput`}`,children:a&&(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`square`,strokeLinejoin:`miter`,className:`animate-radio-in`,children:(0,e.jsx)(`path`,{d:t?`M5 12h14`:`M4 12l5 5L20 6`})})})]})}function $(e,t){if(e.value)return e.value(t);let n=t[e.key];return typeof n==`number`?n:String(n??``)}var De={left:`text-left`,right:`text-right`,center:`text-center`};function Oe(){return(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`square`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M10 3a7 7 0 100 14 7 7 0 000-14zM15 15l6 6`})})}function ke({direction:t}){return(0,e.jsxs)(`svg`,{viewBox:`0 0 12 14`,width:`10`,height:`12`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`square`,"aria-hidden":`true`,children:[(0,e.jsx)(`path`,{d:`M2 5l4-3 4 3`,className:t===`asc`?`stroke-brand-primary`:`opacity-40`}),(0,e.jsx)(`path`,{d:`M2 9l4 3 4-3`,className:t===`desc`?`stroke-brand-primary`:`opacity-40`})]})}function Ae({open:t}){return(0,e.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`square`,className:`transition-transform ${t?`rotate-180`:``}`,"aria-hidden":`true`,children:(0,e.jsx)(`path`,{d:`M5 9l7 7 7-7`})})}function je({columns:n,rows:r,getRowId:i,title:a,description:o,caption:s,searchable:c=!1,searchPlaceholder:l=`Search`,pageSize:u,selectable:d=!1,selectedIds:f,onSelectionChange:p,renderExpanded:m,loading:h=!1,emptyMessage:g=`// NO RECORDS`,glitch:_=!0,className:v=``}){let[y,b]=(0,t.useState)(``),[S,C]=(0,t.useState)(null),[w,T]=(0,t.useState)(1),[te,ne]=(0,t.useState)([]),[D,k]=(0,t.useState)([]),A=f??te,j=e=>{f===void 0&&ne(e),p?.(e)},M=(0,t.useMemo)(()=>{let e=y.trim().toLowerCase(),t=e?r.filter(t=>n.some(n=>String($(n,t)).toLowerCase().includes(e))):r,i=S&&n.find(e=>e.key===S.key);if(S&&i){let e=S.direction===`asc`?1:-1;t=[...t].sort((t,n)=>{let r=$(i,t),a=$(i,n);return typeof r==`number`&&typeof a==`number`?(r-a)*e:String(r).localeCompare(String(a),void 0,{numeric:!0})*e})}return t},[r,n,y,S]),N=u?Math.max(1,Math.ceil(M.length/u)):1,P=Math.min(w,N),F=u?M.slice((P-1)*u,P*u):M,I=F.map(i),L=I.filter(e=>A.includes(e)),R=I.length>0&&L.length===I.length,re=()=>j(R?A.filter(e=>!I.includes(e)):[...new Set([...A,...I])]),ie=e=>j(A.includes(e)?A.filter(t=>t!==e):[...A,e]),z=e=>k(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),B=e=>C(t=>t?.key===e?t.direction===`asc`?{key:e,direction:`desc`}:null:{key:e,direction:`asc`}),V=n.length+ +!!d+ +!!m,H=`${P}|${S?.key}|${S?.direction}|${y}`,W=e=>({"--i":e,"--dir":1}),G=_?`animate-sidebar-item [animation-delay:calc(var(--i)*40ms)] motion-reduce:!animate-none`:``;return(0,e.jsxs)(x,{glitch:!1,rounded:`lg`,padding:`md`,className:v,children:[(a||o)&&(0,e.jsxs)(`div`,{className:`space-y-1`,children:[a&&(0,e.jsx)(E,{size:`sm`,children:a}),o&&(0,e.jsx)(ee,{children:o})]}),(c||A.length>0)&&(0,e.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[c?(0,e.jsx)(O,{size:`sm`,type:`search`,"aria-label":l,placeholder:l,leftIcon:(0,e.jsx)(Oe,{}),value:y,onChange:e=>{b(e.target.value),T(1)},containerClassName:`w-full max-w-sm`}):(0,e.jsx)(`span`,{}),A.length>0&&(0,e.jsxs)(`span`,{className:`font-mono text-xs font-black uppercase tracking-wider text-brand-primary`,children:[`[`,A.length,`] selected`]})]}),(0,e.jsx)(`div`,{className:`overflow-x-auto border-2 border-slate-900 dark:border-white`,children:(0,e.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,e.jsx)(`caption`,{className:`sr-only`,children:s??(typeof a==`string`?a:`Data table`)}),(0,e.jsx)(`thead`,{children:(0,e.jsxs)(`tr`,{className:`border-b-2 border-slate-900 bg-slate-50 dark:border-white dark:bg-brand-darkSurfaceSub`,children:[d&&(0,e.jsx)(`th`,{scope:`col`,className:`w-12 px-4 py-3`,children:(0,e.jsx)(Q,{"aria-label":`Select all rows on this page`,checked:R,indeterminate:!R&&L.length>0,disabled:h||F.length===0,onChange:re})}),m&&(0,e.jsx)(`th`,{scope:`col`,className:`w-10`,"aria-label":`Expand`}),n.map(t=>{let n=S?.key===t.key?S.direction:void 0;return(0,e.jsx)(`th`,{scope:`col`,"aria-sort":n?n===`asc`?`ascending`:`descending`:t.sortable?`none`:void 0,className:`px-4 py-3 font-mono text-[10px] font-black uppercase tracking-widest text-slate-500 dark:text-slate-400 ${De[t.align??`left`]}`,children:t.sortable?(0,e.jsxs)(`button`,{type:`button`,onClick:()=>B(t.key),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 ${n?`text-slate-900 dark:text-white`:``}`,children:[t.header,(0,e.jsx)(ke,{direction:n})]}):t.header},t.key)})]})}),(0,e.jsx)(`tbody`,{children:h?Array.from({length:u??5},(t,n)=>(0,e.jsx)(`tr`,{className:`border-b border-slate-200 last:border-0 dark:border-slate-800`,children:(0,e.jsx)(`td`,{colSpan:V,className:`px-4 py-3`,children:(0,e.jsx)(Ce,{variant:`laser`,rounded:`none`,className:`h-5 w-full`})})},n)):F.length===0?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{colSpan:V,className:`px-4 py-10 text-center font-mono text-xs font-black uppercase tracking-widest text-slate-400`,children:g})}):F.map((r,a)=>{let o=i(r),s=A.includes(o),c=D.includes(o);return(0,e.jsxs)(t.Fragment,{children:[(0,e.jsxs)(`tr`,{style:W(a),"aria-selected":d?s:void 0,className:`border-b border-slate-200 transition-colors last:border-0 dark:border-slate-800 ${G} ${s?`bg-brand-primary/10`:`hover:bg-slate-50 dark:hover:bg-brand-darkSurfaceSub`}`,children:[d&&(0,e.jsx)(`td`,{className:`w-12 px-4 py-3 ${s?`shadow-[inset_4px_0_0_theme(colors.brand.primary)]`:``}`,children:(0,e.jsx)(Q,{"aria-label":`Select row ${o}`,checked:s,onChange:()=>ie(o)})}),m&&(0,e.jsx)(`td`,{className:`w-10 pr-2`,children:(0,e.jsx)(`button`,{type:`button`,"aria-expanded":c,"aria-label":c?`Collapse row ${o}`:`Expand row ${o}`,onClick:()=>z(o),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`,children:(0,e.jsx)(Ae,{open:c})})}),n.map(t=>(0,e.jsx)(`td`,{className:`px-4 py-3 font-medium text-slate-900 dark:text-white ${De[t.align??`left`]} ${t.className??``}`,children:t.cell?t.cell(r):String($(t,r))},t.key))]}),m&&c&&(0,e.jsx)(`tr`,{className:`border-b border-slate-200 bg-slate-50 last:border-0 dark:border-slate-800 dark:bg-brand-darkSurfaceSub`,children:(0,e.jsx)(`td`,{colSpan:V,className:`p-0`,children:(0,e.jsx)(`div`,{className:`px-5 py-3 text-sm text-slate-600 dark:text-slate-300 ${_?`animate-navbar-panel motion-reduce:!animate-none`:``}`,children:m(r)})})})]},o)})},H)]})}),u&&!h&&M.length>0&&(0,e.jsx)(U,{currentPage:P,totalPages:N,onPageChange:T,totalItems:M.length,pageSize:u,glitch:_,className:`!border-0 !bg-transparent !p-0`})]})}var Me={top:`bottom-full left-1/2 mb-2.5 -translate-x-1/2`,bottom:`top-full left-1/2 mt-2.5 -translate-x-1/2`,left:`right-full top-1/2 mr-2.5 -translate-y-1/2`,right:`left-full top-1/2 ml-2.5 -translate-y-1/2`},Ne={top:`-bottom-[5px] left-1/2 -translate-x-1/2`,bottom:`-top-[5px] left-1/2 -translate-x-1/2`,left:`-right-[5px] top-1/2 -translate-y-1/2`,right:`-left-[5px] top-1/2 -translate-y-1/2`};function Pe({content:n,shortcut:r,side:i=`top`,tone:a=`default`,delay:o=150,glitch:s=!0,open:c,className:l=``,children:u}){let d=(0,t.useId)(),[f,p]=(0,t.useState)(!1),m=(0,t.useRef)(void 0),h=c??f;(0,t.useEffect)(()=>()=>clearTimeout(m.current),[]);let g=e=>{clearTimeout(m.current),e<=0?p(!0):m.current=setTimeout(()=>p(!0),e)},_=()=>{clearTimeout(m.current),p(!1)},v=a===`alert`,y=v?`bg-brand-alert`:`bg-brand-primary`,b=(0,t.isValidElement)(u)?(0,t.cloneElement)(u,{"aria-describedby":h?d:void 0}):u;return(0,e.jsxs)(`span`,{className:`relative inline-flex ${l}`,onMouseEnter:()=>g(o),onMouseLeave:_,onFocus:()=>g(0),onBlur:_,onKeyDown:e=>e.key===`Escape`&&_(),children:[b,h&&(0,e.jsx)(`span`,{id:d,role:`tooltip`,className:`pointer-events-none absolute z-50 whitespace-nowrap ${Me[i]}`,children:(0,e.jsxs)(`span`,{className:`relative block`,children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 border-2 bg-slate-900 dark:bg-brand-darkSurface ${v?`border-brand-alert`:`border-slate-900 dark:border-brand-primary`} ${s?`animate-tooltip-frame`:``} motion-reduce:!animate-none`}),s&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -inset-0.5 bg-brand-primary opacity-0 animate-radio-slice-cyan motion-reduce:hidden`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -inset-0.5 bg-brand-secondary opacity-0 animate-radio-slice-magenta motion-reduce:hidden`})]}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -top-0.5 right-2 h-[3px] w-6 ${y}`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute -bottom-0.5 left-2 h-[3px] w-6 bg-brand-secondary`}),(0,e.jsx)(`span`,{"aria-hidden":`true`,className:`absolute h-2 w-2 rotate-45 border-slate-900 bg-slate-900 dark:bg-brand-darkSurface ${Ne[i]}`}),(0,e.jsxs)(`span`,{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`,children:[(0,e.jsx)(`span`,{children:n}),r&&(0,e.jsx)(`kbd`,{className:`border px-1 text-[10px] font-black leading-4 ${v?`border-brand-alert text-brand-alert`:`border-white/40 text-brand-primary`}`,children:r})]})]})})]})}exports.Badge=d,exports.Button=_,exports.Card=x,exports.CardDescription=ee,exports.CardFooter=te,exports.CardMedia=w,exports.CardTitle=E,exports.CyberFx=r,exports.Input=O,exports.Modal=N,exports.Navbar=I,exports.NavbarItem=R,exports.NavbarMenu=re,exports.NavbarMenuLink=ie,exports.Pagination=U,exports.PaginationJumpTo=G,exports.PaginationLoadMore=ae,exports.PaginationStepper=W,exports.Progress=ue,exports.Radio=me,exports.RadioGroup=he,exports.Sidebar=_e,exports.SidebarItem=ye,exports.SidebarNav=Y,exports.SidebarSection=ve,exports.SidebarToggle=be,exports.Skeleton=Ce,exports.Slider=Ee,exports.Spinner=f,exports.Table=je,exports.TableCheckbox=Q,exports.Tooltip=Pe;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|