@voidable/ui 0.5.2 → 0.5.3
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 +72 -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 +405 -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 +142 -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 +60 -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 +215 -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 +98 -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 +117 -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 +59 -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 +75 -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 +108 -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,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"}
|
|
@@ -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 } from "lit";
|
|
4
|
+
import { property as r } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/switch.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.checked = !1, this.disabled = !1, this.color = "default", this.size = "md", this._handleClick = () => {
|
|
9
|
+
this.disabled || (this.checked = !this.checked, this.dispatchEvent(new CustomEvent("void-change", {
|
|
10
|
+
bubbles: !0,
|
|
11
|
+
composed: !0,
|
|
12
|
+
detail: { checked: this.checked }
|
|
13
|
+
})));
|
|
14
|
+
}, this._handleKeydown = (e) => {
|
|
15
|
+
(e.key === " " || e.key === "Enter") && !this.disabled && (e.preventDefault(), this._handleClick());
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback(), this.setAttribute("role", "switch"), this.setAttribute("tabindex", this.disabled ? "-1" : "0"), this.setAttribute("aria-checked", String(this.checked)), this.addEventListener("click", this._handleClick), this.addEventListener("keydown", this._handleKeydown);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
super.disconnectedCallback(), this.removeEventListener("click", this._handleClick), this.removeEventListener("keydown", this._handleKeydown);
|
|
23
|
+
}
|
|
24
|
+
updated(e) {
|
|
25
|
+
e.has("checked") && this.setAttribute("aria-checked", String(this.checked)), e.has("disabled") && (this.setAttribute("aria-disabled", String(this.disabled)), this.setAttribute("tabindex", this.disabled ? "-1" : "0"));
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return n`<span class="void-switch-track"><span class="void-switch-thumb"></span></span>`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
t([r({
|
|
32
|
+
type: Boolean,
|
|
33
|
+
reflect: !0
|
|
34
|
+
})], i.prototype, "checked", void 0), t([r({
|
|
35
|
+
type: Boolean,
|
|
36
|
+
reflect: !0
|
|
37
|
+
})], i.prototype, "disabled", void 0), t([r({
|
|
38
|
+
type: String,
|
|
39
|
+
reflect: !0
|
|
40
|
+
})], i.prototype, "color", void 0), t([r({
|
|
41
|
+
type: String,
|
|
42
|
+
reflect: !0
|
|
43
|
+
})], i.prototype, "size", void 0), customElements.get("void-switch") || customElements.define("void-switch", i);
|
|
44
|
+
//#endregion
|
|
45
|
+
export { i as VoidSwitch };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Styled data table for admin lists, report grids, and comparison layouts. */
|
|
3
|
+
export declare class VoidTable extends VoidElement {
|
|
4
|
+
striped: boolean;
|
|
5
|
+
hoverable: boolean;
|
|
6
|
+
compact: boolean;
|
|
7
|
+
bordered: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'void-table': VoidTable;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/components/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,+EAA+E;AAC/E,qBAAa,SAAU,SAAQ,WAAW;IACI,OAAO,UAAS;IAChB,SAAS,UAAS;IAClB,OAAO,UAAS;IAChB,QAAQ,UAAS;CAE9D;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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/table.ts
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.striped = !1, this.hoverable = !1, this.compact = !1, this.bordered = !1;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
t([n({
|
|
11
|
+
type: Boolean,
|
|
12
|
+
reflect: !0
|
|
13
|
+
})], r.prototype, "striped", void 0), t([n({
|
|
14
|
+
type: Boolean,
|
|
15
|
+
reflect: !0
|
|
16
|
+
})], r.prototype, "hoverable", void 0), t([n({
|
|
17
|
+
type: Boolean,
|
|
18
|
+
reflect: !0
|
|
19
|
+
})], r.prototype, "compact", void 0), t([n({
|
|
20
|
+
type: Boolean,
|
|
21
|
+
reflect: !0
|
|
22
|
+
})], r.prototype, "bordered", void 0), customElements.get("void-table") || customElements.define("void-table", r);
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as VoidTable };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
/** Individual tab content panel within a VoidTabs component. */
|
|
3
|
+
export declare class VoidTabPanel extends VoidElement {
|
|
4
|
+
tab: string;
|
|
5
|
+
label: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
protected updated(_changed: Map<string, unknown>): void;
|
|
9
|
+
}
|
|
10
|
+
/** Tabbed section navigation for settings pages, detail views, and parallel content categories. */
|
|
11
|
+
export declare class VoidTabs extends VoidElement {
|
|
12
|
+
value: string;
|
|
13
|
+
size: 'sm' | 'md' | 'lg';
|
|
14
|
+
private _panels;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
private _syncPanels;
|
|
17
|
+
protected updated(_changed: Map<string, unknown>): void;
|
|
18
|
+
render(): import('lit').TemplateResult<1>;
|
|
19
|
+
private _onTabClick;
|
|
20
|
+
private _onTabKeydown;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'void-tab-panel': VoidTabPanel;
|
|
25
|
+
'void-tabs': VoidTabs;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,gEAAgE;AAChE,qBAAa,YAAa,SAAQ,WAAW;IACA,GAAG,SAAM;IACT,KAAK,SAAM;IACV,MAAM,UAAS;IAE3D,iBAAiB,IAAI,IAAI;cAMN,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAMjE;AAMD,mGAAmG;AACnG,qBAAa,QAAS,SAAQ,WAAW;IACX,KAAK,SAAM;IACI,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAE3E,OAAO,CAAC,OAAO,CAAsB;IAErC,iBAAiB,IAAI,IAAI;IAMzB,OAAO,CAAC,WAAW;cAMA,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAOhE,MAAM;IAmBN,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,aAAa;CAYtB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;QAC/B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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/tabs.ts
|
|
6
|
+
var i = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.tab = "", this.label = "", this.active = !1;
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "tabpanel"), this.tab && (this.id = this.tab);
|
|
12
|
+
}
|
|
13
|
+
updated(e) {
|
|
14
|
+
super.updated(e), this.setAttribute("role", "tabpanel"), e.has("tab") && this.tab && (this.id = this.tab);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
t([r({
|
|
18
|
+
type: String,
|
|
19
|
+
reflect: !0
|
|
20
|
+
})], i.prototype, "tab", void 0), t([r({
|
|
21
|
+
type: String,
|
|
22
|
+
reflect: !0
|
|
23
|
+
})], i.prototype, "label", void 0), t([r({
|
|
24
|
+
type: Boolean,
|
|
25
|
+
reflect: !0
|
|
26
|
+
})], i.prototype, "active", void 0), customElements.get("void-tab-panel") || customElements.define("void-tab-panel", i);
|
|
27
|
+
var a = class extends e {
|
|
28
|
+
constructor(...e) {
|
|
29
|
+
super(...e), this.value = "", this.size = "md", this._panels = [];
|
|
30
|
+
}
|
|
31
|
+
connectedCallback() {
|
|
32
|
+
super.connectedCallback(), this._panels = Array.from(this.querySelectorAll("void-tab-panel")), this._syncPanels();
|
|
33
|
+
}
|
|
34
|
+
_syncPanels() {
|
|
35
|
+
for (let e of this._panels) e.active = e.tab === this.value;
|
|
36
|
+
}
|
|
37
|
+
updated(e) {
|
|
38
|
+
super.updated(e), e.has("value") && this._syncPanels();
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return n`
|
|
42
|
+
<div class="void-tabs-list" role="tablist">
|
|
43
|
+
${this._panels.map((e, t) => n`
|
|
44
|
+
<button
|
|
45
|
+
class="void-tabs-tab"
|
|
46
|
+
role="tab"
|
|
47
|
+
aria-selected=${e.tab === this.value ? "true" : "false"}
|
|
48
|
+
aria-controls=${e.tab}
|
|
49
|
+
?active=${e.tab === this.value}
|
|
50
|
+
tabindex=${e.tab === this.value ? "0" : "-1"}
|
|
51
|
+
@click=${() => this._onTabClick(e)}
|
|
52
|
+
@keydown=${(e) => this._onTabKeydown(e, t)}
|
|
53
|
+
>${e.label || e.tab}</button>
|
|
54
|
+
`)}
|
|
55
|
+
</div>
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
_onTabClick(e) {
|
|
59
|
+
this.value = e.tab, this.requestUpdate(), this._syncPanels(), this.dispatchEvent(new CustomEvent("void-change", {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
composed: !0,
|
|
62
|
+
detail: { value: this.value }
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
_onTabKeydown(e, t) {
|
|
66
|
+
let n = Array.from(this.querySelectorAll(".void-tabs-tab"));
|
|
67
|
+
e.key === "ArrowRight" ? (e.preventDefault(), n[(t + 1) % n.length].focus()) : e.key === "ArrowLeft" && (e.preventDefault(), n[(t - 1 + n.length) % n.length].focus());
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
t([r({ type: String })], a.prototype, "value", void 0), t([r({
|
|
71
|
+
type: String,
|
|
72
|
+
reflect: !0
|
|
73
|
+
})], a.prototype, "size", void 0), customElements.get("void-tabs") || customElements.define("void-tabs", a);
|
|
74
|
+
//#endregion
|
|
75
|
+
export { i as VoidTabPanel, a as VoidTabs };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
import { VoidElement } from '../base.js';
|
|
3
|
+
/** Removable label chip for selected filters, applied tags, and multi-value inputs. */
|
|
4
|
+
export declare class VoidTag extends VoidElement {
|
|
5
|
+
color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
|
|
6
|
+
removable: boolean;
|
|
7
|
+
size: 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
8
|
+
private _userContent;
|
|
9
|
+
private _didSetup;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
protected updated(_changed: Map<string, unknown>): void;
|
|
12
|
+
render(): typeof nothing | import('lit').TemplateResult<1>;
|
|
13
|
+
private _remove;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'void-tag': VoidTag;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/components/tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,uFAAuF;AACvF,qBAAa,OAAQ,SAAQ,WAAW;IACK,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAa;IAClF,SAAS,UAAS;IACnB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAQ;IAE1F,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,SAAS,CAAS;IAE1B,iBAAiB,IAAI,IAAI;cAQN,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAehE,MAAM;IAKN,OAAO,CAAC,OAAO;CAIhB;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;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, nothing as r } from "lit";
|
|
4
|
+
import { property as i } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/tag.ts
|
|
6
|
+
var a = class extends e {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.color = "default", this.removable = !1, this.size = "md", this._userContent = [], this._didSetup = !1;
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
super.connectedCallback(), this.setAttribute("role", "listitem"), this._didSetup || (this._userContent = Array.from(this.childNodes));
|
|
12
|
+
}
|
|
13
|
+
updated(e) {
|
|
14
|
+
if (super.updated(e), !this._didSetup) {
|
|
15
|
+
this._didSetup = !0;
|
|
16
|
+
let e = this.querySelector(".void-tag-close");
|
|
17
|
+
for (let t of this._userContent) e ? this.insertBefore(t, e) : this.appendChild(t);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return this.removable ? n`<button class="void-tag-close" aria-label="Remove" @click="${this._remove}">×</button>` : r;
|
|
22
|
+
}
|
|
23
|
+
_remove() {
|
|
24
|
+
this.dispatchEvent(new CustomEvent("void-remove", {
|
|
25
|
+
bubbles: !0,
|
|
26
|
+
composed: !0
|
|
27
|
+
})), this.remove();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
t([i({
|
|
31
|
+
type: String,
|
|
32
|
+
reflect: !0
|
|
33
|
+
})], a.prototype, "color", void 0), t([i({
|
|
34
|
+
type: Boolean,
|
|
35
|
+
reflect: !0
|
|
36
|
+
})], a.prototype, "removable", void 0), t([i({
|
|
37
|
+
type: String,
|
|
38
|
+
reflect: !0
|
|
39
|
+
})], a.prototype, "size", void 0), customElements.get("void-tag") || customElements.define("void-tag", a);
|
|
40
|
+
//#endregion
|
|
41
|
+
export { a as VoidTag };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
|
+
export type TagValue = string | {
|
|
3
|
+
text: string;
|
|
4
|
+
color?: string;
|
|
5
|
+
};
|
|
6
|
+
/** Multi-tag input field for email recipients, category labels, keyword tagging, and comma-separated value entry. */
|
|
7
|
+
export declare class VoidTagsInput extends VoidElement {
|
|
8
|
+
value: TagValue[];
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
readonly: boolean;
|
|
11
|
+
max: number;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
size: 'sm' | 'md' | 'lg';
|
|
14
|
+
color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
|
|
15
|
+
variant: 'filled' | 'outline';
|
|
16
|
+
allowDuplicates: boolean;
|
|
17
|
+
private _tagText;
|
|
18
|
+
private _tagColor;
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
render(): import('lit').TemplateResult<1>;
|
|
21
|
+
private _focusInput;
|
|
22
|
+
private _onContainerKeydown;
|
|
23
|
+
private _addTag;
|
|
24
|
+
private _removeTag;
|
|
25
|
+
private _onKeydown;
|
|
26
|
+
private _onPaste;
|
|
27
|
+
private _dispatchChange;
|
|
28
|
+
}
|
|
29
|
+
declare global {
|
|
30
|
+
interface HTMLElementTagNameMap {
|
|
31
|
+
'void-tags-input': VoidTagsInput;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=tags-input.d.ts.map
|