@voidable/ui 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular/index.d.ts +2 -2
- package/dist/angular/index.js +2 -1
- package/dist/base.d.ts +6 -0
- package/dist/base.js +2 -2
- package/dist/chunks/activation-B8aBarKd.js +4 -0
- package/dist/chunks/{base-BxmMM3B7.js → base-BGrS4eIl.js} +9 -0
- package/dist/chunks/carousel-C9u0bg5l.js +10 -0
- package/dist/chunks/choice-BTrsi7OW.js +16 -0
- package/dist/chunks/data-Baycjoo4.js +96 -0
- package/dist/chunks/fields-MEqz-olE.js +21 -0
- package/dist/chunks/{form-control-C0vH6gii.js → form-control-fL-Hhy91.js} +49 -48
- package/dist/chunks/{keyboard-CEhMSkws.js → keyboard-ChtDvhB_.js} +4 -23
- package/dist/chunks/{keyboard-activation-CV0m4hkn.js → keyboard-activation-BfEyoaMT.js} +4 -6
- package/dist/chunks/menu-CxRRgkJI.js +21 -0
- package/dist/chunks/{modal-CgGp_fCs.js → modal-Cz2-Ov76.js} +24 -16
- package/dist/chunks/nav-menu-Bx284Dk6.js +12 -0
- package/dist/chunks/{overlay-hLJ7IQHx.js → overlay-BuV-4Yvt.js} +76 -69
- package/dist/chunks/overlay-K1ilWC1p.js +4 -0
- package/dist/chunks/pickers-CjlFgNke.js +36 -0
- package/dist/chunks/{projection-SnR79EHI.js → projection-oPe6ipjL.js} +1 -1
- package/dist/chunks/table-BBpqwWEi.js +4 -0
- package/dist/chunks/tabs-Buf3EBWq.js +10 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.js +23 -15
- package/dist/components/action-input.d.ts +2 -1
- package/dist/components/action-input.js +60 -56
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +10 -3
- package/dist/components/avatar.js +2 -2
- package/dist/components/badge.d.ts +8 -2
- package/dist/components/badge.js +1 -4
- package/dist/components/banner.d.ts +9 -0
- package/dist/components/banner.js +10 -3
- package/dist/components/bar-chart.d.ts +21 -7
- package/dist/components/bar-chart.js +68 -45
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +16 -12
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.js +24 -17
- package/dist/components/calendar.d.ts +85 -12
- package/dist/components/calendar.js +263 -120
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.d.ts +22 -0
- package/dist/components/carousel.js +66 -37
- package/dist/components/charts/data.d.ts +72 -0
- package/dist/components/checkbox-group.js +23 -22
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +30 -25
- package/dist/components/collapsible.d.ts +7 -0
- package/dist/components/collapsible.js +20 -12
- package/dist/components/color-picker.js +29 -28
- package/dist/components/combobox.d.ts +13 -1
- package/dist/components/combobox.js +55 -42
- package/dist/components/compose-input.d.ts +9 -1
- package/dist/components/compose-input.js +29 -17
- package/dist/components/dialog.js +1 -1
- package/dist/components/divider.js +2 -2
- package/dist/components/donut-chart.d.ts +22 -6
- package/dist/components/donut-chart.js +97 -70
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.d.ts +22 -0
- package/dist/components/dropdown-menu.js +55 -40
- package/dist/components/editable.d.ts +11 -1
- package/dist/components/editable.js +36 -23
- package/dist/components/error-fallback.d.ts +4 -2
- package/dist/components/error-fallback.js +35 -29
- package/dist/components/field.js +2 -2
- package/dist/components/file-upload.d.ts +29 -5
- package/dist/components/file-upload.js +84 -28
- package/dist/components/gauge.d.ts +32 -8
- package/dist/components/gauge.js +206 -133
- package/dist/components/hamburger.d.ts +19 -1
- package/dist/components/hamburger.js +45 -25
- package/dist/components/hover-card.d.ts +7 -0
- package/dist/components/hover-card.js +23 -15
- package/dist/components/indicator.js +16 -15
- package/dist/components/input.js +3 -3
- package/dist/components/line-chart.d.ts +22 -7
- package/dist/components/line-chart.js +80 -57
- package/dist/components/list.js +1 -1
- package/dist/components/menu.d.ts +25 -0
- package/dist/components/menu.js +56 -34
- package/dist/components/multiselect.d.ts +17 -1
- package/dist/components/multiselect.js +97 -75
- package/dist/components/nav-bar.d.ts +9 -0
- package/dist/components/nav-bar.js +16 -3
- package/dist/components/nav-menu.d.ts +9 -0
- package/dist/components/nav-menu.js +31 -24
- package/dist/components/number-input.d.ts +15 -1
- package/dist/components/number-input.js +72 -38
- package/dist/components/pagination.js +26 -25
- package/dist/components/panel.js +1 -1
- package/dist/components/pin-input.d.ts +11 -0
- package/dist/components/pin-input.js +47 -33
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.js +22 -14
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.d.ts +10 -1
- package/dist/components/radio.js +38 -33
- package/dist/components/scroll-area.js +2 -2
- package/dist/components/segmented-control.d.ts +14 -0
- package/dist/components/segmented-control.js +41 -29
- package/dist/components/select.js +2 -2
- package/dist/components/sidebar.d.ts +1 -0
- package/dist/components/sidebar.js +15 -11
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +3 -3
- package/dist/components/spinner.d.ts +5 -3
- package/dist/components/spinner.js +22 -15
- package/dist/components/stat.d.ts +13 -1
- package/dist/components/stat.js +28 -20
- package/dist/components/status-dot.d.ts +2 -2
- package/dist/components/status-dot.js +13 -15
- package/dist/components/stepper.d.ts +2 -0
- package/dist/components/stepper.js +21 -14
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.js +25 -17
- package/dist/components/table.d.ts +81 -1
- package/dist/components/table.js +571 -69
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +43 -34
- package/dist/components/tag.js +13 -12
- package/dist/components/tags-input.d.ts +10 -1
- package/dist/components/tags-input.js +43 -31
- package/dist/components/textarea.js +3 -3
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +36 -29
- package/dist/components/toggle-group.d.ts +8 -0
- package/dist/components/toggle-group.js +25 -18
- package/dist/components/toggle.d.ts +7 -0
- package/dist/components/toggle.js +24 -16
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.js +21 -13
- package/dist/components.json +108 -84
- package/dist/custom-elements.json +4520 -236
- package/dist/dev/rules.d.ts +0 -1
- package/dist/dev/types.d.ts +5 -1
- package/dist/dev.js +298 -122
- package/dist/index.d.ts +4 -0
- package/dist/index.js +69 -67
- package/dist/keyboard-activation.d.ts +9 -9
- package/dist/keyboard.d.ts +2 -10
- package/dist/keymaps/activation.d.ts +8 -0
- package/dist/keymaps/carousel.d.ts +9 -0
- package/dist/keymaps/choice.d.ts +21 -0
- package/dist/keymaps/fields.d.ts +31 -0
- package/dist/keymaps/index.d.ts +2 -0
- package/dist/keymaps/menu.d.ts +36 -0
- package/dist/keymaps/nav-menu.d.ts +11 -0
- package/dist/keymaps/overlay.d.ts +4 -0
- package/dist/keymaps/pickers.d.ts +36 -0
- package/dist/keymaps/table.d.ts +8 -0
- package/dist/keymaps/tabs.d.ts +7 -0
- package/dist/keymaps.js +51 -0
- package/dist/keys.d.ts +46 -0
- package/dist/keys.js +57 -0
- package/dist/llms.txt +11 -3
- package/dist/messages/ar.d.ts +1 -0
- package/dist/messages/ar.js +130 -0
- package/dist/messages/fr.d.ts +1 -0
- package/dist/messages/fr.js +109 -0
- package/dist/messages.d.ts +213 -0
- package/dist/messages.js +190 -0
- package/dist/modal.d.ts +7 -0
- package/dist/reference.md +885 -60
- package/dist/testing/index.d.ts +46 -0
- package/dist/testing.js +79 -0
- package/dist/types/elements.d.ts +100 -84
- package/dist/types/react.d.ts +7 -3
- package/dist/types/solid.d.ts +7 -3
- package/dist/types/solid2.d.ts +4 -0
- package/dist/types/svelte.d.ts +7 -3
- package/dist/types/vue.d.ts +7 -3
- package/dist/vscode.html-custom-data.json +478 -38
- package/dist/web-types.json +1001 -111
- package/package.json +22 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { msg as n, nameHost as r } from "../messages.js";
|
|
4
|
+
import { property as i } from "lit/decorators.js";
|
|
4
5
|
//#region src/components/sidebar.ts
|
|
5
|
-
var
|
|
6
|
+
var a = class extends e {
|
|
6
7
|
constructor(...e) {
|
|
7
8
|
super(...e), this.collapsed = !1, this.width = "var(--void-sidebar-width)", this.collapsedWidth = "var(--void-sidebar-collapsed-width)", this.side = "start";
|
|
8
9
|
}
|
|
@@ -20,31 +21,34 @@ var r = class extends e {
|
|
|
20
21
|
}));
|
|
21
22
|
}
|
|
22
23
|
connectedCallback() {
|
|
23
|
-
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this.
|
|
24
|
+
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this._name(), this._updateWidth();
|
|
24
25
|
}
|
|
25
26
|
disconnectedCallback() {
|
|
26
27
|
super.disconnectedCallback();
|
|
27
28
|
}
|
|
29
|
+
_name() {
|
|
30
|
+
r(this, n(this, "sidebar.label"), (e, t) => this.setHostAttribute(e, t));
|
|
31
|
+
}
|
|
28
32
|
updated(e) {
|
|
29
|
-
(e.has("collapsed") || e.has("width") || e.has("collapsedWidth")) && this._updateWidth();
|
|
33
|
+
this._name(), (e.has("collapsed") || e.has("width") || e.has("collapsedWidth")) && this._updateWidth();
|
|
30
34
|
}
|
|
31
35
|
_updateWidth() {
|
|
32
36
|
this.setHostStyle("--void-sidebar-width", this.collapsed ? this.collapsedWidth : this.width);
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
|
-
t([
|
|
39
|
+
t([i({
|
|
36
40
|
type: Boolean,
|
|
37
41
|
reflect: !0
|
|
38
|
-
})],
|
|
42
|
+
})], a.prototype, "collapsed", void 0), t([i({
|
|
39
43
|
type: String,
|
|
40
44
|
reflect: !0
|
|
41
|
-
})],
|
|
45
|
+
})], a.prototype, "width", void 0), t([i({
|
|
42
46
|
type: String,
|
|
43
47
|
attribute: "collapsed-width",
|
|
44
48
|
reflect: !0
|
|
45
|
-
})],
|
|
49
|
+
})], a.prototype, "collapsedWidth", void 0), t([i({
|
|
46
50
|
type: String,
|
|
47
51
|
reflect: !0
|
|
48
|
-
})],
|
|
52
|
+
})], a.prototype, "side", void 0), customElements.get("void-sidebar") || customElements.define("void-sidebar", a);
|
|
49
53
|
//#endregion
|
|
50
|
-
export {
|
|
54
|
+
export { a as VoidSidebar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import { n } from "../chunks/form-control-
|
|
4
|
-
import { r } from "../chunks/projection-
|
|
3
|
+
import { n } from "../chunks/form-control-fL-Hhy91.js";
|
|
4
|
+
import { r } from "../chunks/projection-oPe6ipjL.js";
|
|
5
5
|
import { html as i, nothing as a } from "lit";
|
|
6
6
|
import { property as o } from "lit/decorators.js";
|
|
7
7
|
//#region src/components/slider.ts
|
|
@@ -4,12 +4,14 @@ export declare class VoidSpinner extends VoidElement {
|
|
|
4
4
|
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
5
5
|
size: 'sm' | 'md' | 'lg';
|
|
6
6
|
/**
|
|
7
|
-
* Text announced to screen readers while loading, and the spinner's accessible name. Defaults to
|
|
8
|
-
* `Loading
|
|
7
|
+
* Text announced to screen readers while loading, and the spinner's accessible name. Defaults to the `spinner.label` message (English:
|
|
8
|
+
* `Loading`); say what is loading (`Loading orders`).
|
|
9
9
|
*/
|
|
10
10
|
label: string;
|
|
11
11
|
connectedCallback(): void;
|
|
12
|
-
|
|
12
|
+
private _text;
|
|
13
|
+
private _name;
|
|
14
|
+
updated(): void;
|
|
13
15
|
render(): import('lit').TemplateResult<1>;
|
|
14
16
|
}
|
|
15
17
|
declare global {
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { msg as n, nameHost as r } from "../messages.js";
|
|
4
|
+
import { r as i } from "../chunks/projection-oPe6ipjL.js";
|
|
5
|
+
import { html as a } from "lit";
|
|
6
|
+
import { property as o } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/spinner.ts
|
|
7
|
-
|
|
8
|
-
var
|
|
8
|
+
i();
|
|
9
|
+
var s = class extends e {
|
|
9
10
|
constructor(...e) {
|
|
10
|
-
super(...e), this.size = "md", this.label = "
|
|
11
|
+
super(...e), this.size = "md", this.label = "";
|
|
11
12
|
}
|
|
12
13
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback(), this.setHostAttribute("role", "status"), this.
|
|
14
|
+
super.connectedCallback(), this.setHostAttribute("role", "status"), this._name();
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
_text() {
|
|
17
|
+
return this.label || n(this, "spinner.label");
|
|
18
|
+
}
|
|
19
|
+
_name() {
|
|
20
|
+
r(this, this._text(), (e, t) => this.setHostAttribute(e, t));
|
|
21
|
+
}
|
|
22
|
+
updated() {
|
|
23
|
+
this._name();
|
|
17
24
|
}
|
|
18
25
|
render() {
|
|
19
|
-
return
|
|
26
|
+
return a`<span data-void-sr>${this._text()}</span>`;
|
|
20
27
|
}
|
|
21
28
|
};
|
|
22
|
-
t([
|
|
29
|
+
t([o({
|
|
23
30
|
type: String,
|
|
24
31
|
reflect: !0
|
|
25
|
-
})],
|
|
32
|
+
})], s.prototype, "size", void 0), t([o({
|
|
26
33
|
type: String,
|
|
27
34
|
reflect: !0
|
|
28
|
-
})],
|
|
35
|
+
})], s.prototype, "label", void 0), customElements.get("void-spinner") || customElements.define("void-spinner", s);
|
|
29
36
|
//#endregion
|
|
30
|
-
export {
|
|
37
|
+
export { s as VoidSpinner };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Key metric display for analytics dashboards and KPI summaries with label, value, delta, and trend.
|
|
4
|
+
*
|
|
5
|
+
* With a `label` it is a `group` named by the label; without one it has no role.
|
|
6
|
+
*/
|
|
3
7
|
export declare class VoidStat extends VoidElement {
|
|
4
8
|
/** Small caption above the value, such as `Active users`. */
|
|
5
9
|
label: string;
|
|
@@ -25,7 +29,15 @@ export declare class VoidStat extends VoidElement {
|
|
|
25
29
|
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
26
30
|
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
27
31
|
size: 'sm' | 'md' | 'lg';
|
|
32
|
+
private readonly _labelId;
|
|
28
33
|
connectedCallback(): void;
|
|
34
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
35
|
+
/**
|
|
36
|
+
* A stat with a `label` is a `group` named by it, so a reader hears "Revenue, group" and then the figures;
|
|
37
|
+
* without a label it is plain text and has no role. A role or name the author wrote is kept.
|
|
38
|
+
*/
|
|
39
|
+
private _syncName;
|
|
40
|
+
private _writtenRole;
|
|
29
41
|
render(): import('lit').TemplateResult<1>;
|
|
30
42
|
}
|
|
31
43
|
declare global {
|
package/dist/components/stat.js
CHANGED
|
@@ -1,47 +1,55 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import { r as n } from "../chunks/projection-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-oPe6ipjL.js";
|
|
4
|
+
import { i as r } from "../chunks/keyboard-ChtDvhB_.js";
|
|
5
|
+
import { html as i } from "lit";
|
|
6
|
+
import { property as a } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/stat.ts
|
|
7
8
|
n();
|
|
8
|
-
var
|
|
9
|
+
var o = class extends e {
|
|
9
10
|
constructor(...e) {
|
|
10
|
-
super(...e), this.label = "", this.value = "", this.delta = "", this.description = "", this.trend = null, this.color = "default", this.size = "md";
|
|
11
|
+
super(...e), this.label = "", this.value = "", this.delta = "", this.description = "", this.trend = null, this.color = "default", this.size = "md", this._labelId = r("void-stat-label"), this._writtenRole = null;
|
|
11
12
|
}
|
|
12
13
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback(), this.
|
|
14
|
+
super.connectedCallback(), this._syncName();
|
|
15
|
+
}
|
|
16
|
+
updated(e) {
|
|
17
|
+
super.updated(e), e.has("label") && this._syncName();
|
|
18
|
+
}
|
|
19
|
+
_syncName() {
|
|
20
|
+
let e = this.getAttribute("role");
|
|
21
|
+
(e === null || e === this._writtenRole) && (this._writtenRole = this.label ? "group" : null, this.setHostAttribute("role", this._writtenRole)), !this.hasAttribute("aria-label") && (!this.hasAttribute("aria-labelledby") || this.getAttribute("aria-labelledby") === this._labelId) && this.setHostAttribute("aria-labelledby", this.label ? this._labelId : null);
|
|
14
22
|
}
|
|
15
23
|
render() {
|
|
16
|
-
return
|
|
17
|
-
${this.label ?
|
|
24
|
+
return i`
|
|
25
|
+
${this.label ? i`<span class="void-stat-label" id=${this._labelId}>${this.label}</span>` : ""}
|
|
18
26
|
<span class="void-stat-value">${this.value}</span>
|
|
19
|
-
${this.delta ?
|
|
20
|
-
${this.description ?
|
|
27
|
+
${this.delta ? i`<span class="void-stat-delta">${this.delta}</span>` : ""}
|
|
28
|
+
${this.description ? i`<span class="void-stat-description">${this.description}</span>` : ""}
|
|
21
29
|
`;
|
|
22
30
|
}
|
|
23
31
|
};
|
|
24
|
-
t([
|
|
32
|
+
t([a({
|
|
25
33
|
type: String,
|
|
26
34
|
reflect: !0
|
|
27
|
-
})],
|
|
35
|
+
})], o.prototype, "label", void 0), t([a({
|
|
28
36
|
type: String,
|
|
29
37
|
reflect: !0
|
|
30
|
-
})],
|
|
38
|
+
})], o.prototype, "value", void 0), t([a({
|
|
31
39
|
type: String,
|
|
32
40
|
reflect: !0
|
|
33
|
-
})],
|
|
41
|
+
})], o.prototype, "delta", void 0), t([a({
|
|
34
42
|
type: String,
|
|
35
43
|
reflect: !0
|
|
36
|
-
})],
|
|
44
|
+
})], o.prototype, "description", void 0), t([a({
|
|
37
45
|
type: String,
|
|
38
46
|
reflect: !0
|
|
39
|
-
})],
|
|
47
|
+
})], o.prototype, "trend", void 0), t([a({
|
|
40
48
|
type: String,
|
|
41
49
|
reflect: !0
|
|
42
|
-
})],
|
|
50
|
+
})], o.prototype, "color", void 0), t([a({
|
|
43
51
|
type: String,
|
|
44
52
|
reflect: !0
|
|
45
|
-
})],
|
|
53
|
+
})], o.prototype, "size", void 0), customElements.get("void-stat") || customElements.define("void-stat", o);
|
|
46
54
|
//#endregion
|
|
47
|
-
export {
|
|
55
|
+
export { o as VoidStat };
|
|
@@ -7,8 +7,8 @@ export declare class VoidStatusDot extends VoidElement {
|
|
|
7
7
|
*/
|
|
8
8
|
status: 'online' | 'away' | 'offline';
|
|
9
9
|
connectedCallback(): void;
|
|
10
|
-
updated(
|
|
11
|
-
private
|
|
10
|
+
updated(): void;
|
|
11
|
+
private _name;
|
|
12
12
|
}
|
|
13
13
|
declare global {
|
|
14
14
|
interface HTMLElementTagNameMap {
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { msg as n, nameHost as r } from "../messages.js";
|
|
4
|
+
import { property as i } from "lit/decorators.js";
|
|
4
5
|
//#region src/components/status-dot.ts
|
|
5
|
-
var
|
|
6
|
+
var a = class extends e {
|
|
6
7
|
constructor(...e) {
|
|
7
8
|
super(...e), this.status = "offline";
|
|
8
9
|
}
|
|
9
10
|
connectedCallback() {
|
|
10
|
-
super.connectedCallback(), this.setHostAttribute("role", "status"), this.
|
|
11
|
+
super.connectedCallback(), this.setHostAttribute("role", "status"), this._name();
|
|
11
12
|
}
|
|
12
|
-
updated(
|
|
13
|
-
|
|
13
|
+
updated() {
|
|
14
|
+
this._name();
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
case "away": return "Away";
|
|
19
|
-
default: return "Offline";
|
|
20
|
-
}
|
|
16
|
+
_name() {
|
|
17
|
+
let e = n(this, this.status === "online" ? "statusDot.online" : this.status === "away" ? "statusDot.away" : "statusDot.offline");
|
|
18
|
+
r(this, e, (e, t) => this.setHostAttribute(e, t));
|
|
21
19
|
}
|
|
22
20
|
};
|
|
23
|
-
t([
|
|
21
|
+
t([i({
|
|
24
22
|
type: String,
|
|
25
23
|
reflect: !0
|
|
26
|
-
})],
|
|
24
|
+
})], a.prototype, "status", void 0), customElements.get("void-status-dot") || customElements.define("void-status-dot", a);
|
|
27
25
|
//#endregion
|
|
28
|
-
export {
|
|
26
|
+
export { a as VoidStatusDot };
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { msg as n, nameHost as r } from "../messages.js";
|
|
4
|
+
import { r as i } from "../chunks/projection-oPe6ipjL.js";
|
|
5
|
+
import { html as a, nothing as o } from "lit";
|
|
6
|
+
import { property as s } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/stepper.ts
|
|
7
|
-
|
|
8
|
-
var
|
|
8
|
+
i();
|
|
9
|
+
var c = class extends e {
|
|
9
10
|
constructor(...e) {
|
|
10
11
|
super(...e), this.value = 0, this.steps = "";
|
|
11
12
|
}
|
|
12
13
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this.
|
|
14
|
+
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this._name();
|
|
15
|
+
}
|
|
16
|
+
_name() {
|
|
17
|
+
r(this, n(this, "stepper.label"), (e, t) => this.setHostAttribute(e, t));
|
|
18
|
+
}
|
|
19
|
+
updated(e) {
|
|
20
|
+
super.updated(e), this._name();
|
|
14
21
|
}
|
|
15
22
|
render() {
|
|
16
|
-
return
|
|
23
|
+
return a`${this.steps.split(",").map((e) => e.trim()).filter(Boolean).map((e, t) => {
|
|
17
24
|
let n = t < this.value ? "completed" : t === this.value ? "active" : "upcoming";
|
|
18
|
-
return
|
|
25
|
+
return a`${t > 0 ? a`<div class="void-stepper-connector" data-state=${t <= this.value ? "completed" : "upcoming"}></div>` : null}<div
|
|
19
26
|
class="void-stepper-step"
|
|
20
27
|
data-state=${n}
|
|
21
|
-
aria-current=${t === this.value ? "step" :
|
|
28
|
+
aria-current=${t === this.value ? "step" : o}
|
|
22
29
|
>
|
|
23
30
|
<span class="void-stepper-circle"
|
|
24
|
-
>${n === "completed" ?
|
|
31
|
+
>${n === "completed" ? a`<svg
|
|
25
32
|
viewBox="0 0 12 12"
|
|
26
33
|
width="1em"
|
|
27
34
|
height="1em"
|
|
@@ -39,9 +46,9 @@ var o = class extends e {
|
|
|
39
46
|
})}`;
|
|
40
47
|
}
|
|
41
48
|
};
|
|
42
|
-
t([
|
|
49
|
+
t([s({
|
|
43
50
|
type: Number,
|
|
44
51
|
reflect: !0
|
|
45
|
-
})],
|
|
52
|
+
})], c.prototype, "value", void 0), t([s({ reflect: !0 })], c.prototype, "steps", void 0), customElements.get("void-stepper") || customElements.define("void-stepper", c);
|
|
46
53
|
//#endregion
|
|
47
|
-
export {
|
|
54
|
+
export { c as VoidStepper };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
2
|
import { KeyboardActivation } from '../keyboard-activation.js';
|
|
3
|
+
import { KeyOverrides } from '../keys.js';
|
|
3
4
|
import { FormSubmission } from '../form-control.js';
|
|
4
5
|
declare const VoidSwitch_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
|
|
5
6
|
/** On/off toggle for feature flags, notification preferences, and settings that take immediate effect. */
|
|
6
7
|
export declare class VoidSwitch extends VoidSwitch_base {
|
|
8
|
+
/** Key bindings for this element's actions, as JSON (`{"activate":["Enter"]}`); `[]` switches an action off. See the keyboard guide. */
|
|
9
|
+
keys: KeyOverrides | null;
|
|
10
|
+
/** @internal The actions of this element and their default keys. */
|
|
11
|
+
static readonly keyMap: {
|
|
12
|
+
activate: string[];
|
|
13
|
+
};
|
|
7
14
|
/** Enter and Space fire a real `click`, as on a native button. */
|
|
8
15
|
protected readonly _activation: KeyboardActivation;
|
|
9
16
|
/** Whether the switch is on. Reflected to the attribute as it changes; the form's reset target stays the state it started with. */
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as r } from "../chunks/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { keysConverter as n } from "../keys.js";
|
|
4
|
+
import { t as r } from "../chunks/keyboard-activation-BfEyoaMT.js";
|
|
5
|
+
import { t as i } from "../chunks/activation-B8aBarKd.js";
|
|
6
|
+
import { t as a } from "../chunks/form-control-fL-Hhy91.js";
|
|
7
|
+
import { r as o } from "../chunks/projection-oPe6ipjL.js";
|
|
8
|
+
import { html as s } from "lit";
|
|
9
|
+
import { property as c } from "lit/decorators.js";
|
|
8
10
|
//#region src/components/switch.ts
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
+
o();
|
|
12
|
+
var l = class extends a(e) {
|
|
11
13
|
constructor(...e) {
|
|
12
|
-
super(...e), this._activation = new
|
|
14
|
+
super(...e), this.keys = null, this._activation = new r(this, { disabled: () => this.formDisabled }), this.checked = !1, this.disabled = !1, this.value = "on", this.color = "default", this.size = "md", this._handleClick = () => {
|
|
13
15
|
this.formDisabled || (this.checked = !this.checked, this.dispatchEvent(new CustomEvent("void-change", {
|
|
14
16
|
bubbles: !0,
|
|
15
17
|
composed: !0,
|
|
@@ -20,6 +22,9 @@ var s = class extends r(e) {
|
|
|
20
22
|
})));
|
|
21
23
|
};
|
|
22
24
|
}
|
|
25
|
+
static {
|
|
26
|
+
this.keyMap = i;
|
|
27
|
+
}
|
|
23
28
|
connectedCallback() {
|
|
24
29
|
super.connectedCallback(), this.setHostAttribute("role", "switch"), this.setHostAttribute("tabindex", this.disabled ? "-1" : "0"), this.setHostAttribute("aria-checked", String(this.checked)), this.addEventListener("click", this._handleClick);
|
|
25
30
|
}
|
|
@@ -42,24 +47,27 @@ var s = class extends r(e) {
|
|
|
42
47
|
this.checked = !!e;
|
|
43
48
|
}
|
|
44
49
|
render() {
|
|
45
|
-
return
|
|
50
|
+
return s`<span class="void-switch-track"><span class="void-switch-thumb"></span></span>`;
|
|
46
51
|
}
|
|
47
52
|
};
|
|
48
|
-
t([
|
|
53
|
+
t([c({
|
|
54
|
+
attribute: "keys",
|
|
55
|
+
converter: n
|
|
56
|
+
})], l.prototype, "keys", void 0), t([c({
|
|
49
57
|
type: Boolean,
|
|
50
58
|
reflect: !0
|
|
51
|
-
})],
|
|
59
|
+
})], l.prototype, "checked", void 0), t([c({
|
|
52
60
|
type: Boolean,
|
|
53
61
|
reflect: !0
|
|
54
|
-
})],
|
|
62
|
+
})], l.prototype, "disabled", void 0), t([c({
|
|
55
63
|
type: String,
|
|
56
64
|
reflect: !0
|
|
57
|
-
})],
|
|
65
|
+
})], l.prototype, "value", void 0), t([c({
|
|
58
66
|
type: String,
|
|
59
67
|
reflect: !0
|
|
60
|
-
})],
|
|
68
|
+
})], l.prototype, "color", void 0), t([c({
|
|
61
69
|
type: String,
|
|
62
70
|
reflect: !0
|
|
63
|
-
})],
|
|
71
|
+
})], l.prototype, "size", void 0), customElements.get("void-switch") || customElements.define("void-switch", l);
|
|
64
72
|
//#endregion
|
|
65
|
-
export {
|
|
73
|
+
export { l as VoidSwitch };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
2
|
import { VoidElement } from '../base.js';
|
|
3
|
+
import { FormSubmission, FormValidityResult } from '../form-control.js';
|
|
4
|
+
import { KeyOverrides } from '../keys.js';
|
|
5
|
+
declare const VoidTable_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
|
|
3
6
|
/**
|
|
4
7
|
* Data table around a native `<table>`: sets how it looks (`striped`, `hoverable`, `compact`,
|
|
5
8
|
* `bordered`, `inset`), how it behaves when the container is narrow (`stack`) and when it is wider
|
|
@@ -14,6 +17,10 @@ import { VoidElement } from '../base.js';
|
|
|
14
17
|
* `data-align="end"` on a header cell right-aligns a numeric column. Because browsers can drop table
|
|
15
18
|
* semantics when `display` changes, a table with `stack` carries explicit table, row and cell roles.
|
|
16
19
|
*
|
|
20
|
+
* **Name.** A table needs a name: write a `<caption>` (the caption part; it can be visually hidden), or an
|
|
21
|
+
* `aria-label` (or `label`) on the `<void-table>`, which the component copies onto the native `<table>`. `voidable check`
|
|
22
|
+
* reports a `<void-table>` with neither (rule `missing-name`).
|
|
23
|
+
*
|
|
17
24
|
* **Overflow.** Nothing is clipped by default, so a menu, popover or tooltip opened from a cell is
|
|
18
25
|
* always fully visible. `scrollable` makes the table its own horizontal scroll region: it is
|
|
19
26
|
* focusable and labelled (`label`, else the `<caption>`, else `aria-label`) only while it actually
|
|
@@ -21,9 +28,35 @@ import { VoidElement } from '../base.js';
|
|
|
21
28
|
* scroll vertically too, which is what `sticky-header` needs; without it a sticky header sticks to
|
|
22
29
|
* the page.
|
|
23
30
|
*
|
|
31
|
+
* **Sorting.** `data-sort` on a header cell (`data-sort="number"` or `"date"`; text by default) makes the column
|
|
32
|
+
* sortable: the component wraps the header's content in a `<button>`, writes `aria-sort` and, on activation,
|
|
33
|
+
* cycles ascending, descending, none. A cell's `data-sort-value` is the value compared (ISO dates, raw numbers).
|
|
34
|
+
* Text uses `Intl.Collator` for the closest `lang` with numeric collation; empty cells sort last in both
|
|
35
|
+
* directions. One column at a time. `sort` is the column's `data-key` (else its index) and `sort-direction` its direction.
|
|
36
|
+
*
|
|
37
|
+
* **Filtering.** `filter` hides (with `hidden`) the body rows that do not contain every word, ignoring case and accents,
|
|
38
|
+
* in all columns or in the `data-key`s of `filter-columns`. An author-written `<void-table-filter>` holding a search
|
|
39
|
+
* input is wired to it (typing is debounced). A visually hidden live region says "N of M rows" and a
|
|
40
|
+
* `<void-table-empty>` part shows while nothing matches.
|
|
41
|
+
*
|
|
42
|
+
* **Selection.** `selectable` (or `selectable="single"`) wires the checkboxes the author wrote in the rows (a
|
|
43
|
+
* `void-checkbox` or a native one, in the `data-stack="select"` column) and in the header (select all, which acts
|
|
44
|
+
* on the rows shown). Rows are identified by `data-value` (else their position). `value` is the selected row
|
|
45
|
+
* values as a JSON array, submitted with the form when `name` is set. `<void-table-selection>` is shown while
|
|
46
|
+
* anything is selected and `<void-table-select-all>` offers "all N rows" across server pages (`total-rows`,
|
|
47
|
+
* `all-selected`).
|
|
48
|
+
*
|
|
49
|
+
* **Server mode.** `manual` leaves ordering, visibility and selection markup to the server: the table only
|
|
50
|
+
* updates header state and fires the events.
|
|
51
|
+
*
|
|
52
|
+
* Shortcuts are opt-in: the `selectAll` key action has no default key, and `keys='{"selectAll":["Control+a","Meta+a"]}'` lets Ctrl or Cmd plus A inside the body select every shown row.
|
|
53
|
+
*
|
|
24
54
|
* @cssprop --void-table-max-height - Height at which a scrollable table starts scrolling vertically.
|
|
55
|
+
* @fires {CustomEvent<{ column: string, direction: 'ascending' | 'descending' | 'none' }>} void-sort - A user activated a sortable header; cancelable.
|
|
56
|
+
* @fires {CustomEvent<{ filter: string, shown: number, total: number }>} void-filter - The user changed the filter.
|
|
57
|
+
* @fires {CustomEvent<{ value: string[], all: boolean }>} void-change - The user changed the selection.
|
|
25
58
|
*/
|
|
26
|
-
export declare class VoidTable extends
|
|
59
|
+
export declare class VoidTable extends VoidTable_base {
|
|
27
60
|
#private;
|
|
28
61
|
/** Shade every other body row. */
|
|
29
62
|
striped: boolean;
|
|
@@ -52,8 +85,54 @@ export declare class VoidTable extends VoidElement {
|
|
|
52
85
|
maxHeight: string | null;
|
|
53
86
|
/** Accessible name of the scroll region (default: the table's caption, then `aria-label`). */
|
|
54
87
|
label: string | null;
|
|
88
|
+
/** The key (`data-key` of the header cell, else its position) of the column the rows are sorted by. */
|
|
89
|
+
sort: string | null;
|
|
90
|
+
/** Direction of the sort. A `sort` without it is ascending. */
|
|
91
|
+
sortDirection: string | null;
|
|
92
|
+
/** Hides the body rows that do not contain every whitespace-separated word, ignoring case and accents. */
|
|
93
|
+
filter: string | null;
|
|
94
|
+
/** The `data-key`s (or positions), separated by spaces or commas, of the columns `filter` looks at. Default: every column. */
|
|
95
|
+
filterColumns: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Wires the row checkboxes. Present without a value: any number of rows; `single`: one row at a time.
|
|
98
|
+
*/
|
|
99
|
+
selectable: string | null;
|
|
100
|
+
/** The server renders order, visibility, `aria-sort` and selection; the table only fires its events and updates header state. */
|
|
101
|
+
manual: boolean;
|
|
102
|
+
/** How many rows there are in all, across the server's pages. Enables `<void-table-select-all>`. */
|
|
103
|
+
totalRows: number | null;
|
|
104
|
+
/** Every row across the server's pages is selected (the user activated the select-all part). The server applies the action to the full set. */
|
|
105
|
+
allSelected: boolean;
|
|
106
|
+
/** Key actions (JSON): `{"selectAll":["Control+a","Meta+a"]}` turns on select-all by keyboard, which has no default key. */
|
|
107
|
+
keys: KeyOverrides | null;
|
|
108
|
+
/** @internal The actions of this element and their default keys. */
|
|
109
|
+
static readonly keyMap: {
|
|
110
|
+
selectAll: never[];
|
|
111
|
+
};
|
|
55
112
|
connectedCallback(): void;
|
|
56
113
|
disconnectedCallback(): void;
|
|
114
|
+
/**
|
|
115
|
+
* The values of the selected rows, as a list; the `value` attribute is the same list as a JSON array
|
|
116
|
+
* (`value='["a","b"]'`), kept in step as the selection changes. Setting it selects those rows (it does not fire `void-change`).
|
|
117
|
+
* Values that match no row are dropped when the rows are known.
|
|
118
|
+
* @default []
|
|
119
|
+
*/
|
|
120
|
+
get value(): string[];
|
|
121
|
+
set value(values: string[]);
|
|
122
|
+
/**
|
|
123
|
+
* One entry per selected row. A table that is not `selectable` has nothing to submit: it is form-associated
|
|
124
|
+
* (that is fixed per class, so it is listed in `form.elements` either way) but it adds no entry to the form.
|
|
125
|
+
*/
|
|
126
|
+
protected formSubmission(): FormSubmission;
|
|
127
|
+
/** `required` means "select at least one row": it has no meaning on a table that is not `selectable`. */
|
|
128
|
+
protected formValidity(): FormValidityResult | null;
|
|
129
|
+
/**
|
|
130
|
+
* A morph may have reset what a row's checkbox shows or whether a row is hidden without any change a
|
|
131
|
+
* mutation observer sees (a property): the component's own state is written again, nothing is read back.
|
|
132
|
+
*/
|
|
133
|
+
protected morphedCallback(): void;
|
|
134
|
+
/** The server rendered a new `value` or `selectable`: re-apply it to the rows. */
|
|
135
|
+
protected serverChangedCallback(names: ReadonlySet<string>): void;
|
|
57
136
|
protected updated(changed: PropertyValues): void;
|
|
58
137
|
}
|
|
59
138
|
declare global {
|
|
@@ -61,3 +140,4 @@ declare global {
|
|
|
61
140
|
'void-table': VoidTable;
|
|
62
141
|
}
|
|
63
142
|
}
|
|
143
|
+
export {};
|