@pudge-ui/mcp-server 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/README.md +63 -0
- package/dist/__tests__/catalog.test.d.ts +1 -0
- package/dist/__tests__/catalog.test.js +50 -0
- package/dist/__tests__/search.test.d.ts +1 -0
- package/dist/__tests__/search.test.js +44 -0
- package/dist/__tests__/validation.test.d.ts +1 -0
- package/dist/__tests__/validation.test.js +34 -0
- package/dist/assembler.d.ts +6 -0
- package/dist/assembler.js +95 -0
- package/dist/catalog.d.ts +22 -0
- package/dist/catalog.js +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/search.d.ts +5 -0
- package/dist/search.js +21 -0
- package/dist/tools.d.ts +105 -0
- package/dist/tools.js +129 -0
- package/package.json +55 -0
- package/spec/components/_index.yaml +822 -0
- package/spec/components/buttons/clear-button.md +89 -0
- package/spec/components/buttons/fn-grid.md +104 -0
- package/spec/components/buttons/gel-button.md +125 -0
- package/spec/components/buttons/icon-button.md +108 -0
- package/spec/components/buttons/keypad-button.md +123 -0
- package/spec/components/buttons/push-button.md +139 -0
- package/spec/components/buttons/rec-button.md +105 -0
- package/spec/components/buttons/rubber-button.md +100 -0
- package/spec/components/buttons/segmented-control.md +95 -0
- package/spec/components/data/assembled-panel.md +135 -0
- package/spec/components/data/data-table.md +116 -0
- package/spec/components/data/film-strip.md +110 -0
- package/spec/components/data/media-grid.md +98 -0
- package/spec/components/dials/click-wheel.md +115 -0
- package/spec/components/dials/cylindrical-horizontal.md +130 -0
- package/spec/components/dials/cylindrical-scroll.md +141 -0
- package/spec/components/dials/cylindrical-vertical.md +100 -0
- package/spec/components/dials/mode-dial.md +123 -0
- package/spec/components/dials/radial-knob.md +150 -0
- package/spec/components/dials/rotary-encoder.md +118 -0
- package/spec/components/forms/color-picker.md +99 -0
- package/spec/components/forms/file-input.md +105 -0
- package/spec/components/forms/search-bar.md +96 -0
- package/spec/components/forms/select.md +143 -0
- package/spec/components/forms/text-input.md +114 -0
- package/spec/components/forms/textarea.md +85 -0
- package/spec/components/indicators/accordion.md +137 -0
- package/spec/components/indicators/badges.md +87 -0
- package/spec/components/indicators/chips.md +93 -0
- package/spec/components/indicators/led-dots.md +103 -0
- package/spec/components/indicators/mode-badge.md +97 -0
- package/spec/components/indicators/profile-badge.md +99 -0
- package/spec/components/indicators/skeleton.md +94 -0
- package/spec/components/indicators/spinners.md +95 -0
- package/spec/components/indicators/status-chips.md +85 -0
- package/spec/components/indicators/transport-controls.md +114 -0
- package/spec/components/meters/battery-icon.md +104 -0
- package/spec/components/meters/eq-bars.md +93 -0
- package/spec/components/meters/ev-meter.md +96 -0
- package/spec/components/meters/exposure-scale.md +110 -0
- package/spec/components/meters/gauge-full.md +102 -0
- package/spec/components/meters/gauge-semi.md +113 -0
- package/spec/components/meters/histogram.md +70 -0
- package/spec/components/meters/level-indicator.md +95 -0
- package/spec/components/meters/oscilloscope.md +83 -0
- package/spec/components/meters/progress-bar.md +84 -0
- package/spec/components/meters/signal-bars.md +80 -0
- package/spec/components/meters/signal-meter.md +84 -0
- package/spec/components/meters/vu-meter.md +88 -0
- package/spec/components/meters/waveform.md +70 -0
- package/spec/components/navigation/breadcrumbs.md +94 -0
- package/spec/components/navigation/context-menu.md +94 -0
- package/spec/components/navigation/d-pad.md +121 -0
- package/spec/components/navigation/drawer.md +103 -0
- package/spec/components/navigation/menu-grid.md +113 -0
- package/spec/components/navigation/menu-list.md +134 -0
- package/spec/components/navigation/pagination.md +100 -0
- package/spec/components/navigation/rack-panel.md +124 -0
- package/spec/components/navigation/scrollbar.md +97 -0
- package/spec/components/navigation/status-bar.md +117 -0
- package/spec/components/navigation/tab-bar.md +104 -0
- package/spec/components/overlays/chassis-panel.md +94 -0
- package/spec/components/overlays/device-bezel.md +83 -0
- package/spec/components/overlays/dialog.md +100 -0
- package/spec/components/overlays/focus-brackets.md +124 -0
- package/spec/components/overlays/grid-overlay.md +93 -0
- package/spec/components/overlays/modal.md +89 -0
- package/spec/components/overlays/panel.md +114 -0
- package/spec/components/overlays/plastic-card.md +92 -0
- package/spec/components/overlays/popover.md +75 -0
- package/spec/components/overlays/toast.md +93 -0
- package/spec/components/overlays/tooltip.md +85 -0
- package/spec/components/readouts/camera-readout.md +123 -0
- package/spec/components/readouts/dot-matrix.md +88 -0
- package/spec/components/readouts/lcd-readout.md +116 -0
- package/spec/components/readouts/resource-monitor.md +98 -0
- package/spec/components/readouts/seven-segment.md +110 -0
- package/spec/components/readouts/signal-display.md +93 -0
- package/spec/components/readouts/timecode-display.md +94 -0
- package/spec/components/sliders/crossfader.md +102 -0
- package/spec/components/sliders/dual-range.md +97 -0
- package/spec/components/sliders/range-fader.md +100 -0
- package/spec/components/sliders/scrubber.md +104 -0
- package/spec/components/sliders/stepper.md +106 -0
- package/spec/components/sliders/vertical-fader.md +116 -0
- package/spec/components/sliders/volume-slider.md +107 -0
- package/spec/components/toggles/dip-switch.md +100 -0
- package/spec/components/toggles/led-checkbox.md +108 -0
- package/spec/components/toggles/power-toggle.md +93 -0
- package/spec/components/toggles/radio-button.md +106 -0
- package/spec/components/toggles/rocker-switch.md +92 -0
- package/spec/components/toggles/slide-switch.md +121 -0
- package/spec/components/toggles/toggle-switch.md +135 -0
- package/spec/compositions/audio-mixer-strip.md +62 -0
- package/spec/compositions/camera-viewfinder.md +66 -0
- package/spec/compositions/phone-interface.md +66 -0
- package/spec/foundation/accessibility.md +33 -0
- package/spec/foundation/canvas.md +20 -0
- package/spec/foundation/depth-model.md +82 -0
- package/spec/foundation/layout.md +33 -0
- package/spec/foundation/materials.md +68 -0
- package/spec/foundation/naming.md +33 -0
- package/spec/foundation/philosophy.md +27 -0
- package/spec/foundation/theme.md +39 -0
- package/spec/foundation/tokens.md +148 -0
- package/spec/guides/extension.md +189 -0
- package/spec/guides/for-llms.md +129 -0
- package/spec/guides/prompt-templates.md +143 -0
- package/spec/spec/components/_index.yaml +822 -0
- package/spec/spec/components/buttons/clear-button.md +89 -0
- package/spec/spec/components/buttons/fn-grid.md +104 -0
- package/spec/spec/components/buttons/gel-button.md +125 -0
- package/spec/spec/components/buttons/icon-button.md +108 -0
- package/spec/spec/components/buttons/keypad-button.md +123 -0
- package/spec/spec/components/buttons/push-button.md +139 -0
- package/spec/spec/components/buttons/rec-button.md +105 -0
- package/spec/spec/components/buttons/rubber-button.md +100 -0
- package/spec/spec/components/buttons/segmented-control.md +95 -0
- package/spec/spec/components/data/assembled-panel.md +135 -0
- package/spec/spec/components/data/data-table.md +116 -0
- package/spec/spec/components/data/film-strip.md +110 -0
- package/spec/spec/components/data/media-grid.md +98 -0
- package/spec/spec/components/dials/click-wheel.md +115 -0
- package/spec/spec/components/dials/cylindrical-horizontal.md +130 -0
- package/spec/spec/components/dials/cylindrical-scroll.md +141 -0
- package/spec/spec/components/dials/cylindrical-vertical.md +100 -0
- package/spec/spec/components/dials/mode-dial.md +123 -0
- package/spec/spec/components/dials/radial-knob.md +150 -0
- package/spec/spec/components/dials/rotary-encoder.md +118 -0
- package/spec/spec/components/forms/color-picker.md +99 -0
- package/spec/spec/components/forms/file-input.md +105 -0
- package/spec/spec/components/forms/search-bar.md +96 -0
- package/spec/spec/components/forms/select.md +143 -0
- package/spec/spec/components/forms/text-input.md +114 -0
- package/spec/spec/components/forms/textarea.md +85 -0
- package/spec/spec/components/indicators/accordion.md +137 -0
- package/spec/spec/components/indicators/badges.md +87 -0
- package/spec/spec/components/indicators/chips.md +93 -0
- package/spec/spec/components/indicators/led-dots.md +103 -0
- package/spec/spec/components/indicators/mode-badge.md +97 -0
- package/spec/spec/components/indicators/profile-badge.md +99 -0
- package/spec/spec/components/indicators/skeleton.md +94 -0
- package/spec/spec/components/indicators/spinners.md +95 -0
- package/spec/spec/components/indicators/status-chips.md +85 -0
- package/spec/spec/components/indicators/transport-controls.md +114 -0
- package/spec/spec/components/meters/battery-icon.md +104 -0
- package/spec/spec/components/meters/eq-bars.md +93 -0
- package/spec/spec/components/meters/ev-meter.md +96 -0
- package/spec/spec/components/meters/exposure-scale.md +110 -0
- package/spec/spec/components/meters/gauge-full.md +102 -0
- package/spec/spec/components/meters/gauge-semi.md +113 -0
- package/spec/spec/components/meters/histogram.md +70 -0
- package/spec/spec/components/meters/level-indicator.md +95 -0
- package/spec/spec/components/meters/oscilloscope.md +83 -0
- package/spec/spec/components/meters/progress-bar.md +84 -0
- package/spec/spec/components/meters/signal-bars.md +80 -0
- package/spec/spec/components/meters/signal-meter.md +84 -0
- package/spec/spec/components/meters/vu-meter.md +88 -0
- package/spec/spec/components/meters/waveform.md +70 -0
- package/spec/spec/components/navigation/breadcrumbs.md +94 -0
- package/spec/spec/components/navigation/context-menu.md +94 -0
- package/spec/spec/components/navigation/d-pad.md +121 -0
- package/spec/spec/components/navigation/drawer.md +103 -0
- package/spec/spec/components/navigation/menu-grid.md +113 -0
- package/spec/spec/components/navigation/menu-list.md +134 -0
- package/spec/spec/components/navigation/pagination.md +100 -0
- package/spec/spec/components/navigation/rack-panel.md +124 -0
- package/spec/spec/components/navigation/scrollbar.md +97 -0
- package/spec/spec/components/navigation/status-bar.md +117 -0
- package/spec/spec/components/navigation/tab-bar.md +104 -0
- package/spec/spec/components/overlays/chassis-panel.md +94 -0
- package/spec/spec/components/overlays/device-bezel.md +83 -0
- package/spec/spec/components/overlays/dialog.md +100 -0
- package/spec/spec/components/overlays/focus-brackets.md +124 -0
- package/spec/spec/components/overlays/grid-overlay.md +93 -0
- package/spec/spec/components/overlays/modal.md +89 -0
- package/spec/spec/components/overlays/panel.md +114 -0
- package/spec/spec/components/overlays/plastic-card.md +92 -0
- package/spec/spec/components/overlays/popover.md +75 -0
- package/spec/spec/components/overlays/toast.md +93 -0
- package/spec/spec/components/overlays/tooltip.md +85 -0
- package/spec/spec/components/readouts/camera-readout.md +123 -0
- package/spec/spec/components/readouts/dot-matrix.md +88 -0
- package/spec/spec/components/readouts/lcd-readout.md +116 -0
- package/spec/spec/components/readouts/resource-monitor.md +98 -0
- package/spec/spec/components/readouts/seven-segment.md +110 -0
- package/spec/spec/components/readouts/signal-display.md +93 -0
- package/spec/spec/components/readouts/timecode-display.md +94 -0
- package/spec/spec/components/sliders/crossfader.md +102 -0
- package/spec/spec/components/sliders/dual-range.md +97 -0
- package/spec/spec/components/sliders/range-fader.md +100 -0
- package/spec/spec/components/sliders/scrubber.md +104 -0
- package/spec/spec/components/sliders/stepper.md +106 -0
- package/spec/spec/components/sliders/vertical-fader.md +116 -0
- package/spec/spec/components/sliders/volume-slider.md +107 -0
- package/spec/spec/components/toggles/dip-switch.md +100 -0
- package/spec/spec/components/toggles/led-checkbox.md +108 -0
- package/spec/spec/components/toggles/power-toggle.md +93 -0
- package/spec/spec/components/toggles/radio-button.md +106 -0
- package/spec/spec/components/toggles/rocker-switch.md +92 -0
- package/spec/spec/components/toggles/slide-switch.md +121 -0
- package/spec/spec/components/toggles/toggle-switch.md +135 -0
- package/spec/spec/compositions/audio-mixer-strip.md +62 -0
- package/spec/spec/compositions/camera-viewfinder.md +66 -0
- package/spec/spec/compositions/phone-interface.md +66 -0
- package/spec/spec/foundation/accessibility.md +33 -0
- package/spec/spec/foundation/canvas.md +20 -0
- package/spec/spec/foundation/depth-model.md +82 -0
- package/spec/spec/foundation/layout.md +33 -0
- package/spec/spec/foundation/materials.md +68 -0
- package/spec/spec/foundation/naming.md +33 -0
- package/spec/spec/foundation/philosophy.md +27 -0
- package/spec/spec/foundation/theme.md +39 -0
- package/spec/spec/foundation/tokens.md +148 -0
- package/spec/spec/guides/extension.md +189 -0
- package/spec/spec/guides/for-llms.md +129 -0
- package/spec/spec/guides/prompt-templates.md +143 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Radio Button
|
|
3
|
+
id: radio-wrap
|
|
4
|
+
class: .radio-wrap
|
|
5
|
+
category: toggles
|
|
6
|
+
index: 7
|
|
7
|
+
materials: [panel, phosphor]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Radio Button
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Camera drive mode selector (single/continuous/timer), tape deck speed selector (3.75/7.5 IPS), synthesizer waveform selector.
|
|
18
|
+
**Mechanism**: Rotary detented selector adapted to linear layout. Mutually exclusive options with circular indicator dot within recessed ring -- resembling sighting dot on a rotary selector's face that aligns with position markings.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Outer ring | 18x18px, circular |
|
|
25
|
+
| Inner dot | 8x8px, circular |
|
|
26
|
+
| Border width | 2px on outer ring |
|
|
27
|
+
| Gap to label | 8px |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Container
|
|
32
|
+
```css
|
|
33
|
+
.radio-wrap { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Outer Ring (Selector Housing)
|
|
37
|
+
```css
|
|
38
|
+
.radio-dot-outer {
|
|
39
|
+
width: 18px; height: 18px; border-radius: 50%;
|
|
40
|
+
background: var(--bg-inset); border: 2px solid var(--border-mid);
|
|
41
|
+
display: flex; align-items: center; justify-content: center;
|
|
42
|
+
box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
|
|
43
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Inner Dot (Indicator)
|
|
48
|
+
```css
|
|
49
|
+
.radio-dot-inner {
|
|
50
|
+
width: 8px; height: 8px; border-radius: 50%;
|
|
51
|
+
background: transparent; transition: background 0.15s, box-shadow 0.15s;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Selected State
|
|
56
|
+
```css
|
|
57
|
+
.radio-dot-outer.selected { border-color: var(--amber); box-shadow: inset 0 1px 2px rgba(0,0,0,0.2), 0 0 6px var(--amber-glow); }
|
|
58
|
+
.radio-dot-outer.selected .radio-dot-inner { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Label
|
|
62
|
+
```css
|
|
63
|
+
.radio-label { font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.5px; }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## HTML Structure
|
|
67
|
+
```html
|
|
68
|
+
<div data-radio-group>
|
|
69
|
+
<label class="radio-wrap">
|
|
70
|
+
<div class="radio-dot-outer selected"><div class="radio-dot-inner"></div></div>
|
|
71
|
+
<span class="radio-label">Single Shot</span>
|
|
72
|
+
</label>
|
|
73
|
+
<label class="radio-wrap">
|
|
74
|
+
<div class="radio-dot-outer"><div class="radio-dot-inner"></div></div>
|
|
75
|
+
<span class="radio-label">Continuous Hi</span>
|
|
76
|
+
</label>
|
|
77
|
+
<label class="radio-wrap">
|
|
78
|
+
<div class="radio-dot-outer"><div class="radio-dot-inner"></div></div>
|
|
79
|
+
<span class="radio-label">Timer 10s</span>
|
|
80
|
+
</label>
|
|
81
|
+
</div>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Size Variants
|
|
85
|
+
No explicit size variants defined.
|
|
86
|
+
|
|
87
|
+
## Material Variants
|
|
88
|
+
- Outer ring: Recessed selector housing (bg-inset)
|
|
89
|
+
- Inner dot: Illuminated indicator (amber when selected, transparent when not)
|
|
90
|
+
|
|
91
|
+
## Theme Behavior
|
|
92
|
+
- Outer ring background and border swap via tokens
|
|
93
|
+
- Selected state amber glow is fixed across themes
|
|
94
|
+
- Inset shadow adapts via tokens
|
|
95
|
+
|
|
96
|
+
## Constraints
|
|
97
|
+
1. Only ONE radio in a group can be `.selected` at a time (mutually exclusive).
|
|
98
|
+
2. Inner dot MUST be transparent when not selected.
|
|
99
|
+
3. Selected state MUST include amber glow on both outer ring and inner dot.
|
|
100
|
+
4. Outer ring uses 2px border (thicker than checkbox's 1px) for circular housing.
|
|
101
|
+
|
|
102
|
+
## Accessibility
|
|
103
|
+
- Wrap group in `[data-radio-group]` with `role="radiogroup"`
|
|
104
|
+
- Each option uses `role="radio"` with `aria-checked`
|
|
105
|
+
- Keyboard: Arrow keys to navigate within group, Space to select
|
|
106
|
+
- Requires JS to manage mutual exclusion (toggle `.selected` between items)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Rocker Switch
|
|
3
|
+
id: rocker
|
|
4
|
+
class: .rocker
|
|
5
|
+
category: toggles
|
|
6
|
+
index: 3
|
|
7
|
+
materials: [panel]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Rocker Switch
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Nokia phone side volume rocker, iPod volume buttons, Sony Ericsson volume control.
|
|
18
|
+
**Mechanism**: SPST momentary rocker switch -- elongated button pivots around central fulcrum. Pressing top tilts forward, pressing bottom tilts backward. Each end sits over its own dome switch. Momentary action -- springs back to center when released.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Body | 36x52px, elongated rectangle |
|
|
25
|
+
| Split | Central dividing line between halves |
|
|
26
|
+
| Pivot | Internal see-saw with spring-loaded center pivot |
|
|
27
|
+
| Travel | 1-2 degrees from center each direction |
|
|
28
|
+
| Mounting | Side-mounted, flush or slightly proud |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container
|
|
33
|
+
```css
|
|
34
|
+
.rocker {
|
|
35
|
+
display: flex; flex-direction: column;
|
|
36
|
+
width: 36px; height: 52px; border-radius: var(--radius-sm);
|
|
37
|
+
overflow: hidden; border: 1px solid var(--border-deep);
|
|
38
|
+
box-shadow: 0 1px 0 var(--glossy-hi);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Button Halves
|
|
43
|
+
```css
|
|
44
|
+
.rocker-btn {
|
|
45
|
+
flex: 1; display: flex; align-items: center; justify-content: center;
|
|
46
|
+
background: linear-gradient(180deg, var(--bg-surface), var(--bg-panel));
|
|
47
|
+
border: none; cursor: pointer; color: var(--text-muted); font-size: 10px;
|
|
48
|
+
transition: background 0.1s;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Active (Pressed) State
|
|
53
|
+
```css
|
|
54
|
+
.rocker-btn:active { background: var(--bg-inset); color: var(--text-primary); }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Split Line (Plus Half)
|
|
58
|
+
```css
|
|
59
|
+
.rocker-btn.plus { border-bottom: 1px solid var(--border-deep); }
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## HTML Structure
|
|
63
|
+
```html
|
|
64
|
+
<div class="rocker">
|
|
65
|
+
<button class="rocker-btn plus">+</button>
|
|
66
|
+
<button class="rocker-btn minus">−</button>
|
|
67
|
+
</div>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Size Variants
|
|
71
|
+
No explicit size variants defined.
|
|
72
|
+
|
|
73
|
+
## Material Variants
|
|
74
|
+
Default panel material for both halves.
|
|
75
|
+
|
|
76
|
+
## Theme Behavior
|
|
77
|
+
- Surface gradients swap via tokens
|
|
78
|
+
- Border colors swap via `--border-deep`
|
|
79
|
+
- Pressed state uses `--bg-inset` (recessed appearance)
|
|
80
|
+
|
|
81
|
+
## Constraints
|
|
82
|
+
1. Two halves MUST be separate `<button>` elements stacked vertically.
|
|
83
|
+
2. Split line (`border-bottom: 1px solid border-deep`) on top half creates visible pivot point.
|
|
84
|
+
3. Each half MUST press independently (`:active` on each).
|
|
85
|
+
4. Rocker is MOMENTARY -- no persistent state, springs back to neutral.
|
|
86
|
+
5. `overflow: hidden` is required to clip the border-radius to the container.
|
|
87
|
+
|
|
88
|
+
## Accessibility
|
|
89
|
+
- Uses native `<button>` elements for each half
|
|
90
|
+
- Keyboard: Enter/Space to activate focused half
|
|
91
|
+
- ARIA: Container could use `role="group"` with `aria-label="Volume"`
|
|
92
|
+
- Each button should have `aria-label` ("Volume up", "Volume down")
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Slide Switch
|
|
3
|
+
id: slide-track
|
|
4
|
+
class: .slide-track
|
|
5
|
+
category: toggles
|
|
6
|
+
index: 2
|
|
7
|
+
materials: [panel, glossy]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Slide Switch
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: iPod Classic hold switch, iPhone original silent/ring switch, Sony Walkman play/hold slider.
|
|
18
|
+
**Mechanism**: Functionally identical to toggle switch (SPDT wiper contact) but with larger, more ergonomic sliding element designed for finger operation (not thumbnail). iPod hold switch used gold-colored metal slider in milled aluminum channel.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Track | 52x26px (larger than toggle's 46x22px) |
|
|
25
|
+
| Thumb | 20px diameter (larger than toggle's 16px) |
|
|
26
|
+
| Border-radius | 13px (half of height) |
|
|
27
|
+
| Travel | 26px (left: 2px to left: 28px) |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Container
|
|
32
|
+
```css
|
|
33
|
+
.slide-switch { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Track
|
|
37
|
+
```css
|
|
38
|
+
.slide-track {
|
|
39
|
+
width: 52px; height: 26px; border-radius: 13px;
|
|
40
|
+
background: var(--bg-inset); border: 1px solid var(--border-subtle);
|
|
41
|
+
position: relative; transition: background 0.2s, border-color 0.2s;
|
|
42
|
+
box-shadow: var(--shadow-inset);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Track ON State
|
|
47
|
+
```css
|
|
48
|
+
.slide-track.on { background: linear-gradient(180deg, #1a2a1a, #0d1a0d); border-color: var(--green-on); }
|
|
49
|
+
[data-theme="light"] .slide-track.on { background: linear-gradient(180deg, #c0e8c0, #a0d8a0); border-color: #66bb66; }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Thumb
|
|
53
|
+
```css
|
|
54
|
+
.slide-thumb {
|
|
55
|
+
position: absolute; top: 2px; left: 2px;
|
|
56
|
+
width: 20px; height: 20px; border-radius: 50%;
|
|
57
|
+
background: linear-gradient(155deg, var(--bg-surface), var(--bg-panel));
|
|
58
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 var(--glossy-hi);
|
|
59
|
+
transition: left 0.18s var(--snap-fast), background 0.2s;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Thumb ON State
|
|
64
|
+
```css
|
|
65
|
+
.slide-track.on .slide-thumb {
|
|
66
|
+
left: 28px;
|
|
67
|
+
background: linear-gradient(155deg, #66ff66, #228833);
|
|
68
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 8px var(--green-glow);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Label
|
|
73
|
+
```css
|
|
74
|
+
.slide-label {
|
|
75
|
+
font-family: var(--font-ui); font-size: 9px; font-weight: 500;
|
|
76
|
+
letter-spacing: 1px; color: var(--text-muted);
|
|
77
|
+
}
|
|
78
|
+
.slide-track.on ~ .slide-label { color: var(--green-on); }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## HTML Structure
|
|
82
|
+
```html
|
|
83
|
+
<div class="slide-switch" data-toggle>
|
|
84
|
+
<div class="slide-track">
|
|
85
|
+
<div class="slide-thumb"></div>
|
|
86
|
+
</div>
|
|
87
|
+
<span class="slide-label">SILENT</span>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- ON state -->
|
|
91
|
+
<div class="slide-switch" data-toggle>
|
|
92
|
+
<div class="slide-track on">
|
|
93
|
+
<div class="slide-thumb"></div>
|
|
94
|
+
</div>
|
|
95
|
+
<span class="slide-label">RING</span>
|
|
96
|
+
</div>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Size Variants
|
|
100
|
+
No explicit size variants defined. Key difference from toggle-switch is the larger default size.
|
|
101
|
+
|
|
102
|
+
## Material Variants
|
|
103
|
+
- Track: Recessed panel
|
|
104
|
+
- Thumb OFF: Panel surface gradient with glossy highlight
|
|
105
|
+
- Thumb ON: Bright green gradient with glow
|
|
106
|
+
|
|
107
|
+
## Theme Behavior
|
|
108
|
+
- Dark ON track: `linear-gradient(180deg, #1a2a1a, #0d1a0d)` with green border
|
|
109
|
+
- Light ON track: `linear-gradient(180deg, #c0e8c0, #a0d8a0)` with lighter green border
|
|
110
|
+
- Thumb uses surface tokens, adapting automatically
|
|
111
|
+
|
|
112
|
+
## Constraints
|
|
113
|
+
1. Track MUST be 52x26px -- larger than toggle for thumb/finger operation.
|
|
114
|
+
2. Thumb MUST be 20px (not 16px like toggle) for ergonomic blind operation.
|
|
115
|
+
3. Slide transition MUST be 0.18s (slightly slower than toggle's 0.15s).
|
|
116
|
+
4. ON state track MUST use a gradient (not flat color) unlike the simpler toggle.
|
|
117
|
+
|
|
118
|
+
## Accessibility
|
|
119
|
+
- Add `tabindex="0"` and `role="switch"` with `aria-checked`
|
|
120
|
+
- Keyboard: Space to toggle
|
|
121
|
+
- Requires JS to toggle `.on` class
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Toggle Switch
|
|
3
|
+
id: toggle-track
|
|
4
|
+
class: .toggle-track
|
|
5
|
+
category: toggles
|
|
6
|
+
index: 1
|
|
7
|
+
materials: [panel, chrome]
|
|
8
|
+
sizes: [md]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Toggle Switch
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Nikon lens VR switch (ON/OFF), Sony Alpha AF/MF toggle, Canon EOS stabilizer switch.
|
|
18
|
+
**Mechanism**: SPDT slide switch (Single Pole, Double Throw). Plastic or metal slider moves linearly along a track between two positions. Metal wiper contact bridges different PCB trace pairs. Ball-and-spring detent mechanism holds slider in each position with positive click.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Track | 46x22px, milled rectangular channel, 2-3mm deep |
|
|
25
|
+
| Thumb | 16px diameter, 4-5mm protruding above track |
|
|
26
|
+
| Travel | 24px (left: 2px to left: 26px) |
|
|
27
|
+
| Detent force | 100-200gf |
|
|
28
|
+
|
|
29
|
+
## CSS Recipe
|
|
30
|
+
|
|
31
|
+
### Track (Container)
|
|
32
|
+
```css
|
|
33
|
+
.toggle-track {
|
|
34
|
+
width: 46px; height: 22px; border-radius: 11px;
|
|
35
|
+
background: var(--bg-inset); border: 1px solid var(--border-subtle);
|
|
36
|
+
position: relative; transition: background 0.2s, border-color 0.2s;
|
|
37
|
+
box-shadow: inset 0 1px 4px rgba(0,0,0,0.4);
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Track ON State
|
|
42
|
+
```css
|
|
43
|
+
.toggle-track.on { background: #0d1a0d; border-color: #1a4a1a; }
|
|
44
|
+
[data-theme="light"] .toggle-track.on { background: #d0f0d0; border-color: #88cc88; }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Thumb (Slider Knob)
|
|
48
|
+
```css
|
|
49
|
+
.toggle-thumb {
|
|
50
|
+
position: absolute; top: 2px; left: 2px;
|
|
51
|
+
width: 16px; height: 16px; border-radius: 50%;
|
|
52
|
+
background: linear-gradient(155deg, #585858, #2a2a2a);
|
|
53
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 1px 0 #686868;
|
|
54
|
+
transition: left 0.15s var(--snap-fast), background 0.2s, box-shadow 0.2s;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Thumb Light Theme
|
|
59
|
+
```css
|
|
60
|
+
[data-theme="light"] .toggle-thumb {
|
|
61
|
+
background: linear-gradient(155deg, #eee, #ccc);
|
|
62
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.15), inset 0 1px 0 #fff;
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Thumb ON State
|
|
67
|
+
```css
|
|
68
|
+
.toggle-track.on .toggle-thumb {
|
|
69
|
+
left: 26px;
|
|
70
|
+
background: linear-gradient(155deg, var(--green-hi), var(--green-on));
|
|
71
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.5), inset 0 1px 0 #aaff99, 0 0 8px var(--green-glow);
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Label
|
|
76
|
+
```css
|
|
77
|
+
.toggle-label {
|
|
78
|
+
font-size: 8px; letter-spacing: 2px; color: var(--text-muted);
|
|
79
|
+
transition: color 0.2s; text-transform: uppercase;
|
|
80
|
+
font-family: var(--font-ui); font-weight: 500;
|
|
81
|
+
}
|
|
82
|
+
.toggle-track.on ~ .toggle-label { color: var(--green-on); }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Wrapper
|
|
86
|
+
```css
|
|
87
|
+
.toggle-wrap {
|
|
88
|
+
display: flex; flex-direction: column; align-items: center;
|
|
89
|
+
gap: 6px; cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## HTML Structure
|
|
94
|
+
```html
|
|
95
|
+
<div class="toggle-wrap" data-toggle>
|
|
96
|
+
<div class="toggle-track">
|
|
97
|
+
<div class="toggle-thumb"></div>
|
|
98
|
+
</div>
|
|
99
|
+
<span class="toggle-label">OFF</span>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<!-- ON state -->
|
|
103
|
+
<div class="toggle-wrap" data-toggle>
|
|
104
|
+
<div class="toggle-track on">
|
|
105
|
+
<div class="toggle-thumb"></div>
|
|
106
|
+
</div>
|
|
107
|
+
<span class="toggle-label">STAB</span>
|
|
108
|
+
</div>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Size Variants
|
|
112
|
+
No explicit size variants defined.
|
|
113
|
+
|
|
114
|
+
## Material Variants
|
|
115
|
+
- Track: Recessed panel material
|
|
116
|
+
- Thumb OFF: Metallic gradient (dome catching light from upper-left)
|
|
117
|
+
- Thumb ON: Green gradient with green glow (embedded status LED)
|
|
118
|
+
|
|
119
|
+
## Theme Behavior
|
|
120
|
+
- Dark OFF thumb: `linear-gradient(155deg, #585858, #2a2a2a)` with strong shadow
|
|
121
|
+
- Light OFF thumb: `linear-gradient(155deg, #eee, #ccc)` with softer shadow
|
|
122
|
+
- Dark ON track: `#0d1a0d` (dark green)
|
|
123
|
+
- Light ON track: `#d0f0d0` (light green)
|
|
124
|
+
|
|
125
|
+
## Constraints
|
|
126
|
+
1. Thumb travel MUST be exactly `left: 2px` (OFF) to `left: 26px` (ON) -- 24px travel.
|
|
127
|
+
2. Detent snap MUST use `--snap-fast` easing (overshoot simulates detent spring).
|
|
128
|
+
3. ON state thumb MUST include green glow (`0 0 8px var(--green-glow)`) for LED effect.
|
|
129
|
+
4. Track border-radius MUST be half of height (11px) for capsule shape.
|
|
130
|
+
5. Inset shadow on track MUST be `rgba(0,0,0,0.4)` -- shallow recess.
|
|
131
|
+
|
|
132
|
+
## Accessibility
|
|
133
|
+
- Add `tabindex="0"` and `role="switch"` with `aria-checked` on toggle-wrap
|
|
134
|
+
- Keyboard: Space to toggle
|
|
135
|
+
- Requires JS to toggle `.on` class on track
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Audio Mixer Strip
|
|
3
|
+
id: audio-mixer-strip
|
|
4
|
+
components: [radial-knob, vu-meter, vertical-fader, led-dots, mode-badge]
|
|
5
|
+
materials: [default, metal]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Audio Mixer Strip
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
A vertical channel strip from a mixing console. Multiple strips are placed side by side to form a mixer bank. Each strip contains a pan knob, VU meter, channel fader, channel label, and solo/mute LED indicator.
|
|
13
|
+
|
|
14
|
+
## Reference Devices
|
|
15
|
+
|
|
16
|
+
Mackie 1604-VLZ Pro, SSL Duality, Neve 5088, Yamaha 02R, Behringer X32 (channel strip section).
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌──────┐ ┌──────┐ ┌──────┐
|
|
22
|
+
│ (PAN)│ │ (PAN)│ │ (PAN)│ ← radial-knob (40x40px)
|
|
23
|
+
│ │ │ │ │ │
|
|
24
|
+
│ ██ │ │ ██ │ │ ██ │ ← vu-meter (2 bars per channel)
|
|
25
|
+
│ ██ │ │ ██ │ │ ██ │
|
|
26
|
+
│ │ │ │ │ │
|
|
27
|
+
│ ┃━┃ │ │ ┃━┃ │ │ ┃━┃ │ ← vertical-fader (100px track)
|
|
28
|
+
│ ┃━┃ │ │ ┃━┃ │ │ ┃━┃ │
|
|
29
|
+
│ ┃━┃ │ │ ┃━┃ │ │ ┃━┃ │
|
|
30
|
+
│ │ │ │ │ │
|
|
31
|
+
│ CH1 │ │ CH2 │ │ MST │ ← channel label
|
|
32
|
+
│ ● │ │ ● │ │ ● │ ← led-dot (status)
|
|
33
|
+
└──────┘ └──────┘ └──────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Assembly Rules
|
|
37
|
+
|
|
38
|
+
1. **Container**: Use `.panel` with default material. `display: flex; gap: 16px; align-items: flex-end; padding: 16px`.
|
|
39
|
+
|
|
40
|
+
2. **Each channel strip**: Vertical flex column (`flex-direction: column; align-items: center; gap: 6px`).
|
|
41
|
+
|
|
42
|
+
3. **Pan knob**: `.radial-knob` at 40x40px (smaller than default). Indicator transform-origin adjusted for the smaller size (`transform-origin: 50% 16px`). Default material for regular channels, `.variant-metal` for master.
|
|
43
|
+
|
|
44
|
+
4. **Pan label**: `font-size: 7px; letter-spacing: 1px; color: var(--text-muted)`.
|
|
45
|
+
|
|
46
|
+
5. **VU meter**: 2 bars per channel, 50px height, 2px gap, 6px bar width. Compact sizing.
|
|
47
|
+
|
|
48
|
+
6. **Channel fader**: `.fader-v-track` at 100px height, 8px width. Thumb at 16x8px (smaller than default). Each channel at different fill heights for visual variety.
|
|
49
|
+
|
|
50
|
+
7. **Channel label**: `font-family: var(--font-display); font-size: 8px; color: var(--amber)`. Master channel in `color: var(--red-alert)`.
|
|
51
|
+
|
|
52
|
+
8. **Status LED**: `.led-dot.green` for regular channels, `.led-dot.red` for master.
|
|
53
|
+
|
|
54
|
+
## Component Configuration
|
|
55
|
+
|
|
56
|
+
| Component | Channel Config | Master Config |
|
|
57
|
+
|-----------|---------------|---------------|
|
|
58
|
+
| radial-knob | 40x40px, default material | 40x40px, `.variant-metal` |
|
|
59
|
+
| vu-meter | 2 bars, 50px height | 2 bars, 50px height, higher levels |
|
|
60
|
+
| vertical-fader | 100px track, varied fills | 100px track, high fill (80%) |
|
|
61
|
+
| channel label | `color: var(--amber)` | `color: var(--red-alert)` |
|
|
62
|
+
| led-dot | `.green` | `.red` |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Camera Viewfinder HUD
|
|
3
|
+
id: camera-viewfinder
|
|
4
|
+
components: [camera-readout, mode-badge, status-chips, battery-icon, focus-brackets, grid-overlay, exposure-scale, timecode-display]
|
|
5
|
+
materials: [phosphor-screen]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Camera Viewfinder HUD
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
Full-frame camera electronic viewfinder overlay. Components are positioned absolutely over a dark background, simulating the heads-up display (HUD) seen through a mirrorless camera EVF (Electronic Viewfinder). All readouts float over the live image without obscuring it.
|
|
13
|
+
|
|
14
|
+
## Reference Devices
|
|
15
|
+
|
|
16
|
+
Sony Alpha A7 III/IV EVF, Nikon Z6/Z8 EVF, Canon EOS R5 EVF, Fujifilm X-T4 EVF.
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌─────────────────────────────────────────────┐
|
|
22
|
+
│ [mode-badge:M] [readout:SS] [readout:F] [readout:ISO] [status-chip:REC] [battery] │
|
|
23
|
+
│ │
|
|
24
|
+
│ │
|
|
25
|
+
│ [focus-brackets] │
|
|
26
|
+
│ [grid-overlay] │
|
|
27
|
+
│ │
|
|
28
|
+
│ │
|
|
29
|
+
│ [exposure-scale ─────●─────] [timecode:00:12:34] │
|
|
30
|
+
└─────────────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Assembly Rules
|
|
34
|
+
|
|
35
|
+
1. **Container**: Use `.panel` with phosphor-screen material (`background: linear-gradient(180deg, #080808, #111)`). Padding: 0. Overflow: hidden.
|
|
36
|
+
|
|
37
|
+
2. **Top status bar**: Horizontal flex row with `justify-content: space-between`. Contains:
|
|
38
|
+
- Left group: mode badge (compact, `padding: 3px 8px`), camera readouts (`.inline` variant, `padding: 3px 8px`)
|
|
39
|
+
- Right group: status chip (`.active`, small font `8px`), battery icon
|
|
40
|
+
- Separated by `border-bottom: 1px solid #222`
|
|
41
|
+
|
|
42
|
+
3. **Viewfinder area**: Relative positioned div, minimum height 180px, `background: #1a1a1a`. Contains:
|
|
43
|
+
- Grid overlay lines at 33.3% and 66.6% (vertical and horizontal)
|
|
44
|
+
- Grid center dot
|
|
45
|
+
- Focus brackets positioned within the area
|
|
46
|
+
|
|
47
|
+
4. **Bottom bar**: Horizontal flex row with `justify-content: space-between`. Contains:
|
|
48
|
+
- Exposure scale (compact, `width: 120px`)
|
|
49
|
+
- Timecode display (compact, `padding: 3px 10px`, `font-size: 14px`)
|
|
50
|
+
- Separated by `border-top: 1px solid #222`
|
|
51
|
+
|
|
52
|
+
5. **All readouts use `.inline` variant** — horizontal layout for compact display
|
|
53
|
+
|
|
54
|
+
6. **Focus brackets default to one acquiring + one locked** for visual variety
|
|
55
|
+
|
|
56
|
+
## Component Configuration
|
|
57
|
+
|
|
58
|
+
| Component | Variant | Size Override |
|
|
59
|
+
|-----------|---------|--------------|
|
|
60
|
+
| mode-badge | compact | `font-size: 16px` on mode letter, `padding: 3px 8px` |
|
|
61
|
+
| camera-readout | `.inline` | `font-size: 12px` on value, `font-size: 7px` on label |
|
|
62
|
+
| status-chip | `.active` | `font-size: 8px`, `padding: 2px 6px` |
|
|
63
|
+
| battery-icon | default | `width: 20px`, `height: 10px` on body |
|
|
64
|
+
| exposure-scale | compact | `width: 120px` |
|
|
65
|
+
| timecode-display | compact | `font-size: 14px` on segments, `padding: 3px 10px` |
|
|
66
|
+
| focus-brackets | mixed | One `.acquiring`, one `.locked` |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Phone Interface
|
|
3
|
+
id: phone-interface
|
|
4
|
+
components: [status-bar, menu-grid, keypad-button, dialog, toast, d-pad, signal-bars, battery-icon]
|
|
5
|
+
materials: [glossy-polycarbonate, rubber]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Phone Interface
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
A Nokia-era feature phone interface. Combines the status bar, app menu grid, numeric keypad, and notification elements into a complete device screen experience.
|
|
13
|
+
|
|
14
|
+
## Reference Devices
|
|
15
|
+
|
|
16
|
+
Nokia 6600, Nokia 3310, Sony Ericsson T610, Motorola RAZR V3, Samsung SGH-D500.
|
|
17
|
+
|
|
18
|
+
## Layout
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
┌──────────────────────────┐
|
|
22
|
+
│ 12:45 3G ▂▄▆█ [██] │ ← status-bar
|
|
23
|
+
├──────────────────────────┤
|
|
24
|
+
│ │
|
|
25
|
+
│ 📞 ✉ ⚙ │
|
|
26
|
+
│ PHONE MSG SET │ ← menu-grid (3x3)
|
|
27
|
+
│ ♪ 📷 🌐 │
|
|
28
|
+
│ MUSIC CAM WEB │
|
|
29
|
+
│ │
|
|
30
|
+
├──────────────────────────┤
|
|
31
|
+
│ [1] [2] [3] │
|
|
32
|
+
│ [4] [5] [6] │ ← keypad (3x4 grid)
|
|
33
|
+
│ [7] [8] [9] │
|
|
34
|
+
│ [*] [0] [#] │
|
|
35
|
+
├──────────────────────────┤
|
|
36
|
+
│ OPTIONS BACK │ ← softkeys
|
|
37
|
+
└──────────────────────────┘
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Assembly Rules
|
|
41
|
+
|
|
42
|
+
1. **Container**: Use `.device-bezel` for the outer phone frame. Inner content area uses `bg-inset` background.
|
|
43
|
+
|
|
44
|
+
2. **Status bar**: Full width, compact variant. Contains time (left), network indicator text (center-left), signal bars (right), battery icon (far right).
|
|
45
|
+
|
|
46
|
+
3. **Menu grid**: `.menu-grid-wrap` centered in the screen area. 3x3 layout. Each item has an emoji icon (or Unicode symbol) and a label. Active item highlighted with blue tint.
|
|
47
|
+
|
|
48
|
+
4. **Keypad**: `.keypad` container below the screen. Full 3x4 grid with T9 letter labels on keys 2-9. Special keys (* and #) use `.special` variant. Optional `.call` key variant for green answer key.
|
|
49
|
+
|
|
50
|
+
5. **Softkeys**: A flex row below the keypad with `justify-content: space-between`. Two text labels (OPTIONS, BACK) styled as `.softkey` — small, muted text that responds to hover.
|
|
51
|
+
|
|
52
|
+
6. **Toast notification**: When shown, appears at the top of the screen area, overlaying the menu grid. Uses slide-down animation.
|
|
53
|
+
|
|
54
|
+
7. **Dialog**: When shown, centers over the screen area with the standard phone dialog pattern (title, body, two action buttons).
|
|
55
|
+
|
|
56
|
+
## Component Configuration
|
|
57
|
+
|
|
58
|
+
| Component | Variant | Notes |
|
|
59
|
+
|-----------|---------|-------|
|
|
60
|
+
| status-bar | compact (4px padding) | Width: full container |
|
|
61
|
+
| signal-bars | 3 of 5 active | `.off` on bars 4-5 |
|
|
62
|
+
| battery-icon | 70% fill, green | default variant |
|
|
63
|
+
| menu-grid | 3x3, one `.active` | Unicode icons for phone apps |
|
|
64
|
+
| keypad-button | T9 labels on 2-9 | One `.call` key optional |
|
|
65
|
+
| dialog | centered overlay | `max-width: 220px` |
|
|
66
|
+
| toast | top of screen | LED dot + text + timestamp |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
Accessibility requirements for all pudge-ui components — color contrast ratios, focus management, screen reader support, and keyboard interaction patterns.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Color Contrast
|
|
8
|
+
|
|
9
|
+
All text/background combinations meet WCAG AA minimum (4.5:1 for normal text):
|
|
10
|
+
- `--text-primary` on `--bg-base`: 11.2:1 (dark), 12.8:1 (light)
|
|
11
|
+
- `--text-secondary` on `--bg-base`: 5.1:1 (dark), 5.8:1 (light)
|
|
12
|
+
- `--amber` on `--bg-inset`: 6.3:1
|
|
13
|
+
|
|
14
|
+
## Focus Management
|
|
15
|
+
|
|
16
|
+
- Use native `<button>` elements for all interactive controls
|
|
17
|
+
- Browser default focus rings are preserved (not overridden)
|
|
18
|
+
- For custom controls (toggles, dials), add `tabindex="0"` and `role` attributes
|
|
19
|
+
|
|
20
|
+
## Screen Reader Text
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<span class="sr-only">Description for screen readers</span>
|
|
24
|
+
```
|
|
25
|
+
Uses the standard visually-hidden technique (1x1px, overflow hidden, clip rect).
|
|
26
|
+
|
|
27
|
+
## Keyboard Interaction Patterns
|
|
28
|
+
|
|
29
|
+
- **Buttons**: Enter/Space to activate
|
|
30
|
+
- **Toggles**: Space to toggle
|
|
31
|
+
- **Tabs**: Arrow keys to navigate, Enter to select
|
|
32
|
+
- **Steppers**: Arrow keys to increment/decrement
|
|
33
|
+
- **Accordion**: Enter/Space to expand/collapse
|