@oslokommune/punkt-elements 20.0.3 → 20.0.5

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 (190) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/{accordion-5N_ptxrN.cjs → accordion-CSSp30G1.cjs} +1 -1
  3. package/dist/{accordion-C5cu1xXT.js → accordion-DIjltHSH.js} +11 -14
  4. package/dist/{alert-CA1fDbyc.js → alert-B00bIA5q.js} +36 -38
  5. package/dist/{alert-DkyTTo7S.cjs → alert-DPtmkrJq.cjs} +12 -12
  6. package/dist/{async-directive-DCLIOGR8.cjs → async-directive-Bn7zgxUy.cjs} +1 -1
  7. package/dist/{async-directive-BcS8rfeC.js → async-directive-Ct3Mrb1M.js} +10 -11
  8. package/dist/{backlink-CXOxMeyt.cjs → backlink-BAvqdPlG.cjs} +1 -1
  9. package/dist/{backlink-CDBRcaAu.js → backlink-MBTAhQuD.js} +5 -7
  10. package/dist/{booleanish-OQJTYSrw.js → booleanish-CBa3Cr2h.js} +1 -2
  11. package/dist/{breadcrumbs-5oUaCef3.js → breadcrumbs-DtEt1-wn.js} +3 -4
  12. package/dist/button-BI1PsdE1.cjs +32 -0
  13. package/dist/{button-Bswo1C0M.js → button-Bd-0TYe7.js} +29 -31
  14. package/dist/{calendar-BOd-9PDd.js → calendar-CkAAgviq.js} +66 -76
  15. package/dist/calendar-xYEsKilS.cjs +85 -0
  16. package/dist/{card-CKStAH0Q.js → card-CsEfBJcP.js} +10 -12
  17. package/dist/{card-BbV4OBqb.cjs → card-XznwedEG.cjs} +1 -1
  18. package/dist/{checkbox-iMOdzpJ_.cjs → checkbox-Cg7wnn8U.cjs} +1 -1
  19. package/dist/{checkbox-DIJbuqWm.js → checkbox-XvlUQmg5.js} +8 -10
  20. package/dist/{checkbox-group-DLLbWgQb.js → checkbox-group-D038oaif.js} +8 -10
  21. package/dist/{checkbox-group-Kua6HuRE.cjs → checkbox-group-DHi7HgkS.cjs} +1 -1
  22. package/dist/{class-map-BDwVSgLb.js → class-map-C9n5CNC8.js} +2 -3
  23. package/dist/{classutils-DcYnSgfc.js → classutils-C4jETHHk.js} +1 -2
  24. package/dist/{combobox-Pxa80TeZ.js → combobox-BR2qOS5z.js} +63 -66
  25. package/dist/combobox-Bn51heWm.cjs +139 -0
  26. package/dist/{consent-p-0n2b9x.js → consent-KrraWq7K.js} +5 -7
  27. package/dist/{consent-UkinU27V.cjs → consent-ifEcAAhG.cjs} +1 -1
  28. package/dist/{consume-Bp12si68.js → consume-C6aWEFx-.js} +4 -8
  29. package/dist/{converters-CW6SN0TT.cjs → converters-Dp64-kF1.cjs} +1 -1
  30. package/dist/{converters-CYgQrWVm.js → converters-v_GK06o3.js} +36 -72
  31. package/dist/{datepicker-BpxUWiIC.js → datepicker-BZpiJeLW.js} +82 -88
  32. package/dist/{datepicker-Cpiu_Nrf.cjs → datepicker-Bt8zKLPK.cjs} +53 -53
  33. package/dist/define-component-spec-wHP10r2x.js +5 -0
  34. package/dist/{dialog-polyfill.esm-D39dWbRt.js → dialog-polyfill.esm-BGBREnq_.js} +2 -3
  35. package/dist/dialog-polyfill.esm-BPk0-8XP.cjs +1 -0
  36. package/dist/{directive-helpers-BoDzpPID.js → directive-helpers-KMRvtO9j.js} +2 -3
  37. package/dist/{element-DLgZkx5L.js → element-Bwc-likm.js} +9 -18
  38. package/dist/{element-with-slot-mG-h7Sjw.js → element-with-slot-47quDZRt.js} +4 -6
  39. package/dist/{element-with-slot-CeKuRE3_.cjs → element-with-slot-D_8fAzCW.cjs} +1 -1
  40. package/dist/{fetch-header-footer-data-Pc32etrk.js → fetch-header-footer-data-CPVt_P8s.js} +3 -6
  41. package/dist/{fileupload-vPDmtXiM.js → fileupload-A7RNV7ic.js} +25 -36
  42. package/dist/{fileupload-DXJtAagE.cjs → fileupload-Cw4xeUZn.cjs} +1 -1
  43. package/dist/{focus-modality-controller-Dc2S-KqR.js → focus-modality-controller-DVsT6GeR.js} +1 -2
  44. package/dist/focus-trap-C-PcFOw6.js +42 -0
  45. package/dist/focus-trap-C9tsr-xL.cjs +1 -0
  46. package/dist/{footer-D8t0PCPC.js → footer-HqNhiUa1.js} +20 -24
  47. package/dist/{footer-CpE05IW2.cjs → footer-dnW2aMEr.cjs} +9 -9
  48. package/dist/{format-BTeSVkED.js → format-DwjTfa9h.js} +1 -2
  49. package/dist/{header-CiwHNHKD.cjs → header-CKGwNWBI.cjs} +2 -2
  50. package/dist/{header-ChT1hHNA.js → header-VOj1cfsA.js} +22 -26
  51. package/dist/{header-menu-Dq9lwNr1.cjs → header-menu-BJMMwrCR.cjs} +1 -1
  52. package/dist/{header-menu-BrjsNjBH.js → header-menu-k2ACrfOv.js} +9 -11
  53. package/dist/{heading-DAkjw2Am.cjs → heading-BNlor2MU.cjs} +1 -1
  54. package/dist/{heading-CMZmPEL9.js → heading-SYKHysr8.js} +19 -21
  55. package/dist/{helptext-Bse1LpRd.cjs → helptext-CQaNvbiv.cjs} +9 -9
  56. package/dist/{helptext-BFQzrOw4.js → helptext-kKmVQkwo.js} +20 -22
  57. package/dist/{icon-C1oCGwEe.js → icon-CZDw42U7.js} +5 -8
  58. package/dist/if-defined-B3pYog2C.js +4 -0
  59. package/dist/{input-element-2LHxo0em.cjs → input-element-CfZIyfon.cjs} +1 -1
  60. package/dist/{input-element-De40zUox.js → input-element-DE0FzjgP.js} +19 -25
  61. package/dist/{input-wrapper-DkpJS1hR.js → input-wrapper-C6BRd-cu.js} +13 -15
  62. package/dist/{input-wrapper-C_Rzwxx7.cjs → input-wrapper-CdH6RH0a.cjs} +1 -1
  63. package/dist/{link-DLPpwjq4.js → link-Bc4zf-Dj.js} +19 -22
  64. package/dist/link-lPrxhYq0.cjs +7 -0
  65. package/dist/{linkcard-DIG6VYpl.cjs → linkcard-Bih7HS2t.cjs} +1 -1
  66. package/dist/{linkcard-Dr-r8jBO.js → linkcard-LCFAdVsG.js} +7 -9
  67. package/dist/{listbox-HrH4JonS.cjs → listbox-Du8llYth.cjs} +10 -10
  68. package/dist/{listbox-DAvIBH4P.js → listbox-df8gHweY.js} +17 -19
  69. package/dist/{loader-CFidlqSG.js → loader-C-2b3bGK.js} +9 -12
  70. package/dist/{loader-DTIrOtTo.cjs → loader-DiQSwWpb.cjs} +1 -1
  71. package/dist/{messagebox-BLYx3AL7.cjs → messagebox-BiG-fJX9.cjs} +1 -1
  72. package/dist/{messagebox-B_07P0QA.js → messagebox-CH3bKoJO.js} +9 -11
  73. package/dist/modal-B3rnE83a.cjs +37 -0
  74. package/dist/{modal-CA_M2Ix6.js → modal-SBJ8aGvM.js} +33 -35
  75. package/dist/{option-group-element-DzM8YznZ.js → option-group-element-C8oJxuQQ.js} +7 -8
  76. package/dist/{option-group-element-CVNaBIlP.cjs → option-group-element-_LrpXfK1.cjs} +1 -1
  77. package/dist/pkt-accordion.cjs +1 -1
  78. package/dist/pkt-accordion.js +1 -1
  79. package/dist/pkt-alert.cjs +1 -1
  80. package/dist/pkt-alert.js +1 -1
  81. package/dist/pkt-backlink.cjs +1 -1
  82. package/dist/pkt-backlink.js +1 -1
  83. package/dist/pkt-breadcrumbs.js +1 -1
  84. package/dist/pkt-button.cjs +1 -1
  85. package/dist/pkt-button.js +1 -1
  86. package/dist/pkt-calendar.cjs +1 -1
  87. package/dist/pkt-calendar.js +1 -1
  88. package/dist/pkt-card.cjs +1 -1
  89. package/dist/pkt-card.js +1 -1
  90. package/dist/pkt-checkbox-group.cjs +1 -1
  91. package/dist/pkt-checkbox-group.js +1 -1
  92. package/dist/pkt-checkbox.cjs +1 -1
  93. package/dist/pkt-checkbox.js +1 -1
  94. package/dist/pkt-combobox.cjs +1 -1
  95. package/dist/pkt-combobox.js +1 -1
  96. package/dist/pkt-consent.cjs +1 -1
  97. package/dist/pkt-consent.js +1 -1
  98. package/dist/pkt-datepicker.cjs +1 -1
  99. package/dist/pkt-datepicker.js +2 -3
  100. package/dist/pkt-fileupload.cjs +1 -1
  101. package/dist/pkt-fileupload.js +1 -1
  102. package/dist/pkt-footer.cjs +1 -1
  103. package/dist/pkt-footer.js +1 -1
  104. package/dist/pkt-header-menu.cjs +1 -1
  105. package/dist/pkt-header-menu.js +1 -1
  106. package/dist/pkt-header.cjs +1 -1
  107. package/dist/pkt-header.js +1 -1
  108. package/dist/pkt-heading.cjs +1 -1
  109. package/dist/pkt-heading.js +1 -1
  110. package/dist/pkt-helptext.cjs +1 -1
  111. package/dist/pkt-helptext.js +1 -1
  112. package/dist/pkt-icon.js +1 -1
  113. package/dist/pkt-index.cjs +1 -1
  114. package/dist/pkt-index.js +37 -37
  115. package/dist/pkt-input-wrapper.cjs +1 -1
  116. package/dist/pkt-input-wrapper.js +1 -1
  117. package/dist/pkt-link.cjs +1 -1
  118. package/dist/pkt-link.js +1 -1
  119. package/dist/pkt-linkcard.cjs +1 -1
  120. package/dist/pkt-linkcard.js +1 -1
  121. package/dist/pkt-listbox.cjs +1 -1
  122. package/dist/pkt-listbox.js +1 -1
  123. package/dist/pkt-loader.cjs +1 -1
  124. package/dist/pkt-loader.js +1 -1
  125. package/dist/pkt-messagebox.cjs +1 -1
  126. package/dist/pkt-messagebox.js +1 -1
  127. package/dist/pkt-modal.cjs +1 -1
  128. package/dist/pkt-modal.js +1 -1
  129. package/dist/{pkt-options-controller-CzvBlEPD.js → pkt-options-controller-Dz7DP0wC.js} +2 -3
  130. package/dist/{pkt-options-controller-9zoH1OBW.cjs → pkt-options-controller-WsHVdPJA.cjs} +1 -1
  131. package/dist/pkt-progressbar.cjs +1 -1
  132. package/dist/pkt-progressbar.js +1 -1
  133. package/dist/pkt-radio-group.cjs +1 -1
  134. package/dist/pkt-radio-group.js +1 -1
  135. package/dist/pkt-radiobutton.cjs +1 -1
  136. package/dist/pkt-radiobutton.js +1 -1
  137. package/dist/pkt-searchinput.cjs +1 -1
  138. package/dist/pkt-searchinput.js +1 -1
  139. package/dist/pkt-select.cjs +1 -1
  140. package/dist/pkt-select.js +1 -1
  141. package/dist/pkt-tabs.cjs +1 -1
  142. package/dist/pkt-tabs.js +1 -1
  143. package/dist/pkt-tag.cjs +1 -1
  144. package/dist/pkt-tag.js +1 -1
  145. package/dist/pkt-textarea.cjs +1 -1
  146. package/dist/pkt-textarea.js +1 -1
  147. package/dist/pkt-textinput.cjs +1 -1
  148. package/dist/pkt-textinput.js +1 -1
  149. package/dist/pkt-timepicker.cjs +1 -1
  150. package/dist/pkt-timepicker.js +1 -1
  151. package/dist/{progressbar-CfCc2zhp.js → progressbar-DlbkKRgP.js} +9 -11
  152. package/dist/{progressbar-BdqIhC1Z.cjs → progressbar-Wyq_Q1Ur.cjs} +1 -1
  153. package/dist/{provide-_MnlMGnw.js → provide-DFu2tSv_.js} +3 -5
  154. package/dist/{radio-group-BRY_74od.js → radio-group-Kr2BCSvg.js} +8 -10
  155. package/dist/{radio-group-CsUgnEv0.cjs → radio-group-RWgTs_uV.cjs} +1 -1
  156. package/dist/{radiobutton-CQhuG2lj.cjs → radiobutton-86ZvvDmJ.cjs} +1 -1
  157. package/dist/{radiobutton-lHnq8wX_.js → radiobutton-Bf6aFfYt.js} +8 -10
  158. package/dist/{ref-B6p6mQkO.cjs → ref-C6VUWwmF.cjs} +1 -1
  159. package/dist/{ref-BAegS9BR.js → ref-qE1RBrI7.js} +3 -4
  160. package/dist/{repeat-Cy1M16Di.js → repeat-c2P6osbb.js} +3 -4
  161. package/dist/{scroll-lock-CR-g54ai.js → scroll-lock-C9jzbJ4E.js} +1 -2
  162. package/dist/{searchinput-TAqMUJ0B.cjs → searchinput-D5l64Mkb.cjs} +7 -7
  163. package/dist/{searchinput-BLGaXkP6.js → searchinput-DN8kDZQ1.js} +18 -20
  164. package/dist/{select-Dle67Uwv.cjs → select-CZ3L48N_.cjs} +15 -15
  165. package/dist/{select-BvtUxW0Q.js → select-Curv4lWO.js} +15 -18
  166. package/dist/shared-types-BvRk9kiK.js +0 -0
  167. package/dist/{tabs-BmmTUKuC.js → tabs-Cg16Sl3u.js} +57 -60
  168. package/dist/tabs-n7hQWwyI.cjs +40 -0
  169. package/dist/{tag-BZdC0voc.cjs → tag-BAikRN2Y.cjs} +1 -1
  170. package/dist/{tag-Cam7ISOF.js → tag-HXcXopyA.js} +9 -11
  171. package/dist/{textarea-Djp5L2Zd.js → textarea-B1iUKCro.js} +12 -14
  172. package/dist/{textarea-DSX3jMlI.cjs → textarea-DbD7sOLV.cjs} +1 -1
  173. package/dist/{textinput-CBrOZcvL.js → textinput-CKbUvHNH.js} +11 -13
  174. package/dist/{textinput-CN2F3Q3H.cjs → textinput-C_5jzdg3.cjs} +1 -1
  175. package/dist/{timepicker-CkaJkIGn.cjs → timepicker-By-kvx3z.cjs} +20 -20
  176. package/dist/{timepicker-CT4wfrgQ.js → timepicker-DkXpFBpQ.js} +27 -28
  177. package/dist/{utils-BwF4QSrq.js → utils-Dn5ykFtS.js} +1 -2
  178. package/package.json +10 -10
  179. package/dist/button-bVWAX98x.cjs +0 -32
  180. package/dist/calendar-CDTCgTJn.cjs +0 -85
  181. package/dist/combobox-CWL8T3UK.cjs +0 -139
  182. package/dist/define-component-spec-BYOSeplU.js +0 -6
  183. package/dist/dialog-polyfill.esm-CW51hN2p.cjs +0 -1
  184. package/dist/focus-trap-DG3pEuyJ.js +0 -60
  185. package/dist/focus-trap-DSv4Ifqm.cjs +0 -1
  186. package/dist/if-defined-DiYi2v_Q.js +0 -5
  187. package/dist/link-pkFJ11Zd.cjs +0 -7
  188. package/dist/modal-BvTfLfFq.cjs +0 -37
  189. package/dist/shared-types-A6iGIX-f.js +0 -1
  190. package/dist/tabs-B96Orh6O.cjs +0 -40
@@ -1,36 +1,36 @@
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-DLgZkx5L.js";
2
- import { t as c } from "./class-map-BDwVSgLb.js";
3
- import { n as l } from "./element-with-slot-mG-h7Sjw.js";
4
- import "./icon-C1oCGwEe.js";
5
- import "./input-wrapper-DkpJS1hR.js";
6
- import "./tag-Cam7ISOF.js";
7
- import "./calendar-BOd-9PDd.js";
8
- import { t as u } from "./if-defined-DiYi2v_Q.js";
9
- import { n as d, t as f } from "./ref-BAegS9BR.js";
10
- 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";
11
- import { t as te } from "./repeat-Cy1M16Di.js";
12
- import { n as C, t as w } from "./utils-BwF4QSrq.js";
13
- import { t as T } from "./input-element-De40zUox.js";
14
- //#region src/components/datepicker/date-tags.ts
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-Bwc-likm.js";
2
+ import { a as c, c as l, d as u, h as d, i as f, m as ee, n as p, r as m, s as h, t as g, u as _ } from "./converters-v_GK06o3.js";
3
+ import { t as te } from "./input-element-DE0FzjgP.js";
4
+ import { n as v, t as y } from "./ref-qE1RBrI7.js";
5
+ import "./calendar-CkAAgviq.js";
6
+ import "./icon-CZDw42U7.js";
7
+ import "./input-wrapper-C6BRd-cu.js";
8
+ import { t as b } from "./class-map-C9n5CNC8.js";
9
+ import { t as x } from "./repeat-c2P6osbb.js";
10
+ import "./tag-HXcXopyA.js";
11
+ import { n as S, t as C } from "./utils-Dn5ykFtS.js";
12
+ import { t as w } from "./if-defined-B3pYog2C.js";
13
+ import { n as T } from "./element-with-slot-47quDZRt.js";
14
+ // src/components/datepicker/date-tags.ts
15
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 = C();
17
+ super(...e), this.dates = [], this.dateformat = "dd.MM.yyyy", this.className = "pkt-datepicker__tags", this.idBase = S();
18
18
  }
19
19
  render() {
20
20
  return this.classes = {
21
21
  "pkt-date-tags": !0,
22
22
  [this.className]: !0
23
23
  }, e`
24
- <div class=${c(this.classes)} aria-live="polite">
25
- ${Array.isArray(this.dates) && this.dates[0] ? te(g((this.dates ?? []).filter(Boolean)), (e) => e, (t) => e` <pkt-tag
24
+ <div class=${b(this.classes)} aria-live="polite">
25
+ ${Array.isArray(this.dates) && this.dates[0] ? x(d((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} ${m(t, this.dateformat)}`}
31
+ .ariaLabel=${`${this.pktStrings.get("datepicker").deleteDate} ${l(t, this.dateformat)}`}
32
32
  >
33
- <time datetime=${t}>${m(t, this.dateformat)}</time>
33
+ <time datetime=${t}>${l(t, this.dateformat)}</time>
34
34
  </pkt-tag>`) : n}
35
35
  </div>
36
36
  `;
@@ -340,7 +340,7 @@ var D = {
340
340
  }, O = () => {
341
341
  let e = navigator.userAgent;
342
342
  return !!(/iP(hone|od|ad)/.test(e) || /Macintosh/.test(e) && "ontouchend" in document);
343
- }, 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") => ({
343
+ }, k = () => O() ? "text" : "date", A = (e) => !e || e.length !== 2 || _(e[0], e[1]), j = (e) => d(e), M = (e, t, n, r, i) => f(e, t, n, r, i), N = (e, t, n, r, i, a, o = "medium") => ({
344
344
  "pkt-input": !0,
345
345
  "pkt-datepicker__input": !0,
346
346
  [`pkt-input--${o}`]: !0,
@@ -395,7 +395,7 @@ var D = {
395
395
  addToSelected(e, t, n, r) {
396
396
  let i = e.target;
397
397
  if (!i.value) return;
398
- let a = n ? h(n) : null, o = r ? h(r) : null, s = h(i.value.split(",")[0]);
398
+ let a = n ? u(n) : null, o = r ? u(r) : null, s = u(i.value.split(",")[0]);
399
399
  s && !isNaN(s.getTime()) && (!a || s >= a) && (!o || s <= o) && t.value && t.value.handleDateSelect(s), i.value = "";
400
400
  },
401
401
  handleCalendarPosition(e, t, n = !1) {
@@ -414,7 +414,7 @@ var D = {
414
414
  let a = e.target;
415
415
  if (a.value) {
416
416
  i(a);
417
- let e = x(a.value);
417
+ let e = h(a.value);
418
418
  e && n?.value?.handleDateSelect(e);
419
419
  } else t[0] && r();
420
420
  }
@@ -423,10 +423,10 @@ var D = {
423
423
  handleButtonKeydown: z
424
424
  }, q = class extends o {
425
425
  constructor(...e) {
426
- 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) => {
426
+ 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 = y(), this.calendarRef = y(), this.handleDocumentClick = (e) => {
427
427
  if (!this.open) return;
428
428
  let t = e.composedPath(), n = this.parentElement, r = this.popupRef.value;
429
- !t.includes(this) && !t.includes(r) && !(n && t.includes(n)) && (this.hide(), this.dispatchEvent(new CustomEvent("close", {
429
+ t.includes(this) || t.includes(r) || n && t.includes(n) || (this.hide(), this.dispatchEvent(new CustomEvent("close", {
430
430
  bubbles: !0,
431
431
  composed: !0
432
432
  })));
@@ -469,13 +469,13 @@ var D = {
469
469
  if (this.calendarRef.value && typeof U.addToSelected == "function") return U.addToSelected(e, this.calendarRef, t, n);
470
470
  let r = e.target;
471
471
  if (!r.value) return;
472
- let i = t ? h(t) : null, a = n ? h(n) : null, o = h(r.value.split(",")[0]);
472
+ let i = t ? u(t) : null, a = n ? u(n) : null, o = u(r.value.split(",")[0]);
473
473
  o && !isNaN(o.getTime()) && (!i || o >= i) && (!a || o <= a) && this.handleDateSelect(o), r.value = "";
474
474
  }
475
475
  handleDateSelect(e) {
476
476
  let t = this.calendarRef.value;
477
477
  if (t && typeof t.handleDateSelect == "function") return t.handleDateSelect(e);
478
- let n = p(e), r = this.selected.indexOf(n) >= 0 ? this.selected.filter((e) => e !== n) : [...this.selected, n];
478
+ let n = c(e), r = this.selected.indexOf(n) >= 0 ? this.selected.filter((e) => e !== n) : [...this.selected, n];
479
479
  this.selected = r, this.dispatchEvent(new CustomEvent("date-selected", {
480
480
  detail: r,
481
481
  bubbles: !0,
@@ -490,14 +490,14 @@ var D = {
490
490
  };
491
491
  return e`
492
492
  <div
493
- class="${c(t)}"
494
- ${d(this.popupRef)}
493
+ class="${b(t)}"
494
+ ${v(this.popupRef)}
495
495
  id="date-popup"
496
496
  ?hidden=${!this.open}
497
497
  aria-hidden="${!this.open}"
498
498
  >
499
499
  ${this.open || this._hasBeenOpened ? e`<pkt-calendar
500
- ${d(this.calendarRef)}
500
+ ${v(this.calendarRef)}
501
501
  ?multiple=${this.multiple}
502
502
  ?range=${this.range}
503
503
  ?weeknumbers=${this.weeknumbers}
@@ -537,11 +537,10 @@ try {
537
537
  } catch {
538
538
  console.warn("Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert");
539
539
  }
540
- //#endregion
541
- //#region src/components/datepicker/datepicker-base.ts
540
+ // src/components/datepicker/datepicker-base.ts
542
541
  var J = class extends o {
543
542
  constructor(...e) {
544
- 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();
543
+ 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 = y(), this.btnRef = y();
545
544
  }
546
545
  get describedBy() {
547
546
  return this.hasHelptext ? `${this.id}-input-helptext` : void 0;
@@ -595,7 +594,7 @@ var J = class extends o {
595
594
  renderCalendarButton() {
596
595
  return e`
597
596
  <button
598
- class="${c(W.getButtonClasses(this.inputSize))}"
597
+ class="${b(W.getButtonClasses(this.inputSize))}"
599
598
  type="button"
600
599
  @click=${(e) => this.dispatchToggleCalendar(e)}
601
600
  @keydown=${(e) => {
@@ -615,8 +614,7 @@ var J = class extends o {
615
614
  }
616
615
  };
617
616
  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);
618
- //#endregion
619
- //#region src/components/datepicker/datepicker-single.ts
617
+ // src/components/datepicker/datepicker-single.ts
620
618
  var Y = class extends J {
621
619
  constructor(...e) {
622
620
  super(...e), this.value = "";
@@ -632,17 +630,17 @@ var Y = class extends J {
632
630
  return e`
633
631
  <div class="pkt-input__container">
634
632
  <input
635
- class="${c(this.inputClasses)}"
633
+ class="${b(this.inputClasses)}"
636
634
  .type=${this.inputType}
637
635
  id="${this.id}-input"
638
636
  .value=${this.value}
639
- min=${u(this.min)}
640
- max=${u(this.max)}
641
- placeholder=${u(this.placeholder)}
637
+ min=${w(this.min)}
638
+ max=${w(this.max)}
639
+ placeholder=${w(this.placeholder)}
642
640
  ?readonly=${this.isInputReadonly}
643
- aria-describedby=${u(this.describedBy)}
641
+ aria-describedby=${w(this.describedBy)}
644
642
  aria-invalid=${this.hasError}
645
- aria-errormessage=${u(this.errorMessageId)}
643
+ aria-errormessage=${w(this.errorMessageId)}
646
644
  @click=${(e) => {
647
645
  e.preventDefault(), this.dispatchToggleCalendar(e);
648
646
  }}
@@ -667,7 +665,7 @@ var Y = class extends J {
667
665
  @change=${(e) => {
668
666
  this.dispatchChange(e), e.stopImmediatePropagation();
669
667
  }}
670
- ${d(this.inputRef)}
668
+ ${v(this.inputRef)}
671
669
  />
672
670
  ${this.renderCalendarButton()}
673
671
  </div>
@@ -680,11 +678,10 @@ try {
680
678
  } catch {
681
679
  console.warn("Forsøker å definere <pkt-datepicker-single>, men den er allerede definert");
682
680
  }
683
- //#endregion
684
- //#region src/components/datepicker/datepicker-range.ts
681
+ // src/components/datepicker/datepicker-range.ts
685
682
  var X = class extends J {
686
683
  constructor(...e) {
687
- super(...e), this.value = [], this.label = "", this.showRangeLabels = !1, this.inputRefTo = f();
684
+ super(...e), this.value = [], this.label = "", this.showRangeLabels = !1, this.inputRefTo = y();
688
685
  }
689
686
  get inputElementTo() {
690
687
  return this.inputRefTo.value;
@@ -695,17 +692,17 @@ var X = class extends J {
695
692
  <div class="pkt-input__container">
696
693
  ${this.showRangeLabels ? e` <div class="pkt-input-prefix">${this.pktStrings.get("generic").from}</div> ` : n}
697
694
  <input
698
- aria-describedby=${u(this.describedBy)}
695
+ aria-describedby=${w(this.describedBy)}
699
696
  aria-invalid=${this.hasError}
700
- aria-errormessage=${u(this.errorMessageId)}
701
- class=${c(this.inputClasses)}
697
+ aria-errormessage=${w(this.errorMessageId)}
698
+ class=${b(this.inputClasses)}
702
699
  .type=${this.inputType}
703
700
  id="${this.id}-input"
704
701
  aria-label="${this.label} ${this.pktStrings.get("generic").from}"
705
702
  .value=${this.value[0] ?? ""}
706
- min=${u(this.min)}
707
- max=${u(this.max)}
708
- placeholder=${u(this.placeholder)}
703
+ min=${w(this.min)}
704
+ max=${w(this.max)}
705
+ placeholder=${w(this.placeholder)}
709
706
  ?readonly=${this.isInputReadonly}
710
707
  ?disabled=${this.disabled}
711
708
  @click=${(e) => {
@@ -735,24 +732,24 @@ var X = class extends J {
735
732
  @change=${(e) => {
736
733
  this.dispatchChange(e), e.stopImmediatePropagation();
737
734
  }}
738
- ${d(this.inputRef)}
735
+ ${v(this.inputRef)}
739
736
  />
740
- <div class="${c(t)}" id="${this.id}-to-label">
737
+ <div class="${b(t)}" id="${this.id}-to-label">
741
738
  ${this.pktStrings.get("generic").to}
742
739
  </div>
743
740
  ${this.showRangeLabels ? n : e` <div class="pkt-input-separator">–</div> `}
744
741
  <input
745
- aria-describedby=${u(this.describedBy)}
742
+ aria-describedby=${w(this.describedBy)}
746
743
  aria-invalid=${this.hasError}
747
- aria-errormessage=${u(this.errorMessageId)}
748
- class=${c(this.inputClasses)}
744
+ aria-errormessage=${w(this.errorMessageId)}
745
+ class=${b(this.inputClasses)}
749
746
  .type=${this.inputType}
750
747
  id="${this.id}-to"
751
748
  aria-label="${this.label} ${this.pktStrings.get("generic").to}"
752
749
  .value=${this.value[1] ?? ""}
753
- min=${u(this.min)}
754
- max=${u(this.max)}
755
- placeholder=${u(this.placeholder)}
750
+ min=${w(this.min)}
751
+ max=${w(this.max)}
752
+ placeholder=${w(this.placeholder)}
756
753
  ?readonly=${this.isInputReadonly}
757
754
  ?disabled=${this.disabled}
758
755
  @click=${(e) => {
@@ -782,7 +779,7 @@ var X = class extends J {
782
779
  @change=${(e) => {
783
780
  this.dispatchChange(e), e.stopImmediatePropagation();
784
781
  }}
785
- ${d(this.inputRefTo)}
782
+ ${v(this.inputRefTo)}
786
783
  />
787
784
  ${this.renderCalendarButton()}
788
785
  </div>
@@ -795,8 +792,7 @@ try {
795
792
  } catch {
796
793
  console.warn("Forsøker å definere <pkt-datepicker-range>, men den er allerede definert");
797
794
  }
798
- //#endregion
799
- //#region src/components/datepicker/datepicker-multiple.ts
795
+ // src/components/datepicker/datepicker-multiple.ts
800
796
  var Z = class extends J {
801
797
  constructor(...e) {
802
798
  super(...e), this.value = [];
@@ -815,15 +811,15 @@ var Z = class extends J {
815
811
  return e`
816
812
  <div class="pkt-input__container">
817
813
  <input
818
- aria-describedby=${u(this.describedBy)}
814
+ aria-describedby=${w(this.describedBy)}
819
815
  aria-invalid=${this.hasError}
820
- aria-errormessage=${u(this.errorMessageId)}
821
- class=${c(this.inputClasses)}
816
+ aria-errormessage=${w(this.errorMessageId)}
817
+ class=${b(this.inputClasses)}
822
818
  .type=${this.inputType}
823
819
  id="${this.id}-input"
824
- min=${u(this.min)}
825
- max=${u(this.max)}
826
- placeholder=${u(this.placeholder)}
820
+ min=${w(this.min)}
821
+ max=${w(this.max)}
822
+ placeholder=${w(this.placeholder)}
827
823
  ?readonly=${this.isInputReadonly}
828
824
  ?disabled=${this.isInputDisabled}
829
825
  @click=${(e) => {
@@ -845,7 +841,7 @@ var Z = class extends J {
845
841
  @change=${(e) => {
846
842
  this.dispatchChange(e), e.stopImmediatePropagation();
847
843
  }}
848
- ${d(this.inputRef)}
844
+ ${v(this.inputRef)}
849
845
  />
850
846
  ${this.renderCalendarButton()}
851
847
  </div>
@@ -858,11 +854,10 @@ try {
858
854
  } catch {
859
855
  console.warn("Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert");
860
856
  }
861
- //#endregion
862
- //#region src/components/datepicker/datepicker.ts
863
- var Q, $ = class t extends T {
857
+ // src/components/datepicker/datepicker.ts
858
+ var Q, $ = class t extends te {
864
859
  constructor(...e) {
865
- 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) => {
860
+ super(...e), this._valueProperty = "", this.datepickerPopupRef = y(), 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 = y(), this.popupRef = y(), this.singleInputRef = y(), this.rangeInputRef = y(), this.multipleInputRef = y(), this.addToSelected = (e) => {
866
861
  let t = this.datepickerPopupRef.value;
867
862
  return t && typeof t.addToSelected == "function" ? t.addToSelected(e, this.min, this.max) : U.addToSelected(e, this.calRef, this.min, this.max);
868
863
  };
@@ -890,11 +885,11 @@ var Q, $ = class t extends T {
890
885
  e !== t && (this.value = e ?? "", this.deriveValue(t));
891
886
  }
892
887
  deriveValue(e) {
893
- let t = b(this._valueProperty), n = this.multiple && t.length > 1 ? B.filterSelectableDates(t, this.min, this.max, this.excludedates, this.excludeweekdays) : t;
894
- this.range && !B.validateRangeOrder(n) ? (this._valueProperty = "", this.getAttribute("value") && this.setAttribute("value", ""), super.valueChanged("", e), this._value = []) : (this._valueProperty = y(n), this.range && n.length === 1 || super.valueChanged(this._valueProperty, e), this._value = n);
888
+ let t = m(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 = "", this.getAttribute("value") && this.setAttribute("value", ""), super.valueChanged("", e), this._value = []) : (this._valueProperty = p(n), this.range && n.length === 1 || super.valueChanged(this._valueProperty, e), this._value = n);
895
890
  }
896
891
  attributeChangedCallback(e, t, n) {
897
- 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);
892
+ e === "excludedates" && typeof this.excludedates == "string" && (this.excludedates = m(n || "")), e === "excludeweekdays" && typeof this.excludeweekdays == "string" && (this.excludeweekdays = m(n || "")), super.attributeChangedCallback(e, t, n);
898
893
  }
899
894
  willUpdate(e) {
900
895
  if (super.willUpdate(e), t.DERIVED_FROM.some((t) => e.has(t))) {
@@ -953,7 +948,7 @@ var Q, $ = class t extends T {
953
948
  @input-changed=${() => {
954
949
  this.touched = !0;
955
950
  }}
956
- ${d(this.singleInputRef)}
951
+ ${v(this.singleInputRef)}
957
952
  ></pkt-datepicker-single>
958
953
  `;
959
954
  }
@@ -999,16 +994,16 @@ var Q, $ = class t extends T {
999
994
  H.validateDateInput(e.detail, this.internals, this.min, this.max, this.pktStrings.get("validation"));
1000
995
  }}
1001
996
  @handle-date-select=${(e) => {
1002
- let t = x(e.detail);
997
+ let t = h(e.detail);
1003
998
  if (t) {
1004
- let e = p(t);
999
+ let e = c(t);
1005
1000
  this._value[0] !== e && this._value[1] !== e && this.calRef?.value?.handleDateSelect(t);
1006
1001
  }
1007
1002
  }}
1008
1003
  @input-changed=${() => {
1009
1004
  this.touched = !0;
1010
1005
  }}
1011
- ${d(this.rangeInputRef)}
1006
+ ${v(this.rangeInputRef)}
1012
1007
  ></pkt-datepicker-range>
1013
1008
  `;
1014
1009
  }
@@ -1040,7 +1035,7 @@ var Q, $ = class t extends T {
1040
1035
  @input-changed=${() => {
1041
1036
  this.touched = !0;
1042
1037
  }}
1043
- ${d(this.multipleInputRef)}
1038
+ ${v(this.multipleInputRef)}
1044
1039
  ></pkt-datepicker-multiple>
1045
1040
  `;
1046
1041
  }
@@ -1059,7 +1054,7 @@ var Q, $ = class t extends T {
1059
1054
  .latest=${this.max}
1060
1055
  .excludedates=${Array.isArray(this.excludedates) ? this.excludedates : this.excludedates.split(",")}
1061
1056
  .excludeweekdays=${this.excludeweekdays}
1062
- .currentmonth=${this.currentmonth ? v(this.currentmonth) : null}
1057
+ .currentmonth=${this.currentmonth ? ee(this.currentmonth) : null}
1063
1058
  .today=${this.today}
1064
1059
  @date-selected=${(e) => {
1065
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));
@@ -1067,14 +1062,14 @@ var Q, $ = class t extends T {
1067
1062
  @close=${() => {
1068
1063
  this.onBlur(), this.hideCalendar();
1069
1064
  }}
1070
- ${d(this.datepickerPopupRef)}
1065
+ ${v(this.datepickerPopupRef)}
1071
1066
  ></pkt-datepicker-popup>
1072
1067
  `;
1073
1068
  }
1074
1069
  render() {
1075
1070
  return this.inputClasses = W.getInputClasses(this.fullwidth, this.showRangeLabels, this.multiple, this.range, this.readonly, this.inputType, this.inputSize), e`
1076
1071
  <pkt-input-wrapper
1077
- ${l(this, ["helptext"])}
1072
+ ${T(this, ["helptext"])}
1078
1073
  .strings=${this.strings}
1079
1074
  label="${this.label}"
1080
1075
  forId="${this.id}-input"
@@ -1105,7 +1100,7 @@ var Q, $ = class t extends T {
1105
1100
  strings=${this.strings}
1106
1101
  id-base=${this.id}
1107
1102
  @date-tag-removed=${(e) => {
1108
- let t = this.datepickerPopupRef.value, n = x(e.detail);
1103
+ let t = this.datepickerPopupRef.value, n = h(e.detail);
1109
1104
  t && n && typeof t.handleDateSelect == "function" ? t.handleDateSelect(n) : this.calRef.value?.handleDateSelect(n);
1110
1105
  }}
1111
1106
  ></pkt-date-tags>` : n}
@@ -1122,7 +1117,7 @@ var Q, $ = class t extends T {
1122
1117
  }
1123
1118
  async showCalendar() {
1124
1119
  let e = this.datepickerPopupRef.value;
1125
- this.calendarOpen = !0, e && typeof e.show == "function" ? (e.show(), O() && e.focusOnCurrentDate()) : (await w(20), this.handleCalendarPosition(), O() && this.calRef.value?.focusOnCurrentDate());
1120
+ this.calendarOpen = !0, e && typeof e.show == "function" ? (e.show(), O() && e.focusOnCurrentDate()) : (await C(20), this.handleCalendarPosition(), O() && this.calRef.value?.focusOnCurrentDate());
1126
1121
  }
1127
1122
  hideCalendar() {
1128
1123
  let e = this.datepickerPopupRef.value;
@@ -1182,7 +1177,7 @@ Q = $, Q.DERIVED_FROM = [
1182
1177
  })], $.prototype, "max", void 0), i([s({ type: Boolean })], $.prototype, "weeknumbers", void 0), i([s({
1183
1178
  type: Boolean,
1184
1179
  reflect: !0
1185
- })], $.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({
1180
+ })], $.prototype, "withcontrols", void 0), i([s({ converter: g.csvToArray })], $.prototype, "excludedates", void 0), i([s({ converter: g.csvToArray })], $.prototype, "excludeweekdays", void 0), i([s({ type: String })], $.prototype, "currentmonth", void 0), i([s({ type: String })], $.prototype, "today", void 0), i([s({
1186
1181
  type: Boolean,
1187
1182
  reflect: !0,
1188
1183
  attribute: "calendar-open"
@@ -1192,5 +1187,4 @@ try {
1192
1187
  } catch {
1193
1188
  console.warn("Forsøker å definere <pkt-datepicker>, men den er allerede definert");
1194
1189
  }
1195
- //#endregion
1196
1190
  export { E as a, Y as i, Z as n, X as r, $ as t };