@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,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Dialog
|
|
3
|
+
id: dialog
|
|
4
|
+
class: .phone-dialog
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 5
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Dialog
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Nokia phone confirmation dialogs, iPod "delete song?" prompt, camera "format card?" dialog.
|
|
18
|
+
**Mechanism**: A modal dialog box styled to match the device's design language -- rounded corners matching the phone's screen shape, soft-key button row at the bottom matching the physical soft-key buttons below the phone's screen. The elevated shadow (`shadow-deep`) makes the dialog appear to "float" above the underlying content.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Max width | 220px |
|
|
25
|
+
| Padding | 16px |
|
|
26
|
+
| Border radius | `--radius-lg` (14px) |
|
|
27
|
+
| Content gap | 12px |
|
|
28
|
+
| Title font size | 11px |
|
|
29
|
+
| Body font size | 10px |
|
|
30
|
+
| Action button height | 32px |
|
|
31
|
+
|
|
32
|
+
## CSS Recipe
|
|
33
|
+
|
|
34
|
+
### Container (`.phone-dialog`)
|
|
35
|
+
```css
|
|
36
|
+
.phone-dialog {
|
|
37
|
+
background: var(--bg-raised); border: 1px solid var(--border-subtle);
|
|
38
|
+
border-radius: var(--radius-lg); padding: 16px;
|
|
39
|
+
box-shadow: var(--shadow-deep); max-width: 220px;
|
|
40
|
+
display: flex; flex-direction: column; gap: 12px;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Title (`.dialog-title`)
|
|
45
|
+
```css
|
|
46
|
+
.dialog-title { font-family: var(--font-ui); font-size: 11px; font-weight: 600; color: var(--text-primary); letter-spacing: 1px; text-align: center; }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Body (`.dialog-body`)
|
|
50
|
+
```css
|
|
51
|
+
.dialog-body { font-family: var(--font-ui); font-size: 10px; color: var(--text-secondary); text-align: center; line-height: 1.6; }
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Actions (`.dialog-actions`)
|
|
55
|
+
```css
|
|
56
|
+
.dialog-actions { display: flex; gap: 8px; margin-top: 4px; }
|
|
57
|
+
.dialog-actions .gel-btn { flex: 1; height: 32px; min-width: 0; font-size: 9px; }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## HTML Structure
|
|
61
|
+
```html
|
|
62
|
+
<div class="phone-dialog">
|
|
63
|
+
<div class="dialog-title">DELETE FILE?</div>
|
|
64
|
+
<div class="dialog-body">This action cannot be undone. The file will be permanently removed.</div>
|
|
65
|
+
<div class="dialog-actions">
|
|
66
|
+
<button class="gel-btn">CANCEL</button>
|
|
67
|
+
<button class="gel-btn pink">DELETE</button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Size Variants
|
|
73
|
+
No size variants defined.
|
|
74
|
+
|
|
75
|
+
## Material Variants
|
|
76
|
+
No material variants. Uses standard raised surface with elevated shadow.
|
|
77
|
+
|
|
78
|
+
## Theme Behavior
|
|
79
|
+
- Background swaps via `--bg-raised`
|
|
80
|
+
- Shadow depth reduces in light mode via `--shadow-deep`
|
|
81
|
+
- Text colors adapt via tokens
|
|
82
|
+
- Action buttons (gel-btn) follow their own theme behavior
|
|
83
|
+
|
|
84
|
+
## Constraints
|
|
85
|
+
1. MUST use `--radius-lg` corners (matching phone screen shape)
|
|
86
|
+
2. MUST center-align title and body text
|
|
87
|
+
3. MUST use `flex-direction: column` with gap for consistent spacing
|
|
88
|
+
4. Action buttons MUST use `flex: 1` for equal-width buttons
|
|
89
|
+
5. MUST use `--shadow-deep` for floating elevation
|
|
90
|
+
6. Max width MUST be 220px (phone-proportioned)
|
|
91
|
+
7. Destructive action button MUST use `.pink` variant
|
|
92
|
+
|
|
93
|
+
## Accessibility
|
|
94
|
+
- Use `role="dialog"` and `aria-modal="true"`
|
|
95
|
+
- Include `aria-labelledby` pointing to the title element
|
|
96
|
+
- Include `aria-describedby` pointing to the body text
|
|
97
|
+
- Focus MUST be trapped within the dialog while open
|
|
98
|
+
- Escape key should dismiss (if cancellable)
|
|
99
|
+
- Focus should move to the first action button when dialog opens
|
|
100
|
+
- On close, focus returns to the trigger element
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Focus Brackets
|
|
3
|
+
id: focus-brackets
|
|
4
|
+
class: .focus-box
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 7
|
|
7
|
+
materials: []
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Focus Brackets
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Every autofocus camera since the Nikon F5 (1996) -- Sony, Canon, Nikon, Fujifilm.
|
|
18
|
+
**Mechanism**: The camera's autofocus system overlays bracket indicators on the viewfinder/EVF image at the position of detected subjects. Each bracket is formed from four L-shaped corner marks that define a bounding rectangle. Three states: Searching/acquiring (brackets pulse with opacity oscillation), Locked (brackets turn solid green), and Face/Eye AF labels (text labels below brackets).
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Demo container | 200x140px |
|
|
25
|
+
| Corner mark size | 12x12px |
|
|
26
|
+
| Corner border width | 2px |
|
|
27
|
+
| Label font size | 9px |
|
|
28
|
+
| Label offset | -18px below box |
|
|
29
|
+
| Pulse animation | 0.6s |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Demo container (`.focus-demo`)
|
|
34
|
+
```css
|
|
35
|
+
.focus-demo {
|
|
36
|
+
width: 200px; height: 140px; background: #222;
|
|
37
|
+
border-radius: var(--radius-sm); position: relative; overflow: hidden;
|
|
38
|
+
border: 1px solid #1e1e1e;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Focus box (`.focus-box`)
|
|
43
|
+
```css
|
|
44
|
+
.focus-box { position: absolute; border: none; }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Corner marks (`.focus-corner`)
|
|
48
|
+
```css
|
|
49
|
+
.focus-corner {
|
|
50
|
+
position: absolute; width: 12px; height: 12px;
|
|
51
|
+
border-color: var(--amber); border-style: solid; opacity: 0.9;
|
|
52
|
+
}
|
|
53
|
+
.focus-corner.tl { top: 0; left: 0; border-width: 2px 0 0 2px; }
|
|
54
|
+
.focus-corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
|
|
55
|
+
.focus-corner.bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
|
|
56
|
+
.focus-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Acquiring (searching) animation
|
|
60
|
+
```css
|
|
61
|
+
@keyframes focusPulse { to{opacity:0.3} }
|
|
62
|
+
.focus-box.acquiring .focus-corner { opacity: 0.7; animation: focusPulse 0.6s ease-in-out infinite alternate; }
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Locked state
|
|
66
|
+
```css
|
|
67
|
+
.focus-box.locked .focus-corner { border-color: var(--green-hi); }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Label (`.focus-label`)
|
|
71
|
+
```css
|
|
72
|
+
.focus-label {
|
|
73
|
+
position: absolute; bottom: -18px; left: 0;
|
|
74
|
+
font-size: 9px; color: var(--amber); letter-spacing: 1px; white-space: nowrap;
|
|
75
|
+
font-family: var(--font-ui);
|
|
76
|
+
}
|
|
77
|
+
.focus-box.locked .focus-label { color: var(--green-hi); }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## HTML Structure
|
|
81
|
+
```html
|
|
82
|
+
<div class="focus-demo" style="background:#333">
|
|
83
|
+
<!-- Acquiring state -->
|
|
84
|
+
<div class="focus-box" style="top:20px;left:30px;width:60px;height:60px">
|
|
85
|
+
<div class="focus-corner tl"></div>
|
|
86
|
+
<div class="focus-corner tr"></div>
|
|
87
|
+
<div class="focus-corner bl"></div>
|
|
88
|
+
<div class="focus-corner br"></div>
|
|
89
|
+
<div class="focus-label">FACE</div>
|
|
90
|
+
</div>
|
|
91
|
+
<!-- Locked state -->
|
|
92
|
+
<div class="focus-box locked" style="top:40px;left:120px;width:40px;height:40px">
|
|
93
|
+
<div class="focus-corner tl"></div>
|
|
94
|
+
<div class="focus-corner tr"></div>
|
|
95
|
+
<div class="focus-corner bl"></div>
|
|
96
|
+
<div class="focus-corner br"></div>
|
|
97
|
+
<div class="focus-label">EYE AF</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Size Variants
|
|
103
|
+
No size variants defined. Box size is determined by detected subject.
|
|
104
|
+
|
|
105
|
+
## Material Variants
|
|
106
|
+
No material variants. Pure HUD overlay element.
|
|
107
|
+
|
|
108
|
+
## Theme Behavior
|
|
109
|
+
- Bracket colors are fixed (amber for acquiring, green-hi for locked) regardless of theme
|
|
110
|
+
- Demo container background is fixed dark (#222/#333) to simulate viewfinder
|
|
111
|
+
|
|
112
|
+
## Constraints
|
|
113
|
+
1. MUST use four L-shaped corner marks (not a full border)
|
|
114
|
+
2. Corner marks MUST be 12x12px with 2px border
|
|
115
|
+
3. Acquiring state MUST pulse between 0.7 and 0.3 opacity at 0.6s cycle
|
|
116
|
+
4. Locked state MUST use `--green-hi` (#66ff66) for confirmed focus
|
|
117
|
+
5. Default/acquiring color MUST be `--amber`
|
|
118
|
+
6. Labels MUST appear below the bracket box
|
|
119
|
+
7. Label color MUST match bracket color (amber or green)
|
|
120
|
+
|
|
121
|
+
## Accessibility
|
|
122
|
+
- Focus brackets are visual-only overlays (decorative in the UI context)
|
|
123
|
+
- If used to convey status, add `aria-live="polite"` region with text description
|
|
124
|
+
- State changes should be announced: "Focus acquired", "Focus locked on [subject]"
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Grid Overlay
|
|
3
|
+
id: grid-overlay
|
|
4
|
+
class: .grid-overlay-demo
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 8
|
|
7
|
+
materials: []
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Grid Overlay
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Camera viewfinder grid display (rule-of-thirds, crosshair).
|
|
18
|
+
**Mechanism**: A composition guide overlay. The rule-of-thirds grid divides the viewfinder into a 3x3 grid with two vertical and two horizontal lines. Intersection points are suggested focal points for subject placement. The center crosshair (dot) marks the exact frame center. Lines are rendered at very low opacity (12%) so they are visible but do not interfere with viewing the image.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Demo container | 240x160px |
|
|
25
|
+
| Grid lines | 1px wide |
|
|
26
|
+
| Line opacity | 12% white |
|
|
27
|
+
| Center dot | 6x6px circle |
|
|
28
|
+
| Vertical lines at | 33.3% and 66.6% |
|
|
29
|
+
| Horizontal lines at | 33.3% and 66.6% |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Container (`.grid-overlay-demo`)
|
|
34
|
+
```css
|
|
35
|
+
.grid-overlay-demo {
|
|
36
|
+
width: 240px; height: 160px; background: #1a1a1a;
|
|
37
|
+
border: 1px solid #2a2a2a; border-radius: var(--radius-sm);
|
|
38
|
+
position: relative; overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Vertical lines (`.grid-line-v`)
|
|
43
|
+
```css
|
|
44
|
+
.grid-line-v { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.12); }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Horizontal lines (`.grid-line-h`)
|
|
48
|
+
```css
|
|
49
|
+
.grid-line-h { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.12); }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Center dot (`.grid-center-dot`)
|
|
53
|
+
```css
|
|
54
|
+
.grid-center-dot {
|
|
55
|
+
position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
|
|
56
|
+
width: 6px; height: 6px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## HTML Structure
|
|
61
|
+
```html
|
|
62
|
+
<div class="grid-overlay-demo">
|
|
63
|
+
<div class="grid-line-v" style="left:33.3%"></div>
|
|
64
|
+
<div class="grid-line-v" style="left:66.6%"></div>
|
|
65
|
+
<div class="grid-line-h" style="top:33.3%"></div>
|
|
66
|
+
<div class="grid-line-h" style="top:66.6%"></div>
|
|
67
|
+
<div class="grid-center-dot"></div>
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Size Variants
|
|
72
|
+
No size variants defined. Overlay scales to parent container.
|
|
73
|
+
|
|
74
|
+
## Material Variants
|
|
75
|
+
No material variants. Pure HUD overlay element.
|
|
76
|
+
|
|
77
|
+
## Theme Behavior
|
|
78
|
+
- Grid lines use fixed rgba values (do not change with theme)
|
|
79
|
+
- Container background is fixed dark (#1a1a1a) to simulate viewfinder
|
|
80
|
+
- Center dot border uses fixed 20% white opacity
|
|
81
|
+
|
|
82
|
+
## Constraints
|
|
83
|
+
1. Grid lines MUST be at exactly 33.3% and 66.6% positions (rule of thirds)
|
|
84
|
+
2. Line opacity MUST be 12% (visible but non-interfering)
|
|
85
|
+
3. Lines MUST be exactly 1px wide
|
|
86
|
+
4. Center dot MUST be a circle (border-radius: 50%) with border only (no fill)
|
|
87
|
+
5. Center dot MUST use 20% white opacity border
|
|
88
|
+
6. Container MUST use `position: relative` and `overflow: hidden`
|
|
89
|
+
|
|
90
|
+
## Accessibility
|
|
91
|
+
- Grid overlay is entirely decorative
|
|
92
|
+
- All elements should be hidden from assistive technology
|
|
93
|
+
- Use `aria-hidden="true"` on the container
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Modal
|
|
3
|
+
id: modal
|
|
4
|
+
class: .modal-overlay
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 10
|
|
7
|
+
materials: [glass, glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Modal
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Device screen overlay, camera settings overlay, phone OS modal sheets.
|
|
18
|
+
**Mechanism**: A full-screen backdrop with a centered content panel. The backdrop uses semi-transparent black with backdrop-filter blur to dim and defocus the underlying content, simulating a device screen that has been partially obscured by a system-level overlay.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Overlay size | 300x200px (demo) |
|
|
25
|
+
| Overlay background | rgba(0,0,0,0.6) |
|
|
26
|
+
| Blur | 4px |
|
|
27
|
+
| Content max-width | 240px |
|
|
28
|
+
| Content padding | 20px |
|
|
29
|
+
| Content border radius | `--radius-lg` (14px) |
|
|
30
|
+
| Content shadow | 0 8px 32px rgba(0,0,0,0.4) |
|
|
31
|
+
|
|
32
|
+
## CSS Recipe
|
|
33
|
+
|
|
34
|
+
### Overlay (`.modal-overlay`)
|
|
35
|
+
```css
|
|
36
|
+
.modal-overlay {
|
|
37
|
+
width: 300px; height: 200px; position: relative;
|
|
38
|
+
background: rgba(0,0,0,0.6); border-radius: var(--radius-lg);
|
|
39
|
+
display: flex; align-items: center; justify-content: center;
|
|
40
|
+
backdrop-filter: blur(4px);
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Content (`.modal-content`)
|
|
45
|
+
```css
|
|
46
|
+
.modal-content {
|
|
47
|
+
background: var(--bg-raised); border: 1px solid var(--border-mid);
|
|
48
|
+
border-radius: var(--radius-lg); padding: 20px;
|
|
49
|
+
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
|
50
|
+
max-width: 240px; width: 100%;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## HTML Structure
|
|
55
|
+
```html
|
|
56
|
+
<div class="modal-overlay">
|
|
57
|
+
<div class="modal-content">
|
|
58
|
+
<!-- modal content here -->
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Size Variants
|
|
64
|
+
No size variants defined. Content panel sizes to content.
|
|
65
|
+
|
|
66
|
+
## Material Variants
|
|
67
|
+
- Overlay: glass material (backdrop-filter blur)
|
|
68
|
+
- Content panel: standard raised surface
|
|
69
|
+
|
|
70
|
+
## Theme Behavior
|
|
71
|
+
- Overlay background is fixed rgba(0,0,0,0.6) in both themes
|
|
72
|
+
- Content panel background swaps via `--bg-raised`
|
|
73
|
+
- Content shadow is stronger than standard panels (0.4 opacity)
|
|
74
|
+
|
|
75
|
+
## Constraints
|
|
76
|
+
1. Overlay MUST use `backdrop-filter: blur(4px)` for frosted glass effect
|
|
77
|
+
2. Overlay MUST be 60% opaque black
|
|
78
|
+
3. Content panel MUST use elevated shadow (0 8px 32px, stronger than standard)
|
|
79
|
+
4. Content MUST be centered via flex
|
|
80
|
+
5. Content MUST use `--radius-lg` corners
|
|
81
|
+
6. In production, overlay should cover full viewport with `position: fixed; inset: 0`
|
|
82
|
+
|
|
83
|
+
## Accessibility
|
|
84
|
+
- Overlay should have `role="dialog"` and `aria-modal="true"`
|
|
85
|
+
- Include `aria-labelledby` for the modal title
|
|
86
|
+
- Focus MUST be trapped within the modal
|
|
87
|
+
- Escape key should close the modal
|
|
88
|
+
- Background content should have `aria-hidden="true"` and `inert` while modal is open
|
|
89
|
+
- Focus returns to trigger element on close
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Panel
|
|
3
|
+
id: panel
|
|
4
|
+
class: .panel
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 1
|
|
7
|
+
materials: [brushed-metal]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: true
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Panel
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: 19-inch rack-mount equipment modules (PreSonus, Mackie, MOTU), modular synthesizer panels (Eurorack).
|
|
18
|
+
**Mechanism**: A CNC-milled aluminum or stamped steel panel that forms the front face of a rack-mount module. The panel has chamfered edges (CNC-milled 45-degree bevels around the perimeter that catch light on the top and left edges), corner registration marks (L-shaped alignment marks used during manufacturing), and a serial/revision block at the bottom.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Padding | 22px |
|
|
25
|
+
| Border radius | `--radius-lg` (14px) |
|
|
26
|
+
| Corner marks | 14x14px L-shapes |
|
|
27
|
+
| Corner mark offset | 10px from edges |
|
|
28
|
+
| Title font size | 11px |
|
|
29
|
+
| Label font size | 9px |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Container (`.panel`)
|
|
34
|
+
```css
|
|
35
|
+
.panel {
|
|
36
|
+
position: relative;
|
|
37
|
+
background: linear-gradient(180deg, var(--bg-surface), var(--bg-panel));
|
|
38
|
+
border: 1px solid var(--border-mid); border-radius: var(--radius-lg);
|
|
39
|
+
padding: 22px;
|
|
40
|
+
box-shadow: 0 2px 0 var(--border-deep), 0 10px 28px rgba(0,0,0,0.3), inset 0 1px 0 var(--border-hi);
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Corner registration marks
|
|
46
|
+
```css
|
|
47
|
+
.panel::before, .panel::after {
|
|
48
|
+
content: ''; position: absolute; width: 14px; height: 14px;
|
|
49
|
+
border: 1px solid var(--border-hi); opacity: 0.35;
|
|
50
|
+
}
|
|
51
|
+
.panel::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
|
|
52
|
+
.panel::after { right: 10px; bottom: 10px; border-left: none; border-top: none; }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Title (`.panel-title`)
|
|
56
|
+
```css
|
|
57
|
+
.panel-title {
|
|
58
|
+
font-family: var(--font-display); letter-spacing: 2px;
|
|
59
|
+
font-size: 11px; margin-bottom: 14px; color: var(--text-primary);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Label (`.panel-label`)
|
|
64
|
+
```css
|
|
65
|
+
.panel-label {
|
|
66
|
+
color: var(--text-muted); letter-spacing: 2px;
|
|
67
|
+
font-size: 9px; margin-bottom: 10px; font-family: var(--font-ui); font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Serial block (`.serial`)
|
|
72
|
+
```css
|
|
73
|
+
.serial { margin-top: 16px; color: var(--text-muted); font-size: 9px; letter-spacing: 2px; display: flex; justify-content: space-between; font-family: var(--font-ui); }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## HTML Structure
|
|
77
|
+
```html
|
|
78
|
+
<div class="panel" style="width:240px">
|
|
79
|
+
<div class="panel-title">CONTROL CLUSTER</div>
|
|
80
|
+
<div class="panel-label">SYSTEM STATUS</div>
|
|
81
|
+
<div class="flex-row" style="gap:8px">
|
|
82
|
+
<button class="push-btn xs active">MODE</button>
|
|
83
|
+
<button class="push-btn xs">SYS</button>
|
|
84
|
+
<button class="push-btn xs">NAV</button>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="serial"><span>REV-B</span><span>UNIT-04</span></div>
|
|
87
|
+
</div>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Size Variants
|
|
91
|
+
No size variants defined. Width is set by content or parent container.
|
|
92
|
+
|
|
93
|
+
## Material Variants
|
|
94
|
+
No material variants. Uses machined panel surface gradient.
|
|
95
|
+
|
|
96
|
+
## Theme Behavior
|
|
97
|
+
- Background gradient swaps via `--bg-surface` / `--bg-panel` tokens
|
|
98
|
+
- Corner marks use `--border-hi` (adapts to theme)
|
|
99
|
+
- Shadow stack reduces in light mode (0.3 ambient shadow becomes 0.08)
|
|
100
|
+
- Top highlight (`inset 0 1px 0 var(--border-hi)`) adapts automatically
|
|
101
|
+
|
|
102
|
+
## Constraints
|
|
103
|
+
1. MUST use `position: relative` for corner mark positioning
|
|
104
|
+
2. MUST include L-shaped corner registration marks via `::before` and `::after`
|
|
105
|
+
3. Corner marks MUST be at 35% opacity
|
|
106
|
+
4. MUST use Tier 3 (elevated) shadow model: 2px hard edge + 10px ambient + inset highlight
|
|
107
|
+
5. MUST use `overflow: hidden` to prevent content from overlapping corners
|
|
108
|
+
6. Title MUST use `--font-display` (Michroma) for equipment branding feel
|
|
109
|
+
7. Serial/revision block SHOULD appear at the bottom
|
|
110
|
+
|
|
111
|
+
## Accessibility
|
|
112
|
+
- Use `role="region"` with `aria-label` describing the panel's purpose
|
|
113
|
+
- Panel title should use appropriate heading level
|
|
114
|
+
- Corner marks are decorative (handled by pseudo-elements, inherently hidden from AT)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Plastic Card
|
|
3
|
+
id: plastic-card
|
|
4
|
+
class: .plastic-card
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 3
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: false
|
|
10
|
+
requires_js: false
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Plastic Card
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: CompactFlash card, memory stick, ID badge.
|
|
18
|
+
**Mechanism**: A credit-card-sized or smaller component -- injection-molded polycarbonate with a thickness of 1-2mm. The glossy catch-light highlight and subtle depth shadow simulate the material properties of a thin plastic card.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Padding | 14px |
|
|
25
|
+
| Border radius | `--radius-md` (8px) |
|
|
26
|
+
| Label font size | 8px |
|
|
27
|
+
| Value font size | 20px |
|
|
28
|
+
| Sub font size | 9px |
|
|
29
|
+
|
|
30
|
+
## CSS Recipe
|
|
31
|
+
|
|
32
|
+
### Container (`.plastic-card`)
|
|
33
|
+
```css
|
|
34
|
+
.plastic-card {
|
|
35
|
+
background: linear-gradient(180deg, var(--bg-raised), var(--bg-surface));
|
|
36
|
+
border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
|
|
37
|
+
padding: 14px;
|
|
38
|
+
box-shadow: 0 2px 0 var(--border-deep), 0 2px 8px rgba(0,0,0,0.1), inset 0 1px 0 var(--glossy-hi);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Label (`.card-label`)
|
|
43
|
+
```css
|
|
44
|
+
.plastic-card .card-label {
|
|
45
|
+
font-family: var(--font-ui); font-size: 8px; font-weight: 500;
|
|
46
|
+
letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Value (`.card-value`)
|
|
51
|
+
```css
|
|
52
|
+
.plastic-card .card-value { font-family: var(--font-mono); font-size: 20px; color: var(--text-primary); letter-spacing: 1px; }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Sub-text (`.card-sub`)
|
|
56
|
+
```css
|
|
57
|
+
.plastic-card .card-sub { font-family: var(--font-ui); font-size: 9px; color: var(--text-secondary); margin-top: 2px; }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## HTML Structure
|
|
61
|
+
```html
|
|
62
|
+
<div class="plastic-card" style="width:160px">
|
|
63
|
+
<div class="card-label">STORAGE</div>
|
|
64
|
+
<div class="card-value">32<span style="font-size:12px;color:var(--text-muted)">GB</span></div>
|
|
65
|
+
<div class="card-sub">CF Card -- Slot 1</div>
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Size Variants
|
|
70
|
+
No size variants defined. Width set by parent or inline style.
|
|
71
|
+
|
|
72
|
+
## Material Variants
|
|
73
|
+
No material variants. Uses glossy polycarbonate depth model (2px edge + glossy inset highlight).
|
|
74
|
+
|
|
75
|
+
## Theme Behavior
|
|
76
|
+
- Background gradient adapts via `--bg-raised` / `--bg-surface`
|
|
77
|
+
- Glossy highlight (`--glossy-hi`) adapts to theme
|
|
78
|
+
- Shadow ambient component (0.1 opacity) is subtle in both themes
|
|
79
|
+
- Text colors swap via tokens
|
|
80
|
+
|
|
81
|
+
## Constraints
|
|
82
|
+
1. MUST use `--glossy-hi` inset highlight (polycarbonate catch-light)
|
|
83
|
+
2. MUST use `--radius-md` (not lg -- card is smaller than a panel)
|
|
84
|
+
3. Shadow MUST be lighter than Panel -- 2px hard edge + 2px 8px ambient (not 10px 28px)
|
|
85
|
+
4. Value MUST use monospace font at 20px for prominent data display
|
|
86
|
+
5. Label MUST be uppercase with 2px letter-spacing
|
|
87
|
+
6. Units should be smaller font size and muted color
|
|
88
|
+
|
|
89
|
+
## Accessibility
|
|
90
|
+
- Use appropriate semantic elements for label/value pairs
|
|
91
|
+
- Consider `role="group"` with `aria-label` for the card
|
|
92
|
+
- Value should be readable by screen readers (include units in text)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Popover
|
|
3
|
+
id: popover
|
|
4
|
+
class: .popover
|
|
5
|
+
category: overlays
|
|
6
|
+
index: 11
|
|
7
|
+
materials: [glossy-polycarbonate]
|
|
8
|
+
sizes: [default]
|
|
9
|
+
interactive: true
|
|
10
|
+
requires_js: true
|
|
11
|
+
canvas: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Popover
|
|
15
|
+
|
|
16
|
+
## Physical Analog
|
|
17
|
+
**Reference devices**: Equipment info panels, camera setting detail popups, expanded parameter displays.
|
|
18
|
+
**Mechanism**: A floating content panel that appears near a trigger element to show additional information or controls. Unlike tooltips (read-only, small), popovers can contain interactive content and are larger. Distinguished from dialogs by not requiring a backdrop overlay.
|
|
19
|
+
|
|
20
|
+
## Geometry
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| Padding | 10px 14px |
|
|
25
|
+
| Border radius | `--radius-md` (8px) |
|
|
26
|
+
| Max width | 180px |
|
|
27
|
+
| Font size | 10px |
|
|
28
|
+
| Line height | 1.6 |
|
|
29
|
+
| Shadow | 0 4px 16px rgba(0,0,0,0.3) |
|
|
30
|
+
|
|
31
|
+
## CSS Recipe
|
|
32
|
+
|
|
33
|
+
### Container (`.popover`)
|
|
34
|
+
```css
|
|
35
|
+
.popover {
|
|
36
|
+
padding: 10px 14px; background: var(--bg-raised);
|
|
37
|
+
border: 1px solid var(--border-mid); border-radius: var(--radius-md);
|
|
38
|
+
box-shadow: 0 4px 16px rgba(0,0,0,0.3);
|
|
39
|
+
font-family: var(--font-ui); font-size: 10px; color: var(--text-secondary);
|
|
40
|
+
max-width: 180px; line-height: 1.6;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## HTML Structure
|
|
45
|
+
```html
|
|
46
|
+
<div class="popover">
|
|
47
|
+
Additional details and controls appear here. This panel can contain interactive elements.
|
|
48
|
+
</div>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Size Variants
|
|
52
|
+
No size variants defined.
|
|
53
|
+
|
|
54
|
+
## Material Variants
|
|
55
|
+
No material variants. Uses standard raised surface with floating shadow.
|
|
56
|
+
|
|
57
|
+
## Theme Behavior
|
|
58
|
+
- Background swaps via `--bg-raised`
|
|
59
|
+
- Border adapts via `--border-mid`
|
|
60
|
+
- Text uses `--text-secondary` (slightly muted, secondary reading)
|
|
61
|
+
- Shadow reduces in light mode
|
|
62
|
+
|
|
63
|
+
## Constraints
|
|
64
|
+
1. MUST use `--radius-md` (between tooltip's sm and panel's lg)
|
|
65
|
+
2. Max width MUST be 180px (compact, not a full panel)
|
|
66
|
+
3. Shadow MUST be 0 4px 16px (floating above surface, between tooltip and modal depth)
|
|
67
|
+
4. Text MUST use `--text-secondary` (secondary information context)
|
|
68
|
+
5. MUST NOT use backdrop overlay (popovers are non-modal)
|
|
69
|
+
|
|
70
|
+
## Accessibility
|
|
71
|
+
- Trigger should have `aria-haspopup="true"` and `aria-expanded="true/false"`
|
|
72
|
+
- Popover should have `role="dialog"` (if interactive) or an appropriate role
|
|
73
|
+
- Popover should be dismissible with Escape key
|
|
74
|
+
- If interactive, focus should move to popover content
|
|
75
|
+
- Clicking outside should dismiss the popover
|