@voidable/ui 0.10.0 → 0.11.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 (102) hide show
  1. package/dist/base.d.ts +6 -0
  2. package/dist/base.js +2 -2
  3. package/dist/chunks/{base-BxmMM3B7.js → base-BGrS4eIl.js} +9 -0
  4. package/dist/chunks/data-BpiiNapL.js +95 -0
  5. package/dist/chunks/{modal-CgGp_fCs.js → modal-DWGkNdNG.js} +2 -2
  6. package/dist/chunks/{overlay-hLJ7IQHx.js → overlay-CH7L4N-h.js} +1 -1
  7. package/dist/chunks/{projection-SnR79EHI.js → projection-oPe6ipjL.js} +1 -1
  8. package/dist/components/accordion.js +1 -1
  9. package/dist/components/action-input.js +2 -2
  10. package/dist/components/alert.d.ts +11 -0
  11. package/dist/components/alert.js +10 -3
  12. package/dist/components/avatar.js +2 -2
  13. package/dist/components/badge.d.ts +8 -2
  14. package/dist/components/badge.js +1 -4
  15. package/dist/components/banner.d.ts +9 -0
  16. package/dist/components/banner.js +10 -3
  17. package/dist/components/bar-chart.d.ts +21 -7
  18. package/dist/components/bar-chart.js +65 -43
  19. package/dist/components/breadcrumbs.js +1 -1
  20. package/dist/components/button.js +1 -1
  21. package/dist/components/calendar.d.ts +40 -2
  22. package/dist/components/calendar.js +110 -21
  23. package/dist/components/card.js +1 -1
  24. package/dist/components/carousel.js +3 -3
  25. package/dist/components/charts/data.d.ts +72 -0
  26. package/dist/components/checkbox-group.js +2 -2
  27. package/dist/components/checkbox.js +2 -2
  28. package/dist/components/collapsible.js +1 -1
  29. package/dist/components/color-picker.js +2 -2
  30. package/dist/components/combobox.js +3 -3
  31. package/dist/components/compose-input.js +2 -2
  32. package/dist/components/dialog.js +1 -1
  33. package/dist/components/divider.js +2 -2
  34. package/dist/components/donut-chart.d.ts +22 -6
  35. package/dist/components/donut-chart.js +95 -69
  36. package/dist/components/drawer.js +1 -1
  37. package/dist/components/dropdown-menu.js +2 -2
  38. package/dist/components/editable.js +2 -2
  39. package/dist/components/error-fallback.js +1 -1
  40. package/dist/components/field.js +2 -2
  41. package/dist/components/file-upload.d.ts +20 -5
  42. package/dist/components/file-upload.js +51 -21
  43. package/dist/components/gauge.d.ts +32 -8
  44. package/dist/components/gauge.js +202 -130
  45. package/dist/components/hamburger.d.ts +12 -1
  46. package/dist/components/hamburger.js +24 -13
  47. package/dist/components/hover-card.js +2 -2
  48. package/dist/components/indicator.js +2 -2
  49. package/dist/components/input.js +2 -2
  50. package/dist/components/line-chart.d.ts +22 -7
  51. package/dist/components/line-chart.js +76 -54
  52. package/dist/components/list.js +1 -1
  53. package/dist/components/menu.js +1 -1
  54. package/dist/components/multiselect.js +3 -3
  55. package/dist/components/nav-bar.d.ts +9 -0
  56. package/dist/components/nav-bar.js +16 -3
  57. package/dist/components/nav-menu.js +1 -1
  58. package/dist/components/number-input.js +2 -2
  59. package/dist/components/pagination.js +2 -2
  60. package/dist/components/panel.js +1 -1
  61. package/dist/components/pin-input.js +2 -2
  62. package/dist/components/popover.js +2 -2
  63. package/dist/components/progress.js +2 -2
  64. package/dist/components/radio-group.js +2 -2
  65. package/dist/components/radio.js +2 -2
  66. package/dist/components/scroll-area.js +2 -2
  67. package/dist/components/segmented-control.js +1 -1
  68. package/dist/components/select.js +2 -2
  69. package/dist/components/sidebar.js +1 -1
  70. package/dist/components/skeleton.js +1 -1
  71. package/dist/components/slider.js +2 -2
  72. package/dist/components/spinner.js +2 -2
  73. package/dist/components/stat.d.ts +13 -1
  74. package/dist/components/stat.js +28 -20
  75. package/dist/components/status-dot.js +1 -1
  76. package/dist/components/stepper.js +2 -2
  77. package/dist/components/switch.js +2 -2
  78. package/dist/components/table.d.ts +4 -0
  79. package/dist/components/table.js +42 -29
  80. package/dist/components/tabs.js +1 -1
  81. package/dist/components/tag.js +2 -2
  82. package/dist/components/tags-input.js +2 -2
  83. package/dist/components/textarea.js +2 -2
  84. package/dist/components/toast.js +1 -1
  85. package/dist/components/toggle-group.js +1 -1
  86. package/dist/components/toggle.js +1 -1
  87. package/dist/components/tooltip.js +2 -2
  88. package/dist/components.json +15 -13
  89. package/dist/custom-elements.json +272 -70
  90. package/dist/dev/types.d.ts +3 -1
  91. package/dist/dev.js +54 -9
  92. package/dist/index.js +1 -1
  93. package/dist/llms.txt +1 -1
  94. package/dist/reference.md +81 -56
  95. package/dist/types/elements.d.ts +13 -13
  96. package/dist/types/react.d.ts +2 -2
  97. package/dist/types/solid.d.ts +2 -2
  98. package/dist/types/svelte.d.ts +2 -2
  99. package/dist/types/vue.d.ts +2 -2
  100. package/dist/vscode.html-custom-data.json +95 -21
  101. package/dist/web-types.json +173 -44
  102. package/package.json +1 -1
@@ -97,7 +97,9 @@ export type WarningKind = 'unknown-attribute' | 'invalid-value' | 'boolean-false
97
97
  /** The element needs an accessible name and nothing gives it one. */
98
98
  | 'missing-name'
99
99
  /** A page script keeps removing an attribute a component manages on itself; the component stopped restoring it. */
100
- | 'attribute-fight';
100
+ | 'attribute-fight'
101
+ /** A chart's `data` or `zones` attribute is not valid JSON of the expected shape; the chart draws nothing. */
102
+ | 'invalid-data';
101
103
  /** One reported problem. */
102
104
  export interface DevWarning {
103
105
  kind: WarningKind;
package/dist/dev.js CHANGED
@@ -653,7 +653,9 @@ var k = {
653
653
  "wireframe"
654
654
  ],
655
655
  "aria-label": 0,
656
- stagger: 2
656
+ "show-table": 1,
657
+ stagger: 2,
658
+ data: 0
657
659
  },
658
660
  e: [],
659
661
  l: {
@@ -865,6 +867,14 @@ var k = {
865
867
  controls: "write <void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous> and <void-carousel-next aria-label=\"Next slide\"></void-carousel-next> after the content; leave them out for no arrows",
866
868
  indicators: "write an empty <void-carousel-indicators></void-carousel-indicators> after the content; leave it out for no dots"
867
869
  },
870
+ n: {
871
+ a: [
872
+ "aria-label",
873
+ "aria-labelledby",
874
+ "title"
875
+ ],
876
+ h: "say what it shows: aria-label=\"Product photos\""
877
+ },
868
878
  l: { a: {
869
879
  controls: { fix: "write <void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous> and <void-carousel-next aria-label=\"Next slide\"></void-carousel-next> after the content; leave them out for no arrows" },
870
880
  indicators: { fix: "write an empty <void-carousel-indicators></void-carousel-indicators> after the content; leave it out for no dots" },
@@ -872,7 +882,7 @@ var k = {
872
882
  } },
873
883
  q: {
874
884
  k: "parts",
875
- s: "<void-carousel><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous><void-carousel-next aria-label=\"Next slide\"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>",
885
+ s: "<void-carousel aria-label=\"Slides\"><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous><void-carousel-next aria-label=\"Next slide\"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>",
876
886
  n: [
877
887
  {
878
888
  t: "void-carousel-content",
@@ -904,7 +914,7 @@ var k = {
904
914
  c: 1,
905
915
  q: {
906
916
  k: "parts",
907
- s: "<void-carousel><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous><void-carousel-next aria-label=\"Next slide\"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>",
917
+ s: "<void-carousel aria-label=\"Slides\"><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label=\"Previous slide\"></void-carousel-previous><void-carousel-next aria-label=\"Next slide\"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>",
908
918
  n: [{
909
919
  t: "void-carousel-item",
910
920
  r: 1
@@ -1196,6 +1206,7 @@ var k = {
1196
1206
  "notice",
1197
1207
  "highlight"
1198
1208
  ],
1209
+ error: 0,
1199
1210
  required: 1,
1200
1211
  name: 0
1201
1212
  },
@@ -1323,7 +1334,9 @@ var k = {
1323
1334
  ],
1324
1335
  "show-value": 1,
1325
1336
  "show-total": 1,
1326
- "aria-label": 0
1337
+ "aria-label": 0,
1338
+ "show-table": 1,
1339
+ data: 0
1327
1340
  },
1328
1341
  e: [],
1329
1342
  l: { a: { "show-values": { to: "show-value" } } }
@@ -1626,7 +1639,7 @@ var k = {
1626
1639
  required: 1,
1627
1640
  name: 0
1628
1641
  },
1629
- e: ["void-change"],
1642
+ e: ["void-change", "void-reject"],
1630
1643
  h: ["dragging"],
1631
1644
  n: {
1632
1645
  a: [
@@ -1665,7 +1678,10 @@ var k = {
1665
1678
  "hide-tick-max": 1,
1666
1679
  "segments-sort": ["value", "manual"],
1667
1680
  gaps: 0,
1668
- "aria-label": 0
1681
+ "aria-label": 0,
1682
+ "show-table": 1,
1683
+ zones: 0,
1684
+ data: 0
1669
1685
  },
1670
1686
  e: [],
1671
1687
  l: { a: {
@@ -1703,6 +1719,14 @@ var k = {
1703
1719
  ]
1704
1720
  },
1705
1721
  e: ["void-close", "void-open"],
1722
+ n: {
1723
+ a: [
1724
+ "aria-label",
1725
+ "aria-labelledby",
1726
+ "title"
1727
+ ],
1728
+ h: "say what it opens: aria-label=\"Main navigation\""
1729
+ },
1706
1730
  l: {
1707
1731
  a: { active: { to: "open" } },
1708
1732
  e: { "void-toggle": "listen for void-open and void-close on the element itself (they do not bubble; detail.reason says why)" }
@@ -1894,7 +1918,9 @@ var k = {
1894
1918
  "wireframe"
1895
1919
  ],
1896
1920
  interpolation: ["linear", "step"],
1897
- "aria-label": 0
1921
+ "aria-label": 0,
1922
+ "show-table": 1,
1923
+ data: 0
1898
1924
  },
1899
1925
  e: [],
1900
1926
  l: { a: { "show-values": { to: "show-value" } } }
@@ -2261,6 +2287,15 @@ var k = {
2261
2287
  ] },
2262
2288
  e: [],
2263
2289
  x: { label: "write <void-panel-header><void-panel-title>...</void-panel-title></void-panel-header> as the first child; the title names the panel" },
2290
+ n: {
2291
+ a: [
2292
+ "aria-label",
2293
+ "aria-labelledby",
2294
+ "title"
2295
+ ],
2296
+ h: "write its title as <void-panel-header><void-panel-title>, or give it an aria-label",
2297
+ t: ["void-panel-title"]
2298
+ },
2264
2299
  l: { a: { label: { fix: "write <void-panel-header><void-panel-title>...</void-panel-title></void-panel-header> as the first child; the title names the panel" } } },
2265
2300
  q: {
2266
2301
  k: "parts",
@@ -2454,7 +2489,7 @@ var k = {
2454
2489
  "aria-labelledby",
2455
2490
  "title"
2456
2491
  ],
2457
- h: "wrap it in <void-field label=\"...\"> or give it aria-label",
2492
+ h: "say what is progressing: aria-label=\"Uploading photo\"",
2458
2493
  p: [["void-field", "label"], ["label"]]
2459
2494
  }
2460
2495
  },
@@ -2792,7 +2827,17 @@ var k = {
2792
2827
  "data-overflowing",
2793
2828
  "data-stack-select",
2794
2829
  "data-stack-title"
2795
- ]
2830
+ ],
2831
+ n: {
2832
+ a: [
2833
+ "aria-label",
2834
+ "aria-labelledby",
2835
+ "title",
2836
+ "label"
2837
+ ],
2838
+ h: "write a <caption> in the table, or give the void-table an aria-label",
2839
+ t: ["caption"]
2840
+ }
2796
2841
  },
2797
2842
  "void-tabs": {
2798
2843
  m: "tabs",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunks/base-BxmMM3B7.js";
1
+ import { t as e } from "./chunks/base-BGrS4eIl.js";
2
2
  import { VoidBadge as t } from "./components/badge.js";
3
3
  import { VoidButton as n } from "./components/button.js";
4
4
  import { VoidDivider as r } from "./components/divider.js";
package/dist/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Voidable UI (@voidable/ui 0.10.0)
1
+ # Voidable UI (@voidable/ui 0.11.0)
2
2
 
3
3
  > Lit 3 web components in the light DOM, `<void-*>` tags with no visual CSS of their own: `@voidable/theme` supplies every look through `--void-*` custom properties. They work in plain HTML, React, Vue, Svelte, Solid, Angular, Rails/Hotwire, Phoenix LiveView and Laravel/Livewire.
4
4
 
package/dist/reference.md CHANGED
@@ -1,4 +1,4 @@
1
- # @voidable/ui 0.10.0: element reference
1
+ # @voidable/ui 0.11.0: element reference
2
2
 
3
3
  Generated from the package's Custom Elements Manifest. 164 elements (78 registered by JavaScript, 86 CSS-only parts and patterns). Each section gives the parts, attributes with their allowed values, events with their `detail`, where the element may sit and a correct example. Start at `llms.txt` for the rules that apply to all of them.
4
4
 
@@ -202,6 +202,9 @@ Example:
202
202
 
203
203
  Inline contextual message for form validation feedback, permission warnings, and system status notices.
204
204
 
205
+ Its role follows the colour: `error` and `warning` are `role="alert"` (announced at once, interrupting), every
206
+ other colour is `role="status"` (announced politely). A role you write on it is kept.
207
+
205
208
  Its text is written as parts: an optional `<void-alert-title>`, the `<void-alert-description>` and an optional
206
209
  `<void-alert-close>`. The parts are never moved. The close part wraps the one control the author writes (a
207
210
  `<button type="button" aria-label="Dismiss">`); pressing it fires `void-close` and, unless that is cancelled, removes the alert (focus inside
@@ -315,6 +318,11 @@ Example:
315
318
 
316
319
  Small status chip for issue trackers, tag systems, and categorization UIs where color conveys state at a glance.
317
320
 
321
+ A badge has no role: it is text beside other text, and a screen reader reads it where it sits. It is not
322
+ a live region, because a table of status badges would announce every one as it is inserted. For the one
323
+ badge whose change must be heard (a count that updates while the user works), write `role="status"` on it
324
+ yourself; the component leaves it alone.
325
+
318
326
  | Attribute | Values | Default | Description |
319
327
  |---|---|---|---|
320
328
  | `color` | `default\|error\|warning\|caution\|success\|info\|notice\|highlight` | `default` | Status colour: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`. Colour carries the state, so also say the state in the badge text. |
@@ -331,6 +339,11 @@ Example:
331
339
 
332
340
  Full-width site-level announcement for maintenance windows, cookie consent, and promotional messaging.
333
341
 
342
+ It never has the `banner` role: that is the page header landmark (at most one per page, never inside
343
+ `<main>`), which an announcement is not. Like the alert it carries an announcement, so its role follows its
344
+ `color`: `alert` for `error` and `warning`, `status` for the rest. To make it a landmark users can jump to,
345
+ write `role="region"` and an `aria-label`; the component leaves a role you write alone.
346
+
334
347
  Its text is written as parts: an optional `<void-banner-title>`, the `<void-banner-description>`, an optional
335
348
  `<void-banner-actions>` (buttons or links) and an optional `<void-banner-close>`. The parts are never moved. The
336
349
  close part wraps the one control the author writes (a `<void-button aria-label="Dismiss">`); pressing it fires
@@ -440,27 +453,25 @@ Example:
440
453
  ## `<void-bar-chart>`
441
454
 
442
455
  Bar chart for comparing categories and series, drawn in SVG with animated bars. Give it `data`
443
- (`{ series: [{ name, values }], labels }`) from script; it has no children. The chart is an image to
444
- assistive technology, so set `aria-label` and state the key figures in the surrounding text.
456
+ (`{ series: [{ name, values }], labels }`) as the `data` property or as JSON in the `data` attribute, so
457
+ server-rendered markup draws it with no script; it has no children. The drawing is hidden from assistive
458
+ technology and a visually hidden data table (captioned with `aria-label`) carries the values instead; add
459
+ `show-table` to show the table below the chart too.
445
460
 
446
461
  | Attribute | Values | Default | Description |
447
462
  |---|---|---|---|
448
463
  | `height` | `number` | `220` | Height of the chart in pixels. Defaults to 220. The width fills the container. |
449
464
  | `show-value` | `boolean` | `false` | Print each bar's value above it (below it for a negative value), abbreviated above 1000 (`1.2k`). |
450
465
  | `variant` | `filled\|outline\|wireframe` | `filled` | How bars are drawn: `filled` (default, solid), `outline` (tinted fill with a border) or `wireframe` (border only). |
451
- | `aria-label` | `string` | | Accessible name of the chart, such as `Revenue by quarter`. The chart is an image to assistive technology, so set it and put the key figures in the text around it. |
466
+ | `aria-label` | `string` | | Accessible name of the chart, such as `Revenue by quarter`; it is also the caption of the data table. Set it: the drawing itself is hidden from assistive technology. |
467
+ | `show-table` | `boolean` | `false` | Show the data table (one row per category, one column per series) below the chart. The table is always there for assistive technology; this makes it visible too. |
452
468
  | `stagger` | `number \| null` | | Delay in milliseconds between the bars as they animate in, one after another. Without it the theme's `--void-stagger-chart-bars` applies; `stagger="0"` animates them together. |
453
-
454
- Properties with no attribute (set in JavaScript):
455
-
456
- | Property | Type | Description |
457
- |---|---|---|
458
- | `data` | `BarChartData` | The chart's data: `{ series: [{ name, values, color?, colors? }], labels? }`. `values` are aligned with `labels` (the category names along the axis); `color` colours a whole series and `colors` overrides single bars. Negative values are bars below a zero baseline: the value axis then spans the lowest value as well, and a baseline is drawn at zero. Property only: assign a new object to update the chart and animate to it. |
469
+ | `data` | `BarChartData` | `{ series: [] }` | The chart's data: `{ series: [{ name, values, color?, colors? }], labels? }`. `values` are aligned with `labels` (the category names along the axis); `color` colours a whole series and `colors` overrides single bars. Negative values are bars below a zero baseline: the value axis then spans the lowest value as well, and a baseline is drawn at zero. Give it as a property (assign a new object to update the chart and animate to it) or as JSON in the `data` attribute: `<void-bar-chart data='{"series":[{"name":"Sales","values":[3,5]}],"labels":["Mon","Tue"]}'>`. Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the attribute (the data can be large), and an attribute a server morph leaves unchanged does not animate again. |
459
470
 
460
471
  Example:
461
472
 
462
473
  ```html
463
- <void-bar-chart aria-label="Revenue by quarter" height="240" show-value></void-bar-chart>
474
+ <void-bar-chart aria-label="Revenue by quarter" height="240" show-value data='{"labels":["Q1","Q2","Q3","Q4"],"series":[{"name":"2025","values":[120,180,150,210]},{"name":"2026","values":[150,220,190,260]}]}'></void-bar-chart>
464
475
  ```
465
476
 
466
477
  ## `<void-brand>`
@@ -787,7 +798,7 @@ Parts (only these parts as children, in this order):
787
798
  | `<void-carousel-next>` | one | Arrow button to the next slide. Empty, it shows the theme arrow; give it an aria-label. |
788
799
  | `<void-carousel-indicators>` | one, CSS-only | Leave it empty: the carousel fills it with one dot button per slide. |
789
800
 
790
- Markup: `<void-carousel><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label="Previous slide"></void-carousel-previous><void-carousel-next aria-label="Next slide"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>`
801
+ Markup: `<void-carousel aria-label="Slides"><void-carousel-content><void-carousel-item>One</void-carousel-item><void-carousel-item>Two</void-carousel-item></void-carousel-content><void-carousel-previous aria-label="Previous slide"></void-carousel-previous><void-carousel-next aria-label="Next slide"></void-carousel-next><void-carousel-indicators></void-carousel-indicators></void-carousel>`
791
802
 
792
803
  | Attribute | Values | Default | Description |
793
804
  |---|---|---|---|
@@ -810,7 +821,7 @@ Attributes that do not exist (and what to write instead):
810
821
  Example:
811
822
 
812
823
  ```html
813
- <void-carousel loop>
824
+ <void-carousel loop aria-label="Getting started steps">
814
825
  <void-carousel-content>
815
826
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
816
827
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -839,7 +850,7 @@ Allowed inside: `<void-carousel>`.
839
850
  Example:
840
851
 
841
852
  ```html
842
- <void-carousel loop>
853
+ <void-carousel loop aria-label="Getting started steps">
843
854
  <void-carousel-content>
844
855
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
845
856
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -862,7 +873,7 @@ Allowed inside: `<void-carousel>`.
862
873
  Example:
863
874
 
864
875
  ```html
865
- <void-carousel loop>
876
+ <void-carousel loop aria-label="Getting started steps">
866
877
  <void-carousel-content>
867
878
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
868
879
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -882,14 +893,14 @@ CSS-only part of `<void-carousel-content>`: `@voidable/theme` styles it and noth
882
893
 
883
894
  | Attribute | Values | Default | Description |
884
895
  |---|---|---|---|
885
- | `active` | `boolean` | | Set by <void-carousel> on the slide being shown. |
896
+ | `active` | `boolean` | | Set by the carousel on the slide being shown. |
886
897
 
887
898
  Allowed inside: `<void-carousel-content>`.
888
899
 
889
900
  Example:
890
901
 
891
902
  ```html
892
- <void-carousel loop>
903
+ <void-carousel loop aria-label="Getting started steps">
893
904
  <void-carousel-content>
894
905
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
895
906
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -912,7 +923,7 @@ Allowed inside: `<void-carousel>`.
912
923
  Example:
913
924
 
914
925
  ```html
915
- <void-carousel>
926
+ <void-carousel aria-label="Getting started steps">
916
927
  <void-carousel-content>
917
928
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
918
929
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -933,7 +944,7 @@ Allowed inside: `<void-carousel>`.
933
944
  Example:
934
945
 
935
946
  ```html
936
- <void-carousel>
947
+ <void-carousel aria-label="Getting started steps">
937
948
  <void-carousel-content>
938
949
  <void-carousel-item>Step 1: Create a project</void-carousel-item>
939
950
  <void-carousel-item>Step 2: Invite your team</void-carousel-item>
@@ -1238,6 +1249,12 @@ in the field (ArrowDown then moves into the calendar); the calendar button, Ente
1238
1249
  field open it with focus on the selected (or current) day. Choosing a day, Escape, or a press outside closes
1239
1250
  it and focus returns to the input.
1240
1251
 
1252
+ The field also takes a typed date, in `format` or as ISO `YYYY-MM-DD`: it is read when the field loses focus
1253
+ and on Enter, the calendar follows, and `void-change` fires once with the ISO value. A date that is not a date,
1254
+ or is before `min` or after `max`, is refused: the text stays for correction, `error` explains it, the field
1255
+ is `aria-invalid` and described by the message, and the form is not submitted (`badInput`, `rangeUnderflow` or
1256
+ `rangeOverflow`). An empty field clears the value.
1257
+
1241
1258
  | Attribute | Values | Default | Description |
1242
1259
  |---|---|---|---|
1243
1260
  | `value` | `string` | | Selected date as an ISO `YYYY-MM-DD` string, whatever `format` shows. It is what the form submits and the reset target. |
@@ -1249,16 +1266,17 @@ it and focus returns to the input.
1249
1266
  | `first-day` | `number` | `0` | Day the calendar week starts on, as a number from 0 (Sunday, the default) to 6 (Saturday). |
1250
1267
  | `open` | `boolean` | `false` | Whether the calendar dropdown is showing. Clicking the field or button toggles it; Escape closes it. |
1251
1268
  | `placeholder` | `string` | `Select date` | Hint shown in the field while no date is chosen. Defaults to `Select date`. |
1252
- | `format` | `string` | `MM/DD/YYYY` | How the chosen date is written in the field, using `YYYY`, `MM` and `DD`. Defaults to `MM/DD/YYYY`. Display only; the value stays `YYYY-MM-DD`. |
1269
+ | `format` | `string` | `MM/DD/YYYY` | How the date is written in the field, using `YYYY`, `MM` and `DD`. Defaults to `MM/DD/YYYY`. A date typed into the field is read the same way (and as ISO `YYYY-MM-DD` always); the value stays `YYYY-MM-DD`. |
1253
1270
  | `color` | `default\|error\|warning\|caution\|success\|info\|notice\|highlight` | `default` | Status colour of the field: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`. |
1271
+ | `error` | `string` | | Mark the field invalid: it gets the error styling and `aria-invalid`. Set it for a server-side message; the field also sets it itself, with the reason, when a typed date is not taken, and clears what it set once a valid date is typed or picked. A message you set is left alone. |
1254
1272
  | `required` | `boolean` | `false` | The control must have a value before its form can be submitted. An empty control is invalid (`valueMissing`) and the browser reports it, as for a native field. |
1255
1273
  | `name` | `string` | | Key the control's value is submitted under in the form's `FormData`. Without a name the control submits nothing. |
1256
1274
 
1257
1275
  | Event | `detail` | Description |
1258
1276
  |---|---|---|
1277
+ | `void-change` | `{ value: string; date: Date \| null }` | |
1259
1278
  | `void-open` | `{ reason: 'trigger' \| 'focus' \| 'keyboard' \| 'api' }` | The calendar popup opened: `trigger` from the calendar button, `focus` from a click on the field, `keyboard` from a key. |
1260
1279
  | `void-close` | `{ reason: 'trigger' \| 'select' \| 'escape' \| 'outside' \| 'blur' \| 'parent' \| 'api' }` | The calendar popup is closing. Cancelable when the user caused it. |
1261
- | `void-change` | `{ value: string; date: Date }` | |
1262
1280
 
1263
1281
  Example:
1264
1282
 
@@ -1462,8 +1480,10 @@ Example:
1462
1480
  ## `<void-donut-chart>`
1463
1481
 
1464
1482
  Donut chart for part-to-whole breakdowns, drawn in SVG with animated segments and an optional total in the
1465
- centre. Give it `data` (`{ segments: [{ name, value }] }`) from script; it has no children. The chart is an
1466
- image to assistive technology, so set `aria-label` and state the key figures in the surrounding text.
1483
+ centre. Give it `data` (`{ segments: [{ name, value }] }`) as the `data` property or as JSON in the `data`
1484
+ attribute, so server-rendered markup draws it with no script; it has no children. The drawing is hidden
1485
+ from assistive technology and a visually hidden data table (captioned with `aria-label`) carries the
1486
+ values instead; add `show-table` to show the table below the chart too.
1467
1487
 
1468
1488
  | Attribute | Values | Default | Description |
1469
1489
  |---|---|---|---|
@@ -1473,18 +1493,14 @@ image to assistive technology, so set `aria-label` and state the key figures in
1473
1493
  | `variant` | `filled\|outline\|wireframe` | `filled` | How segments are drawn: `filled` (default), `outline` (tinted with a border) or `wireframe` (border only). |
1474
1494
  | `show-value` | `boolean` | `false` | Print each segment's value on its arc, abbreviated above 1000 (`1.2k`). |
1475
1495
  | `show-total` | `boolean` | `false` | Print the sum of the segments in the centre of the ring. |
1476
- | `aria-label` | `string` | | Accessible name of the chart, such as `Traffic by source`. The chart is an image to assistive technology, so set it and put the key figures in the text around it. |
1477
-
1478
- Properties with no attribute (set in JavaScript):
1479
-
1480
- | Property | Type | Description |
1481
- |---|---|---|
1482
- | `data` | `DonutChartData` | The chart's data: `{ segments: [{ name, value, color? }] }`. Each segment's share of the ring is its `value` over the sum of all values. Property only: assign a new object to update the chart and animate to it. |
1496
+ | `aria-label` | `string` | | Accessible name of the chart, such as `Traffic by source`; it is also the caption of the data table. Set it: the drawing itself is hidden from assistive technology. |
1497
+ | `show-table` | `boolean` | `false` | Show the data table (one row per segment: name, value and share) below the chart. The table is always there for assistive technology; this makes it visible too. |
1498
+ | `data` | `DonutChartData` | `{ segments: [] }` | The chart's data: `{ segments: [{ name, value, color? }] }`. Each segment's share of the ring is its `value` over the sum of all values. Give it as a property (assign a new object to update the chart and animate to it) or as JSON in the `data` attribute: `<void-donut-chart data='{"segments":[{"name":"Search","value":40},{"name":"Direct","value":25}]}'>`. Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the attribute (the data can be large), and an attribute a server morph leaves unchanged does not animate again. |
1483
1499
 
1484
1500
  Example:
1485
1501
 
1486
1502
  ```html
1487
- <void-donut-chart aria-label="Traffic by source" show-total show-value></void-donut-chart>
1503
+ <void-donut-chart aria-label="Traffic by source" show-total show-value data='{"segments":[{"name":"Search","value":540},{"name":"Direct","value":320},{"name":"Referral","value":180}]}'></void-donut-chart>
1488
1504
  ```
1489
1505
 
1490
1506
  ## `<void-drawer>`
@@ -2023,16 +2039,17 @@ Drag-and-drop file picker for document uploads, image attachment flows, and impo
2023
2039
 
2024
2040
  | Attribute | Values | Default | Description |
2025
2041
  |---|---|---|---|
2026
- | `accept` | `string` | | Comma-separated file types the zone takes, as on a native file input: extensions (`.pdf`), MIME types (`image/png`) or wildcards (`image/*`). Other files are dropped without an error. |
2042
+ | `accept` | `string` | | Comma-separated file types the zone takes, as on a native file input: extensions (`.pdf`), MIME types (`image/png`) or wildcards (`image/*`). Other files are not taken: `void-reject` fires with reason `type` and the zone shows an error. |
2027
2043
  | `multiple` | `boolean` | `false` | Allow more than one file. Without it a new choice replaces the old one. |
2028
2044
  | `disabled` | `boolean` | `false` | Stop the zone reacting and exclude the files from the form submission. |
2029
- | `max-size` | `number` | `0` | Largest allowed file in bytes. 0 (the default) means no limit. Larger files are dropped silently. |
2030
- | `error` | `string` | | Message shown under the zone, such as a server-side upload failure. It does not set `aria-invalid`; the component never produces an error text itself. |
2045
+ | `max-size` | `number` | `0` | Largest allowed file in bytes. 0 (the default) means no limit. Larger files are rejected with reason `size`. |
2046
+ | `error` | `string` | | Error message shown under the zone; while it is set the drop zone is `aria-invalid` and described by it. Set it for a server-side upload failure. The zone also sets it itself when it rejects a file (see `void-reject`) and clears what it set on the next accepted selection; a message you set is left alone. |
2031
2047
  | `required` | `boolean` | `false` | The control must have a value before its form can be submitted. An empty control is invalid (`valueMissing`) and the browser reports it, as for a native field. |
2032
2048
  | `name` | `string` | | Key the control's value is submitted under in the form's `FormData`. Without a name the control submits nothing. |
2033
2049
 
2034
2050
  | Event | `detail` | Description |
2035
2051
  |---|---|---|
2052
+ | `void-reject` | `{ rejected: { file: File; reason: 'type' \| 'size' \| 'count' }[] }` | Files were refused: one entry per file with the reason. Does not bubble. |
2036
2053
  | `void-change` | `{ value: File[]; files: File[] }` | |
2037
2054
 
2038
2055
  Example:
@@ -2068,19 +2085,15 @@ assistive technology, so set `aria-label` and state the figure in the surroundin
2068
2085
  | `hide-tick-max` | `boolean` | `false` | When true (default), force a major tick at `max` (the gauge end position). Useful when max doesn't naturally fall on a major-interval boundary (e.g. max=100 with tick-major=30) but you still want the endpoint marked. If max naturally falls on a step, this upgrades the classification to major. Add `hide-tick-max` to leave it out. |
2069
2086
  | `segments-sort` | `value\|manual` | `value` | Order of segments around the arc: `value` (default, largest first) or `manual` (the order of `data.segments`). |
2070
2087
  | `gaps` | `boolean \| number` | `false` | Visible gap between segments. `false`/`0` = seamless. `true` = 1% of the filled arc consumed by gaps. Number = explicit percent. Higher % = clearer segmentation but more arc sacrificed; the precision-vs-clarity tradeoff. |
2071
- | `aria-label` | `string` | | Accessible name of the gauge, such as `Disk usage`. The gauge is an image to assistive technology, so set it and put the figure in the text around it. |
2072
-
2073
- Properties with no attribute (set in JavaScript):
2074
-
2075
- | Property | Type | Description |
2076
- |---|---|---|
2077
- | `zones` | `GaugeZone[]` | Colour bands over the value range. Assign an array of `{ from, to, color }`; the fill takes the colour of the zone containing the value. Property only. |
2078
- | `data` | `GaugeData` | Segmented data: `{ segments: [{ name, value, color? }] }` splits the arc between named parts; the optional `value` is the headline reading. Property only: assign a new object to update the gauge and animate to it. For a single reading, set the `value` attribute instead. |
2088
+ | `aria-label` | `string` | | Accessible name of the gauge, such as `Disk usage`; it is also the caption of the data table. Set it: the drawing itself is hidden from assistive technology. |
2089
+ | `show-table` | `boolean` | `false` | Show the data table (the reading with its range, or one row per segment) below the gauge. The table is always there for assistive technology; this makes it visible too. |
2090
+ | `zones` | `GaugeZone[]` | `[]` | Colour bands over the value range: an array of `{ from, to, color }`; the fill takes the colour of the zone containing the value. Give it as a property or as JSON in the `zones` attribute: `<void-gauge zones='[{"from":0,"to":60,"color":"green"},{"from":60,"to":100,"color":"red"}]'>`. Invalid JSON draws no zones and is reported by `@voidable/ui/dev`. Not reflected to the attribute. |
2091
+ | `data` | `GaugeData` | `{}` | Segmented data: `{ segments: [{ name, value, color? }] }` splits the arc between named parts; the optional `value` is the headline reading. Give it as a property (assign a new object to update the gauge and animate to it) or as JSON in the `data` attribute: `<void-gauge data='{"segments":[{"name":"Used","value":40},{"name":"Cache","value":15}]}'>`. Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the attribute, and an attribute a server morph leaves unchanged does not animate again. For a single reading, set the `value` attribute instead. |
2079
2092
 
2080
2093
  Example:
2081
2094
 
2082
2095
  ```html
2083
- <void-gauge value="72" unit="%" circular="semi" aria-label="Disk usage"></void-gauge>
2096
+ <void-gauge value="72" unit="%" circular="semi" aria-label="Disk usage" zones='[{"from":0,"to":60,"color":"var(--void-color-success)"},{"from":60,"to":85,"color":"var(--void-color-warning)"},{"from":85,"to":100,"color":"var(--void-color-error)"}]'></void-gauge>
2084
2097
  ```
2085
2098
 
2086
2099
  ## `<void-glass>`
@@ -2117,6 +2130,8 @@ Example:
2117
2130
 
2118
2131
  Animated open/close toggle for mobile navigation menus and collapsible sidebars.
2119
2132
 
2133
+ Name it by what it opens: `aria-label="Main navigation"` (or `aria-labelledby`). Without one it is called "Menu" ("Close menu" while open).
2134
+
2120
2135
  | Attribute | Values | Default | Description |
2121
2136
  |---|---|---|---|
2122
2137
  | `open` | `boolean` | `false` | Whether the menu it controls is open: draws the lines as a close cross and sets `aria-expanded`. It flips on every click and Enter or Space, firing `void-open` or `void-close`; set it yourself when the menu closes some other way. |
@@ -2124,13 +2139,13 @@ Animated open/close toggle for mobile navigation menus and collapsible sidebars.
2124
2139
 
2125
2140
  | Event | `detail` | Description |
2126
2141
  |---|---|---|
2127
- | `void-open` | `{ reason: 'trigger' }` | The user opened it (click, Enter or Space). Does not bubble. |
2142
+ | `void-open` | `{ reason: 'trigger' \| 'keyboard' }` | The user opened it: `trigger` for a click, `keyboard` for Enter or Space. Does not bubble. |
2128
2143
  | `void-close` | `{ reason: 'trigger' }` | The user closed it. Does not bubble. |
2129
2144
 
2130
2145
  Example:
2131
2146
 
2132
2147
  ```html
2133
- <void-hamburger></void-hamburger>
2148
+ <void-hamburger aria-label="Main navigation"></void-hamburger>
2134
2149
  ```
2135
2150
 
2136
2151
  ## `<void-hover-card>`
@@ -2280,8 +2295,10 @@ Example:
2280
2295
  ## `<void-line-chart>`
2281
2296
 
2282
2297
  Line chart for trends over time with one or more series, linear or stepped, drawn in SVG with an animated
2283
- entry. Give it `data` (`{ series: [{ name, values }], labels }`) from script; it has no children. The chart
2284
- is an image to assistive technology, so set `aria-label` and state the key figures in the surrounding text.
2298
+ entry. Give it `data` (`{ series: [{ name, values }], labels }`) as the `data` property or as JSON in the
2299
+ `data` attribute, so server-rendered markup draws it with no script; it has no children. The drawing is
2300
+ hidden from assistive technology and a visually hidden data table (captioned with `aria-label`) carries
2301
+ the values instead; add `show-table` to show the table below the chart too.
2285
2302
 
2286
2303
  | Attribute | Values | Default | Description |
2287
2304
  |---|---|---|---|
@@ -2289,18 +2306,14 @@ is an image to assistive technology, so set `aria-label` and state the key figur
2289
2306
  | `show-value` | `boolean` | `false` | Print each point's value above it, abbreviated above 1000 (`1.2k`). |
2290
2307
  | `variant` | `filled\|outline\|wireframe` | `outline` | How the area under each line is drawn: `outline` (default, a light tint), `filled` (a stronger tint) or `wireframe` (no area, just the line). |
2291
2308
  | `interpolation` | `linear\|step` | `linear` | How points are joined: `linear` (default, straight segments) or `step` (a horizontal run, then a vertical jump). |
2292
- | `aria-label` | `string` | | Accessible name of the chart, such as `Visitors per day`. The chart is an image to assistive technology, so set it and put the key figures in the text around it. |
2293
-
2294
- Properties with no attribute (set in JavaScript):
2295
-
2296
- | Property | Type | Description |
2297
- |---|---|---|
2298
- | `data` | `LineChartData` | The chart's data: `{ series: [{ name, values, color? }], labels? }`. `values` are aligned with `labels` (the names along the horizontal axis); `color` overrides a series' colour. Property only: assign a new object to update the chart and animate to it. |
2309
+ | `aria-label` | `string` | | Accessible name of the chart, such as `Visitors per day`; it is also the caption of the data table. Set it: the drawing itself is hidden from assistive technology. |
2310
+ | `show-table` | `boolean` | `false` | Show the data table (one row per point, one column per series) below the chart. The table is always there for assistive technology; this makes it visible too. |
2311
+ | `data` | `LineChartData` | `{ series: [] }` | The chart's data: `{ series: [{ name, values, color? }], labels? }`. `values` are aligned with `labels` (the names along the horizontal axis); `color` overrides a series' colour. Give it as a property (assign a new object to update the chart and animate to it) or as JSON in the `data` attribute: `<void-line-chart data='{"series":[{"name":"Visitors","values":[3,5,4]}],"labels":["Mon","Tue","Wed"]}'>`. Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the attribute (the data can be large), and an attribute a server morph leaves unchanged does not animate again. |
2299
2312
 
2300
2313
  Example:
2301
2314
 
2302
2315
  ```html
2303
- <void-line-chart aria-label="Visitors per day" height="240"></void-line-chart>
2316
+ <void-line-chart aria-label="Visitors per day" height="240" data='{"labels":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],"series":[{"name":"Visitors","values":[320,410,380,520,610,450,390]}]}'></void-line-chart>
2304
2317
  ```
2305
2318
 
2306
2319
  ## `<void-list>`
@@ -2823,6 +2836,11 @@ nothing rendered. Use the patterns beside it for the usual contents: `<void-bran
2823
2836
  `<void-nav-links>` for the links (mark the current page with `aria-current="page"`) and `<void-spacer>` to
2824
2837
  push what follows to the far end.
2825
2838
 
2839
+ The bar is a `navigation` landmark. Where the page already has one around it (the bar sits inside a `<nav>`
2840
+ or an element with a navigation or other role of its own) or inside it (the links are already in a `<nav>`),
2841
+ it adds nothing, so landmarks never nest; a role you write on it is kept. When a page has more than one
2842
+ navigation landmark, give each an `aria-label` (`<void-nav-bar aria-label="Primary">`); with one, a name is optional.
2843
+
2826
2844
  | Attribute | Values | Default | Description |
2827
2845
  |---|---|---|---|
2828
2846
  | `sticky` | `boolean` | `false` | Stay at the top of the viewport while the page scrolls. |
@@ -3570,7 +3588,7 @@ Example:
3570
3588
  <h2>Upcoming passes</h2>
3571
3589
  <span data-void-type="label">Next 6 hours</span>
3572
3590
  </void-section-head>
3573
- <void-table>
3591
+ <void-table aria-label="Upcoming passes">
3574
3592
  <table>
3575
3593
  <thead><tr><th>Satellite</th><th data-numeric>Starts in</th></tr></thead>
3576
3594
  <tbody><tr><td>MRD-0412</td><td data-numeric>14 min</td></tr></tbody>
@@ -3893,6 +3911,8 @@ Example:
3893
3911
 
3894
3912
  Key metric display for analytics dashboards and KPI summaries with label, value, delta, and trend.
3895
3913
 
3914
+ With a `label` it is a `group` named by the label; without one it has no role.
3915
+
3896
3916
  | Attribute | Values | Default | Description |
3897
3917
  |---|---|---|---|
3898
3918
  | `label` | `string` | | Small caption above the value, such as `Active users`. |
@@ -3999,6 +4019,10 @@ written on a cell is kept). `data-stack` on a header cell sets the role of a col
3999
4019
  `data-align="end"` on a header cell right-aligns a numeric column. Because browsers can drop table
4000
4020
  semantics when `display` changes, a table with `stack` carries explicit table, row and cell roles.
4001
4021
 
4022
+ **Name.** A table needs a name: write a `<caption>` (the caption part; it can be visually hidden), or an
4023
+ `aria-label` (or `label`) on the `<void-table>`, which the component copies onto the native `<table>`. `voidable check`
4024
+ reports a `<void-table>` with neither (rule `missing-name`).
4025
+
4002
4026
  **Overflow.** Nothing is clipped by default, so a menu, popover or tooltip opened from a cell is
4003
4027
  always fully visible. `scrollable` makes the table its own horizontal scroll region: it is
4004
4028
  focusable and labelled (`label`, else the `<caption>`, else `aria-label`) only while it actually
@@ -4025,6 +4049,7 @@ Example:
4025
4049
  ```html
4026
4050
  <void-table stack hoverable>
4027
4051
  <table>
4052
+ <caption>Team members</caption>
4028
4053
  <thead>
4029
4054
  <tr><th data-stack="title">Name</th><th>Role</th><th data-align="end">Seats</th><th data-stack="actions">Actions</th></tr>
4030
4055
  </thead>