@oslokommune/punkt-elements 19.19.1 → 20.0.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 (213) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/{accordion-Bg4CMrUM.cjs → accordion-5N_ptxrN.cjs} +1 -1
  3. package/dist/{accordion-BHVzR-6Z.js → accordion-C5cu1xXT.js} +5 -5
  4. package/dist/{alert-BAaZIR3e.js → alert-CA1fDbyc.js} +5 -5
  5. package/dist/{alert-Dy5N7qK-.cjs → alert-DkyTTo7S.cjs} +1 -1
  6. package/dist/{async-directive-C4LocQwR.js → async-directive-BcS8rfeC.js} +2 -2
  7. package/dist/{async-directive-DpyKp6qv.cjs → async-directive-DCLIOGR8.cjs} +1 -1
  8. package/dist/{backlink-Dlkyj0ns.js → backlink-CDBRcaAu.js} +3 -3
  9. package/dist/{backlink-BnWruRuj.cjs → backlink-CXOxMeyt.cjs} +1 -1
  10. package/dist/{breadcrumbs-Bfv8W2CF.js → breadcrumbs-5oUaCef3.js} +2 -2
  11. package/dist/{breadcrumbs-CyWtnx2B.cjs → breadcrumbs-zfUto2U5.cjs} +1 -1
  12. package/dist/{button-CF9k3ARf.js → button-Bswo1C0M.js} +5 -5
  13. package/dist/{button-BBFI3FuT.cjs → button-bVWAX98x.cjs} +1 -1
  14. package/dist/{calendar-BX3n3vhs.js → calendar-BOd-9PDd.js} +3 -3
  15. package/dist/{calendar-Dds9KFiE.cjs → calendar-CDTCgTJn.cjs} +1 -1
  16. package/dist/{card-Ddu0sQ0f.js → card-DH1kPnyi.js} +44 -42
  17. package/dist/card-njWrvrHm.cjs +67 -0
  18. package/dist/{checkbox-D9-KugOh.js → checkbox-DIJbuqWm.js} +5 -5
  19. package/dist/{checkbox-group-Dz1ypmbU.js → checkbox-group-DLLbWgQb.js} +3 -3
  20. package/dist/{checkbox-group-BlBgrzKG.cjs → checkbox-group-Kua6HuRE.cjs} +1 -1
  21. package/dist/{checkbox-B8foyiOW.cjs → checkbox-iMOdzpJ_.cjs} +2 -2
  22. package/dist/{class-map-BkEYw5uE.js → class-map-BDwVSgLb.js} +1 -1
  23. package/dist/{class-map-Bh6toDeV.cjs → class-map-C82GtM1w.cjs} +1 -1
  24. package/dist/{combobox-DLDvyuDh.cjs → combobox-BwAxmoG9.cjs} +1 -1
  25. package/dist/{combobox-BAkblu9M.js → combobox-H5FLG8BV.js} +12 -12
  26. package/dist/components/card/card.d.ts +0 -10
  27. package/dist/components/card/index.d.ts +2 -2
  28. package/dist/components/link/link.d.ts +1 -1
  29. package/dist/components/linkcard/linkcard.d.ts +0 -1
  30. package/dist/components/progressbar/progressbar.d.ts +4 -18
  31. package/dist/components/tabs/tabitem.d.ts +2 -1
  32. package/dist/components/tag/tag.d.ts +4 -2
  33. package/dist/{consent-DNHRe0zV.cjs → consent-UkinU27V.cjs} +1 -1
  34. package/dist/{consent-BTw6uqFf.js → consent-p-0n2b9x.js} +2 -2
  35. package/dist/{datepicker-C7F1Yc5N.cjs → datepicker-COar3rRT.cjs} +1 -1
  36. package/dist/{datepicker-9dmdHweu.js → datepicker-ZSwWg8xW.js} +11 -11
  37. package/dist/{directive-helpers-BAinC437.js → directive-helpers-BoDzpPID.js} +1 -1
  38. package/dist/{directive-helpers-Bv70GjQh.cjs → directive-helpers-r7akb6wX.cjs} +1 -1
  39. package/dist/{element-C6WTyJFE.cjs → element-CEarCnHH.cjs} +1 -1
  40. package/dist/{element-ckeMVgMz.js → element-DLgZkx5L.js} +1 -0
  41. package/dist/{element-with-slot-B0Vp_OuR.cjs → element-with-slot-CeKuRE3_.cjs} +1 -1
  42. package/dist/{element-with-slot-Dp2Gzv-Q.js → element-with-slot-mG-h7Sjw.js} +2 -2
  43. package/dist/{fileupload-M66Pd-QJ.cjs → fileupload-DXJtAagE.cjs} +1 -1
  44. package/dist/{fileupload-CEwnpxZj.js → fileupload-vPDmtXiM.js} +8 -8
  45. package/dist/{footer-HFL2sjAY.cjs → footer-CpE05IW2.cjs} +1 -1
  46. package/dist/{footer-DZ4aA6fj.js → footer-D8t0PCPC.js} +4 -4
  47. package/dist/{header-BYNzxXCo.js → header-Bo8uvddg.js} +11 -11
  48. package/dist/{header-BqheRQpR.cjs → header-DzYKgl-k.cjs} +1 -1
  49. package/dist/{header-menu-DxOSBiTJ.js → header-menu-BrjsNjBH.js} +4 -4
  50. package/dist/{header-menu-De2DNAXd.cjs → header-menu-Dq9lwNr1.cjs} +1 -1
  51. package/dist/{heading-B1Ey3XzB.js → heading-CMZmPEL9.js} +2 -2
  52. package/dist/{heading--hGRDNX9.cjs → heading-DAkjw2Am.cjs} +1 -1
  53. package/dist/{helptext-BVYv8Lm9.js → helptext-BFQzrOw4.js} +4 -4
  54. package/dist/{helptext-BbrFE48Y.cjs → helptext-Bse1LpRd.cjs} +1 -1
  55. package/dist/icon-5A378_yh.cjs +1 -0
  56. package/dist/{icon-CUU42bZ0.js → icon-C1oCGwEe.js} +2 -2
  57. package/dist/if-defined-Ci4ZQsgL.cjs +1 -0
  58. package/dist/{if-defined-D18nY_K_.js → if-defined-DiYi2v_Q.js} +1 -1
  59. package/dist/{input-element-D82laWtR.cjs → input-element-2LHxo0em.cjs} +1 -1
  60. package/dist/{input-element-DczlJQb1.js → input-element-De40zUox.js} +2 -2
  61. package/dist/{input-wrapper-QzdntWJX.cjs → input-wrapper-C_Rzwxx7.cjs} +2 -2
  62. package/dist/{input-wrapper-CHwWQgZP.js → input-wrapper-DkpJS1hR.js} +7 -7
  63. package/dist/{link-a1ZK4J1j.cjs → link-B7t4iOKk.cjs} +3 -3
  64. package/dist/{link-BU6t5Tt9.js → link-DZgG_8Ni.js} +15 -10
  65. package/dist/linkcard-DIG6VYpl.cjs +15 -0
  66. package/dist/linkcard-Dr-r8jBO.js +60 -0
  67. package/dist/{listbox-DFd-1faX.js → listbox-DAvIBH4P.js} +4 -4
  68. package/dist/{listbox-BbdUu-IV.cjs → listbox-HrH4JonS.cjs} +1 -1
  69. package/dist/{loader-Y8V3Q82X.js → loader-CFidlqSG.js} +4 -4
  70. package/dist/{loader-DwGMavG7.cjs → loader-DTIrOtTo.cjs} +1 -1
  71. package/dist/messagebox-BLYx3AL7.cjs +16 -0
  72. package/dist/{messagebox-wJcXW5hI.js → messagebox-B_07P0QA.js} +25 -16
  73. package/dist/{modal-C5AiVm5g.cjs → modal-BvTfLfFq.cjs} +1 -1
  74. package/dist/{modal-BafCTC4M.js → modal-CA_M2Ix6.js} +6 -6
  75. package/dist/{option-group-element-CWjgrFwS.cjs → option-group-element-CVNaBIlP.cjs} +1 -1
  76. package/dist/{option-group-element-ZNyUoLcm.js → option-group-element-DzM8YznZ.js} +3 -3
  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.cjs +1 -1
  84. package/dist/pkt-breadcrumbs.js +1 -1
  85. package/dist/pkt-button.cjs +1 -1
  86. package/dist/pkt-button.js +1 -1
  87. package/dist/pkt-calendar.cjs +1 -1
  88. package/dist/pkt-calendar.js +1 -1
  89. package/dist/pkt-card.cjs +1 -1
  90. package/dist/pkt-card.js +1 -1
  91. package/dist/pkt-checkbox-group.cjs +1 -1
  92. package/dist/pkt-checkbox-group.js +1 -1
  93. package/dist/pkt-checkbox.cjs +1 -1
  94. package/dist/pkt-checkbox.js +1 -1
  95. package/dist/pkt-combobox.cjs +1 -1
  96. package/dist/pkt-combobox.js +1 -1
  97. package/dist/pkt-consent.cjs +1 -1
  98. package/dist/pkt-consent.js +1 -1
  99. package/dist/pkt-datepicker.cjs +1 -1
  100. package/dist/pkt-datepicker.js +1 -1
  101. package/dist/pkt-fileupload.cjs +1 -1
  102. package/dist/pkt-fileupload.js +1 -1
  103. package/dist/pkt-footer.cjs +1 -1
  104. package/dist/pkt-footer.js +1 -1
  105. package/dist/pkt-header-menu.cjs +1 -1
  106. package/dist/pkt-header-menu.js +1 -1
  107. package/dist/pkt-header.cjs +1 -1
  108. package/dist/pkt-header.js +1 -1
  109. package/dist/pkt-heading.cjs +1 -1
  110. package/dist/pkt-heading.js +1 -1
  111. package/dist/pkt-helptext.cjs +1 -1
  112. package/dist/pkt-helptext.js +1 -1
  113. package/dist/pkt-icon.cjs +1 -1
  114. package/dist/pkt-icon.js +1 -1
  115. package/dist/pkt-index.cjs +1 -1
  116. package/dist/pkt-index.js +37 -37
  117. package/dist/pkt-input-wrapper.cjs +1 -1
  118. package/dist/pkt-input-wrapper.js +1 -1
  119. package/dist/pkt-link.cjs +1 -1
  120. package/dist/pkt-link.js +1 -1
  121. package/dist/pkt-linkcard.cjs +1 -1
  122. package/dist/pkt-linkcard.js +1 -1
  123. package/dist/pkt-listbox.cjs +1 -1
  124. package/dist/pkt-listbox.js +1 -1
  125. package/dist/pkt-loader.cjs +1 -1
  126. package/dist/pkt-loader.js +1 -1
  127. package/dist/pkt-messagebox.cjs +1 -1
  128. package/dist/pkt-messagebox.js +1 -1
  129. package/dist/pkt-modal.cjs +1 -1
  130. package/dist/pkt-modal.js +1 -1
  131. package/dist/{pkt-options-controller-C193xcN4.cjs → pkt-options-controller-9zoH1OBW.cjs} +1 -1
  132. package/dist/{pkt-options-controller-CH8U6zlw.js → pkt-options-controller-CzvBlEPD.js} +1 -1
  133. package/dist/pkt-progressbar.cjs +1 -1
  134. package/dist/pkt-progressbar.js +1 -1
  135. package/dist/pkt-radio-group.cjs +1 -1
  136. package/dist/pkt-radio-group.js +1 -1
  137. package/dist/pkt-radiobutton.cjs +1 -1
  138. package/dist/pkt-radiobutton.js +1 -1
  139. package/dist/pkt-searchinput.cjs +1 -1
  140. package/dist/pkt-searchinput.js +1 -1
  141. package/dist/pkt-select.cjs +1 -1
  142. package/dist/pkt-select.js +1 -1
  143. package/dist/pkt-tabs.cjs +1 -1
  144. package/dist/pkt-tabs.js +1 -1
  145. package/dist/pkt-tag.cjs +1 -1
  146. package/dist/pkt-tag.js +1 -1
  147. package/dist/pkt-textarea.cjs +1 -1
  148. package/dist/pkt-textarea.js +1 -1
  149. package/dist/pkt-textinput.cjs +1 -1
  150. package/dist/pkt-textinput.js +1 -1
  151. package/dist/pkt-timepicker.cjs +1 -1
  152. package/dist/pkt-timepicker.js +1 -1
  153. package/dist/progressbar-BdqIhC1Z.cjs +30 -0
  154. package/dist/{progressbar-BukfOcRk.js → progressbar-CfCc2zhp.js} +50 -37
  155. package/dist/{radio-group-Bg6ODpT3.js → radio-group-BRY_74od.js} +3 -3
  156. package/dist/{radio-group-bpIEEMdL.cjs → radio-group-CsUgnEv0.cjs} +1 -1
  157. package/dist/{radiobutton-IcDc6ze2.cjs → radiobutton-CQhuG2lj.cjs} +2 -2
  158. package/dist/{radiobutton-DMvVv81Y.js → radiobutton-lHnq8wX_.js} +5 -5
  159. package/dist/{ref-CB7e9nMY.cjs → ref-B6p6mQkO.cjs} +1 -1
  160. package/dist/{ref-D4OwQYdf.js → ref-BAegS9BR.js} +2 -2
  161. package/dist/{repeat-CnnigVcj.cjs → repeat-CjvNrcUr.cjs} +1 -1
  162. package/dist/{repeat-BGbBqnfz.js → repeat-Cy1M16Di.js} +2 -2
  163. package/dist/{searchinput-BV2C1VbN.js → searchinput-BLGaXkP6.js} +4 -4
  164. package/dist/{searchinput-DqD_iLxV.cjs → searchinput-TAqMUJ0B.cjs} +1 -1
  165. package/dist/{select-DKBfPgJB.js → select-BvtUxW0Q.js} +7 -7
  166. package/dist/{select-CHqM6kI-.cjs → select-Dle67Uwv.cjs} +1 -1
  167. package/dist/shared-strings/nb.d.ts +3 -0
  168. package/dist/shared-types/card.d.ts +5 -17
  169. package/dist/shared-types/combobox.d.ts +3 -3
  170. package/dist/shared-types/icon.d.ts +2 -2
  171. package/dist/shared-types/index.d.ts +11 -9
  172. package/dist/shared-types/linkcard.d.ts +7 -4
  173. package/dist/shared-types/messagebox.d.ts +4 -2
  174. package/dist/shared-types/progressbar.d.ts +82 -5
  175. package/dist/shared-types/skin.d.ts +8 -2
  176. package/dist/{tabs-B2RjklQl.js → tabs-Bu_-WfCK.js} +5 -5
  177. package/dist/{tabs-BcnYrmjU.cjs → tabs-Dwk5PKzP.cjs} +1 -1
  178. package/dist/tag-1SSexs0H.cjs +27 -0
  179. package/dist/{tag-BOTH9kMz.js → tag-CkZ2Mn4a.js} +33 -11
  180. package/dist/{textarea-B5OfR-QI.cjs → textarea-DSX3jMlI.cjs} +1 -1
  181. package/dist/{textarea-Du1Z9JUu.js → textarea-Djp5L2Zd.js} +9 -9
  182. package/dist/{textinput-CRlErItw.js → textinput-CBrOZcvL.js} +8 -8
  183. package/dist/{textinput-C5KWIB21.cjs → textinput-CN2F3Q3H.cjs} +1 -1
  184. package/dist/{timepicker-DVqTAxt0.js → timepicker-CT4wfrgQ.js} +8 -8
  185. package/dist/{timepicker-RxsG0mCF.cjs → timepicker-CkaJkIGn.cjs} +1 -1
  186. package/package.json +3 -3
  187. package/src/components/card/card.test.ts +50 -53
  188. package/src/components/card/card.ts +14 -24
  189. package/src/components/card/index.ts +2 -2
  190. package/src/components/checkbox/checkbox.test.ts +3 -3
  191. package/src/components/checkbox/checkbox.ts +1 -1
  192. package/src/components/input-wrapper/input-wrapper.ts +1 -1
  193. package/src/components/link/link.test.ts +14 -18
  194. package/src/components/link/link.ts +2 -3
  195. package/src/components/linkcard/linkcard.test.ts +18 -6
  196. package/src/components/linkcard/linkcard.ts +5 -7
  197. package/src/components/messagebox/messagebox.test.ts +14 -1
  198. package/src/components/messagebox/messagebox.ts +13 -2
  199. package/src/components/progressbar/progressbar.test.ts +47 -5
  200. package/src/components/progressbar/progressbar.ts +49 -53
  201. package/src/components/radiobutton/radiobutton.test.ts +1 -1
  202. package/src/components/radiobutton/radiobutton.ts +1 -1
  203. package/src/components/tabs/tabitem.ts +6 -2
  204. package/src/components/tag/tag.test.ts +21 -12
  205. package/src/components/tag/tag.ts +12 -3
  206. package/dist/card-mi3VKIoy.cjs +0 -64
  207. package/dist/icon-CrG6o7ZE.cjs +0 -1
  208. package/dist/if-defined-CiML3MTM.cjs +0 -1
  209. package/dist/linkcard-Cu4Rh71U.cjs +0 -14
  210. package/dist/linkcard-DM0CQbwD.js +0 -56
  211. package/dist/messagebox-DR-s6tyr.cjs +0 -13
  212. package/dist/progressbar-YfHSPmqI.cjs +0 -31
  213. package/dist/tag-DrFK8Wq3.cjs +0 -27
@@ -1,5 +1,5 @@
1
- import { f as e, h as t } from "./element-ckeMVgMz.js";
2
- import { t as n } from "./async-directive-C4LocQwR.js";
1
+ import { f as e, h as t } from "./element-DLgZkx5L.js";
2
+ import { t as n } from "./async-directive-BcS8rfeC.js";
3
3
  //#region ../../node_modules/lit-html/directives/ref.js
4
4
  var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(class extends n {
5
5
  render(e) {
@@ -1 +1 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./directive-helpers-Bv70GjQh.cjs");var n=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},r=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(r,[i,a,o]){let s=t.t(r),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=t.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=t.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=t.a(s[m],c[_]),t.o(r,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=t.a(s[h],c[g]),t.o(r,s[m],s[h]),h--,g++;else if(f===void 0&&(f=n(l,g,_),p=n(u,m,h)),f.has(u[m])){if(f.has(u[h])){let e=p.get(l[g]),n=e===void 0?null:s[e];if(n===null){let e=t.o(r,s[m]);t.a(e,c[g]),d[g]=e}else d[g]=t.a(n,c[g]),t.o(r,s[m],n),s[e]=null;g++}else t.n(s[h]),h--}else t.n(s[m]),m++;for(;g<=_;){let e=t.o(r,d[_+1]);t.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&t.n(e)}return this.ut=l,t.r(r,d),e.g}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./directive-helpers-r7akb6wX.cjs");var n=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},r=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(r,[i,a,o]){let s=t.t(r),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=t.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=t.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=t.a(s[m],c[_]),t.o(r,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=t.a(s[h],c[g]),t.o(r,s[m],s[h]),h--,g++;else if(f===void 0&&(f=n(l,g,_),p=n(u,m,h)),f.has(u[m])){if(f.has(u[h])){let e=p.get(l[g]),n=e===void 0?null:s[e];if(n===null){let e=t.o(r,s[m]);t.a(e,c[g]),d[g]=e}else d[g]=t.a(n,c[g]),t.o(r,s[m],n),s[e]=null;g++}else t.n(s[h]),h--}else t.n(s[m]),m++;for(;g<=_;){let e=t.o(r,d[_+1]);t.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&t.n(e)}return this.ut=l,t.r(r,d),e.g}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
@@ -1,5 +1,5 @@
1
- import { f as e, g as t, m as n, p as r } from "./element-ckeMVgMz.js";
2
- import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-BAinC437.js";
1
+ import { f as e, g as t, m as n, p as r } from "./element-DLgZkx5L.js";
2
+ import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-BoDzpPID.js";
3
3
  //#region ../../node_modules/lit-html/directives/repeat.js
4
4
  var l = (e, t, n) => {
5
5
  let r = /* @__PURE__ */ new Map();
@@ -1,7 +1,7 @@
1
- import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-ckeMVgMz.js";
2
- import { t as s } from "./class-map-BkEYw5uE.js";
3
- import "./icon-CUU42bZ0.js";
4
- import { t as c } from "./if-defined-D18nY_K_.js";
1
+ import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-DLgZkx5L.js";
2
+ import { t as s } from "./class-map-BDwVSgLb.js";
3
+ import "./icon-C1oCGwEe.js";
4
+ import { t as c } from "./if-defined-DiYi2v_Q.js";
5
5
  import { n as l } from "./utils-BwF4QSrq.js";
6
6
  import { t as u } from "./focus-modality-controller-Dc2S-KqR.js";
7
7
  //#region src/components/searchinput/searchinput.ts
@@ -1,4 +1,4 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./class-map-Bh6toDeV.cjs");require("./icon-CrG6o7ZE.cjs");const n=require("./if-defined-CiML3MTM.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./focus-modality-controller-C1ocyv2J.cjs");var a=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=r.n(),this.value=``,this.focusModality=new i.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e._`
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./icon-5A378_yh.cjs");const n=require("./if-defined-Ci4ZQsgL.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./focus-modality-controller-C1ocyv2J.cjs");var a=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=r.n(),this.value=``,this.focusModality=new i.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e._`
2
2
  ${t.title?e._`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.h}
3
3
  ${t.text?e._`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.h}
4
4
  `;return t.href?e._`<a
@@ -1,10 +1,10 @@
1
- import { _ as e, d as t, l as n, n as r, u as i } from "./element-ckeMVgMz.js";
2
- import { n as a } from "./element-with-slot-Dp2Gzv-Q.js";
3
- import { r as o } from "./input-wrapper-CHwWQgZP.js";
4
- import { t as s } from "./if-defined-D18nY_K_.js";
5
- import { n as c, t as l } from "./ref-D4OwQYdf.js";
6
- import { t as u } from "./input-element-DczlJQb1.js";
7
- import { t as d } from "./pkt-options-controller-CH8U6zlw.js";
1
+ import { _ as e, d as t, l as n, n as r, u as i } from "./element-DLgZkx5L.js";
2
+ import { n as a } from "./element-with-slot-mG-h7Sjw.js";
3
+ import { r as o } from "./input-wrapper-DkpJS1hR.js";
4
+ import { t as s } from "./if-defined-DiYi2v_Q.js";
5
+ import { n as c, t as l } from "./ref-BAegS9BR.js";
6
+ import { t as u } from "./input-element-De40zUox.js";
7
+ import { t as d } from "./pkt-options-controller-CzvBlEPD.js";
8
8
  //#region src/base-elements/options-input-element.ts
9
9
  var f = class extends u {
10
10
  constructor(...e) {
@@ -1,4 +1,4 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./element-with-slot-B0Vp_OuR.cjs"),n=require("./input-wrapper-QzdntWJX.cjs"),r=require("./if-defined-CiML3MTM.cjs"),i=require("./ref-CB7e9nMY.cjs"),a=require("./input-element-D82laWtR.cjs"),o=require("./pkt-options-controller-C193xcN4.cjs");var s=class extends a.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=i.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.defaultedToFirstOption=!1,this.optionsController=new o.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}willUpdate(e){e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),super.willUpdate(e),this.hasUpdated||(!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0,this.defaultedToFirstOption=!0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`)))}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this.selectedOptions=this.inputRef.value?.selectedOptions,this.defaultedToFirstOption&&this.updateComplete.then(()=>this.dispatchChangeEvents(this.value))}render(){let a=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs"),n=require("./input-wrapper-C_Rzwxx7.cjs"),r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./ref-B6p6mQkO.cjs"),a=require("./input-element-2LHxo0em.cjs"),o=require("./pkt-options-controller-9zoH1OBW.cjs");var s=class extends a.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=i.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.defaultedToFirstOption=!1,this.optionsController=new o.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}willUpdate(e){e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),super.willUpdate(e),this.hasUpdated||(!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0,this.defaultedToFirstOption=!0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`)))}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this.selectedOptions=this.inputRef.value?.selectedOptions,this.defaultedToFirstOption&&this.updateComplete.then(()=>this.dispatchChangeEvents(this.value))}render(){let a=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
2
2
  <pkt-input-wrapper
3
3
  ${t.n(this,[`helptext`])}
4
4
  .strings=${this.strings}
@@ -80,6 +80,9 @@ export declare const nb: {
80
80
  tag: {
81
81
  remove: string;
82
82
  };
83
+ progressbar: {
84
+ fraction: string;
85
+ };
83
86
  header: {
84
87
  search: string;
85
88
  menu: string;
@@ -8,14 +8,10 @@ import type { THeadingLevel } from './heading';
8
8
  import type { TLayout } from './layout';
9
9
  import type { TTagSkin } from './skin';
10
10
  /** Card skin variants — shared runtime source for types, specs, and Preview. */
11
- export declare const CARD_SKINS: readonly ['outlined', 'outlined-beige', 'gray', 'blue', 'beige', 'green'];
11
+ export declare const CARD_SKINS: readonly ['gray', 'outlined', 'transparent', 'white', 'blue', 'green', 'beige'];
12
12
  export type TCardSkin = (typeof CARD_SKINS)[number];
13
- /** Card padding variants — shared runtime source for types, specs, and Preview. */
14
- export declare const CARD_PADDINGS: readonly ['none', 'default'];
15
- export type TCardPadding = (typeof CARD_PADDINGS)[number];
16
- /** Card image shape variants — shared runtime source for types, specs, and Preview. */
17
- export declare const CARD_IMAGE_SHAPES: readonly ['square', 'round'];
18
- export type TCardImageShape = (typeof CARD_IMAGE_SHAPES)[number];
13
+ /** Skins without a dark variant. The card gets `data-mode="light"` and stays in light mode. */
14
+ export declare const CARD_LIGHT_ONLY_SKINS: readonly TCardSkin[];
19
15
  /** Card image aspect-ratio overrides — shared runtime source for types, specs, and Preview. */
20
16
  export declare const CARD_IMAGE_ASPECTS: readonly ['auto', '1-1', '4-3', '3-2', '16-9', '19-10'];
21
17
  export type TCardImageAspect = (typeof CARD_IMAGE_ASPECTS)[number];
@@ -49,14 +45,10 @@ export interface IPktCardBase {
49
45
  heading?: string;
50
46
  headingLevel?: THeadingLevel;
51
47
  image?: ICardImage;
52
- imageShape?: TCardImageShape;
53
48
  imageAspect?: TCardImageAspect;
54
- restrictImageHeight?: boolean;
55
49
  clickCardLink?: string | null;
56
50
  openLinkInNewTab?: boolean;
57
- borderOnHover?: boolean;
58
51
  zoom?: boolean;
59
- padding?: TCardPadding;
60
52
  skin?: TCardSkin;
61
53
  subheading?: string;
62
54
  tagPosition?: TCardTagPosition;
@@ -68,19 +60,15 @@ export interface IPktCardBase {
68
60
  * shared between React and Elements — there are no reactOnly/elementsOnly
69
61
  * props or events on this component.
70
62
  */
71
- export type ICardSpecProps = Pick<IPktCardBase, 'ariaLabel' | 'metaLead' | 'metaTrail' | 'layout' | 'heading' | 'headingLevel' | 'image' | 'imageShape' | 'imageAspect' | 'restrictImageHeight' | 'clickCardLink' | 'openLinkInNewTab' | 'borderOnHover' | 'zoom' | 'padding' | 'skin' | 'subheading' | 'tagPosition' | 'tags'>;
63
+ export type ICardSpecProps = Pick<IPktCardBase, 'ariaLabel' | 'metaLead' | 'metaTrail' | 'layout' | 'heading' | 'headingLevel' | 'image' | 'imageAspect' | 'clickCardLink' | 'openLinkInNewTab' | 'zoom' | 'skin' | 'subheading' | 'tagPosition' | 'tags'>;
72
64
  /**
73
65
  * Default values for pkt-card. Single source of truth for both frameworks
74
66
  */
75
67
  export declare const CARD_DEFAULTS: {
76
68
  readonly headingLevel: 3;
77
69
  readonly layout: 'vertical';
78
- readonly skin: 'outlined';
79
- readonly padding: 'default';
70
+ readonly skin: 'gray';
80
71
  readonly tagPosition: 'top';
81
72
  readonly openLinkInNewTab: false;
82
- readonly borderOnHover: true;
83
73
  readonly zoom: false;
84
- readonly imageShape: 'square';
85
- readonly restrictImageHeight: false;
86
74
  };
@@ -5,14 +5,14 @@
5
5
  * Used by both Elements and React implementations,
6
6
  * the shared combobox helper functions, and typed component specs.
7
7
  */
8
+ import { type TTagSkin } from './skin';
8
9
  import type { IFormFieldErrorProps, IFormFieldLabelProps, IHelptextProps, ITagOptionalRequiredProps } from './form-field';
9
10
  import type { TPktInputSize } from './size';
10
11
  /**
11
12
  * Tag skin colors available for combobox option tags.
12
- * Matches the TTagSkin values from the tag component.
13
13
  */
14
- export declare const COMBOBOX_TAG_SKINS: readonly ['blue', 'blue-dark', 'blue-light', 'green', 'red', 'yellow', 'beige', 'gray', 'grey'];
15
- export type TPktComboboxTagSkin = (typeof COMBOBOX_TAG_SKINS)[number];
14
+ export declare const COMBOBOX_TAG_SKINS: readonly ["gray", "gray-light", "blue-dark", "blue", "blue-light", "blue-pale", "green", "green-light", "red", "red-light", "yellow", "yellow-light", "beige", "beige-light"];
15
+ export type TPktComboboxTagSkin = TTagSkin;
16
16
  /**
17
17
  * Represents a single option in a combobox or listbox.
18
18
  */
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { Booleanish } from './booleanish';
8
8
  /** Default CDN path for icons. Overridden globally by `window.pktIconPath`. */
9
- export declare const ICON_DEFAULT_PATH = "https://punkt-cdn.oslo.kommune.no/latest/icons/";
9
+ export declare const ICON_DEFAULT_PATH = "https://cdn.ikoner.oslo.kommune.no/icons/";
10
10
  /** Default CDN path for loading animations. Overridden globally by `window.pktAnimationPath`. */
11
11
  export declare const ANIMATION_DEFAULT_PATH = "https://punkt-cdn.oslo.kommune.no/latest/animations/";
12
12
  /** Icon size modifier classes — shared runtime source for types, specs, and Preview. */
@@ -37,5 +37,5 @@ export type IIconSpecProps = Pick<IPktIconBase, 'name' | 'path' | 'ariaHidden' |
37
37
  */
38
38
  export declare const ICON_DEFAULTS: {
39
39
  readonly name: '';
40
- readonly path: "https://punkt-cdn.oslo.kommune.no/latest/icons/";
40
+ readonly path: "https://cdn.ikoner.oslo.kommune.no/icons/";
41
41
  };
@@ -11,8 +11,8 @@ export { HEADER_MENU_LOCALES, DEFAULT_HEADER_FOOTER_URL, DEFAULT_HEADER_LOGO_LIN
11
11
  export type { THeaderMenuLocale, IHeaderMenuLink, IHeaderMenuIconLink, IHeaderMenuButton, IHeaderMenuServices, IHeaderMenuSection, IMegaMenu, IHeaderFooter, IHeaderFooterLocaleData, THeaderFooterApi, IPktHeaderMenu, IPktHeaderGlobal, } from './header-footer';
12
12
  export type { IPktFooterLink, IPktFooterColumn, IPktFooterSocialLink, IPktFooterBase, IPktFooterProps, IPktFooterSimpleProps, IFooterSimpleSpecProps, IFooterSpecProps, } from './footer';
13
13
  export { DEFAULT_FOOTER_PERSONVERN_URL, DEFAULT_FOOTER_TILGJENGELIGHET_URL } from './footer';
14
- export { CARD_SKINS, CARD_PADDINGS, CARD_IMAGE_SHAPES, CARD_IMAGE_ASPECTS, CARD_TAG_POSITIONS, CARD_TAG_SKIN_OPTIONS, CARD_DEFAULTS, } from './card';
15
- export type { TCardSkin, TCardPadding, TCardImageShape, TCardImageAspect, TCardTagPosition, ICardTag, ICardImage, IPktCardBase, ICardSpecProps, } from './card';
14
+ export { CARD_SKINS, CARD_LIGHT_ONLY_SKINS, CARD_IMAGE_ASPECTS, CARD_TAG_POSITIONS, CARD_TAG_SKIN_OPTIONS, CARD_DEFAULTS, } from './card';
15
+ export type { TCardSkin, TCardImageAspect, TCardTagPosition, ICardTag, ICardImage, IPktCardBase, ICardSpecProps, } from './card';
16
16
  export { CHECKBOX_LABEL_POSITIONS, CHECKBOX_DEFAULTS } from './checkbox';
17
17
  export type { TCheckboxLabelPosition, IPktCheckboxBase, ICheckboxSpecProps } from './checkbox';
18
18
  export { RADIOBUTTON_DEFAULTS } from './radiobutton';
@@ -33,8 +33,8 @@ export type { TAccordionSkin, IPktAccordionBase, IPktAccordionItemBase, IAccordi
33
33
  export { BUTTON_SIZES, BUTTON_SKINS, BUTTON_COLORS, BUTTON_VARIANTS, BUTTON_STATES } from './button';
34
34
  export type { TPktButtonSize, TPktButtonSkin, TPktButtonColor, TPktButtonVariant, TPktButtonState, IPktButtonBase, IButtonSpecProps, } from './button';
35
35
  export type { IPktBackLinkBase, IBacklinkSpecProps } from './backlink';
36
- export { LINKCARD_SKINS } from './linkcard';
37
- export type { TLinkCardSkin, IPktLinkCardBase, ILinkcardSpecProps } from './linkcard';
36
+ export { LINKCARD_SKINS, LINKCARD_LIGHT_ONLY_SKINS } from './linkcard';
37
+ export type { TLinkCardSkin, TDeprecatedLinkCardSkin, IPktLinkCardBase, ILinkcardSpecProps, } from './linkcard';
38
38
  export { BREADCRUMBS_NAVIGATION_TYPES } from './breadcrumbs';
39
39
  export type { TBreadcrumbsNavigationType, IBreadcrumb, IBreadcrumbItem, IBreadcrumbs, IPktBreadcrumbsBase, IBreadcrumbsSpecProps, } from './breadcrumbs';
40
40
  export type { IRenderLink, TRenderLink } from './render-link';
@@ -46,17 +46,19 @@ export type { IPktTextareaBase, ITextareaSpecProps } from './textarea';
46
46
  export { TEXTINPUT_DEFAULTS, TEXTINPUT_TYPES } from './textinput';
47
47
  export type { TPktTextinputType, IPktTextinputBase, ITextinputSpecProps } from './textinput';
48
48
  export type { TPktCounterPosition, IPktInputWrapperBase, IInputWrapperSpecProps, } from './input-wrapper';
49
- export type { TTagSkin } from './skin';
50
- export { MESSAGEBOX_SKINS, MESSAGEBOX_DEFAULTS } from './messagebox';
51
- export type { TMessageboxSkin, IPktMessageboxBase, IMessageboxSpecProps } from './messagebox';
49
+ export { TAG_SKINS, TAG_STATES } from './skin';
50
+ export type { TMessageboxSkin, TTagSkin, TTagState } from './skin';
51
+ export { MESSAGEBOX_SKINS, MESSAGEBOX_LIGHT_ONLY_SKINS, MESSAGEBOX_DEFAULTS } from './messagebox';
52
+ export type { IPktMessageboxBase, IMessageboxSpecProps } from './messagebox';
52
53
  export { CALENDAR_DEFAULTS } from './calendar';
53
54
  export type { IPktCalendarBase, ICalendarSpecProps, IDateConstraints, ICalendarGridDimensions, IGridCellPosition, TDateRangeMap, ISelectionState, ISelectionOptions, } from './calendar';
54
55
  export type { IDatepickerStrings } from './datepicker';
55
56
  export { defaultSingleStrings, defaultRangeStrings } from './datepicker';
56
57
  export type { ITimepickerStrings } from './timepicker';
57
58
  export { defaultTimepickerStrings } from './timepicker';
58
- export type { TProgressbarRole, TProgressbarSkin, TProgressbarStatusPlacement, TProgressbarStatusType, TProgressbarTitlePosition, } from './progressbar';
59
- export { COMBOBOX_TAG_SKINS, COMBOBOX_DISPLAY_VALUES, COMBOBOX_TAG_PLACEMENTS, COMBOBOX_DEFAULTS, } from './combobox';
59
+ export { PROGRESSBAR_DEFAULTS, PROGRESSBAR_ROLES, PROGRESSBAR_SKINS, PROGRESSBAR_STATUS_PLACEMENTS, PROGRESSBAR_STATUS_TYPES, PROGRESSBAR_TITLE_POSITIONS, } from './progressbar';
60
+ export type { IPktProgressbarBase, IProgressbarSpecProps, TProgressbarRole, TProgressbarSkin, TProgressbarStatusPlacement, TProgressbarStatusType, TProgressbarTitlePosition, } from './progressbar';
61
+ export { COMBOBOX_DISPLAY_VALUES, COMBOBOX_TAG_PLACEMENTS, COMBOBOX_DEFAULTS } from './combobox';
60
62
  export type { IPktComboboxOption, TPktComboboxTagSkin, TPktComboboxDisplayValue, TPktComboboxTagPlacement, IPktComboboxBase, IComboboxSpecProps, } from './combobox';
61
63
  export { SELECT_DEFAULTS } from './select';
62
64
  export type { IPktSelectOption, TSelectOption, IPktSelectBase, ISelectSpecProps } from './select';
@@ -6,8 +6,12 @@
6
6
  */
7
7
  import type { IPktStringsProps } from '../shared-strings';
8
8
  /** LinkCard skin variants — shared runtime source for types, specs, and Preview. */
9
- export declare const LINKCARD_SKINS: readonly ['normal', 'no-padding', 'blue', 'beige', 'green', 'gray', 'beige-outline', 'gray-outline'];
10
- export type TLinkCardSkin = (typeof LINKCARD_SKINS)[number];
9
+ export declare const LINKCARD_SKINS: readonly ['gray', 'outlined', 'transparent', 'white', 'blue', 'green', 'beige'];
10
+ /** @deprecated Old names that still work: `normal` is `transparent`, `gray-outline` is `outlined`. */
11
+ export type TDeprecatedLinkCardSkin = 'normal' | 'gray-outline';
12
+ export type TLinkCardSkin = (typeof LINKCARD_SKINS)[number] | TDeprecatedLinkCardSkin;
13
+ /** Skins without a dark variant. The link card gets `data-mode="light"` and stays in light mode. */
14
+ export declare const LINKCARD_LIGHT_ONLY_SKINS: readonly TLinkCardSkin[];
11
15
  /** Shared LinkCard props for React, Elements, and typed specs. */
12
16
  export type IPktLinkCardBase = IPktStringsProps<'linkcard'> & {
13
17
  title?: string;
@@ -15,10 +19,9 @@ export type IPktLinkCardBase = IPktStringsProps<'linkcard'> & {
15
19
  skin?: TLinkCardSkin;
16
20
  iconName?: string;
17
21
  openInNewTab?: boolean;
18
- external?: boolean;
19
22
  };
20
23
  /**
21
24
  * Documented LinkCard props (subset of `IPktLinkCardBase`).
22
25
  * Used for typed component specs in documentation.
23
26
  */
24
- export type ILinkcardSpecProps = Pick<IPktLinkCardBase, 'title' | 'href' | 'skin' | 'iconName' | 'openInNewTab' | 'external'>;
27
+ export type ILinkcardSpecProps = Pick<IPktLinkCardBase, 'title' | 'href' | 'skin' | 'iconName' | 'openInNewTab'>;
@@ -5,8 +5,10 @@
5
5
  * Used by React, Elements, and typed component specs.
6
6
  */
7
7
  /** Messagebox skin variants — shared runtime source for types, specs, and Preview. */
8
- export declare const MESSAGEBOX_SKINS: readonly ['beige', 'blue', 'red', 'green'];
8
+ export declare const MESSAGEBOX_SKINS: readonly ['gray', 'beige', 'blue', 'red', 'green'];
9
9
  export type TMessageboxSkin = (typeof MESSAGEBOX_SKINS)[number];
10
+ /** Skins without a dark variant. The messagebox gets `data-mode="light"` and stays in light mode. */
11
+ export declare const MESSAGEBOX_LIGHT_ONLY_SKINS: readonly TMessageboxSkin[];
10
12
  /**
11
13
  * Messagebox props shared by React and Elements.
12
14
  *
@@ -26,7 +28,7 @@ export interface IPktMessageboxBase {
26
28
  export type IMessageboxSpecProps = Pick<IPktMessageboxBase, 'title' | 'skin' | 'compact' | 'closable'>;
27
29
  /** Default values for pkt-messagebox. Single source of truth for both frameworks. */
28
30
  export declare const MESSAGEBOX_DEFAULTS: {
29
- readonly skin: 'beige';
31
+ readonly skin: 'gray';
30
32
  readonly compact: false;
31
33
  readonly closable: false;
32
34
  };
@@ -1,5 +1,82 @@
1
- export type TProgressbarRole = 'progressbar' | 'meter';
2
- export type TProgressbarSkin = 'dark-blue' | 'light-blue' | 'green' | 'red';
3
- export type TProgressbarStatusPlacement = 'center' | 'left' | 'following';
4
- export type TProgressbarStatusType = 'none' | 'percentage' | 'fraction';
5
- export type TProgressbarTitlePosition = 'left' | 'center';
1
+ /**
2
+ * progressbar.ts
3
+ *
4
+ * Shared types and defaults for Progressbar, used by both React and Elements.
5
+ *
6
+ * The value lists are `as const` arrays rather than plain union types. That way
7
+ * the values also exist at runtime, so the component spec and Preview can use
8
+ * them directly (`type: [...PROGRESSBAR_SKINS]`) instead of repeating them.
9
+ * The types are derived from the arrays, so there is a single source.
10
+ */
11
+ import type { IPktStringsProps } from '../shared-strings';
12
+ import type { TAriaLive } from './aria';
13
+ /** Element role: `progressbar` for progress, `meter` for measuring a value. */
14
+ export declare const PROGRESSBAR_ROLES: readonly ['progressbar', 'meter'];
15
+ export type TProgressbarRole = (typeof PROGRESSBAR_ROLES)[number];
16
+ /** Color of the progress bar. */
17
+ export declare const PROGRESSBAR_SKINS: readonly ['dark-blue', 'light-blue', 'green', 'red'];
18
+ export type TProgressbarSkin = (typeof PROGRESSBAR_SKINS)[number];
19
+ /** Where the status text is placed relative to the bar. */
20
+ export declare const PROGRESSBAR_STATUS_PLACEMENTS: readonly ['left', 'following', 'center'];
21
+ export type TProgressbarStatusPlacement = (typeof PROGRESSBAR_STATUS_PLACEMENTS)[number];
22
+ /** How status is shown: none, percentage ("40%") or fraction ("4 av 10"). */
23
+ export declare const PROGRESSBAR_STATUS_TYPES: readonly ['none', 'percentage', 'fraction'];
24
+ export type TProgressbarStatusType = (typeof PROGRESSBAR_STATUS_TYPES)[number];
25
+ /** Alignment of the title above the bar. */
26
+ export declare const PROGRESSBAR_TITLE_POSITIONS: readonly ['left', 'center'];
27
+ export type TProgressbarTitlePosition = (typeof PROGRESSBAR_TITLE_POSITIONS)[number];
28
+ /**
29
+ * Framework-agnostic props for Progressbar.
30
+ *
31
+ * Contains no React or Lit types, so both packages can build on it:
32
+ * React extends it with `HTMLAttributes` and `ref`, Elements uses it as is.
33
+ */
34
+ export interface IPktProgressbarBase extends IPktStringsProps<'progressbar'> {
35
+ /** Accessible name. When set, `aria-labelledby` is not used. */
36
+ ariaLabel?: string | null;
37
+ /** Id of the element that labels the bar. Falls back to the title. */
38
+ ariaLabelledby?: string | null;
39
+ /** How assertively screen readers announce changes. */
40
+ ariaLive?: TAriaLive;
41
+ /** Custom text value. With `statusType="fraction"`, "X av Y" is generated when empty. */
42
+ ariaValueText?: string | null;
43
+ id?: string;
44
+ role?: TProgressbarRole;
45
+ skin?: TProgressbarSkin;
46
+ statusPlacement?: TProgressbarStatusPlacement;
47
+ statusType?: TProgressbarStatusType;
48
+ title?: string | null;
49
+ titlePosition?: TProgressbarTitlePosition;
50
+ /** Current value. Required, since the bar is meaningless without it. */
51
+ valueCurrent: number;
52
+ valueMax?: number;
53
+ valueMin?: number;
54
+ }
55
+ /**
56
+ * Props documented in the component spec (docs and Preview).
57
+ * The spec file is type-checked against this, so a prop that doesn't exist on
58
+ * `IPktProgressbarBase` is a compile error.
59
+ */
60
+ export type IProgressbarSpecProps = Pick<IPktProgressbarBase, 'skin' | 'title' | 'valueMin' | 'valueMax' | 'ariaLabel' | 'ariaLabelledby' | 'ariaValueText' | 'valueCurrent' | 'statusType' | 'statusPlacement' | 'id' | 'titlePosition' | 'role' | 'ariaLive'>;
61
+ /**
62
+ * Default values, shared by React and Elements.
63
+ *
64
+ * These used to be hardcoded in each package and in the JSON spec, and they had
65
+ * drifted apart (the spec said `statusType: 'percentage'`, the components `'none'`).
66
+ * Both components and the spec now read from here.
67
+ *
68
+ * `title` and `id` are left out on purpose: React and Elements handle them
69
+ * differently (Elements generates the id in the property initializer, React
70
+ * via `useGeneratedId`).
71
+ */
72
+ export declare const PROGRESSBAR_DEFAULTS: {
73
+ readonly ariaLive: 'polite';
74
+ readonly role: 'progressbar';
75
+ readonly skin: 'dark-blue';
76
+ readonly statusPlacement: 'following';
77
+ readonly statusType: 'none';
78
+ readonly titlePosition: 'left';
79
+ readonly valueCurrent: 0;
80
+ readonly valueMax: 100;
81
+ readonly valueMin: 0;
82
+ };
@@ -10,6 +10,12 @@ export { ACCORDION_SKINS, type TAccordionSkin } from './accordion';
10
10
  export { CARD_SKINS, type TCardSkin } from './card';
11
11
  export { MESSAGEBOX_SKINS, type TMessageboxSkin } from './messagebox';
12
12
  /**
13
- * Tag component skin variants
13
+ * Tag component skin variants — shared runtime source for types, specs and demo pages.
14
14
  */
15
- export type TTagSkin = 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
15
+ export declare const TAG_SKINS: readonly ['gray', 'gray-light', 'blue-dark', 'blue', 'blue-light', 'blue-pale', 'green', 'green-light', 'red', 'red-light', 'yellow', 'yellow-light', 'beige', 'beige-light'];
16
+ export type TTagSkin = (typeof TAG_SKINS)[number];
17
+ /**
18
+ * Forces a tag into a visual state without the user interacting with it.
19
+ */
20
+ export declare const TAG_STATES: readonly ['hover', 'focus', 'active'];
21
+ export type TTagState = (typeof TAG_STATES)[number];
@@ -1,10 +1,10 @@
1
- import { _ as e, d as t, l as n, n as r, u as i } from "./element-ckeMVgMz.js";
2
- import { i as a, t as o } from "./element-with-slot-Dp2Gzv-Q.js";
3
- import { t as s } from "./if-defined-D18nY_K_.js";
1
+ import { _ as e, d as t, l as n, n as r, u as i } from "./element-DLgZkx5L.js";
2
+ import { i as a, t as o } from "./element-with-slot-mG-h7Sjw.js";
3
+ import { t as s } from "./if-defined-DiYi2v_Q.js";
4
4
  import { n as c, t as l } from "./consume-Bp12si68.js";
5
5
  import { t as u } from "./provide-_MnlMGnw.js";
6
- import { n as d, t as f } from "./ref-D4OwQYdf.js";
7
- import "./tag-BOTH9kMz.js";
6
+ import { n as d, t as f } from "./ref-BAegS9BR.js";
7
+ import "./tag-CkZ2Mn4a.js";
8
8
  //#region src/components/tabs/tabs-context.ts
9
9
  var p = c(Symbol("pkt-tabs-context")), m = class extends o {
10
10
  constructor(...e) {
@@ -1,4 +1,4 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./element-with-slot-B0Vp_OuR.cjs"),n=require("./if-defined-CiML3MTM.cjs"),r=require("./consume-kEjgTrAp.cjs"),i=require("./provide-Cz18sYug.cjs"),a=require("./ref-CB7e9nMY.cjs");require("./tag-DrFK8Wq3.cjs");var o=r.n(Symbol(`pkt-tabs-context`)),s=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.separatorIconName=``,this.separatorIconPath=``,this.tabRefs=[],this.disabledMap={},this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}willUpdate(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}updated(){this.updateComplete.then(()=>this.syncSeparators())}syncSeparators(){let e=this.querySelector(`.pkt-tabs__list`);if(!e||(e.querySelectorAll(`.pkt-tabs__separator`).forEach(e=>e.remove()),!(this.separatorIconName||this.separatorIconPath)))return;let t=Array.from(e.children).filter(e=>!e.classList.contains(`pkt-tabs__separator`));for(let e=0;e<t.length-1;e++){let n=document.createElement(`span`);if(n.className=`pkt-tabs__separator`,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`presentation`),this.separatorIconPath){let e=document.createElement(`img`);e.setAttribute(`src`,this.separatorIconPath),e.setAttribute(`alt`,``),e.setAttribute(`aria-hidden`,`true`),n.appendChild(e)}else if(this.separatorIconName){let e=document.createElement(`pkt-icon`);e.setAttribute(`name`,this.separatorIconName),e.classList.add(`pkt-tabs__separator-icon`),n.appendChild(e)}t[e].after(n)}}registerTab(e,t,n=!1){this.tabRefs[t]=e,this.disabledMap[t]=n,this.tabCount=Math.max(this.tabCount,t+1)}isTabDisabled(e){return!!this.disabledMap[e]}findEnabledIndex(e,t){let n=e+t;for(;n>=0&&n<this.tabCount;){if(!this.isTabDisabled(n))return n;n+=t}return null}handleClick(e){this.isTabDisabled(e)||this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){if(this.useArrowNav){if(e.key===`ArrowLeft`){e.preventDefault();let n=this.findEnabledIndex(t,-1);n!==null&&this.tabRefs[n]?.focus()}if(e.key===`ArrowRight`){e.preventDefault();let n=this.findEnabledIndex(t,1);n!==null&&this.tabRefs[n]?.focus()}(e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowDown`)&&(e.preventDefault(),this.handleClick(t))}}render(){let n=this.useArrowNav?`tablist`:`navigation`,r=this.separatorIconName||this.separatorIconPath?`pkt-tabs pkt-tabs--with-separator`:`pkt-tabs`;return e._`
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs"),n=require("./if-defined-Ci4ZQsgL.cjs"),r=require("./consume-kEjgTrAp.cjs"),i=require("./provide-Cz18sYug.cjs"),a=require("./ref-B6p6mQkO.cjs");require("./tag-1SSexs0H.cjs");var o=r.n(Symbol(`pkt-tabs-context`)),s=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.separatorIconName=``,this.separatorIconPath=``,this.tabRefs=[],this.disabledMap={},this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}willUpdate(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}updated(){this.updateComplete.then(()=>this.syncSeparators())}syncSeparators(){let e=this.querySelector(`.pkt-tabs__list`);if(!e||(e.querySelectorAll(`.pkt-tabs__separator`).forEach(e=>e.remove()),!(this.separatorIconName||this.separatorIconPath)))return;let t=Array.from(e.children).filter(e=>!e.classList.contains(`pkt-tabs__separator`));for(let e=0;e<t.length-1;e++){let n=document.createElement(`span`);if(n.className=`pkt-tabs__separator`,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`presentation`),this.separatorIconPath){let e=document.createElement(`img`);e.setAttribute(`src`,this.separatorIconPath),e.setAttribute(`alt`,``),e.setAttribute(`aria-hidden`,`true`),n.appendChild(e)}else if(this.separatorIconName){let e=document.createElement(`pkt-icon`);e.setAttribute(`name`,this.separatorIconName),e.classList.add(`pkt-tabs__separator-icon`),n.appendChild(e)}t[e].after(n)}}registerTab(e,t,n=!1){this.tabRefs[t]=e,this.disabledMap[t]=n,this.tabCount=Math.max(this.tabCount,t+1)}isTabDisabled(e){return!!this.disabledMap[e]}findEnabledIndex(e,t){let n=e+t;for(;n>=0&&n<this.tabCount;){if(!this.isTabDisabled(n))return n;n+=t}return null}handleClick(e){this.isTabDisabled(e)||this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){if(this.useArrowNav){if(e.key===`ArrowLeft`){e.preventDefault();let n=this.findEnabledIndex(t,-1);n!==null&&this.tabRefs[n]?.focus()}if(e.key===`ArrowRight`){e.preventDefault();let n=this.findEnabledIndex(t,1);n!==null&&this.tabRefs[n]?.focus()}(e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowDown`)&&(e.preventDefault(),this.handleClick(t))}}render(){let n=this.useArrowNav?`tablist`:`navigation`,r=this.separatorIconName||this.separatorIconPath?`pkt-tabs pkt-tabs--with-separator`:`pkt-tabs`;return e._`
2
2
  <div class=${r}>
3
3
  <div class="pkt-tabs__list" role=${n}>${t.i(this)}</div>
4
4
  </div>
@@ -0,0 +1,27 @@
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("./icon-5A378_yh.cjs");const i=require("./if-defined-Ci4ZQsgL.cjs");var a={name:`pkt-tag`,react:`PktTag`,"css-class":`pkt-tag`,isElement:!0,"dark-mode":!0,props:{size:{name:`Størrelse`,description:`Størrelsen på taggen`,required:!1,default:`medium`,type:[`small`,`medium`,`large`],category:`ui`},iconName:{name:`Ikon`,description:`Navnet på ikonet som skal vises i taggen`,type:`icon`,required:!1,category:`ui`},skin:{name:`Utseende`,description:`Utseendet til taggen. Bare standardutseendet gray har dark mode.`,required:!1,default:`gray`,type:[`gray`,`gray-light`,`blue-dark`,`blue`,`blue-light`,`blue-pale`,`green`,`green-light`,`red`,`red-light`,`yellow`,`yellow-light`,`beige`,`beige-light`],category:`ui`},closeTag:{name:`Lukk tag`,description:`Skal taggen ha en lukkeknapp?`,type:`boolean`,required:!1,default:!1,category:`ui`},state:{name:`Tvungen tilstand`,description:`Viser taggen i en gitt tilstand uten at brukeren samhandler med den`,required:!1,type:[`hover`,`focus`,`active`],category:`ui`},textStyle:{name:`Tekststil`,description:`Stilen på teksten i taggen`,required:!1,default:`normal-text`,type:[`thin-text`,`normal-text`],category:`ui`},type:{name:`Type, dersom lukkeknapp`,description:`Type tag, brukes for å spesifisere om det er en knapp, submit eller reset`,required:!1,default:`button`,type:[`button`,`submit`,`reset`],category:`tech`},ariaLabel:{name:`aria-label`,description:`aria-label for taggen, brukes for tilgjengelighet`,type:`string`,required:!1,category:`accessibility`}},slots:{default:{description:`Teksten til tag`}}},o=class extends r.t{constructor(){super(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.state=null,this.textStyle=null,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=null,this.buttonTabindex=void 0,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._isClosed=!1}willUpdate(e){if(super.willUpdate(e),this.closeTag&&!this.ariaLabel){let e=r.r(this).getNodes().map(e=>e.textContent??``).join(``).trim();e&&(this._ariaDescription=n.t(this.pktStrings.get(`tag`).remove,{label:e}))}}render(){let n={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.state}`]:!!this.state,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.state}`]:!!this.state,"pkt-hide":this._isClosed};return this.closeTag?e._`
2
+ <button
3
+ class=${t.t(a)}
4
+ type=${this.type}
5
+ tabindex=${i.t(this.buttonTabindex)}
6
+ @click=${this.close}
7
+ aria-label=${i.t(this.ariaLabel||void 0)}
8
+ aria-description=${i.t(this._ariaDescription||void 0)}
9
+ >
10
+ ${this.iconName&&e._`<pkt-icon
11
+ class="pkt-tag__icon"
12
+ name=${this.iconName}
13
+ aria-hidden="true"
14
+ ></pkt-icon>`}
15
+ <span>${r.i(this)}</span>
16
+ <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
17
+ </button>
18
+ `:e._`
19
+ <span class=${t.t(n)}>
20
+ ${this.iconName&&e._`<pkt-icon
21
+ class="pkt-tag__icon"
22
+ name=${this.iconName}
23
+ aria-hidden="true"
24
+ ></pkt-icon>`}
25
+ <span>${r.i(this)}</span>
26
+ </span>
27
+ `}};e.n([e.u({type:Boolean,reflect:!0})],o.prototype,`closeTag`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`size`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`skin`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`state`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`textStyle`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`iconName`,void 0),e.n([e.u({type:String})],o.prototype,`type`,void 0),e.n([e.u({type:String})],o.prototype,`ariaLabel`,void 0),e.n([e.u({type:Number,attribute:`button-tabindex`})],o.prototype,`buttonTabindex`,void 0),e.n([e.l()],o.prototype,`_isClosed`,void 0),e.n([e.l()],o.prototype,`_ariaDescription`,void 0);try{e.d(`pkt-tag`)(o)}catch{console.warn(`Forsøker å definere <pkt-tag>, 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,9 +1,9 @@
1
- import { _ as e, d as t, l as n, n as r, u as i } from "./element-ckeMVgMz.js";
2
- import { t as a } from "./class-map-BkEYw5uE.js";
1
+ import { _ as e, d as t, l as n, n as r, u as i } from "./element-DLgZkx5L.js";
2
+ import { t as a } from "./class-map-BDwVSgLb.js";
3
3
  import { t as o } from "./format-BTeSVkED.js";
4
- import { i as s, r as c, t as l } from "./element-with-slot-Dp2Gzv-Q.js";
5
- import "./icon-CUU42bZ0.js";
6
- import { t as u } from "./if-defined-D18nY_K_.js";
4
+ import { i as s, r as c, t as l } from "./element-with-slot-mG-h7Sjw.js";
5
+ import "./icon-C1oCGwEe.js";
6
+ import { t as u } from "./if-defined-DiYi2v_Q.js";
7
7
  var d = {
8
8
  name: "pkt-tag",
9
9
  react: "PktTag",
@@ -32,18 +32,24 @@ var d = {
32
32
  },
33
33
  skin: {
34
34
  name: "Utseende",
35
- description: "Utseendet til taggen",
35
+ description: "Utseendet til taggen. Bare standardutseendet gray har dark mode.",
36
36
  required: !1,
37
- default: "blue",
37
+ default: "gray",
38
38
  type: [
39
+ "gray",
40
+ "gray-light",
41
+ "blue-dark",
39
42
  "blue",
40
43
  "blue-light",
41
- "blue-dark",
44
+ "blue-pale",
42
45
  "green",
46
+ "green-light",
43
47
  "red",
44
- "beige",
48
+ "red-light",
45
49
  "yellow",
46
- "gray"
50
+ "yellow-light",
51
+ "beige",
52
+ "beige-light"
47
53
  ],
48
54
  category: "ui"
49
55
  },
@@ -55,6 +61,17 @@ var d = {
55
61
  default: !1,
56
62
  category: "ui"
57
63
  },
64
+ state: {
65
+ name: "Tvungen tilstand",
66
+ description: "Viser taggen i en gitt tilstand uten at brukeren samhandler med den",
67
+ required: !1,
68
+ type: [
69
+ "hover",
70
+ "focus",
71
+ "active"
72
+ ],
73
+ category: "ui"
74
+ },
58
75
  textStyle: {
59
76
  name: "Tekststil",
60
77
  description: "Stilen på teksten i taggen",
@@ -86,7 +103,7 @@ var d = {
86
103
  slots: { default: { description: "Teksten til tag" } }
87
104
  }, f = class extends l {
88
105
  constructor() {
89
- super(), this.closeTag = d.props.closeTag.default, this.size = d.props.size.default, this.skin = d.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = d.props.type.default, this.ariaLabel = null, this.buttonTabindex = void 0, this._isClosed = !1, this._ariaDescription = null, this.close = (e) => {
106
+ super(), this.closeTag = d.props.closeTag.default, this.size = d.props.size.default, this.skin = d.props.skin.default, this.state = null, this.textStyle = null, this.iconName = void 0, this.type = d.props.type.default, this.ariaLabel = null, this.buttonTabindex = void 0, this._isClosed = !1, this._ariaDescription = null, this.close = (e) => {
90
107
  this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
91
108
  detail: { origin: e },
92
109
  bubbles: !1,
@@ -109,12 +126,14 @@ var d = {
109
126
  "pkt-tag": !0,
110
127
  [`pkt-tag--${this.size}`]: !!this.size,
111
128
  [`pkt-tag--${this.skin}`]: !!this.skin,
129
+ [`pkt-tag--${this.state}`]: !!this.state,
112
130
  [`pkt-tag--${this.textStyle}`]: !!this.textStyle
113
131
  }, n = {
114
132
  "pkt-tag": !0,
115
133
  [`pkt-tag--${this.textStyle}`]: !!this.textStyle,
116
134
  [`pkt-tag--${this.size}`]: !!this.size,
117
135
  [`pkt-tag--${this.skin}`]: !!this.skin,
136
+ [`pkt-tag--${this.state}`]: !!this.state,
118
137
  "pkt-hide": this._isClosed
119
138
  };
120
139
  return this.closeTag ? e`
@@ -158,6 +177,9 @@ r([i({
158
177
  })], f.prototype, "skin", void 0), r([i({
159
178
  type: String,
160
179
  reflect: !0
180
+ })], f.prototype, "state", void 0), r([i({
181
+ type: String,
182
+ reflect: !0
161
183
  })], f.prototype, "textStyle", void 0), r([i({
162
184
  type: String,
163
185
  reflect: !0
@@ -1,4 +1,4 @@
1
- const e=require("./element-C6WTyJFE.cjs"),t=require("./class-map-Bh6toDeV.cjs"),n=require("./directive-helpers-Bv70GjQh.cjs"),r=require("./element-with-slot-B0Vp_OuR.cjs");require("./shared-types-BvRk9kiK.cjs"),require("./icon-CrG6o7ZE.cjs");const i=require("./input-wrapper-QzdntWJX.cjs"),a=require("./if-defined-CiML3MTM.cjs"),o=require("./ref-CB7e9nMY.cjs"),s=require("./input-element-D82laWtR.cjs");var c={autoComplete:`off`,required:!1,readOnly:!1,requiredTag:!1,optionalTag:!1,hasError:!1,disabled:!1,inline:!1,fullwidth:!1,useWrapper:!0,inputSize:`medium`},l=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.PROPERTY&&t.type!==e.m.ATTRIBUTE&&t.type!==e.m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!n.i(t))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(t,[r]){if(r===e.g||r===e.h)return r;let i=t.element,a=t.name;if(t.type===e.m.PROPERTY){if(r===i[a])return e.g}else if(t.type===e.m.BOOLEAN_ATTRIBUTE){if(!!r===i.hasAttribute(a))return e.g}else if(t.type===e.m.ATTRIBUTE&&i.getAttribute(a)===r+``)return e.g;return n.r(t),r}}),u=class extends s.t{constructor(...e){super(...e),this.inputRef=o.t(),this.value=``,this.autocomplete=c.autoComplete,this.rows=null,this.cols=null,this.counterCurrent=0}attributeChangedCallback(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}willUpdate(e){super.willUpdate(e),e.has(`value`)&&typeof this.value!=`string`&&!Array.isArray(this.value)&&(this.value=this.coerceToString(this.value)),e.has(`value`)&&(this.counterCurrent=this.value?.length||0),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`,`pkt-textarea`),e.has(`value`)&&this.valueChanged(this.value,e.get(`value`))}render(){let n=this.effectiveCounter(this.counterMaxLength>0),s=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":n&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),c=this.ariaLabelledby||`${this.id}-input-label`;return e._`<pkt-input-wrapper
1
+ const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./directive-helpers-r7akb6wX.cjs"),r=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs"),require("./icon-5A378_yh.cjs");const i=require("./input-wrapper-C_Rzwxx7.cjs"),a=require("./if-defined-Ci4ZQsgL.cjs"),o=require("./ref-B6p6mQkO.cjs"),s=require("./input-element-2LHxo0em.cjs");var c={autoComplete:`off`,required:!1,readOnly:!1,requiredTag:!1,optionalTag:!1,hasError:!1,disabled:!1,inline:!1,fullwidth:!1,useWrapper:!0,inputSize:`medium`},l=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.PROPERTY&&t.type!==e.m.ATTRIBUTE&&t.type!==e.m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!n.i(t))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(t,[r]){if(r===e.g||r===e.h)return r;let i=t.element,a=t.name;if(t.type===e.m.PROPERTY){if(r===i[a])return e.g}else if(t.type===e.m.BOOLEAN_ATTRIBUTE){if(!!r===i.hasAttribute(a))return e.g}else if(t.type===e.m.ATTRIBUTE&&i.getAttribute(a)===r+``)return e.g;return n.r(t),r}}),u=class extends s.t{constructor(...e){super(...e),this.inputRef=o.t(),this.value=``,this.autocomplete=c.autoComplete,this.rows=null,this.cols=null,this.counterCurrent=0}attributeChangedCallback(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}willUpdate(e){super.willUpdate(e),e.has(`value`)&&typeof this.value!=`string`&&!Array.isArray(this.value)&&(this.value=this.coerceToString(this.value)),e.has(`value`)&&(this.counterCurrent=this.value?.length||0),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`,`pkt-textarea`),e.has(`value`)&&this.valueChanged(this.value,e.get(`value`))}render(){let n=this.effectiveCounter(this.counterMaxLength>0),s=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":n&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),c=this.ariaLabelledby||`${this.id}-input-label`;return e._`<pkt-input-wrapper
2
2
  ${r.n(this,[`helptext`])}
3
3
  .strings=${this.strings}
4
4
  label=${this.label}
@@ -1,13 +1,13 @@
1
- import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, u as l } from "./element-ckeMVgMz.js";
2
- import { t as u } from "./class-map-BkEYw5uE.js";
3
- import { i as d, r as f } from "./directive-helpers-BAinC437.js";
4
- import { n as p } from "./element-with-slot-Dp2Gzv-Q.js";
1
+ import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, u as l } from "./element-DLgZkx5L.js";
2
+ import { t as u } from "./class-map-BDwVSgLb.js";
3
+ import { i as d, r as f } from "./directive-helpers-BoDzpPID.js";
4
+ import { n as p } from "./element-with-slot-mG-h7Sjw.js";
5
5
  import "./shared-types-A6iGIX-f.js";
6
- import "./icon-CUU42bZ0.js";
7
- import { r as m } from "./input-wrapper-CHwWQgZP.js";
8
- import { t as h } from "./if-defined-D18nY_K_.js";
9
- import { n as g, t as _ } from "./ref-D4OwQYdf.js";
10
- import { t as v } from "./input-element-DczlJQb1.js";
6
+ import "./icon-C1oCGwEe.js";
7
+ import { r as m } from "./input-wrapper-DkpJS1hR.js";
8
+ import { t as h } from "./if-defined-DiYi2v_Q.js";
9
+ import { n as g, t as _ } from "./ref-BAegS9BR.js";
10
+ import { t as v } from "./input-element-De40zUox.js";
11
11
  //#region ../../shared-types/textarea.ts
12
12
  var y = {
13
13
  autoComplete: "off",