@oslokommune/punkt-elements 20.0.3 → 20.1.0

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 (193) hide show
  1. package/CHANGELOG.md +13 -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-DkyTTo7S.cjs → alert-0a5lX0pL.cjs} +12 -12
  5. package/dist/{alert-CA1fDbyc.js → alert-ZrB-P881.js} +36 -38
  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-Bswo1C0M.js → button-CJzu0l5A.js} +45 -35
  13. package/dist/button-DHVRpzpS.cjs +32 -0
  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-Kua6HuRE.cjs → checkbox-group-BF29zyLd.cjs} +1 -1
  21. package/dist/{checkbox-group-DLLbWgQb.js → checkbox-group-CRIV5CX0.js} +8 -10
  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-CDJcIkNJ.js} +63 -66
  25. package/dist/combobox-DuXavWEY.cjs +139 -0
  26. package/dist/{consent-UkinU27V.cjs → consent-BOSXNt4Y.cjs} +1 -1
  27. package/dist/{consent-p-0n2b9x.js → consent-DwppvYBR.js} +5 -7
  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-Cpiu_Nrf.cjs → datepicker-Cnrbqm62.cjs} +53 -53
  32. package/dist/{datepicker-BpxUWiIC.js → datepicker-DHdFA8Dx.js} +82 -88
  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-BQw5nlzQ.js} +25 -36
  42. package/dist/{fileupload-DXJtAagE.cjs → fileupload-Cjde62AR.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-CpE05IW2.cjs → footer-NQaQc2DH.cjs} +9 -9
  47. package/dist/{footer-D8t0PCPC.js → footer-SbOYv50e.js} +20 -24
  48. package/dist/{format-BTeSVkED.js → format-DwjTfa9h.js} +1 -2
  49. package/dist/{header-ChT1hHNA.js → header-CZnKVVt4.js} +22 -26
  50. package/dist/{header-CiwHNHKD.cjs → header-YbbGgmsD.cjs} +2 -2
  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-C_Rzwxx7.cjs → input-wrapper-CbYMk21W.cjs} +1 -1
  62. package/dist/{input-wrapper-DkpJS1hR.js → input-wrapper-DYg1VHPv.js} +13 -15
  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-DtSw52Dr.js} +7 -8
  76. package/dist/{option-group-element-CVNaBIlP.cjs → option-group-element-dN0ntPZk.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-bRF8fnPW.js} +8 -10
  155. package/dist/{radio-group-CsUgnEv0.cjs → radio-group-u1IH7g-4.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-C7kAlSxs.cjs} +15 -15
  165. package/dist/{select-BvtUxW0Q.js → select-CXIEM2qY.js} +15 -18
  166. package/dist/shared-types/button.d.ts +13 -0
  167. package/dist/shared-types/index.d.ts +1 -1
  168. package/dist/shared-types-BvRk9kiK.js +0 -0
  169. package/dist/{tabs-BmmTUKuC.js → tabs-Cg16Sl3u.js} +57 -60
  170. package/dist/tabs-n7hQWwyI.cjs +40 -0
  171. package/dist/{tag-BZdC0voc.cjs → tag-BAikRN2Y.cjs} +1 -1
  172. package/dist/{tag-Cam7ISOF.js → tag-HXcXopyA.js} +9 -11
  173. package/dist/{textarea-Djp5L2Zd.js → textarea-12le8b4I.js} +12 -14
  174. package/dist/{textarea-DSX3jMlI.cjs → textarea-CRcSfWgX.cjs} +1 -1
  175. package/dist/{textinput-CBrOZcvL.js → textinput-CC0zxUBT.js} +11 -13
  176. package/dist/{textinput-CN2F3Q3H.cjs → textinput-Dooq2n8W.cjs} +1 -1
  177. package/dist/{timepicker-CkaJkIGn.cjs → timepicker-BM4I5w-i.cjs} +20 -20
  178. package/dist/{timepicker-CT4wfrgQ.js → timepicker-Cz81VQu3.js} +27 -28
  179. package/dist/{utils-BwF4QSrq.js → utils-Dn5ykFtS.js} +1 -2
  180. package/package.json +10 -10
  181. package/src/components/button/button.ts +14 -14
  182. package/dist/button-bVWAX98x.cjs +0 -32
  183. package/dist/calendar-CDTCgTJn.cjs +0 -85
  184. package/dist/combobox-CWL8T3UK.cjs +0 -139
  185. package/dist/define-component-spec-BYOSeplU.js +0 -6
  186. package/dist/dialog-polyfill.esm-CW51hN2p.cjs +0 -1
  187. package/dist/focus-trap-DG3pEuyJ.js +0 -60
  188. package/dist/focus-trap-DSv4Ifqm.cjs +0 -1
  189. package/dist/if-defined-DiYi2v_Q.js +0 -5
  190. package/dist/link-pkFJ11Zd.cjs +0 -7
  191. package/dist/modal-BvTfLfFq.cjs +0 -37
  192. package/dist/shared-types-A6iGIX-f.js +0 -1
  193. 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-DYg1VHPv.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 };
@@ -0,0 +1,5 @@
1
+ // ../../component-specs/lib/define-component-spec.ts
2
+ function e(e) {
3
+ return e;
4
+ }
5
+ export { e as t };
@@ -1,6 +1,6 @@
1
- //#region ../../node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js
1
+ // ../../node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js
2
2
  var e = window.CustomEvent;
3
- (!e || typeof e == "object") && (e = function(e, t) {
3
+ e && typeof e != "object" || (e = function(e, t) {
4
4
  t ||= {};
5
5
  var n = document.createEvent("CustomEvent");
6
6
  return n.initCustomEvent(e, !!t.bubbles, !!t.cancelable, t.detail || null), n;
@@ -276,5 +276,4 @@ if (f.reposition = function(e) {
276
276
  };
277
277
  HTMLFormElement.prototype.submit = v;
278
278
  }
279
- //#endregion
280
279
  export { f as default };
@@ -0,0 +1 @@
1
+ var e=window.CustomEvent;e&&typeof e!=`object`||(e=function(e,t){t||={};var n=document.createEvent(`CustomEvent`);return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail||null),n},e.prototype=window.Event.prototype);function t(e,t){var n=`on`+t.type.toLowerCase();return typeof e[n]==`function`&&e[n](t),e.dispatchEvent(t)}function n(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),n=function(e,n){return t[e]!==void 0&&t[e]!==n};if(t.opacity<1||n(`zIndex`,`auto`)||n(`transform`,`none`)||n(`mixBlendMode`,`normal`)||n(`filter`,`none`)||n(`perspective`,`none`)||t.isolation===`isolate`||t.position===`fixed`||t.webkitOverflowScrolling===`touch`)return!0;e=e.parentElement}return!1}function r(e){for(;e;){if(e.localName===`dialog`)return e;e=e.parentElement?e.parentElement:e.parentNode?e.parentNode.host:null}return null}function i(e){for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;e&&e.blur&&e!==document.body&&e.blur()}function a(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1}function o(e){return!e||!e.hasAttribute(`method`)?!1:e.getAttribute(`method`).toLowerCase()===`dialog`}function s(e){var t=[`button`,`input`,`keygen`,`select`,`textarea`].map(function(e){return e+`:not([disabled])`});t.push(`[tabindex]:not([disabled]):not([tabindex=""])`);var n=e.querySelector(t.join(`, `));if(!n&&`attachShadow`in Element.prototype)for(var r=e.querySelectorAll(`*`),i=0;i<r.length&&!(r[i].tagName&&r[i].shadowRoot&&(n=s(r[i].shadowRoot),n));i++);return n}function c(e){return e.isConnected||document.body.contains(e)}function l(e){if(e.submitter)return e.submitter;var t=e.target;if(!(t instanceof HTMLFormElement))return null;var n=f.formSubmitter;if(!n){var r=e.target;n=(`getRootNode`in r&&r.getRootNode()||document).activeElement}return!n||n.form!==t?null:n}function u(e){if(!e.defaultPrevented){var t=e.target,n=f.imagemapUseValue,i=l(e);n===null&&i&&(n=i.value);var a=r(t);a&&(i&&i.getAttribute(`formmethod`)||t.getAttribute(`method`))===`dialog`&&(e.preventDefault(),n==null?a.close():a.close(n))}}function d(e){if(this.dialog_=e,this.replacedStyleTop_=!1,this.openAsModal_=!1,e.hasAttribute(`role`)||e.setAttribute(`role`,`dialog`),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),e.addEventListener(`submit`,u,!1),`returnValue`in e||(e.returnValue=``),`MutationObserver`in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(e,{attributes:!0,attributeFilter:[`open`]});else{var t=!1,n=function(){t?this.downgradeModal():this.maybeHideModal(),t=!1}.bind(this),r,i=function(i){if(i.target===e){var a=`DOMNodeRemoved`;t|=i.type.substr(0,a.length)===a,window.clearTimeout(r),r=window.setTimeout(n,0)}};[`DOMAttrModified`,`DOMNodeRemoved`,`DOMNodeRemovedFromDocument`].forEach(function(t){e.addEventListener(t,i)})}Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,`open`)}),this.backdrop_=document.createElement(`div`),this.backdrop_.className=`backdrop`,this.backdrop_.addEventListener(`mouseup`,this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener(`mousedown`,this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener(`click`,this.backdropMouseEvent_.bind(this))}d.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute(`open`)&&c(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex=``,this.replacedStyleTop_&&=(this.dialog_.style.top=``,!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),f.dm.removeDialog(this))},setOpen:function(e){e?this.dialog_.hasAttribute(`open`)||this.dialog_.setAttribute(`open`,``):(this.dialog_.removeAttribute(`open`),this.maybeHideModal())},backdropMouseEvent_:function(e){if(this.dialog_.hasAttribute(`tabindex`))this.dialog_.focus();else{var t=document.createElement(`div`);this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var n=document.createEvent(`MouseEvents`);n.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(n),e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector(`[autofocus]:not([disabled])`);!e&&this.dialog_.tabIndex>=0&&(e=this.dialog_),e||=s(this.dialog_),i(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw Error(`dialogZ should never be < backdropZ`);this.dialog_.style.zIndex=e,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute(`open`))throw Error(`Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.`);if(!c(this.dialog_))throw Error(`Failed to execute 'showModal' on dialog: The element is not in a Document.`);if(!f.dm.pushDialog(this))throw Error(`Failed to execute 'showModal' on dialog: There are too many open modal dialogs.`);n(this.dialog_.parentElement)&&console.warn(`A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context`),this.setOpen(!0),this.openAsModal_=!0,f.needsCentering(this.dialog_)?(f.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(n){if(!this.dialog_.hasAttribute(`open`))throw Error(`Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.`);this.setOpen(!1),n!==void 0&&(this.dialog_.returnValue=n);var r=new e(`close`,{bubbles:!1,cancelable:!1});t(this.dialog_,r)}};var f={};if(f.reposition=function(e){var t=document.body.scrollTop||document.documentElement.scrollTop,n=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,n)+`px`},f.isInlinePositionSetByStylesheet=function(e){for(var t=0;t<document.styleSheets.length;++t){var n=document.styleSheets[t],r=null;try{r=n.cssRules}catch{}if(r)for(var i=0;i<r.length;++i){var o=r[i],s=null;try{s=document.querySelectorAll(o.selectorText)}catch{}if(s&&a(s,e)){var c=o.style.getPropertyValue(`top`),l=o.style.getPropertyValue(`bottom`);if(c&&c!==`auto`||l&&l!==`auto`)return!0}}}return!1},f.needsCentering=function(e){return window.getComputedStyle(e).position!==`absolute`||e.style.top!==`auto`&&e.style.top!==``||e.style.bottom!==`auto`&&e.style.bottom!==``?!1:!f.isInlinePositionSetByStylesheet(e)},f.forceRegisterDialog=function(e){if((window.HTMLDialogElement||e.showModal)&&console.warn(`This browser already supports <dialog>, the polyfill may not work correctly`,e),e.localName!==`dialog`)throw Error(`Failed to register dialog: The element is not a dialog.`);new d(e)},f.registerDialog=function(e){e.showModal||f.forceRegisterDialog(e)},f.DialogManager=function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement(`div`),this.overlay.className=`_dialog_overlay`,this.overlay.addEventListener(`click`,function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,`MutationObserver`in window&&(this.mo_=new MutationObserver(function(t){var n=[];t.forEach(function(e){for(var t=0,r;r=e.removedNodes[t];++t){if(r instanceof Element)r.localName===`dialog`&&n.push(r);else continue;n=n.concat(r.querySelectorAll(`dialog`))}}),n.length&&e(n)}))},f.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener(`focus`,this.handleFocus_,!0),document.addEventListener(`keydown`,this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},f.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener(`focus`,this.handleFocus_,!0),document.removeEventListener(`keydown`,this.handleKey_),this.mo_&&this.mo_.disconnect()},f.DialogManager.prototype.updateStacking=function(){for(var e=this.zIndexHigh_,t=0,n;n=this.pendingDialogStack[t];++t)n.updateZIndex(--e,--e),t===0&&(this.overlay.style.zIndex=--e);var r=this.pendingDialogStack[0];r?(r.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},f.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=r(e);){for(var t=0,n;n=this.pendingDialogStack[t];++t)if(n.dialog===e)return t===0;e=e.parentElement}return!1},f.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),i(t),this.forwardTab_!==void 0)){var n=this.pendingDialogStack[0];return n.dialog.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?n.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},f.DialogManager.prototype.handleKey_=function(n){if(this.forwardTab_=void 0,n.keyCode===27){n.preventDefault(),n.stopPropagation();var r=new e(`cancel`,{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&t(i.dialog,r)&&i.dialog.close()}else n.keyCode===9&&(this.forwardTab_=!n.shiftKey)},f.DialogManager.prototype.checkDOM_=function(e){this.pendingDialogStack.slice().forEach(function(t){e.indexOf(t.dialog)===-1?t.maybeHideModal():t.downgradeModal()})},f.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(e)===1&&this.blockDocument(),this.updateStacking(),!0)},f.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},f.dm=new f.DialogManager,f.formSubmitter=null,f.imagemapUseValue=null,window.HTMLDialogElement===void 0){var p=document.createElement(`form`);if(p.setAttribute(`method`,`dialog`),p.method!==`dialog`){var m=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`method`);if(m){var h=m.get;m.get=function(){return o(this)?`dialog`:h.call(this)};var g=m.set;m.set=function(e){return typeof e==`string`&&e.toLowerCase()===`dialog`?this.setAttribute(`method`,e):g.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",m)}}document.addEventListener(`click`,function(e){if(f.formSubmitter=null,f.imagemapUseValue=null,!e.defaultPrevented){var t=e.target;if(`composedPath`in e&&(t=e.composedPath().shift()||t),t&&o(t.form)){if(!(t.type===`submit`&&[`button`,`input`].indexOf(t.localName)>-1)){if(t.localName!==`input`||t.type!==`image`)return;f.imagemapUseValue=e.offsetX+`,`+e.offsetY}r(t)&&(f.formSubmitter=t)}}},!1),document.addEventListener(`submit`,function(e){var t=e.target;if(!r(t)){var n=l(e);(n&&n.getAttribute(`formmethod`)||t.getAttribute(`method`))===`dialog`&&e.preventDefault()}});var _=HTMLFormElement.prototype.submit,v=function(){if(!o(this))return _.call(this);var e=r(this);e&&e.close()};HTMLFormElement.prototype.submit=v}exports.default=f;
@@ -1,5 +1,5 @@
1
- import { v as e } from "./element-DLgZkx5L.js";
2
- //#region ../../node_modules/lit-html/directive-helpers.js
1
+ import { v as e } from "./element-Bwc-likm.js";
2
+ // ../../node_modules/lit-html/directive-helpers.js
3
3
  var { I: t } = e, n = (e) => e, r = (e) => e.strings === void 0, i = () => document.createComment(""), a = (e, r, a) => {
4
4
  let o = e._$AA.parentNode, s = r === void 0 ? e._$AB : r._$AA;
5
5
  if (a === void 0) a = new t(o.insertBefore(i(), s), o.insertBefore(i(), s), e, e.options);
@@ -21,5 +21,4 @@ var { I: t } = e, n = (e) => e, r = (e) => e.strings === void 0, i = () => docum
21
21
  }, o = (e, t, n = e) => (e._$AI(t, n), e), s = {}, c = (e, t = s) => e._$AH = t, l = (e) => e._$AH, u = (e) => {
22
22
  e._$AR(), e._$AA.remove();
23
23
  };
24
- //#endregion
25
24
  export { o as a, r as i, u as n, a as o, c as r, l as t };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/lit-html/lit-html.js
1
+ // ../../node_modules/lit-html/lit-html.js
2
2
  var e = globalThis, t = (e) => e, n = e.trustedTypes, r = n ? n.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, i = "$lit$", a = `lit$${Math.random().toFixed(9).slice(2)}$`, o = "?" + a, s = `<${o}>`, c = document, l = () => c.createComment(""), u = (e) => e === null || typeof e != "object" && typeof e != "function", d = Array.isArray, f = (e) => d(e) || typeof e?.[Symbol.iterator] == "function", p = "[ \n\f\r]", m = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, h = /-->/g, g = />/g, _ = RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), v = /'/g, y = /"/g, b = /^(?:script|style|textarea|title)$/i, x = ((e) => (t, ...n) => ({
3
3
  _$litType$: e,
4
4
  strings: t,
@@ -520,8 +520,7 @@ var W = class extends HTMLElement {
520
520
  firstUpdated(e) {}
521
521
  };
522
522
  W.elementStyles = [], W.shadowRootOptions = { mode: "open" }, W[V("elementProperties")] = /* @__PURE__ */ new Map(), W[V("finalized")] = /* @__PURE__ */ new Map(), be?.({ ReactiveElement: W }), (z.reactiveElementVersions ??= []).push("2.1.2");
523
- //#endregion
524
- //#region ../../node_modules/@lit/reactive-element/decorators/property.js
523
+ // ../../node_modules/@lit/reactive-element/decorators/property.js
525
524
  var Se = {
526
525
  attribute: !0,
527
526
  type: String,
@@ -557,8 +556,7 @@ function G(e) {
557
556
  return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
558
557
  })(e, t, n);
559
558
  }
560
- //#endregion
561
- //#region ../../node_modules/@lit/reactive-element/decorators/state.js
559
+ // ../../node_modules/@lit/reactive-element/decorators/state.js
562
560
  function we(e) {
563
561
  return G({
564
562
  ...e,
@@ -566,8 +564,7 @@ function we(e) {
566
564
  attribute: !1
567
565
  });
568
566
  }
569
- //#endregion
570
- //#region ../../node_modules/lit-element/lit-element.js
567
+ // ../../node_modules/lit-element/lit-element.js
571
568
  var K = globalThis, q = class extends W {
572
569
  constructor() {
573
570
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -593,8 +590,7 @@ var K = globalThis, q = class extends W {
593
590
  q._$litElement$ = !0, q.finalized = !0, K.litElementHydrateSupport?.({ LitElement: q });
594
591
  var Te = K.litElementPolyfillSupport;
595
592
  Te?.({ LitElement: q }), (K.litElementVersions ??= []).push("4.2.2");
596
- //#endregion
597
- //#region ../../shared-strings/nb.ts
593
+ // ../../shared-strings/nb.ts
598
594
  var J = {
599
595
  generic: {
600
596
  from: "Fra",
@@ -825,8 +821,7 @@ function ke(e) {
825
821
  t.listeners.delete(e);
826
822
  };
827
823
  }
828
- //#endregion
829
- //#region ../../shared-strings/resolve.ts
824
+ // ../../shared-strings/resolve.ts
830
825
  var Ae = /* @__PURE__ */ new Map();
831
826
  function je(e, t) {
832
827
  if (t) for (let n of Object.keys(t)) {
@@ -862,8 +857,7 @@ function Pe(e, ...t) {
862
857
  for (let r of e) n[r] = Z(r, ...t);
863
858
  return n;
864
859
  }
865
- //#endregion
866
- //#region src/controllers/strings-controller.ts
860
+ // src/controllers/strings-controller.ts
867
861
  var Fe = class {
868
862
  constructor(e) {
869
863
  this.host = e, e.addController(this);
@@ -881,16 +875,14 @@ var Fe = class {
881
875
  return Pe(e, this.host.strings);
882
876
  }
883
877
  };
884
- //#endregion
885
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/decorate.js
878
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/decorate.js
886
879
  function Q(e, t, n, r) {
887
880
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
888
881
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
889
882
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
890
883
  return i > 3 && a && Object.defineProperty(t, n, a), a;
891
884
  }
892
- //#endregion
893
- //#region src/base-elements/element.ts
885
+ // src/base-elements/element.ts
894
886
  var $ = class extends q {
895
887
  constructor(...e) {
896
888
  super(...e), this.pktStrings = new Fe(this), this.role = null;
@@ -905,5 +897,4 @@ var Ie = class extends $ {
905
897
  return this;
906
898
  }
907
899
  };
908
- //#endregion
909
900
  export { x as _, Ee as a, q as c, le as d, se as f, S as g, C as h, Oe as i, we as l, oe as m, Q as n, ke as o, ce as p, De as r, J as s, Ie as t, G as u, re as v };
@@ -1,6 +1,6 @@
1
- import { f as e, g as t, m as n, t as r } from "./element-DLgZkx5L.js";
2
- import { t as i } from "./async-directive-BcS8rfeC.js";
3
- //#region src/controllers/pkt-slot-utils.ts
1
+ import { f as e, g as t, m as n, t as r } from "./element-Bwc-likm.js";
2
+ import { t as i } from "./async-directive-Ct3Mrb1M.js";
3
+ // src/controllers/pkt-slot-utils.ts
4
4
  function a(e) {
5
5
  return e.classList && (e.classList.contains("_dialog_overlay") || e.classList.contains("backdrop")) ? !0 : typeof e.hasAttribute == "function" && e.hasAttribute("data-skip");
6
6
  }
@@ -10,8 +10,7 @@ function o(e) {
10
10
  function s(e) {
11
11
  return e.nodeType === Node.TEXT_NODE && e.nodeValue?.trim() !== "";
12
12
  }
13
- //#endregion
14
- //#region src/directives/slot-content.ts
13
+ // src/directives/slot-content.ts
15
14
  var c, l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakSet();
16
15
  function f(e) {
17
16
  let t = l.get(e);
@@ -693,5 +692,4 @@ var P = class extends r {
693
692
  t.set.call(n, e), f(this).replaceContent(Array.from(n.childNodes)) || t.set.call(this, e);
694
693
  }
695
694
  };
696
- //#endregion
697
695
  export { o as a, k as i, A as n, f as r, P as t };