@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,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Context Menu (Radial)
|
|
3
|
+
id: context-menu
|
|
4
|
+
class: .radial-menu
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 9
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Context Menu (Radial)
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Pro camera "quick menu" (Sony Alpha quick-access dial), Wacom tablet radial menu, video game weapon wheels.
|
|
18
|
+
**Mechanism**: A radial/pie menu that appears around a point of activation. Items are arranged in a circle at equal angular intervals, each accessible by moving in that direction from center. Derived from military heads-up display (HUD) target-designator patterns. Faster than linear menus for small numbers of items (4-8) because the user only needs to specify a direction, not navigate a list.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Container | 140x140px, circular |
|
|
25
|
+
| Container border | 2px solid |
|
|
26
|
+
| Item size | 36x36px, circular |
|
|
27
|
+
| Item border | 1px solid |
|
|
28
|
+
| Shadow | 0 4px 20px rgba(0,0,0,0.4) |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container (`.radial-menu`)
|
|
33
|
+
```css
|
|
34
|
+
.radial-menu {
|
|
35
|
+
width: 140px; height: 140px; border-radius: 50%;
|
|
36
|
+
background: var(--bg-raised); border: 2px solid var(--border-mid);
|
|
37
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.4); position: relative;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Item (`.radial-menu-item`)
|
|
42
|
+
```css
|
|
43
|
+
.radial-menu-item {
|
|
44
|
+
position: absolute; width: 36px; height: 36px; border-radius: 50%;
|
|
45
|
+
background: var(--bg-surface); border: 1px solid var(--border-subtle);
|
|
46
|
+
display: flex; align-items: center; justify-content: center;
|
|
47
|
+
font-size: 14px; color: var(--text-secondary); cursor: pointer;
|
|
48
|
+
transition: background 0.12s, color 0.12s;
|
|
49
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Hover
|
|
54
|
+
```css
|
|
55
|
+
.radial-menu-item:hover { background: var(--bg-panel); color: var(--amber); }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## HTML Structure
|
|
59
|
+
```html
|
|
60
|
+
<div class="radial-menu">
|
|
61
|
+
<div class="radial-menu-item" style="top:8px;left:50%;transform:translateX(-50%)">★</div>
|
|
62
|
+
<div class="radial-menu-item" style="top:50%;right:8px;transform:translateY(-50%)">✎</div>
|
|
63
|
+
<div class="radial-menu-item" style="bottom:8px;left:50%;transform:translateX(-50%)">🗑</div>
|
|
64
|
+
<div class="radial-menu-item" style="top:50%;left:8px;transform:translateY(-50%)">🔍</div>
|
|
65
|
+
</div>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Size Variants
|
|
69
|
+
No size variants defined.
|
|
70
|
+
|
|
71
|
+
## Material Variants
|
|
72
|
+
No material variants. Uses standard raised surface with elevated shadow.
|
|
73
|
+
|
|
74
|
+
## Theme Behavior
|
|
75
|
+
- Background swaps via `--bg-raised`
|
|
76
|
+
- Item backgrounds swap via `--bg-surface`
|
|
77
|
+
- Hover always uses amber accent
|
|
78
|
+
- Shadow reduces in light mode
|
|
79
|
+
|
|
80
|
+
## Constraints
|
|
81
|
+
1. MUST use circular container (border-radius: 50%)
|
|
82
|
+
2. Items MUST be positioned at cardinal/ordinal points using absolute positioning
|
|
83
|
+
3. MUST support 4-8 items maximum (more becomes unusable)
|
|
84
|
+
4. Items MUST be circular buttons (border-radius: 50%)
|
|
85
|
+
5. Hover MUST highlight item in amber
|
|
86
|
+
6. MUST use elevated shadow to indicate floating overlay context
|
|
87
|
+
7. Container border MUST be 2px (thicker than standard 1px to define the ring)
|
|
88
|
+
|
|
89
|
+
## Accessibility
|
|
90
|
+
- Container should have `role="menu"`
|
|
91
|
+
- Items should have `role="menuitem"` with descriptive `aria-label`
|
|
92
|
+
- Support arrow key navigation between items (mapped to positions)
|
|
93
|
+
- Escape key should dismiss the menu
|
|
94
|
+
- Menu should trap focus while open
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: D-Pad
|
|
3
|
+
id: d-pad
|
|
4
|
+
class: .dpad
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 4
|
|
7
|
+
materials: [rubber]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# D-Pad
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Game Boy Advance, Nintendo DS, Sony PSP, Nokia N-Gage.
|
|
18
|
+
**Mechanism**: A cross-shaped rocker pad (directional pad). The D-pad is a single injection-molded plastic cross that sits over four individual dome switches arranged at the cardinal points. The cross pivots on a central post -- pressing one arm tilts the cross to actuate the dome switch beneath that arm. The other arms lift slightly. Only one dome switch can be activated at a time in a pure D-pad design (some allow diagonals by pressing two adjacent arms).
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Container | 110x110px, position relative |
|
|
25
|
+
| Arm width (up/down) | 26x22px |
|
|
26
|
+
| Arm width (left/right) | 22x26px |
|
|
27
|
+
| Center button | 24x24px, circular |
|
|
28
|
+
| Travel | 1px in pressed direction |
|
|
29
|
+
| Cross span | ~20mm arm-to-arm |
|
|
30
|
+
| Arm material | Rubber (matte) |
|
|
31
|
+
|
|
32
|
+
## CSS Recipe
|
|
33
|
+
|
|
34
|
+
### Container (`.dpad`)
|
|
35
|
+
```css
|
|
36
|
+
.dpad { width: 110px; height: 110px; position: relative; }
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Arms (`.dpad-arm`)
|
|
40
|
+
```css
|
|
41
|
+
.dpad-arm {
|
|
42
|
+
position: absolute; border: none; cursor: pointer;
|
|
43
|
+
background: linear-gradient(180deg, var(--rubber-hi), var(--rubber-bg));
|
|
44
|
+
box-shadow: 0 2px 0 var(--border-deep), inset 0 1px 0 rgba(255,255,255,0.08);
|
|
45
|
+
display: flex; align-items: center; justify-content: center;
|
|
46
|
+
color: var(--text-muted); font-size: 12px;
|
|
47
|
+
transition: transform 0.05s, box-shadow 0.05s, color 0.1s;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Active (pressed)
|
|
52
|
+
```css
|
|
53
|
+
.dpad-arm:active { box-shadow: 0 1px 0 var(--border-deep); color: var(--blue-info); }
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Directional positioning
|
|
57
|
+
```css
|
|
58
|
+
.dpad-arm.up { top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 22px; border-radius: 4px 4px 0 0; }
|
|
59
|
+
.dpad-arm.down { bottom: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 22px; border-radius: 0 0 4px 4px; }
|
|
60
|
+
.dpad-arm.left { left: 0; top: 50%; transform: translateY(-50%); width: 22px; height: 26px; border-radius: 4px 0 0 4px; }
|
|
61
|
+
.dpad-arm.right { right: 0; top: 50%; transform: translateY(-50%); width: 22px; height: 26px; border-radius: 0 4px 4px 0; }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Directional press animations
|
|
65
|
+
```css
|
|
66
|
+
.dpad-arm.up:active { transform: translateX(-50%) translateY(1px); }
|
|
67
|
+
.dpad-arm.down:active { transform: translateX(-50%) translateY(-1px); }
|
|
68
|
+
.dpad-arm.left:active { transform: translateY(-50%) translateX(1px); }
|
|
69
|
+
.dpad-arm.right:active { transform: translateY(-50%) translateX(-1px); }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Center button (`.dpad-center`)
|
|
73
|
+
```css
|
|
74
|
+
.dpad-center {
|
|
75
|
+
position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
|
|
76
|
+
width: 24px; height: 24px; border-radius: 50%;
|
|
77
|
+
background: linear-gradient(155deg, var(--bg-surface), var(--bg-panel));
|
|
78
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 var(--glossy-hi);
|
|
79
|
+
border: none; cursor: pointer; z-index: 2;
|
|
80
|
+
transition: transform 0.07s var(--snap-fast);
|
|
81
|
+
}
|
|
82
|
+
.dpad-center:active { transform: translate(-50%,-50%) scale(0.9); }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## HTML Structure
|
|
86
|
+
```html
|
|
87
|
+
<div class="dpad">
|
|
88
|
+
<button class="dpad-arm up">▲</button>
|
|
89
|
+
<button class="dpad-arm down">▼</button>
|
|
90
|
+
<button class="dpad-arm left">◀</button>
|
|
91
|
+
<button class="dpad-arm right">▶</button>
|
|
92
|
+
<button class="dpad-center"></button>
|
|
93
|
+
</div>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Size Variants
|
|
97
|
+
No size variants defined. Single default size matching Game Boy proportions.
|
|
98
|
+
|
|
99
|
+
## Material Variants
|
|
100
|
+
- Arms use rubber material (matte, `--rubber-hi`/`--rubber-bg` gradient)
|
|
101
|
+
- Center button uses glossy polycarbonate (brighter highlight, `--glossy-hi`)
|
|
102
|
+
|
|
103
|
+
## Theme Behavior
|
|
104
|
+
- Rubber tokens swap: dark `#3a3835`/`#2a2826`, light `#d8d4cc`/`#c8c4bc`
|
|
105
|
+
- Center button adapts via surface/panel tokens
|
|
106
|
+
- Shadow depth reduces in light mode
|
|
107
|
+
|
|
108
|
+
## Constraints
|
|
109
|
+
1. MUST press in the direction of the arrow (up arm moves down 1px, etc.)
|
|
110
|
+
2. MUST use rubber material gradient on arms (matte, low highlight opacity 0.08)
|
|
111
|
+
3. Center button MUST be circular and use glossy material
|
|
112
|
+
4. Center button MUST sit at z-index 2 above the arms
|
|
113
|
+
5. Arms MUST have rounded corners only on their outward-facing edges
|
|
114
|
+
6. MUST NOT allow more than one arm to appear pressed simultaneously (pure D-pad)
|
|
115
|
+
7. Travel MUST be exactly 1px in the pressed direction
|
|
116
|
+
|
|
117
|
+
## Accessibility
|
|
118
|
+
- Each arm should be a `<button>` element
|
|
119
|
+
- Arms should have `aria-label` describing direction ("Up", "Down", "Left", "Right")
|
|
120
|
+
- Center button should have `aria-label="Select"`
|
|
121
|
+
- Support keyboard arrow keys mapped to corresponding arm actions
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Drawer
|
|
3
|
+
id: drawer
|
|
4
|
+
class: .drawer-demo
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 11
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Drawer
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Sliding tray mechanisms on CD players, cassette deck tape compartment doors, rack-mount equipment sliding rails.
|
|
18
|
+
**Mechanism**: A panel that slides linearly from a hidden position to a visible one, typically from the right edge. Derived from the sliding tray mechanism in optical disc players -- a motorized tray extends from the device chassis on linear bearings. The transition uses `--snap-soft` easing to simulate the damped slide-and-settle motion of a tray reaching its stop position.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Demo container | 280x160px |
|
|
25
|
+
| Panel width | 180px |
|
|
26
|
+
| Panel padding | 12px |
|
|
27
|
+
| Title font size | 9px |
|
|
28
|
+
| Slide duration | 0.3s |
|
|
29
|
+
| Easing | `--snap-soft` |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Container (`.drawer-demo`)
|
|
34
|
+
```css
|
|
35
|
+
.drawer-demo {
|
|
36
|
+
position: relative; width: 280px; height: 160px;
|
|
37
|
+
background: var(--bg-inset); border: 1px solid var(--border-subtle);
|
|
38
|
+
border-radius: var(--radius-md); overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Panel (`.drawer-panel`)
|
|
43
|
+
```css
|
|
44
|
+
.drawer-panel {
|
|
45
|
+
position: absolute; top: 0; right: -180px; width: 180px; height: 100%;
|
|
46
|
+
background: var(--bg-raised); border-left: 1px solid var(--border-mid);
|
|
47
|
+
box-shadow: -4px 0 12px rgba(0,0,0,0.3);
|
|
48
|
+
transition: right 0.3s var(--snap-soft); padding: 12px; z-index: 2;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Open state
|
|
53
|
+
```css
|
|
54
|
+
.drawer-demo.open .drawer-panel { right: 0; }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Title (`.drawer-panel-title`)
|
|
58
|
+
```css
|
|
59
|
+
.drawer-panel-title { font-family: var(--font-ui); font-size: 9px; font-weight: 600; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 10px; }
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## HTML Structure
|
|
63
|
+
```html
|
|
64
|
+
<div class="drawer-demo" id="drawerDemo">
|
|
65
|
+
<div style="padding:12px">
|
|
66
|
+
<button class="push-btn xs" onclick="document.getElementById('drawerDemo').classList.toggle('open')">OPEN</button>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="drawer-panel">
|
|
69
|
+
<div class="drawer-panel-title">SETTINGS</div>
|
|
70
|
+
<div class="flex-col" style="gap:8px">
|
|
71
|
+
<!-- drawer content here -->
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Size Variants
|
|
78
|
+
No size variants defined.
|
|
79
|
+
|
|
80
|
+
## Material Variants
|
|
81
|
+
No material variants. Panel uses raised surface, container uses recessed inset.
|
|
82
|
+
|
|
83
|
+
## Theme Behavior
|
|
84
|
+
- Container background uses `--bg-inset` (recessed cavity)
|
|
85
|
+
- Panel background uses `--bg-raised` (sliding tray surface)
|
|
86
|
+
- Shadow on panel left edge provides depth separation
|
|
87
|
+
- Shadow reduces in light mode
|
|
88
|
+
|
|
89
|
+
## Constraints
|
|
90
|
+
1. MUST slide from right edge using `right` property animation
|
|
91
|
+
2. MUST use `--snap-soft` easing (damped slide, not linear or bouncy)
|
|
92
|
+
3. Transition duration MUST be 0.3s (250-350ms range for larger movements)
|
|
93
|
+
4. Panel MUST have left border and left shadow for edge definition
|
|
94
|
+
5. MUST use `overflow: hidden` on container to clip the hidden panel
|
|
95
|
+
6. Panel MUST be at z-index 2 to overlay container content
|
|
96
|
+
7. MUST toggle via `.open` class on the container element
|
|
97
|
+
|
|
98
|
+
## Accessibility
|
|
99
|
+
- Drawer trigger should indicate expanded state: `aria-expanded="true/false"`
|
|
100
|
+
- Drawer panel should have `role="dialog"` or `role="complementary"`
|
|
101
|
+
- Focus should move to drawer content when opened
|
|
102
|
+
- Escape key should close the drawer
|
|
103
|
+
- Focus should return to trigger when drawer closes
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Menu Grid
|
|
3
|
+
id: menu-grid
|
|
4
|
+
class: .menu-grid
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 1
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Menu Grid
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Nokia Series 40 app menu, Sony Ericsson main menu, Samsung SGH series phone menus.
|
|
18
|
+
**Mechanism**: A matrix navigation pattern originating from feature phone operating systems. The 3x3 grid (or 3x4) maps to the phone's numeric keypad -- press 1 for the top-left app, 2 for top-center, etc. Each cell contains an icon and a short label. The grid is navigated via the D-pad with a visual highlight showing the currently selected cell.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Grid | 3-column via `repeat(3, 1fr)` |
|
|
25
|
+
| Gap | 6px |
|
|
26
|
+
| Wrapper max-width | 200px |
|
|
27
|
+
| Wrapper padding | 12px |
|
|
28
|
+
| Item padding | 10px 6px |
|
|
29
|
+
| Icon size | 24x24px |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Wrapper (`.menu-grid-wrap`)
|
|
34
|
+
```css
|
|
35
|
+
.menu-grid-wrap {
|
|
36
|
+
display: flex; flex-direction: column;
|
|
37
|
+
background: var(--bg-raised); border: 1px solid var(--border-subtle);
|
|
38
|
+
border-radius: var(--radius-lg); padding: 12px;
|
|
39
|
+
box-shadow: var(--shadow-deep); max-width: 200px;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Grid (`.menu-grid`)
|
|
44
|
+
```css
|
|
45
|
+
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Item (`.menu-grid-item`)
|
|
49
|
+
```css
|
|
50
|
+
.menu-grid-item {
|
|
51
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
52
|
+
gap: 4px; padding: 10px 6px; border-radius: var(--radius-md);
|
|
53
|
+
cursor: pointer; transition: background 0.12s;
|
|
54
|
+
font-family: var(--font-ui); font-size: 8px; font-weight: 500;
|
|
55
|
+
color: var(--text-muted); letter-spacing: 1px;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Hover
|
|
60
|
+
```css
|
|
61
|
+
.menu-grid-item:hover { background: var(--glow-color); }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Active
|
|
65
|
+
```css
|
|
66
|
+
.menu-grid-item.active { background: var(--glow-color); color: var(--blue-info); }
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Icon (`.mgi-icon`)
|
|
70
|
+
```css
|
|
71
|
+
.menu-grid-item .mgi-icon {
|
|
72
|
+
width: 24px; height: 24px; border-radius: var(--radius-sm);
|
|
73
|
+
display: flex; align-items: center; justify-content: center; font-size: 14px;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## HTML Structure
|
|
78
|
+
```html
|
|
79
|
+
<div class="menu-grid-wrap">
|
|
80
|
+
<div class="menu-grid">
|
|
81
|
+
<div class="menu-grid-item active"><div class="mgi-icon">☎</div>PHONE</div>
|
|
82
|
+
<div class="menu-grid-item"><div class="mgi-icon">✉</div>MSG</div>
|
|
83
|
+
<div class="menu-grid-item"><div class="mgi-icon">⚙</div>SET</div>
|
|
84
|
+
<div class="menu-grid-item"><div class="mgi-icon">♫</div>MUSIC</div>
|
|
85
|
+
<div class="menu-grid-item"><div class="mgi-icon">📷</div>CAM</div>
|
|
86
|
+
<div class="menu-grid-item"><div class="mgi-icon">🌐</div>WEB</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Size Variants
|
|
92
|
+
No size variants defined. Single default size.
|
|
93
|
+
|
|
94
|
+
## Material Variants
|
|
95
|
+
No material variants. Uses standard raised panel surface (`--bg-raised`).
|
|
96
|
+
|
|
97
|
+
## Theme Behavior
|
|
98
|
+
- Wrapper background swaps via `--bg-raised` token (dark: `#1c1a18`, light: `#ffffff`)
|
|
99
|
+
- Shadow depth reduces in light mode via `--shadow-deep` token
|
|
100
|
+
- Text and border colors swap via theme tokens
|
|
101
|
+
|
|
102
|
+
## Constraints
|
|
103
|
+
1. MUST use 3-column grid layout to match phone keypad mapping
|
|
104
|
+
2. MUST NOT exceed 200px max-width (phone screen proportion)
|
|
105
|
+
3. MUST use `--radius-lg` on wrapper to match device bezel curvature
|
|
106
|
+
4. MUST show hover background highlight using `--glow-color`
|
|
107
|
+
5. Active item MUST use `--blue-info` color (iPod-era selection blue)
|
|
108
|
+
|
|
109
|
+
## Accessibility
|
|
110
|
+
- Each grid item should be a `<button>` or have `role="menuitem"`
|
|
111
|
+
- Container should have `role="menu"` or `role="grid"`
|
|
112
|
+
- Support arrow key navigation between grid items
|
|
113
|
+
- Active item should have `aria-current="true"`
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Menu List
|
|
3
|
+
id: menu-list
|
|
4
|
+
class: .menu-list-wrap
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 2
|
|
7
|
+
materials: [glossy-polycarbonate, glass]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Menu List
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: iPod Classic menu system, iPod Nano list navigation.
|
|
18
|
+
**Mechanism**: A scrolling list with arrow indicators -- the core navigation pattern of the iPod. Items are listed vertically with right-pointing chevrons indicating that selecting the item will navigate to a sub-menu. The currently selected item is highlighted with a blue/translucent bar. The Click Wheel scrolls the selection highlight up and down; the center button selects.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Min width | 200px |
|
|
25
|
+
| Title padding | 8px 14px |
|
|
26
|
+
| Item padding | 8px 14px |
|
|
27
|
+
| Border radius | `--radius-lg` (14px) |
|
|
28
|
+
| Title font size | 9px |
|
|
29
|
+
| Item font size | 11px |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Wrapper (`.menu-list-wrap`)
|
|
34
|
+
```css
|
|
35
|
+
.menu-list-wrap {
|
|
36
|
+
background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
|
|
37
|
+
border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
|
|
38
|
+
overflow: hidden; box-shadow: var(--shadow-deep); min-width: 200px;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Light theme override
|
|
43
|
+
```css
|
|
44
|
+
[data-theme="light"] .menu-list-wrap { background: var(--bg-raised); }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Title (`.menu-list-title`)
|
|
48
|
+
```css
|
|
49
|
+
.menu-list-title {
|
|
50
|
+
padding: 8px 14px;
|
|
51
|
+
background: linear-gradient(180deg, var(--bg-surface), var(--bg-panel));
|
|
52
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
53
|
+
font-family: var(--font-ui); font-size: 9px; font-weight: 600;
|
|
54
|
+
letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Item (`.menu-list-item`)
|
|
59
|
+
```css
|
|
60
|
+
.menu-list-item {
|
|
61
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
62
|
+
padding: 8px 14px; cursor: pointer;
|
|
63
|
+
border-bottom: 1px solid rgba(128,128,128,0.06); transition: background 0.1s;
|
|
64
|
+
}
|
|
65
|
+
.menu-list-item:last-child { border-bottom: none; }
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Hover
|
|
69
|
+
```css
|
|
70
|
+
.menu-list-item:hover { background: var(--glow-color); }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Active
|
|
74
|
+
```css
|
|
75
|
+
.menu-list-item.active {
|
|
76
|
+
background: linear-gradient(90deg, rgba(68,119,204,0.12), transparent);
|
|
77
|
+
color: var(--blue-info);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Sub-elements
|
|
82
|
+
```css
|
|
83
|
+
.mli-label { font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--text-primary); letter-spacing: 0.5px; }
|
|
84
|
+
.mli-arrow { color: var(--text-muted); font-size: 10px; }
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## HTML Structure
|
|
88
|
+
```html
|
|
89
|
+
<div class="menu-list-wrap">
|
|
90
|
+
<div class="menu-list-title">MUSIC</div>
|
|
91
|
+
<div class="menu-list-item active">
|
|
92
|
+
<span class="mli-label">Now Playing</span>
|
|
93
|
+
<span class="mli-arrow">▶</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="menu-list-item">
|
|
96
|
+
<span class="mli-label">Artists</span>
|
|
97
|
+
<span class="mli-arrow">▶</span>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="menu-list-item">
|
|
100
|
+
<span class="mli-label">Albums</span>
|
|
101
|
+
<span class="mli-arrow">▶</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="menu-list-item">
|
|
104
|
+
<span class="mli-label">Playlists</span>
|
|
105
|
+
<span class="mli-arrow">▶</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Size Variants
|
|
111
|
+
No size variants defined. Single default size.
|
|
112
|
+
|
|
113
|
+
## Material Variants
|
|
114
|
+
No material variants. Uses subtle translucent gradient in dark mode, solid raised surface in light mode.
|
|
115
|
+
|
|
116
|
+
## Theme Behavior
|
|
117
|
+
- Dark mode: translucent gradient background (`rgba(255,255,255,0.04)` to `0.02`)
|
|
118
|
+
- Light mode: solid `--bg-raised` background
|
|
119
|
+
- Active item uses blue-tinted left gradient in both themes
|
|
120
|
+
- Shadow depth reduces in light mode
|
|
121
|
+
|
|
122
|
+
## Constraints
|
|
123
|
+
1. MUST include right-pointing chevron arrow on each navigable item
|
|
124
|
+
2. MUST use horizontal blue gradient for active/selected item (iPod selection style)
|
|
125
|
+
3. MUST NOT use opaque backgrounds in dark mode -- the subtle translucency is key
|
|
126
|
+
4. MUST include a title bar with raised gradient background
|
|
127
|
+
5. Item separators MUST be very subtle (`rgba(128,128,128,0.06)`)
|
|
128
|
+
|
|
129
|
+
## Accessibility
|
|
130
|
+
- Container should have `role="menu"` or `role="listbox"`
|
|
131
|
+
- Items should have `role="menuitem"` or `role="option"`
|
|
132
|
+
- Active item should have `aria-selected="true"`
|
|
133
|
+
- Support Up/Down arrow key navigation
|
|
134
|
+
- Support Enter to select
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Pagination
|
|
3
|
+
id: pagination
|
|
4
|
+
class: .pagination
|
|
5
|
+
category: navigation
|
|
6
|
+
index: 8
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Pagination
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Track/channel number selectors on tape machines, CD changers.
|
|
18
|
+
**Mechanism**: Numbered buttons resembling track select buttons on multi-track tape machines or CD changers. Each button represents a page/track, with the active one highlighted.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Button size | 28x28px |
|
|
25
|
+
| Gap | 4px |
|
|
26
|
+
| Border radius | `--radius-sm` (4px) |
|
|
27
|
+
| Font size | 11px |
|
|
28
|
+
| Bottom shadow | 1px |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container (`.pagination`)
|
|
33
|
+
```css
|
|
34
|
+
.pagination { display: flex; gap: 4px; }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Page Button (`.page-btn`)
|
|
38
|
+
```css
|
|
39
|
+
.page-btn {
|
|
40
|
+
width: 28px; height: 28px; border-radius: var(--radius-sm);
|
|
41
|
+
background: var(--bg-surface); border: 1px solid var(--border-subtle);
|
|
42
|
+
display: flex; align-items: center; justify-content: center;
|
|
43
|
+
font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
|
|
44
|
+
cursor: pointer; transition: all 0.12s;
|
|
45
|
+
box-shadow: 0 1px 0 var(--border-deep);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Hover
|
|
50
|
+
```css
|
|
51
|
+
.page-btn:hover { color: var(--text-primary); border-color: var(--border-mid); }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Active (pressed)
|
|
55
|
+
```css
|
|
56
|
+
.page-btn:active { transform: translateY(1px); box-shadow: none; }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Active (selected page)
|
|
60
|
+
```css
|
|
61
|
+
.page-btn.active { color: var(--amber); border-color: var(--amber-dim); background: rgba(245,166,35,0.08); }
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## HTML Structure
|
|
65
|
+
```html
|
|
66
|
+
<div class="pagination">
|
|
67
|
+
<button class="page-btn">◀</button>
|
|
68
|
+
<button class="page-btn">1</button>
|
|
69
|
+
<button class="page-btn active">2</button>
|
|
70
|
+
<button class="page-btn">3</button>
|
|
71
|
+
<button class="page-btn">4</button>
|
|
72
|
+
<button class="page-btn">▶</button>
|
|
73
|
+
</div>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Size Variants
|
|
77
|
+
No size variants defined.
|
|
78
|
+
|
|
79
|
+
## Material Variants
|
|
80
|
+
No material variants. Uses Tier 1 (flush) raised depth model.
|
|
81
|
+
|
|
82
|
+
## Theme Behavior
|
|
83
|
+
- Button backgrounds swap via `--bg-surface`
|
|
84
|
+
- Border colors swap via `--border-subtle`
|
|
85
|
+
- Active page uses amber tint in both themes
|
|
86
|
+
- Shadow depth adapts via `--border-deep`
|
|
87
|
+
|
|
88
|
+
## Constraints
|
|
89
|
+
1. MUST use monospace font for page numbers (data readout convention)
|
|
90
|
+
2. Active page MUST use amber color with amber-dim border and amber-tinted background
|
|
91
|
+
3. Buttons MUST be square (28x28px)
|
|
92
|
+
4. Press travel MUST be 1px with shadow collapse (Tier 1 depth model)
|
|
93
|
+
5. MUST include prev/next arrow buttons (◀ / ▶)
|
|
94
|
+
6. MUST use `--radius-sm` (not pill or round) to match small hardware buttons
|
|
95
|
+
|
|
96
|
+
## Accessibility
|
|
97
|
+
- Container should have `role="navigation"` and `aria-label="Pagination"`
|
|
98
|
+
- Active page: `aria-current="page"`
|
|
99
|
+
- Previous/Next buttons: `aria-label="Previous page"` / `aria-label="Next page"`
|
|
100
|
+
- Disabled nav buttons should have `aria-disabled="true"`
|