eidotter 0.17.2 → 0.18.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 +10 -6
- package/dist/components/Alert/components/Alert.d.ts +1 -1
- package/dist/components/Badge/components/Badge.d.ts +2 -2
- package/dist/components/Button/components/Button.d.ts +6 -1
- package/dist/components/Card/components/Card.d.ts +1 -1
- package/dist/components/Chat/components/ChatContainer.d.ts +0 -1
- package/dist/components/Checkbox/components/Checkbox.d.ts +1 -1
- package/dist/components/FilterBar/components/FilterBar.d.ts +1 -1
- package/dist/components/Header/components/Header.d.ts +25 -0
- package/dist/components/Header/components/index.d.ts +2 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Modal/components/Modal.d.ts +5 -7
- package/dist/components/Progress/components/Progress.d.ts +2 -2
- package/dist/components/Stat/components/Stat.d.ts +2 -2
- package/dist/components/Switch/components/Switch.d.ts +3 -1
- package/dist/components/Tabs/components/Tabs.d.ts +9 -3
- package/dist/components/Tag/components/Tag.d.ts +1 -1
- package/dist/components/Terminal/components/Terminal.d.ts +2 -4
- package/dist/components/TextScramble/components/TextScramble.d.ts +1 -1
- package/dist/components/TimelineNode/components/TimelineNode.d.ts +4 -4
- package/dist/eidotter.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +3542 -3430
- package/dist/index.umd.js +6 -6
- package/guidelines/README.md +4 -3
- package/package.json +7 -3
- package/src/styles/fonts/Flexi_IBM_VGA_False.ttf +0 -0
- package/src/styles/fonts/Flexi_IBM_VGA_LICENSE.txt +428 -0
- package/src/styles/fonts.css +8 -0
- package/src/styles/theme.amber-mono.css +4 -4
- package/src/styles/theme.cga-amber.css +4 -4
- package/src/styles/theme.cga-mode4-p0.css +4 -4
- package/src/styles/theme.cga-mode4-p1.css +4 -4
- package/src/styles/theme.cga-mode5.css +4 -4
- package/src/styles/tokens.css +4 -4
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ npm install eidotter
|
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
14
|
import { Terminal, Button, Alert } from 'eidotter';
|
|
15
|
+
import 'eidotter/fonts.css'; // Flexi IBM VGA False @font-face (required)
|
|
15
16
|
import 'eidotter/styles'; // Component CSS (includes Tailwind utilities)
|
|
16
17
|
import 'eidotter/tokens.css'; // Design token CSS variables (required)
|
|
17
18
|
|
|
@@ -31,16 +32,19 @@ function App() {
|
|
|
31
32
|
|
|
32
33
|
### Basic (no Tailwind needed)
|
|
33
34
|
|
|
34
|
-
Import the styles and
|
|
35
|
+
Import the styles, tokens, and font. All component styling is pre-compiled — no build tools required.
|
|
35
36
|
|
|
36
37
|
```tsx
|
|
37
|
-
import 'eidotter/
|
|
38
|
+
import 'eidotter/fonts.css'; // Flexi IBM VGA False @font-face (required)
|
|
39
|
+
import 'eidotter/styles'; // Component CSS (includes Tailwind utilities)
|
|
38
40
|
import 'eidotter/tokens.css'; // CSS variable definitions
|
|
39
41
|
|
|
40
42
|
// Optional: import a theme
|
|
41
43
|
import 'eidotter/themes/amber-mono.css';
|
|
42
44
|
```
|
|
43
45
|
|
|
46
|
+
**Font:** eiDotter uses [Flexi IBM VGA False](https://int10h.org/blog/2018/05/flexi-ibm-vga-scalable-truetype-font/) — a vector remake of the IBM VGA BIOS font (CC BY-SA 4.0). It scales cleanly at any size. The `fonts.css` import loads the bundled TTF via `@font-face`. No fallback fonts are configured so you'll immediately see if the font isn't loading.
|
|
47
|
+
|
|
44
48
|
### With Tailwind CSS
|
|
45
49
|
|
|
46
50
|
Use eidotter's design tokens as Tailwind utility classes in your own code.
|
|
@@ -70,7 +74,7 @@ For React Aria state variants and animations, use the enhanced preset:
|
|
|
70
74
|
presets: [require('eidotter/tailwind.preset.enhanced')],
|
|
71
75
|
```
|
|
72
76
|
|
|
73
|
-
## Available Components (v0.
|
|
77
|
+
## Available Components (v0.18.0)
|
|
74
78
|
|
|
75
79
|
| Component | Description |
|
|
76
80
|
|-----------|-------------|
|
|
@@ -209,11 +213,11 @@ Available themes: `amber-mono`, `cga-amber`, `cga-mode4-p0`, `cga-mode4-p1`, `cg
|
|
|
209
213
|
|
|
210
214
|
**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
215
|
|
|
212
|
-
**Typography:** `font-dos
|
|
216
|
+
**Typography:** `font-dos` (Flexi IBM VGA False), `text-dos-xs` through `text-dos-4xl`, `leading-dos-tight/normal/loose`
|
|
213
217
|
|
|
214
|
-
**Spacing:**
|
|
218
|
+
**Spacing:** 4px grid via design tokens
|
|
215
219
|
|
|
216
|
-
**Border Radius:** `rounded-dos-
|
|
220
|
+
**Border Radius:** `rounded-dos-sm` (2px), `rounded-dos-base` (4px max)
|
|
217
221
|
|
|
218
222
|
## Development
|
|
219
223
|
|
|
@@ -35,4 +35,4 @@ export interface AlertProps {
|
|
|
35
35
|
*
|
|
36
36
|
* Backward-compatible with `type` and `onClickHere` props from pre-V.37.
|
|
37
37
|
*/
|
|
38
|
-
export declare const Alert: React.
|
|
38
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +3,7 @@ import './Badge.css';
|
|
|
3
3
|
export interface BadgeProps {
|
|
4
4
|
/** The variant determines the badge's color scheme */
|
|
5
5
|
variant?: 'default' | 'success' | 'warning' | 'error' | 'info' | 'accent' | 'brand' | 'gray' | 'blue' | 'indigo' | 'purple' | 'pink' | 'orange';
|
|
6
|
-
/**
|
|
6
|
+
/** Size variant. Use sm/md/lg — small/medium are @deprecated aliases. */
|
|
7
7
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium';
|
|
8
8
|
/** Show a dot indicator before the text */
|
|
9
9
|
dot?: boolean;
|
|
@@ -18,4 +18,4 @@ export interface BadgeProps {
|
|
|
18
18
|
* DOS-styled Badge for status indicators, labels, and counts.
|
|
19
19
|
* Pure presentational — no React Aria needed.
|
|
20
20
|
*/
|
|
21
|
-
export declare const Badge: React.
|
|
21
|
+
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type PressEvent } from 'react-aria-components';
|
|
2
3
|
import '../../../styles/keyframes.css';
|
|
3
4
|
import './Button.css';
|
|
4
5
|
export interface ButtonProps {
|
|
5
6
|
variant?: 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'ghost' | 'link';
|
|
7
|
+
/** Size variant. Use xs/sm/md/lg/xl — small/medium/large are @deprecated aliases. */
|
|
6
8
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'small' | 'medium' | 'large';
|
|
7
9
|
type?: 'button' | 'submit' | 'reset';
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
loading?: boolean;
|
|
10
12
|
children: React.ReactNode;
|
|
13
|
+
/** Press handler — receives React Aria PressEvent with pointer type info */
|
|
14
|
+
onPress?: (e: PressEvent) => void;
|
|
15
|
+
/** @deprecated Use `onPress` instead. onClick receives a minimal synthetic event that lacks most MouseEvent properties. */
|
|
11
16
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
17
|
className?: string;
|
|
13
18
|
'aria-label'?: string;
|
|
14
19
|
fullWidth?: boolean;
|
|
15
20
|
iconOnly?: boolean;
|
|
16
21
|
}
|
|
17
|
-
export declare const Button: React.
|
|
22
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -29,4 +29,4 @@ export interface CheckboxProps {
|
|
|
29
29
|
* DOS-styled Checkbox with bracket text indicator [ ] / [X].
|
|
30
30
|
* Built on React Aria for accessible keyboard/focus handling.
|
|
31
31
|
*/
|
|
32
|
-
export declare const Checkbox: React.
|
|
32
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -28,7 +28,7 @@ export interface FilterBarProps {
|
|
|
28
28
|
showAll?: boolean;
|
|
29
29
|
/** Label for the "All" toggle. Default: 'All' */
|
|
30
30
|
allLabel?: string;
|
|
31
|
-
/**
|
|
31
|
+
/** Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases. */
|
|
32
32
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
33
33
|
/**
|
|
34
34
|
* Callback when selection changes.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NavItem, NavProps } from '../../Nav';
|
|
3
|
+
import './Header.css';
|
|
4
|
+
export interface HeaderProps {
|
|
5
|
+
/** Site branding — text string or custom ReactNode (logo, icon + text, etc.) */
|
|
6
|
+
branding: React.ReactNode;
|
|
7
|
+
/** Href for the branding link (default: "/") */
|
|
8
|
+
brandingHref?: string;
|
|
9
|
+
/** Navigation items */
|
|
10
|
+
items: NavItem[];
|
|
11
|
+
/** Currently active href (highlights matching nav link) */
|
|
12
|
+
activeHref?: string;
|
|
13
|
+
/** Visual variant */
|
|
14
|
+
variant?: 'retro' | 'modern';
|
|
15
|
+
/** Custom link component for framework routing (e.g., Next.js Link, React Router Link) */
|
|
16
|
+
linkComponent?: NavProps['linkComponent'];
|
|
17
|
+
/** Additional CSS class name */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Standard site header composing branding + Nav.
|
|
22
|
+
* Provides the canonical layout for all eidotter-consuming sites:
|
|
23
|
+
* branding left, desktop nav right, hamburger on mobile.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Header: React.FC<HeaderProps>;
|
|
@@ -3,13 +3,10 @@ import './Modal.css';
|
|
|
3
3
|
export interface ModalProps {
|
|
4
4
|
/** Whether the modal is open */
|
|
5
5
|
isOpen: boolean;
|
|
6
|
-
/** Called when modal
|
|
7
|
-
onClose: () => void;
|
|
8
|
-
/**
|
|
9
|
-
* Called when the modal's open state changes.
|
|
10
|
-
* Enables agents to observe state transitions.
|
|
11
|
-
*/
|
|
6
|
+
/** Called when the modal's open state changes (React Aria convention) */
|
|
12
7
|
onOpenChange?: (isOpen: boolean) => void;
|
|
8
|
+
/** @deprecated Use `onOpenChange` instead. Called when modal should close. */
|
|
9
|
+
onClose?: () => void;
|
|
13
10
|
/** Modal title (required for accessibility) */
|
|
14
11
|
title: string;
|
|
15
12
|
/** Modal body content */
|
|
@@ -23,5 +20,6 @@ export interface ModalProps {
|
|
|
23
20
|
* DOS-styled Modal with React Aria Dialog.
|
|
24
21
|
* React Aria provides focus trapping, scroll lock, backdrop dismiss, and escape handling.
|
|
25
22
|
* CRT phosphor enter/exit animations via isEntering/isExiting render props.
|
|
23
|
+
* Ref forwards to the inner AriaDialog element (not the overlay).
|
|
26
24
|
*/
|
|
27
|
-
export declare const Modal: React.
|
|
25
|
+
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -9,7 +9,7 @@ export interface ProgressProps {
|
|
|
9
9
|
indeterminate?: boolean;
|
|
10
10
|
/** Visual variant */
|
|
11
11
|
variant?: 'default' | 'success' | 'warning' | 'error';
|
|
12
|
-
/** Size
|
|
12
|
+
/** Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases. */
|
|
13
13
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
14
14
|
/** Track display style */
|
|
15
15
|
trackStyle?: 'block' | 'bordered' | 'gradient';
|
|
@@ -32,4 +32,4 @@ export interface ProgressProps {
|
|
|
32
32
|
* DOS-styled Progress bar with block characters, phosphor glow, and track styles.
|
|
33
33
|
* Pure presentational — no React Aria needed.
|
|
34
34
|
*/
|
|
35
|
-
export declare const Progress: React.
|
|
35
|
+
export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -9,7 +9,7 @@ export interface StatProps {
|
|
|
9
9
|
trend?: 'up' | 'down' | 'neutral';
|
|
10
10
|
/** Optional trend value (e.g., "+5%", "-12") */
|
|
11
11
|
trendValue?: string;
|
|
12
|
-
/** Size variant */
|
|
12
|
+
/** Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases. */
|
|
13
13
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
14
14
|
/** Whether to animate value changes with a text scramble effect */
|
|
15
15
|
scramble?: boolean;
|
|
@@ -20,4 +20,4 @@ export interface StatProps {
|
|
|
20
20
|
* DOS-styled Stat component for displaying metrics with optional trends.
|
|
21
21
|
* Pure presentational — no React Aria needed.
|
|
22
22
|
*/
|
|
23
|
-
export declare const Stat: React.
|
|
23
|
+
export declare const Stat: React.ForwardRefExoticComponent<StatProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -6,6 +6,8 @@ export interface SwitchProps {
|
|
|
6
6
|
/** Default state (uncontrolled) */
|
|
7
7
|
defaultChecked?: boolean;
|
|
8
8
|
/** Callback when state changes */
|
|
9
|
+
onChange?: (checked: boolean) => void;
|
|
10
|
+
/** @deprecated Use `onChange` instead */
|
|
9
11
|
onCheckedChange?: (checked: boolean) => void;
|
|
10
12
|
/** Whether the switch is disabled */
|
|
11
13
|
disabled?: boolean;
|
|
@@ -28,4 +30,4 @@ export interface SwitchProps {
|
|
|
28
30
|
* DOS-styled Switch with phosphor glow toggle effect.
|
|
29
31
|
* Built on React Aria for accessible toggle behavior.
|
|
30
32
|
*/
|
|
31
|
-
export declare const Switch: React.
|
|
33
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -13,13 +13,19 @@ export interface TabsProps {
|
|
|
13
13
|
tabs: TabItem[];
|
|
14
14
|
/** The variant determines the tab styling */
|
|
15
15
|
variant?: 'underline' | 'pills';
|
|
16
|
-
/**
|
|
16
|
+
/** Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases. */
|
|
17
17
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
18
18
|
/** Currently active tab ID (controlled mode) */
|
|
19
19
|
activeTab?: string;
|
|
20
20
|
/** Default active tab ID (uncontrolled mode) */
|
|
21
21
|
defaultActiveTab?: string;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Callback when active tab changes. Receives new and previous tab IDs.
|
|
24
|
+
* Note: differs from React Aria's native onSelectionChange(key: Key) — this
|
|
25
|
+
* wraps it with eidotter's two-arg signature for backward compatibility.
|
|
26
|
+
*/
|
|
27
|
+
onSelectionChange?: (tabId: string, previousTabId: string) => void;
|
|
28
|
+
/** @deprecated Use `onSelectionChange` instead */
|
|
23
29
|
onTabChange?: (tabId: string, previousTabId: string) => void;
|
|
24
30
|
/** Optional CSS class name */
|
|
25
31
|
className?: string;
|
|
@@ -30,4 +36,4 @@ export interface TabsProps {
|
|
|
30
36
|
* DOS-styled Tabs with React Aria keyboard navigation and phosphor indicator.
|
|
31
37
|
* React Aria handles arrow keys, Home, End, roving tabindex, and ARIA roles.
|
|
32
38
|
*/
|
|
33
|
-
export declare const Tabs: React.
|
|
39
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,7 +5,7 @@ export interface TagProps {
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
/** Visual variant */
|
|
7
7
|
variant?: 'default' | 'outlined' | 'filled';
|
|
8
|
-
/** Size */
|
|
8
|
+
/** Size variant. Use sm/md/lg — small/medium are @deprecated aliases. */
|
|
9
9
|
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium';
|
|
10
10
|
/** CGA color token for border and text */
|
|
11
11
|
color?: string;
|
|
@@ -2,10 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import '../../../styles/keyframes.css';
|
|
3
3
|
import './Terminal.css';
|
|
4
4
|
export interface TerminalProps {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
size?: 'small' | 'medium' | 'large';
|
|
5
|
+
/** Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases. */
|
|
6
|
+
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
9
7
|
/**
|
|
10
8
|
* The title displayed in the terminal title bar
|
|
11
9
|
*/
|
|
@@ -10,4 +10,4 @@ export interface TextScrambleProps extends Omit<React.HTMLAttributes<HTMLSpanEle
|
|
|
10
10
|
/** Milliseconds before scramble starts (default: 0) */
|
|
11
11
|
delay?: number;
|
|
12
12
|
}
|
|
13
|
-
export declare const TextScramble: React.
|
|
13
|
+
export declare const TextScramble: React.ForwardRefExoticComponent<TextScrambleProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -28,10 +28,10 @@ export interface TimelineNodeProps {
|
|
|
28
28
|
*/
|
|
29
29
|
labelPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
30
30
|
/**
|
|
31
|
-
* Size
|
|
32
|
-
* @default '
|
|
31
|
+
* Size variant. Use sm/md/lg — small/medium/large are @deprecated aliases.
|
|
32
|
+
* @default 'md'
|
|
33
33
|
*/
|
|
34
|
-
size?: 'small' | 'medium' | 'large';
|
|
34
|
+
size?: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large';
|
|
35
35
|
/**
|
|
36
36
|
* Additional CSS class name
|
|
37
37
|
*/
|
|
@@ -49,4 +49,4 @@ export interface TimelineNodeProps {
|
|
|
49
49
|
*
|
|
50
50
|
* Uses DOS/CGA aesthetic with amber phosphor glow effects.
|
|
51
51
|
*/
|
|
52
|
-
export declare const TimelineNode: React.
|
|
52
|
+
export declare const TimelineNode: React.ForwardRefExoticComponent<TimelineNodeProps & React.RefAttributes<HTMLDivElement>>;
|