@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
package/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [20.0.5](https://github.com/oslokommune/punkt/compare/20.0.4...20.0.5) (2026-11-09)
9
+
10
+ ---
11
+
12
+
8
13
  ## [20.1.0](https://github.com/oslokommune/punkt/compare/20.0.2...20.1.0) (2026-11-06)
9
14
 
10
15
  ### Bug Fixes
@@ -1,4 +1,4 @@
1
- const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./consume-kEjgTrAp.cjs"),a=require("./provide-Cz18sYug.cjs"),o=require("./ref-B6p6mQkO.cjs");var s=[`beige`,`blue`],c=i.n(Symbol(`pkt-accordion-context`)),l=class extends e.c{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``,this.context={skin:this.skin}}willUpdate(e){e.has(`skin`)&&(this.context={...this.context,skin:this.skin})}updated(e){e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){let n={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e._`
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./element-with-slot-D_8fAzCW.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./consume-kEjgTrAp.cjs"),a=require("./provide-Cz18sYug.cjs"),o=require("./ref-C6VUWwmF.cjs");var s=[`beige`,`blue`],c=i.n(Symbol(`pkt-accordion-context`)),l=class extends e.c{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``,this.context={skin:this.skin}}willUpdate(e){e.has(`skin`)&&(this.context={...this.context,skin:this.skin})}updated(e){e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){let n={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e._`
2
2
  <div
3
3
  part="container"
4
4
  class=${t.t(n)}
@@ -1,12 +1,12 @@
1
- import { _ as e, c as t, d as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
2
- import { t as o } from "./class-map-BDwVSgLb.js";
3
- import { i as s, t as c } from "./element-with-slot-mG-h7Sjw.js";
4
- import "./shared-types-A6iGIX-f.js";
5
- import { t as l } from "./if-defined-DiYi2v_Q.js";
6
- import { n as u, t as d } from "./consume-Bp12si68.js";
7
- import { t as f } from "./provide-_MnlMGnw.js";
8
- import { n as p, t as m } from "./ref-BAegS9BR.js";
9
- //#region ../../shared-types/accordion.ts
1
+ import { _ as e, c as t, d as n, l as r, n as i, u as a } from "./element-Bwc-likm.js";
2
+ import { t as o } from "./class-map-C9n5CNC8.js";
3
+ import { i as s, t as c } from "./element-with-slot-47quDZRt.js";
4
+ import "./shared-types-BvRk9kiK.js";
5
+ import { t as l } from "./if-defined-B3pYog2C.js";
6
+ import { n as u, t as d } from "./consume-C6aWEFx-.js";
7
+ import { t as f } from "./provide-DFu2tSv_.js";
8
+ import { n as p, t as m } from "./ref-qE1RBrI7.js";
9
+ // ../../shared-types/accordion.ts
10
10
  var h = ["beige", "blue"], g = u(Symbol("pkt-accordion-context")), _ = class extends t {
11
11
  constructor(...e) {
12
12
  super(...e), this.ariaLabelledBy = "", this.compact = !1, this.skin = "borderless", this.name = "", this.context = { skin: this.skin };
@@ -74,8 +74,7 @@ try {
74
74
  } catch {
75
75
  console.warn("Forsøker å definere <pkt-accordion>, men den er allerede definert");
76
76
  }
77
- //#endregion
78
- //#region src/components/accordion/accordionitem.ts
77
+ // src/components/accordion/accordionitem.ts
79
78
  var v = class extends c {
80
79
  constructor() {
81
80
  super(), this.defaultOpen = !1, this.title = "", this.skin = void 0, this.compact = !1, this.isOpen = !1, this.name = void 0, this.accordionItemRef = m();
@@ -151,8 +150,6 @@ try {
151
150
  } catch {
152
151
  console.warn("Forsøker å definere <pkt-accordion-item>, men den er allerede definert");
153
152
  }
154
- //#endregion
155
- //#region src/components/accordion/index.ts
153
+ // src/components/accordion/index.ts
156
154
  var y = _;
157
- //#endregion
158
155
  export { v as n, _ as r, y as t };
@@ -1,13 +1,13 @@
1
- import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
2
- import { t as o } from "./class-map-BDwVSgLb.js";
3
- import { t as s } from "./format-BTeSVkED.js";
4
- import { i as c, t as l } from "./element-with-slot-mG-h7Sjw.js";
5
- import "./shared-types-A6iGIX-f.js";
6
- import "./icon-C1oCGwEe.js";
7
- import { t as u } from "./classutils-DcYnSgfc.js";
8
- import { t as d } from "./define-component-spec-BYOSeplU.js";
9
- import "./button-Bswo1C0M.js";
10
- //#region ../../shared-types/aria.ts
1
+ import { t as e } from "./class-map-C9n5CNC8.js";
2
+ import { _ as t, d as n, h as r, l as i, n as a, u as o } from "./element-Bwc-likm.js";
3
+ import { i as s, t as c } from "./element-with-slot-47quDZRt.js";
4
+ import "./shared-types-BvRk9kiK.js";
5
+ import { t as l } from "./classutils-C4jETHHk.js";
6
+ import { t as u } from "./format-DwjTfa9h.js";
7
+ import { t as d } from "./define-component-spec-wHP10r2x.js";
8
+ import "./icon-CZDw42U7.js";
9
+ import "./button-Bd-0TYe7.js";
10
+ // ../../shared-types/aria.ts
11
11
  var f = [
12
12
  "off",
13
13
  "polite",
@@ -94,7 +94,7 @@ var f = [
94
94
  }
95
95
  },
96
96
  slots: { default: { description: "Innholdet i meldingen" } }
97
- }), _ = class extends l {
97
+ }), _ = class extends c {
98
98
  constructor() {
99
99
  super(), this.compact = h.compact, this.title = "", this.skin = g.props.skin.default, this.ariaLive = g.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = g.props.closeAlert.default, this.date = null, this.role = "status", this._isClosed = !1, this.close = (e) => {
100
100
  this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
@@ -115,38 +115,38 @@ var f = [
115
115
  e === "ariaLive" && (this.ariaLiveAttr = n), super.attributeChangedCallback(e, t, n);
116
116
  }
117
117
  updated(e) {
118
- super.updated(e), e.has("ariaLive") && e.get("ariaLive") !== void 0 && (this.ariaLiveAttr = this.ariaLive), e.has("_isClosed") && u(this, "pkt-hide", this._isClosed);
118
+ super.updated(e), e.has("ariaLive") && e.get("ariaLive") !== void 0 && (this.ariaLiveAttr = this.ariaLive), e.has("_isClosed") && l(this, "pkt-hide", this._isClosed);
119
119
  }
120
120
  render() {
121
- let t = this.size ?? (this.compact ? "small" : "medium"), r = {
121
+ let n = this.size ?? (this.compact ? "small" : "medium"), i = {
122
122
  "pkt-alert": !0,
123
- [`pkt-alert--${t}`]: !0,
123
+ [`pkt-alert--${n}`]: !0,
124
124
  [`pkt-alert--${this.skin}`]: !0,
125
125
  "pkt-hide": this._isClosed
126
- }, i = {
126
+ }, a = {
127
127
  "pkt-alert__grid": !0,
128
128
  "pkt-alert__noTitle": !this.title,
129
129
  "pkt-alert__noDate": !this.date
130
130
  };
131
- return e`
131
+ return t`
132
132
  <div
133
- class=${o(r)}
133
+ class=${e(i)}
134
134
  aria-live=${this.ariaLiveAttr}
135
135
  role=${this.role}
136
136
  >
137
- <div class=${o(i)}>
137
+ <div class=${e(a)}>
138
138
  <pkt-icon
139
139
  class="pkt-alert__icon"
140
140
  aria-hidden="true"
141
141
  name=${this.skin === "info" ? "alert-information" : `alert-${this.skin}`}
142
142
  ></pkt-icon>
143
143
 
144
- ${this.closeAlert ? e`
144
+ ${this.closeAlert ? t`
145
145
  <div class="pkt-alert__close">
146
146
  <pkt-button
147
147
  tabindex="0"
148
148
  aria-label=${this.pktStrings.get("generic").close}
149
- size=${t}
149
+ size=${n}
150
150
  type="button"
151
151
  skin="tertiary"
152
152
  iconName="close"
@@ -156,49 +156,47 @@ var f = [
156
156
  <span class="sr-only">${this.pktStrings.get("generic").close}</span>
157
157
  </pkt-button>
158
158
  </div>
159
- ` : n}
160
- ${this.title ? e`<div class="pkt-alert__title">${this.title}</div>` : n}
159
+ ` : r}
160
+ ${this.title ? t`<div class="pkt-alert__title">${this.title}</div>` : r}
161
161
 
162
- <div class="pkt-alert__text">${c(this)}</div>
162
+ <div class="pkt-alert__text">${s(this)}</div>
163
163
 
164
- ${this.date ? e`<div class="pkt-alert__date">
165
- ${s(this.pktStrings.get("alert").lastUpdated, { date: this.date })}
166
- </div>` : n}
164
+ ${this.date ? t`<div class="pkt-alert__date">
165
+ ${u(this.pktStrings.get("alert").lastUpdated, { date: this.date })}
166
+ </div>` : r}
167
167
  </div>
168
168
  </div>
169
169
  `;
170
170
  }
171
171
  };
172
- i([a({
172
+ a([o({
173
173
  type: Boolean,
174
174
  reflect: !1
175
- })], _.prototype, "compact", void 0), i([a({
175
+ })], _.prototype, "compact", void 0), a([o({
176
176
  type: String,
177
177
  reflect: !0
178
- })], _.prototype, "title", void 0), i([a({
178
+ })], _.prototype, "title", void 0), a([o({
179
179
  type: String,
180
180
  reflect: !0
181
- })], _.prototype, "skin", void 0), i([a({ type: String })], _.prototype, "ariaLive", void 0), i([a({
181
+ })], _.prototype, "skin", void 0), a([o({ type: String })], _.prototype, "ariaLive", void 0), a([o({
182
182
  type: String,
183
183
  reflect: !0,
184
184
  attribute: "aria-live"
185
- })], _.prototype, "ariaLiveAttr", void 0), i([a({
185
+ })], _.prototype, "ariaLiveAttr", void 0), a([o({
186
186
  type: Boolean,
187
187
  reflect: !0
188
- })], _.prototype, "closeAlert", void 0), i([a({
188
+ })], _.prototype, "closeAlert", void 0), a([o({
189
189
  type: String,
190
190
  reflect: !0
191
- })], _.prototype, "date", void 0), i([a({ type: String })], _.prototype, "role", void 0), i([a({
191
+ })], _.prototype, "date", void 0), a([o({ type: String })], _.prototype, "role", void 0), a([o({
192
192
  type: String,
193
193
  attribute: "size"
194
- })], _.prototype, "size", void 0), i([r()], _.prototype, "_isClosed", void 0);
194
+ })], _.prototype, "size", void 0), a([i()], _.prototype, "_isClosed", void 0);
195
195
  try {
196
- t("pkt-alert")(_);
196
+ n("pkt-alert")(_);
197
197
  } catch {
198
198
  console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
199
199
  }
200
- //#endregion
201
- //#region src/components/alert/index.ts
200
+ // src/components/alert/index.ts
202
201
  var v = _;
203
- //#endregion
204
202
  export { _ as n, v as t };
@@ -1,22 +1,22 @@
1
- const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./format-B8meU8Tm.cjs"),r=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs"),require("./icon-5A378_yh.cjs");const i=require("./classutils-CbklAJDe.cjs"),a=require("./define-component-spec-DBNd2FJY.cjs");require("./button-bVWAX98x.cjs");var o=[`off`,`polite`,`assertive`],s=[`info`,`success`,`warning`,`error`],c=[`medium`,`small`,`xsmall`],l={compact:!1},u=a.t({name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{reactOnly:!0,description:`React: Klikk-event for 'Lukk'-knappen`},close:{elementsOnly:!0,description:`Elements: Klikk-event for 'Lukk'-knappen`},"on-close":{elementsOnly:!0,description:`Elements: Samme event som <code>close</code>, beholdt for eldre Vue-oppsett.`,deprecated:`Bruk <code>close</code>. <code>on-close</code> fjernes i en senere hovedversjon.`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[...s],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[...o],default:`polite`,category:`accessibility`},size:{name:`Størrelse`,description:`Endrer størrelsen på ulike elementer i alerten.`,type:[...c],default:`medium`,category:`ui`},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`},compact:{name:`Kompakt`,description:`Kompakt visning av alerten.`,deprecated:"Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",type:`boolean`,category:`ui`,default:l.compact}},slots:{default:{description:`Innholdet i meldingen`}}}),d=class extends r.t{constructor(){super(),this.compact=l.compact,this.title=``,this.skin=u.props.skin.default,this.ariaLive=u.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=u.props.closeAlert.default,this.date=null,this.role=`status`,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&e.get(`ariaLive`)!==void 0&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&i.t(this,`pkt-hide`,this._isClosed)}render(){let i=this.size??(this.compact?`small`:`medium`),a={"pkt-alert":!0,[`pkt-alert--${i}`]:!0,[`pkt-alert--${this.skin}`]:!0,"pkt-hide":this._isClosed},o={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e._`
1
+ const e=require("./class-map-C82GtM1w.cjs"),t=require("./element-CEarCnHH.cjs"),n=require("./element-with-slot-D_8fAzCW.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./classutils-CbklAJDe.cjs"),i=require("./format-B8meU8Tm.cjs"),a=require("./define-component-spec-DBNd2FJY.cjs");require("./icon-5A378_yh.cjs"),require("./button-BI1PsdE1.cjs");var o=[`off`,`polite`,`assertive`],s=[`info`,`success`,`warning`,`error`],c=[`medium`,`small`,`xsmall`],l={compact:!1},u=a.t({name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{reactOnly:!0,description:`React: Klikk-event for 'Lukk'-knappen`},close:{elementsOnly:!0,description:`Elements: Klikk-event for 'Lukk'-knappen`},"on-close":{elementsOnly:!0,description:`Elements: Samme event som <code>close</code>, beholdt for eldre Vue-oppsett.`,deprecated:`Bruk <code>close</code>. <code>on-close</code> fjernes i en senere hovedversjon.`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[...s],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[...o],default:`polite`,category:`accessibility`},size:{name:`Størrelse`,description:`Endrer størrelsen på ulike elementer i alerten.`,type:[...c],default:`medium`,category:`ui`},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`},compact:{name:`Kompakt`,description:`Kompakt visning av alerten.`,deprecated:"Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",type:`boolean`,category:`ui`,default:l.compact}},slots:{default:{description:`Innholdet i meldingen`}}}),d=class extends n.t{constructor(){super(),this.compact=l.compact,this.title=``,this.skin=u.props.skin.default,this.ariaLive=u.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=u.props.closeAlert.default,this.date=null,this.role=`status`,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&e.get(`ariaLive`)!==void 0&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&r.t(this,`pkt-hide`,this._isClosed)}render(){let r=this.size??(this.compact?`small`:`medium`),a={"pkt-alert":!0,[`pkt-alert--${r}`]:!0,[`pkt-alert--${this.skin}`]:!0,"pkt-hide":this._isClosed},o={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return t._`
2
2
  <div
3
- class=${t.t(a)}
3
+ class=${e.t(a)}
4
4
  aria-live=${this.ariaLiveAttr}
5
5
  role=${this.role}
6
6
  >
7
- <div class=${t.t(o)}>
7
+ <div class=${e.t(o)}>
8
8
  <pkt-icon
9
9
  class="pkt-alert__icon"
10
10
  aria-hidden="true"
11
11
  name=${this.skin===`info`?`alert-information`:`alert-${this.skin}`}
12
12
  ></pkt-icon>
13
13
 
14
- ${this.closeAlert?e._`
14
+ ${this.closeAlert?t._`
15
15
  <div class="pkt-alert__close">
16
16
  <pkt-button
17
17
  tabindex="0"
18
18
  aria-label=${this.pktStrings.get(`generic`).close}
19
- size=${i}
19
+ size=${r}
20
20
  type="button"
21
21
  skin="tertiary"
22
22
  iconName="close"
@@ -26,14 +26,14 @@ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),
26
26
  <span class="sr-only">${this.pktStrings.get(`generic`).close}</span>
27
27
  </pkt-button>
28
28
  </div>
29
- `:e.h}
30
- ${this.title?e._`<div class="pkt-alert__title">${this.title}</div>`:e.h}
29
+ `:t.h}
30
+ ${this.title?t._`<div class="pkt-alert__title">${this.title}</div>`:t.h}
31
31
 
32
- <div class="pkt-alert__text">${r.i(this)}</div>
32
+ <div class="pkt-alert__text">${n.i(this)}</div>
33
33
 
34
- ${this.date?e._`<div class="pkt-alert__date">
35
- ${n.t(this.pktStrings.get(`alert`).lastUpdated,{date:this.date})}
36
- </div>`:e.h}
34
+ ${this.date?t._`<div class="pkt-alert__date">
35
+ ${i.t(this.pktStrings.get(`alert`).lastUpdated,{date:this.date})}
36
+ </div>`:t.h}
37
37
  </div>
38
38
  </div>
39
- `}};e.n([e.u({type:Boolean,reflect:!1})],d.prototype,`compact`,void 0),e.n([e.u({type:String,reflect:!0})],d.prototype,`title`,void 0),e.n([e.u({type:String,reflect:!0})],d.prototype,`skin`,void 0),e.n([e.u({type:String})],d.prototype,`ariaLive`,void 0),e.n([e.u({type:String,reflect:!0,attribute:`aria-live`})],d.prototype,`ariaLiveAttr`,void 0),e.n([e.u({type:Boolean,reflect:!0})],d.prototype,`closeAlert`,void 0),e.n([e.u({type:String,reflect:!0})],d.prototype,`date`,void 0),e.n([e.u({type:String})],d.prototype,`role`,void 0),e.n([e.u({type:String,attribute:`size`})],d.prototype,`size`,void 0),e.n([e.l()],d.prototype,`_isClosed`,void 0);try{e.d(`pkt-alert`)(d)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var f=d;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
39
+ `}};t.n([t.u({type:Boolean,reflect:!1})],d.prototype,`compact`,void 0),t.n([t.u({type:String,reflect:!0})],d.prototype,`title`,void 0),t.n([t.u({type:String,reflect:!0})],d.prototype,`skin`,void 0),t.n([t.u({type:String})],d.prototype,`ariaLive`,void 0),t.n([t.u({type:String,reflect:!0,attribute:`aria-live`})],d.prototype,`ariaLiveAttr`,void 0),t.n([t.u({type:Boolean,reflect:!0})],d.prototype,`closeAlert`,void 0),t.n([t.u({type:String,reflect:!0})],d.prototype,`date`,void 0),t.n([t.u({type:String})],d.prototype,`role`,void 0),t.n([t.u({type:String,attribute:`size`})],d.prototype,`size`,void 0),t.n([t.l()],d.prototype,`_isClosed`,void 0);try{t.d(`pkt-alert`)(d)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var f=d;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
@@ -1 +1 @@
1
- const e=require("./element-CEarCnHH.cjs"),t=require("./directive-helpers-r7akb6wX.cjs");var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0){if(t){if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a))}else n(this,e)}}var s=t=>{t.type==e.m.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.p{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
1
+ const e=require("./directive-helpers-r7akb6wX.cjs"),t=require("./element-CEarCnHH.cjs");var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0){if(t){if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a))}else n(this,e)}}var s=e=>{e.type==t.m.CHILD&&(e._$AP??=o,e._$AQ??=a)},c=class extends t.p{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(t){if(e.i(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,6 +1,6 @@
1
- import { m as e, p as t } from "./element-DLgZkx5L.js";
2
- import { i as n } from "./directive-helpers-BoDzpPID.js";
3
- //#region ../../node_modules/lit-html/async-directive.js
1
+ import { i as e } from "./directive-helpers-KMRvtO9j.js";
2
+ import { m as t, p as n } from "./element-Bwc-likm.js";
3
+ // ../../node_modules/lit-html/async-directive.js
4
4
  var r = (e, t) => {
5
5
  let n = e._$AN;
6
6
  if (n === void 0) return !1;
@@ -32,9 +32,9 @@ function s(e, t = !1, n = 0) {
32
32
  } else r(this, e);
33
33
  }
34
34
  }
35
- var c = (t) => {
36
- t.type == e.CHILD && (t._$AP ??= s, t._$AQ ??= o);
37
- }, l = class extends t {
35
+ var c = (e) => {
36
+ e.type == t.CHILD && (e._$AP ??= s, e._$AQ ??= o);
37
+ }, l = class extends n {
38
38
  constructor() {
39
39
  super(...arguments), this._$AN = void 0;
40
40
  }
@@ -44,15 +44,14 @@ var c = (t) => {
44
44
  _$AO(e, t = !0) {
45
45
  e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (r(this, e), i(this));
46
46
  }
47
- setValue(e) {
48
- if (n(this._$Ct)) this._$Ct._$AI(e, this);
47
+ setValue(t) {
48
+ if (e(this._$Ct)) this._$Ct._$AI(t, this);
49
49
  else {
50
- let t = [...this._$Ct._$AH];
51
- t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
50
+ let e = [...this._$Ct._$AH];
51
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
52
52
  }
53
53
  }
54
54
  disconnected() {}
55
55
  reconnected() {}
56
56
  };
57
- //#endregion
58
57
  export { l as t };
@@ -1,4 +1,4 @@
1
- const e=require("./element-CEarCnHH.cjs");require("./icon-5A378_yh.cjs");const t=require("./if-defined-Ci4ZQsgL.cjs");var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=null}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e._`<nav
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./if-defined-Ci4ZQsgL.cjs");require("./icon-5A378_yh.cjs");var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=null}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e._`<nav
2
2
  class="pkt-back-link"
3
3
  aria-label=${this.ariaLabel||this.pktStrings.get(`backlink`).label}
4
4
  >
@@ -1,7 +1,7 @@
1
- import { _ as e, d as t, n, t as r, u as i } from "./element-DLgZkx5L.js";
2
- import "./icon-C1oCGwEe.js";
3
- import { t as a } from "./if-defined-DiYi2v_Q.js";
4
- //#region src/components/backlink/backlink.ts
1
+ import { _ as e, d as t, n, t as r, u as i } from "./element-Bwc-likm.js";
2
+ import { t as a } from "./if-defined-B3pYog2C.js";
3
+ import "./icon-CZDw42U7.js";
4
+ // src/components/backlink/backlink.ts
5
5
  var o = class extends r {
6
6
  constructor(...e) {
7
7
  super(...e), this.href = "", this.text = "Forsiden", this.ariaLabel = null;
@@ -31,8 +31,6 @@ try {
31
31
  } catch {
32
32
  console.warn("Forsøker å definere <pkt-backlink>, men den er allerede definert");
33
33
  }
34
- //#endregion
35
- //#region src/components/backlink/index.ts
34
+ // src/components/backlink/index.ts
36
35
  var s = o;
37
- //#endregion
38
36
  export { o as n, s as t };
@@ -1,4 +1,4 @@
1
- //#region ../../shared-types/booleanish.ts
1
+ // ../../shared-types/booleanish.ts
2
2
  var e = {
3
3
  fromAttribute(e) {
4
4
  return e == null ? !1 : e === "" || e === "true" || e === !0 ? !0 : e === "false" || e === !1 ? !1 : !!e;
@@ -14,5 +14,4 @@ var e = {
14
14
  return e == null ? null : e ? "true" : "false";
15
15
  }
16
16
  };
17
- //#endregion
18
17
  export { t as n, e as t };
@@ -1,6 +1,6 @@
1
- import { _ as e, d as t, h as n, n as r, t as i, u as a } from "./element-DLgZkx5L.js";
2
- import "./icon-C1oCGwEe.js";
3
- //#region src/components/breadcrumbs/breadcrumbs.ts
1
+ import { _ as e, d as t, h as n, n as r, t as i, u as a } from "./element-Bwc-likm.js";
2
+ import "./icon-CZDw42U7.js";
3
+ // src/components/breadcrumbs/breadcrumbs.ts
4
4
  var o = class extends i {
5
5
  constructor(...e) {
6
6
  super(...e), this.breadcrumbs = [];
@@ -72,5 +72,4 @@ try {
72
72
  } catch {
73
73
  console.warn("Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert");
74
74
  }
75
- //#endregion
76
75
  export { o as t };
@@ -0,0 +1,32 @@
1
+ const e=require("./element-with-slot-D_8fAzCW.cjs"),t=require("./element-CEarCnHH.cjs"),n=require("./class-map-C82GtM1w.cjs"),r=require("./if-defined-Ci4ZQsgL.cjs");require("./icon-5A378_yh.cjs");var i,a=`https://punkt-cdn.oslo.kommune.no/latest/animations/`;typeof window<`u`&&(window.pktAnimationPath=window.pktAnimationPath||a);var o=class i extends e.t{constructor(...e){super(...e),this.iconName=`user`,this.secondIconName=`user`,this.size=`medium`,this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin=`primary`,this.variant=`label-only`,this.state=void 0,this.type=`button`,this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=typeof window<`u`?window.pktAnimationPath:a,this.relocatedAria={}}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,e=>{(this.disabled||this.hasAttribute(`disabled`)||this.isLoading)&&(e.preventDefault(),e.stopImmediatePropagation())},!0),this.addEventListener(`keydown`,e=>{(this.disabled||this.hasAttribute(`disabled`)||this.isLoading)&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopImmediatePropagation())},!0)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`disabled`&&n===`false`&&(this.disabled=!1),(e===`isloading`||e===`isLoading`)&&n===`false`&&(this.isLoading=!1)}willUpdate(e){super.willUpdate(e);let t=!1,n={...this.relocatedAria};for(let e of i.relocatedAriaAttributes){let r=this.getAttribute(e);r!==null&&(n[e]=r,this.removeAttribute(e),t=!0)}t&&(this.relocatedAria=n)}firstUpdated(e){super.firstUpdated(e),this.disabled===`false`&&(this.disabled=!1),this.isLoading===`false`&&(this.isLoading=!1)}render(){let i=this.form??this.getAttribute(`form`)??void 0,a={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--isLoading":!!this.isLoading};return t._`
2
+ <button
3
+ class=${n.t(a)}
4
+ type=${this.type}
5
+ ?disabled=${!!this.disabled}
6
+ aria-busy=${r.t(this.isLoading?`true`:void 0)}
7
+ aria-disabled=${r.t(this.disabled||this.isLoading?`true`:void 0)}
8
+ aria-haspopup=${r.t(this.relocatedAria[`aria-haspopup`])}
9
+ aria-expanded=${r.t(this.relocatedAria[`aria-expanded`])}
10
+ aria-controls=${r.t(this.relocatedAria[`aria-controls`])}
11
+ aria-label=${r.t(this.relocatedAria[`aria-label`])}
12
+ tabindex=${r.t(this.relocatedAria.tabindex)}
13
+ form=${r.t(i)}
14
+ >
15
+ ${this.isLoading?t._`<pkt-icon
16
+ class="pkt-btn__icon pkt-btn__spinner"
17
+ name="spinner-blue"
18
+ path=${r.t(this.loadingAnimationPath)}
19
+ ></pkt-icon>`:t.h}
20
+ ${this.variant===`label-only`?t.h:t._`<pkt-icon
21
+ class="pkt-btn__icon pkt-icon"
22
+ name=${this.iconName}
23
+ path=${r.t(this.iconPath)}
24
+ ></pkt-icon>`}
25
+ <span class="pkt-btn__text">${e.i(this)}</span>
26
+ ${this.variant===`icons-right-and-left`?t._`<pkt-icon
27
+ class="pkt-btn__icon"
28
+ name=${this.secondIconName}
29
+ path=${r.t(this.secondIconPath)}
30
+ ></pkt-icon>`:t.h}
31
+ </button>
32
+ `}};i=o,i.relocatedAriaAttributes=[`aria-haspopup`,`aria-expanded`,`aria-controls`,`aria-label`,`tabindex`],t.n([t.u({type:String})],o.prototype,`iconName`,void 0),t.n([t.u({type:String})],o.prototype,`secondIconName`,void 0),t.n([t.u({type:String})],o.prototype,`iconPath`,void 0),t.n([t.u({type:String})],o.prototype,`secondIconPath`,void 0),t.n([t.u({type:String})],o.prototype,`size`,void 0),t.n([t.u({type:Boolean,attribute:`full-width`})],o.prototype,`fullWidth`,void 0),t.n([t.u({type:Boolean,attribute:`full-width-on-mobile`})],o.prototype,`fullWidthOnMobile`,void 0),t.n([t.u({type:String})],o.prototype,`color`,void 0),t.n([t.u({type:String})],o.prototype,`skin`,void 0),t.n([t.u({type:String})],o.prototype,`variant`,void 0),t.n([t.u({type:String,reflect:!0})],o.prototype,`state`,void 0),t.n([t.u({type:String,reflect:!0})],o.prototype,`type`,void 0),t.n([t.u({type:String})],o.prototype,`form`,void 0),t.n([t.u({type:Boolean,reflect:!0})],o.prototype,`isLoading`,void 0),t.n([t.u({type:Boolean,reflect:!0})],o.prototype,`disabled`,void 0),t.n([t.u({type:String})],o.prototype,`loadingAnimationPath`,void 0),t.n([t.l()],o.prototype,`relocatedAria`,void 0);try{t.d(`pkt-button`)(o)}catch{console.warn(`Forsøker å definere <pkt-button>, men den er allerede definert`)}var s=o;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
@@ -1,12 +1,12 @@
1
- import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
2
- import { t as o } from "./class-map-BDwVSgLb.js";
3
- import { i as s, t as c } from "./element-with-slot-mG-h7Sjw.js";
4
- import "./icon-C1oCGwEe.js";
5
- import { t as l } from "./if-defined-DiYi2v_Q.js";
6
- //#region src/components/button/button.ts
1
+ import { i as e, t } from "./element-with-slot-47quDZRt.js";
2
+ import { _ as n, d as r, h as i, l as a, n as o, u as s } from "./element-Bwc-likm.js";
3
+ import { t as c } from "./class-map-C9n5CNC8.js";
4
+ import { t as l } from "./if-defined-B3pYog2C.js";
5
+ import "./icon-CZDw42U7.js";
6
+ // src/components/button/button.ts
7
7
  var u, d = "https://punkt-cdn.oslo.kommune.no/latest/animations/";
8
8
  typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || d);
9
- var f = class t extends c {
9
+ var f = class r extends t {
10
10
  constructor(...e) {
11
11
  super(...e), this.iconName = "user", this.secondIconName = "user", this.size = "medium", this.fullWidth = !1, this.fullWidthOnMobile = !1, this.skin = "primary", this.variant = "label-only", this.state = void 0, this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = typeof window < "u" ? window.pktAnimationPath : d, this.relocatedAria = {};
12
12
  }
@@ -22,12 +22,12 @@ var f = class t extends c {
22
22
  }
23
23
  willUpdate(e) {
24
24
  super.willUpdate(e);
25
- let n = !1, r = { ...this.relocatedAria };
26
- for (let e of t.relocatedAriaAttributes) {
27
- let t = this.getAttribute(e);
28
- t !== null && (r[e] = t, this.removeAttribute(e), n = !0);
25
+ let t = !1, n = { ...this.relocatedAria };
26
+ for (let e of r.relocatedAriaAttributes) {
27
+ let r = this.getAttribute(e);
28
+ r !== null && (n[e] = r, this.removeAttribute(e), t = !0);
29
29
  }
30
- n && (this.relocatedAria = r);
30
+ t && (this.relocatedAria = n);
31
31
  }
32
32
  firstUpdated(e) {
33
33
  super.firstUpdated(e), this.disabled === "false" && (this.disabled = !1), this.isLoading === "false" && (this.isLoading = !1);
@@ -44,9 +44,9 @@ var f = class t extends c {
44
44
  "pkt-btn--full-small": !!this.fullWidthOnMobile,
45
45
  "pkt-btn--isLoading": !!this.isLoading
46
46
  };
47
- return e`
47
+ return n`
48
48
  <button
49
- class=${o(r)}
49
+ class=${c(r)}
50
50
  type=${this.type}
51
51
  ?disabled=${!!this.disabled}
52
52
  aria-busy=${l(this.isLoading ? "true" : void 0)}
@@ -58,22 +58,22 @@ var f = class t extends c {
58
58
  tabindex=${l(this.relocatedAria.tabindex)}
59
59
  form=${l(t)}
60
60
  >
61
- ${this.isLoading ? e`<pkt-icon
61
+ ${this.isLoading ? n`<pkt-icon
62
62
  class="pkt-btn__icon pkt-btn__spinner"
63
63
  name="spinner-blue"
64
64
  path=${l(this.loadingAnimationPath)}
65
- ></pkt-icon>` : n}
66
- ${this.variant === "label-only" ? n : e`<pkt-icon
65
+ ></pkt-icon>` : i}
66
+ ${this.variant === "label-only" ? i : n`<pkt-icon
67
67
  class="pkt-btn__icon pkt-icon"
68
68
  name=${this.iconName}
69
69
  path=${l(this.iconPath)}
70
70
  ></pkt-icon>`}
71
- <span class="pkt-btn__text">${s(this)}</span>
72
- ${this.variant === "icons-right-and-left" ? e`<pkt-icon
71
+ <span class="pkt-btn__text">${e(this)}</span>
72
+ ${this.variant === "icons-right-and-left" ? n`<pkt-icon
73
73
  class="pkt-btn__icon"
74
74
  name=${this.secondIconName}
75
75
  path=${l(this.secondIconPath)}
76
- ></pkt-icon>` : n}
76
+ ></pkt-icon>` : i}
77
77
  </button>
78
78
  `;
79
79
  }
@@ -84,32 +84,30 @@ u = f, u.relocatedAriaAttributes = [
84
84
  "aria-controls",
85
85
  "aria-label",
86
86
  "tabindex"
87
- ], i([a({ type: String })], f.prototype, "iconName", void 0), i([a({ type: String })], f.prototype, "secondIconName", void 0), i([a({ type: String })], f.prototype, "iconPath", void 0), i([a({ type: String })], f.prototype, "secondIconPath", void 0), i([a({ type: String })], f.prototype, "size", void 0), i([a({
87
+ ], o([s({ type: String })], f.prototype, "iconName", void 0), o([s({ type: String })], f.prototype, "secondIconName", void 0), o([s({ type: String })], f.prototype, "iconPath", void 0), o([s({ type: String })], f.prototype, "secondIconPath", void 0), o([s({ type: String })], f.prototype, "size", void 0), o([s({
88
88
  type: Boolean,
89
89
  attribute: "full-width"
90
- })], f.prototype, "fullWidth", void 0), i([a({
90
+ })], f.prototype, "fullWidth", void 0), o([s({
91
91
  type: Boolean,
92
92
  attribute: "full-width-on-mobile"
93
- })], f.prototype, "fullWidthOnMobile", void 0), i([a({ type: String })], f.prototype, "color", void 0), i([a({ type: String })], f.prototype, "skin", void 0), i([a({ type: String })], f.prototype, "variant", void 0), i([a({
93
+ })], f.prototype, "fullWidthOnMobile", void 0), o([s({ type: String })], f.prototype, "color", void 0), o([s({ type: String })], f.prototype, "skin", void 0), o([s({ type: String })], f.prototype, "variant", void 0), o([s({
94
94
  type: String,
95
95
  reflect: !0
96
- })], f.prototype, "state", void 0), i([a({
96
+ })], f.prototype, "state", void 0), o([s({
97
97
  type: String,
98
98
  reflect: !0
99
- })], f.prototype, "type", void 0), i([a({ type: String })], f.prototype, "form", void 0), i([a({
99
+ })], f.prototype, "type", void 0), o([s({ type: String })], f.prototype, "form", void 0), o([s({
100
100
  type: Boolean,
101
101
  reflect: !0
102
- })], f.prototype, "isLoading", void 0), i([a({
102
+ })], f.prototype, "isLoading", void 0), o([s({
103
103
  type: Boolean,
104
104
  reflect: !0
105
- })], f.prototype, "disabled", void 0), i([a({ type: String })], f.prototype, "loadingAnimationPath", void 0), i([r()], f.prototype, "relocatedAria", void 0);
105
+ })], f.prototype, "disabled", void 0), o([s({ type: String })], f.prototype, "loadingAnimationPath", void 0), o([a()], f.prototype, "relocatedAria", void 0);
106
106
  try {
107
- t("pkt-button")(f);
107
+ r("pkt-button")(f);
108
108
  } catch {
109
109
  console.warn("Forsøker å definere <pkt-button>, men den er allerede definert");
110
110
  }
111
- //#endregion
112
- //#region src/components/button/index.ts
111
+ // src/components/button/index.ts
113
112
  var p = f;
114
- //#endregion
115
113
  export { f as n, p as t };