@voidable/ui 0.9.0 → 0.10.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/base-entry.d.ts +1 -0
- package/dist/base.d.ts +2 -1
- package/dist/base.js +5 -1
- package/dist/chunks/base-BxmMM3B7.js +298 -0
- package/dist/chunks/{keyboard-MQpfTX5I.js → keyboard-CEhMSkws.js} +19 -3
- package/dist/chunks/{modal-hivQ4YoU.js → modal-CgGp_fCs.js} +3 -3
- package/dist/chunks/{overlay-BywGMcDW.js → overlay-hLJ7IQHx.js} +2 -2
- package/dist/chunks/{parts-CMQQop0D.js → parts-DI_3VpSy.js} +21 -17
- package/dist/chunks/{base-CMruMbxC.js → projection-SnR79EHI.js} +105 -389
- package/dist/components/accordion.js +2 -2
- package/dist/components/action-input.d.ts +2 -2
- package/dist/components/action-input.js +56 -54
- package/dist/components/alert.js +2 -2
- package/dist/components/avatar.js +13 -11
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +2 -2
- package/dist/components/bar-chart.js +31 -29
- package/dist/components/breadcrumbs.js +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +78 -76
- package/dist/components/card.js +1 -1
- package/dist/components/carousel.js +18 -17
- package/dist/components/checkbox-group.js +13 -12
- package/dist/components/checkbox.js +17 -16
- package/dist/components/collapsible.js +2 -2
- package/dist/components/color-picker.js +26 -24
- package/dist/components/combobox.js +17 -16
- package/dist/components/compose-input.js +13 -11
- package/dist/components/dialog.js +1 -1
- package/dist/components/divider.js +11 -9
- package/dist/components/donut-chart.js +51 -49
- package/dist/components/drawer.d.ts +2 -2
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.js +4 -4
- package/dist/components/editable.js +13 -12
- package/dist/components/error-fallback.js +2 -2
- package/dist/components/field.js +10 -9
- package/dist/components/file-upload.js +19 -17
- package/dist/components/gauge.js +88 -86
- package/dist/components/hamburger.js +11 -9
- package/dist/components/hover-card.js +3 -3
- package/dist/components/indicator.js +14 -12
- package/dist/components/input.js +41 -39
- package/dist/components/line-chart.js +41 -39
- package/dist/components/list.js +1 -1
- package/dist/components/menu.js +3 -3
- package/dist/components/multiselect.js +30 -29
- package/dist/components/nav-bar.js +1 -1
- package/dist/components/nav-menu.js +20 -19
- package/dist/components/number-input.js +17 -15
- package/dist/components/pagination.js +22 -20
- package/dist/components/panel.js +2 -2
- package/dist/components/pin-input.js +32 -30
- package/dist/components/popover.js +3 -3
- package/dist/components/progress.js +14 -12
- package/dist/components/radio-group.js +13 -11
- package/dist/components/radio.d.ts +25 -0
- package/dist/components/radio.js +78 -29
- package/dist/components/scroll-area.js +8 -7
- package/dist/components/segmented-control.js +21 -21
- package/dist/components/select.js +49 -47
- package/dist/components/sidebar.d.ts +2 -2
- package/dist/components/sidebar.js +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +16 -14
- package/dist/components/spinner.js +11 -9
- package/dist/components/stat.js +19 -17
- package/dist/components/status-dot.js +1 -1
- package/dist/components/stepper.js +15 -13
- package/dist/components/switch.js +14 -12
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +29 -29
- package/dist/components/tag.js +9 -8
- package/dist/components/tags-input.js +24 -22
- package/dist/components/textarea.js +34 -32
- package/dist/components/toast.d.ts +19 -2
- package/dist/components/toast.js +43 -10
- package/dist/components/toggle-group.js +16 -15
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.js +3 -3
- package/dist/components.json +1 -1
- package/dist/custom-elements.json +48 -18
- package/dist/dev.js +31 -7
- package/dist/index.js +1 -1
- package/dist/keyboard.d.ts +10 -0
- package/dist/llms.txt +1 -1
- package/dist/parts.d.ts +5 -0
- package/dist/projection-api.d.ts +23 -0
- package/dist/projection.d.ts +8 -2
- package/dist/reference.md +4 -4
- package/dist/vscode.html-custom-data.json +13 -7
- package/dist/web-types.json +17 -17
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { t as n } from "../chunks/keyboard-activation-CV0m4hkn.js";
|
|
4
4
|
import { t as r } from "../chunks/form-control-C0vH6gii.js";
|
|
5
|
-
import { i, n as a } from "../chunks/keyboard-
|
|
6
|
-
import { property as
|
|
5
|
+
import { a as i, n as a, r as o } from "../chunks/keyboard-CEhMSkws.js";
|
|
6
|
+
import { property as s } from "lit/decorators.js";
|
|
7
7
|
//#region src/components/segmented-control.ts
|
|
8
|
-
var
|
|
8
|
+
var c = class extends e {
|
|
9
9
|
constructor(...e) {
|
|
10
10
|
super(...e), this._activation = new n(this, {
|
|
11
11
|
enter: !1,
|
|
@@ -27,27 +27,27 @@ var s = class extends e {
|
|
|
27
27
|
this.setHostAttribute("aria-checked", String(e)), this.setHostAttribute("tabindex", t && !n ? "0" : "-1"), this.setHostAttribute("aria-disabled", n ? "true" : null);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
t([
|
|
30
|
+
t([s({
|
|
31
31
|
type: String,
|
|
32
32
|
reflect: !0
|
|
33
|
-
})],
|
|
33
|
+
})], c.prototype, "value", void 0), t([s({
|
|
34
34
|
type: Boolean,
|
|
35
35
|
reflect: !0
|
|
36
|
-
})],
|
|
37
|
-
var
|
|
36
|
+
})], c.prototype, "disabled", void 0), customElements.get("void-segmented-control-item") || customElements.define("void-segmented-control-item", c);
|
|
37
|
+
var l = class extends r(e) {
|
|
38
38
|
constructor(...e) {
|
|
39
39
|
super(...e), this.value = "", this.disabled = !1, this.size = "md", this.color = "default", this._observer = null, this._itemsSynced = !1, this._handleClick = (e) => {
|
|
40
40
|
let t = e.target.closest("void-segmented-control-item");
|
|
41
41
|
t && this._select(t);
|
|
42
42
|
}, this._handleKeydown = (e) => {
|
|
43
43
|
if (e.altKey || e.ctrlKey || e.metaKey || this.formDisabled) return;
|
|
44
|
-
let t = this._items, n = e.target?.closest?.("void-segmented-control-item"), r = e.key ===
|
|
45
|
-
if (!
|
|
44
|
+
let t = this._items, n = e.target?.closest?.("void-segmented-control-item"), r = o(this), s = e.key === r.next || e.key === "ArrowDown";
|
|
45
|
+
if (!s && e.key !== r.prev && e.key !== "ArrowUp") return;
|
|
46
46
|
e.preventDefault();
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
47
|
+
let c = t.map((e) => e.disabled), l = n ? t.indexOf(n) : t.findIndex((e) => e.value === this.value), u;
|
|
48
|
+
u = l < 0 ? a(c, s ? 1 : -1) : i(c, l, s ? 1 : -1);
|
|
49
|
+
let d = t[u];
|
|
50
|
+
d && (d.focus(), this._select(d));
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
connectedCallback() {
|
|
@@ -69,7 +69,7 @@ var c = class extends r(e) {
|
|
|
69
69
|
return this.value || null;
|
|
70
70
|
}
|
|
71
71
|
get _items() {
|
|
72
|
-
return Array.from(this.querySelectorAll("void-segmented-control-item")).filter((e) => e instanceof
|
|
72
|
+
return Array.from(this.querySelectorAll("void-segmented-control-item")).filter((e) => e instanceof c);
|
|
73
73
|
}
|
|
74
74
|
_syncItems() {
|
|
75
75
|
let e = this._items, t = this.formDisabled, n = e.findIndex((e) => e.value === this.value), r = n >= 0 && !e[n].disabled ? n : -1;
|
|
@@ -83,18 +83,18 @@ var c = class extends r(e) {
|
|
|
83
83
|
})));
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
t([
|
|
86
|
+
t([s({
|
|
87
87
|
type: String,
|
|
88
88
|
reflect: !0
|
|
89
|
-
})],
|
|
89
|
+
})], l.prototype, "value", void 0), t([s({
|
|
90
90
|
type: Boolean,
|
|
91
91
|
reflect: !0
|
|
92
|
-
})],
|
|
92
|
+
})], l.prototype, "disabled", void 0), t([s({
|
|
93
93
|
type: String,
|
|
94
94
|
reflect: !0
|
|
95
|
-
})],
|
|
95
|
+
})], l.prototype, "size", void 0), t([s({
|
|
96
96
|
type: String,
|
|
97
97
|
reflect: !0
|
|
98
|
-
})],
|
|
98
|
+
})], l.prototype, "color", void 0), customElements.get("void-segmented-control") || customElements.define("void-segmented-control", l);
|
|
99
99
|
//#endregion
|
|
100
|
-
export {
|
|
100
|
+
export { l as VoidSegmentedControl, c as VoidSegmentedControlItem };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import { n } from "../chunks/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-SnR79EHI.js";
|
|
4
|
+
import { n as r } from "../chunks/parts-DI_3VpSy.js";
|
|
5
|
+
import { html as i, nothing as a } from "lit";
|
|
6
|
+
import { property as o } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/select.ts
|
|
7
|
-
|
|
8
|
+
n();
|
|
9
|
+
var s = class t extends e {
|
|
8
10
|
constructor(...e) {
|
|
9
|
-
super(...e), this.size = "md", this.error = "", this._choice = null, this._pending = !1, this._serverSelection = null, this._initial = null, this._parts = new
|
|
11
|
+
super(...e), this.size = "md", this.error = "", this._choice = null, this._pending = !1, this._serverSelection = null, this._initial = null, this._parts = new r(this, {
|
|
10
12
|
tags: [
|
|
11
13
|
"select",
|
|
12
14
|
"option",
|
|
@@ -18,7 +20,7 @@ var o = class t extends e {
|
|
|
18
20
|
if (!t || e.target !== t) return;
|
|
19
21
|
this._pendingReset = null;
|
|
20
22
|
let n = this.value;
|
|
21
|
-
this._choice =
|
|
23
|
+
this._choice = _(t), this._pending = !1, this._changed(n);
|
|
22
24
|
}, this._onChange = (e) => {
|
|
23
25
|
e.target === this.select && (this._onPick(e), this.dispatchEvent(new CustomEvent("void-change", {
|
|
24
26
|
bubbles: !0,
|
|
@@ -26,14 +28,14 @@ var o = class t extends e {
|
|
|
26
28
|
detail: { value: this.value }
|
|
27
29
|
})));
|
|
28
30
|
}, this._observer = null, this._observed = null, this._onMutations = (e) => {
|
|
29
|
-
this._morphQueued || !this.isConnected || this._reconcile(
|
|
31
|
+
this._morphQueued || !this.isConnected || this._reconcile(d(e) ? "mutation" : "none", e);
|
|
30
32
|
}, this._form = null, this._onFormData = (e) => {
|
|
31
33
|
let t = this.select;
|
|
32
34
|
if (!t || t.form !== e.target) return;
|
|
33
|
-
let n =
|
|
35
|
+
let n = v(t);
|
|
34
36
|
if (this._flush(), this._apply(), !t.name) return;
|
|
35
|
-
let r =
|
|
36
|
-
if (
|
|
37
|
+
let r = v(t);
|
|
38
|
+
if (l(n, r)) return;
|
|
37
39
|
let i = e.formData.getAll(t.name);
|
|
38
40
|
for (let e of n) {
|
|
39
41
|
let t = i.indexOf(e);
|
|
@@ -64,7 +66,7 @@ var o = class t extends e {
|
|
|
64
66
|
let t = this.value;
|
|
65
67
|
if (e == null) {
|
|
66
68
|
let e = this.select;
|
|
67
|
-
this._choice = e ?
|
|
69
|
+
this._choice = e ? h(e) : null, this._pending = !1;
|
|
68
70
|
} else this._choice = [String(e)], this._pending = !0;
|
|
69
71
|
this._apply(), this.requestUpdate("value", t);
|
|
70
72
|
}
|
|
@@ -91,32 +93,32 @@ var o = class t extends e {
|
|
|
91
93
|
}
|
|
92
94
|
_wire() {
|
|
93
95
|
let e = this.select, t = !!e && !!this._observed && e !== this._observed, n = this._observer?.takeRecords() ?? [];
|
|
94
|
-
this._observe(e), e && (this._markInvalid(e), this._watchForm(e.form), !this._morphQueued && (this._serverSelection === null ? this._serverSelection =
|
|
96
|
+
this._observe(e), e && (this._markInvalid(e), this._watchForm(e.form), !this._morphQueued && (this._serverSelection === null ? this._serverSelection = p(e) : t && this._serverMarked(e), this._reconcile(t || d(n) ? "mutation" : "none", n)));
|
|
95
97
|
}
|
|
96
98
|
_reconcile(e, t = []) {
|
|
97
99
|
let n = this.select;
|
|
98
100
|
if (!n) return;
|
|
99
|
-
this._finishReset(), e === "mutation" &&
|
|
101
|
+
this._finishReset(), e === "mutation" && f(t) && this._serverMarked(n);
|
|
100
102
|
let r = this.value, i = this._choice;
|
|
101
|
-
if (i === null || !this._pending && !n.multiple && i.length === 0) n.options.length && (this._choice =
|
|
102
|
-
else if (e !== "morph" && !this._pending && i.every((e) =>
|
|
103
|
-
let t =
|
|
104
|
-
t.length && !r && !
|
|
103
|
+
if (i === null || !this._pending && !n.multiple && i.length === 0) n.options.length && (this._choice = _(n));
|
|
104
|
+
else if (e !== "morph" && !this._pending && i.every((e) => c(n, e))) {
|
|
105
|
+
let t = _(n), r = e === "mutation" && l(t, h(n));
|
|
106
|
+
t.length && !r && !l(t, i) && (this._choice = t);
|
|
105
107
|
}
|
|
106
108
|
this._apply(), this._changed(r);
|
|
107
109
|
}
|
|
108
110
|
_flush() {
|
|
109
111
|
if (this._morphQueued || !this.select) return;
|
|
110
112
|
let e = this._observer?.takeRecords() ?? [];
|
|
111
|
-
this._reconcile(
|
|
113
|
+
this._reconcile(d(e) ? "mutation" : "none", e);
|
|
112
114
|
}
|
|
113
115
|
_apply() {
|
|
114
116
|
let e = this.select, t = this._choice;
|
|
115
117
|
if (!e || !t) return;
|
|
116
|
-
if (!t.every((t) =>
|
|
118
|
+
if (!t.every((t) => c(e, t))) {
|
|
117
119
|
if (this._pending) return;
|
|
118
120
|
let t = this.value;
|
|
119
|
-
this._choice =
|
|
121
|
+
this._choice = _(e), this._changed(t);
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
122
124
|
if (this._pending = !1, !e.multiple) {
|
|
@@ -135,7 +137,7 @@ var o = class t extends e {
|
|
|
135
137
|
this.error ? (e.getAttribute("aria-invalid") !== "true" && e.setAttribute("aria-invalid", "true"), this._invalid = e) : this._invalid &&= (this._invalid.getAttribute("aria-invalid") === "true" && !this._invalid.hasAttribute("data-void-field-invalid") && this._invalid.removeAttribute("aria-invalid"), null);
|
|
136
138
|
}
|
|
137
139
|
render() {
|
|
138
|
-
return this.error ?
|
|
140
|
+
return this.error ? i`<span class="void-select-error">${this.error}</span>` : a;
|
|
139
141
|
}
|
|
140
142
|
_observe(e) {
|
|
141
143
|
e !== this._observed && (this._observer?.disconnect(), this._observed = e, e && (this._observer ??= new MutationObserver(this._onMutations), this._observer.observe(e, {
|
|
@@ -146,7 +148,7 @@ var o = class t extends e {
|
|
|
146
148
|
})));
|
|
147
149
|
}
|
|
148
150
|
_serverMarked(e) {
|
|
149
|
-
let t =
|
|
151
|
+
let t = p(e);
|
|
150
152
|
if (t === this._serverSelection || (this._serverSelection = t, this._pending)) return;
|
|
151
153
|
let n = JSON.parse(t);
|
|
152
154
|
if (!n.length) return;
|
|
@@ -163,12 +165,12 @@ var o = class t extends e {
|
|
|
163
165
|
let t = this.select;
|
|
164
166
|
if (e.defaultPrevented || !t || !this.isConnected) return;
|
|
165
167
|
let n = this.value;
|
|
166
|
-
this._initial === null ? (this._choice =
|
|
168
|
+
this._initial === null ? (this._choice = h(t), this._pending = !1) : (this._choice = [this._initial], this._pending = !0), this._apply(), this._changed(n);
|
|
167
169
|
}
|
|
168
170
|
voidBeforeMorph(e) {
|
|
169
171
|
if (e && e !== this) {
|
|
170
172
|
this._flush();
|
|
171
|
-
let n = e instanceof t ? e._serverSelection : null, r = n ??
|
|
173
|
+
let n = e instanceof t ? e._serverSelection : null, r = n ?? m(e), i = n === null && e instanceof t && !!this.select && r === p(this.select);
|
|
172
174
|
if (r !== null && !i) {
|
|
173
175
|
let e = this._serverSelection !== null && r !== this._serverSelection;
|
|
174
176
|
this._serverSelection = r;
|
|
@@ -183,57 +185,57 @@ var o = class t extends e {
|
|
|
183
185
|
return super.voidBeforeMorph(e);
|
|
184
186
|
}
|
|
185
187
|
};
|
|
186
|
-
t([
|
|
188
|
+
t([o({
|
|
187
189
|
type: String,
|
|
188
190
|
reflect: !0
|
|
189
|
-
})],
|
|
191
|
+
})], s.prototype, "size", void 0), t([o({
|
|
190
192
|
type: String,
|
|
191
193
|
reflect: !0
|
|
192
|
-
})],
|
|
194
|
+
})], s.prototype, "error", void 0), t([o({
|
|
193
195
|
type: String,
|
|
194
196
|
reflect: !0
|
|
195
|
-
})],
|
|
196
|
-
function
|
|
197
|
+
})], s.prototype, "value", null);
|
|
198
|
+
function c(e, t) {
|
|
197
199
|
for (let n of Array.from(e.options)) if (n.value === t) return !0;
|
|
198
200
|
return !1;
|
|
199
201
|
}
|
|
200
|
-
function
|
|
202
|
+
function l(e, t) {
|
|
201
203
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
202
204
|
}
|
|
203
|
-
function
|
|
205
|
+
function u(e) {
|
|
204
206
|
return e.nodeName === "OPTION" || e.nodeName === "OPTGROUP";
|
|
205
207
|
}
|
|
206
|
-
function
|
|
208
|
+
function d(e) {
|
|
207
209
|
return e.some((e) => e.type === "attributes" ? e.attributeName === "selected" || e.attributeName === "multiple" : !0);
|
|
208
210
|
}
|
|
209
|
-
function
|
|
211
|
+
function f(e) {
|
|
210
212
|
let t = !1, n = !1;
|
|
211
|
-
for (let r of e) r.type === "childList" && (t ||= Array.from(r.removedNodes).some(
|
|
213
|
+
for (let r of e) r.type === "childList" && (t ||= Array.from(r.removedNodes).some(u), n ||= Array.from(r.addedNodes).some(u));
|
|
212
214
|
return t && n;
|
|
213
215
|
}
|
|
214
|
-
function
|
|
216
|
+
function p(e) {
|
|
215
217
|
return JSON.stringify(Array.from(e.querySelectorAll("option[selected]"), (e) => e.value));
|
|
216
218
|
}
|
|
217
|
-
function
|
|
219
|
+
function m(e) {
|
|
218
220
|
let t = e.querySelector("select");
|
|
219
|
-
return t ?
|
|
221
|
+
return t ? p(t) : null;
|
|
220
222
|
}
|
|
221
|
-
function
|
|
222
|
-
let t = JSON.parse(
|
|
223
|
+
function h(e) {
|
|
224
|
+
let t = JSON.parse(p(e));
|
|
223
225
|
if (e.multiple) return t;
|
|
224
226
|
if (t.length) return [t[t.length - 1]];
|
|
225
227
|
let n = Array.from(e.options).find((e) => !e.disabled);
|
|
226
228
|
return n ? [n.value] : [];
|
|
227
229
|
}
|
|
228
|
-
function h(e) {
|
|
229
|
-
return Array.from(e.options).filter((e) => e.selected);
|
|
230
|
-
}
|
|
231
230
|
function g(e) {
|
|
232
|
-
return
|
|
231
|
+
return Array.from(e.options).filter((e) => e.selected);
|
|
233
232
|
}
|
|
234
233
|
function _(e) {
|
|
235
|
-
return
|
|
234
|
+
return g(e).map((e) => e.value);
|
|
235
|
+
}
|
|
236
|
+
function v(e) {
|
|
237
|
+
return !e.name || e.matches(":disabled") ? [] : g(e).filter((e) => !e.matches(":disabled")).map((e) => e.value);
|
|
236
238
|
}
|
|
237
|
-
customElements.get("void-select") || customElements.define("void-select",
|
|
239
|
+
customElements.get("void-select") || customElements.define("void-select", s);
|
|
238
240
|
//#endregion
|
|
239
|
-
export {
|
|
241
|
+
export { s as VoidSelect };
|
|
@@ -16,8 +16,8 @@ export declare class VoidSidebar extends VoidElement {
|
|
|
16
16
|
width: string;
|
|
17
17
|
/** CSS width when collapsed. Defaults to the theme's `--void-sidebar-collapsed-width`. */
|
|
18
18
|
collapsedWidth: string;
|
|
19
|
-
/** Which
|
|
20
|
-
side: '
|
|
19
|
+
/** Which side of the content the sidebar sits on, in the reading direction: `start` (default) or `end`. */
|
|
20
|
+
side: 'start' | 'end';
|
|
21
21
|
/**
|
|
22
22
|
* Collapses or expands the sidebar on behalf of the user (call it from the
|
|
23
23
|
* control that toggles it, such as a `void-hamburger`) and dispatches
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { property as n } from "lit/decorators.js";
|
|
4
4
|
//#region src/components/sidebar.ts
|
|
5
5
|
var r = class extends e {
|
|
6
6
|
constructor(...e) {
|
|
7
|
-
super(...e), this.collapsed = !1, this.width = "var(--void-sidebar-width)", this.collapsedWidth = "var(--void-sidebar-collapsed-width)", this.side = "
|
|
7
|
+
super(...e), this.collapsed = !1, this.width = "var(--void-sidebar-width)", this.collapsedWidth = "var(--void-sidebar-collapsed-width)", this.side = "start";
|
|
8
8
|
}
|
|
9
9
|
toggle(e) {
|
|
10
10
|
let t = e ?? !this.collapsed;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { n } from "../chunks/form-control-C0vH6gii.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { r } from "../chunks/projection-SnR79EHI.js";
|
|
5
|
+
import { html as i, nothing as a } from "lit";
|
|
6
|
+
import { property as o } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/slider.ts
|
|
7
|
-
|
|
8
|
+
r();
|
|
9
|
+
var s = class extends n(e) {
|
|
8
10
|
constructor(...e) {
|
|
9
11
|
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";
|
|
10
12
|
}
|
|
@@ -44,7 +46,7 @@ var o = class extends n(e) {
|
|
|
44
46
|
}
|
|
45
47
|
render() {
|
|
46
48
|
let e = this._fill();
|
|
47
|
-
return
|
|
49
|
+
return i`
|
|
48
50
|
<input
|
|
49
51
|
type="range"
|
|
50
52
|
.value=${String(this.value)}
|
|
@@ -53,31 +55,31 @@ var o = class extends n(e) {
|
|
|
53
55
|
step=${this.step}
|
|
54
56
|
?disabled=${this.disabled}
|
|
55
57
|
name=${this.name}
|
|
56
|
-
form=${this.formAttr ??
|
|
58
|
+
form=${this.formAttr ?? a}
|
|
57
59
|
style="--void-slider-fill: ${e}%"
|
|
58
60
|
@input=${this._onInput}
|
|
59
61
|
@change=${this._onChange}
|
|
60
62
|
/>
|
|
61
|
-
${this.showValue ?
|
|
63
|
+
${this.showValue ? i`<span class="void-slider-value">${this.value}</span>` : ""}
|
|
62
64
|
`;
|
|
63
65
|
}
|
|
64
66
|
};
|
|
65
|
-
t([
|
|
67
|
+
t([o({
|
|
66
68
|
type: Number,
|
|
67
69
|
reflect: !0
|
|
68
|
-
})],
|
|
70
|
+
})], s.prototype, "value", void 0), t([o({ type: Number })], s.prototype, "min", void 0), t([o({ type: Number })], s.prototype, "max", void 0), t([o({ type: Number })], s.prototype, "step", void 0), t([o({
|
|
69
71
|
type: Boolean,
|
|
70
72
|
reflect: !0
|
|
71
|
-
})],
|
|
73
|
+
})], s.prototype, "disabled", void 0), t([o({
|
|
72
74
|
type: String,
|
|
73
75
|
reflect: !0
|
|
74
|
-
})],
|
|
76
|
+
})], s.prototype, "name", void 0), t([o({
|
|
75
77
|
type: Boolean,
|
|
76
78
|
attribute: "show-value",
|
|
77
79
|
reflect: !0
|
|
78
|
-
})],
|
|
80
|
+
})], s.prototype, "showValue", void 0), t([o({
|
|
79
81
|
type: String,
|
|
80
82
|
reflect: !0
|
|
81
|
-
})],
|
|
83
|
+
})], s.prototype, "size", void 0), customElements.get("void-slider") || customElements.define("void-slider", s);
|
|
82
84
|
//#endregion
|
|
83
|
-
export {
|
|
85
|
+
export { s as VoidSlider };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-SnR79EHI.js";
|
|
4
|
+
import { html as r } from "lit";
|
|
5
|
+
import { property as i } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/spinner.ts
|
|
6
|
-
|
|
7
|
+
n();
|
|
8
|
+
var a = class extends e {
|
|
7
9
|
constructor(...e) {
|
|
8
10
|
super(...e), this.size = "md", this.label = "Loading";
|
|
9
11
|
}
|
|
@@ -14,15 +16,15 @@ var i = class extends e {
|
|
|
14
16
|
e.has("label") && this.setHostAttribute("aria-label", this.label);
|
|
15
17
|
}
|
|
16
18
|
render() {
|
|
17
|
-
return
|
|
19
|
+
return r`<span data-void-sr>${this.label}</span>`;
|
|
18
20
|
}
|
|
19
21
|
};
|
|
20
|
-
t([
|
|
22
|
+
t([i({
|
|
21
23
|
type: String,
|
|
22
24
|
reflect: !0
|
|
23
|
-
})],
|
|
25
|
+
})], a.prototype, "size", void 0), t([i({
|
|
24
26
|
type: String,
|
|
25
27
|
reflect: !0
|
|
26
|
-
})],
|
|
28
|
+
})], a.prototype, "label", void 0), customElements.get("void-spinner") || customElements.define("void-spinner", a);
|
|
27
29
|
//#endregion
|
|
28
|
-
export {
|
|
30
|
+
export { a as VoidSpinner };
|
package/dist/components/stat.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-SnR79EHI.js";
|
|
4
|
+
import { html as r } from "lit";
|
|
5
|
+
import { property as i } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/stat.ts
|
|
6
|
-
|
|
7
|
+
n();
|
|
8
|
+
var a = class extends e {
|
|
7
9
|
constructor(...e) {
|
|
8
10
|
super(...e), this.label = "", this.value = "", this.delta = "", this.description = "", this.trend = null, this.color = "default", this.size = "md";
|
|
9
11
|
}
|
|
@@ -11,35 +13,35 @@ var i = class extends e {
|
|
|
11
13
|
super.connectedCallback(), this.setHostAttribute("role", "figure");
|
|
12
14
|
}
|
|
13
15
|
render() {
|
|
14
|
-
return
|
|
15
|
-
${this.label ?
|
|
16
|
+
return r`
|
|
17
|
+
${this.label ? r`<span class="void-stat-label">${this.label}</span>` : ""}
|
|
16
18
|
<span class="void-stat-value">${this.value}</span>
|
|
17
|
-
${this.delta ?
|
|
18
|
-
${this.description ?
|
|
19
|
+
${this.delta ? r`<span class="void-stat-delta">${this.delta}</span>` : ""}
|
|
20
|
+
${this.description ? r`<span class="void-stat-description">${this.description}</span>` : ""}
|
|
19
21
|
`;
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
|
-
t([
|
|
24
|
+
t([i({
|
|
23
25
|
type: String,
|
|
24
26
|
reflect: !0
|
|
25
|
-
})],
|
|
27
|
+
})], a.prototype, "label", void 0), t([i({
|
|
26
28
|
type: String,
|
|
27
29
|
reflect: !0
|
|
28
|
-
})],
|
|
30
|
+
})], a.prototype, "value", void 0), t([i({
|
|
29
31
|
type: String,
|
|
30
32
|
reflect: !0
|
|
31
|
-
})],
|
|
33
|
+
})], a.prototype, "delta", void 0), t([i({
|
|
32
34
|
type: String,
|
|
33
35
|
reflect: !0
|
|
34
|
-
})],
|
|
36
|
+
})], a.prototype, "description", void 0), t([i({
|
|
35
37
|
type: String,
|
|
36
38
|
reflect: !0
|
|
37
|
-
})],
|
|
39
|
+
})], a.prototype, "trend", void 0), t([i({
|
|
38
40
|
type: String,
|
|
39
41
|
reflect: !0
|
|
40
|
-
})],
|
|
42
|
+
})], a.prototype, "color", void 0), t([i({
|
|
41
43
|
type: String,
|
|
42
44
|
reflect: !0
|
|
43
|
-
})],
|
|
45
|
+
})], a.prototype, "size", void 0), customElements.get("void-stat") || customElements.define("void-stat", a);
|
|
44
46
|
//#endregion
|
|
45
|
-
export {
|
|
47
|
+
export { a as VoidStat };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-SnR79EHI.js";
|
|
4
|
+
import { html as r, nothing as i } from "lit";
|
|
5
|
+
import { property as a } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/stepper.ts
|
|
6
|
-
|
|
7
|
+
n();
|
|
8
|
+
var o = class extends e {
|
|
7
9
|
constructor(...e) {
|
|
8
10
|
super(...e), this.value = 0, this.steps = "";
|
|
9
11
|
}
|
|
@@ -11,15 +13,15 @@ var a = class extends e {
|
|
|
11
13
|
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this.setHostAttribute("aria-label", "Progress");
|
|
12
14
|
}
|
|
13
15
|
render() {
|
|
14
|
-
return
|
|
15
|
-
let
|
|
16
|
-
return
|
|
16
|
+
return r`${this.steps.split(",").map((e) => e.trim()).filter(Boolean).map((e, t) => {
|
|
17
|
+
let n = t < this.value ? "completed" : t === this.value ? "active" : "upcoming";
|
|
18
|
+
return r`${t > 0 ? r`<div class="void-stepper-connector" data-state=${t <= this.value ? "completed" : "upcoming"}></div>` : null}<div
|
|
17
19
|
class="void-stepper-step"
|
|
18
|
-
data-state=${
|
|
19
|
-
aria-current=${t === this.value ? "step" :
|
|
20
|
+
data-state=${n}
|
|
21
|
+
aria-current=${t === this.value ? "step" : i}
|
|
20
22
|
>
|
|
21
23
|
<span class="void-stepper-circle"
|
|
22
|
-
>${
|
|
24
|
+
>${n === "completed" ? r`<svg
|
|
23
25
|
viewBox="0 0 12 12"
|
|
24
26
|
width="1em"
|
|
25
27
|
height="1em"
|
|
@@ -37,9 +39,9 @@ var a = class extends e {
|
|
|
37
39
|
})}`;
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
t([
|
|
42
|
+
t([a({
|
|
41
43
|
type: Number,
|
|
42
44
|
reflect: !0
|
|
43
|
-
})],
|
|
45
|
+
})], o.prototype, "value", void 0), t([a({ reflect: !0 })], o.prototype, "steps", void 0), customElements.get("void-stepper") || customElements.define("void-stepper", o);
|
|
44
46
|
//#endregion
|
|
45
|
-
export {
|
|
47
|
+
export { o as VoidStepper };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { t as e } from "../chunks/base-
|
|
1
|
+
import { t as e } from "../chunks/base-BxmMM3B7.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { t as n } from "../chunks/keyboard-activation-CV0m4hkn.js";
|
|
4
4
|
import { t as r } from "../chunks/form-control-C0vH6gii.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { r as i } from "../chunks/projection-SnR79EHI.js";
|
|
6
|
+
import { html as a } from "lit";
|
|
7
|
+
import { property as o } from "lit/decorators.js";
|
|
7
8
|
//#region src/components/switch.ts
|
|
8
|
-
|
|
9
|
+
i();
|
|
10
|
+
var s = class extends r(e) {
|
|
9
11
|
constructor(...e) {
|
|
10
12
|
super(...e), this._activation = new n(this, { disabled: () => this.formDisabled }), this.checked = !1, this.disabled = !1, this.value = "on", this.color = "default", this.size = "md", this._handleClick = () => {
|
|
11
13
|
this.formDisabled || (this.checked = !this.checked, this.dispatchEvent(new CustomEvent("void-change", {
|
|
@@ -40,24 +42,24 @@ var o = class extends r(e) {
|
|
|
40
42
|
this.checked = !!e;
|
|
41
43
|
}
|
|
42
44
|
render() {
|
|
43
|
-
return
|
|
45
|
+
return a`<span class="void-switch-track"><span class="void-switch-thumb"></span></span>`;
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
|
-
t([
|
|
48
|
+
t([o({
|
|
47
49
|
type: Boolean,
|
|
48
50
|
reflect: !0
|
|
49
|
-
})],
|
|
51
|
+
})], s.prototype, "checked", void 0), t([o({
|
|
50
52
|
type: Boolean,
|
|
51
53
|
reflect: !0
|
|
52
|
-
})],
|
|
54
|
+
})], s.prototype, "disabled", void 0), t([o({
|
|
53
55
|
type: String,
|
|
54
56
|
reflect: !0
|
|
55
|
-
})],
|
|
57
|
+
})], s.prototype, "value", void 0), t([o({
|
|
56
58
|
type: String,
|
|
57
59
|
reflect: !0
|
|
58
|
-
})],
|
|
60
|
+
})], s.prototype, "color", void 0), t([o({
|
|
59
61
|
type: String,
|
|
60
62
|
reflect: !0
|
|
61
|
-
})],
|
|
63
|
+
})], s.prototype, "size", void 0), customElements.get("void-switch") || customElements.define("void-switch", s);
|
|
62
64
|
//#endregion
|
|
63
|
-
export {
|
|
65
|
+
export { s as VoidSwitch };
|
package/dist/components/table.js
CHANGED