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