@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,123 @@
1
+ ---
2
+ name: Mode Dial
3
+ id: mode-dial-body
4
+ class: .mode-dial-body
5
+ category: dials
6
+ index: 2
7
+ materials: [panel, chrome]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Mode Dial
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Nikon D850 mode dial (P/S/A/M), Canon EOS 5D mode dial, Sony Alpha PASM dial.
18
+ **Mechanism**: Detented rotary selector switch with fixed number of positions (typically 6-12 modes). Mechanically limited to defined arc with hard stops. Wiper contact rotates across circular array of fixed contacts on PCB. More assertive detent than encoder (larger ball bearing, stiffer spring).
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Outer ring | 120x120px, stationary reference with tick marks |
25
+ | Inner rotor | 96x96px, rotating knurled element |
26
+ | Center cap | inset 20px, displays mode letter |
27
+ | Amber notch | 4x18px at top, pointer to selected mode |
28
+ | Detent spacing | 360/N degrees (N = number of modes) |
29
+
30
+ ## CSS Recipe
31
+
32
+ ### Wrapper
33
+ ```css
34
+ .mode-dial-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
35
+ ```
36
+
37
+ ### Outer Ring (Stationary Reference)
38
+ ```css
39
+ .mode-dial-outer {
40
+ width: 120px; height: 120px; border-radius: 50%;
41
+ background: #111; border: 2px solid #0a0a0a;
42
+ box-shadow: 0 4px 0 #080808, 0 6px 12px rgba(0,0,0,0.6);
43
+ position: relative; display: flex; align-items: center; justify-content: center;
44
+ }
45
+ ```
46
+
47
+ ### Rotating Inner Body
48
+ ```css
49
+ .mode-dial-body {
50
+ width: 96px; height: 96px; border-radius: 50%;
51
+ background: radial-gradient(circle at 38% 32%, #363636, #1a1a1a 70%);
52
+ border: 2px solid #0a0a0a; position: relative; cursor: pointer;
53
+ box-shadow: 0 2px 0 #0a0a0a, inset 0 1px 0 #444;
54
+ }
55
+ ```
56
+
57
+ ### Position Pointer (Amber Notch)
58
+ ```css
59
+ .mode-dial-notch {
60
+ position: absolute; top: 6px; left: 50%;
61
+ width: 4px; height: 18px;
62
+ background: linear-gradient(to bottom, var(--amber), var(--amber-dim));
63
+ border-radius: 2px; transform: translateX(-50%);
64
+ box-shadow: 0 0 8px var(--amber-glow);
65
+ transition: transform 0.35s var(--spring);
66
+ z-index: 2;
67
+ }
68
+ ```
69
+
70
+ ### Center Cap (Mode Display)
71
+ ```css
72
+ .mode-dial-center {
73
+ position: absolute; inset: 20px; border-radius: 50%;
74
+ background: radial-gradient(circle at 40% 35%, #2e2e2e, #161616);
75
+ border: 2px solid #111;
76
+ box-shadow: inset 0 1px 0 #3a3a3a, 0 1px 3px #000;
77
+ display: flex; flex-direction: column;
78
+ align-items: center; justify-content: center;
79
+ }
80
+ .mode-dial-label { font-family: var(--font-display); font-size: 13px; color: var(--amber); letter-spacing: 1px; line-height: 1; }
81
+ .mode-dial-sub { font-size: 7px; letter-spacing: 1px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-ui); }
82
+ ```
83
+
84
+ ## HTML Structure
85
+ ```html
86
+ <div class="mode-dial-wrap">
87
+ <div class="mode-dial-outer">
88
+ <div class="mode-dial-body">
89
+ <div class="mode-dial-notch"></div>
90
+ <div class="mode-dial-center">
91
+ <div class="mode-dial-label">M</div>
92
+ <div class="mode-dial-sub">MANUAL</div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ ```
98
+
99
+ ## Size Variants
100
+ No explicit size variants. Fixed at 120px outer / 96px inner.
101
+
102
+ ## Material Variants
103
+ - Outer ring: Dark recessed housing
104
+ - Inner rotor: Lathe-turned surface (radial-gradient with off-center highlight)
105
+ - Center cap: Recessed with sunken gradient
106
+
107
+ ## Theme Behavior
108
+ - Uses hardcoded dark colors (camera mode dials are always dark metal)
109
+ - Amber indicator is fixed
110
+ - May need light theme overrides for outer ring contrast
111
+
112
+ ## Constraints
113
+ 1. Notch transition MUST use `--spring` easing at 0.35s -- overshoot mimics spring-loaded detent snap.
114
+ 2. Notch is rotated via JS by increments of `360/N` degrees where N = number of modes.
115
+ 3. Center cap MUST display the current mode letter (updated via JS).
116
+ 4. Outer ring is STATIONARY -- only the inner body and notch rotate.
117
+ 5. Off-center highlight at `38% 32%` simulates lathe-turned surface.
118
+
119
+ ## Accessibility
120
+ - Add `tabindex="0"` and `role="listbox"` or custom role
121
+ - Keyboard: Arrow keys to rotate between modes
122
+ - `aria-label` should indicate current mode
123
+ - Requires JS for rotation and mode switching
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: Radial Knob
3
+ id: radial-knob
4
+ class: .radial-knob
5
+ category: dials
6
+ index: 3
7
+ materials: [rubber, brushed-metal, glossy]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Radial Knob
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Technics SL-1200 pitch control, Pioneer DJM mixer EQ knobs, Mackie mixer gain/pan knobs, hi-fi amplifier volume knobs.
18
+ **Mechanism**: Rotary potentiometer with fixed rotation range (270-300 degrees). Carbon film or cermet resistive element with wiper contact. Dead zone at bottom (60-90 degrees). Three material variants: rubber (DJ/studio), brushed aluminum (hi-fi), glossy polycarbonate (consumer).
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Knob body | 80x80px |
25
+ | Rotation range | 270-300 degrees with hard stops |
26
+ | Indicator | 3x12px amber bar, rotates from center |
27
+ | Center cap | 24x24px recessed circle |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Container
32
+ ```css
33
+ .radial-dial { display: flex; flex-direction: column; align-items: center; gap: 12px; }
34
+ ```
35
+
36
+ ### Knob Body (Default: Rubber)
37
+ ```css
38
+ .radial-knob {
39
+ width: 80px; height: 80px; border-radius: 50%;
40
+ position: relative; cursor: grab; user-select: none;
41
+ background: linear-gradient(145deg, #3a3835, #1a1816);
42
+ border: 2px solid var(--border-mid);
43
+ box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
44
+ display: flex; align-items: center; justify-content: center;
45
+ }
46
+ .radial-knob:active { cursor: grabbing; }
47
+ ```
48
+
49
+ ### Indicator
50
+ ```css
51
+ .radial-indicator {
52
+ position: absolute; width: 3px; height: 12px; border-radius: 2px;
53
+ top: 6px; left: 50%; margin-left: -1.5px;
54
+ background: var(--amber); transform-origin: 50% 34px;
55
+ box-shadow: 0 0 6px var(--amber-glow);
56
+ }
57
+ ```
58
+
59
+ ### Center Cap
60
+ ```css
61
+ .radial-knob .knob-center {
62
+ width: 24px; height: 24px; border-radius: 50%;
63
+ background: var(--bg-inset); border: 1px solid var(--border-subtle);
64
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
65
+ }
66
+ ```
67
+
68
+ ### Metal Variant
69
+ ```css
70
+ .radial-knob.variant-metal {
71
+ background: linear-gradient(145deg, #d8d6d0, #b8b6b0);
72
+ border-color: #a8a6a0;
73
+ box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
74
+ }
75
+ ```
76
+
77
+ ### Glossy Variant
78
+ ```css
79
+ .radial-knob.variant-glossy {
80
+ background: linear-gradient(145deg, var(--bg-surface), var(--bg-panel));
81
+ border-color: var(--border-mid);
82
+ box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 var(--glossy-hi);
83
+ }
84
+ ```
85
+
86
+ ### Value Label
87
+ ```css
88
+ .radial-value {
89
+ font-family: var(--font-display); font-size: 12px;
90
+ color: var(--text-primary); letter-spacing: 1px;
91
+ }
92
+ ```
93
+
94
+ ## HTML Structure
95
+ ```html
96
+ <!-- Rubber (default) -->
97
+ <div class="radial-dial">
98
+ <div class="radial-knob">
99
+ <div class="radial-indicator"></div>
100
+ <div class="knob-center"></div>
101
+ </div>
102
+ <span class="radial-value">RUBBER</span>
103
+ </div>
104
+
105
+ <!-- Metal variant -->
106
+ <div class="radial-dial">
107
+ <div class="radial-knob variant-metal">
108
+ <div class="radial-indicator"></div>
109
+ <div class="knob-center"></div>
110
+ </div>
111
+ <span class="radial-value">METAL</span>
112
+ </div>
113
+
114
+ <!-- Glossy variant -->
115
+ <div class="radial-dial">
116
+ <div class="radial-knob variant-glossy">
117
+ <div class="radial-indicator"></div>
118
+ <div class="knob-center"></div>
119
+ </div>
120
+ <span class="radial-value">GLOSSY</span>
121
+ </div>
122
+ ```
123
+
124
+ ## Size Variants
125
+ No explicit size variants. Fixed at 80x80px.
126
+
127
+ ## Material Variants
128
+
129
+ | Variant | Background | Border | Highlight Opacity |
130
+ |---------|-----------|--------|-------------------|
131
+ | default (rubber) | `linear-gradient(145deg, #3a3835, #1a1816)` | `var(--border-mid)` | 0.08 |
132
+ | `.variant-metal` | `linear-gradient(145deg, #d8d6d0, #b8b6b0)` | `#a8a6a0` | 0.5 |
133
+ | `.variant-glossy` | `linear-gradient(145deg, bg-surface, bg-panel)` | `var(--border-mid)` | 0.14 |
134
+
135
+ ## Theme Behavior
136
+ - Rubber and metal variants use hardcoded gradients
137
+ - Glossy variant adapts via surface tokens
138
+ - Amber indicator is fixed across themes
139
+
140
+ ## Constraints
141
+ 1. Indicator MUST rotate via `transform-origin` set to knob center (`50% 34px`).
142
+ 2. Three material variants MUST use the Material Recipes from Section 3.
143
+ 3. Cursor MUST change from `grab` to `grabbing` on `:active`.
144
+ 4. Center cap represents shaft nut / set-screw cover.
145
+ 5. Highlight opacity MUST match material: rubber=0.08, metal=0.5, glossy=0.14.
146
+
147
+ ## Accessibility
148
+ - Add `tabindex="0"` and `role="slider"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
149
+ - Keyboard: Arrow keys to rotate
150
+ - Requires JS for rotation interaction
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: Rotary Encoder
3
+ id: rotary
4
+ class: .rotary
5
+ category: dials
6
+ index: 1
7
+ materials: [panel, chrome]
8
+ sizes: [md]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Rotary Encoder
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: Behringer DJX700 browse knob, Akai MPC2000 data wheel, Roland SP-404 volume, Mackie mixer pan/aux knobs.
18
+ **Mechanism**: Incremental optical or mechanical rotary encoder. Unlike a potentiometer, can rotate infinitely. Slotted disc generates quadrature pulses, typically 16-24 detents per revolution. Ball bearing on spring presses against machined notches for click-click-click feel.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Knob body | 100x100px, machined aluminum or molded plastic |
25
+ | Knurled edge | 8px ring around body (repeating-conic-gradient) |
26
+ | Center cap | inset 22px from all sides |
27
+ | Indicator notch | 4x20px amber bar at 12 o'clock |
28
+ | Detent per revolution | 16-24 clicks |
29
+
30
+ ## CSS Recipe
31
+
32
+ ### Wrapper
33
+ ```css
34
+ .rotary-wrap { display: flex; align-items: center; gap: 24px; }
35
+ ```
36
+
37
+ ### Knob Body
38
+ ```css
39
+ .rotary {
40
+ width: 100px; height: 100px; border-radius: 50%;
41
+ position: relative; cursor: pointer;
42
+ background: radial-gradient(circle at 35% 30%, #4b4b4b, #1b1b1b 70%);
43
+ border: 2px solid #0c0c0c;
44
+ box-shadow: 0 4px 0 #090909, inset 0 1px 0 #666, 0 8px 20px rgba(0,0,0,0.4);
45
+ transition: transform 220ms var(--snap-fast);
46
+ }
47
+ ```
48
+
49
+ ### Hover (One Detent Click)
50
+ ```css
51
+ .rotary:hover { transform: rotate(8deg); }
52
+ ```
53
+
54
+ ### Knurled Edge Ring
55
+ ```css
56
+ .rotary::before {
57
+ content: ''; position: absolute; inset: -8px; border-radius: 50%;
58
+ background: repeating-conic-gradient(#202020 0deg 4deg, #0d0d0d 4deg 8deg);
59
+ z-index: -1;
60
+ }
61
+ ```
62
+
63
+ ### Position Indicator Notch
64
+ ```css
65
+ .rotary-notch {
66
+ position: absolute; top: 10px; left: 50%;
67
+ width: 4px; height: 20px; transform: translateX(-50%);
68
+ border-radius: 10px;
69
+ background: linear-gradient(180deg, #ffc14d, #b56b00);
70
+ box-shadow: 0 0 14px var(--amber-glow);
71
+ }
72
+ ```
73
+
74
+ ### Center Cap (Shaft Nut Cover)
75
+ ```css
76
+ .rotary-center {
77
+ position: absolute; inset: 22px; border-radius: 50%;
78
+ background: radial-gradient(circle at 30% 30%, #2c2c2c, #141414);
79
+ display: flex; align-items: center; justify-content: center;
80
+ border: 1px solid #2c2c2c;
81
+ }
82
+ .rotary-text { font-family: var(--font-display); color: var(--amber); font-size: 14px; }
83
+ ```
84
+
85
+ ## HTML Structure
86
+ ```html
87
+ <div class="rotary-wrap">
88
+ <div class="rotary">
89
+ <div class="rotary-notch"></div>
90
+ <div class="rotary-center"><div class="rotary-text">AUX</div></div>
91
+ </div>
92
+ </div>
93
+ ```
94
+
95
+ ## Size Variants
96
+ No explicit size variants defined. Fixed at 100x100px.
97
+
98
+ ## Material Variants
99
+ - Body: Machined aluminum look (radial-gradient with off-center highlight)
100
+ - Knurled edge: Conic gradient simulating diamond-pattern cut
101
+ - Center cap: Recessed metallic cap
102
+
103
+ ## Theme Behavior
104
+ - Knob body uses hardcoded dark grays (metal is always dark/reflective)
105
+ - Amber indicator and glow are fixed
106
+ - Shadow depths may need lightening in light theme
107
+
108
+ ## Constraints
109
+ 1. Off-center highlight (`circle at 35% 30%`) is REQUIRED -- simulates domed/convex top catching light.
110
+ 2. Knurled edge MUST use `repeating-conic-gradient` at 4deg intervals.
111
+ 3. Hover rotation of 8deg simulates one detent click -- provides immediate feedback.
112
+ 4. Position indicator (notch) MUST be at 12 o'clock position, rotated via JS.
113
+ 5. Shadow stack MUST include both bottom edge (`0 4px 0`) AND ambient (`0 8px 20px`).
114
+
115
+ ## Accessibility
116
+ - Add `tabindex="0"` and `role="slider"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
117
+ - Keyboard: Arrow keys to rotate (increment/decrement)
118
+ - Requires JS for rotation interaction and value updates
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: Color Picker
3
+ id: color-picker
4
+ class: .color-bar-picker
5
+ category: forms
6
+ index: 5
7
+ materials: [phosphor-screen]
8
+ sizes: [default]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # Color Picker
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: SMPTE/EBU color bar test pattern, broadcast monitor calibration, chroma key color selectors.
18
+ **Mechanism**: Derived from the SMPTE color bar test signal -- a standardized video test pattern used since 1978 to calibrate broadcast monitors. The seven vertical bars (white, yellow, cyan, green, magenta, red, blue) are arranged in a specific order representing decreasing luminance. In this UI, each bar is selectable -- clicking a bar selects that color, shown by a white dot indicator at the bottom.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Height | 40px |
25
+ | Border radius | `--radius-sm` (4px) |
26
+ | Bars | 7 equal-width columns |
27
+ | Selection dot | 6x6px circle |
28
+
29
+ ## CSS Recipe
30
+
31
+ ### Container (`.color-bar-picker`)
32
+ ```css
33
+ .color-bar-picker {
34
+ display: flex; height: 40px; border-radius: var(--radius-sm);
35
+ overflow: hidden; border: 1px solid var(--border-subtle);
36
+ box-shadow: var(--shadow-inset); cursor: pointer;
37
+ }
38
+ ```
39
+
40
+ ### Swatch (`.color-bar-swatch`)
41
+ ```css
42
+ .color-bar-swatch {
43
+ flex: 1; transition: opacity 0.15s; position: relative;
44
+ }
45
+ ```
46
+
47
+ ### Swatch hover
48
+ ```css
49
+ .color-bar-swatch:hover { opacity: 0.8; }
50
+ ```
51
+
52
+ ### Swatch selected
53
+ ```css
54
+ .color-bar-swatch.selected::after {
55
+ content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
56
+ width: 6px; height: 6px; background: #fff; border-radius: 50%;
57
+ box-shadow: 0 0 6px rgba(255,255,255,0.5);
58
+ }
59
+ ```
60
+
61
+ ## HTML Structure
62
+ ```html
63
+ <div class="color-bar-picker" style="width:210px">
64
+ <div class="color-bar-swatch" style="background:#fff"></div>
65
+ <div class="color-bar-swatch selected" style="background:#ffff00"></div>
66
+ <div class="color-bar-swatch" style="background:#00ffff"></div>
67
+ <div class="color-bar-swatch" style="background:#00ff00"></div>
68
+ <div class="color-bar-swatch" style="background:#ff00ff"></div>
69
+ <div class="color-bar-swatch" style="background:#ff0000"></div>
70
+ <div class="color-bar-swatch" style="background:#0000ff"></div>
71
+ </div>
72
+ ```
73
+
74
+ ## Size Variants
75
+ No size variants defined.
76
+
77
+ ## Material Variants
78
+ No material variants. Uses recessed inset styling to simulate a display/monitor cavity.
79
+
80
+ ## Theme Behavior
81
+ - Border swaps via `--border-subtle`
82
+ - Inset shadow adapts by theme
83
+ - SMPTE colors are absolute (do not change with theme)
84
+ - Selection dot is always white with white glow
85
+
86
+ ## Constraints
87
+ 1. MUST use SMPTE color bar order: white, yellow, cyan, green, magenta, red, blue
88
+ 2. MUST use recessed styling (inset shadow) to simulate a monitor display
89
+ 3. Selected bar MUST show a white dot with glow at the bottom
90
+ 4. Hover MUST reduce opacity to 0.8 (light leaking through pressed key)
91
+ 5. Only ONE bar can be `.selected` at a time
92
+ 6. Bars MUST be equal width (`flex: 1`)
93
+ 7. MUST use `overflow: hidden` to clip bar corners to the container radius
94
+
95
+ ## Accessibility
96
+ - Container should have `role="radiogroup"` with `aria-label="Color picker"`
97
+ - Each swatch should have `role="radio"` with `aria-checked`
98
+ - Include `aria-label` on each swatch with the color name
99
+ - Support Left/Right arrow key navigation between swatches
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: File Input
3
+ id: file-input
4
+ class: .file-input
5
+ category: forms
6
+ index: 6
7
+ materials: [glossy-polycarbonate]
8
+ sizes: [default]
9
+ interactive: true
10
+ requires_js: true
11
+ canvas: false
12
+ ---
13
+
14
+ # File Input
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: CompactFlash card slot on Nikon cameras, SD card slot on Sony cameras, Memory Stick slot on Sony devices.
18
+ **Mechanism**: A spring-loaded card slot with an eject mechanism. The user pushes a memory card into a recessed slot until it clicks (a spring-loaded catch engages). To remove, the user pushes the card again (push-push release mechanism) or presses an adjacent eject button. The dashed border in the UI represents the card slot opening, and the eject button icon represents the physical eject mechanism.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Width | 220px |
25
+ | Padding | 10px 14px |
26
+ | Border | 2px dashed |
27
+ | Border radius | `--radius-md` (8px) |
28
+ | Icon font size | 18px |
29
+ | Text font size | 10px |
30
+ | Eject button | 24x24px |
31
+ | Element gap | 10px |
32
+
33
+ ## CSS Recipe
34
+
35
+ ### Container (`.file-input`)
36
+ ```css
37
+ .file-input {
38
+ display: flex; align-items: center; gap: 10px;
39
+ padding: 10px 14px; background: var(--bg-surface);
40
+ border: 2px dashed var(--border-mid); border-radius: var(--radius-md);
41
+ cursor: pointer; transition: border-color 0.15s;
42
+ width: 220px;
43
+ }
44
+ ```
45
+
46
+ ### Hover
47
+ ```css
48
+ .file-input:hover { border-color: var(--amber); }
49
+ ```
50
+
51
+ ### Icon (`.file-input-icon`)
52
+ ```css
53
+ .file-input-icon { font-size: 18px; color: var(--text-muted); }
54
+ ```
55
+
56
+ ### Text (`.file-input-text`)
57
+ ```css
58
+ .file-input-text { font-family: var(--font-ui); font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 1px; }
59
+ ```
60
+
61
+ ### Eject button (`.file-input-eject`)
62
+ ```css
63
+ .file-input-eject {
64
+ margin-left: auto; width: 24px; height: 24px; border-radius: var(--radius-sm);
65
+ background: var(--bg-panel); border: 1px solid var(--border-subtle);
66
+ display: flex; align-items: center; justify-content: center;
67
+ font-size: 10px; color: var(--text-muted); cursor: pointer;
68
+ }
69
+ ```
70
+
71
+ ## HTML Structure
72
+ ```html
73
+ <div class="file-input">
74
+ <span class="file-input-icon">&#128190;</span>
75
+ <span class="file-input-text">INSERT CARD</span>
76
+ <div class="file-input-eject">&#9166;</div>
77
+ </div>
78
+ ```
79
+
80
+ ## Size Variants
81
+ No size variants defined.
82
+
83
+ ## Material Variants
84
+ No material variants. Uses raised surface background with dashed border for the slot opening.
85
+
86
+ ## Theme Behavior
87
+ - Background swaps via `--bg-surface`
88
+ - Border color swaps via `--border-mid`
89
+ - Hover border always uses `--amber`
90
+ - Eject button adapts via panel/subtle tokens
91
+
92
+ ## Constraints
93
+ 1. MUST use dashed border (2px) to represent the card slot opening
94
+ 2. MUST include eject button on the right side
95
+ 3. Hover MUST highlight border in amber (card slot LED indicator)
96
+ 4. MUST use `margin-left: auto` on eject to push it to the right
97
+ 5. Label text MUST use uppercase with letter-spacing (equipment labeling convention)
98
+ 6. Eject button MUST be 24x24px square with `--radius-sm` corners
99
+
100
+ ## Accessibility
101
+ - Should wrap a hidden `<input type="file">` element
102
+ - Container should be labelled with `aria-label="File upload"` or associated label
103
+ - Eject button should have `aria-label="Remove file"` and `role="button"`
104
+ - Support keyboard activation (Enter/Space to open file dialog)
105
+ - After file is selected, display filename in the text area
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: Search Bar
3
+ id: search-bar
4
+ class: .search-bar
5
+ category: forms
6
+ index: 3
7
+ materials: [phosphor-screen]
8
+ sizes: [default]
9
+ interactive: true
10
+ requires_js: false
11
+ canvas: false
12
+ ---
13
+
14
+ # Search Bar
15
+
16
+ ## Physical Analog
17
+ **Reference devices**: iPod search (introduced in iPod Photo), camera image search/filter.
18
+ **Mechanism**: A text input combined with a magnifying glass icon, contained in a pill-shaped housing. The pill shape (full border-radius) distinguishes it from standard text inputs and signals a "find/filter" action rather than data entry. Derived from the physical "search" button on remote controls and CD/DVD players.
19
+
20
+ ## Geometry
21
+
22
+ | Property | Value |
23
+ |----------|-------|
24
+ | Width | 220px |
25
+ | Height | 36px |
26
+ | Padding | 0 12px |
27
+ | Border radius | `--radius-pill` (100px) |
28
+ | Icon-input gap | 8px |
29
+ | Font size | 11px |
30
+ | Icon font size | 14px |
31
+
32
+ ## CSS Recipe
33
+
34
+ ### Container (`.search-bar`)
35
+ ```css
36
+ .search-bar {
37
+ display: flex; align-items: center; gap: 8px;
38
+ width: 220px; height: 36px; padding: 0 12px;
39
+ background: var(--bg-inset); border: 1px solid var(--border-mid);
40
+ border-radius: var(--radius-pill); box-shadow: var(--shadow-inset);
41
+ }
42
+ ```
43
+
44
+ ### Icon (`.search-bar-icon`)
45
+ ```css
46
+ .search-bar-icon { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
47
+ ```
48
+
49
+ ### Input
50
+ ```css
51
+ .search-bar input {
52
+ flex: 1; background: transparent; border: none; outline: none;
53
+ color: var(--text-primary); font-family: var(--font-ui); font-size: 11px;
54
+ font-weight: 500; letter-spacing: 0.5px;
55
+ }
56
+ .search-bar input::placeholder { color: var(--text-muted); }
57
+ ```
58
+
59
+ ### Focus
60
+ ```css
61
+ .search-bar:focus-within { border-color: var(--amber); }
62
+ ```
63
+
64
+ ## HTML Structure
65
+ ```html
66
+ <div class="search-bar">
67
+ <span class="search-bar-icon">&#128269;</span>
68
+ <input type="text" placeholder="Search files...">
69
+ </div>
70
+ ```
71
+
72
+ ## Size Variants
73
+ No size variants defined.
74
+
75
+ ## Material Variants
76
+ No material variants. Uses phosphor screen (recessed) styling with pill shape.
77
+
78
+ ## Theme Behavior
79
+ - Background uses `--bg-inset` (recessed cavity)
80
+ - Inset shadow adapts by theme
81
+ - Focus-within border always amber
82
+ - Icon and placeholder use `--text-muted`
83
+
84
+ ## Constraints
85
+ 1. MUST use pill border-radius (`--radius-pill`, 100px) to distinguish from text inputs
86
+ 2. MUST include magnifying glass icon on the left
87
+ 3. MUST use `focus-within` on the container (not `:focus` on the input) for border highlight
88
+ 4. Input inside MUST be transparent background with no border
89
+ 5. MUST use recessed styling (inset shadow + `--bg-inset`)
90
+ 6. MUST use UI font (`--font-ui`), not monospace, for search queries
91
+
92
+ ## Accessibility
93
+ - Use `role="search"` on the container or wrap in a `<search>` element
94
+ - Input should have `type="search"` for proper semantics
95
+ - Include `aria-label="Search"` if no visible label
96
+ - Support Enter to submit and Escape to clear