nve-designsystem 0.1.43 → 0.1.45
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/chunks/chunk.2HU27ZWH.js +138 -0
- package/chunks/chunk.3WAW4E2K.js +163 -0
- package/chunks/chunk.7O2CYFQX.js +153 -0
- package/chunks/chunk.GI7VDIWX.js +16 -0
- package/chunks/chunk.GMVRWIWU.js +1202 -0
- package/chunks/chunk.I2FDN2OJ.js +78 -0
- package/chunks/chunk.JS655M6J.js +98 -0
- package/chunks/chunk.KRRLOROJ.js +64 -0
- package/chunks/chunk.MAS2SHYD.js +98 -0
- package/chunks/chunk.MGOBPGE5.js +601 -0
- package/chunks/chunk.NYIIDP5N.js +47 -0
- package/chunks/chunk.Q6ASPMKT.js +21 -0
- package/chunks/chunk.RK73WSZS.js +29 -0
- package/chunks/chunk.SI4ACBFK.js +61 -0
- package/chunks/chunk.UEQZEZFU.js +151 -0
- package/chunks/chunk.YCHBWCKL.js +38 -0
- package/chunks/class-map.js +61 -0
- package/chunks/if-defined.js +10 -0
- package/chunks/lit-element.js +591 -0
- package/chunks/live.js +36 -0
- package/chunks/property.js +47 -0
- package/chunks/query.js +39 -0
- package/chunks/state.js +12 -0
- package/chunks/static.js +34 -0
- package/chunks/updateInvalidProperty.js +8 -0
- package/components/nve-alert/nve-alert.component.d.ts +1 -1
- package/components/nve-alert/nve-alert.component.js +284 -0
- package/components/nve-alert/nve-alert.styles.d.ts +2 -0
- package/components/nve-alert/nve-alert.styles.js +185 -0
- package/components/nve-badge/nve-badge.component.d.ts +1 -1
- package/components/nve-badge/nve-badge.component.js +156 -0
- package/components/nve-badge/nve-badge.styles.d.ts +2 -0
- package/components/nve-badge/nve-badge.styles.js +72 -0
- package/components/nve-button/nve-button.component.d.ts +1 -1
- package/components/nve-button/nve-button.component.js +251 -0
- package/components/nve-button/nve-button.styles.d.ts +2 -0
- package/components/nve-button/nve-button.styles.js +149 -0
- package/components/nve-checkbox/nve-checkbox.component.d.ts +1 -1
- package/components/nve-checkbox/nve-checkbox.component.js +333 -0
- package/components/nve-checkbox/nve-checkbox.styles.d.ts +2 -0
- package/components/nve-checkbox/nve-checkbox.styles.js +68 -0
- package/components/nve-checkbox-group/nve-checkbox-group.component.js +160 -0
- package/components/nve-checkbox-group/nve-checkbox-group.styles.d.ts +2 -0
- package/components/nve-checkbox-group/nve-checkbox-group.styles.js +54 -0
- package/components/nve-dialog/nve-dialog-styles.d.ts +2 -0
- package/components/nve-dialog/nve-dialog-styles.js +53 -0
- package/components/nve-dialog/nve-dialog.component.d.ts +1 -1
- package/components/nve-dialog/nve-dialog.component.js +413 -0
- package/components/nve-divider/nve-divider.component.d.ts +1 -1
- package/components/nve-divider/nve-divider.component.js +71 -0
- package/components/nve-dropdown/nve-dropdown.component.d.ts +1 -1
- package/components/nve-dropdown/nve-dropdown.component.js +353 -0
- package/components/nve-dropdown/nve-dropdown.styles.d.ts +2 -0
- package/components/nve-dropdown/nve-dropdown.styles.js +9 -0
- package/components/nve-icon/nve-icon.component.js +28 -0
- package/components/nve-icon/nve-icon.styles.d.ts +2 -0
- package/components/nve-icon/nve-icon.styles.js +22 -0
- package/components/nve-input/nve-input.component.d.ts +1 -1
- package/components/nve-input/nve-input.component.js +758 -0
- package/components/nve-input/nve-input.styles.d.ts +2 -0
- package/components/nve-input/nve-input.styles.js +83 -0
- package/components/nve-label/nve-label.component.js +109 -0
- package/components/nve-label/nve-label.styles.d.ts +4 -0
- package/components/nve-label/nve-label.styles.js +52 -0
- package/components/nve-menu/nve-menu.component.d.ts +1 -1
- package/components/nve-menu/nve-menu.component.js +112 -0
- package/components/nve-menu/nve-menu.styles.d.ts +2 -0
- package/components/nve-menu/nve-menu.styles.js +17 -0
- package/components/nve-menu-item/nve-menu-item.component.d.ts +1 -1
- package/components/nve-menu-item/nve-menu-item.component.js +526 -0
- package/components/nve-menu-item/nve-menu-item.styles.d.ts +2 -0
- package/components/nve-menu-item/nve-menu-item.styles.js +111 -0
- package/components/nve-option/nve-option.component.d.ts +1 -1
- package/components/nve-option/nve-option.component.js +208 -0
- package/components/nve-option/nve-option.styles.d.ts +2 -0
- package/components/nve-option/nve-option.styles.js +40 -0
- package/components/nve-popup/nve-popup.component.d.ts +1 -1
- package/components/nve-popup/nve-popup.component.js +24 -0
- package/components/nve-radio/nve-radio.component.d.ts +1 -1
- package/components/nve-radio/nve-radio.component.js +210 -0
- package/components/nve-radio/nve-radio.styles.d.ts +2 -0
- package/components/nve-radio/nve-radio.styles.js +69 -0
- package/components/nve-radio-button/nve-radio-button.component.d.ts +1 -1
- package/components/nve-radio-button/nve-radio-button.component.js +151 -0
- package/components/nve-radio-group/nve-radio-group.component.d.ts +1 -1
- package/components/nve-radio-group/nve-radio-group.component.js +452 -0
- package/components/nve-radio-group/nve-radio-group.styles.d.ts +2 -0
- package/components/nve-radio-group/nve-radio-group.styles.js +69 -0
- package/components/nve-select/nve-select.component.d.ts +1 -1
- package/components/nve-select/nve-select.component.js +1088 -0
- package/components/nve-select/nve-select.styles.d.ts +2 -0
- package/components/nve-select/nve-select.styles.js +39 -0
- package/components/nve-spinner/nve-spinner.component.d.ts +1 -1
- package/components/nve-spinner/nve-spinner.component.js +32 -0
- package/components/nve-tooltip/nve-tooltip.component.d.ts +1 -1
- package/components/nve-tooltip/nve-tooltip.component.js +238 -0
- package/css/global.css +57 -0
- package/css/nve.css +128 -75
- package/css/nve_dark.css +1 -0
- package/css/varsom.css +128 -75
- package/css/varsom_dark.css +1 -0
- package/nve-designsystem.js +83 -19341
- package/package.json +11 -4
- package/registerIcons/systemLibraryCustomization.d.ts +6 -0
- package/registerIcons/systemLibraryCustomization.js +96 -0
- package/vite-env.d.js +1 -0
- package/nve-designsystem.umd.cjs +0 -8040
- package/vite.svg +0 -1
- /package/{index.d.ts → nve-designsystem.d.ts} +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { c as p, b as l, S as f } from "./chunk.JS655M6J.js";
|
|
2
|
+
import { i as g, x as y } from "./lit-element.js";
|
|
3
|
+
import { w, u as L, g as m } from "./chunk.3WAW4E2K.js";
|
|
4
|
+
import { w as b } from "./chunk.Q6ASPMKT.js";
|
|
5
|
+
import { n as h } from "./property.js";
|
|
6
|
+
import { r as _ } from "./state.js";
|
|
7
|
+
var C = g`
|
|
8
|
+
${p}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 1em;
|
|
13
|
+
height: 1em;
|
|
14
|
+
box-sizing: content-box !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
display: block;
|
|
19
|
+
height: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2020 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/
|
|
28
|
+
const I = (t, e) => e === void 0 ? (t == null ? void 0 : t._$litType$) !== void 0 : (t == null ? void 0 : t._$litType$) === e, H = (t) => t.strings === void 0, R = {}, M = (t, e = R) => t._$AH = e;
|
|
29
|
+
var o = Symbol(), c = Symbol(), d, v = /* @__PURE__ */ new Map(), a = class extends f {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments), this.initialRender = !1, this.svg = null, this.label = "", this.library = "default";
|
|
32
|
+
}
|
|
33
|
+
/** Given a URL, this function returns the resulting SVG element or an appropriate error symbol. */
|
|
34
|
+
async resolveIcon(t, e) {
|
|
35
|
+
var n;
|
|
36
|
+
let r;
|
|
37
|
+
if (e != null && e.spriteSheet)
|
|
38
|
+
return y`<svg part="svg">
|
|
39
|
+
<use part="use" href="${t}"></use>
|
|
40
|
+
</svg>`;
|
|
41
|
+
try {
|
|
42
|
+
if (r = await fetch(t, { mode: "cors" }), !r.ok)
|
|
43
|
+
return r.status === 410 ? o : c;
|
|
44
|
+
} catch {
|
|
45
|
+
return c;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const s = document.createElement("div");
|
|
49
|
+
s.innerHTML = await r.text();
|
|
50
|
+
const i = s.firstElementChild;
|
|
51
|
+
if (((n = i == null ? void 0 : i.tagName) == null ? void 0 : n.toLowerCase()) !== "svg")
|
|
52
|
+
return o;
|
|
53
|
+
d || (d = new DOMParser());
|
|
54
|
+
const u = d.parseFromString(i.outerHTML, "text/html").body.querySelector("svg");
|
|
55
|
+
return u ? (u.part.add("svg"), document.adoptNode(u)) : o;
|
|
56
|
+
} catch {
|
|
57
|
+
return o;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
super.connectedCallback(), w(this);
|
|
62
|
+
}
|
|
63
|
+
firstUpdated() {
|
|
64
|
+
this.initialRender = !0, this.setIcon();
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
super.disconnectedCallback(), L(this);
|
|
68
|
+
}
|
|
69
|
+
getIconSource() {
|
|
70
|
+
const t = m(this.library);
|
|
71
|
+
return this.name && t ? {
|
|
72
|
+
url: t.resolver(this.name),
|
|
73
|
+
fromLibrary: !0
|
|
74
|
+
} : {
|
|
75
|
+
url: this.src,
|
|
76
|
+
fromLibrary: !1
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
handleLabelChange() {
|
|
80
|
+
typeof this.label == "string" && this.label.length > 0 ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.label), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
|
|
81
|
+
}
|
|
82
|
+
async setIcon() {
|
|
83
|
+
var t;
|
|
84
|
+
const { url: e, fromLibrary: n } = this.getIconSource(), r = n ? m(this.library) : void 0;
|
|
85
|
+
if (!e) {
|
|
86
|
+
this.svg = null;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
let s = v.get(e);
|
|
90
|
+
if (s || (s = this.resolveIcon(e, r), v.set(e, s)), !this.initialRender)
|
|
91
|
+
return;
|
|
92
|
+
const i = await s;
|
|
93
|
+
if (i === c && v.delete(e), e === this.getIconSource().url) {
|
|
94
|
+
if (I(i)) {
|
|
95
|
+
this.svg = i;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
switch (i) {
|
|
99
|
+
case c:
|
|
100
|
+
case o:
|
|
101
|
+
this.svg = null, this.emit("sl-error");
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
this.svg = i.cloneNode(!0), (t = r == null ? void 0 : r.mutator) == null || t.call(r, this.svg), this.emit("sl-load");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
return this.svg;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
a.styles = C;
|
|
113
|
+
l([
|
|
114
|
+
_()
|
|
115
|
+
], a.prototype, "svg", 2);
|
|
116
|
+
l([
|
|
117
|
+
h({ reflect: !0 })
|
|
118
|
+
], a.prototype, "name", 2);
|
|
119
|
+
l([
|
|
120
|
+
h()
|
|
121
|
+
], a.prototype, "src", 2);
|
|
122
|
+
l([
|
|
123
|
+
h()
|
|
124
|
+
], a.prototype, "label", 2);
|
|
125
|
+
l([
|
|
126
|
+
h({ reflect: !0 })
|
|
127
|
+
], a.prototype, "library", 2);
|
|
128
|
+
l([
|
|
129
|
+
b("label")
|
|
130
|
+
], a.prototype, "handleLabelChange", 1);
|
|
131
|
+
l([
|
|
132
|
+
b(["name", "src", "library"])
|
|
133
|
+
], a.prototype, "setIcon", 1);
|
|
134
|
+
export {
|
|
135
|
+
a as S,
|
|
136
|
+
H as f,
|
|
137
|
+
M as m
|
|
138
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
var s = "";
|
|
2
|
+
function c(e) {
|
|
3
|
+
s = e;
|
|
4
|
+
}
|
|
5
|
+
function g(e = "") {
|
|
6
|
+
if (!s) {
|
|
7
|
+
const t = [...document.getElementsByTagName("script")], l = t.find((r) => r.hasAttribute("data-shoelace"));
|
|
8
|
+
if (l)
|
|
9
|
+
c(l.getAttribute("data-shoelace"));
|
|
10
|
+
else {
|
|
11
|
+
const r = t.find((n) => /shoelace(\.min)?\.js($|\?)/.test(n.src) || /shoelace-autoloader(\.min)?\.js($|\?)/.test(n.src));
|
|
12
|
+
let o = "";
|
|
13
|
+
r && (o = r.getAttribute("src")), c(o.split("/").slice(0, -1).join("/"));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return s.replace(/\/$/, "") + (e ? `/${e.replace(/^\//, "")}` : "");
|
|
17
|
+
}
|
|
18
|
+
var v = {
|
|
19
|
+
name: "default",
|
|
20
|
+
resolver: (e) => g(`assets/icons/${e}.svg`)
|
|
21
|
+
}, w = v, h = {
|
|
22
|
+
caret: `
|
|
23
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
24
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
25
|
+
</svg>
|
|
26
|
+
`,
|
|
27
|
+
check: `
|
|
28
|
+
<svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
29
|
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
30
|
+
<g stroke="currentColor">
|
|
31
|
+
<g transform="translate(3.428571, 3.428571)">
|
|
32
|
+
<path d="M0,5.71428571 L3.42857143,9.14285714"></path>
|
|
33
|
+
<path d="M9.14285714,0 L3.42857143,9.14285714"></path>
|
|
34
|
+
</g>
|
|
35
|
+
</g>
|
|
36
|
+
</g>
|
|
37
|
+
</svg>
|
|
38
|
+
`,
|
|
39
|
+
"chevron-down": `
|
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
|
|
41
|
+
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
|
|
42
|
+
</svg>
|
|
43
|
+
`,
|
|
44
|
+
"chevron-left": `
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
|
|
46
|
+
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
|
|
47
|
+
</svg>
|
|
48
|
+
`,
|
|
49
|
+
"chevron-right": `
|
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
|
|
51
|
+
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
|
|
52
|
+
</svg>
|
|
53
|
+
`,
|
|
54
|
+
copy: `
|
|
55
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-files" viewBox="0 0 16 16" part="svg">
|
|
56
|
+
<path d="M13 0H6a2 2 0 0 0-2 2 2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 13V4a2 2 0 0 0-2-2H5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zM3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4z"></path>
|
|
57
|
+
</svg>
|
|
58
|
+
`,
|
|
59
|
+
eye: `
|
|
60
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
|
|
61
|
+
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
|
62
|
+
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
|
63
|
+
</svg>
|
|
64
|
+
`,
|
|
65
|
+
"eye-slash": `
|
|
66
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">
|
|
67
|
+
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
|
|
68
|
+
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
69
|
+
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
|
|
70
|
+
</svg>
|
|
71
|
+
`,
|
|
72
|
+
eyedropper: `
|
|
73
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">
|
|
74
|
+
<path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>
|
|
75
|
+
</svg>
|
|
76
|
+
`,
|
|
77
|
+
"grip-vertical": `
|
|
78
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
|
|
79
|
+
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>
|
|
80
|
+
</svg>
|
|
81
|
+
`,
|
|
82
|
+
indeterminate: `
|
|
83
|
+
<svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
84
|
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
85
|
+
<g stroke="currentColor" stroke-width="2">
|
|
86
|
+
<g transform="translate(2.285714, 6.857143)">
|
|
87
|
+
<path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
|
|
88
|
+
</g>
|
|
89
|
+
</g>
|
|
90
|
+
</g>
|
|
91
|
+
</svg>
|
|
92
|
+
`,
|
|
93
|
+
"person-fill": `
|
|
94
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
|
|
95
|
+
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
|
96
|
+
</svg>
|
|
97
|
+
`,
|
|
98
|
+
"play-fill": `
|
|
99
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
|
|
100
|
+
<path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>
|
|
101
|
+
</svg>
|
|
102
|
+
`,
|
|
103
|
+
"pause-fill": `
|
|
104
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">
|
|
105
|
+
<path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>
|
|
106
|
+
</svg>
|
|
107
|
+
`,
|
|
108
|
+
radio: `
|
|
109
|
+
<svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">
|
|
110
|
+
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
111
|
+
<g fill="currentColor">
|
|
112
|
+
<circle cx="8" cy="8" r="3.42857143"></circle>
|
|
113
|
+
</g>
|
|
114
|
+
</g>
|
|
115
|
+
</svg>
|
|
116
|
+
`,
|
|
117
|
+
"star-fill": `
|
|
118
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
|
|
119
|
+
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
|
|
120
|
+
</svg>
|
|
121
|
+
`,
|
|
122
|
+
"x-lg": `
|
|
123
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
|
|
124
|
+
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
|
|
125
|
+
</svg>
|
|
126
|
+
`,
|
|
127
|
+
"x-circle-fill": `
|
|
128
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
|
|
129
|
+
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
|
|
130
|
+
</svg>
|
|
131
|
+
`
|
|
132
|
+
}, d = {
|
|
133
|
+
name: "system",
|
|
134
|
+
resolver: (e) => e in h ? `data:image/svg+xml,${encodeURIComponent(h[e])}` : ""
|
|
135
|
+
}, p = d, a = [w, p], i = [];
|
|
136
|
+
function u(e) {
|
|
137
|
+
i.push(e);
|
|
138
|
+
}
|
|
139
|
+
function m(e) {
|
|
140
|
+
i = i.filter((t) => t !== e);
|
|
141
|
+
}
|
|
142
|
+
function b(e) {
|
|
143
|
+
return a.find((t) => t.name === e);
|
|
144
|
+
}
|
|
145
|
+
function x(e, t) {
|
|
146
|
+
f(e), a.push({
|
|
147
|
+
name: e,
|
|
148
|
+
resolver: t.resolver,
|
|
149
|
+
mutator: t.mutator,
|
|
150
|
+
spriteSheet: t.spriteSheet
|
|
151
|
+
}), i.forEach((l) => {
|
|
152
|
+
l.library === e && l.setIcon();
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function f(e) {
|
|
156
|
+
a = a.filter((t) => t.name !== e);
|
|
157
|
+
}
|
|
158
|
+
export {
|
|
159
|
+
b as g,
|
|
160
|
+
x as r,
|
|
161
|
+
m as u,
|
|
162
|
+
u as w
|
|
163
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { c as a, b as i, S as l } from "./chunk.JS655M6J.js";
|
|
2
|
+
import { i as c } from "./lit-element.js";
|
|
3
|
+
import { S as u } from "./chunk.2HU27ZWH.js";
|
|
4
|
+
import { a as d } from "./class-map.js";
|
|
5
|
+
import { s as n, n as b } from "./static.js";
|
|
6
|
+
import { o as e } from "./if-defined.js";
|
|
7
|
+
import { n as s } from "./property.js";
|
|
8
|
+
import { r as p } from "./state.js";
|
|
9
|
+
import { e as h } from "./query.js";
|
|
10
|
+
var f = c`
|
|
11
|
+
${a}
|
|
12
|
+
|
|
13
|
+
:host {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
color: var(--sl-color-neutral-600);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon-button {
|
|
19
|
+
flex: 0 0 auto;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
background: none;
|
|
23
|
+
border: none;
|
|
24
|
+
border-radius: var(--sl-border-radius-medium);
|
|
25
|
+
font-size: inherit;
|
|
26
|
+
color: inherit;
|
|
27
|
+
padding: var(--sl-spacing-x-small);
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: var(--sl-transition-x-fast) color;
|
|
30
|
+
-webkit-appearance: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.icon-button:hover:not(.icon-button--disabled),
|
|
34
|
+
.icon-button:focus-visible:not(.icon-button--disabled) {
|
|
35
|
+
color: var(--sl-color-primary-600);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.icon-button:active:not(.icon-button--disabled) {
|
|
39
|
+
color: var(--sl-color-primary-700);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.icon-button:focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.icon-button--disabled {
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.icon-button:focus-visible {
|
|
52
|
+
outline: var(--sl-focus-ring);
|
|
53
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.icon-button__icon {
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
}
|
|
59
|
+
`, t = class extends l {
|
|
60
|
+
constructor() {
|
|
61
|
+
super(...arguments), this.hasFocus = !1, this.label = "", this.disabled = !1;
|
|
62
|
+
}
|
|
63
|
+
handleBlur() {
|
|
64
|
+
this.hasFocus = !1, this.emit("sl-blur");
|
|
65
|
+
}
|
|
66
|
+
handleFocus() {
|
|
67
|
+
this.hasFocus = !0, this.emit("sl-focus");
|
|
68
|
+
}
|
|
69
|
+
handleClick(o) {
|
|
70
|
+
this.disabled && (o.preventDefault(), o.stopPropagation());
|
|
71
|
+
}
|
|
72
|
+
/** Simulates a click on the icon button. */
|
|
73
|
+
click() {
|
|
74
|
+
this.button.click();
|
|
75
|
+
}
|
|
76
|
+
/** Sets focus on the icon button. */
|
|
77
|
+
focus(o) {
|
|
78
|
+
this.button.focus(o);
|
|
79
|
+
}
|
|
80
|
+
/** Removes focus from the icon button. */
|
|
81
|
+
blur() {
|
|
82
|
+
this.button.blur();
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
const o = !!this.href, r = o ? n`a` : n`button`;
|
|
86
|
+
return b`
|
|
87
|
+
<${r}
|
|
88
|
+
part="base"
|
|
89
|
+
class=${d({
|
|
90
|
+
"icon-button": !0,
|
|
91
|
+
"icon-button--disabled": !o && this.disabled,
|
|
92
|
+
"icon-button--focused": this.hasFocus
|
|
93
|
+
})}
|
|
94
|
+
?disabled=${e(o ? void 0 : this.disabled)}
|
|
95
|
+
type=${e(o ? void 0 : "button")}
|
|
96
|
+
href=${e(o ? this.href : void 0)}
|
|
97
|
+
target=${e(o ? this.target : void 0)}
|
|
98
|
+
download=${e(o ? this.download : void 0)}
|
|
99
|
+
rel=${e(o && this.target ? "noreferrer noopener" : void 0)}
|
|
100
|
+
role=${e(o ? void 0 : "button")}
|
|
101
|
+
aria-disabled=${this.disabled ? "true" : "false"}
|
|
102
|
+
aria-label="${this.label}"
|
|
103
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
104
|
+
@blur=${this.handleBlur}
|
|
105
|
+
@focus=${this.handleFocus}
|
|
106
|
+
@click=${this.handleClick}
|
|
107
|
+
>
|
|
108
|
+
<sl-icon
|
|
109
|
+
class="icon-button__icon"
|
|
110
|
+
name=${e(this.name)}
|
|
111
|
+
library=${e(this.library)}
|
|
112
|
+
src=${e(this.src)}
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
></sl-icon>
|
|
115
|
+
</${r}>
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
t.styles = f;
|
|
120
|
+
t.dependencies = { "sl-icon": u };
|
|
121
|
+
i([
|
|
122
|
+
h(".icon-button")
|
|
123
|
+
], t.prototype, "button", 2);
|
|
124
|
+
i([
|
|
125
|
+
p()
|
|
126
|
+
], t.prototype, "hasFocus", 2);
|
|
127
|
+
i([
|
|
128
|
+
s()
|
|
129
|
+
], t.prototype, "name", 2);
|
|
130
|
+
i([
|
|
131
|
+
s()
|
|
132
|
+
], t.prototype, "library", 2);
|
|
133
|
+
i([
|
|
134
|
+
s()
|
|
135
|
+
], t.prototype, "src", 2);
|
|
136
|
+
i([
|
|
137
|
+
s()
|
|
138
|
+
], t.prototype, "href", 2);
|
|
139
|
+
i([
|
|
140
|
+
s()
|
|
141
|
+
], t.prototype, "target", 2);
|
|
142
|
+
i([
|
|
143
|
+
s()
|
|
144
|
+
], t.prototype, "download", 2);
|
|
145
|
+
i([
|
|
146
|
+
s()
|
|
147
|
+
], t.prototype, "label", 2);
|
|
148
|
+
i([
|
|
149
|
+
s({ type: Boolean, reflect: !0 })
|
|
150
|
+
], t.prototype, "disabled", 2);
|
|
151
|
+
export {
|
|
152
|
+
t as S
|
|
153
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { u as c } from "./lit-element.js";
|
|
2
|
+
var C = (r = "value") => (l, s) => {
|
|
3
|
+
const e = l.constructor, b = e.prototype.attributeChangedCallback;
|
|
4
|
+
e.prototype.attributeChangedCallback = function(i, f, n) {
|
|
5
|
+
var a;
|
|
6
|
+
const t = e.getPropertyOptions(r), p = typeof t.attribute == "string" ? t.attribute : r;
|
|
7
|
+
if (i === p) {
|
|
8
|
+
const o = t.converter || c, u = (typeof o == "function" ? o : (a = o == null ? void 0 : o.fromAttribute) != null ? a : c.fromAttribute)(n, t.type);
|
|
9
|
+
this[r] !== u && (this[s] = u);
|
|
10
|
+
}
|
|
11
|
+
b.call(this, i, f, n);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
C as d
|
|
16
|
+
};
|