@nukleas/cyberdesign 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 +21 -0
- package/README.md +38 -0
- package/build.ts +286 -0
- package/dist/cyberdesign-vars-only.css +116 -0
- package/dist/cyberdesign.css +8377 -0
- package/dist/fonts/JetBrainsMono-Variable.woff2 +0 -0
- package/dist/fonts/OFL.txt +93 -0
- package/dist/react/Accordion.d.ts +34 -0
- package/dist/react/Accordion.js +13 -0
- package/dist/react/Alert.d.ts +19 -0
- package/dist/react/Alert.js +6 -0
- package/dist/react/AugButton.d.ts +12 -0
- package/dist/react/AugButton.js +6 -0
- package/dist/react/AugPanel.d.ts +10 -0
- package/dist/react/AugPanel.js +6 -0
- package/dist/react/Avatar.d.ts +28 -0
- package/dist/react/Avatar.js +11 -0
- package/dist/react/Badge.d.ts +10 -0
- package/dist/react/Badge.js +6 -0
- package/dist/react/Breadcrumb.d.ts +19 -0
- package/dist/react/Breadcrumb.js +10 -0
- package/dist/react/Button.d.ts +12 -0
- package/dist/react/Button.js +6 -0
- package/dist/react/Checkbox.d.ts +9 -0
- package/dist/react/Checkbox.js +9 -0
- package/dist/react/Dropdown.d.ts +35 -0
- package/dist/react/Dropdown.js +20 -0
- package/dist/react/Field.d.ts +13 -0
- package/dist/react/Field.js +6 -0
- package/dist/react/Gauge.d.ts +19 -0
- package/dist/react/Gauge.js +6 -0
- package/dist/react/GlowCard.d.ts +12 -0
- package/dist/react/GlowCard.js +4 -0
- package/dist/react/HudBar.d.ts +34 -0
- package/dist/react/HudBar.js +10 -0
- package/dist/react/HudFrame.d.ts +19 -0
- package/dist/react/HudFrame.js +6 -0
- package/dist/react/Input.d.ts +11 -0
- package/dist/react/Input.js +6 -0
- package/dist/react/Interference.d.ts +18 -0
- package/dist/react/Interference.js +6 -0
- package/dist/react/Kbd.d.ts +18 -0
- package/dist/react/Kbd.js +11 -0
- package/dist/react/Label.d.ts +8 -0
- package/dist/react/Label.js +6 -0
- package/dist/react/Modal.d.ts +19 -0
- package/dist/react/Modal.js +9 -0
- package/dist/react/Pagination.d.ts +23 -0
- package/dist/react/Pagination.js +28 -0
- package/dist/react/PanelHeader.d.ts +9 -0
- package/dist/react/PanelHeader.js +6 -0
- package/dist/react/Progress.d.ts +13 -0
- package/dist/react/Progress.js +6 -0
- package/dist/react/Radio.d.ts +9 -0
- package/dist/react/Radio.js +9 -0
- package/dist/react/Scanner.d.ts +11 -0
- package/dist/react/Scanner.js +6 -0
- package/dist/react/Select.d.ts +13 -0
- package/dist/react/Select.js +6 -0
- package/dist/react/Separator.d.ts +11 -0
- package/dist/react/Separator.js +7 -0
- package/dist/react/Skeleton.d.ts +11 -0
- package/dist/react/Skeleton.js +13 -0
- package/dist/react/Slider.d.ts +9 -0
- package/dist/react/Slider.js +9 -0
- package/dist/react/Spinner.d.ts +11 -0
- package/dist/react/Spinner.js +6 -0
- package/dist/react/Stat.d.ts +20 -0
- package/dist/react/Stat.js +11 -0
- package/dist/react/Switch.d.ts +9 -0
- package/dist/react/Switch.js +6 -0
- package/dist/react/Table.d.ts +55 -0
- package/dist/react/Table.js +36 -0
- package/dist/react/Tabs.d.ts +28 -0
- package/dist/react/Tabs.js +16 -0
- package/dist/react/Terminal.d.ts +33 -0
- package/dist/react/Terminal.js +6 -0
- package/dist/react/Textarea.d.ts +7 -0
- package/dist/react/Textarea.js +6 -0
- package/dist/react/Ticker.d.ts +13 -0
- package/dist/react/Ticker.js +7 -0
- package/dist/react/Toast.d.ts +15 -0
- package/dist/react/Toast.js +6 -0
- package/dist/react/Tooltip.d.ts +11 -0
- package/dist/react/Tooltip.js +6 -0
- package/dist/react/index.d.ts +39 -0
- package/dist/react/index.js +46 -0
- package/dist/tailwind-theme.css +171 -0
- package/dist/tokens/base.d.ts +33 -0
- package/dist/tokens/base.js +41 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.js +7 -0
- package/dist/tokens/semantic.d.ts +1 -0
- package/dist/tokens/semantic.js +54 -0
- package/dist/tokens/themes/cyan.d.ts +1 -0
- package/dist/tokens/themes/cyan.js +15 -0
- package/dist/tokens/themes/green.d.ts +1 -0
- package/dist/tokens/themes/green.js +15 -0
- package/dist/tokens/themes/orange.d.ts +1 -0
- package/dist/tokens/themes/orange.js +15 -0
- package/dist/tokens/themes/red.d.ts +1 -0
- package/dist/tokens/themes/red.js +15 -0
- package/dist/tokens/themes/steel.d.ts +1 -0
- package/dist/tokens/themes/steel.js +15 -0
- package/package.json +73 -0
- package/src/css/a11y.css +67 -0
- package/src/css/animations.css +111 -0
- package/src/css/base.css +34 -0
- package/src/css/components/accordion.css +148 -0
- package/src/css/components/alert.css +116 -0
- package/src/css/components/app-patterns.css +894 -0
- package/src/css/components/augmented.css +474 -0
- package/src/css/components/avatar.css +105 -0
- package/src/css/components/badge.css +46 -0
- package/src/css/components/breadcrumb.css +75 -0
- package/src/css/components/button.css +130 -0
- package/src/css/components/calendar.css +135 -0
- package/src/css/components/card.css +68 -0
- package/src/css/components/carousel.css +69 -0
- package/src/css/components/charts.css +464 -0
- package/src/css/components/checkbox.css +136 -0
- package/src/css/components/command.css +162 -0
- package/src/css/components/dropdown.css +187 -0
- package/src/css/components/form.css +280 -0
- package/src/css/components/gauge.css +156 -0
- package/src/css/components/glow-card.css +32 -0
- package/src/css/components/hud.css +165 -0
- package/src/css/components/image.css +164 -0
- package/src/css/components/input-otp.css +53 -0
- package/src/css/components/input.css +182 -0
- package/src/css/components/interference.css +217 -0
- package/src/css/components/kbd.css +54 -0
- package/src/css/components/layout-extras.css +256 -0
- package/src/css/components/modal.css +146 -0
- package/src/css/components/navigation-extras.css +280 -0
- package/src/css/components/pagination.css +122 -0
- package/src/css/components/panel-header.css +55 -0
- package/src/css/components/popover.css +112 -0
- package/src/css/components/scanner.css +125 -0
- package/src/css/components/select.css +99 -0
- package/src/css/components/sheet.css +149 -0
- package/src/css/components/skeleton.css +77 -0
- package/src/css/components/slider.css +116 -0
- package/src/css/components/spinner.css +101 -0
- package/src/css/components/spreadsheet.css +314 -0
- package/src/css/components/svg.css +104 -0
- package/src/css/components/switch.css +114 -0
- package/src/css/components/table.css +115 -0
- package/src/css/components/tabs.css +159 -0
- package/src/css/components/terminal.css +259 -0
- package/src/css/components/ticker.css +100 -0
- package/src/css/components/toast.css +137 -0
- package/src/css/components/toaster.css +48 -0
- package/src/css/components/toggle.css +99 -0
- package/src/css/components/typography.css +122 -0
- package/src/css/components/vectorbg.css +57 -0
- package/src/css/utilities.css +165 -0
- package/src/fonts/JetBrainsMono-Variable.woff2 +0 -0
- package/src/fonts/OFL.txt +93 -0
- package/src/js/charts.js +533 -0
- package/src/react/Accordion.tsx +85 -0
- package/src/react/Alert.tsx +58 -0
- package/src/react/AugButton.tsx +40 -0
- package/src/react/AugPanel.tsx +36 -0
- package/src/react/Avatar.tsx +69 -0
- package/src/react/Badge.tsx +28 -0
- package/src/react/Breadcrumb.tsx +63 -0
- package/src/react/Button.tsx +39 -0
- package/src/react/Checkbox.tsx +31 -0
- package/src/react/Dropdown.tsx +104 -0
- package/src/react/Field.tsx +36 -0
- package/src/react/Gauge.tsx +57 -0
- package/src/react/GlowCard.tsx +25 -0
- package/src/react/HudBar.tsx +86 -0
- package/src/react/HudFrame.tsx +52 -0
- package/src/react/Input.tsx +38 -0
- package/src/react/Interference.tsx +53 -0
- package/src/react/Kbd.tsx +62 -0
- package/src/react/Label.tsx +31 -0
- package/src/react/Modal.tsx +63 -0
- package/src/react/Pagination.tsx +113 -0
- package/src/react/PanelHeader.tsx +28 -0
- package/src/react/Progress.tsx +47 -0
- package/src/react/Radio.tsx +31 -0
- package/src/react/Scanner.tsx +37 -0
- package/src/react/Select.tsx +43 -0
- package/src/react/Separator.tsx +40 -0
- package/src/react/Skeleton.tsx +50 -0
- package/src/react/Slider.tsx +28 -0
- package/src/react/Spinner.tsx +39 -0
- package/src/react/Stat.tsx +52 -0
- package/src/react/Switch.tsx +25 -0
- package/src/react/Table.tsx +144 -0
- package/src/react/Tabs.tsx +97 -0
- package/src/react/Terminal.tsx +95 -0
- package/src/react/Textarea.tsx +20 -0
- package/src/react/Ticker.tsx +46 -0
- package/src/react/Toast.tsx +43 -0
- package/src/react/Tooltip.tsx +32 -0
- package/src/react/index.ts +52 -0
- package/src/tokens/base.ts +48 -0
- package/src/tokens/index.ts +7 -0
- package/src/tokens/semantic.ts +63 -0
- package/src/tokens/themes/cyan.ts +16 -0
- package/src/tokens/themes/green.ts +16 -0
- package/src/tokens/themes/orange.ts +16 -0
- package/src/tokens/themes/red.ts +16 -0
- package/src/tokens/themes/steel.ts +16 -0
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HTMLAttributes, DetailsHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AccordionItemData {
|
|
3
|
+
/** Trigger heading text. */
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
/** Body content revealed when open. */
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
/** Optional icon glyph before the title. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Render this item open initially. */
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface AccordionItemProps extends Omit<DetailsHTMLAttributes<HTMLDetailsElement>, 'title'> {
|
|
13
|
+
/** Trigger heading text. */
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
/** Optional icon glyph before the title. */
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
/** Body content. */
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/** Single `<details>` accordion row — for manual composition under `<Accordion>`. */
|
|
21
|
+
declare function AccordionItem({ title, icon, children, className, ...rest }: AccordionItemProps): import("react").JSX.Element;
|
|
22
|
+
export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
/** Data-driven rows. Omit to compose `<Accordion.Item>` children manually. */
|
|
24
|
+
items?: AccordionItemData[];
|
|
25
|
+
/** `sep` adds gaps between items; `flush` drops side borders. */
|
|
26
|
+
variant?: 'default' | 'sep' | 'flush';
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/** Disclosure accordion — native `<details>` rows, data-driven or composed via `Accordion.Item`. */
|
|
30
|
+
declare function AccordionRoot({ items, variant, className, children, ...rest }: AccordionProps): import("react").JSX.Element;
|
|
31
|
+
export declare const Accordion: typeof AccordionRoot & {
|
|
32
|
+
Item: typeof AccordionItem;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Single `<details>` accordion row — for manual composition under `<Accordion>`. */
|
|
4
|
+
function AccordionItem({ title, icon, children, className = '', ...rest }) {
|
|
5
|
+
return (_jsxs("details", { className: cx('cd-accordion__item', className), ...rest, children: [_jsxs("summary", { className: "cd-accordion__trigger", children: [icon != null && _jsx("span", { className: "cd-accordion__icon", children: icon }), title] }), _jsx("div", { className: "cd-accordion__body", children: _jsx("div", { className: "cd-accordion__content", children: _jsx("div", { className: "cd-accordion__content-inner", children: children }) }) })] }));
|
|
6
|
+
}
|
|
7
|
+
/** Disclosure accordion — native `<details>` rows, data-driven or composed via `Accordion.Item`. */
|
|
8
|
+
function AccordionRoot({ items, variant = 'default', className = '', children, ...rest }) {
|
|
9
|
+
return (_jsx("div", { className: cx('cd-accordion', variant !== 'default' && `cd-accordion--${variant}`, className), ...rest, children: items
|
|
10
|
+
? items.map((item, i) => (_jsx(AccordionItem, { title: item.title, icon: item.icon, open: item.defaultOpen, children: item.content }, i)))
|
|
11
|
+
: children }));
|
|
12
|
+
}
|
|
13
|
+
export const Accordion = Object.assign(AccordionRoot, { Item: AccordionItem });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
/** Semantic color. `accent` follows the active theme accent. */
|
|
4
|
+
variant?: 'info' | 'success' | 'warning' | 'error' | 'accent';
|
|
5
|
+
/** Compact padding/type. */
|
|
6
|
+
size?: 'sm';
|
|
7
|
+
/** Drop the left accent bar for a flatter inline banner. */
|
|
8
|
+
inline?: boolean;
|
|
9
|
+
/** Bold uppercase heading line. */
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
/** Leading glyph (e.g. ℹ ✓ ⚠ ✕ ⬡). */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** When provided, renders a dismiss ✕ that calls this on click. */
|
|
14
|
+
onDismiss?: () => void;
|
|
15
|
+
/** Body text. */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** Banner / alert with semantic color, optional icon, title and dismiss. */
|
|
19
|
+
export declare function Alert({ variant, size, inline, title, icon, onDismiss, className, children, ...rest }: AlertProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Banner / alert with semantic color, optional icon, title and dismiss. */
|
|
4
|
+
export function Alert({ variant = 'info', size, inline = false, title, icon, onDismiss, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-alert', `cd-alert--${variant}`, size === 'sm' && 'cd-alert--sm', inline && 'cd-alert--inline', className), ...rest, children: [icon != null && _jsx("span", { className: "cd-alert__icon", children: icon }), _jsxs("div", { className: "cd-alert__content", children: [title != null && _jsx("div", { className: "cd-alert__title", children: title }), children != null && _jsx("div", { className: "cd-alert__body", children: children })] }), onDismiss && (_jsx("button", { className: "cd-alert__dismiss", onClick: onDismiss, "aria-label": "Dismiss", children: "\u2715" }))] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AugButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** `primary` fills with the accent-subtle background and a drop-shadow glow. */
|
|
4
|
+
variant?: 'default' | 'primary';
|
|
5
|
+
/** `sm` and `lg` adjust height, padding and clip size; `md` is the default. */
|
|
6
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
|
+
/** Reverse the diagonal clip to cut the TR+BL corners instead of TL+BR. */
|
|
8
|
+
reverse?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/** Augmented clip-path button — neon-bordered diagonal-corner button matching cd-aug-btn. */
|
|
12
|
+
export declare function AugButton({ variant, size, reverse, className, children, ...rest }: AugButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Augmented clip-path button — neon-bordered diagonal-corner button matching cd-aug-btn. */
|
|
4
|
+
export function AugButton({ variant = 'default', size = 'md', reverse = false, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsx("button", { className: cx('cd-aug-btn', variant === 'primary' && 'cd-aug-btn--primary', size === 'sm' && 'cd-aug-btn--sm', size === 'lg' && 'cd-aug-btn--lg', reverse && 'cd-aug-btn--rev', className), ...rest, children: children }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AugPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Clip/padding size: `sm` (6px clip), `md` (default, 20px clip) or `lg` (32px clip). */
|
|
4
|
+
size?: 'sm' | 'md' | 'lg';
|
|
5
|
+
/** Clip all four corners instead of the default diagonal TL+BR pair. */
|
|
6
|
+
corners4?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/** Augmented clip-path panel — neon drop-shadow border with clipped corners (cd-aug-panel). */
|
|
10
|
+
export declare function AugPanel({ size, corners4, className, children, ...rest }: AugPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Augmented clip-path panel — neon drop-shadow border with clipped corners (cd-aug-panel). */
|
|
4
|
+
export function AugPanel({ size = 'md', corners4 = false, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsx("div", { className: cx('cd-aug-panel', size === 'sm' && 'cd-aug-panel--sm', size === 'lg' && 'cd-aug-panel--lg', corners4 && 'cd-aug-panel--4', className), ...rest, children: children }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Image source. When set, renders `<img>`; otherwise shows `fallback` initials. */
|
|
4
|
+
src?: string;
|
|
5
|
+
/** Alt text for the image. */
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** Initials shown when no `src` (e.g. "NH"). */
|
|
8
|
+
fallback?: ReactNode;
|
|
9
|
+
/** Diameter preset. `md` is the default (no modifier). */
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
/** Neon ring around the avatar. */
|
|
12
|
+
glow?: boolean;
|
|
13
|
+
/** Presence dot rendered via `data-status`. */
|
|
14
|
+
status?: 'online' | 'away' | 'busy' | 'offline';
|
|
15
|
+
}
|
|
16
|
+
/** Circular avatar — image or fallback initials, sized presets, neon glow ring and presence dot. */
|
|
17
|
+
export declare function Avatar({ src, alt, fallback, size, glow, status, className, ...rest }: AvatarProps): import("react").JSX.Element;
|
|
18
|
+
export declare namespace Avatar {
|
|
19
|
+
var Group: typeof AvatarGroup;
|
|
20
|
+
}
|
|
21
|
+
export interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/** Overflow count rendered as a trailing `+N` badge. */
|
|
23
|
+
more?: number;
|
|
24
|
+
/** Avatars to stack, in order. */
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/** Overlapping stack of avatars with an optional `+N` overflow badge. */
|
|
28
|
+
export declare function AvatarGroup({ more, className, children, ...rest }: AvatarGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Circular avatar — image or fallback initials, sized presets, neon glow ring and presence dot. */
|
|
4
|
+
export function Avatar({ src, alt = '', fallback, size = 'md', glow = false, status, className = '', ...rest }) {
|
|
5
|
+
return (_jsx("div", { className: cx('cd-avatar', size !== 'md' && `cd-avatar--${size}`, glow && 'cd-avatar--glow', className), "data-status": status, ...rest, children: src != null ? (_jsx("img", { className: "cd-avatar__image", src: src, alt: alt })) : (_jsx("span", { className: "cd-avatar__fallback", children: fallback })) }));
|
|
6
|
+
}
|
|
7
|
+
/** Overlapping stack of avatars with an optional `+N` overflow badge. */
|
|
8
|
+
export function AvatarGroup({ more, className = '', children, ...rest }) {
|
|
9
|
+
return (_jsxs("div", { className: cx('cd-avatar-group', className), ...rest, children: [children, more != null && more > 0 && _jsxs("span", { className: "cd-avatar-group__more", children: ["+", more] })] }));
|
|
10
|
+
}
|
|
11
|
+
Avatar.Group = AvatarGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type CdColor = 'orange' | 'amber' | 'gold' | 'cyan' | 'magenta' | 'green' | 'red' | 'blue' | 'purple' | 'yellow';
|
|
3
|
+
export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
4
|
+
/** Color variant. Defaults to `orange`. */
|
|
5
|
+
color?: CdColor;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Inline status badge — uppercase, pixel-corner, with a neon color variant. */
|
|
9
|
+
export declare function Badge({ color, className, children, ...rest }: BadgeProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Inline status badge — uppercase, pixel-corner, with a neon color variant. */
|
|
4
|
+
export function Badge({ color = 'orange', className = '', children, ...rest }) {
|
|
5
|
+
return (_jsx("span", { className: cx('cd-badge', `cd-badge--${color}`, className), ...rest, children: children }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
/** Crumb text. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Link target. Omitted (or on the active crumb) renders plain text. */
|
|
6
|
+
href?: string;
|
|
7
|
+
/** Marks this crumb as the current page (plain, non-interactive). */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
11
|
+
/** Crumbs in order. The last item is treated as active if none is flagged. */
|
|
12
|
+
items: BreadcrumbItem[];
|
|
13
|
+
/** Separator style: `/` (default), `›` arrow, or `·` dot. */
|
|
14
|
+
variant?: 'default' | 'arrow' | 'dot';
|
|
15
|
+
/** Accessible label for the `<nav>`. */
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Breadcrumb trail — data-driven crumbs with slash / arrow / dot separators; renders `<nav><ol>`. */
|
|
19
|
+
export declare function Breadcrumb({ items, variant, className, 'aria-label': ariaLabel, ...rest }: BreadcrumbProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Breadcrumb trail — data-driven crumbs with slash / arrow / dot separators; renders `<nav><ol>`. */
|
|
4
|
+
export function Breadcrumb({ items, variant = 'default', className = '', 'aria-label': ariaLabel = 'breadcrumb', ...rest }) {
|
|
5
|
+
const lastIndex = items.length - 1;
|
|
6
|
+
return (_jsx("nav", { "aria-label": ariaLabel, ...rest, children: _jsx("ol", { className: cx('cd-breadcrumb', variant === 'arrow' && 'cd-breadcrumb--arrow', variant === 'dot' && 'cd-breadcrumb--dot', className), children: items.map((item, i) => {
|
|
7
|
+
const isActive = item.active ?? i === lastIndex;
|
|
8
|
+
return (_jsx("li", { className: cx('cd-breadcrumb__item', isActive && 'cd-breadcrumb__item--active'), children: isActive || item.href == null ? (_jsx("span", { children: item.label })) : (_jsx("a", { className: "cd-breadcrumb__link", href: item.href, children: item.label })) }, i));
|
|
9
|
+
}) }) }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** Visual emphasis. `primary` uses the theme accent; `danger` is destructive. */
|
|
4
|
+
variant?: 'default' | 'primary' | 'danger';
|
|
5
|
+
/** `sm` is the compact height; `md` is the default. */
|
|
6
|
+
size?: 'sm' | 'md';
|
|
7
|
+
/** Square icon-only button (no horizontal padding). */
|
|
8
|
+
icon?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/** Cyber terminal button — uppercase, pixel-corner accent, neon hover glow. */
|
|
12
|
+
export declare function Button({ variant, size, icon, className, children, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Cyber terminal button — uppercase, pixel-corner accent, neon hover glow. */
|
|
4
|
+
export function Button({ variant = 'default', size = 'md', icon = false, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsx("button", { className: cx('cd-btn', variant !== 'default' && `cd-btn--${variant}`, size === 'sm' && 'cd-btn--sm', icon && 'cd-btn--icon', className), ...rest, children: children }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
/** Text shown beside the box. When set, wraps the input in a `cd-control` label. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** Smaller helper line below the label. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Cyber checkbox — neon fill + checkmark; renders inside a `cd-control` label when labelled. */
|
|
9
|
+
export declare function Checkbox({ label, description, className, ...rest }: CheckboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Cyber checkbox — neon fill + checkmark; renders inside a `cd-control` label when labelled. */
|
|
4
|
+
export function Checkbox({ label, description, className = '', ...rest }) {
|
|
5
|
+
const input = (_jsx("input", { type: "checkbox", className: cx('cd-checkbox', !label && className), ...rest }));
|
|
6
|
+
if (label == null && description == null)
|
|
7
|
+
return input;
|
|
8
|
+
return (_jsxs("label", { className: cx('cd-control', className), children: [_jsx("input", { type: "checkbox", className: "cd-checkbox", ...rest }), _jsxs("span", { className: "cd-control__label", children: [label, description != null && _jsx("span", { className: "cd-control__desc", children: description })] })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface DropdownItem {
|
|
3
|
+
/** Item label text. */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Leading icon glyph rendered in the `__item-icon` slot. */
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
/** Right-aligned keyboard shortcut hint (`__item-kbd`). */
|
|
8
|
+
kbd?: ReactNode;
|
|
9
|
+
/** Destructive styling (red on hover). */
|
|
10
|
+
danger?: boolean;
|
|
11
|
+
/** Disable selection. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Fired when the item is clicked (closes the menu). */
|
|
14
|
+
onSelect?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export type DropdownEntry = DropdownItem | {
|
|
17
|
+
sep: true;
|
|
18
|
+
} | {
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
heading: true;
|
|
21
|
+
};
|
|
22
|
+
export interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
23
|
+
/** Trigger node — rendered as the `cd-dropdown__trigger` button content. */
|
|
24
|
+
trigger: ReactNode;
|
|
25
|
+
/** Menu entries: items, `{ sep: true }` separators, or `{ heading: true }` labels. */
|
|
26
|
+
items: DropdownEntry[];
|
|
27
|
+
/** Right-align the menu panel under the trigger. */
|
|
28
|
+
align?: 'left' | 'right';
|
|
29
|
+
/** Extra classes for the trigger button (e.g. `cd-btn cd-btn--primary`). */
|
|
30
|
+
triggerClassName?: string;
|
|
31
|
+
/** Initial open state (uncontrolled). */
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Dropdown menu — a trigger button toggling a `cd-dropdown__menu` of data-driven items. */
|
|
35
|
+
export declare function Dropdown({ trigger, items, align, triggerClassName, defaultOpen, className, ...rest }: DropdownProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
4
|
+
/** Dropdown menu — a trigger button toggling a `cd-dropdown__menu` of data-driven items. */
|
|
5
|
+
export function Dropdown({ trigger, items, align = 'left', triggerClassName = 'cd-btn', defaultOpen = false, className = '', ...rest }) {
|
|
6
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
7
|
+
return (_jsxs("div", { className: cx('cd-dropdown', open && 'is-open', className), ...rest, children: [_jsx("button", { type: "button", className: cx(triggerClassName, 'cd-dropdown__trigger'), "aria-expanded": open, onClick: () => setOpen((o) => !o), children: trigger }), _jsx("div", { className: cx('cd-dropdown__menu', align === 'right' && 'cd-dropdown__menu--right'), role: "menu", children: items.map((entry, i) => {
|
|
8
|
+
if ('sep' in entry && entry.sep) {
|
|
9
|
+
return _jsx("div", { className: "cd-dropdown__sep" }, i);
|
|
10
|
+
}
|
|
11
|
+
if ('heading' in entry && entry.heading) {
|
|
12
|
+
return (_jsx("div", { className: "cd-dropdown__label", children: entry.label }, i));
|
|
13
|
+
}
|
|
14
|
+
const item = entry;
|
|
15
|
+
return (_jsxs("button", { type: "button", role: "menuitem", className: cx('cd-dropdown__item', item.danger && 'cd-dropdown__item--danger'), disabled: item.disabled, "aria-disabled": item.disabled || undefined, onClick: () => {
|
|
16
|
+
item.onSelect?.();
|
|
17
|
+
setOpen(false);
|
|
18
|
+
}, children: [item.icon != null && (_jsx("span", { className: "cd-dropdown__item-icon", children: item.icon })), item.label, item.kbd != null && (_jsx("span", { className: "cd-dropdown__item-kbd", children: item.kbd }))] }, i));
|
|
19
|
+
}) })] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Inline layout: label left, control right. */
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
/** Helper / description text below the control. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** Error message below the control (rendered with a ⚠ marker). */
|
|
8
|
+
error?: ReactNode;
|
|
9
|
+
/** Label + control (e.g. a `Label` followed by an input). */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/** Form field wrapper — stacks a label, control, and optional helper/error text. */
|
|
13
|
+
export declare function Field({ inline, description, error, className, children, ...rest }: FieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Form field wrapper — stacks a label, control, and optional helper/error text. */
|
|
4
|
+
export function Field({ inline = false, description, error, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-field', inline && 'cd-field--inline', className), ...rest, children: [children, description != null && _jsx("p", { className: "cd-field-desc", children: description }), error != null && _jsx("p", { className: "cd-field-error", children: error })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface GaugeProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Fill amount, 0–100. Drives the conic `--value` CSS variable. */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Text shown in the center; defaults to `value`. */
|
|
6
|
+
display?: ReactNode;
|
|
7
|
+
/** Uppercase caption under the value. */
|
|
8
|
+
label?: ReactNode;
|
|
9
|
+
/** `small` is the compact radial. */
|
|
10
|
+
size?: 'small';
|
|
11
|
+
/** Color theme: accent (default), or a semantic override. */
|
|
12
|
+
variant?: 'danger' | 'success' | 'warn';
|
|
13
|
+
/** Concentric-ring radar style with sweep fill. */
|
|
14
|
+
radar?: boolean;
|
|
15
|
+
/** Extra center content (rendered after value/label). */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** Radial neon gauge — conic fill driven by a 0–100 `value`, with center readout. */
|
|
19
|
+
export declare function Gauge({ value, display, label, size, variant, radar, className, style, children, ...rest }: GaugeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Radial neon gauge — conic fill driven by a 0–100 `value`, with center readout. */
|
|
4
|
+
export function Gauge({ value, display, label, size, variant, radar = false, className = '', style, children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-gauge', size === 'small' && 'cd-gauge--small', variant && `cd-gauge--${variant}`, radar && 'cd-gauge--radar', className), style: { ['--value']: value, ...style }, ...rest, children: [_jsx("div", { className: "cd-gauge__track" }), _jsx("div", { className: "cd-gauge__fill" }), _jsxs("div", { className: "cd-gauge__center", children: [_jsx("div", { className: "cd-gauge__value", children: display ?? value }), label != null && _jsx("div", { className: "cd-gauge__label", children: label }), children] })] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode, MouseEvent } from 'react';
|
|
2
|
+
type GlowCardColor = 'orange' | 'amber' | 'gold' | 'cyan' | 'magenta' | 'green' | 'red' | 'blue' | 'purple';
|
|
3
|
+
interface GlowCardProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
color?: GlowCardColor;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function GlowCard({ color, active, className, onClick, style, children }: GlowCardProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function GlowCard({ color = 'orange', active, className = '', onClick, style, children }) {
|
|
3
|
+
return (_jsx("div", { className: `cd-glow-card cd-glow-card--${color}${className ? ` ${className}` : ''}`, "data-active": active ? 'true' : undefined, onClick: onClick, style: style, children: children }));
|
|
4
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Status color for a segment value — maps to `cd-hud-segment__value--*`. */
|
|
3
|
+
export type HudSegmentStatus = 'ok' | 'warn' | 'err';
|
|
4
|
+
export interface HudSegmentProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Small uppercase caption. */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Accent-colored value. */
|
|
8
|
+
value?: ReactNode;
|
|
9
|
+
/** Color the value by status. */
|
|
10
|
+
status?: HudSegmentStatus;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** One label/value cell inside a `HudBar`. */
|
|
14
|
+
export declare function HudSegment({ label, value, status, className, children, ...rest }: HudSegmentProps): import("react").JSX.Element;
|
|
15
|
+
export interface HudBarSegment {
|
|
16
|
+
/** Small uppercase caption. */
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
/** Accent-colored value. */
|
|
19
|
+
value?: ReactNode;
|
|
20
|
+
/** Color the value by status. */
|
|
21
|
+
status?: HudSegmentStatus;
|
|
22
|
+
}
|
|
23
|
+
export interface HudBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
/** Data-driven segments rendered left-to-right. */
|
|
25
|
+
segments?: HudBarSegment[];
|
|
26
|
+
/** Glowing accent edge: `top` or `bottom` bar, or `side` for vertical. */
|
|
27
|
+
position?: 'top' | 'bottom' | 'side';
|
|
28
|
+
/** Tighter segment padding/type. */
|
|
29
|
+
compact?: boolean;
|
|
30
|
+
/** Custom segment markup (e.g. `HudSegment` children) instead of `segments`. */
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/** Persistent HUD status bar — a row of label/value segments with a glowing accent edge. */
|
|
34
|
+
export declare function HudBar({ segments, position, compact, className, children, ...rest }: HudBarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** One label/value cell inside a `HudBar`. */
|
|
4
|
+
export function HudSegment({ label, value, status, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-hud-segment', className), ...rest, children: [label != null && _jsx("span", { className: "cd-hud-segment__label", children: label }), value != null && (_jsx("span", { className: cx('cd-hud-segment__value', status && `cd-hud-segment__value--${status}`), children: value })), children] }));
|
|
6
|
+
}
|
|
7
|
+
/** Persistent HUD status bar — a row of label/value segments with a glowing accent edge. */
|
|
8
|
+
export function HudBar({ segments, position, compact = false, className = '', children, ...rest }) {
|
|
9
|
+
return (_jsxs("div", { className: cx('cd-hud-bar', position && `cd-hud-bar--${position}`, compact && 'cd-hud-bar--compact', className), ...rest, children: [segments?.map((seg, i) => (_jsx(HudSegment, { label: seg.label, value: seg.value, status: seg.status }, i))), children] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Status color for a HUD value readout — maps to `cd-hud__value--*`. */
|
|
3
|
+
export type HudValueStatus = 'ok' | 'warn' | 'err' | 'dim';
|
|
4
|
+
export interface HudFrameProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Uppercase label line above the value. */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Primary readout value. */
|
|
8
|
+
value?: ReactNode;
|
|
9
|
+
/** Color the value by status. */
|
|
10
|
+
status?: HudValueStatus;
|
|
11
|
+
/** Tighter padding for dense UIs. */
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
/** Frosted / AR-style translucent backdrop. */
|
|
14
|
+
floating?: boolean;
|
|
15
|
+
/** Extra content rendered after the label/value (e.g. nested gauges). */
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/** Framed HUD stat panel — uppercase label over a glowing accent value readout. */
|
|
19
|
+
export declare function HudFrame({ label, value, status, compact, floating, className, children, ...rest }: HudFrameProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Framed HUD stat panel — uppercase label over a glowing accent value readout. */
|
|
4
|
+
export function HudFrame({ label, value, status, compact = false, floating = false, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-hud-frame', compact && 'cd-hud--compact', floating && 'cd-hud--floating', className), ...rest, children: [label != null && _jsx("div", { className: "cd-hud__label", children: label }), value != null && (_jsx("div", { className: cx('cd-hud__value', status && `cd-hud__value--${status}`), children: value })), children] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
+
/** `sm` is compact, `lg` is taller; default is the standard height. */
|
|
4
|
+
size?: 'sm' | 'md' | 'lg';
|
|
5
|
+
/** Adds a left accent border (corpus-search pattern). */
|
|
6
|
+
accent?: boolean;
|
|
7
|
+
/** Error state — red border and glow. */
|
|
8
|
+
error?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Cyber text input — neon focus ring, optional left-accent border and error state. */
|
|
11
|
+
export declare function Input({ size, accent, error, className, type, ...rest }: InputProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Cyber text input — neon focus ring, optional left-accent border and error state. */
|
|
4
|
+
export function Input({ size = 'md', accent = false, error = false, className = '', type = 'text', ...rest }) {
|
|
5
|
+
return (_jsx("input", { type: type, className: cx('cd-input', size === 'sm' && 'cd-input--sm', size === 'lg' && 'cd-input--lg', accent && 'cd-input--accent', error && 'cd-input--error', className), ...rest }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface InterferenceProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Static intensity: `light`, default, or `heavy`. */
|
|
4
|
+
intensity?: 'light' | 'heavy';
|
|
5
|
+
/** Extra-aggressive noise (combine with `heavy`). */
|
|
6
|
+
intense?: boolean;
|
|
7
|
+
/** Enable the text/data corruption effect (uses `corruptText` as the clipped layer text). */
|
|
8
|
+
glitch?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Text driving the glitch corruption layers (sets `data-text` on the content wrapper).
|
|
11
|
+
* Required for the corruption effect to render; should match the visible heading text.
|
|
12
|
+
*/
|
|
13
|
+
corruptText?: string;
|
|
14
|
+
/** Content shown beneath the noise overlay. */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/** Animated static / data-corruption overlay — adds a `__noise` layer over wrapped content. */
|
|
18
|
+
export declare function Interference({ intensity, intense, glitch, corruptText, className, children, ...rest }: InterferenceProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const cx = (...parts) => parts.filter(Boolean).join(' ');
|
|
3
|
+
/** Animated static / data-corruption overlay — adds a `__noise` layer over wrapped content. */
|
|
4
|
+
export function Interference({ intensity, intense = false, glitch = false, corruptText, className = '', children, ...rest }) {
|
|
5
|
+
return (_jsxs("div", { className: cx('cd-interference', intensity && `cd-interference--${intensity}`, intense && 'cd-interference--intense', glitch && 'cd-interference--glitch', className), ...rest, children: [_jsx("div", { className: "cd-interference__noise" }), glitch ? (_jsx("div", { className: "cd-interference__content", "data-text": corruptText, children: children })) : (children)] }));
|
|
6
|
+
}
|