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,47 +1,2 @@
1
- import { n as d, t as c } from "../../chunks/property.js";
2
- import { c as u } from "../../chunks/chunk.ZH2AND3P.js";
3
- import "../../chunks/chunk.6CTB5ZDJ.js";
4
- import "../../chunks/chunk.YHLNUJ7P.js";
5
- import "../../chunks/chunk.4TUIT776.js";
6
- import m from "./nve-carousel.styles.js";
7
- var p = Object.defineProperty, h = Object.getOwnPropertyDescriptor, l = (t, r, a, o) => {
8
- for (var e = o > 1 ? void 0 : o ? h(r, a) : r, n = t.length - 1, i; n >= 0; n--)
9
- (i = t[n]) && (e = (o ? i(r, a, e) : i(e)) || e);
10
- return o && e && p(r, a, e), e;
11
- };
12
- let s = class extends u {
13
- constructor() {
14
- super(), this.testId = void 0, this.paginationCounter = !1;
15
- }
16
- /* Overskrive metoden fra shoelace, slik den ser etter nve-carousel-item isteden for sl-carousel-item */
17
- // @ts-expect-error overskriver private method
18
- isCarouselItem(t) {
19
- return t instanceof Element && t.tagName.toLowerCase() === "nve-carousel-item";
20
- }
21
- firstUpdated() {
22
- super.firstUpdated();
23
- const t = this.querySelectorAll("nve-carousel-item:not([data-clone])").length;
24
- this.shadowRoot?.getElementById("scroll-container")?.setAttribute("data-num-items", t.toString()), this.shadowRoot?.getElementById("scroll-container")?.setAttribute("data-active-item", "1"), this.addEventListener("sl-slide-change", this.handeSlideChange.bind(this));
25
- }
26
- updated(t) {
27
- super.updated(t);
28
- const r = this.querySelectorAll("nve-carousel-item:not([data-clone])").length;
29
- this.shadowRoot?.getElementById("scroll-container")?.setAttribute("data-num-items", r.toString());
30
- }
31
- handeSlideChange(t) {
32
- this.shadowRoot?.getElementById("scroll-container")?.setAttribute("data-active-item", (t.detail.index + 1).toString());
33
- }
34
- };
35
- s.styles = [u.styles, m];
36
- l([
37
- d({ reflect: !0, type: String })
38
- ], s.prototype, "testId", 2);
39
- l([
40
- d({ reflect: !0, type: Boolean })
41
- ], s.prototype, "paginationCounter", 2);
42
- s = l([
43
- c("nve-carousel")
44
- ], s);
45
- export {
46
- s as default
47
- };
1
+ import { t as e } from "../../chunks/nve-carousel.component.js";
2
+ export { e as default };
@@ -1,5 +1,6 @@
1
- import { i as a } from "../../chunks/lit-element.js";
2
- const o = a`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-carousel/nve-carousel.styles.ts
3
+ var t = e`
3
4
  :host::part(base) {
4
5
  gap: 0rem 10px;
5
6
  }
@@ -29,7 +30,7 @@ const o = a`
29
30
  }
30
31
 
31
32
  :host::part(navigation-button):hover {
32
- background-color: var(--color-interactive-secondary-background-hover);
33
+ background-color: var(--color-interactive-background-secondary-hover);
33
34
  opacity: 70%;
34
35
  transition: 0.3s;
35
36
  color: var(--color-neutrals-background-primary);
@@ -64,6 +65,5 @@ const o = a`
64
65
  background-color: var(--color-neutrals-background-primary);
65
66
  }
66
67
  `;
67
- export {
68
- o as default
69
- };
68
+ //#endregion
69
+ export { t as default };
@@ -1,40 +1,2 @@
1
- import { n, t as a } from "../../chunks/property.js";
2
- import { x as d } from "../../chunks/lit-element.js";
3
- import { c as u } from "../../chunks/chunk.IKV4VH3T.js";
4
- import "../../chunks/chunk.4TUIT776.js";
5
- import f from "./nve-carousel-item.styles.js";
6
- var m = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, s, o, i) => {
7
- for (var t = i > 1 ? void 0 : i ? v(s, o) : s, p = e.length - 1, l; p >= 0; p--)
8
- (l = e[p]) && (t = (i ? l(s, o, t) : l(t)) || t);
9
- return i && t && m(s, o, t), t;
10
- };
11
- let r = class extends u {
12
- constructor() {
13
- super(), this.testId = void 0, this.description = "";
14
- }
15
- updated(e) {
16
- super.updated(e), e.has("description") && this.style.setProperty("--nve-carousel-description", `"${this.description}"`);
17
- }
18
- render() {
19
- return d`
20
- <slot></slot>
21
- ${this.description ? d`
22
- <div class="carousel-item__description">
23
- <p>${this.description}</p>
24
- </div>` : ""}
25
- `;
26
- }
27
- };
28
- r.styles = [u.styles, f];
29
- c([
30
- n({ reflect: !0, type: String })
31
- ], r.prototype, "testId", 2);
32
- c([
33
- n({ type: String, reflect: !0 })
34
- ], r.prototype, "description", 2);
35
- r = c([
36
- a("nve-carousel-item")
37
- ], r);
38
- export {
39
- r as default
40
- };
1
+ import { t as e } from "../../chunks/nve-carousel-item.component.js";
2
+ export { e as default };
@@ -1,5 +1,6 @@
1
- import { i as o } from "../../chunks/lit-element.js";
2
- const r = o`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-carousel-item/nve-carousel-item.styles.ts
3
+ var t = e`
3
4
  :host(nve-carousel-item) {
4
5
  aspect-ratio: 16/9;
5
6
  object-fit: contain;
@@ -17,6 +18,5 @@ const r = o`
17
18
  padding: 0 var(--spacing-medium);
18
19
  }
19
20
  `;
20
- export {
21
- r as default
22
- };
21
+ //#endregion
22
+ export { t as default };
@@ -1,61 +1,51 @@
1
- import { a as d, x as u } from "../../chunks/lit-element.js";
2
- import { n as c, t as m } from "../../chunks/property.js";
3
- import h from "./nve-carousel-thumbnail.styles.js";
4
- var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (i, t, l, e) => {
5
- for (var s = e > 1 ? void 0 : e ? g(t, l) : t, o = i.length - 1, a; o >= 0; o--)
6
- (a = i[o]) && (s = (e ? a(t, l, s) : a(s)) || s);
7
- return e && s && f(t, l, s), s;
8
- };
9
- let n = class extends d {
10
- constructor() {
11
- super(), this.testId = void 0, this.carouselId = void 0;
12
- }
13
- // For å vite hvilken karusell vi skal lytte på.
14
- handleSlotChange() {
15
- const t = this.shadowRoot?.querySelector("slot")?.assignedNodes({ flatten: !0 });
16
- t.forEach((e) => {
17
- e instanceof HTMLImageElement && e.classList.add("thumbnail__image");
18
- }), t.filter((e) => e instanceof HTMLImageElement)[0].classList.add("thumbnail__image--active");
19
- }
20
- handleClick(i) {
21
- if (!this.carouselId) return;
22
- const t = document.getElementById(this.carouselId), l = i.target, s = this.shadowRoot?.querySelector("slot")?.assignedNodes({ flatten: !0 }).filter(
23
- (o) => o instanceof HTMLImageElement && o.classList.contains("thumbnail__image")
24
- );
25
- if (l.matches(".thumbnail__image") && s && t) {
26
- const o = s.indexOf(l);
27
- t.goToSlide(o);
28
- }
29
- }
30
- firstUpdated() {
31
- if (!this.carouselId) return;
32
- document.getElementById(this.carouselId).addEventListener("sl-slide-change", (t) => {
33
- const e = this.shadowRoot?.querySelector("slot")?.assignedNodes({ flatten: !0 }).filter(
34
- (a) => a instanceof HTMLImageElement && a.classList.contains("thumbnail__image")
35
- ), s = t.detail.index, o = e[s];
36
- e?.forEach((a) => a.classList.remove("thumbnail__image--active")), o?.classList.add("thumbnail__image--active");
37
- });
38
- }
39
- render() {
40
- return u`
1
+ import { a as e, t } from "../../chunks/lit.js";
2
+ import { o as n, s as r, t as i } from "../../chunks/decorate.js";
3
+ import a from "./nve-carousel-thumbnail.styles.js";
4
+ //#region src/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.ts
5
+ var o = class extends t {
6
+ static {
7
+ this.styles = [a];
8
+ }
9
+ constructor() {
10
+ super(), this.testId = void 0, this.carouselId = void 0;
11
+ }
12
+ handleSlotChange() {
13
+ let e = (this.shadowRoot?.querySelector("slot"))?.assignedNodes({ flatten: !0 });
14
+ e.forEach((e) => {
15
+ e instanceof HTMLImageElement && e.classList.add("thumbnail__image");
16
+ }), e.filter((e) => e instanceof HTMLImageElement)[0].classList.add("thumbnail__image--active");
17
+ }
18
+ handleClick(e) {
19
+ if (!this.carouselId) return;
20
+ let t = document.getElementById(this.carouselId), n = e.target, r = (this.shadowRoot?.querySelector("slot"))?.assignedNodes({ flatten: !0 }).filter((e) => e instanceof HTMLImageElement && e.classList.contains("thumbnail__image"));
21
+ if (n.matches(".thumbnail__image") && r && t) {
22
+ let e = r.indexOf(n);
23
+ t.goToSlide(e);
24
+ }
25
+ }
26
+ firstUpdated() {
27
+ this.carouselId && document.getElementById(this.carouselId).addEventListener("sl-slide-change", (e) => {
28
+ let t = (this.shadowRoot?.querySelector("slot"))?.assignedNodes({ flatten: !0 }).filter((e) => e instanceof HTMLImageElement && e.classList.contains("thumbnail__image")), n = t[e.detail.index];
29
+ t?.forEach((e) => e.classList.remove("thumbnail__image--active")), n?.classList.add("thumbnail__image--active");
30
+ });
31
+ }
32
+ render() {
33
+ return e`
41
34
  <div class="thumbnail">
42
35
  <div class="thumbnail__scroller" @click="${this.handleClick}">
43
36
  <slot @slotchange="${this.handleSlotChange}"></slot>
44
37
  </div>
45
38
  </div>
46
39
  `;
47
- }
48
- };
49
- n.styles = [h];
50
- r([
51
- c({ reflect: !0, type: String })
52
- ], n.prototype, "testId", 2);
53
- r([
54
- c({ reflect: !0, type: String })
55
- ], n.prototype, "carouselId", 2);
56
- n = r([
57
- m("nve-carousel-thumbnail")
58
- ], n);
59
- export {
60
- n as default
40
+ }
61
41
  };
42
+ i([n({
43
+ reflect: !0,
44
+ type: String
45
+ })], o.prototype, "testId", void 0), i([n({
46
+ reflect: !0,
47
+ type: String
48
+ })], o.prototype, "carouselId", void 0), o = i([r("nve-carousel-thumbnail")], o);
49
+ var s = o;
50
+ //#endregion
51
+ export { s as default };
@@ -1,5 +1,6 @@
1
- import { i as t } from "../../chunks/lit-element.js";
2
- const i = t`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.ts
3
+ var t = e`
3
4
  .thumbnail {
4
5
  display: flex;
5
6
  justify-content: center;
@@ -34,6 +35,5 @@ const i = t`
34
35
  opacity: 1;
35
36
  }
36
37
  `;
37
- export {
38
- i as default
39
- };
38
+ //#endregion
39
+ export { t as default };
@@ -1,34 +1,2 @@
1
- import { t as i } from "../../chunks/property.js";
2
- import "../../chunks/lit-element.js";
3
- import { c as n } from "../../chunks/chunk.D5YQDJ7X.js";
4
- import "../../chunks/chunk.SI4ACBFK.js";
5
- import "../../chunks/chunk.3RPBFEDE.js";
6
- import "../../chunks/chunk.YHLNUJ7P.js";
7
- import "../../chunks/chunk.4TUIT776.js";
8
- import p from "./nve-checkbox.styles.js";
9
- var v = Object.getOwnPropertyDescriptor, d = (e, o, a, c) => {
10
- for (var t = c > 1 ? void 0 : c ? v(o, a) : o, r = e.length - 1, l; r >= 0; r--)
11
- (l = e[r]) && (t = l(t) || t);
12
- return t;
13
- };
14
- let s = class extends n {
15
- constructor() {
16
- super();
17
- }
18
- connectedCallback() {
19
- super.connectedCallback(), this.addEventListener("sl-invalid", (e) => {
20
- e.preventDefault();
21
- });
22
- }
23
- disconnectedCallback() {
24
- super.disconnectedCallback(), this.removeEventListener("sl-invalid", () => {
25
- });
26
- }
27
- };
28
- s.styles = [n.styles, p];
29
- s = d([
30
- i("nve-checkbox")
31
- ], s);
32
- export {
33
- s as default
34
- };
1
+ import { t as e } from "../../chunks/nve-checkbox.component.js";
2
+ export { e as default };
@@ -1,5 +1,6 @@
1
- import { i as r } from "../../chunks/lit-element.js";
2
- const a = r`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-checkbox/nve-checkbox.styles.ts
3
+ var t = e`
3
4
  .error {
4
5
  border-color: var(--color-feedback-background-emphasized-error) !important;
5
6
  }
@@ -23,7 +24,7 @@ const a = r`
23
24
  }
24
25
 
25
26
  :host([data-invalid])::part(control) {
26
- border-color: var(--color-feedback-background-emphasized-error);
27
+ border-color: var(--color-feedback-border-emphasized-error);
27
28
  }
28
29
  :host([data-invalid])::part(control control--checked),
29
30
  :host([data-user-invalid])::part(control control--indeterminate) {
@@ -31,7 +32,7 @@ const a = r`
31
32
  }
32
33
 
33
34
  :host(:not([disabled]):hover)::part(control) {
34
- border-color: var(--color-neutrals-foreground-subtle, #006b99) !important;
35
+ border-color: var(--color-neutrals-foreground-subtle) !important;
35
36
  }
36
37
 
37
38
  sl-icon {
@@ -51,6 +52,5 @@ const a = r`
51
52
  font: var(--typography-label-x-small-light);
52
53
  }
53
54
  `;
54
- export {
55
- a as default
56
- };
55
+ //#endregion
56
+ export { t as default };
@@ -1,152 +1,2 @@
1
- import { a as p, E as c, x as d } from "../../chunks/lit-element.js";
2
- import { n as a, t as f } from "../../chunks/property.js";
3
- import { r as u } from "../../chunks/state.js";
4
- import { e as v } from "../../chunks/query.js";
5
- import "../nve-label/nve-label.component.js";
6
- import g from "./nve-checkbox-group.styles.js";
7
- import { t as m } from "../../chunks/updateInvalidProperty.js";
8
- function b(e, t) {
9
- if (e === t) return !0;
10
- if (typeof e != "object" || e === null || typeof t != "object" || t === null)
11
- return !1;
12
- let s = Object.keys(e), o = Object.keys(t);
13
- if (s.length !== o.length) return !1;
14
- for (let l of s)
15
- if (!o.includes(l) || !b(e[l], t[l])) return !1;
16
- return !0;
17
- }
18
- var y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, i = (e, t, s, o) => {
19
- for (var l = o > 1 ? void 0 : o ? k(t, s) : t, n = e.length - 1, h; n >= 0; n--)
20
- (h = e[n]) && (l = (o ? h(t, s, l) : h(l)) || l);
21
- return o && l && y(t, s, l), l;
22
- };
23
- let r = class extends p {
24
- constructor() {
25
- super(), this.disabled = !1, this.required = !1, this.orientation = "vertical", this.requiredLabel = "*Obligatorisk", this.showErrorMessage = !1, this.isCustomValidationError = !1, this.updateSelectedValues = (e) => {
26
- const t = e.target;
27
- if (t.checked)
28
- this.selectedValues || (this.selectedValues = []), this.selectedValues.push(t.value);
29
- else if (this.selectedValues) {
30
- const s = this.selectedValues.findIndex((o) => b(o, t.value));
31
- s !== -1 && this.selectedValues.splice(s, 1);
32
- }
33
- this.requestUpdate();
34
- };
35
- }
36
- connectedCallback() {
37
- super.connectedCallback(), this.closest("form")?.addEventListener("submit", this.handleSubmit.bind(this)), this.addEventListener("sl-change", this.handleChange.bind(this));
38
- }
39
- disconnectedCallback() {
40
- super.disconnectedCallback(), this.removeEventListener("sl-change", this.handleChange), this.removeEventListener("submit", this.handleSubmit);
41
- }
42
- firstUpdated() {
43
- if (this.requiredLabel && this.style.setProperty("--sl-checkbox-required-content", `"${this.requiredLabel}"`), !this.selectedValues?.length) return;
44
- Array.from(this.querySelectorAll("nve-checkbox")).forEach((t) => {
45
- this.selectedValues?.includes(t.value) ? t.checked = !0 : t.checked = !1;
46
- });
47
- }
48
- updated(e) {
49
- if (super.updated(e), e.has("disabled")) {
50
- const t = Array.from(this.querySelectorAll("nve-checkbox"));
51
- m(t, this.disabled, "disabled");
52
- }
53
- }
54
- /** En 'fake' metode som gjør custom validering enklere på checkbox-group komponent */
55
- setCustomValidity(e = "") {
56
- const t = !e.length;
57
- t ? this.resetValidation() : (this.errorMessage = e, this.makeInvalid()), this.isCustomValidationError = !t, this.toggleValidationAttributes(t);
58
- }
59
- handleSubmit(e) {
60
- e.preventDefault(), this.checkValidity();
61
- }
62
- handleChange(e) {
63
- this.updateSelectedValues(e), this.checkValidity();
64
- }
65
- /** Sjekker validity basert på constraint validation. Man kan legge til flere properties. */
66
- checkValidity() {
67
- if (!this.required || this.isCustomValidationError) return;
68
- let e = !0;
69
- this.required && (e = this.checkIfRequiredValid()), e ? this.resetValidation() : this.makeInvalid(), this.toggleValidationAttributes(e);
70
- }
71
- /** Toggler riktig validering attribute for å vise riktig style */
72
- toggleValidationAttributes(e) {
73
- this.toggleAttribute("data-valid", e), this.toggleAttribute("data-user-valid", e), this.toggleAttribute("data-invalid", !e), this.toggleAttribute("data-user-invalid", !e);
74
- }
75
- resetValidation() {
76
- Array.from(this.querySelectorAll("nve-checkbox")).forEach((t) => {
77
- t.toggleAttribute("data-user-invalid", !1), t.setCustomValidity("");
78
- }), this.showErrorMessage = !1;
79
- }
80
- makeInvalid() {
81
- Array.from(this.querySelectorAll("nve-checkbox")).forEach((s) => {
82
- s.toggleAttribute("data-user-invalid", !0), s.setCustomValidity(this.errorMessage || "Error");
83
- }), this.showErrorMessage = !0;
84
- const t = new Event("sl-invalid", {
85
- bubbles: !0,
86
- cancelable: !0
87
- });
88
- this.dispatchEvent(t);
89
- }
90
- checkIfRequiredValid() {
91
- return Array.from(this.querySelectorAll("nve-checkbox")).some((s) => s.checked);
92
- }
93
- render() {
94
- return d`
95
- <fieldset
96
- class="checkbox-group"
97
- aria-required=${this.required}
98
- aria-labelledby="label"
99
- aria-describedby="error-message"
100
- aria-errormessage="error-message"
101
- >
102
- ${this.label ? d`<div class="checkbox-group__label">
103
- <nve-label id="label" value=${this.label} size="small" tooltip=${this.tooltip}></nve-label>
104
- </div>` : c}
105
- <slot class="checkbox-group__checkboxes"></slot>
106
- ${this.showErrorMessage ? d`<span role="alert" id="error-message" class="checkbox-group__error-message"
107
- >${this.errorMessage || c}</span
108
- >` : c}
109
- </fieldset>
110
- `;
111
- }
112
- };
113
- r.styles = [g];
114
- i([
115
- a({ type: Boolean, reflect: !0 })
116
- ], r.prototype, "disabled", 2);
117
- i([
118
- a({ type: Boolean, reflect: !0 })
119
- ], r.prototype, "required", 2);
120
- i([
121
- a()
122
- ], r.prototype, "label", 2);
123
- i([
124
- a()
125
- ], r.prototype, "tooltip", 2);
126
- i([
127
- a({ type: String, reflect: !0 })
128
- ], r.prototype, "orientation", 2);
129
- i([
130
- a()
131
- ], r.prototype, "errorMessage", 2);
132
- i([
133
- a()
134
- ], r.prototype, "requiredLabel", 2);
135
- i([
136
- a({ type: Array })
137
- ], r.prototype, "selectedValues", 2);
138
- i([
139
- v("slot")
140
- ], r.prototype, "slot", 2);
141
- i([
142
- u()
143
- ], r.prototype, "showErrorMessage", 2);
144
- i([
145
- u()
146
- ], r.prototype, "isCustomValidationError", 2);
147
- r = i([
148
- f("nve-checkbox-group")
149
- ], r);
150
- export {
151
- r as default
152
- };
1
+ import { t as e } from "../../chunks/nve-checkbox-group.component.js";
2
+ export { e as default };
@@ -1,5 +1,6 @@
1
- import { i as e } from "../../chunks/lit-element.js";
2
- const o = e`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-checkbox-group/nve-checkbox-group.styles.ts
3
+ var t = e`
3
4
  :host {
4
5
  --sl-checkbox-required-content: '*Obligatorisk';
5
6
  }
@@ -53,6 +54,5 @@ const o = e`
53
54
  width: unset;
54
55
  }
55
56
  `;
56
- export {
57
- o as default
58
- };
57
+ //#endregion
58
+ export { t as default };