eidotter 0.16.1 → 0.17.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/README.md CHANGED
@@ -1,250 +1,242 @@
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.15.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 default, elevated, bordered, glow, interactive, minimal, callout variants |
43
- | ChatMessage | Single chat message with role-based DOS styling and streaming cursor |
44
- | ChatHistory | Scrollable message list with auto-scroll and `role="log"` |
45
- | ChatInput | Multiline textarea with Enter-to-send, Shift+Enter for newlines |
46
- | ChatContainer | Composes ChatHistory + ChatInput — place inside Terminal for DOS chat |
47
- | Checkbox | DOS-style checkbox with [X] indicator |
48
- | CommandPrompt | Interactive command-line input with blinking cursor |
49
- | FilterBar | Multi-select toggle group for faceted filtering |
50
- | Footer | Site footer with default legal links (Impressum + Datenschutz) |
51
- | Icon | SVG icon system with DOS styling |
52
- | InlineExpand | Inline disclosure widget for expanding text within prose |
53
- | Input | Text input with DOS styling and error variant |
54
- | Modal | Dialog overlay with title bar and close button |
55
- | Nav | Responsive navigation with desktop/mobile variants |
56
- | Progress | DOS-style progress bar with block characters |
57
- | RetroEffects | CRT effects (scanlines, noise, phosphor glow) |
58
- | Separator | Horizontal/vertical divider for content separation |
59
- | Stat | Key-value display for metrics and statistics |
60
- | Switch | Toggle switch for on/off states |
61
- | Tabs | Tabbed interface navigation |
62
- | Tag | Interactive labels for tags, categories, and filter chips |
63
- | Terminal | DOS window with title bar and content area (controls hidden by default) |
64
- | TextScramble | DOS text decode/scramble animation effect |
65
- | TimelineContainer | Multi-zoom timeline with year/month/day/hour views + `mode="static"` |
66
- | TimelineEntry | Individual timeline entry with icon, date, and expandable content |
67
- | TimelineList | *(Deprecated)* Use `<TimelineContainer mode="static">` instead |
68
- | TimelineNode | Timeline/stepper axis markers with shapes and glow |
69
-
70
- ## Component Examples
71
-
72
- ### Terminal
73
-
74
- ```jsx
75
- <Terminal
76
- title="PROGRAM.EXE"
77
- size="medium"
78
- closeable
79
- onClose={() => console.log('closed')}
80
- >
81
- <p>Terminal content here</p>
82
- </Terminal>
83
- ```
84
-
85
- ### Button
86
-
87
- ```jsx
88
- <Button variant="primary" size="medium">
89
- Click Me
90
- </Button>
91
-
92
- <Button variant="ghost" loading>
93
- Processing...
94
- </Button>
95
- ```
96
-
97
- ### Alert
98
-
99
- ```jsx
100
- <Alert
101
- type="warning"
102
- title="Low Disk Space"
103
- onClose={() => {}}
104
- >
105
- Drive C: has only 640KB remaining.
106
- </Alert>
107
- ```
108
-
109
- ### Input
110
-
111
- ```jsx
112
- <Input
113
- placeholder="Enter filename..."
114
- variant="default"
115
- />
116
-
117
- <Input
118
- variant="error"
119
- placeholder="Invalid path"
120
- />
121
- ```
122
-
123
- ### CommandPrompt
124
-
125
- ```jsx
126
- <CommandPrompt
127
- prompt="C:\>"
128
- onCommand={(cmd) => console.log('Executing:', cmd)}
129
- autoFocus
130
- />
131
- ```
132
-
133
- ### Accordion
134
-
135
- ```jsx
136
- <AccordionFill
137
- sections={[
138
- { title: 'Section 1', content: 'Content 1' },
139
- { title: 'Section 2', content: 'Content 2' },
140
- ]}
141
- defaultExpandedIndex={0}
142
- />
143
- ```
144
-
145
- ## Design Tokens
146
-
147
- The library uses authentic CGA colors:
148
-
149
- ```css
150
- --color-cga-black: #000000;
151
- --color-cga-blue: #0000AA;
152
- --color-cga-cyan: #00AAAA;
153
- --color-cga-yellow: #FFFF55;
154
- --color-cga-white: #FFFFFF;
155
- --color-cga-amber: #FFBF00;
156
- /* ... full 16-color CGA palette + amber */
157
- ```
158
-
159
- ### Theming
160
-
161
- Apply the DOS amber theme (amber-on-black terminal aesthetic):
162
-
163
- ```html
164
- <div data-theme="amber-mono">
165
- <!-- Components will use amber colors -->
166
- </div>
167
- ```
168
-
169
- Or via CSS class:
170
-
171
- ```html
172
- <div class="theme-amber-mono">...</div>
173
- ```
174
-
175
- ## Tailwind CSS Integration
176
-
177
- Use Eidotter tokens in Tailwind projects without importing React components.
178
-
179
- ### Setup
180
-
181
- ```javascript
182
- // tailwind.config.js
183
- module.exports = {
184
- presets: [require('eidotter/tailwind.preset')],
185
- content: ['./src/**/*.{js,jsx,ts,tsx}'],
186
- };
187
- ```
188
-
189
- ### Usage
190
-
191
- ```jsx
192
- // CGA palette colors
193
- <div className="bg-cga-black text-cga-yellow">
194
- DOS terminal content
195
- </div>
196
-
197
- // Semantic colors
198
- <div className="bg-dos-bg-primary text-dos-text-accent">
199
- Using semantic tokens
200
- </div>
201
-
202
- // Typography
203
- <p className="font-dos text-dos-base leading-dos-tight">
204
- Perfect DOS VGA 437 font
205
- </p>
206
- ```
207
-
208
- ### Available Token Classes
209
-
210
- **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`
211
-
212
- **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`
213
-
214
- **Typography:** `font-dos`, `text-dos-xs` through `text-dos-4xl`, `leading-dos-tight/normal/loose`
215
-
216
- ## Development
217
-
218
- ```bash
219
- # Install dependencies
220
- npm install
221
-
222
- # Run Storybook
223
- npm run storybook
224
-
225
- # Build library
226
- npm run build
227
-
228
- # Run tests
229
- npm run test
230
- ```
231
-
232
- ## Planned Components
233
-
234
- See [ROADMAP.md](./ROADMAP.md) for future components.
235
-
236
- ## Design Philosophy
237
-
238
- The DOS aesthetic isn't nostalgia for nostalgia's sake. It represents values we've lost in modern software:
239
-
240
- - **Control** - Every command is explicit and intentional
241
- - **Clarity** - Information presented without distraction
242
- - **Personal Sovereignty** - Your tools, your way
243
-
244
- 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.
245
-
246
- Part of the **Timeline OS** ecosystem - a vision for personal data management along temporal, thematic, and social axes.
247
-
248
- ## License
249
-
250
- CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0 International)
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
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```tsx
14
+ import { Terminal, Button, Alert } from 'eidotter';
15
+ import 'eidotter/styles'; // Component CSS (includes Tailwind utilities)
16
+ import 'eidotter/tokens.css'; // Design token CSS variables (required)
17
+
18
+ function App() {
19
+ return (
20
+ <Terminal title="MY-APP.EXE">
21
+ <Alert type="info" title="Welcome">
22
+ DOS interface loaded successfully.
23
+ </Alert>
24
+ <Button variant="primary">Execute</Button>
25
+ </Terminal>
26
+ );
27
+ }
28
+ ```
29
+
30
+ ## Setup
31
+
32
+ ### Basic (no Tailwind needed)
33
+
34
+ Import the styles and tokens. All component styling is pre-compiled — no build tools required.
35
+
36
+ ```tsx
37
+ import 'eidotter/styles'; // Component CSS
38
+ import 'eidotter/tokens.css'; // CSS variable definitions
39
+
40
+ // Optional: import a theme
41
+ import 'eidotter/themes/amber-mono.css';
42
+ ```
43
+
44
+ ### With Tailwind CSS
45
+
46
+ Use eidotter's design tokens as Tailwind utility classes in your own code.
47
+
48
+ ```bash
49
+ npm install tailwindcss
50
+ ```
51
+
52
+ ```js
53
+ // tailwind.config.js
54
+ module.exports = {
55
+ presets: [require('eidotter/tailwind.preset')],
56
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
57
+ };
58
+ ```
59
+
60
+ ```tsx
61
+ // Now use eidotter tokens as Tailwind classes
62
+ <div className="bg-dos-bg-primary text-dos-text-accent font-dos">
63
+ DOS terminal content
64
+ </div>
65
+ ```
66
+
67
+ For React Aria state variants and animations, use the enhanced preset:
68
+
69
+ ```js
70
+ presets: [require('eidotter/tailwind.preset.enhanced')],
71
+ ```
72
+
73
+ ## Available Components (v0.17.0)
74
+
75
+ | Component | Description |
76
+ |-----------|-------------|
77
+ | Accordion | Collapsible content sections (Section, AccordionFill) |
78
+ | Alert | Inline alert banner with featured icon, actions, and 6 color variants |
79
+ | Badge | Status indicators with variant support |
80
+ | Breadcrumb | Navigation path display |
81
+ | Button | DOS-style buttons (primary, secondary, ghost, link) |
82
+ | Card | Content container with variants (elevated, bordered, glow, interactive, minimal, callout) |
83
+ | ChatMessage | Chat message with role-based DOS styling and streaming cursor |
84
+ | ChatHistory | Scrollable message list with auto-scroll and `role="log"` |
85
+ | ChatInput | Multiline textarea with Enter-to-send |
86
+ | ChatContainer | Composes ChatHistory + ChatInput — place inside Terminal for DOS chat |
87
+ | Checkbox | DOS-style checkbox with `[X]` bracket indicator |
88
+ | CommandPrompt | Interactive command-line input with blinking cursor |
89
+ | FilterBar | Multi-select toggle group for faceted filtering |
90
+ | Footer | Site footer with legal links (Impressum + Datenschutz) |
91
+ | Icon | SVG icon system with DOS styling |
92
+ | InlineExpand | Inline disclosure widget for expanding text within prose |
93
+ | Input | Text input with DOS styling and error variant |
94
+ | Modal | Dialog overlay with title bar and close button |
95
+ | Nav | Responsive navigation with desktop/mobile variants |
96
+ | Notification | Toast popup with layered amber glow, auto-dismiss, and progress variant |
97
+ | Progress | DOS-style progress bar with block characters |
98
+ | RetroEffects | CRT effects (scanlines, noise, phosphor glow) |
99
+ | Separator | Horizontal/vertical divider |
100
+ | Stat | Key-value display for metrics and statistics |
101
+ | Switch | Toggle switch for on/off states |
102
+ | Tabs | Tabbed interface navigation |
103
+ | Tag | Interactive labels for tags, categories, and filter chips |
104
+ | Terminal | DOS window with title bar and content area |
105
+ | TextScramble | DOS text decode/scramble animation effect |
106
+ | TimelineContainer | Multi-zoom timeline with year/month/day/hour views |
107
+ | TimelineNode | Timeline/stepper axis markers with shapes and glow |
108
+ | Tokens | Design token reference display (Storybook only) |
109
+
110
+ ## Component Examples
111
+
112
+ ### Terminal
113
+
114
+ ```tsx
115
+ <Terminal
116
+ title="PROGRAM.EXE"
117
+ size="medium"
118
+ closeable
119
+ onClose={() => console.log('closed')}
120
+ >
121
+ <p>Terminal content here</p>
122
+ </Terminal>
123
+ ```
124
+
125
+ ### Button
126
+
127
+ ```tsx
128
+ <Button variant="primary" size="md">
129
+ Click Me
130
+ </Button>
131
+
132
+ <Button variant="ghost" loading>
133
+ Processing...
134
+ </Button>
135
+ ```
136
+
137
+ ### Alert
138
+
139
+ ```tsx
140
+ <Alert
141
+ type="warning"
142
+ title="Low Disk Space"
143
+ onClose={() => {}}
144
+ >
145
+ Drive C: has only 640KB remaining.
146
+ </Alert>
147
+ ```
148
+
149
+ ### Input
150
+
151
+ ```tsx
152
+ <Input
153
+ label="Filename"
154
+ placeholder="Enter filename..."
155
+ />
156
+
157
+ <Input
158
+ variant="error"
159
+ errorMessage="File not found"
160
+ placeholder="Invalid path"
161
+ />
162
+ ```
163
+
164
+ ### Checkbox
165
+
166
+ ```tsx
167
+ <Checkbox label="Remember me" />
168
+ <Checkbox label="Accept terms" checked />
169
+ <Checkbox label="Select all" indeterminate />
170
+ ```
171
+
172
+ ### CommandPrompt
173
+
174
+ ```tsx
175
+ <CommandPrompt
176
+ prompt="C:\>"
177
+ onCommand={(cmd) => console.log('Executing:', cmd)}
178
+ autoFocus
179
+ />
180
+ ```
181
+
182
+ ## Design Tokens
183
+
184
+ The library uses authentic CGA colors via CSS custom properties:
185
+
186
+ ```css
187
+ --color-cga-amber: #FFB000; /* Primary accent */
188
+ --color-cga-amber-bright: #FDCA9F;
189
+ --color-cga-amber-dim: #9A5700;
190
+ --color-cga-black: #020003; /* Background */
191
+ /* ... full 16-color CGA palette */
192
+ ```
193
+
194
+ ### Theming
195
+
196
+ Apply themes via `data-theme` attribute:
197
+
198
+ ```html
199
+ <div data-theme="amber-mono">
200
+ <!-- Amber-on-black terminal aesthetic -->
201
+ </div>
202
+ ```
203
+
204
+ Available themes: `amber-mono`, `cga-amber`, `cga-mode4-p0`, `cga-mode4-p1`, `cga-mode5`.
205
+
206
+ ### Tailwind Token Classes
207
+
208
+ **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`
209
+
210
+ **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`
211
+
212
+ **Typography:** `font-dos`, `text-dos-xs` through `text-dos-4xl`, `leading-dos-tight/normal/loose`
213
+
214
+ **Spacing:** `dos-0` through `dos-16` (4px grid)
215
+
216
+ **Border Radius:** `rounded-dos-none` (0), `rounded-dos-sm` (2px), `rounded-dos-base` (4px max)
217
+
218
+ ## Development
219
+
220
+ ```bash
221
+ npm install # Install dependencies
222
+ npm run storybook # Launch Storybook on port 6006
223
+ npm run build # Production build
224
+ npm run test # Run test suite
225
+ npm run lint # ESLint
226
+ ```
227
+
228
+ ## Design Philosophy
229
+
230
+ The DOS aesthetic represents values we've lost in modern software:
231
+
232
+ - **Control** - Every command is explicit and intentional
233
+ - **Clarity** - Information presented without distraction
234
+ - **Personal Sovereignty** - Your tools, your way
235
+
236
+ eiDotter brings these values to modern interfaces while maintaining accessibility (WCAG AA) and usability standards. The authentic 16-color CGA palette plus amber phosphor variants creates that terminal feel without sacrificing readability.
237
+
238
+ Part of the **Timeline OS** ecosystem - a vision for personal data management along temporal, thematic, and social axes.
239
+
240
+ ## License
241
+
242
+ CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0 International)
@@ -1,23 +1,38 @@
1
1
  import React from 'react';
2
2
  import './Alert.css';
3
+ export type AlertColor = 'brand' | 'gray' | 'default' | 'error' | 'warning' | 'success';
4
+ export interface AlertAction {
5
+ /** Button label */
6
+ label: string;
7
+ /** Click handler */
8
+ onClick: () => void;
9
+ /** Optional trailing icon */
10
+ icon?: React.ReactNode;
11
+ }
3
12
  export interface AlertProps {
4
- /** The size variant */
5
- size?: 'sm' | 'lg' | 'small' | 'large' | 'floating' | 'full-width';
6
- /** The type determines color and icon */
7
- type?: 'info' | 'success' | 'warning' | 'error' | 'default' | 'brand';
13
+ /** Color variant (V.37) */
14
+ color?: AlertColor;
15
+ /** Size variant: floating = card, full-width = banner */
16
+ size?: 'floating' | 'full-width' | 'sm' | 'lg' | 'small' | 'large';
8
17
  /** Title text */
9
18
  title?: string;
10
- /** Description content */
19
+ /** Supporting text / description */
11
20
  children?: React.ReactNode;
21
+ /** Action buttons below supporting text */
22
+ actions?: AlertAction[];
12
23
  /** Close handler (shows close button when provided) */
13
24
  onClose?: () => void;
14
- /** "Click here" link handler */
15
- onClickHere?: () => void;
16
25
  /** Optional CSS class name */
17
26
  className?: string;
27
+ /** @deprecated Use `color` instead */
28
+ type?: 'info' | 'success' | 'warning' | 'error' | 'default' | 'brand';
29
+ /** @deprecated Use `actions` instead */
30
+ onClickHere?: () => void;
18
31
  }
19
32
  /**
20
- * DOS-styled Alert with CRT phosphor enter/exit animations.
21
- * Uses useAnimatedDismiss for smooth phosphor fade-out on close.
33
+ * DOS-styled Alert with V.37 design: uniform dark background, featured icon
34
+ * with outline rings, optional actions, and container-query responsive layout.
35
+ *
36
+ * Backward-compatible with `type` and `onClickHere` props from pre-V.37.
22
37
  */
23
38
  export declare const Alert: React.FC<AlertProps>;
@@ -1,2 +1,2 @@
1
1
  export { Alert } from './Alert';
2
- export type { AlertProps } from './Alert';
2
+ export type { AlertProps, AlertAction, AlertColor } from './Alert';
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import type { AlertAction } from '../../Alert/components/Alert';
3
+ import './Notification.css';
4
+ export type NotificationType = 'primary' | 'gray' | 'success' | 'warning' | 'error';
5
+ export interface NotificationProps {
6
+ /** Color/icon variant */
7
+ type?: NotificationType;
8
+ /** Title text */
9
+ title?: string;
10
+ /** Supporting text / description */
11
+ children?: React.ReactNode;
12
+ /** Action buttons */
13
+ actions?: AlertAction[];
14
+ /** Close handler — shows close button when provided */
15
+ onClose?: () => void;
16
+ /** Renders avatar element instead of featured icon */
17
+ avatar?: React.ReactNode;
18
+ /** Renders image element above text content */
19
+ image?: React.ReactNode;
20
+ /** Progress value 0-100 — renders Progress bar below text */
21
+ progress?: number;
22
+ /** Label for progress bar */
23
+ progressLabel?: string;
24
+ /** Auto-dismiss after N milliseconds */
25
+ duration?: number;
26
+ /** Hide the featured icon */
27
+ showIcon?: boolean;
28
+ /** Additional CSS class */
29
+ className?: string;
30
+ }
31
+ /**
32
+ * DOS-styled Notification (toast) with V.37 design: layered amber glow,
33
+ * featured icon with outline rings, optional progress bar and auto-dismiss.
34
+ *
35
+ * Purely presentational — consumers handle positioning.
36
+ */
37
+ export declare const Notification: React.FC<NotificationProps>;
@@ -0,0 +1,2 @@
1
+ export { Notification } from './Notification';
2
+ export type { NotificationProps, NotificationType } from './Notification';
@@ -0,0 +1 @@
1
+ export * from './components';