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,179 +1,134 @@
1
- import { a as c, x as o } from "../../chunks/lit-element.js";
2
- import { n, t as u } from "../../chunks/property.js";
3
- import { StepState as h } from "./nve-step/nve-step.component.js";
4
- import S from "./nve-stepper.styles.js";
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 { StepState as a } from "./nve-step/nve-step.component.js";
4
+ import o from "./nve-stepper.styles.js";
5
5
  import "./nve-stepper-mobile.component.js";
6
- var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (e, t, a, p) => {
7
- for (var r = p > 1 ? void 0 : p ? f(t, a) : t, d = e.length - 1, l; d >= 0; d--)
8
- (l = e[d]) && (r = (p ? l(t, a, r) : l(r)) || r);
9
- return p && r && v(t, a, r), r;
10
- };
11
- function x() {
12
- return /Mobi|Android/i.test(navigator.userAgent);
6
+ //#region src/components/nve-stepper/nve-stepper.component.ts
7
+ function s() {
8
+ return /Mobi|Android/i.test(navigator.userAgent);
13
9
  }
14
- let s = class extends c {
15
- constructor() {
16
- super(...arguments), this.orientation = "horizontal", this.endButtonText = "Sende", this.steps = [], this.hideStepButtons = !1, this.hideMobileStepButtons = !1, this.displayMobileVersion = !1, this.hideStateText = !1, this.hideDescriptions = !1, this.selectedStepIndex = { value: 0 };
17
- }
18
- /**
19
- * Ved endring av props, re-render komponenten eksternt med document.querySelector("nve-stepper")?.reRender();
20
- * Dette er nyttig når du vil tvinge en oppdatering av komponenten uten å endre dens interne state.
21
- * Ellers vil man ikke se endringene før intern state endres.
22
- * `requestUpdate` er en innebygd Lit funksjon som planlegger en oppdatering av komponenten.
23
- */
24
- reRender() {
25
- this.requestUpdate();
26
- }
27
- /** Metode som kjøres første gang komponenten er lagt til i DOM */
28
- firstUpdated() {
29
- this.setStep(this.selectedStepIndex.value);
30
- const e = this;
31
- e.nextStep = this.nextStep.bind(this), e.prevStep = this.prevStep.bind(this), e.selectStep = this.selectStep.bind(this), e.finishSteps = this.finishSteps.bind(this), e.getCurrentIndex = this.getCurrentIndex.bind(this), e.reRender = this.reRender.bind(this);
32
- }
33
- /** Metode for å til neste steg */
34
- nextStep() {
35
- this.selectedStepIndex.value < this.steps.length - 1 && this.setStep(this.selectedStepIndex.value + 1);
36
- }
37
- /** Metode for å gå til forrige steg */
38
- prevStep() {
39
- this.selectedStepIndex.value > 0 && this.setStep(this.selectedStepIndex.value - 1);
40
- }
41
- /** Metode for å velge et spesifikt steg */
42
- selectStep(e) {
43
- this.setStep(e);
44
- }
45
- /** Metode som kjøres når alle stegene er fullført */
46
- finishSteps() {
47
- }
48
- /** Metode for å hente den gjeldende indeksen */
49
- getCurrentIndex() {
50
- return this.selectedStepIndex.value;
51
- }
52
- handleStepClick(e, t) {
53
- this.dispatchEvent(
54
- new CustomEvent("step-click", {
55
- detail: { step: e, index: t },
56
- bubbles: !0,
57
- composed: !0
58
- })
59
- );
60
- }
61
- setStep(e) {
62
- if (this.steps[e].readyForEntrance) {
63
- this.selectedStepIndex.value = e;
64
- for (let t = 0; t < this.steps.length; t++)
65
- t < e ? this.steps[t].state = h.Done : t === e ? this.steps[t].state = h.Active : this.steps[t].state !== h.NotStarted && (this.steps[t].state = h.Started), this.steps[t].isSelected = t === e;
66
- this.steps = [...this.steps];
67
- }
68
- }
69
- getExtremes() {
70
- if (this.selectedStepIndex.value === 0) return "start";
71
- if (this.selectedStepIndex.value === this.steps.length - 1)
72
- return "end";
73
- }
74
- handleMobileStepClick(e) {
75
- const t = e.detail?.action;
76
- t === "next" ? this.selectedStepIndex.value < this.steps.length - 1 ? this.nextStep() : this.finishSteps() : t === "prev" && this.prevStep();
77
- }
78
- renderBackButton() {
79
- return this.hideStepButtons ? "" : o`
10
+ var c = class extends t {
11
+ constructor(...e) {
12
+ super(...e), this.orientation = "horizontal", this.endButtonText = "Sende", this.steps = [], this.hideStepButtons = !1, this.hideMobileStepButtons = !1, this.displayMobileVersion = !1, this.hideStateText = !1, this.hideDescriptions = !1, this.selectedStepIndex = { value: 0 };
13
+ }
14
+ static {
15
+ this.styles = [o];
16
+ }
17
+ reRender() {
18
+ this.requestUpdate();
19
+ }
20
+ firstUpdated() {
21
+ this.setStep(this.selectedStepIndex.value);
22
+ let e = this;
23
+ e.nextStep = this.nextStep.bind(this), e.prevStep = this.prevStep.bind(this), e.selectStep = this.selectStep.bind(this), e.finishSteps = this.finishSteps.bind(this), e.getCurrentIndex = this.getCurrentIndex.bind(this), e.reRender = this.reRender.bind(this);
24
+ }
25
+ nextStep() {
26
+ this.selectedStepIndex.value < this.steps.length - 1 && this.setStep(this.selectedStepIndex.value + 1);
27
+ }
28
+ prevStep() {
29
+ this.selectedStepIndex.value > 0 && this.setStep(this.selectedStepIndex.value - 1);
30
+ }
31
+ selectStep(e) {
32
+ this.setStep(e);
33
+ }
34
+ finishSteps() {}
35
+ getCurrentIndex() {
36
+ return this.selectedStepIndex.value;
37
+ }
38
+ handleStepClick(e, t) {
39
+ this.dispatchEvent(new CustomEvent("step-click", {
40
+ detail: {
41
+ step: e,
42
+ index: t
43
+ },
44
+ bubbles: !0,
45
+ composed: !0
46
+ }));
47
+ }
48
+ setStep(e) {
49
+ if (this.steps[e].readyForEntrance) {
50
+ this.selectedStepIndex.value = e;
51
+ for (let t = 0; t < this.steps.length; t++) t < e ? this.steps[t].state = a.Done : t === e ? this.steps[t].state = a.Active : this.steps[t].state !== a.NotStarted && (this.steps[t].state = a.Started), this.steps[t].isSelected = t === e;
52
+ this.steps = [...this.steps];
53
+ }
54
+ }
55
+ getExtremes() {
56
+ if (this.selectedStepIndex.value === 0) return "start";
57
+ if (this.selectedStepIndex.value === this.steps.length - 1) return "end";
58
+ }
59
+ handleMobileStepClick(e) {
60
+ let t = e.detail?.action;
61
+ t === "next" ? this.selectedStepIndex.value < this.steps.length - 1 ? this.nextStep() : this.finishSteps() : t === "prev" && this.prevStep();
62
+ }
63
+ renderBackButton() {
64
+ return this.hideStepButtons ? "" : e`
80
65
  <nve-button
81
66
  .disabled=${this.getExtremes() === "start"}
82
67
  size="medium"
83
68
  variant="primary"
84
69
  @click=${this.prevStep}
85
70
  >
86
- <nve-icon slot="prefix" name="navigate_before"></nve-icon>
71
+ <nve-icon slot="start" name="navigate_before"></nve-icon>
87
72
  Forrige
88
73
  </nve-button>
89
74
  `;
90
- }
91
- isOrientationVertical() {
92
- return this.orientation === "vertical";
93
- }
94
- renderForwardButton() {
95
- return this.hideStepButtons ? "" : this.getExtremes() === "end" ? o`
75
+ }
76
+ isOrientationVertical() {
77
+ return this.orientation === "vertical";
78
+ }
79
+ renderForwardButton() {
80
+ return this.hideStepButtons ? "" : this.getExtremes() === "end" ? e`
96
81
  <nve-button size="medium" variant="primary" @click=${this.finishSteps}>
97
- <nve-icon slot="suffix" name="done"></nve-icon>
82
+ <nve-icon slot="end" name="done"></nve-icon>
98
83
  ${this.endButtonText}
99
84
  </nve-button>
100
- ` : o`
85
+ ` : e`
101
86
  <nve-button .disabled=${this.getExtremes() === "end"} size="medium" variant="primary" @click=${this.nextStep}>
102
- <nve-icon slot="suffix" name="navigate_next"></nve-icon>
87
+ <nve-icon slot="end" name="navigate_next"></nve-icon>
103
88
  Neste
104
89
  </nve-button>
105
90
  `;
106
- }
107
- renderVerticalButtons() {
108
- return this.hideStepButtons ? "" : o` <div class="vertical-btn-container">${this.renderBackButton()} ${this.renderForwardButton()}</div> `;
109
- }
110
- /** Hoved render-metode */
111
- render() {
112
- return x() || this.displayMobileVersion ? o`
91
+ }
92
+ renderVerticalButtons() {
93
+ return this.hideStepButtons ? "" : e` <div class="vertical-btn-container">${this.renderBackButton()} ${this.renderForwardButton()}</div> `;
94
+ }
95
+ render() {
96
+ return s() || this.displayMobileVersion ? e`
113
97
  <nve-stepper-mobile
114
98
  .steps=${this.steps}
115
99
  .selectedStepIndex=${this.selectedStepIndex}
116
100
  .hideStepButtons=${this.hideMobileStepButtons}
117
101
  @step-click=${this.handleMobileStepClick}
118
102
  ></nve-stepper-mobile>
119
- ` : o`
103
+ ` : e`
120
104
  <div class="stepper ${this.orientation}">
121
105
  ${this.isOrientationVertical() ? "" : this.renderBackButton()}
122
106
  <div class="steps-container ${this.orientation} ${this.hideStepButtons ? "" : "steps-container-with-buttons"}">
123
- ${this.steps.map(
124
- (e, t) => o`
107
+ ${this.steps.map((t, n) => e`
125
108
  <nve-step
126
- .label=${e.label}
127
- .description=${e.description}
128
- .state=${e.state}
109
+ .label=${t.label}
110
+ .description=${t.description}
111
+ .state=${t.state}
129
112
  .selectedStepIndex=${this.selectedStepIndex.value}
130
- .isSelected=${e.isSelected}
131
- .isLast=${t === this.steps.length - 1}
132
- .index=${t}
133
- .readyForEntrance=${e.readyForEntrance}
113
+ .isSelected=${t.isSelected}
114
+ .isLast=${n === this.steps.length - 1}
115
+ .index=${n}
116
+ .readyForEntrance=${t.readyForEntrance}
134
117
  .orientation=${this.orientation}
135
118
  .hideStateText=${this.hideStateText}
136
119
  .hideDescriptions=${this.hideDescriptions}
137
- @click=${() => this.handleStepClick(e, t)}
120
+ @click=${() => this.handleStepClick(t, n)}
138
121
  >
139
122
  </nve-step>
140
- `
141
- )}
123
+ `)}
142
124
  </div>
143
125
  ${this.isOrientationVertical() ? "" : this.renderForwardButton()}
144
126
  ${this.isOrientationVertical() ? this.renderVerticalButtons() : ""}
145
127
  </div>
146
128
  `;
147
- }
148
- };
149
- s.styles = [S];
150
- i([
151
- n()
152
- ], s.prototype, "orientation", 2);
153
- i([
154
- n({ type: String })
155
- ], s.prototype, "endButtonText", 2);
156
- i([
157
- n({ type: Array })
158
- ], s.prototype, "steps", 2);
159
- i([
160
- n({ type: Boolean })
161
- ], s.prototype, "hideStepButtons", 2);
162
- i([
163
- n({ type: Boolean })
164
- ], s.prototype, "hideMobileStepButtons", 2);
165
- i([
166
- n({ type: Boolean })
167
- ], s.prototype, "displayMobileVersion", 2);
168
- i([
169
- n({ type: Boolean })
170
- ], s.prototype, "hideStateText", 2);
171
- i([
172
- n({ type: Boolean })
173
- ], s.prototype, "hideDescriptions", 2);
174
- s = i([
175
- u("nve-stepper")
176
- ], s);
177
- export {
178
- s as default
129
+ }
179
130
  };
131
+ i([n()], c.prototype, "orientation", void 0), i([n({ type: String })], c.prototype, "endButtonText", void 0), i([n({ type: Array })], c.prototype, "steps", void 0), i([n({ type: Boolean })], c.prototype, "hideStepButtons", void 0), i([n({ type: Boolean })], c.prototype, "hideMobileStepButtons", void 0), i([n({ type: Boolean })], c.prototype, "displayMobileVersion", void 0), i([n({ type: Boolean })], c.prototype, "hideStateText", void 0), i([n({ type: Boolean })], c.prototype, "hideDescriptions", void 0), c = i([r("nve-stepper")], c);
132
+ var l = c;
133
+ //#endregion
134
+ export { l as default };
@@ -1,5 +1,6 @@
1
- import { i as e } from "../../chunks/lit-element.js";
2
- const n = e`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-stepper/nve-stepper.styles.ts
3
+ var t = e`
3
4
  :host {
4
5
  -webkit-touch-callout: none; /* iOS Safari */
5
6
  -webkit-user-select: none; /* Safari */
@@ -54,6 +55,5 @@ const n = e`
54
55
  }
55
56
 
56
57
  `;
57
- export {
58
- n as default
59
- };
58
+ //#endregion
59
+ export { t as default };
@@ -1,77 +1,72 @@
1
- import { n as i, t as n } from "../../chunks/property.js";
2
- import { r as p } from "../../chunks/state.js";
3
- import { e as u } from "../../chunks/query.js";
4
- import { a as d, x as f } from "../../chunks/lit-element.js";
5
- import { w as m } from "../../chunks/watch.js";
6
- import { o as b } from "../../chunks/if-defined.js";
7
- import { l as w } from "../../chunks/live.js";
8
- import { e as y } from "../../chunks/class-map.js";
9
- import k from "./nve-switch.styles.js";
10
- var v = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (s, a, o, c) => {
11
- for (var h = c > 1 ? void 0 : c ? _(a, o) : a, l = s.length - 1, r; l >= 0; l--)
12
- (r = s[l]) && (h = (c ? r(a, o, h) : r(h)) || h);
13
- return c && h && v(a, o, h), h;
14
- };
15
- let t = class extends d {
16
- constructor() {
17
- super(), this.testId = "", this.hasFocus = !1, this.title = "", this.name = "", this.value = "", this.disabled = !1, this.checked = !1, this.variant = "default", this.labelPosition = "end";
18
- }
19
- emit(s) {
20
- const a = new CustomEvent(s, {
21
- bubbles: !0,
22
- cancelable: !1,
23
- composed: !0,
24
- detail: {}
25
- });
26
- this.dispatchEvent(a);
27
- }
28
- handleBlur() {
29
- this.hasFocus = !1;
30
- }
31
- handleInput() {
32
- }
33
- handleClick() {
34
- this.checked = !this.checked, this.emit("change");
35
- }
36
- handleFocus() {
37
- this.hasFocus = !0;
38
- }
39
- handleKeyDown(s) {
40
- s.key === "ArrowLeft" && (s.preventDefault(), this.checked = !1, this.emit("change"), this.emit("input")), s.key === "ArrowRight" && (s.preventDefault(), this.checked = !0, this.emit("change"), this.emit("input"));
41
- }
42
- handleCheckedChange() {
43
- this.input.checked = this.checked;
44
- }
45
- /** click, focus og blur sendes til input (checkbox) */
46
- click() {
47
- this.input.click();
48
- }
49
- focus(s) {
50
- this.input.focus(s);
51
- }
52
- blur() {
53
- this.input.blur();
54
- }
55
- render() {
56
- return f`<div>
1
+ import { a as e, t } from "../../chunks/lit.js";
2
+ import { a as n, o as r, r as i, s as a, t as o } from "../../chunks/decorate.js";
3
+ import { t as s } from "../../chunks/class-map.js";
4
+ import { t as c } from "../../chunks/if-defined.js";
5
+ import { t as l } from "../../chunks/live.js";
6
+ import { t as u } from "../../chunks/watch.js";
7
+ import d from "./nve-switch.styles.js";
8
+ //#region src/components/nve-switch/nve-switch.component.ts
9
+ var f = class extends t {
10
+ constructor() {
11
+ super(), this.testId = "", this.hasFocus = !1, this.title = "", this.name = "", this.value = "", this.disabled = !1, this.checked = !1, this.variant = "default", this.labelPosition = "end";
12
+ }
13
+ static {
14
+ this.styles = [d];
15
+ }
16
+ emit(e) {
17
+ let t = new CustomEvent(e, {
18
+ bubbles: !0,
19
+ cancelable: !1,
20
+ composed: !0,
21
+ detail: {}
22
+ });
23
+ this.dispatchEvent(t);
24
+ }
25
+ handleBlur() {
26
+ this.hasFocus = !1;
27
+ }
28
+ handleInput() {}
29
+ handleClick() {
30
+ this.checked = !this.checked, this.emit("change");
31
+ }
32
+ handleFocus() {
33
+ this.hasFocus = !0;
34
+ }
35
+ handleKeyDown(e) {
36
+ e.key === "ArrowLeft" && (e.preventDefault(), this.checked = !1, this.emit("change"), this.emit("input")), e.key === "ArrowRight" && (e.preventDefault(), this.checked = !0, this.emit("change"), this.emit("input"));
37
+ }
38
+ handleCheckedChange() {
39
+ this.input.checked = this.checked;
40
+ }
41
+ click() {
42
+ this.input.click();
43
+ }
44
+ focus(e) {
45
+ this.input.focus(e);
46
+ }
47
+ blur() {
48
+ this.input.blur();
49
+ }
50
+ render() {
51
+ return e`<div>
57
52
  <label
58
53
  part="base"
59
- class=${y({
60
- switch: !0,
61
- "switch--checked": this.checked,
62
- "switch--disabled": this.disabled,
63
- "switch--focused": this.hasFocus,
64
- [`switch--${this.variant}`]: !0,
65
- [`switch--label-${this.labelPosition}`]: !0
66
- })}
54
+ class=${s({
55
+ switch: !0,
56
+ "switch--checked": this.checked,
57
+ "switch--disabled": this.disabled,
58
+ "switch--focused": this.hasFocus,
59
+ [`switch--${this.variant}`]: !0,
60
+ [`switch--label-${this.labelPosition}`]: !0
61
+ })}
67
62
  >
68
63
  <input
69
64
  class="switch__input"
70
65
  type="checkbox"
71
66
  title=${this.title}
72
67
  name=${this.name}
73
- value=${b(this.value)}
74
- .checked=${w(this.checked)}
68
+ value=${c(this.value)}
69
+ .checked=${l(this.checked)}
75
70
  .disabled=${this.disabled}
76
71
  role="switch"
77
72
  aria-checked=${this.checked ? "true" : "false"}
@@ -93,45 +88,18 @@ let t = class extends d {
93
88
  </div>
94
89
  </label>
95
90
  </div>`;
96
- }
97
- };
98
- t.styles = [k];
99
- e([
100
- i({ reflect: !0, type: String })
101
- ], t.prototype, "testId", 2);
102
- e([
103
- u('input[type="checkbox"]')
104
- ], t.prototype, "input", 2);
105
- e([
106
- p()
107
- ], t.prototype, "hasFocus", 2);
108
- e([
109
- i()
110
- ], t.prototype, "title", 2);
111
- e([
112
- i()
113
- ], t.prototype, "name", 2);
114
- e([
115
- i()
116
- ], t.prototype, "value", 2);
117
- e([
118
- i({ type: Boolean, reflect: !0 })
119
- ], t.prototype, "disabled", 2);
120
- e([
121
- i({ type: Boolean, reflect: !0 })
122
- ], t.prototype, "checked", 2);
123
- e([
124
- i()
125
- ], t.prototype, "variant", 2);
126
- e([
127
- i({ attribute: "label-position" })
128
- ], t.prototype, "labelPosition", 2);
129
- e([
130
- m("checked", { waitUntilFirstUpdate: !0 })
131
- ], t.prototype, "handleCheckedChange", 1);
132
- t = e([
133
- n("nve-switch")
134
- ], t);
135
- export {
136
- t as default
91
+ }
137
92
  };
93
+ o([r({
94
+ reflect: !0,
95
+ type: String
96
+ })], f.prototype, "testId", void 0), o([i("input[type=\"checkbox\"]")], f.prototype, "input", void 0), o([n()], f.prototype, "hasFocus", void 0), o([r()], f.prototype, "title", void 0), o([r()], f.prototype, "name", void 0), o([r()], f.prototype, "value", void 0), o([r({
97
+ type: Boolean,
98
+ reflect: !0
99
+ })], f.prototype, "disabled", void 0), o([r({
100
+ type: Boolean,
101
+ reflect: !0
102
+ })], f.prototype, "checked", void 0), o([r()], f.prototype, "variant", void 0), o([r({ attribute: "label-position" })], f.prototype, "labelPosition", void 0), o([u("checked", { waitUntilFirstUpdate: !0 })], f.prototype, "handleCheckedChange", null), f = o([a("nve-switch")], f);
103
+ var p = f;
104
+ //#endregion
105
+ export { p 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-switch/nve-switch.styles.ts
3
+ var t = e`
3
4
  .switch {
4
5
  display: flex;
5
6
  align-items: center;
@@ -84,7 +85,7 @@ const r = o`
84
85
  }
85
86
 
86
87
  .switch.switch--focused:has(:focus-visible) .switch__control {
87
- outline: 2px solid var(--color-interactive-links-focus);
88
+ outline: 2px solid var(--color-interactive-border-accessibility-focus);
88
89
  outline-offset: 1px;
89
90
  }
90
91
  .switch:not(.switch--disabled):hover {
@@ -104,11 +105,10 @@ const r = o`
104
105
 
105
106
  .switch--primary {
106
107
  &.switch--checked .switch__control {
107
- --on-color: var(--color-interactive-primary-border-focus);
108
+ --on-color: var(--color-interactive-border-accessibility-focus);
108
109
  --off-color: var(--color-neutrals-background-secondary);
109
110
  }
110
111
  }
111
112
  `;
112
- export {
113
- r as default
114
- };
113
+ //#endregion
114
+ export { t as default };
@@ -1,53 +1,41 @@
1
- import { a as n, x as b } from "../../chunks/lit-element.js";
2
- import { n as r, t as c } from "../../chunks/property.js";
3
- import h from "./nve-tab.styles.js";
4
- import { e as f } from "../../chunks/class-map.js";
5
- var u = Object.defineProperty, m = Object.getOwnPropertyDescriptor, s = (d, a, o, i) => {
6
- for (var e = i > 1 ? void 0 : i ? m(a, o) : a, l = d.length - 1, p; l >= 0; l--)
7
- (p = d[l]) && (e = (i ? p(a, o, e) : p(e)) || e);
8
- return i && e && u(a, o, e), e;
9
- };
10
- let v = 0, t = class extends n {
11
- constructor() {
12
- super(), this.testId = void 0, this.panel = null, this.size = "large", this.background = !1, this.disabled = !1, this.attrId = ++v, this.componentId = `nve-tab-${this.attrId}`;
13
- }
14
- connectedCallback() {
15
- super.connectedCallback(), this.setAttribute("role", "tab");
16
- }
17
- render() {
18
- return this.id = this.id.length > 0 ? this.id : this.componentId, b`
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 { t as a } from "../../chunks/class-map.js";
4
+ import o from "./nve-tab.styles.js";
5
+ //#region src/components/nve-tab/nve-tab.component.ts
6
+ var s = 0, c = class extends t {
7
+ static {
8
+ this.styles = [o];
9
+ }
10
+ connectedCallback() {
11
+ super.connectedCallback(), this.setAttribute("role", "tab");
12
+ }
13
+ constructor() {
14
+ super(), this.testId = void 0, this.panel = null, this.size = "large", this.background = !1, this.disabled = !1, this.attrId = ++s, this.componentId = `nve-tab-${this.attrId}`;
15
+ }
16
+ render() {
17
+ return this.id = this.id.length > 0 ? this.id : this.componentId, e`
19
18
  <div
20
19
  part="base"
21
20
  aria-disabled=${this.disabled ? "true" : "false"}
22
21
  disabled=${this.disabled ? "true" : "false"}
23
- class=${f({ tab: !0, "tab--large": this.size === "large", "tab--background": this.background })}
22
+ class=${a({
23
+ tab: !0,
24
+ "tab--large": this.size === "large",
25
+ "tab--background": this.background
26
+ })}
24
27
  >
25
28
  <slot name="prefix"></slot>
26
29
  <slot></slot>
27
30
  <slot name="suffix"></slot>
28
31
  </div>
29
32
  `;
30
- }
31
- };
32
- t.styles = [h];
33
- s([
34
- r({ type: String })
35
- ], t.prototype, "testId", 2);
36
- s([
37
- r({ type: String })
38
- ], t.prototype, "panel", 2);
39
- s([
40
- r({ type: String })
41
- ], t.prototype, "size", 2);
42
- s([
43
- r({ type: Boolean })
44
- ], t.prototype, "background", 2);
45
- s([
46
- r({ type: Boolean, reflect: !0 })
47
- ], t.prototype, "disabled", 2);
48
- t = s([
49
- c("nve-tab")
50
- ], t);
51
- export {
52
- t as default
33
+ }
53
34
  };
35
+ i([n({ type: String })], c.prototype, "testId", void 0), i([n({ type: String })], c.prototype, "panel", void 0), i([n({ type: String })], c.prototype, "size", void 0), i([n({ type: Boolean })], c.prototype, "background", void 0), i([n({
36
+ type: Boolean,
37
+ reflect: !0
38
+ })], c.prototype, "disabled", void 0), c = i([r("nve-tab")], c);
39
+ var l = c;
40
+ //#endregion
41
+ export { l as default };
@@ -1,5 +1,6 @@
1
- import { i as r } from "../../chunks/lit-element.js";
2
- const e = r`
1
+ import { u as e } from "../../chunks/lit.js";
2
+ //#region src/components/nve-tab/nve-tab.styles.ts
3
+ var t = e`
3
4
  :host {
4
5
  --border-bottom: 2px;
5
6
  display: flex;
@@ -10,8 +11,8 @@ const e = r`
10
11
  }
11
12
 
12
13
  :host(:focus-visible) .tab {
13
- outline: 2px solid var(--color-interactive-outlined-border-focus);
14
- outline-offset: -12px;
14
+ outline: 2px solid var(--color-interactive-border-accessibility-focus);
15
+ outline-offset: -4px;
15
16
  }
16
17
 
17
18
  .tab {
@@ -81,6 +82,5 @@ const e = r`
81
82
  border-bottom: var(--border-bottom) solid var(--color-neutrals-border-subtle);
82
83
  }
83
84
  `;
84
- export {
85
- e as default
86
- };
85
+ //#endregion
86
+ export { t as default };