@oslokommune/punkt-elements 15.3.1 → 15.4.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 (138) hide show
  1. package/dist/{accordionitem-BbeS44TD.js → accordionitem-CHXGzgLv.js} +4 -4
  2. package/dist/accordionitem-To95GT6b.cjs +34 -0
  3. package/dist/{alert-B9flMht5.cjs → alert-BDXWFRcf.cjs} +5 -5
  4. package/dist/{alert-BpFxQviu.js → alert-BHSd2Vpj.js} +6 -6
  5. package/dist/{backlink-DfMabyBp.js → backlink-C68H4Z3b.js} +5 -5
  6. package/dist/{backlink-Bn16ZEIX.cjs → backlink-CQoNgoa-.cjs} +1 -1
  7. package/dist/{button-CKgpX5QA.js → button-CHUuxLQV.js} +10 -10
  8. package/dist/{button-BgCKV0zW.cjs → button-VWxZW89G.cjs} +7 -7
  9. package/dist/{calendar-BMarIeVp.js → calendar-DTnx3DDH.js} +22 -22
  10. package/dist/{calendar-C6xgAJ7Z.cjs → calendar-DjbO2g5L.cjs} +11 -11
  11. package/dist/{card-DI3KodEc.cjs → card-5S2r9UD1.cjs} +27 -27
  12. package/dist/{card-h8ekgJRr.js → card-CnPjrdre.js} +7 -7
  13. package/dist/{checkbox-BJ9pz3kV.js → checkbox-BSz71IeT.js} +4 -4
  14. package/dist/{checkbox-B2t7wfxe.cjs → checkbox-D98_NjcU.cjs} +9 -9
  15. package/dist/{class-map-Dt2jXOlF.js → class-map-3ADKve8g.js} +3 -3
  16. package/dist/class-map-Bokp1SoS.cjs +5 -0
  17. package/dist/{combobox-BjAvk8Y-.js → combobox-CXBYVeh-.js} +11 -11
  18. package/dist/{combobox-HNN7GTzh.cjs → combobox-CZsCRADa.cjs} +12 -12
  19. package/dist/{consent-C37tuFwZ.cjs → consent-BQLkfN3d.cjs} +3 -3
  20. package/dist/{consent-DAk2BJ7I.js → consent-knPF4PS_.js} +3 -3
  21. package/dist/{datepicker-DvcH2QD9.js → datepicker-BOW852c2.js} +13 -13
  22. package/dist/{datepicker-2bneToiA.cjs → datepicker-BqGkvUmw.cjs} +21 -21
  23. package/dist/directive-helpers-B3Vpl3xV.cjs +5 -0
  24. package/dist/directive-helpers-CyPtA1_i.js +38 -0
  25. package/dist/element-CMTfByxQ.cjs +27 -0
  26. package/dist/{element-BXsf_NlG.js → element-CV9utnHJ.js} +114 -114
  27. package/dist/{heading-CBepYb7H.cjs → heading-B0XRE0lq.cjs} +1 -1
  28. package/dist/{heading-J7dN9nRi.js → heading-D9R5UBcv.js} +1 -1
  29. package/dist/{helptext-BG1P_9j0.cjs → helptext-BjW1WdOn.cjs} +3 -3
  30. package/dist/{helptext-Cm6FLBVf.js → helptext-TFpeGJ1P.js} +5 -5
  31. package/dist/{icon-DBZvMard.js → icon-D0IQAVwS.js} +3 -3
  32. package/dist/{icon-n4-ve48P.cjs → icon-Dj0oZZSa.cjs} +3 -3
  33. package/dist/if-defined-hKKmbsI8.cjs +5 -0
  34. package/dist/{if-defined-CxHgig4I.js → if-defined-rXcLNTzN.js} +1 -1
  35. package/dist/{input-element-CbjYtVou.js → input-element-Bkv6Yxld.js} +1 -1
  36. package/dist/{input-element-BBv4xjPb.cjs → input-element-DM0tY799.cjs} +1 -1
  37. package/dist/{input-wrapper-Bwmva-69.js → input-wrapper-CaUY90qz.js} +12 -12
  38. package/dist/{input-wrapper-CJqmwe3I.cjs → input-wrapper-JU4D2TGu.cjs} +19 -19
  39. package/dist/{link-BKnT-97D.js → link-Bscfb6s9.js} +4 -4
  40. package/dist/{link-DRPFqqEn.cjs → link-CDuv1jxx.cjs} +3 -3
  41. package/dist/{linkcard-02fxYQ2g.cjs → linkcard-3WUL0CpY.cjs} +3 -3
  42. package/dist/{linkcard-C2UENcqo.js → linkcard-wNgRxJ-S.js} +4 -4
  43. package/dist/{listbox-CLtowV6W.js → listbox-CI7Wfn_e.js} +8 -8
  44. package/dist/{listbox-C_0RhGhk.cjs → listbox-TRqKskJT.cjs} +12 -12
  45. package/dist/{loader-BW-AWQiE.js → loader-BF9K1VCZ.js} +5 -5
  46. package/dist/{loader-Cj4kUNRE.cjs → loader-C1LI8Q4z.cjs} +4 -4
  47. package/dist/{messagebox-CK0sSRep.cjs → messagebox-Dmot5szX.cjs} +4 -4
  48. package/dist/{messagebox-DB8tEXrV.js → messagebox-LBEzcr6B.js} +12 -12
  49. package/dist/{modal-ClYfWW2a.js → modal-CGHWsjk8.js} +5 -5
  50. package/dist/{modal-BzVQSQy2.cjs → modal-S9MOKOaz.cjs} +6 -6
  51. package/dist/pkt-accordion.cjs +1 -1
  52. package/dist/pkt-accordion.js +2 -2
  53. package/dist/pkt-alert.cjs +1 -1
  54. package/dist/pkt-alert.js +1 -1
  55. package/dist/pkt-backlink.cjs +1 -1
  56. package/dist/pkt-backlink.js +1 -1
  57. package/dist/pkt-button.cjs +1 -1
  58. package/dist/pkt-button.js +1 -1
  59. package/dist/pkt-calendar.cjs +1 -1
  60. package/dist/pkt-calendar.js +1 -1
  61. package/dist/pkt-card.cjs +1 -1
  62. package/dist/pkt-card.js +1 -1
  63. package/dist/pkt-checkbox.cjs +1 -1
  64. package/dist/pkt-checkbox.js +1 -1
  65. package/dist/pkt-combobox.cjs +1 -1
  66. package/dist/pkt-combobox.js +1 -1
  67. package/dist/pkt-consent.cjs +1 -1
  68. package/dist/pkt-consent.js +1 -1
  69. package/dist/pkt-datepicker.cjs +1 -1
  70. package/dist/pkt-datepicker.js +2 -2
  71. package/dist/pkt-header.cjs +52 -52
  72. package/dist/pkt-header.js +9 -9
  73. package/dist/pkt-heading.cjs +1 -1
  74. package/dist/pkt-heading.js +1 -1
  75. package/dist/pkt-helptext.cjs +1 -1
  76. package/dist/pkt-helptext.js +1 -1
  77. package/dist/pkt-icon.cjs +1 -1
  78. package/dist/pkt-icon.js +1 -1
  79. package/dist/pkt-index.cjs +1 -1
  80. package/dist/pkt-index.js +26 -26
  81. package/dist/pkt-input-wrapper.cjs +1 -1
  82. package/dist/pkt-input-wrapper.js +1 -1
  83. package/dist/pkt-link.cjs +1 -1
  84. package/dist/pkt-link.js +1 -1
  85. package/dist/pkt-linkcard.cjs +1 -1
  86. package/dist/pkt-linkcard.js +1 -1
  87. package/dist/pkt-listbox.cjs +1 -1
  88. package/dist/pkt-listbox.js +1 -1
  89. package/dist/pkt-loader.cjs +1 -1
  90. package/dist/pkt-loader.js +1 -1
  91. package/dist/pkt-messagebox.cjs +1 -1
  92. package/dist/pkt-messagebox.js +1 -1
  93. package/dist/pkt-modal.cjs +1 -1
  94. package/dist/pkt-modal.js +1 -1
  95. package/dist/pkt-progressbar.cjs +1 -1
  96. package/dist/pkt-progressbar.js +2 -2
  97. package/dist/pkt-radiobutton.cjs +1 -1
  98. package/dist/pkt-radiobutton.js +1 -1
  99. package/dist/pkt-select.cjs +1 -1
  100. package/dist/pkt-select.js +1 -1
  101. package/dist/pkt-tabs.cjs +1 -1
  102. package/dist/pkt-tabs.js +2 -2
  103. package/dist/pkt-tag.cjs +1 -1
  104. package/dist/pkt-tag.js +1 -1
  105. package/dist/pkt-textarea.cjs +1 -1
  106. package/dist/pkt-textarea.js +1 -1
  107. package/dist/pkt-textinput.cjs +1 -1
  108. package/dist/pkt-textinput.js +1 -1
  109. package/dist/{progressbar-ClZOyCz9.cjs → progressbar-Bxh335uT.cjs} +5 -5
  110. package/dist/{progressbar-CJa70NEo.js → progressbar-GSA4Md1u.js} +7 -7
  111. package/dist/{radiobutton-DWoYQn8H.cjs → radiobutton-95wp024h.cjs} +7 -7
  112. package/dist/{radiobutton-CvKKNFMd.js → radiobutton-CTFAV5GU.js} +9 -9
  113. package/dist/{ref-C5iJMIE1.cjs → ref-CxLwrCxt.cjs} +3 -3
  114. package/dist/{ref-BxiKhrfa.js → ref-Dma3n3i8.js} +5 -5
  115. package/dist/repeat-C-FJ2vfy.cjs +5 -0
  116. package/dist/repeat-DnlRNf63.js +61 -0
  117. package/dist/{select-BQUp88lY.cjs → select-CZ_Lx5W6.cjs} +2 -2
  118. package/dist/{select-CFkxir_l.js → select-YLvYAQX6.js} +6 -6
  119. package/dist/{state-GDzxl12x.cjs → state-BNgpvY-A.cjs} +1 -1
  120. package/dist/{state-DgnkjP0q.js → state-l4hGZdFJ.js} +1 -1
  121. package/dist/tabitem-BKv4eN0a.cjs +65 -0
  122. package/dist/{tabitem-C8-tZyc_.js → tabitem-DQRzgAT4.js} +10 -10
  123. package/dist/{tag-DIJMJhyp.js → tag-68q0_Sn0.js} +6 -6
  124. package/dist/{tag-h0vD2Na0.cjs → tag-BnT5onW2.cjs} +4 -4
  125. package/dist/{textarea-DcCOfNlr.cjs → textarea-CuTsE1WX.cjs} +3 -3
  126. package/dist/{textarea-CMuiBUee.js → textarea-DhWH99qN.js} +16 -16
  127. package/dist/{textinput-D30TCADP.js → textinput-BCi9p0Du.js} +8 -8
  128. package/dist/{textinput-DR3aaHTH.cjs → textinput-st4Vml5J.cjs} +11 -11
  129. package/package.json +3 -3
  130. package/dist/accordionitem-DUWhTUEI.cjs +0 -34
  131. package/dist/class-map-CApIYSRo.cjs +0 -5
  132. package/dist/directive-helpers-CQef4qUQ.js +0 -38
  133. package/dist/directive-helpers-CYIEJ8pI.cjs +0 -5
  134. package/dist/element-aUzIoa1s.cjs +0 -27
  135. package/dist/if-defined-BElHLTlB.cjs +0 -5
  136. package/dist/repeat-B55jMEsG.js +0 -61
  137. package/dist/repeat-DcYSFU2y.cjs +0 -5
  138. package/dist/tabitem-DaYfUaxw.cjs +0 -65
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-DWoYQn8H.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-95wp024h.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./radiobutton-CvKKNFMd.js";
1
+ import { P as t } from "./radiobutton-CTFAV5GU.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktRadioButton,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BQUp88lY.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-CZ_Lx5W6.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./select-CFkxir_l.js";
1
+ import { P as t } from "./select-YLvYAQX6.js";
2
2
  const a = t;
3
3
  export {
4
4
  t as PktSelect,
package/dist/pkt-tabs.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tabitem-DaYfUaxw.cjs");exports.PktTabItem=e.PktTabItem;exports.PktTabs=e.PktTabs;exports.default=e.PktTabs;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tabitem-BKv4eN0a.cjs");exports.PktTabItem=e.PktTabItem_default;exports.PktTabs=e.PktTabs;exports.default=e.PktTabs;
package/dist/pkt-tabs.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as t } from "./tabitem-C8-tZyc_.js";
2
- import { a as e } from "./tabitem-C8-tZyc_.js";
1
+ import { a as t } from "./tabitem-DQRzgAT4.js";
2
+ import { P as e } from "./tabitem-DQRzgAT4.js";
3
3
  export {
4
4
  e as PktTabItem,
5
5
  t as PktTabs,
package/dist/pkt-tag.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-h0vD2Na0.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./tag-BnT5onW2.cjs"),t=e.PktTag;Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>e.PktTag});exports.default=t;
package/dist/pkt-tag.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P as a } from "./tag-DIJMJhyp.js";
1
+ import { P as a } from "./tag-68q0_Sn0.js";
2
2
  const o = a;
3
3
  export {
4
4
  a as PktTag,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-DcCOfNlr.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-CuTsE1WX.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as a } from "./textarea-CMuiBUee.js";
1
+ import { P as a } from "./textarea-DhWH99qN.js";
2
2
  const e = a;
3
3
  export {
4
4
  a as PktTextarea,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-DR3aaHTH.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-st4Vml5J.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
@@ -1,4 +1,4 @@
1
- import { P as t } from "./textinput-D30TCADP.js";
1
+ import { P as t } from "./textinput-BCi9p0Du.js";
2
2
  const p = t;
3
3
  export {
4
4
  t as PktTextinput,
@@ -1,21 +1,21 @@
1
- "use strict";const n=require("./class-map-CApIYSRo.cjs"),e=require("./element-aUzIoa1s.cjs"),p=require("./state-GDzxl12x.cjs"),h=require("./ref-C5iJMIE1.cjs"),b=require("./directive-C7oCP5Bh.cjs"),d=require("./utils-byXsEz1u.cjs");require("./icon-n4-ve48P.cjs");/**
1
+ "use strict";const n=require("./class-map-Bokp1SoS.cjs"),e=require("./element-CMTfByxQ.cjs"),p=require("./state-BNgpvY-A.cjs"),h=require("./ref-CxLwrCxt.cjs"),b=require("./directive-C7oCP5Bh.cjs"),d=require("./utils-byXsEz1u.cjs");require("./icon-Dj0oZZSa.cjs");/**
2
2
  * @license
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const c="important",v=" !"+c,f=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce(((t,s)=>{const r=l[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(l,[t]){const{style:s}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const u=typeof i=="string"&&i.endsWith(v);r.includes("-")||u?s.setProperty(r,u?i.slice(0,-11):i,u?c:""):s[r]=i}}return e.T}});var k=Object.defineProperty,m=Object.getOwnPropertyDescriptor,a=(l,t,s,r)=>{for(var i=r>1?void 0:r?m(t,s):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&k(t,s,i),i};exports.PktProgressbar=class extends e.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",s=this.valueMax-this.valueMin,r=this.valueCurrent/s*100,i=this.statusType==="fraction"?Math.round(r):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${s}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return e.x` <div
5
+ */const c="important",v=" !"+c,f=b.e(class extends b.i{constructor(l){var t;if(super(l),l.type!==b.t.ATTRIBUTE||l.name!=="style"||((t=l.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(l){return Object.keys(l).reduce((t,s)=>{const r=l[s];return r==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(l,[t]){const{style:s}=l.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const u=typeof i=="string"&&i.endsWith(v);r.includes("-")||u?s.setProperty(r,u?i.slice(0,-11):i,u?c:""):s[r]=i}}return e.E}});var k=Object.defineProperty,m=Object.getOwnPropertyDescriptor,a=(l,t,s,r)=>{for(var i=r>1?void 0:r?m(t,s):t,u=l.length-1,o;u>=0;u--)(o=l[u])&&(i=(r?o(t,s,i):o(i))||i);return r&&i&&k(t,s,i),i};exports.PktProgressbar=class extends e.PktElement{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive="polite",this.id=d.uuidish(),this.role="progressbar",this.skin="dark-blue",this.statusPlacement="following",this.statusType="none",this.title="",this.titlePosition="left",this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.computedAriaLabelledby=null,this.computedAriaValueText="",this.labelRef=h.e(),this.progressBarRef=h.e()}firstUpdated(t){super.firstUpdated(t),this.setComputedValues(),this.syncAttributes()}updated(t){super.updated(t),t.has("valueCurrent")&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),t.has("id")&&this.id&&(this.progressBarId=this.id),(t.has("statusType")||t.has("id")||t.has("ariaLabelledby"))&&(this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(t.has("ariaValueText")||t.has("valueCurrent")||t.has("valueMax"))&&(this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""),this.syncAttributes()}render(){const t=this.statusType!=="none",s=this.valueMax-this.valueMin,r=this.valueCurrent/s*100,i=this.statusType==="fraction"?Math.round(r):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),u=`${this.valueCurrent} av ${s}`,o=n.e({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),g=n.e({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition==="center"}),y=n.e({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement==="center"}),P=n.e({"pkt-progressbar__status-placement--following":this.statusPlacement==="following","pkt-progressbar__status-placement--center":this.statusPlacement==="center","pkt-progressbar__status-placement--left":this.statusPlacement==="left"});return e.b` <div
6
6
  class="pkt-progressbar__container"
7
7
  .ref=${this.progressBarRef}
8
8
  style=${f({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${i}%`})}
9
9
  >
10
- ${this.title?e.x`<p id=${`${this.progressBarId}-title`} class=${g}>${this.title}</p>`:e.E}
10
+ ${this.title?e.b`<p id=${`${this.progressBarId}-title`} class=${g}>${this.title}</p>`:e.A}
11
11
 
12
12
  <div class="pkt-progressbar__bar-wrapper">
13
13
  <div class=${o}></div>
14
14
  </div>
15
15
 
16
- ${t?e.x`<div class=${y}>
16
+ ${t?e.b`<div class=${y}>
17
17
  <span class=${P} ${h.n(this.labelRef)}>
18
18
  ${this.statusType==="percentage"?`${i}%`:u}
19
19
  </span>
20
- </div>`:e.E}
20
+ </div>`:e.A}
21
21
  </div>`}setComputedValues(){this.progressbarId=this.id||d.uuidish(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`,this.computedAriaValueText=this.statusType==="fraction"&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||""}syncAttributes(){this._handleAttribute("aria-live",this.ariaLive),this._handleAttribute("aria-valuenow",this.valueCurrent),this._handleAttribute("aria-valuemin",this.valueMin),this._handleAttribute("aria-valuemax",this.valueMax),this._handleAttribute("aria-valuetext",this.computedAriaValueText),this._handleAttribute("aria-label",this.ariaLabel),this._handleAttribute("role",this.role),this._handleAttribute("aria-atomic","true"),this._handleAttribute("id",this.progressbarId),this.ariaLabel||this._handleAttribute("aria-labelledby",this.computedAriaLabelledby)}_handleAttribute(t,s){s==null||s===""?this.removeAttribute(t):this.setAttribute(t,String(s))}};a([e.n({type:String})],exports.PktProgressbar.prototype,"ariaLabel",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaLabelledby",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"ariaValueText",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"ariaLive",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"id",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"role",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"skin",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"statusPlacement",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"statusType",2);a([e.n({type:String,reflect:!0})],exports.PktProgressbar.prototype,"title",2);a([e.n({type:String})],exports.PktProgressbar.prototype,"titlePosition",2);a([e.n({type:Number,reflect:!0})],exports.PktProgressbar.prototype,"valueCurrent",2);a([e.n({type:Number})],exports.PktProgressbar.prototype,"valueMax",2);a([e.n({type:Number})],exports.PktProgressbar.prototype,"valueMin",2);a([p.r()],exports.PktProgressbar.prototype,"labelWidth",2);a([p.r()],exports.PktProgressbar.prototype,"progressbarId",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaLabelledby",2);a([p.r()],exports.PktProgressbar.prototype,"computedAriaValueText",2);exports.PktProgressbar=a([e.t("pkt-progressbar")],exports.PktProgressbar);const _=exports.PktProgressbar;exports.PktProgressbar$1=_;
@@ -1,10 +1,10 @@
1
- import { e as n } from "./class-map-Dt2jXOlF.js";
2
- import { T as g, P as _, E as c, x as b, n as u, t as $ } from "./element-BXsf_NlG.js";
3
- import { r as h } from "./state-DgnkjP0q.js";
4
- import { e as y, n as A } from "./ref-BxiKhrfa.js";
1
+ import { e as n } from "./class-map-3ADKve8g.js";
2
+ import { E as g, P as _, A as c, b, n as u, t as $ } from "./element-CV9utnHJ.js";
3
+ import { r as h } from "./state-l4hGZdFJ.js";
4
+ import { e as y, n as A } from "./ref-Dma3n3i8.js";
5
5
  import { e as x, i as T, t as k } from "./directive-oAbCiebi.js";
6
6
  import { u as d } from "./utils-DznhwRXm.js";
7
- import "./icon-DBZvMard.js";
7
+ import "./icon-D0IQAVwS.js";
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2018 Google LLC
@@ -16,10 +16,10 @@ const v = "important", C = " !" + v, M = x(class extends T {
16
16
  if (super(t), t.type !== k.ATTRIBUTE || t.name !== "style" || ((e = t.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
17
17
  }
18
18
  render(t) {
19
- return Object.keys(t).reduce(((e, a) => {
19
+ return Object.keys(t).reduce((e, a) => {
20
20
  const s = t[a];
21
21
  return s == null ? e : e + `${a = a.includes("-") ? a : a.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
22
- }), "");
22
+ }, "");
23
23
  }
24
24
  update(t, [e]) {
25
25
  const { style: a } = t.element;
@@ -1,13 +1,13 @@
1
- "use strict";const t=require("./element-aUzIoa1s.cjs"),r=require("./state-GDzxl12x.cjs"),u=require("./input-element-BBv4xjPb.cjs"),h=require("./ref-C5iJMIE1.cjs"),c=require("./class-map-CApIYSRo.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,i=(p,e,n,a)=>{for(var s=a>1?void 0:a?k(e,n):e,o=p.length-1,l;o>=0;o--)(l=p[o])&&(s=(a?l(e,n,s):l(s))||s);return a&&s&&d(e,n,s),s};exports.PktRadioButton=class extends u.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,n,a){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,n,a)}render(){const e=c.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=c.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=c.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",o=()=>t.x`
2
- ${this.tagText?t.x`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
3
- ${this.optionalTag?t.x`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
4
- ${this.requiredTag?t.x`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
5
- `,l=()=>t.x`
1
+ "use strict";const t=require("./element-CMTfByxQ.cjs"),r=require("./state-BNgpvY-A.cjs"),u=require("./input-element-DM0tY799.cjs"),h=require("./ref-CxLwrCxt.cjs"),c=require("./class-map-Bokp1SoS.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,i=(p,e,n,a)=>{for(var s=a>1?void 0:a?k(e,n):e,o=p.length-1,l;o>=0;o--)(l=p[o])&&(s=(a?l(e,n,s):l(s))||s);return a&&s&&d(e,n,s),s};exports.PktRadioButton=class extends u.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,n,a){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,n,a)}render(){const e=c.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=c.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=c.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",o=()=>t.b`
2
+ ${this.tagText?t.b`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.A}
3
+ ${this.optionalTag?t.b`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.A}
4
+ ${this.requiredTag?t.b`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.A}
5
+ `,l=()=>t.b`
6
6
  <label class=${a} for=${this.id+"-internal"}>
7
7
  ${this.label} ${o()}
8
- ${this.checkHelptext?t.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:t.E}
8
+ ${this.checkHelptext?t.b`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:t.A}
9
9
  </label>
10
- `;return t.x`
10
+ `;return t.b`
11
11
  <div class="pkt-input-check">
12
12
  <div class=${e}>
13
13
  <input
@@ -1,12 +1,12 @@
1
- import { x as h, E as n, n as s, t as d } from "./element-BXsf_NlG.js";
2
- import { r as k } from "./state-DgnkjP0q.js";
3
- import { P as f } from "./input-element-CbjYtVou.js";
4
- import { e as g, n as y } from "./ref-BxiKhrfa.js";
5
- import { e as u } from "./class-map-Dt2jXOlF.js";
6
- var $ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, i = (e, a, c, l) => {
7
- for (var p = l > 1 ? void 0 : l ? b(a, c) : a, r = e.length - 1, o; r >= 0; r--)
1
+ import { b as h, A as n, n as s, t as d } from "./element-CV9utnHJ.js";
2
+ import { r as k } from "./state-l4hGZdFJ.js";
3
+ import { P as f } from "./input-element-Bkv6Yxld.js";
4
+ import { e as g, n as b } from "./ref-Dma3n3i8.js";
5
+ import { e as u } from "./class-map-3ADKve8g.js";
6
+ var y = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (e, a, c, l) => {
7
+ for (var p = l > 1 ? void 0 : l ? $(a, c) : a, r = e.length - 1, o; r >= 0; r--)
8
8
  (o = e[r]) && (p = (l ? o(a, c, p) : o(p)) || p);
9
- return l && p && $(a, c, p), p;
9
+ return l && p && y(a, c, p), p;
10
10
  };
11
11
  let t = class extends f {
12
12
  constructor() {
@@ -51,7 +51,7 @@ let t = class extends f {
51
51
  ?disabled=${this.disabled}
52
52
  form=""
53
53
  name=${this.name + "-internal"}
54
- ${y(this.inputRef)}
54
+ ${b(this.inputRef)}
55
55
  @change=${this.toggleChecked}
56
56
  @input=${this.onInput}
57
57
  @blur=${this.onBlur}
@@ -1,9 +1,9 @@
1
- "use strict";const d=require("./element-aUzIoa1s.cjs"),a=require("./directive-helpers-CYIEJ8pI.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
1
+ "use strict";const d=require("./element-CMTfByxQ.cjs"),a=require("./directive-helpers-B3Vpl3xV.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const n=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const h of s)(i=h._$AO)==null||i.call(h,e,!1),n(h,e);return!0},c=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},$=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),u(e)}};function _(t){this._$AN!==void 0?(c(this),this._$AM=t,$(this)):this._$AM=t}function f(t,e=!1,s=0){const i=this._$AH,h=this._$AN;if(h!==void 0&&h.size!==0)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)n(i[o],!1),c(i[o]);else i!=null&&(n(i,!1),c(i));else n(this,t)}const u=t=>{t.type==l.t.CHILD&&(t._$AP??(t._$AP=f),t._$AQ??(t._$AQ=_))};class A extends l.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),$(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,h;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(h=this.disconnected)==null||h.call(this)),s&&(n(this,e),c(this))}setValue(e){if(a.f(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
5
+ */const n=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const h of s)(i=h._$AO)==null||i.call(h,e,!1),n(h,e);return!0},r=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},$=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),f(e)}};function _(t){this._$AN!==void 0?(r(this),this._$AM=t,$(this)):this._$AM=t}function A(t,e=!1,s=0){const i=this._$AH,h=this._$AN;if(h!==void 0&&h.size!==0)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)n(i[o],!1),r(i[o]);else i!=null&&(n(i,!1),r(i));else n(this,t)}const f=t=>{t.type==l.t.CHILD&&(t._$AP??(t._$AP=A),t._$AQ??(t._$AQ=_))};class u extends l.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),$(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,h;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(h=this.disconnected)==null||h.call(this)),s&&(n(this,e),r(this))}setValue(e){if(a.r(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
6
6
  * @license
7
7
  * Copyright 2020 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const v=()=>new G;class G{}const r=new WeakMap,p=l.e(class extends A{render(t){return d.E}update(t,[e]){var i;const s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),d.E}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let s=r.get(e);s===void 0&&(s=new WeakMap,r.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=r.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.e=v;exports.n=p;
9
+ */const v=()=>new G;class G{}const c=new WeakMap,p=l.e(class extends u{render(t){return d.A}update(t,[e]){var i;const s=e!==this.G;return s&&this.G!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.G=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),d.A}rt(t){if(this.isConnected||(t=void 0),typeof this.G=="function"){const e=this.ht??globalThis;let s=c.get(e);s===void 0&&(s=new WeakMap,c.set(e,s)),s.get(this.G)!==void 0&&this.G.call(this.ht,void 0),s.set(this.G,t),t!==void 0&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){var t,e;return typeof this.G=="function"?(t=c.get(this.ht??globalThis))==null?void 0:t.get(this.G):(e=this.G)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.e=v;exports.n=p;
@@ -1,6 +1,6 @@
1
- import { E as l } from "./element-BXsf_NlG.js";
2
- import { f as $ } from "./directive-helpers-CQef4qUQ.js";
3
- import { i as f, t as a, e as _ } from "./directive-oAbCiebi.js";
1
+ import { A as l } from "./element-CV9utnHJ.js";
2
+ import { r as $ } from "./directive-helpers-CyPtA1_i.js";
3
+ import { i as a, t as f, e as _ } from "./directive-oAbCiebi.js";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2017 Google LLC
@@ -36,9 +36,9 @@ function u(t, s = !1, e = 0) {
36
36
  else o(this, t);
37
37
  }
38
38
  const v = (t) => {
39
- t.type == a.CHILD && (t._$AP ?? (t._$AP = u), t._$AQ ?? (t._$AQ = A));
39
+ t.type == f.CHILD && (t._$AP ?? (t._$AP = u), t._$AQ ?? (t._$AQ = A));
40
40
  };
41
- class p extends f {
41
+ class p extends a {
42
42
  constructor() {
43
43
  super(...arguments), this._$AN = void 0;
44
44
  }
@@ -0,0 +1,5 @@
1
+ "use strict";const w=require("./element-CMTfByxQ.cjs"),x=require("./directive-C7oCP5Bh.cjs"),s=require("./directive-helpers-B3Vpl3xV.cjs");/**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const q=(l,v,d)=>{const a=new Map;for(let e=v;e<=d;e++)a.set(l[e],e);return a},m=x.e(class extends x.i{constructor(l){if(super(l),l.type!==x.t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,v,d){let a;d===void 0?d=v:v!==void 0&&(a=v);const e=[],o=[];let n=0;for(const c of l)e[n]=a?a(c,n):n,o[n]=d(c,n),n++;return{values:o,keys:e}}render(l,v,d){return this.dt(l,v,d).values}update(l,[v,d,a]){const e=s.M(l),{values:o,keys:n}=this.dt(v,d,a);if(!Array.isArray(e))return this.ut=n,o;const c=this.ut??(this.ut=[]),f=[];let p,g,t=0,i=e.length-1,r=0,u=o.length-1;for(;t<=i&&r<=u;)if(e[t]===null)t++;else if(e[i]===null)i--;else if(c[t]===n[r])f[r]=s.u(e[t],o[r]),t++,r++;else if(c[i]===n[u])f[u]=s.u(e[i],o[u]),i--,u--;else if(c[t]===n[u])f[u]=s.u(e[t],o[u]),s.v(l,f[u+1],e[t]),t++,u--;else if(c[i]===n[r])f[r]=s.u(e[i],o[r]),s.v(l,e[t],e[i]),i--,r++;else if(p===void 0&&(p=q(n,r,u),g=q(c,t,i)),p.has(c[t]))if(p.has(c[i])){const h=g.get(n[r]),y=h!==void 0?e[h]:null;if(y===null){const k=s.v(l,e[t]);s.u(k,o[r]),f[r]=k}else f[r]=s.u(y,o[r]),s.v(l,e[t],y),e[h]=null;r++}else s.h(e[i]),i--;else s.h(e[t]),t++;for(;r<=u;){const h=s.v(l,f[u+1]);s.u(h,o[r]),f[r++]=h}for(;t<=i;){const h=e[t++];h!==null&&s.h(h)}return this.ut=n,s.p(l,f),w.E}});exports.c=m;
@@ -0,0 +1,61 @@
1
+ import { E as w } from "./element-CV9utnHJ.js";
2
+ import { e as A, i as E, t as M } from "./directive-oAbCiebi.js";
3
+ import { M as b, u as p, v, h as x, p as j } from "./directive-helpers-CyPtA1_i.js";
4
+ /**
5
+ * @license
6
+ * Copyright 2017 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ */
9
+ const k = (s, c, a) => {
10
+ const h = /* @__PURE__ */ new Map();
11
+ for (let e = c; e <= a; e++) h.set(s[e], e);
12
+ return h;
13
+ }, I = A(class extends E {
14
+ constructor(s) {
15
+ if (super(s), s.type !== M.CHILD) throw Error("repeat() can only be used in text expressions");
16
+ }
17
+ dt(s, c, a) {
18
+ let h;
19
+ a === void 0 ? a = c : c !== void 0 && (h = c);
20
+ const e = [], i = [];
21
+ let l = 0;
22
+ for (const u of s) e[l] = h ? h(u, l) : l, i[l] = a(u, l), l++;
23
+ return { values: i, keys: e };
24
+ }
25
+ render(s, c, a) {
26
+ return this.dt(s, c, a).values;
27
+ }
28
+ update(s, [c, a, h]) {
29
+ const e = b(s), { values: i, keys: l } = this.dt(c, a, h);
30
+ if (!Array.isArray(e)) return this.ut = l, i;
31
+ const u = this.ut ?? (this.ut = []), f = [];
32
+ let m, $, t = 0, o = e.length - 1, r = 0, n = i.length - 1;
33
+ for (; t <= o && r <= n; ) if (e[t] === null) t++;
34
+ else if (e[o] === null) o--;
35
+ else if (u[t] === l[r]) f[r] = p(e[t], i[r]), t++, r++;
36
+ else if (u[o] === l[n]) f[n] = p(e[o], i[n]), o--, n--;
37
+ else if (u[t] === l[n]) f[n] = p(e[t], i[n]), v(s, f[n + 1], e[t]), t++, n--;
38
+ else if (u[o] === l[r]) f[r] = p(e[o], i[r]), v(s, e[t], e[o]), o--, r++;
39
+ else if (m === void 0 && (m = k(l, r, n), $ = k(u, t, o)), m.has(u[t])) if (m.has(u[o])) {
40
+ const d = $.get(l[r]), y = d !== void 0 ? e[d] : null;
41
+ if (y === null) {
42
+ const g = v(s, e[t]);
43
+ p(g, i[r]), f[r] = g;
44
+ } else f[r] = p(y, i[r]), v(s, e[t], y), e[d] = null;
45
+ r++;
46
+ } else x(e[o]), o--;
47
+ else x(e[t]), t++;
48
+ for (; r <= n; ) {
49
+ const d = v(s, f[n + 1]);
50
+ p(d, i[r]), f[r++] = d;
51
+ }
52
+ for (; t <= o; ) {
53
+ const d = e[t++];
54
+ d !== null && x(d);
55
+ }
56
+ return this.ut = l, j(s, f), w;
57
+ }
58
+ });
59
+ export {
60
+ I as c
61
+ };
@@ -1,4 +1,4 @@
1
- "use strict";const p=require("./element-aUzIoa1s.cjs"),h=require("./ref-C5iJMIE1.cjs"),l=require("./if-defined-BElHLTlB.cjs"),c=require("./state-GDzxl12x.cjs"),v=require("./input-element-BBv4xjPb.cjs"),f=require("./pkt-options-controller-BnTmkl3g.cjs"),_=require("./pkt-slot-controller-D4nKlom5.cjs");require("./input-wrapper-CJqmwe3I.cjs");var $=Object.defineProperty,u=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&$(t,e,s),s};class a extends v.PktInputElement{constructor(){super(...arguments),this._optionsProp=[],this._options=[]}get options(){return this._options.map(t=>({...t,selected:this.isOptionSelected(t)}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}isOptionSelected(t){return Array.isArray(this.value)?this.value.includes(t.value):t.value===this.value}findOptionByValue(t){return this._options.find(e=>e.value===t)}getSelectedOptions(){return this._options.filter(t=>this.isOptionSelected(t))}parseOptions(){var i,s;const t=this._optionsProp.length>0,e=((s=(i=this.optionsController)==null?void 0:i.nodes)==null?void 0:s.length)&&this.optionsController.nodes.length>0;t?this._options=this._optionsProp:e&&(this._options=this.optionsController.options)}willUpdate(t){super.willUpdate(t),this.parseOptions()}}u([p.n({type:Array,attribute:"options"})],a.prototype,"_optionsProp");u([c.r()],a.prototype,"_options");var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,d=(r,t,e,i)=>{for(var s=i>1?void 0:i?b(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&x(t,e,s),s};exports.PktSelect=class extends a{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new f.PktOptionsSlotController(this),this.slotController=new _.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(t=>{t.selected&&!this.value&&(this.value=t.value)})}add(t,e){const i={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(i);else if(typeof e=="number")this._options.splice(e,0,i);else{const s=e.value||e.text,o=this._options.findIndex(n=>n.value===s);o>=0?this._options.splice(o,0,i):this._options.push(i)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(s=>s.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,i){var s,o;t==="options"&&(this._options=i?JSON.parse(i):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((s=this.inputRef.value)==null?void 0:s.selectedIndex):this._options.findIndex(n=>n.value===i),this.selectedOptions=(o=this.inputRef.value)==null?void 0:o.selectedOptions,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}update(t){var e,i;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(i=this.inputRef.value)==null?void 0:i.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return p.x`
1
+ "use strict";const p=require("./element-CMTfByxQ.cjs"),h=require("./ref-CxLwrCxt.cjs"),l=require("./if-defined-hKKmbsI8.cjs"),c=require("./state-BNgpvY-A.cjs"),v=require("./input-element-DM0tY799.cjs"),f=require("./pkt-options-controller-BnTmkl3g.cjs"),_=require("./pkt-slot-controller-D4nKlom5.cjs");require("./input-wrapper-JU4D2TGu.cjs");var $=Object.defineProperty,u=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&$(t,e,s),s};class a extends v.PktInputElement{constructor(){super(...arguments),this._optionsProp=[],this._options=[]}get options(){return this._options.map(t=>({...t,selected:this.isOptionSelected(t)}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}isOptionSelected(t){return Array.isArray(this.value)?this.value.includes(t.value):t.value===this.value}findOptionByValue(t){return this._options.find(e=>e.value===t)}getSelectedOptions(){return this._options.filter(t=>this.isOptionSelected(t))}parseOptions(){var i,s;const t=this._optionsProp.length>0,e=((s=(i=this.optionsController)==null?void 0:i.nodes)==null?void 0:s.length)&&this.optionsController.nodes.length>0;t?this._options=this._optionsProp:e&&(this._options=this.optionsController.options)}willUpdate(t){super.willUpdate(t),this.parseOptions()}}u([p.n({type:Array,attribute:"options"})],a.prototype,"_optionsProp");u([c.r()],a.prototype,"_options");var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,d=(r,t,e,i)=>{for(var s=i>1?void 0:i?b(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&x(t,e,s),s};exports.PktSelect=class extends a{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new f.PktOptionsSlotController(this),this.slotController=new _.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(t=>{t.selected&&!this.value&&(this.value=t.value)})}add(t,e){const i={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(i);else if(typeof e=="number")this._options.splice(e,0,i);else{const s=e.value||e.text,o=this._options.findIndex(n=>n.value===s);o>=0?this._options.splice(o,0,i):this._options.push(i)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(s=>s.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,i){var s,o;t==="options"&&(this._options=i?JSON.parse(i):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((s=this.inputRef.value)==null?void 0:s.selectedIndex):this._options.findIndex(n=>n.value===i),this.selectedOptions=(o=this.inputRef.value)==null?void 0:o.selectedOptions,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}update(t){var e,i;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(i=this.inputRef.value)==null?void 0:i.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return p.b`
2
2
  <pkt-input-wrapper
3
3
  ?counter=${this.counter}
4
4
  ?disabled=${this.disabled}
@@ -35,7 +35,7 @@
35
35
  @blur=${e=>{this.onBlur(),e.stopImmediatePropagation()}}
36
36
  ${h.n(this.inputRef)}
37
37
  >
38
- ${this._options.length>0?this._options.map(e=>p.x`<option
38
+ ${this._options.length>0?this._options.map(e=>p.b`<option
39
39
  value=${e.value}
40
40
  ?selected=${this.value==e.value||e.selected}
41
41
  ?disabled=${e.disabled}
@@ -1,11 +1,11 @@
1
- import { n as c, x as a, t as _ } from "./element-BXsf_NlG.js";
2
- import { e as u, n as d } from "./ref-BxiKhrfa.js";
3
- import { o as n } from "./if-defined-CxHgig4I.js";
4
- import { r as $ } from "./state-DgnkjP0q.js";
5
- import { P as x } from "./input-element-CbjYtVou.js";
1
+ import { n as c, b as a, t as _ } from "./element-CV9utnHJ.js";
2
+ import { e as u, n as d } from "./ref-Dma3n3i8.js";
3
+ import { o as n } from "./if-defined-rXcLNTzN.js";
4
+ import { r as $ } from "./state-l4hGZdFJ.js";
5
+ import { P as x } from "./input-element-Bkv6Yxld.js";
6
6
  import { P as m } from "./pkt-options-controller-BcGywCmf.js";
7
7
  import { P as b } from "./pkt-slot-controller-D7CrjM52.js";
8
- import "./input-wrapper-Bwmva-69.js";
8
+ import "./input-wrapper-CaUY90qz.js";
9
9
  var P = Object.defineProperty, v = (e, t, s, o) => {
10
10
  for (var i = void 0, l = e.length - 1, p; l >= 0; l--)
11
11
  (p = e[l]) && (i = p(t, s, i) || i);
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./element-aUzIoa1s.cjs");/**
1
+ "use strict";const e=require("./element-CMTfByxQ.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- import { n as r } from "./element-BXsf_NlG.js";
1
+ import { n as r } from "./element-CV9utnHJ.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -0,0 +1,65 @@
1
+ "use strict";const a=require("./element-CMTfByxQ.cjs"),g=require("./pkt-slot-controller-D4nKlom5.cjs"),v=require("./state-BNgpvY-A.cjs"),d=require("./ref-CxLwrCxt.cjs"),u=require("./if-defined-hKKmbsI8.cjs");/**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */let C=class extends Event{constructor(t,e,i,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=i,this.subscribe=s??!1}};/**
6
+ * @license
7
+ * Copyright 2021 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ *//**
10
+ * @license
11
+ * Copyright 2021 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */let k=class{constructor(t,e,i,s){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(r,o)=>{this.unsubscribe&&(this.unsubscribe!==o&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=r,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(r,o)),this.unsubscribe=o},this.host=t,e.context!==void 0){const r=e;this.context=r.context,this.callback=r.callback,this.subscribe=r.subscribe??!1}else this.context=e,this.callback=i,this.subscribe=s??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new C(this.context,this.host,this.t,this.subscribe))}};/**
14
+ * @license
15
+ * Copyright 2021 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */class m{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const i=e||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[e,{disposer:i}]of this.subscriptions)e(this.o,i)},t!==void 0&&(this.value=t)}addCallback(t,e,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:s}=this.subscriptions.get(t);t(this.value,s)}clearCallbacks(){this.subscriptions.clear()}}/**
18
+ * @license
19
+ * Copyright 2021 Google LLC
20
+ * SPDX-License-Identifier: BSD-3-Clause
21
+ */let $=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}};class w extends m{constructor(t,e,i){var s,r;super(e.context!==void 0?e.initialValue:i),this.onContextRequest=o=>{if(o.context!==this.context)return;const c=o.contextTarget??o.composedPath()[0];c!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,c,o.subscribe))},this.onProviderRequest=o=>{if(o.context!==this.context||(o.contextTarget??o.composedPath()[0])===this.host)return;const c=new Set;for(const[f,{consumerHost:x}]of this.subscriptions)c.has(f)||(c.add(f),x.dispatchEvent(new C(this.context,x,f,!0)));o.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(r=(s=this.host).addController)==null||r.call(s,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new $(this.context,this.host))}}/**
22
+ * @license
23
+ * Copyright 2017 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */function P({context:n}){return(t,e)=>{const i=new WeakMap;if(typeof e=="object")return{get(){return t.get.call(this)},set(s){return i.get(this).setValue(s),t.set.call(this,s)},init(s){return i.set(this,new w(this,{context:n,initialValue:s})),s}};{t.constructor.addInitializer((o=>{i.set(o,new w(o,{context:n}))}));const s=Object.getOwnPropertyDescriptor(t,e);let r;if(s===void 0){const o=new WeakMap;r={get(){return o.get(this)},set(c){i.get(this).setValue(c),o.set(this,c)},configurable:!0,enumerable:!0}}else{const o=s.set;r={...s,set(c){i.get(this).setValue(c),o==null||o.call(this,c)}}}return void Object.defineProperty(t,e,r)}}}/**
26
+ * @license
27
+ * Copyright 2022 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */function S({context:n,subscribe:t}){return(e,i)=>{typeof i=="object"?i.addInitializer((function(){new k(this,{context:n,callback:s=>{e.set.call(this,s)},subscribe:t})})):e.constructor.addInitializer((s=>{new k(s,{context:n,callback:r=>{s[i]=r},subscribe:t})}))}}const y=Symbol("pkt-tabs-context");var _=Object.defineProperty,N=Object.getOwnPropertyDescriptor,p=(n,t,e,i)=>{for(var s=i>1?void 0:i?N(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&_(t,e,s),s};let b=class extends a.PktElement{constructor(){super(),this.arrowNav=!0,this.disableArrowNav=!1,this.tabRefs=[],this.tabCount=0,this.defaultSlot=d.e(),this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)},this.slotController=new g.PktSlotController(this,this.defaultSlot)}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}updated(t){(t.has("arrowNav")||t.has("disableArrowNav"))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}registerTab(t,e){this.tabRefs[e]=t,this.tabCount=Math.max(this.tabCount,e+1)}handleClick(t){this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:t},bubbles:!0,composed:!0}))}handleKeyUp(t,e){var i,s;this.useArrowNav&&(t.code==="ArrowLeft"&&e!==0&&((i=this.tabRefs[e-1])==null||i.focus()),t.code==="ArrowRight"&&e<this.tabCount-1&&((s=this.tabRefs[e+1])==null||s.focus()),(t.code==="ArrowDown"||t.code==="Space")&&this.dispatchEvent(new CustomEvent("tab-selected",{detail:{index:e},bubbles:!0,composed:!0})))}render(){const t=this.useArrowNav?"tablist":"navigation";return a.b`
30
+ <div class="pkt-tabs">
31
+ <div class="pkt-tabs__list" role=${t} ${d.n(this.defaultSlot)}></div>
32
+ </div>
33
+ `}};p([a.n({type:Boolean,reflect:!0,attribute:"arrow-nav"})],b.prototype,"arrowNav",2);p([a.n({type:Boolean,reflect:!0,attribute:"disable-arrow-nav"})],b.prototype,"disableArrowNav",2);p([v.r()],b.prototype,"tabRefs",2);p([v.r()],b.prototype,"tabCount",2);p([P({context:y}),v.r()],b.prototype,"context",2);b=p([a.t("pkt-tabs")],b);const R=b;var A=Object.defineProperty,T=Object.getOwnPropertyDescriptor,l=(n,t,e,i)=>{for(var s=i>1?void 0:i?T(t,e):t,r=n.length-1,o;r>=0;r--)(o=n[r])&&(s=(i?o(t,e,s):o(s))||s);return i&&s&&A(t,e,s),s};let h=class extends a.PktElement{constructor(){super(),this.active=!1,this.href="",this.icon="",this.controls="",this.tag="",this.tagSkin="blue",this.index=0,this.elementRef=d.e(),this.defaultSlot=d.e(),this.slotController=new g.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.elementRef.value&&this.context&&this.context.registerTab(this.elementRef.value,this.index)})}handleClick(){this.context&&this.context.handleClick(this.index)}handleKeyUp(n){this.context&&this.context.handleKeyUp(n,this.index)}render(){var o;const n=((o=this.context)==null?void 0:o.useArrowNav)??!0,t=this.active?"active":"",e=n?"tab":void 0,i=n?this.active:void 0,s=this.active||!n?void 0:-1,r=a.b`
34
+ ${this.icon?a.b`<pkt-icon name=${this.icon} class="pkt-icon--small"></pkt-icon>`:""}
35
+ <span ${d.n(this.defaultSlot)}></span>
36
+ ${this.tag?a.b`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>`:""}
37
+ `;return this.href?a.b`
38
+ <a
39
+ ${d.n(this.elementRef)}
40
+ href=${this.href}
41
+ class="pkt-tabs__link ${t}"
42
+ role=${u.o(e)}
43
+ aria-selected=${u.o(i)}
44
+ aria-controls=${u.o(this.controls||void 0)}
45
+ tabindex=${u.o(s)}
46
+ @click=${this.handleClick}
47
+ @keyup=${this.handleKeyUp}
48
+ >
49
+ ${r}
50
+ </a>
51
+ `:a.b`
52
+ <button
53
+ ${d.n(this.elementRef)}
54
+ type="button"
55
+ class="pkt-tabs__button pkt-link-button ${t}"
56
+ role=${u.o(e)}
57
+ aria-selected=${u.o(i)}
58
+ aria-controls=${u.o(this.controls||void 0)}
59
+ tabindex=${u.o(s)}
60
+ @click=${this.handleClick}
61
+ @keyup=${this.handleKeyUp}
62
+ >
63
+ ${r}
64
+ </button>
65
+ `}};l([a.n({type:Boolean,reflect:!0})],h.prototype,"active",2);l([a.n({type:String,reflect:!0})],h.prototype,"href",2);l([a.n({type:String,reflect:!0})],h.prototype,"icon",2);l([a.n({type:String,reflect:!0})],h.prototype,"controls",2);l([a.n({type:String,reflect:!0})],h.prototype,"tag",2);l([a.n({type:String,reflect:!0,attribute:"tag-skin"})],h.prototype,"tagSkin",2);l([a.n({type:Number,reflect:!0})],h.prototype,"index",2);l([S({context:y,subscribe:!0}),a.n({attribute:!1})],h.prototype,"context",2);h=l([a.t("pkt-tab-item")],h);const q=h;exports.PktTabItem_default=q;exports.PktTabs=R;
@@ -1,8 +1,8 @@
1
- import { P as $, x as p, n as h, t as y } from "./element-BXsf_NlG.js";
1
+ import { P as $, b as p, n as h, t as y } from "./element-CV9utnHJ.js";
2
2
  import { P as C } from "./pkt-slot-controller-D7CrjM52.js";
3
- import { r as w } from "./state-DgnkjP0q.js";
4
- import { e as x, n as f } from "./ref-BxiKhrfa.js";
5
- import { o as u } from "./if-defined-CxHgig4I.js";
3
+ import { r as w } from "./state-l4hGZdFJ.js";
4
+ import { e as x, n as f } from "./ref-Dma3n3i8.js";
5
+ import { o as u } from "./if-defined-rXcLNTzN.js";
6
6
  /**
7
7
  * @license
8
8
  * Copyright 2021 Google LLC
@@ -48,7 +48,7 @@ let m = class {
48
48
  * Copyright 2021 Google LLC
49
49
  * SPDX-License-Identifier: BSD-3-Clause
50
50
  */
51
- class N {
51
+ class _ {
52
52
  get value() {
53
53
  return this.o;
54
54
  }
@@ -81,12 +81,12 @@ class N {
81
81
  * Copyright 2021 Google LLC
82
82
  * SPDX-License-Identifier: BSD-3-Clause
83
83
  */
84
- let _ = class extends Event {
84
+ let N = class extends Event {
85
85
  constructor(t, s) {
86
86
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = s;
87
87
  }
88
88
  };
89
- class g extends N {
89
+ class g extends _ {
90
90
  constructor(t, s, i) {
91
91
  var e, n;
92
92
  super(s.context !== void 0 ? s.initialValue : i), this.onContextRequest = (r) => {
@@ -104,7 +104,7 @@ class g extends N {
104
104
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
105
105
  }
106
106
  hostConnected() {
107
- this.host.dispatchEvent(new _(this.context, this.host));
107
+ this.host.dispatchEvent(new N(this.context, this.host));
108
108
  }
109
109
  }
110
110
  /**
@@ -327,6 +327,6 @@ c = l([
327
327
  ], c);
328
328
  const B = c;
329
329
  export {
330
- M as P,
331
- B as a
330
+ B as P,
331
+ M as a
332
332
  };
@@ -1,10 +1,10 @@
1
- import { e as u } from "./class-map-Dt2jXOlF.js";
2
- import { P as m, x as p, n as r, t as g } from "./element-BXsf_NlG.js";
3
- import { r as k } from "./state-DgnkjP0q.js";
1
+ import { e as u } from "./class-map-3ADKve8g.js";
2
+ import { P as m, b as p, n as r, t as g } from "./element-CV9utnHJ.js";
3
+ import { r as k } from "./state-l4hGZdFJ.js";
4
4
  import { P as y } from "./pkt-slot-controller-D7CrjM52.js";
5
- import { e as b, n as f } from "./ref-BxiKhrfa.js";
6
- import "./icon-DBZvMard.js";
7
- import { o as d } from "./if-defined-CxHgig4I.js";
5
+ import { e as b, n as f } from "./ref-Dma3n3i8.js";
6
+ import "./icon-D0IQAVwS.js";
7
+ import { o as d } from "./if-defined-rXcLNTzN.js";
8
8
  const _ = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, n = {
9
9
  props: _
10
10
  };
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("./class-map-CApIYSRo.cjs"),t=require("./element-aUzIoa1s.cjs"),k=require("./state-GDzxl12x.cjs"),g=require("./pkt-slot-controller-D4nKlom5.cjs"),c=require("./ref-C5iJMIE1.cjs");require("./icon-n4-ve48P.cjs");const u=require("./if-defined-BElHLTlB.cjs"),d={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},r={props:d};var f=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(o?p(e,a,s):p(s))||s);return o&&s&&f(e,a,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!1,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var a,o;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(o=(a=this.defaultSlot.value)==null?void 0:a.textContent)==null?void 0:o.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
1
+ "use strict";const h=require("./class-map-Bokp1SoS.cjs"),t=require("./element-CMTfByxQ.cjs"),k=require("./state-BNgpvY-A.cjs"),g=require("./pkt-slot-controller-D4nKlom5.cjs"),c=require("./ref-CxLwrCxt.cjs");require("./icon-Dj0oZZSa.cjs");const u=require("./if-defined-hKKmbsI8.cjs"),d={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},r={props:d};var f=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,a,o)=>{for(var s=o>1?void 0:o?y(e,a):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(o?p(e,a,s):p(s))||s);return o&&s&&f(e,a,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!1,composed:!0}))},this.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var a,o;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(o=(a=this.defaultSlot.value)==null?void 0:a.textContent)==null?void 0:o.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.b`
2
2
  <button
3
3
  class=${h.e(a)}
4
4
  type=${this.type}
@@ -6,7 +6,7 @@
6
6
  aria-label=${u.o(this.ariaLabel||void 0)}
7
7
  aria-description=${u.o(this._ariaDescription||void 0)}
8
8
  >
9
- ${this.iconName&&t.x`<pkt-icon
9
+ ${this.iconName&&t.b`<pkt-icon
10
10
  class="pkt-tag__icon"
11
11
  name=${this.iconName}
12
12
  aria-hidden="true"
@@ -14,9 +14,9 @@
14
14
  <span ${c.n(this.defaultSlot)}></span>
15
15
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
16
16
  </button>
17
- `:t.x`
17
+ `:t.b`
18
18
  <span class=${h.e(e)}>
19
- ${this.iconName&&t.x`<pkt-icon
19
+ ${this.iconName&&t.b`<pkt-icon
20
20
  class="pkt-tag__icon"
21
21
  name=${this.iconName}
22
22
  aria-hidden="true"