@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.
Files changed (236) hide show
  1. package/README.md +63 -0
  2. package/dist/__tests__/catalog.test.d.ts +1 -0
  3. package/dist/__tests__/catalog.test.js +50 -0
  4. package/dist/__tests__/search.test.d.ts +1 -0
  5. package/dist/__tests__/search.test.js +44 -0
  6. package/dist/__tests__/validation.test.d.ts +1 -0
  7. package/dist/__tests__/validation.test.js +34 -0
  8. package/dist/assembler.d.ts +6 -0
  9. package/dist/assembler.js +95 -0
  10. package/dist/catalog.d.ts +22 -0
  11. package/dist/catalog.js +10 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +33 -0
  14. package/dist/search.d.ts +5 -0
  15. package/dist/search.js +21 -0
  16. package/dist/tools.d.ts +105 -0
  17. package/dist/tools.js +129 -0
  18. package/package.json +55 -0
  19. package/spec/components/_index.yaml +822 -0
  20. package/spec/components/buttons/clear-button.md +89 -0
  21. package/spec/components/buttons/fn-grid.md +104 -0
  22. package/spec/components/buttons/gel-button.md +125 -0
  23. package/spec/components/buttons/icon-button.md +108 -0
  24. package/spec/components/buttons/keypad-button.md +123 -0
  25. package/spec/components/buttons/push-button.md +139 -0
  26. package/spec/components/buttons/rec-button.md +105 -0
  27. package/spec/components/buttons/rubber-button.md +100 -0
  28. package/spec/components/buttons/segmented-control.md +95 -0
  29. package/spec/components/data/assembled-panel.md +135 -0
  30. package/spec/components/data/data-table.md +116 -0
  31. package/spec/components/data/film-strip.md +110 -0
  32. package/spec/components/data/media-grid.md +98 -0
  33. package/spec/components/dials/click-wheel.md +115 -0
  34. package/spec/components/dials/cylindrical-horizontal.md +130 -0
  35. package/spec/components/dials/cylindrical-scroll.md +141 -0
  36. package/spec/components/dials/cylindrical-vertical.md +100 -0
  37. package/spec/components/dials/mode-dial.md +123 -0
  38. package/spec/components/dials/radial-knob.md +150 -0
  39. package/spec/components/dials/rotary-encoder.md +118 -0
  40. package/spec/components/forms/color-picker.md +99 -0
  41. package/spec/components/forms/file-input.md +105 -0
  42. package/spec/components/forms/search-bar.md +96 -0
  43. package/spec/components/forms/select.md +143 -0
  44. package/spec/components/forms/text-input.md +114 -0
  45. package/spec/components/forms/textarea.md +85 -0
  46. package/spec/components/indicators/accordion.md +137 -0
  47. package/spec/components/indicators/badges.md +87 -0
  48. package/spec/components/indicators/chips.md +93 -0
  49. package/spec/components/indicators/led-dots.md +103 -0
  50. package/spec/components/indicators/mode-badge.md +97 -0
  51. package/spec/components/indicators/profile-badge.md +99 -0
  52. package/spec/components/indicators/skeleton.md +94 -0
  53. package/spec/components/indicators/spinners.md +95 -0
  54. package/spec/components/indicators/status-chips.md +85 -0
  55. package/spec/components/indicators/transport-controls.md +114 -0
  56. package/spec/components/meters/battery-icon.md +104 -0
  57. package/spec/components/meters/eq-bars.md +93 -0
  58. package/spec/components/meters/ev-meter.md +96 -0
  59. package/spec/components/meters/exposure-scale.md +110 -0
  60. package/spec/components/meters/gauge-full.md +102 -0
  61. package/spec/components/meters/gauge-semi.md +113 -0
  62. package/spec/components/meters/histogram.md +70 -0
  63. package/spec/components/meters/level-indicator.md +95 -0
  64. package/spec/components/meters/oscilloscope.md +83 -0
  65. package/spec/components/meters/progress-bar.md +84 -0
  66. package/spec/components/meters/signal-bars.md +80 -0
  67. package/spec/components/meters/signal-meter.md +84 -0
  68. package/spec/components/meters/vu-meter.md +88 -0
  69. package/spec/components/meters/waveform.md +70 -0
  70. package/spec/components/navigation/breadcrumbs.md +94 -0
  71. package/spec/components/navigation/context-menu.md +94 -0
  72. package/spec/components/navigation/d-pad.md +121 -0
  73. package/spec/components/navigation/drawer.md +103 -0
  74. package/spec/components/navigation/menu-grid.md +113 -0
  75. package/spec/components/navigation/menu-list.md +134 -0
  76. package/spec/components/navigation/pagination.md +100 -0
  77. package/spec/components/navigation/rack-panel.md +124 -0
  78. package/spec/components/navigation/scrollbar.md +97 -0
  79. package/spec/components/navigation/status-bar.md +117 -0
  80. package/spec/components/navigation/tab-bar.md +104 -0
  81. package/spec/components/overlays/chassis-panel.md +94 -0
  82. package/spec/components/overlays/device-bezel.md +83 -0
  83. package/spec/components/overlays/dialog.md +100 -0
  84. package/spec/components/overlays/focus-brackets.md +124 -0
  85. package/spec/components/overlays/grid-overlay.md +93 -0
  86. package/spec/components/overlays/modal.md +89 -0
  87. package/spec/components/overlays/panel.md +114 -0
  88. package/spec/components/overlays/plastic-card.md +92 -0
  89. package/spec/components/overlays/popover.md +75 -0
  90. package/spec/components/overlays/toast.md +93 -0
  91. package/spec/components/overlays/tooltip.md +85 -0
  92. package/spec/components/readouts/camera-readout.md +123 -0
  93. package/spec/components/readouts/dot-matrix.md +88 -0
  94. package/spec/components/readouts/lcd-readout.md +116 -0
  95. package/spec/components/readouts/resource-monitor.md +98 -0
  96. package/spec/components/readouts/seven-segment.md +110 -0
  97. package/spec/components/readouts/signal-display.md +93 -0
  98. package/spec/components/readouts/timecode-display.md +94 -0
  99. package/spec/components/sliders/crossfader.md +102 -0
  100. package/spec/components/sliders/dual-range.md +97 -0
  101. package/spec/components/sliders/range-fader.md +100 -0
  102. package/spec/components/sliders/scrubber.md +104 -0
  103. package/spec/components/sliders/stepper.md +106 -0
  104. package/spec/components/sliders/vertical-fader.md +116 -0
  105. package/spec/components/sliders/volume-slider.md +107 -0
  106. package/spec/components/toggles/dip-switch.md +100 -0
  107. package/spec/components/toggles/led-checkbox.md +108 -0
  108. package/spec/components/toggles/power-toggle.md +93 -0
  109. package/spec/components/toggles/radio-button.md +106 -0
  110. package/spec/components/toggles/rocker-switch.md +92 -0
  111. package/spec/components/toggles/slide-switch.md +121 -0
  112. package/spec/components/toggles/toggle-switch.md +135 -0
  113. package/spec/compositions/audio-mixer-strip.md +62 -0
  114. package/spec/compositions/camera-viewfinder.md +66 -0
  115. package/spec/compositions/phone-interface.md +66 -0
  116. package/spec/foundation/accessibility.md +33 -0
  117. package/spec/foundation/canvas.md +20 -0
  118. package/spec/foundation/depth-model.md +82 -0
  119. package/spec/foundation/layout.md +33 -0
  120. package/spec/foundation/materials.md +68 -0
  121. package/spec/foundation/naming.md +33 -0
  122. package/spec/foundation/philosophy.md +27 -0
  123. package/spec/foundation/theme.md +39 -0
  124. package/spec/foundation/tokens.md +148 -0
  125. package/spec/guides/extension.md +189 -0
  126. package/spec/guides/for-llms.md +129 -0
  127. package/spec/guides/prompt-templates.md +143 -0
  128. package/spec/spec/components/_index.yaml +822 -0
  129. package/spec/spec/components/buttons/clear-button.md +89 -0
  130. package/spec/spec/components/buttons/fn-grid.md +104 -0
  131. package/spec/spec/components/buttons/gel-button.md +125 -0
  132. package/spec/spec/components/buttons/icon-button.md +108 -0
  133. package/spec/spec/components/buttons/keypad-button.md +123 -0
  134. package/spec/spec/components/buttons/push-button.md +139 -0
  135. package/spec/spec/components/buttons/rec-button.md +105 -0
  136. package/spec/spec/components/buttons/rubber-button.md +100 -0
  137. package/spec/spec/components/buttons/segmented-control.md +95 -0
  138. package/spec/spec/components/data/assembled-panel.md +135 -0
  139. package/spec/spec/components/data/data-table.md +116 -0
  140. package/spec/spec/components/data/film-strip.md +110 -0
  141. package/spec/spec/components/data/media-grid.md +98 -0
  142. package/spec/spec/components/dials/click-wheel.md +115 -0
  143. package/spec/spec/components/dials/cylindrical-horizontal.md +130 -0
  144. package/spec/spec/components/dials/cylindrical-scroll.md +141 -0
  145. package/spec/spec/components/dials/cylindrical-vertical.md +100 -0
  146. package/spec/spec/components/dials/mode-dial.md +123 -0
  147. package/spec/spec/components/dials/radial-knob.md +150 -0
  148. package/spec/spec/components/dials/rotary-encoder.md +118 -0
  149. package/spec/spec/components/forms/color-picker.md +99 -0
  150. package/spec/spec/components/forms/file-input.md +105 -0
  151. package/spec/spec/components/forms/search-bar.md +96 -0
  152. package/spec/spec/components/forms/select.md +143 -0
  153. package/spec/spec/components/forms/text-input.md +114 -0
  154. package/spec/spec/components/forms/textarea.md +85 -0
  155. package/spec/spec/components/indicators/accordion.md +137 -0
  156. package/spec/spec/components/indicators/badges.md +87 -0
  157. package/spec/spec/components/indicators/chips.md +93 -0
  158. package/spec/spec/components/indicators/led-dots.md +103 -0
  159. package/spec/spec/components/indicators/mode-badge.md +97 -0
  160. package/spec/spec/components/indicators/profile-badge.md +99 -0
  161. package/spec/spec/components/indicators/skeleton.md +94 -0
  162. package/spec/spec/components/indicators/spinners.md +95 -0
  163. package/spec/spec/components/indicators/status-chips.md +85 -0
  164. package/spec/spec/components/indicators/transport-controls.md +114 -0
  165. package/spec/spec/components/meters/battery-icon.md +104 -0
  166. package/spec/spec/components/meters/eq-bars.md +93 -0
  167. package/spec/spec/components/meters/ev-meter.md +96 -0
  168. package/spec/spec/components/meters/exposure-scale.md +110 -0
  169. package/spec/spec/components/meters/gauge-full.md +102 -0
  170. package/spec/spec/components/meters/gauge-semi.md +113 -0
  171. package/spec/spec/components/meters/histogram.md +70 -0
  172. package/spec/spec/components/meters/level-indicator.md +95 -0
  173. package/spec/spec/components/meters/oscilloscope.md +83 -0
  174. package/spec/spec/components/meters/progress-bar.md +84 -0
  175. package/spec/spec/components/meters/signal-bars.md +80 -0
  176. package/spec/spec/components/meters/signal-meter.md +84 -0
  177. package/spec/spec/components/meters/vu-meter.md +88 -0
  178. package/spec/spec/components/meters/waveform.md +70 -0
  179. package/spec/spec/components/navigation/breadcrumbs.md +94 -0
  180. package/spec/spec/components/navigation/context-menu.md +94 -0
  181. package/spec/spec/components/navigation/d-pad.md +121 -0
  182. package/spec/spec/components/navigation/drawer.md +103 -0
  183. package/spec/spec/components/navigation/menu-grid.md +113 -0
  184. package/spec/spec/components/navigation/menu-list.md +134 -0
  185. package/spec/spec/components/navigation/pagination.md +100 -0
  186. package/spec/spec/components/navigation/rack-panel.md +124 -0
  187. package/spec/spec/components/navigation/scrollbar.md +97 -0
  188. package/spec/spec/components/navigation/status-bar.md +117 -0
  189. package/spec/spec/components/navigation/tab-bar.md +104 -0
  190. package/spec/spec/components/overlays/chassis-panel.md +94 -0
  191. package/spec/spec/components/overlays/device-bezel.md +83 -0
  192. package/spec/spec/components/overlays/dialog.md +100 -0
  193. package/spec/spec/components/overlays/focus-brackets.md +124 -0
  194. package/spec/spec/components/overlays/grid-overlay.md +93 -0
  195. package/spec/spec/components/overlays/modal.md +89 -0
  196. package/spec/spec/components/overlays/panel.md +114 -0
  197. package/spec/spec/components/overlays/plastic-card.md +92 -0
  198. package/spec/spec/components/overlays/popover.md +75 -0
  199. package/spec/spec/components/overlays/toast.md +93 -0
  200. package/spec/spec/components/overlays/tooltip.md +85 -0
  201. package/spec/spec/components/readouts/camera-readout.md +123 -0
  202. package/spec/spec/components/readouts/dot-matrix.md +88 -0
  203. package/spec/spec/components/readouts/lcd-readout.md +116 -0
  204. package/spec/spec/components/readouts/resource-monitor.md +98 -0
  205. package/spec/spec/components/readouts/seven-segment.md +110 -0
  206. package/spec/spec/components/readouts/signal-display.md +93 -0
  207. package/spec/spec/components/readouts/timecode-display.md +94 -0
  208. package/spec/spec/components/sliders/crossfader.md +102 -0
  209. package/spec/spec/components/sliders/dual-range.md +97 -0
  210. package/spec/spec/components/sliders/range-fader.md +100 -0
  211. package/spec/spec/components/sliders/scrubber.md +104 -0
  212. package/spec/spec/components/sliders/stepper.md +106 -0
  213. package/spec/spec/components/sliders/vertical-fader.md +116 -0
  214. package/spec/spec/components/sliders/volume-slider.md +107 -0
  215. package/spec/spec/components/toggles/dip-switch.md +100 -0
  216. package/spec/spec/components/toggles/led-checkbox.md +108 -0
  217. package/spec/spec/components/toggles/power-toggle.md +93 -0
  218. package/spec/spec/components/toggles/radio-button.md +106 -0
  219. package/spec/spec/components/toggles/rocker-switch.md +92 -0
  220. package/spec/spec/components/toggles/slide-switch.md +121 -0
  221. package/spec/spec/components/toggles/toggle-switch.md +135 -0
  222. package/spec/spec/compositions/audio-mixer-strip.md +62 -0
  223. package/spec/spec/compositions/camera-viewfinder.md +66 -0
  224. package/spec/spec/compositions/phone-interface.md +66 -0
  225. package/spec/spec/foundation/accessibility.md +33 -0
  226. package/spec/spec/foundation/canvas.md +20 -0
  227. package/spec/spec/foundation/depth-model.md +82 -0
  228. package/spec/spec/foundation/layout.md +33 -0
  229. package/spec/spec/foundation/materials.md +68 -0
  230. package/spec/spec/foundation/naming.md +33 -0
  231. package/spec/spec/foundation/philosophy.md +27 -0
  232. package/spec/spec/foundation/theme.md +39 -0
  233. package/spec/spec/foundation/tokens.md +148 -0
  234. package/spec/spec/guides/extension.md +189 -0
  235. package/spec/spec/guides/for-llms.md +129 -0
  236. package/spec/spec/guides/prompt-templates.md +143 -0
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: Stepper
3
+ id: stepper
4
+ class: .stepper
5
+ category: sliders
6
+ index: 6
7
+ materials: [panel, glossy]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Stepper
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: iPod scroll wheel numeric entry, Nokia phone volume steps, Roland TR-808 tempo control.
18
+ **Mechanism**: Digitized increment/decrement control. Pair of momentary buttons (+ and -) flanking a numeric display. Each press changes value by one step. Values are discrete (integers or predefined steps), distinct from continuous sliders.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Container | Inline-flex with inset background |
25
+ | Buttons | 24px diameter circles |
26
+ | Value display | 40px min-width, centered |
27
+ | Font size | 18px mono for value |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Wrapper
32
+ ```css
33
+ .stepper-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
34
+ ```
35
+
36
+ ### Container
37
+ ```css
38
+ .stepper {
39
+ display: flex; align-items: center; gap: 4px;
40
+ background: var(--bg-inset); border: 1px solid var(--border-subtle);
41
+ border-radius: var(--radius-md); padding: 4px;
42
+ box-shadow: var(--shadow-inset);
43
+ }
44
+ ```
45
+
46
+ ### Increment/Decrement Buttons
47
+ ```css
48
+ .stepper-btn {
49
+ width: 24px; height: 24px; border-radius: 50%;
50
+ border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
51
+ background: linear-gradient(155deg, var(--bg-surface), var(--bg-panel));
52
+ box-shadow: 0 1px 2px rgba(0,0,0,0.2);
53
+ color: var(--text-primary); font-size: 12px; font-family: var(--font-ui); font-weight: 700;
54
+ transition: transform 0.07s;
55
+ }
56
+ .stepper-btn:active { transform: scale(0.9); }
57
+ ```
58
+
59
+ ### Value Display
60
+ ```css
61
+ .stepper-value {
62
+ font-family: var(--font-mono); font-size: 18px;
63
+ color: var(--blue-info); letter-spacing: 1px;
64
+ min-width: 40px; text-align: center;
65
+ }
66
+ ```
67
+
68
+ ### Label
69
+ ```css
70
+ .stepper-label { font-family: var(--font-ui); font-size: 9px; font-weight: 500; color: var(--text-muted); letter-spacing: 1px; }
71
+ ```
72
+
73
+ ## HTML Structure
74
+ ```html
75
+ <div class="stepper-wrap">
76
+ <div class="stepper">
77
+ <button class="stepper-btn" data-stepper-dec>&minus;</button>
78
+ <span class="stepper-value" id="stepperVal">12</span>
79
+ <button class="stepper-btn" data-stepper-inc>+</button>
80
+ </div>
81
+ <span class="stepper-label">CHANNEL</span>
82
+ </div>
83
+ ```
84
+
85
+ ## Size Variants
86
+ No explicit size variants.
87
+
88
+ ## Material Variants
89
+ - Container: Recessed panel (bg-inset)
90
+ - Buttons: Glossy panel surface (raised within recessed track)
91
+
92
+ ## Theme Behavior
93
+ - Container and buttons adapt via tokens
94
+ - Value color (blue-info) is fixed
95
+
96
+ ## Constraints
97
+ 1. Buttons are CIRCULAR (24px, border-radius: 50%) -- not rectangular.
98
+ 2. Press feedback MUST be `scale(0.9)`, not `translateY`.
99
+ 3. Value display MUST use `--font-mono` for tabular numeric alignment.
100
+ 4. Container is RECESSED (bg-inset with inset shadow) -- buttons sit raised within it.
101
+
102
+ ## Accessibility
103
+ - Uses native `<button>` elements for +/-
104
+ - Value display should use `aria-live="polite"` for screen reader updates
105
+ - Keyboard: Enter/Space on buttons, or Arrow keys when value is focused
106
+ - Requires JS to update value on button press
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: Vertical Fader
3
+ id: fader-v-track
4
+ class: .fader-v-track
5
+ category: sliders
6
+ index: 7
7
+ materials: [chrome, panel]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Vertical Fader
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Mixing console channel faders (SSL, Neve, Mackie), synthesizer ADSR sliders, graphic EQ sliders.
18
+ **Mechanism**: Identical to horizontal fader (linear slide potentiometer), oriented vertically. On mixing consoles, vertical faders represent channel volume/level arranged side by side in a fader bank.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Track | 10px wide x 140px tall (very narrow and tall) |
25
+ | Thumb | 20px wide x 10px tall (wider than track) |
26
+ | Fill | Green-to-amber gradient (bottom up) |
27
+ | Center groove | 1px vertical line on thumb cap |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Wrapper
32
+ ```css
33
+ .fader-v-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
34
+ ```
35
+
36
+ ### Track
37
+ ```css
38
+ .fader-v-track {
39
+ width: 10px; height: 140px; border-radius: 5px;
40
+ background: var(--bg-inset); border: 1px solid var(--border-subtle);
41
+ position: relative; box-shadow: var(--shadow-inset);
42
+ }
43
+ ```
44
+
45
+ ### Fill
46
+ ```css
47
+ .fader-v-fill {
48
+ position: absolute; bottom: 0; left: 0; width: 100%; border-radius: 4px;
49
+ background: linear-gradient(0deg, var(--green-on), var(--amber));
50
+ }
51
+ ```
52
+
53
+ ### Thumb (Fader Cap)
54
+ ```css
55
+ .fader-v-thumb {
56
+ position: absolute; left: 50%; width: 20px; height: 10px;
57
+ border-radius: 2px; transform: translate(-50%,-50%);
58
+ background: linear-gradient(90deg, #555, #888, #555);
59
+ box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 #aaa;
60
+ cursor: grab; z-index: 2;
61
+ }
62
+ .fader-v-thumb::after {
63
+ content: ''; position: absolute; left: 50%; top: 3px; bottom: 3px;
64
+ width: 1px; background: #ccc; transform: translateX(-50%);
65
+ }
66
+ ```
67
+
68
+ ### Labels
69
+ ```css
70
+ .fader-v-label { font-family: var(--font-ui); font-size: 8px; font-weight: 600; letter-spacing: 1px; color: var(--text-muted); }
71
+ .fader-v-value { font-family: var(--font-display); font-size: 10px; color: var(--amber); }
72
+ ```
73
+
74
+ ## HTML Structure
75
+ ```html
76
+ <div class="fader-v-wrap">
77
+ <div class="fader-v-track">
78
+ <div class="fader-v-fill" style="height:70%"></div>
79
+ <div class="fader-v-thumb" style="bottom:70%"></div>
80
+ </div>
81
+ <span class="fader-v-label">CH 1</span>
82
+ <span class="fader-v-value">+3</span>
83
+ </div>
84
+
85
+ <!-- Multiple faders in a bank -->
86
+ <div class="flex-row" style="gap:16px">
87
+ <div class="fader-v-wrap"><!-- CH 1 --></div>
88
+ <div class="fader-v-wrap"><!-- CH 2 --></div>
89
+ <div class="fader-v-wrap"><!-- MASTER --></div>
90
+ </div>
91
+ ```
92
+
93
+ ## Size Variants
94
+ No explicit size variants. Fixed at 10x140px track.
95
+
96
+ ## Material Variants
97
+ - Track: Recessed panel
98
+ - Thumb: Triple-stop metallic gradient (`#555, #888, #555`) simulating brushed metal cap
99
+ - Fill: Green-to-amber gradient
100
+
101
+ ## Theme Behavior
102
+ - Track adapts via tokens
103
+ - Thumb metallic gradient is fixed
104
+ - Fill gradient colors are fixed accents
105
+
106
+ ## Constraints
107
+ 1. Thumb MUST be wider than track (20px vs 10px) for horizontal finger placement.
108
+ 2. Center groove (`::after`) is a vertical line on the thumb, helping engineer feel position.
109
+ 3. Fill grows from BOTTOM (`position: absolute; bottom: 0`).
110
+ 4. Thumb position uses `bottom` percentage (not `top`).
111
+ 5. Track is very narrow (10px) -- mixing console aesthetic.
112
+
113
+ ## Accessibility
114
+ - Add `role="slider"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`, `aria-orientation="vertical"`
115
+ - Keyboard: Arrow Up/Down to adjust
116
+ - Requires JS for drag interaction
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: Volume Slider
3
+ id: slider-track
4
+ class: .slider-track
5
+ category: sliders
6
+ index: 1
7
+ materials: [panel, glossy]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Volume Slider
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: iPod touch volume bar, iPhone media volume slider, Creative Zen player.
18
+ **Mechanism**: Linear potentiometer adapted for touch-screen interaction. Fill color shows "active" portion (resistance before wiper), empty portion shows remaining range.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Track | 100% width x 6px height, recessed |
25
+ | Thumb | 16px diameter circle |
26
+ | Fill | Blue-to-green gradient |
27
+ | Container width | 160px |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Wrapper
32
+ ```css
33
+ .slider-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 160px; }
34
+ ```
35
+
36
+ ### Track
37
+ ```css
38
+ .slider-track {
39
+ width: 100%; height: 6px; border-radius: 3px;
40
+ background: var(--bg-inset); border: 1px solid var(--border-subtle);
41
+ position: relative; cursor: pointer; box-shadow: var(--shadow-inset);
42
+ }
43
+ ```
44
+
45
+ ### Fill
46
+ ```css
47
+ .slider-fill {
48
+ position: absolute; top: 0; left: 0; height: 100%; border-radius: 2px;
49
+ background: linear-gradient(90deg, var(--blue-info), var(--green-on));
50
+ transition: width 0.1s var(--ease-out);
51
+ }
52
+ ```
53
+
54
+ ### Thumb
55
+ ```css
56
+ .slider-thumb {
57
+ position: absolute; top: 50%; width: 16px; height: 16px;
58
+ border-radius: 50%; transform: translate(-50%,-50%);
59
+ background: linear-gradient(155deg, var(--bg-surface), var(--bg-panel));
60
+ box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 var(--glossy-hi);
61
+ cursor: grab; z-index: 2;
62
+ }
63
+ ```
64
+
65
+ ### Labels
66
+ ```css
67
+ .slider-label { font-family: var(--font-ui); font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 1px; }
68
+ .slider-value { font-family: var(--font-display); font-size: 11px; color: var(--blue-info); letter-spacing: 1px; }
69
+ ```
70
+
71
+ ## HTML Structure
72
+ ```html
73
+ <div class="slider-wrap">
74
+ <div class="slider-track">
75
+ <div class="slider-fill" style="width:60%"></div>
76
+ <div class="slider-thumb" style="left:60%"></div>
77
+ </div>
78
+ <div style="display:flex;justify-content:space-between;width:100%">
79
+ <span class="slider-label">VOL</span>
80
+ <span class="slider-value">60</span>
81
+ </div>
82
+ </div>
83
+ ```
84
+
85
+ ## Size Variants
86
+ No explicit size variants. Track height is fixed at 6px.
87
+
88
+ ## Material Variants
89
+ - Track: Recessed panel
90
+ - Thumb: Glossy panel surface with specular highlight
91
+ - Fill: Blue-to-green gradient
92
+
93
+ ## Theme Behavior
94
+ - Track uses `--bg-inset` and `--shadow-inset` (adapt per theme)
95
+ - Thumb uses surface tokens
96
+ - Fill gradient colors are fixed (accent colors)
97
+
98
+ ## Constraints
99
+ 1. Track MUST be recessed (inset shadow + bg-inset).
100
+ 2. Fill transition MUST use `--ease-out` for smooth deceleration.
101
+ 3. Thumb MUST use `transform: translate(-50%, -50%)` for center positioning.
102
+ 4. Fill and thumb position are set via inline `style` and updated by JS.
103
+
104
+ ## Accessibility
105
+ - Add `role="slider"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`, `aria-label`
106
+ - Keyboard: Arrow Left/Right to adjust
107
+ - Requires JS for drag interaction
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: DIP Switch
3
+ id: dip-switch
4
+ class: .dip-switch
5
+ category: toggles
6
+ index: 5
7
+ materials: [panel, chrome]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # DIP Switch
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: PCB DIP switch banks on synthesizers (Roland TB-303, Korg MS-20), audio equipment, and network hardware.
18
+ **Mechanism**: Dual In-line Package switches -- tiny SPST slide switches arrayed in a plastic housing at 2.54mm pitch. Each switch has a detented two-position action. Lever slides vertically (up = ON, down = OFF). Tiny leaf spring provides detent and contact force.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Individual switch | 18x30px |
25
+ | Lever | 12px tall, slides vertically |
26
+ | Array | 4, 8, or 12 switches in a row at 4px gap |
27
+ | Housing | Black molded nylon (bg-inset) |
28
+ | Lever material | Polished metal (metallic gradient) |
29
+
30
+ ## CSS Recipe
31
+
32
+ ### Row Container (PCB Housing)
33
+ ```css
34
+ .dip-row { display: flex; gap: 4px; padding: 6px 8px; background: var(--bg-inset); border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); }
35
+ ```
36
+
37
+ ### Individual Switch Housing
38
+ ```css
39
+ .dip-switch {
40
+ width: 18px; height: 30px; border-radius: 3px;
41
+ background: var(--bg-surface); border: 1px solid var(--border-mid);
42
+ position: relative; cursor: pointer;
43
+ box-shadow: inset 0 1px 0 var(--glossy-hi);
44
+ }
45
+ ```
46
+
47
+ ### Lever
48
+ ```css
49
+ .dip-lever {
50
+ position: absolute; left: 3px; right: 3px; height: 12px;
51
+ border-radius: 2px; background: linear-gradient(180deg, #888, #555);
52
+ transition: top 0.12s var(--snap-fast); top: 14px;
53
+ box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
54
+ }
55
+ ```
56
+
57
+ ### ON State
58
+ ```css
59
+ .dip-switch.on .dip-lever { top: 3px; background: linear-gradient(180deg, var(--green-hi), var(--green-on)); }
60
+ ```
61
+
62
+ ## HTML Structure
63
+ ```html
64
+ <div class="dip-row">
65
+ <div class="dip-switch on" data-dip><div class="dip-lever"></div></div>
66
+ <div class="dip-switch" data-dip><div class="dip-lever"></div></div>
67
+ <div class="dip-switch on" data-dip><div class="dip-lever"></div></div>
68
+ <div class="dip-switch" data-dip><div class="dip-lever"></div></div>
69
+ <div class="dip-switch on" data-dip><div class="dip-lever"></div></div>
70
+ <div class="dip-switch" data-dip><div class="dip-lever"></div></div>
71
+ <div class="dip-switch" data-dip><div class="dip-lever"></div></div>
72
+ <div class="dip-switch on" data-dip><div class="dip-lever"></div></div>
73
+ </div>
74
+ ```
75
+
76
+ ## Size Variants
77
+ No explicit size variants. Fixed dimensions replicate real DIP switch proportions.
78
+
79
+ ## Material Variants
80
+ - Housing: Panel surface
81
+ - Lever OFF: Metallic gradient (`#888` to `#555`)
82
+ - Lever ON: Green gradient (green-hi to green-on)
83
+ - Row container: PCB board (bg-inset)
84
+
85
+ ## Theme Behavior
86
+ - Surface colors swap via tokens for housing and container
87
+ - Metallic lever gradient is fixed (metal is metal)
88
+ - Green ON state is fixed
89
+
90
+ ## Constraints
91
+ 1. Lever MUST slide vertically: `top: 14px` (OFF/down) to `top: 3px` (ON/up).
92
+ 2. Lever transition MUST use `--snap-fast` at 0.12s for detent snap feel.
93
+ 3. Each switch operates independently (NOT mutually exclusive like segmented control).
94
+ 4. Row container MUST use `bg-inset` to represent the PCB mounting board.
95
+ 5. Lever MUST have metallic gradient to represent polished metal contact.
96
+
97
+ ## Accessibility
98
+ - Add `tabindex="0"` and `role="switch"` with `aria-checked` on each `.dip-switch`
99
+ - Keyboard: Space to toggle individual switch
100
+ - Requires JS to toggle `.on` class on each switch independently
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: LED Checkbox
3
+ id: led-checkbox
4
+ class: .led-checkbox
5
+ category: toggles
6
+ index: 6
7
+ materials: [panel, phosphor]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # LED Checkbox
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Audio mixer channel solo/mute indicators, camera menu checkbox items, synthesizer parameter enable LEDs.
18
+ **Mechanism**: PCB-mounted LED indicators with integrated tactile switches. On mixing desks, small square LEDs (3mm x 3mm) double as buttons -- pressing the LED toggles the function. Standard through-hole or SMD LED behind translucent diffuser cap.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Checkbox box | 18x18px |
25
+ | Check mark (LED) | 8x8px |
26
+ | Border-radius | 3px (box), 2px (mark) |
27
+ | Gap to label | 8px |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Container
32
+ ```css
33
+ .led-checkbox {
34
+ display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
35
+ }
36
+ ```
37
+
38
+ ### Checkbox Box (Diffuser Cap)
39
+ ```css
40
+ .led-check-box {
41
+ width: 18px; height: 18px; border-radius: 3px;
42
+ background: var(--bg-inset); border: 1px solid var(--border-mid);
43
+ display: flex; align-items: center; justify-content: center;
44
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
45
+ transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
46
+ }
47
+ ```
48
+
49
+ ### Checked State
50
+ ```css
51
+ .led-check-box.checked {
52
+ background: rgba(245,166,35,0.15); border-color: var(--amber);
53
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), 0 0 8px var(--amber-glow);
54
+ }
55
+ ```
56
+
57
+ ### Check Mark (LED Element)
58
+ ```css
59
+ .led-check-mark {
60
+ width: 8px; height: 8px; border-radius: 2px;
61
+ background: transparent; transition: background 0.15s;
62
+ }
63
+ .led-check-box.checked .led-check-mark { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
64
+ ```
65
+
66
+ ### Label
67
+ ```css
68
+ .led-check-label { font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.5px; }
69
+ ```
70
+
71
+ ## HTML Structure
72
+ ```html
73
+ <!-- Checked -->
74
+ <label class="led-checkbox" data-checkbox>
75
+ <div class="led-check-box checked"><div class="led-check-mark"></div></div>
76
+ <span class="led-check-label">Face Detection</span>
77
+ </label>
78
+
79
+ <!-- Unchecked -->
80
+ <label class="led-checkbox" data-checkbox>
81
+ <div class="led-check-box"><div class="led-check-mark"></div></div>
82
+ <span class="led-check-label">Eye AF</span>
83
+ </label>
84
+ ```
85
+
86
+ ## Size Variants
87
+ No explicit size variants defined.
88
+
89
+ ## Material Variants
90
+ - Box: Recessed cavity (bg-inset with inset shadow) representing diffuser cap
91
+ - Check mark: LED element (transparent when off, glowing amber when checked)
92
+
93
+ ## Theme Behavior
94
+ - Box background, borders swap via tokens
95
+ - Checked state amber glow is fixed across themes
96
+ - Inset shadow opacity reduces in light theme via `--shadow-inset`
97
+
98
+ ## Constraints
99
+ 1. Check mark MUST be invisible when unchecked (background: transparent).
100
+ 2. Checked state MUST include amber glow on both box AND mark -- simulates LED illumination.
101
+ 3. Box inset shadow represents the cavity the LED sits within.
102
+ 4. Border changes to amber on checked state to simulate illuminated housing.
103
+
104
+ ## Accessibility
105
+ - Uses `<label>` wrapper for click-to-toggle behavior
106
+ - Add hidden `<input type="checkbox">` for form semantics, or use `role="checkbox"` with `aria-checked`
107
+ - Keyboard: Space to toggle when focused
108
+ - Requires JS to toggle `.checked` class
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: Power Toggle
3
+ id: power-toggle
4
+ class: .power-toggle
5
+ category: toggles
6
+ index: 4
7
+ materials: [chrome, panel]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Power Toggle
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Rack-mount audio equipment power switches, synthesizer on/off, industrial equipment main power.
18
+ **Mechanism**: Heavy-duty slide switch rated for higher current than signal-level switches. Larger than camera toggles, with more substantial detent mechanism. Integrated status LED. Silver-plated contacts rated for 1-3A.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Track | 72x34px (much larger than standard toggle) |
25
+ | Thumb | 24px diameter |
26
+ | Border-radius | 20px |
27
+ | ON travel | left: 4px to left: 42px |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Track
32
+ ```css
33
+ .power-toggle {
34
+ width: 72px; height: 34px; border-radius: 20px;
35
+ position: relative; background: #0b0b0b;
36
+ border: 1px solid #303030; box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
37
+ }
38
+ ```
39
+
40
+ ### Thumb
41
+ ```css
42
+ .power-toggle-thumb {
43
+ position: absolute; top: 4px; left: 4px;
44
+ width: 24px; height: 24px; border-radius: 50%;
45
+ background: linear-gradient(180deg, #666, #2a2a2a);
46
+ box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.35);
47
+ transition: left 180ms var(--snap-fast), background 180ms;
48
+ }
49
+ ```
50
+
51
+ ### ON State
52
+ ```css
53
+ .power-toggle.on { background: #0d1a0d; }
54
+ .power-toggle.on .power-toggle-thumb {
55
+ left: 42px;
56
+ background: linear-gradient(180deg, #88ff88, #287128);
57
+ box-shadow: 0 0 12px var(--green-glow);
58
+ }
59
+ ```
60
+
61
+ ## HTML Structure
62
+ ```html
63
+ <div class="power-toggle on" data-power-toggle>
64
+ <div class="power-toggle-thumb"></div>
65
+ </div>
66
+ <span style="font-size:11px;color:var(--green-on);">ONLINE</span>
67
+ ```
68
+
69
+ ## Size Variants
70
+ No explicit size variants. Fixed at 72x34px to represent industrial-grade switch.
71
+
72
+ ## Material Variants
73
+ - Track: Deep black recessed surface (nearly black `#0b0b0b`)
74
+ - Thumb OFF: Chrome/metallic gradient
75
+ - Thumb ON: Green gradient with green glow (power indicator LED)
76
+
77
+ ## Theme Behavior
78
+ - Track background is hardcoded dark (`#0b0b0b`) -- industrial power switches are always dark
79
+ - ON state track shifts to dark green `#0d1a0d`
80
+ - Thumb metallic gradient is fixed
81
+ - Green glow on ON state is fixed
82
+
83
+ ## Constraints
84
+ 1. Track MUST be 72x34px -- significantly larger than standard toggle to convey "main power" weight.
85
+ 2. Inset shadow MUST be `rgba(0,0,0,0.8)` -- deeper recess than standard toggle (0.4).
86
+ 3. ON state thumb MUST have prominent green glow (`0 0 12px var(--green-glow)`).
87
+ 4. Transition timing is 180ms (longer than toggle's 150ms) for heavier feel.
88
+ 5. Thumb MUST be 24px (larger than toggle's 16px and slide-switch's 20px).
89
+
90
+ ## Accessibility
91
+ - Add `tabindex="0"` and `role="switch"` with `aria-checked`
92
+ - Keyboard: Space to toggle
93
+ - Requires JS to toggle `.on` class