@voidable/ui 0.9.0 → 0.10.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 (93) hide show
  1. package/dist/base-entry.d.ts +1 -0
  2. package/dist/base.d.ts +2 -1
  3. package/dist/base.js +5 -1
  4. package/dist/chunks/base-BxmMM3B7.js +298 -0
  5. package/dist/chunks/{keyboard-MQpfTX5I.js → keyboard-CEhMSkws.js} +19 -3
  6. package/dist/chunks/{modal-hivQ4YoU.js → modal-CgGp_fCs.js} +3 -3
  7. package/dist/chunks/{overlay-BywGMcDW.js → overlay-hLJ7IQHx.js} +2 -2
  8. package/dist/chunks/{parts-CMQQop0D.js → parts-DI_3VpSy.js} +21 -17
  9. package/dist/chunks/{base-CMruMbxC.js → projection-SnR79EHI.js} +105 -389
  10. package/dist/components/accordion.js +2 -2
  11. package/dist/components/action-input.d.ts +2 -2
  12. package/dist/components/action-input.js +56 -54
  13. package/dist/components/alert.js +2 -2
  14. package/dist/components/avatar.js +13 -11
  15. package/dist/components/badge.js +1 -1
  16. package/dist/components/banner.js +2 -2
  17. package/dist/components/bar-chart.js +31 -29
  18. package/dist/components/breadcrumbs.js +2 -2
  19. package/dist/components/button.js +1 -1
  20. package/dist/components/calendar.js +78 -76
  21. package/dist/components/card.js +1 -1
  22. package/dist/components/carousel.js +18 -17
  23. package/dist/components/checkbox-group.js +13 -12
  24. package/dist/components/checkbox.js +17 -16
  25. package/dist/components/collapsible.js +2 -2
  26. package/dist/components/color-picker.js +26 -24
  27. package/dist/components/combobox.js +17 -16
  28. package/dist/components/compose-input.js +13 -11
  29. package/dist/components/dialog.js +1 -1
  30. package/dist/components/divider.js +11 -9
  31. package/dist/components/donut-chart.js +51 -49
  32. package/dist/components/drawer.d.ts +2 -2
  33. package/dist/components/drawer.js +1 -1
  34. package/dist/components/dropdown-menu.js +4 -4
  35. package/dist/components/editable.js +13 -12
  36. package/dist/components/error-fallback.js +2 -2
  37. package/dist/components/field.js +10 -9
  38. package/dist/components/file-upload.js +19 -17
  39. package/dist/components/gauge.js +88 -86
  40. package/dist/components/hamburger.js +11 -9
  41. package/dist/components/hover-card.js +3 -3
  42. package/dist/components/indicator.js +14 -12
  43. package/dist/components/input.js +41 -39
  44. package/dist/components/line-chart.js +41 -39
  45. package/dist/components/list.js +1 -1
  46. package/dist/components/menu.js +3 -3
  47. package/dist/components/multiselect.js +30 -29
  48. package/dist/components/nav-bar.js +1 -1
  49. package/dist/components/nav-menu.js +20 -19
  50. package/dist/components/number-input.js +17 -15
  51. package/dist/components/pagination.js +22 -20
  52. package/dist/components/panel.js +2 -2
  53. package/dist/components/pin-input.js +32 -30
  54. package/dist/components/popover.js +3 -3
  55. package/dist/components/progress.js +14 -12
  56. package/dist/components/radio-group.js +13 -11
  57. package/dist/components/radio.d.ts +25 -0
  58. package/dist/components/radio.js +78 -29
  59. package/dist/components/scroll-area.js +8 -7
  60. package/dist/components/segmented-control.js +21 -21
  61. package/dist/components/select.js +49 -47
  62. package/dist/components/sidebar.d.ts +2 -2
  63. package/dist/components/sidebar.js +2 -2
  64. package/dist/components/skeleton.js +1 -1
  65. package/dist/components/slider.js +16 -14
  66. package/dist/components/spinner.js +11 -9
  67. package/dist/components/stat.js +19 -17
  68. package/dist/components/status-dot.js +1 -1
  69. package/dist/components/stepper.js +15 -13
  70. package/dist/components/switch.js +14 -12
  71. package/dist/components/table.js +1 -1
  72. package/dist/components/tabs.js +29 -29
  73. package/dist/components/tag.js +9 -8
  74. package/dist/components/tags-input.js +24 -22
  75. package/dist/components/textarea.js +34 -32
  76. package/dist/components/toast.d.ts +19 -2
  77. package/dist/components/toast.js +43 -10
  78. package/dist/components/toggle-group.js +16 -15
  79. package/dist/components/toggle.js +1 -1
  80. package/dist/components/tooltip.js +3 -3
  81. package/dist/components.json +1 -1
  82. package/dist/custom-elements.json +48 -18
  83. package/dist/dev.js +31 -7
  84. package/dist/index.js +1 -1
  85. package/dist/keyboard.d.ts +10 -0
  86. package/dist/llms.txt +1 -1
  87. package/dist/parts.d.ts +5 -0
  88. package/dist/projection-api.d.ts +23 -0
  89. package/dist/projection.d.ts +8 -2
  90. package/dist/reference.md +4 -4
  91. package/dist/vscode.html-custom-data.json +13 -7
  92. package/dist/web-types.json +17 -17
  93. package/package.json +1 -1
@@ -1,12 +1,14 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { n } from "../chunks/form-control-C0vH6gii.js";
4
- import { n as r, t as i } from "../chunks/secret-value-CmTtVkMg.js";
5
- import { html as a, nothing as o } from "lit";
6
- import { property as s } from "lit/decorators.js";
7
- import { live as c } from "lit/directives/live.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";
8
9
  //#region src/components/input.ts
9
- var l = class t extends n(e) {
10
+ r();
11
+ var u = class t extends n(e) {
10
12
  constructor(...e) {
11
13
  super(...e), this.type = "text", this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.size = "md", this.error = "", this.autocomplete = "", this.minlength = void 0, this.maxlength = void 0, this.pattern = "", this.inputMode = "", this.enterKeyHint = "", this.autocapitalize = "", this.spellcheckAttr = null;
12
14
  }
@@ -16,37 +18,37 @@ var l = class t extends n(e) {
16
18
  static {
17
19
  this.editState = ["value"];
18
20
  }
19
- requestUpdate(e, n, i) {
20
- super.requestUpdate(e, n, r(this.type === "password", e, i, () => t.getPropertyOptions("value")));
21
+ requestUpdate(e, n, r) {
22
+ super.requestUpdate(e, n, i(this.type === "password", e, r, () => t.getPropertyOptions("value")));
21
23
  }
22
24
  updated(e) {
23
- super.updated(e), this.type === "password" && e.get("type") !== void 0 && i(this);
25
+ super.updated(e), this.type === "password" && e.get("type") !== void 0 && a(this);
24
26
  }
25
27
  render() {
26
- return a`
28
+ return o`
27
29
  <input
28
30
  type=${this.type}
29
- .value=${c(this.value)}
31
+ .value=${l(this.value)}
30
32
  placeholder=${this.placeholder}
31
33
  ?disabled=${this.disabled}
32
34
  ?readonly=${this.readonly}
33
35
  ?required=${this.required}
34
36
  name=${this.name}
35
- autocomplete=${this.autocomplete || o}
36
- minlength=${this.minlength ?? o}
37
- maxlength=${this.maxlength ?? o}
38
- pattern=${this.pattern || o}
39
- inputmode=${this.inputMode || o}
40
- enterkeyhint=${this.enterKeyHint || o}
41
- autocapitalize=${this.autocapitalize || o}
42
- spellcheck=${this.spellcheckAttr ?? o}
43
- form=${this.formAttr ?? o}
37
+ autocomplete=${this.autocomplete || s}
38
+ minlength=${this.minlength ?? s}
39
+ maxlength=${this.maxlength ?? s}
40
+ pattern=${this.pattern || s}
41
+ inputmode=${this.inputMode || s}
42
+ enterkeyhint=${this.enterKeyHint || s}
43
+ autocapitalize=${this.autocapitalize || s}
44
+ spellcheck=${this.spellcheckAttr ?? s}
45
+ form=${this.formAttr ?? s}
44
46
  aria-invalid=${this.error ? "true" : "false"}
45
47
  @input=${this._onInput}
46
48
  @change=${this._onChange}
47
49
  @keydown=${this._onKeydown}
48
50
  />
49
- ${this.error ? a`<span class="void-input-error">${this.error}</span>` : ""}
51
+ ${this.error ? o`<span class="void-input-error">${this.error}</span>` : ""}
50
52
  `;
51
53
  }
52
54
  formWriteNativeDefault(e) {
@@ -66,7 +68,7 @@ var l = class t extends n(e) {
66
68
  let t = e.target.form;
67
69
  if (!t) return;
68
70
  let n = Array.from(t.elements);
69
- if (n.some((e) => e instanceof HTMLButtonElement && e.type === "submit" || e instanceof HTMLInputElement && (e.type === "submit" || e.type === "image")) || n.filter((e) => e instanceof HTMLInputElement && u.has(e.type)).length <= 1) return;
71
+ if (n.some((e) => e instanceof HTMLButtonElement && e.type === "submit" || e instanceof HTMLInputElement && (e.type === "submit" || e.type === "image")) || n.filter((e) => e instanceof HTMLInputElement && d.has(e.type)).length <= 1) return;
70
72
  let r = [...n, ...Array.from(t.querySelectorAll("void-button"))].find((e) => e.tagName === "VOID-BUTTON" && e.getAttribute("type") === "submit");
71
73
  !r || r.formDisabled || (e.preventDefault(), t.requestSubmit());
72
74
  }
@@ -87,47 +89,47 @@ var l = class t extends n(e) {
87
89
  }));
88
90
  }
89
91
  };
90
- t([s({
92
+ t([c({
91
93
  type: String,
92
94
  reflect: !0
93
- })], l.prototype, "type", void 0), t([s({
95
+ })], u.prototype, "type", void 0), t([c({
94
96
  type: String,
95
97
  reflect: !0
96
- })], l.prototype, "value", void 0), t([s({
98
+ })], u.prototype, "value", void 0), t([c({
97
99
  type: String,
98
100
  reflect: !0
99
- })], l.prototype, "placeholder", void 0), t([s({
101
+ })], u.prototype, "placeholder", void 0), t([c({
100
102
  type: Boolean,
101
103
  reflect: !0
102
- })], l.prototype, "disabled", void 0), t([s({
104
+ })], u.prototype, "disabled", void 0), t([c({
103
105
  type: Boolean,
104
106
  reflect: !0
105
- })], l.prototype, "readonly", void 0), t([s({
107
+ })], u.prototype, "readonly", void 0), t([c({
106
108
  type: Boolean,
107
109
  reflect: !0
108
- })], l.prototype, "required", void 0), t([s({
110
+ })], u.prototype, "required", void 0), t([c({
109
111
  type: String,
110
112
  reflect: !0
111
- })], l.prototype, "name", void 0), t([s({
113
+ })], u.prototype, "name", void 0), t([c({
112
114
  type: String,
113
115
  reflect: !0
114
- })], l.prototype, "size", void 0), t([s({
116
+ })], u.prototype, "size", void 0), t([c({
115
117
  type: String,
116
118
  reflect: !0
117
- })], l.prototype, "error", void 0), t([s({
119
+ })], u.prototype, "error", void 0), t([c({
118
120
  type: String,
119
121
  reflect: !0
120
- })], l.prototype, "autocomplete", void 0), t([s({ type: Number })], l.prototype, "minlength", void 0), t([s({ type: Number })], l.prototype, "maxlength", void 0), t([s({ type: String })], l.prototype, "pattern", void 0), t([s({
122
+ })], 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({
121
123
  type: String,
122
124
  attribute: "inputmode"
123
- })], l.prototype, "inputMode", void 0), t([s({
125
+ })], u.prototype, "inputMode", void 0), t([c({
124
126
  type: String,
125
127
  attribute: "enterkeyhint"
126
- })], l.prototype, "enterKeyHint", void 0), t([s({ type: String })], l.prototype, "autocapitalize", void 0), t([s({
128
+ })], u.prototype, "enterKeyHint", void 0), t([c({ type: String })], u.prototype, "autocapitalize", void 0), t([c({
127
129
  type: String,
128
130
  attribute: "spellcheck"
129
- })], l.prototype, "spellcheckAttr", void 0);
130
- var u = new Set([
131
+ })], u.prototype, "spellcheckAttr", void 0);
132
+ var d = new Set([
131
133
  "text",
132
134
  "search",
133
135
  "url",
@@ -141,6 +143,6 @@ var u = new Set([
141
143
  "datetime-local",
142
144
  "number"
143
145
  ]);
144
- customElements.get("void-input") || customElements.define("void-input", l);
146
+ customElements.get("void-input") || customElements.define("void-input", u);
145
147
  //#endregion
146
- export { l as VoidInput };
148
+ export { u as VoidInput };
@@ -1,28 +1,30 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { n } from "../chunks/scale-_ccSuoYg.js";
4
- import { a as r, i, n as a, r as o } from "../chunks/shape-C_LW7EjG.js";
5
- import { html as s, nothing as c, svg as l } from "lit";
6
- import { property as u, state as d } from "lit/decorators.js";
3
+ import { r as n } from "../chunks/projection-SnR79EHI.js";
4
+ import { n as r } from "../chunks/scale-_ccSuoYg.js";
5
+ import { a as i, i as a, n as o, r as s } from "../chunks/shape-C_LW7EjG.js";
6
+ import { html as c, nothing as l, svg as u } from "lit";
7
+ import { property as d, state as f } from "lit/decorators.js";
7
8
  //#region src/components/line-chart.ts
8
- function f(e) {
9
+ n();
10
+ function p(e) {
9
11
  return 1 - (1 - e) ** 3;
10
12
  }
11
- function p(e) {
13
+ function m(e) {
12
14
  return e === 0 ? "0" : Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(e >= 1e4 ? 0 : 1)}k` : Number.isInteger(e) ? String(e) : e.toFixed(1);
13
15
  }
14
- function m(e) {
16
+ function h(e) {
15
17
  return Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(e >= 1e4 ? 0 : 1)}k` : Math.round(e).toString();
16
18
  }
17
- function h(e) {
19
+ function g(e) {
18
20
  if (e <= 0) return 1;
19
21
  let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
20
22
  return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
21
23
  }
22
- var g = class extends e {
24
+ var _ = class extends e {
23
25
  constructor(...e) {
24
26
  super(...e), this.height = 220, this.showValue = !1, this.variant = "outline", this.interpolation = "linear", this.ariaLabel = "", this._data = { series: [] }, this._phase = "pre", this._display = /* @__PURE__ */ new Map(), this._targets = /* @__PURE__ */ new Map(), this._animFrom = /* @__PURE__ */ new Map(), this._animStart = 0, this._animDuration = 0, this._rafHandle = 0, this._reveal = 0, this._revealFrom = 0, this._hoverIndex = null, this._tick = (e) => {
25
- let t = e - this._animStart, n = Math.min(t / this._animDuration, 1), r = f(n);
27
+ let t = e - this._animStart, n = Math.min(t / this._animDuration, 1), r = p(n);
26
28
  this._reveal = this._revealFrom + (1 - this._revealFrom) * r;
27
29
  for (let [e, t] of this._targets) {
28
30
  let n = this._animFrom.get(e) ?? 0;
@@ -81,8 +83,8 @@ var g = class extends e {
81
83
  }
82
84
  render() {
83
85
  let { series: e, labels: t = [] } = this._data;
84
- if (e.length === 0) return s`<svg viewBox="0 0 600 ${this.height}" role="img" aria-label=${this.ariaLabel || "Line chart"}></svg>`;
85
- let u = this.height - 16 - 32, d = Math.max(...e.map((e) => e.values.length)), f = e.flatMap((e) => e.values).filter(Number.isFinite), g = h(Math.max(...f, 0) * 1.1) || 1, _ = new n([0, Math.max(0, d - 1)], [40, 584]), v = new n([0, g], [16 + u, 16]), y = v.ticks(5), b = 16 + u, x = getComputedStyle(this), S = (parseFloat(x.getPropertyValue("--void-radius-sm")) || 0) > 0 && this.interpolation === "linear", C = S ? r : o, w = S ? i : a, T = e.map((e, t) => {
86
+ if (e.length === 0) return c`<svg viewBox="0 0 600 ${this.height}" role="img" aria-label=${this.ariaLabel || "Line chart"}></svg>`;
87
+ let n = this.height - 16 - 32, d = Math.max(...e.map((e) => e.values.length)), f = e.flatMap((e) => e.values).filter(Number.isFinite), p = g(Math.max(...f, 0) * 1.1) || 1, _ = new r([0, Math.max(0, d - 1)], [40, 584]), v = new r([0, p], [16 + n, 16]), y = v.ticks(5), b = 16 + n, x = getComputedStyle(this), S = (parseFloat(x.getPropertyValue("--void-radius-sm")) || 0) > 0 && this.interpolation === "linear", C = S ? i : s, w = S ? a : o, T = e.map((e, t) => {
86
88
  let n = [];
87
89
  for (let r = 0; r < e.values.length; r++) {
88
90
  let e = this._display.get(this._key(t, r)) ?? 0;
@@ -95,7 +97,7 @@ var g = class extends e {
95
97
  }
96
98
  return n;
97
99
  });
98
- return s`
100
+ return c`
99
101
  <svg
100
102
  viewBox="0 0 ${600} ${this.height}"
101
103
  preserveAspectRatio="none"
@@ -107,17 +109,17 @@ var g = class extends e {
107
109
  <g class="void-line-chart-grid">
108
110
  ${y.map((e) => {
109
111
  let t = v.scale(e);
110
- return l`<line x1=${40} x2=${584} y1=${t} y2=${t}></line>`;
112
+ return u`<line x1=${40} x2=${584} y1=${t} y2=${t}></line>`;
111
113
  })}
112
114
  </g>
113
115
 
114
116
  <g class="void-line-chart-y-axis">
115
- ${y.map((e) => l`<text x=${32} y=${v.scale(e)} dy="0.32em" text-anchor="end">${p(e)}</text>`)}
117
+ ${y.map((e) => u`<text x=${32} y=${v.scale(e)} dy="0.32em" text-anchor="end">${m(e)}</text>`)}
116
118
  </g>
117
119
 
118
120
  ${e.map((e, t) => {
119
121
  let n = e.color ?? `var(--void-chart-series-${t % 6 + 1})`, r = T[t];
120
- return l`
122
+ return u`
121
123
  <g class="void-line-chart-series" style="--series-color: ${n}">
122
124
  <path class="void-line-chart-area" d=${w(r, b)}></path>
123
125
  <path class="void-line-chart-line" d=${C(r)}></path>
@@ -125,25 +127,25 @@ var g = class extends e {
125
127
  `;
126
128
  })}
127
129
 
128
- ${this.showValue ? e.map((e, t) => l`
130
+ ${this.showValue ? e.map((e, t) => u`
129
131
  <g class="void-line-chart-values">
130
132
  ${e.values.map((e, n) => {
131
133
  let r = this._display.get(this._key(t, n)) ?? 0;
132
- return l`<text x=${_.scale(n)} y=${v.scale(r) - 8} text-anchor="middle">${m(r)}</text>`;
134
+ return u`<text x=${_.scale(n)} y=${v.scale(r) - 8} text-anchor="middle">${h(r)}</text>`;
133
135
  })}
134
136
  </g>
135
- `) : c}
137
+ `) : l}
136
138
 
137
139
  <g class="void-line-chart-x-axis">
138
- ${t.slice(0, d).map((e, t) => l`<text x=${_.scale(t)} y=${16 + u + 18} text-anchor="middle">${e}</text>`)}
140
+ ${t.slice(0, d).map((e, t) => u`<text x=${_.scale(t)} y=${16 + n + 18} text-anchor="middle">${e}</text>`)}
139
141
  </g>
140
142
 
141
- ${this._hoverIndex !== null && this._hoverIndex < d ? this._renderHover(e, t, _, v, this._hoverIndex, 16, u, 40, 544) : c}
143
+ ${this._hoverIndex !== null && this._hoverIndex < d ? this._renderHover(e, t, _, v, this._hoverIndex, 16, n, 40, 544) : l}
142
144
  </svg>
143
145
  `;
144
146
  }
145
147
  _renderHover(e, t, n, r, i, a, o, s, c) {
146
- let u = n.scale(i), d = e.map((e, t) => {
148
+ let l = n.scale(i), d = e.map((e, t) => {
147
149
  let n = this._display.get(this._key(t, i)) ?? 0, a = e.color ?? `var(--void-chart-series-${t % 6 + 1})`;
148
150
  return {
149
151
  name: e.name,
@@ -151,64 +153,64 @@ var g = class extends e {
151
153
  color: a,
152
154
  y: r.scale(n)
153
155
  };
154
- }), f = 16 + d.length * 14 + 16, p = u + 12 + 140 > s + c ? u - 12 - 140 : u + 12, h = Math.max(a, Math.min(a + o - f, a + 8)), g = t[i] ?? String(i);
155
- return l`
156
+ }), f = 16 + d.length * 14 + 16, p = l + 12 + 140 > s + c ? l - 12 - 140 : l + 12, m = Math.max(a, Math.min(a + o - f, a + 8)), g = t[i] ?? String(i);
157
+ return u`
156
158
  <g class="void-line-chart-hover">
157
159
  <line
158
160
  class="void-line-chart-hairline"
159
- x1=${u} x2=${u}
161
+ x1=${l} x2=${l}
160
162
  y1=${a} y2=${a + o}
161
163
  ></line>
162
- ${d.map((e) => l`
164
+ ${d.map((e) => u`
163
165
  <rect
164
166
  class="void-line-chart-marker"
165
- x=${u - 5} y=${e.y - 5}
167
+ x=${l - 5} y=${e.y - 5}
166
168
  width="10" height="10"
167
169
  style="--marker-color: ${e.color}"
168
170
  ></rect>
169
171
  `)}
170
172
  <rect
171
173
  class="void-line-chart-tooltip-bg"
172
- x=${p} y=${h}
174
+ x=${p} y=${m}
173
175
  width=${140} height=${f}
174
176
  rx="6" ry="6"
175
177
  ></rect>
176
178
  <text
177
179
  class="void-line-chart-tooltip-label"
178
180
  x=${p + 8}
179
- y=${h + 8 + 10}
181
+ y=${m + 8 + 10}
180
182
  >${g}</text>
181
- ${d.map((e, t) => l`
183
+ ${d.map((e, t) => u`
182
184
  <circle
183
185
  class="void-line-chart-tooltip-swatch"
184
186
  cx=${p + 8 + 5}
185
- cy=${h + 16 + 8 + t * 14 + 4}
187
+ cy=${m + 16 + 8 + t * 14 + 4}
186
188
  r="4"
187
189
  style="--swatch-color: ${e.color}"
188
190
  ></circle>
189
191
  <text
190
192
  class="void-line-chart-tooltip-name"
191
193
  x=${p + 8 + 14}
192
- y=${h + 16 + 8 + t * 14 + 8}
194
+ y=${m + 16 + 8 + t * 14 + 8}
193
195
  >${e.name}</text>
194
196
  <text
195
197
  class="void-line-chart-tooltip-value"
196
198
  x=${p + 140 - 8}
197
- y=${h + 16 + 8 + t * 14 + 8}
199
+ y=${m + 16 + 8 + t * 14 + 8}
198
200
  text-anchor="end"
199
- >${m(e.value)}</text>
201
+ >${h(e.value)}</text>
200
202
  `)}
201
203
  </g>
202
204
  `;
203
205
  }
204
206
  };
205
- t([u({
207
+ t([d({
206
208
  type: Number,
207
209
  reflect: !0
208
- })], g.prototype, "height", void 0), t([u({
210
+ })], _.prototype, "height", void 0), t([d({
209
211
  type: Boolean,
210
212
  attribute: "show-value",
211
213
  reflect: !0
212
- })], g.prototype, "showValue", void 0), t([u({ reflect: !0 })], g.prototype, "variant", void 0), t([u({ reflect: !0 })], g.prototype, "interpolation", void 0), t([u({ attribute: "aria-label" })], g.prototype, "ariaLabel", void 0), t([d()], g.prototype, "_phase", void 0), t([d()], g.prototype, "_hoverIndex", void 0), customElements.get("void-line-chart") || customElements.define("void-line-chart", g);
214
+ })], _.prototype, "showValue", void 0), t([d({ reflect: !0 })], _.prototype, "variant", void 0), t([d({ reflect: !0 })], _.prototype, "interpolation", void 0), t([d({ attribute: "aria-label" })], _.prototype, "ariaLabel", void 0), t([f()], _.prototype, "_phase", void 0), t([f()], _.prototype, "_hoverIndex", void 0), customElements.get("void-line-chart") || customElements.define("void-line-chart", _);
213
215
  //#endregion
214
- export { g as VoidLineChart };
216
+ export { _ as VoidLineChart };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.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/list.ts
@@ -1,8 +1,8 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { t as n } from "../chunks/keyboard-activation-CV0m4hkn.js";
4
- import { n as r } from "../chunks/parts-CMQQop0D.js";
5
- import { i, r as a, t as o } from "../chunks/keyboard-MQpfTX5I.js";
4
+ import { n as r } from "../chunks/parts-DI_3VpSy.js";
5
+ import { a as i, i as a, t as o } from "../chunks/keyboard-CEhMSkws.js";
6
6
  import { property as s } from "lit/decorators.js";
7
7
  //#region src/components/menu.ts
8
8
  var c = class extends e {
@@ -1,14 +1,15 @@
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/form-control-C0vH6gii.js";
4
- import { n as i } from "../chunks/parts-CMQQop0D.js";
5
- import { i as a, n as o, r as s, t as c } from "../chunks/keyboard-MQpfTX5I.js";
6
- import { t as l } from "../chunks/overlay-BywGMcDW.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.js";
2
+ import { t } from "../chunks/decorate-CaYbmmmm.js";
3
+ import { t as n } from "../chunks/form-control-C0vH6gii.js";
4
+ import { t as r } from "../chunks/projection-SnR79EHI.js";
5
+ import { n as i } from "../chunks/parts-DI_3VpSy.js";
6
+ import { a, i as o, n as s, t as c } from "../chunks/keyboard-CEhMSkws.js";
7
+ import { t as l } from "../chunks/overlay-hLJ7IQHx.js";
7
8
  import { n as u } from "../chunks/value-list-CH6GjYXM.js";
8
9
  import { html as d, nothing as f } from "lit";
9
10
  import { property as p } from "lit/decorators.js";
10
11
  //#region src/components/multiselect.ts
11
- var m = class extends t {
12
+ var m = class extends e {
12
13
  constructor(...e) {
13
14
  super(...e), this.value = "", this.selected = !1, this.disabled = !1, this.label = "";
14
15
  }
@@ -21,23 +22,23 @@ var m = class extends t {
21
22
  ].some((t) => e.has(t) && e.get(t) !== void 0) && (this.closest("void-multiselect") ?? this.closest("void-combobox"))?.requestUpdate();
22
23
  }
23
24
  };
24
- n([p({
25
+ t([p({
25
26
  type: String,
26
27
  reflect: !0
27
- })], m.prototype, "value", void 0), n([p({
28
+ })], m.prototype, "value", void 0), t([p({
28
29
  type: Boolean,
29
30
  reflect: !0
30
- })], m.prototype, "selected", void 0), n([p({
31
+ })], m.prototype, "selected", void 0), t([p({
31
32
  type: Boolean,
32
33
  reflect: !0
33
- })], m.prototype, "disabled", void 0), n([p({ type: String })], m.prototype, "label", void 0), customElements.get("void-option") || customElements.define("void-option", m);
34
+ })], m.prototype, "disabled", void 0), t([p({ type: String })], m.prototype, "label", void 0), customElements.get("void-option") || customElements.define("void-option", m);
34
35
  var h = (e) => e instanceof m ? e.value : e.getAttribute("value") ?? "", g = (e) => e instanceof m ? e.selected : e.hasAttribute("selected");
35
36
  function _(e) {
36
37
  return e.getAttribute("label") || e.textContent?.trim() || e.getAttribute("value") || "";
37
38
  }
38
- var v = class extends r(t) {
39
- constructor(...t) {
40
- super(...t), this.placeholder = "Select...", this.disabled = !1, this.size = "md", this.error = "", this.name = "", this.open = !1, this._active = null, this._typeahead = new c(), this._wiring = !1, this._projection = new e(this, { placement: "start" }), this._parts = new i(this, {
39
+ var v = class extends n(e) {
40
+ constructor(...e) {
41
+ super(...e), this.placeholder = "Select...", this.disabled = !1, this.size = "md", this.error = "", this.name = "", this.open = !1, this._active = null, this._typeahead = new c(), this._wiring = !1, this._projection = new r(this, { placement: "start" }), this._parts = new i(this, {
41
42
  tags: ["void-multiselect-content", "void-option"],
42
43
  onChange: () => {
43
44
  this._wire(), this._wiring || this.requestUpdate();
@@ -75,7 +76,7 @@ var v = class extends r(t) {
75
76
  if (this.formDisabled || e.target !== e.currentTarget || e.isComposing) return;
76
77
  let t = this._options.map((e) => e.disabled), n = e.key;
77
78
  if (!this.open) {
78
- n === "Home" || n === "End" ? (e.preventDefault(), this._openList(n === "Home" ? "first" : "last")) : n === "ArrowUp" ? (e.preventDefault(), this._openList("first")) : n === "Enter" || n === " " || n === "ArrowDown" ? (e.preventDefault(), this._openList("selected")) : s(e) && (e.preventDefault(), this._openList("selected"), this._typeaheadTo(e.key));
79
+ n === "Home" || n === "End" ? (e.preventDefault(), this._openList(n === "Home" ? "first" : "last")) : n === "ArrowUp" ? (e.preventDefault(), this._openList("first")) : n === "Enter" || n === " " || n === "ArrowDown" ? (e.preventDefault(), this._openList("selected")) : o(e) && (e.preventDefault(), this._openList("selected"), this._typeaheadTo(e.key));
79
80
  return;
80
81
  }
81
82
  switch (n) {
@@ -92,10 +93,10 @@ var v = class extends r(t) {
92
93
  e.preventDefault(), this._moveActive(this._stepBy(-10));
93
94
  break;
94
95
  case "Home":
95
- e.preventDefault(), this._moveActive(o(t, 1));
96
+ e.preventDefault(), this._moveActive(s(t, 1));
96
97
  break;
97
98
  case "End":
98
- e.preventDefault(), this._moveActive(o(t, -1));
99
+ e.preventDefault(), this._moveActive(s(t, -1));
99
100
  break;
100
101
  case "Enter":
101
102
  case " ":
@@ -107,7 +108,7 @@ var v = class extends r(t) {
107
108
  case "Tab":
108
109
  this._close("blur");
109
110
  break;
110
- default: s(e) && (e.preventDefault(), this._typeaheadTo(e.key));
111
+ default: o(e) && (e.preventDefault(), this._typeaheadTo(e.key));
111
112
  }
112
113
  }, this._onFocusOut = (e) => {
113
114
  this.open && !this.contains(e.relatedTarget) && this._close("blur");
@@ -212,7 +213,7 @@ var v = class extends r(t) {
212
213
  _openList(e, t = "keyboard") {
213
214
  if (this._overlay.requestOpen(t), !this.open) return;
214
215
  let n = this._options, r = n.map((e) => e.disabled), i = -1;
215
- e === "first" ? i = o(r, 1) : e === "last" ? i = o(r, -1) : e === "selected" && (i = n.findIndex((e) => e.selected && !e.disabled), i < 0 && (i = o(r, 1))), this._active = i >= 0 ? n[i] : null, this.requestUpdate();
216
+ e === "first" ? i = s(r, 1) : e === "last" ? i = s(r, -1) : e === "selected" && (i = n.findIndex((e) => e.selected && !e.disabled), i < 0 && (i = s(r, 1))), this._active = i >= 0 ? n[i] : null, this.requestUpdate();
216
217
  }
217
218
  _close(e = "api") {
218
219
  this.open && this._overlay.requestClose(e);
@@ -221,13 +222,13 @@ var v = class extends r(t) {
221
222
  e < 0 || (this._active = this._options[e], this.requestUpdate());
222
223
  }
223
224
  _stepBy(e) {
224
- let t = this._options, n = t.map((e) => e.disabled), r = this._active ? t.indexOf(this._active) : -1, i = e > 0 ? 1 : -1, s = r;
225
- for (let t = r, o = Math.abs(e); o > 0;) {
225
+ let t = this._options, n = t.map((e) => e.disabled), r = this._active ? t.indexOf(this._active) : -1, i = e > 0 ? 1 : -1, o = r;
226
+ for (let t = r, s = Math.abs(e); s > 0;) {
226
227
  let e = a(n, t, i, !1);
227
228
  if (e < 0) break;
228
- s = t = e, o--;
229
+ o = t = e, s--;
229
230
  }
230
- return s >= 0 ? s : o(n, i);
231
+ return o >= 0 ? o : s(n, i);
231
232
  }
232
233
  _typeaheadTo(e) {
233
234
  let t = this._options, n = this._active ? t.indexOf(this._active) : -1, r = this._typeahead.match(e, t.map((e) => _(e)), t.map((e) => e.disabled), n);
@@ -241,22 +242,22 @@ var v = class extends r(t) {
241
242
  }));
242
243
  }
243
244
  };
244
- n([p({ type: String })], v.prototype, "placeholder", void 0), n([p({
245
+ t([p({ type: String })], v.prototype, "placeholder", void 0), t([p({
245
246
  type: Boolean,
246
247
  reflect: !0
247
- })], v.prototype, "disabled", void 0), n([p({
248
+ })], v.prototype, "disabled", void 0), t([p({
248
249
  type: String,
249
250
  reflect: !0
250
- })], v.prototype, "size", void 0), n([p({
251
+ })], v.prototype, "size", void 0), t([p({
251
252
  type: String,
252
253
  reflect: !0
253
- })], v.prototype, "error", void 0), n([p({
254
+ })], v.prototype, "error", void 0), t([p({
254
255
  type: String,
255
256
  reflect: !0
256
- })], v.prototype, "name", void 0), n([p({
257
+ })], v.prototype, "name", void 0), t([p({
257
258
  type: Boolean,
258
259
  reflect: !0
259
- })], v.prototype, "open", void 0), n([p({
260
+ })], v.prototype, "open", void 0), t([p({
260
261
  converter: u,
261
262
  reflect: !0
262
263
  })], v.prototype, "value", null), customElements.get("void-multiselect") || customElements.define("void-multiselect", v);
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.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/nav-bar.ts
@@ -1,23 +1,24 @@
1
- import { t as e } from "../chunks/base-CMruMbxC.js";
1
+ import { t as e } from "../chunks/base-BxmMM3B7.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { i as n, n as r } from "../chunks/parts-CMQQop0D.js";
4
- import { property as i } from "lit/decorators.js";
3
+ import { i as n, n as r } from "../chunks/parts-DI_3VpSy.js";
4
+ import { r as i } from "../chunks/keyboard-CEhMSkws.js";
5
+ import { property as a } from "lit/decorators.js";
5
6
  //#region src/components/nav-menu.ts
6
- var a = class extends e {
7
+ var o = class extends e {
7
8
  constructor(...e) {
8
9
  super(...e), this.orientation = "horizontal", this.width = "", this._handleItemOpen = (e) => {
9
10
  let t = e.target;
10
- if (!(t instanceof o)) return;
11
+ if (!(t instanceof s)) return;
11
12
  let n = e.detail?.reason === "hover" ? "hover" : "outside";
12
13
  for (let e of this._getItems()) e !== t && e.open && e._closeDropdown(n);
13
14
  }, this._handleKeydown = (e) => {
14
15
  let t = this._getItems();
15
16
  if (!t.length) return;
16
- let n = this.orientation === "horizontal", r = n ? "ArrowRight" : "ArrowDown", i = n ? "ArrowLeft" : "ArrowUp";
17
- if (e.key === r || e.key === i) {
18
- let n = t.map((e) => e._control()).filter((e) => !!e), i = n.indexOf(document.activeElement);
19
- if (i < 0) return;
20
- e.preventDefault(), e.key === r ? (n[i + 1] ?? n[0])?.focus() : (n[i - 1] ?? n[n.length - 1])?.focus();
17
+ let n = this.orientation === "horizontal", r = i(this), a = n ? r.next : "ArrowDown", o = n ? r.prev : "ArrowUp";
18
+ if (e.key === a || e.key === o) {
19
+ let n = t.map((e) => e._control()).filter((e) => !!e), r = n.indexOf(document.activeElement);
20
+ if (r < 0) return;
21
+ e.preventDefault(), e.key === a ? (n[r + 1] ?? n[0])?.focus() : (n[r - 1] ?? n[n.length - 1])?.focus();
21
22
  return;
22
23
  }
23
24
  if (e.key === "Escape") for (let e of t) e.open && (e._closeDropdown("escape"), e._control()?.focus());
@@ -36,14 +37,14 @@ var a = class extends e {
36
37
  return Array.from(this.querySelectorAll("void-nav-menu-item")).filter((e) => e.closest("void-nav-menu") === this);
37
38
  }
38
39
  };
39
- t([i({
40
+ t([a({
40
41
  type: String,
41
42
  reflect: !0
42
- })], a.prototype, "orientation", void 0), t([i({
43
+ })], o.prototype, "orientation", void 0), t([a({
43
44
  type: String,
44
45
  reflect: !0
45
- })], a.prototype, "width", void 0), customElements.get("void-nav-menu") || customElements.define("void-nav-menu", a);
46
- var o = class extends e {
46
+ })], o.prototype, "width", void 0), customElements.get("void-nav-menu") || customElements.define("void-nav-menu", o);
47
+ var s = class extends e {
47
48
  constructor(...e) {
48
49
  super(...e), this.open = !1, this.disabled = !1, this.current = !1, this._openedByHover = !1, this._parts = new r(this, {
49
50
  tags: ["void-nav-menu-trigger", "void-nav-menu-content"],
@@ -106,15 +107,15 @@ var o = class extends e {
106
107
  })));
107
108
  }
108
109
  };
109
- t([i({
110
+ t([a({
110
111
  type: Boolean,
111
112
  reflect: !0
112
- })], o.prototype, "open", void 0), t([i({
113
+ })], s.prototype, "open", void 0), t([a({
113
114
  type: Boolean,
114
115
  reflect: !0
115
- })], o.prototype, "disabled", void 0), t([i({
116
+ })], s.prototype, "disabled", void 0), t([a({
116
117
  type: Boolean,
117
118
  reflect: !0
118
- })], o.prototype, "current", void 0), customElements.get("void-nav-menu-item") || customElements.define("void-nav-menu-item", o);
119
+ })], s.prototype, "current", void 0), customElements.get("void-nav-menu-item") || customElements.define("void-nav-menu-item", s);
119
120
  //#endregion
120
- export { a as VoidNavMenu, o as VoidNavMenuItem };
121
+ export { o as VoidNavMenu, s as VoidNavMenuItem };