@viraui/react 2026.10.0 → 2026.11.0-next.1

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 (123) hide show
  1. package/dist/catalog.json +12 -0
  2. package/dist/components/avatar/avatar.d.ts +6 -0
  3. package/dist/components/avatar/avatar.js +2 -2
  4. package/dist/components/badge/badge.css +1 -1
  5. package/dist/components/button/button.css +1 -1
  6. package/dist/components/dialog/dialog-sheet.d.ts +1 -1
  7. package/dist/components/gauge/arcs.d.ts +134 -0
  8. package/dist/components/gauge/arcs.js +145 -0
  9. package/dist/components/gauge/context.d.ts +134 -0
  10. package/dist/components/gauge/context.js +83 -0
  11. package/dist/components/gauge/control.d.ts +107 -0
  12. package/dist/components/gauge/control.js +223 -0
  13. package/dist/components/gauge/demos/_shared.d.ts +28 -0
  14. package/dist/components/gauge/demos/activity-ring.d.ts +9 -0
  15. package/dist/components/gauge/demos/air-quality.d.ts +9 -0
  16. package/dist/components/gauge/demos/analog-dial.d.ts +9 -0
  17. package/dist/components/gauge/demos/battery.d.ts +9 -0
  18. package/dist/components/gauge/demos/chronograph.d.ts +9 -0
  19. package/dist/components/gauge/demos/clock.d.ts +9 -0
  20. package/dist/components/gauge/demos/compass.d.ts +9 -0
  21. package/dist/components/gauge/demos/data-usage.d.ts +9 -0
  22. package/dist/components/gauge/demos/dimmer.d.ts +9 -0
  23. package/dist/components/gauge/demos/fuel.d.ts +9 -0
  24. package/dist/components/gauge/demos/heart-rate.d.ts +9 -0
  25. package/dist/components/gauge/demos/internet-speed.d.ts +9 -0
  26. package/dist/components/gauge/demos/nested-rings.d.ts +11 -0
  27. package/dist/components/gauge/demos/orrery.d.ts +12 -0
  28. package/dist/components/gauge/demos/power-meter.d.ts +9 -0
  29. package/dist/components/gauge/demos/progress-ring.d.ts +9 -0
  30. package/dist/components/gauge/demos/range.d.ts +10 -0
  31. package/dist/components/gauge/demos/saas-metric.d.ts +9 -0
  32. package/dist/components/gauge/demos/segments.d.ts +9 -0
  33. package/dist/components/gauge/demos/simple.d.ts +9 -0
  34. package/dist/components/gauge/demos/speed-fuel.d.ts +10 -0
  35. package/dist/components/gauge/demos/speedometer.d.ts +9 -0
  36. package/dist/components/gauge/demos/sprint.d.ts +9 -0
  37. package/dist/components/gauge/demos/sun-path.d.ts +9 -0
  38. package/dist/components/gauge/demos/system.d.ts +11 -0
  39. package/dist/components/gauge/demos/tachometer.d.ts +9 -0
  40. package/dist/components/gauge/demos/temperature.d.ts +9 -0
  41. package/dist/components/gauge/demos/thermostat.d.ts +9 -0
  42. package/dist/components/gauge/demos/timer.d.ts +9 -0
  43. package/dist/components/gauge/demos/volume.d.ts +10 -0
  44. package/dist/components/gauge/demos/wind.d.ts +9 -0
  45. package/dist/components/gauge/dot.d.ts +55 -0
  46. package/dist/components/gauge/dot.js +34 -0
  47. package/dist/components/gauge/gauge.css +1 -0
  48. package/dist/components/gauge/gauge.d.ts +84 -0
  49. package/dist/components/gauge/gauge.js +62 -0
  50. package/dist/components/gauge/gauge.module.js +24 -0
  51. package/dist/components/gauge/index.d.ts +15 -0
  52. package/dist/components/gauge/inset.d.ts +30 -0
  53. package/dist/components/gauge/inset.js +39 -0
  54. package/dist/components/gauge/math.d.ts +69 -0
  55. package/dist/components/gauge/math.js +135 -0
  56. package/dist/components/gauge/needle.d.ts +81 -0
  57. package/dist/components/gauge/needle.js +162 -0
  58. package/dist/components/gauge/scale.d.ts +44 -0
  59. package/dist/components/gauge/scale.js +21 -0
  60. package/dist/components/gauge/text.d.ts +79 -0
  61. package/dist/components/gauge/text.js +42 -0
  62. package/dist/components/gauge/ticks.d.ts +169 -0
  63. package/dist/components/gauge/ticks.js +124 -0
  64. package/dist/components/gauge/tooltip.d.ts +117 -0
  65. package/dist/components/gauge/tooltip.js +336 -0
  66. package/dist/components/gauge/transition.d.ts +60 -0
  67. package/dist/components/gauge/transition.js +129 -0
  68. package/dist/components/gauge/use-animated-value.d.ts +14 -0
  69. package/dist/components/gauge/use-animated-value.js +111 -0
  70. package/dist/components/gauge/utils.d.ts +51 -0
  71. package/dist/components/gauge/utils.js +80 -0
  72. package/dist/components/icon-meter/icon-meter.css +1 -0
  73. package/dist/components/icon-meter/icon-meter.d.ts +62 -0
  74. package/dist/components/icon-meter/icon-meter.js +105 -0
  75. package/dist/components/icon-meter/icon-meter.module.js +11 -0
  76. package/dist/components/icon-meter/index.d.ts +2 -0
  77. package/dist/components/icon-meter/utils.d.ts +22 -0
  78. package/dist/components/icon-meter/utils.js +40 -0
  79. package/dist/components/index.d.ts +2 -0
  80. package/dist/components/popover/popover-sheet.d.ts +1 -2
  81. package/dist/components/stack/stack.d.ts +9 -2
  82. package/dist/components/tabs/tabs.d.ts +1 -2
  83. package/dist/index.js +17 -1
  84. package/dist/internal/chrome-icons/chrome-icons.d.ts +4 -0
  85. package/dist/internal/chrome-icons/chrome-icons.js +12 -4
  86. package/dist/preflight.css +1 -1
  87. package/dist/specs/components/avatar/props.xml +3 -0
  88. package/dist/specs/components/avatar/usage.xml +1 -0
  89. package/dist/specs/components/badge/a11y.xml +1 -1
  90. package/dist/specs/components/button/props.xml +2 -2
  91. package/dist/specs/components/button/usage.xml +1 -1
  92. package/dist/specs/components/gauge/a11y.xml +8 -0
  93. package/dist/specs/components/gauge/meta.xml +38 -0
  94. package/dist/specs/components/gauge/patterns.xml +1158 -0
  95. package/dist/specs/components/gauge/props.xml +452 -0
  96. package/dist/specs/components/gauge/usage.xml +21 -0
  97. package/dist/specs/components/icon-button/props.xml +2 -2
  98. package/dist/specs/components/icon-button/usage.xml +1 -1
  99. package/dist/specs/components/icon-meter/a11y.xml +9 -0
  100. package/dist/specs/components/icon-meter/meta.xml +21 -0
  101. package/dist/specs/components/icon-meter/patterns.xml +23 -0
  102. package/dist/specs/components/icon-meter/props.xml +44 -0
  103. package/dist/specs/components/icon-meter/usage.xml +13 -0
  104. package/dist/specs/components/linear-progress/usage.xml +1 -0
  105. package/dist/specs/components/meter/meta.xml +1 -0
  106. package/dist/specs/components/meter/props.xml +1 -0
  107. package/dist/specs/components/meter/usage.xml +1 -0
  108. package/dist/specs/components/stack/patterns.xml +21 -21
  109. package/dist/specs/components/stack/props.xml +6 -6
  110. package/dist/specs/components/stack/usage.xml +4 -2
  111. package/dist/specs/components/text/patterns.xml +1 -1
  112. package/dist/specs/components/text/usage.xml +1 -1
  113. package/dist/specs/components/toggle-button/props.xml +1 -1
  114. package/dist/specs/components/toggle-button/usage.xml +1 -1
  115. package/dist/specs/components/toggle-text-button/props.xml +1 -1
  116. package/dist/specs/foundation/attributes.xml +3 -3
  117. package/dist/specs/foundation/modules.xml +1 -1
  118. package/dist/specs/foundation/theme-topics.xml +7 -2
  119. package/dist/specs/index.xml +21 -1
  120. package/dist/specs/patterns/compose-layout-first.xml +1 -1
  121. package/dist/specs/patterns/settings-panel.xml +1 -1
  122. package/dist/specs/patterns/settings-row.xml +1 -1
  123. package/package.json +2 -2
@@ -0,0 +1,452 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <props surface="gauge">
3
+ <when_to_use>
4
+ <item>Use `Gauge` for composable round determinate dials (air quality, temperature, fuel, heading).</item>
5
+ <item>Use `GaugeControl` when the round dial must be adjusted with pointer and keyboard (single or range).</item>
6
+ <item>Use zone helpers (`zoneColor`, `zoneCutoffs`) when band colors drive arc or mark paint.</item>
7
+ <item>Optional part colors: omit `color` for defaults, or pass `var(--global-*)` / `var(--highlight-*)` (see `usage.xml` and pattern `optional-token-colors`).</item>
8
+ </when_to_use>
9
+ <when_not_to_use>
10
+ <item>Use `Meter` for a compact horizontal capacity track without polar composition.</item>
11
+ <item>Use `Slider` for linear interactive ranges (Gauge is round-only so it does not replace Slider).</item>
12
+ <item>Use `LinearProgress` for in-progress or indeterminate work.</item>
13
+ </when_not_to_use>
14
+
15
+ <prop name="value" kind="react">
16
+ <description>Domain reading, or a `[from, to]` range to fill between. Required on `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
17
+ </prop>
18
+ <prop name="min" kind="react">
19
+ <description>Lower bound of the domain. Default `0`. Shared by `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
20
+ </prop>
21
+ <prop name="max" kind="react">
22
+ <description>Upper bound of the domain. Default `100`. Shared by `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
23
+ </prop>
24
+ <prop name="startAngle" kind="react">
25
+ <description>Round sweep start in gauge degrees (clockwise from six o'clock). Default `40`. Shared by `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
26
+ </prop>
27
+ <prop name="endAngle" kind="react">
28
+ <description>Round sweep end in gauge degrees. Default `320`. Shared by `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
29
+ </prop>
30
+ <prop name="radius" kind="react">
31
+ <description>Reference radius in SVG units. Default `200` on `Gauge`; `GaugeInset` inherits the host radius when omitted.</description>
32
+ </prop>
33
+ <prop name="padding" kind="react">
34
+ <description>`Gauge` only. Extra room around the reference geometry for strokes and labels. Default `48`.</description>
35
+ </prop>
36
+ <prop name="fit" kind="react">
37
+ <description>`Gauge` only. `square` boxes the full circle; `content` fits the arc sweep and sets `--vui-gauge-aspect-ratio`. Default `square`.</description>
38
+ </prop>
39
+ <prop name="transition" kind="react">
40
+ <description>Animate toward new values on `Gauge` / `GaugeInset`: `true` / spring / tween config, or omit for instant updates. Reduced motion snaps.</description>
41
+ </prop>
42
+ <prop name="initialValue" kind="react">
43
+ <description>`Gauge` / `GaugeInset`. Where the animated reading starts on mount. Default starts at the target value.</description>
44
+ </prop>
45
+ <prop name="wrap" kind="react">
46
+ <description>Treat the domain as a closed ring (fold + shortest-path animation). Default `false`. Shared by `Gauge`, `GaugeControl`, and `GaugeInset`.</description>
47
+ </prop>
48
+ <prop name="rotate" kind="react">
49
+ <description>`Gauge` / `GaugeInset`. Turn the whole scale this many degrees clockwise. Default `0`.</description>
50
+ </prop>
51
+ <prop name="label" kind="react">
52
+ <description>Accessible name for meter roots; required on `GaugeControl`. On `Gauge`, omit and name via `aria-label` when needed.</description>
53
+ </prop>
54
+
55
+ <prop name="GaugeControl.onChange" kind="react">
56
+ <description>Callback emitting the next number or `[from, to]` tuple.</description>
57
+ </prop>
58
+ <prop name="GaugeControl.onPress" kind="react">
59
+ <description>Face-centre press or Enter for dials that also act as a switch. Omit when unused.</description>
60
+ </prop>
61
+ <prop name="GaugeControl.step" kind="react">
62
+ <description>Snap size and arrow-key delta. Default `1`.</description>
63
+ </prop>
64
+ <prop name="GaugeControl.thumbLabels" kind="react">
65
+ <description>Accessible names for range thumbs. Defaults to `{label} start` / `{label} end`.</description>
66
+ </prop>
67
+ <prop name="GaugeControl.valueText" kind="react">
68
+ <description>Spoken value text (string or pair for range).</description>
69
+ </prop>
70
+ <prop name="GaugeControl.knob" kind="react">
71
+ <description>Relative drag anywhere on the control instead of absolute ring targeting. Default `false`.</description>
72
+ </prop>
73
+ <prop name="GaugeControl.disabled" kind="react">
74
+ <description>Ignore pointer and keyboard input. Presence via `data-disabled` `"true"`/`"false"`.</description>
75
+ </prop>
76
+
77
+ <prop name="GaugeTrack.width" kind="react">
78
+ <description>Stroke width in SVG units. Default `24`.</description>
79
+ </prop>
80
+ <prop name="GaugeTrack.color" kind="react">
81
+ <description>Stroke colour. Default `var(--global-contrast)`.</description>
82
+ </prop>
83
+ <prop name="GaugeTrack.opacity" kind="react">
84
+ <description>Stroke opacity. Default `1`.</description>
85
+ </prop>
86
+ <prop name="GaugeTrack.cap" kind="react">
87
+ <description>Stroke line cap. Default `round`.</description>
88
+ </prop>
89
+ <prop name="GaugeTrack.offset" kind="react">
90
+ <description>Radial offset from the scale reference line. Default `0`.</description>
91
+ </prop>
92
+
93
+ <prop name="GaugeArc.width" kind="react">
94
+ <description>Stroke width in SVG units. Default `24`.</description>
95
+ </prop>
96
+ <prop name="GaugeArc.color" kind="react">
97
+ <description>Stroke colour. Default `var(--global-primary)`.</description>
98
+ </prop>
99
+ <prop name="GaugeArc.opacity" kind="react">
100
+ <description>Stroke opacity. Default `1`.</description>
101
+ </prop>
102
+ <prop name="GaugeArc.cap" kind="react">
103
+ <description>Stroke line cap. Default `round`.</description>
104
+ </prop>
105
+ <prop name="GaugeArc.offset" kind="react">
106
+ <description>Radial offset from the scale reference line. Default `0`.</description>
107
+ </prop>
108
+ <prop name="GaugeArc.from" kind="react">
109
+ <description>Domain value the arc starts at. Default gauge `from` (min on a single value).</description>
110
+ </prop>
111
+ <prop name="GaugeArc.to" kind="react">
112
+ <description>Domain value the arc ends at. Default current gauge `value`.</description>
113
+ </prop>
114
+ <prop name="GaugeArc.reverse" kind="react">
115
+ <description>Grow the arc back from the end of the sweep. Default `false`.</description>
116
+ </prop>
117
+ <prop name="GaugeArc.wrap" kind="react">
118
+ <description>Carry the arc across a closed-ring seam instead of clamping. Default `false`.</description>
119
+ </prop>
120
+
121
+ <prop name="GaugeStack.parts" kind="react">
122
+ <description>Ordered segments: each `{ weight?, to?, color, opacity? }` (use weights or fixed cutoffs, not both styles mixed).</description>
123
+ </prop>
124
+ <prop name="GaugeStack.from" kind="react">
125
+ <description>Domain value the stack starts at. Default gauge `from`.</description>
126
+ </prop>
127
+ <prop name="GaugeStack.width" kind="react">
128
+ <description>Stroke width in SVG units. Default `24`.</description>
129
+ </prop>
130
+ <prop name="GaugeStack.opacity" kind="react">
131
+ <description>Group stroke opacity. Default `1`.</description>
132
+ </prop>
133
+ <prop name="GaugeStack.cap" kind="react">
134
+ <description>Stroke line cap. Default `butt`.</description>
135
+ </prop>
136
+ <prop name="GaugeStack.offset" kind="react">
137
+ <description>Radial offset from the scale reference line. Default `0`.</description>
138
+ </prop>
139
+
140
+ <prop name="GaugeZones.zones" kind="react">
141
+ <description>Ordered `{ to, color }` cutoffs; each band runs from the previous `to` (or `min`) and the last extends to `max`.</description>
142
+ </prop>
143
+ <prop name="GaugeZones.width" kind="react">
144
+ <description>Stroke width in SVG units. Default `8`.</description>
145
+ </prop>
146
+ <prop name="GaugeZones.opacity" kind="react">
147
+ <description>Stroke opacity. Default `1`.</description>
148
+ </prop>
149
+ <prop name="GaugeZones.cap" kind="react">
150
+ <description>Cap on joints between zones. Default `butt`.</description>
151
+ </prop>
152
+ <prop name="GaugeZones.endCap" kind="react">
153
+ <description>Cap on the two outer ends of the whole band. Default same as `cap`.</description>
154
+ </prop>
155
+ <prop name="GaugeZones.offset" kind="react">
156
+ <description>Radial offset from the scale reference line. Default `0`.</description>
157
+ </prop>
158
+ <prop name="GaugeZones.gap" kind="react">
159
+ <description>Gap between neighbouring zones in scale units. Default `0`.</description>
160
+ </prop>
161
+
162
+ <prop name="GaugeTicks.count" kind="react">
163
+ <description>Number of intervals across the domain (`count + 1` ticks). Default `10`.</description>
164
+ </prop>
165
+ <prop name="GaugeTicks.length" kind="react">
166
+ <description>Tick line length in SVG units. Default `12`.</description>
167
+ </prop>
168
+ <prop name="GaugeTicks.width" kind="react">
169
+ <description>Stroke width of each tick. Default `2`.</description>
170
+ </prop>
171
+ <prop name="GaugeTicks.color" kind="react">
172
+ <description>One colour or `(value) =&gt; color`. Default `var(--global-foreground)`.</description>
173
+ </prop>
174
+ <prop name="GaugeTicks.opacity" kind="react">
175
+ <description>Stroke opacity. Default `1`.</description>
176
+ </prop>
177
+ <prop name="GaugeTicks.cap" kind="react">
178
+ <description>Stroke line cap. Default `round`.</description>
179
+ </prop>
180
+ <prop name="GaugeTicks.offset" kind="react">
181
+ <description>Offset of each tick midpoint from the scale reference line. Default `0`.</description>
182
+ </prop>
183
+
184
+ <prop name="GaugeTickFill.count" kind="react">
185
+ <description>Number of intervals across the domain. Default `40`.</description>
186
+ </prop>
187
+ <prop name="GaugeTickFill.from" kind="react">
188
+ <description>Where the lit stretch starts. Default gauge `from`.</description>
189
+ </prop>
190
+ <prop name="GaugeTickFill.to" kind="react">
191
+ <description>Where the lit stretch ends. Default current gauge `value`.</description>
192
+ </prop>
193
+ <prop name="GaugeTickFill.mode" kind="react">
194
+ <description>`fill` lights every tick between ends; `nearest` lights only the tick nearest each end. Default `fill`.</description>
195
+ </prop>
196
+ <prop name="GaugeTickFill.color" kind="react">
197
+ <description>Lit tick colour (string or per-value). Default `var(--global-foreground)`.</description>
198
+ </prop>
199
+ <prop name="GaugeTickFill.dimColor" kind="react">
200
+ <description>Unlit tick colour. Default faint theme foreground.</description>
201
+ </prop>
202
+ <prop name="GaugeTickFill.length" kind="react">
203
+ <description>Unlit tick length. Default `12`.</description>
204
+ </prop>
205
+ <prop name="GaugeTickFill.litLength" kind="react">
206
+ <description>Lit tick length. Default same as `length`.</description>
207
+ </prop>
208
+ <prop name="GaugeTickFill.width" kind="react">
209
+ <description>Stroke width. Default `2`.</description>
210
+ </prop>
211
+ <prop name="GaugeTickFill.opacity" kind="react">
212
+ <description>Stroke opacity. Default `1`.</description>
213
+ </prop>
214
+ <prop name="GaugeTickFill.cap" kind="react">
215
+ <description>Stroke line cap. Default `round`.</description>
216
+ </prop>
217
+ <prop name="GaugeTickFill.offset" kind="react">
218
+ <description>Offset of each tick midpoint from the scale reference line. Default `0`.</description>
219
+ </prop>
220
+
221
+ <prop name="GaugeMarks.values" kind="react">
222
+ <description>Domain values to mark (for example zone cutoffs).</description>
223
+ </prop>
224
+ <prop name="GaugeMarks.count" kind="react">
225
+ <description>Equal segment cuts instead of `values` (marks between segments, not at open ends).</description>
226
+ </prop>
227
+ <prop name="GaugeMarks.length" kind="react">
228
+ <description>Mark line length. Default `12`.</description>
229
+ </prop>
230
+ <prop name="GaugeMarks.width" kind="react">
231
+ <description>Stroke width. Default `2`.</description>
232
+ </prop>
233
+ <prop name="GaugeMarks.color" kind="react">
234
+ <description>One colour or `(value) =&gt; color`. Default `var(--global-foreground)`.</description>
235
+ </prop>
236
+ <prop name="GaugeMarks.opacity" kind="react">
237
+ <description>Stroke opacity. Default `1`.</description>
238
+ </prop>
239
+ <prop name="GaugeMarks.cap" kind="react">
240
+ <description>Stroke line cap. Default `round`.</description>
241
+ </prop>
242
+ <prop name="GaugeMarks.offset" kind="react">
243
+ <description>Offset of each mark midpoint from the scale reference line. Default `0`.</description>
244
+ </prop>
245
+
246
+ <prop name="GaugeTickLabels.count" kind="react">
247
+ <description>Number of intervals across the domain. Default `10`.</description>
248
+ </prop>
249
+ <prop name="GaugeTickLabels.offset" kind="react">
250
+ <description>Label offset from the scale reference line. Default `-48`.</description>
251
+ </prop>
252
+ <prop name="GaugeTickLabels.anchor" kind="react">
253
+ <description>Which edge of each label sits at its point. Default `middle`.</description>
254
+ </prop>
255
+ <prop name="GaugeTickLabels.fontSize" kind="react">
256
+ <description>Font size in SVG units. Default `16`.</description>
257
+ </prop>
258
+ <prop name="GaugeTickLabels.color" kind="react">
259
+ <description>One colour or `(value) =&gt; color`. Default `var(--global-foreground)`.</description>
260
+ </prop>
261
+ <prop name="GaugeTickLabels.font" kind="react">
262
+ <description>Typeface map (`sans` / `rounded` / `mono`). Default `sans`.</description>
263
+ </prop>
264
+ <prop name="GaugeTickLabels.weight" kind="react">
265
+ <description>Font weight token. Default `medium`.</description>
266
+ </prop>
267
+ <prop name="GaugeTickLabels.decimals" kind="react">
268
+ <description>Fixed decimal places when `format` is omitted. Default `0`.</description>
269
+ </prop>
270
+ <prop name="GaugeTickLabels.format" kind="react">
271
+ <description>Custom label formatter; overrides `decimals` when set.</description>
272
+ </prop>
273
+
274
+ <prop name="GaugeText.x" kind="react">
275
+ <description>Position relative to centre in SVG units. Default `0`.</description>
276
+ </prop>
277
+ <prop name="GaugeText.y" kind="react">
278
+ <description>Position relative to centre in SVG units (positive down). Default `0`.</description>
279
+ </prop>
280
+ <prop name="GaugeText.fontSize" kind="react">
281
+ <description>Font size in SVG units. Default `24`.</description>
282
+ </prop>
283
+ <prop name="GaugeText.color" kind="react">
284
+ <description>Fill colour. Default `var(--global-foreground)`.</description>
285
+ </prop>
286
+ <prop name="GaugeText.font" kind="react">
287
+ <description>Typeface map. Default `sans`.</description>
288
+ </prop>
289
+ <prop name="GaugeText.weight" kind="react">
290
+ <description>Font weight token. Default `medium`.</description>
291
+ </prop>
292
+ <prop name="GaugeText.anchor" kind="react">
293
+ <description>Which edge of the text sits at `(x, y)`. Default `middle`.</description>
294
+ </prop>
295
+ <prop name="GaugeText.children" kind="react">
296
+ <description>Label content.</description>
297
+ </prop>
298
+
299
+ <prop name="GaugeValue.decimals" kind="react">
300
+ <description>Fixed decimal places when `format` is omitted. Default `0`.</description>
301
+ </prop>
302
+ <prop name="GaugeValue.format" kind="react">
303
+ <description>Formats each number; a range formats its two ends apart.</description>
304
+ </prop>
305
+ <prop name="GaugeValue.separator" kind="react">
306
+ <description>Placed between the two ends of a range. Default en dash.</description>
307
+ </prop>
308
+ <prop name="GaugeValue.end" kind="react">
309
+ <description>Show only one end of a range (`from` / `to`). Default both ends when ranged.</description>
310
+ </prop>
311
+ <prop name="GaugeValue.fontSize" kind="react">
312
+ <description>Font size in SVG units. Default `96`.</description>
313
+ </prop>
314
+ <prop name="GaugeValue.weight" kind="react">
315
+ <description>Font weight token. Default `semibold`.</description>
316
+ </prop>
317
+ <prop name="GaugeValue.x" kind="react">
318
+ <description>Position relative to centre. Default `0`.</description>
319
+ </prop>
320
+ <prop name="GaugeValue.y" kind="react">
321
+ <description>Position relative to centre. Default `0`.</description>
322
+ </prop>
323
+ <prop name="GaugeValue.color" kind="react">
324
+ <description>Fill colour. Default `var(--global-foreground)`.</description>
325
+ </prop>
326
+ <prop name="GaugeValue.font" kind="react">
327
+ <description>Typeface map. Default `sans`.</description>
328
+ </prop>
329
+ <prop name="GaugeValue.anchor" kind="react">
330
+ <description>Text anchor. Default `middle`.</description>
331
+ </prop>
332
+
333
+ <prop name="GaugeDot.radius" kind="react">
334
+ <description>Dot radius in SVG units. Default `10`.</description>
335
+ </prop>
336
+ <prop name="GaugeDot.color" kind="react">
337
+ <description>Fill colour. Default `var(--global-primary)`.</description>
338
+ </prop>
339
+ <prop name="GaugeDot.opacity" kind="react">
340
+ <description>Fill opacity. Default `1`.</description>
341
+ </prop>
342
+ <prop name="GaugeDot.offset" kind="react">
343
+ <description>Offset of the centre from the scale reference line. Default `0`.</description>
344
+ </prop>
345
+ <prop name="GaugeDot.turns" kind="react">
346
+ <description>Sweeps of the scale across the domain. Default `1`.</description>
347
+ </prop>
348
+ <prop name="GaugeDot.halo" kind="react">
349
+ <description>Width of a ring behind the dot. Default `0` (bare).</description>
350
+ </prop>
351
+ <prop name="GaugeDot.haloColor" kind="react">
352
+ <description>Halo colour. Default `var(--global-background)`.</description>
353
+ </prop>
354
+ <prop name="GaugeDot.end" kind="react">
355
+ <description>Which end of a range the dot rides. Default `to`.</description>
356
+ </prop>
357
+
358
+ <prop name="GaugeNeedle.kind" kind="react">
359
+ <description>Needle shape: `line` | `pointer` | `compass` | `arrow`. Default `line`.</description>
360
+ </prop>
361
+ <prop name="GaugeNeedle.length" kind="react">
362
+ <description>Length as a fraction of the reference radius. Default `0.85`.</description>
363
+ </prop>
364
+ <prop name="GaugeNeedle.width" kind="react">
365
+ <description>Stroke width for `line`; centre width for filled styles. Default `6`.</description>
366
+ </prop>
367
+ <prop name="GaugeNeedle.color" kind="react">
368
+ <description>Fill/stroke colour. Default `var(--global-primary)`.</description>
369
+ </prop>
370
+ <prop name="GaugeNeedle.tail" kind="react">
371
+ <description>How far the needle extends behind the centre, in SVG units. Default `30`.</description>
372
+ </prop>
373
+ <prop name="GaugeNeedle.tailColor" kind="react">
374
+ <description>Colour of the tail half. Default same as `color`.</description>
375
+ </prop>
376
+ <prop name="GaugeNeedle.tailDot" kind="react">
377
+ <description>Radius of a disc at the end of the tail. Default `0`.</description>
378
+ </prop>
379
+ <prop name="GaugeNeedle.turns" kind="react">
380
+ <description>Sweeps of the arc across the domain. Default `1`.</description>
381
+ </prop>
382
+ <prop name="GaugeNeedle.gap" kind="react">
383
+ <description>Clear circle around the centre that splits the needle. Default `0`.</description>
384
+ </prop>
385
+ <prop name="GaugeNeedle.end" kind="react">
386
+ <description>Which end of a range the needle points at. Default `to`.</description>
387
+ </prop>
388
+
389
+ <prop name="GaugeHub.radius" kind="react">
390
+ <description>Hub disc radius in SVG units; `0` hides it. Default `12`.</description>
391
+ </prop>
392
+ <prop name="GaugeHub.color" kind="react">
393
+ <description>Fill colour. Default `var(--global-foreground)`.</description>
394
+ </prop>
395
+
396
+ <prop name="GaugeTooltip.position" kind="react">
397
+ <description>Anchor on the gauge (`value`, edges, corners). Default `value`.</description>
398
+ </prop>
399
+ <prop name="GaugeTooltip.side" kind="react">
400
+ <description>Side the bubble stands off its point. Default `auto`.</description>
401
+ </prop>
402
+ <prop name="GaugeTooltip.at" kind="react">
403
+ <description>Domain value a `value` tooltip points at. Default current value (or range middle).</description>
404
+ </prop>
405
+ <prop name="GaugeTooltip.offset" kind="react">
406
+ <description>How far out from the scale reference the point sits, in SVG units. Default `24`.</description>
407
+ </prop>
408
+ <prop name="GaugeTooltip.gap" kind="react">
409
+ <description>Room between the point and the bubble, in CSS pixels. Default `8`.</description>
410
+ </prop>
411
+ <prop name="GaugeTooltip.avoidCollisions" kind="react">
412
+ <description>Keep the bubble on screen. Default `true`.</description>
413
+ </prop>
414
+ <prop name="GaugeTooltip.collisionPadding" kind="react">
415
+ <description>Clearance from the viewport edge, in CSS pixels. Default `8`.</description>
416
+ </prop>
417
+ <prop name="GaugeTooltip.open" kind="react">
418
+ <description>Force open or shut instead of hover/press/focus.</description>
419
+ </prop>
420
+ <prop name="GaugeTooltip.label" kind="react">
421
+ <description>Small line above the value.</description>
422
+ </prop>
423
+ <prop name="GaugeTooltip.unit" kind="react">
424
+ <description>Printed after the value, a size down.</description>
425
+ </prop>
426
+ <prop name="GaugeTooltip.decimals" kind="react">
427
+ <description>Fraction digits when formatting with `toFixed`. Default `0`.</description>
428
+ </prop>
429
+ <prop name="GaugeTooltip.format" kind="react">
430
+ <description>Formats each number; a range formats its two ends apart.</description>
431
+ </prop>
432
+ <prop name="GaugeTooltip.separator" kind="react">
433
+ <description>Placed between the two ends of a range. Default en dash.</description>
434
+ </prop>
435
+ <prop name="GaugeTooltip.children" kind="react">
436
+ <description>Replace default label/value/unit, or a `(value, from?) =&gt; node` renderer.</description>
437
+ </prop>
438
+
439
+ <prop name="GaugeInset.x" kind="react">
440
+ <description>Centre in the host gauge's SVG units. Default `0`.</description>
441
+ </prop>
442
+ <prop name="GaugeInset.y" kind="react">
443
+ <description>Centre in the host gauge's SVG units (positive down). Default `0`.</description>
444
+ </prop>
445
+ <prop name="GaugeInset.scale" kind="react">
446
+ <description>Size relative to the host gauge. Default `1`.</description>
447
+ </prop>
448
+
449
+ <prop name="aspect-ratio" kind="css">
450
+ <description>Public `--vui-gauge-aspect-ratio` used when `fit="content"` on the round Gauge SVG host.</description>
451
+ </prop>
452
+ </props>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <usage surface="gauge">
3
+ <do>Compose round dials with `Gauge` + parts (`Track`, `Arc`, `Zones`, `Marks`, `Ticks`, `Dot`, `Hub`, `Value`, `Text`) sharing one domain</do>
4
+ <do>Wrap with `GaugeControl` for interactive single or dual-thumb polar adjustment; keep Control angles aligned with the child dial</do>
5
+ <do>Color is optional: omit part `color` to keep theme defaults (Track `var(--global-contrast)`, Arc/Dot/Needle `var(--global-primary)`, ticks/labels/text/value/hub `var(--global-foreground)` — see each part in `props.xml`)</do>
6
+ <do>When you need paint, pass theme CSS vars as strings on `color` (and Needle `tailColor`, TickFill `dimColor`, Dot `haloColor`, Zones `zones[].color`): `--global-*` for chrome/labels (`foreground`, `background`, `primary`, `contrast`, `muted`), `--highlight-*` for status/decorative bands (`red`, `green`, `yellow`, `cyan`, `acid`, `blue`, `purple`, …)</do>
7
+ <do>Zone-driven readings: put token colors on `zones[].color`, then reuse with `zoneColor(zones, value)` (or `zoneCutoffs`) on Arc / Marks so the live fill matches the active band</do>
8
+ <do>Pass `label` on read-only roots (or `aria-label`) and always pass `label` on `GaugeControl`</do>
9
+ <do>Prefer `Meter` for compact horizontal capacity chrome; prefer `Slider` for linear interactive ranges; prefer Gauge when polar composition or dial Control is needed</do>
10
+ <do>Needle visual style prop is `kind` (not upstream `style`) to avoid clashing with React `style`</do>
11
+ <dont>Using Gauge / GaugeControl as a linear bar — use Slider (or Meter / LinearProgress for non-interactive)</dont>
12
+ <dont>Using Gauge for discrete icon-row scores — use IconMeter</dont>
13
+ <dont>Expecting a Meter/Chip-style `variant` on Gauge — parts take explicit CSS color strings (`var(--global-*)` / `var(--highlight-*)`), not a highlight variant prop</dont>
14
+ <dont>Hard-coding hex/rgb for themeable dial paint when a `--global-*` or `--highlight-*` token fits</dont>
15
+ <dont>Nesting multiple Gauge domain providers</dont>
16
+ <dont>Putting widget roles on decorative SVG strokes</dont>
17
+ <dont>Shipping without Control `label` or thumb names on ranges</dont>
18
+ <dont>Adding `gauge-ui` or `motion` as runtime dependencies</dont>
19
+ <dont>Using Stack for polar dial geometry — SVG scale math owns layout (documented Stack exception)</dont>
20
+ <dont>Expecting LinearGauge / LinearGaugeInset / lineScale — intentionally out of surface so Gauge does not replace Slider</dont>
21
+ </usage>
@@ -55,7 +55,7 @@
55
55
  <description>Button block size; size prop presets via data attributes.</description>
56
56
  </prop>
57
57
  <prop name="icon-size" kind="css">
58
- <description>Addon icon size inside the button (`--vui-button-icon-size`). Prefer this over setting `size` on the glyph ReactNode.</description>
58
+ <description>Addon icon size inside the button (`--vui-button-icon-size`). Defaults to a fixed fraction of `--vui-button-height` so glyphs stay proportional across space scales; prefer this over setting `size` on the glyph ReactNode.</description>
59
59
  </prop>
60
60
  <prop name="padding-block" kind="css">
61
61
  <description>Vertical padding inside the button.</description>
@@ -79,7 +79,7 @@
79
79
  <description>Button block size; size prop presets via data attributes. (icon-button-link)</description>
80
80
  </prop>
81
81
  <prop name="icon-size" kind="css">
82
- <description>Addon icon size inside the button (`--vui-button-icon-size`). Prefer this over setting `size` on the glyph ReactNode. (icon-button-link)</description>
82
+ <description>Addon icon size inside the button (`--vui-button-icon-size`). Defaults to a fixed fraction of `--vui-button-height` so glyphs stay proportional across space scales; prefer this over setting `size` on the glyph ReactNode. (icon-button-link)</description>
83
83
  </prop>
84
84
  <prop name="padding-block" kind="css">
85
85
  <description>Vertical padding inside the button. (icon-button-link)</description>
@@ -3,7 +3,7 @@
3
3
  <do>Compact toolbar or chrome actions identified only by icon</do>
4
4
  <do>Same size, variant, and loading model as Button without a visible label</do>
5
5
  <do>Decorative glyph with an explicit accessible name on the root (`aria-label` / `aria-labelledby`)</do>
6
- <do>Omit `size` / width / height on the `icon` glyph — host CSS sizes SVG via `--vui-button-icon-size`; set glyph size only to expressly override</do>
6
+ <do>Omit `size` / width / height on the `icon` glyph — host CSS sizes SVG via `--vui-button-icon-size` (fraction of `--vui-button-height`); set glyph size only to expressly override</do>
7
7
  <do>Toolbar / zoom / chrome clusters: Stack row of IconButtons inside Surface — gap via Stack, not per-control CSS</do>
8
8
  <do>Textfield `endAddon` / `startAddon` for compact field chrome (e.g. copy) — keep addon control `size=&quot;s&quot;` (control size, not glyph size)</do>
9
9
  <do>Menu / overlay triggers via `Menu.Trigger render={&lt;IconButton … /&gt;}` (and peers with the same pattern)</do>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <a11y surface="icon-meter">
3
+ <rule>Follow the APG Meter pattern: role meter, valuemin 0, valuemax = clamped iconCount, valuenow = clamped value.</rule>
4
+ <rule>Always expose value text — default `"{value} of {iconCount}"`, or override with `valueText`.</rule>
5
+ <rule>Provide a visible `label` (or default numeric label) or an accessible name via `aria-label` / `aria-labelledby` when `hideLabel` is true.</rule>
6
+ <rule>Icon glyphs and the half-fill gradient defs are decorative (`aria-hidden`); do not put widget roles on them.</rule>
7
+ <rule>Display-only — not an interactive rating and not a progressbar; do not add keyboard value editing.</rule>
8
+ <rule>Value `0 of N` is valid: all icons render empty/unhighlighted.</rule>
9
+ </a11y>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <meta id="icon-meter" title="IconMeter" category="feedback" shared_contract="icon-meter">
3
+ <summary>Display-only discrete icon row for scores and levels (empty / half / full), with APG Meter semantics. Distinct from track Meter, arc Gauge, and LinearProgress.</summary>
4
+ <exports>
5
+ <export name="IconMeter" />
6
+ </exports>
7
+ <related>
8
+ <ref id="meter" />
9
+ <ref id="gauge" />
10
+ <ref id="linear-progress" />
11
+ <ref id="text" />
12
+ <ref id="stack" />
13
+ </related>
14
+ <units>
15
+ <unit kind="a11y" href="a11y.xml" />
16
+ <unit kind="props" href="props.xml" />
17
+ <unit kind="usage" href="usage.xml" />
18
+ <unit kind="patterns" href="patterns.xml" />
19
+ </units>
20
+ <base_ui href="https://base-ui.com/react/components/meter#api-reference" />
21
+ </meta>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <patterns surface="icon-meter">
3
+ <example title="Score row with label">
4
+ <tsx><![CDATA[
5
+ <IconMeter label="Quality" value={3.5} iconCount={5} />
6
+ ]]></tsx>
7
+ <notes>Default chrome star; half fill at 3.5. Visible label names the meter. Accent defaults to `var(--global-primary)`.</notes>
8
+ </example>
9
+
10
+ <example title="Zero is valid">
11
+ <tsx><![CDATA[
12
+ <IconMeter aria-label="Guest rating" hideLabel value={0} iconCount={5} />
13
+ ]]></tsx>
14
+ <notes>All icons empty; valuetext `0 of 5`. Name via aria-label when label hidden.</notes>
15
+ </example>
16
+
17
+ <example title="Custom icon component">
18
+ <tsx><![CDATA[
19
+ <IconMeter icon={HeartIcon} value={4} highlightColor="var(--highlight-red)" size="l" />
20
+ ]]></tsx>
21
+ <notes>`HeartIcon` must honor `fill` (and optional `size` / `className`). Not an opaque ReactNode.</notes>
22
+ </example>
23
+ </patterns>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <props surface="icon-meter">
3
+ <when_to_use>
4
+ <item>Show a discrete score or level as a row of recolorable icons (stars, hearts, custom SVG components).</item>
5
+ <item>Use when empty / half / full icon paint communicates the reading better than a continuous track or arc.</item>
6
+ <item>Accent with `highlightColor` (CSS color string, default `var(--global-primary)`); override further via `--vui-icon-meter-*` when needed.</item>
7
+ </when_to_use>
8
+ <when_not_to_use>
9
+ <item>Continuous capacity / storage / battery track — use Meter.</item>
10
+ <item>Polar dial or needle reading — use Gauge.</item>
11
+ <item>In-progress or indeterminate task completion — use LinearProgress.</item>
12
+ <item>Interactive star rating the user edits — out of scope; do not misuse IconMeter as a control.</item>
13
+ </when_not_to_use>
14
+ <prop name="value" kind="react">
15
+ <description>Current reading. Clamped to `[0, iconCount]` after `iconCount` is clamped. `0` paints all empty icons.</description>
16
+ </prop>
17
+ <prop name="iconCount" kind="react">
18
+ <description>Number of icon slots. Clamped to at least `3`. Defaults to `5`.</description>
19
+ </prop>
20
+ <prop name="icon" kind="react">
21
+ <description>Recolorable icon component instantiated once per slot with `fill` / `size` / `className`. Defaults to private ChromeStar.</description>
22
+ </prop>
23
+ <prop name="size" kind="react">
24
+ <description>Compact size step (`s` | `m` | `l`). Maps to `data-dimension` for icon size, gap, and label text size. Defaults to `m`.</description>
25
+ </prop>
26
+ <prop name="highlightColor" kind="react">
27
+ <description>CSS color string for full / half icons (`--vui-icon-meter-icon-color`). Pass any valid color or theme var (e.g. `var(--highlight-yellow)`). Defaults to `var(--global-primary)`.</description>
28
+ </prop>
29
+ <prop name="label" kind="react">
30
+ <description>Custom visible label. When omitted and not hidden, the clamped value string is shown.</description>
31
+ </prop>
32
+ <prop name="hideLabel" kind="react">
33
+ <description>Hides the visible label. Provide `aria-label` or `aria-labelledby` for the accessible name. Defaults to `false`.</description>
34
+ </prop>
35
+ <prop name="valueText" kind="react">
36
+ <description>Overrides the default AT value text (`"{value} of {iconCount}"`).</description>
37
+ </prop>
38
+ <prop name="icon-color" kind="css">
39
+ <description>Full / half accent color (`--vui-icon-meter-icon-color`). Defaults from `highlightColor` / `var(--global-primary)`.</description>
40
+ </prop>
41
+ <prop name="empty-color" kind="css">
42
+ <description>Empty / unhighlighted icon color (`--vui-icon-meter-empty-color`). Defaults to `var(--global-contrast)`.</description>
43
+ </prop>
44
+ </props>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <usage surface="icon-meter">
3
+ <do>Discrete scores and levels as icon rows: ratings display, quality tiers, guest scores — `value` + `iconCount` (min 3, default 5)</do>
4
+ <do>Pass a recolorable `icon` component when the default chrome star is wrong; meter injects `fill` per empty / half / full slot</do>
5
+ <do>Size with `s` | `m` | `l` (default `m`); accent with `highlightColor` CSS string (default `var(--global-primary)`)</do>
6
+ <do>Name the meter: visible `label` (or default numeric label), or `hideLabel` + `aria-label` / `aria-labelledby`</do>
7
+ <do>Override AT value text with `valueText` when `"{value} of {iconCount}"` is not enough</do>
8
+ <dont>Using IconMeter for continuous capacity tracks — use Meter</dont>
9
+ <dont>Using IconMeter for polar / needle dials — use Gauge</dont>
10
+ <dont>Using IconMeter for loading or task progress — use LinearProgress</dont>
11
+ <dont>Turning IconMeter into an interactive rating control (keyboard / onChange) — out of scope</dont>
12
+ <dont>Passing a finished opaque ReactNode as `icon` — pass a component the meter can recolor</dont>
13
+ </usage>
@@ -6,6 +6,7 @@
6
6
  <do>Goal cards: Surface + Stack headlines / captions around a track-only LinearProgress (`aria-label` when no `label` prop)</do>
7
7
  <do>Prefer Meter for static capacity / score within a range (storage, quota, battery) — LinearProgress for in-progress tasks</do>
8
8
  <dont>Using LinearProgress as an interactive value control — use Slider</dont>
9
+ <dont>Using LinearProgress for discrete icon-row scores — use IconMeter; for static capacity tracks use Meter</dont>
9
10
  <dont>Using LinearProgress for layout placeholders — use Skeleton; for tiny busy chrome use Spinner / Button `loading`</dont>
10
11
  <dont>Modeling invalid or disabled progress — Base UI Progress exposes neither</dont>
11
12
  <dont>Hiding the task name when multiple progress indicators share a view</dont>
@@ -5,6 +5,7 @@
5
5
  <export name="Meter" />
6
6
  </exports>
7
7
  <related>
8
+ <ref id="icon-meter" />
8
9
  <ref id="linear-progress" />
9
10
  <ref id="slider" />
10
11
  <ref id="text" />