@ui-sdk/vue 0.0.0-stage → 0.1.0-beta.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 (262) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +10 -2
  3. package/dist/accordion.d.ts +561 -0
  4. package/dist/accordion.js +24 -0
  5. package/dist/agent.d.ts +2 -0
  6. package/dist/agent.js +7 -0
  7. package/dist/alert-dialog.d.ts +231 -0
  8. package/dist/alert-dialog.js +33 -0
  9. package/dist/async-options.d.ts +18 -0
  10. package/dist/async-options.js +40 -0
  11. package/dist/autocomplete.d.ts +384 -0
  12. package/dist/autocomplete.js +344 -0
  13. package/dist/avatar.d.ts +40 -0
  14. package/dist/avatar.js +28 -0
  15. package/dist/button.d.ts +52 -0
  16. package/dist/button.js +43 -0
  17. package/dist/calendar-context.d.ts +10 -0
  18. package/dist/calendar-context.js +7 -0
  19. package/dist/calendar.d.ts +311 -0
  20. package/dist/calendar.js +349 -0
  21. package/dist/carousel.d.ts +236 -0
  22. package/dist/carousel.js +204 -0
  23. package/dist/checkbox.d.ts +211 -0
  24. package/dist/checkbox.js +151 -0
  25. package/dist/children.d.ts +41 -0
  26. package/dist/children.js +135 -0
  27. package/dist/collapsible.d.ts +54 -0
  28. package/dist/collapsible.js +18 -0
  29. package/dist/color-picker.d.ts +187 -0
  30. package/dist/color-picker.js +158 -0
  31. package/dist/color.d.ts +2 -0
  32. package/dist/color.js +21 -0
  33. package/dist/combobox.d.ts +517 -0
  34. package/dist/combobox.js +531 -0
  35. package/dist/command.d.ts +322 -0
  36. package/dist/command.js +345 -0
  37. package/dist/controller-target.d.ts +49 -0
  38. package/dist/controller-target.js +112 -0
  39. package/dist/create-parts.d.ts +126 -0
  40. package/dist/create-parts.js +206 -0
  41. package/dist/date-input.d.ts +133 -0
  42. package/dist/date-input.js +31 -0
  43. package/dist/date-picker.d.ts +328 -0
  44. package/dist/date-picker.js +354 -0
  45. package/dist/date.d.ts +2 -0
  46. package/dist/date.js +59 -0
  47. package/dist/dialog-parts.d.ts +259 -0
  48. package/dist/dialog-parts.js +300 -0
  49. package/dist/dialog.d.ts +251 -0
  50. package/dist/dialog.js +25 -0
  51. package/dist/drawer.d.ts +304 -0
  52. package/dist/drawer.js +373 -0
  53. package/dist/editor-context.d.ts +4 -0
  54. package/dist/editor-context.js +5 -0
  55. package/dist/field-context.d.ts +26 -0
  56. package/dist/field-context.js +44 -0
  57. package/dist/field.d.ts +154 -0
  58. package/dist/field.js +240 -0
  59. package/dist/file-input.d.ts +212 -0
  60. package/dist/file-input.js +255 -0
  61. package/dist/form-inputs.d.ts +16 -0
  62. package/dist/form-inputs.js +25 -0
  63. package/dist/gesture.d.ts +1 -0
  64. package/dist/gesture.js +15 -0
  65. package/dist/history.d.ts +2 -0
  66. package/dist/history.js +11 -0
  67. package/dist/hover-card.d.ts +137 -0
  68. package/dist/hover-card.js +153 -0
  69. package/dist/image-cropper.d.ts +74 -0
  70. package/dist/image-cropper.js +36 -0
  71. package/dist/image.d.ts +2 -0
  72. package/dist/image.js +5 -0
  73. package/dist/index.d.ts +59 -0
  74. package/dist/index.js +60 -0
  75. package/dist/input.d.ts +120 -0
  76. package/dist/input.js +73 -0
  77. package/dist/item-icon.d.ts +34 -0
  78. package/dist/item-icon.js +63 -0
  79. package/dist/label.d.ts +16 -0
  80. package/dist/label.js +8 -0
  81. package/dist/lifecycle.d.ts +11 -0
  82. package/dist/lifecycle.js +91 -0
  83. package/dist/list-items.d.ts +38 -0
  84. package/dist/list-items.js +59 -0
  85. package/dist/list-text.d.ts +7 -0
  86. package/dist/list-text.js +15 -0
  87. package/dist/listbox.d.ts +273 -0
  88. package/dist/listbox.js +126 -0
  89. package/dist/menu.d.ts +678 -0
  90. package/dist/menu.js +607 -0
  91. package/dist/menubar-context.d.ts +5 -0
  92. package/dist/menubar-context.js +5 -0
  93. package/dist/menubar.d.ts +61 -0
  94. package/dist/menubar.js +48 -0
  95. package/dist/meter.d.ts +41 -0
  96. package/dist/meter.js +37 -0
  97. package/dist/navigation-menu.d.ts +228 -0
  98. package/dist/navigation-menu.js +195 -0
  99. package/dist/number-input.d.ts +176 -0
  100. package/dist/number-input.js +231 -0
  101. package/dist/number.d.ts +2 -0
  102. package/dist/number.js +39 -0
  103. package/dist/nuxt/entries.json +977 -0
  104. package/dist/nuxt/module.d.ts +18 -0
  105. package/dist/nuxt/module.js +31 -0
  106. package/dist/nuxt/registrations.d.ts +22 -0
  107. package/dist/nuxt/registrations.js +22 -0
  108. package/dist/observe.d.ts +2 -0
  109. package/dist/observe.js +7 -0
  110. package/dist/otp-input.d.ts +142 -0
  111. package/dist/otp-input.js +130 -0
  112. package/dist/overlays.d.ts +40 -0
  113. package/dist/overlays.js +118 -0
  114. package/dist/pagination.d.ts +201 -0
  115. package/dist/pagination.js +146 -0
  116. package/dist/password-input.d.ts +144 -0
  117. package/dist/password-input.js +134 -0
  118. package/dist/popover.d.ts +211 -0
  119. package/dist/popover.js +258 -0
  120. package/dist/popup.d.ts +60 -0
  121. package/dist/popup.js +89 -0
  122. package/dist/preferences.d.ts +44 -0
  123. package/dist/preferences.js +102 -0
  124. package/dist/primitive.d.ts +2 -0
  125. package/dist/primitive.js +11 -0
  126. package/dist/progress.d.ts +41 -0
  127. package/dist/progress.js +37 -0
  128. package/dist/radio.d.ts +164 -0
  129. package/dist/radio.js +145 -0
  130. package/dist/rating.d.ts +149 -0
  131. package/dist/rating.js +146 -0
  132. package/dist/renderless.d.ts +4 -0
  133. package/dist/renderless.js +28 -0
  134. package/dist/resizable.d.ts +54 -0
  135. package/dist/resizable.js +22 -0
  136. package/dist/scroll-area.d.ts +72 -0
  137. package/dist/scroll-area.js +77 -0
  138. package/dist/segmented-control.d.ts +151 -0
  139. package/dist/segmented-control.js +110 -0
  140. package/dist/segmented-input.d.ts +76 -0
  141. package/dist/segmented-input.js +115 -0
  142. package/dist/select.d.ts +458 -0
  143. package/dist/select.js +468 -0
  144. package/dist/separator.d.ts +14 -0
  145. package/dist/separator.js +8 -0
  146. package/dist/shortcuts.d.ts +32 -0
  147. package/dist/shortcuts.js +56 -0
  148. package/dist/slider.d.ts +65 -0
  149. package/dist/slider.js +194 -0
  150. package/dist/switch.d.ts +103 -0
  151. package/dist/switch.js +71 -0
  152. package/dist/tabs.d.ts +338 -0
  153. package/dist/tabs.js +27 -0
  154. package/dist/text-control.d.ts +89 -0
  155. package/dist/text-control.js +51 -0
  156. package/dist/text-match.d.ts +2 -0
  157. package/dist/text-match.js +7 -0
  158. package/dist/textarea.d.ts +106 -0
  159. package/dist/textarea.js +68 -0
  160. package/dist/time-input.d.ts +131 -0
  161. package/dist/time-input.js +32 -0
  162. package/dist/timeline.d.ts +81 -0
  163. package/dist/timeline.js +30 -0
  164. package/dist/toast-parts.d.ts +203 -0
  165. package/dist/toast-parts.js +270 -0
  166. package/dist/toast.d.ts +2 -0
  167. package/dist/toast.js +21 -0
  168. package/dist/toggle-props.d.ts +22 -0
  169. package/dist/toggle-props.js +14 -0
  170. package/dist/toggle.d.ts +199 -0
  171. package/dist/toggle.js +129 -0
  172. package/dist/token-input.d.ts +136 -0
  173. package/dist/token-input.js +214 -0
  174. package/dist/toolbar-context.d.ts +7 -0
  175. package/dist/toolbar-context.js +20 -0
  176. package/dist/toolbar.d.ts +120 -0
  177. package/dist/toolbar.js +77 -0
  178. package/dist/tooltip.d.ts +160 -0
  179. package/dist/tooltip.js +224 -0
  180. package/dist/tree.d.ts +300 -0
  181. package/dist/tree.js +209 -0
  182. package/dist/trigger-menu.d.ts +452 -0
  183. package/dist/trigger-menu.js +254 -0
  184. package/dist/use-primitive.d.ts +132 -0
  185. package/dist/use-primitive.js +462 -0
  186. package/dist/waterfall.d.ts +201 -0
  187. package/dist/waterfall.js +171 -0
  188. package/docs/README.md +89 -0
  189. package/docs/agents.md +1523 -0
  190. package/docs/components/accordion.md +1369 -0
  191. package/docs/components/alert-dialog.md +799 -0
  192. package/docs/components/autocomplete.md +1857 -0
  193. package/docs/components/avatar.md +272 -0
  194. package/docs/components/button.md +435 -0
  195. package/docs/components/calendar.md +1589 -0
  196. package/docs/components/carousel.md +1171 -0
  197. package/docs/components/checkbox.md +1008 -0
  198. package/docs/components/collapsible.md +536 -0
  199. package/docs/components/color-picker.md +706 -0
  200. package/docs/components/combobox.md +3504 -0
  201. package/docs/components/command.md +1481 -0
  202. package/docs/components/date-input.md +536 -0
  203. package/docs/components/date-picker.md +1244 -0
  204. package/docs/components/dialog.md +1397 -0
  205. package/docs/components/drawer.md +1166 -0
  206. package/docs/components/field.md +538 -0
  207. package/docs/components/file-input.md +611 -0
  208. package/docs/components/hover-card.md +505 -0
  209. package/docs/components/image-cropper.md +556 -0
  210. package/docs/components/input.md +306 -0
  211. package/docs/components/label.md +203 -0
  212. package/docs/components/listbox.md +1004 -0
  213. package/docs/components/menu.md +1229 -0
  214. package/docs/components/menubar.md +443 -0
  215. package/docs/components/meter.md +315 -0
  216. package/docs/components/navigation-menu.md +1523 -0
  217. package/docs/components/number-input.md +1029 -0
  218. package/docs/components/otp-input.md +512 -0
  219. package/docs/components/pagination.md +613 -0
  220. package/docs/components/password-input.md +649 -0
  221. package/docs/components/popover.md +1448 -0
  222. package/docs/components/preferences.md +208 -0
  223. package/docs/components/progress.md +423 -0
  224. package/docs/components/radio.md +785 -0
  225. package/docs/components/rating.md +416 -0
  226. package/docs/components/resizable.md +910 -0
  227. package/docs/components/scroll-area.md +915 -0
  228. package/docs/components/segmented-control.md +435 -0
  229. package/docs/components/select.md +2015 -0
  230. package/docs/components/separator.md +229 -0
  231. package/docs/components/slider.md +1084 -0
  232. package/docs/components/switch.md +565 -0
  233. package/docs/components/tabs.md +944 -0
  234. package/docs/components/textarea.md +299 -0
  235. package/docs/components/time-input.md +224 -0
  236. package/docs/components/timeline.md +654 -0
  237. package/docs/components/toast.md +1224 -0
  238. package/docs/components/toggle.md +500 -0
  239. package/docs/components/token-input.md +953 -0
  240. package/docs/components/toolbar.md +739 -0
  241. package/docs/components/tooltip.md +818 -0
  242. package/docs/components/tree.md +1306 -0
  243. package/docs/components/trigger-menu.md +1223 -0
  244. package/docs/components/waterfall.md +717 -0
  245. package/docs/controllers.md +71 -0
  246. package/docs/core.md +8027 -0
  247. package/docs/custom-parts.md +89 -0
  248. package/docs/first-component.md +83 -0
  249. package/docs/forms.md +122 -0
  250. package/docs/installation.md +72 -0
  251. package/docs/introduction.md +32 -0
  252. package/docs/lists-and-menus.md +122 -0
  253. package/docs/llms.txt +1502 -0
  254. package/docs/parts-and-composition.md +85 -0
  255. package/docs/popups.md +108 -0
  256. package/docs/rendering.md +56 -0
  257. package/docs/server-rendering.md +180 -0
  258. package/docs/state-and-events.md +100 -0
  259. package/docs/styling-and-animation.md +148 -0
  260. package/docs/utilities/async-options.md +348 -0
  261. package/docs/utilities/shortcuts.md +159 -0
  262. package/package.json +352 -3
@@ -0,0 +1,315 @@
1
+ # Meter
2
+
3
+ Show a measurement within a known range, such as storage used or an account quota.
4
+
5
+ Use a Meter for a value within a known range, such as storage used, a battery level or an account quota. It fills a track to show the value, and screen readers announce the same value.
6
+
7
+ ```vue title="basic.vue"
8
+ <script setup lang="ts">
9
+ import {
10
+ Meter,
11
+ MeterIndicator,
12
+ MeterLabel,
13
+ MeterTrack,
14
+ MeterValue,
15
+ } from "@ui-sdk/vue/meter"
16
+ </script>
17
+
18
+ <template>
19
+ <Meter :value="68">
20
+ <MeterLabel>Storage used</MeterLabel>
21
+ <MeterValue />
22
+ <MeterTrack>
23
+ <MeterIndicator />
24
+ </MeterTrack>
25
+ </Meter>
26
+ </template>
27
+ ```
28
+
29
+ Read the storage meter. The label names it, and both the visible value and screen reader value report 68%.
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ npm install @ui-sdk/vue @ui-sdk/core
35
+ ```
36
+
37
+ ## Composition
38
+
39
+ Use the following composition to build a `Meter`:
40
+
41
+ ```text
42
+ Meter
43
+ ├── MeterLabel
44
+ ├── MeterValue
45
+ └── MeterTrack
46
+ └── MeterIndicator
47
+ ```
48
+
49
+ - `Meter` holds the value and range.
50
+ - `MeterLabel` gives it a visible name. You can use `aria-label` on the root instead.
51
+ - `MeterValue` displays the formatted value.
52
+ - `MeterTrack` gives the bar its size, and `MeterIndicator` fills it.
53
+
54
+ The value is already part of the root's accessible description. The visible value is hidden from screen readers to avoid reading it twice.
55
+
56
+ ## Usage
57
+
58
+ Import the parts and put them together:
59
+
60
+ ```vue
61
+ <script setup lang="ts">
62
+ import {
63
+ Meter,
64
+ MeterIndicator,
65
+ MeterLabel,
66
+ MeterTrack,
67
+ MeterValue,
68
+ } from "@ui-sdk/vue/meter"
69
+ </script>
70
+
71
+ <template>
72
+ <Meter :value="40">
73
+ <MeterLabel />
74
+ <MeterValue />
75
+ <MeterTrack>
76
+ <MeterIndicator />
77
+ </MeterTrack>
78
+ </Meter>
79
+ </template>
80
+ ```
81
+
82
+ ## Build Your Own
83
+
84
+ `@ui-sdk/vue/meter` comes with a ready-made Meter. If you'd like to build your own, with your own names, start from the `meter` primitive in `@ui-sdk/core`:
85
+
86
+ ```ts title="quota.ts"
87
+ import { meter } from "@ui-sdk/core/meter"
88
+ import { createParts } from "@ui-sdk/vue/primitive"
89
+
90
+ const {
91
+ Root: Quota,
92
+ Label: QuotaLabel,
93
+ Value: QuotaValue,
94
+ Track: QuotaTrack,
95
+ Indicator: QuotaFill,
96
+ } = createParts(meter, {
97
+ root: "div",
98
+ label: "span",
99
+ value: "span",
100
+ track: "div",
101
+ indicator: "div",
102
+ })
103
+
104
+ export { Quota, QuotaFill, QuotaLabel, QuotaTrack, QuotaValue }
105
+ ```
106
+
107
+ ```vue
108
+ <template>
109
+ <Quota :value="68">
110
+ <QuotaLabel>Storage</QuotaLabel>
111
+ <QuotaValue v-slot="{ state }">{{ state.text }}</QuotaValue>
112
+ <QuotaTrack>
113
+ <QuotaFill />
114
+ </QuotaTrack>
115
+ </Quota>
116
+ </template>
117
+ ```
118
+
119
+ `MeterValue` shows the formatted value when it has no slot content. A part from `createParts` renders only its default slot, so render `state.text` in it to show the same text.
120
+
121
+ Each part keeps the behavior, state and data attributes of its ready-made counterpart: the root is the `meter`, and the indicator sets its width from the value. See [Rendering](../rendering.md) and [Custom Parts](../custom-parts.md) for more.
122
+
123
+ ## Bounds
124
+
125
+ `min` and `max` set the range. They default to 0 and 100. A value outside the range is clamped for the fill, the percentage and `aria-valuenow`, but the state's `value` and a format other than percent keep it as you passed it. Here, 720 sits about 76% of the way from 300 to 850. Decimal formatting keeps the visible value as 720.
126
+
127
+ ```vue title="min-max.vue"
128
+ <script setup lang="ts">
129
+ import {
130
+ Meter,
131
+ MeterIndicator,
132
+ MeterLabel,
133
+ MeterTrack,
134
+ MeterValue,
135
+ } from "@ui-sdk/vue/meter"
136
+ </script>
137
+
138
+ <template>
139
+ <Meter :value="720" :min="300" :max="850" :format="{ style: 'decimal' }">
140
+ <MeterLabel>Credit score</MeterLabel>
141
+ <MeterValue />
142
+ <MeterTrack>
143
+ <MeterIndicator />
144
+ </MeterTrack>
145
+ </Meter>
146
+ </template>
147
+ ```
148
+
149
+ Compare the score with the filled track. The number shows 720; the fill shows its position between 300 and 850.
150
+
151
+ ## Format and Locale
152
+
153
+ Pass `Intl.NumberFormat` options to `format` for units, currency, or decimal places. A function can return custom text, such as the number of occupied seats.
154
+
155
+ ```vue title="format.vue"
156
+ <script setup lang="ts">
157
+ import {
158
+ Meter,
159
+ MeterIndicator,
160
+ MeterLabel,
161
+ MeterTrack,
162
+ MeterValue,
163
+ } from "@ui-sdk/vue/meter"
164
+
165
+ const meters = [
166
+ {
167
+ label: "Storage",
168
+ value: 120,
169
+ max: 250,
170
+ format: { style: "unit", unit: "gigabyte" },
171
+ },
172
+ {
173
+ label: "Budget",
174
+ value: 1840,
175
+ max: 2500,
176
+ format: { style: "currency", currency: "USD", maximumFractionDigits: 0 },
177
+ },
178
+ {
179
+ label: "Seats",
180
+ value: 18,
181
+ max: 25,
182
+ format: (seats: number) => `${seats} of 25 seats`,
183
+ },
184
+ { label: "Auslastung", value: 40, locale: "de-DE" },
185
+ ] satisfies {
186
+ label: string
187
+ value: number
188
+ max?: number
189
+ format?: Intl.NumberFormatOptions | ((value: number) => string)
190
+ locale?: string
191
+ }[]
192
+ </script>
193
+
194
+ <template>
195
+ <div data-slot="stack">
196
+ <Meter v-for="{ label, ...options } in meters" :key="label" v-bind="options">
197
+ <MeterLabel>{{ label }}</MeterLabel>
198
+ <MeterValue />
199
+ <MeterTrack>
200
+ <MeterIndicator />
201
+ </MeterTrack>
202
+ </Meter>
203
+ </div>
204
+ </template>
205
+ ```
206
+
207
+ Compare the readings. Each meter formats its own value as a unit, currency, custom text, or localized percentage.
208
+
209
+ A percent format reports the value's position between `min` and `max`. Other formats use the value itself.
210
+
211
+ `locale` controls digits and separators. If you omit it, the component reads the page's language after it mounts, with the browser's language as a fallback. The initial server and client render use English.
212
+
213
+ Set `dir="rtl"` on the surrounding content to fill the track from the right.
214
+
215
+ ## Value Label
216
+
217
+ Use `get-value-label` when a screen reader needs more context than the visible number. It receives the value and details containing `formatted`, `percent`, `min`, and `max`.
218
+
219
+ ```vue title="value-label.vue"
220
+ <script setup lang="ts">
221
+ import {
222
+ Meter,
223
+ MeterIndicator,
224
+ MeterLabel,
225
+ MeterTrack,
226
+ MeterValue,
227
+ } from "@ui-sdk/vue/meter"
228
+ </script>
229
+
230
+ <template>
231
+ <Meter
232
+ :value="750"
233
+ :max="1000"
234
+ :get-value-label="
235
+ (value, details) =>
236
+ `${value} of ${details.max} requests, ${details.formatted}`
237
+ "
238
+ >
239
+ <MeterLabel>API requests</MeterLabel>
240
+ <MeterValue>750 / 1,000</MeterValue>
241
+ <MeterTrack>
242
+ <MeterIndicator />
243
+ </MeterTrack>
244
+ </Meter>
245
+ </template>
246
+ ```
247
+
248
+ Read API requests with a screen reader. It announces 750 of 1000 requests and 75%, while the visible value stays compact.
249
+
250
+ ## Changing the Value
251
+
252
+ Pass a new `value` when your reading changes. Meter follows your state and has no `@value-change` event.
253
+
254
+ Use [Progress](./progress.md) for a task that is working toward completion, such as an upload.
255
+
256
+ ## Custom Rendering
257
+
258
+ See [Parts and Composition](../parts-and-composition.md) for changing a part's element or reading its state. Use `format` for text that should be shared by the visible value and screen readers.
259
+
260
+ ## Styling
261
+
262
+ Give the track a height, background, and width. The indicator sets its width as an inline percentage of the track. Both styling options are shown in each example's Code tab.
263
+
264
+ Each part has a `data-slot`, such as `meter-indicator`, and no state attributes: the reading is in `--meter-value` and the indicator's width.
265
+
266
+ ### Meter
267
+ The root exposes a CSS variable for positioning other content alongside the reading.
268
+
269
+ - `--meter-value`: Where the value sits between `min` and `max`, as a percentage, like 40%.
270
+
271
+ ## API Reference
272
+
273
+ Props are the same as below.
274
+
275
+ ### Meter
276
+
277
+ - `min?` (`number`): The lowest value.
278
+ - `max?` (`number`): The highest value.
279
+ - `format?` (`NumberFormat`): How the value reads, for screen readers and the Value part: `Intl.NumberFormat` options, or a function of the value. A percent style shows where the value sits between `min` and `max`; any other style shows the value itself, like `{ style: "unit", unit: "gigabyte" }`.
280
+ - `locale?` (`string`): The locale the value is formatted in. Defaults to the page's `lang`, or the browser's language without one, once the page is interactive. Server markup uses English until then, so it never disagrees with the client.
281
+ - `getValueLabel?` (`((value: number, details: GaugeLabelDetails<number>) => string)`): The text screen readers announce for the value, when the formatted value says too little, like "3 of 12 files". It receives the value, null while a progress bar is indeterminate, and details: the `formatted` value, its `percent`, `min` and `max`.
282
+ - `value` (`number`): The reading, between `min` and `max`. Outside them, the fill, the percentage and `aria-valuenow` are clamped, while the state keeps the value as given. A meter always has a value, since there's no busy state.
283
+ - `debug?` (`boolean`): Logs every state change with its reason to the console, in development builds.
284
+
285
+ ### State
286
+
287
+ What render functions, state-based class names and slots receive. Every part gets the same state.
288
+
289
+ - `value` (`number`): The value, as given.
290
+ - `percent` (`number`): Where the value sits between `min` and `max`, from 0 to 100.
291
+
292
+ `MeterValue` adds the formatted text:
293
+
294
+ - `value` (`number`): The value, as given.
295
+ - `percent` (`number`): Where the value sits between `min` and `max`, from 0 to 100.
296
+ - `text` (`string`): The formatted value, like "40%".
297
+
298
+ ## Accessibility
299
+
300
+ Name the component with `MeterLabel` or `aria-label`. It exposes the range and formatted value through the `meter` role. Use `get-value-label` when that value needs more explanation.
301
+
302
+ ### Tested Behavior
303
+
304
+ Every line below is an automated test.
305
+
306
+ - A meter is named by its label and reads its value.
307
+ - The value part shows the formatted value.
308
+ - The indicator is as wide as the value.
309
+ - A new value updates the meter.
310
+ - Min and max set where the value sits.
311
+ - A unit format reads the value itself.
312
+ - A value label replaces the formatted value for screen readers.
313
+ - A value above the maximum reads as the maximum and fills the track.
314
+
315
+ Runs in React, Vue and web components.