@oslokommune/punkt-elements 19.17.1 → 19.18.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 (166) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{accordion-B0zAUNUV.js → accordion-GheghzDV.js} +1 -1
  3. package/dist/{accordion-Cx-Gh3hc.cjs → accordion-XX12Iouj.cjs} +1 -1
  4. package/dist/{alert-BRZDpVMt.cjs → alert-SQdshv-F.cjs} +1 -1
  5. package/dist/{alert-JnRrtTOW.js → alert-gty76GoA.js} +3 -3
  6. package/dist/{backlink-CsFeerTH.cjs → backlink-CNRyH73A.cjs} +1 -1
  7. package/dist/{backlink-D8Rv46lA.js → backlink-HF3DMgLc.js} +1 -1
  8. package/dist/{breadcrumbs-D03id_ha.cjs → breadcrumbs-YQ1orAK_.cjs} +1 -1
  9. package/dist/{breadcrumbs-ybOBe_op.js → breadcrumbs-qyZMkJtA.js} +1 -1
  10. package/dist/{button-ChdHZYBF.js → button-Cf5ReNPj.js} +22 -25
  11. package/dist/button-DMytp-Jt.cjs +32 -0
  12. package/dist/{calendar-BQCjUQvP.js → calendar-D5xCL3xC.js} +1 -1
  13. package/dist/{calendar-CFTrX0C5.cjs → calendar-xmCeJYlb.cjs} +1 -1
  14. package/dist/{card-COseC8ZL.cjs → card-Dc9p91TY.cjs} +1 -1
  15. package/dist/{card-DSTEL8Kv.js → card-k-3UP5NP.js} +3 -3
  16. package/dist/{checkbox-CKYNnLDh.js → checkbox-C4faOikK.js} +1 -1
  17. package/dist/{checkbox-DkFswqr-.cjs → checkbox-CbogvdEA.cjs} +1 -1
  18. package/dist/{checkbox-group-1ghi5uHp.js → checkbox-group-6vOqwCRi.js} +2 -2
  19. package/dist/{checkbox-group-lcxR3cYR.cjs → checkbox-group-YyhtneCi.cjs} +1 -1
  20. package/dist/{combobox-iXYiaWbN.js → combobox-D0J03ikb.js} +6 -6
  21. package/dist/{combobox-CaWnlvTX.cjs → combobox-hbHEJIxp.cjs} +1 -1
  22. package/dist/components/index.d.ts +1 -0
  23. package/dist/components/textarea/index.d.ts +1 -0
  24. package/dist/components/textarea/textarea.d.ts +17 -1
  25. package/dist/{consent-BwH89xk_.cjs → consent-BCrPGLXe.cjs} +1 -1
  26. package/dist/{consent-DiD0iQ5h.js → consent-hhwIP8m5.js} +1 -1
  27. package/dist/{datepicker-Da8SfyVG.cjs → datepicker-BSQV2yhB.cjs} +3 -3
  28. package/dist/{datepicker-DTcow1ih.js → datepicker-ChGCD7Gf.js} +134 -137
  29. package/dist/{element-with-slot-C0bH0T0H.js → element-with-slot-BP-IBGq0.js} +107 -108
  30. package/dist/element-with-slot-gdQbNteD.cjs +1 -0
  31. package/dist/{fileupload-Cb1c7ul0.cjs → fileupload-BKae4SiP.cjs} +1 -1
  32. package/dist/{fileupload-BNAQ9tNR.js → fileupload-CAZrdubx.js} +5 -5
  33. package/dist/{footer-BOwcLSsz.js → footer-JAQGiWJh.js} +2 -2
  34. package/dist/{footer-Cl_Da5Iq.cjs → footer-wmH_UXCd.cjs} +1 -1
  35. package/dist/{header-CvER8wo6.cjs → header-CB-CiwsK.cjs} +1 -1
  36. package/dist/{header-Cwr995oK.js → header-bvY1RA0W.js} +7 -7
  37. package/dist/{header-menu-CsL4DZE2.js → header-menu-BJNxDdhj.js} +2 -2
  38. package/dist/{header-menu-D-wOwG1V.cjs → header-menu-BlvU5Y1U.cjs} +1 -1
  39. package/dist/{heading-DhTyaJms.js → heading-Br5s4zO0.js} +1 -1
  40. package/dist/{heading-D4Kkb6-N.cjs → heading-CBxJ3UCj.cjs} +1 -1
  41. package/dist/{helptext-p0nwJsyf.cjs → helptext-5_uOsEMN.cjs} +1 -1
  42. package/dist/{helptext-DN0jjgVu.js → helptext-B6xxUfvv.js} +2 -2
  43. package/dist/{icon-CLMJYuTL.js → icon-D3XT49vM.js} +7 -1
  44. package/dist/icon-Dk8y6odR.cjs +1 -0
  45. package/dist/{input-element-BOi7rBbw.cjs → input-element-CCV_e85v.cjs} +1 -1
  46. package/dist/{input-element-0yYtRu0p.js → input-element-DhNSPDnG.js} +1 -1
  47. package/dist/{input-wrapper-BSjQc4Vx.js → input-wrapper-D-w6uRXZ.js} +4 -4
  48. package/dist/{input-wrapper-4PTk8aX3.cjs → input-wrapper-D1RqTzm4.cjs} +1 -1
  49. package/dist/{link-Dj6SbcaD.cjs → link-DW6O3Ko1.cjs} +1 -1
  50. package/dist/{link-39EvU2ng.js → link-DzWPIXm1.js} +2 -2
  51. package/dist/{linkcard-K9vvKg1u.js → linkcard-Dda2K5te.js} +2 -2
  52. package/dist/{linkcard-BoQIfci8.cjs → linkcard-EOwwQZeY.cjs} +1 -1
  53. package/dist/{loader-BRYL5kTN.cjs → loader-CnsELZFa.cjs} +1 -1
  54. package/dist/{loader-MoI2VRFr.js → loader-DXKGCBqh.js} +2 -2
  55. package/dist/{messagebox-CiOQUt0C.cjs → messagebox-CIgUgKhu.cjs} +1 -1
  56. package/dist/{messagebox-Dr-k3pnZ.js → messagebox-DPVRQ3PY.js} +2 -2
  57. package/dist/{modal-DbzEnZNF.js → modal-BWaMErv7.js} +2 -2
  58. package/dist/{modal-DGiq84MG.cjs → modal-Cp10a22a.cjs} +1 -1
  59. package/dist/{option-group-element-CH0sgVIl.cjs → option-group-element-D_UW097C.cjs} +1 -1
  60. package/dist/{option-group-element-DC364Rw_.js → option-group-element-d9TouZ2M.js} +2 -2
  61. package/dist/pkt-accordion.cjs +1 -1
  62. package/dist/pkt-accordion.js +1 -1
  63. package/dist/pkt-alert.cjs +1 -1
  64. package/dist/pkt-alert.js +1 -1
  65. package/dist/pkt-backlink.cjs +1 -1
  66. package/dist/pkt-backlink.js +1 -1
  67. package/dist/pkt-breadcrumbs.cjs +1 -1
  68. package/dist/pkt-breadcrumbs.js +1 -1
  69. package/dist/pkt-button.cjs +1 -1
  70. package/dist/pkt-button.js +1 -1
  71. package/dist/pkt-calendar.cjs +1 -1
  72. package/dist/pkt-calendar.js +1 -1
  73. package/dist/pkt-card.cjs +1 -1
  74. package/dist/pkt-card.js +1 -1
  75. package/dist/pkt-checkbox-group.cjs +1 -1
  76. package/dist/pkt-checkbox-group.js +1 -1
  77. package/dist/pkt-checkbox.cjs +1 -1
  78. package/dist/pkt-checkbox.js +1 -1
  79. package/dist/pkt-combobox.cjs +1 -1
  80. package/dist/pkt-combobox.js +1 -1
  81. package/dist/pkt-consent.cjs +1 -1
  82. package/dist/pkt-consent.js +1 -1
  83. package/dist/pkt-datepicker.cjs +1 -1
  84. package/dist/pkt-datepicker.js +1 -1
  85. package/dist/pkt-fileupload.cjs +1 -1
  86. package/dist/pkt-fileupload.js +1 -1
  87. package/dist/pkt-footer.cjs +1 -1
  88. package/dist/pkt-footer.js +1 -1
  89. package/dist/pkt-header-menu.cjs +1 -1
  90. package/dist/pkt-header-menu.js +1 -1
  91. package/dist/pkt-header.cjs +1 -1
  92. package/dist/pkt-header.js +1 -1
  93. package/dist/pkt-heading.cjs +1 -1
  94. package/dist/pkt-heading.js +1 -1
  95. package/dist/pkt-helptext.cjs +1 -1
  96. package/dist/pkt-helptext.js +1 -1
  97. package/dist/pkt-icon.cjs +1 -1
  98. package/dist/pkt-icon.js +1 -1
  99. package/dist/pkt-index.cjs +1 -1
  100. package/dist/pkt-index.js +36 -36
  101. package/dist/pkt-input-wrapper.cjs +1 -1
  102. package/dist/pkt-input-wrapper.js +1 -1
  103. package/dist/pkt-link.cjs +1 -1
  104. package/dist/pkt-link.js +1 -1
  105. package/dist/pkt-linkcard.cjs +1 -1
  106. package/dist/pkt-linkcard.js +1 -1
  107. package/dist/pkt-loader.cjs +1 -1
  108. package/dist/pkt-loader.js +1 -1
  109. package/dist/pkt-messagebox.cjs +1 -1
  110. package/dist/pkt-messagebox.js +1 -1
  111. package/dist/pkt-modal.cjs +1 -1
  112. package/dist/pkt-modal.js +1 -1
  113. package/dist/{pkt-options-controller-D1sKTkbR.cjs → pkt-options-controller-DcwERZzm.cjs} +1 -1
  114. package/dist/{pkt-options-controller-BikFfGcZ.js → pkt-options-controller-LiApNBoZ.js} +1 -1
  115. package/dist/pkt-progressbar.cjs +1 -1
  116. package/dist/pkt-progressbar.js +1 -1
  117. package/dist/pkt-radio-group.cjs +1 -1
  118. package/dist/pkt-radio-group.js +1 -1
  119. package/dist/pkt-radiobutton.cjs +1 -1
  120. package/dist/pkt-radiobutton.js +1 -1
  121. package/dist/pkt-searchinput.cjs +1 -1
  122. package/dist/pkt-searchinput.js +1 -1
  123. package/dist/pkt-select.cjs +1 -1
  124. package/dist/pkt-select.js +1 -1
  125. package/dist/pkt-tabs.cjs +1 -1
  126. package/dist/pkt-tabs.js +1 -1
  127. package/dist/pkt-tag.cjs +1 -1
  128. package/dist/pkt-tag.js +1 -1
  129. package/dist/pkt-textarea.cjs +1 -1
  130. package/dist/pkt-textarea.js +1 -1
  131. package/dist/pkt-textinput.cjs +1 -1
  132. package/dist/pkt-textinput.js +1 -1
  133. package/dist/pkt-timepicker.cjs +1 -1
  134. package/dist/pkt-timepicker.js +1 -1
  135. package/dist/{progressbar-t0zgEke0.js → progressbar-CMwFXEMB.js} +1 -1
  136. package/dist/{progressbar-CnX4fFfR.cjs → progressbar-eRJU41Uc.cjs} +1 -1
  137. package/dist/{radio-group-DJikniZi.js → radio-group-B_NEwwP7.js} +2 -2
  138. package/dist/{radio-group-XCYKqoLD.cjs → radio-group-dQrEQ1pX.cjs} +1 -1
  139. package/dist/{radiobutton-PYQKVnNQ.js → radiobutton-DWZ4VgYg.js} +1 -1
  140. package/dist/{radiobutton-DgkML7sd.cjs → radiobutton-mXqSvSQE.cjs} +1 -1
  141. package/dist/{searchinput-Mdc9Ihld.cjs → searchinput-CVpPmZAJ.cjs} +1 -1
  142. package/dist/{searchinput-BzYifHBf.js → searchinput-Ca6zFqH5.js} +1 -1
  143. package/dist/{select-CorofYxz.js → select-DhQk3S6t.js} +4 -4
  144. package/dist/{select-D8TC1msV.cjs → select-DkO-UPUY.cjs} +1 -1
  145. package/dist/shared-types/index.d.ts +2 -0
  146. package/dist/shared-types/textarea.d.ts +67 -0
  147. package/dist/{tabs-B63J6MXb.cjs → tabs-DvVYDYVh.cjs} +1 -1
  148. package/dist/{tabs-DDakCTkY.js → tabs-Y2-2pD42.js} +2 -2
  149. package/dist/{tag-BPvGZcKf.js → tag-B9GawuIf.js} +2 -2
  150. package/dist/{tag-6IPe9bwQ.cjs → tag-BEFxzKsm.cjs} +1 -1
  151. package/dist/textarea-CEHqACey.cjs +50 -0
  152. package/dist/{textarea-BZCUHjEj.js → textarea-S0pRMEnT.js} +25 -13
  153. package/dist/{textinput-BZPGcxZV.cjs → textinput-BdQ3FZ8R.cjs} +1 -1
  154. package/dist/{textinput-D_oEaI41.js → textinput-DkfjnDvX.js} +4 -4
  155. package/dist/{timepicker-C0d92R8u.cjs → timepicker-BssDur6k.cjs} +1 -1
  156. package/dist/{timepicker-JBOeZg-7.js → timepicker-DI3oiK4L.js} +4 -4
  157. package/package.json +14 -15
  158. package/src/components/icon/icon.test.ts +21 -0
  159. package/src/components/icon/icon.ts +7 -2
  160. package/src/components/index.ts +1 -0
  161. package/src/components/textarea/index.ts +1 -0
  162. package/src/components/textarea/textarea.ts +34 -2
  163. package/dist/button-Ca_V13cQ.cjs +0 -32
  164. package/dist/element-with-slot-DkyaNnm0.cjs +0 -1
  165. package/dist/icon-jPhyZD1z.cjs +0 -1
  166. package/dist/textarea-BiCZBjOe.cjs +0 -50
@@ -1,20 +1,20 @@
1
1
  import { _ as e, d as t, h as n, l as r, n as i, s as a, t as o, u as s } from "./element-ckeMVgMz.js";
2
2
  import { t as c } from "./class-map-BkEYw5uE.js";
3
- import { n as ee } from "./element-with-slot-C0bH0T0H.js";
4
- import "./icon-CLMJYuTL.js";
5
- import "./input-wrapper-BSjQc4Vx.js";
6
- import "./calendar-BQCjUQvP.js";
7
- import { t as l } from "./if-defined-D18nY_K_.js";
8
- import { n as u, t as d } from "./ref-D4OwQYdf.js";
9
- import { a as f, c as p, d as m, h, i as g, m as _, n as v, r as y, s as b, t as x, u as S } from "./converters-CYgQrWVm.js";
10
- import "./tag-BPvGZcKf.js";
11
- import { t as C } from "./repeat-BGbBqnfz.js";
12
- import { n as w, t as T } from "./utils-BwF4QSrq.js";
13
- import { t as E } from "./input-element-0yYtRu0p.js";
3
+ import { n as l } from "./element-with-slot-BP-IBGq0.js";
4
+ import "./icon-D3XT49vM.js";
5
+ import "./input-wrapper-D-w6uRXZ.js";
6
+ import "./calendar-D5xCL3xC.js";
7
+ import { t as u } from "./if-defined-D18nY_K_.js";
8
+ import { n as d, t as f } from "./ref-D4OwQYdf.js";
9
+ import { a as p, c as m, d as h, h as g, i as _, m as v, n as y, r as b, s as x, t as S, u as ee } from "./converters-CYgQrWVm.js";
10
+ import "./tag-B9GawuIf.js";
11
+ import { t as te } from "./repeat-BGbBqnfz.js";
12
+ import { n as C, t as w } from "./utils-BwF4QSrq.js";
13
+ import { t as T } from "./input-element-DhNSPDnG.js";
14
14
  //#region src/components/datepicker/date-tags.ts
15
- var D = class extends o {
15
+ var E = class extends o {
16
16
  constructor(...e) {
17
- super(...e), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = w();
17
+ super(...e), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = C();
18
18
  }
19
19
  render() {
20
20
  return this.classes = {
@@ -22,33 +22,33 @@ var D = class extends o {
22
22
  [this.className]: !0
23
23
  }, e`
24
24
  <div class=${c(this.classes)} aria-live="polite">
25
- ${Array.isArray(this.dates) && this.dates[0] ? C(h((this.dates ?? []).filter(Boolean)), (e) => e, (t) => e` <pkt-tag
25
+ ${Array.isArray(this.dates) && this.dates[0] ? te(g((this.dates ?? []).filter(Boolean)), (e) => e, (t) => e` <pkt-tag
26
26
  id=${this.idBase + t + "-tag"}
27
27
  closeTag
28
28
  @close=${() => {
29
29
  this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: t }));
30
30
  }}
31
- .ariaLabel=${`${this.pktStrings.get("datepicker").deleteDate} ${p(t, this.dateformat)}`}
31
+ .ariaLabel=${`${this.pktStrings.get("datepicker").deleteDate} ${m(t, this.dateformat)}`}
32
32
  >
33
- <time datetime=${t}>${p(t, this.dateformat)}</time>
33
+ <time datetime=${t}>${m(t, this.dateformat)}</time>
34
34
  </pkt-tag>`) : n}
35
35
  </div>
36
36
  `;
37
37
  }
38
38
  };
39
- i([s({ type: Array })], D.prototype, "dates", void 0), i([s({ type: String })], D.prototype, "dateformat", void 0), i([s({
39
+ i([s({ type: Array })], E.prototype, "dates", void 0), i([s({ type: String })], E.prototype, "dateformat", void 0), i([s({
40
40
  type: String,
41
41
  attribute: "class"
42
- })], D.prototype, "className", void 0), i([s({
42
+ })], E.prototype, "className", void 0), i([s({
43
43
  type: String,
44
44
  attribute: "id-base"
45
- })], D.prototype, "idBase", void 0);
45
+ })], E.prototype, "idBase", void 0);
46
46
  try {
47
- t("pkt-date-tags")(D);
47
+ t("pkt-date-tags")(E);
48
48
  } catch {
49
49
  console.warn("Forsøker å definere <pkt-date-tags>, men den er allerede definert");
50
50
  }
51
- var O = {
51
+ var D = {
52
52
  name: "pkt-datepicker",
53
53
  react: "PktDatepicker",
54
54
  "css-class": "pkt-datepicker",
@@ -335,10 +335,10 @@ var O = {
335
335
  description: "Returnerer en <code>string[]</code> med valgte datoer i ISO-format. I range-modus utløses kun når begge datoer er valgt."
336
336
  }
337
337
  }
338
- }, k = () => {
338
+ }, O = () => {
339
339
  let e = navigator.userAgent;
340
340
  return !!(/iP(hone|od|ad)/.test(e) || /Macintosh/.test(e) && "ontouchend" in document);
341
- }, A = () => k() ? "text" : "date", j = (e) => !e || e.length !== 2 || S(e[0], e[1]), M = (e) => h(e), N = (e, t, n, r, i) => g(e, t, n, r, i), P = (e, t, n, r, i, a, o = "medium") => ({
341
+ }, k = () => O() ? "text" : "date", A = (e) => !e || e.length !== 2 || ee(e[0], e[1]), j = (e) => g(e), M = (e, t, n, r, i) => _(e, t, n, r, i), N = (e, t, n, r, i, a, o = "medium") => ({
342
342
  "pkt-input": !0,
343
343
  "pkt-datepicker__input": !0,
344
344
  [`pkt-input--${o}`]: !0,
@@ -347,31 +347,31 @@ var O = {
347
347
  "pkt-datepicker--multiple": n,
348
348
  "pkt-datepicker--range": r,
349
349
  "ios-readonly-hack": i === !1 && a === "text"
350
- }), F = (e = "medium") => ({
350
+ }), P = (e = "medium") => ({
351
351
  "pkt-input-icon": !0,
352
352
  "pkt-btn": !0,
353
353
  "pkt-btn--icon-only": !0,
354
354
  "pkt-btn--tertiary": !0,
355
355
  [`pkt-btn--${e}`]: !0,
356
356
  "pkt-datepicker__calendar-button": !0
357
- }), I = (e) => ({
357
+ }), F = (e) => ({
358
358
  "pkt-input-prefix": e,
359
359
  "pkt-hide": !e
360
- }), L = (e, t, n) => !t && !n ? Array.isArray(e) ? e[0] || "" : e : Array.isArray(e) ? e.join(",") : e, R = (e, t, n = !1) => {
360
+ }), I = (e, t, n) => !t && !n ? Array.isArray(e) ? e[0] || "" : e : Array.isArray(e) ? e.join(",") : e, L = (e, t, n = !1) => {
361
361
  if (!e || !t) return;
362
362
  let r = t.parentElement?.getBoundingClientRect() || t.getBoundingClientRect(), i = n ? r.height + 30 : r.height, a = e.getBoundingClientRect().height, o = n ? "calc(100% - 30px)" : "100%";
363
363
  r && typeof window < "u" && r.top + a > window.innerHeight && r.top - a > 0 && (o = `calc(100% - ${i}px - ${a}px)`), e.style.top = o;
364
- }, z = (e, t, n, r, i, a) => {
364
+ }, R = (e, t, n, r, i, a) => {
365
365
  let { key: o } = e;
366
366
  o === "," && (e.preventDefault(), a ? a(e) : i && i()), (o === "Space" || o === " ") && (e.preventDefault(), t(e)), o === "Enter" && (e.preventDefault(), n ? n() : r ? r() : i && i());
367
- }, B = (e, t) => {
367
+ }, z = (e, t) => {
368
368
  let { key: n } = e;
369
369
  (n === "Enter" || n === " " || n === "Space") && (e.preventDefault(), t(e));
370
- }, V = {
371
- validateRangeOrder: j,
372
- sortDates: M,
373
- filterSelectableDates: N
374
- }, H = { getInputType: A }, U = {
370
+ }, B = {
371
+ validateRangeOrder: A,
372
+ sortDates: j,
373
+ filterSelectableDates: M
374
+ }, V = { getInputType: k }, H = {
375
375
  submitForm(e) {
376
376
  let t = e.internals?.form;
377
377
  t && t.requestSubmit();
@@ -389,22 +389,22 @@ var O = {
389
389
  };
390
390
  n && n > o ? t.setValidity({ rangeUnderflow: !0 }, s.dateUnderflow, e) : r && r < o && t.setValidity({ rangeOverflow: !0 }, s.dateOverflow, e);
391
391
  }
392
- }, W = {
392
+ }, U = {
393
393
  addToSelected(e, t, n, r) {
394
394
  let i = e.target;
395
395
  if (!i.value) return;
396
- let a = n ? m(n) : null, o = r ? m(r) : null, s = m(i.value.split(",")[0]);
396
+ let a = n ? h(n) : null, o = r ? h(r) : null, s = h(i.value.split(",")[0]);
397
397
  s && !isNaN(s.getTime()) && (!a || s >= a) && (!o || s <= o) && t.value && t.value.handleDateSelect(s), i.value = "";
398
398
  },
399
399
  handleCalendarPosition(e, t, n = !1) {
400
- R(e.value ?? null, t.value ?? null, n);
400
+ L(e.value ?? null, t.value ?? null, n);
401
401
  }
402
+ }, W = {
403
+ getInputClasses: N,
404
+ getButtonClasses: P,
405
+ getRangeLabelClasses: F
402
406
  }, G = {
403
- getInputClasses: P,
404
- getButtonClasses: F,
405
- getRangeLabelClasses: I
406
- }, K = {
407
- processDateSelection: L,
407
+ processDateSelection: I,
408
408
  updateInputValues(e, t, n, r, i, a) {
409
409
  e.value && (r && t?.value ? (e.value.value = n[0] ?? "", t.value.value = n[1] ?? "", a(e.value), a(t.value)) : i || (e.value.value = n.length ? n[0] : "", a(e.value)));
410
410
  },
@@ -412,16 +412,16 @@ var O = {
412
412
  let a = e.target;
413
413
  if (a.value) {
414
414
  i(a);
415
- let e = b(a.value);
415
+ let e = x(a.value);
416
416
  e && n?.value?.handleDateSelect(e);
417
417
  } else t[0] && r();
418
418
  }
419
- }, q = {
420
- handleInputKeydown: z,
421
- handleButtonKeydown: B
422
- }, J = class extends o {
419
+ }, K = {
420
+ handleInputKeydown: R,
421
+ handleButtonKeydown: z
422
+ }, q = class extends o {
423
423
  constructor(...e) {
424
- super(...e), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this._hasBeenOpened = !1, this.popupRef = d(), this.calendarRef = d(), this.handleDocumentClick = (e) => {
424
+ super(...e), this.open = !1, this.multiple = !1, this.range = !1, this.weeknumbers = !1, this.withcontrols = !1, this.maxMultiple = null, this.selected = [], this.earliest = null, this.latest = null, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this._hasBeenOpened = !1, this.popupRef = f(), this.calendarRef = f(), this.handleDocumentClick = (e) => {
425
425
  if (!this.open) return;
426
426
  let t = e.composedPath(), n = this.parentElement, r = this.popupRef.value;
427
427
  !t.includes(this) && !t.includes(r) && !(n && t.includes(n)) && (this.hide(), this.dispatchEvent(new CustomEvent("close", {
@@ -461,16 +461,16 @@ var O = {
461
461
  e && typeof e.focusOnCurrentDate == "function" && e.focusOnCurrentDate();
462
462
  }
463
463
  addToSelected(e, t, n) {
464
- if (this.calendarRef.value && typeof W.addToSelected == "function") return W.addToSelected(e, this.calendarRef, t, n);
464
+ if (this.calendarRef.value && typeof U.addToSelected == "function") return U.addToSelected(e, this.calendarRef, t, n);
465
465
  let r = e.target;
466
466
  if (!r.value) return;
467
- let i = t ? m(t) : null, a = n ? m(n) : null, o = m(r.value.split(",")[0]);
467
+ let i = t ? h(t) : null, a = n ? h(n) : null, o = h(r.value.split(",")[0]);
468
468
  o && !isNaN(o.getTime()) && (!i || o >= i) && (!a || o <= a) && this.handleDateSelect(o), r.value = "";
469
469
  }
470
470
  handleDateSelect(e) {
471
471
  let t = this.calendarRef.value;
472
472
  if (t && typeof t.handleDateSelect == "function") return t.handleDateSelect(e);
473
- let n = f(e), r = this.selected.indexOf(n) >= 0 ? this.selected.filter((e) => e !== n) : [...this.selected, n];
473
+ let n = p(e), r = this.selected.indexOf(n) >= 0 ? this.selected.filter((e) => e !== n) : [...this.selected, n];
474
474
  this.selected = r, this.dispatchEvent(new CustomEvent("date-selected", {
475
475
  detail: r,
476
476
  bubbles: !0,
@@ -486,13 +486,13 @@ var O = {
486
486
  return e`
487
487
  <div
488
488
  class="${c(t)}"
489
- ${u(this.popupRef)}
489
+ ${d(this.popupRef)}
490
490
  id="date-popup"
491
491
  ?hidden=${!this.open}
492
492
  aria-hidden="${!this.open}"
493
493
  >
494
494
  ${this.open || this._hasBeenOpened ? e`<pkt-calendar
495
- ${u(this.calendarRef)}
495
+ ${d(this.calendarRef)}
496
496
  ?multiple=${this.multiple}
497
497
  ?range=${this.range}
498
498
  ?weeknumbers=${this.weeknumbers}
@@ -526,17 +526,17 @@ var O = {
526
526
  i([s({
527
527
  type: Boolean,
528
528
  reflect: !0
529
- })], J.prototype, "open", void 0), i([s({ type: Boolean })], J.prototype, "multiple", void 0), i([s({ type: Boolean })], J.prototype, "range", void 0), i([s({ type: Boolean })], J.prototype, "weeknumbers", void 0), i([s({ type: Boolean })], J.prototype, "withcontrols", void 0), i([s({ type: Number })], J.prototype, "maxMultiple", void 0), i([s({ type: Array })], J.prototype, "selected", void 0), i([s({ type: String })], J.prototype, "earliest", void 0), i([s({ type: String })], J.prototype, "latest", void 0), i([s({ type: Array })], J.prototype, "excludedates", void 0), i([s({ type: Array })], J.prototype, "excludeweekdays", void 0), i([s({ type: String })], J.prototype, "currentmonth", void 0), i([s({ type: String })], J.prototype, "today", void 0), i([r()], J.prototype, "_hasBeenOpened", void 0);
529
+ })], q.prototype, "open", void 0), i([s({ type: Boolean })], q.prototype, "multiple", void 0), i([s({ type: Boolean })], q.prototype, "range", void 0), i([s({ type: Boolean })], q.prototype, "weeknumbers", void 0), i([s({ type: Boolean })], q.prototype, "withcontrols", void 0), i([s({ type: Number })], q.prototype, "maxMultiple", void 0), i([s({ type: Array })], q.prototype, "selected", void 0), i([s({ type: String })], q.prototype, "earliest", void 0), i([s({ type: String })], q.prototype, "latest", void 0), i([s({ type: Array })], q.prototype, "excludedates", void 0), i([s({ type: Array })], q.prototype, "excludeweekdays", void 0), i([s({ type: String })], q.prototype, "currentmonth", void 0), i([s({ type: String })], q.prototype, "today", void 0), i([r()], q.prototype, "_hasBeenOpened", void 0);
530
530
  try {
531
- t("pkt-datepicker-popup")(J);
531
+ t("pkt-datepicker-popup")(q);
532
532
  } catch {
533
533
  console.warn("Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert");
534
534
  }
535
535
  //#endregion
536
536
  //#region src/components/datepicker/datepicker-base.ts
537
- var Y = class extends o {
537
+ var J = class extends o {
538
538
  constructor(...e) {
539
- super(...e), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputSize = "medium", this.hasError = !1, this.hasHelptext = !1, this.inputRef = d(), this.btnRef = d();
539
+ super(...e), this.inputType = "date", this.id = "", this.readonly = !1, this.disabled = !1, this.inputClasses = {}, this.inputSize = "medium", this.hasError = !1, this.hasHelptext = !1, this.inputRef = f(), this.btnRef = f();
540
540
  }
541
541
  get describedBy() {
542
542
  return this.hasHelptext ? `${this.id}-input-helptext` : void 0;
@@ -590,7 +590,7 @@ var Y = class extends o {
590
590
  renderCalendarButton() {
591
591
  return e`
592
592
  <button
593
- class="${c(G.getButtonClasses(this.inputSize))}"
593
+ class="${c(W.getButtonClasses(this.inputSize))}"
594
594
  type="button"
595
595
  @click=${(e) => this.dispatchToggleCalendar(e)}
596
596
  @keydown=${(e) => {
@@ -609,10 +609,10 @@ var Y = class extends o {
609
609
  return this;
610
610
  }
611
611
  };
612
- i([s({ type: String })], Y.prototype, "inputType", void 0), i([s({ type: String })], Y.prototype, "id", void 0), i([s({ type: String })], Y.prototype, "min", void 0), i([s({ type: String })], Y.prototype, "max", void 0), i([s({ type: String })], Y.prototype, "placeholder", void 0), i([s({ type: Boolean })], Y.prototype, "readonly", void 0), i([s({ type: Boolean })], Y.prototype, "disabled", void 0), i([s({ type: Object })], Y.prototype, "inputClasses", void 0), i([s({ type: String })], Y.prototype, "inputSize", void 0), i([s({ type: Object })], Y.prototype, "internals", void 0), i([s({ type: Boolean })], Y.prototype, "hasError", void 0), i([s({ type: Boolean })], Y.prototype, "hasHelptext", void 0);
612
+ i([s({ type: String })], J.prototype, "inputType", void 0), i([s({ type: String })], J.prototype, "id", void 0), i([s({ type: String })], J.prototype, "min", void 0), i([s({ type: String })], J.prototype, "max", void 0), i([s({ type: String })], J.prototype, "placeholder", void 0), i([s({ type: Boolean })], J.prototype, "readonly", void 0), i([s({ type: Boolean })], J.prototype, "disabled", void 0), i([s({ type: Object })], J.prototype, "inputClasses", void 0), i([s({ type: String })], J.prototype, "inputSize", void 0), i([s({ type: Object })], J.prototype, "internals", void 0), i([s({ type: Boolean })], J.prototype, "hasError", void 0), i([s({ type: Boolean })], J.prototype, "hasHelptext", void 0);
613
613
  //#endregion
614
614
  //#region src/components/datepicker/datepicker-single.ts
615
- var X = class extends Y {
615
+ var Y = class extends J {
616
616
  constructor(...e) {
617
617
  super(...e), this.value = "";
618
618
  }
@@ -631,13 +631,13 @@ var X = class extends Y {
631
631
  .type=${this.inputType}
632
632
  id="${this.id}-input"
633
633
  .value=${this.value}
634
- min=${l(this.min)}
635
- max=${l(this.max)}
636
- placeholder=${l(this.placeholder)}
634
+ min=${u(this.min)}
635
+ max=${u(this.max)}
636
+ placeholder=${u(this.placeholder)}
637
637
  ?readonly=${this.isInputReadonly}
638
- aria-describedby=${l(this.describedBy)}
638
+ aria-describedby=${u(this.describedBy)}
639
639
  aria-invalid=${this.hasError}
640
- aria-errormessage=${l(this.errorMessageId)}
640
+ aria-errormessage=${u(this.errorMessageId)}
641
641
  @click=${(e) => {
642
642
  e.preventDefault(), this.dispatchToggleCalendar(e);
643
643
  }}
@@ -645,12 +645,12 @@ var X = class extends Y {
645
645
  e.preventDefault(), this.dispatchToggleCalendar(e);
646
646
  }}
647
647
  ?disabled=${this.disabled}
648
- @keydown=${(e) => q.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => U.submitFormOrFallback(this.internals, () => this.inputRef.value?.blur()), void 0, () => this.inputRef.value?.blur())}
648
+ @keydown=${(e) => K.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => H.submitFormOrFallback(this.internals, () => this.inputRef.value?.blur()), void 0, () => this.inputRef.value?.blur())}
649
649
  @input=${(e) => {
650
650
  this.dispatchInput(e), e.stopImmediatePropagation();
651
651
  }}
652
652
  @focus=${() => {
653
- this.dispatchFocus(), k() && this.dispatchToggleCalendar(new Event("focus"));
653
+ this.dispatchFocus(), O() && this.dispatchToggleCalendar(new Event("focus"));
654
654
  }}
655
655
  @blur=${(e) => {
656
656
  this.dispatchBlur(e), this.dispatchManageValidity(e.target), this.dispatchEvent(new CustomEvent("value-change", {
@@ -662,45 +662,45 @@ var X = class extends Y {
662
662
  @change=${(e) => {
663
663
  this.dispatchChange(e), e.stopImmediatePropagation();
664
664
  }}
665
- ${u(this.inputRef)}
665
+ ${d(this.inputRef)}
666
666
  />
667
667
  ${this.renderCalendarButton()}
668
668
  </div>
669
669
  `;
670
670
  }
671
671
  };
672
- i([s({ type: String })], X.prototype, "value", void 0);
672
+ i([s({ type: String })], Y.prototype, "value", void 0);
673
673
  try {
674
- t("pkt-datepicker-single")(X);
674
+ t("pkt-datepicker-single")(Y);
675
675
  } catch {
676
676
  console.warn("Forsøker å definere <pkt-datepicker-single>, men den er allerede definert");
677
677
  }
678
678
  //#endregion
679
679
  //#region src/components/datepicker/datepicker-range.ts
680
- var Z = class extends Y {
680
+ var X = class extends J {
681
681
  constructor(...e) {
682
- super(...e), this.value = [], this.label = "", this.showRangeLabels = !1, this.inputRefTo = d();
682
+ super(...e), this.value = [], this.label = "", this.showRangeLabels = !1, this.inputRefTo = f();
683
683
  }
684
684
  get inputElementTo() {
685
685
  return this.inputRefTo.value;
686
686
  }
687
687
  render() {
688
- let t = G.getRangeLabelClasses(this.showRangeLabels);
688
+ let t = W.getRangeLabelClasses(this.showRangeLabels);
689
689
  return e`
690
690
  <div class="pkt-input__container">
691
691
  ${this.showRangeLabels ? e` <div class="pkt-input-prefix">${this.pktStrings.get("generic").from}</div> ` : n}
692
692
  <input
693
- aria-describedby=${l(this.describedBy)}
693
+ aria-describedby=${u(this.describedBy)}
694
694
  aria-invalid=${this.hasError}
695
- aria-errormessage=${l(this.errorMessageId)}
695
+ aria-errormessage=${u(this.errorMessageId)}
696
696
  class=${c(this.inputClasses)}
697
697
  .type=${this.inputType}
698
698
  id="${this.id}-input"
699
699
  aria-label="${this.label} ${this.pktStrings.get("generic").from}"
700
700
  .value=${this.value[0] ?? ""}
701
- min=${l(this.min)}
702
- max=${l(this.max)}
703
- placeholder=${l(this.placeholder)}
701
+ min=${u(this.min)}
702
+ max=${u(this.max)}
703
+ placeholder=${u(this.placeholder)}
704
704
  ?readonly=${this.isInputReadonly}
705
705
  ?disabled=${this.disabled}
706
706
  @click=${(e) => {
@@ -709,12 +709,12 @@ var Z = class extends Y {
709
709
  @touchend=${(e) => {
710
710
  e.preventDefault(), this.dispatchToggleCalendar(e);
711
711
  }}
712
- @keydown=${(e) => q.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => U.submitFormOrFallback(this.internals, () => this.inputRefTo.value?.focus()), () => this.inputRefTo.value?.focus(), () => this.inputRef.value?.blur())}
712
+ @keydown=${(e) => K.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => H.submitFormOrFallback(this.internals, () => this.inputRefTo.value?.focus()), () => this.inputRefTo.value?.focus(), () => this.inputRef.value?.blur())}
713
713
  @input=${(e) => {
714
714
  this.dispatchInput(e), e.stopImmediatePropagation();
715
715
  }}
716
716
  @focus=${() => {
717
- this.dispatchFocus(), k() && this.dispatchToggleCalendar(new Event("focus"));
717
+ this.dispatchFocus(), O() && this.dispatchToggleCalendar(new Event("focus"));
718
718
  }}
719
719
  @blur=${(e) => {
720
720
  this.dispatchBlur(e), this.dispatchEvent(new CustomEvent("range-blur", {
@@ -730,24 +730,24 @@ var Z = class extends Y {
730
730
  @change=${(e) => {
731
731
  this.dispatchChange(e), e.stopImmediatePropagation();
732
732
  }}
733
- ${u(this.inputRef)}
733
+ ${d(this.inputRef)}
734
734
  />
735
735
  <div class="${c(t)}" id="${this.id}-to-label">
736
736
  ${this.pktStrings.get("generic").to}
737
737
  </div>
738
738
  ${this.showRangeLabels ? n : e` <div class="pkt-input-separator">–</div> `}
739
739
  <input
740
- aria-describedby=${l(this.describedBy)}
740
+ aria-describedby=${u(this.describedBy)}
741
741
  aria-invalid=${this.hasError}
742
- aria-errormessage=${l(this.errorMessageId)}
742
+ aria-errormessage=${u(this.errorMessageId)}
743
743
  class=${c(this.inputClasses)}
744
744
  .type=${this.inputType}
745
745
  id="${this.id}-to"
746
746
  aria-label="${this.label} ${this.pktStrings.get("generic").to}"
747
747
  .value=${this.value[1] ?? ""}
748
- min=${l(this.min)}
749
- max=${l(this.max)}
750
- placeholder=${l(this.placeholder)}
748
+ min=${u(this.min)}
749
+ max=${u(this.max)}
750
+ placeholder=${u(this.placeholder)}
751
751
  ?readonly=${this.isInputReadonly}
752
752
  ?disabled=${this.disabled}
753
753
  @click=${(e) => {
@@ -756,12 +756,12 @@ var Z = class extends Y {
756
756
  @touchend=${(e) => {
757
757
  e.preventDefault(), this.dispatchToggleCalendar(e);
758
758
  }}
759
- @keydown=${(e) => q.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => U.submitFormOrFallback(this.internals, () => this.inputRefTo.value?.blur()), void 0, () => this.inputRefTo.value?.blur())}
759
+ @keydown=${(e) => K.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => H.submitFormOrFallback(this.internals, () => this.inputRefTo.value?.blur()), void 0, () => this.inputRefTo.value?.blur())}
760
760
  @input=${(e) => {
761
761
  this.dispatchInput(e), e.stopImmediatePropagation();
762
762
  }}
763
763
  @focus=${() => {
764
- this.dispatchFocus(), k() && this.dispatchToggleCalendar(new Event("focus"));
764
+ this.dispatchFocus(), O() && this.dispatchToggleCalendar(new Event("focus"));
765
765
  }}
766
766
  @blur=${(e) => {
767
767
  this.dispatchBlur(e), this.dispatchEvent(new CustomEvent("range-blur", {
@@ -777,22 +777,22 @@ var Z = class extends Y {
777
777
  @change=${(e) => {
778
778
  this.dispatchChange(e), e.stopImmediatePropagation();
779
779
  }}
780
- ${u(this.inputRefTo)}
780
+ ${d(this.inputRefTo)}
781
781
  />
782
782
  ${this.renderCalendarButton()}
783
783
  </div>
784
784
  `;
785
785
  }
786
786
  };
787
- i([s({ type: Array })], Z.prototype, "value", void 0), i([s({ type: String })], Z.prototype, "label", void 0), i([s({ type: Boolean })], Z.prototype, "showRangeLabels", void 0);
787
+ i([s({ type: Array })], X.prototype, "value", void 0), i([s({ type: String })], X.prototype, "label", void 0), i([s({ type: Boolean })], X.prototype, "showRangeLabels", void 0);
788
788
  try {
789
- t("pkt-datepicker-range")(Z);
789
+ t("pkt-datepicker-range")(X);
790
790
  } catch {
791
791
  console.warn("Forsøker å definere <pkt-datepicker-range>, men den er allerede definert");
792
792
  }
793
793
  //#endregion
794
794
  //#region src/components/datepicker/datepicker-multiple.ts
795
- var Q = class extends Y {
795
+ var Z = class extends J {
796
796
  constructor(...e) {
797
797
  super(...e), this.value = [];
798
798
  }
@@ -810,15 +810,15 @@ var Q = class extends Y {
810
810
  return e`
811
811
  <div class="pkt-input__container">
812
812
  <input
813
- aria-describedby=${l(this.describedBy)}
813
+ aria-describedby=${u(this.describedBy)}
814
814
  aria-invalid=${this.hasError}
815
- aria-errormessage=${l(this.errorMessageId)}
815
+ aria-errormessage=${u(this.errorMessageId)}
816
816
  class=${c(this.inputClasses)}
817
817
  .type=${this.inputType}
818
818
  id="${this.id}-input"
819
- min=${l(this.min)}
820
- max=${l(this.max)}
821
- placeholder=${l(this.placeholder)}
819
+ min=${u(this.min)}
820
+ max=${u(this.max)}
821
+ placeholder=${u(this.placeholder)}
822
822
  ?readonly=${this.isInputReadonly}
823
823
  ?disabled=${this.isInputDisabled}
824
824
  @click=${(e) => {
@@ -834,32 +834,32 @@ var Q = class extends Y {
834
834
  this.dispatchInput(e), e.stopImmediatePropagation();
835
835
  }}
836
836
  @focus=${() => {
837
- this.dispatchFocus(), k() && this.dispatchToggleCalendar(new Event("focus"));
837
+ this.dispatchFocus(), O() && this.dispatchToggleCalendar(new Event("focus"));
838
838
  }}
839
- @keydown=${(e) => q.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => U.submitFormOrFallback(this.internals, () => this.inputRef.value?.blur()), void 0, void 0, (e) => this.dispatchAddToSelected(e))}
839
+ @keydown=${(e) => K.handleInputKeydown(e, (e) => this.dispatchToggleCalendar(e), () => H.submitFormOrFallback(this.internals, () => this.inputRef.value?.blur()), void 0, void 0, (e) => this.dispatchAddToSelected(e))}
840
840
  @change=${(e) => {
841
841
  this.dispatchChange(e), e.stopImmediatePropagation();
842
842
  }}
843
- ${u(this.inputRef)}
843
+ ${d(this.inputRef)}
844
844
  />
845
845
  ${this.renderCalendarButton()}
846
846
  </div>
847
847
  `;
848
848
  }
849
849
  };
850
- i([s({ type: Array })], Q.prototype, "value", void 0), i([s({ type: Number })], Q.prototype, "maxlength", void 0);
850
+ i([s({ type: Array })], Z.prototype, "value", void 0), i([s({ type: Number })], Z.prototype, "maxlength", void 0);
851
851
  try {
852
- t("pkt-datepicker-multiple")(Q);
852
+ t("pkt-datepicker-multiple")(Z);
853
853
  } catch {
854
854
  console.warn("Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert");
855
855
  }
856
856
  //#endregion
857
857
  //#region src/components/datepicker/datepicker.ts
858
- var $ = class t extends E {
858
+ var Q, $ = class t extends T {
859
859
  constructor(...e) {
860
- super(...e), this._valueProperty = "", this.datepickerPopupRef = d(), this._value = [], this.label = "Datovelger", this.dateformat = O.props.dateformat.default, this.multiple = O.props.multiple.default, this.maxlength = null, this.range = O.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = O.props.weeknumbers.default, this.withcontrols = O.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = d(), this.popupRef = d(), this.singleInputRef = d(), this.rangeInputRef = d(), this.multipleInputRef = d(), this.addToSelected = (e) => {
860
+ super(...e), this._valueProperty = "", this.datepickerPopupRef = f(), this._value = [], this.label = "Datovelger", this.dateformat = D.props.dateformat.default, this.multiple = D.props.multiple.default, this.maxlength = null, this.range = D.props.range.default, this.showRangeLabels = !1, this.min = null, this.max = null, this.weeknumbers = D.props.weeknumbers.default, this.withcontrols = D.props.withcontrols.default, this.excludedates = [], this.excludeweekdays = [], this.currentmonth = null, this.today = null, this.calendarOpen = !1, this.timezone = "Europe/Oslo", this.inputClasses = {}, this.calRef = f(), this.popupRef = f(), this.singleInputRef = f(), this.rangeInputRef = f(), this.multipleInputRef = f(), this.addToSelected = (e) => {
861
861
  let t = this.datepickerPopupRef.value;
862
- return t && typeof t.addToSelected == "function" ? t.addToSelected(e, this.min, this.max) : W.addToSelected(e, this.calRef, this.min, this.max);
862
+ return t && typeof t.addToSelected == "function" ? t.addToSelected(e, this.min, this.max) : U.addToSelected(e, this.calRef, this.min, this.max);
863
863
  };
864
864
  }
865
865
  get value() {
@@ -870,7 +870,7 @@ var $ = class t extends E {
870
870
  n !== t && (this._valueProperty = n, this.requestUpdate("value", t));
871
871
  }
872
872
  get inputType() {
873
- return H.getInputType();
873
+ return V.getInputType();
874
874
  }
875
875
  connectedCallback() {
876
876
  super.connectedCallback(), this.timezone && this.timezone !== window.pktTz && (window.pktTz = this.timezone);
@@ -885,22 +885,11 @@ var $ = class t extends E {
885
885
  e !== t && (this.value = e ?? "", this.deriveValue(t));
886
886
  }
887
887
  deriveValue(e) {
888
- let t = y(this._valueProperty), n = this.multiple && t.length > 1 ? V.filterSelectableDates(t, this.min, this.max, this.excludedates, this.excludeweekdays) : t;
889
- this.range && !V.validateRangeOrder(n) ? (this._valueProperty = "", super.valueChanged("", e), this._value = []) : (this._valueProperty = v(n), this.range && n.length === 1 || super.valueChanged(this._valueProperty, e), this._value = n);
888
+ let t = b(this._valueProperty), n = this.multiple && t.length > 1 ? B.filterSelectableDates(t, this.min, this.max, this.excludedates, this.excludeweekdays) : t;
889
+ this.range && !B.validateRangeOrder(n) ? (this._valueProperty = "", super.valueChanged("", e), this._value = []) : (this._valueProperty = y(n), this.range && n.length === 1 || super.valueChanged(this._valueProperty, e), this._value = n);
890
890
  }
891
891
  attributeChangedCallback(e, t, n) {
892
- e === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = y(n || "")), e === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = y(n || "")), super.attributeChangedCallback(e, t, n);
893
- }
894
- static {
895
- this.DERIVED_FROM = [
896
- "value",
897
- "multiple",
898
- "range",
899
- "min",
900
- "max",
901
- "excludedates",
902
- "excludeweekdays"
903
- ];
892
+ e === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = b(n || "")), e === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = b(n || "")), super.attributeChangedCallback(e, t, n);
904
893
  }
905
894
  willUpdate(e) {
906
895
  if (super.willUpdate(e), t.DERIVED_FROM.some((t) => e.has(t))) {
@@ -959,7 +948,7 @@ var $ = class t extends E {
959
948
  @input-changed=${() => {
960
949
  this.touched = !0;
961
950
  }}
962
- ${u(this.singleInputRef)}
951
+ ${d(this.singleInputRef)}
963
952
  ></pkt-datepicker-single>
964
953
  `;
965
954
  }
@@ -998,23 +987,23 @@ var $ = class t extends E {
998
987
  t.length > 0 && (t[0] !== this._value[0] || t[1] !== this._value[1]) && (this._value = t, this.value = t.join(","));
999
988
  }
1000
989
  }
1001
- K.processRangeBlur(e.detail.event, e.detail.values, this.calRef, () => this.clearInputValue(), (e) => this.manageValidity(e));
990
+ G.processRangeBlur(e.detail.event, e.detail.values, this.calRef, () => this.clearInputValue(), (e) => this.manageValidity(e));
1002
991
  }}
1003
992
  @manage-validity=${(e) => this.manageValidity(e.detail)}
1004
993
  @validate-date-input=${(e) => {
1005
- U.validateDateInput(e.detail, this.internals, this.min, this.max, this.pktStrings.get("validation"));
994
+ H.validateDateInput(e.detail, this.internals, this.min, this.max, this.pktStrings.get("validation"));
1006
995
  }}
1007
996
  @handle-date-select=${(e) => {
1008
- let t = b(e.detail);
997
+ let t = x(e.detail);
1009
998
  if (t) {
1010
- let e = f(t);
999
+ let e = p(t);
1011
1000
  this._value[0] !== e && this._value[1] !== e && this.calRef?.value?.handleDateSelect(t);
1012
1001
  }
1013
1002
  }}
1014
1003
  @input-changed=${() => {
1015
1004
  this.touched = !0;
1016
1005
  }}
1017
- ${u(this.rangeInputRef)}
1006
+ ${d(this.rangeInputRef)}
1018
1007
  ></pkt-datepicker-range>
1019
1008
  `;
1020
1009
  }
@@ -1046,7 +1035,7 @@ var $ = class t extends E {
1046
1035
  @input-changed=${() => {
1047
1036
  this.touched = !0;
1048
1037
  }}
1049
- ${u(this.multipleInputRef)}
1038
+ ${d(this.multipleInputRef)}
1050
1039
  ></pkt-datepicker-multiple>
1051
1040
  `;
1052
1041
  }
@@ -1065,22 +1054,22 @@ var $ = class t extends E {
1065
1054
  .latest=${this.max}
1066
1055
  .excludedates=${Array.isArray(this.excludedates) ? this.excludedates : this.excludedates.split(",")}
1067
1056
  .excludeweekdays=${this.excludeweekdays}
1068
- .currentmonth=${this.currentmonth ? _(this.currentmonth) : null}
1057
+ .currentmonth=${this.currentmonth ? v(this.currentmonth) : null}
1069
1058
  .today=${this.today}
1070
1059
  @date-selected=${(e) => {
1071
- this.value = K.processDateSelection(e.detail, this.multiple, this.range), this._value = e.detail, K.updateInputValues(this.inputRef, this.inputRefTo, this._value, this.range, this.multiple, (e) => this.manageValidity(e));
1060
+ this.value = G.processDateSelection(e.detail, this.multiple, this.range), this._value = e.detail, G.updateInputValues(this.inputRef, this.inputRefTo, this._value, this.range, this.multiple, (e) => this.manageValidity(e));
1072
1061
  }}
1073
1062
  @close=${() => {
1074
1063
  this.onBlur(), this.hideCalendar();
1075
1064
  }}
1076
- ${u(this.datepickerPopupRef)}
1065
+ ${d(this.datepickerPopupRef)}
1077
1066
  ></pkt-datepicker-popup>
1078
1067
  `;
1079
1068
  }
1080
1069
  render() {
1081
- return this.inputClasses = G.getInputClasses(this.fullwidth, this.showRangeLabels, this.multiple, this.range, this.readonly, this.inputType, this.inputSize), e`
1070
+ return this.inputClasses = W.getInputClasses(this.fullwidth, this.showRangeLabels, this.multiple, this.range, this.readonly, this.inputType, this.inputSize), e`
1082
1071
  <pkt-input-wrapper
1083
- ${ee(this, ["helptext"])}
1072
+ ${l(this, ["helptext"])}
1084
1073
  .strings=${this.strings}
1085
1074
  label="${this.label}"
1086
1075
  forId="${this.id}-input"
@@ -1111,7 +1100,7 @@ var $ = class t extends E {
1111
1100
  strings=${this.strings}
1112
1101
  id-base=${this.id}
1113
1102
  @date-tag-removed=${(e) => {
1114
- let t = this.datepickerPopupRef.value, n = b(e.detail);
1103
+ let t = this.datepickerPopupRef.value, n = x(e.detail);
1115
1104
  t && n && typeof t.handleDateSelect == "function" ? t.handleDateSelect(n) : this.calRef.value?.handleDateSelect(n);
1116
1105
  }}
1117
1106
  ></pkt-date-tags>` : n}
@@ -1124,11 +1113,11 @@ var $ = class t extends E {
1124
1113
  }
1125
1114
  handleCalendarPosition() {
1126
1115
  let e = this.multiple && !!this.maxlength;
1127
- W.handleCalendarPosition(this.popupRef, this.inputRef, e);
1116
+ U.handleCalendarPosition(this.popupRef, this.inputRef, e);
1128
1117
  }
1129
1118
  async showCalendar() {
1130
1119
  let e = this.datepickerPopupRef.value;
1131
- this.calendarOpen = !0, e && typeof e.show == "function" ? (e.show(), k() && e.focusOnCurrentDate()) : (await T(20), this.handleCalendarPosition(), k() && this.calRef.value?.focusOnCurrentDate());
1120
+ this.calendarOpen = !0, e && typeof e.show == "function" ? (e.show(), O() && e.focusOnCurrentDate()) : (await w(20), this.handleCalendarPosition(), O() && this.calRef.value?.focusOnCurrentDate());
1132
1121
  }
1133
1122
  hideCalendar() {
1134
1123
  let e = this.datepickerPopupRef.value;
@@ -1153,7 +1142,15 @@ var $ = class t extends E {
1153
1142
  }));
1154
1143
  }
1155
1144
  };
1156
- i([s({
1145
+ Q = $, Q.DERIVED_FROM = [
1146
+ "value",
1147
+ "multiple",
1148
+ "range",
1149
+ "min",
1150
+ "max",
1151
+ "excludedates",
1152
+ "excludeweekdays"
1153
+ ], i([s({
1157
1154
  type: String,
1158
1155
  reflect: !0
1159
1156
  })], $.prototype, "value", null), i([r()], $.prototype, "_value", void 0), i([s({
@@ -1180,7 +1177,7 @@ i([s({
1180
1177
  })], $.prototype, "max", void 0), i([s({ type: Boolean })], $.prototype, "weeknumbers", void 0), i([s({
1181
1178
  type: Boolean,
1182
1179
  reflect: !0
1183
- })], $.prototype, "withcontrols", void 0), i([s({ converter: x.csvToArray })], $.prototype, "excludedates", void 0), i([s({ converter: x.csvToArray })], $.prototype, "excludeweekdays", void 0), i([s({ type: String })], $.prototype, "currentmonth", void 0), i([s({ type: String })], $.prototype, "today", void 0), i([s({
1180
+ })], $.prototype, "withcontrols", void 0), i([s({ converter: S.csvToArray })], $.prototype, "excludedates", void 0), i([s({ converter: S.csvToArray })], $.prototype, "excludeweekdays", void 0), i([s({ type: String })], $.prototype, "currentmonth", void 0), i([s({ type: String })], $.prototype, "today", void 0), i([s({
1184
1181
  type: Boolean,
1185
1182
  reflect: !0,
1186
1183
  attribute: "calendar-open"
@@ -1191,4 +1188,4 @@ try {
1191
1188
  console.warn("Forsøker å definere <pkt-datepicker>, men den er allerede definert");
1192
1189
  }
1193
1190
  //#endregion
1194
- export { D as a, X as i, Q as n, Z as r, $ as t };
1191
+ export { E as a, Y as i, Z as n, X as r, $ as t };