@voidable/ui 0.5.2 → 0.5.4
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/base.d.ts +5 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +9 -0
- package/dist/chunks/decorate-DKuCkHK4.js +9 -0
- package/dist/components/accordion.d.ts +25 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +73 -0
- package/dist/components/action-input.d.ts +28 -0
- package/dist/components/action-input.d.ts.map +1 -0
- package/dist/components/action-input.js +117 -0
- package/dist/components/alert.d.ts +20 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +40 -0
- package/dist/components/avatar.d.ts +18 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +36 -0
- package/dist/components/badge.d.ts +14 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/banner.d.ts +20 -0
- package/dist/components/banner.d.ts.map +1 -0
- package/dist/components/banner.js +40 -0
- package/dist/components/breadcrumbs.d.ts +16 -0
- package/dist/components/breadcrumbs.d.ts.map +1 -0
- package/dist/components/breadcrumbs.js +33 -0
- package/dist/components/button.d.ts +25 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +56 -0
- package/dist/components/calendar.d.ts +75 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +417 -0
- package/dist/components/card.d.ts +18 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +32 -0
- package/dist/components/carousel.d.ts +41 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +145 -0
- package/dist/components/checkbox-group.d.ts +20 -0
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +48 -0
- package/dist/components/checkbox.d.ts +25 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +69 -0
- package/dist/components/collapsible.d.ts +21 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +61 -0
- package/dist/components/color-picker.d.ts +47 -0
- package/dist/components/color-picker.d.ts.map +1 -0
- package/dist/components/color-picker.js +217 -0
- package/dist/components/combobox.d.ts +30 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +89 -0
- package/dist/components/compose-input.d.ts +19 -0
- package/dist/components/compose-input.d.ts.map +1 -0
- package/dist/components/compose-input.js +71 -0
- package/dist/components/dialog.d.ts +26 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +64 -0
- package/dist/components/divider.d.ts +16 -0
- package/dist/components/divider.d.ts.map +1 -0
- package/dist/components/divider.js +28 -0
- package/dist/components/drawer.d.ts +26 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +62 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +72 -0
- package/dist/components/editable.d.ts +27 -0
- package/dist/components/editable.d.ts.map +1 -0
- package/dist/components/editable.js +82 -0
- package/dist/components/error-fallback.d.ts +18 -0
- package/dist/components/error-fallback.d.ts.map +1 -0
- package/dist/components/error-fallback.js +35 -0
- package/dist/components/field.d.ts +19 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +42 -0
- package/dist/components/file-upload.d.ts +26 -0
- package/dist/components/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload.js +99 -0
- package/dist/components/hamburger.d.ts +18 -0
- package/dist/components/hamburger.d.ts.map +1 -0
- package/dist/components/hamburger.js +45 -0
- package/dist/components/hover-card.d.ts +31 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +80 -0
- package/dist/components/indicator.d.ts +20 -0
- package/dist/components/indicator.d.ts.map +1 -0
- package/dist/components/indicator.js +39 -0
- package/dist/components/input.d.ts +23 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +73 -0
- package/dist/components/list.d.ts +22 -0
- package/dist/components/list.d.ts.map +1 -0
- package/dist/components/list.js +45 -0
- package/dist/components/menu.d.ts +50 -0
- package/dist/components/menu.d.ts.map +1 -0
- package/dist/components/menu.js +162 -0
- package/dist/components/multiselect.d.ts +35 -0
- package/dist/components/multiselect.d.ts.map +1 -0
- package/dist/components/multiselect.js +118 -0
- package/dist/components/nav-bar.d.ts +18 -0
- package/dist/components/nav-bar.d.ts.map +1 -0
- package/dist/components/nav-bar.js +35 -0
- package/dist/components/nav-menu.d.ts +42 -0
- package/dist/components/nav-menu.d.ts.map +1 -0
- package/dist/components/nav-menu.js +122 -0
- package/dist/components/number-input.d.ts +41 -0
- package/dist/components/number-input.d.ts.map +1 -0
- package/dist/components/number-input.js +143 -0
- package/dist/components/pagination.d.ts +17 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +62 -0
- package/dist/components/panel.d.ts +18 -0
- package/dist/components/panel.d.ts.map +1 -0
- package/dist/components/panel.js +31 -0
- package/dist/components/pin-input.d.ts +33 -0
- package/dist/components/pin-input.d.ts.map +1 -0
- package/dist/components/pin-input.js +132 -0
- package/dist/components/popover.d.ts +24 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +52 -0
- package/dist/components/progress.d.ts +18 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +38 -0
- package/dist/components/radio-group.d.ts +24 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +56 -0
- package/dist/components/radio.d.ts +24 -0
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +68 -0
- package/dist/components/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +30 -0
- package/dist/components/segmented-control.d.ts +27 -0
- package/dist/components/segmented-control.d.ts.map +1 -0
- package/dist/components/segmented-control.js +70 -0
- package/dist/components/select.d.ts +23 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +64 -0
- package/dist/components/sidebar.d.ts +18 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +40 -0
- package/dist/components/skeleton.d.ts +12 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +18 -0
- package/dist/components/slider.d.ts +24 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +68 -0
- package/dist/components/spinner.d.ts +15 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +28 -0
- package/dist/components/stat.d.ts +18 -0
- package/dist/components/stat.d.ts.map +1 -0
- package/dist/components/stat.js +41 -0
- package/dist/components/status-dot.d.ts +14 -0
- package/dist/components/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot.js +28 -0
- package/dist/components/stepper.d.ts +14 -0
- package/dist/components/stepper.d.ts.map +1 -0
- package/dist/components/stepper.js +45 -0
- package/dist/components/switch.d.ts +20 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +45 -0
- package/dist/components/table.d.ts +14 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +24 -0
- package/dist/components/tabs.d.ts +28 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +76 -0
- package/dist/components/tag.d.ts +20 -0
- package/dist/components/tag.d.ts.map +1 -0
- package/dist/components/tag.js +41 -0
- package/dist/components/tags-input.d.ts +34 -0
- package/dist/components/tags-input.d.ts.map +1 -0
- package/dist/components/tags-input.js +109 -0
- package/dist/components/textarea.d.ts +24 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +77 -0
- package/dist/components/toast.d.ts +36 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +55 -0
- package/dist/components/toggle-group.d.ts +24 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +80 -0
- package/dist/components/toggle.d.ts +15 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +44 -0
- package/dist/components/tooltip.d.ts +26 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +45 -0
- package/dist/index.d.ts +64 -1157
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -4078
- package/package.json +20 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { property as n } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/segmented-control.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.value = "", this.disabled = !1;
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback(), this.setAttribute("role", "radio"), this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
11
|
+
}
|
|
12
|
+
updated(e) {
|
|
13
|
+
e.has("disabled") && this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
t([n({
|
|
17
|
+
type: String,
|
|
18
|
+
reflect: !0
|
|
19
|
+
})], r.prototype, "value", void 0), t([n({
|
|
20
|
+
type: Boolean,
|
|
21
|
+
reflect: !0
|
|
22
|
+
})], r.prototype, "disabled", void 0), customElements.get("void-segmented-control-item") || customElements.define("void-segmented-control-item", r);
|
|
23
|
+
var i = class extends e {
|
|
24
|
+
constructor(...e) {
|
|
25
|
+
super(...e), this.value = "", this.size = "md", this.color = "default", this._handleClick = (e) => {
|
|
26
|
+
let t = e.target.closest("void-segmented-control-item");
|
|
27
|
+
!t || t.disabled || (this.value = t.value, this.dispatchEvent(new CustomEvent("void-change", {
|
|
28
|
+
bubbles: !0,
|
|
29
|
+
composed: !0,
|
|
30
|
+
detail: { value: this.value }
|
|
31
|
+
})));
|
|
32
|
+
}, this._handleKeydown = (e) => {
|
|
33
|
+
let t = Array.from(this.querySelectorAll("void-segmented-control-item:not([disabled])")), n = t.findIndex((e) => e.value === this.value);
|
|
34
|
+
if (e.key === "ArrowRight" || e.key === "ArrowDown") {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
let r = (n + 1) % t.length;
|
|
37
|
+
t[r].focus(), t[r].click();
|
|
38
|
+
} else if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
let r = (n - 1 + t.length) % t.length;
|
|
41
|
+
t[r].focus(), t[r].click();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback(), this.setAttribute("role", "radiogroup"), this.addEventListener("click", this._handleClick), this.addEventListener("keydown", this._handleKeydown), this._syncItems();
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
super.disconnectedCallback(), this.removeEventListener("click", this._handleClick), this.removeEventListener("keydown", this._handleKeydown);
|
|
50
|
+
}
|
|
51
|
+
updated(e) {
|
|
52
|
+
e.has("value") && this._syncItems();
|
|
53
|
+
}
|
|
54
|
+
_syncItems() {
|
|
55
|
+
let e = Array.from(this.querySelectorAll("void-segmented-control-item"));
|
|
56
|
+
for (let t of e) t.setAttribute("aria-checked", String(t.value === this.value));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
t([n({
|
|
60
|
+
type: String,
|
|
61
|
+
reflect: !0
|
|
62
|
+
})], i.prototype, "value", void 0), t([n({
|
|
63
|
+
type: String,
|
|
64
|
+
reflect: !0
|
|
65
|
+
})], i.prototype, "size", void 0), t([n({
|
|
66
|
+
type: String,
|
|
67
|
+
reflect: !0
|
|
68
|
+
})], i.prototype, "color", void 0), customElements.get("void-segmented-control") || customElements.define("void-segmented-control", i);
|
|
69
|
+
//#endregion
|
|
70
|
+
export { i as VoidSegmentedControl, r as VoidSegmentedControlItem };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Native dropdown for small option sets in forms where a simple pick-one is sufficient. */
|
|
3
|
+
export declare class VoidSelect extends VoidElement {
|
|
4
|
+
value: string;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
required: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
9
|
+
error: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
private _options;
|
|
12
|
+
private _didSetup;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
protected updated(_changed: Map<string, unknown>): void;
|
|
15
|
+
render(): import('lit').TemplateResult<1>;
|
|
16
|
+
private _onChange;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
'void-select': VoidSelect;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,4FAA4F;AAC5F,qBAAa,UAAW,SAAQ,WAAW;IACb,KAAK,SAAM;IACK,QAAQ,UAAS;IACjB,QAAQ,UAAS;IAClB,IAAI,SAAM;IACV,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAQ;IAC/C,KAAK,SAAM;IACX,WAAW,SAAM;IAE5D,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,SAAS,CAAS;IAE1B,iBAAiB,IAAI,IAAI;cAON,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAgBhE,MAAM;IAaN,OAAO,CAAC,SAAS;CAKlB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { html as n } from "lit";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/select.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.value = "", this.disabled = !1, this.required = !1, this.name = "", this.size = "md", this.error = "", this.placeholder = "", this._options = [], this._didSetup = !1;
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this._didSetup || (this._options = Array.from(this.childNodes));
|
|
12
|
+
}
|
|
13
|
+
updated(e) {
|
|
14
|
+
if (super.updated(e), !this._didSetup) {
|
|
15
|
+
this._didSetup = !0;
|
|
16
|
+
let e = this.querySelector("select");
|
|
17
|
+
if (e) {
|
|
18
|
+
for (let t of this._options) e.appendChild(t);
|
|
19
|
+
this.value && (e.value = this.value);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return n`
|
|
25
|
+
<select
|
|
26
|
+
?disabled=${this.disabled}
|
|
27
|
+
?required=${this.required}
|
|
28
|
+
name=${this.name}
|
|
29
|
+
aria-invalid=${this.error ? "true" : "false"}
|
|
30
|
+
@change=${this._onChange}
|
|
31
|
+
></select>
|
|
32
|
+
${this.error ? n`<span class="void-select-error">${this.error}</span>` : ""}
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
_onChange(e) {
|
|
36
|
+
let t = e.target;
|
|
37
|
+
this.value = t.value, this.dispatchEvent(new CustomEvent("void-change", {
|
|
38
|
+
bubbles: !0,
|
|
39
|
+
composed: !0,
|
|
40
|
+
detail: { value: this.value }
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
t([r({ type: String })], i.prototype, "value", void 0), t([r({
|
|
45
|
+
type: Boolean,
|
|
46
|
+
reflect: !0
|
|
47
|
+
})], i.prototype, "disabled", void 0), t([r({
|
|
48
|
+
type: Boolean,
|
|
49
|
+
reflect: !0
|
|
50
|
+
})], i.prototype, "required", void 0), t([r({
|
|
51
|
+
type: String,
|
|
52
|
+
reflect: !0
|
|
53
|
+
})], i.prototype, "name", void 0), t([r({
|
|
54
|
+
type: String,
|
|
55
|
+
reflect: !0
|
|
56
|
+
})], i.prototype, "size", void 0), t([r({
|
|
57
|
+
type: String,
|
|
58
|
+
reflect: !0
|
|
59
|
+
})], i.prototype, "error", void 0), t([r({
|
|
60
|
+
type: String,
|
|
61
|
+
reflect: !0
|
|
62
|
+
})], i.prototype, "placeholder", void 0), customElements.get("void-select") || customElements.define("void-select", i);
|
|
63
|
+
//#endregion
|
|
64
|
+
export { i as VoidSelect };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Collapsible side navigation for app shells, admin panels, and documentation sites. */
|
|
3
|
+
export declare class VoidSidebar extends VoidElement {
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
width: string;
|
|
6
|
+
collapsedWidth: string;
|
|
7
|
+
position: 'left' | 'right';
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
updated(changed: Map<string, unknown>): void;
|
|
11
|
+
private _updateWidth;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
'void-sidebar': VoidSidebar;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/components/sidebar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,yFAAyF;AACzF,qBAAa,WAAY,SAAQ,WAAW;IACE,SAAS,UAAS;IACnB,KAAK,SAA+B;IACpC,cAAc,SAAyC;IACvD,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAU;IAE/E,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAI5B,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAc5C,OAAO,CAAC,YAAY;CAGrB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { property as n } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/sidebar.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.collapsed = !1, this.width = "var(--void-sidebar-width)", this.collapsedWidth = "var(--void-sidebar-collapsed-width)", this.position = "left";
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback(), this.setAttribute("role", "navigation"), this.setAttribute("aria-label", "Sidebar navigation"), this._updateWidth();
|
|
11
|
+
}
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
super.disconnectedCallback();
|
|
14
|
+
}
|
|
15
|
+
updated(e) {
|
|
16
|
+
e.has("collapsed") && (this._updateWidth(), this.dispatchEvent(new CustomEvent("void-toggle", {
|
|
17
|
+
bubbles: !0,
|
|
18
|
+
composed: !0,
|
|
19
|
+
detail: { collapsed: this.collapsed }
|
|
20
|
+
}))), (e.has("width") || e.has("collapsedWidth")) && this._updateWidth();
|
|
21
|
+
}
|
|
22
|
+
_updateWidth() {
|
|
23
|
+
this.style.setProperty("--void-sidebar-width", this.collapsed ? this.collapsedWidth : this.width);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
t([n({
|
|
27
|
+
type: Boolean,
|
|
28
|
+
reflect: !0
|
|
29
|
+
})], r.prototype, "collapsed", void 0), t([n({
|
|
30
|
+
type: String,
|
|
31
|
+
reflect: !0
|
|
32
|
+
})], r.prototype, "width", void 0), t([n({
|
|
33
|
+
type: String,
|
|
34
|
+
reflect: !0
|
|
35
|
+
})], r.prototype, "collapsedWidth", void 0), t([n({
|
|
36
|
+
type: String,
|
|
37
|
+
reflect: !0
|
|
38
|
+
})], r.prototype, "position", void 0), customElements.get("void-sidebar") || customElements.define("void-sidebar", r);
|
|
39
|
+
//#endregion
|
|
40
|
+
export { r as VoidSidebar };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Content placeholder during data loading for cards, lists, and profile pages to prevent layout shift. */
|
|
3
|
+
export declare class VoidSkeleton extends VoidElement {
|
|
4
|
+
variant: 'text' | 'circular' | 'rectangular';
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'void-skeleton': VoidSkeleton;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,2GAA2G;AAC3G,qBAAa,YAAa,SAAQ,WAAW;IACA,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAAU;IAEjG,iBAAiB,IAAI,IAAI;CAK1B;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { property as n } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/skeleton.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.variant = "text";
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback(), this.setAttribute("role", "presentation"), this.setAttribute("aria-hidden", "true");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
t([n({
|
|
14
|
+
type: String,
|
|
15
|
+
reflect: !0
|
|
16
|
+
})], r.prototype, "variant", void 0), customElements.get("void-skeleton") || customElements.define("void-skeleton", r);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as VoidSkeleton };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Continuous value selection for volume controls, price range filters, and numeric range settings. */
|
|
3
|
+
export declare class VoidSlider extends VoidElement {
|
|
4
|
+
value: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step: number;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
showValue: boolean;
|
|
11
|
+
size: 'sm' | 'md' | 'lg';
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
updated(changed: Map<string, unknown>): void;
|
|
14
|
+
private _fill;
|
|
15
|
+
private _onInput;
|
|
16
|
+
private _onChange;
|
|
17
|
+
render(): import('lit').TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'void-slider': VoidSlider;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,uGAAuG;AACvG,qBAAa,UAAW,SAAQ,WAAW;IACb,KAAK,EAAE,MAAM,CAAM;IACnB,GAAG,EAAE,MAAM,CAAK;IAChB,GAAG,EAAE,MAAM,CAAO;IAClB,IAAI,EAAE,MAAM,CAAK;IACD,QAAQ,EAAE,OAAO,CAAS;IAC3B,IAAI,EAAE,MAAM,CAAM;IACjB,SAAS,EAAE,OAAO,CAAS;IAC5B,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAE3E,iBAAiB,IAAI,IAAI;IAQzB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAY5C,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,SAAS;IAUjB,MAAM;CAkBP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { html as n } from "lit";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/slider.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.value = 50, this.min = 0, this.max = 100, this.step = 1, this.disabled = !1, this.name = "", this.showValue = !1, this.size = "md";
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "slider"), this.setAttribute("aria-valuemin", String(this.min)), this.setAttribute("aria-valuemax", String(this.max)), this.setAttribute("aria-valuenow", String(this.value));
|
|
12
|
+
}
|
|
13
|
+
updated(e) {
|
|
14
|
+
e.has("min") && this.setAttribute("aria-valuemin", String(this.min)), e.has("max") && this.setAttribute("aria-valuemax", String(this.max)), (e.has("value") || e.has("min") || e.has("max")) && this.setAttribute("aria-valuenow", String(this.value));
|
|
15
|
+
}
|
|
16
|
+
_fill() {
|
|
17
|
+
return (this.value - this.min) / (this.max - this.min) * 100;
|
|
18
|
+
}
|
|
19
|
+
_onInput(e) {
|
|
20
|
+
let t = e.target;
|
|
21
|
+
this.value = Number(t.value), this.dispatchEvent(new CustomEvent("void-input", {
|
|
22
|
+
bubbles: !0,
|
|
23
|
+
composed: !0,
|
|
24
|
+
detail: { value: this.value }
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
_onChange(e) {
|
|
28
|
+
let t = e.target;
|
|
29
|
+
this.value = Number(t.value), this.dispatchEvent(new CustomEvent("void-change", {
|
|
30
|
+
bubbles: !0,
|
|
31
|
+
composed: !0,
|
|
32
|
+
detail: { value: this.value }
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
let e = this._fill();
|
|
37
|
+
return n`
|
|
38
|
+
<input
|
|
39
|
+
type="range"
|
|
40
|
+
.value=${String(this.value)}
|
|
41
|
+
min=${this.min}
|
|
42
|
+
max=${this.max}
|
|
43
|
+
step=${this.step}
|
|
44
|
+
?disabled=${this.disabled}
|
|
45
|
+
name=${this.name}
|
|
46
|
+
style="--void-slider-fill: ${e}%"
|
|
47
|
+
@input=${this._onInput}
|
|
48
|
+
@change=${this._onChange}
|
|
49
|
+
/>
|
|
50
|
+
${this.showValue ? n`<span class="void-slider-value">${this.value}</span>` : ""}
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
t([r({ type: Number })], i.prototype, "value", void 0), t([r({ type: Number })], i.prototype, "min", void 0), t([r({ type: Number })], i.prototype, "max", void 0), t([r({ type: Number })], i.prototype, "step", void 0), t([r({
|
|
55
|
+
type: Boolean,
|
|
56
|
+
reflect: !0
|
|
57
|
+
})], i.prototype, "disabled", void 0), t([r({
|
|
58
|
+
type: String,
|
|
59
|
+
reflect: !0
|
|
60
|
+
})], i.prototype, "name", void 0), t([r({
|
|
61
|
+
type: Boolean,
|
|
62
|
+
reflect: !0
|
|
63
|
+
})], i.prototype, "showValue", void 0), t([r({
|
|
64
|
+
type: String,
|
|
65
|
+
reflect: !0
|
|
66
|
+
})], i.prototype, "size", void 0), customElements.get("void-slider") || customElements.define("void-slider", i);
|
|
67
|
+
//#endregion
|
|
68
|
+
export { i as VoidSlider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Indeterminate loading indicator for async operations, button loading states, and inline fetching. */
|
|
3
|
+
export declare class VoidSpinner extends VoidElement {
|
|
4
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
+
label: string;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
updated(changed: Map<string, unknown>): void;
|
|
8
|
+
render(): import('lit').TemplateResult<1>;
|
|
9
|
+
}
|
|
10
|
+
declare global {
|
|
11
|
+
interface HTMLElementTagNameMap {
|
|
12
|
+
'void-spinner': VoidSpinner;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/components/spinner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,wGAAwG;AACxG,qBAAa,WAAY,SAAQ,WAAW;IACC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAQ;IAC/C,KAAK,EAAE,MAAM,CAAa;IAErE,iBAAiB,IAAI,IAAI;IAMzB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM5C,MAAM;CAGP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { html as n } from "lit";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/spinner.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.size = "md", this.label = "Loading";
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "status"), this.setAttribute("aria-label", this.label);
|
|
12
|
+
}
|
|
13
|
+
updated(e) {
|
|
14
|
+
e.has("label") && this.setAttribute("aria-label", this.label);
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return n`<span data-void-sr>${this.label}</span>`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
t([r({
|
|
21
|
+
type: String,
|
|
22
|
+
reflect: !0
|
|
23
|
+
})], i.prototype, "size", void 0), t([r({
|
|
24
|
+
type: String,
|
|
25
|
+
reflect: !0
|
|
26
|
+
})], i.prototype, "label", void 0), customElements.get("void-spinner") || customElements.define("void-spinner", i);
|
|
27
|
+
//#endregion
|
|
28
|
+
export { i as VoidSpinner };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Key metric display for analytics dashboards and KPI summaries with label, value, delta, and trend. */
|
|
3
|
+
export declare class VoidStat extends VoidElement {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
delta: string;
|
|
7
|
+
trend: 'up' | 'down' | 'flat' | 'error' | 'warning' | 'success' | 'info' | 'notice' | 'highlight' | null;
|
|
8
|
+
color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
|
|
9
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
render(): import('lit').TemplateResult<1>;
|
|
12
|
+
}
|
|
13
|
+
declare global {
|
|
14
|
+
interface HTMLElementTagNameMap {
|
|
15
|
+
'void-stat': VoidStat;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=stat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../src/components/stat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,yGAAyG;AACzG,qBAAa,QAAS,SAAQ,WAAW;IACI,KAAK,SAAM;IACX,KAAK,SAAM;IACX,KAAK,SAAM;IACX,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,IAAI,CAAQ;IAChH,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAa;IACnF,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAQ;IAE1F,iBAAiB,IAAI,IAAI;IAKzB,MAAM;CAOP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { html as n } from "lit";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/stat.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.label = "", this.value = "", this.delta = "", this.trend = null, this.color = "default", this.size = "md";
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "figure");
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return n`
|
|
15
|
+
${this.label ? n`<span class="void-stat-label">${this.label}</span>` : ""}
|
|
16
|
+
<span class="void-stat-value">${this.value}</span>
|
|
17
|
+
${this.delta ? n`<span class="void-stat-delta">${this.delta}</span>` : ""}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
t([r({
|
|
22
|
+
type: String,
|
|
23
|
+
reflect: !0
|
|
24
|
+
})], i.prototype, "label", void 0), t([r({
|
|
25
|
+
type: String,
|
|
26
|
+
reflect: !0
|
|
27
|
+
})], i.prototype, "value", void 0), t([r({
|
|
28
|
+
type: String,
|
|
29
|
+
reflect: !0
|
|
30
|
+
})], i.prototype, "delta", void 0), t([r({
|
|
31
|
+
type: String,
|
|
32
|
+
reflect: !0
|
|
33
|
+
})], i.prototype, "trend", void 0), t([r({
|
|
34
|
+
type: String,
|
|
35
|
+
reflect: !0
|
|
36
|
+
})], i.prototype, "color", void 0), t([r({
|
|
37
|
+
type: String,
|
|
38
|
+
reflect: !0
|
|
39
|
+
})], i.prototype, "size", void 0), customElements.get("void-stat") || customElements.define("void-stat", i);
|
|
40
|
+
//#endregion
|
|
41
|
+
export { i as VoidStat };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Presence indicator for user lists and chat rosters showing online/away/offline state at a glance. */
|
|
3
|
+
export declare class VoidStatusDot extends VoidElement {
|
|
4
|
+
status: 'online' | 'away' | 'offline';
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
updated(changed: Map<string, unknown>): void;
|
|
7
|
+
private _ariaLabel;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'void-status-dot': VoidStatusDot;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=status-dot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/components/status-dot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,wGAAwG;AACxG,qBAAa,aAAc,SAAQ,WAAW;IACD,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAa;IAE7F,iBAAiB,IAAI,IAAI;IAMzB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM5C,OAAO,CAAC,UAAU;CAQnB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { property as n } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/status-dot.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.status = "offline";
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback(), this.setAttribute("role", "status"), this.setAttribute("aria-label", this._ariaLabel());
|
|
11
|
+
}
|
|
12
|
+
updated(e) {
|
|
13
|
+
e.has("status") && this.setAttribute("aria-label", this._ariaLabel());
|
|
14
|
+
}
|
|
15
|
+
_ariaLabel() {
|
|
16
|
+
switch (this.status) {
|
|
17
|
+
case "online": return "Online";
|
|
18
|
+
case "away": return "Away";
|
|
19
|
+
default: return "Offline";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
t([n({
|
|
24
|
+
type: String,
|
|
25
|
+
reflect: !0
|
|
26
|
+
})], r.prototype, "status", void 0), customElements.get("void-status-dot") || customElements.define("void-status-dot", r);
|
|
27
|
+
//#endregion
|
|
28
|
+
export { r as VoidStatusDot };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Multi-step progress tracker for onboarding flows, checkout funnels, and guided wizards. */
|
|
3
|
+
export declare class VoidStepper extends VoidElement {
|
|
4
|
+
value: number;
|
|
5
|
+
steps: string;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
render(): import('lit').TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'void-stepper': VoidStepper;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/components/stepper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,8FAA8F;AAC9F,qBAAa,WAAY,SAAQ,WAAW;IACC,KAAK,EAAE,MAAM,CAAK;IAChC,KAAK,EAAE,MAAM,CAAM;IAEhD,iBAAiB,IAAI,IAAI;IAMzB,MAAM;CAqCP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { VoidElement as e } from "../base.js";
|
|
2
|
+
import { t } from "../chunks/decorate-DKuCkHK4.js";
|
|
3
|
+
import { html as n, nothing as r } from "lit";
|
|
4
|
+
import { property as i } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/stepper.ts
|
|
6
|
+
var a = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.value = 0, this.steps = "";
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "navigation"), this.setAttribute("aria-label", "Progress");
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return n`${this.steps.split(",").map((e) => e.trim()).filter(Boolean).map((e, t) => {
|
|
15
|
+
let i = t < this.value ? "completed" : t === this.value ? "active" : "upcoming";
|
|
16
|
+
return n`${t > 0 ? n`<div class="void-stepper-connector" data-state=${t <= this.value ? "completed" : "upcoming"}></div>` : null}<div
|
|
17
|
+
class="void-stepper-step"
|
|
18
|
+
data-state=${i}
|
|
19
|
+
aria-current=${t === this.value ? "step" : r}
|
|
20
|
+
>
|
|
21
|
+
<span class="void-stepper-circle"
|
|
22
|
+
>${i === "completed" ? n`<svg
|
|
23
|
+
viewBox="0 0 12 12"
|
|
24
|
+
width="1em"
|
|
25
|
+
height="1em"
|
|
26
|
+
fill="none"
|
|
27
|
+
stroke="currentColor"
|
|
28
|
+
stroke-width="var(--void-icon-stroke-width)"
|
|
29
|
+
stroke-linecap="round"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
>
|
|
32
|
+
<polyline points="2,6 5,9 10,3"></polyline>
|
|
33
|
+
</svg>` : t + 1}</span
|
|
34
|
+
>
|
|
35
|
+
<span class="void-stepper-label">${e}</span>
|
|
36
|
+
</div>`;
|
|
37
|
+
})}`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
t([i({
|
|
41
|
+
type: Number,
|
|
42
|
+
reflect: !0
|
|
43
|
+
})], a.prototype, "value", void 0), t([i({ reflect: !0 })], a.prototype, "steps", void 0), customElements.get("void-stepper") || customElements.define("void-stepper", a);
|
|
44
|
+
//#endregion
|
|
45
|
+
export { a as VoidStepper };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** On/off toggle for feature flags, notification preferences, and settings that take immediate effect. */
|
|
3
|
+
export declare class VoidSwitch extends VoidElement {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
|
|
7
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
updated(changed: Map<string, unknown>): void;
|
|
11
|
+
private _handleClick;
|
|
12
|
+
private _handleKeydown;
|
|
13
|
+
render(): import('lit').TemplateResult<1>;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'void-switch': VoidSwitch;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,0GAA0G;AAC1G,qBAAa,UAAW,SAAQ,WAAW;IACG,OAAO,UAAS;IAChB,QAAQ,UAAS;IAClB,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAa;IACnF,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAQ;IAE1F,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IAM5B,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAU5C,OAAO,CAAC,YAAY,CAQlB;IAEF,OAAO,CAAC,cAAc,CAKpB;IAEF,MAAM;CAGP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|