@voidable/ui 0.10.0 → 0.12.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 (177) hide show
  1. package/dist/angular/index.d.ts +2 -2
  2. package/dist/angular/index.js +2 -1
  3. package/dist/base.d.ts +6 -0
  4. package/dist/base.js +2 -2
  5. package/dist/chunks/activation-B8aBarKd.js +4 -0
  6. package/dist/chunks/{base-BxmMM3B7.js → base-BGrS4eIl.js} +9 -0
  7. package/dist/chunks/carousel-C9u0bg5l.js +10 -0
  8. package/dist/chunks/choice-BTrsi7OW.js +16 -0
  9. package/dist/chunks/data-Baycjoo4.js +96 -0
  10. package/dist/chunks/fields-MEqz-olE.js +21 -0
  11. package/dist/chunks/{form-control-C0vH6gii.js → form-control-fL-Hhy91.js} +49 -48
  12. package/dist/chunks/{keyboard-CEhMSkws.js → keyboard-ChtDvhB_.js} +4 -23
  13. package/dist/chunks/{keyboard-activation-CV0m4hkn.js → keyboard-activation-BfEyoaMT.js} +4 -6
  14. package/dist/chunks/menu-CxRRgkJI.js +21 -0
  15. package/dist/chunks/{modal-CgGp_fCs.js → modal-Cz2-Ov76.js} +24 -16
  16. package/dist/chunks/nav-menu-Bx284Dk6.js +12 -0
  17. package/dist/chunks/{overlay-hLJ7IQHx.js → overlay-BuV-4Yvt.js} +76 -69
  18. package/dist/chunks/overlay-K1ilWC1p.js +4 -0
  19. package/dist/chunks/pickers-CjlFgNke.js +36 -0
  20. package/dist/chunks/{projection-SnR79EHI.js → projection-oPe6ipjL.js} +1 -1
  21. package/dist/chunks/table-BBpqwWEi.js +4 -0
  22. package/dist/chunks/tabs-Buf3EBWq.js +10 -0
  23. package/dist/components/accordion.d.ts +7 -0
  24. package/dist/components/accordion.js +23 -15
  25. package/dist/components/action-input.d.ts +2 -1
  26. package/dist/components/action-input.js +60 -56
  27. package/dist/components/alert.d.ts +11 -0
  28. package/dist/components/alert.js +10 -3
  29. package/dist/components/avatar.js +2 -2
  30. package/dist/components/badge.d.ts +8 -2
  31. package/dist/components/badge.js +1 -4
  32. package/dist/components/banner.d.ts +9 -0
  33. package/dist/components/banner.js +10 -3
  34. package/dist/components/bar-chart.d.ts +21 -7
  35. package/dist/components/bar-chart.js +68 -45
  36. package/dist/components/breadcrumbs.d.ts +2 -0
  37. package/dist/components/breadcrumbs.js +16 -12
  38. package/dist/components/button.d.ts +7 -0
  39. package/dist/components/button.js +24 -17
  40. package/dist/components/calendar.d.ts +85 -12
  41. package/dist/components/calendar.js +263 -120
  42. package/dist/components/card.js +1 -1
  43. package/dist/components/carousel.d.ts +22 -0
  44. package/dist/components/carousel.js +66 -37
  45. package/dist/components/charts/data.d.ts +72 -0
  46. package/dist/components/checkbox-group.js +23 -22
  47. package/dist/components/checkbox.d.ts +7 -0
  48. package/dist/components/checkbox.js +30 -25
  49. package/dist/components/collapsible.d.ts +7 -0
  50. package/dist/components/collapsible.js +20 -12
  51. package/dist/components/color-picker.js +29 -28
  52. package/dist/components/combobox.d.ts +13 -1
  53. package/dist/components/combobox.js +55 -42
  54. package/dist/components/compose-input.d.ts +9 -1
  55. package/dist/components/compose-input.js +29 -17
  56. package/dist/components/dialog.js +1 -1
  57. package/dist/components/divider.js +2 -2
  58. package/dist/components/donut-chart.d.ts +22 -6
  59. package/dist/components/donut-chart.js +97 -70
  60. package/dist/components/drawer.js +1 -1
  61. package/dist/components/dropdown-menu.d.ts +22 -0
  62. package/dist/components/dropdown-menu.js +55 -40
  63. package/dist/components/editable.d.ts +11 -1
  64. package/dist/components/editable.js +36 -23
  65. package/dist/components/error-fallback.d.ts +4 -2
  66. package/dist/components/error-fallback.js +35 -29
  67. package/dist/components/field.js +2 -2
  68. package/dist/components/file-upload.d.ts +29 -5
  69. package/dist/components/file-upload.js +84 -28
  70. package/dist/components/gauge.d.ts +32 -8
  71. package/dist/components/gauge.js +206 -133
  72. package/dist/components/hamburger.d.ts +19 -1
  73. package/dist/components/hamburger.js +45 -25
  74. package/dist/components/hover-card.d.ts +7 -0
  75. package/dist/components/hover-card.js +23 -15
  76. package/dist/components/indicator.js +16 -15
  77. package/dist/components/input.js +3 -3
  78. package/dist/components/line-chart.d.ts +22 -7
  79. package/dist/components/line-chart.js +80 -57
  80. package/dist/components/list.js +1 -1
  81. package/dist/components/menu.d.ts +25 -0
  82. package/dist/components/menu.js +56 -34
  83. package/dist/components/multiselect.d.ts +17 -1
  84. package/dist/components/multiselect.js +97 -75
  85. package/dist/components/nav-bar.d.ts +9 -0
  86. package/dist/components/nav-bar.js +16 -3
  87. package/dist/components/nav-menu.d.ts +9 -0
  88. package/dist/components/nav-menu.js +31 -24
  89. package/dist/components/number-input.d.ts +15 -1
  90. package/dist/components/number-input.js +72 -38
  91. package/dist/components/pagination.js +26 -25
  92. package/dist/components/panel.js +1 -1
  93. package/dist/components/pin-input.d.ts +11 -0
  94. package/dist/components/pin-input.js +47 -33
  95. package/dist/components/popover.d.ts +7 -0
  96. package/dist/components/popover.js +22 -14
  97. package/dist/components/progress.js +2 -2
  98. package/dist/components/radio-group.js +3 -3
  99. package/dist/components/radio.d.ts +10 -1
  100. package/dist/components/radio.js +38 -33
  101. package/dist/components/scroll-area.js +2 -2
  102. package/dist/components/segmented-control.d.ts +14 -0
  103. package/dist/components/segmented-control.js +41 -29
  104. package/dist/components/select.js +2 -2
  105. package/dist/components/sidebar.d.ts +1 -0
  106. package/dist/components/sidebar.js +15 -11
  107. package/dist/components/skeleton.js +1 -1
  108. package/dist/components/slider.js +3 -3
  109. package/dist/components/spinner.d.ts +5 -3
  110. package/dist/components/spinner.js +22 -15
  111. package/dist/components/stat.d.ts +13 -1
  112. package/dist/components/stat.js +28 -20
  113. package/dist/components/status-dot.d.ts +2 -2
  114. package/dist/components/status-dot.js +13 -15
  115. package/dist/components/stepper.d.ts +2 -0
  116. package/dist/components/stepper.js +21 -14
  117. package/dist/components/switch.d.ts +7 -0
  118. package/dist/components/switch.js +25 -17
  119. package/dist/components/table.d.ts +81 -1
  120. package/dist/components/table.js +571 -69
  121. package/dist/components/tabs.d.ts +11 -0
  122. package/dist/components/tabs.js +43 -34
  123. package/dist/components/tag.js +13 -12
  124. package/dist/components/tags-input.d.ts +10 -1
  125. package/dist/components/tags-input.js +43 -31
  126. package/dist/components/textarea.js +3 -3
  127. package/dist/components/toast.d.ts +2 -0
  128. package/dist/components/toast.js +36 -29
  129. package/dist/components/toggle-group.d.ts +8 -0
  130. package/dist/components/toggle-group.js +25 -18
  131. package/dist/components/toggle.d.ts +7 -0
  132. package/dist/components/toggle.js +24 -16
  133. package/dist/components/tooltip.d.ts +7 -0
  134. package/dist/components/tooltip.js +21 -13
  135. package/dist/components.json +108 -84
  136. package/dist/custom-elements.json +4520 -236
  137. package/dist/dev/rules.d.ts +0 -1
  138. package/dist/dev/types.d.ts +5 -1
  139. package/dist/dev.js +298 -122
  140. package/dist/index.d.ts +4 -0
  141. package/dist/index.js +69 -67
  142. package/dist/keyboard-activation.d.ts +9 -9
  143. package/dist/keyboard.d.ts +2 -10
  144. package/dist/keymaps/activation.d.ts +8 -0
  145. package/dist/keymaps/carousel.d.ts +9 -0
  146. package/dist/keymaps/choice.d.ts +21 -0
  147. package/dist/keymaps/fields.d.ts +31 -0
  148. package/dist/keymaps/index.d.ts +2 -0
  149. package/dist/keymaps/menu.d.ts +36 -0
  150. package/dist/keymaps/nav-menu.d.ts +11 -0
  151. package/dist/keymaps/overlay.d.ts +4 -0
  152. package/dist/keymaps/pickers.d.ts +36 -0
  153. package/dist/keymaps/table.d.ts +8 -0
  154. package/dist/keymaps/tabs.d.ts +7 -0
  155. package/dist/keymaps.js +51 -0
  156. package/dist/keys.d.ts +46 -0
  157. package/dist/keys.js +57 -0
  158. package/dist/llms.txt +11 -3
  159. package/dist/messages/ar.d.ts +1 -0
  160. package/dist/messages/ar.js +130 -0
  161. package/dist/messages/fr.d.ts +1 -0
  162. package/dist/messages/fr.js +109 -0
  163. package/dist/messages.d.ts +213 -0
  164. package/dist/messages.js +190 -0
  165. package/dist/modal.d.ts +7 -0
  166. package/dist/reference.md +885 -60
  167. package/dist/testing/index.d.ts +46 -0
  168. package/dist/testing.js +79 -0
  169. package/dist/types/elements.d.ts +100 -84
  170. package/dist/types/react.d.ts +7 -3
  171. package/dist/types/solid.d.ts +7 -3
  172. package/dist/types/solid2.d.ts +4 -0
  173. package/dist/types/svelte.d.ts +7 -3
  174. package/dist/types/vue.d.ts +7 -3
  175. package/dist/vscode.html-custom-data.json +478 -38
  176. package/dist/web-types.json +1001 -111
  177. package/package.json +22 -2
@@ -1,16 +1,17 @@
1
- import { t as e } from "../chunks/base-BxmMM3B7.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { n } from "../chunks/form-control-C0vH6gii.js";
4
- import { r } from "../chunks/projection-SnR79EHI.js";
5
- import { n as i, t as a } from "../chunks/secret-value-CmTtVkMg.js";
6
- import { html as o, nothing as s } from "lit";
7
- import { property as c } from "lit/decorators.js";
8
- import { live as l } from "lit/directives/live.js";
3
+ import { msg as n } from "../messages.js";
4
+ import { n as r } from "../chunks/form-control-fL-Hhy91.js";
5
+ import { r as i } from "../chunks/projection-oPe6ipjL.js";
6
+ import { n as a, t as o } from "../chunks/secret-value-CmTtVkMg.js";
7
+ import { html as s, nothing as c } from "lit";
8
+ import { property as l } from "lit/decorators.js";
9
+ import { live as u } from "lit/directives/live.js";
9
10
  //#region src/components/action-input.ts
10
- r();
11
- var u = class t extends n(e) {
11
+ i();
12
+ var d = class t extends r(e) {
12
13
  constructor(...e) {
13
- super(...e), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.minlength = void 0, this.maxlength = void 0, this.pattern = "", this.inputMode = "", this.enterKeyHint = "", this.autocapitalize = "", this.spellcheckAttr = null, this.size = "md", this.color = "default", this.type = "text", this.icon = "search", this.actionLabel = "Action", this.iconSide = "end", this.tooltipSide = "top";
14
+ super(...e), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.minlength = void 0, this.maxlength = void 0, this.pattern = "", this.inputMode = "", this.enterKeyHint = "", this.autocapitalize = "", this.spellcheckAttr = null, this.size = "md", this.color = "default", this.type = "text", this.icon = "search", this.actionLabel = "", this.iconSide = "end", this.tooltipSide = "top";
14
15
  }
15
16
  static {
16
17
  this.labelTarget = ".void-action-input-field";
@@ -18,25 +19,28 @@ var u = class t extends n(e) {
18
19
  static {
19
20
  this.editState = ["value"];
20
21
  }
22
+ get _action() {
23
+ return this.actionLabel || n(this, "actionInput.action");
24
+ }
21
25
  _renderIcon() {
22
26
  switch (this.icon) {
23
- case "copy": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666"/><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"/></svg>`;
24
- case "search": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
25
- case "send": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 14l11 -11"/><path d="M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5"/></svg>`;
26
- case "eye": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>`;
27
- case "eye-off": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>`;
28
- case "check": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10"/></svg>`;
29
- case "x": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12"/><path d="M6 6l12 12"/></svg>`;
30
- case "arrow-right": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0"/><path d="M13 18l6 -6"/><path d="M13 6l6 6"/></svg>`;
31
- case "clipboard": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"/><path d="M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2"/></svg>`;
32
- default: return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
27
+ case "copy": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666"/><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"/></svg>`;
28
+ case "search": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
29
+ case "send": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 14l11 -11"/><path d="M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5"/></svg>`;
30
+ case "eye": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>`;
31
+ case "eye-off": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>`;
32
+ case "check": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10"/></svg>`;
33
+ case "x": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12"/><path d="M6 6l12 12"/></svg>`;
34
+ case "arrow-right": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0"/><path d="M13 18l6 -6"/><path d="M13 6l6 6"/></svg>`;
35
+ case "clipboard": return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"/><path d="M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2"/></svg>`;
36
+ default: return s`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
33
37
  }
34
38
  }
35
39
  requestUpdate(e, n, r) {
36
- super.requestUpdate(e, n, i(this.type === "password", e, r, () => t.getPropertyOptions("value")));
40
+ super.requestUpdate(e, n, a(this.type === "password", e, r, () => t.getPropertyOptions("value")));
37
41
  }
38
42
  updated(e) {
39
- super.updated(e), this.type === "password" && e.get("type") !== void 0 && a(this);
43
+ super.updated(e), this.type === "password" && e.get("type") !== void 0 && o(this);
40
44
  }
41
45
  formWriteNativeDefault(e) {
42
46
  let t = this.querySelector(".void-action-input-field");
@@ -74,39 +78,39 @@ var u = class t extends n(e) {
74
78
  }));
75
79
  }
76
80
  render() {
77
- let e = o`
81
+ let e = s`
78
82
  <void-tooltip side=${this.tooltipSide}>
79
83
  <void-tooltip-trigger><button
80
84
  class="void-action-input-btn"
81
85
  type="button"
82
86
  ?disabled=${this.disabled}
83
- aria-label=${this.actionLabel}
87
+ aria-label=${this._action}
84
88
  @click=${this._onAction}
85
89
  >${this._renderIcon()}</button></void-tooltip-trigger>
86
- <void-tooltip-content>${this.actionLabel}</void-tooltip-content>
90
+ <void-tooltip-content>${this._action}</void-tooltip-content>
87
91
  </void-tooltip>
88
92
  `;
89
- return o`
93
+ return s`
90
94
  ${this.iconSide === "start" ? e : ""}
91
95
  <input
92
96
  class="void-action-input-field"
93
97
  type=${this.type}
94
- .value=${l(this.value)}
98
+ .value=${u(this.value)}
95
99
  placeholder=${this.placeholder}
96
100
  ?disabled=${this.disabled}
97
101
  ?readonly=${this.readonly}
98
102
  ?required=${this.required}
99
103
  name=${this.name}
100
- form=${this.formAttr ?? s}
101
- autocomplete=${this.autocomplete || s}
102
- minlength=${this.minlength ?? s}
103
- maxlength=${this.maxlength ?? s}
104
- pattern=${this.pattern || s}
105
- inputmode=${this.inputMode || s}
106
- enterkeyhint=${this.enterKeyHint || s}
107
- autocapitalize=${this.autocapitalize || s}
108
- spellcheck=${this.spellcheckAttr ?? s}
109
- aria-label=${this.placeholder || s}
104
+ form=${this.formAttr ?? c}
105
+ autocomplete=${this.autocomplete || c}
106
+ minlength=${this.minlength ?? c}
107
+ maxlength=${this.maxlength ?? c}
108
+ pattern=${this.pattern || c}
109
+ inputmode=${this.inputMode || c}
110
+ enterkeyhint=${this.enterKeyHint || c}
111
+ autocapitalize=${this.autocapitalize || c}
112
+ spellcheck=${this.spellcheckAttr ?? c}
113
+ aria-label=${this.placeholder || c}
110
114
  @input=${this._onInput}
111
115
  @change=${this._onChange}
112
116
  />
@@ -114,59 +118,59 @@ var u = class t extends n(e) {
114
118
  `;
115
119
  }
116
120
  };
117
- t([c({
121
+ t([l({
118
122
  type: String,
119
123
  reflect: !0
120
- })], u.prototype, "value", void 0), t([c({
124
+ })], d.prototype, "value", void 0), t([l({
121
125
  type: String,
122
126
  reflect: !0
123
- })], u.prototype, "placeholder", void 0), t([c({
127
+ })], d.prototype, "placeholder", void 0), t([l({
124
128
  type: Boolean,
125
129
  reflect: !0
126
- })], u.prototype, "disabled", void 0), t([c({
130
+ })], d.prototype, "disabled", void 0), t([l({
127
131
  type: Boolean,
128
132
  reflect: !0
129
- })], u.prototype, "readonly", void 0), t([c({
133
+ })], d.prototype, "readonly", void 0), t([l({
130
134
  type: Boolean,
131
135
  reflect: !0
132
- })], u.prototype, "required", void 0), t([c({
136
+ })], d.prototype, "required", void 0), t([l({
133
137
  type: String,
134
138
  reflect: !0
135
- })], u.prototype, "name", void 0), t([c({
139
+ })], d.prototype, "name", void 0), t([l({
136
140
  type: String,
137
141
  reflect: !0
138
- })], u.prototype, "autocomplete", void 0), t([c({ type: Number })], u.prototype, "minlength", void 0), t([c({ type: Number })], u.prototype, "maxlength", void 0), t([c({ type: String })], u.prototype, "pattern", void 0), t([c({
142
+ })], d.prototype, "autocomplete", void 0), t([l({ type: Number })], d.prototype, "minlength", void 0), t([l({ type: Number })], d.prototype, "maxlength", void 0), t([l({ type: String })], d.prototype, "pattern", void 0), t([l({
139
143
  type: String,
140
144
  attribute: "inputmode"
141
- })], u.prototype, "inputMode", void 0), t([c({
145
+ })], d.prototype, "inputMode", void 0), t([l({
142
146
  type: String,
143
147
  attribute: "enterkeyhint"
144
- })], u.prototype, "enterKeyHint", void 0), t([c({ type: String })], u.prototype, "autocapitalize", void 0), t([c({
148
+ })], d.prototype, "enterKeyHint", void 0), t([l({ type: String })], d.prototype, "autocapitalize", void 0), t([l({
145
149
  type: String,
146
150
  attribute: "spellcheck"
147
- })], u.prototype, "spellcheckAttr", void 0), t([c({
151
+ })], d.prototype, "spellcheckAttr", void 0), t([l({
148
152
  type: String,
149
153
  reflect: !0
150
- })], u.prototype, "size", void 0), t([c({
154
+ })], d.prototype, "size", void 0), t([l({
151
155
  type: String,
152
156
  reflect: !0
153
- })], u.prototype, "color", void 0), t([c({
157
+ })], d.prototype, "color", void 0), t([l({
154
158
  type: String,
155
159
  reflect: !0
156
- })], u.prototype, "type", void 0), t([c({
160
+ })], d.prototype, "type", void 0), t([l({
157
161
  type: String,
158
162
  reflect: !0
159
- })], u.prototype, "icon", void 0), t([c({
163
+ })], d.prototype, "icon", void 0), t([l({
160
164
  type: String,
161
165
  attribute: "action-label"
162
- })], u.prototype, "actionLabel", void 0), t([c({
166
+ })], d.prototype, "actionLabel", void 0), t([l({
163
167
  type: String,
164
168
  reflect: !0,
165
169
  attribute: "icon-side"
166
- })], u.prototype, "iconSide", void 0), t([c({
170
+ })], d.prototype, "iconSide", void 0), t([l({
167
171
  type: String,
168
172
  reflect: !0,
169
173
  attribute: "tooltip-side"
170
- })], u.prototype, "tooltipSide", void 0), customElements.get("void-action-input") || customElements.define("void-action-input", u);
174
+ })], d.prototype, "tooltipSide", void 0), customElements.get("void-action-input") || customElements.define("void-action-input", d);
171
175
  //#endregion
172
- export { u as VoidActionInput };
176
+ export { d as VoidActionInput };
@@ -3,6 +3,9 @@ import { PartsController } from '../parts.js';
3
3
  /**
4
4
  * Inline contextual message for form validation feedback, permission warnings, and system status notices.
5
5
  *
6
+ * Its role follows the colour: `error` and `warning` are `role="alert"` (announced at once, interrupting), every
7
+ * other colour is `role="status"` (announced politely). A role you write on it is kept.
8
+ *
6
9
  * Its text is written as parts: an optional `<void-alert-title>`, the `<void-alert-description>` and an optional
7
10
  * `<void-alert-close>`. The parts are never moved. The close part wraps the one control the author writes (a
8
11
  * `<button type="button" aria-label="Dismiss">`); pressing it fires `void-close` and, unless that is cancelled, removes the alert (focus inside
@@ -24,6 +27,14 @@ export declare class VoidAlert extends VoidElement {
24
27
  variant: 'subtle' | 'filled';
25
28
  protected readonly _parts: PartsController;
26
29
  connectedCallback(): void;
30
+ protected updated(changed: Map<string, unknown>): void;
31
+ /**
32
+ * `alert` (assertive: it interrupts) only for the urgent colours, `error` and `warning`; every other
33
+ * alert is `status` (polite). A role the author wrote is left alone.
34
+ */
35
+ private _syncRole;
36
+ /** The role this alert wrote itself, so one the author wrote is told apart from it. */
37
+ private _writtenRole;
27
38
  disconnectedCallback(): void;
28
39
  private _onClick;
29
40
  }
@@ -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 { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { n } from "../chunks/parts-DI_3VpSy.js";
4
4
  import { n as r, t as i } from "../chunks/dismiss-Drsy_dE5.js";
@@ -13,7 +13,7 @@ var o = class extends e {
13
13
  "void-alert-close"
14
14
  ],
15
15
  onChange: () => void 0
16
- }), this._onClick = (e) => {
16
+ }), this._writtenRole = null, this._onClick = (e) => {
17
17
  i(this._parts.one("void-alert-close"), e) && this.dispatchEvent(new CustomEvent("void-close", {
18
18
  bubbles: !1,
19
19
  cancelable: !0,
@@ -22,7 +22,14 @@ var o = class extends e {
22
22
  };
23
23
  }
24
24
  connectedCallback() {
25
- super.connectedCallback(), this.setHostAttribute("role", "alert"), this.addEventListener("click", this._onClick);
25
+ super.connectedCallback(), this._syncRole(), this.addEventListener("click", this._onClick);
26
+ }
27
+ updated(e) {
28
+ super.updated(e), e.has("color") && this._syncRole();
29
+ }
30
+ _syncRole() {
31
+ let e = this.getAttribute("role");
32
+ e !== null && e !== this._writtenRole || (this._writtenRole = this.color === "error" || this.color === "warning" ? "alert" : "status", this.setHostAttribute("role", this._writtenRole));
26
33
  }
27
34
  disconnectedCallback() {
28
35
  super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
@@ -1,6 +1,6 @@
1
- import { t as e } from "../chunks/base-BxmMM3B7.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { r as n } from "../chunks/projection-SnR79EHI.js";
3
+ import { r as n } from "../chunks/projection-oPe6ipjL.js";
4
4
  import { html as r } from "lit";
5
5
  import { property as i } from "lit/decorators.js";
6
6
  //#region src/components/avatar.ts
@@ -1,5 +1,12 @@
1
1
  import { VoidElement } from '../base.js';
2
- /** Small status chip for issue trackers, tag systems, and categorization UIs where color conveys state at a glance. */
2
+ /**
3
+ * Small status chip for issue trackers, tag systems, and categorization UIs where color conveys state at a glance.
4
+ *
5
+ * A badge has no role: it is text beside other text, and a screen reader reads it where it sits. It is not
6
+ * a live region, because a table of status badges would announce every one as it is inserted. For the one
7
+ * badge whose change must be heard (a count that updates while the user works), write `role="status"` on it
8
+ * yourself; the component leaves it alone.
9
+ */
3
10
  export declare class VoidBadge extends VoidElement {
4
11
  /**
5
12
  * Status colour: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`.
@@ -10,7 +17,6 @@ export declare class VoidBadge extends VoidElement {
10
17
  variant: 'filled' | 'outline';
11
18
  /** Size step: `sm`, `md` (default) or `lg`. */
12
19
  size: 'sm' | 'md' | 'lg';
13
- connectedCallback(): void;
14
20
  }
15
21
  declare global {
16
22
  interface HTMLElementTagNameMap {
@@ -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 { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { property as n } from "lit/decorators.js";
4
4
  //#region src/components/badge.ts
@@ -6,9 +6,6 @@ var r = class extends e {
6
6
  constructor(...e) {
7
7
  super(...e), this.color = "default", this.variant = "filled", this.size = "md";
8
8
  }
9
- connectedCallback() {
10
- super.connectedCallback(), this.setHostAttribute("role", "status");
11
- }
12
9
  };
13
10
  t([n({
14
11
  type: String,
@@ -3,6 +3,11 @@ import { PartsController } from '../parts.js';
3
3
  /**
4
4
  * Full-width site-level announcement for maintenance windows, cookie consent, and promotional messaging.
5
5
  *
6
+ * It never has the `banner` role: that is the page header landmark (at most one per page, never inside
7
+ * `<main>`), which an announcement is not. Like the alert it carries an announcement, so its role follows its
8
+ * `color`: `alert` for `error` and `warning`, `status` for the rest. To make it a landmark users can jump to,
9
+ * write `role="region"` and an `aria-label`; the component leaves a role you write alone.
10
+ *
6
11
  * Its text is written as parts: an optional `<void-banner-title>`, the `<void-banner-description>`, an optional
7
12
  * `<void-banner-actions>` (buttons or links) and an optional `<void-banner-close>`. The parts are never moved. The
8
13
  * close part wraps the one control the author writes (a `<void-button aria-label="Dismiss">`); pressing it fires
@@ -21,6 +26,10 @@ export declare class VoidBanner extends VoidElement {
21
26
  variant: 'subtle' | 'filled';
22
27
  protected readonly _parts: PartsController;
23
28
  connectedCallback(): void;
29
+ protected updated(changed: Map<string, unknown>): void;
30
+ /** `alert` for the urgent colours, `status` otherwise; a role the author wrote is left alone. */
31
+ private _syncRole;
32
+ private _writtenRole;
24
33
  disconnectedCallback(): void;
25
34
  private _onClick;
26
35
  }
@@ -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 { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { n } from "../chunks/parts-DI_3VpSy.js";
4
4
  import { n as r, t as i } from "../chunks/dismiss-Drsy_dE5.js";
@@ -14,7 +14,7 @@ var o = class extends e {
14
14
  "void-banner-close"
15
15
  ],
16
16
  onChange: () => void 0
17
- }), this._onClick = (e) => {
17
+ }), this._writtenRole = null, this._onClick = (e) => {
18
18
  i(this._parts.one("void-banner-close"), e) && this.dispatchEvent(new CustomEvent("void-close", {
19
19
  bubbles: !1,
20
20
  cancelable: !0,
@@ -23,7 +23,14 @@ var o = class extends e {
23
23
  };
24
24
  }
25
25
  connectedCallback() {
26
- super.connectedCallback(), this.setHostAttribute("role", "banner"), this.addEventListener("click", this._onClick);
26
+ super.connectedCallback(), this._syncRole(), this.addEventListener("click", this._onClick);
27
+ }
28
+ updated(e) {
29
+ super.updated(e), e.has("color") && this._syncRole();
30
+ }
31
+ _syncRole() {
32
+ let e = this.getAttribute("role");
33
+ e !== null && e !== this._writtenRole || (this._writtenRole = this.color === "error" || this.color === "warning" ? "alert" : "status", this.setHostAttribute("role", this._writtenRole));
27
34
  }
28
35
  disconnectedCallback() {
29
36
  super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
@@ -15,8 +15,10 @@ export interface BarChartData {
15
15
  }
16
16
  /**
17
17
  * Bar chart for comparing categories and series, drawn in SVG with animated bars. Give it `data`
18
- * (`{ series: [{ name, values }], labels }`) from script; it has no children. The chart is an image to
19
- * assistive technology, so set `aria-label` and state the key figures in the surrounding text.
18
+ * (`{ series: [{ name, values }], labels }`) as the `data` property or as JSON in the `data` attribute, so
19
+ * server-rendered markup draws it with no script; it has no children. The drawing is hidden from assistive
20
+ * technology and a visually hidden data table (captioned with `aria-label`) carries the values instead; add
21
+ * `show-table` to show the table below the chart too.
20
22
  */
21
23
  export declare class VoidBarChart extends VoidElement {
22
24
  /** Height of the chart in pixels. Defaults to 220. The width fills the container. */
@@ -29,25 +31,35 @@ export declare class VoidBarChart extends VoidElement {
29
31
  */
30
32
  variant: 'filled' | 'outline' | 'wireframe';
31
33
  /**
32
- * Accessible name of the chart, such as `Revenue by quarter`. The chart is an image to assistive
33
- * technology, so set it and put the key figures in the text around it.
34
+ * Accessible name of the chart, such as `Revenue by quarter`; it is also the caption of the data table.
35
+ * Set it: the drawing itself is hidden from assistive technology.
34
36
  */
35
37
  ariaLabel: string;
38
+ /**
39
+ * Show the data table (one row per category, one column per series) below the chart. The table is always
40
+ * there for assistive technology; this makes it visible too.
41
+ */
42
+ showTable: boolean;
36
43
  /**
37
44
  * Delay in milliseconds between the bars as they animate in, one after another. Without it the theme's
38
45
  * `--void-stagger-chart-bars` applies; `stagger="0"` animates them together.
39
46
  */
40
47
  stagger: number | null;
41
48
  private _data;
49
+ private _source;
50
+ private _entered;
42
51
  /**
43
52
  * The chart's data: `{ series: [{ name, values, color?, colors? }], labels? }`. `values` are aligned with
44
53
  * `labels` (the category names along the axis); `color` colours a whole series and `colors` overrides single
45
54
  * bars. Negative values are bars below a zero baseline: the value axis then spans the lowest value as
46
- * well, and a baseline is drawn at zero. Property only: assign a new object to update the chart and
47
- * animate to it.
55
+ * well, and a baseline is drawn at zero. Give it as a property (assign a new object to update the chart
56
+ * and animate to it) or as JSON in the `data` attribute: `<void-bar-chart data='{"series":[{"name":"Sales","values":[3,5]}],"labels":["Mon","Tue"]}'>`.
57
+ * Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the
58
+ * attribute (the data can be large), and an attribute a server morph leaves unchanged does not animate again.
59
+ * @default { series: [] }
48
60
  */
49
61
  get data(): BarChartData;
50
- set data(next: BarChartData);
62
+ set data(input: BarChartData);
51
63
  private _phase;
52
64
  private _display;
53
65
  private _targets;
@@ -63,6 +75,8 @@ export declare class VoidBarChart extends VoidElement {
63
75
  private _startAnimation;
64
76
  private _tick;
65
77
  render(): import('lit').TemplateResult<1>;
78
+ /** The data table for assistive technology (and `show-table`), from the data as given, not the animated state. */
79
+ private _table;
66
80
  }
67
81
  declare global {
68
82
  interface HTMLElementTagNameMap {