nve-designsystem 3.1.0 → 3.3.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/chunks/chunk.2PCBEMQZ.js +163 -226
- package/chunks/chunk.36O46B5H.js +15 -15
- package/chunks/chunk.4TUIT776.js +78 -96
- package/chunks/chunk.5JY5FUCG.js +965 -1245
- package/chunks/chunk.5P45LHIX.js +668 -96
- package/chunks/chunk.6CTB5ZDJ.js +107 -100
- package/chunks/chunk.B4BZKR24.js +29 -39
- package/chunks/chunk.D5YQDJ7X.js +122 -166
- package/chunks/chunk.EA437WHD.js +5 -5
- package/chunks/chunk.GI7VDIWX.js +14 -15
- package/chunks/chunk.GMYPQTFK.js +18 -20
- package/chunks/chunk.HVTXQL7M.js +191 -215
- package/chunks/chunk.IKV4VH3T.js +18 -16
- package/chunks/chunk.IVVHNXMC.js +26 -27
- package/chunks/chunk.JHOXTQXA.js +65 -74
- package/chunks/chunk.JXOKFADN.js +63 -90
- package/chunks/chunk.K7JGTRV7.js +24 -23
- package/chunks/chunk.KPLQLAWP.js +132 -147
- package/chunks/chunk.LD4M4QGE.js +61 -74
- package/chunks/chunk.MSKEYBDI.js +53 -71
- package/chunks/chunk.NYIIDP5N.js +39 -45
- package/chunks/chunk.RWUUFNUL.js +91 -114
- package/chunks/chunk.SAPQLUO4.js +249 -228
- package/chunks/chunk.SI4ACBFK.js +139 -5
- package/chunks/chunk.TP2GB2HO.js +361 -460
- package/chunks/chunk.UDWRA64J.js +185 -223
- package/chunks/chunk.URTPIBTY.js +119 -151
- package/chunks/chunk.VESXC477.js +63 -66
- package/chunks/chunk.XA43ZQPC.js +198 -313
- package/chunks/chunk.XQ2OKYYA.js +25 -26
- package/chunks/chunk.XZNBUGX7.js +6 -6
- package/chunks/chunk.YHLNUJ7P.js +93 -116
- package/chunks/chunk.ZH2AND3P.js +340 -399
- package/chunks/chunk.ZL53POKZ.js +61 -156
- package/chunks/chunk.js +20 -0
- package/chunks/class-map.js +49 -45
- package/chunks/decorate.js +105 -0
- package/chunks/directive-helpers.js +5 -7
- package/chunks/if-defined.js +5 -5
- package/chunks/lit.js +525 -0
- package/chunks/live.js +24 -24
- package/chunks/nve-alert.component.js +163 -0
- package/chunks/nve-carousel-item.component.js +36 -0
- package/chunks/nve-carousel.component.js +41 -0
- package/chunks/nve-checkbox-group.component.js +114 -0
- package/chunks/nve-checkbox.component.js +28 -0
- package/chunks/nve-dialog.component.js +39 -0
- package/chunks/nve-divider.component.js +23 -0
- package/chunks/nve-drawer.component.js +40 -0
- package/chunks/nve-dropdown.component.js +83 -0
- package/chunks/nve-input.component.js +80 -0
- package/chunks/nve-label.component.js +89 -0
- package/chunks/nve-menu-item.component.js +35 -0
- package/chunks/nve-menu.component.js +17 -0
- package/chunks/nve-option.component.js +27 -0
- package/chunks/nve-popup.component.js +15 -0
- package/chunks/nve-radio-button.component.js +20 -0
- package/chunks/nve-radio-group.component.js +78 -0
- package/chunks/nve-radio.component.js +18 -0
- package/chunks/nve-select.component.js +58 -0
- package/chunks/nve-skeleton.component.js +20 -0
- package/chunks/nve-spinner.component.js +23 -0
- package/chunks/nve-tooltip.component.js +20 -0
- package/chunks/nve-warning-level.component.js +57 -0
- package/chunks/ref.js +75 -84
- package/chunks/shoelace.js +10006 -0
- package/chunks/static-html.js +27 -0
- package/chunks/unsafe-html.js +24 -20
- package/chunks/updateInvalidProperty.js +7 -7
- package/chunks/watch.js +20 -20
- package/components/nve-accordion/nve-accordion.component.js +24 -30
- package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
- package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
- package/components/nve-alert/nve-alert.component.js +2 -227
- package/components/nve-alert/nve-alert.styles.js +45 -27
- package/components/nve-badge/nve-badge.component.js +41 -45
- package/components/nve-badge/nve-badge.styles.js +33 -31
- package/components/nve-button/nve-button.component.d.ts +110 -10
- package/components/nve-button/nve-button.component.js +146 -39
- package/components/nve-button/nve-button.styles.js +214 -157
- package/components/nve-carousel/nve-carousel.component.js +2 -47
- package/components/nve-carousel/nve-carousel.styles.js +6 -6
- package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
- package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
- package/components/nve-checkbox/nve-checkbox.component.js +2 -34
- package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
- package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
- package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
- package/components/nve-combobox/nve-combobox.component.js +222 -440
- package/components/nve-combobox/nve-combobox.styles.js +6 -6
- package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
- package/components/nve-dialog/nve-dialog-styles.js +6 -6
- package/components/nve-dialog/nve-dialog.component.js +2 -54
- package/components/nve-divider/nve-divider.component.js +2 -30
- package/components/nve-drawer/nve-drawer.component.js +2 -44
- package/components/nve-drawer/nve-drawer.styles.js +6 -6
- package/components/nve-dropdown/nve-dropdown.component.js +2 -79
- package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
- package/components/nve-heading/nve-heading.component.d.ts +29 -0
- package/components/nve-heading/nve-heading.component.js +45 -0
- package/components/nve-heading/nve-heading.styles.d.ts +2 -0
- package/components/nve-heading/nve-heading.styles.js +41 -0
- package/components/nve-icon/nve-icon.component.js +145 -164
- package/components/nve-icon/nve-icon.styles.js +11 -6
- package/components/nve-icon/offline-icons.js +16 -13
- package/components/nve-input/nve-input.component.js +2 -100
- package/components/nve-input/nve-input.styles.js +5 -5
- package/components/nve-label/nve-label.component.js +2 -115
- package/components/nve-label/nve-label.styles.js +5 -5
- package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
- package/components/nve-link-card/nve-link-card.component.js +44 -80
- package/components/nve-link-card/nve-link-card.styles.js +71 -66
- package/components/nve-menu/nve-menu.component.js +2 -22
- package/components/nve-menu/nve-menu.styles.js +5 -5
- package/components/nve-menu-item/nve-menu-item.component.js +2 -43
- package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
- package/components/nve-message-card/nve-message-card.component.js +61 -91
- package/components/nve-message-card/nve-message-card.styles.js +24 -27
- package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
- package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
- package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
- package/components/nve-option/nve-option.component.js +2 -41
- package/components/nve-option/nve-option.styles.js +5 -5
- package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
- package/components/nve-paragraph/nve-paragraph.component.js +26 -0
- package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
- package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
- package/components/nve-popup/nve-popup.component.js +2 -22
- package/components/nve-radio/nve-radio.component.js +2 -23
- package/components/nve-radio/nve-radio.styles.js +5 -5
- package/components/nve-radio-button/nve-radio-button.component.js +2 -25
- package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
- package/components/nve-radio-group/nve-radio-group.component.js +2 -119
- package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
- package/components/nve-relative-time/nve-relative-time.component.js +21 -56
- package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
- package/components/nve-select/nve-select.component.js +2 -80
- package/components/nve-select/nve-select.styles.js +6 -6
- package/components/nve-skeleton/nve-skeleton.component.js +2 -27
- package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
- package/components/nve-spinner/nve-spinner.component.js +2 -31
- package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
- package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
- package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
- package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
- package/components/nve-stepper/nve-stepper.component.js +94 -139
- package/components/nve-stepper/nve-stepper.styles.js +5 -5
- package/components/nve-switch/nve-switch.component.js +75 -107
- package/components/nve-switch/nve-switch.styles.js +7 -7
- package/components/nve-tab/nve-tab.component.js +30 -42
- package/components/nve-tab/nve-tab.styles.js +7 -7
- package/components/nve-tab-group/nve-tab-group.component.js +180 -260
- package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
- package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
- package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
- package/components/nve-tag/nve-tag.component.d.ts +3 -3
- package/components/nve-tag/nve-tag.component.js +71 -72
- package/components/nve-tag/nve-tag.styles.js +23 -22
- package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
- package/components/nve-textarea/nve-textarea.component.js +112 -173
- package/components/nve-textarea/nve-textarea.styles.js +10 -5
- package/components/nve-tooltip/nve-tooltip.component.js +2 -30
- package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
- package/components/nve-warning-level/nve-warning-level.component.js +2 -78
- package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
- package/css/global.css +13 -55
- package/css/nve.css +1048 -393
- package/css/nve_dark.css +406 -305
- package/css/rme.css +1050 -395
- package/css/rme_dark.css +408 -307
- package/css/shoelace-styles.css +539 -0
- package/css/varsom.css +1046 -391
- package/css/varsom_dark.css +404 -303
- package/custom-elements.json +2905 -12389
- package/fonts/LICENSE.txt +37 -0
- package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
- package/interfaces/NveComponent.interface.js +0 -1
- package/nve-designsystem.d.ts +5 -0
- package/nve-designsystem.js +46 -86
- package/package.json +26 -8
- package/registerIcons/systemLibraryCustomization.js +23 -91
- package/vite-env.d.js +0 -1
- package/chunks/chunk.3RPBFEDE.js +0 -162
- package/chunks/chunk.JCXLDPQF.js +0 -225
- package/chunks/chunk.JQBT7BOV.js +0 -8446
- package/chunks/chunk.MAQXLKQ7.js +0 -598
- package/chunks/lit-element.js +0 -508
- package/chunks/property.js +0 -37
- package/chunks/query.js +0 -13
- package/chunks/state.js +0 -7
- package/chunks/static.js +0 -26
- package/nve-designsystem.css +0 -1
- package/vscode.css-custom-data.json +0 -621
- package/vscode.html-custom-data.json +0 -2354
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { a as e, t } from "./lit.js";
|
|
2
|
+
import { o as n, s as r, t as i } from "./decorate.js";
|
|
3
|
+
import { t as a } from "./if-defined.js";
|
|
4
|
+
import "../components/nve-icon/nve-icon.component.js";
|
|
5
|
+
import { styles as o } from "../components/nve-label/nve-label.styles.js";
|
|
6
|
+
import "./nve-tooltip.component.js";
|
|
7
|
+
//#region src/utils/slot.ts
|
|
8
|
+
var s = class {
|
|
9
|
+
constructor(e, ...t) {
|
|
10
|
+
this.slotNames = [], this.handleSlotChange = (e) => {
|
|
11
|
+
let t = e.target;
|
|
12
|
+
(this.slotNames.includes("[default]") && !t.name || t.name && this.slotNames.includes(t.name)) && this.host.requestUpdate();
|
|
13
|
+
}, (this.host = e).addController(this), this.slotNames = t;
|
|
14
|
+
}
|
|
15
|
+
hasDefaultSlot() {
|
|
16
|
+
return [...this.host.childNodes].some((e) => {
|
|
17
|
+
if (e.nodeType === e.TEXT_NODE && e.textContent.trim() !== "") return !0;
|
|
18
|
+
if (e.nodeType === e.ELEMENT_NODE) {
|
|
19
|
+
let t = e;
|
|
20
|
+
if (t.tagName.toLowerCase() === "sl-visually-hidden") return !1;
|
|
21
|
+
if (!t.hasAttribute("slot")) return !0;
|
|
22
|
+
}
|
|
23
|
+
return !1;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
hasNamedSlot(e) {
|
|
27
|
+
return this.get(e) !== null;
|
|
28
|
+
}
|
|
29
|
+
get(e) {
|
|
30
|
+
return this.host.querySelector(`:scope > [slot="${e}"]`);
|
|
31
|
+
}
|
|
32
|
+
test(e) {
|
|
33
|
+
return e === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(e);
|
|
34
|
+
}
|
|
35
|
+
hostConnected() {
|
|
36
|
+
this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
|
|
37
|
+
}
|
|
38
|
+
hostDisconnected() {
|
|
39
|
+
this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
|
|
40
|
+
}
|
|
41
|
+
}, c = class extends t {
|
|
42
|
+
constructor(...e) {
|
|
43
|
+
super(...e), this.hasSlotController = new s(this, "tooltip"), this.value = "", this.size = "small", this.light = !1, this.tooltip = void 0, this.iconLeft = !1, this.iconColor = "default", this.for = void 0;
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.styles = [o];
|
|
47
|
+
}
|
|
48
|
+
renderInfoIconWithTooltip() {
|
|
49
|
+
let t = this.tooltip;
|
|
50
|
+
return t?.length || (t = this.hasSlotController.get("tooltip")), t ? e`<nve-tooltip placement="top">
|
|
51
|
+
<div slot="content">${t}</div>
|
|
52
|
+
<nve-icon class="nve-info-icon" name="Info"></nve-icon>
|
|
53
|
+
</nve-tooltip>` : e``;
|
|
54
|
+
}
|
|
55
|
+
renderValueProperty() {
|
|
56
|
+
return this.value.length ? e` <label
|
|
57
|
+
part="form-control-label"
|
|
58
|
+
class="form-control__label"
|
|
59
|
+
aria-hidden="false"
|
|
60
|
+
for=${a(this.for)}
|
|
61
|
+
>
|
|
62
|
+
<slot name="label">${this.value}</slot>
|
|
63
|
+
</label>` : e` <label
|
|
64
|
+
part="form-control-label"
|
|
65
|
+
class="form-control__label"
|
|
66
|
+
aria-hidden="false"
|
|
67
|
+
for=${a(this.for)}
|
|
68
|
+
>
|
|
69
|
+
<slot></slot>
|
|
70
|
+
</label>`;
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
return e`
|
|
74
|
+
${this.iconLeft ? this.renderInfoIconWithTooltip() : null} ${this.renderValueProperty()}
|
|
75
|
+
<slot name="suffix"></slot>
|
|
76
|
+
${this.iconLeft ? null : this.renderInfoIconWithTooltip()}
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
i([n({ reflect: !0 })], c.prototype, "value", void 0), i([n({ reflect: !0 })], c.prototype, "size", void 0), i([n({
|
|
81
|
+
type: Boolean,
|
|
82
|
+
reflect: !0
|
|
83
|
+
})], c.prototype, "light", void 0), i([n({ reflect: !0 })], c.prototype, "tooltip", void 0), i([n({
|
|
84
|
+
type: Boolean,
|
|
85
|
+
reflect: !0
|
|
86
|
+
})], c.prototype, "iconLeft", void 0), i([n({ reflect: !0 })], c.prototype, "iconColor", void 0), i([n({ reflect: !0 })], c.prototype, "for", void 0), c = i([r("nve-label")], c);
|
|
87
|
+
var l = c;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { l as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { o as e, s as t, t as n } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.YHLNUJ7P.js";
|
|
4
|
+
import "./chunk.36O46B5H.js";
|
|
5
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
6
|
+
import "./chunk.5JY5FUCG.js";
|
|
7
|
+
import { t as r } from "./chunk.HVTXQL7M.js";
|
|
8
|
+
import i from "../components/nve-menu-item/nve-menu-item.styles.js";
|
|
9
|
+
//#region src/components/nve-menu-item/nve-menu-item.component.ts
|
|
10
|
+
var a = class extends r {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.subtext = "", this.indent = !1, this.handleMouseOver = (e) => {
|
|
13
|
+
this.focus(), e.stopPropagation();
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
super.connectedCallback(), this.removeEventListener("mouseover", this.handleMouseOver);
|
|
18
|
+
}
|
|
19
|
+
updated(e) {
|
|
20
|
+
super.updated(e), e.has("subtext") && this.style.setProperty("--nve-menu-item-subtext", `"${this.subtext}"`);
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.styles = [r.styles, i];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
n([e({
|
|
27
|
+
type: String,
|
|
28
|
+
reflect: !0
|
|
29
|
+
})], a.prototype, "subtext", void 0), n([e({
|
|
30
|
+
type: Boolean,
|
|
31
|
+
reflect: !0
|
|
32
|
+
})], a.prototype, "indent", void 0), a = n([t("nve-menu-item")], a);
|
|
33
|
+
var o = a;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { o as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { s as e, t } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import { t as n } from "./chunk.JHOXTQXA.js";
|
|
4
|
+
import r from "../components/nve-menu/nve-menu.styles.js";
|
|
5
|
+
//#region src/components/nve-menu/nve-menu.component.ts
|
|
6
|
+
var i = class extends n {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = [n.styles, r];
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
i = t([e("nve-menu")], i);
|
|
15
|
+
var a = i;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as t };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { o as e, s as t, t as n } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.YHLNUJ7P.js";
|
|
4
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
5
|
+
import { t as r } from "./chunk.JXOKFADN.js";
|
|
6
|
+
import i from "../components/nve-option/nve-option.styles.js";
|
|
7
|
+
//#region src/components/nve-option/nve-option.component.ts
|
|
8
|
+
var a = class extends r {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(), this.textLabel = void 0;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [r.styles, i];
|
|
14
|
+
}
|
|
15
|
+
firstUpdated(e) {
|
|
16
|
+
super.firstUpdated(e);
|
|
17
|
+
let t = this.closest("nve-select");
|
|
18
|
+
t && (t.hasAttribute("filled") ? this.toggleAttribute("filled", !0) : this.toggleAttribute("filled", !1), t.hasAttribute("hide-checkmark") ? this.toggleAttribute("hide-checkmark", !0) : this.toggleAttribute("hide-checkmark", !1));
|
|
19
|
+
}
|
|
20
|
+
getTextLabel() {
|
|
21
|
+
return this.textLabel ? this.textLabel : super.getTextLabel();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
n([e()], a.prototype, "textLabel", void 0), a = n([t("nve-option")], a);
|
|
25
|
+
var o = a;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { s as e, t } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
4
|
+
import "./chunk.5JY5FUCG.js";
|
|
5
|
+
import { t as n } from "./chunk.XZNBUGX7.js";
|
|
6
|
+
//#region src/components/nve-popup/nve-popup.component.ts
|
|
7
|
+
var r = class extends n {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
r = t([e("nve-popup")], r);
|
|
13
|
+
var i = r;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { i as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { o as e, s as t, t as n } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import { t as r } from "./chunk.5P45LHIX.js";
|
|
4
|
+
import i from "../components/nve-radio-button/nve-radio-button.styles.js";
|
|
5
|
+
//#region src/components/nve-radio-button/nve-radio-button.component.ts
|
|
6
|
+
var a = class extends r {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.testId = "";
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.styles = [r.styles, i];
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
n([e({
|
|
15
|
+
reflect: !0,
|
|
16
|
+
type: String
|
|
17
|
+
})], a.prototype, "testId", void 0), a = n([t("nve-radio-button")], a);
|
|
18
|
+
var o = a;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as t };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { a as e, o as t, s as n, t as r } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.SI4ACBFK.js";
|
|
4
|
+
import { t as i } from "./chunk.2PCBEMQZ.js";
|
|
5
|
+
import { t as a } from "./updateInvalidProperty.js";
|
|
6
|
+
import o from "../components/nve-radio-group/nve-radio-group.styles.js";
|
|
7
|
+
import { t as s } from "./watch.js";
|
|
8
|
+
//#region src/components/nve-radio-group/nve-radio-group.component.ts
|
|
9
|
+
var c = class extends i {
|
|
10
|
+
static {
|
|
11
|
+
this.styles = [i.styles, o];
|
|
12
|
+
}
|
|
13
|
+
constructor() {
|
|
14
|
+
super(), this.orientation = "vertical", this.disabled = !1, this.requiredLabel = "*Obligatorisk", this.testId = "", this.alreadyInvalid = !1, this.errorMessageCopy = "", this.preventInteraction = (e) => {
|
|
15
|
+
this.disabled && (e.stopImmediatePropagation(), e.preventDefault());
|
|
16
|
+
}, this.getAllRadios = function() {
|
|
17
|
+
return [...this.querySelectorAll("sl-radio, sl-radio-button, nve-radio, nve-radio-button")];
|
|
18
|
+
}, this.handleRadioClick = function(e) {
|
|
19
|
+
let t = e.target.closest("sl-radio, sl-radio-button, nve-radio, nve-radio-button"), n = this.getAllRadios(), r = this.value;
|
|
20
|
+
if (!t || t.disabled) return;
|
|
21
|
+
let i = t.shadowRoot.querySelectorAll("span[part='base']");
|
|
22
|
+
i.length > 0 && i[0].focus(), this.value = t.value, n.forEach((e) => e.checked = e === t), this.value !== r && (this.emit("sl-change"), this.emit("sl-input"));
|
|
23
|
+
}, this.syncRadioElements = async () => {
|
|
24
|
+
let e = this.getAllRadios();
|
|
25
|
+
if (await Promise.all(e.map(async (e) => {
|
|
26
|
+
await e.updateComplete, e.checked = e.value === this.value, e.size = this.size;
|
|
27
|
+
})), this.hasButtonGroup = e.some((e) => e.tagName.toLowerCase() === "sl-radio-button" || e.tagName.toLowerCase() === "nve-radio-button"), !e.some((e) => e.checked)) if (this.hasButtonGroup) {
|
|
28
|
+
let t = e[0].shadowRoot?.querySelector("button");
|
|
29
|
+
t && (t.tabIndex = 0);
|
|
30
|
+
} else e[0].tabIndex = 0;
|
|
31
|
+
if (this.hasButtonGroup) {
|
|
32
|
+
let e = this.shadowRoot?.querySelector("sl-button-group") || this.shadowRoot?.querySelector("nve-button-group");
|
|
33
|
+
e && (e.disableRole = !0);
|
|
34
|
+
}
|
|
35
|
+
}, this.syncRadios = function() {
|
|
36
|
+
if (customElements.get("sl-radio") && customElements.get("sl-radio-button") || customElements.get("nve-radio") && customElements.get("nve-radio-button")) {
|
|
37
|
+
this.syncRadioElements();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
customElements.get("sl-radio") || customElements.get("nve-radio") ? this.syncRadioElements() : customElements.whenDefined("sl-radio").then(() => this.syncRadios()), customElements.get("sl-radio-button") || customElements.get("nve-radio-button") ? this.syncRadioElements() : (customElements.whenDefined("sl-radio-button").then(() => this.syncRadios()), customElements.whenDefined("nve-radio-button").then(() => this.syncRadios()));
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
super.connectedCallback(), this.errorMessageCopy = this.errorMessage || "", this.addEventListener("click", this.preventInteraction, !0), this.addEventListener("keydown", this.preventInteraction, !0), this.addEventListener("focus", this.preventInteraction, !0), this.addEventListener("mousedown", this.preventInteraction, !0), this.addEventListener("sl-invalid", (e) => {
|
|
45
|
+
e.preventDefault(), this.alreadyInvalid || this.makeInvalid();
|
|
46
|
+
}), this.addEventListener("sl-change", this.resetValidation.bind(this));
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
super.disconnectedCallback(), this.removeEventListener("click", this.preventInteraction, !0), this.removeEventListener("keydown", this.preventInteraction, !0), this.removeEventListener("focus", this.preventInteraction, !0), this.removeEventListener("mousedown", this.preventInteraction, !0), this.removeEventListener("sl-invalid", this.makeInvalid), this.removeEventListener("sl-change", this.resetValidation);
|
|
50
|
+
}
|
|
51
|
+
updated(e) {
|
|
52
|
+
super.updated(e), e.has("requiredLabel") && this.style.setProperty("--sl-input-required-content", `"${this.requiredLabel}"`), this.hasAttribute("data-user-invalid") && !this.alreadyInvalid && this.makeInvalid(), !this.hasAttribute("data-invalid") && !this.hasAttribute("data-user-invalid") && this.resetValidation();
|
|
53
|
+
}
|
|
54
|
+
handlePropChange(e, t) {
|
|
55
|
+
let n = this.getAllRadios();
|
|
56
|
+
t !== e && (n.forEach((t) => {
|
|
57
|
+
t.was_disabled === void 0 ? t.was_disabled = t.disabled : e === !0 ? (t.disabled = t.was_disabled, t.tabIndex = 0, t.removeAttribute("aria-disabled"), t.removeAttribute("data-disabled")) : (t.was_disabled = t.disabled, t.disabled = !0, t.tabIndex = -1, t.setAttribute("aria-disabled", "true"), t.setAttribute("data-disabled", "true"));
|
|
58
|
+
}), t ? (this.setAttribute("data-disabled", "true"), this.setAttribute("aria-disabled", "true"), this.tabIndex = -1, this.addEventListener("click", this.preventInteraction, !0), this.addEventListener("keydown", this.preventInteraction, !0), this.addEventListener("focus", this.preventInteraction, !0), this.addEventListener("mousedown", this.preventInteraction, !0)) : (this.removeAttribute("data-disabled"), this.removeAttribute("aria-disabled"), this.tabIndex = 0, this.removeEventListener("click", this.preventInteraction, !0), this.removeEventListener("keydown", this.preventInteraction, !0), this.removeEventListener("focus", this.preventInteraction, !0), this.removeEventListener("mousedown", this.preventInteraction, !0)));
|
|
59
|
+
}
|
|
60
|
+
makeInvalid() {
|
|
61
|
+
this.disabled || (a(this.getAllRadios(), !0, "data-invalid"), this.errorMessageCopy ||= this.validationMessage, this.setCustomValidity(this.errorMessageCopy), this.style.setProperty("--radio-group-error-message", `"${this.errorMessageCopy}"`));
|
|
62
|
+
}
|
|
63
|
+
resetValidation() {
|
|
64
|
+
if (this.disabled) return;
|
|
65
|
+
let e = this.getAllRadios();
|
|
66
|
+
this.errorMessageCopy = "", a(e, !1, "data-invalid"), this.setCustomValidity(""), this.style.removeProperty("--radio-group-error-message");
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
r([t({ reflect: !0 })], c.prototype, "orientation", void 0), r([t({
|
|
70
|
+
type: Boolean,
|
|
71
|
+
reflect: !0
|
|
72
|
+
})], c.prototype, "disabled", void 0), r([t({ reflect: !0 })], c.prototype, "errorMessage", void 0), r([t()], c.prototype, "requiredLabel", void 0), r([t({
|
|
73
|
+
reflect: !0,
|
|
74
|
+
type: String
|
|
75
|
+
})], c.prototype, "testId", void 0), r([e()], c.prototype, "alreadyInvalid", void 0), r([e()], c.prototype, "errorMessageCopy", void 0), r([s("disabled")], c.prototype, "handlePropChange", null), c = r([n("nve-radio-group")], c);
|
|
76
|
+
var l = c;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { l as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { s as e, t } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.YHLNUJ7P.js";
|
|
4
|
+
import { t as n } from "./chunk.MSKEYBDI.js";
|
|
5
|
+
import r from "../components/nve-radio/nve-radio.styles.js";
|
|
6
|
+
//#region src/components/nve-radio/nve-radio.component.ts
|
|
7
|
+
var i = class extends n {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.styles = [n.styles, r];
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
i = t([e("nve-radio")], i);
|
|
16
|
+
var a = i;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as t };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as e, o as t, s as n, t as r } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.SI4ACBFK.js";
|
|
4
|
+
import "./chunk.YHLNUJ7P.js";
|
|
5
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
6
|
+
import "./chunk.5JY5FUCG.js";
|
|
7
|
+
import { t as i } from "./chunk.TP2GB2HO.js";
|
|
8
|
+
import "./chunk.RWUUFNUL.js";
|
|
9
|
+
import a from "../components/nve-select/nve-select.styles.js";
|
|
10
|
+
//#region src/components/nve-select/nve-select.component.ts
|
|
11
|
+
var o = class extends i {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(), this.requiredLabel = "*Obligatorisk", this.hideCheckmark = !1, this.slInvalidEventListener = (e) => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
}, this.valueHasChanged = !1;
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.styles = [i.styles, a];
|
|
19
|
+
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback(), this.addEventListener("sl-invalid", this.slInvalidEventListener);
|
|
22
|
+
}
|
|
23
|
+
disconnectedCallback() {
|
|
24
|
+
super.disconnectedCallback(), this.removeEventListener("sl-invalid", this.slInvalidEventListener);
|
|
25
|
+
}
|
|
26
|
+
firstUpdated(e) {
|
|
27
|
+
super.firstUpdated(e), this.requiredLabel && this.style.setProperty("--sl-input-required-content", `"${this.requiredLabel}"`), (this.shadowRoot?.querySelector("sl-popup"))?.setAttribute("distance", "3");
|
|
28
|
+
}
|
|
29
|
+
updated(e) {
|
|
30
|
+
super.updated(e);
|
|
31
|
+
let t = this.hasAttribute("data-user-invalid");
|
|
32
|
+
t && (this.errorMessage ||= this.validationMessage, this.style.setProperty("--nve-input-error-message", `"${this.errorMessage}"`)), t || this.style.setProperty("--nve-input-error-message", "");
|
|
33
|
+
}
|
|
34
|
+
focus() {
|
|
35
|
+
(this.shadowRoot?.querySelector("sl-popup"))?.classList.add("select--focused");
|
|
36
|
+
}
|
|
37
|
+
handleOptionClick(e) {
|
|
38
|
+
let t = e.target.closest("nve-option"), n = this.value;
|
|
39
|
+
t && !t.disabled && (this.multiple ? this.toggleOptionSelection(t) : this.setSelectedOptions(t), this.updateComplete.then(() => this.displayInput.focus({ preventScroll: !0 })), this.value !== n && (this.valueHasChanged = !0, this.updateComplete.then(() => {
|
|
40
|
+
this.emit("sl-input"), this.emit("sl-change");
|
|
41
|
+
})), this.multiple || (this.hide(), this.displayInput.focus({ preventScroll: !0 })));
|
|
42
|
+
}
|
|
43
|
+
handleDefaultSlotChange() {
|
|
44
|
+
customElements.get("nve-option") || customElements.whenDefined("nve-option").then(() => this.handleDefaultSlotChange());
|
|
45
|
+
let e = this.getAllOptions(), t = this.valueHasChanged ? this.value : this.defaultValue, n = Array.isArray(t) ? t : [t];
|
|
46
|
+
this.setSelectedOptions(e.filter((e) => n.includes(e.value)));
|
|
47
|
+
}
|
|
48
|
+
getAllOptions() {
|
|
49
|
+
return [...this.querySelectorAll("nve-option")];
|
|
50
|
+
}
|
|
51
|
+
getFirstOption() {
|
|
52
|
+
return this.querySelector("nve-option");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
r([t()], o.prototype, "requiredLabel", void 0), r([t({ type: Boolean })], o.prototype, "hideCheckmark", void 0), r([t({ reflect: !0 })], o.prototype, "errorMessage", void 0), r([e()], o.prototype, "valueHasChanged", void 0), o = r([n("nve-select")], o);
|
|
56
|
+
var s = o;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { s as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { o as e, s as t, t as n } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import { t as r } from "./chunk.XQ2OKYYA.js";
|
|
4
|
+
import i from "../components/nve-skeleton/nve-skeleton.styles.js";
|
|
5
|
+
//#region src/components/nve-skeleton/nve-skeleton.component.ts
|
|
6
|
+
var a = class extends r {
|
|
7
|
+
static {
|
|
8
|
+
this.styles = [r.styles, i];
|
|
9
|
+
}
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.testId = void 0;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
n([e({
|
|
15
|
+
reflect: !0,
|
|
16
|
+
type: String
|
|
17
|
+
})], a.prototype, "testId", void 0), a = n([t("nve-skeleton")], a);
|
|
18
|
+
var o = a;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { u as e } from "./lit.js";
|
|
2
|
+
import { s as t, t as n } from "./decorate.js";
|
|
3
|
+
import "./chunk.4TUIT776.js";
|
|
4
|
+
import "./chunk.36O46B5H.js";
|
|
5
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
6
|
+
import { t as r } from "./chunk.EA437WHD.js";
|
|
7
|
+
//#region src/components/nve-spinner/nve-spinner.component.ts
|
|
8
|
+
var i = class extends r {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [r.styles, e`
|
|
14
|
+
.spinner__track {
|
|
15
|
+
stroke: transparent;
|
|
16
|
+
}
|
|
17
|
+
`];
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
i = n([t("nve-spinner")], i);
|
|
21
|
+
var a = i;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { o as e, s as t, t as n } from "./decorate.js";
|
|
2
|
+
import "./chunk.4TUIT776.js";
|
|
3
|
+
import "./chunk.6CTB5ZDJ.js";
|
|
4
|
+
import { t as r } from "./chunk.URTPIBTY.js";
|
|
5
|
+
import "./chunk.5JY5FUCG.js";
|
|
6
|
+
import "../components/nve-icon/nve-icon.component.js";
|
|
7
|
+
import i from "../components/nve-tooltip/nve-tooltip.styles.js";
|
|
8
|
+
//#region src/components/nve-tooltip/nve-tooltip.component.ts
|
|
9
|
+
var a = class extends r {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.variant = "neutral", this.saturation = "emphasized";
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = [r.styles, i];
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
n([e({ reflect: !0 })], a.prototype, "variant", void 0), n([e({ reflect: !0 })], a.prototype, "saturation", void 0), a = n([t("nve-tooltip")], a);
|
|
18
|
+
var o = a;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { o as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { a as e, n as t, t as n } from "./lit.js";
|
|
2
|
+
import { o as r, s as i, t as a } from "./decorate.js";
|
|
3
|
+
import { t as o } from "./class-map.js";
|
|
4
|
+
import { t as s } from "./if-defined.js";
|
|
5
|
+
import c from "../components/nve-warning-level/nve-warning-level.styles.js";
|
|
6
|
+
//#region src/assets/icons/triangle-warning.svg
|
|
7
|
+
var l = "data:image/svg+xml,%3csvg%20width='30'%20height='31'%20viewBox='0%200%2030%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%2026.0249L15%203.5249L28.5%2026.0249H1.5Z'%20fill='%2300131C'/%3e%3cpath%20d='M14.9934%2022.2749C15.3103%2022.2749%2015.5781%2022.1677%2015.7969%2021.9534C16.0156%2021.739%2016.125%2021.4734%2016.125%2021.1565C16.125%2020.8396%2016.0178%2020.5718%2015.8035%2020.353C15.5891%2020.1343%2015.3235%2020.0249%2015.0066%2020.0249C14.6897%2020.0249%2014.4219%2020.1321%2014.2031%2020.3464C13.9844%2020.5608%2013.875%2020.8264%2013.875%2021.1433C13.875%2021.4602%2013.9822%2021.728%2014.1965%2021.9468C14.4109%2022.1655%2014.6765%2022.2749%2014.9934%2022.2749ZM13.875%2018.5249H16.125V12.5249H13.875V18.5249Z'%20fill='white'/%3e%3c/svg%3e", u = "data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.966146'%20y='1.30843'%20width='18.3333'%20height='18.3333'%20rx='9.16667'%20fill='white'/%3e%3crect%20x='0.966146'%20y='1.30843'%20width='18.3333'%20height='18.3333'%20rx='9.16667'%20stroke='%2300131C'%20stroke-width='1.66667'/%3e%3cpath%20d='M10.1292%2016.5467C9.77038%2016.5467%209.46447%2016.4189%209.2115%2016.1634C8.95852%2015.9078%208.83203%2015.6006%208.83203%2015.2418C8.83203%2014.883%208.9598%2014.5771%209.21533%2014.3241C9.47087%2014.0711%209.77805%2013.9446%2010.1369%2013.9446C10.4957%2013.9446%2010.8016%2014.0724%2011.0546%2014.3279C11.3076%2014.5835%2011.4341%2014.8906%2011.4341%2015.2495C11.4341%2015.6083%2011.3063%2015.9142%2011.0508%2016.1672C10.7952%2016.4202%2010.488%2016.5467%2010.1292%2016.5467ZM8.83203%2012.2099V4.40381H11.4341V12.2099H8.83203Z'%20fill='%2300131C'/%3e%3c/svg%3e", d = class extends n {
|
|
8
|
+
static {
|
|
9
|
+
this.styles = [c];
|
|
10
|
+
}
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.testId = void 0, this.level = "1", this.border = !1, this.warningBadge = null, this.ariaLabel = null;
|
|
13
|
+
}
|
|
14
|
+
get isDirectParentButton() {
|
|
15
|
+
let e = this.parentElement;
|
|
16
|
+
if (!e) return !1;
|
|
17
|
+
let t = e.tagName.toLowerCase();
|
|
18
|
+
return t === "button" || t === "a";
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return e`
|
|
22
|
+
<div
|
|
23
|
+
class=${o({
|
|
24
|
+
"warning-level": !0,
|
|
25
|
+
[`warning-level--${this.level}`]: !0,
|
|
26
|
+
border: this.border,
|
|
27
|
+
"inside-button": this.isDirectParentButton
|
|
28
|
+
})}
|
|
29
|
+
part="base"
|
|
30
|
+
role="img"
|
|
31
|
+
testId=${s(this.testId)}
|
|
32
|
+
aria-label=${s(this.ariaLabel)}
|
|
33
|
+
>
|
|
34
|
+
${this.level === "unknown" ? "?" : this.level}
|
|
35
|
+
${this.warningBadge ? e`
|
|
36
|
+
<img
|
|
37
|
+
part="warning-badge"
|
|
38
|
+
alt=""
|
|
39
|
+
class=${o({
|
|
40
|
+
"warning-level-badge": !0,
|
|
41
|
+
"warning-level-badge--circle": this.warningBadge === "circle",
|
|
42
|
+
"warning-level-badge--triangle": this.warningBadge === "triangle"
|
|
43
|
+
})}
|
|
44
|
+
src=${this.warningBadge === "triangle" ? l : u}
|
|
45
|
+
/>
|
|
46
|
+
` : t}
|
|
47
|
+
</div>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
a([r({ type: String })], d.prototype, "testId", void 0), a([r()], d.prototype, "level", void 0), a([r({ type: Boolean })], d.prototype, "border", void 0), a([r({ type: String })], d.prototype, "warningBadge", void 0), a([r({
|
|
52
|
+
type: String,
|
|
53
|
+
attribute: "aria-label"
|
|
54
|
+
})], d.prototype, "ariaLabel", void 0), d = a([i("nve-warning-level")], d);
|
|
55
|
+
var f = d;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { f as t };
|