@oslokommune/punkt-elements 19.5.1 → 19.5.2

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 (67) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/base-elements/checkable-native-parity.test.d.ts +0 -0
  3. package/dist/base-elements/form-disabled.test.d.ts +0 -0
  4. package/dist/base-elements/input-element.d.ts +10 -1
  5. package/dist/{checkbox-DKeErDb5.js → checkbox-Bbxt-tVW.js} +8 -8
  6. package/dist/checkbox-_NnoYkue.cjs +40 -0
  7. package/dist/{combobox-C7FUvv5T.cjs → combobox-BBx87DCG.cjs} +6 -6
  8. package/dist/{combobox-BKnHg_-E.js → combobox-CjLX_Gfd.js} +14 -14
  9. package/dist/{datepicker-CeUpoQuG.cjs → datepicker-Bk-m5Zaa.cjs} +5 -5
  10. package/dist/{datepicker-COFEJpB4.js → datepicker-CFCRxFQL.js} +6 -6
  11. package/dist/{fileupload-CUPl41uN.js → fileupload-B2606SvG.js} +1 -1
  12. package/dist/{fileupload-CaZGBvZr.cjs → fileupload-COAxc3sX.cjs} +1 -1
  13. package/dist/{header-Cq6INZmI.js → header-BQdc29IO.js} +1 -1
  14. package/dist/{header-CgP3-6-b.cjs → header-BhM7FRoC.cjs} +1 -1
  15. package/dist/input-element-CSfDGslx.cjs +1 -0
  16. package/dist/{input-element-5hsxasU3.js → input-element-lLzfwdim.js} +198 -173
  17. package/dist/{input-wrapper-Cf__-4E-.cjs → input-wrapper-BBG8EXQ8.cjs} +20 -20
  18. package/dist/{input-wrapper-DACDx6Ie.js → input-wrapper-Bz9GwYrn.js} +20 -20
  19. package/dist/pkt-checkbox.cjs +1 -1
  20. package/dist/pkt-checkbox.js +1 -1
  21. package/dist/pkt-combobox.cjs +1 -1
  22. package/dist/pkt-combobox.js +1 -1
  23. package/dist/pkt-datepicker.cjs +1 -1
  24. package/dist/pkt-datepicker.js +1 -1
  25. package/dist/pkt-fileupload.cjs +1 -1
  26. package/dist/pkt-fileupload.js +1 -1
  27. package/dist/pkt-header.cjs +1 -1
  28. package/dist/pkt-header.js +1 -1
  29. package/dist/pkt-index.cjs +1 -1
  30. package/dist/pkt-index.js +11 -11
  31. package/dist/pkt-input-wrapper.cjs +1 -1
  32. package/dist/pkt-input-wrapper.js +1 -1
  33. package/dist/pkt-radiobutton.cjs +1 -1
  34. package/dist/pkt-radiobutton.js +1 -1
  35. package/dist/pkt-select.cjs +1 -1
  36. package/dist/pkt-select.js +1 -1
  37. package/dist/pkt-textarea.cjs +1 -1
  38. package/dist/pkt-textarea.js +1 -1
  39. package/dist/pkt-textinput.cjs +1 -1
  40. package/dist/pkt-textinput.js +1 -1
  41. package/dist/pkt-timepicker.cjs +1 -1
  42. package/dist/pkt-timepicker.js +1 -1
  43. package/dist/{radiobutton-oEYrBiT6.cjs → radiobutton-C3kEjvHQ.cjs} +2 -2
  44. package/dist/{radiobutton-DP791tUe.js → radiobutton-D9htviZG.js} +5 -5
  45. package/dist/{select-B97S4g1v.js → select-BizHes0n.js} +4 -4
  46. package/dist/{select-QobXCtIL.cjs → select-BuQxosyi.cjs} +3 -3
  47. package/dist/{textarea-ZMbtZNp3.cjs → textarea-BXadsEdL.cjs} +3 -3
  48. package/dist/{textarea-DgW0hRV5.js → textarea-CL1yUDVL.js} +4 -4
  49. package/dist/{textinput-s-qz2xSC.js → textinput-Csil0Zda.js} +4 -4
  50. package/dist/{textinput-DfT_1aGb.cjs → textinput-qi0f5NZH.cjs} +3 -3
  51. package/dist/{timepicker-BAa_VEnf.cjs → timepicker-CvL2-Siz.cjs} +8 -8
  52. package/dist/{timepicker-Crj4isb9.js → timepicker-DNoYMBAL.js} +9 -9
  53. package/package.json +2 -2
  54. package/src/components/checkbox/checkbox.ts +6 -9
  55. package/src/components/combobox/combobox-handlers.ts +6 -6
  56. package/src/components/combobox/combobox-value.ts +1 -1
  57. package/src/components/combobox/combobox.ts +5 -5
  58. package/src/components/datepicker/datepicker.ts +4 -4
  59. package/src/components/input-wrapper/input-wrapper.test.ts +36 -0
  60. package/src/components/input-wrapper/input-wrapper.ts +12 -5
  61. package/src/components/radiobutton/radiobutton.ts +3 -6
  62. package/src/components/select/select.ts +2 -2
  63. package/src/components/textarea/textarea.ts +2 -2
  64. package/src/components/textinput/textinput.ts +2 -2
  65. package/src/components/timepicker/timepicker.ts +7 -7
  66. package/dist/checkbox-DIyi1Cya.cjs +0 -40
  67. package/dist/input-element-Ctkz5fQk.cjs +0 -1
@@ -1,34 +1,34 @@
1
- import { n as e, u as t } from "./element-mwwC2Rra.js";
2
- import { t as n } from "./format-BTeSVkED.js";
3
- import { t as r } from "./element-with-slot-DQv0cbbD.js";
4
- import { n as i, t as a } from "./booleanish-OQJTYSrw.js";
5
- import { n as o } from "./utils-BwF4QSrq.js";
1
+ import { l as e, n as t, u as n } from "./element-mwwC2Rra.js";
2
+ import { t as r } from "./format-BTeSVkED.js";
3
+ import { t as i } from "./element-with-slot-DQv0cbbD.js";
4
+ import { n as a, t as o } from "./booleanish-OQJTYSrw.js";
5
+ import { n as s } from "./utils-BwF4QSrq.js";
6
6
  //#region ../../node_modules/element-internals-polyfill/dist/maps.js
7
- var s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = (e, t, n) => {
7
+ var c = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = (e, t, n) => {
8
8
  e.getAttribute(t) !== n && e.setAttribute(t, n);
9
- }, S = (e, t) => {
10
- e.toggleAttribute("internals-disabled", t), t ? x(e, "aria-disabled", "true") : e.removeAttribute("aria-disabled"), e.formDisabledCallback && e.formDisabledCallback.apply(e, [t]);
11
- }, C = (e) => {
12
- l.get(e).forEach((e) => {
9
+ }, C = (e, t) => {
10
+ e.toggleAttribute("internals-disabled", t), t ? S(e, "aria-disabled", "true") : e.removeAttribute("aria-disabled"), e.formDisabledCallback && e.formDisabledCallback.apply(e, [t]);
11
+ }, w = (e) => {
12
+ u.get(e).forEach((e) => {
13
13
  e.remove();
14
- }), l.set(e, []);
15
- }, w = (e, t) => {
16
- let n = document.createElement("input");
17
- return n.type = "hidden", n.name = e.getAttribute("name"), e.after(n), l.get(t).push(n), n;
14
+ }), u.set(e, []);
18
15
  }, T = (e, t) => {
16
+ let n = document.createElement("input");
17
+ return n.type = "hidden", n.name = e.getAttribute("name"), e.after(n), u.get(t).push(n), n;
18
+ }, E = (e, t) => {
19
19
  if (t.length) {
20
20
  let n = Array.from(t);
21
21
  n.forEach((t) => t.addEventListener("click", e.click.bind(e)));
22
22
  let [r] = n, i = r.id;
23
- r.id ||= (i = `${r.htmlFor}_Label`, i), x(e, "aria-labelledby", i);
23
+ r.id ||= (i = `${r.htmlFor}_Label`, i), S(e, "aria-labelledby", i);
24
24
  }
25
- }, E = (e) => {
26
- let t = Array.from(e.elements).filter((e) => !e.tagName.includes("-") && e.validity).map((e) => e.validity.valid), n = p.get(e) || [], r = Array.from(n).filter((e) => e.isConnected).map((e) => u.get(e).validity.valid), i = [...t, ...r].includes(!1);
25
+ }, D = (e) => {
26
+ let t = Array.from(e.elements).filter((e) => !e.tagName.includes("-") && e.validity).map((e) => e.validity.valid), n = m.get(e) || [], r = Array.from(n).filter((e) => e.isConnected).map((e) => d.get(e).validity.valid), i = [...t, ...r].includes(!1);
27
27
  e.toggleAttribute("internals-invalid", i), e.toggleAttribute("internals-valid", !i);
28
28
  }, te = (e) => {
29
- E(O(e.target));
29
+ D(k(e.target));
30
30
  }, ne = (e) => {
31
- E(O(e.target));
31
+ D(k(e.target));
32
32
  }, re = (e) => {
33
33
  let t = [
34
34
  "button[type=submit]",
@@ -37,57 +37,57 @@ var s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = /*
37
37
  ].map((e) => `${e}:not([disabled])`).map((t) => `${t}:not([form])${e.id ? `,${t}[form='${e.id}']` : ""}`).join(",");
38
38
  e.addEventListener("click", (n) => {
39
39
  if (n.target.closest(t)) {
40
- let t = p.get(e);
40
+ let t = m.get(e);
41
41
  if (e.noValidate) return;
42
- t.size && Array.from(t).reverse().map((e) => u.get(e).reportValidity()).includes(!1) && n.preventDefault();
42
+ t.size && Array.from(t).reverse().map((e) => d.get(e).reportValidity()).includes(!1) && n.preventDefault();
43
43
  }
44
44
  });
45
45
  }, ie = (e) => {
46
- let t = p.get(e.target);
46
+ let t = m.get(e.target);
47
47
  t && t.size && t.forEach((e) => {
48
48
  e.constructor.formAssociated && e.formResetCallback && e.formResetCallback.apply(e);
49
49
  });
50
- }, D = (e, t, n) => {
50
+ }, O = (e, t, n) => {
51
51
  if (t) {
52
- let r = p.get(t);
52
+ let r = m.get(t);
53
53
  if (r) r.add(e);
54
54
  else {
55
55
  let n = /* @__PURE__ */ new Set();
56
- n.add(e), p.set(t, n), re(t), t.addEventListener("reset", ie), t.addEventListener("input", te), t.addEventListener("change", ne);
56
+ n.add(e), m.set(t, n), re(t), t.addEventListener("reset", ie), t.addEventListener("input", te), t.addEventListener("change", ne);
57
57
  }
58
58
  ee.set(t, {
59
59
  ref: e,
60
60
  internals: n
61
61
  }), e.constructor.formAssociated && e.formAssociatedCallback && setTimeout(() => {
62
62
  e.formAssociatedCallback.apply(e, [t]);
63
- }, 0), E(t);
63
+ }, 0), D(t);
64
64
  }
65
- }, O = (e) => {
65
+ }, k = (e) => {
66
66
  let t = e.parentNode;
67
- return t && t.tagName !== "FORM" && (t = O(t)), t;
68
- }, k = (e, t, n = DOMException) => {
67
+ return t && t.tagName !== "FORM" && (t = k(t)), t;
68
+ }, A = (e, t, n = DOMException) => {
69
69
  if (!e.constructor.formAssociated) throw new n(t);
70
- }, A = (e, t, n) => {
71
- let r = p.get(e);
70
+ }, j = (e, t, n) => {
71
+ let r = m.get(e);
72
72
  return r && r.size && r.forEach((e) => {
73
- u.get(e)[n]() || (t = !1);
73
+ d.get(e)[n]() || (t = !1);
74
74
  }), t;
75
- }, j = (e) => {
75
+ }, M = (e) => {
76
76
  let t = !1;
77
77
  if (e.constructor.formAssociated) {
78
- let n = u.get(e);
79
- n === void 0 && (e.attachInternals(), n = u.get(e), t = !0);
78
+ let n = d.get(e);
79
+ n === void 0 && (e.attachInternals(), n = d.get(e), t = !0);
80
80
  let { labels: r, form: i } = n;
81
- T(e, r), D(e, i, n);
81
+ E(e, r), O(e, i, n);
82
82
  }
83
83
  return t;
84
84
  };
85
- function M() {
85
+ function N() {
86
86
  return typeof MutationObserver < "u";
87
87
  }
88
88
  //#endregion
89
89
  //#region ../../node_modules/element-internals-polyfill/dist/aom.js
90
- var N = {
90
+ var P = {
91
91
  ariaAtomic: "aria-atomic",
92
92
  ariaAutoComplete: "aria-autocomplete",
93
93
  ariaBrailleLabel: "aria-braillelabel",
@@ -133,66 +133,66 @@ var N = {
133
133
  ariaValueText: "aria-valuetext",
134
134
  role: "role"
135
135
  }, ae = (e, t) => {
136
- for (let n in N) {
136
+ for (let n in P) {
137
137
  t[n] = null;
138
- let r = null, i = N[n];
138
+ let r = null, i = P[n];
139
139
  Object.defineProperty(t, n, {
140
140
  get() {
141
141
  return r;
142
142
  },
143
143
  set(n) {
144
- r = n, e.isConnected ? x(e, i, n) : h.set(e, t);
144
+ r = n, e.isConnected ? S(e, i, n) : g.set(e, t);
145
145
  }
146
146
  });
147
147
  }
148
148
  }, oe = (e, t) => {
149
- l.set(t, []), L.observe?.(e, I);
149
+ u.set(t, []), R.observe?.(e, L);
150
150
  };
151
- function P(e) {
152
- let t = u.get(e), { form: n } = t;
153
- D(e, n, t), T(e, t.labels);
151
+ function F(e) {
152
+ let t = d.get(e), { form: n } = t;
153
+ O(e, n, t), E(e, t.labels);
154
154
  }
155
- var F = (e, t = !1) => {
155
+ var I = (e, t = !1) => {
156
156
  let n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
157
- return u.has(e) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
157
+ return d.has(e) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
158
158
  } }), r = n.nextNode(), i = !t || e.disabled;
159
- for (; r;) r.formDisabledCallback && i && S(r, e.disabled), r = n.nextNode();
160
- }, I = {
159
+ for (; r;) r.formDisabledCallback && i && C(r, e.disabled), r = n.nextNode();
160
+ }, L = {
161
161
  attributes: !0,
162
162
  attributeFilter: ["disabled", "name"]
163
- }, L = M() ? new MutationObserver((e) => {
163
+ }, R = N() ? new MutationObserver((e) => {
164
164
  for (let t of e) {
165
165
  let e = t.target;
166
- if (t.attributeName === "disabled" && (e.constructor.formAssociated ? S(e, e.hasAttribute("disabled")) : e.localName === "fieldset" && F(e)), t.attributeName === "name" && e.constructor.formAssociated) {
167
- let t = u.get(e), n = m.get(e);
166
+ if (t.attributeName === "disabled" && (e.constructor.formAssociated ? C(e, e.hasAttribute("disabled")) : e.localName === "fieldset" && I(e)), t.attributeName === "name" && e.constructor.formAssociated) {
167
+ let t = d.get(e), n = h.get(e);
168
168
  t.setFormValue(n);
169
169
  }
170
170
  }
171
171
  }) : {};
172
- function R(e) {
172
+ function z(e) {
173
173
  e.forEach((e) => {
174
174
  let { addedNodes: t, removedNodes: n } = e, r = Array.from(t), i = Array.from(n);
175
175
  r.forEach((e) => {
176
- if (u.has(e) && e.constructor.formAssociated && P(e), h.has(e)) {
177
- let t = h.get(e);
178
- Object.keys(N).filter((e) => t[e] !== null).forEach((n) => {
179
- x(e, N[n], t[n]);
180
- }), h.delete(e);
176
+ if (d.has(e) && e.constructor.formAssociated && F(e), g.has(e)) {
177
+ let t = g.get(e);
178
+ Object.keys(P).filter((e) => t[e] !== null).forEach((n) => {
179
+ S(e, P[n], t[n]);
180
+ }), g.delete(e);
181
181
  }
182
- if (b.has(e)) {
183
- let t = b.get(e);
184
- x(e, "internals-valid", t.validity.valid.toString()), x(e, "internals-invalid", (!t.validity.valid).toString()), x(e, "aria-invalid", (!t.validity.valid).toString()), b.delete(e);
182
+ if (x.has(e)) {
183
+ let t = x.get(e);
184
+ S(e, "internals-valid", t.validity.valid.toString()), S(e, "internals-invalid", (!t.validity.valid).toString()), S(e, "aria-invalid", (!t.validity.valid).toString()), x.delete(e);
185
185
  }
186
186
  if (e.localName === "form") {
187
- let t = p.get(e), n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
188
- return u.has(e) && e.constructor.formAssociated && !(t && t.has(e)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
187
+ let t = m.get(e), n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
188
+ return d.has(e) && e.constructor.formAssociated && !(t && t.has(e)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
189
189
  } }), r = n.nextNode();
190
- for (; r;) P(r), r = n.nextNode();
190
+ for (; r;) F(r), r = n.nextNode();
191
191
  }
192
- e.localName === "fieldset" && (L.observe?.(e, I), F(e, !0));
192
+ e.localName === "fieldset" && (R.observe?.(e, L), I(e, !0));
193
193
  }), i.forEach((e) => {
194
- let t = u.get(e);
195
- t && l.get(t) && C(t), f.has(e) && f.get(e).disconnect();
194
+ let t = d.get(e);
195
+ t && u.get(t) && w(t), p.has(e) && p.get(e).disconnect();
196
196
  });
197
197
  });
198
198
  }
@@ -200,24 +200,24 @@ function se(e) {
200
200
  e.forEach((e) => {
201
201
  let { removedNodes: t } = e;
202
202
  t.forEach((t) => {
203
- let n = v.get(e.target);
204
- u.has(t) && j(t), n.disconnect();
203
+ let n = y.get(e.target);
204
+ d.has(t) && M(t), n.disconnect();
205
205
  });
206
206
  });
207
207
  }
208
208
  var ce = (e) => {
209
209
  let t = new MutationObserver(se);
210
- window?.ShadyDOM?.inUse && e.mode && e.host && (e = e.host), t.observe?.(e, { childList: !0 }), v.set(e, t);
210
+ window?.ShadyDOM?.inUse && e.mode && e.host && (e = e.host), t.observe?.(e, { childList: !0 }), y.set(e, t);
211
211
  };
212
- M() && new MutationObserver(R);
213
- var z = {
212
+ N() && new MutationObserver(z);
213
+ var B = {
214
214
  childList: !0,
215
215
  subtree: !0
216
216
  }, le = class {
217
217
  constructor() {
218
218
  this.badInput = !1, this.customError = !1, this.patternMismatch = !1, this.rangeOverflow = !1, this.rangeUnderflow = !1, this.stepMismatch = !1, this.tooLong = !1, this.tooShort = !1, this.typeMismatch = !1, this.valid = !0, this.valueMissing = !1, Object.seal(this);
219
219
  }
220
- }, ue = (e) => (e.badInput = !1, e.customError = !1, e.patternMismatch = !1, e.rangeOverflow = !1, e.rangeUnderflow = !1, e.stepMismatch = !1, e.tooLong = !1, e.tooShort = !1, e.typeMismatch = !1, e.valid = !0, e.valueMissing = !1, e), B = (e, t, n) => (e.valid = de(t), Object.keys(t).forEach((n) => e[n] = t[n]), n && E(n), e), de = (e) => {
220
+ }, ue = (e) => (e.badInput = !1, e.customError = !1, e.patternMismatch = !1, e.rangeOverflow = !1, e.rangeUnderflow = !1, e.stepMismatch = !1, e.tooLong = !1, e.tooShort = !1, e.typeMismatch = !1, e.valid = !0, e.valueMissing = !1, e), de = (e, t, n) => (e.valid = fe(t), Object.keys(t).forEach((n) => e[n] = t[n]), n && D(n), e), fe = (e) => {
221
221
  let t = !0;
222
222
  for (let n in e) n !== "valid" && e[n] !== !1 && (t = !1);
223
223
  return t;
@@ -250,7 +250,7 @@ var U = class extends Set {
250
250
  n.toggleAttribute(`state${e}`, !1), n.part && n.part.remove(`state${e}`);
251
251
  }), t;
252
252
  }
253
- }, fe = function(e, t, n, r, i) {
253
+ }, pe = function(e, t, n, r, i) {
254
254
  if (r === "m") throw TypeError("Private method is not writable");
255
255
  if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
256
256
  if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
@@ -259,9 +259,9 @@ var U = class extends Set {
259
259
  if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
260
260
  if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
261
261
  return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
262
- }, G, pe = class {
262
+ }, G, me = class {
263
263
  constructor(e) {
264
- G.set(this, void 0), fe(this, G, e, "f");
264
+ G.set(this, void 0), pe(this, G, e, "f");
265
265
  for (let t = 0; t < e.length; t++) {
266
266
  let n = e[t];
267
267
  this[t] = n, n.hasAttribute("name") && (this[n.getAttribute("name")] = n);
@@ -283,23 +283,23 @@ var U = class extends Set {
283
283
  };
284
284
  //#endregion
285
285
  //#region ../../node_modules/element-internals-polyfill/dist/patch-form-prototype.js
286
- function me() {
286
+ function he() {
287
287
  let e = HTMLFormElement.prototype.checkValidity;
288
288
  HTMLFormElement.prototype.checkValidity = n;
289
289
  let t = HTMLFormElement.prototype.reportValidity;
290
290
  HTMLFormElement.prototype.reportValidity = r;
291
291
  function n(...t) {
292
292
  let n = e.apply(this, t);
293
- return A(this, n, "checkValidity");
293
+ return j(this, n, "checkValidity");
294
294
  }
295
295
  function r(...e) {
296
296
  let n = t.apply(this, e);
297
- return A(this, n, "reportValidity");
297
+ return j(this, n, "reportValidity");
298
298
  }
299
299
  let { get: i } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "elements");
300
300
  Object.defineProperty(HTMLFormElement.prototype, "elements", { get(...e) {
301
- let t = i.call(this, ...e), n = Array.from(p.get(this) || []);
302
- return n.length === 0 ? t : new pe(Array.from(t).concat(n).sort((e, t) => e.compareDocumentPosition ? e.compareDocumentPosition(t) & 2 ? 1 : -1 : 0));
301
+ let t = i.call(this, ...e), n = Array.from(m.get(this) || []);
302
+ return n.length === 0 ? t : new me(Array.from(t).concat(n).sort((e, t) => e.compareDocumentPosition ? e.compareDocumentPosition(t) & 2 ? 1 : -1 : 0));
303
303
  } });
304
304
  }
305
305
  //#endregion
@@ -311,12 +311,12 @@ var K = class {
311
311
  constructor(e) {
312
312
  if (!e || !e.tagName || e.tagName.indexOf("-") === -1) throw TypeError("Illegal constructor");
313
313
  let t = e.getRootNode(), n = new le();
314
- this.states = new U(e), s.set(this, e), c.set(this, n), u.set(e, this), ae(e, this), oe(e, this), Object.seal(this), t instanceof DocumentFragment && ce(t);
314
+ this.states = new U(e), c.set(this, e), l.set(this, n), d.set(e, this), ae(e, this), oe(e, this), Object.seal(this), t instanceof DocumentFragment && ce(t);
315
315
  }
316
316
  checkValidity() {
317
- let e = s.get(this);
318
- if (k(e, "Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
319
- let t = c.get(this);
317
+ let e = c.get(this);
318
+ if (A(e, "Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
319
+ let t = l.get(this);
320
320
  if (!t.valid) {
321
321
  let t = new Event("invalid", {
322
322
  bubbles: !1,
@@ -328,44 +328,44 @@ var K = class {
328
328
  return t.valid;
329
329
  }
330
330
  get form() {
331
- let e = s.get(this);
332
- k(e, "Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");
331
+ let e = c.get(this);
332
+ A(e, "Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");
333
333
  let t;
334
- return e.constructor.formAssociated === !0 && (t = O(e)), t;
334
+ return e.constructor.formAssociated === !0 && (t = k(e)), t;
335
335
  }
336
336
  get labels() {
337
- let e = s.get(this);
338
- k(e, "Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");
337
+ let e = c.get(this);
338
+ A(e, "Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");
339
339
  let t = e.getAttribute("id"), n = e.getRootNode();
340
340
  return n && t ? n.querySelectorAll(`[for="${t}"]`) : [];
341
341
  }
342
342
  reportValidity() {
343
- let e = s.get(this);
344
- if (k(e, "Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
345
- let t = this.checkValidity(), n = _.get(this);
343
+ let e = c.get(this);
344
+ if (A(e, "Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !this.willValidate) return !0;
345
+ let t = this.checkValidity(), n = v.get(this);
346
346
  if (n && !e.constructor.formAssociated) throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");
347
347
  return !t && n && (e.focus(), n.focus()), t;
348
348
  }
349
349
  setFormValue(e) {
350
- let t = s.get(this);
351
- if (k(t, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), C(this), e != null && !(e instanceof FormData)) {
350
+ let t = c.get(this);
351
+ if (A(t, "Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."), w(this), e != null && !(e instanceof FormData)) {
352
352
  if (t.getAttribute("name")) {
353
- let n = w(t, this);
353
+ let n = T(t, this);
354
354
  n.value = e;
355
355
  }
356
356
  } else e != null && e instanceof FormData && Array.from(e).reverse().forEach(([e, n]) => {
357
357
  if (typeof n == "string") {
358
- let r = w(t, this);
358
+ let r = T(t, this);
359
359
  r.name = e, r.value = n;
360
360
  }
361
361
  });
362
- m.set(t, e);
362
+ h.set(t, e);
363
363
  }
364
364
  setValidity(e, t, n) {
365
- let r = s.get(this);
366
- if (k(r, "Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !e) throw TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
367
- _.set(this, n);
368
- let i = c.get(this), a = {};
365
+ let r = c.get(this);
366
+ if (A(r, "Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."), !e) throw TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");
367
+ v.set(this, n);
368
+ let i = l.get(this), a = {};
369
369
  for (let t in e) a[t] = e[t];
370
370
  Object.keys(a).length === 0 && ue(i);
371
371
  let o = {
@@ -373,26 +373,26 @@ var K = class {
373
373
  ...a
374
374
  };
375
375
  delete o.valid;
376
- let { valid: l } = B(i, o, this.form);
377
- if (!l && !t) throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");
378
- d.set(this, l ? "" : t), r.isConnected ? (r.toggleAttribute("internals-invalid", !l), r.toggleAttribute("internals-valid", l), x(r, "aria-invalid", `${!l}`)) : b.set(r, this);
376
+ let { valid: s } = de(i, o, this.form);
377
+ if (!s && !t) throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");
378
+ f.set(this, s ? "" : t), r.isConnected ? (r.toggleAttribute("internals-invalid", !s), r.toggleAttribute("internals-valid", s), S(r, "aria-invalid", `${!s}`)) : x.set(r, this);
379
379
  }
380
380
  get shadowRoot() {
381
- let e = s.get(this);
382
- return g.get(e) || null;
381
+ let e = c.get(this);
382
+ return _.get(e) || null;
383
383
  }
384
384
  get validationMessage() {
385
- return k(s.get(this), "Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."), d.get(this);
385
+ return A(c.get(this), "Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."), f.get(this);
386
386
  }
387
387
  get validity() {
388
- return k(s.get(this), "Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."), c.get(this);
388
+ return A(c.get(this), "Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."), l.get(this);
389
389
  }
390
390
  get willValidate() {
391
- let e = s.get(this);
392
- return k(e, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(e.matches(":disabled") || e.disabled || e.hasAttribute("disabled") || e.hasAttribute("readonly"));
391
+ let e = c.get(this);
392
+ return A(e, "Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."), !(e.matches(":disabled") || e.disabled || e.hasAttribute("disabled") || e.hasAttribute("readonly"));
393
393
  }
394
394
  };
395
- function he() {
395
+ function ge() {
396
396
  if (typeof window > "u" || !window.ElementInternals || !HTMLElement.prototype.attachInternals) return !1;
397
397
  class e extends HTMLElement {
398
398
  constructor() {
@@ -422,7 +422,7 @@ function Y(e) {
422
422
  return n.states = new U(this), n;
423
423
  }));
424
424
  }
425
- function ge(e = !0) {
425
+ function _e(e = !0) {
426
426
  let t = !1;
427
427
  if (!q) {
428
428
  if (q = !0, typeof window < "u" && (window.ElementInternals = K), typeof CustomElementRegistry < "u") {
@@ -431,7 +431,7 @@ function ge(e = !0) {
431
431
  if (r.formAssociated) {
432
432
  let e = r.prototype.connectedCallback;
433
433
  r.prototype.connectedCallback = function() {
434
- y.has(this) || (y.set(this, !0), this.hasAttribute("disabled") && S(this, !0)), e?.apply(this), t = j(this);
434
+ b.has(this) || (b.set(this, !0), this.hasAttribute("disabled") && C(this, !0)), e?.apply(this), t = M(this);
435
435
  };
436
436
  }
437
437
  e.call(this, n, r, i);
@@ -440,29 +440,29 @@ function ge(e = !0) {
440
440
  if (typeof HTMLElement < "u" && (HTMLElement.prototype.attachInternals = function() {
441
441
  if (!this.tagName) return {};
442
442
  if (this.tagName.indexOf("-") === -1) throw Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.");
443
- if (u.has(this) && !t) throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
443
+ if (d.has(this) && !t) throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");
444
444
  return new K(this);
445
445
  }), typeof Element < "u") {
446
446
  function e(...e) {
447
447
  let n = t.apply(this, e);
448
- if (g.set(this, n), M()) {
449
- let e = new MutationObserver(R);
450
- window.ShadyDOM ? e.observe(this, z) : e.observe(n, z), f.set(this, e);
448
+ if (_.set(this, n), N()) {
449
+ let e = new MutationObserver(z);
450
+ window.ShadyDOM ? e.observe(this, B) : e.observe(n, B), p.set(this, e);
451
451
  }
452
452
  return n;
453
453
  }
454
454
  let t = Element.prototype.attachShadow;
455
455
  Element.prototype.attachShadow = e;
456
456
  }
457
- M() && typeof document < "u" && new MutationObserver(R).observe(document.documentElement, z), typeof HTMLFormElement < "u" && me(), (e || typeof window < "u" && !window.CustomStateSet) && Y();
457
+ N() && typeof document < "u" && new MutationObserver(z).observe(document.documentElement, B), typeof HTMLFormElement < "u" && he(), (e || typeof window < "u" && !window.CustomStateSet) && Y();
458
458
  }
459
459
  }
460
460
  //#endregion
461
461
  //#region ../../node_modules/element-internals-polyfill/dist/index.js
462
- customElements.polyfillWrapFlushCallback || (he() ? typeof window < "u" && !window.CustomStateSet && Y(HTMLElement.prototype.attachInternals) : ge(!1));
462
+ customElements.polyfillWrapFlushCallback || (ge() ? typeof window < "u" && !window.CustomStateSet && Y(HTMLElement.prototype.attachInternals) : _e(!1));
463
463
  //#endregion
464
464
  //#region src/base-elements/input-element.ts
465
- var X = "on", Z = "--checked", Q = ",", $ = class extends r {
465
+ var X = "on", ve = "--checked", Z = ",", Q = (e) => e === !0 || e === "" || e === "true", $ = class e extends i {
466
466
  static get formAssociated() {
467
467
  return !0;
468
468
  }
@@ -481,6 +481,12 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
481
481
  set ariaDescribedBy(e) {
482
482
  this.ariaDescribedby = e;
483
483
  }
484
+ formDisabledCallback(e) {
485
+ this.formDisabled = e;
486
+ }
487
+ get isDisabled() {
488
+ return this.disabled || this.formDisabled;
489
+ }
484
490
  effectiveCounter(e) {
485
491
  return this.counter ?? e;
486
492
  }
@@ -488,15 +494,15 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
488
494
  return this.hasFieldset ?? e;
489
495
  }
490
496
  constructor() {
491
- super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedby = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = o(), this.counter = null, this.hasError = !1, this.inline = !1, this.hasFieldset = null, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = null, this.label = null, this.tagText = null, this.inputSize = "medium", this.dataTestid = "", this.touched = !1, this._initialized = !1, this._didInitDerivedState = !1, this.internals = this.attachInternals();
497
+ super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedby = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = s(), this.counter = null, this.hasError = !1, this.inline = !1, this.hasFieldset = null, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = null, this.label = null, this.tagText = null, this.inputSize = "medium", this.dataTestid = "", this.formDisabled = !1, this.touched = !1, this._initialized = !1, this._didInitDerivedState = !1, this._defaultCheckedState = !1, this.internals = this.attachInternals();
492
498
  }
493
- manageValidity(e) {
499
+ manageValidity(e, t) {
494
500
  if (!e) {
495
501
  console.warn("manageValidity called without valid input element");
496
502
  return;
497
503
  }
498
- let t = this.pktStrings.get("validation");
499
- this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, t.valueMissing, e) : e.validity?.typeMismatch || e.validity?.badInput ? this.internals.setValidity({ typeMismatch: !0 }, t.typeMismatch, e) : e.validity?.patternMismatch ? this.internals.setValidity({ patternMismatch: !0 }, t.patternMismatch, e) : e.validity?.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, t.tooShort, e) : e.validity?.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, t.tooLong, e) : e.validity?.rangeUnderflow ? this.internals.setValidity({ rangeUnderflow: !0 }, this.min ? n(t.rangeUnderflowMin, { min: this.min.toString() }) : t.rangeUnderflow, e) : e.validity?.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, t.typeMismatch, e) : e.validity?.rangeOverflow ? this.internals.setValidity({ rangeOverflow: !0 }, this.max ? n(t.rangeOverflowMax, { max: this.max.toString() }) : t.rangeOverflow, e) : e.validity?.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
504
+ let n = this.pktStrings.get("validation");
505
+ (this.isCheckable ? this.checkableValueMissing(t ?? this.checkableGroup()) : this.required && !this.value) ? this.internals.setValidity({ valueMissing: !0 }, n.valueMissing, e) : e.validity?.typeMismatch || e.validity?.badInput ? this.internals.setValidity({ typeMismatch: !0 }, n.typeMismatch, e) : e.validity?.patternMismatch ? this.internals.setValidity({ patternMismatch: !0 }, n.patternMismatch, e) : e.validity?.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, n.tooShort, e) : e.validity?.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, n.tooLong, e) : e.validity?.rangeUnderflow ? this.internals.setValidity({ rangeUnderflow: !0 }, this.min ? r(n.rangeUnderflowMin, { min: this.min.toString() }) : n.rangeUnderflow, e) : e.validity?.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, n.typeMismatch, e) : e.validity?.rangeOverflow ? this.internals.setValidity({ rangeOverflow: !0 }, this.max ? r(n.rangeOverflowMax, { max: this.max.toString() }) : n.rangeOverflow, e) : e.validity?.customError ? this.internals.setValidity({ customError: !0 }, e.validationMessage, e) : this.internals.setValidity({});
500
506
  }
501
507
  setFormValue(e) {
502
508
  if (this.internals) {
@@ -514,21 +520,35 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
514
520
  let t = this.form;
515
521
  return Array.from(e.querySelectorAll("pkt-radiobutton, input[type=\"radio\"]")).filter((e) => e !== this && e.getAttribute("name") === this.name && e.form === t);
516
522
  }
523
+ get isCheckable() {
524
+ return this.type === "checkbox" || this.type === "radio";
525
+ }
526
+ checkableGroup() {
527
+ return this.type === "radio" ? [this, ...this.radioGroupMembers()] : [this];
528
+ }
529
+ checkableValueMissing(e) {
530
+ return this.type === "radio" ? e.some((e) => e.required) && !e.some((e) => Q(e.checked)) : this.required && !Q(this.checked);
531
+ }
532
+ syncCheckedState() {
533
+ if (!this.internals) return;
534
+ let e = Q(this.checked);
535
+ this.internals.ariaChecked = String(e), e ? (this.internals.setFormValue((typeof this.value == "string" ? this.value : "") || X), this.internals.states?.add(ve)) : (this.internals.setFormValue(null), this.internals.states?.delete(ve)), this.inputRef?.value && this.inputRef.value.checked !== e && (this.inputRef.value.checked = e);
536
+ }
537
+ validateCheckable() {
538
+ let t = this.checkableGroup();
539
+ t.forEach((n) => {
540
+ if (!(n instanceof e)) return;
541
+ let r = n;
542
+ r.inputRef?.value && r.manageValidity(r.inputRef.value, t);
543
+ });
544
+ }
517
545
  coordinateRadioGroup() {
518
- !this.name || this.type !== "radio" || this.radioGroupMembers().forEach((e) => {
519
- if (e.getAttribute("value") === this.value) return;
520
- let t = e;
521
- t.checked && (t.checked = !1, t.internals && (t.internals.setFormValue(null), t.internals.states?.delete(Z)));
546
+ !this.name || this.type !== "radio" || this.radioGroupMembers().forEach((t) => {
547
+ t instanceof e ? Q(t.checked) && (t.checked = !1, t.syncCheckedState()) : t.checked &&= !1;
522
548
  });
523
549
  }
524
550
  valueChecked(e) {
525
- if (this.touched) {
526
- if (this.type === "radio" && this.coordinateRadioGroup(), typeof e == "string" ? (this.checked = e === "true", this.internals.ariaChecked = String(e === "true")) : typeof e == "boolean" && (this.checked = e, this.internals.ariaChecked = String(e)), this.checked) {
527
- let e = (typeof this.value == "string" ? this.value : "") || X;
528
- this.internals.setFormValue(e), this.internals.states.add(Z);
529
- } else this.internals.setFormValue(null), this.internals.states.delete(Z);
530
- this.dispatchChangeEvents(this.checked), this.internals.reportValidity();
531
- }
551
+ this.touched && (this.type === "radio" && this.coordinateRadioGroup(), typeof e == "string" ? this.checked = e === "true" : typeof e == "boolean" && (this.checked = e), this.syncCheckedState(), this.validateCheckable(), this.dispatchChangeEvents(this.checked));
532
552
  }
533
553
  valueChanged(e, t) {
534
554
  let n = e;
@@ -537,7 +557,7 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
537
557
  let e = typeof n == "object" ? n?.constructor?.name ?? "object" : typeof n;
538
558
  console.warn(`${this.localName}: value må være en streng eller et tall, men fikk ${e}. Verdien ignoreres. For dato-/tidsfelt, send en ISO-formatert streng (f.eks. "2026-07-09" eller "13:45").`);
539
559
  }
540
- (t !== this.value || t !== this._value) && (typeof e == "string" ? ((this.multiple || this.range) && e.includes(Q) && (e = e.split(Q)), this.value = e, this._value = Array.isArray(e) ? e : [e]) : Array.isArray(e) ? (this.value = this.multiple || this.range ? e : e[0], this._value = e) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && t && t.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== t?.toString() && this.onChange(this.value));
560
+ (t !== this.value || t !== this._value) && (typeof e == "string" ? ((this.multiple || this.range) && e.includes(Z) && (e = e.split(Z)), this.value = e, this._value = Array.isArray(e) ? e : [e]) : Array.isArray(e) ? (this.value = this.multiple || this.range ? e : e[0], this._value = e) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && t && t.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== t?.toString() && this.onChange(this.value));
541
561
  }
542
562
  dispatchChangeEvents(e) {
543
563
  this.dispatchEvent(new Event("change", {
@@ -572,7 +592,7 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
572
592
  }));
573
593
  }
574
594
  normalizeValue(e) {
575
- return (this.range || this.multiple) && typeof e == "string" && e.includes(Q) ? e.split(Q) : !this.multiple && !this.range && Array.isArray(e) ? e[0] || "" : e;
595
+ return (this.range || this.multiple) && typeof e == "string" && e.includes(Z) ? e.split(Z) : !this.multiple && !this.range && Array.isArray(e) ? e[0] || "" : e;
576
596
  }
577
597
  validate() {
578
598
  this.inputRef?.value && this.manageValidity(this.inputRef.value), this.inputRefTo?.value && this.manageValidity(this.inputRefTo.value);
@@ -585,7 +605,7 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
585
605
  formResetCallback() {
586
606
  if (this.touched = !1, this._options && this._options.length && this._options.forEach((e) => {
587
607
  "selected" in e && (e.selected = !1);
588
- }), this.checked !== void 0) this.checked = !1, this.internals.ariaChecked = "false", this.internals.setFormValue(""), this.inputRef?.value && "checked" in this.inputRef.value && (this.inputRef.value.checked = !1), this.valueChecked(this.checked);
608
+ }), this.checked !== void 0) this.checked = this._defaultCheckedState, this.syncCheckedState(), this.validateCheckable();
589
609
  else {
590
610
  this.internals.setFormValue("");
591
611
  let e = this.defaultValue || (this.multiple || this.range ? [] : "");
@@ -594,108 +614,113 @@ var X = "on", Z = "--checked", Q = ",", $ = class extends r {
594
614
  this.internals.ariaInvalid = "false";
595
615
  }
596
616
  updated(e) {
597
- super.updated(e), e.has("dataTestid") && this.dataTestid && this.inputRef.value && (this.skipForwardTestid ? this.hasAttribute("data-testid") || this.setAttribute("data-testid", this.dataTestid) : (this.inputRef.value.dataset.testid = this.dataTestid, this.removeAttribute("data-testid")));
617
+ super.updated(e), this.isCheckable && this._initialized && (e.has("defaultChecked") && e.get("defaultChecked") !== void 0 && (this._defaultCheckedState = !!this.defaultChecked), [
618
+ "checked",
619
+ "value",
620
+ "required",
621
+ "name"
622
+ ].some((t) => e.has(t)) && (this.syncCheckedState(), this.validateCheckable())), e.has("dataTestid") && this.dataTestid && this.inputRef.value && (this.skipForwardTestid ? this.hasAttribute("data-testid") || this.setAttribute("data-testid", this.dataTestid) : (this.inputRef.value.dataset.testid = this.dataTestid, this.removeAttribute("data-testid")));
598
623
  }
599
624
  willUpdate(e) {
600
625
  super.willUpdate(e), !this._didInitDerivedState && (this._didInitDerivedState = !0, this.defaultChecked && (this.checked = !0), this.id && !this.name && (this.name = this.id), this.value && this.defaultValue === null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null));
601
626
  }
602
627
  firstUpdated(e) {
603
628
  if (super.firstUpdated(e), this.value && this.defaultValue === null && (this.defaultValue = this.value), this.defaultValue !== null && !this.value && this.valueChanged(this.defaultValue, null), this.defaultChecked && (this.internals.ariaChecked = "true"), this.required && (this.internals.ariaRequired = "true"), this.disabled && (this.internals.ariaDisabled = "true"), this.checked !== void 0) {
604
- let e = this.checked === "" || this.checked === "true" || this.checked === !0;
605
- this.internals.ariaChecked = String(e);
629
+ let e = Q(this.checked);
630
+ this._defaultCheckedState = e, this.internals.ariaChecked = String(e);
606
631
  let t = e ? (typeof this.value == "string" ? this.value : "") || X : null;
607
632
  this.internals.setFormValue(t);
608
633
  } else this.setFormValue(this.value);
609
- this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value)), this.updateComplete.then(() => {
634
+ this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.isCheckable ? this.validateCheckable() : this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value)), this.updateComplete.then(() => {
610
635
  this._initialized = !0;
611
636
  });
612
637
  }
613
638
  };
614
- e([t({
639
+ t([n({
615
640
  type: Boolean,
616
641
  reflect: !0
617
- })], $.prototype, "checked", void 0), e([t({ type: Boolean })], $.prototype, "defaultChecked", void 0), e([t({ type: Boolean })], $.prototype, "multiple", void 0), e([t({ type: Boolean })], $.prototype, "range", void 0), e([t({
642
+ })], $.prototype, "checked", void 0), t([n({ type: Boolean })], $.prototype, "defaultChecked", void 0), t([n({ type: Boolean })], $.prototype, "multiple", void 0), t([n({ type: Boolean })], $.prototype, "range", void 0), t([n({
618
643
  type: String,
619
644
  reflect: !0
620
- })], $.prototype, "type", void 0), e([t()], $.prototype, "defaultValue", void 0), e([t({
645
+ })], $.prototype, "type", void 0), t([n()], $.prototype, "defaultValue", void 0), t([n({
621
646
  type: Boolean,
622
647
  reflect: !0
623
- })], $.prototype, "disabled", void 0), e([t({
648
+ })], $.prototype, "disabled", void 0), t([n({
624
649
  type: Boolean,
625
650
  reflect: !0
626
- })], $.prototype, "readonly", void 0), e([t({
651
+ })], $.prototype, "readonly", void 0), t([n({
627
652
  type: Boolean,
628
653
  reflect: !0
629
- })], $.prototype, "required", void 0), e([t({
654
+ })], $.prototype, "required", void 0), t([n({
630
655
  reflect: !0,
631
656
  converter: {
632
657
  fromAttribute: (e) => e,
633
658
  toAttribute: (e) => e?.toString() ?? null
634
659
  }
635
- })], $.prototype, "max", void 0), e([t({
660
+ })], $.prototype, "max", void 0), t([n({
636
661
  type: Number,
637
662
  reflect: !0
638
- })], $.prototype, "maxlength", void 0), e([t({
663
+ })], $.prototype, "maxlength", void 0), t([n({
639
664
  reflect: !0,
640
665
  converter: {
641
666
  fromAttribute: (e) => e,
642
667
  toAttribute: (e) => e?.toString() ?? null
643
668
  }
644
- })], $.prototype, "min", void 0), e([t({
669
+ })], $.prototype, "min", void 0), t([n({
645
670
  type: Number,
646
671
  reflect: !0
647
- })], $.prototype, "minlength", void 0), e([t({
672
+ })], $.prototype, "minlength", void 0), t([n({
648
673
  type: Number,
649
674
  reflect: !0
650
- })], $.prototype, "step", void 0), e([t({
675
+ })], $.prototype, "step", void 0), t([n({
651
676
  type: String,
652
677
  attribute: "aria-describedby"
653
- })], $.prototype, "ariaDescribedby", void 0), e([t({
678
+ })], $.prototype, "ariaDescribedby", void 0), t([n({
654
679
  type: String,
655
680
  attribute: "aria-labelledby"
656
- })], $.prototype, "ariaLabelledby", void 0), e([t({
681
+ })], $.prototype, "ariaLabelledby", void 0), t([n({
657
682
  type: String,
658
683
  reflect: !0
659
- })], $.prototype, "name", void 0), e([t({
684
+ })], $.prototype, "name", void 0), t([n({
660
685
  type: String,
661
686
  reflect: !0
662
- })], $.prototype, "pattern", void 0), e([t({
687
+ })], $.prototype, "pattern", void 0), t([n({
663
688
  type: String,
664
689
  reflect: !0
665
- })], $.prototype, "placeholder", void 0), e([t({
690
+ })], $.prototype, "placeholder", void 0), t([n({
666
691
  type: String,
667
692
  reflect: !0
668
- })], $.prototype, "id", void 0), e([t({
693
+ })], $.prototype, "id", void 0), t([n({
669
694
  type: Boolean,
670
- converter: i
671
- })], $.prototype, "counter", void 0), e([t({ type: Boolean })], $.prototype, "hasError", void 0), e([t({ type: Boolean })], $.prototype, "inline", void 0), e([t({
695
+ converter: a
696
+ })], $.prototype, "counter", void 0), t([n({ type: Boolean })], $.prototype, "hasError", void 0), t([n({ type: Boolean })], $.prototype, "inline", void 0), t([n({
672
697
  type: Boolean,
673
- converter: i
674
- })], $.prototype, "hasFieldset", void 0), e([t({ type: Boolean })], $.prototype, "optionalTag", void 0), e([t({ type: Boolean })], $.prototype, "requiredTag", void 0), e([t({ type: Boolean })], $.prototype, "skipForwardTestid", void 0), e([t({
698
+ converter: a
699
+ })], $.prototype, "hasFieldset", void 0), t([n({ type: Boolean })], $.prototype, "optionalTag", void 0), t([n({ type: Boolean })], $.prototype, "requiredTag", void 0), t([n({ type: Boolean })], $.prototype, "skipForwardTestid", void 0), t([n({
675
700
  type: Boolean,
676
701
  reflect: !0,
677
- converter: a
678
- })], $.prototype, "useWrapper", void 0), e([t({
702
+ converter: o
703
+ })], $.prototype, "useWrapper", void 0), t([n({
679
704
  type: Boolean,
680
705
  reflect: !0
681
- })], $.prototype, "fullwidth", void 0), e([t({ type: Number })], $.prototype, "counterMaxLength", void 0), e([t({ type: String })], $.prototype, "errorMessage", void 0), e([t({ type: String })], $.prototype, "helptext", void 0), e([t({ type: String })], $.prototype, "helptextDropdown", void 0), e([t({
706
+ })], $.prototype, "fullwidth", void 0), t([n({ type: Number })], $.prototype, "counterMaxLength", void 0), t([n({ type: String })], $.prototype, "errorMessage", void 0), t([n({ type: String })], $.prototype, "helptext", void 0), t([n({ type: String })], $.prototype, "helptextDropdown", void 0), t([n({
682
707
  type: String,
683
708
  reflect: !1
684
- })], $.prototype, "helptextDropdownButton", void 0), e([t({ type: String })], $.prototype, "label", void 0), e([t({
709
+ })], $.prototype, "helptextDropdownButton", void 0), t([n({ type: String })], $.prototype, "label", void 0), t([n({
685
710
  type: String,
686
711
  reflect: !1
687
- })], $.prototype, "optionalText", void 0), e([t({
712
+ })], $.prototype, "optionalText", void 0), t([n({
688
713
  type: String,
689
714
  reflect: !1
690
- })], $.prototype, "requiredText", void 0), e([t({
715
+ })], $.prototype, "requiredText", void 0), t([n({
691
716
  type: String,
692
717
  reflect: !1
693
- })], $.prototype, "tagText", void 0), e([t({
718
+ })], $.prototype, "tagText", void 0), t([n({
694
719
  type: String,
695
720
  attribute: "input-size"
696
- })], $.prototype, "inputSize", void 0), e([t({
721
+ })], $.prototype, "inputSize", void 0), t([n({
697
722
  type: String,
698
723
  attribute: "data-testid"
699
- })], $.prototype, "dataTestid", void 0);
724
+ })], $.prototype, "dataTestid", void 0), t([e()], $.prototype, "formDisabled", void 0);
700
725
  //#endregion
701
726
  export { $ as t };