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.
Files changed (197) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +163 -226
  2. package/chunks/chunk.36O46B5H.js +15 -15
  3. package/chunks/chunk.4TUIT776.js +78 -96
  4. package/chunks/chunk.5JY5FUCG.js +965 -1245
  5. package/chunks/chunk.5P45LHIX.js +668 -96
  6. package/chunks/chunk.6CTB5ZDJ.js +107 -100
  7. package/chunks/chunk.B4BZKR24.js +29 -39
  8. package/chunks/chunk.D5YQDJ7X.js +122 -166
  9. package/chunks/chunk.EA437WHD.js +5 -5
  10. package/chunks/chunk.GI7VDIWX.js +14 -15
  11. package/chunks/chunk.GMYPQTFK.js +18 -20
  12. package/chunks/chunk.HVTXQL7M.js +191 -215
  13. package/chunks/chunk.IKV4VH3T.js +18 -16
  14. package/chunks/chunk.IVVHNXMC.js +26 -27
  15. package/chunks/chunk.JHOXTQXA.js +65 -74
  16. package/chunks/chunk.JXOKFADN.js +63 -90
  17. package/chunks/chunk.K7JGTRV7.js +24 -23
  18. package/chunks/chunk.KPLQLAWP.js +132 -147
  19. package/chunks/chunk.LD4M4QGE.js +61 -74
  20. package/chunks/chunk.MSKEYBDI.js +53 -71
  21. package/chunks/chunk.NYIIDP5N.js +39 -45
  22. package/chunks/chunk.RWUUFNUL.js +91 -114
  23. package/chunks/chunk.SAPQLUO4.js +249 -228
  24. package/chunks/chunk.SI4ACBFK.js +139 -5
  25. package/chunks/chunk.TP2GB2HO.js +361 -460
  26. package/chunks/chunk.UDWRA64J.js +185 -223
  27. package/chunks/chunk.URTPIBTY.js +119 -151
  28. package/chunks/chunk.VESXC477.js +63 -66
  29. package/chunks/chunk.XA43ZQPC.js +198 -313
  30. package/chunks/chunk.XQ2OKYYA.js +25 -26
  31. package/chunks/chunk.XZNBUGX7.js +6 -6
  32. package/chunks/chunk.YHLNUJ7P.js +93 -116
  33. package/chunks/chunk.ZH2AND3P.js +340 -399
  34. package/chunks/chunk.ZL53POKZ.js +61 -156
  35. package/chunks/chunk.js +20 -0
  36. package/chunks/class-map.js +49 -45
  37. package/chunks/decorate.js +105 -0
  38. package/chunks/directive-helpers.js +5 -7
  39. package/chunks/if-defined.js +5 -5
  40. package/chunks/lit.js +525 -0
  41. package/chunks/live.js +24 -24
  42. package/chunks/nve-alert.component.js +163 -0
  43. package/chunks/nve-carousel-item.component.js +36 -0
  44. package/chunks/nve-carousel.component.js +41 -0
  45. package/chunks/nve-checkbox-group.component.js +114 -0
  46. package/chunks/nve-checkbox.component.js +28 -0
  47. package/chunks/nve-dialog.component.js +39 -0
  48. package/chunks/nve-divider.component.js +23 -0
  49. package/chunks/nve-drawer.component.js +40 -0
  50. package/chunks/nve-dropdown.component.js +83 -0
  51. package/chunks/nve-input.component.js +80 -0
  52. package/chunks/nve-label.component.js +89 -0
  53. package/chunks/nve-menu-item.component.js +35 -0
  54. package/chunks/nve-menu.component.js +17 -0
  55. package/chunks/nve-option.component.js +27 -0
  56. package/chunks/nve-popup.component.js +15 -0
  57. package/chunks/nve-radio-button.component.js +20 -0
  58. package/chunks/nve-radio-group.component.js +78 -0
  59. package/chunks/nve-radio.component.js +18 -0
  60. package/chunks/nve-select.component.js +58 -0
  61. package/chunks/nve-skeleton.component.js +20 -0
  62. package/chunks/nve-spinner.component.js +23 -0
  63. package/chunks/nve-tooltip.component.js +20 -0
  64. package/chunks/nve-warning-level.component.js +57 -0
  65. package/chunks/ref.js +75 -84
  66. package/chunks/shoelace.js +10006 -0
  67. package/chunks/static-html.js +27 -0
  68. package/chunks/unsafe-html.js +24 -20
  69. package/chunks/updateInvalidProperty.js +7 -7
  70. package/chunks/watch.js +20 -20
  71. package/components/nve-accordion/nve-accordion.component.js +24 -30
  72. package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
  73. package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
  74. package/components/nve-alert/nve-alert.component.js +2 -227
  75. package/components/nve-alert/nve-alert.styles.js +45 -27
  76. package/components/nve-badge/nve-badge.component.js +41 -45
  77. package/components/nve-badge/nve-badge.styles.js +33 -31
  78. package/components/nve-button/nve-button.component.d.ts +110 -10
  79. package/components/nve-button/nve-button.component.js +146 -39
  80. package/components/nve-button/nve-button.styles.js +214 -157
  81. package/components/nve-carousel/nve-carousel.component.js +2 -47
  82. package/components/nve-carousel/nve-carousel.styles.js +6 -6
  83. package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
  84. package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
  85. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
  86. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
  87. package/components/nve-checkbox/nve-checkbox.component.js +2 -34
  88. package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
  89. package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
  90. package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
  91. package/components/nve-combobox/nve-combobox.component.js +222 -440
  92. package/components/nve-combobox/nve-combobox.styles.js +6 -6
  93. package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
  94. package/components/nve-dialog/nve-dialog-styles.js +6 -6
  95. package/components/nve-dialog/nve-dialog.component.js +2 -54
  96. package/components/nve-divider/nve-divider.component.js +2 -30
  97. package/components/nve-drawer/nve-drawer.component.js +2 -44
  98. package/components/nve-drawer/nve-drawer.styles.js +6 -6
  99. package/components/nve-dropdown/nve-dropdown.component.js +2 -79
  100. package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
  101. package/components/nve-heading/nve-heading.component.d.ts +29 -0
  102. package/components/nve-heading/nve-heading.component.js +45 -0
  103. package/components/nve-heading/nve-heading.styles.d.ts +2 -0
  104. package/components/nve-heading/nve-heading.styles.js +41 -0
  105. package/components/nve-icon/nve-icon.component.js +145 -164
  106. package/components/nve-icon/nve-icon.styles.js +11 -6
  107. package/components/nve-icon/offline-icons.js +16 -13
  108. package/components/nve-input/nve-input.component.js +2 -100
  109. package/components/nve-input/nve-input.styles.js +5 -5
  110. package/components/nve-label/nve-label.component.js +2 -115
  111. package/components/nve-label/nve-label.styles.js +5 -5
  112. package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
  113. package/components/nve-link-card/nve-link-card.component.js +44 -80
  114. package/components/nve-link-card/nve-link-card.styles.js +71 -66
  115. package/components/nve-menu/nve-menu.component.js +2 -22
  116. package/components/nve-menu/nve-menu.styles.js +5 -5
  117. package/components/nve-menu-item/nve-menu-item.component.js +2 -43
  118. package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
  119. package/components/nve-message-card/nve-message-card.component.js +61 -91
  120. package/components/nve-message-card/nve-message-card.styles.js +24 -27
  121. package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
  122. package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
  123. package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
  124. package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
  125. package/components/nve-option/nve-option.component.js +2 -41
  126. package/components/nve-option/nve-option.styles.js +5 -5
  127. package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
  128. package/components/nve-paragraph/nve-paragraph.component.js +26 -0
  129. package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
  130. package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
  131. package/components/nve-popup/nve-popup.component.js +2 -22
  132. package/components/nve-radio/nve-radio.component.js +2 -23
  133. package/components/nve-radio/nve-radio.styles.js +5 -5
  134. package/components/nve-radio-button/nve-radio-button.component.js +2 -25
  135. package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
  136. package/components/nve-radio-group/nve-radio-group.component.js +2 -119
  137. package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
  138. package/components/nve-relative-time/nve-relative-time.component.js +21 -56
  139. package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
  140. package/components/nve-select/nve-select.component.js +2 -80
  141. package/components/nve-select/nve-select.styles.js +5 -5
  142. package/components/nve-skeleton/nve-skeleton.component.js +2 -27
  143. package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
  144. package/components/nve-spinner/nve-spinner.component.js +2 -31
  145. package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
  146. package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
  147. package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
  148. package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
  149. package/components/nve-stepper/nve-stepper.component.js +94 -139
  150. package/components/nve-stepper/nve-stepper.styles.js +5 -5
  151. package/components/nve-switch/nve-switch.component.js +75 -107
  152. package/components/nve-switch/nve-switch.styles.js +7 -7
  153. package/components/nve-tab/nve-tab.component.js +30 -42
  154. package/components/nve-tab/nve-tab.styles.js +7 -7
  155. package/components/nve-tab-group/nve-tab-group.component.js +180 -260
  156. package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
  157. package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
  158. package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
  159. package/components/nve-tag/nve-tag.component.d.ts +3 -3
  160. package/components/nve-tag/nve-tag.component.js +71 -72
  161. package/components/nve-tag/nve-tag.styles.js +23 -22
  162. package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
  163. package/components/nve-textarea/nve-textarea.component.js +112 -173
  164. package/components/nve-textarea/nve-textarea.styles.js +10 -5
  165. package/components/nve-tooltip/nve-tooltip.component.js +2 -30
  166. package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
  167. package/components/nve-warning-level/nve-warning-level.component.js +2 -78
  168. package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
  169. package/css/global.css +13 -55
  170. package/css/nve.css +1048 -393
  171. package/css/nve_dark.css +406 -305
  172. package/css/rme.css +1050 -395
  173. package/css/rme_dark.css +408 -307
  174. package/css/shoelace-styles.css +539 -0
  175. package/css/varsom.css +1046 -391
  176. package/css/varsom_dark.css +404 -303
  177. package/custom-elements.json +2905 -12389
  178. package/fonts/LICENSE.txt +37 -0
  179. package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
  180. package/interfaces/NveComponent.interface.js +0 -1
  181. package/nve-designsystem.d.ts +5 -0
  182. package/nve-designsystem.js +46 -86
  183. package/package.json +26 -8
  184. package/registerIcons/systemLibraryCustomization.js +23 -91
  185. package/vite-env.d.js +0 -1
  186. package/chunks/chunk.3RPBFEDE.js +0 -162
  187. package/chunks/chunk.JCXLDPQF.js +0 -225
  188. package/chunks/chunk.JQBT7BOV.js +0 -8446
  189. package/chunks/chunk.MAQXLKQ7.js +0 -598
  190. package/chunks/lit-element.js +0 -508
  191. package/chunks/property.js +0 -37
  192. package/chunks/query.js +0 -13
  193. package/chunks/state.js +0 -7
  194. package/chunks/static.js +0 -26
  195. package/nve-designsystem.css +0 -1
  196. package/vscode.css-custom-data.json +0 -621
  197. package/vscode.html-custom-data.json +0 -2354
@@ -1,115 +1,2 @@
1
- import { a as u, x as a } from "../../chunks/lit-element.js";
2
- import { n, t as c } from "../../chunks/property.js";
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 { i as l } from "../../chunks/lit-element.js";
2
- const t = l`
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
- export {
58
- t as styles
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 v, E as h, x as s } from "../../chunks/lit-element.js";
2
- import { n as i, t as m } from "../../chunks/property.js";
3
- import { e as f } from "../../chunks/class-map.js";
4
- import { o as p } from "../../chunks/if-defined.js";
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
- var k = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (o, a, l, n) => {
8
- for (var r = n > 1 ? void 0 : n ? _(a, l) : a, d = o.length - 1, c; d >= 0; d--)
9
- (c = o[d]) && (r = (n ? c(a, l, r) : c(r)) || r);
10
- return n && r && k(a, l, r), r;
11
- };
12
- let t = class extends v {
13
- constructor() {
14
- super(...arguments), this.label = "", this.size = "medium", this.variant = "primary", this.testId = void 0, this.clickAction = "internal", this.href = void 0, this.visited = !1;
15
- }
16
- /**
17
- * Returnerer ikonnavnet som vises på kortet basert på clickAction.
18
- */
19
- getIconName() {
20
- switch (this.clickAction) {
21
- case "internal":
22
- return "arrow_forward";
23
- case "download":
24
- return "download";
25
- case "external":
26
- return "open_in_new";
27
- case "mail":
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 ? s`<div part="additional-text" class="link-card__additional-text">${this.additionalText}</div>` : h}
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
- render() {
43
- return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? s` <div
33
+ }
34
+ render() {
35
+ return this.parentElement?.tagName.toLowerCase() === "a" || this.parentElement?.getAttribute("role") === "link" ? e` <div
44
36
  part="link-card"
45
- testId="${p(this.testId)}"
46
- class=${f({
47
- "link-card": !0,
48
- "link-card--visited": this.visited,
49
- [`link-card--${this.size}`]: !0,
50
- [`link-card--${this.variant}`]: !0
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>` : s`
45
+ </div>` : e`
55
46
  <a
56
- testId="${p(this.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=${p(this.clickAction === "mail" ? `mailto:${this.href}` : this.href)}
61
- target=${this.clickAction === "external" ? "_blank" : h}
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 { i as r } from "../../chunks/lit-element.js";
2
- const i = r`
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
- /*bruker color på a, ikke link-card fordi link-card overskriver standard lenke farge i remmeverker som next js som har sin egen
17
- wrappar rundt lenke og som støtter :visited*/
21
+ /* Setter farge <a> for å sikre riktig lenkefarge uansett rammeverk eller browser */
18
22
  a {
19
- color: var(--color-neutrals-foreground-primary, #0d0d0e);
23
+ color: var(--color-neutrals-foreground-primary);
20
24
  }
21
25
 
22
- .link-card--visited,
23
- a:visited {
24
- color: var(--color-interactive-links-visited);
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:focus {
28
- outline: var(--color-interactive-primary-foreground-border-focus, #008ffb) solid 2px;
31
+ .link-card:active {
32
+ border-color: var(--color-neutrals-border-mute);
29
33
  }
30
34
 
31
- .link-card:hover .link-card__label {
32
- text-decoration: underline;
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) 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-medium) var(--spacing-medium) var(--spacing-large);
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-medium) var(--spacing-medium) var(--spacing-medium) var(--spacing-large);
51
+ padding: var(--spacing-large);
51
52
  min-height: var(--sizing-x-small);
52
53
  }
53
54
 
54
- .link-card__label {
55
- font-size: 1rem;
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-card__label--small {
68
- font-size: 0.875rem;
59
+ .link-card--contrast {
60
+ background: var(--color-neutrals-background-primary-contrast);
69
61
  }
70
62
 
71
- .link-card__label--large {
72
- font-size: 1.125rem;
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: space-between;
70
+ justify-content: center;
71
+ flex: 1;
79
72
  }
80
73
 
81
- .link-card__additional-text {
82
- color: inherit;
83
- font-family: 'Source Sans Pro';
84
- font-style: normal;
85
- font-weight: 400;
86
- line-height: 120%;
87
- padding-top: 4px;
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--visited .link-card__additional-text,
92
- a:visited .link-card__additional-text {
93
- color: var(--color-interactive-links-visited);
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--primary {
97
- background: var(--color-neutrals-background-primary, #fff);
91
+ .link-card:active .link-card__label {
92
+ text-decoration-thickness: 10%;
93
+ text-underline-offset: 16%;
98
94
  }
99
95
 
100
- .link-card--primary:hover {
101
- background: var(--color-neutrals-background-secondary, #e4e5e7);
96
+ .link-card--small .link-card__label {
97
+ font: var(--typography-label-small);
102
98
  }
103
99
 
104
- .link-card--contrast {
105
- background: var(--color-neutrals-background-primary-contrast, #f7f7f8);
100
+ .link-card--large .link-card__label {
101
+ font: var(--typography-heading-x-small);
106
102
  }
107
103
 
108
- .link-card--contrast:hover {
109
- background: var(--color-neutrals-background-secondary, #e4e5e7);
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--secondary {
113
- background: var(--color-neutrals-background-secondary, #e4e5e7);
114
+ .link-card--small .link-card__additional-text {
115
+ font: var(--typography-body-compact-x-small-compact);
114
116
  }
115
117
 
116
- .link-card--secondary:hover {
117
- border: 2px solid var(--color-neutrals-foreground-primary, #0d0d0e);
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-neutrals-foreground-primary);
128
+ color: var(--color-brand-foreground-primary);
123
129
  }
124
130
  `;
125
- export {
126
- i as default
127
- };
131
+ //#endregion
132
+ export { t as default };
@@ -1,22 +1,2 @@
1
- import { m as p } from "../../chunks/chunk.JHOXTQXA.js";
2
- import "../../chunks/chunk.4TUIT776.js";
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 { i as o } from "../../chunks/lit-element.js";
2
- const a = o`
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
- export {
23
- a as default
24
- };
23
+ //#endregion
24
+ export { t as default };
@@ -1,43 +1,2 @@
1
- import { m } from "../../chunks/chunk.HVTXQL7M.js";
2
- import "../../chunks/lit-element.js";
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 { i as r } from "../../chunks/lit-element.js";
2
- const o = r`
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-primary-border-focus, #008ffb);
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-outlined-foreground-default);
95
+ color: var(--color-interactive-border-accessibility-focus);
95
96
  background-color: transparent;
96
97
  }
97
98
  `;
98
- export {
99
- o as default
100
- };
99
+ //#endregion
100
+ export { t as default };