nve-designsystem 3.2.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 +5 -5
- 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
|
@@ -1,107 +1,77 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import m from "./nve-message-card.styles.js";
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
|
+
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
|
+
import { t as a } from "../../chunks/class-map.js";
|
|
5
4
|
import "../nve-icon/nve-icon.component.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return "info";
|
|
38
|
-
case "warning":
|
|
39
|
-
return "warning";
|
|
40
|
-
case "danger":
|
|
41
|
-
return "error";
|
|
42
|
-
case "success":
|
|
43
|
-
return "check_circle";
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return i`
|
|
5
|
+
import o from "./nve-message-card.styles.js";
|
|
6
|
+
//#region src/components/nve-message-card/nve-message-card.component.ts
|
|
7
|
+
var s = class extends t {
|
|
8
|
+
static {
|
|
9
|
+
this.styles = [o];
|
|
10
|
+
}
|
|
11
|
+
constructor() {
|
|
12
|
+
super(), this.testId = "", this.saturation = null, this.size = "default", this.closable = !1, this.showIcon = "true", this.label = "", this.iconTitle = "", this.variant = "primary";
|
|
13
|
+
}
|
|
14
|
+
handleClose() {
|
|
15
|
+
let e = this.shadowRoot?.querySelector(".message-card");
|
|
16
|
+
e?.classList.add("message-card-remove"), this.dispatchEvent(new CustomEvent("nve-hide", {
|
|
17
|
+
detail: { message: "Message card is being hidden" },
|
|
18
|
+
bubbles: !0,
|
|
19
|
+
composed: !0
|
|
20
|
+
})), e?.addEventListener("transitionend", () => {
|
|
21
|
+
this.remove();
|
|
22
|
+
}, { once: !0 });
|
|
23
|
+
}
|
|
24
|
+
determineIcon() {
|
|
25
|
+
if (this.iconTitle) return this.iconTitle;
|
|
26
|
+
switch (this.variant) {
|
|
27
|
+
case "neutral":
|
|
28
|
+
case "primary": return "info";
|
|
29
|
+
case "warning": return "warning";
|
|
30
|
+
case "danger": return "error";
|
|
31
|
+
case "success": return "check_circle";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return e`
|
|
48
36
|
<div
|
|
49
37
|
part="base"
|
|
50
|
-
class="${
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
class="${a({
|
|
39
|
+
"message-card": !0,
|
|
40
|
+
"message-card--neutral": this.variant === "neutral",
|
|
41
|
+
"message-card--primary": this.variant === "primary",
|
|
42
|
+
"message-card--warning": this.variant === "warning",
|
|
43
|
+
"message-card--danger": this.variant === "danger",
|
|
44
|
+
"message-card--success": this.variant === "success"
|
|
45
|
+
})}"
|
|
58
46
|
>
|
|
59
47
|
<div class="message-card__header-container">
|
|
60
48
|
<div part="header" class="message-card__header">
|
|
61
49
|
<slot part="subheader" name="subheader" class="message-card__subheader"></slot>
|
|
62
50
|
<div part="label" class="message-card__header-label">
|
|
63
|
-
${this.showIcon === "true" ?
|
|
64
|
-
${this.label ?
|
|
51
|
+
${this.showIcon === "true" ? e`<nve-icon name=${this.determineIcon()}></nve-icon>` : null}
|
|
52
|
+
${this.label ? e`<span>${this.label}</span>` : null}
|
|
65
53
|
</div>
|
|
66
54
|
</div>
|
|
67
|
-
${this.closable ?
|
|
55
|
+
${this.closable ? e`<button type="button" class="message-card__close-btn" @click=${this.handleClose}>
|
|
68
56
|
<nve-icon name="close"></nve-icon>
|
|
69
57
|
</button>` : null}
|
|
70
58
|
</div>
|
|
71
|
-
${this.size
|
|
72
|
-
<slot name="footer" part="footer"></slot>`
|
|
59
|
+
${this.size === "simple" ? null : e` <slot part="body" class="message-card__body" aria-live="assertive"></slot>
|
|
60
|
+
<slot name="footer" part="footer"></slot>`}
|
|
73
61
|
</div>
|
|
74
62
|
`;
|
|
75
|
-
|
|
76
|
-
};
|
|
77
|
-
e.styles = [m];
|
|
78
|
-
t([
|
|
79
|
-
s({ reflect: !0, type: String })
|
|
80
|
-
], e.prototype, "testId", 2);
|
|
81
|
-
t([
|
|
82
|
-
s({ type: String, reflect: !1 })
|
|
83
|
-
], e.prototype, "saturation", 2);
|
|
84
|
-
t([
|
|
85
|
-
s({ reflect: !0 })
|
|
86
|
-
], e.prototype, "size", 2);
|
|
87
|
-
t([
|
|
88
|
-
s({ type: Boolean, reflect: !0 })
|
|
89
|
-
], e.prototype, "closable", 2);
|
|
90
|
-
t([
|
|
91
|
-
s({ reflect: !0 })
|
|
92
|
-
], e.prototype, "showIcon", 2);
|
|
93
|
-
t([
|
|
94
|
-
s({ reflect: !0 })
|
|
95
|
-
], e.prototype, "label", 2);
|
|
96
|
-
t([
|
|
97
|
-
s({ reflect: !0 })
|
|
98
|
-
], e.prototype, "iconTitle", 2);
|
|
99
|
-
t([
|
|
100
|
-
s({ reflect: !0 })
|
|
101
|
-
], e.prototype, "variant", 2);
|
|
102
|
-
e = t([
|
|
103
|
-
u("nve-message-card")
|
|
104
|
-
], e);
|
|
105
|
-
export {
|
|
106
|
-
e as default
|
|
63
|
+
}
|
|
107
64
|
};
|
|
65
|
+
i([n({
|
|
66
|
+
reflect: !0,
|
|
67
|
+
type: String
|
|
68
|
+
})], s.prototype, "testId", void 0), i([n({
|
|
69
|
+
type: String,
|
|
70
|
+
reflect: !1
|
|
71
|
+
})], s.prototype, "saturation", void 0), i([n({ reflect: !0 })], s.prototype, "size", void 0), i([n({
|
|
72
|
+
type: Boolean,
|
|
73
|
+
reflect: !0
|
|
74
|
+
})], s.prototype, "closable", void 0), i([n({ reflect: !0 })], s.prototype, "showIcon", void 0), i([n({ reflect: !0 })], s.prototype, "label", void 0), i([n({ reflect: !0 })], s.prototype, "iconTitle", void 0), i([n({ reflect: !0 })], s.prototype, "variant", void 0), s = i([r("nve-message-card")], s);
|
|
75
|
+
var c = s;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { c as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { u as e } from "../../chunks/lit.js";
|
|
2
|
+
//#region src/components/nve-message-card/nve-message-card.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
:host {
|
|
4
5
|
--button-hover: rgba(0, 0, 0, 0.1);
|
|
5
6
|
}
|
|
@@ -12,7 +13,6 @@ const r = e`
|
|
|
12
13
|
padding: var(--spacing-large);
|
|
13
14
|
gap: var(--spacing-small);
|
|
14
15
|
align-self: stretch;
|
|
15
|
-
color: var(--color-neutrals-foreground-primary, #0d0d0e);
|
|
16
16
|
opacity: 1;
|
|
17
17
|
transition: opacity 0.3s 0s;
|
|
18
18
|
}
|
|
@@ -54,7 +54,7 @@ const r = e`
|
|
|
54
54
|
justify-content: center;
|
|
55
55
|
align-items: center;
|
|
56
56
|
border: none;
|
|
57
|
-
background: none;
|
|
57
|
+
background-color: none;
|
|
58
58
|
width: 28px;
|
|
59
59
|
height: 28px;
|
|
60
60
|
font-size: unset;
|
|
@@ -69,44 +69,42 @@ const r = e`
|
|
|
69
69
|
opacity: 0;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
nve-icon::part(icon) {
|
|
73
|
-
display: unset;
|
|
74
|
-
font-size: var(--font-size-medium);
|
|
75
|
-
line-height: 1;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
72
|
/** Varianter */
|
|
79
73
|
|
|
80
74
|
.message-card--neutral {
|
|
81
|
-
background: var(--color-neutrals-background-primary
|
|
75
|
+
background-color: var(--color-neutrals-background-primary);
|
|
76
|
+
color: var(--color-neutrals-foreground-primary);
|
|
82
77
|
.message-card__close-btn:hover {
|
|
83
78
|
background-color: var(--button-hover);
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
81
|
|
|
87
82
|
.message-card--danger {
|
|
88
|
-
background: var(--color-feedback-background-default-error);
|
|
83
|
+
background-color: var(--color-feedback-background-default-error);
|
|
84
|
+
color: var(--color-feedback-foreground-on-bg-subtle-error);
|
|
89
85
|
.message-card__close-btn:hover {
|
|
90
86
|
background-color: var(--button-hover);
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
89
|
|
|
94
90
|
.message-card--warning {
|
|
95
|
-
background: var(--color-feedback-background-default-warning);
|
|
91
|
+
background-color: var(--color-feedback-background-default-warning);
|
|
92
|
+
color: var(--color-feedback-foreground-on-bg-subtle-warning);
|
|
96
93
|
.message-card__close-btn:hover {
|
|
97
94
|
background-color: var(--button-hover);
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
.message-card--success {
|
|
102
|
-
background: var(--color-feedback-background-default-success);
|
|
99
|
+
background-color: var(--color-feedback-background-default-success);
|
|
100
|
+
color: var(--color-feedback-foreground-on-bg-subtle-success);
|
|
103
101
|
.message-card__close-btn:hover {
|
|
104
102
|
background-color: var(--button-hover);
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
|
|
108
106
|
.message-card--primary {
|
|
109
|
-
background: var(--color-feedback-background-subtle-info);
|
|
107
|
+
background-color: var(--color-feedback-background-subtle-info);
|
|
110
108
|
.message-card__close-btn:hover {
|
|
111
109
|
background-color: var(--button-hover);
|
|
112
110
|
}
|
|
@@ -115,15 +113,15 @@ const r = e`
|
|
|
115
113
|
/** Sterkere farger */
|
|
116
114
|
|
|
117
115
|
:host([saturation='emphasized']) .message-card--neutral {
|
|
118
|
-
background: var(--color-neutrals-background-secondary);
|
|
116
|
+
background-color: var(--color-neutrals-background-secondary);
|
|
119
117
|
.message-card__close-btn:hover {
|
|
120
118
|
background-color: var(--button-hover);
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
:host([saturation='emphasized']) .message-card--danger {
|
|
125
|
-
color: var(--color-feedback-foreground-emphasized-error);
|
|
126
|
-
background: var(--color-feedback-background-emphasized-error);
|
|
123
|
+
color: var(--color-feedback-foreground-on-bg-emphasized-error);
|
|
124
|
+
background-color: var(--color-feedback-background-emphasized-error);
|
|
127
125
|
.message-card__close-btn:hover {
|
|
128
126
|
background-color: var(--color-feedback-background-default-error);
|
|
129
127
|
color: var(--color-neutrals-foreground-primary);
|
|
@@ -131,16 +129,16 @@ const r = e`
|
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
:host([saturation='emphasized']) .message-card--warning {
|
|
134
|
-
color: var(--color-feedback-foreground-emphasized-warning);
|
|
135
|
-
background: var(--color-feedback-background-emphasized-warning);
|
|
132
|
+
color: var(--color-feedback-foreground-on-bg-emphasized-warning);
|
|
133
|
+
background-color: var(--color-feedback-background-emphasized-warning);
|
|
136
134
|
.message-card__close-btn:hover {
|
|
137
135
|
background-color: var(--color-feedback-background-default-warning);
|
|
138
136
|
}
|
|
139
137
|
}
|
|
140
138
|
|
|
141
139
|
:host([saturation='emphasized']) .message-card--success {
|
|
142
|
-
color: var(--color-feedback-foreground-emphasized-success);
|
|
143
|
-
background: var(--color-feedback-background-emphasized-success);
|
|
140
|
+
color: var(--color-feedback-foreground-on-bg-emphasized-success);
|
|
141
|
+
background-color: var(--color-feedback-background-emphasized-success);
|
|
144
142
|
.message-card__close-btn:hover {
|
|
145
143
|
background-color: var(--color-feedback-background-default-success);
|
|
146
144
|
color: var(--color-neutrals-foreground-primary);
|
|
@@ -148,8 +146,8 @@ const r = e`
|
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
:host([saturation='emphasized']) .message-card--primary {
|
|
151
|
-
color: var(--color-feedback-foreground-emphasized-info);
|
|
152
|
-
background: var(--color-feedback-background-emphasized-info);
|
|
149
|
+
color: var(--color-feedback-foreground-on-bg-emphasized-info);
|
|
150
|
+
background-color: var(--color-feedback-background-emphasized-info);
|
|
153
151
|
.message-card__close-btn:hover {
|
|
154
152
|
background-color: var(--button-hover);
|
|
155
153
|
}
|
|
@@ -180,6 +178,5 @@ const r = e`
|
|
|
180
178
|
font-size: var(--font-size-medium);
|
|
181
179
|
}
|
|
182
180
|
`;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
181
|
+
//#endregion
|
|
182
|
+
export { t as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { INveComponent } from '../../interfaces/NveComponent.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Denne komponenten er ment å brukes som hovednavigasjon på sider, for eksempel transportside (i motsetning til `nve-link-card`, som er mindre og brukes der navigasjonen ikke er hovedfokus).
|
|
5
|
+
*
|
|
6
|
+
* Komponenten brukes i grid-oppsett, har minimum høyde, og støtter enten dekorativt ikon (angis via path) eller tilleggstekst (maks 3 linjer, trunkeres automatisk) – aldri begge samtidig.
|
|
7
|
+
*
|
|
8
|
+
* Ikon angis med `iconPath`-prop og rendres automatisk med aria-hidden. Bruk kun illustrasjonsikoner fra NVE.
|
|
9
|
+
*
|
|
10
|
+
* @csspart navigation-card Topp-elementet for kortet
|
|
11
|
+
* @csspart label Overskriften på kortet
|
|
12
|
+
* @csspart leading-icon Ikonet øverst i kortet
|
|
13
|
+
* @csspart content Innholdet i kortet
|
|
14
|
+
* @csspart additional-text Ekstra tekst under overskriften
|
|
15
|
+
*/
|
|
16
|
+
export default class NveNavigationCard extends LitElement implements INveComponent {
|
|
17
|
+
/** Test ID som kan brukes i testing og sporing */
|
|
18
|
+
testId: string | undefined;
|
|
19
|
+
/** Tittel som vises øverst på kortet (må settes) */
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Lenke for navigasjon (må settes for at kortet skal være klikkbart).
|
|
23
|
+
* Hvis du bruker komponenten uten å wrappe den i et rammeverks-router-element (f.eks. Vue Router eller React Router), må `href` settes.
|
|
24
|
+
*/
|
|
25
|
+
href: string;
|
|
26
|
+
/** Ekstratekst som vises under tittelen (maks 3 linjer, trunkeres) */
|
|
27
|
+
additionalText: string | undefined;
|
|
28
|
+
/** Definerer hva som skjer når kortet klikkes: 'internal' (intern lenke), 'download' (nedlasting), 'external' (ekstern lenke) */
|
|
29
|
+
clickAction: 'internal' | 'download' | 'external';
|
|
30
|
+
/** Path til ikon som vises øverst i kortet (dekorativt) */
|
|
31
|
+
iconPath: string | undefined;
|
|
32
|
+
static styles: import('lit').CSSResult[];
|
|
33
|
+
/**
|
|
34
|
+
* Returnerer ikonnavnet som vises på kortet basert på clickAction.
|
|
35
|
+
*/
|
|
36
|
+
private getIconName;
|
|
37
|
+
/**
|
|
38
|
+
* Genererer innholdet i kortet.
|
|
39
|
+
* Viser ikon (hvis iconPath), tittel og ev. additionalText.
|
|
40
|
+
*/
|
|
41
|
+
private renderContent;
|
|
42
|
+
/**
|
|
43
|
+
* Rendrer kortet som <a> hvis ikke parent er en lenke,
|
|
44
|
+
* ellers som <div> for å unngå nestede lenker (SPA-routing).
|
|
45
|
+
*/
|
|
46
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
'nve-navigation-card': NveNavigationCard;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
|
+
import { o as r, s as i, t as a } from "../../chunks/decorate.js";
|
|
3
|
+
import { t as o } from "../../chunks/if-defined.js";
|
|
4
|
+
import "../nve-icon/nve-icon.component.js";
|
|
5
|
+
import s from "./nve-navigation-card.styles.js";
|
|
6
|
+
//#region src/components/nve-navigation-card/nve-navigation-card.component.ts
|
|
7
|
+
var c = class extends n {
|
|
8
|
+
constructor(...e) {
|
|
9
|
+
super(...e), this.testId = void 0, this.label = "", this.href = "", this.additionalText = void 0, this.clickAction = "internal", this.iconPath = void 0;
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.styles = [s];
|
|
13
|
+
}
|
|
14
|
+
getIconName() {
|
|
15
|
+
switch (this.clickAction) {
|
|
16
|
+
case "internal": return "arrow_forward";
|
|
17
|
+
case "download": return "download";
|
|
18
|
+
case "external": return "open_in_new";
|
|
19
|
+
default: return "arrow_forward";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
renderContent() {
|
|
23
|
+
return e`
|
|
24
|
+
<div part="content" class="navigation-card__content">
|
|
25
|
+
${this.iconPath ? e`<img
|
|
26
|
+
part="leading-icon"
|
|
27
|
+
src="${this.iconPath}"
|
|
28
|
+
alt=""
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
class="navigation-card__icon"
|
|
31
|
+
/>` : t}
|
|
32
|
+
<h2 part="label" class="navigation-card__label">${this.label}</h2>
|
|
33
|
+
${!this.iconPath && this.additionalText ? e`<p part="additional-text" class="navigation-card__additional-text">${this.additionalText}</p>` : t}
|
|
34
|
+
</div>
|
|
35
|
+
<nve-icon aria-hidden="true" name="${this.getIconName()}" class="navigation-card__arrow" />
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? e`
|
|
40
|
+
<div part="navigation-card" class="navigation-card" testid=${o(this.testId)}>
|
|
41
|
+
${this.renderContent()}
|
|
42
|
+
</div>
|
|
43
|
+
` : e`
|
|
44
|
+
<a
|
|
45
|
+
testid=${o(this.testId)}
|
|
46
|
+
?download=${this.clickAction === "download"}
|
|
47
|
+
part="navigation-card"
|
|
48
|
+
class="navigation-card"
|
|
49
|
+
href="${o(this.href)}"
|
|
50
|
+
target=${this.clickAction === "external" ? "_blank" : t}
|
|
51
|
+
>
|
|
52
|
+
${this.renderContent()}
|
|
53
|
+
</a>
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
a([r({ type: String })], c.prototype, "testId", void 0), a([r({ type: String })], c.prototype, "label", void 0), a([r({ type: String })], c.prototype, "href", void 0), a([r({ type: String })], c.prototype, "additionalText", void 0), a([r({ type: String })], c.prototype, "clickAction", void 0), a([r({ type: String })], c.prototype, "iconPath", void 0), c = a([i("nve-navigation-card")], c);
|
|
58
|
+
var l = c;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { l as default };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { u as e } from "../../chunks/lit.js";
|
|
2
|
+
//#region src/components/nve-navigation-card/nve-navigation-card.styles.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
:host {
|
|
5
|
+
--nav-card-arrow-transition:
|
|
6
|
+
margin-left 0.3s cubic-bezier(0, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0, 0, 0.2, 1);
|
|
7
|
+
--nav-card-arrow-transition-fast:
|
|
8
|
+
margin-left 0.3s cubic-bezier(0, 0, 0.2, 1), margin-right 0.3s cubic-bezier(0, 0, 0.2, 1);
|
|
9
|
+
display: flex;
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.navigation-card {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
width: 100%;
|
|
20
|
+
min-height: var(--sizing-card-link-card-height-x-large-min-height);
|
|
21
|
+
padding: var(--spacing-2x-large);
|
|
22
|
+
gap: var(--spacing-medium);
|
|
23
|
+
border-radius: var(--border-radius-small);
|
|
24
|
+
border: var(--border-width-stronger) solid transparent;
|
|
25
|
+
background: var(--color-neutrals-background-primary);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
transition: border-color 0.3s ease;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.navigation-card:hover {
|
|
32
|
+
border-color: var(--color-neutrals-border-subtle);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.navigation-card:active {
|
|
36
|
+
border-color: var(--color-neutrals-border-mute);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.navigation-card:focus-visible {
|
|
40
|
+
outline: var(--color-interactive-border-accessibility-focus) solid 2px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.navigation-card__content {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
gap: var(--spacing-medium);
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
align-self: stretch;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.navigation-card__icon {
|
|
53
|
+
width: var(--sizing-icon-3x-large);
|
|
54
|
+
height: var(--sizing-icon-3x-large);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.navigation-card__label {
|
|
58
|
+
font: var(--typography-heading-small);
|
|
59
|
+
color: var(--color-neutrals-foreground-primary);
|
|
60
|
+
transition: color 0.3s ease;
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.navigation-card:hover .navigation-card__label {
|
|
65
|
+
color: var(--color-brand-foreground-primary);
|
|
66
|
+
text-decoration-line: underline;
|
|
67
|
+
text-decoration-style: solid;
|
|
68
|
+
text-decoration-thickness: 5%;
|
|
69
|
+
text-underline-offset: 16%;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.navigation-card:active .navigation-card__label {
|
|
73
|
+
text-decoration-thickness: 10%;
|
|
74
|
+
text-underline-offset: 16%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.navigation-card__additional-text {
|
|
78
|
+
font: var(--typography-body-compact-medium-compact);
|
|
79
|
+
color: var(--color-neutrals-foreground-subtle);
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
display: -webkit-box;
|
|
82
|
+
-webkit-line-clamp: 3;
|
|
83
|
+
-webkit-box-orient: vertical;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
margin: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.navigation-card__arrow {
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
color: var(--color-brand-foreground-primary);
|
|
91
|
+
margin-right: var(--spacing-x-small);
|
|
92
|
+
transition: var(--nav-card-arrow-transition);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.navigation-card:hover .navigation-card__arrow {
|
|
96
|
+
margin-left: var(--spacing-2x-small);
|
|
97
|
+
margin-right: var(--spacing-2x-small);
|
|
98
|
+
transition: var(--nav-card-arrow-transition-fast);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.navigation-card:active .navigation-card__arrow {
|
|
102
|
+
margin-left: var(--spacing-x-small);
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
transition: var(--nav-card-arrow-transition-fast);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
nve-icon {
|
|
108
|
+
--icon-size: 24px;
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
//#endregion
|
|
112
|
+
export { t as default };
|
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import "../../chunks/chunk.YHLNUJ7P.js";
|
|
4
|
-
import "../../chunks/chunk.4TUIT776.js";
|
|
5
|
-
import { n as u, t as h } from "../../chunks/property.js";
|
|
6
|
-
import c from "./nve-option.styles.js";
|
|
7
|
-
var b = Object.defineProperty, n = Object.getOwnPropertyDescriptor, f = (r, t, l, s) => {
|
|
8
|
-
for (var e = s > 1 ? void 0 : s ? n(t, l) : t, o = r.length - 1, p; o >= 0; o--)
|
|
9
|
-
(p = r[o]) && (e = (s ? p(t, l, e) : p(e)) || e);
|
|
10
|
-
return s && e && b(t, l, e), e;
|
|
11
|
-
};
|
|
12
|
-
let i = class extends a {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(), this.textLabel = void 0;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Setter filled attributt på option når parent-select er filled, for å få annen hover-farge
|
|
18
|
-
* Setter så hide-checkmark basert på samme logikk
|
|
19
|
-
*/
|
|
20
|
-
firstUpdated(r) {
|
|
21
|
-
super.firstUpdated(r);
|
|
22
|
-
const t = this.closest("nve-select");
|
|
23
|
-
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));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Gir tilbake plain-tekst-label som vises i select
|
|
27
|
-
*/
|
|
28
|
-
getTextLabel() {
|
|
29
|
-
return this.textLabel ? this.textLabel : super.getTextLabel();
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
i.styles = [a.styles, c];
|
|
33
|
-
f([
|
|
34
|
-
u()
|
|
35
|
-
], i.prototype, "textLabel", 2);
|
|
36
|
-
i = f([
|
|
37
|
-
h("nve-option")
|
|
38
|
-
], i);
|
|
39
|
-
export {
|
|
40
|
-
i as default
|
|
41
|
-
};
|
|
1
|
+
import { t as e } from "../../chunks/nve-option.component.js";
|
|
2
|
+
export { e as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { u as e } from "../../chunks/lit.js";
|
|
2
|
+
//#region src/components/nve-option/nve-option.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
:host {
|
|
4
5
|
font: var(--typography-body-small);
|
|
5
6
|
--sl-font-sans: var(--font-families-source-sans-pro);
|
|
@@ -41,6 +42,5 @@ const n = o`
|
|
|
41
42
|
color: var(--color-neutrals-foreground-primary, #0d0d0e);
|
|
42
43
|
}
|
|
43
44
|
`;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { t as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { INveComponent } from '../../interfaces/NveComponent.interface';
|
|
3
|
+
/**
|
|
4
|
+
* nve-paragraph gir fleksibel og tilgjengelig typografi for avsnitt i designsystemet.
|
|
5
|
+
* Brukes til brødtekst, mengdetekst og ingress (lead), og gir riktig styling basert på designsystemets tokens.
|
|
6
|
+
*
|
|
7
|
+
* Du styrer typografivariant med size-prop, og kan velge mellom ulike varianter for brødtekst (body), ingress (lead) og kompakt tekst (body-compact).
|
|
8
|
+
*
|
|
9
|
+
* @slot - tekst - Selve avsnittet (innholdet).
|
|
10
|
+
*
|
|
11
|
+
* @csspart paragraph Hele paragraph-elementet
|
|
12
|
+
*
|
|
13
|
+
* Se designsystemet for alle varianter og tokens.
|
|
14
|
+
*/
|
|
15
|
+
export default class NveParagraph extends LitElement implements INveComponent {
|
|
16
|
+
testId: string | undefined;
|
|
17
|
+
/** Typografivariant for paragrafen */
|
|
18
|
+
size?: 'leadLargeRegular' | 'leadLargeSemibold' | 'leadMediumRegular' | 'leadMediumSemibold' | 'leadSmallRegular' | 'leadSmallSemibold' | 'bodyLarge' | 'bodyLargeUnderline' | 'bodyMedium' | 'bodyMediumUnderline' | 'bodySmall' | 'bodySmallUnderline' | 'bodyXSmall' | 'bodyXSmallUnderline' | 'bodyLargeCompact' | 'bodyLargeUnderlineCompact' | 'bodyMediumCompact' | 'bodyMediumUnderlineCompact' | 'bodySmallCompact' | 'bodySmallUnderlineCompact' | 'bodyXSmallCompact' | 'bodyXSmallUnderlineCompact';
|
|
19
|
+
static styles: import('lit').CSSResult[];
|
|
20
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'nve-paragraph': NveParagraph;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
|
+
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
|
+
import a from "./nve-paragraph.styles.js";
|
|
4
|
+
//#region src/components/nve-paragraph/nve-paragraph.component.ts
|
|
5
|
+
var o = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this.testId = void 0;
|
|
8
|
+
}
|
|
9
|
+
static {
|
|
10
|
+
this.styles = [a];
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return e`
|
|
14
|
+
<p class="paragraph ${this.size ? `${this.size}` : ""}" part="paragraph" data-testid="${this.testId}">
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</p>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
i([n({ type: String })], o.prototype, "testId", void 0), i([n({
|
|
21
|
+
type: String,
|
|
22
|
+
reflect: !0
|
|
23
|
+
})], o.prototype, "size", void 0), o = i([r("nve-paragraph")], o);
|
|
24
|
+
var s = o;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { s as default };
|