@voidable/ui 0.9.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 (114) hide show
  1. package/dist/base-entry.d.ts +1 -0
  2. package/dist/base.d.ts +8 -1
  3. package/dist/base.js +5 -1
  4. package/dist/chunks/base-BGrS4eIl.js +307 -0
  5. package/dist/chunks/data-BpiiNapL.js +95 -0
  6. package/dist/chunks/{keyboard-MQpfTX5I.js → keyboard-CEhMSkws.js} +19 -3
  7. package/dist/chunks/{modal-hivQ4YoU.js → modal-DWGkNdNG.js} +3 -3
  8. package/dist/chunks/{overlay-BywGMcDW.js → overlay-CH7L4N-h.js} +2 -2
  9. package/dist/chunks/{parts-CMQQop0D.js → parts-DI_3VpSy.js} +21 -17
  10. package/dist/chunks/{base-CMruMbxC.js → projection-oPe6ipjL.js} +105 -389
  11. package/dist/components/accordion.js +2 -2
  12. package/dist/components/action-input.d.ts +2 -2
  13. package/dist/components/action-input.js +56 -54
  14. package/dist/components/alert.d.ts +11 -0
  15. package/dist/components/alert.js +11 -4
  16. package/dist/components/avatar.js +13 -11
  17. package/dist/components/badge.d.ts +8 -2
  18. package/dist/components/badge.js +1 -4
  19. package/dist/components/banner.d.ts +9 -0
  20. package/dist/components/banner.js +11 -4
  21. package/dist/components/bar-chart.d.ts +21 -7
  22. package/dist/components/bar-chart.js +67 -43
  23. package/dist/components/breadcrumbs.js +2 -2
  24. package/dist/components/button.js +1 -1
  25. package/dist/components/calendar.d.ts +40 -2
  26. package/dist/components/calendar.js +170 -79
  27. package/dist/components/card.js +1 -1
  28. package/dist/components/carousel.js +20 -19
  29. package/dist/components/charts/data.d.ts +72 -0
  30. package/dist/components/checkbox-group.js +13 -12
  31. package/dist/components/checkbox.js +17 -16
  32. package/dist/components/collapsible.js +2 -2
  33. package/dist/components/color-picker.js +26 -24
  34. package/dist/components/combobox.js +17 -16
  35. package/dist/components/compose-input.js +13 -11
  36. package/dist/components/dialog.js +1 -1
  37. package/dist/components/divider.js +11 -9
  38. package/dist/components/donut-chart.d.ts +22 -6
  39. package/dist/components/donut-chart.js +96 -68
  40. package/dist/components/drawer.d.ts +2 -2
  41. package/dist/components/drawer.js +1 -1
  42. package/dist/components/dropdown-menu.js +4 -4
  43. package/dist/components/editable.js +13 -12
  44. package/dist/components/error-fallback.js +2 -2
  45. package/dist/components/field.js +10 -9
  46. package/dist/components/file-upload.d.ts +20 -5
  47. package/dist/components/file-upload.js +52 -20
  48. package/dist/components/gauge.d.ts +32 -8
  49. package/dist/components/gauge.js +209 -135
  50. package/dist/components/hamburger.d.ts +12 -1
  51. package/dist/components/hamburger.js +33 -20
  52. package/dist/components/hover-card.js +3 -3
  53. package/dist/components/indicator.js +14 -12
  54. package/dist/components/input.js +41 -39
  55. package/dist/components/line-chart.d.ts +22 -7
  56. package/dist/components/line-chart.js +80 -56
  57. package/dist/components/list.js +1 -1
  58. package/dist/components/menu.js +3 -3
  59. package/dist/components/multiselect.js +30 -29
  60. package/dist/components/nav-bar.d.ts +9 -0
  61. package/dist/components/nav-bar.js +16 -3
  62. package/dist/components/nav-menu.js +20 -19
  63. package/dist/components/number-input.js +17 -15
  64. package/dist/components/pagination.js +22 -20
  65. package/dist/components/panel.js +2 -2
  66. package/dist/components/pin-input.js +32 -30
  67. package/dist/components/popover.js +3 -3
  68. package/dist/components/progress.js +14 -12
  69. package/dist/components/radio-group.js +13 -11
  70. package/dist/components/radio.d.ts +25 -0
  71. package/dist/components/radio.js +78 -29
  72. package/dist/components/scroll-area.js +8 -7
  73. package/dist/components/segmented-control.js +21 -21
  74. package/dist/components/select.js +49 -47
  75. package/dist/components/sidebar.d.ts +2 -2
  76. package/dist/components/sidebar.js +2 -2
  77. package/dist/components/skeleton.js +1 -1
  78. package/dist/components/slider.js +16 -14
  79. package/dist/components/spinner.js +11 -9
  80. package/dist/components/stat.d.ts +13 -1
  81. package/dist/components/stat.js +29 -19
  82. package/dist/components/status-dot.js +1 -1
  83. package/dist/components/stepper.js +15 -13
  84. package/dist/components/switch.js +14 -12
  85. package/dist/components/table.d.ts +4 -0
  86. package/dist/components/table.js +42 -29
  87. package/dist/components/tabs.js +29 -29
  88. package/dist/components/tag.js +9 -8
  89. package/dist/components/tags-input.js +24 -22
  90. package/dist/components/textarea.js +34 -32
  91. package/dist/components/toast.d.ts +19 -2
  92. package/dist/components/toast.js +43 -10
  93. package/dist/components/toggle-group.js +16 -15
  94. package/dist/components/toggle.js +1 -1
  95. package/dist/components/tooltip.js +3 -3
  96. package/dist/components.json +15 -13
  97. package/dist/custom-elements.json +320 -88
  98. package/dist/dev/types.d.ts +3 -1
  99. package/dist/dev.js +85 -16
  100. package/dist/index.js +1 -1
  101. package/dist/keyboard.d.ts +10 -0
  102. package/dist/llms.txt +1 -1
  103. package/dist/parts.d.ts +5 -0
  104. package/dist/projection-api.d.ts +23 -0
  105. package/dist/projection.d.ts +8 -2
  106. package/dist/reference.md +84 -59
  107. package/dist/types/elements.d.ts +13 -13
  108. package/dist/types/react.d.ts +2 -2
  109. package/dist/types/solid.d.ts +2 -2
  110. package/dist/types/svelte.d.ts +2 -2
  111. package/dist/types/vue.d.ts +2 -2
  112. package/dist/vscode.html-custom-data.json +108 -28
  113. package/dist/web-types.json +189 -60
  114. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
- import { n as e, t } from "../chunks/base-CMruMbxC.js";
2
- import { t as n } from "../chunks/decorate-CaYbmmmm.js";
3
- import { n as r } from "../chunks/form-control-C0vH6gii.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
+ import { t } from "../chunks/decorate-CaYbmmmm.js";
3
+ import { n } from "../chunks/form-control-C0vH6gii.js";
4
+ import { t as r } from "../chunks/projection-oPe6ipjL.js";
4
5
  import { n as i } from "../chunks/value-list-CH6GjYXM.js";
5
6
  import { html as a, nothing as o } from "lit";
6
7
  import { property as s } from "lit/decorators.js";
7
8
  //#region src/components/checkbox-group.ts
8
- var c = (e) => e.value ?? e.getAttribute("value") ?? "on", l = class extends r(t) {
9
- constructor(...t) {
10
- super(...t), this.label = "", this.orientation = "vertical", this.name = "", this.required = !1, this.disabled = !1, this._projection = new e(this, {
9
+ var c = (e) => e.value ?? e.getAttribute("value") ?? "on", l = class extends n(e) {
10
+ constructor(...e) {
11
+ super(...e), this.label = "", this.orientation = "vertical", this.name = "", this.required = !1, this.disabled = !1, this._projection = new r(this, {
11
12
  regions: [{
12
13
  name: "items",
13
14
  target: () => this.querySelector(":scope > .void-checkbox-group-items")
@@ -78,22 +79,22 @@ var c = (e) => e.value ?? e.getAttribute("value") ?? "on", l = class extends r(t
78
79
  `;
79
80
  }
80
81
  };
81
- n([s({
82
+ t([s({
82
83
  type: String,
83
84
  reflect: !0
84
- })], l.prototype, "label", void 0), n([s({
85
+ })], l.prototype, "label", void 0), t([s({
85
86
  type: String,
86
87
  reflect: !0
87
- })], l.prototype, "orientation", void 0), n([s({
88
+ })], l.prototype, "orientation", void 0), t([s({
88
89
  type: String,
89
90
  reflect: !0
90
- })], l.prototype, "name", void 0), n([s({
91
+ })], l.prototype, "name", void 0), t([s({
91
92
  type: Boolean,
92
93
  reflect: !0
93
- })], l.prototype, "required", void 0), n([s({
94
+ })], l.prototype, "required", void 0), t([s({
94
95
  type: Boolean,
95
96
  reflect: !0
96
- })], l.prototype, "disabled", void 0), n([s({
97
+ })], l.prototype, "disabled", void 0), t([s({
97
98
  converter: i,
98
99
  reflect: !0
99
100
  })], l.prototype, "value", null), customElements.get("void-checkbox-group") || customElements.define("void-checkbox-group", l);
@@ -1,16 +1,17 @@
1
- import { n as e, t } from "../chunks/base-CMruMbxC.js";
2
- import { t as n } from "../chunks/decorate-CaYbmmmm.js";
3
- import { t as r } from "../chunks/keyboard-activation-CV0m4hkn.js";
4
- import { n as i } from "../chunks/form-control-C0vH6gii.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
+ import { t } from "../chunks/decorate-CaYbmmmm.js";
3
+ import { t as n } from "../chunks/keyboard-activation-CV0m4hkn.js";
4
+ import { n as r } from "../chunks/form-control-C0vH6gii.js";
5
+ import { t as i } from "../chunks/projection-oPe6ipjL.js";
5
6
  import { html as a, nothing as o } from "lit";
6
7
  import { property as s } from "lit/decorators.js";
7
8
  //#region src/components/checkbox.ts
8
- var c = class extends i(t) {
9
- constructor(...t) {
10
- super(...t), this._activation = new r(this, {
9
+ var c = class extends r(e) {
10
+ constructor(...e) {
11
+ super(...e), this._activation = new n(this, {
11
12
  enter: !1,
12
13
  disabled: () => this.formDisabled
13
- }), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.name = "", this.value = "on", this.required = !1, this.color = "default", this.size = "md", this._projection = new e(this, { regions: [{
14
+ }), this.checked = !1, this.disabled = !1, this.indeterminate = !1, this.name = "", this.value = "on", this.required = !1, this.color = "default", this.size = "md", this._projection = new i(this, { regions: [{
14
15
  name: "label",
15
16
  target: "after"
16
17
  }] }), this._onNativeFocus = () => {
@@ -77,28 +78,28 @@ var c = class extends i(t) {
77
78
  e && e.checked !== this.checked && (e.checked = this.checked), this.closest("void-checkbox-group")?.requestUpdate();
78
79
  }
79
80
  };
80
- n([s({
81
+ t([s({
81
82
  type: Boolean,
82
83
  reflect: !0
83
- })], c.prototype, "checked", void 0), n([s({
84
+ })], c.prototype, "checked", void 0), t([s({
84
85
  type: Boolean,
85
86
  reflect: !0
86
- })], c.prototype, "disabled", void 0), n([s({
87
+ })], c.prototype, "disabled", void 0), t([s({
87
88
  type: Boolean,
88
89
  reflect: !0
89
- })], c.prototype, "indeterminate", void 0), n([s({
90
+ })], c.prototype, "indeterminate", void 0), t([s({
90
91
  type: String,
91
92
  reflect: !0
92
- })], c.prototype, "name", void 0), n([s({
93
+ })], c.prototype, "name", void 0), t([s({
93
94
  type: String,
94
95
  reflect: !0
95
- })], c.prototype, "value", void 0), n([s({
96
+ })], c.prototype, "value", void 0), t([s({
96
97
  type: Boolean,
97
98
  reflect: !0
98
- })], c.prototype, "required", void 0), n([s({
99
+ })], c.prototype, "required", void 0), t([s({
99
100
  type: String,
100
101
  reflect: !0
101
- })], c.prototype, "color", void 0), n([s({
102
+ })], c.prototype, "color", void 0), t([s({
102
103
  type: String,
103
104
  reflect: !0
104
105
  })], c.prototype, "size", void 0), customElements.get("void-checkbox") || customElements.define("void-checkbox", c);
@@ -1,6 +1,6 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.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/parts-CMQQop0D.js";
3
+ import { n } from "../chunks/parts-DI_3VpSy.js";
4
4
  import { t as r } from "../chunks/disclosure-Bj_49GcC.js";
5
5
  import { property as i } from "lit/decorators.js";
6
6
  //#region src/components/collapsible.ts
@@ -1,11 +1,13 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { t as n } from "../chunks/form-control-C0vH6gii.js";
4
- import { html as r, nothing as i } from "lit";
5
- import { property as a } from "lit/decorators.js";
6
- import { live as o } from "lit/directives/live.js";
4
+ import { r } from "../chunks/projection-oPe6ipjL.js";
5
+ import { html as i, nothing as a } from "lit";
6
+ import { property as o } from "lit/decorators.js";
7
+ import { live as s } from "lit/directives/live.js";
7
8
  //#region src/components/color-picker.ts
8
- var s = class t extends n(e) {
9
+ r();
10
+ var c = class t extends n(e) {
9
11
  constructor(...e) {
10
12
  super(...e), this.value = "#000000", this.disabled = !1, this.size = "md", this.swatches = [], this.hideInput = !1, this.compact = !1, this.open = !1, this._hue = 0, this._saturation = 0, this._brightness = 0, this._dragging = null, this._boundPointerMove = null, this._boundPointerUp = null, this._onDocumentClick = (e) => {
11
13
  this.open && (this.contains(e.target) || (this.open = !1));
@@ -120,7 +122,7 @@ var s = class t extends n(e) {
120
122
  e.has("value") && !this._dragging && this._syncFromHex(this.value), this._applyCustomProperties(), e.has("open") && (this.open ? document.addEventListener("click", this._onDocumentClick, !0) : document.removeEventListener("click", this._onDocumentClick, !0));
121
123
  }
122
124
  _renderPicker() {
123
- return r`
125
+ return i`
124
126
  <div class="void-color-picker">
125
127
  <div
126
128
  class="void-color-picker-area"
@@ -134,25 +136,25 @@ var s = class t extends n(e) {
134
136
  >
135
137
  <div class="void-color-picker-hue-thumb"></div>
136
138
  </div>
137
- ${this.hideInput ? r`
139
+ ${this.hideInput ? i`
138
140
  <div class="void-color-picker-preview"></div>
139
- ` : r`
141
+ ` : i`
140
142
  <div class="void-color-picker-field">
141
143
  <span class="void-color-picker-field-swatch"></span>
142
144
  <span class="void-color-picker-field-separator"></span>
143
145
  <input
144
146
  class="void-color-picker-input"
145
147
  type="text"
146
- .value=${o(this.value)}
148
+ .value=${s(this.value)}
147
149
  ?disabled=${this.disabled}
148
150
  maxlength="7"
149
151
  @change=${this._onHexInput}
150
152
  />
151
153
  </div>
152
154
  `}
153
- ${this.swatches.length > 0 ? r`
155
+ ${this.swatches.length > 0 ? i`
154
156
  <div class="void-color-picker-swatches">
155
- ${this.swatches.map((e) => r`
157
+ ${this.swatches.map((e) => i`
156
158
  <button
157
159
  type="button"
158
160
  class="void-color-picker-swatch"
@@ -163,12 +165,12 @@ var s = class t extends n(e) {
163
165
  ></button>
164
166
  `)}
165
167
  </div>
166
- ` : i}
168
+ ` : a}
167
169
  </div>
168
170
  `;
169
171
  }
170
172
  render() {
171
- return this.compact ? r`
173
+ return this.compact ? i`
172
174
  <div class="void-color-picker-compact">
173
175
  <button
174
176
  type="button"
@@ -183,41 +185,41 @@ var s = class t extends n(e) {
183
185
  <input
184
186
  class="void-color-picker-compact-input"
185
187
  type="text"
186
- .value=${o(this.value)}
188
+ .value=${s(this.value)}
187
189
  ?disabled=${this.disabled}
188
190
  maxlength="7"
189
191
  @click=${(e) => e.stopPropagation()}
190
192
  @change=${this._onCompactHexInput}
191
193
  />
192
194
  </button>
193
- ${this.open ? r`
195
+ ${this.open ? i`
194
196
  <div class="void-color-picker-compact-dropdown" role="dialog" aria-label="Color picker">
195
197
  ${this._renderPicker()}
196
198
  </div>
197
- ` : i}
199
+ ` : a}
198
200
  </div>
199
201
  ` : this._renderPicker();
200
202
  }
201
203
  };
202
- t([a({
204
+ t([o({
203
205
  type: String,
204
206
  reflect: !0
205
- })], s.prototype, "value", void 0), t([a({
207
+ })], c.prototype, "value", void 0), t([o({
206
208
  type: Boolean,
207
209
  reflect: !0
208
- })], s.prototype, "disabled", void 0), t([a({
210
+ })], c.prototype, "disabled", void 0), t([o({
209
211
  type: String,
210
212
  reflect: !0
211
- })], s.prototype, "size", void 0), t([a({ type: Array })], s.prototype, "swatches", void 0), t([a({
213
+ })], c.prototype, "size", void 0), t([o({ type: Array })], c.prototype, "swatches", void 0), t([o({
212
214
  type: Boolean,
213
215
  attribute: "hide-input",
214
216
  reflect: !0
215
- })], s.prototype, "hideInput", void 0), t([a({
217
+ })], c.prototype, "hideInput", void 0), t([o({
216
218
  type: Boolean,
217
219
  reflect: !0
218
- })], s.prototype, "compact", void 0), t([a({
220
+ })], c.prototype, "compact", void 0), t([o({
219
221
  type: Boolean,
220
222
  reflect: !0
221
- })], s.prototype, "open", void 0), customElements.get("void-color-picker") || customElements.define("void-color-picker", s);
223
+ })], c.prototype, "open", void 0), customElements.get("void-color-picker") || customElements.define("void-color-picker", c);
222
224
  //#endregion
223
- export { s as VoidColorPicker };
225
+ export { c as VoidColorPicker };
@@ -1,17 +1,18 @@
1
- import { n as e, r as t, t as n } from "../chunks/base-CMruMbxC.js";
2
- import { t as r } from "../chunks/decorate-CaYbmmmm.js";
3
- import { t as i } from "../chunks/form-control-C0vH6gii.js";
4
- import { n as a } from "../chunks/parts-CMQQop0D.js";
5
- import { i as o, n as s } from "../chunks/keyboard-MQpfTX5I.js";
6
- import { t as c } from "../chunks/overlay-BywGMcDW.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
+ import { t } from "../chunks/decorate-CaYbmmmm.js";
3
+ import { t as n } from "../chunks/form-control-C0vH6gii.js";
4
+ import { n as r, t as i } from "../chunks/projection-oPe6ipjL.js";
5
+ import { n as a } from "../chunks/parts-DI_3VpSy.js";
6
+ import { a as o, n as s } from "../chunks/keyboard-CEhMSkws.js";
7
+ import { t as c } from "../chunks/overlay-CH7L4N-h.js";
7
8
  import { optionLabel as l } from "./multiselect.js";
8
9
  import { html as u, nothing as d } from "lit";
9
10
  import { property as f } from "lit/decorators.js";
10
11
  import { live as p } from "lit/directives/live.js";
11
12
  //#region src/components/combobox.ts
12
- var m = class extends i(n) {
13
- constructor(...n) {
14
- super(...n), this.value = "", this.placeholder = "Search...", this.disabled = !1, this.size = "md", this.error = "", this.name = "", this.open = !1, this._query = "", this._active = null, this._wiring = !1, this._projection = new e(this, { placement: "start" }), this._parts = new a(this, {
13
+ var m = class extends n(e) {
14
+ constructor(...e) {
15
+ super(...e), this.value = "", this.placeholder = "Search...", this.disabled = !1, this.size = "md", this.error = "", this.name = "", this.open = !1, this._query = "", this._active = null, this._wiring = !1, this._projection = new i(this, { placement: "start" }), this._parts = new a(this, {
15
16
  tags: ["void-combobox-content", "void-option"],
16
17
  onChange: () => {
17
18
  this._wire(), this._wiring || this.requestUpdate();
@@ -34,7 +35,7 @@ var m = class extends i(n) {
34
35
  let n = e.target.closest("void-option");
35
36
  n && !n.disabled && this._options.includes(n) && this._selectOption(n);
36
37
  }, this._onInputFocus = () => {
37
- this.disabled || t(this) || (this._overlay.requestOpen("focus"), this._query = "", this._active = null);
38
+ this.disabled || r(this) || (this._overlay.requestOpen("focus"), this._query = "", this._active = null);
38
39
  }, this._onInput = (e) => {
39
40
  this._query = e.target.value, this.open = !0, this._active = null, this.requestUpdate();
40
41
  }, this._onInputKeydown = (e) => {
@@ -166,22 +167,22 @@ var m = class extends i(n) {
166
167
  }));
167
168
  }
168
169
  };
169
- r([f({
170
+ t([f({
170
171
  type: String,
171
172
  reflect: !0
172
- })], m.prototype, "value", void 0), r([f({ type: String })], m.prototype, "placeholder", void 0), r([f({
173
+ })], m.prototype, "value", void 0), t([f({ type: String })], m.prototype, "placeholder", void 0), t([f({
173
174
  type: Boolean,
174
175
  reflect: !0
175
- })], m.prototype, "disabled", void 0), r([f({
176
+ })], m.prototype, "disabled", void 0), t([f({
176
177
  type: String,
177
178
  reflect: !0
178
- })], m.prototype, "size", void 0), r([f({
179
+ })], m.prototype, "size", void 0), t([f({
179
180
  type: String,
180
181
  reflect: !0
181
- })], m.prototype, "error", void 0), r([f({
182
+ })], m.prototype, "error", void 0), t([f({
182
183
  type: String,
183
184
  reflect: !0
184
- })], m.prototype, "name", void 0), r([f({
185
+ })], m.prototype, "name", void 0), t([f({
185
186
  type: Boolean,
186
187
  reflect: !0
187
188
  })], m.prototype, "open", void 0), customElements.get("void-combobox") || customElements.define("void-combobox", m);
@@ -1,9 +1,11 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { html as n } from "lit";
4
- import { property as r, query as i } from "lit/decorators.js";
3
+ import { r as n } from "../chunks/projection-oPe6ipjL.js";
4
+ import { html as r } from "lit";
5
+ import { property as i, query as a } from "lit/decorators.js";
5
6
  //#region src/components/compose-input.ts
6
- var a = class extends e {
7
+ n();
8
+ var o = class extends e {
7
9
  constructor(...e) {
8
10
  super(...e), this.value = "", this.placeholder = "Type a message...", this.disabled = !1, this.maxlength = 0;
9
11
  }
@@ -14,7 +16,7 @@ var a = class extends e {
14
16
  this.editState = ["value"];
15
17
  }
16
18
  render() {
17
- return n`
19
+ return r`
18
20
  <div class="void-compose-input-wrapper">
19
21
  <textarea
20
22
  class="void-compose-input-textarea"
@@ -63,18 +65,18 @@ var a = class extends e {
63
65
  }));
64
66
  }
65
67
  };
66
- t([r({
68
+ t([i({
67
69
  type: String,
68
70
  reflect: !0
69
- })], a.prototype, "value", void 0), t([r({
71
+ })], o.prototype, "value", void 0), t([i({
70
72
  type: String,
71
73
  reflect: !0
72
- })], a.prototype, "placeholder", void 0), t([r({
74
+ })], o.prototype, "placeholder", void 0), t([i({
73
75
  type: Boolean,
74
76
  reflect: !0
75
- })], a.prototype, "disabled", void 0), t([r({
77
+ })], o.prototype, "disabled", void 0), t([i({
76
78
  type: Number,
77
79
  reflect: !0
78
- })], a.prototype, "maxlength", void 0), t([i(".void-compose-input-textarea")], a.prototype, "_textarea", void 0), customElements.get("void-compose-input") || customElements.define("void-compose-input", a);
80
+ })], o.prototype, "maxlength", void 0), t([a(".void-compose-input-textarea")], o.prototype, "_textarea", void 0), customElements.get("void-compose-input") || customElements.define("void-compose-input", o);
79
81
  //#endregion
80
- export { a as VoidComposeInput };
82
+ export { o as VoidComposeInput };
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "../chunks/decorate-CaYbmmmm.js";
2
- import { t } from "../chunks/modal-hivQ4YoU.js";
2
+ import { t } from "../chunks/modal-DWGkNdNG.js";
3
3
  import { property as n } from "lit/decorators.js";
4
4
  //#region src/components/dialog.ts
5
5
  var r = class extends t {
@@ -1,9 +1,11 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BGrS4eIl.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { html as n, nothing as r } from "lit";
4
- import { property as i } from "lit/decorators.js";
3
+ import { r as n } from "../chunks/projection-oPe6ipjL.js";
4
+ import { html as r, nothing as i } from "lit";
5
+ import { property as a } from "lit/decorators.js";
5
6
  //#region src/components/divider.ts
6
- var a = class extends e {
7
+ n();
8
+ var o = class extends e {
7
9
  constructor(...e) {
8
10
  super(...e), this.label = void 0, this.orientation = "horizontal";
9
11
  }
@@ -14,15 +16,15 @@ var a = class extends e {
14
16
  e.has("orientation") && this.setHostAttribute("aria-orientation", this.orientation);
15
17
  }
16
18
  render() {
17
- return this.label ? n`${this.label}` : r;
19
+ return this.label ? r`${this.label}` : i;
18
20
  }
19
21
  };
20
- t([i({
22
+ t([a({
21
23
  type: String,
22
24
  reflect: !0
23
- })], a.prototype, "label", void 0), t([i({
25
+ })], o.prototype, "label", void 0), t([a({
24
26
  type: String,
25
27
  reflect: !0
26
- })], a.prototype, "orientation", void 0), customElements.get("void-divider") || customElements.define("void-divider", a);
28
+ })], o.prototype, "orientation", void 0), customElements.get("void-divider") || customElements.define("void-divider", o);
27
29
  //#endregion
28
- export { a as VoidDivider };
30
+ export { o as VoidDivider };
@@ -10,8 +10,10 @@ export interface DonutChartData {
10
10
  }
11
11
  /**
12
12
  * Donut chart for part-to-whole breakdowns, drawn in SVG with animated segments and an optional total in the
13
- * centre. Give it `data` (`{ segments: [{ name, value }] }`) from script; it has no children. The chart is an
14
- * image to assistive technology, so set `aria-label` and state the key figures in the surrounding text.
13
+ * centre. Give it `data` (`{ segments: [{ name, value }] }`) as the `data` property or as JSON in the `data`
14
+ * attribute, so server-rendered markup draws it with no script; it has no children. The drawing is hidden
15
+ * from assistive technology and a visually hidden data table (captioned with `aria-label`) carries the
16
+ * values instead; add `show-table` to show the table below the chart too.
15
17
  */
16
18
  export declare class VoidDonutChart extends VoidElement {
17
19
  /** Width and height of the chart in pixels. Defaults to 220. */
@@ -37,17 +39,29 @@ export declare class VoidDonutChart extends VoidElement {
37
39
  /** Print the sum of the segments in the centre of the ring. */
38
40
  showTotal: boolean;
39
41
  /**
40
- * Accessible name of the chart, such as `Traffic by source`. The chart is an image to assistive
41
- * technology, so set it and put the key figures in the text around it.
42
+ * Accessible name of the chart, such as `Traffic by source`; it is also the caption of the data table.
43
+ * Set it: the drawing itself is hidden from assistive technology.
42
44
  */
43
45
  ariaLabel: string;
46
+ /**
47
+ * Show the data table (one row per segment: name, value and share) below the chart. The table is always
48
+ * there for assistive technology; this makes it visible too.
49
+ */
50
+ showTable: boolean;
44
51
  private _data;
52
+ private _source;
53
+ private _entered;
45
54
  /**
46
55
  * The chart's data: `{ segments: [{ name, value, color? }] }`. Each segment's share of the ring is its
47
- * `value` over the sum of all values. Property only: assign a new object to update the chart and animate to it.
56
+ * `value` over the sum of all values. Give it as a property (assign a new object to update the chart and
57
+ * animate to it) or as JSON in the `data` attribute:
58
+ * `<void-donut-chart data='{"segments":[{"name":"Search","value":40},{"name":"Direct","value":25}]}'>`.
59
+ * Invalid JSON draws nothing and is reported by `@voidable/ui/dev`. The property is not reflected to the
60
+ * attribute (the data can be large), and an attribute a server morph leaves unchanged does not animate again.
61
+ * @default { segments: [] }
48
62
  */
49
63
  get data(): DonutChartData;
50
- set data(next: DonutChartData);
64
+ set data(input: DonutChartData);
51
65
  private _phase;
52
66
  private _hoverSegment;
53
67
  private _hoverX;
@@ -71,6 +85,8 @@ export declare class VoidDonutChart extends VoidElement {
71
85
  private _startAnimation;
72
86
  private _tick;
73
87
  render(): TemplateResult<1>;
88
+ /** The data table for assistive technology (and `show-table`), from the data as given, not the animated state. */
89
+ private _table;
74
90
  private _renderHoverTooltip;
75
91
  }
76
92
  declare global {