nve-designsystem 2.13.4 → 2.14.1

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.
@@ -95,6 +95,10 @@ const a = r`
95
95
  gap: var(--spacing-xx-small);
96
96
  margin-inline-start: unset;
97
97
  }
98
+
99
+ :host::part(clear-button) {
100
+ font-size: var(--font-size-medium);
101
+ }
98
102
  `;
99
103
  export {
100
104
  a as default
@@ -92,6 +92,9 @@ const e = r`
92
92
  font-size: var(--font-size-medium);
93
93
  fill: currentColor;
94
94
  }
95
+ :host::part(clear-button) {
96
+ font-size: var(--font-size-medium);
97
+ }
95
98
  `;
96
99
  export {
97
100
  e as default
@@ -18,6 +18,8 @@ export default class NveTab extends LitElement implements INveComponent {
18
18
  size: 'large' | 'small';
19
19
  /** Om fanen skal ha bakgrunn */
20
20
  background: boolean;
21
+ /** Faner kan være disabled */
22
+ disabled: boolean;
21
23
  /** @internal */
22
24
  private readonly attrId;
23
25
  /** @internal */
@@ -1,24 +1,26 @@
1
- import { a as d, x as c } from "../../chunks/lit-element.js";
2
- import { n as a, t as b } from "../../chunks/property.js";
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
3
  import h from "./nve-tab.styles.js";
4
- import { e as u } from "../../chunks/class-map.js";
5
- var f = Object.defineProperty, m = Object.getOwnPropertyDescriptor, r = (p, s, i, o) => {
6
- for (var t = o > 1 ? void 0 : o ? m(s, i) : s, l = p.length - 1, n; l >= 0; l--)
7
- (n = p[l]) && (t = (o ? n(s, i, t) : n(t)) || t);
8
- return o && t && f(s, i, t), t;
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
9
  };
10
- let v = 0, e = class extends d {
10
+ let v = 0, t = class extends n {
11
11
  constructor() {
12
- super(), this.testId = void 0, this.panel = null, this.size = "large", this.background = !1, this.attrId = ++v, this.componentId = `nve-tab-${this.attrId}`;
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
13
  }
14
14
  connectedCallback() {
15
15
  super.connectedCallback(), this.setAttribute("role", "tab");
16
16
  }
17
17
  render() {
18
- return this.id = this.id.length > 0 ? this.id : this.componentId, c`
18
+ return this.id = this.id.length > 0 ? this.id : this.componentId, b`
19
19
  <div
20
20
  part="base"
21
- class=${u({ tab: !0, "tab--large": this.size === "large", "tab--background": this.background })}
21
+ aria-disabled=${this.disabled ? "true" : "false"}
22
+ disabled=${this.disabled ? "true" : "false"}
23
+ class=${f({ tab: !0, "tab--large": this.size === "large", "tab--background": this.background })}
22
24
  >
23
25
  <slot name="prefix"></slot>
24
26
  <slot></slot>
@@ -27,22 +29,25 @@ let v = 0, e = class extends d {
27
29
  `;
28
30
  }
29
31
  };
30
- e.styles = [h];
31
- r([
32
- a({ type: String })
33
- ], e.prototype, "testId", 2);
34
- r([
35
- a({ type: String })
36
- ], e.prototype, "panel", 2);
37
- r([
38
- a({ type: String })
39
- ], e.prototype, "size", 2);
40
- r([
41
- a({ type: Boolean })
42
- ], e.prototype, "background", 2);
43
- e = r([
44
- b("nve-tab")
45
- ], e);
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);
46
51
  export {
47
- e as default
52
+ t as default
48
53
  };
@@ -72,6 +72,14 @@ const e = r`
72
72
  font: var(--label-medium-light);
73
73
  color: var(--neutrals-foreground-muted);
74
74
  }
75
+ :host([disabled]) .tab {
76
+ cursor: not-allowed;
77
+ color: var(--neutrals-foreground-disabled);
78
+ opacity: var(--opacity-disabled);
79
+ }
80
+ :host([disabled]) .tab:hover {
81
+ border-bottom: var(--border-bottom) solid var(--neutrals-border-subtle);
82
+ }
75
83
  `;
76
84
  export {
77
85
  e as default
@@ -1,14 +1,16 @@
1
- import { a as w, E as f, x as b } from "../../chunks/lit-element.js";
2
- import { n as l, t as g } from "../../chunks/property.js";
3
- import { r as h } from "../../chunks/state.js";
4
- import y from "./nve-tab-group.styles.js";
1
+ import { a as w, E as f, x as u } from "../../chunks/lit-element.js";
2
+ import { n as d, t as g } from "../../chunks/property.js";
3
+ import { r as b } from "../../chunks/state.js";
4
+ import m from "./nve-tab-group.styles.js";
5
+ import y from "../nve-tab/nve-tab.component.js";
6
+ import "../nve-icon/nve-icon.component.js";
5
7
  import "../nve-button/nve-button.component.js";
6
8
  import { e as v } from "../../chunks/class-map.js";
7
- import { o as m } from "../../chunks/if-defined.js";
8
- var k = Object.defineProperty, S = Object.getOwnPropertyDescriptor, c = (t, e, a, r) => {
9
- for (var s = r > 1 ? void 0 : r ? S(e, a) : e, o = t.length - 1, i; o >= 0; o--)
10
- (i = t[o]) && (s = (r ? i(e, a, s) : i(s)) || s);
11
- return r && s && k(e, a, s), s;
9
+ import { o as k } from "../../chunks/if-defined.js";
10
+ var S = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, c = (t, e, o, a) => {
11
+ for (var s = a > 1 ? void 0 : a ? _(e, o) : e, i = t.length - 1, r; i >= 0; i--)
12
+ (r = t[i]) && (s = (a ? r(e, o, s) : r(s)) || s);
13
+ return a && s && S(e, o, s), s;
12
14
  };
13
15
  let n = class extends w {
14
16
  constructor() {
@@ -37,12 +39,12 @@ let n = class extends w {
37
39
  * @param event Klikkeventet.
38
40
  */
39
41
  handleClick(t) {
40
- const e = t.composedPath(), a = e.find(
42
+ const e = t.composedPath(), o = e.find(
41
43
  (s) => s instanceof HTMLElement && s.tagName.toLowerCase() === "nve-tab"
42
44
  );
43
45
  e.find(
44
46
  (s) => s instanceof HTMLElement && s.tagName.toLowerCase() === "nve-tab-group"
45
- ) === this && a && a.panel && this.setActiveTab(a.panel);
47
+ ) === this && (o instanceof y && o.disabled || o && o.panel && this.setActiveTab(o.panel));
46
48
  }
47
49
  /**
48
50
  * @internal
@@ -51,15 +53,15 @@ let n = class extends w {
51
53
  * @param event Tastetrykk eventet.
52
54
  */
53
55
  handleKeyDown(t) {
54
- const e = t.composedPath(), a = e.find((s) => s instanceof HTMLElement && s.closest && s.closest("nve-tab") === s) || null;
56
+ const e = t.composedPath(), o = e.find((s) => s instanceof HTMLElement && s.closest && s.closest("nve-tab") === s) || null;
55
57
  if (e.find(
56
58
  (s) => s instanceof HTMLElement && s.tagName.toLowerCase() === "nve-tab-group"
57
- ) === this && (["Enter", " "].includes(t.key) && a && a.panel && (this.setActiveTab(a.panel), t.preventDefault()), ["ArrowLeft", "ArrowRight", "Home", "End"].includes(t.key))) {
58
- const s = this.tabs.find((d) => d === a);
59
+ ) === this && (["Enter", " "].includes(t.key) && o && o.panel && (this.setActiveTab(o.panel), t.preventDefault()), ["ArrowLeft", "ArrowRight", "Home", "End"].includes(t.key))) {
60
+ const s = this.tabs.find((l) => l === o);
59
61
  if (!s) return;
60
- const o = this.tabs.indexOf(s);
61
62
  let i;
62
- t.key === "ArrowLeft" && (i = o > 0 ? this.tabs[o - 1] : this.tabs[this.tabs.length - 1]), t.key === "ArrowRight" && (i = o < this.tabs.length - 1 ? this.tabs[o + 1] : this.tabs[0]), t.key === "Home" && (i = this.tabs[0]), t.key === "End" && (i = this.tabs[this.tabs.length - 1]), i && (i.focus(), t.preventDefault());
63
+ const r = this.tabs.filter((l) => !l.disabled), h = r.indexOf(s);
64
+ t.key === "ArrowLeft" && (i = h > 0 ? r[h - 1] : r[r.length - 1]), t.key === "ArrowRight" && (i = h < r.length - 1 ? r[h + 1] : r[0]), t.key === "Home" && (i = r[0]), t.key === "End" && (i = r[r.length - 1]), i && (i.focus(), t.preventDefault());
63
65
  }
64
66
  }
65
67
  /**
@@ -68,7 +70,7 @@ let n = class extends w {
68
70
  */
69
71
  getPanels() {
70
72
  const t = this.shadowRoot?.querySelector("slot:not([name])");
71
- return t ? t.assignedElements({ flatten: !0 }).filter((a) => a.tagName.toLowerCase() === "nve-tab-panel") : [];
73
+ return t ? t.assignedElements({ flatten: !0 }).filter((o) => o.tagName.toLowerCase() === "nve-tab-panel") : [];
72
74
  }
73
75
  /**
74
76
  * Henter alle faner i tab gruppen.
@@ -76,7 +78,7 @@ let n = class extends w {
76
78
  */
77
79
  getTabs() {
78
80
  const t = this.shadowRoot?.querySelector('slot[name="nav"]');
79
- return t ? t.assignedElements({ flatten: !0 }).filter((a) => a.tagName.toLowerCase() === "nve-tab") : [];
81
+ return t ? t.assignedElements({ flatten: !0 }).filter((o) => o.tagName.toLowerCase() === "nve-tab") : [];
80
82
  }
81
83
  /** Setter aria-selected og tabindex på fanene. Kun aktiv fane skal bli fokusert. Gjemmer inaktive paneller.
82
84
  * Sender en nve-tab-change event med navnet på den aktive fanen.
@@ -85,6 +87,15 @@ let n = class extends w {
85
87
  setActiveTab(t) {
86
88
  this.tabs.forEach((e) => e.setAttribute("aria-selected", `${e.panel === t}`)), this.tabs.forEach((e) => e.setAttribute("tabindex", e.panel === t ? "0" : "-1")), this.panels.forEach((e) => e.classList.toggle("tab-panel--hidden", e.name !== t)), this.activeTab = t, requestAnimationFrame(() => {
87
89
  this.updateIndicator();
90
+ }), requestAnimationFrame(() => {
91
+ const e = this.tabs.find((o) => o.getAttribute("aria-selected") === "true");
92
+ if (e) {
93
+ const o = this.shadowRoot?.querySelector(".tab-group__nav");
94
+ if (o) {
95
+ const a = e.offsetLeft, s = e.offsetLeft + e.offsetWidth;
96
+ a < o.scrollLeft ? o.scrollTo({ left: a, behavior: "smooth" }) : s > o.scrollLeft + o.clientWidth && o.scrollTo({ left: a, behavior: "smooth" });
97
+ }
98
+ }
88
99
  }), this.dispatchEvent(
89
100
  new CustomEvent("nve-tab-change", {
90
101
  detail: t,
@@ -95,10 +106,10 @@ let n = class extends w {
95
106
  }
96
107
  updateIndicator() {
97
108
  if (this.isBackground) return;
98
- const t = this.shadowRoot?.querySelector(".tab-group__nav"), e = this.tabs.find((a) => a.getAttribute("aria-selected") === "true");
109
+ const t = this.shadowRoot?.querySelector(".tab-group__nav"), e = this.tabs.find((o) => o.getAttribute("aria-selected") === "true");
99
110
  if (t && e) {
100
- const a = t.getBoundingClientRect(), s = e.getBoundingClientRect().left - a.left + t.scrollLeft, o = e.offsetWidth;
101
- t.style.setProperty("--indicator-x", `${s}px`), t.style.setProperty("--indicator-width", `${o}px`);
111
+ const o = t.getBoundingClientRect(), s = e.getBoundingClientRect().left - o.left + t.scrollLeft, i = e.offsetWidth;
112
+ t.style.setProperty("--indicator-x", `${s}px`), t.style.setProperty("--indicator-width", `${i}px`);
102
113
  }
103
114
  }
104
115
  /**
@@ -107,7 +118,7 @@ let n = class extends w {
107
118
  */
108
119
  setAriaLabels() {
109
120
  this.tabs.forEach((t) => {
110
- const e = this.panels.find((a) => a.name === t.panel);
121
+ const e = this.panels.find((o) => o.name === t.panel);
111
122
  e && (t.setAttribute("aria-controls", e.id), e.setAttribute("aria-labelledby", t.id));
112
123
  });
113
124
  }
@@ -134,8 +145,8 @@ let n = class extends w {
134
145
  const e = this.shadowRoot?.querySelector(".tab-group__nav-button--forward")?.querySelector("nve-button");
135
146
  if (e) {
136
147
  await e.updateComplete;
137
- const a = e.shadowRoot?.querySelector('[part="base"]');
138
- a && a.setAttribute("tabindex", "-1");
148
+ const o = e.shadowRoot?.querySelector('[part="base"]');
149
+ o && o.setAttribute("tabindex", "-1");
139
150
  }
140
151
  }
141
152
  /**
@@ -145,8 +156,8 @@ let n = class extends w {
145
156
  const e = this.shadowRoot?.querySelector(".tab-group__nav-button--backward")?.querySelector("nve-button");
146
157
  if (e) {
147
158
  await e.updateComplete;
148
- const a = e.shadowRoot?.querySelector('[part="base"]');
149
- a && a.setAttribute("tabindex", "-1");
159
+ const o = e.shadowRoot?.querySelector('[part="base"]');
160
+ o && o.setAttribute("tabindex", "-1");
150
161
  }
151
162
  }
152
163
  /**
@@ -173,10 +184,10 @@ let n = class extends w {
173
184
  scrollNavForward() {
174
185
  const t = this.shadowRoot?.querySelector(".tab-group__nav");
175
186
  if (!t || !this.tabs.length) return;
176
- const e = t.scrollLeft, a = t.clientWidth, r = e + a;
187
+ const e = t.scrollLeft, o = t.clientWidth, a = e + o;
177
188
  for (let s of this.tabs)
178
- if (s.offsetLeft + s.offsetWidth > r) {
179
- const u = this.tabs[this.tabs.indexOf(s) - 1], p = u ? u.offsetLeft : 0;
189
+ if (s.offsetLeft + s.offsetWidth > a) {
190
+ const l = this.tabs[this.tabs.indexOf(s) - 1], p = l ? l.offsetLeft : 0;
180
191
  t.scrollTo({
181
192
  left: p - this.buttonContainerWidth,
182
193
  behavior: "smooth"
@@ -190,12 +201,12 @@ let n = class extends w {
190
201
  scrollNavBackward() {
191
202
  const t = this.shadowRoot?.querySelector(".tab-group__nav");
192
203
  if (!t || !this.tabs.length) return;
193
- const e = t.clientWidth, a = t.scrollLeft;
194
- for (let r of this.tabs) {
195
- const s = r.offsetLeft, o = s + r.offsetWidth;
196
- if (s > a) {
204
+ const e = t.clientWidth, o = t.scrollLeft;
205
+ for (let a of this.tabs) {
206
+ const s = a.offsetLeft, i = s + a.offsetWidth;
207
+ if (s > o) {
197
208
  t.scrollTo({
198
- left: o - e + this.buttonContainerWidth,
209
+ left: i - e + this.buttonContainerWidth,
199
210
  behavior: "smooth"
200
211
  });
201
212
  return;
@@ -203,13 +214,13 @@ let n = class extends w {
203
214
  }
204
215
  }
205
216
  render() {
206
- return b`
217
+ return u`
207
218
  <div
208
219
  part="base"
209
220
  class="tab-group"
210
221
  @click=${this.handleClick}
211
222
  @keydown=${this.handleKeyDown}
212
- testId=${m(this.testId)}
223
+ testId=${k(this.testId)}
213
224
  >
214
225
  <div class="tab-group__nav-container">
215
226
  <div
@@ -218,7 +229,7 @@ let n = class extends w {
218
229
  >
219
230
  <slot name="nav"></slot>
220
231
  </div>
221
- ${this.canScrollBack && this.isOverflow ? b`
232
+ ${this.canScrollBack && this.isOverflow ? u`
222
233
  <div
223
234
  aria-hidden="true"
224
235
  part="button-backward-base"
@@ -229,7 +240,7 @@ let n = class extends w {
229
240
  </nve-button>
230
241
  </div>
231
242
  ` : f}
232
- ${this.canScrollForward && this.isOverflow ? b`
243
+ ${this.canScrollForward && this.isOverflow ? u`
233
244
  <div
234
245
  part="button-forward-base"
235
246
  aria-hidden="true"
@@ -248,30 +259,30 @@ let n = class extends w {
248
259
  `;
249
260
  }
250
261
  };
251
- n.styles = [y];
262
+ n.styles = [m];
252
263
  c([
253
- l({ type: String })
264
+ d({ type: String })
254
265
  ], n.prototype, "testId", 2);
255
266
  c([
256
- l({ type: Boolean })
267
+ d({ type: Boolean })
257
268
  ], n.prototype, "background", 2);
258
269
  c([
259
- l({ type: String })
270
+ d({ type: String })
260
271
  ], n.prototype, "size", 2);
261
272
  c([
262
- l({ type: String, reflect: !0 })
273
+ d({ type: String, reflect: !0 })
263
274
  ], n.prototype, "activeTab", 2);
264
275
  c([
265
- h()
276
+ b()
266
277
  ], n.prototype, "isOverflow", 2);
267
278
  c([
268
- h()
279
+ b()
269
280
  ], n.prototype, "canScrollBack", 2);
270
281
  c([
271
- h()
282
+ b()
272
283
  ], n.prototype, "canScrollForward", 2);
273
284
  c([
274
- h()
285
+ b()
275
286
  ], n.prototype, "isBackground", 2);
276
287
  n = c([
277
288
  g("nve-tab-group")
@@ -1817,115 +1817,6 @@
1817
1817
  }
1818
1818
  ]
1819
1819
  },
1820
- {
1821
- "kind": "javascript-module",
1822
- "path": "components/nve-carousel-item/nve-carousel-item.js",
1823
- "declarations": [
1824
- {
1825
- "kind": "class",
1826
- "description": "Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\nBruk propertien \"description\" for å legge på bildetekst under bildet.\nAnbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.",
1827
- "name": "NveCarouselItem",
1828
- "members": [
1829
- {
1830
- "kind": "field",
1831
- "name": "styles",
1832
- "type": {
1833
- "text": "array"
1834
- },
1835
- "static": true,
1836
- "default": "[SlCarouselItem.styles, styles]"
1837
- },
1838
- {
1839
- "kind": "field",
1840
- "name": "testId",
1841
- "type": {
1842
- "text": "string | undefined"
1843
- },
1844
- "default": "undefined"
1845
- },
1846
- {
1847
- "kind": "field",
1848
- "name": "description",
1849
- "type": {
1850
- "text": "string"
1851
- },
1852
- "default": "''",
1853
- "description": "Brukes til å legge på beskrivelse på bildene."
1854
- },
1855
- {
1856
- "kind": "method",
1857
- "name": "updated",
1858
- "parameters": [
1859
- {
1860
- "name": "changedProperties",
1861
- "type": {
1862
- "text": "PropertyValues"
1863
- }
1864
- }
1865
- ]
1866
- },
1867
- {
1868
- "kind": "method",
1869
- "name": "render"
1870
- }
1871
- ],
1872
- "attributes": [
1873
- {
1874
- "name": "testId",
1875
- "type": {
1876
- "text": "string | undefined"
1877
- },
1878
- "description": ""
1879
- },
1880
- {
1881
- "name": "description",
1882
- "type": {
1883
- "text": "any"
1884
- },
1885
- "description": "Brukes til å legge på beskrivelse på bildene."
1886
- }
1887
- ],
1888
- "superclass": {
1889
- "name": "SlCarouselItem",
1890
- "package": "@shoelace-style/shoelace/dist/components/carousel-item/carousel-item.js"
1891
- },
1892
- "tagNameWithoutPrefix": "carousel-item",
1893
- "tagName": "nve-carousel-item",
1894
- "customElement": true,
1895
- "jsDoc": "/**\n * Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\n * Bruk propertien \"description\" for å legge på bildetekst under bildet.\n * Anbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.\n */",
1896
- "slots": [
1897
- {
1898
- "description": "The carousel item's content..",
1899
- "name": "",
1900
- "inheritedFrom": {
1901
- "name": "SlCarouselItem",
1902
- "module": "components/carousel-item/carousel-item.js"
1903
- }
1904
- }
1905
- ],
1906
- "cssProperties": [
1907
- {
1908
- "description": "The slide's aspect ratio. Inherited from the carousel by default.",
1909
- "name": "--aspect-ratio",
1910
- "inheritedFrom": {
1911
- "name": "SlCarouselItem",
1912
- "module": "components/carousel-item/carousel-item.js"
1913
- }
1914
- }
1915
- ]
1916
- }
1917
- ],
1918
- "exports": [
1919
- {
1920
- "kind": "js",
1921
- "name": "default",
1922
- "declaration": {
1923
- "name": "NveCarouselItem",
1924
- "module": "components/nve-carousel-item/nve-carousel-item.js"
1925
- }
1926
- }
1927
- ]
1928
- },
1929
1820
  {
1930
1821
  "kind": "javascript-module",
1931
1822
  "path": "components/nve-carousel/nve-carousel.js",
@@ -2576,6 +2467,115 @@
2576
2467
  }
2577
2468
  ]
2578
2469
  },
2470
+ {
2471
+ "kind": "javascript-module",
2472
+ "path": "components/nve-carousel-item/nve-carousel-item.js",
2473
+ "declarations": [
2474
+ {
2475
+ "kind": "class",
2476
+ "description": "Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\nBruk propertien \"description\" for å legge på bildetekst under bildet.\nAnbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.",
2477
+ "name": "NveCarouselItem",
2478
+ "members": [
2479
+ {
2480
+ "kind": "field",
2481
+ "name": "styles",
2482
+ "type": {
2483
+ "text": "array"
2484
+ },
2485
+ "static": true,
2486
+ "default": "[SlCarouselItem.styles, styles]"
2487
+ },
2488
+ {
2489
+ "kind": "field",
2490
+ "name": "testId",
2491
+ "type": {
2492
+ "text": "string | undefined"
2493
+ },
2494
+ "default": "undefined"
2495
+ },
2496
+ {
2497
+ "kind": "field",
2498
+ "name": "description",
2499
+ "type": {
2500
+ "text": "string"
2501
+ },
2502
+ "default": "''",
2503
+ "description": "Brukes til å legge på beskrivelse på bildene."
2504
+ },
2505
+ {
2506
+ "kind": "method",
2507
+ "name": "updated",
2508
+ "parameters": [
2509
+ {
2510
+ "name": "changedProperties",
2511
+ "type": {
2512
+ "text": "PropertyValues"
2513
+ }
2514
+ }
2515
+ ]
2516
+ },
2517
+ {
2518
+ "kind": "method",
2519
+ "name": "render"
2520
+ }
2521
+ ],
2522
+ "attributes": [
2523
+ {
2524
+ "name": "testId",
2525
+ "type": {
2526
+ "text": "string | undefined"
2527
+ },
2528
+ "description": ""
2529
+ },
2530
+ {
2531
+ "name": "description",
2532
+ "type": {
2533
+ "text": "any"
2534
+ },
2535
+ "description": "Brukes til å legge på beskrivelse på bildene."
2536
+ }
2537
+ ],
2538
+ "superclass": {
2539
+ "name": "SlCarouselItem",
2540
+ "package": "@shoelace-style/shoelace/dist/components/carousel-item/carousel-item.js"
2541
+ },
2542
+ "tagNameWithoutPrefix": "carousel-item",
2543
+ "tagName": "nve-carousel-item",
2544
+ "customElement": true,
2545
+ "jsDoc": "/**\n * Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\n * Bruk propertien \"description\" for å legge på bildetekst under bildet.\n * Anbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.\n */",
2546
+ "slots": [
2547
+ {
2548
+ "description": "The carousel item's content..",
2549
+ "name": "",
2550
+ "inheritedFrom": {
2551
+ "name": "SlCarouselItem",
2552
+ "module": "components/carousel-item/carousel-item.js"
2553
+ }
2554
+ }
2555
+ ],
2556
+ "cssProperties": [
2557
+ {
2558
+ "description": "The slide's aspect ratio. Inherited from the carousel by default.",
2559
+ "name": "--aspect-ratio",
2560
+ "inheritedFrom": {
2561
+ "name": "SlCarouselItem",
2562
+ "module": "components/carousel-item/carousel-item.js"
2563
+ }
2564
+ }
2565
+ ]
2566
+ }
2567
+ ],
2568
+ "exports": [
2569
+ {
2570
+ "kind": "js",
2571
+ "name": "default",
2572
+ "declaration": {
2573
+ "name": "NveCarouselItem",
2574
+ "module": "components/nve-carousel-item/nve-carousel-item.js"
2575
+ }
2576
+ }
2577
+ ]
2578
+ },
2579
2579
  {
2580
2580
  "kind": "javascript-module",
2581
2581
  "path": "components/nve-carousel-thumbnail/nve-carousel-thumbnail.js",
@@ -12841,6 +12841,15 @@
12841
12841
  "default": "false",
12842
12842
  "description": "Om fanen skal ha bakgrunn"
12843
12843
  },
12844
+ {
12845
+ "kind": "field",
12846
+ "name": "disabled",
12847
+ "type": {
12848
+ "text": "boolean"
12849
+ },
12850
+ "default": "false",
12851
+ "description": "Faner kan være disabled"
12852
+ },
12844
12853
  {
12845
12854
  "kind": "field",
12846
12855
  "name": "styles",
@@ -12883,6 +12892,13 @@
12883
12892
  "text": "boolean"
12884
12893
  },
12885
12894
  "description": "Om fanen skal ha bakgrunn"
12895
+ },
12896
+ {
12897
+ "name": "disabled",
12898
+ "type": {
12899
+ "text": "boolean"
12900
+ },
12901
+ "description": "Faner kan være disabled"
12886
12902
  }
12887
12903
  ],
12888
12904
  "superclass": {
@@ -14696,7 +14712,7 @@
14696
14712
  "package": {
14697
14713
  "name": "nve-designsystem",
14698
14714
  "description": "Designsystem for NVE",
14699
- "version": "2.13.3",
14715
+ "version": "2.14.0",
14700
14716
  "author": {
14701
14717
  "name": "NVE",
14702
14718
  "email": "nve@nve.no"
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "MIT",
9
9
  "homepage": "https://github.com/NVE/Designsystem/",
10
- "version": "2.13.4",
10
+ "version": "2.14.1",
11
11
  "customElements": "custom-elements.json",
12
12
  "exports": {
13
13
  ".": {
@@ -79,9 +79,10 @@ const t = {
79
79
  <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>
80
80
  </svg>
81
81
  `,
82
+ /* Clear-ikon for input, select. Merk at denne er kun en x uten sirkel rundt, i motsetning til shoelace sin */
82
83
  "x-circle-fill": `
83
84
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
84
- <path d="M7.0625 14L10 11.0625L12.9375 14L14 12.9375L11.0625 10L14 7.0625L12.9375 6L10 8.9375L7.0625 6L6 7.0625L8.9375 10L6 12.9375L7.0625 14ZM10 18C8.90278 18 7.86806 17.7917 6.89583 17.375C5.92361 16.9583 5.07292 16.3854 4.34375 15.6562C3.61458 14.9271 3.04167 14.0764 2.625 13.1042C2.20833 12.1319 2 11.0972 2 10C2 8.88889 2.20833 7.85069 2.625 6.88542C3.04167 5.92014 3.61458 5.07292 4.34375 4.34375C5.07292 3.61458 5.92361 3.04167 6.89583 2.625C7.86806 2.20833 8.90278 2 10 2C11.1111 2 12.1493 2.20833 13.1146 2.625C14.0799 3.04167 14.9271 3.61458 15.6562 4.34375C16.3854 5.07292 16.9583 5.92014 17.375 6.88542C17.7917 7.85069 18 8.88889 18 10C18 11.0972 17.7917 12.1319 17.375 13.1042C16.9583 14.0764 16.3854 14.9271 15.6562 15.6562C14.9271 16.3854 14.0799 16.9583 13.1146 17.375C12.1493 17.7917 11.1111 18 10 18ZM10 16.5C11.8056 16.5 13.3403 15.8681 14.6042 14.6042C15.8681 13.3403 16.5 11.8056 16.5 10C16.5 8.19444 15.8681 6.65972 14.6042 5.39583C13.3403 4.13194 11.8056 3.5 10 3.5C8.19444 3.5 6.65972 4.13194 5.39583 5.39583C4.13194 6.65972 3.5 8.19444 3.5 10C3.5 11.8056 4.13194 13.3403 5.39583 14.6042C6.65972 15.8681 8.19444 16.5 10 16.5Z" fill="currentColor"/>
85
+ <path d="M6.0625 15L5 13.9375L8.9375 10L5 6.0625L6.0625 5L10 8.9375L13.9375 5L15 6.0625L11.0625 10L15 13.9375L13.9375 15L10 11.0625L6.0625 15Z" fill="currentcolor" />
85
86
  </svg>
86
87
  `
87
88
  };
@@ -2,11 +2,6 @@
2
2
  "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
3
  "version": 1.1,
4
4
  "properties": [
5
- {
6
- "name": "--aspect-ratio",
7
- "description": "The slide's aspect ratio. Inherited from the carousel by default.",
8
- "values": []
9
- },
10
5
  {
11
6
  "name": "--pagination-counter-color",
12
7
  "description": "Fargen på sidetellerteksten.",
@@ -32,6 +27,11 @@
32
27
  "description": "The amount of padding to apply to the scroll area, allowing adjacent slides to become partially visible as a scroll hint.",
33
28
  "values": []
34
29
  },
30
+ {
31
+ "name": "--aspect-ratio",
32
+ "description": "The slide's aspect ratio. Inherited from the carousel by default.",
33
+ "values": []
34
+ },
35
35
  {
36
36
  "name": "--width",
37
37
  "description": "The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.",
@@ -322,24 +322,6 @@
322
322
  }
323
323
  ]
324
324
  },
325
- {
326
- "name": "nve-carousel-item",
327
- "description": "Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\nBruk propertien \"description\" for å legge på bildetekst under bildet.\nAnbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.\n---\n\n\n### **Spor:**\n - _default_ - The carousel item's content..\n\n### **CSS-variabler:**\n - **--aspect-ratio** - The slide's aspect ratio. Inherited from the carousel by default. _(default: undefined)_",
328
- "attributes": [
329
- { "name": "testId", "description": "", "values": [] },
330
- {
331
- "name": "description",
332
- "description": "Brukes til å legge på beskrivelse på bildene.",
333
- "values": []
334
- }
335
- ],
336
- "references": [
337
- {
338
- "name": "Mer info",
339
- "url": "https://designsystem.nve.no/components/nve-carousel-item"
340
- }
341
- ]
342
- },
343
325
  {
344
326
  "name": "nve-carousel",
345
327
  "description": "En karusell for å vise bilder eller annet valgfritt innhold i en serie.\nNve-carousel støtter ikke propertien: orientation=\"vertical\".\n---\n\n\n### **Hendelser:**\n - **sl-slide-change** - Emitted when the active slide changes.\n\n### **Metoder:**\n - **previous(behavior: _ScrollBehavior_)** - Move the carousel backward by `slides-per-move` slides.\n- **next(behavior: _ScrollBehavior_)** - Move the carousel forward by `slides-per-move` slides.\n- **goToSlide(index: _number_, behavior: _ScrollBehavior_)** - Scrolls the carousel to the slide specified by `index`.\n\n### **Spor:**\n - _default_ - The carousel's main content, one or more `<sl-carousel-item>` elements.\n- **next-icon** - Optional next icon to use instead of the default. Works best with `<sl-icon>`.\n- **previous-icon** - Optional previous icon to use instead of the default. Works best with `<sl-icon>`.\n\n### **CSS-variabler:**\n - **--pagination-counter-color** - Fargen på sidetellerteksten. _(default: undefined)_\n- **--pagination-counter-bg-color** - Bakgrunnsfargen til pagineringstelleren. _(default: undefined)_\n- **--slide-gap** - The space between each slide. _(default: undefined)_\n- **--aspect-ratio** - The aspect ratio of each slide. _(default: 16/9)_\n- **--scroll-hint** - The amount of padding to apply to the scroll area, allowing adjacent slides to become partially visible as a scroll hint. _(default: undefined)_\n\n### **Deler:**\n - **base** - The carousel's internal wrapper.\n- **scroll-container** - The scroll container that wraps the slides.\n- **pagination** - The pagination indicators wrapper.\n- **pagination-item** - The pagination indicator.\n- **pagination-item--active** - Applied when the item is active.\n- **navigation** - The navigation wrapper.\n- **navigation-button** - The navigation button.\n- **navigation-button--previous** - Applied to the previous button.\n- **navigation-button--next** - Applied to the next button.",
@@ -403,6 +385,24 @@
403
385
  }
404
386
  ]
405
387
  },
388
+ {
389
+ "name": "nve-carousel-item",
390
+ "description": "Et karusellelement som representerer bilder eller annet valgfritt innhold i en karusell.\nBruk propertien \"description\" for å legge på bildetekst under bildet.\nAnbefaler å bare godta liggende eller stående formater på bilder i karusellen for best layout.\n---\n\n\n### **Spor:**\n - _default_ - The carousel item's content..\n\n### **CSS-variabler:**\n - **--aspect-ratio** - The slide's aspect ratio. Inherited from the carousel by default. _(default: undefined)_",
391
+ "attributes": [
392
+ { "name": "testId", "description": "", "values": [] },
393
+ {
394
+ "name": "description",
395
+ "description": "Brukes til å legge på beskrivelse på bildene.",
396
+ "values": []
397
+ }
398
+ ],
399
+ "references": [
400
+ {
401
+ "name": "Mer info",
402
+ "url": "https://designsystem.nve.no/components/nve-carousel-item"
403
+ }
404
+ ]
405
+ },
406
406
  {
407
407
  "name": "nve-carousel-thumbnail",
408
408
  "description": "En rekke med miniatyrbilder som brukes til å forhåndsvise bildene i nve-carousel.\nDefiner en lik id på nve-carousel og nve-carousel-thumbnail for å koble komponentene sammen.\n---\n",
@@ -1924,6 +1924,11 @@
1924
1924
  "name": "background",
1925
1925
  "description": "Om fanen skal ha bakgrunn",
1926
1926
  "values": []
1927
+ },
1928
+ {
1929
+ "name": "disabled",
1930
+ "description": "Faner kan være disabled",
1931
+ "values": []
1927
1932
  }
1928
1933
  ],
1929
1934
  "references": [