nve-designsystem 0.1.49 → 0.1.51
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.7O2CYFQX.js +1 -1
- package/chunks/chunk.GMVRWIWU.js +1 -1
- package/chunks/class-map.js +7 -7
- package/chunks/live.js +1 -1
- package/components/nve-alert/nve-alert.component.js +1 -1
- package/components/nve-badge/nve-badge.component.d.ts +7 -5
- package/components/nve-badge/nve-badge.component.js +31 -134
- package/components/nve-badge/nve-badge.styles.js +62 -38
- package/components/nve-button/nve-button.component.js +1 -1
- package/components/nve-button/nve-button.styles.js +35 -21
- package/components/nve-checkbox/nve-checkbox.component.js +1 -1
- package/components/nve-dialog/nve-dialog.component.js +1 -1
- package/components/nve-dropdown/nve-dropdown.component.js +1 -1
- package/components/nve-icon/nve-icon.component.d.ts +1 -0
- package/components/nve-icon/nve-icon.component.js +20 -17
- package/components/nve-icon/nve-icon.styles.js +15 -4
- package/components/nve-input/nve-input.component.js +1 -1
- package/components/nve-menu-item/nve-menu-item.component.js +1 -1
- package/components/nve-option/nve-option.component.js +1 -1
- package/components/nve-radio/nve-radio.component.js +1 -1
- package/components/nve-radio-button/nve-radio-button.component.js +1 -1
- package/components/nve-radio-group/nve-radio-group.component.js +3 -3
- package/components/nve-select/nve-select.component.js +3 -3
- package/components/nve-stepper/nve-step/nve-step.component.d.ts +37 -0
- package/components/nve-stepper/nve-step/nve-step.component.js +101 -0
- package/components/nve-stepper/nve-step/nve-step.styles.d.ts +2 -0
- package/components/nve-stepper/nve-step/nve-step.styles.js +65 -0
- package/components/nve-stepper/nve-stepper.component.d.ts +28 -0
- package/components/nve-stepper/nve-stepper.component.js +96 -0
- package/components/nve-stepper/nve-stepper.styles.d.ts +2 -0
- package/components/nve-stepper/nve-stepper.styles.js +76 -0
- package/components/nve-tooltip/nve-tooltip.component.js +1 -1
- package/css/nve.css +2 -2
- package/css/nve_dark.css +1 -1
- package/css/varsom.css +2 -2
- package/css/varsom_dark.css +1 -1
- package/nve-designsystem.d.ts +2 -0
- package/nve-designsystem.js +48 -42
- package/package.json +1 -1
package/chunks/chunk.7O2CYFQX.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as a, b as i, S as l } from "./chunk.JS655M6J.js";
|
|
2
2
|
import { i as c } from "./lit-element.js";
|
|
3
3
|
import { S as u } from "./chunk.2HU27ZWH.js";
|
|
4
|
-
import {
|
|
4
|
+
import { e as d } from "./class-map.js";
|
|
5
5
|
import { s as n, n as b } from "./static.js";
|
|
6
6
|
import { o as e } from "./if-defined.js";
|
|
7
7
|
import { n as s } from "./property.js";
|
package/chunks/chunk.GMVRWIWU.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as Dt, b as v, S as Ft, _ as Nt, a as $t } from "./chunk.JS655M6J.js";
|
|
2
2
|
import { i as Mt, x as yt } from "./lit-element.js";
|
|
3
|
-
import {
|
|
3
|
+
import { e as _t } from "./class-map.js";
|
|
4
4
|
import { n as P } from "./property.js";
|
|
5
5
|
import { e as Pt } from "./query.js";
|
|
6
6
|
var Wt = Mt`
|
package/chunks/class-map.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as
|
|
1
|
+
import { w as h } from "./lit-element.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
const
|
|
7
|
+
const a = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, c = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
8
8
|
class d {
|
|
9
9
|
constructor(t) {
|
|
10
10
|
}
|
|
@@ -29,7 +29,7 @@ class d {
|
|
|
29
29
|
const u = c(class extends d {
|
|
30
30
|
constructor(e) {
|
|
31
31
|
var t;
|
|
32
|
-
if (super(e), e.type !==
|
|
32
|
+
if (super(e), e.type !== a.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2)
|
|
33
33
|
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
34
34
|
}
|
|
35
35
|
render(e) {
|
|
@@ -50,12 +50,12 @@ const u = c(class extends d {
|
|
|
50
50
|
const o = !!t[s];
|
|
51
51
|
o === this.it.has(s) || (n = this.st) != null && n.has(s) || (o ? (i.add(s), this.it.add(s)) : (i.remove(s), this.it.delete(s)));
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return h;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
c as a,
|
|
58
|
+
u as e,
|
|
59
59
|
d as i,
|
|
60
|
-
|
|
60
|
+
a as t
|
|
61
61
|
};
|
package/chunks/live.js
CHANGED
|
@@ -5,7 +5,7 @@ import { L as C } from "../../chunks/chunk.MAS2SHYD.js";
|
|
|
5
5
|
import { c as z, b as i, S } from "../../chunks/chunk.JS655M6J.js";
|
|
6
6
|
import { i as $, x as y } from "../../chunks/lit-element.js";
|
|
7
7
|
import { w as g } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
8
|
-
import {
|
|
8
|
+
import { e as A } from "../../chunks/class-map.js";
|
|
9
9
|
import { n as a, t as k } from "../../chunks/property.js";
|
|
10
10
|
import { e as H } from "../../chunks/query.js";
|
|
11
11
|
import "../../chunks/chunk.2HU27ZWH.js";
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
2
|
/**
|
|
3
|
-
* En
|
|
4
|
-
* Mer info: https://shoelace.style/components/badge
|
|
3
|
+
* En liten etikett som vanligvis vises inne i eller i nærheten av en annen større grensesnittkomponent, som representerer en status, egenskap eller andre metadata.
|
|
5
4
|
* Kan også brukes med knappen som i Shoelace
|
|
6
5
|
* Importerer ingen styles fra shoelace derfor pill og pulse property skal ikke fungere.
|
|
7
6
|
* @property {string} size = small, medium eller large
|
|
7
|
+
* @property {string} variant = primary, success, neutral, warning, danger, brand
|
|
8
8
|
* @property {boolean} low = viser svakere farger på badgen
|
|
9
9
|
*/
|
|
10
|
-
export default class NveBadge extends
|
|
10
|
+
export default class NveBadge extends LitElement {
|
|
11
11
|
static styles: import("lit").CSSResult[];
|
|
12
|
-
|
|
12
|
+
/** Variant */
|
|
13
|
+
variant: 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'brand';
|
|
13
14
|
/** Størrelse på komponenten */
|
|
14
15
|
size: 'small' | 'medium' | 'large';
|
|
15
16
|
/** Viser Low variant, High er default */
|
|
16
17
|
low: boolean;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
19
|
}
|
|
18
20
|
declare global {
|
|
19
21
|
interface HTMLElementTagNameMap {
|
|
@@ -1,116 +1,32 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.badge {
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
font-size: max(12px, 0.75em);
|
|
18
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
19
|
-
letter-spacing: var(--sl-letter-spacing-normal);
|
|
20
|
-
line-height: 1;
|
|
21
|
-
border-radius: var(--sl-border-radius-small);
|
|
22
|
-
border: solid 1px var(--sl-color-neutral-0);
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
padding: 0.35em 0.6em;
|
|
25
|
-
user-select: none;
|
|
26
|
-
-webkit-user-select: none;
|
|
27
|
-
cursor: inherit;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Variant modifiers */
|
|
31
|
-
.badge--primary {
|
|
32
|
-
background-color: var(--sl-color-primary-600);
|
|
33
|
-
color: var(--sl-color-neutral-0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.badge--success {
|
|
37
|
-
background-color: var(--sl-color-success-600);
|
|
38
|
-
color: var(--sl-color-neutral-0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.badge--neutral {
|
|
42
|
-
background-color: var(--sl-color-neutral-600);
|
|
43
|
-
color: var(--sl-color-neutral-0);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.badge--warning {
|
|
47
|
-
background-color: var(--sl-color-warning-600);
|
|
48
|
-
color: var(--sl-color-neutral-0);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.badge--danger {
|
|
52
|
-
background-color: var(--sl-color-danger-600);
|
|
53
|
-
color: var(--sl-color-neutral-0);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Pill modifier */
|
|
57
|
-
.badge--pill {
|
|
58
|
-
border-radius: var(--sl-border-radius-pill);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Pulse modifier */
|
|
62
|
-
.badge--pulse {
|
|
63
|
-
animation: pulse 1.5s infinite;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.badge--pulse.badge--primary {
|
|
67
|
-
--pulse-color: var(--sl-color-primary-600);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.badge--pulse.badge--success {
|
|
71
|
-
--pulse-color: var(--sl-color-success-600);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.badge--pulse.badge--neutral {
|
|
75
|
-
--pulse-color: var(--sl-color-neutral-600);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.badge--pulse.badge--warning {
|
|
79
|
-
--pulse-color: var(--sl-color-warning-600);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.badge--pulse.badge--danger {
|
|
83
|
-
--pulse-color: var(--sl-color-danger-600);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@keyframes pulse {
|
|
87
|
-
0% {
|
|
88
|
-
box-shadow: 0 0 0 0 var(--pulse-color);
|
|
89
|
-
}
|
|
90
|
-
70% {
|
|
91
|
-
box-shadow: 0 0 0 0.5rem transparent;
|
|
92
|
-
}
|
|
93
|
-
100% {
|
|
94
|
-
box-shadow: 0 0 0 0 transparent;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
`, r = class extends v {
|
|
1
|
+
import { n as o, t as g } from "../../chunks/property.js";
|
|
2
|
+
import d from "./nve-badge.styles.js";
|
|
3
|
+
import { s as m, x as u } from "../../chunks/lit-element.js";
|
|
4
|
+
import { e as b } from "../../chunks/class-map.js";
|
|
5
|
+
var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, s = (p, t, i, a) => {
|
|
6
|
+
for (var e = a > 1 ? void 0 : a ? f(t, i) : t, n = p.length - 1, l; n >= 0; n--)
|
|
7
|
+
(l = p[n]) && (e = (a ? l(t, i, e) : l(e)) || e);
|
|
8
|
+
return a && e && v(t, i, e), e;
|
|
9
|
+
};
|
|
10
|
+
let r = class extends m {
|
|
98
11
|
constructor() {
|
|
99
|
-
super(...arguments), this.variant = "primary", this.
|
|
12
|
+
super(...arguments), this.variant = "primary", this.size = "medium", this.low = !1;
|
|
100
13
|
}
|
|
101
14
|
render() {
|
|
102
|
-
return
|
|
15
|
+
return u`
|
|
103
16
|
<span
|
|
104
17
|
part="base"
|
|
105
|
-
class=${
|
|
18
|
+
class=${b({
|
|
106
19
|
badge: !0,
|
|
107
20
|
"badge--primary": this.variant === "primary",
|
|
108
21
|
"badge--success": this.variant === "success",
|
|
109
22
|
"badge--neutral": this.variant === "neutral",
|
|
110
23
|
"badge--warning": this.variant === "warning",
|
|
111
24
|
"badge--danger": this.variant === "danger",
|
|
112
|
-
"badge--
|
|
113
|
-
"badge--
|
|
25
|
+
"badge--brand": this.variant === "brand",
|
|
26
|
+
"badge--small": this.size === "small",
|
|
27
|
+
"badge--medium": this.size === "medium",
|
|
28
|
+
"badge--large": this.size === "large",
|
|
29
|
+
low: this.low
|
|
114
30
|
})}
|
|
115
31
|
role="status"
|
|
116
32
|
>
|
|
@@ -119,38 +35,19 @@ var h = m`
|
|
|
119
35
|
`;
|
|
120
36
|
}
|
|
121
37
|
};
|
|
122
|
-
r.styles =
|
|
123
|
-
|
|
124
|
-
|
|
38
|
+
r.styles = [d];
|
|
39
|
+
s([
|
|
40
|
+
o({ type: String, reflect: !0 })
|
|
125
41
|
], r.prototype, "variant", 2);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
], r.prototype, "
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
], r.prototype, "
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
for (var e = o > 1 ? void 0 : o ? x(s, t) : s, n = d.length - 1, i; n >= 0; n--)
|
|
136
|
-
(i = d[n]) && (e = (o ? i(s, t, e) : i(e)) || e);
|
|
137
|
-
return o && e && _(s, t, e), e;
|
|
138
|
-
};
|
|
139
|
-
let a = class extends w {
|
|
140
|
-
constructor() {
|
|
141
|
-
super(), this.size = "medium", this.low = !1;
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
a.styles = [g];
|
|
145
|
-
p([
|
|
146
|
-
l({ type: String, reflect: !0 })
|
|
147
|
-
], a.prototype, "size", 2);
|
|
148
|
-
p([
|
|
149
|
-
l({ type: Boolean, reflect: !0 })
|
|
150
|
-
], a.prototype, "low", 2);
|
|
151
|
-
a = p([
|
|
152
|
-
u("nve-badge")
|
|
153
|
-
], a);
|
|
42
|
+
s([
|
|
43
|
+
o({ type: String, reflect: !0 })
|
|
44
|
+
], r.prototype, "size", 2);
|
|
45
|
+
s([
|
|
46
|
+
o({ type: Boolean, reflect: !0 })
|
|
47
|
+
], r.prototype, "low", 2);
|
|
48
|
+
r = s([
|
|
49
|
+
g("nve-badge")
|
|
50
|
+
], r);
|
|
154
51
|
export {
|
|
155
|
-
|
|
52
|
+
r as default
|
|
156
53
|
};
|
|
@@ -1,70 +1,94 @@
|
|
|
1
1
|
import { i as a } from "../../chunks/lit-element.js";
|
|
2
2
|
const e = a`
|
|
3
|
-
:host
|
|
4
|
-
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
text-align: center;
|
|
7
|
-
font: var(--label-small);
|
|
8
|
-
padding: 0.375rem 0.4375rem;
|
|
9
|
-
color: var(--interactive-primary-foreground-default, #fff);
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-flex;
|
|
10
5
|
}
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
padding: var(--spacing-x-small)
|
|
7
|
+
.badge {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
padding: var(--spacing-xx-small, 4px) var(--spacing-x-small, 8px);
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
border-radius: var(--border-radius-circle, 50px);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/* Variant modifiers */
|
|
17
|
+
.badge--brand {
|
|
18
|
+
background-color: var(--brand-primary);
|
|
19
|
+
color: var(--interactive-primary-foreground-default);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
.badge--neutral {
|
|
23
|
+
background-color: var(--feedback-background-default-neutral, #e4e5e7);
|
|
24
|
+
color: var(--feedback-foreground-default-neutral, #00131c);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
background: var(--
|
|
27
|
+
.badge--primary {
|
|
28
|
+
background-color: var(--feedback-background-emphasized-info, #1e6fdc);
|
|
29
|
+
color: var(--feedback-foreground-emphasized-info, #fff);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
background: var(--feedback-background-emphasized-success, #00814b);
|
|
32
|
+
.badge--success {
|
|
33
|
+
background-color: var(--feedback-background-emphasized-success, #00814b);
|
|
34
|
+
color: var(--feedback-foreground-emphasized-success, #fff);
|
|
35
|
+
}
|
|
36
|
+
.badge--warning {
|
|
37
|
+
background-color: var(--feedback-background-emphasized-warning, #ffd046);
|
|
38
|
+
color: var(--feedback-foreground-emphasized-warning, #0d0d0e);
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
background: var(--feedback-background-emphasized-error, #c00);
|
|
41
|
+
.badge--danger {
|
|
42
|
+
background-color: var(--feedback-background-emphasized-error, #c00);
|
|
43
|
+
color: var(--feedback-foreground-emphasized-error, #fff);
|
|
37
44
|
}
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
/* Low modifiers */
|
|
47
|
+
.low {
|
|
48
|
+
color: var(--neutrals-foreground-primary, #00131c);
|
|
42
49
|
}
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
.badge--brand.low {
|
|
52
|
+
background-color: var(--brand-light);
|
|
53
|
+
}
|
|
45
54
|
|
|
46
|
-
|
|
47
|
-
color: var(--
|
|
55
|
+
.badge--neutral.low {
|
|
56
|
+
background-color: var(--feedback-background-subtle-neutral, #f7f7f8);
|
|
48
57
|
}
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
background: var(--feedback-background-default-info, #ceeaff);
|
|
59
|
+
.badge--primary.low {
|
|
60
|
+
background-color: var(--feedback-background-default-info, #ceeaff);
|
|
52
61
|
}
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
background: var(--
|
|
63
|
+
.badge--success.low {
|
|
64
|
+
background-color: var(--feedback-background-default-success, #cbf9cb);
|
|
65
|
+
}
|
|
66
|
+
.badge--warning.low {
|
|
67
|
+
background-color: var(--feedback-background-default-warning, #ffe8a5);
|
|
68
|
+
}
|
|
69
|
+
.badge--danger.low {
|
|
70
|
+
background-color: var(--feedback-background-default-error, #ffd8de);
|
|
56
71
|
}
|
|
57
72
|
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
/* Sizing modifiers */
|
|
74
|
+
.badge--small {
|
|
75
|
+
padding: var(--spacing-xx-small, 4px) 6px;
|
|
76
|
+
font-family: 'Source Sans Pro';
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
font-style: normal;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
line-height: 10px;
|
|
60
81
|
}
|
|
61
82
|
|
|
62
|
-
|
|
63
|
-
|
|
83
|
+
.badge--medium {
|
|
84
|
+
padding: var(--spacing-xx-small, 4px) var(--spacing-x-small, 8px);
|
|
85
|
+
font: var(--label-x-small);
|
|
64
86
|
}
|
|
65
87
|
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
.badge--large {
|
|
89
|
+
// 2 piksler per top og bottom for å få 27px høyde
|
|
90
|
+
padding: calc(var(--spacing-xx-small, 4px) + 1px) 10px;
|
|
91
|
+
font: var(--label-small);
|
|
68
92
|
}
|
|
69
93
|
`;
|
|
70
94
|
export {
|
|
@@ -7,7 +7,7 @@ import { L as _ } from "../../chunks/chunk.MAS2SHYD.js";
|
|
|
7
7
|
import { S as x } from "../../chunks/chunk.2HU27ZWH.js";
|
|
8
8
|
import { w as S } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
9
9
|
import { b as e, S as w } from "../../chunks/chunk.JS655M6J.js";
|
|
10
|
-
import {
|
|
10
|
+
import { e as F } from "../../chunks/class-map.js";
|
|
11
11
|
import { s as d, n as f } from "../../chunks/static.js";
|
|
12
12
|
import { o as s } from "../../chunks/if-defined.js";
|
|
13
13
|
import { r as c } from "../../chunks/state.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as t } from "../../chunks/lit-element.js";
|
|
2
|
-
const
|
|
2
|
+
const a = t`
|
|
3
3
|
/* kan ikke bruke gap fordi den lager rom mellom slots selv om de er tomme */
|
|
4
4
|
/* derfor setter margin på ::part(label) og substraherer margin verdi i horizontal padding i selve .button klassen */
|
|
5
5
|
.button {
|
|
@@ -21,6 +21,7 @@ const r = t`
|
|
|
21
21
|
position: relative;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: 0;
|
|
24
|
+
margin-right: var(--spacing-x-small);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
:host ::slotted(nve-icon) {
|
|
@@ -35,53 +36,66 @@ const r = t`
|
|
|
35
36
|
font: var(--label-medium);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
:host([size='medium'])::part(
|
|
39
|
-
|
|
40
|
-
margin-right: var(--spacing-small);
|
|
39
|
+
:host([size='medium'])::part(label) {
|
|
40
|
+
font: var(--label-small);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
:host::part(
|
|
44
|
-
|
|
43
|
+
:host([size='small'])::part(label) {
|
|
44
|
+
font: var(--label-x-small);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
/** check if has loading if yes apply changes to has-suffix class it shouldnt be fire if loading is not here */
|
|
48
|
+
|
|
49
|
+
:host([loading]) .button--has-suffix.button--medium,
|
|
50
|
+
:host([loading]) .button--has-suffix.button--large {
|
|
51
|
+
padding-inline-end: var(--spacing-x-small);
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
:host([
|
|
52
|
-
|
|
54
|
+
:host([loading]) .button--has-suffix.button--small {
|
|
55
|
+
padding-inline-end: 0.125rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.button--has-suffix.button--medium {
|
|
59
|
+
padding-inline-end: var(--spacing-medium, 1rem);
|
|
60
|
+
}
|
|
61
|
+
.button--has-suffix.button--large {
|
|
62
|
+
padding-inline-end: var(--spacing-medium, 1rem);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host::part(base) {
|
|
66
|
+
gap: var(--spacing-x-small);
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
.button--has-prefix.button--small {
|
|
56
70
|
padding-inline-start: var(--spacing-x-small);
|
|
57
71
|
}
|
|
58
72
|
|
|
73
|
+
.button--has-prefix.button--large,
|
|
74
|
+
.button--has-prefix.button--medium {
|
|
75
|
+
padding-inline-start: var(--spacing-medium, 1rem);
|
|
76
|
+
}
|
|
77
|
+
|
|
59
78
|
.button--has-label.button--large .button__label,
|
|
60
79
|
.button--has-label.button--small .button__label,
|
|
61
80
|
.button--has-label.button--medium .button__label {
|
|
62
81
|
padding: unset;
|
|
63
82
|
}
|
|
64
83
|
|
|
65
|
-
.button--has-suffix.button--small,
|
|
66
|
-
.button--has-suffix.button--medium,
|
|
67
|
-
.button--has-suffix.button--large {
|
|
68
|
-
padding-inline-end: unset;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
84
|
.button--small {
|
|
72
85
|
height: var(--sizing-x-small);
|
|
73
86
|
min-height: unset;
|
|
74
87
|
padding: 0px;
|
|
75
88
|
}
|
|
76
89
|
.button--large {
|
|
77
|
-
height: var(--
|
|
90
|
+
height: var(--sizing-medium);
|
|
78
91
|
min-height: unset;
|
|
79
|
-
padding: var(--spacing-medium, 1rem) var(
|
|
92
|
+
padding: var(--spacing-medium, 1rem) calc(var(--spacing-medium, 1rem) - var(--spacing-x-small));
|
|
80
93
|
}
|
|
94
|
+
/* fjern gap forskjell på venstre og høyre */
|
|
81
95
|
.button--medium {
|
|
82
|
-
height: var(--
|
|
96
|
+
height: var(--sizing-small);
|
|
83
97
|
min-height: unset;
|
|
84
|
-
padding: var(--spacing-
|
|
98
|
+
padding: var(--spacing-medium, 1rem) calc(var(--spacing-medium, 1rem) - var(--spacing-x-small));
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
/* PRIMARY */
|
|
@@ -145,5 +159,5 @@ const r = t`
|
|
|
145
159
|
}
|
|
146
160
|
`;
|
|
147
161
|
export {
|
|
148
|
-
|
|
162
|
+
a as default
|
|
149
163
|
};
|
|
@@ -5,7 +5,7 @@ import { d as x } from "../../chunks/chunk.GI7VDIWX.js";
|
|
|
5
5
|
import { F as g } from "../../chunks/chunk.UEQZEZFU.js";
|
|
6
6
|
import { S as y } from "../../chunks/chunk.2HU27ZWH.js";
|
|
7
7
|
import { w as p } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
8
|
-
import {
|
|
8
|
+
import { e as _ } from "../../chunks/class-map.js";
|
|
9
9
|
import { o as C } from "../../chunks/if-defined.js";
|
|
10
10
|
import { l as u } from "../../chunks/live.js";
|
|
11
11
|
import { r as z } from "../../chunks/state.js";
|
|
@@ -7,7 +7,7 @@ import { s as u, g as d, b as c, a as g, w as k } from "../../chunks/chunk.KRRLO
|
|
|
7
7
|
import { H as q } from "../../chunks/chunk.NYIIDP5N.js";
|
|
8
8
|
import { L as P } from "../../chunks/chunk.MAS2SHYD.js";
|
|
9
9
|
import { w as O } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
10
|
-
import {
|
|
10
|
+
import { e as B } from "../../chunks/class-map.js";
|
|
11
11
|
import { o as E } from "../../chunks/if-defined.js";
|
|
12
12
|
import { n as f, t as I } from "../../chunks/property.js";
|
|
13
13
|
import { e as v } from "../../chunks/query.js";
|
|
@@ -5,7 +5,7 @@ import { S as T } from "../../chunks/chunk.GMVRWIWU.js";
|
|
|
5
5
|
import { s as g, w as u, a as c, g as f, b as m } from "../../chunks/chunk.KRRLOROJ.js";
|
|
6
6
|
import { L as _ } from "../../chunks/chunk.MAS2SHYD.js";
|
|
7
7
|
import { w as C } from "../../chunks/chunk.Q6ASPMKT.js";
|
|
8
|
-
import {
|
|
8
|
+
import { e as D } from "../../chunks/class-map.js";
|
|
9
9
|
import { n as l, t as L } from "../../chunks/property.js";
|
|
10
10
|
import { e as h } from "../../chunks/query.js";
|
|
11
11
|
import O from "./nve-dropdown.styles.js";
|
|
@@ -6,6 +6,7 @@ import { LitElement } from 'lit';
|
|
|
6
6
|
*/
|
|
7
7
|
export default class NveIcon extends LitElement {
|
|
8
8
|
static styles: import("lit").CSSResult[];
|
|
9
|
+
library: 'Outlined' | 'Sharp';
|
|
9
10
|
/** Navnet på ikonet i Material Symbols-biblioteket */
|
|
10
11
|
name: string;
|
|
11
12
|
protected firstUpdated(): void;
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import { n as
|
|
1
|
+
import { s as f, x as m } from "../../chunks/lit-element.js";
|
|
2
|
+
import { n as i, t as y } from "../../chunks/property.js";
|
|
3
3
|
import u from "./nve-icon.styles.js";
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
(p =
|
|
7
|
-
return
|
|
4
|
+
var c = Object.defineProperty, v = Object.getOwnPropertyDescriptor, a = (l, t, n, s) => {
|
|
5
|
+
for (var r = s > 1 ? void 0 : s ? v(t, n) : t, o = l.length - 1, p; o >= 0; o--)
|
|
6
|
+
(p = l[o]) && (r = (s ? p(t, n, r) : p(r)) || r);
|
|
7
|
+
return s && r && c(t, n, r), r;
|
|
8
8
|
};
|
|
9
|
-
let
|
|
9
|
+
let e = class extends f {
|
|
10
10
|
constructor() {
|
|
11
|
-
super(...arguments), this.name = "";
|
|
11
|
+
super(...arguments), this.library = "Outlined", this.name = "";
|
|
12
12
|
}
|
|
13
13
|
firstUpdated() {
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return
|
|
16
|
+
return m`<span style="font-family:Material Symbols ${this.library}">${this.name}</span>`;
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
i(
|
|
25
|
-
],
|
|
19
|
+
e.styles = [u];
|
|
20
|
+
a([
|
|
21
|
+
i({ type: String })
|
|
22
|
+
], e.prototype, "library", 2);
|
|
23
|
+
a([
|
|
24
|
+
i({ reflect: !0 })
|
|
25
|
+
], e.prototype, "name", 2);
|
|
26
|
+
e = a([
|
|
27
|
+
y("nve-icon")
|
|
28
|
+
], e);
|
|
26
29
|
export {
|
|
27
|
-
|
|
30
|
+
e as default
|
|
28
31
|
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { i as e } from "../../chunks/lit-element.js";
|
|
2
2
|
const o = e`
|
|
3
|
-
|
|
4
|
-
/* Apply Material Icons font-family to the Shadow DOM */
|
|
5
|
-
font-family: 'Material Symbols Outlined';
|
|
6
|
-
}
|
|
3
|
+
|
|
7
4
|
/* Brukes i dropdown. Eneste måten å override shadow dom for å rotere expand_more ikonet når menyen åpner */
|
|
8
5
|
:host([name='expand_more']) {
|
|
9
6
|
transform: var(--icon-rotation, none);
|
|
10
7
|
transition: transform 0.3s ease;
|
|
11
8
|
}
|
|
12
9
|
|
|
10
|
+
/* prevent icon beeing highlighted */
|
|
11
|
+
:host {
|
|
12
|
+
-webkit-touch-callout: none; /* iOS Safari */
|
|
13
|
+
-webkit-user-select: none; /* Safari */
|
|
14
|
+
-khtml-user-select: none; /* Konqueror HTML */
|
|
15
|
+
-moz-user-select: none; /* Old versions of Firefox */
|
|
16
|
+
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
17
|
+
user-select: none; /* Non-prefixed version, currently
|
|
18
|
+
supported by Chrome, Edge, Opera and Firefox */
|
|
19
|
+
}
|
|
20
|
+
:host {
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
/* we need it to center the icon */
|
|
14
25
|
:is(span) {
|
|
15
26
|
display: inline-flex;
|