@voidable/ui 0.8.0 → 0.9.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 (69) hide show
  1. package/README.md +8 -0
  2. package/dist/chunks/{modal-D_YVy2vg.js → modal-hivQ4YoU.js} +1 -1
  3. package/dist/chunks/{parts-D30c8OoG.js → parts-CMQQop0D.js} +4 -1
  4. package/dist/chunks/secret-value-CmTtVkMg.js +14 -0
  5. package/dist/chunks/value-list-CH6GjYXM.js +28 -0
  6. package/dist/components/accordion.js +1 -1
  7. package/dist/components/action-input.d.ts +6 -2
  8. package/dist/components/action-input.js +55 -45
  9. package/dist/components/alert.js +1 -1
  10. package/dist/components/banner.js +1 -1
  11. package/dist/components/breadcrumbs.js +1 -1
  12. package/dist/components/carousel.js +1 -1
  13. package/dist/components/checkbox-group.d.ts +10 -0
  14. package/dist/components/checkbox-group.js +30 -18
  15. package/dist/components/checkbox.d.ts +2 -2
  16. package/dist/components/collapsible.js +1 -1
  17. package/dist/components/color-picker.d.ts +2 -2
  18. package/dist/components/combobox.d.ts +4 -2
  19. package/dist/components/combobox.js +8 -5
  20. package/dist/components/compose-input.d.ts +1 -1
  21. package/dist/components/compose-input.js +4 -1
  22. package/dist/components/dialog.js +1 -1
  23. package/dist/components/drawer.js +1 -1
  24. package/dist/components/dropdown-menu.js +1 -1
  25. package/dist/components/editable.d.ts +1 -1
  26. package/dist/components/error-fallback.js +1 -1
  27. package/dist/components/gauge.js +4 -1
  28. package/dist/components/hover-card.js +1 -1
  29. package/dist/components/input.d.ts +6 -2
  30. package/dist/components/input.js +43 -33
  31. package/dist/components/menu.js +1 -1
  32. package/dist/components/multiselect.d.ts +9 -0
  33. package/dist/components/multiselect.js +47 -38
  34. package/dist/components/nav-menu.js +1 -1
  35. package/dist/components/number-input.d.ts +2 -2
  36. package/dist/components/panel.js +1 -1
  37. package/dist/components/pin-input.d.ts +6 -2
  38. package/dist/components/pin-input.js +27 -17
  39. package/dist/components/popover.js +1 -1
  40. package/dist/components/radio-group.d.ts +2 -2
  41. package/dist/components/radio-group.js +4 -1
  42. package/dist/components/segmented-control.d.ts +1 -1
  43. package/dist/components/select.d.ts +67 -16
  44. package/dist/components/select.js +172 -47
  45. package/dist/components/slider.d.ts +2 -2
  46. package/dist/components/slider.js +4 -1
  47. package/dist/components/switch.d.ts +1 -1
  48. package/dist/components/tabs.js +1 -1
  49. package/dist/components/tags-input.d.ts +1 -1
  50. package/dist/components/tags-input.js +22 -18
  51. package/dist/components/textarea.d.ts +2 -2
  52. package/dist/components/textarea.js +4 -1
  53. package/dist/components/toast.js +1 -1
  54. package/dist/components/toggle-group.d.ts +2 -2
  55. package/dist/components/toggle.js +4 -1
  56. package/dist/components/tooltip.js +1 -1
  57. package/dist/components.json +3 -3
  58. package/dist/custom-elements.json +85 -49
  59. package/dist/dev/types.d.ts +2 -3
  60. package/dist/dev.js +50 -48
  61. package/dist/llms.txt +125 -0
  62. package/dist/parts.d.ts +3 -1
  63. package/dist/reference.md +4575 -0
  64. package/dist/secret-value.d.ts +17 -0
  65. package/dist/types/elements.d.ts +2 -2
  66. package/dist/value-list.d.ts +14 -0
  67. package/dist/vscode.html-custom-data.json +33 -19
  68. package/dist/web-types.json +57 -37
  69. package/package.json +5 -3
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { n, t as r } from "../chunks/parts-D30c8OoG.js";
3
+ import { n, t as r } from "../chunks/parts-CMQQop0D.js";
4
4
  import { property as i } from "lit/decorators.js";
5
5
  //#region src/components/error-fallback.ts
6
6
  var a = [
@@ -360,7 +360,10 @@ var m = class extends e {
360
360
  `;
361
361
  }
362
362
  };
363
- t([a()], m.prototype, "unit", void 0), t([a({ type: Number })], m.prototype, "value", void 0), t([a({ type: Number })], m.prototype, "min", void 0), t([a({ type: Number })], m.prototype, "max", void 0), t([a({
363
+ t([a()], m.prototype, "unit", void 0), t([a({
364
+ type: Number,
365
+ reflect: !0
366
+ })], m.prototype, "value", void 0), t([a({ type: Number })], m.prototype, "min", void 0), t([a({ type: Number })], m.prototype, "max", void 0), t([a({
364
367
  type: Number,
365
368
  reflect: !0
366
369
  })], m.prototype, "size", void 0), t([a({ type: Number })], m.prototype, "thickness", void 0), t([a({ reflect: !0 })], m.prototype, "circular", void 0), t([a({ reflect: !0 })], m.prototype, "variant", void 0), t([a({
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { i as n, n as r } from "../chunks/parts-D30c8OoG.js";
3
+ import { i as n, n as r } from "../chunks/parts-CMQQop0D.js";
4
4
  import { t as i } from "../chunks/overlay-BywGMcDW.js";
5
5
  import { property as a } from "lit/decorators.js";
6
6
  //#region src/components/hover-card.ts
@@ -1,3 +1,4 @@
1
+ import { PropertyDeclaration, PropertyValues } from 'lit';
1
2
  import { VoidElement } from '../base.js';
2
3
  declare const VoidInput_base: (new (...args: any[]) => import('../form-control.js').VoidNativeFormControl) & typeof VoidElement;
3
4
  /** Single-line text entry for login forms, search fields, and structured data capture. */
@@ -9,8 +10,9 @@ export declare class VoidInput extends VoidInput_base {
9
10
  /** Native input type. Every text-like type is forwarded to the native control. */
10
11
  type: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'datetime-local' | 'month' | 'time' | 'week';
11
12
  /**
12
- * The text in the field. As an attribute it is the initial value (and the form's reset target); read
13
- * or set the `value` property for the current text.
13
+ * The text in the field. Reflected to the `value` attribute as it changes, and setting the attribute
14
+ * sets it; the form's reset target stays the value the field started with. A `type="password"` field
15
+ * does not reflect: its attribute is only ever the initial value.
14
16
  */
15
17
  value: string;
16
18
  /**
@@ -65,6 +67,8 @@ export declare class VoidInput extends VoidInput_base {
65
67
  * forwarded to the native control: the native enumerated attribute, not a boolean.
66
68
  */
67
69
  protected spellcheckAttr: string | null;
70
+ requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void;
71
+ protected updated(changed: PropertyValues): void;
68
72
  render(): import('lit').TemplateResult<1>;
69
73
  protected formWriteNativeDefault(state: unknown): void;
70
74
  protected formReadNative(): void;
@@ -1,11 +1,12 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { 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 { 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";
7
8
  //#region src/components/input.ts
8
- var s = class extends n(e) {
9
+ var l = class t extends n(e) {
9
10
  constructor(...e) {
10
11
  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;
11
12
  }
@@ -15,31 +16,37 @@ var s = class extends n(e) {
15
16
  static {
16
17
  this.editState = ["value"];
17
18
  }
19
+ requestUpdate(e, n, i) {
20
+ super.requestUpdate(e, n, r(this.type === "password", e, i, () => t.getPropertyOptions("value")));
21
+ }
22
+ updated(e) {
23
+ super.updated(e), this.type === "password" && e.get("type") !== void 0 && i(this);
24
+ }
18
25
  render() {
19
- return r`
26
+ return a`
20
27
  <input
21
28
  type=${this.type}
22
- .value=${o(this.value)}
29
+ .value=${c(this.value)}
23
30
  placeholder=${this.placeholder}
24
31
  ?disabled=${this.disabled}
25
32
  ?readonly=${this.readonly}
26
33
  ?required=${this.required}
27
34
  name=${this.name}
28
- autocomplete=${this.autocomplete || i}
29
- minlength=${this.minlength ?? i}
30
- maxlength=${this.maxlength ?? i}
31
- pattern=${this.pattern || i}
32
- inputmode=${this.inputMode || i}
33
- enterkeyhint=${this.enterKeyHint || i}
34
- autocapitalize=${this.autocapitalize || i}
35
- spellcheck=${this.spellcheckAttr ?? i}
36
- form=${this.formAttr ?? i}
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
44
  aria-invalid=${this.error ? "true" : "false"}
38
45
  @input=${this._onInput}
39
46
  @change=${this._onChange}
40
47
  @keydown=${this._onKeydown}
41
48
  />
42
- ${this.error ? r`<span class="void-input-error">${this.error}</span>` : ""}
49
+ ${this.error ? a`<span class="void-input-error">${this.error}</span>` : ""}
43
50
  `;
44
51
  }
45
52
  formWriteNativeDefault(e) {
@@ -59,7 +66,7 @@ var s = class extends n(e) {
59
66
  let t = e.target.form;
60
67
  if (!t) return;
61
68
  let n = Array.from(t.elements);
62
- 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 && c.has(e.type)).length <= 1) return;
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;
63
70
  let r = [...n, ...Array.from(t.querySelectorAll("void-button"))].find((e) => e.tagName === "VOID-BUTTON" && e.getAttribute("type") === "submit");
64
71
  !r || r.formDisabled || (e.preventDefault(), t.requestSubmit());
65
72
  }
@@ -80,44 +87,47 @@ var s = class extends n(e) {
80
87
  }));
81
88
  }
82
89
  };
83
- t([a({
90
+ t([s({
91
+ type: String,
92
+ reflect: !0
93
+ })], l.prototype, "type", void 0), t([s({
84
94
  type: String,
85
95
  reflect: !0
86
- })], s.prototype, "type", void 0), t([a({ type: String })], s.prototype, "value", void 0), t([a({
96
+ })], l.prototype, "value", void 0), t([s({
87
97
  type: String,
88
98
  reflect: !0
89
- })], s.prototype, "placeholder", void 0), t([a({
99
+ })], l.prototype, "placeholder", void 0), t([s({
90
100
  type: Boolean,
91
101
  reflect: !0
92
- })], s.prototype, "disabled", void 0), t([a({
102
+ })], l.prototype, "disabled", void 0), t([s({
93
103
  type: Boolean,
94
104
  reflect: !0
95
- })], s.prototype, "readonly", void 0), t([a({
105
+ })], l.prototype, "readonly", void 0), t([s({
96
106
  type: Boolean,
97
107
  reflect: !0
98
- })], s.prototype, "required", void 0), t([a({
108
+ })], l.prototype, "required", void 0), t([s({
99
109
  type: String,
100
110
  reflect: !0
101
- })], s.prototype, "name", void 0), t([a({
111
+ })], l.prototype, "name", void 0), t([s({
102
112
  type: String,
103
113
  reflect: !0
104
- })], s.prototype, "size", void 0), t([a({
114
+ })], l.prototype, "size", void 0), t([s({
105
115
  type: String,
106
116
  reflect: !0
107
- })], s.prototype, "error", void 0), t([a({
117
+ })], l.prototype, "error", void 0), t([s({
108
118
  type: String,
109
119
  reflect: !0
110
- })], s.prototype, "autocomplete", void 0), t([a({ type: Number })], s.prototype, "minlength", void 0), t([a({ type: Number })], s.prototype, "maxlength", void 0), t([a({ type: String })], s.prototype, "pattern", void 0), t([a({
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({
111
121
  type: String,
112
122
  attribute: "inputmode"
113
- })], s.prototype, "inputMode", void 0), t([a({
123
+ })], l.prototype, "inputMode", void 0), t([s({
114
124
  type: String,
115
125
  attribute: "enterkeyhint"
116
- })], s.prototype, "enterKeyHint", void 0), t([a({ type: String })], s.prototype, "autocapitalize", void 0), t([a({
126
+ })], l.prototype, "enterKeyHint", void 0), t([s({ type: String })], l.prototype, "autocapitalize", void 0), t([s({
117
127
  type: String,
118
128
  attribute: "spellcheck"
119
- })], s.prototype, "spellcheckAttr", void 0);
120
- var c = new Set([
129
+ })], l.prototype, "spellcheckAttr", void 0);
130
+ var u = new Set([
121
131
  "text",
122
132
  "search",
123
133
  "url",
@@ -131,6 +141,6 @@ var c = new Set([
131
141
  "datetime-local",
132
142
  "number"
133
143
  ]);
134
- customElements.get("void-input") || customElements.define("void-input", s);
144
+ customElements.get("void-input") || customElements.define("void-input", l);
135
145
  //#endregion
136
- export { s as VoidInput };
146
+ export { l as VoidInput };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.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-D30c8OoG.js";
4
+ import { n as r } from "../chunks/parts-CMQQop0D.js";
5
5
  import { i, r as a, t as o } from "../chunks/keyboard-MQpfTX5I.js";
6
6
  import { property as s } from "lit/decorators.js";
7
7
  //#region src/components/menu.ts
@@ -91,6 +91,15 @@ export declare class VoidMultiselect extends VoidMultiselect_base {
91
91
  private _content;
92
92
  private _trigger;
93
93
  private get _options();
94
+ /** Values asked for while no option exists yet (an attribute parsed ahead of its options), applied when they arrive. */
95
+ private _wanted;
96
+ /** The serialised value last handed to Lit, to notice a choice made on the options (the user, a morph). */
97
+ private _reflected;
98
+ /**
99
+ * The values of the chosen options, as a list. The `value` attribute is the same list as a JSON array
100
+ * (`value='["a","b"]'`), kept in step as the choice changes; setting it chooses those options.
101
+ * @default []
102
+ */
94
103
  get value(): string[];
95
104
  /** Select exactly the options whose value is listed. Does not fire void-change. */
96
105
  set value(values: string[]);
@@ -1,13 +1,14 @@
1
1
  import { n as e, t } from "../chunks/base-CMruMbxC.js";
2
2
  import { t as n } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { t as r } from "../chunks/form-control-C0vH6gii.js";
4
- import { n as i } from "../chunks/parts-D30c8OoG.js";
4
+ import { n as i } from "../chunks/parts-CMQQop0D.js";
5
5
  import { i as a, n as o, r as s, t as c } from "../chunks/keyboard-MQpfTX5I.js";
6
6
  import { t as l } from "../chunks/overlay-BywGMcDW.js";
7
- import { html as u, nothing as d } from "lit";
8
- import { property as f } from "lit/decorators.js";
7
+ import { n as u } from "../chunks/value-list-CH6GjYXM.js";
8
+ import { html as d, nothing as f } from "lit";
9
+ import { property as p } from "lit/decorators.js";
9
10
  //#region src/components/multiselect.ts
10
- var p = class extends t {
11
+ var m = class extends t {
11
12
  constructor(...e) {
12
13
  super(...e), this.value = "", this.selected = !1, this.disabled = !1, this.label = "";
13
14
  }
@@ -20,21 +21,21 @@ var p = class extends t {
20
21
  ].some((t) => e.has(t) && e.get(t) !== void 0) && (this.closest("void-multiselect") ?? this.closest("void-combobox"))?.requestUpdate();
21
22
  }
22
23
  };
23
- n([f({
24
+ n([p({
24
25
  type: String,
25
26
  reflect: !0
26
- })], p.prototype, "value", void 0), n([f({
27
+ })], m.prototype, "value", void 0), n([p({
27
28
  type: Boolean,
28
29
  reflect: !0
29
- })], p.prototype, "selected", void 0), n([f({
30
+ })], m.prototype, "selected", void 0), n([p({
30
31
  type: Boolean,
31
32
  reflect: !0
32
- })], p.prototype, "disabled", void 0), n([f({ type: String })], p.prototype, "label", void 0), customElements.get("void-option") || customElements.define("void-option", p);
33
- var m = (e) => e instanceof p ? e.value : e.getAttribute("value") ?? "", h = (e) => e instanceof p ? e.selected : e.hasAttribute("selected");
34
- function g(e) {
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
+ var h = (e) => e instanceof m ? e.value : e.getAttribute("value") ?? "", g = (e) => e instanceof m ? e.selected : e.hasAttribute("selected");
35
+ function _(e) {
35
36
  return e.getAttribute("label") || e.textContent?.trim() || e.getAttribute("value") || "";
36
37
  }
37
- var _ = class extends r(t) {
38
+ var v = class extends r(t) {
38
39
  constructor(...t) {
39
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, {
40
41
  tags: ["void-multiselect-content", "void-option"],
@@ -52,7 +53,7 @@ var _ = class extends r(t) {
52
53
  attr: (e, t, n) => this._parts.set(e, t, n),
53
54
  style: (e, t, n) => this._parts.style(e, t, n),
54
55
  initialFocus: () => !1
55
- }), this._onPointerDown = (e) => {
56
+ }), this._wanted = null, this._reflected = null, this._onPointerDown = (e) => {
56
57
  let t = e.target;
57
58
  (this._content()?.contains(t) || t.closest?.(".void-multiselect-pill-remove")) && e.preventDefault();
58
59
  }, this._onClick = (e) => {
@@ -126,15 +127,18 @@ var _ = class extends r(t) {
126
127
  return e ? this._parts.within(e, "void-option") : [];
127
128
  }
128
129
  get value() {
129
- return this._options.filter(h).map(m);
130
+ let e = this._options;
131
+ return this._wanted && e.length === 0 ? [...this._wanted] : e.filter(g).map(h);
130
132
  }
131
133
  set value(e) {
132
- let t = new Set(e ?? []);
133
- for (let e of this._options) {
134
- let n = t.has(m(e));
135
- e instanceof p ? e.selected = n : e.toggleAttribute("selected", n);
134
+ let t = this._options, n = Array.isArray(e) ? e : [];
135
+ this._wanted = t.length === 0 ? [...n] : null;
136
+ let r = new Set(n);
137
+ for (let e of t) {
138
+ let t = r.has(h(e));
139
+ e instanceof m ? e.selected = t : e.toggleAttribute("selected", t);
136
140
  }
137
- this.requestUpdate();
141
+ this.requestUpdate("value", void 0);
138
142
  }
139
143
  formSubmission() {
140
144
  return this.value;
@@ -147,6 +151,8 @@ var _ = class extends r(t) {
147
151
  }
148
152
  willUpdate(e) {
149
153
  super.willUpdate(e), e.has("open") && !this.open && (this._active = null, this._typeahead.reset());
154
+ let t = JSON.stringify(this.value);
155
+ t !== this._reflected && (this._reflected = t, e.has("value") || this.requestUpdate("value", void 0));
150
156
  }
151
157
  updated(e) {
152
158
  super.updated(e), this._wiring = !0;
@@ -159,7 +165,7 @@ var _ = class extends r(t) {
159
165
  }
160
166
  _wire() {
161
167
  let e = this._content(), t = this._trigger(), n = this._options, r = this.open && !this.formDisabled;
162
- this._active && (!n.includes(this._active) || this._active.disabled) && (this._active = null);
168
+ this._wanted && n.length > 0 && (this.value = this._wanted), this._active && (!n.includes(this._active) || this._active.disabled) && (this._active = null);
163
169
  for (let e of n) this._parts.set(e, "role", "option"), this._parts.id(e, "void-option"), this._parts.set(e, "aria-selected", e.selected ? "true" : null), this._parts.set(e, "aria-disabled", e.disabled ? "true" : null), this._parts.set(e, "active", e === this._active);
164
170
  if (!e) return;
165
171
  this._parts.set(e, "popover", "manual"), this._parts.set(e, "role", "listbox"), this._parts.set(e, "aria-multiselectable", "true"), this._parts.id(e, "void-multiselect-content");
@@ -168,11 +174,11 @@ var _ = class extends r(t) {
168
174
  }
169
175
  _controls(e) {
170
176
  let t = e ? this._content() : null;
171
- return t ? this._parts.id(t, "void-multiselect-content") : d;
177
+ return t ? this._parts.id(t, "void-multiselect-content") : f;
172
178
  }
173
179
  render() {
174
180
  let e = this._options.filter((e) => e.selected), t = this.open && !this.formDisabled, n = e.length;
175
- return u`
181
+ return d`
176
182
  <div
177
183
  class="void-multiselect-trigger"
178
184
  role="combobox"
@@ -181,26 +187,26 @@ var _ = class extends r(t) {
181
187
  aria-haspopup="listbox"
182
188
  aria-expanded=${String(t)}
183
189
  aria-controls=${this._controls(t)}
184
- aria-description=${n ? `${n} selected` : d}
185
- aria-disabled=${this.formDisabled ? "true" : d}
186
- aria-required=${this.required ? "true" : d}
187
- aria-invalid=${this.error ? "true" : d}
190
+ aria-description=${n ? `${n} selected` : f}
191
+ aria-disabled=${this.formDisabled ? "true" : f}
192
+ aria-required=${this.required ? "true" : f}
193
+ aria-invalid=${this.error ? "true" : f}
188
194
  @keydown=${this._onTriggerKeydown}
189
195
  >
190
- ${n > 0 ? e.map((e) => u`
196
+ ${n > 0 ? e.map((e) => d`
191
197
  <span class="void-multiselect-pill">
192
- <span class="void-multiselect-pill-label">${g(e)}</span>
198
+ <span class="void-multiselect-pill-label">${_(e)}</span>
193
199
  <button
194
200
  type="button"
195
201
  class="void-multiselect-pill-remove"
196
202
  tabindex="-1"
197
- aria-label="Remove ${g(e)}"
203
+ aria-label="Remove ${_(e)}"
198
204
  data-value=${e.value}
199
205
  >×</button>
200
206
  </span>
201
- `) : u`<span class="void-multiselect-placeholder">${this.placeholder}</span>`}
207
+ `) : d`<span class="void-multiselect-placeholder">${this.placeholder}</span>`}
202
208
  </div>
203
- ${this.error ? u`<span class="void-multiselect-error">${this.error}</span>` : d}
209
+ ${this.error ? d`<span class="void-multiselect-error">${this.error}</span>` : f}
204
210
  `;
205
211
  }
206
212
  _openList(e, t = "keyboard") {
@@ -224,7 +230,7 @@ var _ = class extends r(t) {
224
230
  return s >= 0 ? s : o(n, i);
225
231
  }
226
232
  _typeaheadTo(e) {
227
- let t = this._options, n = this._active ? t.indexOf(this._active) : -1, r = this._typeahead.match(e, t.map((e) => g(e)), t.map((e) => e.disabled), n);
233
+ 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);
228
234
  this._moveActive(r);
229
235
  }
230
236
  _toggleOption(e, t = !e.selected) {
@@ -235,21 +241,24 @@ var _ = class extends r(t) {
235
241
  }));
236
242
  }
237
243
  };
238
- n([f({ type: String })], _.prototype, "placeholder", void 0), n([f({
244
+ n([p({ type: String })], v.prototype, "placeholder", void 0), n([p({
239
245
  type: Boolean,
240
246
  reflect: !0
241
- })], _.prototype, "disabled", void 0), n([f({
247
+ })], v.prototype, "disabled", void 0), n([p({
242
248
  type: String,
243
249
  reflect: !0
244
- })], _.prototype, "size", void 0), n([f({
250
+ })], v.prototype, "size", void 0), n([p({
245
251
  type: String,
246
252
  reflect: !0
247
- })], _.prototype, "error", void 0), n([f({
253
+ })], v.prototype, "error", void 0), n([p({
248
254
  type: String,
249
255
  reflect: !0
250
- })], _.prototype, "name", void 0), n([f({
256
+ })], v.prototype, "name", void 0), n([p({
251
257
  type: Boolean,
252
258
  reflect: !0
253
- })], _.prototype, "open", void 0), customElements.get("void-multiselect") || customElements.define("void-multiselect", _);
259
+ })], v.prototype, "open", void 0), n([p({
260
+ converter: u,
261
+ reflect: !0
262
+ })], v.prototype, "value", null), customElements.get("void-multiselect") || customElements.define("void-multiselect", v);
254
263
  //#endregion
255
- export { _ as VoidMultiselect, p as VoidOption, g as optionLabel };
264
+ export { v as VoidMultiselect, m as VoidOption, _ as optionLabel };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { i as n, n as r } from "../chunks/parts-D30c8OoG.js";
3
+ import { i as n, n as r } from "../chunks/parts-CMQQop0D.js";
4
4
  import { property as i } from "lit/decorators.js";
5
5
  //#region src/components/nav-menu.ts
6
6
  var a = class extends e {
@@ -12,8 +12,8 @@ export declare class VoidNumberInput extends VoidNumberInput_base {
12
12
  /** While focus is inside, a morph does not apply the server's value over what the user is typing. */
13
13
  static editState: string[];
14
14
  /**
15
- * The number, or `null` while the field is empty (the default, and after the user clears it). As an
16
- * attribute it is the initial value; an absent or empty attribute is an empty field. It is kept within
15
+ * The number, or `null` while the field is empty (the default, and after the user clears it). Reflected to
16
+ * the attribute as it changes (absent while empty); an absent or empty attribute is an empty field. It is kept within
17
17
  * `min` and `max` once the user commits an edit. An empty field submits an empty string, and with
18
18
  * `required` it is invalid (`valueMissing`), as a native number field.
19
19
  */
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { n } from "../chunks/parts-D30c8OoG.js";
3
+ import { n } from "../chunks/parts-CMQQop0D.js";
4
4
  import { property as r } from "lit/decorators.js";
5
5
  //#region src/components/panel.ts
6
6
  var i = class extends e {
@@ -1,3 +1,4 @@
1
+ import { PropertyDeclaration, PropertyValues } from 'lit';
1
2
  import { VoidElement } from '../base.js';
2
3
  declare const VoidPinInput_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
3
4
  /**
@@ -19,8 +20,9 @@ export declare class VoidPinInput extends VoidPinInput_base {
19
20
  */
20
21
  groups: string;
21
22
  /**
22
- * The characters entered so far, without separators. As an attribute it is the initial value (and the
23
- * form's reset target); read the `value` property for the current one.
23
+ * The characters entered so far, without separators, reflected to the `value` attribute as they
24
+ * change; the form's reset target stays the value the cells started with. A `mask`ed input does not
25
+ * reflect: its attribute is only ever the initial value.
24
26
  */
25
27
  value: string;
26
28
  /** Stop the cells accepting input and exclude the value from the form submission. */
@@ -41,6 +43,8 @@ export declare class VoidPinInput extends VoidPinInput_base {
41
43
  color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
42
44
  /** Character shown in every empty cell, such as `-`. */
43
45
  placeholder: string;
46
+ requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void;
47
+ protected updated(changed: PropertyValues): void;
44
48
  private get _effectiveLength();
45
49
  private get _parsedGroups();
46
50
  private _separatorIndices;
@@ -1,11 +1,12 @@
1
1
  import { r as e, t } from "../chunks/base-CMruMbxC.js";
2
2
  import { t as n } from "../chunks/decorate-CaYbmmmm.js";
3
3
  import { t as r } from "../chunks/form-control-C0vH6gii.js";
4
- import { html as i, nothing as a } from "lit";
5
- import { property as o } from "lit/decorators.js";
6
- import { live as s } from "lit/directives/live.js";
4
+ import { n as i, t as a } from "../chunks/secret-value-CmTtVkMg.js";
5
+ import { html as o, nothing as s } from "lit";
6
+ import { property as c } from "lit/decorators.js";
7
+ import { live as l } from "lit/directives/live.js";
7
8
  //#region src/components/pin-input.ts
8
- var c = class extends r(t) {
9
+ var u = class n extends r(t) {
9
10
  constructor(...t) {
10
11
  super(...t), this.length = 6, this.groups = "", this.value = "", this.disabled = !1, this.mask = !1, this.type = "numeric", this.size = "md", this.color = "default", this.placeholder = "", this._focusValue = null, this._onFocusIn = () => {
11
12
  this._focusValue ??= this.value;
@@ -22,6 +23,12 @@ var c = class extends r(t) {
22
23
  static {
23
24
  this.editState = ["value"];
24
25
  }
26
+ requestUpdate(e, t, r) {
27
+ super.requestUpdate(e, t, i(this.mask, e, r, () => n.getPropertyOptions("value")));
28
+ }
29
+ updated(e) {
30
+ super.updated(e), this.mask && e.get("mask") !== void 0 && a(this);
31
+ }
25
32
  get _effectiveLength() {
26
33
  let e = this._parsedGroups;
27
34
  return e.length > 0 ? e.reduce((e, t) => e + t, 0) : this.length;
@@ -104,16 +111,16 @@ var c = class extends r(t) {
104
111
  render() {
105
112
  let e = [], t = this._separatorIndices();
106
113
  for (let n = 0; n < this._effectiveLength; n++) {
107
- t.has(n) && e.push(i`<span class="void-pin-separator" aria-hidden="true">–</span>`);
114
+ t.has(n) && e.push(o`<span class="void-pin-separator" aria-hidden="true">–</span>`);
108
115
  let r = this.value[n] ?? "";
109
- e.push(i`
116
+ e.push(o`
110
117
  <input
111
118
  class="void-pin-cell"
112
119
  type=${this.mask ? "password" : "text"}
113
120
  inputmode=${this.type === "numeric" ? "numeric" : "text"}
114
121
  maxlength="1"
115
- .value=${s(r)}
116
- placeholder=${this.placeholder || a}
122
+ .value=${l(r)}
123
+ placeholder=${this.placeholder || s}
117
124
  ?disabled=${this.disabled}
118
125
  autocomplete="one-time-code"
119
126
  aria-label=${`Digit ${n + 1} of ${this._effectiveLength}`}
@@ -124,27 +131,30 @@ var c = class extends r(t) {
124
131
  />
125
132
  `);
126
133
  }
127
- return i`<div class="void-pin-input">${e}</div>`;
134
+ return o`<div class="void-pin-input">${e}</div>`;
128
135
  }
129
136
  };
130
- n([o({ type: Number })], c.prototype, "length", void 0), n([o({
137
+ n([c({ type: Number })], u.prototype, "length", void 0), n([c({
138
+ type: String,
139
+ reflect: !0
140
+ })], u.prototype, "groups", void 0), n([c({
131
141
  type: String,
132
142
  reflect: !0
133
- })], c.prototype, "groups", void 0), n([o({ type: String })], c.prototype, "value", void 0), n([o({
143
+ })], u.prototype, "value", void 0), n([c({
134
144
  type: Boolean,
135
145
  reflect: !0
136
- })], c.prototype, "disabled", void 0), n([o({
146
+ })], u.prototype, "disabled", void 0), n([c({
137
147
  type: Boolean,
138
148
  reflect: !0
139
- })], c.prototype, "mask", void 0), n([o({
149
+ })], u.prototype, "mask", void 0), n([c({
140
150
  type: String,
141
151
  reflect: !0
142
- })], c.prototype, "type", void 0), n([o({
152
+ })], u.prototype, "type", void 0), n([c({
143
153
  type: String,
144
154
  reflect: !0
145
- })], c.prototype, "size", void 0), n([o({
155
+ })], u.prototype, "size", void 0), n([c({
146
156
  type: String,
147
157
  reflect: !0
148
- })], c.prototype, "color", void 0), n([o({ type: String })], c.prototype, "placeholder", void 0), customElements.get("void-pin-input") || customElements.define("void-pin-input", c);
158
+ })], u.prototype, "color", void 0), n([c({ type: String })], u.prototype, "placeholder", void 0), customElements.get("void-pin-input") || customElements.define("void-pin-input", u);
149
159
  //#endregion
150
- export { c as VoidPinInput };
160
+ export { u as VoidPinInput };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/base-CMruMbxC.js";
2
2
  import { t } from "../chunks/decorate-CaYbmmmm.js";
3
- import { i as n, n as r } from "../chunks/parts-D30c8OoG.js";
3
+ import { i as n, n as r } from "../chunks/parts-CMQQop0D.js";
4
4
  import { t as i } from "../chunks/overlay-BywGMcDW.js";
5
5
  import { property as a } from "lit/decorators.js";
6
6
  //#region src/components/popover.ts
@@ -11,8 +11,8 @@ export declare class VoidRadioGroup extends VoidRadioGroup_base {
11
11
  /** Name of the group, shown above the radios and used as its accessible name. */
12
12
  label: string;
13
13
  /**
14
- * `value` of the selected radio. Set it to choose one; it is the initial selection and the form's
15
- * reset target.
14
+ * `value` of the selected radio. Set it to choose one; it follows the user's choice and is reflected
15
+ * to the attribute. The form's reset target stays the initial selection.
16
16
  */
17
17
  value: string;
18
18
  name: string;
@@ -76,7 +76,10 @@ var s = class extends r(t) {
76
76
  `;
77
77
  }
78
78
  };
79
- n([o({ type: String })], s.prototype, "label", void 0), n([o({ type: String })], s.prototype, "value", void 0), n([o({
79
+ n([o({ type: String })], s.prototype, "label", void 0), n([o({
80
+ type: String,
81
+ reflect: !0
82
+ })], s.prototype, "value", void 0), n([o({
80
83
  type: String,
81
84
  reflect: !0
82
85
  })], s.prototype, "name", void 0), n([o({
@@ -34,7 +34,7 @@ declare const VoidSegmentedControl_base: (new (...args: any[]) => import('../for
34
34
  export declare class VoidSegmentedControl extends VoidSegmentedControl_base {
35
35
  /**
36
36
  * `value` of the selected item. Selection follows focus, so each arrow key changes it and fires
37
- * `void-change`. As an attribute it is the initial value and the form's reset target.
37
+ * `void-change`. Reflected to the attribute as it changes; the form's reset target stays the value it started with.
38
38
  */
39
39
  value: string;
40
40
  /** Stop the whole control reacting and exclude the value from the form submission. */