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,115 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { styles as d } from "./nve-label.styles.js";
|
|
4
|
-
import "../nve-icon/nve-icon.component.js";
|
|
5
|
-
import "../nve-tooltip/nve-tooltip.component.js";
|
|
6
|
-
import { o as p } from "../../chunks/if-defined.js";
|
|
7
|
-
class m {
|
|
8
|
-
constructor(t, ...r) {
|
|
9
|
-
this.slotNames = [], this.handleSlotChange = (i) => {
|
|
10
|
-
const e = i.target;
|
|
11
|
-
(this.slotNames.includes("[default]") && !e.name || e.name && this.slotNames.includes(e.name)) && this.host.requestUpdate();
|
|
12
|
-
}, (this.host = t).addController(this), this.slotNames = r;
|
|
13
|
-
}
|
|
14
|
-
hasDefaultSlot() {
|
|
15
|
-
return [...this.host.childNodes].some((t) => {
|
|
16
|
-
if (t.nodeType === t.TEXT_NODE && t.textContent.trim() !== "")
|
|
17
|
-
return !0;
|
|
18
|
-
if (t.nodeType === t.ELEMENT_NODE) {
|
|
19
|
-
const r = t;
|
|
20
|
-
if (r.tagName.toLowerCase() === "sl-visually-hidden")
|
|
21
|
-
return !1;
|
|
22
|
-
if (!r.hasAttribute("slot"))
|
|
23
|
-
return !0;
|
|
24
|
-
}
|
|
25
|
-
return !1;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
hasNamedSlot(t) {
|
|
29
|
-
return this.get(t) !== null;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @returns en slot med gitt navn eller null om den ikke finnes
|
|
33
|
-
*/
|
|
34
|
-
get(t) {
|
|
35
|
-
return this.host.querySelector(`:scope > [slot="${t}"]`);
|
|
36
|
-
}
|
|
37
|
-
test(t) {
|
|
38
|
-
return t === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(t);
|
|
39
|
-
}
|
|
40
|
-
hostConnected() {
|
|
41
|
-
this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
|
|
42
|
-
}
|
|
43
|
-
hostDisconnected() {
|
|
44
|
-
this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, s = (l, t, r, i) => {
|
|
48
|
-
for (var e = i > 1 ? void 0 : i ? g(t, r) : t, h = l.length - 1, f; h >= 0; h--)
|
|
49
|
-
(f = l[h]) && (e = (i ? f(t, r, e) : f(e)) || e);
|
|
50
|
-
return i && e && v(t, r, e), e;
|
|
51
|
-
};
|
|
52
|
-
let o = class extends u {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments), this.hasSlotController = new m(this, "tooltip"), this.value = "", this.size = "small", this.light = !1, this.tooltip = void 0, this.iconLeft = !1, this.iconColor = "default", this.for = void 0;
|
|
55
|
-
}
|
|
56
|
-
renderInfoIconWithTooltip() {
|
|
57
|
-
let l = this.tooltip;
|
|
58
|
-
return l?.length || (l = this.hasSlotController.get("tooltip")), l ? a`<nve-tooltip placement="top">
|
|
59
|
-
<div slot="content">${l}</div>
|
|
60
|
-
<nve-icon class="nve-info-icon" name="Info"></nve-icon>
|
|
61
|
-
</nve-tooltip>` : a``;
|
|
62
|
-
}
|
|
63
|
-
renderValueProperty() {
|
|
64
|
-
return this.value.length ? a` <label
|
|
65
|
-
part="form-control-label"
|
|
66
|
-
class="form-control__label"
|
|
67
|
-
aria-hidden="false"
|
|
68
|
-
for=${p(this.for)}
|
|
69
|
-
>
|
|
70
|
-
<slot name="label">${this.value}</slot>
|
|
71
|
-
</label>` : a` <label
|
|
72
|
-
part="form-control-label"
|
|
73
|
-
class="form-control__label"
|
|
74
|
-
aria-hidden="false"
|
|
75
|
-
for=${p(this.for)}
|
|
76
|
-
>
|
|
77
|
-
<slot></slot>
|
|
78
|
-
</label>`;
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
return a`
|
|
82
|
-
${this.iconLeft ? this.renderInfoIconWithTooltip() : null} ${this.renderValueProperty()}
|
|
83
|
-
<slot name="suffix"></slot>
|
|
84
|
-
${this.iconLeft ? null : this.renderInfoIconWithTooltip()}
|
|
85
|
-
`;
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
o.styles = [d];
|
|
89
|
-
s([
|
|
90
|
-
n({ reflect: !0 })
|
|
91
|
-
], o.prototype, "value", 2);
|
|
92
|
-
s([
|
|
93
|
-
n({ reflect: !0 })
|
|
94
|
-
], o.prototype, "size", 2);
|
|
95
|
-
s([
|
|
96
|
-
n({ type: Boolean, reflect: !0 })
|
|
97
|
-
], o.prototype, "light", 2);
|
|
98
|
-
s([
|
|
99
|
-
n({ reflect: !0 })
|
|
100
|
-
], o.prototype, "tooltip", 2);
|
|
101
|
-
s([
|
|
102
|
-
n({ type: Boolean, reflect: !0 })
|
|
103
|
-
], o.prototype, "iconLeft", 2);
|
|
104
|
-
s([
|
|
105
|
-
n({ reflect: !0 })
|
|
106
|
-
], o.prototype, "iconColor", 2);
|
|
107
|
-
s([
|
|
108
|
-
n({ reflect: !0 })
|
|
109
|
-
], o.prototype, "for", 2);
|
|
110
|
-
o = s([
|
|
111
|
-
c("nve-label")
|
|
112
|
-
], o);
|
|
113
|
-
export {
|
|
114
|
-
o as default
|
|
115
|
-
};
|
|
1
|
+
import { t as e } from "../../chunks/nve-label.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-label/nve-label.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
:host {
|
|
4
5
|
color: var(--color-neutrals-foreground-primary);
|
|
5
6
|
font: var(--typography-label-small);
|
|
@@ -54,6 +55,5 @@ const t = l`
|
|
|
54
55
|
color: var(--color-shades-grey-999, #000000);
|
|
55
56
|
}
|
|
56
57
|
`;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
58
|
+
//#endregion
|
|
59
|
+
export { t as styles };
|
|
@@ -4,8 +4,13 @@ import { INveComponent } from '../../interfaces/NveComponent.interface';
|
|
|
4
4
|
* Komponent som brukes til å navigere til interne, eksterne sider, laste ned filer, eller sende e-post.
|
|
5
5
|
* For å bruke komponenten på best og tilgjengelig måte les mer i tilgjengelighet seksjonen.
|
|
6
6
|
*
|
|
7
|
+
* Ikonet lengst til venstre i kortet kan settes med <slot name="icon"> og kan være hvilket som helst element.
|
|
8
|
+
* Ikonet til høyre styres av clickAction-propen og vises automatisk.
|
|
9
|
+
*
|
|
7
10
|
* @csspart link-card Topp-element
|
|
8
11
|
* @csspart label Overskriften
|
|
12
|
+
* @csspart additional-text Tilleggsbeskrivelse under overskriften
|
|
13
|
+
* @slot icon Ikon til venstre i kortet (valgfritt)
|
|
9
14
|
*/
|
|
10
15
|
export default class NveLinkCard extends LitElement implements INveComponent {
|
|
11
16
|
/** Tittel som vises øverst på kortet */
|
|
@@ -22,8 +27,6 @@ export default class NveLinkCard extends LitElement implements INveComponent {
|
|
|
22
27
|
clickAction: 'internal' | 'download' | 'external' | 'mail';
|
|
23
28
|
/** Lenken som brukes for handlinger som intern/ekstern navigering eller e-post */
|
|
24
29
|
href: string | undefined;
|
|
25
|
-
/** Brukes for å legge :visited style når lenken kommer fra eksternt rammeverk som f.eks RouterLink i Vue */
|
|
26
|
-
visited: boolean;
|
|
27
30
|
static styles: import('lit').CSSResult[];
|
|
28
31
|
/**
|
|
29
32
|
* Returnerer ikonnavnet som vises på kortet basert på clickAction.
|
|
@@ -1,97 +1,61 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import u from "./nve-link-card.styles.js";
|
|
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/class-map.js";
|
|
4
|
+
import { t as s } from "../../chunks/if-defined.js";
|
|
6
5
|
import "../nve-icon/nve-icon.component.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return "mail";
|
|
29
|
-
default:
|
|
30
|
-
return "arrow_forward";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
renderContent() {
|
|
34
|
-
return s`
|
|
6
|
+
import c from "./nve-link-card.styles.js";
|
|
7
|
+
//#region src/components/nve-link-card/nve-link-card.component.ts
|
|
8
|
+
var l = class extends n {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.label = "", this.size = "medium", this.variant = "primary", this.testId = void 0, this.clickAction = "internal", this.href = void 0;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
this.styles = [c];
|
|
14
|
+
}
|
|
15
|
+
getIconName() {
|
|
16
|
+
switch (this.clickAction) {
|
|
17
|
+
case "internal": return "arrow_forward";
|
|
18
|
+
case "download": return "download";
|
|
19
|
+
case "external": return "open_in_new";
|
|
20
|
+
case "mail": return "mail";
|
|
21
|
+
default: return "arrow_forward";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
renderContent() {
|
|
25
|
+
return e`
|
|
26
|
+
<slot name="icon"></slot>
|
|
35
27
|
<div class="link-card__content">
|
|
36
28
|
<div part="label" class="link-card__label">${this.label}</div>
|
|
37
|
-
${this.additionalText ?
|
|
29
|
+
${this.additionalText ? e`<div part="additional-text" class="link-card__additional-text">${this.additionalText}</div>` : t}
|
|
38
30
|
</div>
|
|
39
31
|
<nve-icon aria-hidden="true" slot="suffix" name="${this.getIconName()}"></nve-icon>
|
|
40
32
|
`;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? e` <div
|
|
44
36
|
part="link-card"
|
|
45
|
-
testId="${
|
|
46
|
-
class=${
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})}
|
|
37
|
+
testId="${s(this.testId)}"
|
|
38
|
+
class=${o({
|
|
39
|
+
"link-card": !0,
|
|
40
|
+
[`link-card--${this.size}`]: !0,
|
|
41
|
+
[`link-card--${this.variant}`]: !0
|
|
42
|
+
})}
|
|
52
43
|
>
|
|
53
44
|
${this.renderContent()}
|
|
54
|
-
</div>` :
|
|
45
|
+
</div>` : e`
|
|
55
46
|
<a
|
|
56
|
-
testId="${
|
|
47
|
+
testId="${s(this.testId)}"
|
|
57
48
|
?download=${this.clickAction === "download"}
|
|
58
49
|
part="link-card"
|
|
59
50
|
class="link-card link-card--${this.size} link-card--${this.variant}"
|
|
60
|
-
href=${
|
|
61
|
-
target=${this.clickAction === "external" ? "_blank" :
|
|
51
|
+
href=${s(this.clickAction === "mail" ? `mailto:${this.href}` : this.href)}
|
|
52
|
+
target=${this.clickAction === "external" ? "_blank" : t}
|
|
62
53
|
>${this.renderContent()}
|
|
63
54
|
</a>
|
|
64
55
|
`;
|
|
65
|
-
|
|
66
|
-
};
|
|
67
|
-
t.styles = [u];
|
|
68
|
-
e([
|
|
69
|
-
i()
|
|
70
|
-
], t.prototype, "label", 2);
|
|
71
|
-
e([
|
|
72
|
-
i()
|
|
73
|
-
], t.prototype, "additionalText", 2);
|
|
74
|
-
e([
|
|
75
|
-
i()
|
|
76
|
-
], t.prototype, "size", 2);
|
|
77
|
-
e([
|
|
78
|
-
i()
|
|
79
|
-
], t.prototype, "variant", 2);
|
|
80
|
-
e([
|
|
81
|
-
i()
|
|
82
|
-
], t.prototype, "testId", 2);
|
|
83
|
-
e([
|
|
84
|
-
i({ type: String })
|
|
85
|
-
], t.prototype, "clickAction", 2);
|
|
86
|
-
e([
|
|
87
|
-
i()
|
|
88
|
-
], t.prototype, "href", 2);
|
|
89
|
-
e([
|
|
90
|
-
i({ type: Boolean })
|
|
91
|
-
], t.prototype, "visited", 2);
|
|
92
|
-
t = e([
|
|
93
|
-
m("nve-link-card")
|
|
94
|
-
], t);
|
|
95
|
-
export {
|
|
96
|
-
t as default
|
|
56
|
+
}
|
|
97
57
|
};
|
|
58
|
+
a([r()], l.prototype, "label", void 0), a([r()], l.prototype, "additionalText", void 0), a([r()], l.prototype, "size", void 0), a([r()], l.prototype, "variant", void 0), a([r()], l.prototype, "testId", void 0), a([r({ type: String })], l.prototype, "clickAction", void 0), a([r()], l.prototype, "href", void 0), l = a([i("nve-link-card")], l);
|
|
59
|
+
var u = l;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { u as default };
|
|
@@ -1,127 +1,132 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { u as e } from "../../chunks/lit.js";
|
|
2
|
+
//#region src/components/nve-link-card/nve-link-card.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
.link-card {
|
|
4
|
-
border-radius: var(--border-radius-small);
|
|
5
|
-
padding: var(--spacing-medium, 16px) var(--spacing-large, 24px);
|
|
6
|
-
transition: background 0.3s ease;
|
|
7
|
-
border: 2px solid transparent;
|
|
8
5
|
display: flex;
|
|
9
6
|
flex-direction: row;
|
|
10
7
|
justify-content: space-between;
|
|
11
8
|
align-items: center;
|
|
9
|
+
padding: var(--spacing-medium) var(--spacing-large);
|
|
10
|
+
gap: var(--spacing-medium);
|
|
11
|
+
border-radius: var(--border-radius-small);
|
|
12
|
+
border: var(--border-width-stronger) solid transparent;
|
|
13
|
+
background: var(--color-neutrals-background-primary);
|
|
12
14
|
cursor: pointer;
|
|
13
15
|
text-decoration: none;
|
|
16
|
+
transition:
|
|
17
|
+
background 0.3s ease,
|
|
18
|
+
border-color 0.3s ease;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
/*
|
|
17
|
-
wrappar rundt lenke og som støtter :visited*/
|
|
21
|
+
/* Setter farge på <a> for å sikre riktig lenkefarge uansett rammeverk eller browser */
|
|
18
22
|
a {
|
|
19
|
-
color: var(--color-neutrals-foreground-primary
|
|
23
|
+
color: var(--color-neutrals-foreground-primary);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
.link-card
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
.link-card:hover {
|
|
27
|
+
border-color: var(--color-neutrals-border-subtle);
|
|
28
|
+
background: var(--color-neutrals-background-primary);
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
.link-card:
|
|
28
|
-
|
|
31
|
+
.link-card:active {
|
|
32
|
+
border-color: var(--color-neutrals-border-mute);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
.link-card:
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.link-card:active {
|
|
36
|
-
outline: var(--color-interactive-primary-foreground-border-focus, #008ffb) solid 2px;
|
|
35
|
+
.link-card:focus-visible {
|
|
36
|
+
outline: var(--color-interactive-border-accessibility-focus) solid 2px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.link-card--small {
|
|
40
|
-
padding: var(--spacing-small) var(--spacing-medium)
|
|
40
|
+
padding: var(--spacing-small) var(--spacing-medium);
|
|
41
|
+
gap: var(--spacing-x-small);
|
|
41
42
|
min-height: var(--sizing-2x-small);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
.link-card--medium {
|
|
45
|
-
padding: var(--spacing-medium) var(--spacing-
|
|
46
|
+
padding: var(--spacing-medium) var(--spacing-large);
|
|
46
47
|
min-height: var(--sizing-2x-small);
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
.link-card--large {
|
|
50
|
-
padding: var(--spacing-
|
|
51
|
+
padding: var(--spacing-large);
|
|
51
52
|
min-height: var(--sizing-x-small);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
.link-
|
|
55
|
-
|
|
56
|
-
font-family: 'Source Sans Pro';
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-weight: 400;
|
|
59
|
-
line-height: 150%;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.link-card--visited .link-card__label,
|
|
63
|
-
.link-card:visited .link-card__label {
|
|
64
|
-
color: var(--color-interactive-links-visited);
|
|
55
|
+
.link-card--primary {
|
|
56
|
+
background: var(--color-neutrals-background-primary);
|
|
65
57
|
}
|
|
66
58
|
|
|
67
|
-
.link-
|
|
68
|
-
|
|
59
|
+
.link-card--contrast {
|
|
60
|
+
background: var(--color-neutrals-background-primary-contrast);
|
|
69
61
|
}
|
|
70
62
|
|
|
71
|
-
.link-
|
|
72
|
-
|
|
63
|
+
.link-card--secondary {
|
|
64
|
+
background: var(--color-neutrals-background-secondary);
|
|
73
65
|
}
|
|
74
66
|
|
|
75
67
|
.link-card__content {
|
|
76
68
|
display: flex;
|
|
77
69
|
flex-direction: column;
|
|
78
|
-
justify-content:
|
|
70
|
+
justify-content: center;
|
|
71
|
+
flex: 1;
|
|
79
72
|
}
|
|
80
73
|
|
|
81
|
-
.link-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
font-size: 0.875rem;
|
|
74
|
+
.link-card__label {
|
|
75
|
+
font: var(--typography-heading-x-small);
|
|
76
|
+
color: var(--color-neutrals-foreground-primary);
|
|
77
|
+
transition:
|
|
78
|
+
color 0.3s ease,
|
|
79
|
+
text-decoration-thickness 0.3s,
|
|
80
|
+
text-underline-offset 0.3s;
|
|
89
81
|
}
|
|
90
82
|
|
|
91
|
-
.link-card
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
.link-card:hover .link-card__label {
|
|
84
|
+
color: var(--color-brand-foreground-primary);
|
|
85
|
+
text-decoration: underline;
|
|
86
|
+
text-decoration-style: solid;
|
|
87
|
+
text-decoration-thickness: 5%;
|
|
88
|
+
text-underline-offset: 16%;
|
|
94
89
|
}
|
|
95
90
|
|
|
96
|
-
.link-card
|
|
97
|
-
|
|
91
|
+
.link-card:active .link-card__label {
|
|
92
|
+
text-decoration-thickness: 10%;
|
|
93
|
+
text-underline-offset: 16%;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
|
-
.link-card--
|
|
101
|
-
|
|
96
|
+
.link-card--small .link-card__label {
|
|
97
|
+
font: var(--typography-label-small);
|
|
102
98
|
}
|
|
103
99
|
|
|
104
|
-
.link-card--
|
|
105
|
-
|
|
100
|
+
.link-card--large .link-card__label {
|
|
101
|
+
font: var(--typography-heading-x-small);
|
|
106
102
|
}
|
|
107
103
|
|
|
108
|
-
.link-
|
|
109
|
-
|
|
104
|
+
.link-card__additional-text {
|
|
105
|
+
color: var(--color-neutrals-foreground-subtle);
|
|
106
|
+
font: var(--typography-body-compact-x-small-compact);
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
display: -webkit-box;
|
|
109
|
+
-webkit-line-clamp: 1;
|
|
110
|
+
-webkit-box-orient: vertical;
|
|
111
|
+
text-overflow: ellipsis;
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
.link-card--
|
|
113
|
-
|
|
114
|
+
.link-card--small .link-card__additional-text {
|
|
115
|
+
font: var(--typography-body-compact-x-small-compact);
|
|
114
116
|
}
|
|
115
117
|
|
|
116
|
-
.link-card--
|
|
117
|
-
|
|
118
|
+
.link-card--large .link-card__additional-text {
|
|
119
|
+
font: var(--typography-body-compact-small-compact);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.link-card ::slotted([slot='icon']) {
|
|
123
|
+
--icon-size: 24px;
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
nve-icon {
|
|
121
127
|
--icon-size: 24px;
|
|
122
|
-
color: var(--color-
|
|
128
|
+
color: var(--color-brand-foreground-primary);
|
|
123
129
|
}
|
|
124
130
|
`;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
};
|
|
131
|
+
//#endregion
|
|
132
|
+
export { t as default };
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { t as u } from "../../chunks/property.js";
|
|
4
|
-
import "../../chunks/lit-element.js";
|
|
5
|
-
import a from "./nve-menu.styles.js";
|
|
6
|
-
var f = Object.getOwnPropertyDescriptor, v = (s, o, n, m) => {
|
|
7
|
-
for (var e = m > 1 ? void 0 : m ? f(o, n) : o, r = s.length - 1, l; r >= 0; r--)
|
|
8
|
-
(l = s[r]) && (e = l(e) || e);
|
|
9
|
-
return e;
|
|
10
|
-
};
|
|
11
|
-
let t = class extends p {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
t.styles = [p.styles, a];
|
|
17
|
-
t = v([
|
|
18
|
-
u("nve-menu")
|
|
19
|
-
], t);
|
|
20
|
-
export {
|
|
21
|
-
t as default
|
|
22
|
-
};
|
|
1
|
+
import { t as e } from "../../chunks/nve-menu.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-menu/nve-menu.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
:host {
|
|
4
5
|
padding: 0px;
|
|
5
6
|
margin-top: var(--spacing-2x-small);
|
|
@@ -19,6 +20,5 @@ const a = o`
|
|
|
19
20
|
margin-bottom: 1px;
|
|
20
21
|
}
|
|
21
22
|
`;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { t as default };
|
|
@@ -1,43 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import "../../chunks/chunk.5JY5FUCG.js";
|
|
4
|
-
import "../../chunks/chunk.36O46B5H.js";
|
|
5
|
-
import "../../chunks/chunk.6CTB5ZDJ.js";
|
|
6
|
-
import "../../chunks/chunk.YHLNUJ7P.js";
|
|
7
|
-
import "../../chunks/chunk.4TUIT776.js";
|
|
8
|
-
import { n as l, t as a } from "../../chunks/property.js";
|
|
9
|
-
import f from "./nve-menu-item.styles.js";
|
|
10
|
-
var v = Object.defineProperty, c = Object.getOwnPropertyDescriptor, u = (e, r, p, o) => {
|
|
11
|
-
for (var t = o > 1 ? void 0 : o ? c(r, p) : r, i = e.length - 1, n; i >= 0; i--)
|
|
12
|
-
(n = e[i]) && (t = (o ? n(r, p, t) : n(t)) || t);
|
|
13
|
-
return o && t && v(r, p, t), t;
|
|
14
|
-
};
|
|
15
|
-
let s = class extends m {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(), this.subtext = "", this.indent = !1, this.handleMouseOver = (e) => {
|
|
18
|
-
this.focus(), e.stopPropagation();
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
connectedCallback() {
|
|
22
|
-
super.connectedCallback(), this.removeEventListener("mouseover", this.handleMouseOver);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Sørger for at subtext blir satt på, hvis den er tilstede i properties
|
|
26
|
-
*/
|
|
27
|
-
updated(e) {
|
|
28
|
-
super.updated(e), e.has("subtext") && this.style.setProperty("--nve-menu-item-subtext", `"${this.subtext}"`);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
s.styles = [m.styles, f];
|
|
32
|
-
u([
|
|
33
|
-
l({ type: String, reflect: !0 })
|
|
34
|
-
], s.prototype, "subtext", 2);
|
|
35
|
-
u([
|
|
36
|
-
l({ type: Boolean, reflect: !0 })
|
|
37
|
-
], s.prototype, "indent", 2);
|
|
38
|
-
s = u([
|
|
39
|
-
a("nve-menu-item")
|
|
40
|
-
], s);
|
|
41
|
-
export {
|
|
42
|
-
s as default
|
|
43
|
-
};
|
|
1
|
+
import { t as e } from "../../chunks/nve-menu-item.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-menu-item/nve-menu-item.styles.ts
|
|
3
|
+
var t = e`
|
|
3
4
|
:host {
|
|
4
5
|
position: relative;
|
|
5
6
|
}
|
|
@@ -89,12 +90,11 @@ const o = r`
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
:host(:focus-visible) .menu-item {
|
|
92
|
-
box-shadow: inset 0 0 0 var(--border-width-strong, 2px) var(--color-interactive-
|
|
93
|
+
box-shadow: inset 0 0 0 var(--border-width-strong, 2px) var(--color-interactive-border-accessibility-focus);
|
|
93
94
|
opacity: var(--border-width-default, 1);
|
|
94
|
-
color: var(--color-interactive-
|
|
95
|
+
color: var(--color-interactive-border-accessibility-focus);
|
|
95
96
|
background-color: transparent;
|
|
96
97
|
}
|
|
97
98
|
`;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { t as default };
|