@voidable/ui 0.11.0 → 0.12.1
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/README.md +1 -1
- package/dist/angular/index.d.ts +2 -2
- package/dist/angular/index.js +2 -1
- package/dist/chunks/activation-B8aBarKd.js +4 -0
- package/dist/chunks/carousel-C9u0bg5l.js +10 -0
- package/dist/chunks/choice-BTrsi7OW.js +16 -0
- package/dist/chunks/data-Baycjoo4.js +96 -0
- package/dist/chunks/fields-MEqz-olE.js +21 -0
- package/dist/chunks/{form-control-C0vH6gii.js → form-control-fL-Hhy91.js} +49 -48
- package/dist/chunks/{keyboard-CEhMSkws.js → keyboard-ChtDvhB_.js} +4 -23
- package/dist/chunks/{keyboard-activation-CV0m4hkn.js → keyboard-activation-BfEyoaMT.js} +4 -6
- package/dist/chunks/menu-CxRRgkJI.js +21 -0
- package/dist/chunks/{modal-DWGkNdNG.js → modal-Cz2-Ov76.js} +23 -15
- package/dist/chunks/nav-menu-Bx284Dk6.js +12 -0
- package/dist/chunks/{overlay-CH7L4N-h.js → overlay-BuV-4Yvt.js} +75 -68
- package/dist/chunks/overlay-K1ilWC1p.js +4 -0
- package/dist/chunks/pickers-CjlFgNke.js +36 -0
- package/dist/chunks/table-BBpqwWEi.js +4 -0
- package/dist/chunks/tabs-Buf3EBWq.js +10 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.js +22 -14
- package/dist/components/action-input.d.ts +2 -1
- package/dist/components/action-input.js +59 -55
- package/dist/components/bar-chart.js +41 -40
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +15 -11
- package/dist/components/button.d.ts +7 -0
- package/dist/components/button.js +23 -16
- package/dist/components/calendar.d.ts +45 -10
- package/dist/components/calendar.js +183 -129
- package/dist/components/carousel.d.ts +22 -0
- package/dist/components/carousel.js +64 -35
- package/dist/components/charts/data.d.ts +2 -2
- package/dist/components/checkbox-group.js +22 -21
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +29 -24
- package/dist/components/collapsible.d.ts +7 -0
- package/dist/components/collapsible.js +19 -11
- package/dist/components/color-picker.js +28 -27
- package/dist/components/combobox.d.ts +13 -1
- package/dist/components/combobox.js +54 -41
- package/dist/components/compose-input.d.ts +9 -1
- package/dist/components/compose-input.js +28 -16
- package/dist/components/dialog.js +1 -1
- package/dist/components/donut-chart.js +57 -56
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.d.ts +22 -0
- package/dist/components/dropdown-menu.js +54 -39
- package/dist/components/editable.d.ts +11 -1
- package/dist/components/editable.js +35 -22
- package/dist/components/error-fallback.d.ts +4 -2
- package/dist/components/error-fallback.js +34 -28
- package/dist/components/file-upload.d.ts +9 -0
- package/dist/components/file-upload.js +54 -28
- package/dist/components/gauge.js +108 -107
- package/dist/components/hamburger.d.ts +7 -0
- package/dist/components/hamburger.js +28 -19
- package/dist/components/hover-card.d.ts +7 -0
- package/dist/components/hover-card.js +22 -14
- package/dist/components/indicator.js +15 -14
- package/dist/components/input.js +1 -1
- package/dist/components/line-chart.js +43 -42
- package/dist/components/menu.d.ts +25 -0
- package/dist/components/menu.js +55 -33
- package/dist/components/multiselect.d.ts +17 -1
- package/dist/components/multiselect.js +96 -74
- package/dist/components/nav-menu.d.ts +9 -0
- package/dist/components/nav-menu.js +30 -23
- package/dist/components/number-input.d.ts +15 -1
- package/dist/components/number-input.js +71 -37
- package/dist/components/pagination.js +25 -24
- package/dist/components/pin-input.d.ts +11 -0
- package/dist/components/pin-input.js +46 -32
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.js +21 -13
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio.d.ts +10 -1
- package/dist/components/radio.js +37 -32
- package/dist/components/segmented-control.d.ts +14 -0
- package/dist/components/segmented-control.js +40 -28
- package/dist/components/sidebar.d.ts +1 -0
- package/dist/components/sidebar.js +14 -10
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +5 -3
- package/dist/components/spinner.js +21 -14
- package/dist/components/stat.js +1 -1
- package/dist/components/status-dot.d.ts +2 -2
- package/dist/components/status-dot.js +12 -14
- package/dist/components/stepper.d.ts +2 -0
- package/dist/components/stepper.js +20 -13
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.js +24 -16
- package/dist/components/table.d.ts +77 -1
- package/dist/components/table.js +562 -73
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +42 -33
- package/dist/components/tag.js +12 -11
- package/dist/components/tags-input.d.ts +10 -1
- package/dist/components/tags-input.js +42 -30
- package/dist/components/textarea.js +1 -1
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +35 -28
- package/dist/components/toggle-group.d.ts +8 -0
- package/dist/components/toggle-group.js +24 -17
- package/dist/components/toggle.d.ts +7 -0
- package/dist/components/toggle.js +23 -15
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.js +20 -12
- package/dist/components.json +96 -74
- package/dist/custom-elements.json +4213 -131
- package/dist/dev/rules.d.ts +0 -1
- package/dist/dev/types.d.ts +3 -1
- package/dist/dev.js +244 -113
- package/dist/index.d.ts +4 -0
- package/dist/index.js +68 -66
- package/dist/keyboard-activation.d.ts +9 -9
- package/dist/keyboard.d.ts +2 -10
- package/dist/keymaps/activation.d.ts +8 -0
- package/dist/keymaps/carousel.d.ts +9 -0
- package/dist/keymaps/choice.d.ts +21 -0
- package/dist/keymaps/fields.d.ts +31 -0
- package/dist/keymaps/index.d.ts +2 -0
- package/dist/keymaps/menu.d.ts +36 -0
- package/dist/keymaps/nav-menu.d.ts +11 -0
- package/dist/keymaps/overlay.d.ts +4 -0
- package/dist/keymaps/pickers.d.ts +36 -0
- package/dist/keymaps/table.d.ts +8 -0
- package/dist/keymaps/tabs.d.ts +7 -0
- package/dist/keymaps.js +51 -0
- package/dist/keys.d.ts +46 -0
- package/dist/keys.js +57 -0
- package/dist/llms.txt +11 -3
- package/dist/messages/ar.d.ts +1 -0
- package/dist/messages/ar.js +130 -0
- package/dist/messages/fr.d.ts +1 -0
- package/dist/messages/fr.js +109 -0
- package/dist/messages.d.ts +213 -0
- package/dist/messages.js +190 -0
- package/dist/modal.d.ts +7 -0
- package/dist/reference.md +817 -17
- package/dist/testing/index.d.ts +46 -0
- package/dist/testing.js +79 -0
- package/dist/types/elements.d.ts +89 -73
- package/dist/types/react.d.ts +5 -1
- package/dist/types/solid.d.ts +5 -1
- package/dist/types/solid2.d.ts +4 -0
- package/dist/types/svelte.d.ts +5 -1
- package/dist/types/vue.d.ts +5 -1
- package/dist/vscode.html-custom-data.json +384 -18
- package/dist/web-types.json +830 -69
- package/package.json +22 -2
- package/dist/chunks/data-BpiiNapL.js +0 -95
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { msg as n } from "../messages.js";
|
|
4
|
+
import { n as r, t as i } from "../chunks/parts-DI_3VpSy.js";
|
|
5
|
+
import { property as a } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/error-fallback.ts
|
|
6
|
-
var
|
|
7
|
+
var o = [
|
|
7
8
|
"void-error-fallback-title",
|
|
8
9
|
"void-error-fallback-description",
|
|
9
10
|
"void-error-fallback-actions"
|
|
10
|
-
],
|
|
11
|
+
], s = "data-void-default", c = class extends e {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(), this.heading = "
|
|
13
|
-
tags: [...
|
|
13
|
+
super(), this.heading = "", this.message = "", this.retryable = !1, this.retryLabel = "", this.hideIcon = !1, this._shown = "", this._parts = new r(this, {
|
|
14
|
+
tags: [...o],
|
|
14
15
|
onChange: () => this._wire()
|
|
15
16
|
}), this._onClick = (e) => {
|
|
16
17
|
let t = e.target, n = t?.closest?.("void-error-fallback-actions");
|
|
17
|
-
!n?.hasAttribute(
|
|
18
|
+
!n?.hasAttribute(s) || !this._parts.owns(n) || !t.closest("button") || this.dispatchEvent(new CustomEvent("void-retry", {
|
|
18
19
|
bubbles: !0,
|
|
19
20
|
composed: !0
|
|
20
21
|
}));
|
|
@@ -22,12 +23,12 @@ var a = [
|
|
|
22
23
|
let e = {
|
|
23
24
|
voidBeforeMorph: (e) => {
|
|
24
25
|
if (this._authored().length) return;
|
|
25
|
-
let t = Array.from(this.children).filter((e) => e.hasAttribute(
|
|
26
|
-
!t.length || Array.from(e.children).some((e) =>
|
|
26
|
+
let t = Array.from(this.children).filter((e) => e.hasAttribute(s));
|
|
27
|
+
!t.length || Array.from(e.children).some((e) => o.includes(e.localName)) || e.append(...t.map((e) => e.cloneNode(!0)));
|
|
27
28
|
},
|
|
28
29
|
isCopy: () => !1
|
|
29
30
|
}, t = this;
|
|
30
|
-
(t[
|
|
31
|
+
(t[i] ??= []).push(e);
|
|
31
32
|
}
|
|
32
33
|
connectedCallback() {
|
|
33
34
|
super.connectedCallback(), this.setHostAttribute("role", "alert"), this.addEventListener("click", this._onClick);
|
|
@@ -36,50 +37,55 @@ var a = [
|
|
|
36
37
|
super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
|
|
37
38
|
}
|
|
38
39
|
updated(e) {
|
|
39
|
-
super.updated(e)
|
|
40
|
+
super.updated(e);
|
|
41
|
+
let t = `${this.heading || n(this, "errorFallback.heading")}\n${this.retryLabel || n(this, "errorFallback.retry")}`;
|
|
42
|
+
([
|
|
40
43
|
"heading",
|
|
41
44
|
"message",
|
|
42
45
|
"retryable",
|
|
43
46
|
"retryLabel"
|
|
44
|
-
].some((t) => e.has(t)) && this._parts.sync();
|
|
47
|
+
].some((t) => e.has(t)) || t !== this._shown) && (this._shown = t, this._parts.sync());
|
|
45
48
|
}
|
|
46
49
|
_authored() {
|
|
47
|
-
return
|
|
50
|
+
return o.flatMap((e) => this._parts.all(e)).filter((e) => !e.hasAttribute(s));
|
|
48
51
|
}
|
|
49
52
|
_wire() {
|
|
50
|
-
let e = (e) => this._parts.all(e).find((e) => e.hasAttribute(
|
|
53
|
+
let e = (e) => this._parts.all(e).find((e) => e.hasAttribute(s)), t = /* @__PURE__ */ new Set();
|
|
51
54
|
if (!this._authored().length) {
|
|
52
|
-
let
|
|
55
|
+
let r = (n, r) => {
|
|
53
56
|
let i = e(n);
|
|
54
|
-
i || (i = document.createElement(n), i.setAttribute(
|
|
57
|
+
i || (i = document.createElement(n), i.setAttribute(s, ""), this.append(i)), r(i), t.add(i);
|
|
55
58
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
r("void-error-fallback-title", (e) => {
|
|
60
|
+
let t = this.heading || n(this, "errorFallback.heading");
|
|
61
|
+
e.textContent !== t && (e.textContent = t);
|
|
62
|
+
}), this.message && r("void-error-fallback-description", (e) => {
|
|
59
63
|
e.textContent !== this.message && (e.textContent = this.message);
|
|
60
|
-
}), this.retryable &&
|
|
64
|
+
}), this.retryable && r("void-error-fallback-actions", (e) => {
|
|
61
65
|
let t = e.querySelector("button");
|
|
62
|
-
t || (t = document.createElement("button"), t.type = "button", e.append(t))
|
|
66
|
+
t || (t = document.createElement("button"), t.type = "button", e.append(t));
|
|
67
|
+
let r = this.retryLabel || n(this, "errorFallback.retry");
|
|
68
|
+
t.textContent !== r && (t.textContent = r);
|
|
63
69
|
}), this._order(t);
|
|
64
70
|
}
|
|
65
|
-
for (let e of
|
|
71
|
+
for (let e of o) for (let n of this._parts.all(e)) n.hasAttribute(s) && !t.has(n) && n.remove();
|
|
66
72
|
}
|
|
67
73
|
_order(e) {
|
|
68
|
-
|
|
74
|
+
o.flatMap((t) => [...e].filter((e) => e.localName === t)).forEach((e, t) => {
|
|
69
75
|
this.children[t] !== e && this.insertBefore(e, this.children[t] ?? null);
|
|
70
76
|
});
|
|
71
77
|
}
|
|
72
78
|
};
|
|
73
|
-
t([
|
|
79
|
+
t([a({ type: String })], c.prototype, "heading", void 0), t([a({ type: String })], c.prototype, "message", void 0), t([a({
|
|
74
80
|
type: Boolean,
|
|
75
81
|
reflect: !0
|
|
76
|
-
})],
|
|
82
|
+
})], c.prototype, "retryable", void 0), t([a({
|
|
77
83
|
type: String,
|
|
78
84
|
attribute: "retry-label"
|
|
79
|
-
})],
|
|
85
|
+
})], c.prototype, "retryLabel", void 0), t([a({
|
|
80
86
|
type: Boolean,
|
|
81
87
|
attribute: "hide-icon",
|
|
82
88
|
reflect: !0
|
|
83
|
-
})],
|
|
89
|
+
})], c.prototype, "hideIcon", void 0), customElements.get("void-error-fallback") || customElements.define("void-error-fallback", c);
|
|
84
90
|
//#endregion
|
|
85
|
-
export {
|
|
91
|
+
export { c as VoidErrorFallback };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
2
|
import { FormSubmission } from '../form-control.js';
|
|
3
|
+
import { KeyOverrides } from '../keys.js';
|
|
3
4
|
/** Why a file was not taken: `type` (not matched by `accept`), `size` (over `max-size`) or `count` (more files than the zone takes). */
|
|
4
5
|
export type FileRejectReason = 'type' | 'size' | 'count';
|
|
5
6
|
declare const VoidFileUpload_base: (new (...args: any[]) => import('../form-control.js').VoidInternalsFormControl) & typeof VoidElement;
|
|
@@ -9,6 +10,12 @@ declare const VoidFileUpload_base: (new (...args: any[]) => import('../form-cont
|
|
|
9
10
|
* @fires {CustomEvent<{ rejected: { file: File; reason: 'type' | 'size' | 'count' }[] }>} void-reject - Files were refused: one entry per file with the reason. Does not bubble.
|
|
10
11
|
*/
|
|
11
12
|
export declare class VoidFileUpload extends VoidFileUpload_base {
|
|
13
|
+
/** Key bindings for this element's actions, as JSON (`{"activate":["Enter"]}`); `[]` switches an action off. See the keyboard guide. */
|
|
14
|
+
keys: KeyOverrides | null;
|
|
15
|
+
/** @internal The actions of this element and their default keys. */
|
|
16
|
+
static readonly keyMap: {
|
|
17
|
+
activate: string[];
|
|
18
|
+
};
|
|
12
19
|
/** The host's `aria-label` / `aria-labelledby` name the inner control. */
|
|
13
20
|
static labelTarget: string;
|
|
14
21
|
/**
|
|
@@ -51,6 +58,8 @@ export declare class VoidFileUpload extends VoidFileUpload_base {
|
|
|
51
58
|
private _onInputChange;
|
|
52
59
|
private _addFiles;
|
|
53
60
|
private _message;
|
|
61
|
+
/** "Drop files here or browse": the language's sentence with the word `browse` drawn as the link. */
|
|
62
|
+
private _prompt;
|
|
54
63
|
private _clearOwnError;
|
|
55
64
|
private _removeFile;
|
|
56
65
|
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { t as e } from "../chunks/base-BGrS4eIl.js";
|
|
2
2
|
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { actionFor as n, keysConverter as r } from "../keys.js";
|
|
4
|
+
import { t as i } from "../chunks/activation-B8aBarKd.js";
|
|
5
|
+
import { localeOf as a, msg as o } from "../messages.js";
|
|
6
|
+
import { t as s } from "../chunks/form-control-fL-Hhy91.js";
|
|
7
|
+
import { r as c } from "../chunks/projection-oPe6ipjL.js";
|
|
8
|
+
import { i as l } from "../chunks/keyboard-ChtDvhB_.js";
|
|
9
|
+
import { html as u, nothing as d } from "lit";
|
|
10
|
+
import { property as f } from "lit/decorators.js";
|
|
8
11
|
//#region src/components/file-upload.ts
|
|
9
|
-
|
|
10
|
-
var
|
|
12
|
+
c();
|
|
13
|
+
var p = class extends s(e) {
|
|
11
14
|
constructor(...e) {
|
|
12
|
-
super(...e), this.accept = "", this.multiple = !1, this.disabled = !1, this.maxSize = 0, this.error = "", this._files = [], this._uid =
|
|
15
|
+
super(...e), this.keys = null, this.accept = "", this.multiple = !1, this.disabled = !1, this.maxSize = 0, this.error = "", this._files = [], this._uid = l("void-file-upload-error"), this._ownError = "", this._onDropzoneClick = () => {
|
|
13
16
|
this.formDisabled || this._input?.click();
|
|
14
17
|
}, this._onDropzoneKeydown = (e) => {
|
|
15
|
-
this.formDisabled || (
|
|
18
|
+
this.formDisabled || n(this, e) === "activate" && (e.preventDefault(), this._input?.click());
|
|
16
19
|
}, this._onDragOver = (e) => {
|
|
17
20
|
this.disabled || (e.preventDefault(), this.setHostAttribute("dragging", ""));
|
|
18
21
|
}, this._onDragLeave = () => {
|
|
@@ -26,6 +29,9 @@ var c = class extends n(e) {
|
|
|
26
29
|
this._addFiles(n), t.value = "";
|
|
27
30
|
};
|
|
28
31
|
}
|
|
32
|
+
static {
|
|
33
|
+
this.keyMap = i;
|
|
34
|
+
}
|
|
29
35
|
static {
|
|
30
36
|
this.labelTarget = ".void-file-upload-dropzone";
|
|
31
37
|
}
|
|
@@ -48,11 +54,11 @@ var c = class extends n(e) {
|
|
|
48
54
|
t && (this.error ? t.getAttribute("aria-invalid") !== "true" && t.setAttribute("aria-invalid", "true") : t.hasAttribute("aria-invalid") && t.removeAttribute("aria-invalid"));
|
|
49
55
|
}
|
|
50
56
|
render() {
|
|
51
|
-
return
|
|
57
|
+
return u`
|
|
52
58
|
<input
|
|
53
59
|
type="file"
|
|
54
60
|
class="void-file-upload-input"
|
|
55
|
-
accept=${this.accept ||
|
|
61
|
+
accept=${this.accept || d}
|
|
56
62
|
?multiple=${this.multiple}
|
|
57
63
|
?disabled=${this.disabled}
|
|
58
64
|
@change=${this._onInputChange}
|
|
@@ -61,35 +67,33 @@ var c = class extends n(e) {
|
|
|
61
67
|
class="void-file-upload-dropzone"
|
|
62
68
|
tabindex=${this.formDisabled ? "-1" : "0"}
|
|
63
69
|
role="button"
|
|
64
|
-
aria-disabled=${this.formDisabled ? "true" :
|
|
65
|
-
aria-describedby=${this.error ? this._uid :
|
|
70
|
+
aria-disabled=${this.formDisabled ? "true" : d}
|
|
71
|
+
aria-describedby=${this.error ? this._uid : d}
|
|
66
72
|
@click=${this._onDropzoneClick}
|
|
67
73
|
@keydown=${this._onDropzoneKeydown}
|
|
68
74
|
@dragover=${this._onDragOver}
|
|
69
75
|
@dragleave=${this._onDragLeave}
|
|
70
76
|
@drop=${this._onDrop}
|
|
71
77
|
>
|
|
72
|
-
<span class="void-file-upload-text">
|
|
73
|
-
Drop files here or <span class="void-file-upload-browse">browse</span>
|
|
74
|
-
</span>
|
|
78
|
+
<span class="void-file-upload-text">${this._prompt()}</span>
|
|
75
79
|
</div>
|
|
76
|
-
${this._files.length > 0 ?
|
|
80
|
+
${this._files.length > 0 ? u`
|
|
77
81
|
<div class="void-file-upload-files">
|
|
78
|
-
${this._files.map((e, t) =>
|
|
82
|
+
${this._files.map((e, t) => u`
|
|
79
83
|
<div class="void-file-upload-file">
|
|
80
84
|
<span class="void-file-upload-filename">${e.name}</span>
|
|
81
85
|
<button
|
|
82
86
|
type="button"
|
|
83
87
|
class="void-file-upload-remove"
|
|
84
|
-
aria-label
|
|
88
|
+
aria-label=${o(this, "removeItem", { name: e.name })}
|
|
85
89
|
?disabled=${this.disabled}
|
|
86
90
|
@click=${() => this._removeFile(t)}
|
|
87
91
|
>×</button>
|
|
88
92
|
</div>
|
|
89
93
|
`)}
|
|
90
94
|
</div>
|
|
91
|
-
` :
|
|
92
|
-
${this.error ?
|
|
95
|
+
` : d}
|
|
96
|
+
${this.error ? u`<span class="void-file-upload-error" id=${this._uid} role="alert">${this.error}</span>` : d}
|
|
93
97
|
`;
|
|
94
98
|
}
|
|
95
99
|
_addFiles(e) {
|
|
@@ -121,7 +125,26 @@ var c = class extends n(e) {
|
|
|
121
125
|
})));
|
|
122
126
|
}
|
|
123
127
|
_message(e, t) {
|
|
124
|
-
|
|
128
|
+
if (t === "type") return o(this, "fileUpload.rejectType", { name: e.name });
|
|
129
|
+
if (t === "size") {
|
|
130
|
+
let t = `${this.maxSize} B`;
|
|
131
|
+
try {
|
|
132
|
+
t = new Intl.NumberFormat(a(this), {
|
|
133
|
+
style: "unit",
|
|
134
|
+
unit: "byte",
|
|
135
|
+
unitDisplay: "long"
|
|
136
|
+
}).format(this.maxSize);
|
|
137
|
+
} catch {}
|
|
138
|
+
return o(this, "fileUpload.rejectSize", {
|
|
139
|
+
name: e.name,
|
|
140
|
+
limit: t
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return o(this, "fileUpload.rejectCount", { name: e.name });
|
|
144
|
+
}
|
|
145
|
+
_prompt() {
|
|
146
|
+
let e = o(this, "fileUpload.browse"), t = o(this, "fileUpload.prompt", { browse: e }), n = t.indexOf(e);
|
|
147
|
+
return n < 0 ? t : u`${t.slice(0, n)}<span class="void-file-upload-browse">${e}</span>${t.slice(n + e.length)}`;
|
|
125
148
|
}
|
|
126
149
|
_clearOwnError() {
|
|
127
150
|
this._ownError && this.error === this._ownError && (this.error = ""), this._ownError = "";
|
|
@@ -137,18 +160,21 @@ var c = class extends n(e) {
|
|
|
137
160
|
}));
|
|
138
161
|
}
|
|
139
162
|
};
|
|
140
|
-
t([
|
|
163
|
+
t([f({
|
|
164
|
+
attribute: "keys",
|
|
165
|
+
converter: r
|
|
166
|
+
})], p.prototype, "keys", void 0), t([f({ type: String })], p.prototype, "accept", void 0), t([f({
|
|
141
167
|
type: Boolean,
|
|
142
168
|
reflect: !0
|
|
143
|
-
})],
|
|
169
|
+
})], p.prototype, "multiple", void 0), t([f({
|
|
144
170
|
type: Boolean,
|
|
145
171
|
reflect: !0
|
|
146
|
-
})],
|
|
172
|
+
})], p.prototype, "disabled", void 0), t([f({
|
|
147
173
|
type: Number,
|
|
148
174
|
attribute: "max-size"
|
|
149
|
-
})],
|
|
175
|
+
})], p.prototype, "maxSize", void 0), t([f({
|
|
150
176
|
type: String,
|
|
151
177
|
reflect: !0
|
|
152
|
-
})],
|
|
178
|
+
})], p.prototype, "error", void 0), customElements.get("void-file-upload") || customElements.define("void-file-upload", p);
|
|
153
179
|
//#endregion
|
|
154
|
-
export {
|
|
180
|
+
export { p as VoidFileUpload };
|