eidotter 0.3.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.md +67 -0
- package/README.md +234 -0
- package/dist/components/Accordion/components/AccordionFill.d.ts +10 -0
- package/dist/components/Accordion/components/Section.d.ts +29 -0
- package/dist/components/Accordion/components/index.d.ts +2 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Alert/components/Alert.d.ts +33 -0
- package/dist/components/Alert/components/index.d.ts +1 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Badge/components/Badge.d.ts +39 -0
- package/dist/components/Badge/components/index.d.ts +2 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/components/Breadcrumb.d.ts +55 -0
- package/dist/components/Breadcrumb/components/index.d.ts +2 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/components/Button.d.ts +56 -0
- package/dist/components/Button/components/index.d.ts +2 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/components/Card.d.ts +25 -0
- package/dist/components/Card/components/index.d.ts +2 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/components/Checkbox.d.ts +41 -0
- package/dist/components/Checkbox/components/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/CommandPrompt/components/CommandPrompt.d.ts +40 -0
- package/dist/components/CommandPrompt/components/index.d.ts +1 -0
- package/dist/components/CommandPrompt/index.d.ts +1 -0
- package/dist/components/Icon/components/Icon.d.ts +41 -0
- package/dist/components/Icon/components/index.d.ts +1 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Input/components/Input.d.ts +22 -0
- package/dist/components/Input/components/index.d.ts +1 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Modal/components/Modal.d.ts +29 -0
- package/dist/components/Modal/components/index.d.ts +2 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Progress/components/Progress.d.ts +33 -0
- package/dist/components/Progress/components/index.d.ts +2 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/RetroEffects/components/RetroEffects.d.ts +35 -0
- package/dist/components/RetroEffects/components/index.d.ts +2 -0
- package/dist/components/RetroEffects/index.d.ts +2 -0
- package/dist/components/Switch/components/Switch.d.ts +51 -0
- package/dist/components/Switch/components/index.d.ts +2 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tabs/components/Tabs.d.ts +62 -0
- package/dist/components/Tabs/components/index.d.ts +2 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Terminal/components/Terminal.d.ts +61 -0
- package/dist/components/Terminal/components/index.d.ts +1 -0
- package/dist/components/Terminal/index.d.ts +1 -0
- package/dist/components/TimelineNode/components/TimelineNode.d.ts +52 -0
- package/dist/components/TimelineNode/components/index.d.ts +2 -0
- package/dist/components/TimelineNode/index.d.ts +2 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.es.js +1395 -0
- package/dist/index.umd.js +37 -0
- package/dist/style.css +1 -0
- package/package.json +106 -0
- package/src/styles/tokens.css +92 -0
- package/tailwind.preset.cjs +124 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Creative Commons Attribution-NonCommercial 4.0 International
|
|
2
|
+
|
|
3
|
+
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
|
4
|
+
|
|
5
|
+
## Section 1 – Definitions
|
|
6
|
+
|
|
7
|
+
a. **Adapted Material** means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor.
|
|
8
|
+
|
|
9
|
+
b. **Copyright and Similar Rights** means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized.
|
|
10
|
+
|
|
11
|
+
c. **Licensed Material** means the artistic or literary work, database, or other material to which the Licensor applied this License.
|
|
12
|
+
|
|
13
|
+
d. **Licensed Rights** means the rights granted to You subject to the terms and conditions of this License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
|
14
|
+
|
|
15
|
+
e. **NonCommercial** means not primarily intended for or directed towards commercial advantage or monetary compensation.
|
|
16
|
+
|
|
17
|
+
## Section 2 – Scope
|
|
18
|
+
|
|
19
|
+
a. License grant
|
|
20
|
+
|
|
21
|
+
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
|
22
|
+
- reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
|
|
23
|
+
- produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
|
|
24
|
+
|
|
25
|
+
2. You may not exercise any of the rights granted to You in Section 2(a)(1) in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation.
|
|
26
|
+
|
|
27
|
+
b. Other rights
|
|
28
|
+
- Moral rights are not licensed under this Public License
|
|
29
|
+
- Patent and trademark rights are not licensed under this Public License
|
|
30
|
+
- The Licensor waives or agrees not to assert any right to collect royalties from You for the exercise of the Licensed Rights
|
|
31
|
+
|
|
32
|
+
## Section 3 – License Conditions
|
|
33
|
+
|
|
34
|
+
Your exercise of the Licensed Rights is expressly made subject to the following conditions:
|
|
35
|
+
|
|
36
|
+
a. **Attribution**
|
|
37
|
+
1. If You Share the Licensed Material (including in modified form), You must:
|
|
38
|
+
- retain the following if supplied by the Licensor:
|
|
39
|
+
* identification of the creator(s)
|
|
40
|
+
* copyright notice
|
|
41
|
+
* notice referring to this Public License
|
|
42
|
+
* notice referring to the disclaimer of warranties
|
|
43
|
+
* URI or hyperlink to the Licensed Material
|
|
44
|
+
- indicate if You modified the Licensed Material and retain an indication of any previous modifications
|
|
45
|
+
- indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License
|
|
46
|
+
|
|
47
|
+
b. You may satisfy the conditions in Section 3(a) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material.
|
|
48
|
+
|
|
49
|
+
## Section 4 – Disclaimer of Warranties and Limitation of Liability
|
|
50
|
+
|
|
51
|
+
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other.
|
|
52
|
+
|
|
53
|
+
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages.
|
|
54
|
+
|
|
55
|
+
## Section 5 – Term and Termination
|
|
56
|
+
|
|
57
|
+
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
|
58
|
+
|
|
59
|
+
b. Where Your right to use the Licensed Material has terminated under Section 5(a), it reinstates:
|
|
60
|
+
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
|
61
|
+
2. upon express reinstatement by the Licensor.
|
|
62
|
+
|
|
63
|
+
For the avoidance of doubt, Section 5(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
For more information about the license, visit: https://creativecommons.org/licenses/by-nc/4.0/
|
package/README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# eiDotter - DOS Terminal Design System
|
|
2
|
+
|
|
3
|
+
A DOS-themed React component library with authentic CGA terminal aesthetics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install eidotter
|
|
9
|
+
# or
|
|
10
|
+
yarn add eidotter
|
|
11
|
+
# or
|
|
12
|
+
pnpm add eidotter
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```jsx
|
|
18
|
+
import { Terminal, Button, Alert } from 'eidotter';
|
|
19
|
+
import 'eidotter/dist/style.css';
|
|
20
|
+
|
|
21
|
+
function App() {
|
|
22
|
+
return (
|
|
23
|
+
<Terminal title="MY-APP.EXE">
|
|
24
|
+
<Alert type="info" title="Welcome">
|
|
25
|
+
DOS interface loaded successfully.
|
|
26
|
+
</Alert>
|
|
27
|
+
<Button variant="primary">Execute</Button>
|
|
28
|
+
</Terminal>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Components (v0.3.0)
|
|
34
|
+
|
|
35
|
+
| Component | Description |
|
|
36
|
+
|-----------|-------------|
|
|
37
|
+
| Accordion | Collapsible content sections |
|
|
38
|
+
| Alert | System notifications (info, success, warning, error) |
|
|
39
|
+
| Badge | Status indicators with variant support |
|
|
40
|
+
| Breadcrumb | Navigation path display |
|
|
41
|
+
| Button | DOS-style buttons with variants (primary, secondary, ghost, link) |
|
|
42
|
+
| Card | Content container with title, body, and optional footer |
|
|
43
|
+
| Checkbox | DOS-style checkbox with [X] indicator |
|
|
44
|
+
| CommandPrompt | Interactive command-line input with blinking cursor |
|
|
45
|
+
| Icon | SVG icon system with DOS styling |
|
|
46
|
+
| Input | Text input with DOS styling and error variant |
|
|
47
|
+
| Progress | DOS-style progress bar with block characters |
|
|
48
|
+
| RetroEffects | CRT effects (scanlines, noise, phosphor glow) |
|
|
49
|
+
| Switch | Toggle switch for on/off states |
|
|
50
|
+
| Tabs | Tabbed interface navigation |
|
|
51
|
+
| Terminal | DOS window with title bar, controls, and content area |
|
|
52
|
+
| TimelineNode | Timeline/stepper axis markers with shapes and glow |
|
|
53
|
+
|
|
54
|
+
## Component Examples
|
|
55
|
+
|
|
56
|
+
### Terminal
|
|
57
|
+
|
|
58
|
+
```jsx
|
|
59
|
+
<Terminal
|
|
60
|
+
title="PROGRAM.EXE"
|
|
61
|
+
size="medium"
|
|
62
|
+
closeable
|
|
63
|
+
onClose={() => console.log('closed')}
|
|
64
|
+
>
|
|
65
|
+
<p>Terminal content here</p>
|
|
66
|
+
</Terminal>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Button
|
|
70
|
+
|
|
71
|
+
```jsx
|
|
72
|
+
<Button variant="primary" size="medium">
|
|
73
|
+
Click Me
|
|
74
|
+
</Button>
|
|
75
|
+
|
|
76
|
+
<Button variant="ghost" loading>
|
|
77
|
+
Processing...
|
|
78
|
+
</Button>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Alert
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
<Alert
|
|
85
|
+
type="warning"
|
|
86
|
+
title="Low Disk Space"
|
|
87
|
+
onClose={() => {}}
|
|
88
|
+
>
|
|
89
|
+
Drive C: has only 640KB remaining.
|
|
90
|
+
</Alert>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Input
|
|
94
|
+
|
|
95
|
+
```jsx
|
|
96
|
+
<Input
|
|
97
|
+
placeholder="Enter filename..."
|
|
98
|
+
variant="default"
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
<Input
|
|
102
|
+
variant="error"
|
|
103
|
+
placeholder="Invalid path"
|
|
104
|
+
/>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### CommandPrompt
|
|
108
|
+
|
|
109
|
+
```jsx
|
|
110
|
+
<CommandPrompt
|
|
111
|
+
prompt="C:\>"
|
|
112
|
+
onCommand={(cmd) => console.log('Executing:', cmd)}
|
|
113
|
+
autoFocus
|
|
114
|
+
/>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Accordion
|
|
118
|
+
|
|
119
|
+
```jsx
|
|
120
|
+
<AccordionFill
|
|
121
|
+
sections={[
|
|
122
|
+
{ title: 'Section 1', content: 'Content 1' },
|
|
123
|
+
{ title: 'Section 2', content: 'Content 2' },
|
|
124
|
+
]}
|
|
125
|
+
defaultExpandedIndex={0}
|
|
126
|
+
/>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Design Tokens
|
|
130
|
+
|
|
131
|
+
The library uses authentic CGA colors:
|
|
132
|
+
|
|
133
|
+
```css
|
|
134
|
+
--color-cga-black: #000000;
|
|
135
|
+
--color-cga-blue: #0000AA;
|
|
136
|
+
--color-cga-cyan: #00AAAA;
|
|
137
|
+
--color-cga-yellow: #FFFF55;
|
|
138
|
+
--color-cga-white: #FFFFFF;
|
|
139
|
+
--color-cga-amber: #FFBF00;
|
|
140
|
+
/* ... full 16-color CGA palette + amber */
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Theming
|
|
144
|
+
|
|
145
|
+
Apply the DOS amber theme (amber-on-black terminal aesthetic):
|
|
146
|
+
|
|
147
|
+
```html
|
|
148
|
+
<div data-theme="dos-amber">
|
|
149
|
+
<!-- Components will use amber colors -->
|
|
150
|
+
</div>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Or via CSS class:
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<div class="theme-dos-amber">...</div>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Tailwind CSS Integration
|
|
160
|
+
|
|
161
|
+
Use Eidotter tokens in Tailwind projects without importing React components.
|
|
162
|
+
|
|
163
|
+
### Setup
|
|
164
|
+
|
|
165
|
+
```javascript
|
|
166
|
+
// tailwind.config.js
|
|
167
|
+
module.exports = {
|
|
168
|
+
presets: [require('eidotter/tailwind.preset')],
|
|
169
|
+
content: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
170
|
+
};
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Usage
|
|
174
|
+
|
|
175
|
+
```jsx
|
|
176
|
+
// CGA palette colors
|
|
177
|
+
<div className="bg-cga-black text-cga-yellow">
|
|
178
|
+
DOS terminal content
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
// Semantic colors
|
|
182
|
+
<div className="bg-dos-bg-primary text-dos-text-accent">
|
|
183
|
+
Using semantic tokens
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
// Typography
|
|
187
|
+
<p className="font-dos text-dos-base leading-dos-tight">
|
|
188
|
+
Perfect DOS VGA 437 font
|
|
189
|
+
</p>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Available Token Classes
|
|
193
|
+
|
|
194
|
+
**CGA Colors:** `cga-black`, `cga-blue`, `cga-green`, `cga-cyan`, `cga-red`, `cga-magenta`, `cga-brown`, `cga-light-gray`, `cga-dark-gray`, `cga-bright-blue`, `cga-bright-green`, `cga-bright-cyan`, `cga-bright-red`, `cga-bright-magenta`, `cga-yellow`, `cga-white`, `cga-amber`, `cga-amber-bright`, `cga-amber-dim`
|
|
195
|
+
|
|
196
|
+
**Semantic Colors:** `dos-bg-primary`, `dos-bg-secondary`, `dos-text-primary`, `dos-text-accent`, `dos-border-default`, `dos-border-focus`, `dos-success`, `dos-warning`, `dos-error`, `dos-info`
|
|
197
|
+
|
|
198
|
+
**Typography:** `font-dos`, `text-dos-xs` through `text-dos-4xl`, `leading-dos-tight/normal/loose`
|
|
199
|
+
|
|
200
|
+
## Development
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Install dependencies
|
|
204
|
+
npm install
|
|
205
|
+
|
|
206
|
+
# Run Storybook
|
|
207
|
+
npm run storybook
|
|
208
|
+
|
|
209
|
+
# Build library
|
|
210
|
+
npm run build
|
|
211
|
+
|
|
212
|
+
# Run tests
|
|
213
|
+
npm run test
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Planned Components
|
|
217
|
+
|
|
218
|
+
See [ROADMAP.md](./ROADMAP.md) for future components.
|
|
219
|
+
|
|
220
|
+
## Design Philosophy
|
|
221
|
+
|
|
222
|
+
The DOS aesthetic isn't nostalgia for nostalgia's sake. It represents values we've lost in modern software:
|
|
223
|
+
|
|
224
|
+
- **Control** - Every command is explicit and intentional
|
|
225
|
+
- **Clarity** - Information presented without distraction
|
|
226
|
+
- **Personal Sovereignty** - Your tools, your way
|
|
227
|
+
|
|
228
|
+
Eidotter brings these values to modern interfaces while maintaining accessibility (WCAG AA compliant) and usability standards. The authentic 16-color CGA palette plus amber phosphor variants creates that terminal feel without sacrificing readability.
|
|
229
|
+
|
|
230
|
+
Part of the **Timeline OS** ecosystem - a vision for personal data management along temporal, thematic, and social axes.
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0 International)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AccordionFill.css';
|
|
3
|
+
export interface AccordionFillProps {
|
|
4
|
+
sections: Array<{
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}>;
|
|
8
|
+
defaultExpandedIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const AccordionFill: React.FC<AccordionFillProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Section.css';
|
|
3
|
+
export interface SectionProps {
|
|
4
|
+
/**
|
|
5
|
+
* The title text of the section
|
|
6
|
+
*/
|
|
7
|
+
title: string;
|
|
8
|
+
/**
|
|
9
|
+
* The content of the section
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the section is expanded by default
|
|
14
|
+
*/
|
|
15
|
+
defaultExpanded?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the section is in a hover state
|
|
18
|
+
*/
|
|
19
|
+
isHovered?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the section is in an active state
|
|
22
|
+
*/
|
|
23
|
+
isActive?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Optional callback when the section is toggled
|
|
26
|
+
*/
|
|
27
|
+
onToggle?: (isExpanded: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const Section: React.FC<SectionProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Alert.css';
|
|
3
|
+
export interface AlertProps {
|
|
4
|
+
/**
|
|
5
|
+
* The size variant of the alert
|
|
6
|
+
*/
|
|
7
|
+
size?: 'L' | 'S';
|
|
8
|
+
/**
|
|
9
|
+
* The type of alert which determines its color and icon
|
|
10
|
+
*/
|
|
11
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
12
|
+
/**
|
|
13
|
+
* The title text of the alert
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The description text of the alert
|
|
18
|
+
*/
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Optional click handler for the close button
|
|
22
|
+
*/
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Optional click handler for the "Click here" link
|
|
26
|
+
*/
|
|
27
|
+
onClickHere?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Optional CSS class name
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const Alert: React.FC<AlertProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Badge.css';
|
|
3
|
+
export interface BadgeProps {
|
|
4
|
+
/**
|
|
5
|
+
* The variant determines the badge's color scheme
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'default' | 'success' | 'warning' | 'error' | 'info' | 'accent';
|
|
8
|
+
/**
|
|
9
|
+
* The size of the badge
|
|
10
|
+
*/
|
|
11
|
+
size?: 'small' | 'medium';
|
|
12
|
+
/**
|
|
13
|
+
* Show a dot indicator before the text
|
|
14
|
+
*/
|
|
15
|
+
dot?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Badge content
|
|
18
|
+
*/
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Optional CSS class name
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional aria-label for accessibility
|
|
26
|
+
*/
|
|
27
|
+
'aria-label'?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DOS-styled Badge component for status indicators, labels, and tags
|
|
31
|
+
*
|
|
32
|
+
* Features:
|
|
33
|
+
* - Multiple color variants (default, success, warning, error, info, accent)
|
|
34
|
+
* - Two sizes (small, medium)
|
|
35
|
+
* - Optional dot indicator
|
|
36
|
+
* - DOS-authentic styling with CGA colors
|
|
37
|
+
* - WCAG 2.1 AA compliant
|
|
38
|
+
*/
|
|
39
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Breadcrumb.css';
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
/**
|
|
5
|
+
* URL/path for the breadcrumb link
|
|
6
|
+
*/
|
|
7
|
+
href: string;
|
|
8
|
+
/**
|
|
9
|
+
* Display label for the breadcrumb
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BreadcrumbProps {
|
|
14
|
+
/**
|
|
15
|
+
* Array of breadcrumb items forming the trail
|
|
16
|
+
*/
|
|
17
|
+
trail?: BreadcrumbItem[];
|
|
18
|
+
/**
|
|
19
|
+
* Current page label (not a link)
|
|
20
|
+
*/
|
|
21
|
+
currentLabel: string;
|
|
22
|
+
/**
|
|
23
|
+
* Show back arrow on the last trail item
|
|
24
|
+
*/
|
|
25
|
+
showBackArrow?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Custom separator character
|
|
28
|
+
*/
|
|
29
|
+
separator?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom link component (e.g., Next.js Link)
|
|
32
|
+
* If not provided, uses regular anchor tags
|
|
33
|
+
*/
|
|
34
|
+
linkComponent?: React.ComponentType<{
|
|
35
|
+
href: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Additional CSS class name
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* DOS-styled Breadcrumb navigation component
|
|
46
|
+
*
|
|
47
|
+
* Features:
|
|
48
|
+
* - Configurable trail items
|
|
49
|
+
* - Optional back arrow on last trail item
|
|
50
|
+
* - Custom separator support
|
|
51
|
+
* - Framework-agnostic (works with any router)
|
|
52
|
+
* - WCAG 2.1 AA compliant
|
|
53
|
+
* - DOS-authentic styling with CGA colors
|
|
54
|
+
*/
|
|
55
|
+
export declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Button.css';
|
|
3
|
+
export interface ButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the button which determines its styling
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'link';
|
|
8
|
+
/**
|
|
9
|
+
* The size of the button
|
|
10
|
+
*/
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
/**
|
|
13
|
+
* The button type
|
|
14
|
+
*/
|
|
15
|
+
type?: 'button' | 'submit' | 'reset';
|
|
16
|
+
/**
|
|
17
|
+
* Whether the button is disabled
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the button is in a loading state
|
|
22
|
+
*/
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Button content
|
|
26
|
+
*/
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Optional click handler
|
|
30
|
+
*/
|
|
31
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional CSS class name
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional aria-label for accessibility
|
|
38
|
+
*/
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Full width button
|
|
42
|
+
*/
|
|
43
|
+
fullWidth?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* DOS-styled Button component with authentic terminal aesthetics
|
|
47
|
+
*
|
|
48
|
+
* Features:
|
|
49
|
+
* - Multiple variants (primary, secondary, ghost, link)
|
|
50
|
+
* - Three sizes (small, medium, large)
|
|
51
|
+
* - Loading and disabled states
|
|
52
|
+
* - Full TypeScript support
|
|
53
|
+
* - WCAG 2.1 AA compliant
|
|
54
|
+
* - DOS-authentic styling with CGA colors
|
|
55
|
+
*/
|
|
56
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Card.css';
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional card title displayed in header
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Card content
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional footer content
|
|
14
|
+
*/
|
|
15
|
+
footer?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Visual variant of the card
|
|
18
|
+
*/
|
|
19
|
+
variant?: 'default' | 'elevated' | 'bordered' | 'glow';
|
|
20
|
+
/**
|
|
21
|
+
* Additional CSS class name
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const Card: React.FC<CardProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Checkbox.css';
|
|
3
|
+
export interface CheckboxProps {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the checkbox is checked
|
|
6
|
+
*/
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Default checked state for uncontrolled usage
|
|
10
|
+
*/
|
|
11
|
+
defaultChecked?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback when checked state changes
|
|
14
|
+
*/
|
|
15
|
+
onChange?: (checked: boolean) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Label text for the checkbox
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the checkbox is disabled
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Name attribute for form submission
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Value attribute for form submission
|
|
30
|
+
*/
|
|
31
|
+
value?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS class name
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Accessible label for screen readers
|
|
38
|
+
*/
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const Checkbox: React.FC<CheckboxProps>;
|