nve-designsystem 4.3.0 → 4.4.2
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 +4 -4
- package/chunks/chunk.36O46B5H.js +2 -2
- package/chunks/chunk.4TUIT776.js +1 -1
- package/chunks/chunk.5JY5FUCG.js +325 -344
- package/chunks/chunk.5P45LHIX.js +2 -2
- package/chunks/chunk.6CTB5ZDJ.js +16 -4
- package/chunks/chunk.B4BZKR24.js +2 -2
- package/chunks/chunk.D5YQDJ7X.js +3 -3
- package/chunks/chunk.EA437WHD.js +1 -1
- package/chunks/chunk.GI7VDIWX.js +1 -1
- package/chunks/chunk.GMYPQTFK.js +1 -1
- package/chunks/chunk.HVTXQL7M.js +3 -3
- package/chunks/chunk.IKV4VH3T.js +3 -3
- package/chunks/chunk.IVVHNXMC.js +2 -2
- package/chunks/chunk.JHOXTQXA.js +3 -3
- package/chunks/chunk.JXOKFADN.js +3 -3
- package/chunks/chunk.K7JGTRV7.js +1 -1
- package/chunks/chunk.KPLQLAWP.js +3 -3
- package/chunks/chunk.LD4M4QGE.js +1 -1
- package/chunks/chunk.MSKEYBDI.js +3 -3
- package/chunks/chunk.NYIIDP5N.js +1 -1
- package/chunks/chunk.RWUUFNUL.js +2 -2
- package/chunks/chunk.SAPQLUO4.js +4 -4
- package/chunks/chunk.SI4ACBFK.js +1 -1
- package/chunks/chunk.TP2GB2HO.js +4 -4
- package/chunks/chunk.UDWRA64J.js +3 -3
- package/chunks/chunk.URTPIBTY.js +3 -3
- package/chunks/chunk.VESXC477.js +1 -1
- package/chunks/chunk.XA43ZQPC.js +3 -3
- package/chunks/chunk.XQ2OKYYA.js +3 -3
- package/chunks/chunk.XZNBUGX7.js +1 -1
- package/chunks/chunk.YHLNUJ7P.js +2 -2
- package/chunks/chunk.ZH2AND3P.js +8 -8
- package/chunks/chunk.ZL53POKZ.js +2 -2
- package/chunks/class-map.js +3 -3
- package/chunks/decorate.js +11 -11
- package/chunks/directive-helpers.js +3 -3
- package/chunks/if-defined.js +1 -1
- package/chunks/lit.js +88 -86
- package/chunks/live.js +8 -8
- package/chunks/nve-alert.component.js +9 -9
- package/chunks/nve-carousel-item.component.js +1 -1
- package/chunks/nve-checkbox-group.component.js +7 -7
- package/chunks/nve-label.component.js +1 -1
- package/chunks/nve-warning-level.component.js +4 -4
- package/chunks/ref.js +4 -4
- package/chunks/shoelace.js +771 -771
- package/chunks/static-html.js +4 -4
- package/chunks/unsafe-html.js +1 -1
- package/components/nve-accordion/nve-accordion.component.js +1 -1
- package/components/nve-badge/nve-badge.component.js +1 -1
- package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +1 -1
- package/components/nve-combobox/nve-combobox.component.js +1 -1
- package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +3 -2
- package/components/nve-icon/nve-icon.component.js +1 -1
- package/components/nve-link-card/nve-link-card.component.js +6 -6
- package/components/nve-message-card/nve-message-card.component.js +1 -1
- package/components/nve-navigation-card/nve-navigation-card.component.js +8 -8
- package/components/nve-paragraph/nve-paragraph.component.js +1 -1
- package/components/nve-stepper/nve-step/nve-step.component.js +21 -21
- package/components/nve-stepper/nve-stepper-mobile.component.js +1 -1
- package/components/nve-stepper/nve-stepper.component.js +1 -1
- package/components/nve-switch/nve-switch.component.js +1 -1
- package/components/nve-tab/nve-tab.component.js +1 -1
- package/components/nve-tab-group/nve-tab-group.component.js +6 -6
- package/components/nve-tab-panel/nve-tab-panel.component.js +1 -1
- package/components/nve-tag/nve-tag.component.js +6 -6
- package/components/nve-textarea/nve-textarea.component.js +12 -12
- package/css/nve.css +54 -45
- package/css/nve_dark.css +16 -7
- package/css/rme.css +54 -45
- package/css/rme_dark.css +16 -7
- package/css/varsom.css +54 -45
- package/css/varsom_dark.css +16 -7
- package/custom-elements.json +1 -1
- package/nve-designsystem.d.ts +1 -1
- package/package.json +8 -5
package/chunks/static-html.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region node_modules/lit-html/static.js
|
|
1
|
+
import { a as e } from "./lit.js";
|
|
2
|
+
//#region .pnpm/lit-html@3.3.3/node_modules/lit-html/static.js
|
|
3
3
|
var t = Symbol.for(""), n = (e) => {
|
|
4
4
|
if (e?.r === t) return e?._$litStatic$;
|
|
5
5
|
}, r = (e) => ({
|
|
6
6
|
_$litStatic$: e,
|
|
7
7
|
r: t
|
|
8
8
|
}), i = (e, ...n) => ({
|
|
9
|
-
_$litStatic$: n.reduce((
|
|
9
|
+
_$litStatic$: n.reduce((t, n, r) => t + ((e) => {
|
|
10
10
|
if (e._$litStatic$ !== void 0) return e._$litStatic$;
|
|
11
11
|
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`);
|
|
12
|
-
})(n) + e[r + 1]
|
|
12
|
+
})(n) + e[r + 1], e[0]),
|
|
13
13
|
r: t
|
|
14
14
|
}), a = /* @__PURE__ */ new Map(), o = ((e) => (t, ...r) => {
|
|
15
15
|
let i = r.length, o, s, c = [], l = [], u, d = 0, f = !1;
|
package/chunks/unsafe-html.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, r as t } from "./lit.js";
|
|
2
2
|
import { i as n, n as r, r as i } from "./class-map.js";
|
|
3
|
-
//#region node_modules/lit-html/directives/unsafe-html.js
|
|
3
|
+
//#region .pnpm/lit-html@3.3.3/node_modules/lit-html/directives/unsafe-html.js
|
|
4
4
|
var a = class extends i {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
if (super(t), this.it = e, t.type !== n.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
import a from "./nve-carousel-thumbnail.styles.js";
|
|
4
4
|
//#region src/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { a as n, o as r, s as i, t as a } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as o } from "../../chunks/unsafe-html.js";
|
|
4
4
|
import { n as s, t as c } from "../../chunks/ref.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
//#region src/components/nve-darkmode-switch/nve-darkmode-switch.component.ts
|
|
4
4
|
var a = class extends t {
|
|
@@ -6,7 +6,8 @@ var a = class extends t {
|
|
|
6
6
|
super(), this.testId = "", this.darkmode = !1, this.darkmodeclass = "darkmode", this.localStorageVariable = "preferdarkmode";
|
|
7
7
|
}
|
|
8
8
|
toggleDarkmode(e) {
|
|
9
|
-
|
|
9
|
+
let t = e.target;
|
|
10
|
+
this.darkmode = !!t?.checked, localStorage.setItem(this.localStorageVariable, this.darkmode.toString()), this.darkmode ? document.documentElement.classList.add(this.darkmodeclass) : document.documentElement.classList.remove(this.darkmodeclass);
|
|
10
11
|
}
|
|
11
12
|
connectedCallback() {
|
|
12
13
|
super.connectedCallback();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e, t } from "../../chunks/chunk.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as n, t as r } from "../../chunks/lit.js";
|
|
3
3
|
import { a as i, o as a, s as o, t as s } from "../../chunks/decorate.js";
|
|
4
4
|
import { t as c } from "../../chunks/class-map.js";
|
|
5
5
|
import { t as l } from "../../chunks/if-defined.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
2
|
import { o as r, s as i, t as a } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as o } from "../../chunks/class-map.js";
|
|
4
4
|
import { t as s } from "../../chunks/if-defined.js";
|
|
@@ -22,17 +22,17 @@ var l = class extends n {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
renderContent() {
|
|
25
|
-
return
|
|
25
|
+
return e`
|
|
26
26
|
<slot name="icon"></slot>
|
|
27
27
|
<div class="link-card__content">
|
|
28
28
|
<div part="label" class="link-card__label">${this.label}</div>
|
|
29
|
-
${this.additionalText ?
|
|
29
|
+
${this.additionalText ? e`<div part="additional-text" class="link-card__additional-text">${this.additionalText}</div>` : t}
|
|
30
30
|
</div>
|
|
31
31
|
<nve-icon aria-hidden="true" slot="suffix" name="${this.getIconName()}"></nve-icon>
|
|
32
32
|
`;
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ?
|
|
35
|
+
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? e` <div
|
|
36
36
|
part="link-card"
|
|
37
37
|
testId="${s(this.testId)}"
|
|
38
38
|
class=${o({
|
|
@@ -42,14 +42,14 @@ var l = class extends n {
|
|
|
42
42
|
})}
|
|
43
43
|
>
|
|
44
44
|
${this.renderContent()}
|
|
45
|
-
</div>` :
|
|
45
|
+
</div>` : e`
|
|
46
46
|
<a
|
|
47
47
|
testId="${s(this.testId)}"
|
|
48
48
|
?download=${this.clickAction === "download"}
|
|
49
49
|
part="link-card"
|
|
50
50
|
class="link-card link-card--${this.size} link-card--${this.variant}"
|
|
51
51
|
href=${s(this.clickAction === "mail" ? `mailto:${this.href}` : this.href)}
|
|
52
|
-
target=${this.clickAction === "external" ? "_blank" :
|
|
52
|
+
target=${this.clickAction === "external" ? "_blank" : t}
|
|
53
53
|
>${this.renderContent()}
|
|
54
54
|
</a>
|
|
55
55
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
2
|
import { o as r, s as i, t as a } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as o } from "../../chunks/if-defined.js";
|
|
4
4
|
import "../nve-icon/nve-icon.component.js";
|
|
@@ -20,34 +20,34 @@ var c = class extends n {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
renderContent() {
|
|
23
|
-
return
|
|
23
|
+
return e`
|
|
24
24
|
<div part="content" class="navigation-card__content">
|
|
25
|
-
${this.iconPath ?
|
|
25
|
+
${this.iconPath ? e`<img
|
|
26
26
|
part="leading-icon"
|
|
27
27
|
src="${this.iconPath}"
|
|
28
28
|
alt=""
|
|
29
29
|
aria-hidden="true"
|
|
30
30
|
class="navigation-card__icon"
|
|
31
|
-
/>` :
|
|
31
|
+
/>` : t}
|
|
32
32
|
<h2 part="label" class="navigation-card__label">${this.label}</h2>
|
|
33
|
-
${!this.iconPath && this.additionalText ?
|
|
33
|
+
${!this.iconPath && this.additionalText ? e`<p part="additional-text" class="navigation-card__additional-text">${this.additionalText}</p>` : t}
|
|
34
34
|
</div>
|
|
35
35
|
<nve-icon aria-hidden="true" name="${this.getIconName()}" class="navigation-card__arrow" />
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ?
|
|
39
|
+
return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? e`
|
|
40
40
|
<div part="navigation-card" class="navigation-card" testid=${o(this.testId)}>
|
|
41
41
|
${this.renderContent()}
|
|
42
42
|
</div>
|
|
43
|
-
` :
|
|
43
|
+
` : e`
|
|
44
44
|
<a
|
|
45
45
|
testid=${o(this.testId)}
|
|
46
46
|
?download=${this.clickAction === "download"}
|
|
47
47
|
part="navigation-card"
|
|
48
48
|
class="navigation-card"
|
|
49
49
|
href="${o(this.href)}"
|
|
50
|
-
target=${this.clickAction === "external" ? "_blank" :
|
|
50
|
+
target=${this.clickAction === "external" ? "_blank" : t}
|
|
51
51
|
>
|
|
52
52
|
${this.renderContent()}
|
|
53
53
|
</a>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
import a from "./nve-paragraph.styles.js";
|
|
4
4
|
//#region src/components/nve-paragraph/nve-paragraph.component.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../../chunks/lit.js";
|
|
2
2
|
import { o as n, r, s as i, t as a } from "../../../chunks/decorate.js";
|
|
3
3
|
import o from "./nve-step.styles.js";
|
|
4
4
|
//#region src/components/nve-stepper/nve-step/nve-step.component.ts
|
|
@@ -6,7 +6,7 @@ var s = /* @__PURE__ */ function(e) {
|
|
|
6
6
|
return e[e.NotStarted = 0] = "NotStarted", e[e.Started = 1] = "Started", e[e.Active = 2] = "Active", e[e.Done = 3] = "Done", e[e.Error = 4] = "Error", e;
|
|
7
7
|
}({}), c = class extends t {
|
|
8
8
|
constructor(...e) {
|
|
9
|
-
super(...e), this.label = "", this.index = 0, this.state =
|
|
9
|
+
super(...e), this.label = "", this.index = 0, this.state = 0, this.selectedStepIndex = 0, this.isSelected = !1, this.isLast = !1, this.entranceAllowed = !1, this.orientation = "horizontal", this.hideStateText = !1, this.hideDescriptions = !1;
|
|
10
10
|
}
|
|
11
11
|
firstUpdated() {
|
|
12
12
|
this.style.setProperty("--flex-grow", this.isLast ? "0" : "1");
|
|
@@ -23,19 +23,19 @@ var s = /* @__PURE__ */ function(e) {
|
|
|
23
23
|
iconForState(e) {
|
|
24
24
|
let t = "";
|
|
25
25
|
switch (e) {
|
|
26
|
-
case
|
|
26
|
+
case 0:
|
|
27
27
|
t = "circle";
|
|
28
28
|
break;
|
|
29
|
-
case
|
|
29
|
+
case 2:
|
|
30
30
|
t = "radio_button_checked";
|
|
31
31
|
break;
|
|
32
|
-
case
|
|
32
|
+
case 1:
|
|
33
33
|
t = "trip_origin";
|
|
34
34
|
break;
|
|
35
|
-
case
|
|
35
|
+
case 3:
|
|
36
36
|
t = "check_circle";
|
|
37
37
|
break;
|
|
38
|
-
case
|
|
38
|
+
case 4:
|
|
39
39
|
t = "error";
|
|
40
40
|
break;
|
|
41
41
|
default:
|
|
@@ -46,35 +46,35 @@ var s = /* @__PURE__ */ function(e) {
|
|
|
46
46
|
}
|
|
47
47
|
getStateText(e) {
|
|
48
48
|
switch (e) {
|
|
49
|
-
case
|
|
50
|
-
case
|
|
51
|
-
case
|
|
52
|
-
case
|
|
53
|
-
case
|
|
49
|
+
case 0: return "Ikke påbegynt";
|
|
50
|
+
case 2: return "Aktiv";
|
|
51
|
+
case 1: return "Påbegynt";
|
|
52
|
+
case 3: return "Fullført";
|
|
53
|
+
case 4: return "Feil";
|
|
54
54
|
default: return "Ikke påbegynt";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
getStateColorClass(e) {
|
|
58
58
|
switch (e) {
|
|
59
|
-
case
|
|
60
|
-
case
|
|
61
|
-
case
|
|
62
|
-
case
|
|
59
|
+
case 0: return "state-not-started-color";
|
|
60
|
+
case 2: return "state-started-color";
|
|
61
|
+
case 3: return "state-done-color";
|
|
62
|
+
case 4: return "state-error-color";
|
|
63
63
|
default: return "state-not-started-color";
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
getLabelClass(e) {
|
|
67
67
|
switch (e) {
|
|
68
|
-
case
|
|
69
|
-
case
|
|
68
|
+
case 0: return "state-not-started-color";
|
|
69
|
+
case 4: return "state-error-color";
|
|
70
70
|
default: return "";
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
getIconClass(e) {
|
|
74
74
|
switch (e) {
|
|
75
|
-
case
|
|
76
|
-
case
|
|
77
|
-
case
|
|
75
|
+
case 1: return "";
|
|
76
|
+
case 0: return "state-not-started-icon-color filled-icon";
|
|
77
|
+
case 4: return "state-error-color filled-icon";
|
|
78
78
|
default: return "filled-icon";
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
import a from "./nve-stepper-mobile.styles.js";
|
|
4
4
|
//#region src/components/nve-stepper/nve-stepper-mobile.component.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
import { StepState as a } from "./nve-step/nve-step.component.js";
|
|
4
4
|
import o from "./nve-stepper.styles.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { a as n, o as r, r as i, s as a, t as o } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as s } from "../../chunks/class-map.js";
|
|
4
4
|
import { t as c } from "../../chunks/if-defined.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
2
|
import { a as r, o as i, s as a, t as o } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as s } from "../../chunks/class-map.js";
|
|
4
4
|
import { t as c } from "../../chunks/if-defined.js";
|
|
@@ -157,7 +157,7 @@ var d = class extends n {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
render() {
|
|
160
|
-
return
|
|
160
|
+
return e`
|
|
161
161
|
<div
|
|
162
162
|
part="base"
|
|
163
163
|
class="tab-group"
|
|
@@ -175,7 +175,7 @@ var d = class extends n {
|
|
|
175
175
|
>
|
|
176
176
|
<slot name="nav"></slot>
|
|
177
177
|
</div>
|
|
178
|
-
${this.canScrollBack && this.isOverflow ?
|
|
178
|
+
${this.canScrollBack && this.isOverflow ? e`
|
|
179
179
|
<div
|
|
180
180
|
aria-hidden="true"
|
|
181
181
|
part="button-backward-base"
|
|
@@ -185,8 +185,8 @@ var d = class extends n {
|
|
|
185
185
|
<nve-icon name="chevron_backward"></nve-icon>
|
|
186
186
|
</nve-button>
|
|
187
187
|
</div>
|
|
188
|
-
` :
|
|
189
|
-
${this.canScrollForward && this.isOverflow ?
|
|
188
|
+
` : t}
|
|
189
|
+
${this.canScrollForward && this.isOverflow ? e`
|
|
190
190
|
<div
|
|
191
191
|
part="button-forward-base"
|
|
192
192
|
aria-hidden="true"
|
|
@@ -196,7 +196,7 @@ var d = class extends n {
|
|
|
196
196
|
<nve-icon name="chevron_forward"></nve-icon>
|
|
197
197
|
</nve-button>
|
|
198
198
|
</div>
|
|
199
|
-
` :
|
|
199
|
+
` : t}
|
|
200
200
|
</div>
|
|
201
201
|
<slot part="body"></slot>
|
|
202
202
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, t } from "../../chunks/lit.js";
|
|
2
2
|
import { o as n, s as r, t as i } from "../../chunks/decorate.js";
|
|
3
3
|
import a from "./nve-tab-panel.styles.js";
|
|
4
4
|
//#region src/components/nve-tab-panel/nve-tab-panel.component.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
2
|
import { o as r, s as i, t as a } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as o } from "../../chunks/class-map.js";
|
|
4
4
|
import s from "./nve-tag.styles.js";
|
|
@@ -20,7 +20,7 @@ var c = class extends n {
|
|
|
20
20
|
this.dispatchEvent(e);
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return
|
|
23
|
+
return e`
|
|
24
24
|
<span
|
|
25
25
|
part="base"
|
|
26
26
|
class=${o({
|
|
@@ -38,20 +38,20 @@ var c = class extends n {
|
|
|
38
38
|
})}
|
|
39
39
|
>
|
|
40
40
|
<slot name="prefix"
|
|
41
|
-
>${this.dot ?
|
|
41
|
+
>${this.dot ? e`<svg width="11" height="10" viewBox="0 0 11 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
42
42
|
<circle cx="5.5" cy="5" r="5" fill="currentcolor" />
|
|
43
|
-
</svg> ` :
|
|
43
|
+
</svg> ` : t}</slot
|
|
44
44
|
>
|
|
45
45
|
<slot part="text"></slot>
|
|
46
46
|
<slot name="extra" part="extra">${this.extraText}</slot>
|
|
47
|
-
${this.closeable ?
|
|
47
|
+
${this.closeable ? e`<button
|
|
48
48
|
part="close"
|
|
49
49
|
class="tag-close"
|
|
50
50
|
aria-label="${this.closeAriaLabel}"
|
|
51
51
|
@click=${this.closeButtonClick}
|
|
52
52
|
>
|
|
53
53
|
<nve-icon name="close"></nve-icon>
|
|
54
|
-
</button>` :
|
|
54
|
+
</button>` : t}
|
|
55
55
|
</span>
|
|
56
56
|
`;
|
|
57
57
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, n as t, t as n } from "../../chunks/lit.js";
|
|
2
2
|
import { a as r, o as i, r as a, s as o, t as s } from "../../chunks/decorate.js";
|
|
3
3
|
import { t as c } from "../../chunks/class-map.js";
|
|
4
4
|
import { t as l } from "../../chunks/if-defined.js";
|
|
@@ -62,20 +62,20 @@ var f = class extends n {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
let n = !!this.querySelector("[slot=\"label\"]");
|
|
65
|
-
return
|
|
65
|
+
return e`
|
|
66
66
|
<div part="form-control" class=${c({
|
|
67
67
|
"form-control": !0,
|
|
68
68
|
"form-control--has-label": this.label
|
|
69
69
|
})}>
|
|
70
|
-
${n ?
|
|
70
|
+
${n ? e`<slot name="label"></slot>` : this.label ? e`<nve-label
|
|
71
71
|
id="label"
|
|
72
72
|
value=${this.label}
|
|
73
73
|
size="small"
|
|
74
74
|
tooltip=${l(this.tooltip)}
|
|
75
|
-
></nve-label>` :
|
|
76
|
-
${this.helpText ?
|
|
75
|
+
></nve-label>` : t}
|
|
76
|
+
${this.helpText ? e` <div part="help-text-container" class="textarea__help-text__container">
|
|
77
77
|
<span class="textarea__help-text" aria-hidden=${this.helpText ? "false" : "true"}>${this.helpText}</span>
|
|
78
|
-
</div>` :
|
|
78
|
+
</div>` : t}
|
|
79
79
|
|
|
80
80
|
<div part="base" class="textarea__base">
|
|
81
81
|
<textarea
|
|
@@ -105,15 +105,15 @@ var f = class extends n {
|
|
|
105
105
|
Må gjøres sånn fordi vi vil ikke begrense textarea__base brede til fit-content (da textarea kan aldri ta så mye plass som er
|
|
106
106
|
tilgjengelig i nettleseren og man må alltid sette brede på den manuelt. Nei takk.) -->
|
|
107
107
|
<!-- Foreløpig kan man ha enten 'lock' eller 'error' ikone -->
|
|
108
|
-
${this.disabled || this.showErrorMessage ?
|
|
109
|
-
${this.disabled ?
|
|
110
|
-
${this.showErrorMessage ?
|
|
111
|
-
</div>` :
|
|
108
|
+
${this.disabled || this.showErrorMessage ? e`<div class="textarea__icon__container">
|
|
109
|
+
${this.disabled ? e`<nve-icon name="lock"></nve-icon>` : null}
|
|
110
|
+
${this.showErrorMessage ? e`<nve-icon class="textarea__icon--error" name="error"></nve-icon>` : null}
|
|
111
|
+
</div>` : t}
|
|
112
112
|
</div>
|
|
113
113
|
<div part="hint-text-container" class="textarea__hint-text__container">
|
|
114
114
|
<!-- Ikke vis hint dersom feil -->
|
|
115
|
-
${!this.showErrorMessage && this.hint ?
|
|
116
|
-
${this.showErrorMessage ?
|
|
115
|
+
${!this.showErrorMessage && this.hint ? e`<span class="textarea__hint" aria-hidden=${this.hint ? "false" : "true"}>${this.hint}</span>` : t}
|
|
116
|
+
${this.showErrorMessage ? e`<span class="textarea__help-text textarea__help-text--error">${this.errorMessage}</span>` : t}
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
119
|
`;
|
package/css/nve.css
CHANGED
|
@@ -112,6 +112,15 @@
|
|
|
112
112
|
--color-shades-functional-red-999: #411616;
|
|
113
113
|
--color-shades-functional-red-000: #ffebee;
|
|
114
114
|
--color-shades-functional-red-050: #ffd8de;
|
|
115
|
+
--color-shades-functional-danger-100: #ffb8b8;
|
|
116
|
+
--color-shades-functional-danger-200: #ff8f8f;
|
|
117
|
+
--color-shades-functional-danger-400: #ff3333;
|
|
118
|
+
--color-shades-functional-danger-600: #e50000;
|
|
119
|
+
--color-shades-functional-danger-800: #b20000;
|
|
120
|
+
--color-shades-functional-danger-900: #800000;
|
|
121
|
+
--color-shades-functional-danger-999: #4d0000;
|
|
122
|
+
--color-shades-functional-danger-050: #ffd6d6;
|
|
123
|
+
--color-shades-functional-danger-000: #ffebeb;
|
|
115
124
|
--color-shades-functional-orange-100: #ffe3c2;
|
|
116
125
|
--color-shades-functional-orange-150: #ffd9ad;
|
|
117
126
|
--color-shades-functional-orange-200: #ffc98a;
|
|
@@ -253,7 +262,7 @@
|
|
|
253
262
|
--box-shadow-none: 0 0 0 0 rgba(0,0,0,0);
|
|
254
263
|
--box-shadow-soft: -59px 104px 33px 0 rgba(0,0,0,0.00), -38px 67px 31px 0 rgba(0,0,0,0.00), -21px 37px 26px 0 rgba(0,0,0,0.01), -9px 17px 19px 0 rgba(0,0,0,0.02), -2px 4px 11px 0 rgba(0,0,0,0.03);
|
|
255
264
|
--box-shadow-hard: -45px 80px 26px 0 rgba(0,0,0,0.00), -29px 51px 23px 0 rgba(0,0,0,0.01), -16px 29px 20px 0 rgba(0,0,0,0.02), -7px 13px 15px 0 rgba(0,0,0,0.03), -2px 3px 8px 0 rgba(0,0,0,0.04);
|
|
256
|
-
--box-shadow-header: 0 4px
|
|
265
|
+
--box-shadow-header: 0 4px 32px 0 rgba(0,0,0,0.02);
|
|
257
266
|
--box-shadow-dropdown: 0 54px 15px 0 rgba(0,0,0,0.00), 0 35px 14px 0 rgba(0,0,0,0.00), 0 19px 12px 0 rgba(0,0,0,0.02), 0 9px 9px 0 rgba(0,0,0,0.03), 0 2px 5px 0 rgba(0,0,0,0.03);
|
|
258
267
|
--boolean-brand-nve: true;
|
|
259
268
|
--boolean-brand-varsom: false;
|
|
@@ -389,18 +398,18 @@
|
|
|
389
398
|
--color-dangerlevel-background-default-level1: var(--color-shades-functional-green-500);
|
|
390
399
|
--color-dangerlevel-background-default-level2: var(--color-shades-functional-yellow-500);
|
|
391
400
|
--color-dangerlevel-background-default-level3: var(--color-shades-functional-orange-400);
|
|
392
|
-
--color-dangerlevel-background-default-level4: var(--color-shades-functional-
|
|
393
|
-
--color-dangerlevel-background-default-level5: var(--color-shades-functional-
|
|
401
|
+
--color-dangerlevel-background-default-level4: var(--color-shades-functional-danger-400);
|
|
402
|
+
--color-dangerlevel-background-default-level5: var(--color-shades-functional-danger-900);
|
|
394
403
|
--color-dangerlevel-background-mute-level1: var(--color-shades-functional-green-150);
|
|
395
404
|
--color-dangerlevel-background-mute-level2: var(--color-shades-functional-yellow-200);
|
|
396
405
|
--color-dangerlevel-background-mute-level3: var(--color-shades-functional-orange-150);
|
|
397
|
-
--color-dangerlevel-background-mute-level4: var(--color-shades-functional-
|
|
398
|
-
--color-dangerlevel-background-mute-level5: var(--color-shades-functional-
|
|
406
|
+
--color-dangerlevel-background-mute-level4: var(--color-shades-functional-danger-050);
|
|
407
|
+
--color-dangerlevel-background-mute-level5: var(--color-shades-functional-danger-200);
|
|
399
408
|
--color-dangerlevel-background-subtle-level1: var(--color-shades-functional-green-100);
|
|
400
409
|
--color-dangerlevel-background-subtle-level2: var(--color-shades-functional-yellow-100);
|
|
401
410
|
--color-dangerlevel-background-subtle-level3: var(--color-shades-functional-orange-050);
|
|
402
|
-
--color-dangerlevel-background-subtle-level4: var(--color-shades-functional-
|
|
403
|
-
--color-dangerlevel-background-subtle-level5: var(--color-shades-functional-
|
|
411
|
+
--color-dangerlevel-background-subtle-level4: var(--color-shades-functional-danger-000);
|
|
412
|
+
--color-dangerlevel-background-subtle-level5: var(--color-shades-functional-danger-200);
|
|
404
413
|
--color-dangerlevel-foreground-default-level1: var(--color-shades-functional-neutralgrey-999);
|
|
405
414
|
--color-dangerlevel-foreground-default-level2: var(--color-shades-functional-neutralgrey-999);
|
|
406
415
|
--color-dangerlevel-foreground-default-level3: var(--color-shades-functional-neutralgrey-999);
|
|
@@ -660,48 +669,48 @@
|
|
|
660
669
|
--sizing-fixed-sizing-2x-large: var(--dimension-14x);
|
|
661
670
|
--sizing-fixed-sizing-3x-large: var(--dimension-16x);
|
|
662
671
|
--typography-heading-x-large: var(--font-weight-semibold) var(--font-size-3x-large)/var(--line-height-0) var(--font-family-primary-family);
|
|
663
|
-
--typography-heading-large: var(--font-weight-semibold) var(--font-size-2x-large)/
|
|
672
|
+
--typography-heading-large: var(--font-weight-semibold) var(--font-size-2x-large)/1.2 var(--font-family-primary-family);
|
|
664
673
|
--typography-heading-medium: var(--font-weight-semibold) var(--font-size-x-large)/var(--line-height-2) var(--font-family-primary-family);
|
|
665
|
-
--typography-heading-small: var(--font-weight-semibold) var(--font-size-large)/
|
|
666
|
-
--typography-heading-x-small: var(--font-weight-semibold) var(--font-size-medium)/
|
|
667
|
-
--typography-subheading-large: var(--font-weight-regular) var(--font-size-2x-large)/
|
|
674
|
+
--typography-heading-small: var(--font-weight-semibold) var(--font-size-large)/1.3 var(--font-family-primary-family);
|
|
675
|
+
--typography-heading-x-small: var(--font-weight-semibold) var(--font-size-medium)/1.3 var(--font-family-primary-family);
|
|
676
|
+
--typography-subheading-large: var(--font-weight-regular) var(--font-size-2x-large)/1.2 var(--font-family-primary-family);
|
|
668
677
|
--typography-subheading-medium: var(--font-weight-regular) var(--font-size-x-large)/var(--line-height-2) var(--font-family-primary-family);
|
|
669
|
-
--typography-subheading-small: var(--font-weight-regular) var(--font-size-large)/
|
|
670
|
-
--typography-lead-large-regular: var(--font-weight-regular) var(--font-size-large)/
|
|
671
|
-
--typography-lead-large-semibold: var(--font-weight-semibold) var(--font-size-large)/
|
|
672
|
-
--typography-lead-medium-regular: var(--font-weight-regular) var(--font-size-medium)/
|
|
673
|
-
--typography-lead-medium-semibold: var(--font-weight-semibold) var(--font-size-medium)/
|
|
678
|
+
--typography-subheading-small: var(--font-weight-regular) var(--font-size-large)/1.3 var(--font-family-primary-family);
|
|
679
|
+
--typography-lead-large-regular: var(--font-weight-regular) var(--font-size-large)/1.4 var(--font-family-primary-family);
|
|
680
|
+
--typography-lead-large-semibold: var(--font-weight-semibold) var(--font-size-large)/1.4 var(--font-family-primary-family);
|
|
681
|
+
--typography-lead-medium-regular: var(--font-weight-regular) var(--font-size-medium)/1.5 var(--font-family-primary-family);
|
|
682
|
+
--typography-lead-medium-semibold: var(--font-weight-semibold) var(--font-size-medium)/1.5 var(--font-family-primary-family);
|
|
674
683
|
--font-size-small: var(--dimension-4-5x); /** 16 px */
|
|
675
|
-
--typography-lead-small-regular: var(--font-weight-regular) var(--font-size-small)/
|
|
676
|
-
--typography-lead-small-semibold: var(--font-weight-semibold) var(--font-size-small)/
|
|
677
|
-
--typography-body-large: var(--font-weight-regular) var(--font-size-medium)/
|
|
678
|
-
--typography-body-large-underline: var(--font-weight-regular) var(--font-size-medium)/
|
|
679
|
-
--typography-body-medium: var(--font-weight-regular) var(--font-size-small)/
|
|
680
|
-
--typography-body-medium-underline: var(--font-weight-regular) var(--font-size-small)/
|
|
681
|
-
--typography-body-small: var(--font-weight-regular) var(--font-size-x-small)/
|
|
682
|
-
--typography-body-small-underline: var(--font-weight-regular) var(--font-size-x-small)/
|
|
683
|
-
--typography-body-x-small: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
684
|
-
--typography-body-x-small-underline: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
685
|
-
--typography-body-compact-large-compact: var(--font-weight-regular) var(--font-size-medium)/
|
|
686
|
-
--typography-body-compact-large-underline-compact: var(--font-weight-regular) var(--font-size-medium)/
|
|
687
|
-
--typography-body-compact-medium-compact: var(--font-weight-regular) var(--font-size-small)/
|
|
688
|
-
--typography-body-compact-medium-underline-compact: var(--font-weight-regular) var(--font-size-small)/
|
|
689
|
-
--typography-body-compact-small-compact: var(--font-weight-regular) var(--font-size-x-small)/
|
|
690
|
-
--typography-body-compact-small-underline-compact: var(--font-weight-regular) var(--font-size-x-small)/
|
|
691
|
-
--typography-body-compact-x-small-compact: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
692
|
-
--typography-body-compact-x-small-underline-compact: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
693
|
-
--typography-detailtext-caption: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
694
|
-
--typography-detailtext-caps-large: var(--font-weight-semibold) var(--font-size-medium)/
|
|
695
|
-
--typography-detailtext-caps-small: var(--font-weight-semibold) var(--font-size-x-small)/
|
|
696
|
-
--typography-label-large: var(--font-weight-semibold) var(--font-size-medium)/
|
|
697
|
-
--typography-label-large-light: var(--font-weight-regular) var(--font-size-medium)/
|
|
698
|
-
--typography-label-medium: var(--font-weight-semibold) var(--font-size-small)/
|
|
699
|
-
--typography-label-medium-light: var(--font-weight-regular) var(--font-size-small)/
|
|
700
|
-
--typography-label-small: var(--font-weight-semibold) var(--font-size-x-small)/
|
|
701
|
-
--typography-label-small-light: var(--font-weight-regular) var(--font-size-x-small)/
|
|
684
|
+
--typography-lead-small-regular: var(--font-weight-regular) var(--font-size-small)/1.5 var(--font-family-primary-family);
|
|
685
|
+
--typography-lead-small-semibold: var(--font-weight-semibold) var(--font-size-small)/1.5 var(--font-family-primary-family);
|
|
686
|
+
--typography-body-large: var(--font-weight-regular) var(--font-size-medium)/1.5 var(--font-family-primary-family);
|
|
687
|
+
--typography-body-large-underline: var(--font-weight-regular) var(--font-size-medium)/1.5 var(--font-family-primary-family);
|
|
688
|
+
--typography-body-medium: var(--font-weight-regular) var(--font-size-small)/1.5 var(--font-family-primary-family);
|
|
689
|
+
--typography-body-medium-underline: var(--font-weight-regular) var(--font-size-small)/1.5 var(--font-family-primary-family);
|
|
690
|
+
--typography-body-small: var(--font-weight-regular) var(--font-size-x-small)/1.5 var(--font-family-primary-family);
|
|
691
|
+
--typography-body-small-underline: var(--font-weight-regular) var(--font-size-x-small)/1.5 var(--font-family-primary-family);
|
|
692
|
+
--typography-body-x-small: var(--font-weight-regular) var(--font-size-2x-small)/1.5 var(--font-family-primary-family);
|
|
693
|
+
--typography-body-x-small-underline: var(--font-weight-regular) var(--font-size-2x-small)/1.5 var(--font-family-primary-family);
|
|
694
|
+
--typography-body-compact-large-compact: var(--font-weight-regular) var(--font-size-medium)/1.2 var(--font-family-primary-family);
|
|
695
|
+
--typography-body-compact-large-underline-compact: var(--font-weight-regular) var(--font-size-medium)/1.2 var(--font-family-primary-family);
|
|
696
|
+
--typography-body-compact-medium-compact: var(--font-weight-regular) var(--font-size-small)/1.2 var(--font-family-primary-family);
|
|
697
|
+
--typography-body-compact-medium-underline-compact: var(--font-weight-regular) var(--font-size-small)/1.2 var(--font-family-primary-family);
|
|
698
|
+
--typography-body-compact-small-compact: var(--font-weight-regular) var(--font-size-x-small)/1.2 var(--font-family-primary-family);
|
|
699
|
+
--typography-body-compact-small-underline-compact: var(--font-weight-regular) var(--font-size-x-small)/1.2 var(--font-family-primary-family);
|
|
700
|
+
--typography-body-compact-x-small-compact: var(--font-weight-regular) var(--font-size-2x-small)/1.2 var(--font-family-primary-family);
|
|
701
|
+
--typography-body-compact-x-small-underline-compact: var(--font-weight-regular) var(--font-size-2x-small)/1.2 var(--font-family-primary-family);
|
|
702
|
+
--typography-detailtext-caption: var(--font-weight-regular) var(--font-size-2x-small)/1.5 var(--font-family-primary-family);
|
|
703
|
+
--typography-detailtext-caps-large: var(--font-weight-semibold) var(--font-size-medium)/1.5 var(--font-family-primary-family);
|
|
704
|
+
--typography-detailtext-caps-small: var(--font-weight-semibold) var(--font-size-x-small)/1.5 var(--font-family-primary-family);
|
|
705
|
+
--typography-label-large: var(--font-weight-semibold) var(--font-size-medium)/1.1 var(--font-family-primary-family);
|
|
706
|
+
--typography-label-large-light: var(--font-weight-regular) var(--font-size-medium)/1.1 var(--font-family-primary-family);
|
|
707
|
+
--typography-label-medium: var(--font-weight-semibold) var(--font-size-small)/1.1 var(--font-family-primary-family);
|
|
708
|
+
--typography-label-medium-light: var(--font-weight-regular) var(--font-size-small)/1.1 var(--font-family-primary-family);
|
|
709
|
+
--typography-label-small: var(--font-weight-semibold) var(--font-size-x-small)/1.1 var(--font-family-primary-family);
|
|
710
|
+
--typography-label-small-light: var(--font-weight-regular) var(--font-size-x-small)/1.1 var(--font-family-primary-family);
|
|
702
711
|
--font-size-2x-small: var(--dimension-3-5x); /** 12 px */
|
|
703
|
-
--typography-label-x-small: var(--font-weight-semibold) var(--font-size-2x-small)/
|
|
704
|
-
--typography-label-x-small-light: var(--font-weight-regular) var(--font-size-2x-small)/
|
|
712
|
+
--typography-label-x-small: var(--font-weight-semibold) var(--font-size-2x-small)/1.1 var(--font-family-primary-family);
|
|
713
|
+
--typography-label-x-small-light: var(--font-weight-regular) var(--font-size-2x-small)/1.1 var(--font-family-primary-family);
|
|
705
714
|
--font-size-x-small: var(--dimension-4x); /** 14 px */
|
|
706
715
|
--font-size-medium: var(--dimension-5x); /** 18 px */
|
|
707
716
|
--font-size-large: var(--dimension-6x); /** 20 px */
|