@politiet/sheriff-web-components 2.0.3 → 2.1.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.
Files changed (92) hide show
  1. package/dist/frameworks/preact.d.ts +4 -1
  2. package/dist/frameworks/preact.d.ts.map +1 -1
  3. package/dist/frameworks/react.d.ts +4 -1
  4. package/dist/frameworks/react.d.ts.map +1 -1
  5. package/dist/frameworks/solidjs.d.ts +1 -0
  6. package/dist/frameworks/solidjs.d.ts.map +1 -1
  7. package/dist/frameworks/svelte.d.ts +1 -0
  8. package/dist/frameworks/svelte.d.ts.map +1 -1
  9. package/dist/frameworks/vue.d.ts +1 -0
  10. package/dist/frameworks/vue.d.ts.map +1 -1
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/react-wrappers/SDSDetailsWrapper.d.ts +6 -0
  16. package/dist/react-wrappers/SDSDetailsWrapper.d.ts.map +1 -0
  17. package/dist/react-wrappers/SDSDetailsWrapper.js +12 -0
  18. package/dist/react-wrappers/SDSDetailsWrapper.js.map +1 -0
  19. package/dist/react-wrappers/index.d.ts +1 -0
  20. package/dist/react-wrappers/index.d.ts.map +1 -1
  21. package/dist/react-wrappers/index.js +1 -0
  22. package/dist/react-wrappers/index.js.map +1 -1
  23. package/dist/sds-alert/sds-alert.styles.d.ts.map +1 -1
  24. package/dist/sds-alert/sds-alert.styles.js +2 -0
  25. package/dist/sds-alert/sds-alert.styles.js.map +1 -1
  26. package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
  27. package/dist/sds-button/sds-button.styles.js +3 -2
  28. package/dist/sds-button/sds-button.styles.js.map +1 -1
  29. package/dist/sds-checkbox/sds-checkbox.d.ts +20 -1
  30. package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
  31. package/dist/sds-checkbox/sds-checkbox.js +54 -2
  32. package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
  33. package/dist/sds-checkbox/sds-checkbox.styles.d.ts.map +1 -1
  34. package/dist/sds-checkbox/sds-checkbox.styles.js +10 -5
  35. package/dist/sds-checkbox/sds-checkbox.styles.js.map +1 -1
  36. package/dist/sds-checkbox-group/sds-checkbox-group.d.ts +2 -0
  37. package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
  38. package/dist/sds-checkbox-group/sds-checkbox-group.js +37 -24
  39. package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
  40. package/dist/sds-checkbox-group/sds-checkbox-group.styles.js +6 -6
  41. package/dist/sds-checkbox-group/sds-checkbox-group.styles.js.map +1 -1
  42. package/dist/sds-chip/sds-chip.d.ts.map +1 -1
  43. package/dist/sds-chip/sds-chip.js +2 -3
  44. package/dist/sds-chip/sds-chip.js.map +1 -1
  45. package/dist/sds-chip/sds-chip.styles.d.ts.map +1 -1
  46. package/dist/sds-chip/sds-chip.styles.js +7 -3
  47. package/dist/sds-chip/sds-chip.styles.js.map +1 -1
  48. package/dist/sds-details/sds-details.d.ts +21 -0
  49. package/dist/sds-details/sds-details.d.ts.map +1 -0
  50. package/dist/sds-details/sds-details.js +60 -0
  51. package/dist/sds-details/sds-details.js.map +1 -0
  52. package/dist/sds-details/sds-details.styles.d.ts +2 -0
  53. package/dist/sds-details/sds-details.styles.d.ts.map +1 -0
  54. package/dist/sds-details/sds-details.styles.js +139 -0
  55. package/dist/sds-details/sds-details.styles.js.map +1 -0
  56. package/dist/sds-icon/sds-icon-names.d.ts +1 -1
  57. package/dist/sds-icon/sds-icon-names.d.ts.map +1 -1
  58. package/dist/sds-icon/sds-icon-names.js +1 -0
  59. package/dist/sds-icon/sds-icon-names.js.map +1 -1
  60. package/dist/sds-icon/sds-icon.system.d.ts +1 -1
  61. package/dist/sds-icon/sds-icon.system.d.ts.map +1 -1
  62. package/dist/sds-icon/sds-icon.system.js +2 -0
  63. package/dist/sds-icon/sds-icon.system.js.map +1 -1
  64. package/dist/sds-notification/sds-notification.styles.js +1 -1
  65. package/dist/sds-notification/sds-notification.styles.js.map +1 -1
  66. package/dist/sds-radio/sds-radio.styles.d.ts.map +1 -1
  67. package/dist/sds-radio/sds-radio.styles.js +9 -4
  68. package/dist/sds-radio/sds-radio.styles.js.map +1 -1
  69. package/dist/sds-radio-group/sds-radio-group.styles.js +6 -6
  70. package/dist/sds-radio-group/sds-radio-group.styles.js.map +1 -1
  71. package/dist/sds-switch/sds-switch.js +2 -2
  72. package/dist/sds-switch/sds-switch.js.map +1 -1
  73. package/dist/sds-switch/sds-switch.styles.js +6 -6
  74. package/dist/sds-switch/sds-switch.styles.js.map +1 -1
  75. package/dist/sds-text/sds-text.styles.js +2 -2
  76. package/dist/sds-text/sds-text.styles.js.map +1 -1
  77. package/dist/sds-textarea/sds-textarea.d.ts +1 -1
  78. package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
  79. package/dist/sds-textarea/sds-textarea.js +14 -12
  80. package/dist/sds-textarea/sds-textarea.js.map +1 -1
  81. package/dist/sds-textarea/sds-textarea.styles.js +15 -15
  82. package/dist/sds-textarea/sds-textarea.styles.js.map +1 -1
  83. package/dist/sds-textfield/sds-textfield.d.ts +1 -1
  84. package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
  85. package/dist/sds-textfield/sds-textfield.js +17 -14
  86. package/dist/sds-textfield/sds-textfield.js.map +1 -1
  87. package/dist/sheriff-web-components.js +323 -2769
  88. package/dist/types.d.ts +2 -1
  89. package/dist/types.d.ts.map +1 -1
  90. package/dist/types.js +1 -1
  91. package/dist/types.js.map +1 -1
  92. package/package.json +3 -3
@@ -1,598 +1,4 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t$4 = globalThis, e$7 = t$4.ShadowRoot && (void 0 === t$4.ShadyCSS || t$4.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$6 = /* @__PURE__ */ new WeakMap();
7
- let n$3 = class n {
8
- constructor(t2, e3, o2) {
9
- if (this._$cssResult$ = true, o2 !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
- this.cssText = t2, this.t = e3;
11
- }
12
- get styleSheet() {
13
- let t2 = this.o;
14
- const s2 = this.t;
15
- if (e$7 && void 0 === t2) {
16
- const e3 = void 0 !== s2 && 1 === s2.length;
17
- e3 && (t2 = o$6.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e3 && o$6.set(s2, t2));
18
- }
19
- return t2;
20
- }
21
- toString() {
22
- return this.cssText;
23
- }
24
- };
25
- const r$4 = (t2) => new n$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$2), i$4 = (t2, ...e3) => {
26
- const o2 = 1 === t2.length ? t2[0] : e3.reduce((e4, s2, o3) => e4 + ((t3) => {
27
- if (true === t3._$cssResult$) return t3.cssText;
28
- if ("number" == typeof t3) return t3;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(s2) + t2[o3 + 1], t2[0]);
31
- return new n$3(o2, t2, s$2);
32
- }, S$1 = (s2, o2) => {
33
- if (e$7) s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
34
- else for (const e3 of o2) {
35
- const o3 = document.createElement("style"), n3 = t$4.litNonce;
36
- void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e3.cssText, s2.appendChild(o3);
37
- }
38
- }, c$2 = e$7 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
39
- let e3 = "";
40
- for (const s2 of t3.cssRules) e3 += s2.cssText;
41
- return r$4(e3);
42
- })(t2) : t2;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: i$3, defineProperty: e$6, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$3, getOwnPropertySymbols: o$5, getPrototypeOf: n$2 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
49
- switch (s2) {
50
- case Boolean:
51
- t2 = t2 ? l$1 : null;
52
- break;
53
- case Object:
54
- case Array:
55
- t2 = null == t2 ? t2 : JSON.stringify(t2);
56
- }
57
- return t2;
58
- }, fromAttribute(t2, s2) {
59
- let i3 = t2;
60
- switch (s2) {
61
- case Boolean:
62
- i3 = null !== t2;
63
- break;
64
- case Number:
65
- i3 = null === t2 ? null : Number(t2);
66
- break;
67
- case Object:
68
- case Array:
69
- try {
70
- i3 = JSON.parse(t2);
71
- } catch (t3) {
72
- i3 = null;
73
- }
74
- }
75
- return i3;
76
- } }, f$1 = (t2, s2) => !i$3(t2, s2), b = { attribute: true, type: String, converter: u$1, reflect: false, useDefault: false, hasChanged: f$1 };
77
- Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let y$1 = class y extends HTMLElement {
79
- static addInitializer(t2) {
80
- this._$Ei(), (this.l ??= []).push(t2);
81
- }
82
- static get observedAttributes() {
83
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
- }
85
- static createProperty(t2, s2 = b) {
86
- if (s2.state && (s2.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t2) && ((s2 = Object.create(s2)).wrapped = true), this.elementProperties.set(t2, s2), !s2.noAccessor) {
87
- const i3 = Symbol(), h2 = this.getPropertyDescriptor(t2, i3, s2);
88
- void 0 !== h2 && e$6(this.prototype, t2, h2);
89
- }
90
- }
91
- static getPropertyDescriptor(t2, s2, i3) {
92
- const { get: e3, set: r2 } = h$1(this.prototype, t2) ?? { get() {
93
- return this[s2];
94
- }, set(t3) {
95
- this[s2] = t3;
96
- } };
97
- return { get: e3, set(s3) {
98
- const h2 = e3?.call(this);
99
- r2?.call(this, s3), this.requestUpdate(t2, h2, i3);
100
- }, configurable: true, enumerable: true };
101
- }
102
- static getPropertyOptions(t2) {
103
- return this.elementProperties.get(t2) ?? b;
104
- }
105
- static _$Ei() {
106
- if (this.hasOwnProperty(d$1("elementProperties"))) return;
107
- const t2 = n$2(this);
108
- t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
109
- }
110
- static finalize() {
111
- if (this.hasOwnProperty(d$1("finalized"))) return;
112
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
113
- const t3 = this.properties, s2 = [...r$3(t3), ...o$5(t3)];
114
- for (const i3 of s2) this.createProperty(i3, t3[i3]);
115
- }
116
- const t2 = this[Symbol.metadata];
117
- if (null !== t2) {
118
- const s2 = litPropertyMetadata.get(t2);
119
- if (void 0 !== s2) for (const [t3, i3] of s2) this.elementProperties.set(t3, i3);
120
- }
121
- this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [t3, s2] of this.elementProperties) {
123
- const i3 = this._$Eu(t3, s2);
124
- void 0 !== i3 && this._$Eh.set(i3, t3);
125
- }
126
- this.elementStyles = this.finalizeStyles(this.styles);
127
- }
128
- static finalizeStyles(s2) {
129
- const i3 = [];
130
- if (Array.isArray(s2)) {
131
- const e3 = new Set(s2.flat(1 / 0).reverse());
132
- for (const s3 of e3) i3.unshift(c$2(s3));
133
- } else void 0 !== s2 && i3.push(c$2(s2));
134
- return i3;
135
- }
136
- static _$Eu(t2, s2) {
137
- const i3 = s2.attribute;
138
- return false === i3 ? void 0 : "string" == typeof i3 ? i3 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
139
- }
140
- constructor() {
141
- super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
142
- }
143
- _$Ev() {
144
- this._$ES = new Promise((t2) => this.enableUpdating = t2), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t2) => t2(this));
145
- }
146
- addController(t2) {
147
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t2), void 0 !== this.renderRoot && this.isConnected && t2.hostConnected?.();
148
- }
149
- removeController(t2) {
150
- this._$EO?.delete(t2);
151
- }
152
- _$E_() {
153
- const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
154
- for (const i3 of s2.keys()) this.hasOwnProperty(i3) && (t2.set(i3, this[i3]), delete this[i3]);
155
- t2.size > 0 && (this._$Ep = t2);
156
- }
157
- createRenderRoot() {
158
- const t2 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return S$1(t2, this.constructor.elementStyles), t2;
160
- }
161
- connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach((t2) => t2.hostConnected?.());
163
- }
164
- enableUpdating(t2) {
165
- }
166
- disconnectedCallback() {
167
- this._$EO?.forEach((t2) => t2.hostDisconnected?.());
168
- }
169
- attributeChangedCallback(t2, s2, i3) {
170
- this._$AK(t2, i3);
171
- }
172
- _$ET(t2, s2) {
173
- const i3 = this.constructor.elementProperties.get(t2), e3 = this.constructor._$Eu(t2, i3);
174
- if (void 0 !== e3 && true === i3.reflect) {
175
- const h2 = (void 0 !== i3.converter?.toAttribute ? i3.converter : u$1).toAttribute(s2, i3.type);
176
- this._$Em = t2, null == h2 ? this.removeAttribute(e3) : this.setAttribute(e3, h2), this._$Em = null;
177
- }
178
- }
179
- _$AK(t2, s2) {
180
- const i3 = this.constructor, e3 = i3._$Eh.get(t2);
181
- if (void 0 !== e3 && this._$Em !== e3) {
182
- const t3 = i3.getPropertyOptions(e3), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== t3.converter?.fromAttribute ? t3.converter : u$1;
183
- this._$Em = e3, this[e3] = h2.fromAttribute(s2, t3.type) ?? this._$Ej?.get(e3) ?? null, this._$Em = null;
184
- }
185
- }
186
- requestUpdate(t2, s2, i3) {
187
- if (void 0 !== t2) {
188
- const e3 = this.constructor, h2 = this[t2];
189
- if (i3 ??= e3.getPropertyOptions(t2), !((i3.hasChanged ?? f$1)(h2, s2) || i3.useDefault && i3.reflect && h2 === this._$Ej?.get(t2) && !this.hasAttribute(e3._$Eu(t2, i3)))) return;
190
- this.C(t2, s2, i3);
191
- }
192
- false === this.isUpdatePending && (this._$ES = this._$EP());
193
- }
194
- C(t2, s2, { useDefault: i3, reflect: e3, wrapped: h2 }, r2) {
195
- i3 && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t2) && (this._$Ej.set(t2, r2 ?? s2 ?? this[t2]), true !== h2 || void 0 !== r2) || (this._$AL.has(t2) || (this.hasUpdated || i3 || (s2 = void 0), this._$AL.set(t2, s2)), true === e3 && this._$Em !== t2 && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t2));
196
- }
197
- async _$EP() {
198
- this.isUpdatePending = true;
199
- try {
200
- await this._$ES;
201
- } catch (t3) {
202
- Promise.reject(t3);
203
- }
204
- const t2 = this.scheduleUpdate();
205
- return null != t2 && await t2, !this.isUpdatePending;
206
- }
207
- scheduleUpdate() {
208
- return this.performUpdate();
209
- }
210
- performUpdate() {
211
- if (!this.isUpdatePending) return;
212
- if (!this.hasUpdated) {
213
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
214
- for (const [t4, s3] of this._$Ep) this[t4] = s3;
215
- this._$Ep = void 0;
216
- }
217
- const t3 = this.constructor.elementProperties;
218
- if (t3.size > 0) for (const [s3, i3] of t3) {
219
- const { wrapped: t4 } = i3, e3 = this[s3];
220
- true !== t4 || this._$AL.has(s3) || void 0 === e3 || this.C(s3, void 0, i3, e3);
221
- }
222
- }
223
- let t2 = false;
224
- const s2 = this._$AL;
225
- try {
226
- t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), this._$EO?.forEach((t3) => t3.hostUpdate?.()), this.update(s2)) : this._$EM();
227
- } catch (s3) {
228
- throw t2 = false, this._$EM(), s3;
229
- }
230
- t2 && this._$AE(s2);
231
- }
232
- willUpdate(t2) {
233
- }
234
- _$AE(t2) {
235
- this._$EO?.forEach((t3) => t3.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
236
- }
237
- _$EM() {
238
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
239
- }
240
- get updateComplete() {
241
- return this.getUpdateComplete();
242
- }
243
- getUpdateComplete() {
244
- return this._$ES;
245
- }
246
- shouldUpdate(t2) {
247
- return true;
248
- }
249
- update(t2) {
250
- this._$Eq &&= this._$Eq.forEach((t3) => this._$ET(t3, this[t3])), this._$EM();
251
- }
252
- updated(t2) {
253
- }
254
- firstUpdated(t2) {
255
- }
256
- };
257
- y$1.elementStyles = [], y$1.shadowRootOptions = { mode: "open" }, y$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y$1 }), (a$1.reactiveElementVersions ??= []).push("2.1.0");
258
- /**
259
- * @license
260
- * Copyright 2017 Google LLC
261
- * SPDX-License-Identifier: BSD-3-Clause
262
- */
263
- const t$3 = globalThis, i$2 = t$3.trustedTypes, s$1 = i$2 ? i$2.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$5 = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, o$4 = "?" + h, n$1 = `<${o$4}>`, r$2 = document, l = () => r$2.createComment(""), c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, a = Array.isArray, u = (t2) => a(t2) || "function" == typeof t2?.[Symbol.iterator], d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
264
- \f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y2 = (t2) => (i3, ...s2) => ({ _$litType$: t2, strings: i3, values: s2 }), x = y2(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), C = r$2.createTreeWalker(r$2, 129);
265
- function P(t2, i3) {
266
- if (!a(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
267
- return void 0 !== s$1 ? s$1.createHTML(i3) : i3;
268
- }
269
- const V = (t2, i3) => {
270
- const s2 = t2.length - 1, o2 = [];
271
- let r2, l2 = 2 === i3 ? "<svg>" : 3 === i3 ? "<math>" : "", c2 = f;
272
- for (let i4 = 0; i4 < s2; i4++) {
273
- const s3 = t2[i4];
274
- let a2, u2, d2 = -1, y3 = 0;
275
- for (; y3 < s3.length && (c2.lastIndex = y3, u2 = c2.exec(s3), null !== u2); ) y3 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r2 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r2 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r2 = void 0);
276
- const x2 = c2 === m && t2[i4 + 1].startsWith("/>") ? " " : "";
277
- l2 += c2 === f ? s3 + n$1 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e$5 + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i4 : x2);
278
- }
279
- return [P(t2, l2 + (t2[s2] || "<?>") + (2 === i3 ? "</svg>" : 3 === i3 ? "</math>" : "")), o2];
280
- };
281
- class N {
282
- constructor({ strings: t2, _$litType$: s2 }, n3) {
283
- let r2;
284
- this.parts = [];
285
- let c2 = 0, a2 = 0;
286
- const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = V(t2, s2);
287
- if (this.el = N.createElement(f2, n3), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
288
- const t3 = this.el.content.firstChild;
289
- t3.replaceWith(...t3.childNodes);
290
- }
291
- for (; null !== (r2 = C.nextNode()) && d2.length < u2; ) {
292
- if (1 === r2.nodeType) {
293
- if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(e$5)) {
294
- const i3 = v2[a2++], s3 = r2.getAttribute(t3).split(h), e3 = /([.?@])?(.*)/.exec(i3);
295
- d2.push({ type: 1, index: c2, name: e3[2], strings: s3, ctor: "." === e3[1] ? H : "?" === e3[1] ? I : "@" === e3[1] ? L : k }), r2.removeAttribute(t3);
296
- } else t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r2.removeAttribute(t3));
297
- if ($.test(r2.tagName)) {
298
- const t3 = r2.textContent.split(h), s3 = t3.length - 1;
299
- if (s3 > 0) {
300
- r2.textContent = i$2 ? i$2.emptyScript : "";
301
- for (let i3 = 0; i3 < s3; i3++) r2.append(t3[i3], l()), C.nextNode(), d2.push({ type: 2, index: ++c2 });
302
- r2.append(t3[s3], l());
303
- }
304
- }
305
- } else if (8 === r2.nodeType) if (r2.data === o$4) d2.push({ type: 2, index: c2 });
306
- else {
307
- let t3 = -1;
308
- for (; -1 !== (t3 = r2.data.indexOf(h, t3 + 1)); ) d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
309
- }
310
- c2++;
311
- }
312
- }
313
- static createElement(t2, i3) {
314
- const s2 = r$2.createElement("template");
315
- return s2.innerHTML = t2, s2;
316
- }
317
- }
318
- function S(t2, i3, s2 = t2, e3) {
319
- if (i3 === T) return i3;
320
- let h2 = void 0 !== e3 ? s2._$Co?.[e3] : s2._$Cl;
321
- const o2 = c(i3) ? void 0 : i3._$litDirective$;
322
- return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e3)), void 0 !== e3 ? (s2._$Co ??= [])[e3] = h2 : s2._$Cl = h2), void 0 !== h2 && (i3 = S(t2, h2._$AS(t2, i3.values), h2, e3)), i3;
323
- }
324
- class M {
325
- constructor(t2, i3) {
326
- this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i3;
327
- }
328
- get parentNode() {
329
- return this._$AM.parentNode;
330
- }
331
- get _$AU() {
332
- return this._$AM._$AU;
333
- }
334
- u(t2) {
335
- const { el: { content: i3 }, parts: s2 } = this._$AD, e3 = (t2?.creationScope ?? r$2).importNode(i3, true);
336
- C.currentNode = e3;
337
- let h2 = C.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
338
- for (; void 0 !== l2; ) {
339
- if (o2 === l2.index) {
340
- let i4;
341
- 2 === l2.type ? i4 = new R(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i4 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i4 = new z(h2, this, t2)), this._$AV.push(i4), l2 = s2[++n3];
342
- }
343
- o2 !== l2?.index && (h2 = C.nextNode(), o2++);
344
- }
345
- return C.currentNode = r$2, e3;
346
- }
347
- p(t2) {
348
- let i3 = 0;
349
- for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i3), i3 += s2.strings.length - 2) : s2._$AI(t2[i3])), i3++;
350
- }
351
- }
352
- class R {
353
- get _$AU() {
354
- return this._$AM?._$AU ?? this._$Cv;
355
- }
356
- constructor(t2, i3, s2, e3) {
357
- this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t2, this._$AB = i3, this._$AM = s2, this.options = e3, this._$Cv = e3?.isConnected ?? true;
358
- }
359
- get parentNode() {
360
- let t2 = this._$AA.parentNode;
361
- const i3 = this._$AM;
362
- return void 0 !== i3 && 11 === t2?.nodeType && (t2 = i3.parentNode), t2;
363
- }
364
- get startNode() {
365
- return this._$AA;
366
- }
367
- get endNode() {
368
- return this._$AB;
369
- }
370
- _$AI(t2, i3 = this) {
371
- t2 = S(this, t2, i3), c(t2) ? t2 === E || null == t2 || "" === t2 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : u(t2) ? this.k(t2) : this._(t2);
372
- }
373
- O(t2) {
374
- return this._$AA.parentNode.insertBefore(t2, this._$AB);
375
- }
376
- T(t2) {
377
- this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
378
- }
379
- _(t2) {
380
- this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(r$2.createTextNode(t2)), this._$AH = t2;
381
- }
382
- $(t2) {
383
- const { values: i3, _$litType$: s2 } = t2, e3 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
384
- if (this._$AH?._$AD === e3) this._$AH.p(i3);
385
- else {
386
- const t3 = new M(e3, this), s3 = t3.u(this.options);
387
- t3.p(i3), this.T(s3), this._$AH = t3;
388
- }
389
- }
390
- _$AC(t2) {
391
- let i3 = A.get(t2.strings);
392
- return void 0 === i3 && A.set(t2.strings, i3 = new N(t2)), i3;
393
- }
394
- k(t2) {
395
- a(this._$AH) || (this._$AH = [], this._$AR());
396
- const i3 = this._$AH;
397
- let s2, e3 = 0;
398
- for (const h2 of t2) e3 === i3.length ? i3.push(s2 = new R(this.O(l()), this.O(l()), this, this.options)) : s2 = i3[e3], s2._$AI(h2), e3++;
399
- e3 < i3.length && (this._$AR(s2 && s2._$AB.nextSibling, e3), i3.length = e3);
400
- }
401
- _$AR(t2 = this._$AA.nextSibling, i3) {
402
- for (this._$AP?.(false, true, i3); t2 && t2 !== this._$AB; ) {
403
- const i4 = t2.nextSibling;
404
- t2.remove(), t2 = i4;
405
- }
406
- }
407
- setConnected(t2) {
408
- void 0 === this._$AM && (this._$Cv = t2, this._$AP?.(t2));
409
- }
410
- }
411
- class k {
412
- get tagName() {
413
- return this.element.tagName;
414
- }
415
- get _$AU() {
416
- return this._$AM._$AU;
417
- }
418
- constructor(t2, i3, s2, e3, h2) {
419
- this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t2, this.name = i3, this._$AM = e3, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
420
- }
421
- _$AI(t2, i3 = this, s2, e3) {
422
- const h2 = this.strings;
423
- let o2 = false;
424
- if (void 0 === h2) t2 = S(this, t2, i3, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== T, o2 && (this._$AH = t2);
425
- else {
426
- const e4 = t2;
427
- let n3, r2;
428
- for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r2 = S(this, e4[s2 + n3], i3, n3), r2 === T && (r2 = this._$AH[n3]), o2 ||= !c(r2) || r2 !== this._$AH[n3], r2 === E ? t2 = E : t2 !== E && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
429
- }
430
- o2 && !e3 && this.j(t2);
431
- }
432
- j(t2) {
433
- t2 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
434
- }
435
- }
436
- class H extends k {
437
- constructor() {
438
- super(...arguments), this.type = 3;
439
- }
440
- j(t2) {
441
- this.element[this.name] = t2 === E ? void 0 : t2;
442
- }
443
- }
444
- class I extends k {
445
- constructor() {
446
- super(...arguments), this.type = 4;
447
- }
448
- j(t2) {
449
- this.element.toggleAttribute(this.name, !!t2 && t2 !== E);
450
- }
451
- }
452
- class L extends k {
453
- constructor(t2, i3, s2, e3, h2) {
454
- super(t2, i3, s2, e3, h2), this.type = 5;
455
- }
456
- _$AI(t2, i3 = this) {
457
- if ((t2 = S(this, t2, i3, 0) ?? E) === T) return;
458
- const s2 = this._$AH, e3 = t2 === E && s2 !== E || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== E && (s2 === E || e3);
459
- e3 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
460
- }
461
- handleEvent(t2) {
462
- "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t2) : this._$AH.handleEvent(t2);
463
- }
464
- }
465
- class z {
466
- constructor(t2, i3, s2) {
467
- this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i3, this.options = s2;
468
- }
469
- get _$AU() {
470
- return this._$AM._$AU;
471
- }
472
- _$AI(t2) {
473
- S(this, t2);
474
- }
475
- }
476
- const j = t$3.litHtmlPolyfillSupport;
477
- j?.(N, R), (t$3.litHtmlVersions ??= []).push("3.3.0");
478
- const B = (t2, i3, s2) => {
479
- const e3 = s2?.renderBefore ?? i3;
480
- let h2 = e3._$litPart$;
481
- if (void 0 === h2) {
482
- const t3 = s2?.renderBefore ?? null;
483
- e3._$litPart$ = h2 = new R(i3.insertBefore(l(), t3), t3, void 0, s2 ?? {});
484
- }
485
- return h2._$AI(t2), h2;
486
- };
487
- /**
488
- * @license
489
- * Copyright 2017 Google LLC
490
- * SPDX-License-Identifier: BSD-3-Clause
491
- */
492
- const s = globalThis;
493
- let i$1 = class i extends y$1 {
494
- constructor() {
495
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
496
- }
497
- createRenderRoot() {
498
- const t2 = super.createRenderRoot();
499
- return this.renderOptions.renderBefore ??= t2.firstChild, t2;
500
- }
501
- update(t2) {
502
- const r2 = this.render();
503
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = B(r2, this.renderRoot, this.renderOptions);
504
- }
505
- connectedCallback() {
506
- super.connectedCallback(), this._$Do?.setConnected(true);
507
- }
508
- disconnectedCallback() {
509
- super.disconnectedCallback(), this._$Do?.setConnected(false);
510
- }
511
- render() {
512
- return T;
513
- }
514
- };
515
- i$1._$litElement$ = true, i$1["finalized"] = true, s.litElementHydrateSupport?.({ LitElement: i$1 });
516
- const o$3 = s.litElementPolyfillSupport;
517
- o$3?.({ LitElement: i$1 });
518
- (s.litElementVersions ??= []).push("4.2.0");
519
- /**
520
- * @license
521
- * Copyright 2017 Google LLC
522
- * SPDX-License-Identifier: BSD-3-Clause
523
- */
524
- const t$2 = (t2) => (e3, o2) => {
525
- void 0 !== o2 ? o2.addInitializer(() => {
526
- customElements.define(t2, e3);
527
- }) : customElements.define(t2, e3);
528
- };
529
- /**
530
- * @license
531
- * Copyright 2017 Google LLC
532
- * SPDX-License-Identifier: BSD-3-Clause
533
- */
534
- const o$2 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$1 = (t2 = o$2, e3, r2) => {
535
- const { kind: n3, metadata: i3 } = r2;
536
- let s2 = globalThis.litPropertyMetadata.get(i3);
537
- if (void 0 === s2 && globalThis.litPropertyMetadata.set(i3, s2 = /* @__PURE__ */ new Map()), "setter" === n3 && ((t2 = Object.create(t2)).wrapped = true), s2.set(r2.name, t2), "accessor" === n3) {
538
- const { name: o2 } = r2;
539
- return { set(r3) {
540
- const n4 = e3.get.call(this);
541
- e3.set.call(this, r3), this.requestUpdate(o2, n4, t2);
542
- }, init(e4) {
543
- return void 0 !== e4 && this.C(o2, void 0, t2, e4), e4;
544
- } };
545
- }
546
- if ("setter" === n3) {
547
- const { name: o2 } = r2;
548
- return function(r3) {
549
- const n4 = this[o2];
550
- e3.call(this, r3), this.requestUpdate(o2, n4, t2);
551
- };
552
- }
553
- throw Error("Unsupported decorator location: " + n3);
554
- };
555
- function n2(t2) {
556
- return (e3, o2) => "object" == typeof o2 ? r$1(t2, e3, o2) : ((t3, e4, o3) => {
557
- const r2 = e4.hasOwnProperty(o3);
558
- return e4.constructor.createProperty(o3, t3), r2 ? Object.getOwnPropertyDescriptor(e4, o3) : void 0;
559
- })(t2, e3, o2);
560
- }
561
- /**
562
- * @license
563
- * Copyright 2017 Google LLC
564
- * SPDX-License-Identifier: BSD-3-Clause
565
- */
566
- function r(r2) {
567
- return n2({ ...r2, state: true, attribute: false });
568
- }
569
- /**
570
- * @license
571
- * Copyright 2017 Google LLC
572
- * SPDX-License-Identifier: BSD-3-Clause
573
- */
574
- const e$4 = (e3, t2, c2) => (c2.configurable = true, c2.enumerable = true, Reflect.decorate && "object" != typeof t2 && Object.defineProperty(e3, t2, c2), c2);
575
- /**
576
- * @license
577
- * Copyright 2017 Google LLC
578
- * SPDX-License-Identifier: BSD-3-Clause
579
- */
580
- function e$3(e3, r2) {
581
- return (n3, s2, i3) => {
582
- const o2 = (t2) => t2.renderRoot?.querySelector(e3) ?? null;
583
- return e$4(n3, s2, { get() {
584
- return o2(this);
585
- } });
586
- };
587
- }
588
- function guardedCustomElement(tagName) {
589
- return (cls) => {
590
- if (!customElements.get(tagName)) {
591
- t$2(tagName)(cls);
592
- }
593
- };
594
- }
595
- const styles$g = i$4`
1
+ const t=globalThis,s=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,e=Symbol(),o=/* @__PURE__ */new WeakMap;let r=class{constructor(t,s,o){if(this._$cssResult$=!0,o!==e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&o.set(e,t))}return t}toString(){return this.cssText}};const a=(t,...s)=>{const o=1===t.length?t[0]:s.reduce(((s,e,o)=>s+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+t[o+1]),t[0]);return new r(o,t,e)},i=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let s="";for(const e of t.cssRules)s+=e.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,e))(s)})(t):t,{is:d,defineProperty:n,getOwnPropertyDescriptor:l,getOwnPropertyNames:c,getOwnPropertySymbols:h,getPrototypeOf:p}=Object,g=globalThis,v=g.trustedTypes,u=v?v.emptyScript:"",f=g.reactiveElementPolyfillSupport,b=(t,s)=>t,_={toAttribute(t,s){switch(s){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let e=t;switch(s){case Boolean:e=null!==t;break;case Number:e=null===t?null:Number(t);break;case Object:case Array:try{e=JSON.parse(t)}catch(o){e=null}}return e}},x=(t,s)=>!d(t,s),m={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),g.litPropertyMetadata??=/* @__PURE__ */new WeakMap;let y=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=m){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const e=Symbol(),o=this.getPropertyDescriptor(t,e,s);void 0!==o&&n(this.prototype,t,o)}}static getPropertyDescriptor(t,s,e){const{get:o,set:r}=l(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:o,set(s){const a=o?.call(this);r?.call(this,s),this.requestUpdate(t,a,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??m}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,s=[...c(t),...h(t)];for(const e of s)this.createProperty(e,t[e])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,e]of s)this.elementProperties.set(t,e)}this._$Eh=/* @__PURE__ */new Map;for(const[s,e]of this.elementProperties){const t=this._$Eu(s,e);void 0!==t&&this._$Eh.set(t,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const e=new Set(t.flat(1/0).reverse());for(const t of e)s.unshift(i(t))}else void 0!==t&&s.push(i(t));return s}static _$Eu(t,s){const e=s.attribute;return!1===e?void 0:"string"==typeof e?e:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=/* @__PURE__ */new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=/* @__PURE__ */new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=/* @__PURE__ */new Map,s=this.constructor.elementProperties;for(const e of s.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,o)=>{if(s)e.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of o){const o=document.createElement("style"),r=t.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=s.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,e){this._$AK(t,e)}_$ET(t,s){const e=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,e);if(void 0!==o&&!0===e.reflect){const r=(void 0!==e.converter?.toAttribute?e.converter:_).toAttribute(s,e.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,s){const e=this.constructor,o=e._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=e.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=o,this[o]=r.fromAttribute(s,t.type)??this._$Ej?.get(o)??null,this._$Em=null}}requestUpdate(t,s,e){if(void 0!==t){const o=this.constructor,r=this[t];if(e??=o.getPropertyOptions(t),!((e.hasChanged??x)(r,s)||e.useDefault&&e.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,e))))return;this.C(t,s,e)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:e,reflect:o,wrapped:r},a){e&&!(this._$Ej??=/* @__PURE__ */new Map).has(t)&&(this._$Ej.set(t,a??s??this[t]),!0!==r||void 0!==a)||(this._$AL.has(t)||(this.hasUpdated||e||(s=void 0),this._$AL.set(t,s)),!0===o&&this._$Em!==t&&(this._$Eq??=/* @__PURE__ */new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,e]of t){const{wrapped:t}=e,o=this[s];!0!==t||this._$AL.has(s)||void 0===o||this.C(s,void 0,e,o)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=/* @__PURE__ */new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}};y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=/* @__PURE__ */new Map,y[b("finalized")]=/* @__PURE__ */new Map,f?.({ReactiveElement:y}),(g.reactiveElementVersions??=[]).push("2.1.0");const w=globalThis,k=w.trustedTypes,z=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",S=`lit$${Math.random().toFixed(9).slice(2)}$`,C="?"+S,E=`<${C}>`,A=document,q=()=>A.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,R=/>/g,T=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),L=/'/g,B=/"/g,I=/^(?:script|style|textarea|title)$/i,j=(G=1,(t,...s)=>({_$litType$:G,strings:t,values:s})),N=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),F=/* @__PURE__ */new WeakMap,H=A.createTreeWalker(A,129);var G;function K(t,s){if(!P(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(s):s}class W{constructor({strings:t,_$litType$:s},e){let o;this.parts=[];let r=0,a=0;const i=t.length-1,d=this.parts,[n,l]=((t,s)=>{const e=t.length-1,o=[];let r,a=2===s?"<svg>":3===s?"<math>":"",i=M;for(let d=0;d<e;d++){const s=t[d];let e,n,l=-1,c=0;for(;c<s.length&&(i.lastIndex=c,n=i.exec(s),null!==n);)c=i.lastIndex,i===M?"!--"===n[1]?i=V:void 0!==n[1]?i=R:void 0!==n[2]?(I.test(n[2])&&(r=RegExp("</"+n[2],"g")),i=T):void 0!==n[3]&&(i=T):i===T?">"===n[0]?(i=r??M,l=-1):void 0===n[1]?l=-2:(l=i.lastIndex-n[2].length,e=n[1],i=void 0===n[3]?T:'"'===n[3]?B:L):i===B||i===L?i=T:i===V||i===R?i=M:(i=T,r=void 0);const h=i===T&&t[d+1].startsWith("/>")?" ":"";a+=i===M?s+E:l>=0?(o.push(e),s.slice(0,l)+$+s.slice(l)+S+h):s+S+(-2===l?d:h)}return[K(t,a+(t[e]||"<?>")+(2===s?"</svg>":3===s?"</math>":"")),o]})(t,s);if(this.el=W.createElement(n,e),H.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=H.nextNode())&&d.length<i;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith($)){const s=l[a++],e=o.getAttribute(t).split(S),i=/([.?@])?(.*)/.exec(s);d.push({type:1,index:r,name:i[2],strings:e,ctor:"."===i[1]?J:"?"===i[1]?tt:"@"===i[1]?st:Y}),o.removeAttribute(t)}else t.startsWith(S)&&(d.push({type:6,index:r}),o.removeAttribute(t));if(I.test(o.tagName)){const t=o.textContent.split(S),s=t.length-1;if(s>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],q()),H.nextNode(),d.push({type:2,index:++r});o.append(t[s],q())}}}else if(8===o.nodeType)if(o.data===C)d.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)d.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,s){const e=A.createElement("template");return e.innerHTML=t,e}}function Z(t,s,e=t,o){if(s===N)return s;let r=void 0!==o?e._$Co?.[o]:e._$Cl;const a=O(s)?void 0:s._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(t),r._$AT(t,e,o)),void 0!==o?(e._$Co??=[])[o]=r:e._$Cl=r),void 0!==r&&(s=Z(t,r._$AS(t,s.values),r,o)),s}class Q{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:e}=this._$AD,o=(t?.creationScope??A).importNode(s,!0);H.currentNode=o;let r=H.nextNode(),a=0,i=0,d=e[0];for(;void 0!==d;){if(a===d.index){let s;2===d.type?s=new X(r,r.nextSibling,this,t):1===d.type?s=new d.ctor(r,d.name,d.strings,this,t):6===d.type&&(s=new et(r,this,t)),this._$AV.push(s),d=e[++i]}a!==d?.index&&(r=H.nextNode(),a++)}return H.currentNode=A,o}p(t){let s=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,s),s+=e.strings.length-2):e._$AI(t[s])),s++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,s,e,o){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=e,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return void 0!==s&&11===t?.nodeType&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=Z(this,t,s),O(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>P(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==U&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=W.createElement(K(e.h,e.h[0]),this.options)),e);if(this._$AH?._$AD===o)this._$AH.p(s);else{const t=new Q(o,this),e=t.u(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let s=F.get(t.strings);return void 0===s&&F.set(t.strings,s=new W(t)),s}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let e,o=0;for(const r of t)o===s.length?s.push(e=new X(this.O(q()),this.O(q()),this,this.options)):e=s[o],e._$AI(r),o++;o<s.length&&(this._$AR(e&&e._$AB.nextSibling,o),s.length=o)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,e,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=s,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}_$AI(t,s=this,e,o){const r=this.strings;let a=!1;if(void 0===r)t=Z(this,t,s,0),a=!O(t)||t!==this._$AH&&t!==N,a&&(this._$AH=t);else{const o=t;let i,d;for(t=r[0],i=0;i<r.length-1;i++)d=Z(this,o[e+i],s,i),d===N&&(d=this._$AH[i]),a||=!O(d)||d!==this._$AH[i],d===U?t=U:t!==U&&(t+=(d??"")+r[i+1]),this._$AH[i]=d}a&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class J extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}class tt extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==U)}}class st extends Y{constructor(t,s,e,o,r){super(t,s,e,o,r),this.type=5}_$AI(t,s=this){if((t=Z(this,t,s,0)??U)===N)return;const e=this._$AH,o=t===U&&e!==U||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,r=t!==U&&(e===U||o);o&&this.element.removeEventListener(this.name,this,e),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,s,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const ot=w.litHtmlPolyfillSupport;ot?.(W,X),(w.litHtmlVersions??=[]).push("3.3.0");const rt=globalThis;let at=class extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,s,e)=>{const o=e?.renderBefore??s;let r=o._$litPart$;if(void 0===r){const t=e?.renderBefore??null;o._$litPart$=r=new X(s.insertBefore(q(),t),t,void 0,e??{})}return r._$AI(t),r})(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return N}};at._$litElement$=!0,at.finalized=!0,rt.litElementHydrateSupport?.({LitElement:at});const it=rt.litElementPolyfillSupport;it?.({LitElement:at}),(rt.litElementVersions??=[]).push("4.2.0");const dt={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:x},nt=(t=dt,s,e)=>{const{kind:o,metadata:r}=e;let a=globalThis.litPropertyMetadata.get(r);if(void 0===a&&globalThis.litPropertyMetadata.set(r,a=/* @__PURE__ */new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),a.set(e.name,t),"accessor"===o){const{name:o}=e;return{set(e){const r=s.get.call(this);s.set.call(this,e),this.requestUpdate(o,r,t)},init(s){return void 0!==s&&this.C(o,void 0,t,s),s}}}if("setter"===o){const{name:o}=e;return function(e){const r=this[o];s.call(this,e),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};function lt(t){return(s,e)=>"object"==typeof e?nt(t,s,e):((t,s,e)=>{const o=s.hasOwnProperty(e);return s.constructor.createProperty(e,t),o?Object.getOwnPropertyDescriptor(s,e):void 0})(t,s,e)}function ct(t){return lt({...t,state:!0,attribute:!1})}function ht(t,s){return(s,e,o)=>((t,s,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&"object"!=typeof s&&Object.defineProperty(t,s,e),e))(s,e,{get(){return(s=>s.renderRoot?.querySelector(t)??null)(this)}})}function pt(t){return s=>{customElements.get(t)||(t=>(s,e)=>{void 0!==e?e.addInitializer((()=>{customElements.define(t,s)})):customElements.define(t,s)})(t)(s)}}const gt=a`
596
2
  :host {
597
3
  --_sds-alert-background-color: var(--sds-alert-background-color, var(--sds-color-alert-info-surface-tinted));
598
4
 
@@ -619,6 +25,8 @@ const styles$g = i$4`
619
25
  --_sds-alert-max-line-width: var(--sds-alert-max-line-width, var(--sds-typography-max-line-width));
620
26
  --_sds-alert-padding: var(--sds-alert-padding, var(--sds-spacing-sm));
621
27
 
28
+ --sds-icon-color: var(--sds-alert-icon-color, var(--_sds-alert-icon-color));
29
+
622
30
  display: block;
623
31
  }
624
32
 
@@ -764,142 +172,7 @@ const styles$g = i$4`
764
172
  margin: 0 !important;
765
173
  max-width: var(--_sds-alert-max-line-width) !important;
766
174
  }
767
- `;
768
- /**
769
- * @license
770
- * Copyright 2018 Google LLC
771
- * SPDX-License-Identifier: BSD-3-Clause
772
- */
773
- const o$1 = (o2) => o2 ?? E;
774
- /**
775
- * @license
776
- * Copyright 2017 Google LLC
777
- * SPDX-License-Identifier: BSD-3-Clause
778
- */
779
- const t$1 = { ATTRIBUTE: 1, CHILD: 2 }, e$2 = (t2) => (...e3) => ({ _$litDirective$: t2, values: e3 });
780
- class i2 {
781
- constructor(t2) {
782
- }
783
- get _$AU() {
784
- return this._$AM._$AU;
785
- }
786
- _$AT(t2, e3, i3) {
787
- this._$Ct = t2, this._$AM = e3, this._$Ci = i3;
788
- }
789
- _$AS(t2, e3) {
790
- return this.update(t2, e3);
791
- }
792
- update(t2, e3) {
793
- return this.render(...e3);
794
- }
795
- }
796
- /**
797
- * @license
798
- * Copyright 2017 Google LLC
799
- * SPDX-License-Identifier: BSD-3-Clause
800
- */
801
- let e$1 = class e extends i2 {
802
- constructor(i3) {
803
- if (super(i3), this.it = E, i3.type !== t$1.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
804
- }
805
- render(r2) {
806
- if (r2 === E || null == r2) return this._t = void 0, this.it = r2;
807
- if (r2 === T) return r2;
808
- if ("string" != typeof r2) throw Error(this.constructor.directiveName + "() called with a non-string value");
809
- if (r2 === this.it) return this._t;
810
- this.it = r2;
811
- const s2 = [r2];
812
- return s2.raw = s2, this._t = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
813
- }
814
- };
815
- e$1.directiveName = "unsafeHTML", e$1.resultType = 1;
816
- /**
817
- * @license
818
- * Copyright 2017 Google LLC
819
- * SPDX-License-Identifier: BSD-3-Clause
820
- */
821
- class t extends e$1 {
822
- }
823
- t.directiveName = "unsafeSVG", t.resultType = 2;
824
- const o = e$2(t);
825
- const SYSTEM_ICONS = [
826
- "arrow_forward-material-outlined",
827
- "check_circle-material-filled",
828
- "close-material-outlined",
829
- "dangerous-material-filled",
830
- "InformationSquareFill-aksel-filled",
831
- "lock-material-filled",
832
- "search-material-filled",
833
- "warning-material-filled"
834
- ];
835
- const isSystemIcon = (name) => {
836
- return SYSTEM_ICONS.includes(name);
837
- };
838
- const systemIcons = {
839
- "arrow_forward-material-outlined": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M662.82-440.39H145.87v-79.22h516.95L423.87-758.57 480-814.7 814.7-480 480-145.87l-56.13-55.56z"/></svg>`,
840
- "check_circle-material-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84T98.26-318.99q-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62 161.01-32.65q86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9T642.01-98.26q-75.46 32.39-161.93 32.39"/></svg>`,
841
- "close-material-outlined": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M249-193.43 193.43-249l231-231-231-231L249-766.57l231 231 231-231L766.57-711l-231 231 231 231L711-193.43l-231-231z"/></svg>`,
842
- "dangerous-material-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M324.35-105.87 105.87-324.35v-311.87L324.35-854.7h311.87L854.7-636.22v311.87L636.22-105.87zm34.91-206.87L480-433.48l120.74 120.74 47.09-46.52L526.52-480l121.31-120.74-47.09-47.09L480-526.52 359.26-647.83l-46.52 47.09L433.48-480 312.74-359.26z"/></svg>`,
843
- "InformationSquareFill-aksel-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M3.25 4A.75.75 0 0 1 4 3.25h16a.75.75 0 0 1 .75.75v16a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75zM11 7.75a1 1 0 1 1 2 0 1 1 0 0 1-2 0m-1.25 3a.75.75 0 0 1 .75-.75H12a.75.75 0 0 1 .75.75v4.75h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.75v-4h-.75a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>`,
844
- "lock-material-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M225.09-67q-32.68 0-55.95-23.27t-23.27-55.95v-423.82q0-32.91 23.27-56.35t55.95-23.44h58.69v-83.56q0-82.44 57.17-140.18 57.16-57.73 139.02-57.73t139.05 57.73q57.2 57.74 57.2 140.18v83.56h58.69q32.91 0 56.35 23.44t23.44 56.35v423.82q0 32.68-23.44 55.95T734.91-67zm255.08-214.13q31.83 0 54.33-22.03t22.5-52.97q0-30-22.67-54.5t-54.5-24.5-54.33 24.5-22.5 55 22.67 52.5 54.5 22M363-649.83h234v-83.43q0-49.96-33.79-84.11-33.8-34.15-82.96-34.15t-83.21 34.15Q363-783.22 363-733.26z"/></svg>`,
845
- "search-material-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M795.43-105.17 529.04-371q-29.43 24.26-69.11 37.94-39.67 13.67-85.32 13.67-112.12 0-189.87-77.83Q107-475.04 107-585t77.83-187.78q77.82-77.83 188.28-77.83t187.78 77.83q77.33 77.82 77.33 187.93 0 43.98-13.15 83.13-13.16 39.15-39.46 73.59L853-162.74zM373.81-398.61q77.66 0 131.42-54.53Q559-507.67 559-585t-53.85-131.86-131.34-54.53q-78.33 0-132.96 54.53T186.22-585t54.55 131.86 133.04 54.53"/></svg>`,
846
- "warning-material-filled": `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M27.56-112.65 480-894.7l452.44 782.05zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51t9.64 22.62q9.65 9.47 22.8 9.47M454-348h60v-219.48h-60z"/></svg>`
847
- };
848
- const loadLocalIcons = (name) => import(`@politiet/sheriff-icons/dist/assets/${name}.js`).then(({ default: svg }) => {
849
- return svg;
850
- }).catch((error) => {
851
- console.log(error);
852
- });
853
- const loadCdnIcons = (name) => fetch(`https://cdn.jsdelivr.net/npm/@politiet/sheriff-icons/dist/assets/${name}.svg`).then((response) => {
854
- if (!response.ok) {
855
- throw new TypeError(`Sheriff: unknown icon: '${name}'`);
856
- }
857
- return response.text();
858
- });
859
- class SDSIconLoader {
860
- constructor() {
861
- this.cache = /* @__PURE__ */ new Map();
862
- this._loadLocal = false;
863
- this._disableSystemIcons = false;
864
- this.resolver = this._loadLocal ? loadLocalIcons : loadCdnIcons;
865
- }
866
- get loadLocal() {
867
- return this._loadLocal;
868
- }
869
- set loadLocal(value) {
870
- this._loadLocal = value;
871
- this.resolver = value ? loadLocalIcons : loadCdnIcons;
872
- }
873
- set disableSystemIcons(value) {
874
- this._disableSystemIcons = value;
875
- }
876
- resolve(name, onResolved) {
877
- if (!this._disableSystemIcons && isSystemIcon(name)) {
878
- onResolved(systemIcons[name]);
879
- return;
880
- }
881
- let cached = this.cache.get(name);
882
- if (typeof cached === "string") {
883
- onResolved(cached);
884
- return;
885
- }
886
- if (!cached) {
887
- cached = this.resolver(name).catch(() => "").then((svg) => {
888
- this.cache.set(name, svg);
889
- return svg;
890
- });
891
- this.cache.set(name, cached);
892
- }
893
- cached.then(onResolved);
894
- }
895
- clear() {
896
- this.cache.clear();
897
- }
898
- get currentLoader() {
899
- return this.resolver;
900
- }
901
- }
902
- const styles$f = i$4`
175
+ `,vt=t=>t??U,ut=1,ft=2,bt=t=>(...s)=>({_$litDirective$:t,values:s});class _t{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,e){this._$Ct=t,this._$AM=s,this._$Ci=e}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}}let xt=class extends _t{constructor(t){if(super(t),this.it=U,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===U||null==t)return this._t=void 0,this.it=t;if(t===N)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};xt.directiveName="unsafeHTML",xt.resultType=1;class mt extends xt{}mt.directiveName="unsafeSVG",mt.resultType=2;const yt=bt(mt),wt=["arrow_forward-material-outlined","check_circle-material-filled","close-material-outlined","dangerous-material-filled","InformationSquareFill-aksel-filled","lock-material-filled","search-material-filled","warning-material-filled","chevron_up-material-filled"],kt={"arrow_forward-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M662.82-440.39H145.87v-79.22h516.95L423.87-758.57 480-814.7 814.7-480 480-145.87l-56.13-55.56z"/></svg>',"check_circle-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="m419.87-289.52 289.22-289.22-57.31-56.87L419.87-403.7 304.96-518.61l-56.31 56.87zm60.21 223.65q-85.47 0-161.01-32.39-75.53-32.4-131.97-88.84T98.26-318.99q-32.39-75.46-32.39-160.93 0-86.47 32.39-162.01 32.4-75.53 88.75-131.5t131.85-88.62 161.01-32.65q86.52 0 162.12 32.61 75.61 32.6 131.53 88.5 55.93 55.89 88.55 131.45Q894.7-566.58 894.7-480q0 85.55-32.65 161.07-32.65 75.53-88.62 131.9T642.01-98.26q-75.46 32.39-161.93 32.39"/></svg>',"close-material-outlined":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M249-193.43 193.43-249l231-231-231-231L249-766.57l231 231 231-231L766.57-711l-231 231 231 231L711-193.43l-231-231z"/></svg>',"dangerous-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M324.35-105.87 105.87-324.35v-311.87L324.35-854.7h311.87L854.7-636.22v311.87L636.22-105.87zm34.91-206.87L480-433.48l120.74 120.74 47.09-46.52L526.52-480l121.31-120.74-47.09-47.09L480-526.52 359.26-647.83l-46.52 47.09L433.48-480 312.74-359.26z"/></svg>',"InformationSquareFill-aksel-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M3.25 4A.75.75 0 0 1 4 3.25h16a.75.75 0 0 1 .75.75v16a.75.75 0 0 1-.75.75H4a.75.75 0 0 1-.75-.75zM11 7.75a1 1 0 1 1 2 0 1 1 0 0 1-2 0m-1.25 3a.75.75 0 0 1 .75-.75H12a.75.75 0 0 1 .75.75v4.75h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5h.75v-4h-.75a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>',"lock-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M225.09-67q-32.68 0-55.95-23.27t-23.27-55.95v-423.82q0-32.91 23.27-56.35t55.95-23.44h58.69v-83.56q0-82.44 57.17-140.18 57.16-57.73 139.02-57.73t139.05 57.73q57.2 57.74 57.2 140.18v83.56h58.69q32.91 0 56.35 23.44t23.44 56.35v423.82q0 32.68-23.44 55.95T734.91-67zm255.08-214.13q31.83 0 54.33-22.03t22.5-52.97q0-30-22.67-54.5t-54.5-24.5-54.33 24.5-22.5 55 22.67 52.5 54.5 22M363-649.83h234v-83.43q0-49.96-33.79-84.11-33.8-34.15-82.96-34.15t-83.21 34.15Q363-783.22 363-733.26z"/></svg>',"search-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M795.43-105.17 529.04-371q-29.43 24.26-69.11 37.94-39.67 13.67-85.32 13.67-112.12 0-189.87-77.83Q107-475.04 107-585t77.83-187.78q77.82-77.83 188.28-77.83t187.78 77.83q77.33 77.82 77.33 187.93 0 43.98-13.15 83.13-13.16 39.15-39.46 73.59L853-162.74zM373.81-398.61q77.66 0 131.42-54.53Q559-507.67 559-585t-53.85-131.86-131.34-54.53q-78.33 0-132.96 54.53T186.22-585t54.55 131.86 133.04 54.53"/></svg>',"warning-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 -960 960 960"><path d="M27.56-112.65 480-894.7l452.44 782.05zm456.62-125.48q13.15 0 22.61-9.64 9.47-9.65 9.47-22.8t-9.64-22.33q-9.65-9.19-22.8-9.19t-22.61 9.36q-9.47 9.36-9.47 22.51t9.64 22.62q9.65 9.47 22.8 9.47M454-348h60v-219.48h-60z"/></svg>',"chevron_up-material-filled":'<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32"><path d="m16 11.5 8 8-1.867 1.867L16 15.233l-6.133 6.134L8 19.5z"/></svg>'},zt=t=>import(`@politiet/sheriff-icons/dist/assets/${t}.js`).then((({default:t})=>t)).catch((t=>{console.log(t)})),$t=t=>fetch(`https://cdn.jsdelivr.net/npm/@politiet/sheriff-icons/dist/assets/${t}.svg`).then((s=>{if(!s.ok)throw new TypeError(`Sheriff: unknown icon: '${t}'`);return s.text()}));const St=a`
903
176
  :host {
904
177
  --_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
905
178
  --_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
@@ -931,108 +204,11 @@ const styles$f = i$4`
931
204
  height: 100%;
932
205
  overflow: hidden;
933
206
  }
934
- `;
935
- var __defProp$g = Object.defineProperty;
936
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
937
- var __decorateClass$g = (decorators, target, key, kind) => {
938
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
939
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
940
- if (decorator = decorators[i3])
941
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
942
- if (kind && result) __defProp$g(target, key, result);
943
- return result;
944
- };
945
- let SDSIcon = class extends i$1 {
946
- constructor() {
947
- super(...arguments);
948
- this.name = "";
949
- this.color = "";
950
- this.label = "";
951
- this.svg = "";
952
- }
953
- static setLoadLocal(loadLocal) {
954
- this.iconLoader.loadLocal = loadLocal;
955
- }
956
- static registerResolver(resolver) {
957
- this.iconLoader.resolver = resolver;
958
- }
959
- render() {
960
- return x`
961
- <div class="sds-icon" role="${o$1(this.label ? "img" : void 0)}" style="${o$1(this.color ? `color:${this.color}` : void 0)}" aria-label="${o$1(this.label)}">
962
- ${this.name ? x`<slot aria-hidden="true">${o(this.svg)}</slot>` : x`<slot aria-hidden="true"></slot>`}
207
+ `;var Ct=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,At=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Et(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ct(s,e,a),a};let qt=class extends at{constructor(){super(...arguments),this.name="",this.color="",this.label="",this.svg=""}static setLoadLocal(t){this.iconLoader.loadLocal=t}static registerResolver(t){this.iconLoader.resolver=t}render(){return j`
208
+ <div class="sds-icon" role="${vt(this.label?"img":void 0)}" style="${vt(this.color?`color:${this.color}`:void 0)}" aria-label="${vt(this.label)}">
209
+ ${this.name?j`<slot aria-hidden="true">${yt(this.svg)}</slot>`:j`<slot aria-hidden="true"></slot>`}
963
210
  </div>
964
- `;
965
- }
966
- /**
967
- * Wraps the icon loader's callback in a promise. Even if the loader
968
- * calls the callback synchronously, awaiting the promise defers the
969
- * property update to the next microtask.
970
- */
971
- async fetchIcon() {
972
- if (!this.name) {
973
- this.svg = "";
974
- return;
975
- }
976
- const svg = await new Promise((resolve) => {
977
- SDSIcon.iconLoader.resolve(this.name, resolve);
978
- });
979
- this.svg = svg;
980
- }
981
- updated(changedProperties) {
982
- super.updated(changedProperties);
983
- if (changedProperties.has("name") && this.name) {
984
- void this.fetchIcon();
985
- }
986
- }
987
- };
988
- SDSIcon.styles = [styles$f];
989
- SDSIcon.iconLoader = new SDSIconLoader();
990
- __decorateClass$g([
991
- n2({ type: String, reflect: true })
992
- ], SDSIcon.prototype, "name", 2);
993
- __decorateClass$g([
994
- n2({ type: String, reflect: true })
995
- ], SDSIcon.prototype, "size", 2);
996
- __decorateClass$g([
997
- n2({ type: String, reflect: true })
998
- ], SDSIcon.prototype, "color", 2);
999
- __decorateClass$g([
1000
- n2({ type: String, reflect: true })
1001
- ], SDSIcon.prototype, "label", 2);
1002
- __decorateClass$g([
1003
- r()
1004
- ], SDSIcon.prototype, "svg", 2);
1005
- SDSIcon = __decorateClass$g([
1006
- guardedCustomElement("sds-icon")
1007
- ], SDSIcon);
1008
- /**
1009
- * @license
1010
- * Copyright 2018 Google LLC
1011
- * SPDX-License-Identifier: BSD-3-Clause
1012
- */
1013
- const e2 = e$2(class extends i2 {
1014
- constructor(t2) {
1015
- if (super(t2), t2.type !== t$1.ATTRIBUTE || "class" !== t2.name || t2.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1016
- }
1017
- render(t2) {
1018
- return " " + Object.keys(t2).filter((s2) => t2[s2]).join(" ") + " ";
1019
- }
1020
- update(s2, [i3]) {
1021
- if (void 0 === this.st) {
1022
- this.st = /* @__PURE__ */ new Set(), void 0 !== s2.strings && (this.nt = new Set(s2.strings.join(" ").split(/\s/).filter((t2) => "" !== t2)));
1023
- for (const t2 in i3) i3[t2] && !this.nt?.has(t2) && this.st.add(t2);
1024
- return this.render(i3);
1025
- }
1026
- const r2 = s2.element.classList;
1027
- for (const t2 of this.st) t2 in i3 || (r2.remove(t2), this.st.delete(t2));
1028
- for (const t2 in i3) {
1029
- const s3 = !!i3[t2];
1030
- s3 === this.st.has(t2) || this.nt?.has(t2) || (s3 ? (r2.add(t2), this.st.add(t2)) : (r2.remove(t2), this.st.delete(t2)));
1031
- }
1032
- return T;
1033
- }
1034
- });
1035
- const styles$e = i$4`
211
+ `}async fetchIcon(){if(!this.name)return void(this.svg="");const t=await new Promise((t=>{qt.iconLoader.resolve(this.name,t)}));this.svg=t}updated(t){super.updated(t),t.has("name")&&this.name&&this.fetchIcon()}};qt.styles=[St],qt.iconLoader=new class{constructor(){this.cache=/* @__PURE__ */new Map,this._loadLocal=!1,this._disableSystemIcons=!1,this.resolver=this._loadLocal?zt:$t}get loadLocal(){return this._loadLocal}set loadLocal(t){this._loadLocal=t,this.resolver=t?zt:$t}set disableSystemIcons(t){this._disableSystemIcons=t}resolve(t,s){if(!this._disableSystemIcons&&(t=>wt.includes(t))(t))return void s(kt[t]);let e=this.cache.get(t);"string"!=typeof e?(e||(e=this.resolver(t).catch((()=>"")).then((s=>(this.cache.set(t,s),s))),this.cache.set(t,e)),e.then(s)):s(e)}clear(){this.cache.clear()}get currentLoader(){return this.resolver}},At([lt({type:String,reflect:!0})],qt.prototype,"name",2),At([lt({type:String,reflect:!0})],qt.prototype,"size",2),At([lt({type:String,reflect:!0})],qt.prototype,"color",2),At([lt({type:String,reflect:!0})],qt.prototype,"label",2),At([ct()],qt.prototype,"svg",2),qt=At([pt("sds-icon")],qt);const Ot=bt(class extends _t{constructor(t){if(super(t),t.type!==ut||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(t,[s]){if(void 0===this.st){this.st=/* @__PURE__ */new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(s)}const e=t.element.classList;for(const o of this.st)o in s||(e.remove(o),this.st.delete(o));for(const o in s){const t=!!s[o];t===this.st.has(o)||this.nt?.has(o)||(t?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return N}}),Pt=a`
1036
212
  :host {
1037
213
  --_sds-button-background-color: var(--sds-button-background-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
1038
214
  --_sds-button-border-color: var(--sds-button-border-color, var(--sds-color-action-default, var(--sds-color-main-action-default)));
@@ -1042,7 +218,7 @@ const styles$e = i$4`
1042
218
  --_sds-button-focus-inner-color: var(--sds-button-focus-inner-color, var(--sds-color-states-focus-inner));
1043
219
  --_sds-button-focus-spacing: var(--sds-button-focus-spacing, var(--sds-color-states-focus-spacing));
1044
220
  --_sds-button-font-family: var(--sds-button-font, var(--sds-typography-font-family-roboto));
1045
- --_sds-button-font-size: var(--sds-button-font-size, var(--sds-typography-body-md-desktop-font-size));
221
+ --_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-lg));
1046
222
  --_sds-button-font-weight: var(--sds-button-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));
1047
223
  --_sds-button-gap: var(--sds-button-gap, var(--sds-spacing-3xs));
1048
224
  --_sds-button-line-height: var(--sds-button-line-height, var(--sds-typography-body-md-desktop-line-height));
@@ -1165,6 +341,7 @@ const styles$e = i$4`
1165
341
  --_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-md));
1166
342
  --_sds-button-padding-block: var(--sds-button-padding-block, var(--sds-spacing-4xs));
1167
343
  --_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-3xs));
344
+ --_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-md));
1168
345
 
1169
346
  &:host([variant='tertiary']) {
1170
347
  --_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
@@ -1176,7 +353,7 @@ const styles$e = i$4`
1176
353
  --_sds-button-min-height: var(--sds-button-height, var(--sds-components-button-sm));
1177
354
  --_sds-button-padding-block: var(--sds-button-padding-block, 0);
1178
355
  --_sds-button-padding-inline: var(--sds-button-padding-inline, var(--sds-spacing-3xs));
1179
- font-size: 0.875rem;
356
+ --_sds-button-font-size: var(--sds-button-font-size, var(--sds-components-font-size-content-sm));
1180
357
 
1181
358
  &:host([variant='tertiary']) {
1182
359
  --_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
@@ -1187,251 +364,39 @@ const styles$e = i$4`
1187
364
  --_sds-button-padding-inline: var(--sds-button-padding-inline, 0);
1188
365
  min-width: var(--_sds-button-min-height);
1189
366
  }
1190
- `;
1191
- var __defProp$f = Object.defineProperty;
1192
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
1193
- var __decorateClass$f = (decorators, target, key, kind) => {
1194
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
1195
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
1196
- if (decorator = decorators[i3])
1197
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1198
- if (kind && result) __defProp$f(target, key, result);
1199
- return result;
1200
- };
1201
- let SDSButton = class extends i$1 {
1202
- constructor() {
1203
- super();
1204
- this.disabled = false;
1205
- this.icon = false;
1206
- this.loading = false;
1207
- this.size = "lg";
1208
- this.type = "button";
1209
- this.value = "";
1210
- this.variant = "primary";
1211
- this._handleClick = (event) => {
1212
- event.preventDefault();
1213
- event.stopImmediatePropagation();
1214
- if (!this.disabled) {
1215
- switch (this.type) {
1216
- case "submit": {
1217
- const submitEvent = new CustomEvent("submit", {
1218
- bubbles: true,
1219
- composed: true,
1220
- cancelable: true
1221
- });
1222
- const shouldSubmit = this.dispatchEvent(submitEvent);
1223
- if (shouldSubmit) {
1224
- if (this.form) {
1225
- const root = this.getRootNode();
1226
- const formElement = root.querySelector(`form#${this.form}`);
1227
- formElement?.requestSubmit();
1228
- } else if (this.internals.form) {
1229
- this.internals.form.requestSubmit();
1230
- }
1231
- }
1232
- break;
1233
- }
1234
- case "reset": {
1235
- const resetEvent = new CustomEvent("reset", {
1236
- bubbles: true,
1237
- composed: true,
1238
- cancelable: true
1239
- });
1240
- const shouldReset = this.dispatchEvent(resetEvent);
1241
- if (shouldReset) {
1242
- if (this.form) {
1243
- const root = this.getRootNode();
1244
- const formElement = root.querySelector(`form#${this.form}`);
1245
- formElement?.reset();
1246
- } else if (this.internals.form) {
1247
- this.internals.form.reset();
1248
- }
1249
- }
1250
- break;
1251
- }
1252
- default:
1253
- this.dispatchEvent(
1254
- new CustomEvent("click", {
1255
- bubbles: true,
1256
- composed: true
1257
- })
1258
- );
1259
- }
1260
- }
1261
- };
1262
- this.internals = this.attachInternals();
1263
- this.attachShadow({ mode: "open", delegatesFocus: true });
1264
- }
1265
- updated(changed) {
1266
- if (changed.has("variant") && this.variant === "critical") {
1267
- this.setAttribute("data-palette", "danger");
1268
- }
1269
- }
1270
- focus() {
1271
- if (!this.disabled) this.shadowRoot?.querySelector("button")?.focus();
1272
- }
1273
- blur() {
1274
- if (!this.disabled) this.shadowRoot?.querySelector("button")?.blur();
1275
- }
1276
- click() {
1277
- if (!this.disabled) this.shadowRoot?.querySelector("button")?.click();
1278
- }
1279
- render() {
1280
- const buttonClasses = {
1281
- "sds-button": true,
1282
- "sds-button--as-link": !!this.href
1283
- };
1284
- if (this.href) {
1285
- return x` <a id="link" class="${e2(buttonClasses)}" href="${this.href}" target="${o$1(this.target)}">
367
+ `;var Dt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Vt=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Mt(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Dt(s,e,a),a};let Rt=class extends at{constructor(){super(),this.disabled=!1,this.icon=!1,this.loading=!1,this.size="lg",this.type="button",this.value="",this.variant="primary",this._handleClick=t=>{if(t.preventDefault(),t.stopImmediatePropagation(),!this.disabled)switch(this.type){case"submit":{const t=new CustomEvent("submit",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.requestSubmit()}else this.internals.form&&this.internals.form.requestSubmit();break}case"reset":{const t=new CustomEvent("reset",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t))if(this.form){const t=this.getRootNode().querySelector(`form#${this.form}`);t?.reset()}else this.internals.form&&this.internals.form.reset();break}default:this.dispatchEvent(new CustomEvent("click",{bubbles:!0,composed:!0}))}},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}updated(t){t.has("variant")&&"critical"===this.variant&&this.setAttribute("data-palette","danger")}focus(){this.disabled||this.shadowRoot?.querySelector("button")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("button")?.blur()}click(){this.disabled||this.shadowRoot?.querySelector("button")?.click()}render(){const t={"sds-button":!0,"sds-button--as-link":!!this.href};return this.href?j` <a id="link" class="${Ot(t)}" href="${this.href}" target="${vt(this.target)}">
1286
368
  <slot name="before"></slot>
1287
369
  <slot></slot>
1288
370
  <slot name="after"></slot>
1289
- </a>`;
1290
- }
1291
- return x`
371
+ </a>`:j`
1292
372
  <button
1293
373
  id="control"
1294
- form="${o$1(this.form)}"
1295
- class="${e2(buttonClasses)}"
374
+ form="${vt(this.form)}"
375
+ class="${Ot(t)}"
1296
376
  type="${this.type}"
1297
- name="${o$1(this.name)}"
1298
- value="${o$1(this.value)}"
377
+ name="${vt(this.name)}"
378
+ value="${vt(this.value)}"
1299
379
  ?disabled="${this.disabled}"
1300
380
  @click="${this._handleClick}"
1301
381
  >
1302
- ${this.loading ? x`<sds-loader slot="before" ?contrast="${this.variant !== "primary"}"></sds-loader>` : E} ${this.loading ? E : x`<slot name="before"></slot>`}
382
+ ${this.loading?j`<sds-loader slot="before" ?contrast="${"primary"!==this.variant}"></sds-loader>`:U} ${this.loading?U:j`<slot name="before"></slot>`}
1303
383
  <slot></slot>
1304
- ${this.loading ? E : x`<slot name="after"></slot>`}
384
+ ${this.loading?U:j`<slot name="after"></slot>`}
1305
385
  </button>
1306
- `;
1307
- }
1308
- };
1309
- SDSButton.styles = [styles$e];
1310
- SDSButton.formAssociated = true;
1311
- __decorateClass$f([
1312
- n2({ type: Boolean, reflect: true })
1313
- ], SDSButton.prototype, "disabled", 2);
1314
- __decorateClass$f([
1315
- n2({ type: Boolean, reflect: true })
1316
- ], SDSButton.prototype, "icon", 2);
1317
- __decorateClass$f([
1318
- n2({ type: Boolean, reflect: true })
1319
- ], SDSButton.prototype, "loading", 2);
1320
- __decorateClass$f([
1321
- n2({ type: String, reflect: true })
1322
- ], SDSButton.prototype, "form", 2);
1323
- __decorateClass$f([
1324
- n2({ type: String, reflect: true })
1325
- ], SDSButton.prototype, "href", 2);
1326
- __decorateClass$f([
1327
- n2({ type: String, reflect: true })
1328
- ], SDSButton.prototype, "name", 2);
1329
- __decorateClass$f([
1330
- n2({ type: String, reflect: true })
1331
- ], SDSButton.prototype, "size", 2);
1332
- __decorateClass$f([
1333
- n2({ type: String, reflect: true })
1334
- ], SDSButton.prototype, "target", 2);
1335
- __decorateClass$f([
1336
- n2({ type: String, reflect: true })
1337
- ], SDSButton.prototype, "type", 2);
1338
- __decorateClass$f([
1339
- n2({ type: String, reflect: true })
1340
- ], SDSButton.prototype, "value", 2);
1341
- __decorateClass$f([
1342
- n2({ type: String, reflect: true })
1343
- ], SDSButton.prototype, "variant", 2);
1344
- SDSButton = __decorateClass$f([
1345
- guardedCustomElement("sds-button")
1346
- ], SDSButton);
1347
- var __defProp$e = Object.defineProperty;
1348
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
1349
- var __decorateClass$e = (decorators, target, key, kind) => {
1350
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
1351
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
1352
- if (decorator = decorators[i3])
1353
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1354
- if (kind && result) __defProp$e(target, key, result);
1355
- return result;
1356
- };
1357
- const alertIcons = {
1358
- info: "InformationSquareFill-aksel-filled",
1359
- success: "check_circle-material-filled",
1360
- attention: "warning-material-filled",
1361
- danger: "dangerous-material-filled"
1362
- };
1363
- let SDSAlert = class extends i$1 {
1364
- constructor() {
1365
- super(...arguments);
1366
- this.variant = "primary";
1367
- this.size = "md";
1368
- this.palette = "info";
1369
- this._remove = () => {
1370
- this.dispatchEvent(
1371
- new CustomEvent("sds-remove", {
1372
- bubbles: true,
1373
- composed: true
1374
- })
1375
- );
1376
- };
1377
- }
1378
- render() {
1379
- const iconSize = this.variant === "primary" ? "md" : this.size ?? "md";
1380
- const iconName = alertIcons[this.palette] ?? alertIcons["info"];
1381
- return x`<div class="sds-alert">
386
+ `}};Rt.styles=[Pt],Rt.formAssociated=!0,Vt([lt({type:Boolean,reflect:!0})],Rt.prototype,"disabled",2),Vt([lt({type:Boolean,reflect:!0})],Rt.prototype,"icon",2),Vt([lt({type:Boolean,reflect:!0})],Rt.prototype,"loading",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"form",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"href",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"name",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"size",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"target",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"type",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"value",2),Vt([lt({type:String,reflect:!0})],Rt.prototype,"variant",2),Rt=Vt([pt("sds-button")],Rt);var Tt=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,Bt=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Lt(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Tt(s,e,a),a};const It={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",danger:"dangerous-material-filled"};let jt=class extends at{constructor(){super(...arguments),this.variant="primary",this.size="md",this.palette="info",this._remove=()=>{this.dispatchEvent(new CustomEvent("sds-remove",{bubbles:!0,composed:!0}))}}render(){const t="primary"===this.variant?"md":this.size??"md",s=It[this.palette]??It.info;return j`<div class="sds-alert">
1382
387
  <div class="sds-alert__type">
1383
- <sds-icon class="sds-alert__icon" name="${iconName}" size="${iconSize}"></sds-icon>
388
+ <sds-icon class="sds-alert__icon" name="${s}" size="${t}"></sds-icon>
1384
389
  </div>
1385
390
  <div class="sds-alert__content">
1386
391
  <slot name="title"></slot>
1387
392
  <slot name="message"></slot>
1388
393
  </div>
1389
- ${this.removableLabel && this.variant === "primary" ? x`<div class="sds-alert__actions">
394
+ ${this.removableLabel&&"primary"===this.variant?j`<div class="sds-alert__actions">
1390
395
  <sds-button icon variant="tertiary" size="sm" @click=${this._remove} aria-label="${this.removableLabel}">
1391
396
  <sds-icon name="close-material-outlined" size="sm"></sds-icon>
1392
397
  </sds-button>
1393
- </div>` : E}
1394
- </div>`;
1395
- }
1396
- };
1397
- SDSAlert.styles = [styles$g];
1398
- __decorateClass$e([
1399
- n2({ type: String, reflect: true })
1400
- ], SDSAlert.prototype, "variant", 2);
1401
- __decorateClass$e([
1402
- n2({ type: String, reflect: true })
1403
- ], SDSAlert.prototype, "size", 2);
1404
- __decorateClass$e([
1405
- n2({ type: String, attribute: "removable-label", reflect: true })
1406
- ], SDSAlert.prototype, "removableLabel", 2);
1407
- __decorateClass$e([
1408
- n2({ type: String, attribute: "data-palette", reflect: true })
1409
- ], SDSAlert.prototype, "palette", 2);
1410
- SDSAlert = __decorateClass$e([
1411
- guardedCustomElement("sds-alert")
1412
- ], SDSAlert);
1413
- function validateSlotContent(slot, allowedTags, allowText, warningMessage) {
1414
- const invalid = slot.assignedNodes({ flatten: true }).filter((node) => {
1415
- if (node.nodeType === Node.TEXT_NODE) {
1416
- const text = node.textContent?.trim() ?? "";
1417
- return text.length > 0;
1418
- }
1419
- if (node.nodeType === Node.ELEMENT_NODE) {
1420
- const el = node;
1421
- const tagName = el.tagName.toUpperCase();
1422
- if (!allowedTags.includes(tagName)) {
1423
- return true;
1424
- }
1425
- const hasNestedElements = Array.from(el.childNodes).some((child) => child.nodeType === Node.ELEMENT_NODE);
1426
- return hasNestedElements;
1427
- }
1428
- return false;
1429
- });
1430
- if (invalid.length > 0) {
1431
- console.warn(warningMessage, ...invalid);
1432
- }
1433
- }
1434
- const styles$d = i$4`
398
+ </div>`:U}
399
+ </div>`}};function Nt(t,s,e,o){const r=t.assignedNodes({flatten:!0}).filter((t=>{if(t.nodeType===Node.TEXT_NODE){return(t.textContent?.trim()??"").length>0}if(t.nodeType===Node.ELEMENT_NODE){const e=t,o=e.tagName.toUpperCase();if(!s.includes(o))return!0;return Array.from(e.childNodes).some((t=>t.nodeType===Node.ELEMENT_NODE))}return!1}));r.length>0&&console.warn(o,...r)}jt.styles=[gt],Bt([lt({type:String,reflect:!0})],jt.prototype,"variant",2),Bt([lt({type:String,reflect:!0})],jt.prototype,"size",2),Bt([lt({type:String,attribute:"removable-label",reflect:!0})],jt.prototype,"removableLabel",2),Bt([lt({type:String,attribute:"data-palette",reflect:!0})],jt.prototype,"palette",2),jt=Bt([pt("sds-alert")],jt);const Ut=a`
1435
400
  :host {
1436
401
  --_sds-card-background-color: var(--sds-card-background-color, var(--sds-color-surface-tinted, var(--sds-color-main-surface-tinted)));
1437
402
  --_sds-card-border-radius: var(--sds-card-border-radius, var(--sds-radius-md));
@@ -1552,59 +517,11 @@ const styles$d = i$4`
1552
517
  --_sds-card-text-line-height: var(--sds-card-text-line-height, var(--sds-typography-body-md-desktop-line-height));
1553
518
  }
1554
519
  }
1555
- `;
1556
- var __defProp$d = Object.defineProperty;
1557
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
1558
- var __decorateClass$d = (decorators, target, key, kind) => {
1559
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
1560
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
1561
- if (decorator = decorators[i3])
1562
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1563
- if (kind && result) __defProp$d(target, key, result);
1564
- return result;
1565
- };
1566
- let SDSCard = class extends i$1 {
1567
- firstUpdated() {
1568
- const contentWarning = "[sds-card] text slot should only contain top-level <p> elements with no nested elements:";
1569
- const headerWarning = "[sds-card] header slot should only contain one of <h2>–<h6> elements:";
1570
- validateSlotContent(this.textSlot, ["P"], false, contentWarning);
1571
- const headerNodes = this.headingSlot.assignedNodes({ flatten: true });
1572
- if (headerNodes.length > 0) {
1573
- validateSlotContent(this.headingSlot, ["H2", "H3", "H4", "H5", "H6"], false, headerWarning);
1574
- }
1575
- this.textSlot.addEventListener("slotchange", () => {
1576
- validateSlotContent(this.textSlot, ["P"], false, contentWarning);
1577
- });
1578
- this.headingSlot.addEventListener("slotchange", () => {
1579
- const nodes = this.headingSlot.assignedNodes({ flatten: true });
1580
- if (nodes.length > 0) {
1581
- validateSlotContent(this.headingSlot, ["H2", "H3", "H4", "H5", "H6"], false, headerWarning);
1582
- }
1583
- });
1584
- }
1585
- render() {
1586
- const cardBody = x`
520
+ `;var Ft=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Gt=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ht(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ft(s,e,a),a};let Kt=class extends at{firstUpdated(){const t="[sds-card] text slot should only contain top-level <p> elements with no nested elements:",s="[sds-card] header slot should only contain one of <h2>–<h6> elements:";Nt(this.textSlot,["P"],0,t);this.headingSlot.assignedNodes({flatten:!0}).length>0&&Nt(this.headingSlot,["H2","H3","H4","H5","H6"],0,s),this.textSlot.addEventListener("slotchange",(()=>{Nt(this.textSlot,["P"],0,t)})),this.headingSlot.addEventListener("slotchange",(()=>{this.headingSlot.assignedNodes({flatten:!0}).length>0&&Nt(this.headingSlot,["H2","H3","H4","H5","H6"],0,s)}))}render(){const t=j`
1587
521
  <slot name="heading" id="heading"></slot>
1588
522
  <slot name="text" id="content"></slot>
1589
523
  <sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon"></sds-icon>
1590
- `;
1591
- return x`<article class="sds-card">${this.link ? x`<a href="${this.link}" class="sds-card__content">${cardBody}</a>` : x`<div class="sds-card__content">${cardBody}</div>`}</article>`;
1592
- }
1593
- };
1594
- SDSCard.styles = [styles$d];
1595
- __decorateClass$d([
1596
- n2({ type: String, reflect: true })
1597
- ], SDSCard.prototype, "link", 2);
1598
- __decorateClass$d([
1599
- e$3("slot#heading")
1600
- ], SDSCard.prototype, "headingSlot", 2);
1601
- __decorateClass$d([
1602
- e$3("slot#text")
1603
- ], SDSCard.prototype, "textSlot", 2);
1604
- SDSCard = __decorateClass$d([
1605
- guardedCustomElement("sds-card")
1606
- ], SDSCard);
1607
- const styles$c = i$4`
524
+ `;return j`<article class="sds-card">${this.link?j`<a href="${this.link}" class="sds-card__content">${t}</a>`:j`<div class="sds-card__content">${t}</div>`}</article>`}};Kt.styles=[Ut],Gt([lt({type:String,reflect:!0})],Kt.prototype,"link",2),Gt([ht("slot#heading")],Kt.prototype,"headingSlot",2),Gt([ht("slot#text")],Kt.prototype,"textSlot",2),Kt=Gt([pt("sds-card")],Kt);const Wt=a`
1608
525
  :host {
1609
526
  --_sds-checkbox-block-gap: var(--sds-checkbox-block-gap, var(--sds-spacing-4xs));
1610
527
  --_sds-checkbox-inline-gap: var(--sds-checkbox-inline-gap, var(--sds-spacing-3xs));
@@ -1625,7 +542,7 @@ const styles$c = i$4`
1625
542
  --_sds-checkbox-input-icon-color: var(--sds-checkbox-input-text-color, var(--sds-color-main-action-contrast-default));
1626
543
 
1627
544
  --_sds-checkbox-help-text-color: var(--sds-checkbox-help-text-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
1628
- --_sds-checkbox-help-text-font-size: var(--sds-checkbox-help-text-font-size, var(--sds-components-font-size-md));
545
+ --_sds-checkbox-help-text-font-size: var(--sds-checkbox-help-text-font-size, var(--sds-components-font-size-content-md));
1629
546
  --_sds-checkbox-help-text-font-weight: var(--sds-checkbox-help-text-font-weight, var(--sds-typography-body-md-desktop-font-weight));
1630
547
  --_sds-checkbox-help-text-line-height: var(--sds-checkbox-help-text-line-height, var(--sds-components-line-height-squeezed-md));
1631
548
 
@@ -1636,6 +553,11 @@ const styles$c = i$4`
1636
553
 
1637
554
  --_sds-checkbox-disabled-opacity: var(--sds-checkbox-disabled-opacity, var(--sds-color-states-disabled-opacity));
1638
555
 
556
+ --_sds-checkbox-grid-template-areas: var(--sds-checkbox-grid-template-area, 'input content');
557
+ --_sds-checkbox-label-grid-area: var(--sds-checkbox-label-grid-area, content);
558
+ --_sds-checkbox-input-grid-area: var(--sds-checkbox-input-grid-area, input);
559
+ --_sds-checkbox-help-text-grid-area: var(--sds-checkbox-help-text-grid-area, content);
560
+
1639
561
  flex: 0 0 auto;
1640
562
  }
1641
563
 
@@ -1644,7 +566,7 @@ const styles$c = i$4`
1644
566
  display: grid;
1645
567
  font-family: var(--_sds-checkbox-font-family);
1646
568
  gap: var(--_sds-checkbox-block-gap) var(--_sds-checkbox-inline-gap);
1647
- grid-template-areas: 'input content';
569
+ grid-template-areas: var(--_sds-checkbox-grid-template-areas);
1648
570
  grid-template-columns: auto 1fr;
1649
571
  width: fit-content;
1650
572
 
@@ -1666,7 +588,7 @@ const styles$c = i$4`
1666
588
  }
1667
589
 
1668
590
  .sds-checkbox__label {
1669
- grid-column: content;
591
+ grid-column: var(--_sds-checkbox-label-grid-area);
1670
592
  align-self: center;
1671
593
  cursor: pointer;
1672
594
  color: var(--_sds-checkbox-label-text-color);
@@ -1678,7 +600,7 @@ const styles$c = i$4`
1678
600
  }
1679
601
 
1680
602
  .sds-checkbox__input {
1681
- grid-column: input;
603
+ grid-column: var(--_sds-checkbox-input-grid-area);
1682
604
  grid-row: 1;
1683
605
  appearance: none;
1684
606
  background-color: var(--_sds-checkbox-input-background-color);
@@ -1781,7 +703,7 @@ const styles$c = i$4`
1781
703
  }
1782
704
 
1783
705
  .sds-checkbox__help-text {
1784
- grid-column: content;
706
+ grid-column: var(--_sds-checkbox-help-text-grid-area);
1785
707
  margin: 0;
1786
708
  color: var(--_sds-checkbox-help-text-color);
1787
709
  font-size: var(--_sds-checkbox-help-text-font-size);
@@ -1821,119 +743,13 @@ const styles$c = i$4`
1821
743
  margin-block-start: -1px;
1822
744
  }
1823
745
  }
1824
- `;
1825
- var __defProp$c = Object.defineProperty;
1826
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
1827
- var __decorateClass$c = (decorators, target, key, kind) => {
1828
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
1829
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
1830
- if (decorator = decorators[i3])
1831
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1832
- if (kind && result) __defProp$c(target, key, result);
1833
- return result;
1834
- };
1835
- let SDSCheckbox = class extends i$1 {
1836
- constructor() {
1837
- super();
1838
- this.checked = false;
1839
- this.disabled = false;
1840
- this.error = false;
1841
- this.required = false;
1842
- this.size = "md";
1843
- this.readOnly = false;
1844
- this._initialChecked = false;
1845
- this._handleChange = (event) => {
1846
- event.stopImmediatePropagation();
1847
- if (this.disabled || this.readOnly) {
1848
- event.target.checked = this.checked;
1849
- event.preventDefault();
1850
- return;
1851
- }
1852
- const elem = event.target;
1853
- this.checked = elem.checked;
1854
- this.internals.setFormValue(elem.checked ? elem.value : null);
1855
- this._validate();
1856
- this.dispatchEvent(new CustomEvent("change", { bubbles: true, composed: true }));
1857
- };
1858
- this._handleFocus = (event) => {
1859
- event.stopImmediatePropagation();
1860
- this.dispatchEvent(new CustomEvent("focus", { bubbles: true, composed: true }));
1861
- };
1862
- this._handleBlur = (event) => {
1863
- event.stopImmediatePropagation();
1864
- this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
1865
- };
1866
- this.internals = this.attachInternals();
1867
- this.attachShadow({ mode: "open", delegatesFocus: true });
1868
- }
1869
- connectedCallback() {
1870
- super.connectedCallback();
1871
- this._initialChecked = this.checked;
1872
- this.internals.role = "checkbox";
1873
- if (this.checked) {
1874
- this.internals.setFormValue(this.value ?? "on");
1875
- }
1876
- }
1877
- firstUpdated(_changedProperties) {
1878
- super.firstUpdated(_changedProperties);
1879
- if (this.control) {
1880
- this.control.required = this.required;
1881
- }
1882
- this._validate();
1883
- }
1884
- formResetCallback() {
1885
- this.checked = this._initialChecked;
1886
- if (this.control) {
1887
- this.control.checked = this._initialChecked;
1888
- }
1889
- const resetValue = this.checked ? this.value ?? "on" : null;
1890
- this.internals.setFormValue(resetValue);
1891
- this._validate();
1892
- }
1893
- _validate() {
1894
- if (this.required && !this.checked) {
1895
- this.internals.setValidity({ valueMissing: true }, this.control.validationMessage, this.control);
1896
- } else {
1897
- this.internals.setValidity({});
1898
- }
1899
- }
1900
- focus() {
1901
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.focus();
1902
- }
1903
- blur() {
1904
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.blur();
1905
- }
1906
- click() {
1907
- if (!this.disabled && !this.readOnly) this.shadowRoot?.querySelector("input")?.click();
1908
- }
1909
- updated(changedProperties) {
1910
- super.updated(changedProperties);
1911
- if (changedProperties.has("required") && this.control) {
1912
- this.control.required = this.required;
1913
- }
1914
- if (changedProperties.has("checked")) {
1915
- this._validate();
1916
- }
1917
- }
1918
- get type() {
1919
- return "checkbox";
1920
- }
1921
- render() {
1922
- const checkboxClasses = {
1923
- "sds-checkbox": true,
1924
- "sds-checkbox--error": Boolean(this.error)
1925
- };
1926
- const inputClasses = {
1927
- "sds-checkbox__input": true,
1928
- "sds-checkbox__input--error": Boolean(this.error)
1929
- };
1930
- return x`
1931
- <div class="${e2(checkboxClasses)}">
746
+ `;var Zt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Xt=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Qt(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Zt(s,e,a),a};let Yt=class extends at{constructor(){super(),this.checked=!1,this.error=!1,this.required=!1,this.size="md",this.readOnly=!1,this._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._handleChange=t=>{if(t.stopImmediatePropagation(),this.disabled||this.readOnly)return t.target.checked=this.checked,void t.preventDefault();const s=t.target;this.checked=s.checked,this.internals.setFormValue(s.checked?s.value:null),this._validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0}))},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}get disabled(){return this._disabled}set disabled(t){const s=t??!1,e=this._disabled;e!==s&&(this._disabled=s,this.requestUpdate("disabled",e),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=s))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const s=t??!1,e=this._parentRequestDisabled;e!==s&&(this._parentRequestDisabled=s,this.requestUpdate("parentRequestDisabled",e),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=s,this._settingDisabledFromParent=!1))}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.role="checkbox",this.checked&&this.internals.setFormValue(this.value??"on")}firstUpdated(t){super.firstUpdated(t),this.control&&(this.control.required=this.required),this._validate()}formResetCallback(){this.checked=this._initialChecked,this.control&&(this.control.checked=this._initialChecked);const t=this.checked?this.value??"on":null;this.internals.setFormValue(t),this._validate()}_validate(){this.required&&!this.checked?this.internals.setValidity({valueMissing:!0},this.control.validationMessage,this.control):this.internals.setValidity({})}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.readOnly||this.shadowRoot?.querySelector("input")?.click()}updated(t){super.updated(t),t.has("required")&&this.control&&(this.control.required=this.required),t.has("checked")&&this._validate(),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1)}get type(){return"checkbox"}render(){const t={"sds-checkbox":!0,"sds-checkbox--error":Boolean(this.error)},s={"sds-checkbox__input":!0,"sds-checkbox__input--error":Boolean(this.error)};return j`
747
+ <div class="${Ot(t)}">
1932
748
  <input
1933
749
  id="control"
1934
750
  type="checkbox"
1935
- name="${o$1(this.name)}"
1936
- value="${o$1(this.value)}"
751
+ name="${vt(this.name)}"
752
+ value="${vt(this.value)}"
1937
753
  .checked="${this.checked}"
1938
754
  ?checked="${this.checked}"
1939
755
  ?disabled="${this.disabled}"
@@ -1942,57 +758,16 @@ let SDSCheckbox = class extends i$1 {
1942
758
  @change="${this._handleChange}"
1943
759
  @focus="${this._handleFocus}"
1944
760
  @blur="${this._handleBlur}"
1945
- class="${e2(inputClasses)}"
761
+ class="${Ot(s)}"
1946
762
  />
1947
- ${this.label ? x`<label for="control" class="sds-checkbox__label">${this.label}</label>` : E}
1948
- ${this.helpText ? x`<span class="sds-checkbox__help-text">${this.helpText}</span>` : E}
763
+ ${this.label?j`<label for="control" class="sds-checkbox__label">${this.label}</label>`:U}
764
+ ${this.helpText?j`<span class="sds-checkbox__help-text">${this.helpText}</span>`:U}
1949
765
  </div>
1950
- `;
1951
- }
1952
- };
1953
- SDSCheckbox.styles = [styles$c];
1954
- SDSCheckbox.formAssociated = true;
1955
- __decorateClass$c([
1956
- n2({ type: String, reflect: true })
1957
- ], SDSCheckbox.prototype, "name", 2);
1958
- __decorateClass$c([
1959
- n2({ type: String, reflect: true })
1960
- ], SDSCheckbox.prototype, "label", 2);
1961
- __decorateClass$c([
1962
- n2({ type: String })
1963
- ], SDSCheckbox.prototype, "value", 2);
1964
- __decorateClass$c([
1965
- n2({ type: Boolean, reflect: true })
1966
- ], SDSCheckbox.prototype, "checked", 2);
1967
- __decorateClass$c([
1968
- n2({ type: Boolean, reflect: true })
1969
- ], SDSCheckbox.prototype, "disabled", 2);
1970
- __decorateClass$c([
1971
- n2({ type: Boolean, reflect: true })
1972
- ], SDSCheckbox.prototype, "error", 2);
1973
- __decorateClass$c([
1974
- n2({ type: Boolean, reflect: true })
1975
- ], SDSCheckbox.prototype, "required", 2);
1976
- __decorateClass$c([
1977
- n2({ type: String, reflect: true })
1978
- ], SDSCheckbox.prototype, "size", 2);
1979
- __decorateClass$c([
1980
- n2({ type: String, attribute: "help-text" })
1981
- ], SDSCheckbox.prototype, "helpText", 2);
1982
- __decorateClass$c([
1983
- n2({ type: Boolean, attribute: "readonly", reflect: true })
1984
- ], SDSCheckbox.prototype, "readOnly", 2);
1985
- __decorateClass$c([
1986
- e$3("#control")
1987
- ], SDSCheckbox.prototype, "control", 2);
1988
- SDSCheckbox = __decorateClass$c([
1989
- guardedCustomElement("sds-checkbox")
1990
- ], SDSCheckbox);
1991
- const styles$b = i$4`
766
+ `}};Yt.styles=[Wt],Yt.formAssociated=!0,Xt([lt({type:String,reflect:!0})],Yt.prototype,"name",2),Xt([lt({type:String,reflect:!0})],Yt.prototype,"label",2),Xt([lt({type:String})],Yt.prototype,"value",2),Xt([lt({type:Boolean,reflect:!0})],Yt.prototype,"checked",2),Xt([lt({type:Boolean,reflect:!0})],Yt.prototype,"disabled",1),Xt([lt({type:Boolean,reflect:!0})],Yt.prototype,"error",2),Xt([lt({type:Boolean,reflect:!0})],Yt.prototype,"required",2),Xt([lt({type:String,reflect:!0})],Yt.prototype,"size",2),Xt([lt({type:String,attribute:"help-text"})],Yt.prototype,"helpText",2),Xt([lt({type:Boolean,attribute:"readonly",reflect:!0})],Yt.prototype,"readOnly",2),Xt([lt({type:Boolean,attribute:!1})],Yt.prototype,"parentRequestDisabled",1),Xt([ht("#control")],Yt.prototype,"control",2),Yt=Xt([pt("sds-checkbox")],Yt);const Jt=a`
1992
767
  :host {
1993
768
  --_sds-checkbox-group-gap: var(--sds-checkbox-group-gap, var(--sds-spacing-xs));
1994
769
  --_sds-checkbox-group-font-family: var(--sds-checkbox-group-font-family, var(--sds-typography-font-family-roboto));
1995
- --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-md));
770
+ --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-content-md));
1996
771
  --_sds-checkbox-group-text-color: var(--sds-checkbox-group-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
1997
772
  --_sds-checkbox-group-max-line-width: var(--sds-checkbox-group-max-line-width, var(--sds-typography-max-line-width));
1998
773
  --_sds-checkbox-group-disabled-opacity: var(--sds-checkbox-group-disabled-opacity, var(--sds-color-states-disabled-opacity));
@@ -2002,7 +777,7 @@ const styles$b = i$4`
2002
777
  --_sds-checkbox-group-legend-help-text-gap: var(--sds-checkbox-group-legend-help-text-gap, var(--sds-spacing-4xs));
2003
778
 
2004
779
  --_sds-checkbox-group-help-text-color: var(--sds-checkbox-group-help-text-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
2005
- --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-md));
780
+ --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-md));
2006
781
  --_sds-checkbox-group-help-text-font-weight: var(--sds-checkbox-group-help-text-font-weight, var(--sds-typography-body-md-desktop-font-weight));
2007
782
  --_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-md));
2008
783
 
@@ -2068,135 +843,32 @@ const styles$b = i$4`
2068
843
  }
2069
844
 
2070
845
  :host([size='sm']) {
2071
- --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-sm));
846
+ --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-content-sm));
2072
847
  --_sds-checkbox-group-legend-line-height: var(--sds-checkbox-group-legend-line-height, var(--sds-components-line-height-squeezed-sm));
2073
- --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-sm));
848
+ --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-sm));
2074
849
  --_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-sm));
2075
850
  }
2076
851
 
2077
852
  :host([size='lg']) {
2078
- --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-lg));
853
+ --_sds-checkbox-group-font-size: var(--sds-checkbox-group-font-size, var(--sds-components-font-size-content-lg));
2079
854
  --_sds-checkbox-group-legend-line-height: var(--sds-checkbox-group-legend-line-height, var(--sds-components-line-height-squeezed-lg));
2080
- --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-lg));
855
+ --_sds-checkbox-group-help-text-font-size: var(--sds-checkbox-group-help-text-font-size, var(--sds-components-font-size-content-lg));
2081
856
  --_sds-checkbox-group-help-text-line-height: var(--sds-checkbox-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
2082
857
  }
2083
- `;
2084
- var __defProp$b = Object.defineProperty;
2085
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
2086
- var __decorateClass$b = (decorators, target, key, kind) => {
2087
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
2088
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
2089
- if (decorator = decorators[i3])
2090
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2091
- if (kind && result) __defProp$b(target, key, result);
2092
- return result;
2093
- };
2094
- let SDSCheckboxGroup = class extends i$1 {
2095
- constructor() {
2096
- super(...arguments);
2097
- this.readOnly = false;
2098
- this.disabled = false;
2099
- this.size = "md";
2100
- this._selectedValues = [];
2101
- this._handleCheckboxChange = (event) => {
2102
- const checkbox = event.target;
2103
- const value = checkbox.value;
2104
- const isChecked = checkbox.checked;
2105
- this._selectedValues = isChecked ? [...this._selectedValues, value] : this._selectedValues.filter((v2) => v2 !== value);
2106
- this.dispatchEvent(
2107
- new CustomEvent("sds-update", {
2108
- bubbles: true,
2109
- composed: true
2110
- })
2111
- );
2112
- };
2113
- this._handleSlotChange = () => {
2114
- this._updateChildProps(["readOnly", "disabled", "size", "error"]);
2115
- };
2116
- }
2117
- _updateChildProps(props) {
2118
- const checkboxChildren = this._slotElement.assignedElements({ flatten: true });
2119
- checkboxChildren.forEach((child) => {
2120
- if (child instanceof SDSCheckbox) {
2121
- props.forEach((prop) => {
2122
- if (prop === "error") {
2123
- child.error = Boolean(this.errorMessage);
2124
- } else {
2125
- child[prop] = this[prop];
2126
- }
2127
- });
2128
- }
2129
- });
2130
- }
2131
- updated(changedProps) {
2132
- super.updated(changedProps);
2133
- if (changedProps.has("readonly")) {
2134
- this._updateChildProps(["readOnly"]);
2135
- }
2136
- if (changedProps.has("disabled")) {
2137
- this._updateChildProps(["disabled"]);
2138
- }
2139
- if (changedProps.has("size")) {
2140
- this._updateChildProps(["size"]);
2141
- }
2142
- if (changedProps.has("errorMessage")) {
2143
- this._updateChildProps(["error"]);
2144
- }
2145
- }
2146
- get value() {
2147
- return { selectedValues: this._selectedValues };
2148
- }
2149
- render() {
2150
- const groupClasses = {
2151
- "sds-checkbox-group": true,
2152
- "sds-checkbox-group--disabled": this.disabled,
2153
- "sds-checkbox-group--error": Boolean(this.errorMessage)
2154
- };
2155
- return x`
2156
- <fieldset class="${e2(groupClasses)}">
2157
- ${this.legend ? x`<legend class="sds-checkbox-group__legend">${this.readOnly ? x`<sds-icon name="lock-material-filled" size="md"></sds-icon>` : E}</sds-icon>${this.legend}</legend>` : E}
2158
- ${this.helpText ? x`<p class="sds-checkbox-group__help-text">${this.helpText}</p>` : E}
858
+ `;var ts=Object.defineProperty,ss=Object.getOwnPropertyDescriptor,es=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ss(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ts(s,e,a),a};const os=["disabled","errorMessage","readOnly","size"];let rs=class extends at{constructor(){super(...arguments),this.readOnly=!1,this.disabled=!1,this.size="md",this._selectedValues=[],this._handleCheckboxChange=t=>{const s=t.target,e=s.value,o=s.checked;this._selectedValues=o?[...this._selectedValues,e]:this._selectedValues.filter((t=>t!==e)),this.dispatchEvent(new CustomEvent("sds-update",{bubbles:!0,composed:!0}))},this._handleSlotChange=()=>{this._updateChildProps([...os])}}_getChildCheckboxes(){return this._slotElement?.assignedElements({flatten:!0}).filter((t=>"SDS-CHECKBOX"===t.tagName))??[]}_updateChildProps(t){const s=this._getChildCheckboxes();for(const e of s)for(const s of t)switch(s){case"readOnly":e.readOnly=this.readOnly;break;case"disabled":e.parentRequestDisabled=this.disabled;break;case"errorMessage":e.error=Boolean(this.errorMessage);break;case"size":e.size=this.size}}updated(t){super.updated(t);const s=Array.from(t.keys());(s.includes("errorMessage")||s.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,s,e){if(super.attributeChangedCallback(t,s,e),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;os.includes(o)&&this._updateChildProps([o])}get value(){return{selectedValues:this._selectedValues}}render(){const t={"sds-checkbox-group":!0,"sds-checkbox-group--disabled":this.disabled,"sds-checkbox-group--error":Boolean(this.errorMessage)};return j`
859
+ <fieldset class="${Ot(t)}">
860
+ ${this.legend?j`<legend class="sds-checkbox-group__legend">${this.readOnly?j`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:U}</sds-icon>${this.legend}</legend>`:U}
861
+ ${this.helpText?j`<p class="sds-checkbox-group__help-text">${this.helpText}</p>`:U}
2159
862
  <div class="sds-checkbox-group__checkboxes" @change=${this._handleCheckboxChange}>
2160
863
  <slot @slotchange=${this._handleSlotChange}></slot>
2161
864
  </div>
2162
- ${this.errorMessage ? x`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>` : E}
865
+ ${this.errorMessage?j`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:U}
2163
866
  </fieldset>
2164
- `;
2165
- }
2166
- };
2167
- SDSCheckboxGroup.styles = [styles$b];
2168
- __decorateClass$b([
2169
- n2({ type: String, reflect: true })
2170
- ], SDSCheckboxGroup.prototype, "legend", 2);
2171
- __decorateClass$b([
2172
- n2({ type: String, attribute: "help-text", reflect: true })
2173
- ], SDSCheckboxGroup.prototype, "helpText", 2);
2174
- __decorateClass$b([
2175
- n2({ type: String, attribute: "error-message", reflect: true })
2176
- ], SDSCheckboxGroup.prototype, "errorMessage", 2);
2177
- __decorateClass$b([
2178
- n2({ type: Boolean, attribute: "readonly", reflect: true })
2179
- ], SDSCheckboxGroup.prototype, "readOnly", 2);
2180
- __decorateClass$b([
2181
- n2({ type: Boolean, reflect: true })
2182
- ], SDSCheckboxGroup.prototype, "disabled", 2);
2183
- __decorateClass$b([
2184
- n2({ type: String, reflect: true })
2185
- ], SDSCheckboxGroup.prototype, "size", 2);
2186
- __decorateClass$b([
2187
- r()
2188
- ], SDSCheckboxGroup.prototype, "_selectedValues", 2);
2189
- __decorateClass$b([
2190
- e$3("slot")
2191
- ], SDSCheckboxGroup.prototype, "_slotElement", 2);
2192
- SDSCheckboxGroup = __decorateClass$b([
2193
- guardedCustomElement("sds-checkbox-group")
2194
- ], SDSCheckboxGroup);
2195
- const styles$a = i$4`
867
+ `}};rs.styles=[Jt],es([lt({type:String,reflect:!0})],rs.prototype,"legend",2),es([lt({type:String,attribute:"help-text",reflect:!0})],rs.prototype,"helpText",2),es([lt({type:String,attribute:"error-message",reflect:!0})],rs.prototype,"errorMessage",2),es([lt({type:Boolean,attribute:"readonly",reflect:!0})],rs.prototype,"readOnly",2),es([lt({type:Boolean,reflect:!0})],rs.prototype,"disabled",2),es([lt({type:String,reflect:!0})],rs.prototype,"size",2),es([ct()],rs.prototype,"_selectedValues",2),es([ht("slot")],rs.prototype,"_slotElement",2),rs=es([pt("sds-checkbox-group")],rs);const as=a`
2196
868
  :host {
2197
869
  --_sds-chip-font-family: var(--sds-chip-font-family, var(--sds-typography-font-family-roboto));
2198
870
  --_sds-chip-font-weight: var(--sds-chip-font-weight, var(--sds-typography-font-weight-regular));
2199
- --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-md));
871
+ --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-content-md));
2200
872
  --_sds-chip-line-height: var(--sds-chip-line-height, var(--sds-components-line-height-squeezed-md));
2201
873
  --_sds-chip-height: var(--sds-chip-height, var(--sds-components-chip-md));
2202
874
 
@@ -2219,6 +891,10 @@ const styles$a = i$4`
2219
891
 
2220
892
  display: inline-block;
2221
893
  box-sizing: border-box;
894
+
895
+ sds-icon {
896
+ --sds-icon-color: --_sds-chip-text-color;
897
+ }
2222
898
  }
2223
899
 
2224
900
  :host([disabled]) {
@@ -2256,14 +932,14 @@ const styles$a = i$4`
2256
932
 
2257
933
  :host([size='sm']) {
2258
934
  --_sds-chip-padding-inline: var(--sds-chip-padding-inline, var(--sds-spacing-2xs));
2259
- --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-sm));
935
+ --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-content-sm));
2260
936
  --_sds-chip-line-height: var(--sds-chip-line-height, var(--sds-components-line-height-squeezed-sm));
2261
937
  --_sds-chip-height: var(--sds-chip-height, var(--sds-components-chip-sm));
2262
938
  }
2263
939
 
2264
940
  :host([size='lg']) {
2265
941
  --_sds-chip-padding-inline: var(--sds-chip-padding-inline, var(--sds-spacing-2xs));
2266
- --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-lg));
942
+ --_sds-chip-font-size: var(--sds-chip-font-size, var(--sds-components-font-size-content-lg));
2267
943
  --_sds-chip-line-height: var(--sds-chip-line-height, var(--sds-components-line-height-squeezed-lg));
2268
944
  --_sds-chip-height: var(--sds-chip-height, var(--sds-components-chip-lg));
2269
945
  }
@@ -2332,142 +1008,170 @@ const styles$a = i$4`
2332
1008
  white-space: nowrap;
2333
1009
  }
2334
1010
  }
2335
- `;
2336
- var __defProp$a = Object.defineProperty;
2337
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
2338
- var __decorateClass$a = (decorators, target, key, kind) => {
2339
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
2340
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
2341
- if (decorator = decorators[i3])
2342
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2343
- if (kind && result) __defProp$a(target, key, result);
2344
- return result;
2345
- };
2346
- let SDSChip = class extends i$1 {
2347
- constructor() {
2348
- super();
2349
- this.variant = "selectable";
2350
- this.size = "md";
2351
- this.checked = false;
2352
- this.disabled = false;
2353
- this.readonly = false;
2354
- this._initialChecked = false;
2355
- this._toggle = (event) => {
2356
- event.preventDefault();
2357
- event.stopImmediatePropagation();
2358
- if (this.disabled || this.readonly) return;
2359
- this.checked = !this.checked;
2360
- this.internals.setFormValue(this.checked ? this.value ?? "on" : null);
2361
- this.dispatchEvent(
2362
- new CustomEvent("change", {
2363
- bubbles: true,
2364
- composed: true
2365
- })
2366
- );
2367
- };
2368
- this._remove = () => {
2369
- if (this.disabled || this.readonly) return;
2370
- this.dispatchEvent(
2371
- new CustomEvent("sds-remove", {
2372
- bubbles: true,
2373
- composed: true
2374
- })
2375
- );
2376
- };
2377
- this._keypress = (event) => {
2378
- if (![" ", "Enter"].includes(event.key)) {
2379
- return;
2380
- }
2381
- if (this.variant === "removable") {
2382
- this._remove();
2383
- } else {
2384
- this._toggle(event);
2385
- }
2386
- };
2387
- this.internals = this.attachInternals();
2388
- this.attachShadow({ mode: "open", delegatesFocus: true });
2389
- }
2390
- connectedCallback() {
2391
- super.connectedCallback();
2392
- this._initialChecked = this.checked;
2393
- this.internals.role = "checkbox";
2394
- if (this.checked) {
2395
- this.internals.setFormValue(this.value ? this.value : "");
2396
- }
2397
- }
2398
- formResetCallback() {
2399
- this.checked = this._initialChecked;
2400
- const resetValue = this.checked && this.value ? this.value : "";
2401
- this.internals.setFormValue(resetValue);
2402
- }
2403
- focus() {
2404
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.focus();
2405
- }
2406
- blur() {
2407
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.blur();
2408
- }
2409
- click() {
2410
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.click();
2411
- }
2412
- render() {
2413
- const isRemovableVariant = this.variant === "removable" && !this.readonly && !this.disabled;
2414
- const chipClasses = {
2415
- "sds-chip": true,
2416
- "sds-chip--small": this.size === "small" || this.size === "sm",
2417
- "sds-chip--large": this.size === "large" || this.size === "lg",
2418
- "sds-chip--removable": isRemovableVariant
2419
- };
2420
- if (isRemovableVariant) {
2421
- return x`<button class="${e2(chipClasses)}" @click=${this._remove} @keyup="${this._keypress}">
1011
+ `;var is=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,ns=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ds(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&is(s,e,a),a};let ls=class extends at{constructor(){super(),this.variant="selectable",this.size="md",this.checked=!1,this.disabled=!1,this.readonly=!1,this._initialChecked=!1,this._toggle=t=>{t.preventDefault(),t.stopImmediatePropagation(),this.disabled||this.readonly||(this.checked=!this.checked,this.internals.setFormValue(this.checked?this.value??"on":null),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0})))},this._remove=()=>{this.disabled||this.readonly||this.dispatchEvent(new CustomEvent("sds-remove",{bubbles:!0,composed:!0}))},this._keypress=t=>{[" ","Enter"].includes(t.key)&&("removable"===this.variant?this._remove():this._toggle(t))},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.role="checkbox",this.checked&&this.internals.setFormValue(this.value??null)}formResetCallback(){this.checked=this._initialChecked,this.internals.setFormValue(this.value??null)}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.shadowRoot?.querySelector("input")?.click()}render(){const t="removable"===this.variant&&!this.readonly&&!this.disabled,s={"sds-chip":!0,"sds-chip--small":"small"===this.size||"sm"===this.size,"sds-chip--large":"large"===this.size||"lg"===this.size,"sds-chip--removable":t};return t?j`<button class="${Ot(s)}" @click=${this._remove} @keyup="${this._keypress}">
2422
1012
  <slot></slot>
2423
1013
  <sds-icon name="close-material-outlined" size="s"></sds-icon>
2424
- </button>`;
2425
- }
2426
- return x`<label class="${e2(chipClasses)}" @click="${this._toggle}" @keyup="${this._keypress}">
1014
+ </button>`:j`<label class="${Ot(s)}" @click="${this._toggle}" @keyup="${this._keypress}">
2427
1015
  <input
2428
1016
  id="control"
2429
1017
  type="checkbox"
2430
- name="${o$1(this.name)}"
2431
- value="${o$1(this.value)}"
1018
+ name="${vt(this.name)}"
1019
+ value="${vt(this.value)}"
2432
1020
  .checked="${this.checked}"
2433
1021
  ?checked="${this.checked}"
2434
1022
  ?disabled="${this.disabled}"
2435
1023
  ?readonly="${this.readonly}"
2436
1024
  />
2437
1025
  <slot></slot>
2438
- </label>`;
2439
- }
2440
- };
2441
- SDSChip.styles = [styles$a];
2442
- SDSChip.formAssociated = true;
2443
- __decorateClass$a([
2444
- n2({ type: String, reflect: true })
2445
- ], SDSChip.prototype, "variant", 2);
2446
- __decorateClass$a([
2447
- n2({ type: String, reflect: true })
2448
- ], SDSChip.prototype, "size", 2);
2449
- __decorateClass$a([
2450
- n2({ type: Boolean, reflect: true })
2451
- ], SDSChip.prototype, "checked", 2);
2452
- __decorateClass$a([
2453
- n2({ type: String, reflect: true })
2454
- ], SDSChip.prototype, "name", 2);
2455
- __decorateClass$a([
2456
- n2({ type: String })
2457
- ], SDSChip.prototype, "value", 2);
2458
- __decorateClass$a([
2459
- n2({ type: Boolean, reflect: true })
2460
- ], SDSChip.prototype, "disabled", 2);
2461
- __decorateClass$a([
2462
- n2({ type: Boolean, reflect: true })
2463
- ], SDSChip.prototype, "readonly", 2);
2464
- __decorateClass$a([
2465
- e$3("#control")
2466
- ], SDSChip.prototype, "control", 2);
2467
- SDSChip = __decorateClass$a([
2468
- guardedCustomElement("sds-chip")
2469
- ], SDSChip);
2470
- const styles$9 = i$4`
1026
+ </label>`}};ls.styles=[as],ls.formAssociated=!0,ns([lt({type:String,reflect:!0})],ls.prototype,"variant",2),ns([lt({type:String,reflect:!0})],ls.prototype,"size",2),ns([lt({type:Boolean,reflect:!0})],ls.prototype,"checked",2),ns([lt({type:String,reflect:!0})],ls.prototype,"name",2),ns([lt({type:String})],ls.prototype,"value",2),ns([lt({type:Boolean,reflect:!0})],ls.prototype,"disabled",2),ns([lt({type:Boolean,reflect:!0})],ls.prototype,"readonly",2),ns([ht("#control")],ls.prototype,"control",2),ls=ns([pt("sds-chip")],ls);const cs=a`
1027
+ :host {
1028
+ --_sds-details-text-color: var(--sds-details-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
1029
+
1030
+ --_sds-details-summary-padding: var(--sds-details-summary-padding, var(--sds-spacing-xs));
1031
+ --_sds-details-summary-background-color: var(--sds-details-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
1032
+ --_sds-details-summary-gap: var(--sds-details-summary-gap, var(--sds-spacing-3xs));
1033
+
1034
+ --_sds-details-content-padding-start: var(--sds-details-content-padding-start, calc(var(--_sds-details-summary-padding) + var(--_sds-details-summary-gap) + var(--sds-components-icon-md)));
1035
+ --_sds-details-content-padding: var(--sds-details-content-padding, var(--sds-spacing-xs));
1036
+ --_sds-details-content-background-color: var(--sds-details-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
1037
+
1038
+ --_sds-details-focus-outline-width: var(--sds-details-focus-outline-width, var(--sds-border-md));
1039
+ --_sds-details-focus-outline-color: var(--sds-details-focus-outline-color, var(--sds-color-states-focus-outer));
1040
+ --_sds-details-focus-outline-offset: var(--sds-details-focus-outline-offset, var(--sds-color-states-focus-spacing));
1041
+ --_sds-details-focus-inner-color: var(--sds-details-focus-inner-color, var(--sds-color-states-focus-inner));
1042
+
1043
+ --_sds-details-icon-transition: var(--sds-details-icon-transition, transform 0.2s ease);
1044
+
1045
+ --_sds-details-border-color: var(--sds-details-border-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
1046
+ --_sds-details-border-bottom: var(--sds-details-border-bottom, solid 1px var(--_sds-details-border-color));
1047
+ }
1048
+
1049
+ :host([data-palette]) {
1050
+ --_sds-details-text-color: var(--sds-details-text-color, var(--sds-color-text-default, var(--sds-color-main-text-default)));
1051
+ --_sds-details-summary-background-color: var(--sds-details-background-color, var(--sds-color-surface-default, var(--sds-color-main-surface-default)));
1052
+ }
1053
+
1054
+ .sds-details {
1055
+ color: var(--_sds-details-text-color);
1056
+
1057
+ &:is([open]) {
1058
+ --_sds-details-summary-background-color: var(----_sds-details-summary-background-color, var(--sds-color-surface-tinted, var(--sds-color-main-surface-tinted)));
1059
+ }
1060
+
1061
+ &:not([data-standalone]) {
1062
+ border-top: solid 1px var(--_sds-details-border-color);
1063
+ border-bottom: var(--_sds-details-border-bottom);
1064
+ }
1065
+
1066
+ /* Setting the border on the summary element preserves the border
1067
+ when the element has focus
1068
+ */
1069
+ &:is([data-standalone]) {
1070
+ summary {
1071
+ border-radius: var(--sds-radius-md);
1072
+ border: solid 1px var(--_sds-details-border-color);
1073
+ }
1074
+
1075
+ &:is([open]) {
1076
+ & summary {
1077
+ border-bottom-left-radius: 0px;
1078
+ border-bottom-right-radius: 0px;
1079
+ }
1080
+
1081
+ & .sds-details__content {
1082
+ border-left: solid 1px var(--_sds-details-border-color);
1083
+ border-right: solid 1px var(--_sds-details-border-color);
1084
+ border-bottom: solid 1px var(--_sds-details-border-color);
1085
+ border-bottom-left-radius: var(--sds-radius-md);
1086
+ border-bottom-right-radius: var(--sds-radius-md);
1087
+ }
1088
+ }
1089
+ }
1090
+ }
1091
+
1092
+ .sds-details__summary {
1093
+ cursor: pointer;
1094
+ display: flex;
1095
+ align-items: center;
1096
+ justify-content: space-between;
1097
+ padding: var(--_sds-details-summary-padding);
1098
+ background-color: var(--_sds-details-summary-background-color);
1099
+ gap: var(--_sds-details-summary-gap);
1100
+ list-style: none;
1101
+ user-select: none;
1102
+
1103
+ &:hover {
1104
+ --_sds-details-summary-background-color: var(--sds-details-summary-background-color, var(--sds-color-surface-hover, var(--sds-color-main-surface-hover)));
1105
+ }
1106
+
1107
+ &:active {
1108
+ --_sds-details-summary-background-color: var(--sds-details-summary-background-color, var(--sds-color-surface-active, var(--sds-color-main-surface-active)));
1109
+ }
1110
+
1111
+ &:focus-visible {
1112
+ box-shadow: 0 0 0 var(--sds-color-states-focus-spacing) var(--_sds-details-focus-inner-color);
1113
+ outline: var(--_sds-details-focus-outline-width) solid var(--_sds-details-focus-outline-color);
1114
+ outline-offset: var(--_sds-details-focus-outline-offset);
1115
+ }
1116
+ }
1117
+
1118
+ .sds-details__summary-content {
1119
+ flex: 1;
1120
+ min-width: 0;
1121
+ }
1122
+
1123
+ sds-icon {
1124
+ transition: var(--_sds-details-icon-transition);
1125
+ }
1126
+
1127
+ .sds-details:not([open]) sds-icon {
1128
+ transform: rotate(180deg);
1129
+ }
1130
+
1131
+ .sds-details__content {
1132
+ padding: var(--_sds-details-content-padding);
1133
+ padding-inline-start: var(--_sds-details-content-padding-start);
1134
+ }
1135
+
1136
+ @media (prefers-reduced-motion: no-preference) {
1137
+ .sds-details__content {
1138
+ animation: show-content-keyframes 200ms ease-in-out;
1139
+ }
1140
+ }
1141
+
1142
+ @keyframes show-content-keyframes {
1143
+ from {
1144
+ opacity: 0;
1145
+ transform: translateY(-0.5rem);
1146
+ }
1147
+ to {
1148
+ opacity: 1;
1149
+ transform: translateY(0);
1150
+ }
1151
+ }
1152
+
1153
+ ::slotted(*) {
1154
+ margin: 0 !important;
1155
+ padding: 0 !important;
1156
+ }
1157
+
1158
+ ::slotted([slot='summary']) {
1159
+ display: inline;
1160
+ margin: 0;
1161
+ }
1162
+ `;var hs=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,gs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ps(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&hs(s,e,a),a};let vs=class extends at{constructor(){super(...arguments),this.open=!1,this.standalone=!1,this.name=void 0,this._handleToggle=t=>{const s=t.currentTarget;this.open!==s.open&&(this.open=s.open),this.dispatchEvent(new CustomEvent("sds-toggle",{detail:{open:s.open},bubbles:!0,composed:!0}))}}render(){return j`
1163
+ <details class="sds-details" .name="${this.name??""}" ?data-standalone="${this.standalone}" ?open="${this.open}" @toggle="${this._handleToggle}">
1164
+ <summary class="sds-details__summary">
1165
+ <sds-icon name="chevron_up-material-filled"></sds-icon>
1166
+ <div class="sds-details__summary-content">
1167
+ <slot name="summary"></slot>
1168
+ </div>
1169
+ </summary>
1170
+ <div class="sds-details__content">
1171
+ <slot></slot>
1172
+ </div>
1173
+ </details>
1174
+ `}};vs.styles=[cs],gs([lt({type:Boolean,reflect:!0})],vs.prototype,"open",2),gs([lt({type:Boolean,reflect:!0})],vs.prototype,"standalone",2),gs([lt({type:String,reflect:!0})],vs.prototype,"name",2),vs=gs([pt("sds-details")],vs);const us=a`
2471
1175
  :host {
2472
1176
  --_sds-heading-font-family: var(--sds-heading-font-family, var(--sds-typography-font-family-roboto));
2473
1177
  --_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
@@ -2620,60 +1324,7 @@ const styles$9 = i$4`
2620
1324
  --_sds-heading-line-height: var(--sds-heading-line-height, var(--sds-typography-heading-xs-desktop-line-height));
2621
1325
  }
2622
1326
  }
2623
- `;
2624
- var __defProp$9 = Object.defineProperty;
2625
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
2626
- var __decorateClass$9 = (decorators, target, key, kind) => {
2627
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
2628
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
2629
- if (decorator = decorators[i3])
2630
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2631
- if (kind && result) __defProp$9(target, key, result);
2632
- return result;
2633
- };
2634
- let SDSHeading = class extends i$1 {
2635
- constructor() {
2636
- super(...arguments);
2637
- this.level = "h1";
2638
- }
2639
- render() {
2640
- const headingClasses = {
2641
- "sds-heading": true,
2642
- "sds-heading--xl": this.size === "xl",
2643
- "sds-heading--lg": this.size === "l" || this.size === "lg",
2644
- "sds-heading--md": this.size === "m" || this.size === "md",
2645
- "sds-heading--sm": this.size === "s" || this.size === "sm",
2646
- "sds-heading--xs": this.size === "xs"
2647
- };
2648
- switch (this.level?.toLowerCase()) {
2649
- case "h1":
2650
- return x`<h1 class=${e2(headingClasses)}><slot></slot></h1>`;
2651
- case "h2":
2652
- return x`<h2 class=${e2(headingClasses)}><slot></slot></h2>`;
2653
- case "h3":
2654
- return x`<h3 class=${e2(headingClasses)}><slot></slot></h3>`;
2655
- case "h4":
2656
- return x`<h4 class=${e2(headingClasses)}><slot></slot></h4>`;
2657
- case "h5":
2658
- return x`<h5 class=${e2(headingClasses)}><slot></slot></h5>`;
2659
- case "h6":
2660
- return x`<h6 class=${e2(headingClasses)}><slot></slot></h6>`;
2661
- default:
2662
- return x`<h1 class=${e2(headingClasses)}><slot></slot></h1>`;
2663
- }
2664
- }
2665
- };
2666
- SDSHeading.styles = [styles$9];
2667
- __decorateClass$9([
2668
- n2({ type: String, reflect: true })
2669
- ], SDSHeading.prototype, "level", 2);
2670
- __decorateClass$9([
2671
- n2({ type: String, reflect: true })
2672
- ], SDSHeading.prototype, "size", 2);
2673
- SDSHeading = __decorateClass$9([
2674
- guardedCustomElement("sds-heading")
2675
- ], SDSHeading);
2676
- const styles$8 = i$4`
1327
+ `;var fs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,_s=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?bs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&fs(s,e,a),a};let xs=class extends at{constructor(){super(...arguments),this.level="h1"}render(){const t={"sds-heading":!0,"sds-heading--xl":"xl"===this.size,"sds-heading--lg":"l"===this.size||"lg"===this.size,"sds-heading--md":"m"===this.size||"md"===this.size,"sds-heading--sm":"s"===this.size||"sm"===this.size,"sds-heading--xs":"xs"===this.size};switch(this.level?.toLowerCase()){case"h1":default:return j`<h1 class=${Ot(t)}><slot></slot></h1>`;case"h2":return j`<h2 class=${Ot(t)}><slot></slot></h2>`;case"h3":return j`<h3 class=${Ot(t)}><slot></slot></h3>`;case"h4":return j`<h4 class=${Ot(t)}><slot></slot></h4>`;case"h5":return j`<h5 class=${Ot(t)}><slot></slot></h5>`;case"h6":return j`<h6 class=${Ot(t)}><slot></slot></h6>`}}};xs.styles=[us],_s([lt({type:String,reflect:!0})],xs.prototype,"level",2),_s([lt({type:String,reflect:!0})],xs.prototype,"size",2),xs=_s([pt("sds-heading")],xs);const ms=a`
2677
1328
  :host {
2678
1329
  --_sds-loader-main-color: var(--sds-loader-main-color, var(--sds-color-action-contrast-default, var(--sds-color-main-action-contrast-default)));
2679
1330
  --_sds-loader-secondary-color: var(--sds-loader-secondary-color, var(--sds-color-border-subtle, var(--sds-color-main-border-subtle)));
@@ -2749,41 +1400,10 @@ const styles$8 = i$4`
2749
1400
  stroke-dashoffset: -120px;
2750
1401
  }
2751
1402
  }
2752
- `;
2753
- var __defProp$8 = Object.defineProperty;
2754
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
2755
- var __decorateClass$8 = (decorators, target, key, kind) => {
2756
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
2757
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
2758
- if (decorator = decorators[i3])
2759
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2760
- if (kind && result) __defProp$8(target, key, result);
2761
- return result;
2762
- };
2763
- let SDSLoader = class extends i$1 {
2764
- constructor() {
2765
- super(...arguments);
2766
- this.size = "md";
2767
- this.contrast = false;
2768
- }
2769
- render() {
2770
- return x`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
1403
+ `;var ys=Object.defineProperty,ws=Object.getOwnPropertyDescriptor,ks=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ws(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ys(s,e,a),a};let zs=class extends at{constructor(){super(...arguments),this.size="md",this.contrast=!1}render(){return j`<svg aria-label="Laster" class="sds-loader" role="img" viewBox="0 0 50 50">
2771
1404
  <circle class="sds-loader__background" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
2772
1405
  <circle class="sds-loader__circle" cx="25" cy="25" r="20" fill="none" stroke-width="7"></circle>
2773
- </svg>`;
2774
- }
2775
- };
2776
- SDSLoader.styles = [styles$8];
2777
- __decorateClass$8([
2778
- n2({ type: String, reflect: true })
2779
- ], SDSLoader.prototype, "size", 2);
2780
- __decorateClass$8([
2781
- n2({ type: Boolean, reflect: true })
2782
- ], SDSLoader.prototype, "contrast", 2);
2783
- SDSLoader = __decorateClass$8([
2784
- guardedCustomElement("sds-loader")
2785
- ], SDSLoader);
2786
- const styles$7 = i$4`
1406
+ </svg>`}};zs.styles=[ms],ks([lt({type:String,reflect:!0})],zs.prototype,"size",2),ks([lt({type:Boolean,reflect:!0})],zs.prototype,"contrast",2),zs=ks([pt("sds-loader")],zs);const $s=a`
2787
1407
  :host {
2788
1408
  --_sds-notification-background-color: var(--sds-notification-background-color, var(--sds-color-alert-info-surface-tinted));
2789
1409
 
@@ -2795,7 +1415,7 @@ const styles$7 = i$4`
2795
1415
  --_sds-notification-content-gap: var(--sds-notification-content-gap, var(--sds-spacing-3xs));
2796
1416
 
2797
1417
  --_sds-notification-font-family: var(--sds-notification-font-family, var(--sds-typography-font-family-roboto));
2798
- --_sds-notification-font-size: var(--sds-notification-font-size, var(--sds-components-font-size-md));
1418
+ --_sds-notification-font-size: var(--sds-notification-font-size, var(--sds-components-font-size-content-md));
2799
1419
  --_sds-notification-font-weight: var(--sds-notification-font-weight, var(--sds-typography-body-md-desktop-font-weight));
2800
1420
  --_sds-notification-line-height: var(--sds-notification-line-height, var(--sds-components-line-height-squeezed-md));
2801
1421
  --_sds-notification-text-color: var(--sds-notification-text-color, var(--sds-color-alert-info-text-default));
@@ -2920,83 +1540,20 @@ const styles$7 = i$4`
2920
1540
  margin: 0 !important;
2921
1541
  max-width: var(--_sds-notification-max-line-width) !important;
2922
1542
  }
2923
- `;
2924
- var __defProp$7 = Object.defineProperty;
2925
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
2926
- var __decorateClass$7 = (decorators, target, key, kind) => {
2927
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
2928
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
2929
- if (decorator = decorators[i3])
2930
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2931
- if (kind && result) __defProp$7(target, key, result);
2932
- return result;
2933
- };
2934
- const notificationIcons = {
2935
- info: "InformationSquareFill-aksel-filled",
2936
- success: "check_circle-material-filled",
2937
- attention: "warning-material-filled",
2938
- warning: "warning-material-filled",
2939
- danger: "dangerous-material-filled",
2940
- critical: "dangerous-material-filled"
2941
- // Deprecated
2942
- };
2943
- let hasWarnedAboutDeprecation = false;
2944
- let SDSNotification = class extends i$1 {
2945
- constructor() {
2946
- super();
2947
- this.variant = "info";
2948
- this._remove = () => {
2949
- this.dispatchEvent(
2950
- new CustomEvent("sds-remove", {
2951
- bubbles: true,
2952
- composed: true
2953
- })
2954
- );
2955
- };
2956
- if (!hasWarnedAboutDeprecation) {
2957
- hasWarnedAboutDeprecation = true;
2958
- console.warn("[Sheriff] The Notification component is deprecated and will be removed in the next major release. Please migrate to the Alert component.");
2959
- }
2960
- }
2961
- updated(changed) {
2962
- if (changed.has("variant") && this.variant === "critical") {
2963
- this.variant = "danger";
2964
- } else if (changed.has("variant") && this.variant === "warning") {
2965
- this.variant = "attention";
2966
- }
2967
- }
2968
- render() {
2969
- const notificationClasses = {
2970
- "sds-notification": true
2971
- };
2972
- const colorPalette = this.variant === "danger" || this.variant === "critical" ? "danger" : "accent";
2973
- return x`<div class="${e2(notificationClasses)}">
1543
+ `;var Ss=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,Es=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Cs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ss(s,e,a),a};const As={info:"InformationSquareFill-aksel-filled",success:"check_circle-material-filled",attention:"warning-material-filled",warning:"warning-material-filled",danger:"dangerous-material-filled",critical:"dangerous-material-filled"};let qs=!1,Os=class extends at{constructor(){super(),this.variant="info",this._remove=()=>{this.dispatchEvent(new CustomEvent("sds-remove",{bubbles:!0,composed:!0}))},qs||(qs=!0,console.warn("[Sheriff] The Notification component is deprecated and will be removed in the next major release. Please migrate to the Alert component."))}updated(t){t.has("variant")&&"critical"===this.variant?this.variant="danger":t.has("variant")&&"warning"===this.variant&&(this.variant="attention")}render(){const t="danger"===this.variant||"critical"===this.variant?"danger":"accent";return j`<div class="${Ot({"sds-notification":!0})}">
2974
1544
  <div class="sds-notification__type">
2975
- <sds-icon class="sds-notification__icon" name="${notificationIcons[this.variant]}" size="md"></sds-icon>
1545
+ <sds-icon class="sds-notification__icon" name="${As[this.variant]}" size="md"></sds-icon>
2976
1546
  </div>
2977
1547
  <div class="sds-notification__content">
2978
1548
  <slot name="title"></slot>
2979
1549
  <slot name="message"></slot>
2980
1550
  </div>
2981
- ${this.removableLabel ? x`<div class="sds-notification__actions">
2982
- <sds-button icon variant="tertiary" color="${colorPalette}" size="sm" @click=${this._remove} aria-label="${this.removableLabel}">
1551
+ ${this.removableLabel?j`<div class="sds-notification__actions">
1552
+ <sds-button icon variant="tertiary" color="${t}" size="sm" @click=${this._remove} aria-label="${this.removableLabel}">
2983
1553
  <sds-icon name="close-material-outlined" size="sm"></sds-icon>
2984
1554
  </sds-button>
2985
- </div>` : E}
2986
- </div>`;
2987
- }
2988
- };
2989
- SDSNotification.styles = [styles$7];
2990
- __decorateClass$7([
2991
- n2({ type: String, reflect: true })
2992
- ], SDSNotification.prototype, "variant", 2);
2993
- __decorateClass$7([
2994
- n2({ type: String, attribute: "removable-label", reflect: true })
2995
- ], SDSNotification.prototype, "removableLabel", 2);
2996
- SDSNotification = __decorateClass$7([
2997
- guardedCustomElement("sds-notification")
2998
- ], SDSNotification);
2999
- const styles$6 = i$4`
1555
+ </div>`:U}
1556
+ </div>`}};Os.styles=[$s],Es([lt({type:String,reflect:!0})],Os.prototype,"variant",2),Es([lt({type:String,attribute:"removable-label",reflect:!0})],Os.prototype,"removableLabel",2),Os=Es([pt("sds-notification")],Os);const Ps=a`
3000
1557
  :host {
3001
1558
  --_sds-radio-font-family: var(--sds-radio-font-family, var(--sds-typography-font-family-roboto));
3002
1559
  --_sds-radio-disabled-opacity: var(--sds-radio-disabled-opacity, var(--sds-color-states-disabled-opacity));
@@ -3020,6 +1577,11 @@ const styles$6 = i$4`
3020
1577
  --_sds-radio-input-dot-color: var(--sds-radio-input-dot-color, transparent);
3021
1578
  --_sds-radio-input-dot-size: var(--sds-radio-input-dot-size, 4.5px);
3022
1579
 
1580
+ --_sds-radio-grid-template-areas: var(--sds-radio-grid-template-area, 'input content');
1581
+ --_sds-radio-label-grid-area: var(--sds-radio-label-grid-area, content);
1582
+ --_sds-radio-input-grid-area: var(--sds-radio-input-grid-area, input);
1583
+ --_sds-radio-help-text-grid-area: var(--sds-radio-help-text-grid-area, content);
1584
+
3023
1585
  display: inline-flex;
3024
1586
  flex: 0 0 auto;
3025
1587
  }
@@ -3028,7 +1590,7 @@ const styles$6 = i$4`
3028
1590
  display: grid;
3029
1591
  font-family: var(--_sds-radio-font-family);
3030
1592
  gap: var(--_sds-radio-block-gap) var(--_sds-radio-inline-gap);
3031
- grid-template-areas: 'input content';
1593
+ grid-template-areas: var(--_sds-radio-grid-template-areas);
3032
1594
  grid-template-columns: auto 1fr;
3033
1595
  width: fit-content;
3034
1596
 
@@ -3050,7 +1612,7 @@ const styles$6 = i$4`
3050
1612
  }
3051
1613
 
3052
1614
  .sds-radio__help-text {
3053
- grid-column: content;
1615
+ grid-column: var(--_sds-radio-help-text-grid-area);
3054
1616
  margin: 0;
3055
1617
  color: var(--_sds-radio-help-text-color);
3056
1618
  font-size: var(--_sds-radio-help-text-font-size);
@@ -3067,7 +1629,7 @@ const styles$6 = i$4`
3067
1629
  font-weight: var(--_sds-radio-label-font-weight);
3068
1630
  line-height: var(--_sds-radio-label-line-height);
3069
1631
 
3070
- grid-column: content;
1632
+ grid-column: var(--_sds-radio-label-grid-area);
3071
1633
  }
3072
1634
 
3073
1635
  .sds-radio__input {
@@ -3084,7 +1646,7 @@ const styles$6 = i$4`
3084
1646
  margin: 0;
3085
1647
  position: relative;
3086
1648
 
3087
- grid-column: input;
1649
+ grid-column: var(--_sds-radio-input-grid-area);
3088
1650
  grid-row: 1;
3089
1651
 
3090
1652
  &[readonly] {
@@ -3193,308 +1755,33 @@ const styles$6 = i$4`
3193
1755
  margin-block-start: -1px;
3194
1756
  }
3195
1757
  }
3196
- `;
3197
- var __defProp$6 = Object.defineProperty;
3198
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
3199
- var __decorateClass$6 = (decorators, target, key, kind) => {
3200
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
3201
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
3202
- if (decorator = decorators[i3])
3203
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3204
- if (kind && result) __defProp$6(target, key, result);
3205
- return result;
3206
- };
3207
- let SDSRadio = class extends i$1 {
3208
- constructor() {
3209
- super();
3210
- this.required = false;
3211
- this.label = "";
3212
- this.hideLabel = false;
3213
- this.value = "on";
3214
- this.checked = false;
3215
- this.error = false;
3216
- this.readOnly = false;
3217
- this.size = "md";
3218
- this._disabled = false;
3219
- this._disabledIsAuthorControlled = false;
3220
- this._settingDisabledFromParent = false;
3221
- this._parentRequestDisabled = false;
3222
- this._initialChecked = false;
3223
- this._handleKeydown = (event) => {
3224
- if (!this.name || this.disabled || this.readOnly) return;
3225
- const root = this.getRootNode();
3226
- const radios = Array.from(root.querySelectorAll(`sds-radio[name="${this.name}"]`));
3227
- const currentIndex = radios.indexOf(this);
3228
- if (currentIndex === -1) return;
3229
- let targetIndex = null;
3230
- switch (event.key) {
3231
- case "ArrowUp":
3232
- case "ArrowLeft":
3233
- targetIndex = currentIndex > 0 ? currentIndex - 1 : radios.length - 1;
3234
- break;
3235
- case "ArrowDown":
3236
- case "ArrowRight":
3237
- targetIndex = currentIndex < radios.length - 1 ? currentIndex + 1 : 0;
3238
- break;
3239
- default:
3240
- return;
3241
- }
3242
- const targetRadio = radios[targetIndex];
3243
- targetRadio?.focus();
3244
- targetRadio?.click();
3245
- event.preventDefault();
3246
- };
3247
- this._handleChange = (event) => {
3248
- if (this.disabled || this.readOnly) {
3249
- event.target.checked = this.checked ?? false;
3250
- event.preventDefault();
3251
- return;
3252
- }
3253
- const elem = event.target;
3254
- this.checked = elem.checked;
3255
- if (this.checked) {
3256
- this._uncheckSiblings();
3257
- }
3258
- this._updateGroupValidation();
3259
- this.dispatchEvent(new CustomEvent("change", { bubbles: true, composed: true }));
3260
- };
3261
- this._handleFocus = (event) => {
3262
- event.stopImmediatePropagation();
3263
- this.dispatchEvent(new CustomEvent("focus", { bubbles: true, composed: true }));
3264
- };
3265
- this._handleBlur = (event) => {
3266
- event.stopImmediatePropagation();
3267
- this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
3268
- };
3269
- this.internals = this.attachInternals();
3270
- this.attachShadow({ mode: "open", delegatesFocus: true });
3271
- }
3272
- /**
3273
- * disabled:
3274
- * - If set directly (prop/attr), this radio becomes "self-controlled"
3275
- * and ignores parentRequestDisabled.
3276
- * - If not self-controlled, this follows parentRequestDisabled (group/form).
3277
- */
3278
- get disabled() {
3279
- return this._disabled;
3280
- }
3281
- set disabled(value) {
3282
- const newVal = value ?? false;
3283
- const oldVal = this._disabled;
3284
- if (oldVal === newVal) return;
3285
- this._disabled = newVal;
3286
- this.requestUpdate("disabled", oldVal);
3287
- if (!this._settingDisabledFromParent) {
3288
- this._disabledIsAuthorControlled = newVal;
3289
- }
3290
- }
3291
- get parentRequestDisabled() {
3292
- return this._parentRequestDisabled;
3293
- }
3294
- set parentRequestDisabled(value) {
3295
- const newVal = value ?? false;
3296
- const oldVal = this._parentRequestDisabled;
3297
- if (oldVal === newVal) return;
3298
- this._parentRequestDisabled = newVal;
3299
- this.requestUpdate("parentRequestDisabled", oldVal);
3300
- if (this._disabledIsAuthorControlled) return;
3301
- this._settingDisabledFromParent = true;
3302
- this.disabled = newVal;
3303
- this._settingDisabledFromParent = false;
3304
- }
3305
- connectedCallback() {
3306
- super.connectedCallback();
3307
- this.internals.role = "radio";
3308
- if (!this._initialChecked) {
3309
- this._initialChecked = this.checked ?? false;
3310
- }
3311
- this.addEventListener("keydown", this._handleKeydown);
3312
- }
3313
- disconnectedCallback() {
3314
- super.disconnectedCallback();
3315
- this.removeEventListener("keydown", this._handleKeydown);
3316
- }
3317
- firstUpdated(_changedProperties) {
3318
- super.firstUpdated(_changedProperties);
3319
- this._updateGroupValidation();
3320
- }
3321
- updated(changedProperties) {
3322
- super.updated(changedProperties);
3323
- if (changedProperties.has("checked")) {
3324
- if (this.checked) {
3325
- this._uncheckSiblings();
3326
- this.internals.setFormValue(this.value ?? null);
3327
- } else {
3328
- this.internals.setFormValue(null);
3329
- }
3330
- this._updateGroupValidation();
3331
- }
3332
- if (changedProperties.has("required") && this.control) {
3333
- this.control.required = this.required ?? false;
3334
- }
3335
- if (!this._disabledIsAuthorControlled && this.disabled !== this._parentRequestDisabled) {
3336
- this._settingDisabledFromParent = true;
3337
- this.disabled = this._parentRequestDisabled ?? false;
3338
- this._settingDisabledFromParent = false;
3339
- }
3340
- }
3341
- _getGroupRadios() {
3342
- if (!this.name) return [this];
3343
- const root = this.getRootNode();
3344
- const radioGroup = Array.from(root.querySelectorAll(`sds-radio[name="${this.name}"]`));
3345
- return radioGroup;
3346
- }
3347
- _updateGroupValidation() {
3348
- const group = this._getGroupRadios();
3349
- const isAnyChecked = group.some((radio) => radio.checked);
3350
- const isAnyRequired = group.some((radio) => radio.required);
3351
- group.forEach((radio) => {
3352
- if (!radio.control) return;
3353
- if (isAnyRequired) {
3354
- radio.internals.setValidity(isAnyChecked ? {} : { valueMissing: true }, isAnyChecked ? "" : radio.control.validationMessage, radio.control);
3355
- } else {
3356
- radio.internals.setValidity({});
3357
- }
3358
- });
3359
- }
3360
- formResetCallback() {
3361
- this.checked = this._initialChecked;
3362
- this.control.checked = this._initialChecked;
3363
- this.internals.setFormValue(this.checked ? this.value ?? "on" : null);
3364
- this._updateGroupValidation();
3365
- }
3366
- _uncheckSiblings() {
3367
- if (!this.name) return;
3368
- const radios = this._getGroupRadios();
3369
- for (const radio of radios) {
3370
- if (radio !== this && radio.checked) {
3371
- radio.checked = false;
3372
- radio.internals.setFormValue(null);
3373
- }
3374
- }
3375
- }
3376
- get form() {
3377
- return this.internals.form;
3378
- }
3379
- get type() {
3380
- return "radio";
3381
- }
3382
- get validity() {
3383
- return this.internals.validity;
3384
- }
3385
- get validationMessage() {
3386
- return this.internals.validationMessage;
3387
- }
3388
- get willValidate() {
3389
- return this.internals.willValidate;
3390
- }
3391
- checkValidity() {
3392
- return this.internals.checkValidity();
3393
- }
3394
- reportValidity() {
3395
- return this.internals.reportValidity();
3396
- }
3397
- setCustomValidity(message) {
3398
- this.internals.setValidity({ customError: !!message }, message);
3399
- }
3400
- formDisabledCallback(disabled) {
3401
- this._settingDisabledFromParent = true;
3402
- this.disabled = disabled;
3403
- this._settingDisabledFromParent = false;
3404
- if (this.control) this.control.disabled = disabled;
3405
- }
3406
- focus() {
3407
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.focus();
3408
- }
3409
- blur() {
3410
- if (!this.disabled) this.shadowRoot?.querySelector("input")?.blur();
3411
- }
3412
- click() {
3413
- if (!this.disabled && !this.readOnly) this.shadowRoot?.querySelector("input")?.click();
3414
- }
3415
- render() {
3416
- const radioClasses = {
3417
- "sds-radio": true,
3418
- "sds-radio--error": Boolean(this.error)
3419
- };
3420
- const inputClasses = {
3421
- "sds-radio__input": true,
3422
- "sds-radio__input--error": Boolean(this.error)
3423
- };
3424
- return x`
3425
- <div class="${e2(radioClasses)}">
1758
+ `;var Ds=Object.defineProperty,Ms=Object.getOwnPropertyDescriptor,Vs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Ms(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ds(s,e,a),a};let Rs=class extends at{constructor(){super(),this.required=!1,this.label="",this.hideLabel=!1,this.value="on",this.checked=!1,this.error=!1,this.readOnly=!1,this.size="md",this._disabled=!1,this._disabledIsAuthorControlled=!1,this._settingDisabledFromParent=!1,this._parentRequestDisabled=!1,this._initialChecked=!1,this._handleKeydown=t=>{if(!this.name||this.disabled||this.readOnly)return;const s=this.getRootNode(),e=Array.from(s.querySelectorAll(`sds-radio[name="${this.name}"]`)),o=e.indexOf(this);if(-1===o)return;let r=null;switch(t.key){case"ArrowUp":case"ArrowLeft":r=o>0?o-1:e.length-1;break;case"ArrowDown":case"ArrowRight":r=o<e.length-1?o+1:0;break;default:return}const a=e[r];a?.focus(),a?.click(),t.preventDefault()},this._handleChange=t=>{if(this.disabled||this.readOnly)return t.target.checked=this.checked??!1,void t.preventDefault();const s=t.target;this.checked=s.checked,this.checked&&this._uncheckSiblings(),this._updateGroupValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0}))},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))},this._handleBlur=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}get disabled(){return this._disabled}set disabled(t){const s=t??!1,e=this._disabled;e!==s&&(this._disabled=s,this.requestUpdate("disabled",e),this._settingDisabledFromParent||(this._disabledIsAuthorControlled=s))}get parentRequestDisabled(){return this._parentRequestDisabled}set parentRequestDisabled(t){const s=t??!1,e=this._parentRequestDisabled;e!==s&&(this._parentRequestDisabled=s,this.requestUpdate("parentRequestDisabled",e),this._disabledIsAuthorControlled||(this._settingDisabledFromParent=!0,this.disabled=s,this._settingDisabledFromParent=!1))}connectedCallback(){super.connectedCallback(),this.internals.role="radio",this._initialChecked||(this._initialChecked=this.checked??!1),this.addEventListener("keydown",this._handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown)}firstUpdated(t){super.firstUpdated(t),this._updateGroupValidation()}updated(t){super.updated(t),t.has("checked")&&(this.checked?(this._uncheckSiblings(),this.internals.setFormValue(this.value??null)):this.internals.setFormValue(null),this._updateGroupValidation()),t.has("required")&&this.control&&(this.control.required=this.required??!1),this._disabledIsAuthorControlled||this.disabled===this._parentRequestDisabled||(this._settingDisabledFromParent=!0,this.disabled=this._parentRequestDisabled??!1,this._settingDisabledFromParent=!1)}_getGroupRadios(){if(!this.name)return[this];const t=this.getRootNode();return Array.from(t.querySelectorAll(`sds-radio[name="${this.name}"]`))}_updateGroupValidation(){const t=this._getGroupRadios(),s=t.some((t=>t.checked)),e=t.some((t=>t.required));t.forEach((t=>{t.control&&(e?t.internals.setValidity(s?{}:{valueMissing:!0},s?"":t.control.validationMessage,t.control):t.internals.setValidity({}))}))}formResetCallback(){this.checked=this._initialChecked,this.control.checked=this._initialChecked,this.internals.setFormValue(this.checked?this.value??"on":null),this._updateGroupValidation()}_uncheckSiblings(){if(!this.name)return;const t=this._getGroupRadios();for(const s of t)s!==this&&s.checked&&(s.checked=!1,s.internals.setFormValue(null))}get form(){return this.internals.form}get type(){return"radio"}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}checkValidity(){return this.internals.checkValidity()}reportValidity(){return this.internals.reportValidity()}setCustomValidity(t){this.internals.setValidity({customError:!!t},t)}formDisabledCallback(t){this._settingDisabledFromParent=!0,this.disabled=t,this._settingDisabledFromParent=!1,this.control&&(this.control.disabled=t)}focus(){this.disabled||this.shadowRoot?.querySelector("input")?.focus()}blur(){this.disabled||this.shadowRoot?.querySelector("input")?.blur()}click(){this.disabled||this.readOnly||this.shadowRoot?.querySelector("input")?.click()}render(){const t={"sds-radio":!0,"sds-radio--error":Boolean(this.error)},s={"sds-radio__input":!0,"sds-radio__input--error":Boolean(this.error)};return j`
1759
+ <div class="${Ot(t)}">
3426
1760
  <input
3427
1761
  id="control"
3428
1762
  type="radio"
3429
- name="${o$1(this.name)}"
3430
- value="${o$1(this.value)}"
3431
- ?checked="${this.checked ?? false}"
3432
- .checked="${this.checked ?? false}"
3433
- ?disabled="${this.disabled ?? false}"
3434
- .disabled="${this.disabled ?? false}"
1763
+ name="${vt(this.name)}"
1764
+ value="${vt(this.value)}"
1765
+ ?checked="${this.checked??!1}"
1766
+ .checked="${this.checked??!1}"
1767
+ ?disabled="${this.disabled??!1}"
1768
+ .disabled="${this.disabled??!1}"
3435
1769
  ?required="${this.required}"
3436
1770
  ?readonly="${this.readOnly}"
3437
1771
  @change="${this._handleChange}"
3438
1772
  @focus="${this._handleFocus}"
3439
1773
  @blur="${this._handleBlur}"
3440
- class="${e2(inputClasses)}"
1774
+ class="${Ot(s)}"
3441
1775
  />
3442
- ${this.label ? x`<label class="sds-radio__label" for="control">${this.label}</label>` : E}
3443
- ${this.helpText ? x`<span class="sds-radio__help-text">${this.helpText}</span>` : E}
1776
+ ${this.label?j`<label class="sds-radio__label" for="control">${this.label}</label>`:U}
1777
+ ${this.helpText?j`<span class="sds-radio__help-text">${this.helpText}</span>`:U}
3444
1778
  </div>
3445
- `;
3446
- }
3447
- };
3448
- SDSRadio.styles = [styles$6];
3449
- SDSRadio.formAssociated = true;
3450
- __decorateClass$6([
3451
- n2({ type: Boolean, reflect: true })
3452
- ], SDSRadio.prototype, "required", 2);
3453
- __decorateClass$6([
3454
- n2({ type: String, reflect: true })
3455
- ], SDSRadio.prototype, "label", 2);
3456
- __decorateClass$6([
3457
- n2({ type: Boolean, reflect: true, attribute: "hide-label" })
3458
- ], SDSRadio.prototype, "hideLabel", 2);
3459
- __decorateClass$6([
3460
- n2({ type: String, reflect: true })
3461
- ], SDSRadio.prototype, "name", 2);
3462
- __decorateClass$6([
3463
- n2({ type: String })
3464
- ], SDSRadio.prototype, "value", 2);
3465
- __decorateClass$6([
3466
- n2({ type: Boolean, reflect: true })
3467
- ], SDSRadio.prototype, "checked", 2);
3468
- __decorateClass$6([
3469
- n2({ type: Boolean, reflect: true })
3470
- ], SDSRadio.prototype, "error", 2);
3471
- __decorateClass$6([
3472
- n2({ type: Boolean, attribute: "readonly", reflect: true })
3473
- ], SDSRadio.prototype, "readOnly", 2);
3474
- __decorateClass$6([
3475
- n2({ type: String, reflect: true })
3476
- ], SDSRadio.prototype, "size", 2);
3477
- __decorateClass$6([
3478
- n2({ type: String, attribute: "help-text" })
3479
- ], SDSRadio.prototype, "helpText", 2);
3480
- __decorateClass$6([
3481
- n2({ type: Boolean, reflect: true })
3482
- ], SDSRadio.prototype, "disabled", 1);
3483
- __decorateClass$6([
3484
- n2({ type: Boolean, attribute: false })
3485
- ], SDSRadio.prototype, "parentRequestDisabled", 1);
3486
- __decorateClass$6([
3487
- e$3("#control")
3488
- ], SDSRadio.prototype, "control", 2);
3489
- SDSRadio = __decorateClass$6([
3490
- guardedCustomElement("sds-radio")
3491
- ], SDSRadio);
3492
- const styles$5 = i$4`
1779
+ `}};Rs.styles=[Ps],Rs.formAssociated=!0,Vs([lt({type:Boolean,reflect:!0})],Rs.prototype,"required",2),Vs([lt({type:String,reflect:!0})],Rs.prototype,"label",2),Vs([lt({type:Boolean,reflect:!0,attribute:"hide-label"})],Rs.prototype,"hideLabel",2),Vs([lt({type:String,reflect:!0})],Rs.prototype,"name",2),Vs([lt({type:String})],Rs.prototype,"value",2),Vs([lt({type:Boolean,reflect:!0})],Rs.prototype,"checked",2),Vs([lt({type:Boolean,reflect:!0})],Rs.prototype,"error",2),Vs([lt({type:Boolean,attribute:"readonly",reflect:!0})],Rs.prototype,"readOnly",2),Vs([lt({type:String,reflect:!0})],Rs.prototype,"size",2),Vs([lt({type:String,attribute:"help-text"})],Rs.prototype,"helpText",2),Vs([lt({type:Boolean,reflect:!0})],Rs.prototype,"disabled",1),Vs([lt({type:Boolean,attribute:!1})],Rs.prototype,"parentRequestDisabled",1),Vs([ht("#control")],Rs.prototype,"control",2),Rs=Vs([pt("sds-radio")],Rs);const Ts=a`
3493
1780
  :host {
3494
1781
  --_sds-radio-group-gap: var(--sds-radio-group-gap, var(--sds-spacing-xs));
3495
1782
  --_sds-radio-group-row-gap: var(--sds-radio-group-row-gap, var(--sds-spacing-md));
3496
1783
  --_sds-radio-group-font-family: var(--sds-radio-group-font-family, var(--sds-typography-font-family-roboto));
3497
- --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-md));
1784
+ --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-content-md));
3498
1785
  --_sds-radio-group-text-color: var(--sds-radio-group-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
3499
1786
  --_sds-radio-group-max-line-width: var(--sds-radio-group-max-line-width, var(--sds-typography-max-line-width));
3500
1787
  --_sds-radio-group-disabled-opacity: var(--sds-radio-group-disabled-opacity, var(--sds-color-states-disabled-opacity));
@@ -3504,7 +1791,7 @@ const styles$5 = i$4`
3504
1791
  --_sds_radio-group-legend-help-text-gap: var(--sds-radio-group-legend-help-text-gap, var(--sds-spacing-4xs));
3505
1792
 
3506
1793
  --_sds-radio-group-help-text-color: var(--sds-radio-group-help-text-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
3507
- --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-md));
1794
+ --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-md));
3508
1795
  --_sds-radio-group-help-text-font-weight: var(--sds-radio-group-help-text-font-weight, var(--sds-typography-body-md-desktop-font-weight));
3509
1796
  --_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-md));
3510
1797
 
@@ -3575,158 +1862,30 @@ const styles$5 = i$4`
3575
1862
  }
3576
1863
 
3577
1864
  :host([size='sm']) {
3578
- --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-sm));
1865
+ --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-content-sm));
3579
1866
  --_sds-radio-group-legend-line-height: var(--sds-radio-group-legend-line-height, var(--sds-components-line-height-squeezed-sm));
3580
- --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-sm));
1867
+ --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-sm));
3581
1868
  --_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-sm));
3582
1869
  }
3583
1870
 
3584
1871
  :host([size='lg']) {
3585
- --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-lg));
1872
+ --_sds-radio-group-font-size: var(--sds-radio-group-font-size, var(--sds-components-font-size-content-lg));
3586
1873
  --_sds-radio-group-legend-line-height: var(--sds-radio-group-legend-line-height, var(--sds-components-line-height-squeezed-lg));
3587
- --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-lg));
1874
+ --_sds-radio-group-help-text-font-size: var(--sds-radio-group-help-text-font-size, var(--sds-components-font-size-content-lg));
3588
1875
  --_sds-radio-group-help-text-line-height: var(--sds-radio-group-help-text-line-height, var(--sds-components-line-height-squeezed-lg));
3589
1876
  }
3590
- `;
3591
- var __defProp$5 = Object.defineProperty;
3592
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
3593
- var __decorateClass$5 = (decorators, target, key, kind) => {
3594
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
3595
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
3596
- if (decorator = decorators[i3])
3597
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3598
- if (kind && result) __defProp$5(target, key, result);
3599
- return result;
3600
- };
3601
- const updatableRadioProps = ["disabled", "errorMessage", "readOnly", "required", "size"];
3602
- let SDSRadioGroup = class extends i$1 {
3603
- constructor() {
3604
- super(...arguments);
3605
- this.readOnly = false;
3606
- this.direction = "column";
3607
- this.disabled = false;
3608
- this.required = false;
3609
- this.size = "md";
3610
- this._selectedValue = null;
3611
- this._handleRadioChange = (event) => {
3612
- const target = event.composedPath().find((el) => el instanceof HTMLElement && el.tagName === "SDS-RADIO");
3613
- if (target) {
3614
- this._selectedValue = target.getAttribute("value") || null;
3615
- this.dispatchEvent(new CustomEvent("sds-update", { bubbles: true, composed: true }));
3616
- }
3617
- };
3618
- this._handleSlotChange = () => {
3619
- this._updateChildProps([...updatableRadioProps]);
3620
- };
3621
- }
3622
- _getChildRadios() {
3623
- return this._slotElement?.assignedElements({ flatten: true }).filter((element) => element.tagName === "SDS-RADIO") ?? [];
3624
- }
3625
- _updateChildProps(changedAttributes) {
3626
- const radios = this._getChildRadios();
3627
- for (const childRadio of radios) {
3628
- for (const attribute of changedAttributes) {
3629
- switch (attribute) {
3630
- case "readOnly":
3631
- childRadio.readOnly = this.readOnly;
3632
- break;
3633
- case "disabled":
3634
- childRadio.parentRequestDisabled = this.disabled;
3635
- break;
3636
- case "errorMessage":
3637
- childRadio.error = Boolean(this.errorMessage);
3638
- break;
3639
- case "required":
3640
- childRadio.required = this.required;
3641
- break;
3642
- case "size":
3643
- childRadio.size = this.size;
3644
- break;
3645
- }
3646
- }
3647
- }
3648
- }
3649
- updated(changedProps) {
3650
- super.updated(changedProps);
3651
- const changedKeys = Array.from(changedProps.keys());
3652
- if (changedKeys.includes("errorMessage") || changedKeys.includes("error-message")) {
3653
- this._updateChildProps(["errorMessage"]);
3654
- }
3655
- }
3656
- attributeChangedCallback(name, _old, value) {
3657
- super.attributeChangedCallback(name, _old, value);
3658
- if (name === "readonly") {
3659
- this._updateChildProps(["readOnly"]);
3660
- return;
3661
- }
3662
- const property2 = name;
3663
- if (updatableRadioProps.includes(property2)) {
3664
- this._updateChildProps([property2]);
3665
- }
3666
- }
3667
- render() {
3668
- const radioGroupClasses = {
3669
- "sds-radio-group": true,
3670
- "sds-radio-group--readonly": this.readOnly ?? false,
3671
- "sds-radio-group--disabled": this.disabled ?? false
3672
- };
3673
- const radioClasses = {
3674
- "sds-radio-group__radios": true,
3675
- "sds-radio-group--column": this.direction === "column",
3676
- "sds-radio-group--row": this.direction === "row"
3677
- };
3678
- return x`
3679
- <fieldset class="${e2(radioGroupClasses)}">
3680
- ${this.legend ? x`<legend class="sds-radio-group__legend">${this.readOnly ? x`<sds-icon name="lock-material-filled" size="md"></sds-icon>` : E}${this.legend}</legend>` : E}
3681
- ${this.helpText ? x`<p class="sds-radio-group__help-text">${this.helpText}</p>` : E}
3682
- <div class="${e2(radioClasses)}" @change=${this._handleRadioChange}>
1877
+ `;var Ls=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Is=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Bs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Ls(s,e,a),a};const js=["disabled","errorMessage","readOnly","required","size"];let Ns=class extends at{constructor(){super(...arguments),this.readOnly=!1,this.direction="column",this.disabled=!1,this.required=!1,this.size="md",this._selectedValue=null,this._handleRadioChange=t=>{const s=t.composedPath().find((t=>t instanceof HTMLElement&&"SDS-RADIO"===t.tagName));s&&(this._selectedValue=s.getAttribute("value")||null,this.dispatchEvent(new CustomEvent("sds-update",{bubbles:!0,composed:!0})))},this._handleSlotChange=()=>{this._updateChildProps([...js])}}_getChildRadios(){return this._slotElement?.assignedElements({flatten:!0}).filter((t=>"SDS-RADIO"===t.tagName))??[]}_updateChildProps(t){const s=this._getChildRadios();for(const e of s)for(const s of t)switch(s){case"readOnly":e.readOnly=this.readOnly;break;case"disabled":e.parentRequestDisabled=this.disabled;break;case"errorMessage":e.error=Boolean(this.errorMessage);break;case"required":e.required=this.required;break;case"size":e.size=this.size}}updated(t){super.updated(t);const s=Array.from(t.keys());(s.includes("errorMessage")||s.includes("error-message"))&&this._updateChildProps(["errorMessage"])}attributeChangedCallback(t,s,e){if(super.attributeChangedCallback(t,s,e),"readonly"===t)return void this._updateChildProps(["readOnly"]);const o=t;js.includes(o)&&this._updateChildProps([o])}render(){const t={"sds-radio-group":!0,"sds-radio-group--readonly":this.readOnly??!1,"sds-radio-group--disabled":this.disabled??!1},s={"sds-radio-group__radios":!0,"sds-radio-group--column":"column"===this.direction,"sds-radio-group--row":"row"===this.direction};return j`
1878
+ <fieldset class="${Ot(t)}">
1879
+ ${this.legend?j`<legend class="sds-radio-group__legend">${this.readOnly?j`<sds-icon name="lock-material-filled" size="md"></sds-icon>`:U}${this.legend}</legend>`:U}
1880
+ ${this.helpText?j`<p class="sds-radio-group__help-text">${this.helpText}</p>`:U}
1881
+ <div class="${Ot(s)}" @change=${this._handleRadioChange}>
3683
1882
  <slot @slotchange=${this._handleSlotChange}></slot>
3684
1883
  </div>
3685
- ${this.errorMessage ? x`<sds-alert variant="secondary" data-palette="danger">
1884
+ ${this.errorMessage?j`<sds-alert variant="secondary" data-palette="danger">
3686
1885
  <p slot="message">${this.errorMessage}</p>
3687
- </sds-alert>` : E}
1886
+ </sds-alert>`:U}
3688
1887
  </fieldset>
3689
- `;
3690
- }
3691
- get value() {
3692
- return { selectedValue: this._selectedValue };
3693
- }
3694
- };
3695
- SDSRadioGroup.styles = [styles$5];
3696
- __decorateClass$5([
3697
- n2({ type: String })
3698
- ], SDSRadioGroup.prototype, "legend", 2);
3699
- __decorateClass$5([
3700
- n2({ type: String, attribute: "help-text" })
3701
- ], SDSRadioGroup.prototype, "helpText", 2);
3702
- __decorateClass$5([
3703
- n2({ type: String, attribute: "error-message" })
3704
- ], SDSRadioGroup.prototype, "errorMessage", 2);
3705
- __decorateClass$5([
3706
- n2({ type: Boolean, attribute: "readonly", reflect: true })
3707
- ], SDSRadioGroup.prototype, "readOnly", 2);
3708
- __decorateClass$5([
3709
- n2({ type: String })
3710
- ], SDSRadioGroup.prototype, "direction", 2);
3711
- __decorateClass$5([
3712
- n2({ type: Boolean, reflect: true })
3713
- ], SDSRadioGroup.prototype, "disabled", 2);
3714
- __decorateClass$5([
3715
- n2({ type: Boolean, reflect: true })
3716
- ], SDSRadioGroup.prototype, "required", 2);
3717
- __decorateClass$5([
3718
- n2({ type: String, reflect: true })
3719
- ], SDSRadioGroup.prototype, "size", 2);
3720
- __decorateClass$5([
3721
- r()
3722
- ], SDSRadioGroup.prototype, "_selectedValue", 2);
3723
- __decorateClass$5([
3724
- e$3("slot")
3725
- ], SDSRadioGroup.prototype, "_slotElement", 2);
3726
- SDSRadioGroup = __decorateClass$5([
3727
- guardedCustomElement("sds-radio-group")
3728
- ], SDSRadioGroup);
3729
- const styles$4 = i$4`
1888
+ `}get value(){return{selectedValue:this._selectedValue}}};Ns.styles=[Ts],Is([lt({type:String})],Ns.prototype,"legend",2),Is([lt({type:String,attribute:"help-text"})],Ns.prototype,"helpText",2),Is([lt({type:String,attribute:"error-message"})],Ns.prototype,"errorMessage",2),Is([lt({type:Boolean,attribute:"readonly",reflect:!0})],Ns.prototype,"readOnly",2),Is([lt({type:String})],Ns.prototype,"direction",2),Is([lt({type:Boolean,reflect:!0})],Ns.prototype,"disabled",2),Is([lt({type:Boolean,reflect:!0})],Ns.prototype,"required",2),Is([lt({type:String,reflect:!0})],Ns.prototype,"size",2),Is([ct()],Ns.prototype,"_selectedValue",2),Is([ht("slot")],Ns.prototype,"_slotElement",2),Ns=Is([pt("sds-radio-group")],Ns);const Us=a`
3730
1889
  :host {
3731
1890
  --_sds-switch-background-color: var(--sds-switch-background-color, var(--sds-color-surface-default, var(--sds-color-neutral-surface-default)));
3732
1891
  --_sds-switch-text-color: var(--sds-switch-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
@@ -3738,9 +1897,9 @@ const styles$4 = i$4`
3738
1897
  --_sds-switch-border-radius: var(--sds-switch-border-radius, var(--sds-radius-full));
3739
1898
 
3740
1899
  --_sds-switch-font-family: var(--sds-switch-font-family, var(--sds-typography-font-family-roboto));
3741
- --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-md));
1900
+ --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-content-md));
3742
1901
  --_sds-switch-font-weight: var(--sds-switch-font-weight, var(--sds-typography-font-weight-regular));
3743
- --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-squeezed-md));
1902
+ --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-tall-content-md));
3744
1903
 
3745
1904
  --_sds-switch-gap: var(--sds-switch-gap, var(--sds-spacing-3xs));
3746
1905
  --_sds-switch-icon-gap: var(--sds-switch-icon-gap, var(--sds-spacing-4xs));
@@ -3785,8 +1944,8 @@ const styles$4 = i$4`
3785
1944
  --_sds-switch-width: var(--sds-switch-width, var(--sds-components-switch-length-sm));
3786
1945
  --_sds-switch-height: var(--sds-switch-height, var(--sds-components-icon-sm));
3787
1946
  --_sds-switch-button-size: var(--sds-switch-button-size, var(--sds-components-switch-bulleye-sm));
3788
- --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-sm));
3789
- --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-squeezed-sm));
1947
+ --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-content-sm));
1948
+ --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-tall-content-sm));
3790
1949
  }
3791
1950
 
3792
1951
  :host([size='l']),
@@ -3794,8 +1953,8 @@ const styles$4 = i$4`
3794
1953
  --_sds-switch-width: var(--sds-switch-width, var(--sds-components-switch-length-lg));
3795
1954
  --_sds-switch-height: var(--sds-switch-height, var(--sds-components-icon-lg));
3796
1955
  --_sds-switch-button-size: var(--sds-switch-button-size, var(--sds-components-switch-bulleye-lg));
3797
- --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-lg));
3798
- --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-squeezed-lg));
1956
+ --_sds-switch-font-size: var(--sds-switch-font-size, var(--sds-components-font-size-content-lg));
1957
+ --_sds-switch-line-height: var(--sds-switch-line-height, var(--sds-components-line-height-tall-content-lg));
3799
1958
  }
3800
1959
 
3801
1960
  .sds-switch {
@@ -3876,110 +2035,7 @@ const styles$4 = i$4`
3876
2035
  .sds-switch__input:checked::before {
3877
2036
  --_sds-switch-button-position: calc(var(--_sds-switch-width) - var(--_sds-switch-button-size) - var(--_sds-switch-button-gap) - var(--_sds-switch-border-width));
3878
2037
  }
3879
- `;
3880
- var __defProp$4 = Object.defineProperty;
3881
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
3882
- var __decorateClass$4 = (decorators, target, key, kind) => {
3883
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
3884
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
3885
- if (decorator = decorators[i3])
3886
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3887
- if (kind && result) __defProp$4(target, key, result);
3888
- return result;
3889
- };
3890
- let SDSSwitch = class extends i$1 {
3891
- constructor() {
3892
- super();
3893
- this.disabled = false;
3894
- this.label = "";
3895
- this.hideLabel = false;
3896
- this.reverse = false;
3897
- this.checked = false;
3898
- this.readOnly = false;
3899
- this.size = "md";
3900
- this._initialChecked = false;
3901
- this._handleChange = (event) => {
3902
- event.stopImmediatePropagation();
3903
- if (!this.disabled && !this.disabled) {
3904
- const elem = event.target;
3905
- this.checked = elem.checked;
3906
- this.internals.setFormValue(this.checked ? "on" : "off");
3907
- this.dispatchEvent(
3908
- new CustomEvent("change", {
3909
- bubbles: true,
3910
- composed: true
3911
- })
3912
- );
3913
- }
3914
- };
3915
- this._handleFocus = (event) => {
3916
- event.stopImmediatePropagation();
3917
- if (!this.disabled && !this.disabled) {
3918
- this.dispatchEvent(
3919
- new CustomEvent("focus", {
3920
- bubbles: true,
3921
- composed: true
3922
- })
3923
- );
3924
- }
3925
- };
3926
- this._handleBlur = (event) => {
3927
- event.stopImmediatePropagation();
3928
- if (!this.disabled && !this.disabled) {
3929
- this.dispatchEvent(
3930
- new CustomEvent("blur", {
3931
- bubbles: true,
3932
- composed: true
3933
- })
3934
- );
3935
- }
3936
- };
3937
- this.getIconSize = () => {
3938
- switch (this.size) {
3939
- case "sm":
3940
- case "md":
3941
- case "lg":
3942
- return this.size;
3943
- case "l":
3944
- return "lg";
3945
- case "s":
3946
- return "sm";
3947
- }
3948
- };
3949
- this.internals = this.attachInternals();
3950
- this.attachShadow({ mode: "open", delegatesFocus: true });
3951
- }
3952
- connectedCallback() {
3953
- super.connectedCallback();
3954
- this._initialChecked = this.checked;
3955
- this.internals.setFormValue(this.checked ? "on" : "off");
3956
- }
3957
- updated(changedProperties) {
3958
- if (changedProperties.has("checked")) {
3959
- this.control.checked = this.checked;
3960
- this.internals.setFormValue(this.checked ? "on" : "off");
3961
- }
3962
- }
3963
- formResetCallback() {
3964
- this.checked = this._initialChecked;
3965
- this.control.checked = this._initialChecked;
3966
- this.internals.setFormValue(this._initialChecked ? "on" : "off");
3967
- }
3968
- formStateRestoreCallback(state) {
3969
- this.checked = state;
3970
- }
3971
- get value() {
3972
- return this.checked ? "on" : "off";
3973
- }
3974
- render() {
3975
- const switchClasses = {
3976
- "sds-switch": true
3977
- };
3978
- const labelClasses = {
3979
- "sds-switch__label": true,
3980
- "sds-switch__label--hidden": this.hideLabel
3981
- };
3982
- const inputTemplate = x`<input
2038
+ `;var Fs=Object.defineProperty,Hs=Object.getOwnPropertyDescriptor,Gs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Hs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Fs(s,e,a),a};let Ks=class extends at{constructor(){super(),this.disabled=!1,this.label="",this.hideLabel=!1,this.reverse=!1,this.checked=!1,this.readOnly=!1,this.size="md",this._initialChecked=!1,this._handleChange=t=>{if(t.stopImmediatePropagation(),!this.disabled){const s=t.target;this.checked=s.checked,this.internals.setFormValue(this.checked?"on":"off"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0}))}},this._handleFocus=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))},this._handleBlur=t=>{t.stopImmediatePropagation(),this.disabled||this.disabled||this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))},this.getIconSize=()=>{switch(this.size){case"sm":case"md":case"lg":return this.size;case"l":return"lg";case"s":return"sm"}},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}connectedCallback(){super.connectedCallback(),this._initialChecked=this.checked,this.internals.setFormValue(this.checked?"on":"off")}updated(t){t.has("checked")&&(this.control.checked=this.checked,this.internals.setFormValue(this.checked?"on":"off"))}formResetCallback(){this.checked=this._initialChecked,this.control.checked=this._initialChecked,this.internals.setFormValue(this._initialChecked?"on":"off")}formStateRestoreCallback(t){this.checked=t}get value(){return this.checked?"on":"off"}render(){const t={"sds-switch__label":!0,"sds-switch__label--hidden":this.hideLabel},s=j`<input
3983
2039
  class="sds-switch__input"
3984
2040
  id="control"
3985
2041
  type="checkbox"
@@ -3988,49 +2044,11 @@ let SDSSwitch = class extends i$1 {
3988
2044
  ?disabled="${this.disabled}"
3989
2045
  .checked="${this.checked}"
3990
2046
  ?checked="${this.checked}"
3991
- name="${o$1(this.name)}"
2047
+ name="${vt(this.name)}"
3992
2048
  @change="${this._handleChange}"
3993
2049
  @focus="${this._handleFocus}"
3994
2050
  @blur="${this._handleBlur}"
3995
- />`;
3996
- const iconTemplate = this.readOnly ? x`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>` : E;
3997
- const labelTemplate = x`<label class="${e2(labelClasses)}" for="control">${iconTemplate}${this.label}</label>`;
3998
- return x`<div class="${e2(switchClasses)}">${this.reverse ? [labelTemplate, inputTemplate] : [inputTemplate, labelTemplate]}</div>`;
3999
- }
4000
- };
4001
- SDSSwitch.styles = [styles$4];
4002
- SDSSwitch.formAssociated = true;
4003
- __decorateClass$4([
4004
- n2({ type: Boolean, reflect: true })
4005
- ], SDSSwitch.prototype, "disabled", 2);
4006
- __decorateClass$4([
4007
- n2({ type: String, reflect: true })
4008
- ], SDSSwitch.prototype, "label", 2);
4009
- __decorateClass$4([
4010
- n2({ type: Boolean, reflect: true, attribute: "hide-label" })
4011
- ], SDSSwitch.prototype, "hideLabel", 2);
4012
- __decorateClass$4([
4013
- n2({ type: String, reflect: true })
4014
- ], SDSSwitch.prototype, "name", 2);
4015
- __decorateClass$4([
4016
- n2({ type: Boolean, reflect: true })
4017
- ], SDSSwitch.prototype, "reverse", 2);
4018
- __decorateClass$4([
4019
- n2({ type: Boolean, reflect: true })
4020
- ], SDSSwitch.prototype, "checked", 2);
4021
- __decorateClass$4([
4022
- n2({ type: Boolean, attribute: "readonly", reflect: true })
4023
- ], SDSSwitch.prototype, "readOnly", 2);
4024
- __decorateClass$4([
4025
- n2({ type: String, reflect: true })
4026
- ], SDSSwitch.prototype, "size", 2);
4027
- __decorateClass$4([
4028
- e$3("#control")
4029
- ], SDSSwitch.prototype, "control", 2);
4030
- SDSSwitch = __decorateClass$4([
4031
- guardedCustomElement("sds-switch")
4032
- ], SDSSwitch);
4033
- const styles$3 = i$4`
2051
+ />`,e=this.readOnly?j`<sds-icon name="lock-material-filled" size="${this.getIconSize()}"></sds-icon>`:U,o=j`<label class="${Ot(t)}" for="control">${e}${this.label}</label>`;return j`<div class="${Ot({"sds-switch":!0})}">${this.reverse?[o,s]:[s,o]}</div>`}};Ks.styles=[Us],Ks.formAssociated=!0,Gs([lt({type:Boolean,reflect:!0})],Ks.prototype,"disabled",2),Gs([lt({type:String,reflect:!0})],Ks.prototype,"label",2),Gs([lt({type:Boolean,reflect:!0,attribute:"hide-label"})],Ks.prototype,"hideLabel",2),Gs([lt({type:String,reflect:!0})],Ks.prototype,"name",2),Gs([lt({type:Boolean,reflect:!0})],Ks.prototype,"reverse",2),Gs([lt({type:Boolean,reflect:!0})],Ks.prototype,"checked",2),Gs([lt({type:Boolean,attribute:"readonly",reflect:!0})],Ks.prototype,"readOnly",2),Gs([lt({type:String,reflect:!0})],Ks.prototype,"size",2),Gs([ht("#control")],Ks.prototype,"control",2),Ks=Gs([pt("sds-switch")],Ks);const Ws=a`
4034
2052
  :host {
4035
2053
  --_sds-tag-background-color: var(--sds-tag-background-color, var(--sds-color-surface-tinted, var(--sds-color-neutral-surface-tinted)));
4036
2054
  --_sds-tag-text-color: var(--sds-tag-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
@@ -4091,45 +2109,15 @@ const styles$3 = i$4`
4091
2109
  --_sds-tag-font-size: var(--sds-tag-font-size, var(--sds-components-font-size-content-lg));
4092
2110
  --_sds-tag-line-height: var(--sds-tag-line-height, var(--sds-components-line-height-squeezed-lg));
4093
2111
  }
4094
- `;
4095
- var __defProp$3 = Object.defineProperty;
4096
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
4097
- var __decorateClass$3 = (decorators, target, key, kind) => {
4098
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
4099
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
4100
- if (decorator = decorators[i3])
4101
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4102
- if (kind && result) __defProp$3(target, key, result);
4103
- return result;
4104
- };
4105
- let SDSTag = class extends i$1 {
4106
- constructor() {
4107
- super(...arguments);
4108
- this.size = "md";
4109
- }
4110
- render() {
4111
- const tagClasses = {
4112
- "sds-tag": true
4113
- };
4114
- return x`<span class="${e2(tagClasses)}">
2112
+ `;var Zs=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,Xs=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?Qs(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&Zs(s,e,a),a};let Ys=class extends at{constructor(){super(...arguments),this.size="md"}render(){return j`<span class="${Ot({"sds-tag":!0})}">
4115
2113
  <slot></slot>
4116
- </span>`;
4117
- }
4118
- };
4119
- SDSTag.styles = [styles$3];
4120
- __decorateClass$3([
4121
- n2({ type: String, reflect: true })
4122
- ], SDSTag.prototype, "size", 2);
4123
- SDSTag = __decorateClass$3([
4124
- guardedCustomElement("sds-tag")
4125
- ], SDSTag);
4126
- const styles$2 = i$4`
2114
+ </span>`}};Ys.styles=[Ws],Xs([lt({type:String,reflect:!0})],Ys.prototype,"size",2),Ys=Xs([pt("sds-tag")],Ys);const Js=a`
4127
2115
  :host {
4128
2116
  --_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));
4129
2117
  --_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
4130
2118
  --_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));
4131
2119
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));
4132
- --_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));
2120
+ --_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
4133
2121
 
4134
2122
  display: block;
4135
2123
  box-sizing: border-box;
@@ -4147,7 +2135,7 @@ const styles$2 = i$4`
4147
2135
  }
4148
2136
 
4149
2137
  :host([data-palette]) {
4150
- --_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));
2138
+ --_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
4151
2139
  }
4152
2140
 
4153
2141
  /* Mobile */
@@ -4398,42 +2386,7 @@ const styles$2 = i$4`
4398
2386
  --_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));
4399
2387
  }
4400
2388
  }
4401
- `;
4402
- var __defProp$2 = Object.defineProperty;
4403
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
4404
- var __decorateClass$2 = (decorators, target, key, kind) => {
4405
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
4406
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
4407
- if (decorator = decorators[i3])
4408
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4409
- if (kind && result) __defProp$2(target, key, result);
4410
- return result;
4411
- };
4412
- let SDSText = class extends i$1 {
4413
- constructor() {
4414
- super(...arguments);
4415
- this.size = "md";
4416
- this.strong = false;
4417
- this.tall = false;
4418
- }
4419
- render() {
4420
- return x`<p><slot></slot></p>`;
4421
- }
4422
- };
4423
- SDSText.styles = [styles$2];
4424
- __decorateClass$2([
4425
- n2({ type: String, reflect: true })
4426
- ], SDSText.prototype, "size", 2);
4427
- __decorateClass$2([
4428
- n2({ type: Boolean, reflect: true })
4429
- ], SDSText.prototype, "strong", 2);
4430
- __decorateClass$2([
4431
- n2({ type: Boolean, reflect: true })
4432
- ], SDSText.prototype, "tall", 2);
4433
- SDSText = __decorateClass$2([
4434
- guardedCustomElement("sds-text")
4435
- ], SDSText);
4436
- const styles$1 = i$4`
2389
+ `;var te=Object.defineProperty,se=Object.getOwnPropertyDescriptor,ee=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?se(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&te(s,e,a),a};let oe=class extends at{constructor(){super(...arguments),this.size="md",this.strong=!1,this.tall=!1}render(){return j`<p><slot></slot></p>`}};oe.styles=[Js],ee([lt({type:String,reflect:!0})],oe.prototype,"size",2),ee([lt({type:Boolean,reflect:!0})],oe.prototype,"strong",2),ee([lt({type:Boolean,reflect:!0})],oe.prototype,"tall",2),oe=ee([pt("sds-text")],oe);const re=a`
4437
2390
  :host {
4438
2391
  --_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
4439
2392
  --_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
@@ -4599,156 +2552,26 @@ const styles$1 = i$4`
4599
2552
  --sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));
4600
2553
  }
4601
2554
  }
4602
- `;
4603
- var __defProp$1 = Object.defineProperty;
4604
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
4605
- var __decorateClass$1 = (decorators, target, key, kind) => {
4606
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
4607
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
4608
- if (decorator = decorators[i3])
4609
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
4610
- if (kind && result) __defProp$1(target, key, result);
4611
- return result;
4612
- };
4613
- let SDSTextField = class extends i$1 {
4614
- constructor() {
4615
- super();
4616
- this.type = "text";
4617
- this.disabled = false;
4618
- this.readOnly = false;
4619
- this.required = false;
4620
- this.size = "md";
4621
- this.hasIcon = false;
4622
- this._defaultValue = "";
4623
- this.handleSlotChange = (e3) => {
4624
- const slot = e3.target;
4625
- this.hasIcon = slot.assignedNodes({ flatten: true }).length > 0;
4626
- };
4627
- this._handleInputChange = (event) => {
4628
- event.stopImmediatePropagation();
4629
- if (!this.disabled) {
4630
- const currentValue = event.target.value;
4631
- this.value = currentValue;
4632
- this.internals.setFormValue(currentValue === "" ? null : currentValue);
4633
- this.updateValidity();
4634
- this.dispatchEvent(new CustomEvent(event.type, { bubbles: true, composed: true }));
4635
- }
4636
- };
4637
- this._handleSelect = (event) => {
4638
- event.stopImmediatePropagation();
4639
- if (!this.disabled) {
4640
- this.dispatchEvent(new CustomEvent("select", { bubbles: true, composed: true }));
4641
- }
4642
- };
4643
- this._handleFocus = (event) => {
4644
- event.stopImmediatePropagation();
4645
- this.dispatchEvent(new CustomEvent("focus", { bubbles: true, composed: true }));
4646
- };
4647
- this._handleBlur = (event) => {
4648
- event.stopImmediatePropagation();
4649
- this.updateValidity();
4650
- this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
4651
- };
4652
- this._handleKeyDown = (event) => {
4653
- if (event.key !== "Enter") {
4654
- return;
4655
- }
4656
- event.stopImmediatePropagation();
4657
- const form = this.internals?.form;
4658
- if (form?.requestSubmit) {
4659
- form.requestSubmit();
4660
- } else {
4661
- form?.submit();
4662
- }
4663
- };
4664
- this.internals = this.attachInternals();
4665
- this.attachShadow({ mode: "open", delegatesFocus: true });
4666
- }
4667
- connectedCallback() {
4668
- super.connectedCallback();
4669
- this._defaultValue = this.value ?? "";
4670
- }
4671
- updateValidity() {
4672
- if (this.control.checkValidity()) {
4673
- this.internals.setValidity({});
4674
- } else {
4675
- this.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);
4676
- }
4677
- }
4678
- formResetCallback() {
4679
- this.control.value = this._defaultValue;
4680
- this.internals.setFormValue(this._defaultValue === "" ? null : this._defaultValue);
4681
- this.value = this._defaultValue;
4682
- this.updateValidity();
4683
- }
4684
- select() {
4685
- if (!this.disabled) this.control.select();
4686
- }
4687
- focus() {
4688
- if (!this.disabled) this.control.focus();
4689
- }
4690
- blur() {
4691
- if (!this.disabled) this.control.blur();
4692
- }
4693
- click() {
4694
- if (!this.disabled) this.control.click();
4695
- }
4696
- get selectionStart() {
4697
- return this.control ? this.control.selectionStart : null;
4698
- }
4699
- set selectionStart(value) {
4700
- if (this.control && value !== null) {
4701
- this.control.selectionStart = value;
4702
- }
4703
- }
4704
- get selectionEnd() {
4705
- return this.control ? this.control.selectionEnd : null;
4706
- }
4707
- set selectionEnd(value) {
4708
- if (this.control && value !== null) {
4709
- this.control.selectionEnd = value;
4710
- }
4711
- }
4712
- setSelectionRange(start, end, direction) {
4713
- if (this.control) {
4714
- this.control.setSelectionRange(start, end, direction);
4715
- }
4716
- }
4717
- checkValidity() {
4718
- return this.control.checkValidity();
4719
- }
4720
- reportValidity() {
4721
- return this.control.reportValidity();
4722
- }
4723
- setCustomValidity(message) {
4724
- this.control.setCustomValidity(message);
4725
- this.updateValidity();
4726
- }
4727
- render() {
4728
- const textfieldClasses = {
4729
- "sds-textfield": true,
4730
- "sds-textfield--error": Boolean(this.errorMessage),
4731
- "sds-textfield--has-icon": this.hasIcon
4732
- };
4733
- return x`
4734
- <div class="${e2(textfieldClasses)}">
4735
- ${this.label ? x`<label for="sds-textfield" class="sds-textfield__label">${this.readOnly ? x`<sds-icon name="lock-material-filled" size="m"></sds-icon>` : E}</sds-icon>${this.label}</label>` : E}
4736
- ${this.helpText ? x`<p class="sds-textfield__help-text">${this.helpText}</p>` : E}
2555
+ `;var ae=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,de=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?ie(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ae(s,e,a),a};let ne=class extends at{constructor(){super(),this.type="text",this.disabled=!1,this.readOnly=!1,this.required=!1,this.size="md",this.hasIcon=!1,this._defaultValue=null,this.handleSlotChange=t=>{const s=t.target;this.hasIcon=s.assignedNodes({flatten:!0}).length>0},this._handleInputChange=t=>{t.stopImmediatePropagation(),!this.disabled&&t.target instanceof HTMLInputElement&&(this.value=t.target.value,this.internals.setFormValue(""===this.value?null:this.value),this.updateValidity(),this.dispatchEvent(new CustomEvent(t.type,{bubbles:!0,composed:!0})))},this._handleSelect=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchEvent(new CustomEvent("select",{bubbles:!0,composed:!0}))},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))},this._handleBlur=t=>{t.stopImmediatePropagation(),this.updateValidity(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))},this._handleKeyDown=t=>{if("Enter"!==t.key)return;t.stopImmediatePropagation();const s=this.internals?.form;s?.requestSubmit?s.requestSubmit():s?.submit()},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}connectedCallback(){super.connectedCallback(),this._defaultValue=this.value??null,this.internals.setFormValue(this._defaultValue)}updateValidity(){this.control.checkValidity()?this.internals.setValidity({}):this.internals.setValidity({customError:!0},this.control.validationMessage,this.control)}formResetCallback(){this.internals.setFormValue(this._defaultValue);const t=this._defaultValue??"";this.control.value=t,this.value=t,this.updateValidity()}select(){this.disabled||this.control.select()}focus(){this.disabled||this.control.focus()}blur(){this.disabled||this.control.blur()}click(){this.disabled||this.control.click()}get selectionStart(){return this.control?this.control.selectionStart:null}set selectionStart(t){this.control&&null!==t&&(this.control.selectionStart=t)}get selectionEnd(){return this.control?this.control.selectionEnd:null}set selectionEnd(t){this.control&&null!==t&&(this.control.selectionEnd=t)}setSelectionRange(t,s,e){this.control&&this.control.setSelectionRange(t,s,e)}checkValidity(){return this.control.checkValidity()}reportValidity(){return this.control.reportValidity()}setCustomValidity(t){this.control.setCustomValidity(t),this.updateValidity()}render(){const t={"sds-textfield":!0,"sds-textfield--error":Boolean(this.errorMessage),"sds-textfield--has-icon":this.hasIcon};return j`
2556
+ <div class="${Ot(t)}">
2557
+ ${this.label?j`<label for="sds-textfield" class="sds-textfield__label">${this.readOnly?j`<sds-icon name="lock-material-filled" size="m"></sds-icon>`:U}</sds-icon>${this.label}</label>`:U}
2558
+ ${this.helpText?j`<p class="sds-textfield__help-text">${this.helpText}</p>`:U}
4737
2559
  <div class="sds-textfield__input-container">
4738
2560
  <input
2561
+ part="input"
4739
2562
  class="sds-textfield__input"
4740
- type="${o$1(this.type)}"
2563
+ type="${vt(this.type)}"
4741
2564
  id="sds-textfield"
4742
2565
  ?disabled="${this.disabled}"
4743
2566
  ?readonly="${this.readOnly}"
4744
- placeholder="${o$1(this.placeholder)}"
4745
- .value="${this.value ?? ""}"
4746
- name="${o$1(this.name)}"
4747
- autocomplete="${o$1(this.autocomplete)}"
2567
+ placeholder="${vt(this.placeholder)}"
2568
+ .value="${this.value??""}"
2569
+ name="${vt(this.name)}"
2570
+ autocomplete="${vt(this.autocomplete)}"
4748
2571
  ?required="${this.required}"
4749
- pattern="${o$1(this.pattern)}"
4750
- minlength="${o$1(this.minlength)}"
4751
- maxlength="${o$1(this.maxlength)}"
2572
+ pattern="${vt(this.pattern)}"
2573
+ minlength="${vt(this.minlength)}"
2574
+ maxlength="${vt(this.maxlength)}"
4752
2575
  @input="${this._handleInputChange}"
4753
2576
  @change="${this._handleInputChange}"
4754
2577
  @select="${this._handleSelect}"
@@ -4758,68 +2581,9 @@ let SDSTextField = class extends i$1 {
4758
2581
  />
4759
2582
  <slot name="after" @slotchange="${this.handleSlotChange}" aria-hidden="true"></slot>
4760
2583
  </div>
4761
- ${this.errorMessage ? x`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>` : E}
2584
+ ${this.errorMessage?j`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:U}
4762
2585
  </div>
4763
- `;
4764
- }
4765
- };
4766
- SDSTextField.styles = [styles$1];
4767
- SDSTextField.formAssociated = true;
4768
- __decorateClass$1([
4769
- n2({ type: String, reflect: true })
4770
- ], SDSTextField.prototype, "type", 2);
4771
- __decorateClass$1([
4772
- n2({ type: String })
4773
- ], SDSTextField.prototype, "value", 2);
4774
- __decorateClass$1([
4775
- n2({ type: String, reflect: true })
4776
- ], SDSTextField.prototype, "name", 2);
4777
- __decorateClass$1([
4778
- n2({ type: String, reflect: true })
4779
- ], SDSTextField.prototype, "label", 2);
4780
- __decorateClass$1([
4781
- n2({ type: String, reflect: true })
4782
- ], SDSTextField.prototype, "placeholder", 2);
4783
- __decorateClass$1([
4784
- n2({ type: String, attribute: "help-text", reflect: true })
4785
- ], SDSTextField.prototype, "helpText", 2);
4786
- __decorateClass$1([
4787
- n2({ type: String, attribute: "error-message", reflect: true })
4788
- ], SDSTextField.prototype, "errorMessage", 2);
4789
- __decorateClass$1([
4790
- n2({ type: Boolean, reflect: true })
4791
- ], SDSTextField.prototype, "disabled", 2);
4792
- __decorateClass$1([
4793
- n2({ type: Boolean, attribute: "readonly", reflect: true })
4794
- ], SDSTextField.prototype, "readOnly", 2);
4795
- __decorateClass$1([
4796
- n2({ type: String, reflect: true })
4797
- ], SDSTextField.prototype, "autocomplete", 2);
4798
- __decorateClass$1([
4799
- n2({ type: Boolean, reflect: true })
4800
- ], SDSTextField.prototype, "required", 2);
4801
- __decorateClass$1([
4802
- n2({ type: String, reflect: true })
4803
- ], SDSTextField.prototype, "pattern", 2);
4804
- __decorateClass$1([
4805
- n2({ type: Number, reflect: true })
4806
- ], SDSTextField.prototype, "minlength", 2);
4807
- __decorateClass$1([
4808
- n2({ type: Number, reflect: true })
4809
- ], SDSTextField.prototype, "maxlength", 2);
4810
- __decorateClass$1([
4811
- n2({ type: String, reflect: true })
4812
- ], SDSTextField.prototype, "size", 2);
4813
- __decorateClass$1([
4814
- r()
4815
- ], SDSTextField.prototype, "hasIcon", 2);
4816
- __decorateClass$1([
4817
- e$3("#sds-textfield")
4818
- ], SDSTextField.prototype, "control", 2);
4819
- SDSTextField = __decorateClass$1([
4820
- guardedCustomElement("sds-textfield")
4821
- ], SDSTextField);
4822
- const styles = i$4`
2586
+ `}};ne.styles=[re],ne.formAssociated=!0,de([lt({type:String,reflect:!0})],ne.prototype,"type",2),de([lt({type:String})],ne.prototype,"value",2),de([lt({type:String,reflect:!0})],ne.prototype,"name",2),de([lt({type:String,reflect:!0})],ne.prototype,"label",2),de([lt({type:String,reflect:!0})],ne.prototype,"placeholder",2),de([lt({type:String,attribute:"help-text",reflect:!0})],ne.prototype,"helpText",2),de([lt({type:String,attribute:"error-message",reflect:!0})],ne.prototype,"errorMessage",2),de([lt({type:Boolean,reflect:!0})],ne.prototype,"disabled",2),de([lt({type:Boolean,attribute:"readonly",reflect:!0})],ne.prototype,"readOnly",2),de([lt({type:String,reflect:!0})],ne.prototype,"autocomplete",2),de([lt({type:Boolean,reflect:!0})],ne.prototype,"required",2),de([lt({type:String,reflect:!0})],ne.prototype,"pattern",2),de([lt({type:Number,reflect:!0})],ne.prototype,"minlength",2),de([lt({type:Number,reflect:!0})],ne.prototype,"maxlength",2),de([lt({type:String,reflect:!0})],ne.prototype,"size",2),de([ct()],ne.prototype,"hasIcon",2),de([ht("#sds-textfield")],ne.prototype,"control",2),ne=de([pt("sds-textfield")],ne);const le=a`
4823
2587
  :host {
4824
2588
  --_sds-textarea-background-color: var(--sds-textarea-background-color, var(--sds-color-background-default, var(--sds-color-neutral-background-default)));
4825
2589
  --_sds-textarea-text-color: var(--sds-textarea-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
@@ -4829,9 +2593,9 @@ const styles = i$4`
4829
2593
  --_sds-textarea-border-radius: var(--sds-textarea-border-radius, var(--sds-radius-sm));
4830
2594
 
4831
2595
  --_sds-textarea-font-family: var(--sds-textarea-font-family, var(--sds-typography-font-family-roboto));
4832
- --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-md));
2596
+ --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-content-md));
4833
2597
  --_sds-textarea-font-weight: var(--sds-textarea-font-weight, var(--sds-typography-font-weight-regular));
4834
- --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-md));
2598
+ --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-content-md));
4835
2599
  --_sds-textarea-min-height: var(--sds-textarea-height, var(--sds-components-button-md));
4836
2600
 
4837
2601
  --_sds-textarea-gap: var(--sds-textarea-gap, var(--sds-spacing-3xs));
@@ -4840,19 +2604,19 @@ const styles = i$4`
4840
2604
  --_sds-textarea-disabled-opacity: var(--sds-textarea-disabled-opacity, var(--sds-color-states-disabled-opacity));
4841
2605
 
4842
2606
  --_sds-textarea-label-text-color: var(--sds-textarea-label-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
4843
- --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-md));
2607
+ --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-content-md));
4844
2608
  --_sds-textarea-label-font-weight: var(--sds-textarea-label-font-weight, var(--sds-typography-font-weight-medium));
4845
2609
  --_sds-textarea-label-line-height: var(--sds-textarea-label-line-height, var(--sds-components-line-height-squeezed-md));
4846
2610
 
4847
2611
  --_sds-textarea-label-gap: var(--sds-textarea-gap, var(--sds-spacing-4xs));
4848
2612
 
4849
2613
  --_sds-textarea-helptext-text-color: var(--sds-textarea-helptext-text-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
4850
- --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-md));
2614
+ --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-content-md));
4851
2615
  --_sds-textarea-helptext-font-weight: var(--sds-textarea-helptext-font-weight, var(--sds-typography-font-weight-regular));
4852
2616
  --_sds-textarea-helptext-line-height: var(--sds-textarea-helptext-line-height, var(--sds-components-line-height-squeezed-md));
4853
2617
 
4854
2618
  --_sds-textarea-counter-text-color: var(--sds-textarea-counter-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
4855
- --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-md));
2619
+ --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-md));
4856
2620
  --_sds-textarea-counter-font-weight: var(--sds-textarea-counter-font-weight, var(--sds-typography-font-weight-regular));
4857
2621
  --_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-md));
4858
2622
 
@@ -4975,188 +2739,58 @@ const styles = i$4`
4975
2739
  }
4976
2740
 
4977
2741
  :host([size='sm']) {
4978
- --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-sm));
4979
- --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-sm));
2742
+ --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-content-sm));
2743
+ --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-content-sm));
4980
2744
  --_sds-textarea-min-height: var(--sds-textarea-height, var(--sds-components-button-sm));
4981
2745
 
4982
2746
  --_sds-textarea-label-line-height: var(--sds-textarea-label-line-height, var(--sds-components-line-height-squeezed-sm));
4983
- --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-sm));
2747
+ --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-content-sm));
4984
2748
 
4985
- --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-sm));
2749
+ --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-content-sm));
4986
2750
  --_sds-textarea-helptext-line-height: var(--sds-textarea-helptext-line-height, var(--sds-components-line-height-squeezed-sm));
4987
2751
 
4988
- --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-sm));
2752
+ --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-sm));
4989
2753
  --_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-sm));
4990
2754
  }
4991
2755
 
4992
2756
  :host([size='lg']) {
4993
- --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-lg));
4994
- --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-lg));
2757
+ --_sds-textarea-font-size: var(--sds-textarea-font-size, var(--sds-components-font-size-content-lg));
2758
+ --_sds-textarea-line-height: var(--sds-textarea-line-height, var(--sds-components-line-height-tall-content-lg));
4995
2759
  --_sds-textarea-min-height: var(--sds-textarea-height, var(--sds-components-button-lg));
4996
2760
 
4997
2761
  --_sds-textarea-label-line-height: var(--sds-textarea-label-line-height, var(--sds-components-line-height-squeezed-lg));
4998
- --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-lg));
2762
+ --_sds-textarea-label-font-size: var(--sds-textarea-label-font-size, var(--sds-components-font-size-content-lg));
4999
2763
 
5000
- --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-lg));
2764
+ --_sds-textarea-helptext-font-size: var(--sds-textarea-helptext-font-size, var(--sds-components-font-size-content-lg));
5001
2765
  --_sds-textarea-helptext-line-height: var(--sds-textarea-helptext-line-height, var(--sds-components-line-height-squeezed-lg));
5002
2766
 
5003
- --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-lg));
2767
+ --_sds-textarea-counter-font-size: var(--sds-textarea-counter-font-size, var(--sds-components-font-size-content-lg));
5004
2768
  --_sds-textarea-counter-line-height: var(--sds-textarea-counter-line-height, var(--sds-components-line-height-squeezed-lg));
5005
2769
  }
5006
- `;
5007
- var __defProp = Object.defineProperty;
5008
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5009
- var __decorateClass = (decorators, target, key, kind) => {
5010
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5011
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
5012
- if (decorator = decorators[i3])
5013
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
5014
- if (kind && result) __defProp(target, key, result);
5015
- return result;
5016
- };
5017
- let SDSTextArea = class extends i$1 {
5018
- constructor() {
5019
- super();
5020
- this.disabled = false;
5021
- this.readOnly = false;
5022
- this.required = false;
5023
- this.size = "md";
5024
- this._defaultValue = "";
5025
- this._handleInputChange = (event) => {
5026
- event.stopImmediatePropagation();
5027
- if (!this.disabled) {
5028
- const currentValue = event.target.value;
5029
- this.value = currentValue;
5030
- this.internals.setFormValue(currentValue === "" ? null : currentValue);
5031
- this.updateValidity();
5032
- this.dispatchEvent(new CustomEvent(event.type, { bubbles: true, composed: true }));
5033
- }
5034
- };
5035
- this._handleSelect = (event) => {
5036
- event.stopImmediatePropagation();
5037
- if (!this.disabled) {
5038
- this.dispatchEvent(new CustomEvent("select", { bubbles: true, composed: true }));
5039
- }
5040
- };
5041
- this._handleFocus = (event) => {
5042
- event.stopImmediatePropagation();
5043
- this.dispatchEvent(new CustomEvent("focus", { bubbles: true, composed: true }));
5044
- };
5045
- this._handleBlur = (event) => {
5046
- event.stopImmediatePropagation();
5047
- this.updateValidity();
5048
- this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
5049
- };
5050
- this.internals = this.attachInternals();
5051
- this.attachShadow({ mode: "open", delegatesFocus: true });
5052
- }
5053
- connectedCallback() {
5054
- super.connectedCallback();
5055
- this._defaultValue = this.value ?? "";
5056
- }
5057
- updateValidity() {
5058
- if (this.control.checkValidity()) {
5059
- this.internals.setValidity({});
5060
- } else {
5061
- this.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);
5062
- }
5063
- }
5064
- hasTypedTooManyCharacters() {
5065
- if (!this.counter) {
5066
- return false;
5067
- }
5068
- const currentLength = this.value?.length || 0;
5069
- return currentLength > this.counter;
5070
- }
5071
- renderCharacterCounter() {
5072
- if (this.counter === void 0) return E;
5073
- const currentLength = this.value?.length || 0;
5074
- if (this.hasTypedTooManyCharacters()) {
5075
- return x`<sds-alert variant="secondary" data-palette="danger"
5076
- ><p class="sds-textarea__character-counter" slot="message">Du har ${currentLength - this.counter} tegn for mye</p></sds-alert
5077
- >`;
5078
- }
5079
- return x`<p class="sds-textarea__character-counter">Du har ${this.counter - currentLength} tegn igjen</p>`;
5080
- }
5081
- formResetCallback() {
5082
- this.control.value = this._defaultValue;
5083
- this.internals.setFormValue(this._defaultValue === "" ? null : this._defaultValue);
5084
- this.value = this._defaultValue;
5085
- this.updateValidity();
5086
- }
5087
- select() {
5088
- if (!this.disabled) this.control.select();
5089
- }
5090
- type() {
5091
- return "textarea";
5092
- }
5093
- focus() {
5094
- if (!this.disabled) this.control.focus();
5095
- }
5096
- blur() {
5097
- if (!this.disabled) this.control.blur();
5098
- }
5099
- click() {
5100
- if (!this.disabled) this.control.click();
5101
- }
5102
- get selectionStart() {
5103
- return this.control ? this.control.selectionStart : null;
5104
- }
5105
- set selectionStart(value) {
5106
- if (this.control && value !== null) {
5107
- this.control.selectionStart = value;
5108
- }
5109
- }
5110
- get selectionEnd() {
5111
- return this.control ? this.control.selectionEnd : null;
5112
- }
5113
- set selectionEnd(value) {
5114
- if (this.control && value !== null) {
5115
- this.control.selectionEnd = value;
5116
- }
5117
- }
5118
- setSelectionRange(start, end, direction) {
5119
- if (this.control) {
5120
- this.control.setSelectionRange(start, end, direction);
5121
- }
5122
- }
5123
- checkValidity() {
5124
- return this.control.checkValidity();
5125
- }
5126
- reportValidity() {
5127
- return this.control.reportValidity();
5128
- }
5129
- setCustomValidity(message) {
5130
- this.control.setCustomValidity(message);
5131
- this.updateValidity();
5132
- }
5133
- render() {
5134
- const textareaClasses = {
5135
- "sds-textarea": true,
5136
- "sds-textarea--error": Boolean(this.errorMessage || this.hasTypedTooManyCharacters())
5137
- };
5138
- return x`
5139
- <div class="${e2(textareaClasses)}">
5140
- ${this.label || this.helpText ? x`<div>
5141
- ${this.label ? x`<label for="sds-textarea" class="sds-textarea__label">${this.label}</label>` : E}
5142
- ${this.helpText ? x`<p class="sds-textarea__help-text">${this.helpText}</p>` : E}
5143
- </div>` : E}
2770
+ `;var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,pe=(t,s,e,o)=>{for(var r,a=o>1?void 0:o?he(s,e):s,i=t.length-1;i>=0;i--)(r=t[i])&&(a=(o?r(s,e,a):r(a))||a);return o&&a&&ce(s,e,a),a};let ge=class extends at{constructor(){super(),this.disabled=!1,this.readOnly=!1,this.required=!1,this.size="md",this._defaultValue=null,this._handleInputChange=t=>{t.stopImmediatePropagation(),!this.disabled&&t.target instanceof HTMLTextAreaElement&&(this.value=t.target.value,this.internals.setFormValue(""===this.value?null:this.value),this.updateValidity(),this.dispatchEvent(new CustomEvent(t.type,{bubbles:!0,composed:!0})))},this._handleSelect=t=>{t.stopImmediatePropagation(),this.disabled||this.dispatchEvent(new CustomEvent("select",{bubbles:!0,composed:!0}))},this._handleFocus=t=>{t.stopImmediatePropagation(),this.dispatchEvent(new CustomEvent("focus",{bubbles:!0,composed:!0}))},this._handleBlur=t=>{t.stopImmediatePropagation(),this.updateValidity(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))},this.internals=this.attachInternals(),this.attachShadow({mode:"open",delegatesFocus:!0})}connectedCallback(){super.connectedCallback(),this._defaultValue=this.value??null,this.internals.setFormValue(this._defaultValue)}updateValidity(){this.control.checkValidity()?this.internals.setValidity({}):this.internals.setValidity({customError:!0},this.control.validationMessage,this.control)}hasTypedTooManyCharacters(){if(!this.counter)return!1;return(this.value?.length||0)>this.counter}renderCharacterCounter(){if(void 0===this.counter)return U;const t=this.value?.length||0;return this.hasTypedTooManyCharacters()?j`<sds-alert variant="secondary" data-palette="danger"
2771
+ ><p class="sds-textarea__character-counter" slot="message">Du har ${t-this.counter} tegn for mye</p></sds-alert
2772
+ >`:j`<p class="sds-textarea__character-counter">Du har ${this.counter-t} tegn igjen</p>`}formResetCallback(){this.internals.setFormValue(this._defaultValue);const t=this._defaultValue??"";this.control.value=t,this.value=t,this.updateValidity()}select(){this.disabled||this.control.select()}type(){return"textarea"}focus(){this.disabled||this.control.focus()}blur(){this.disabled||this.control.blur()}click(){this.disabled||this.control.click()}get selectionStart(){return this.control?this.control.selectionStart:null}set selectionStart(t){this.control&&null!==t&&(this.control.selectionStart=t)}get selectionEnd(){return this.control?this.control.selectionEnd:null}set selectionEnd(t){this.control&&null!==t&&(this.control.selectionEnd=t)}setSelectionRange(t,s,e){this.control&&this.control.setSelectionRange(t,s,e)}checkValidity(){return this.control.checkValidity()}reportValidity(){return this.control.reportValidity()}setCustomValidity(t){this.control.setCustomValidity(t),this.updateValidity()}render(){const t={"sds-textarea":!0,"sds-textarea--error":Boolean(this.errorMessage||this.hasTypedTooManyCharacters())};return j`
2773
+ <div class="${Ot(t)}">
2774
+ ${this.label||this.helpText?j`<div>
2775
+ ${this.label?j`<label for="sds-textarea" class="sds-textarea__label">${this.label}</label>`:U}
2776
+ ${this.helpText?j`<p class="sds-textarea__help-text">${this.helpText}</p>`:U}
2777
+ </div>`:U}
5144
2778
  <div class="sds-textarea__input-container">
5145
2779
  <textarea
5146
2780
  class="sds-textarea__input"
5147
2781
  id="sds-textarea"
5148
2782
  ?disabled="${this.disabled}"
5149
2783
  ?readonly="${this.readOnly}"
5150
- placeholder="${o$1(this.placeholder)}"
5151
- .value="${this.value ?? ""}"
2784
+ placeholder="${vt(this.placeholder)}"
2785
+ .value="${this.value??""}"
5152
2786
  .autocomplete="${this.autocomplete}"
5153
- name="${o$1(this.name)}"
2787
+ name="${vt(this.name)}"
5154
2788
  ?required="${this.required}"
5155
- rows="${o$1(this.rows)}"
5156
- cols="${o$1(this.cols)}"
5157
- wrap="${o$1(this.wrap)}"
5158
- minlength="${o$1(this.minlength)}"
5159
- maxlength="${o$1(this.maxlength)}"
2789
+ rows="${vt(this.rows)}"
2790
+ cols="${vt(this.cols)}"
2791
+ wrap="${vt(this.wrap)}"
2792
+ minlength="${vt(this.minlength)}"
2793
+ maxlength="${vt(this.maxlength)}"
5160
2794
  @input="${this._handleInputChange}"
5161
2795
  @change="${this._handleInputChange}"
5162
2796
  @select="${this._handleSelect}"
@@ -5164,86 +2798,6 @@ let SDSTextArea = class extends i$1 {
5164
2798
  @blur="${this._handleBlur}"
5165
2799
  ></textarea>
5166
2800
  </div>
5167
- ${this.errorMessage ? x`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>` : E} ${this.renderCharacterCounter()}
2801
+ ${this.errorMessage?j`<sds-alert variant="secondary" data-palette="danger"><p slot="message">${this.errorMessage}</p></sds-alert>`:U} ${this.renderCharacterCounter()}
5168
2802
  </div>
5169
- `;
5170
- }
5171
- };
5172
- SDSTextArea.styles = [styles];
5173
- SDSTextArea.formAssociated = true;
5174
- __decorateClass([
5175
- n2({ type: String })
5176
- ], SDSTextArea.prototype, "value", 2);
5177
- __decorateClass([
5178
- n2({ type: String, reflect: true })
5179
- ], SDSTextArea.prototype, "name", 2);
5180
- __decorateClass([
5181
- n2({ type: String, reflect: true })
5182
- ], SDSTextArea.prototype, "label", 2);
5183
- __decorateClass([
5184
- n2({ type: String, reflect: true })
5185
- ], SDSTextArea.prototype, "placeholder", 2);
5186
- __decorateClass([
5187
- n2({ type: String, attribute: "help-text", reflect: true })
5188
- ], SDSTextArea.prototype, "helpText", 2);
5189
- __decorateClass([
5190
- n2({ type: String, attribute: "error-message", reflect: true })
5191
- ], SDSTextArea.prototype, "errorMessage", 2);
5192
- __decorateClass([
5193
- n2({ type: Boolean, reflect: true })
5194
- ], SDSTextArea.prototype, "disabled", 2);
5195
- __decorateClass([
5196
- n2({ type: Boolean, attribute: "readonly", reflect: true })
5197
- ], SDSTextArea.prototype, "readOnly", 2);
5198
- __decorateClass([
5199
- n2({ type: String, reflect: true })
5200
- ], SDSTextArea.prototype, "autocomplete", 2);
5201
- __decorateClass([
5202
- n2({ type: Boolean, reflect: true })
5203
- ], SDSTextArea.prototype, "required", 2);
5204
- __decorateClass([
5205
- n2({ type: Number, reflect: true })
5206
- ], SDSTextArea.prototype, "rows", 2);
5207
- __decorateClass([
5208
- n2({ type: Number, reflect: true })
5209
- ], SDSTextArea.prototype, "cols", 2);
5210
- __decorateClass([
5211
- n2({ type: String, reflect: true })
5212
- ], SDSTextArea.prototype, "wrap", 2);
5213
- __decorateClass([
5214
- n2({ type: Number, reflect: true })
5215
- ], SDSTextArea.prototype, "minlength", 2);
5216
- __decorateClass([
5217
- n2({ type: Number, reflect: true })
5218
- ], SDSTextArea.prototype, "maxlength", 2);
5219
- __decorateClass([
5220
- n2({ type: Number, reflect: true })
5221
- ], SDSTextArea.prototype, "counter", 2);
5222
- __decorateClass([
5223
- n2({ type: String, reflect: true })
5224
- ], SDSTextArea.prototype, "size", 2);
5225
- __decorateClass([
5226
- e$3("#sds-textarea")
5227
- ], SDSTextArea.prototype, "control", 2);
5228
- SDSTextArea = __decorateClass([
5229
- guardedCustomElement("sds-textarea")
5230
- ], SDSTextArea);
5231
- export {
5232
- SDSAlert,
5233
- SDSButton,
5234
- SDSCard,
5235
- SDSCheckbox,
5236
- SDSCheckboxGroup,
5237
- SDSChip,
5238
- SDSHeading,
5239
- SDSIcon,
5240
- SDSLoader,
5241
- SDSNotification,
5242
- SDSRadio,
5243
- SDSRadioGroup,
5244
- SDSSwitch,
5245
- SDSTag,
5246
- SDSText,
5247
- SDSTextArea,
5248
- SDSTextField
5249
- };
2803
+ `}};ge.styles=[le],ge.formAssociated=!0,pe([lt({type:String})],ge.prototype,"value",2),pe([lt({type:String,reflect:!0})],ge.prototype,"name",2),pe([lt({type:String,reflect:!0})],ge.prototype,"label",2),pe([lt({type:String,reflect:!0})],ge.prototype,"placeholder",2),pe([lt({type:String,attribute:"help-text",reflect:!0})],ge.prototype,"helpText",2),pe([lt({type:String,attribute:"error-message",reflect:!0})],ge.prototype,"errorMessage",2),pe([lt({type:Boolean,reflect:!0})],ge.prototype,"disabled",2),pe([lt({type:Boolean,attribute:"readonly",reflect:!0})],ge.prototype,"readOnly",2),pe([lt({type:String,reflect:!0})],ge.prototype,"autocomplete",2),pe([lt({type:Boolean,reflect:!0})],ge.prototype,"required",2),pe([lt({type:Number,reflect:!0})],ge.prototype,"rows",2),pe([lt({type:Number,reflect:!0})],ge.prototype,"cols",2),pe([lt({type:String,reflect:!0})],ge.prototype,"wrap",2),pe([lt({type:Number,reflect:!0})],ge.prototype,"minlength",2),pe([lt({type:Number,reflect:!0})],ge.prototype,"maxlength",2),pe([lt({type:Number,reflect:!0})],ge.prototype,"counter",2),pe([lt({type:String,reflect:!0})],ge.prototype,"size",2),pe([ht("#sds-textarea")],ge.prototype,"control",2),ge=pe([pt("sds-textarea")],ge);export{jt as SDSAlert,Rt as SDSButton,Kt as SDSCard,Yt as SDSCheckbox,rs as SDSCheckboxGroup,ls as SDSChip,vs as SDSDetails,xs as SDSHeading,qt as SDSIcon,zs as SDSLoader,Os as SDSNotification,Rs as SDSRadio,Ns as SDSRadioGroup,Ks as SDSSwitch,Ys as SDSTag,oe as SDSText,ge as SDSTextArea,ne as SDSTextField};