@voidable/ui 0.6.1 → 0.8.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.
- package/README.md +168 -9
- package/dist/angular/index.d.ts +20 -0
- package/dist/angular/index.js +78 -0
- package/dist/autoloader-core.d.ts +45 -0
- package/dist/autoloader-table.generated.d.ts +5 -0
- package/dist/autoloader.d.ts +13 -0
- package/dist/autoloader.js +229 -0
- package/dist/base.d.ts +173 -2
- package/dist/base.js +2 -9
- package/dist/chunks/base-CMruMbxC.js +824 -0
- package/dist/chunks/disclosure-Bj_49GcC.js +23 -0
- package/dist/chunks/dismiss-Drsy_dE5.js +37 -0
- package/dist/chunks/form-control-C0vH6gii.js +300 -0
- package/dist/chunks/keyboard-MQpfTX5I.js +46 -0
- package/dist/chunks/keyboard-activation-CV0m4hkn.js +29 -0
- package/dist/chunks/modal-D_YVy2vg.js +71 -0
- package/dist/chunks/overlay-BywGMcDW.js +467 -0
- package/dist/chunks/parts-D30c8OoG.js +229 -0
- package/dist/chunks/{shape-FJvZa8FW.js → shape-C_LW7EjG.js} +12 -4
- package/dist/components/accordion.d.ts +38 -10
- package/dist/components/accordion.js +51 -53
- package/dist/components/action-input.d.ts +64 -6
- package/dist/components/action-input.js +84 -41
- package/dist/components/alert.d.ts +24 -10
- package/dist/components/alert.js +26 -27
- package/dist/components/avatar.d.ts +8 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.d.ts +8 -3
- package/dist/components/badge.js +2 -2
- package/dist/components/banner.d.ts +21 -10
- package/dist/components/banner.js +27 -27
- package/dist/components/bar-chart.d.ts +30 -6
- package/dist/components/bar-chart.js +29 -39
- package/dist/components/breadcrumbs.d.ts +19 -6
- package/dist/components/breadcrumbs.js +16 -22
- package/dist/components/button.d.ts +64 -10
- package/dist/components/button.js +70 -26
- package/dist/components/calendar.d.ts +65 -10
- package/dist/components/calendar.js +157 -106
- package/dist/components/card.d.ts +14 -9
- package/dist/components/card.js +8 -22
- package/dist/components/carousel.d.ts +65 -14
- package/dist/components/carousel.js +84 -93
- package/dist/components/charts/scale.d.ts +0 -1
- package/dist/components/charts/shape.d.ts +0 -1
- package/dist/components/checkbox-group.d.ts +38 -5
- package/dist/components/checkbox-group.js +61 -20
- package/dist/components/checkbox.d.ts +53 -7
- package/dist/components/checkbox.js +66 -29
- package/dist/components/collapsible.d.ts +29 -9
- package/dist/components/collapsible.js +42 -44
- package/dist/components/color-picker.d.ts +20 -4
- package/dist/components/color-picker.js +35 -29
- package/dist/components/combobox.d.ts +84 -10
- package/dist/components/combobox.js +142 -45
- package/dist/components/compose-input.d.ts +8 -1
- package/dist/components/compose-input.js +9 -3
- package/dist/components/dialog.d.ts +24 -20
- package/dist/components/dialog.js +8 -57
- package/dist/components/divider.d.ts +8 -1
- package/dist/components/divider.js +3 -3
- package/dist/components/donut-chart.d.ts +28 -5
- package/dist/components/donut-chart.js +55 -54
- package/dist/components/drawer.d.ts +19 -18
- package/dist/components/drawer.js +9 -53
- package/dist/components/dropdown-menu.d.ts +62 -7
- package/dist/components/dropdown-menu.js +124 -33
- package/dist/components/editable.d.ts +37 -3
- package/dist/components/editable.js +45 -24
- package/dist/components/error-fallback.d.ts +36 -5
- package/dist/components/error-fallback.js +73 -23
- package/dist/components/field.d.ts +38 -4
- package/dist/components/field.js +63 -21
- package/dist/components/file-upload.d.ts +23 -2
- package/dist/components/file-upload.js +47 -24
- package/dist/components/gauge.d.ts +48 -9
- package/dist/components/gauge.js +57 -55
- package/dist/components/hamburger.d.ts +19 -4
- package/dist/components/hamburger.js +28 -19
- package/dist/components/hover-card.d.ts +40 -14
- package/dist/components/hover-card.js +76 -59
- package/dist/components/indicator.d.ts +18 -7
- package/dist/components/indicator.js +16 -18
- package/dist/components/input.d.ts +70 -5
- package/dist/components/input.js +83 -20
- package/dist/components/line-chart.d.ts +27 -5
- package/dist/components/line-chart.js +19 -21
- package/dist/components/list.d.ts +10 -1
- package/dist/components/list.js +3 -3
- package/dist/components/menu.d.ts +67 -21
- package/dist/components/menu.js +116 -115
- package/dist/components/multiselect.d.ts +108 -13
- package/dist/components/multiselect.js +207 -70
- package/dist/components/nav-bar.d.ts +12 -7
- package/dist/components/nav-bar.js +11 -21
- package/dist/components/nav-menu.d.ts +52 -12
- package/dist/components/nav-menu.js +68 -70
- package/dist/components/number-input.d.ts +76 -8
- package/dist/components/number-input.js +117 -51
- package/dist/components/pagination.d.ts +19 -1
- package/dist/components/pagination.js +68 -7
- package/dist/components/panel.d.ts +16 -8
- package/dist/components/panel.js +20 -20
- package/dist/components/pin-input.d.ts +41 -4
- package/dist/components/pin-input.js +45 -27
- package/dist/components/popover.d.ts +29 -11
- package/dist/components/popover.js +47 -35
- package/dist/components/progress.d.ts +7 -3
- package/dist/components/progress.js +3 -3
- package/dist/components/radio-group.d.ts +30 -5
- package/dist/components/radio-group.js +56 -19
- package/dist/components/radio.d.ts +47 -7
- package/dist/components/radio.js +68 -29
- package/dist/components/scroll-area.d.ts +8 -5
- package/dist/components/scroll-area.js +19 -20
- package/dist/components/segmented-control.d.ts +52 -8
- package/dist/components/segmented-control.js +66 -36
- package/dist/components/select.d.ts +59 -12
- package/dist/components/select.js +96 -46
- package/dist/components/sidebar.d.ts +22 -3
- package/dist/components/sidebar.js +20 -10
- package/dist/components/skeleton.d.ts +5 -2
- package/dist/components/skeleton.js +4 -4
- package/dist/components/slider.d.ts +27 -5
- package/dist/components/slider.js +29 -17
- package/dist/components/spinner.d.ts +6 -2
- package/dist/components/spinner.js +3 -3
- package/dist/components/stat.d.ts +21 -4
- package/dist/components/stat.js +7 -3
- package/dist/components/status-dot.d.ts +4 -1
- package/dist/components/status-dot.js +3 -3
- package/dist/components/stepper.d.ts +5 -1
- package/dist/components/stepper.js +2 -2
- package/dist/components/switch.d.ts +24 -5
- package/dist/components/switch.js +37 -19
- package/dist/components/table.d.ts +51 -2
- package/dist/components/table.js +157 -8
- package/dist/components/tabs.d.ts +49 -17
- package/dist/components/tabs.js +85 -54
- package/dist/components/tag.d.ts +17 -7
- package/dist/components/tag.js +19 -21
- package/dist/components/tags-input.d.ts +33 -4
- package/dist/components/tags-input.js +40 -30
- package/dist/components/textarea.d.ts +61 -5
- package/dist/components/textarea.js +58 -21
- package/dist/components/toast.d.ts +89 -15
- package/dist/components/toast.js +105 -30
- package/dist/components/toggle-group.d.ts +30 -3
- package/dist/components/toggle-group.js +43 -16
- package/dist/components/toggle.d.ts +25 -4
- package/dist/components/toggle.js +28 -18
- package/dist/components/tooltip.d.ts +31 -12
- package/dist/components/tooltip.js +62 -28
- package/dist/components.json +1518 -0
- package/dist/custom-elements.json +31817 -0
- package/dist/dev/index.d.ts +40 -0
- package/dist/dev/rules.d.ts +46 -0
- package/dist/dev/table.generated.d.ts +8 -0
- package/dist/dev/types.d.ts +113 -0
- package/dist/dev.js +3364 -0
- package/dist/disclosure.d.ts +30 -0
- package/dist/dismiss.d.ts +20 -0
- package/dist/form-control.d.ts +92 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +24 -24
- package/dist/keyboard-activation.d.ts +31 -0
- package/dist/keyboard.d.ts +32 -0
- package/dist/modal.d.ts +44 -0
- package/dist/overlay.d.ts +249 -0
- package/dist/parts.d.ts +171 -0
- package/dist/projection.d.ts +370 -0
- package/dist/types/elements.d.ts +648 -0
- package/dist/types/react.d.ts +163 -0
- package/dist/types/solid.d.ts +164 -0
- package/dist/types/solid2.d.ts +161 -0
- package/dist/types/svelte.d.ts +154 -0
- package/dist/types/vue.d.ts +156 -0
- package/dist/vscode.html-custom-data.json +6004 -0
- package/dist/web-types.json +8365 -0
- package/package.json +113 -21
- package/dist/base.d.ts.map +0 -1
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/action-input.d.ts.map +0 -1
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/banner.d.ts.map +0 -1
- package/dist/components/bar-chart.d.ts.map +0 -1
- package/dist/components/breadcrumbs.d.ts.map +0 -1
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/charts/scale.d.ts.map +0 -1
- package/dist/components/charts/shape.d.ts.map +0 -1
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/color-picker.d.ts.map +0 -1
- package/dist/components/combobox.d.ts.map +0 -1
- package/dist/components/compose-input.d.ts.map +0 -1
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/divider.d.ts.map +0 -1
- package/dist/components/donut-chart.d.ts.map +0 -1
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/editable.d.ts.map +0 -1
- package/dist/components/error-fallback.d.ts.map +0 -1
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/file-upload.d.ts.map +0 -1
- package/dist/components/gauge.d.ts.map +0 -1
- package/dist/components/hamburger.d.ts.map +0 -1
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/indicator.d.ts.map +0 -1
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/line-chart.d.ts.map +0 -1
- package/dist/components/list.d.ts.map +0 -1
- package/dist/components/menu.d.ts.map +0 -1
- package/dist/components/multiselect.d.ts.map +0 -1
- package/dist/components/nav-bar.d.ts.map +0 -1
- package/dist/components/nav-menu.d.ts.map +0 -1
- package/dist/components/number-input.d.ts.map +0 -1
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/panel.d.ts.map +0 -1
- package/dist/components/pin-input.d.ts.map +0 -1
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/segmented-control.d.ts.map +0 -1
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/stat.d.ts.map +0 -1
- package/dist/components/status-dot.d.ts.map +0 -1
- package/dist/components/stepper.d.ts.map +0 -1
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tag.d.ts.map +0 -1
- package/dist/components/tags-input.d.ts.map +0 -1
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/toast.d.ts.map +0 -1
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
|
@@ -1,11 +1,60 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { html as n, nothing as r } from "lit";
|
|
4
4
|
import { property as i } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/pagination.ts
|
|
6
6
|
var a = class extends e {
|
|
7
7
|
constructor(...e) {
|
|
8
|
-
super(...e), this.total = 1, this.value = 1, this.siblings = 1, this.size = "md";
|
|
8
|
+
super(...e), this.total = 1, this.value = 1, this.siblings = 1, this.size = "md", this.hrefTemplate = "", this.param = "";
|
|
9
|
+
}
|
|
10
|
+
get _linkMode() {
|
|
11
|
+
return this.hrefTemplate !== "" || this.param !== "";
|
|
12
|
+
}
|
|
13
|
+
_href(e) {
|
|
14
|
+
if (this.hrefTemplate) return this.hrefTemplate.split("{page}").join(String(e));
|
|
15
|
+
if (typeof location > "u") return "#";
|
|
16
|
+
let t = new URL(location.href);
|
|
17
|
+
return t.searchParams.set(this.param, String(e)), t.pathname + t.search + t.hash;
|
|
18
|
+
}
|
|
19
|
+
_onLinkClick(e, t) {
|
|
20
|
+
if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
21
|
+
if (t === this.value) {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (t < 1 || t > this.total) {
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
let n = new CustomEvent("void-change", {
|
|
30
|
+
bubbles: !0,
|
|
31
|
+
composed: !0,
|
|
32
|
+
cancelable: !0,
|
|
33
|
+
detail: { value: t }
|
|
34
|
+
});
|
|
35
|
+
if (this.dispatchEvent(n), n.defaultPrevented) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
e.defaultPrevented && this.isConnected && (this.value = t);
|
|
41
|
+
}, 0);
|
|
42
|
+
}
|
|
43
|
+
_renderLinks(e) {
|
|
44
|
+
let t = 0, i = (e, t, r, i) => i ? n`<span class="void-pagination-btn" aria-disabled="true" aria-label=${e}>${t}</span>` : n`<a class="void-pagination-btn" href=${this._href(r)} aria-label=${e}
|
|
45
|
+
@click=${(e) => this._onLinkClick(e, r)}>${t}</a>`;
|
|
46
|
+
return n`
|
|
47
|
+
<nav role="navigation" aria-label="Pagination">
|
|
48
|
+
${i("Previous page", "«", this.value - 1, this.value <= 1)}
|
|
49
|
+
${e.map((e) => e === "ellipsis" ? (t++, n`<span class="void-pagination-ellipsis" aria-hidden="true" data-key=${t}>…</span>`) : n`<a
|
|
50
|
+
class="void-pagination-btn"
|
|
51
|
+
href=${this._href(e)}
|
|
52
|
+
aria-current=${e === this.value ? "page" : r}
|
|
53
|
+
@click=${(t) => this._onLinkClick(t, e)}
|
|
54
|
+
>${e}</a>`)}
|
|
55
|
+
${i("Next page", "»", this.value + 1, this.value >= this.total)}
|
|
56
|
+
</nav>
|
|
57
|
+
`;
|
|
9
58
|
}
|
|
10
59
|
_pages() {
|
|
11
60
|
let { total: e, value: t, siblings: n } = this, r = [], i = Math.max(2, t - n), a = Math.min(e - 1, t + n);
|
|
@@ -13,15 +62,20 @@ var a = class extends e {
|
|
|
13
62
|
for (let e = i; e <= a; e++) r.push(e);
|
|
14
63
|
return a < e - 1 && r.push("ellipsis"), e > 1 && r.push(e), r;
|
|
15
64
|
}
|
|
16
|
-
_go(e) {
|
|
17
|
-
e < 1 || e > this.total || e === this.value
|
|
65
|
+
_go(e, t = !1) {
|
|
66
|
+
if (e < 1 || e > this.total || e === this.value) return !0;
|
|
67
|
+
let n = new CustomEvent("void-change", {
|
|
18
68
|
bubbles: !0,
|
|
19
69
|
composed: !0,
|
|
70
|
+
cancelable: t,
|
|
20
71
|
detail: { value: e }
|
|
21
|
-
})
|
|
72
|
+
});
|
|
73
|
+
return t ? (this.dispatchEvent(n), n.defaultPrevented ? !1 : (this.value = e, !0)) : (this.value = e, this.dispatchEvent(n), !0);
|
|
22
74
|
}
|
|
23
75
|
render() {
|
|
24
|
-
let e = this._pages()
|
|
76
|
+
let e = this._pages();
|
|
77
|
+
if (this._linkMode) return this._renderLinks(e);
|
|
78
|
+
let t = 0;
|
|
25
79
|
return n`
|
|
26
80
|
<nav role="navigation" aria-label="Pagination">
|
|
27
81
|
<button
|
|
@@ -57,6 +111,13 @@ t([i({ type: Number })], a.prototype, "total", void 0), t([i({
|
|
|
57
111
|
})], a.prototype, "value", void 0), t([i({ type: Number })], a.prototype, "siblings", void 0), t([i({
|
|
58
112
|
type: String,
|
|
59
113
|
reflect: !0
|
|
60
|
-
})], a.prototype, "size", void 0),
|
|
114
|
+
})], a.prototype, "size", void 0), t([i({
|
|
115
|
+
type: String,
|
|
116
|
+
attribute: "href-template",
|
|
117
|
+
reflect: !0
|
|
118
|
+
})], a.prototype, "hrefTemplate", void 0), t([i({
|
|
119
|
+
type: String,
|
|
120
|
+
reflect: !0
|
|
121
|
+
})], a.prototype, "param", void 0), customElements.get("void-pagination") || customElements.define("void-pagination", a);
|
|
61
122
|
//#endregion
|
|
62
123
|
export { a as VoidPagination };
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import { nothing } from 'lit';
|
|
2
1
|
import { VoidElement } from '../base.js';
|
|
3
|
-
|
|
2
|
+
import { PartsController } from '../parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Bordered or elevated content region for grouping related settings, dashboard sections, and detail blocks.
|
|
5
|
+
*
|
|
6
|
+
* Its regions are parts, in this order: an optional `<void-panel-header>` (holding a `<void-panel-title>` and an
|
|
7
|
+
* optional `<void-panel-description>`) and the `<void-panel-body>`. The parts are CSS-only and never moved. The panel
|
|
8
|
+
* is a `region` named by its title part; without a title it is unnamed unless the author gives it an `aria-label`.
|
|
9
|
+
*/
|
|
4
10
|
export declare class VoidPanel extends VoidElement {
|
|
5
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `default` is a quiet filled region, `bordered` draws a visible border, `elevated` lifts it with a
|
|
13
|
+
* shadow.
|
|
14
|
+
*/
|
|
6
15
|
variant: 'default' | 'bordered' | 'elevated';
|
|
7
|
-
|
|
8
|
-
private
|
|
16
|
+
/** The `aria-labelledby` this panel wrote itself, so an author's own name is never replaced. */
|
|
17
|
+
private _labelledBy;
|
|
18
|
+
protected readonly _parts: PartsController;
|
|
9
19
|
connectedCallback(): void;
|
|
10
|
-
|
|
11
|
-
render(): typeof nothing | import('lit').TemplateResult<1>;
|
|
20
|
+
private _wire;
|
|
12
21
|
}
|
|
13
22
|
declare global {
|
|
14
23
|
interface HTMLElementTagNameMap {
|
|
15
24
|
'void-panel': VoidPanel;
|
|
16
25
|
}
|
|
17
26
|
}
|
|
18
|
-
//# sourceMappingURL=panel.d.ts.map
|
package/dist/components/panel.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import { property as
|
|
3
|
+
import { n } from "../chunks/parts-D30c8OoG.js";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/panel.ts
|
|
6
|
-
var
|
|
6
|
+
var i = class extends e {
|
|
7
7
|
constructor(...e) {
|
|
8
|
-
super(...e), this.
|
|
8
|
+
super(...e), this.variant = "default", this._labelledBy = null, this._parts = new n(this, {
|
|
9
|
+
tags: [
|
|
10
|
+
"void-panel-header",
|
|
11
|
+
"void-panel-title",
|
|
12
|
+
"void-panel-description",
|
|
13
|
+
"void-panel-body"
|
|
14
|
+
],
|
|
15
|
+
onChange: () => this._wire()
|
|
16
|
+
});
|
|
9
17
|
}
|
|
10
18
|
connectedCallback() {
|
|
11
|
-
super.connectedCallback(), this.
|
|
19
|
+
super.connectedCallback(), this.setHostAttribute("role", "region");
|
|
12
20
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (let e of this._userContent) this.appendChild(e);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
return this.label ? n`<div class="void-panel-label">${this.label}</div>` : r;
|
|
21
|
+
_wire() {
|
|
22
|
+
let e = this._parts.one("void-panel-title"), t = this.getAttribute("aria-labelledby"), n = this._labelledBy !== null && t === this._labelledBy;
|
|
23
|
+
e && !this.hasAttribute("aria-label") && (t === null || n) ? (this._labelledBy = this._parts.id(e, "void-panel-title"), this.setHostAttribute("aria-labelledby", this._labelledBy)) : n && (this._labelledBy = null, this.setHostAttribute("aria-labelledby", null));
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
|
-
t([
|
|
24
|
-
type: String,
|
|
25
|
-
reflect: !0
|
|
26
|
-
})], a.prototype, "label", void 0), t([i({
|
|
26
|
+
t([r({
|
|
27
27
|
type: String,
|
|
28
28
|
reflect: !0
|
|
29
|
-
})],
|
|
29
|
+
})], i.prototype, "variant", void 0), customElements.get("void-panel") || customElements.define("void-panel", i);
|
|
30
30
|
//#endregion
|
|
31
|
-
export {
|
|
31
|
+
export { i as VoidPanel };
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const VoidPinInput_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
|
|
3
|
+
/**
|
|
4
|
+
* Single-character input cells for OTP verification codes, PIN entry, and multi-digit confirmation fields.
|
|
5
|
+
*
|
|
6
|
+
* @fires {CustomEvent<{ value: string }>} void-input - A character was typed, pasted or deleted.
|
|
7
|
+
* @fires {CustomEvent<{ value: string }>} void-change - Focus left the cells with a different value from when it came
|
|
8
|
+
* in (the commit, as a native field's `change`).
|
|
9
|
+
* @fires {CustomEvent<{ value: string }>} void-complete - Every cell is filled.
|
|
10
|
+
*/
|
|
11
|
+
export declare class VoidPinInput extends VoidPinInput_base {
|
|
12
|
+
/** While focus is inside, a morph does not apply the server's value over what the user is typing. */
|
|
13
|
+
static editState: string[];
|
|
14
|
+
/** Number of cells, so the number of characters in the code. Defaults to 6. */
|
|
4
15
|
length: number;
|
|
16
|
+
/**
|
|
17
|
+
* Visual grouping of the cells as comma-separated sizes, such as `3,3` for a code drawn as `123 456`.
|
|
18
|
+
* Display only; the value has no separator.
|
|
19
|
+
*/
|
|
5
20
|
groups: string;
|
|
21
|
+
/**
|
|
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.
|
|
24
|
+
*/
|
|
6
25
|
value: string;
|
|
26
|
+
/** Stop the cells accepting input and exclude the value from the form submission. */
|
|
7
27
|
disabled: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Hide the entered characters as dots, like a password field. Use it for a PIN, not for a one-time
|
|
30
|
+
* code.
|
|
31
|
+
*/
|
|
8
32
|
mask: boolean;
|
|
33
|
+
/** Which characters the cells accept: `numeric` (default, digits only) or `alphanumeric`. */
|
|
9
34
|
type: 'numeric' | 'alphanumeric';
|
|
35
|
+
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
10
36
|
size: 'sm' | 'md' | 'lg';
|
|
11
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Status colour of the cells: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`.
|
|
39
|
+
* Use `error` after a wrong code.
|
|
40
|
+
*/
|
|
41
|
+
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
42
|
+
/** Character shown in every empty cell, such as `-`. */
|
|
12
43
|
placeholder: string;
|
|
13
44
|
private get _effectiveLength();
|
|
14
45
|
private get _parsedGroups();
|
|
15
46
|
private _separatorIndices;
|
|
47
|
+
/** The value when focus came into the cells (null while focus is elsewhere). */
|
|
48
|
+
private _focusValue;
|
|
16
49
|
connectedCallback(): void;
|
|
50
|
+
disconnectedCallback(): void;
|
|
51
|
+
private _onFocusIn;
|
|
52
|
+
/** Focus left the component: commit, as a native field fires `change` on blur. */
|
|
53
|
+
private _onFocusOut;
|
|
17
54
|
private _getCells;
|
|
18
55
|
private _focusCell;
|
|
19
56
|
private _collectValue;
|
|
@@ -30,4 +67,4 @@ declare global {
|
|
|
30
67
|
'void-pin-input': VoidPinInput;
|
|
31
68
|
}
|
|
32
69
|
}
|
|
33
|
-
|
|
70
|
+
export {};
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { r 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 { 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";
|
|
5
7
|
//#region src/components/pin-input.ts
|
|
6
|
-
var
|
|
7
|
-
constructor(...
|
|
8
|
-
super(...
|
|
8
|
+
var c = class extends r(t) {
|
|
9
|
+
constructor(...t) {
|
|
10
|
+
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
|
+
this._focusValue ??= this.value;
|
|
12
|
+
}, this._onFocusOut = (t) => {
|
|
13
|
+
if (t.relatedTarget instanceof Node && this.contains(t.relatedTarget) || e(this)) return;
|
|
14
|
+
let n = this._focusValue;
|
|
15
|
+
this._focusValue = null, n !== null && n !== this.value && this.dispatchEvent(new CustomEvent("void-change", {
|
|
16
|
+
bubbles: !0,
|
|
17
|
+
composed: !0,
|
|
18
|
+
detail: { value: this.value }
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.editState = ["value"];
|
|
9
24
|
}
|
|
10
25
|
get _effectiveLength() {
|
|
11
26
|
let e = this._parsedGroups;
|
|
@@ -22,7 +37,10 @@ var a = class extends e {
|
|
|
22
37
|
return t;
|
|
23
38
|
}
|
|
24
39
|
connectedCallback() {
|
|
25
|
-
super.connectedCallback(), this.
|
|
40
|
+
super.connectedCallback(), this.setHostAttribute("role", "group"), this.setHostAttribute("aria-label", "PIN input"), this.addEventListener("focusin", this._onFocusIn), this.addEventListener("focusout", this._onFocusOut);
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
super.disconnectedCallback(), this.removeEventListener("focusin", this._onFocusIn), this.removeEventListener("focusout", this._onFocusOut);
|
|
26
44
|
}
|
|
27
45
|
_getCells() {
|
|
28
46
|
return Array.from(this.querySelectorAll(".void-pin-cell"));
|
|
@@ -36,7 +54,7 @@ var a = class extends e {
|
|
|
36
54
|
}
|
|
37
55
|
_syncValue() {
|
|
38
56
|
let e = this.value;
|
|
39
|
-
this.value = this._collectValue(), this.value !== e && (this.dispatchEvent(new CustomEvent("void-
|
|
57
|
+
this.value = this._collectValue(), this.value !== e && (this.dispatchEvent(new CustomEvent("void-input", {
|
|
40
58
|
bubbles: !0,
|
|
41
59
|
composed: !0,
|
|
42
60
|
detail: { value: this.value }
|
|
@@ -85,48 +103,48 @@ var a = class extends e {
|
|
|
85
103
|
}
|
|
86
104
|
render() {
|
|
87
105
|
let e = [], t = this._separatorIndices();
|
|
88
|
-
for (let
|
|
89
|
-
t.has(
|
|
90
|
-
let
|
|
91
|
-
e.push(
|
|
106
|
+
for (let n = 0; n < this._effectiveLength; n++) {
|
|
107
|
+
t.has(n) && e.push(i`<span class="void-pin-separator" aria-hidden="true">–</span>`);
|
|
108
|
+
let r = this.value[n] ?? "";
|
|
109
|
+
e.push(i`
|
|
92
110
|
<input
|
|
93
111
|
class="void-pin-cell"
|
|
94
112
|
type=${this.mask ? "password" : "text"}
|
|
95
113
|
inputmode=${this.type === "numeric" ? "numeric" : "text"}
|
|
96
114
|
maxlength="1"
|
|
97
|
-
.value=${
|
|
98
|
-
placeholder=${this.placeholder ||
|
|
115
|
+
.value=${s(r)}
|
|
116
|
+
placeholder=${this.placeholder || a}
|
|
99
117
|
?disabled=${this.disabled}
|
|
100
118
|
autocomplete="one-time-code"
|
|
101
|
-
aria-label=${`Digit ${
|
|
102
|
-
@input=${(e) => this._onInput(e,
|
|
103
|
-
@keydown=${(e) => this._onKeydown(e,
|
|
119
|
+
aria-label=${`Digit ${n + 1} of ${this._effectiveLength}`}
|
|
120
|
+
@input=${(e) => this._onInput(e, n)}
|
|
121
|
+
@keydown=${(e) => this._onKeydown(e, n)}
|
|
104
122
|
@paste=${this._onPaste}
|
|
105
123
|
@focus=${this._onFocus}
|
|
106
124
|
/>
|
|
107
125
|
`);
|
|
108
126
|
}
|
|
109
|
-
return
|
|
127
|
+
return i`<div class="void-pin-input">${e}</div>`;
|
|
110
128
|
}
|
|
111
129
|
};
|
|
112
|
-
|
|
130
|
+
n([o({ type: Number })], c.prototype, "length", void 0), n([o({
|
|
113
131
|
type: String,
|
|
114
132
|
reflect: !0
|
|
115
|
-
})],
|
|
133
|
+
})], c.prototype, "groups", void 0), n([o({ type: String })], c.prototype, "value", void 0), n([o({
|
|
116
134
|
type: Boolean,
|
|
117
135
|
reflect: !0
|
|
118
|
-
})],
|
|
136
|
+
})], c.prototype, "disabled", void 0), n([o({
|
|
119
137
|
type: Boolean,
|
|
120
138
|
reflect: !0
|
|
121
|
-
})],
|
|
139
|
+
})], c.prototype, "mask", void 0), n([o({
|
|
122
140
|
type: String,
|
|
123
141
|
reflect: !0
|
|
124
|
-
})],
|
|
142
|
+
})], c.prototype, "type", void 0), n([o({
|
|
125
143
|
type: String,
|
|
126
144
|
reflect: !0
|
|
127
|
-
})],
|
|
145
|
+
})], c.prototype, "size", void 0), n([o({
|
|
128
146
|
type: String,
|
|
129
147
|
reflect: !0
|
|
130
|
-
})],
|
|
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);
|
|
131
149
|
//#endregion
|
|
132
|
-
export {
|
|
150
|
+
export { c as VoidPinInput };
|
|
@@ -1,24 +1,42 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
|
|
2
|
+
import { OverlayController } from '../overlay.js';
|
|
3
|
+
import { PartsController } from '../parts.js';
|
|
4
|
+
/**
|
|
5
|
+
* Anchored overlay for contextual detail and mini-forms that need more room than a tooltip.
|
|
6
|
+
*
|
|
7
|
+
* Two parts: `<void-popover-trigger>` around the control that toggles it (one element: a `<void-button>`, a
|
|
8
|
+
* `<button>`), and `<void-popover-content>`, the panel. The parts are the final DOM; the popover only adds
|
|
9
|
+
* behaviour. The content is a non-modal dialog shown in the top layer (the Popover API), so no `overflow` or
|
|
10
|
+
* `transform` of an ancestor clips it, placed next to the trigger with CSS anchor positioning (flipping at
|
|
11
|
+
* viewport edges; a JavaScript positioner where anchor positioning is missing). Opening it from the trigger moves
|
|
12
|
+
* focus to its first focusable element; Escape, a press outside it, or focus leaving it closes it and focus
|
|
13
|
+
* returns to the trigger. The trigger's control gets `aria-haspopup="dialog"`, `aria-expanded` and
|
|
14
|
+
* `aria-controls`, and names the content.
|
|
15
|
+
*
|
|
16
|
+
* @fires {CustomEvent<{ reason: 'trigger' | 'api' }>} void-open - The popover opened.
|
|
17
|
+
* @fires {CustomEvent<{ reason: 'trigger' | 'escape' | 'outside' | 'blur' | 'parent' | 'api' }>} void-close - The
|
|
18
|
+
* popover is closing. Cancelable when the user caused it (every reason but `parent` and `api`).
|
|
19
|
+
*/
|
|
3
20
|
export declare class VoidPopover extends VoidElement {
|
|
21
|
+
/** Whether the popover is open. */
|
|
4
22
|
open: boolean;
|
|
5
|
-
|
|
23
|
+
/** Side of the trigger it opens on; it flips to the opposite side when there is no room. */
|
|
24
|
+
side: 'top' | 'bottom' | 'left' | 'right';
|
|
25
|
+
/** Alignment with the trigger along that side. */
|
|
26
|
+
align: 'start' | 'center' | 'end';
|
|
27
|
+
/** `click` toggles on trigger clicks; `manual` leaves opening to the `open` attribute or property. */
|
|
6
28
|
trigger: 'click' | 'manual';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private
|
|
29
|
+
protected readonly _parts: PartsController;
|
|
30
|
+
protected readonly _overlay: OverlayController;
|
|
31
|
+
private _control;
|
|
32
|
+
/** The content is a non-modal dialog in the top layer, named by the trigger's control. */
|
|
33
|
+
private _wire;
|
|
10
34
|
connectedCallback(): void;
|
|
11
35
|
disconnectedCallback(): void;
|
|
12
|
-
protected updated(changed: Map<string, unknown>): void;
|
|
13
36
|
private _handleTriggerClick;
|
|
14
|
-
private _handleOutsideClick;
|
|
15
|
-
private _handleKeydown;
|
|
16
|
-
private _close;
|
|
17
|
-
private _dispatchClose;
|
|
18
37
|
}
|
|
19
38
|
declare global {
|
|
20
39
|
interface HTMLElementTagNameMap {
|
|
21
40
|
'void-popover': VoidPopover;
|
|
22
41
|
}
|
|
23
42
|
}
|
|
24
|
-
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -1,52 +1,64 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { i as n, n as r } from "../chunks/parts-D30c8OoG.js";
|
|
4
|
+
import { t as i } from "../chunks/overlay-BywGMcDW.js";
|
|
5
|
+
import { property as a } from "lit/decorators.js";
|
|
4
6
|
//#region src/components/popover.ts
|
|
5
|
-
var
|
|
7
|
+
var o = class extends e {
|
|
6
8
|
constructor(...e) {
|
|
7
|
-
super(...e), this.open = !1, this.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
super(...e), this.open = !1, this.side = "bottom", this.align = "start", this.trigger = "click", this._parts = new r(this, {
|
|
10
|
+
tags: ["void-popover-trigger", "void-popover-content"],
|
|
11
|
+
onChange: () => {
|
|
12
|
+
this._wire(), this.requestUpdate();
|
|
13
|
+
}
|
|
14
|
+
}), this._overlay = new i(this, {
|
|
15
|
+
kind: "dialog",
|
|
16
|
+
surface: () => this._parts.one("void-popover-content"),
|
|
17
|
+
isOpen: () => this.open,
|
|
18
|
+
setOpen: (e) => {
|
|
19
|
+
this.open = e;
|
|
20
|
+
},
|
|
21
|
+
trigger: () => this._control(),
|
|
22
|
+
haspopup: "dialog",
|
|
23
|
+
anchor: () => this,
|
|
24
|
+
hostStyle: (e, t) => this.setHostStyle(e, t),
|
|
25
|
+
placement: () => ({
|
|
26
|
+
side: this.side,
|
|
27
|
+
align: this.align
|
|
28
|
+
}),
|
|
29
|
+
attr: (e, t, n) => this._parts.set(e, t, n),
|
|
30
|
+
style: (e, t, n) => this._parts.style(e, t, n)
|
|
31
|
+
}), this._handleTriggerClick = (e) => {
|
|
32
|
+
let t = this._parts.one("void-popover-trigger");
|
|
33
|
+
this.trigger !== "click" || !t || !t.contains(e.target) || this._overlay.toggle("trigger");
|
|
13
34
|
};
|
|
14
35
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
disconnectedCallback() {
|
|
19
|
-
super.disconnectedCallback(), document.removeEventListener("mousedown", this._handleOutsideClick), document.removeEventListener("keydown", this._handleKeydown);
|
|
36
|
+
_control() {
|
|
37
|
+
return n(this._parts.one("void-popover-trigger"));
|
|
20
38
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
let e = document.createElement("div");
|
|
25
|
-
e.className = "void-popover-body";
|
|
26
|
-
for (let t of this._contentNodes) e.appendChild(t);
|
|
27
|
-
this.appendChild(e);
|
|
28
|
-
}
|
|
29
|
-
e.has("trigger") && this._triggerEl && (this._triggerEl.removeEventListener("click", this._handleTriggerClick), this.trigger === "click" && this._triggerEl.addEventListener("click", this._handleTriggerClick));
|
|
39
|
+
_wire() {
|
|
40
|
+
let e = this._parts.one("void-popover-content"), t = this._control();
|
|
41
|
+
e && (this._parts.set(e, "popover", "manual"), this._parts.set(e, "role", "dialog"), this._parts.id(e, "void-popover-content"), this._parts.set(e, "aria-labelledby", t ? this._parts.id(t, "void-popover-trigger") : null));
|
|
30
42
|
}
|
|
31
|
-
|
|
32
|
-
this.
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
super.connectedCallback(), this.addEventListener("click", this._handleTriggerClick);
|
|
33
45
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
bubbles: !0,
|
|
37
|
-
composed: !0
|
|
38
|
-
}));
|
|
46
|
+
disconnectedCallback() {
|
|
47
|
+
super.disconnectedCallback(), this.removeEventListener("click", this._handleTriggerClick);
|
|
39
48
|
}
|
|
40
49
|
};
|
|
41
|
-
t([
|
|
50
|
+
t([a({
|
|
42
51
|
type: Boolean,
|
|
43
52
|
reflect: !0
|
|
44
|
-
})],
|
|
53
|
+
})], o.prototype, "open", void 0), t([a({
|
|
54
|
+
type: String,
|
|
55
|
+
reflect: !0
|
|
56
|
+
})], o.prototype, "side", void 0), t([a({
|
|
45
57
|
type: String,
|
|
46
58
|
reflect: !0
|
|
47
|
-
})],
|
|
59
|
+
})], o.prototype, "align", void 0), t([a({
|
|
48
60
|
type: String,
|
|
49
61
|
reflect: !0
|
|
50
|
-
})],
|
|
62
|
+
})], o.prototype, "trigger", void 0), customElements.get("void-popover") || customElements.define("void-popover", o);
|
|
51
63
|
//#endregion
|
|
52
|
-
export {
|
|
64
|
+
export { o as VoidPopover };
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
2
|
/** Visual progress indicator for file uploads, multi-step processes, and loading states. */
|
|
3
3
|
export declare class VoidProgress extends VoidElement {
|
|
4
|
+
/** Current progress, from 0 to `max`. Ignored while `indeterminate`. */
|
|
4
5
|
value: number;
|
|
6
|
+
/** Value that means complete. Defaults to 100. */
|
|
5
7
|
max: number;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
/** Status colour of the bar: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`. */
|
|
9
|
+
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
10
|
+
/** Thickness step of the bar: `sm`, `md` (default) or `lg`. */
|
|
11
|
+
size: 'sm' | 'md' | 'lg';
|
|
12
|
+
/** Show an animated bar for work of unknown length. It has no `aria-valuenow` while on. */
|
|
8
13
|
indeterminate: boolean;
|
|
9
14
|
connectedCallback(): void;
|
|
10
15
|
updated(changed: Map<string, unknown>): void;
|
|
@@ -15,4 +20,3 @@ declare global {
|
|
|
15
20
|
'void-progress': VoidProgress;
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { html as n } from "lit";
|
|
4
4
|
import { property as r } from "lit/decorators.js";
|
|
@@ -8,10 +8,10 @@ var i = class extends e {
|
|
|
8
8
|
super(...e), this.value = 0, this.max = 100, this.color = "default", this.size = "md", this.indeterminate = !1;
|
|
9
9
|
}
|
|
10
10
|
connectedCallback() {
|
|
11
|
-
super.connectedCallback(), this.
|
|
11
|
+
super.connectedCallback(), this.setHostAttribute("role", "progressbar"), this.setHostAttribute("aria-valuemin", "0"), this.setHostAttribute("aria-valuemax", String(this.max)), this.indeterminate || this.setHostAttribute("aria-valuenow", String(this.value));
|
|
12
12
|
}
|
|
13
13
|
updated(e) {
|
|
14
|
-
e.has("max") && this.
|
|
14
|
+
e.has("max") && this.setHostAttribute("aria-valuemax", String(this.max)), (e.has("value") || e.has("indeterminate")) && (this.indeterminate ? this.setHostAttribute("aria-valuenow", null) : this.setHostAttribute("aria-valuenow", String(this.value)));
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
let e = Math.min(100, Math.max(0, this.value / this.max * 100));
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ProjectionController } from '../projection.js';
|
|
3
|
+
declare const VoidRadioGroup_base: (new (...args: any[]) => import('../form-control.js').VoidNativeFormControl) & typeof VoidElement;
|
|
4
|
+
/**
|
|
5
|
+
* Mutually exclusive option group for plan pickers, survey questions, and preference settings.
|
|
6
|
+
*
|
|
7
|
+
* Form strategy: pass-through. `name` is forwarded to the child void-radio
|
|
8
|
+
* elements, whose native radios submit; the group itself submits nothing.
|
|
9
|
+
*/
|
|
10
|
+
export declare class VoidRadioGroup extends VoidRadioGroup_base {
|
|
11
|
+
/** Name of the group, shown above the radios and used as its accessible name. */
|
|
4
12
|
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* `value` of the selected radio. Set it to choose one; it is the initial selection and the form's
|
|
15
|
+
* reset target.
|
|
16
|
+
*/
|
|
5
17
|
value: string;
|
|
6
18
|
name: string;
|
|
19
|
+
/** Forwarded to the child radios: the browser then requires one of them to be checked. */
|
|
20
|
+
required: boolean;
|
|
21
|
+
/** Disables every radio in the group (like a fieldset). */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** Lay the radios out in a `vertical` column (default) or a `horizontal` row. */
|
|
7
24
|
orientation: 'vertical' | 'horizontal';
|
|
8
|
-
|
|
9
|
-
private _didSetup;
|
|
25
|
+
protected readonly _projection: ProjectionController;
|
|
10
26
|
connectedCallback(): void;
|
|
11
27
|
disconnectedCallback(): void;
|
|
12
28
|
protected updated(changed: Map<string, unknown>): void;
|
|
29
|
+
private _didSync;
|
|
30
|
+
/** A morph may have replaced or added radios that do not show the group's value, name or form yet. */
|
|
31
|
+
protected morphedCallback(): void;
|
|
32
|
+
protected formSyncNative(): void;
|
|
33
|
+
/** The group's initial value becomes the native radios' default checkedness. */
|
|
34
|
+
protected formWriteNativeDefault(state: unknown): void;
|
|
35
|
+
protected formReadNative(): void;
|
|
13
36
|
private _radios;
|
|
14
37
|
private _syncNames;
|
|
38
|
+
private _syncRequired;
|
|
39
|
+
private _syncFormAttr;
|
|
15
40
|
private _syncChecked;
|
|
16
41
|
private _handleChildChange;
|
|
17
42
|
render(): import('lit').TemplateResult<1>;
|
|
@@ -21,4 +46,4 @@ declare global {
|
|
|
21
46
|
'void-radio-group': VoidRadioGroup;
|
|
22
47
|
}
|
|
23
48
|
}
|
|
24
|
-
|
|
49
|
+
export {};
|