@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,6 +1,6 @@
|
|
|
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/parts-
|
|
3
|
+
import { n } from "../chunks/parts-DI_3VpSy.js";
|
|
4
4
|
import { t as r } from "../chunks/disclosure-Bj_49GcC.js";
|
|
5
5
|
import { property as i } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/accordion.ts
|
|
@@ -67,8 +67,8 @@ export declare class VoidActionInput extends VoidActionInput_base {
|
|
|
67
67
|
icon: string;
|
|
68
68
|
/** Accessible name of the button and its tooltip. Defaults to `Action`; say what it does (`Copy link`). */
|
|
69
69
|
actionLabel: string;
|
|
70
|
-
/** Which side of the field the button sits on: `
|
|
71
|
-
iconSide: '
|
|
70
|
+
/** Which side of the field the button sits on, in the reading direction: `end` (default) or `start`. */
|
|
71
|
+
iconSide: 'start' | 'end';
|
|
72
72
|
/** Where the button's tooltip appears: `top` (default), `bottom`, `left` or `right`. */
|
|
73
73
|
tooltipSide: 'top' | 'bottom' | 'left' | 'right';
|
|
74
74
|
private _renderIcon;
|
|
@@ -1,14 +1,16 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { r } from "../chunks/projection-SnR79EHI.js";
|
|
5
|
+
import { n as i, t as a } from "../chunks/secret-value-CmTtVkMg.js";
|
|
6
|
+
import { html as o, nothing as s } from "lit";
|
|
7
|
+
import { property as c } from "lit/decorators.js";
|
|
8
|
+
import { live as l } from "lit/directives/live.js";
|
|
8
9
|
//#region src/components/action-input.ts
|
|
9
|
-
|
|
10
|
+
r();
|
|
11
|
+
var u = class t extends n(e) {
|
|
10
12
|
constructor(...e) {
|
|
11
|
-
super(...e), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.minlength = void 0, this.maxlength = void 0, this.pattern = "", this.inputMode = "", this.enterKeyHint = "", this.autocapitalize = "", this.spellcheckAttr = null, this.size = "md", this.color = "default", this.type = "text", this.icon = "search", this.actionLabel = "Action", this.iconSide = "
|
|
13
|
+
super(...e), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.name = "", this.autocomplete = "", this.minlength = void 0, this.maxlength = void 0, this.pattern = "", this.inputMode = "", this.enterKeyHint = "", this.autocapitalize = "", this.spellcheckAttr = null, this.size = "md", this.color = "default", this.type = "text", this.icon = "search", this.actionLabel = "Action", this.iconSide = "end", this.tooltipSide = "top";
|
|
12
14
|
}
|
|
13
15
|
static {
|
|
14
16
|
this.labelTarget = ".void-action-input-field";
|
|
@@ -18,23 +20,23 @@ var l = class t extends n(e) {
|
|
|
18
20
|
}
|
|
19
21
|
_renderIcon() {
|
|
20
22
|
switch (this.icon) {
|
|
21
|
-
case "copy": return
|
|
22
|
-
case "search": return
|
|
23
|
-
case "send": return
|
|
24
|
-
case "eye": return
|
|
25
|
-
case "eye-off": return
|
|
26
|
-
case "check": return
|
|
27
|
-
case "x": return
|
|
28
|
-
case "arrow-right": return
|
|
29
|
-
case "clipboard": return
|
|
30
|
-
default: return
|
|
23
|
+
case "copy": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666"/><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"/></svg>`;
|
|
24
|
+
case "search": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
|
|
25
|
+
case "send": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 14l11 -11"/><path d="M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5"/></svg>`;
|
|
26
|
+
case "eye": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"/><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"/></svg>`;
|
|
27
|
+
case "eye-off": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828"/><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"/><path d="M3 3l18 18"/></svg>`;
|
|
28
|
+
case "check": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l5 5l10 -10"/></svg>`;
|
|
29
|
+
case "x": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12"/><path d="M6 6l12 12"/></svg>`;
|
|
30
|
+
case "arrow-right": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0"/><path d="M13 18l6 -6"/><path d="M13 6l6 6"/></svg>`;
|
|
31
|
+
case "clipboard": return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"/><path d="M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2"/></svg>`;
|
|
32
|
+
default: return o`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="var(--void-icon-stroke-width)" stroke-linecap="round" stroke-linejoin="round" width="1em" height="1em"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/><path d="M21 21l-6 -6"/></svg>`;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
requestUpdate(e, n,
|
|
34
|
-
super.requestUpdate(e, n,
|
|
35
|
+
requestUpdate(e, n, r) {
|
|
36
|
+
super.requestUpdate(e, n, i(this.type === "password", e, r, () => t.getPropertyOptions("value")));
|
|
35
37
|
}
|
|
36
38
|
updated(e) {
|
|
37
|
-
super.updated(e), this.type === "password" && e.get("type") !== void 0 &&
|
|
39
|
+
super.updated(e), this.type === "password" && e.get("type") !== void 0 && a(this);
|
|
38
40
|
}
|
|
39
41
|
formWriteNativeDefault(e) {
|
|
40
42
|
let t = this.querySelector(".void-action-input-field");
|
|
@@ -72,7 +74,7 @@ var l = class t extends n(e) {
|
|
|
72
74
|
}));
|
|
73
75
|
}
|
|
74
76
|
render() {
|
|
75
|
-
let e =
|
|
77
|
+
let e = o`
|
|
76
78
|
<void-tooltip side=${this.tooltipSide}>
|
|
77
79
|
<void-tooltip-trigger><button
|
|
78
80
|
class="void-action-input-btn"
|
|
@@ -84,87 +86,87 @@ var l = class t extends n(e) {
|
|
|
84
86
|
<void-tooltip-content>${this.actionLabel}</void-tooltip-content>
|
|
85
87
|
</void-tooltip>
|
|
86
88
|
`;
|
|
87
|
-
return
|
|
88
|
-
${this.iconSide === "
|
|
89
|
+
return o`
|
|
90
|
+
${this.iconSide === "start" ? e : ""}
|
|
89
91
|
<input
|
|
90
92
|
class="void-action-input-field"
|
|
91
93
|
type=${this.type}
|
|
92
|
-
.value=${
|
|
94
|
+
.value=${l(this.value)}
|
|
93
95
|
placeholder=${this.placeholder}
|
|
94
96
|
?disabled=${this.disabled}
|
|
95
97
|
?readonly=${this.readonly}
|
|
96
98
|
?required=${this.required}
|
|
97
99
|
name=${this.name}
|
|
98
|
-
form=${this.formAttr ??
|
|
99
|
-
autocomplete=${this.autocomplete ||
|
|
100
|
-
minlength=${this.minlength ??
|
|
101
|
-
maxlength=${this.maxlength ??
|
|
102
|
-
pattern=${this.pattern ||
|
|
103
|
-
inputmode=${this.inputMode ||
|
|
104
|
-
enterkeyhint=${this.enterKeyHint ||
|
|
105
|
-
autocapitalize=${this.autocapitalize ||
|
|
106
|
-
spellcheck=${this.spellcheckAttr ??
|
|
107
|
-
aria-label=${this.placeholder ||
|
|
100
|
+
form=${this.formAttr ?? s}
|
|
101
|
+
autocomplete=${this.autocomplete || s}
|
|
102
|
+
minlength=${this.minlength ?? s}
|
|
103
|
+
maxlength=${this.maxlength ?? s}
|
|
104
|
+
pattern=${this.pattern || s}
|
|
105
|
+
inputmode=${this.inputMode || s}
|
|
106
|
+
enterkeyhint=${this.enterKeyHint || s}
|
|
107
|
+
autocapitalize=${this.autocapitalize || s}
|
|
108
|
+
spellcheck=${this.spellcheckAttr ?? s}
|
|
109
|
+
aria-label=${this.placeholder || s}
|
|
108
110
|
@input=${this._onInput}
|
|
109
111
|
@change=${this._onChange}
|
|
110
112
|
/>
|
|
111
|
-
${this.iconSide === "
|
|
113
|
+
${this.iconSide === "end" ? e : ""}
|
|
112
114
|
`;
|
|
113
115
|
}
|
|
114
116
|
};
|
|
115
|
-
t([
|
|
117
|
+
t([c({
|
|
116
118
|
type: String,
|
|
117
119
|
reflect: !0
|
|
118
|
-
})],
|
|
120
|
+
})], u.prototype, "value", void 0), t([c({
|
|
119
121
|
type: String,
|
|
120
122
|
reflect: !0
|
|
121
|
-
})],
|
|
123
|
+
})], u.prototype, "placeholder", void 0), t([c({
|
|
122
124
|
type: Boolean,
|
|
123
125
|
reflect: !0
|
|
124
|
-
})],
|
|
126
|
+
})], u.prototype, "disabled", void 0), t([c({
|
|
125
127
|
type: Boolean,
|
|
126
128
|
reflect: !0
|
|
127
|
-
})],
|
|
129
|
+
})], u.prototype, "readonly", void 0), t([c({
|
|
128
130
|
type: Boolean,
|
|
129
131
|
reflect: !0
|
|
130
|
-
})],
|
|
132
|
+
})], u.prototype, "required", void 0), t([c({
|
|
131
133
|
type: String,
|
|
132
134
|
reflect: !0
|
|
133
|
-
})],
|
|
135
|
+
})], u.prototype, "name", void 0), t([c({
|
|
134
136
|
type: String,
|
|
135
137
|
reflect: !0
|
|
136
|
-
})],
|
|
138
|
+
})], u.prototype, "autocomplete", void 0), t([c({ type: Number })], u.prototype, "minlength", void 0), t([c({ type: Number })], u.prototype, "maxlength", void 0), t([c({ type: String })], u.prototype, "pattern", void 0), t([c({
|
|
137
139
|
type: String,
|
|
138
140
|
attribute: "inputmode"
|
|
139
|
-
})],
|
|
141
|
+
})], u.prototype, "inputMode", void 0), t([c({
|
|
140
142
|
type: String,
|
|
141
143
|
attribute: "enterkeyhint"
|
|
142
|
-
})],
|
|
144
|
+
})], u.prototype, "enterKeyHint", void 0), t([c({ type: String })], u.prototype, "autocapitalize", void 0), t([c({
|
|
143
145
|
type: String,
|
|
144
146
|
attribute: "spellcheck"
|
|
145
|
-
})],
|
|
147
|
+
})], u.prototype, "spellcheckAttr", void 0), t([c({
|
|
146
148
|
type: String,
|
|
147
149
|
reflect: !0
|
|
148
|
-
})],
|
|
150
|
+
})], u.prototype, "size", void 0), t([c({
|
|
149
151
|
type: String,
|
|
150
152
|
reflect: !0
|
|
151
|
-
})],
|
|
153
|
+
})], u.prototype, "color", void 0), t([c({
|
|
152
154
|
type: String,
|
|
153
155
|
reflect: !0
|
|
154
|
-
})],
|
|
156
|
+
})], u.prototype, "type", void 0), t([c({
|
|
155
157
|
type: String,
|
|
156
158
|
reflect: !0
|
|
157
|
-
})],
|
|
159
|
+
})], u.prototype, "icon", void 0), t([c({
|
|
158
160
|
type: String,
|
|
159
161
|
attribute: "action-label"
|
|
160
|
-
})],
|
|
162
|
+
})], u.prototype, "actionLabel", void 0), t([c({
|
|
161
163
|
type: String,
|
|
162
164
|
reflect: !0,
|
|
163
165
|
attribute: "icon-side"
|
|
164
|
-
})],
|
|
166
|
+
})], u.prototype, "iconSide", void 0), t([c({
|
|
165
167
|
type: String,
|
|
166
168
|
reflect: !0,
|
|
167
169
|
attribute: "tooltip-side"
|
|
168
|
-
})],
|
|
170
|
+
})], u.prototype, "tooltipSide", void 0), customElements.get("void-action-input") || customElements.define("void-action-input", u);
|
|
169
171
|
//#endregion
|
|
170
|
-
export {
|
|
172
|
+
export { u as VoidActionInput };
|
package/dist/components/alert.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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/parts-
|
|
3
|
+
import { n } from "../chunks/parts-DI_3VpSy.js";
|
|
4
4
|
import { n as r, t as i } from "../chunks/dismiss-Drsy_dE5.js";
|
|
5
5
|
import { property as a } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/alert.ts
|
|
@@ -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/avatar.ts
|
|
6
|
-
|
|
7
|
+
n();
|
|
8
|
+
var a = class extends e {
|
|
7
9
|
constructor(...e) {
|
|
8
10
|
super(...e), this.src = "", this.alt = "", this.initials = "", this.size = "md", this._onImgError = () => {
|
|
9
11
|
this.src = "";
|
|
@@ -16,21 +18,21 @@ var i = class extends e {
|
|
|
16
18
|
(e.has("alt") || e.has("initials")) && this.setHostAttribute("aria-label", this.alt || this.initials);
|
|
17
19
|
}
|
|
18
20
|
render() {
|
|
19
|
-
return this.src ?
|
|
21
|
+
return this.src ? r`<img src="${this.src}" alt="${this.alt}" @error="${this._onImgError}" />` : this.initials ? r`<span class="void-avatar-initials">${this.initials}</span>` : r``;
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
|
-
t([
|
|
24
|
+
t([i({
|
|
23
25
|
type: String,
|
|
24
26
|
reflect: !0
|
|
25
|
-
})],
|
|
27
|
+
})], a.prototype, "src", void 0), t([i({
|
|
26
28
|
type: String,
|
|
27
29
|
reflect: !0
|
|
28
|
-
})],
|
|
30
|
+
})], a.prototype, "alt", void 0), t([i({
|
|
29
31
|
type: String,
|
|
30
32
|
reflect: !0
|
|
31
|
-
})],
|
|
33
|
+
})], a.prototype, "initials", void 0), t([i({
|
|
32
34
|
type: String,
|
|
33
35
|
reflect: !0
|
|
34
|
-
})],
|
|
36
|
+
})], a.prototype, "size", void 0), customElements.get("void-avatar") || customElements.define("void-avatar", a);
|
|
35
37
|
//#endregion
|
|
36
|
-
export {
|
|
38
|
+
export { a as VoidAvatar };
|
package/dist/components/badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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/parts-
|
|
3
|
+
import { n } from "../chunks/parts-DI_3VpSy.js";
|
|
4
4
|
import { n as r, t as i } from "../chunks/dismiss-Drsy_dE5.js";
|
|
5
5
|
import { property as a } from "lit/decorators.js";
|
|
6
6
|
//#region src/components/banner.ts
|
|
@@ -1,24 +1,26 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
3
|
+
import { r as n } from "../chunks/projection-SnR79EHI.js";
|
|
4
|
+
import { n as r, t as i } from "../chunks/scale-_ccSuoYg.js";
|
|
5
|
+
import { html as a, nothing as o, svg as s } from "lit";
|
|
6
|
+
import { property as c, state as l } from "lit/decorators.js";
|
|
6
7
|
//#region src/components/bar-chart.ts
|
|
7
|
-
|
|
8
|
+
n();
|
|
9
|
+
function u(e) {
|
|
8
10
|
return 1 - (1 - e) ** 3;
|
|
9
11
|
}
|
|
10
|
-
function
|
|
12
|
+
function d(e) {
|
|
11
13
|
return e === 0 ? "0" : Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(e >= 1e4 ? 0 : 1)}k` : Number.isInteger(e) ? String(e) : e.toFixed(1);
|
|
12
14
|
}
|
|
13
|
-
function
|
|
15
|
+
function f(e) {
|
|
14
16
|
return Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(e >= 1e4 ? 0 : 1)}k` : Math.round(e).toString();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function p(e) {
|
|
17
19
|
if (e <= 0) return 1;
|
|
18
20
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
19
21
|
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
|
|
20
22
|
}
|
|
21
|
-
var
|
|
23
|
+
var m = class extends e {
|
|
22
24
|
constructor(...e) {
|
|
23
25
|
super(...e), this.height = 220, this.showValue = !1, this.variant = "filled", this.ariaLabel = "", this.stagger = null, this._data = { series: [] }, this._phase = "pre", this._display = /* @__PURE__ */ new Map(), this._targets = /* @__PURE__ */ new Map(), this._animFrom = /* @__PURE__ */ new Map(), this._animStart = 0, this._animDuration = 0, this._staggerMs = 0, this._rafHandle = 0, this._tick = (e) => {
|
|
24
26
|
let t = e - this._animStart, n = !1;
|
|
@@ -28,7 +30,7 @@ var p = class extends e {
|
|
|
28
30
|
else if (t >= o) this._display.set(e, r);
|
|
29
31
|
else {
|
|
30
32
|
let i = (t - a) / this._animDuration;
|
|
31
|
-
this._display.set(e, s + (r - s) *
|
|
33
|
+
this._display.set(e, s + (r - s) * u(i)), n = !0;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
this.requestUpdate(), n ? this._rafHandle = requestAnimationFrame(this._tick) : this._phase = "idle";
|
|
@@ -68,9 +70,9 @@ var p = class extends e {
|
|
|
68
70
|
}
|
|
69
71
|
render() {
|
|
70
72
|
let { series: e, labels: t = [] } = this._data;
|
|
71
|
-
if (e.length === 0) return
|
|
72
|
-
let
|
|
73
|
-
return
|
|
73
|
+
if (e.length === 0) return a`<svg viewBox="0 0 600 ${this.height}" role="img" aria-label=${this.ariaLabel || "Bar chart"}></svg>`;
|
|
74
|
+
let n = this.height - 16 - 32, c = Math.max(...e.map((e) => e.values.length)), l = e.flatMap((e) => e.values).filter(Number.isFinite), u = Math.max(...l, 0), m = Math.min(...l, 0), h = m < 0 ? -p(-m * 1.1) : 0, g = new r([h, u > 0 || h === 0 ? p(u * 1.1) || 1 : 0], [16 + n, 16]), _ = g.scale(0), v = new i(c, [40, 584], .2), y = g.ticks(5);
|
|
75
|
+
return a`
|
|
74
76
|
<svg
|
|
75
77
|
viewBox="0 0 600 ${this.height}"
|
|
76
78
|
preserveAspectRatio="none"
|
|
@@ -81,29 +83,29 @@ var p = class extends e {
|
|
|
81
83
|
<g class="void-bar-chart-grid">
|
|
82
84
|
${y.map((e) => {
|
|
83
85
|
let t = g.scale(e);
|
|
84
|
-
return
|
|
86
|
+
return s`<line x1=${40} x2=${584} y1=${t} y2=${t}></line>`;
|
|
85
87
|
})}
|
|
86
88
|
</g>
|
|
87
89
|
|
|
88
|
-
${h < 0 ?
|
|
90
|
+
${h < 0 ? s`<line class="void-bar-chart-baseline" x1=${40} x2=${584} y1=${_} y2=${_}></line>` : o}
|
|
89
91
|
|
|
90
92
|
<g class="void-bar-chart-y-axis">
|
|
91
|
-
${y.map((e) =>
|
|
93
|
+
${y.map((e) => s`<text x=${32} y=${g.scale(e)} dy="0.32em" text-anchor="end">${d(e)}</text>`)}
|
|
92
94
|
</g>
|
|
93
95
|
|
|
94
96
|
${e.map((t, n) => {
|
|
95
97
|
let r = t.color ?? `var(--void-chart-series-${n % 6 + 1})`, i = v.bandwidth / e.length;
|
|
96
|
-
return
|
|
98
|
+
return s`
|
|
97
99
|
<g class="void-bar-chart-series" style="--series-color: ${r}">
|
|
98
100
|
${t.values.map((e, r) => {
|
|
99
|
-
let
|
|
100
|
-
return
|
|
101
|
+
let a = this._display.get(this._key(n, r)) ?? 0, c = v.scale(r) + i * n, l = g.scale(a), u = Math.min(l, _), d = Math.abs(_ - l), f = t.colors?.[r];
|
|
102
|
+
return s`<rect
|
|
101
103
|
class="void-bar-chart-bar"
|
|
102
104
|
x=${c}
|
|
103
105
|
y=${u}
|
|
104
106
|
width=${i - 2}
|
|
105
107
|
height=${d}
|
|
106
|
-
style=${f ? `--series-color: ${f}` :
|
|
108
|
+
style=${f ? `--series-color: ${f}` : o}
|
|
107
109
|
></rect>`;
|
|
108
110
|
})}
|
|
109
111
|
</g>
|
|
@@ -112,30 +114,30 @@ var p = class extends e {
|
|
|
112
114
|
|
|
113
115
|
${this.showValue ? e.map((t, n) => {
|
|
114
116
|
let r = v.bandwidth / e.length;
|
|
115
|
-
return
|
|
117
|
+
return s`
|
|
116
118
|
<g class="void-bar-chart-values">
|
|
117
119
|
${t.values.map((e, t) => {
|
|
118
|
-
let i = this._display.get(this._key(n, t)) ?? 0, a = v.scale(t) + r * n + (r - 2) / 2,
|
|
119
|
-
return
|
|
120
|
+
let i = this._display.get(this._key(n, t)) ?? 0, a = v.scale(t) + r * n + (r - 2) / 2, o = g.scale(i);
|
|
121
|
+
return s`<text x=${a} y=${i < 0 ? o + 14 : o - 6} text-anchor="middle">${f(i)}</text>`;
|
|
120
122
|
})}
|
|
121
123
|
</g>
|
|
122
124
|
`;
|
|
123
|
-
}) :
|
|
125
|
+
}) : o}
|
|
124
126
|
|
|
125
127
|
<g class="void-bar-chart-x-axis">
|
|
126
|
-
${t.slice(0, c).map((e, t) =>
|
|
128
|
+
${t.slice(0, c).map((e, t) => s`<text x=${v.scale(t) + v.bandwidth / 2} y=${16 + n + 18} text-anchor="middle">${e}</text>`)}
|
|
127
129
|
</g>
|
|
128
130
|
</svg>
|
|
129
131
|
`;
|
|
130
132
|
}
|
|
131
133
|
};
|
|
132
|
-
t([
|
|
134
|
+
t([c({
|
|
133
135
|
type: Number,
|
|
134
136
|
reflect: !0
|
|
135
|
-
})],
|
|
137
|
+
})], m.prototype, "height", void 0), t([c({
|
|
136
138
|
type: Boolean,
|
|
137
139
|
attribute: "show-value",
|
|
138
140
|
reflect: !0
|
|
139
|
-
})],
|
|
141
|
+
})], m.prototype, "showValue", void 0), t([c({ reflect: !0 })], m.prototype, "variant", void 0), t([c({ attribute: "aria-label" })], m.prototype, "ariaLabel", void 0), t([c({ type: Number })], m.prototype, "stagger", void 0), t([l()], m.prototype, "_phase", void 0), customElements.get("void-bar-chart") || customElements.define("void-bar-chart", m);
|
|
140
142
|
//#endregion
|
|
141
|
-
export {
|
|
143
|
+
export { m as VoidBarChart };
|
|
@@ -1,6 +1,6 @@
|
|
|
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/parts-
|
|
3
|
+
import { n } from "../chunks/parts-DI_3VpSy.js";
|
|
4
4
|
import { property as r } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/breadcrumbs.ts
|
|
6
6
|
var i = "void-breadcrumbs-list", a = "void-breadcrumbs-item", o = class extends e {
|
|
@@ -1,4 +1,4 @@
|
|
|
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 { i as r, r as i } from "../chunks/form-control-C0vH6gii.js";
|