@oslokommune/punkt-elements 17.1.3 → 18.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 (249) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{accordion-BeLvLPrB.js → accordion-1_pdxTgJ.js} +27 -27
  3. package/dist/{accordion-B3GBlvUC.cjs → accordion-DobbH-Sv.cjs} +5 -5
  4. package/dist/{alert-Cs4Rmq_J.cjs → alert-COeHz6o2.cjs} +6 -6
  5. package/dist/{alert-DKK_Tb9J.js → alert-xspFetQ8.js} +26 -26
  6. package/dist/{async-directive-Da7TJpnq.cjs → async-directive-B5pcIMfO.cjs} +1 -1
  7. package/dist/{async-directive-BPf6K-V2.js → async-directive-D2Sht790.js} +5 -5
  8. package/dist/{backlink-D1y26pj3.js → backlink-C0jZFnZ2.js} +8 -8
  9. package/dist/{backlink-CMmrKTe4.cjs → backlink-ZMhqHaVs.cjs} +3 -3
  10. package/dist/base-elements/element.d.ts +13 -1
  11. package/dist/base-elements/input-element.d.ts +4 -2
  12. package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-BS64xd1s.cjs} +7 -7
  13. package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-BvMownZN.js} +16 -16
  14. package/dist/{button-2-OSPJkj.js → button-C44vNLFC.js} +28 -28
  15. package/dist/{button-CE97NQIk.cjs → button-CR4CXtnj.cjs} +7 -7
  16. package/dist/{calendar-kn4SrtJy.cjs → calendar-DQ4byeom.cjs} +28 -27
  17. package/dist/{calendar-pOW3R5Pw.js → calendar-DgjCKMMV.js} +82 -68
  18. package/dist/{card-zQ0eKRMV.js → card-DhHqC265.js} +44 -44
  19. package/dist/{card-CETDFkxR.cjs → card-Dpqi6HVt.cjs} +26 -26
  20. package/dist/{checkbox-CH7NpINF.js → checkbox-BQ1K57AB.js} +23 -23
  21. package/dist/{checkbox-CQNr_sEg.cjs → checkbox-CXQxbiaX.cjs} +11 -11
  22. package/dist/{class-map-BeimMvPv.cjs → class-map-CzCE5pqG.cjs} +1 -1
  23. package/dist/{class-map-CnWCnBSX.js → class-map-F1DJHyb7.js} +3 -3
  24. package/dist/{combobox-Bvg0UO9w.cjs → combobox-BV4oDiII.cjs} +19 -18
  25. package/dist/{combobox-CRdYYlxu.js → combobox-DPck39I2.js} +55 -54
  26. package/dist/components/calendar/calendar.d.ts +21 -6
  27. package/dist/components/checkbox/checkbox.d.ts +4 -2
  28. package/dist/components/combobox/combobox-base.d.ts +2 -1
  29. package/dist/components/consent/strings.d.ts +1 -85
  30. package/dist/components/datepicker/datepicker-base.d.ts +0 -3
  31. package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
  32. package/dist/components/datepicker/datepicker-range.d.ts +0 -2
  33. package/dist/components/datepicker/datepicker-single.d.ts +0 -2
  34. package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
  35. package/dist/components/fileupload/fileupload-base.d.ts +3 -2
  36. package/dist/components/header/header-service.d.ts +3 -1
  37. package/dist/components/header/header.d.ts +2 -1
  38. package/dist/components/helptext/helptext.d.ts +2 -1
  39. package/dist/components/index.d.ts +2 -0
  40. package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
  41. package/dist/components/radiobutton/radiobutton.d.ts +4 -2
  42. package/dist/components/searchinput/searchinput.d.ts +2 -1
  43. package/dist/{consent-DZEkhgJ1.js → consent-BneInZov.js} +10 -10
  44. package/dist/{consent-CyY3RyoC.cjs → consent-_N9foluG.cjs} +5 -5
  45. package/dist/controllers/strings-controller.d.ts +27 -0
  46. package/dist/{datepicker-VTqSDQk5.cjs → datepicker-9NX5qt2z.cjs} +38 -37
  47. package/dist/{datepicker-ButIas85.js → datepicker-nSSSr1U7.js} +104 -104
  48. package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BARw3nEZ.js} +1 -1
  49. package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-D6AAMFKs.cjs} +1 -1
  50. package/dist/docs/components/fileupload.d.ts +1 -0
  51. package/dist/element-B8OGznK0.cjs +2 -0
  52. package/dist/{element-ChsFgr_B.js → element-BKSPVgs2.js} +240 -100
  53. package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-DTxILHVv.cjs} +1 -1
  54. package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-YUAUFRqw.js} +4 -4
  55. package/dist/fileupload-D05VSbEP.cjs +402 -0
  56. package/dist/{fileupload-D5IQ9HDe.js → fileupload-E0LGGNgj.js} +370 -380
  57. package/dist/{footer-DbYQUYNR.cjs → footer-DBApIdGh.cjs} +32 -32
  58. package/dist/{footer-DrR64HiK.js → footer-DYilVBMC.js} +91 -91
  59. package/dist/format-B8meU8Tm.cjs +1 -0
  60. package/dist/format-BTeSVkED.js +18 -0
  61. package/dist/{header-ClgIac6n.cjs → header-B7tbX-Ok.cjs} +84 -84
  62. package/dist/{header-menu-BAsUNKSx.cjs → header-menu-1FFWhvNc.cjs} +24 -24
  63. package/dist/{header-menu-hVPXsb8g.js → header-menu-D522-VTV.js} +75 -75
  64. package/dist/{header-KvJ1mGwA.js → header-v3GWAzOK.js} +267 -264
  65. package/dist/{heading-CFmiSuCQ.cjs → heading-CvytvcL7.cjs} +1 -1
  66. package/dist/{heading-g-_IUB5T.js → heading-rx_oSCqe.js} +16 -16
  67. package/dist/helptext-DYFdcylX.cjs +27 -0
  68. package/dist/{helptext-DZng1D5i.js → helptext-LShGPm-b.js} +18 -19
  69. package/dist/{icon-9iwd2F2l.cjs → icon-BmMC09mi.cjs} +1 -1
  70. package/dist/{icon-D-LA22xD.js → icon-HYU1f54x.js} +17 -17
  71. package/dist/{if-defined-CGzIlZ9-.js → if-defined-BF8XcDi5.js} +1 -1
  72. package/dist/if-defined-CVYApOgK.cjs +1 -0
  73. package/dist/{input-element-DBMNBplu.js → input-element-D07DmR34.js} +121 -120
  74. package/dist/input-element-DumGj_oJ.cjs +1 -0
  75. package/dist/input-wrapper-Cci_wTvD.js +308 -0
  76. package/dist/input-wrapper-DDfapoRX.cjs +58 -0
  77. package/dist/{link-DK7gvmnj.cjs → link-11g2ZNin.cjs} +4 -4
  78. package/dist/{link-D-Eqm5KH.js → link-CQK0SH4H.js} +13 -13
  79. package/dist/{linkcard-zqbg7Oqm.js → linkcard-B4GlmjJ6.js} +16 -16
  80. package/dist/linkcard-DNYsVlV6.cjs +13 -0
  81. package/dist/{listbox-Dc4rGdPi.cjs → listbox-BlFRhyI7.cjs} +15 -15
  82. package/dist/{listbox-va_E8afs.js → listbox-wd_OofyF.js} +100 -99
  83. package/dist/{loader-D_RDICnw.js → loader-0C3qVk16.js} +14 -14
  84. package/dist/{loader-CMUkVJmE.cjs → loader-B9u2qUlR.cjs} +5 -5
  85. package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-BD5tGmT-.cjs} +5 -5
  86. package/dist/{messagebox-Cw-OWDya.js → messagebox-C-y1ICmr.js} +15 -15
  87. package/dist/{modal-BtInv031.cjs → modal-BzPGQYCs.cjs} +8 -8
  88. package/dist/{modal-D0t_X2dX.js → modal-Cghs3w-d.js} +20 -20
  89. package/dist/pkt-accordion.cjs +1 -1
  90. package/dist/pkt-accordion.js +1 -1
  91. package/dist/pkt-alert.cjs +1 -1
  92. package/dist/pkt-alert.js +1 -1
  93. package/dist/pkt-backlink.cjs +1 -1
  94. package/dist/pkt-backlink.js +1 -1
  95. package/dist/pkt-breadcrumbs.cjs +1 -1
  96. package/dist/pkt-breadcrumbs.js +1 -1
  97. package/dist/pkt-button.cjs +1 -1
  98. package/dist/pkt-button.js +1 -1
  99. package/dist/pkt-calendar.cjs +1 -1
  100. package/dist/pkt-calendar.js +1 -1
  101. package/dist/pkt-card.cjs +1 -1
  102. package/dist/pkt-card.js +1 -1
  103. package/dist/pkt-checkbox.cjs +1 -1
  104. package/dist/pkt-checkbox.js +1 -1
  105. package/dist/pkt-combobox.cjs +1 -1
  106. package/dist/pkt-combobox.js +1 -1
  107. package/dist/pkt-consent.cjs +1 -1
  108. package/dist/pkt-consent.js +1 -1
  109. package/dist/pkt-datepicker.cjs +1 -1
  110. package/dist/pkt-datepicker.js +1 -1
  111. package/dist/pkt-fileupload.cjs +1 -1
  112. package/dist/pkt-fileupload.js +1 -1
  113. package/dist/pkt-footer.cjs +1 -1
  114. package/dist/pkt-footer.js +1 -1
  115. package/dist/pkt-header-menu.cjs +1 -1
  116. package/dist/pkt-header-menu.js +1 -1
  117. package/dist/pkt-header.cjs +1 -1
  118. package/dist/pkt-header.js +1 -1
  119. package/dist/pkt-heading.cjs +1 -1
  120. package/dist/pkt-heading.js +1 -1
  121. package/dist/pkt-helptext.cjs +1 -1
  122. package/dist/pkt-helptext.js +1 -1
  123. package/dist/pkt-icon.cjs +1 -1
  124. package/dist/pkt-icon.js +1 -1
  125. package/dist/pkt-index.cjs +1 -1
  126. package/dist/pkt-index.js +35 -34
  127. package/dist/pkt-input-wrapper.cjs +1 -1
  128. package/dist/pkt-input-wrapper.js +1 -1
  129. package/dist/pkt-link.cjs +1 -1
  130. package/dist/pkt-link.js +1 -1
  131. package/dist/pkt-linkcard.cjs +1 -1
  132. package/dist/pkt-linkcard.js +1 -1
  133. package/dist/pkt-listbox.cjs +1 -1
  134. package/dist/pkt-listbox.js +1 -1
  135. package/dist/pkt-loader.cjs +1 -1
  136. package/dist/pkt-loader.js +1 -1
  137. package/dist/pkt-messagebox.cjs +1 -1
  138. package/dist/pkt-messagebox.js +1 -1
  139. package/dist/pkt-modal.cjs +1 -1
  140. package/dist/pkt-modal.js +1 -1
  141. package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-CEEAqXaB.cjs} +1 -1
  142. package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-PtjhmTGk.js} +1 -1
  143. package/dist/pkt-progressbar.cjs +1 -1
  144. package/dist/pkt-progressbar.js +1 -1
  145. package/dist/pkt-radiobutton.cjs +1 -1
  146. package/dist/pkt-radiobutton.js +1 -1
  147. package/dist/pkt-searchinput.cjs +1 -1
  148. package/dist/pkt-searchinput.js +1 -1
  149. package/dist/pkt-select.cjs +1 -1
  150. package/dist/pkt-select.js +1 -1
  151. package/dist/pkt-tabs.cjs +1 -1
  152. package/dist/pkt-tabs.js +1 -1
  153. package/dist/pkt-tag.cjs +1 -1
  154. package/dist/pkt-tag.js +1 -1
  155. package/dist/pkt-textarea.cjs +1 -1
  156. package/dist/pkt-textarea.js +1 -1
  157. package/dist/pkt-textinput.cjs +1 -1
  158. package/dist/pkt-textinput.js +1 -1
  159. package/dist/pkt-timepicker.cjs +1 -1
  160. package/dist/pkt-timepicker.js +1 -1
  161. package/dist/{progressbar-CbcfLerF.js → progressbar-BexQQw1o.js} +21 -21
  162. package/dist/{progressbar-D5MmnQId.cjs → progressbar-X9mSvpjw.cjs} +5 -5
  163. package/dist/{radiobutton-BUnf3EPi.js → radiobutton-CkhTasn4.js} +24 -24
  164. package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-ln29Ad3U.cjs} +8 -8
  165. package/dist/{ref-CQoEIIp0.cjs → ref-CHbJYtKE.cjs} +1 -1
  166. package/dist/{ref-CWD6PjVd.js → ref-Chc_DZAb.js} +2 -2
  167. package/dist/{repeat-sY6B7fAT.cjs → repeat-CHDs__rN.cjs} +1 -1
  168. package/dist/{repeat-C02g7d5S.js → repeat-P9SMlKd5.js} +4 -4
  169. package/dist/searchinput-CPgMEAZZ.cjs +60 -0
  170. package/dist/{searchinput-DwnjsvJ1.js → searchinput-Da7dKHBH.js} +43 -43
  171. package/dist/{select-BOJi6H6T.cjs → select-DCuvdAuK.cjs} +4 -3
  172. package/dist/{select-DMre80qs.js → select-jabMSjft.js} +21 -20
  173. package/dist/shared-strings/consent.d.ts +71 -0
  174. package/dist/shared-strings/format.d.ts +21 -0
  175. package/dist/shared-strings/index.d.ts +14 -0
  176. package/dist/shared-strings/nb.d.ts +118 -0
  177. package/dist/shared-strings/resolve.d.ts +12 -0
  178. package/dist/shared-strings/store.d.ts +27 -0
  179. package/dist/shared-strings/types.d.ts +29 -0
  180. package/dist/shared-types/fileupload.d.ts +0 -27
  181. package/dist/shared-types/index.d.ts +1 -2
  182. package/dist/shared-utils/combobox/index.d.ts +1 -0
  183. package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
  184. package/dist/shared-utils/combobox/messages.d.ts +7 -0
  185. package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
  186. package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
  187. package/dist/{tabs-Cf9ai0FD.cjs → tabs-DV5CQNDL.cjs} +7 -7
  188. package/dist/{tabs-TvxgbrCF.js → tabs-D_hoi1zu.js} +32 -32
  189. package/dist/tag-BxYulmZn.cjs +27 -0
  190. package/dist/{tag-Ds6n1LIs.js → tag-DK5SgKry.js} +33 -32
  191. package/dist/tests/strings-override.test.d.ts +0 -0
  192. package/dist/{textarea-vfzIcXhX.js → textarea-BR7Riace.js} +30 -29
  193. package/dist/{textarea-BydiLM9Z.cjs → textarea-ffBD_VHq.cjs} +3 -2
  194. package/dist/{textinput-CMP2jPP_.js → textinput-CRNrsRNV.js} +28 -27
  195. package/dist/{textinput-DGdicNSx.cjs → textinput-CtHFzAux.cjs} +13 -12
  196. package/dist/timepicker-AfgJipo6.cjs +196 -0
  197. package/dist/{timepicker-ClwgYywH.js → timepicker-ixs_E5RY.js} +67 -64
  198. package/package.json +3 -3
  199. package/src/components/backlink/backlink.ts +1 -1
  200. package/src/components/breadcrumbs/breadcrumbs.ts +1 -1
  201. package/src/components/calendar/calendar.ts +56 -26
  202. package/src/components/checkbox/checkbox.test.ts +0 -2
  203. package/src/components/checkbox/checkbox.ts +8 -4
  204. package/src/components/combobox/combobox-base.ts +2 -1
  205. package/src/components/combobox/combobox-value.ts +10 -9
  206. package/src/components/combobox/combobox.selection.test.ts +5 -1
  207. package/src/components/combobox/combobox.ts +4 -1
  208. package/src/components/consent/strings.ts +1 -125
  209. package/src/components/datepicker/date-tags.ts +4 -1
  210. package/src/components/datepicker/datepicker-base.ts +2 -6
  211. package/src/components/datepicker/datepicker-multiple.ts +0 -3
  212. package/src/components/datepicker/datepicker-range.ts +4 -7
  213. package/src/components/datepicker/datepicker-single.ts +0 -3
  214. package/src/components/datepicker/datepicker-utils.test.ts +5 -5
  215. package/src/components/datepicker/datepicker-utils.ts +6 -11
  216. package/src/components/datepicker/datepicker.ts +8 -1
  217. package/src/components/fileupload/fileupload-base.ts +25 -16
  218. package/src/components/fileupload/fileupload-renderers.ts +2 -1
  219. package/src/components/fileupload/fileupload.test.ts +16 -0
  220. package/src/components/fileupload/fileupload.ts +19 -15
  221. package/src/components/header/header-global.ts +3 -3
  222. package/src/components/header/header-service.ts +13 -8
  223. package/src/components/header/header.ts +2 -1
  224. package/src/components/helptext/helptext.test.ts +1 -1
  225. package/src/components/helptext/helptext.ts +3 -3
  226. package/src/components/index.ts +9 -0
  227. package/src/components/input-wrapper/input-wrapper.ts +18 -10
  228. package/src/components/listbox/listbox.ts +3 -3
  229. package/src/components/radiobutton/radiobutton.ts +8 -4
  230. package/src/components/searchinput/searchinput.ts +5 -3
  231. package/src/components/select/select.ts +1 -0
  232. package/src/components/tag/tag.ts +2 -1
  233. package/src/components/textarea/textarea.ts +1 -0
  234. package/src/components/textinput/textinput.ts +1 -0
  235. package/src/components/timepicker/timepicker.ts +23 -21
  236. package/dist/element-BA8v6S7z.cjs +0 -2
  237. package/dist/fileupload-BeWiTAoW.cjs +0 -401
  238. package/dist/helptext-CTtKJcML.cjs +0 -27
  239. package/dist/if-defined-B89_ZeCj.cjs +0 -1
  240. package/dist/input-element-DYmQw-fH.cjs +0 -1
  241. package/dist/input-wrapper-BmxNvznr.js +0 -128
  242. package/dist/input-wrapper-D-fPaTbY.js +0 -176
  243. package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
  244. package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
  245. package/dist/linkcard-B29cmZqh.cjs +0 -13
  246. package/dist/searchinput-Bh975rjX.cjs +0 -60
  247. package/dist/tag-CzojNU7z.cjs +0 -27
  248. package/dist/timepicker-DYrnLHqN.cjs +0 -195
  249. package/dist/translations/no.json.d.ts +0 -94
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messagebox-Cv8LaSxv.cjs");exports.PktMessagebox=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messagebox-BD5tGmT-.cjs");exports.PktMessagebox=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./messagebox-Cw-OWDya.js";
1
+ import { n as e, t } from "./messagebox-C-y1ICmr.js";
2
2
  export { e as PktMessagebox, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./modal-BtInv031.cjs");exports.PktModal=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./modal-BzPGQYCs.cjs");exports.PktModal=e.n,exports.default=e.t;
package/dist/pkt-modal.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./modal-D0t_X2dX.js";
1
+ import { n as e, t } from "./modal-Cghs3w-d.js";
2
2
  export { e as PktModal, t as default };
@@ -1 +1 @@
1
- const e=require("./element-with-slot-Bj7nm7fO.cjs");var t=class{constructor(e){this.nodes=[],this.options=[],this.generation=0,this.host=e,this.host.addController(this),this.nodes=[],this.options=[],this.observer=new MutationObserver(e=>this.handleMutations(e))}hostConnected(){this.nodes=[],Array.from(this.host.childNodes).forEach(e=>{(e.nodeName===`OPTION`||e.nodeName===`DATA`)&&this.addNode(e)}),this.createOptions(),this.observer.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`disabled`,`selected`,`value`],attributeOldValue:!0,characterData:!0})}hostDisconnected(){this.observer.disconnect()}addNode(e){(e.nodeName===`OPTION`||e.nodeName===`DATA`)&&(e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-skip`)&&e.setAttribute(`data-hidden`,`true`),!e.hasAttribute(`hidden`)&&e.hasAttribute(`data-skip`)&&e.hasAttribute(`data-hidden`)&&e.removeAttribute(`data-hidden`),e.setAttribute(`class`,`pkt-hide`),e.setAttribute(`data-skip`,`true`),e.setAttribute(`hidden`,`true`),this.nodes.includes(e)||this.nodes.push(e))}createOptions(){this.options=this.nodes.map(e=>({value:e.hasAttribute(`value`)?e.getAttribute(`value`)??``:e.textContent??``,label:e.textContent||e.getAttribute(`value`)||``,selected:e.hasAttribute(`selected`),disabled:e.hasAttribute(`disabled`),hidden:e.hasAttribute(`data-hidden`)})),this.generation++,this.host.requestUpdate()}handleMutations(t){let n=!1;t.forEach(t=>{if(t.type===`childList`){if(t.target!==this.host){let r=t.target;e.r(r)&&r.parentNode===this.host&&(n=!0);return}t.addedNodes.forEach(t=>{e.r(t)&&(this.addNode(t),n=!0)}),t.removedNodes.forEach(t=>{e.r(t)&&(this.nodes=this.nodes.filter(e=>e!==t),n=!0)})}if(t.type===`attributes`){let r=t.target;if(!e.r(r)||r.parentNode!==this.host||t.attributeName&&r.getAttribute(t.attributeName)===t.oldValue)return;this.addNode(r),n=!0}if(t.type===`characterData`){let r=t.target.parentElement;r&&e.r(r)&&r.parentNode===this.host&&(n=!0)}}),n&&this.createOptions()}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
1
+ const e=require("./element-with-slot-DTxILHVv.cjs");var t=class{constructor(e){this.nodes=[],this.options=[],this.generation=0,this.host=e,this.host.addController(this),this.nodes=[],this.options=[],this.observer=new MutationObserver(e=>this.handleMutations(e))}hostConnected(){this.nodes=[],Array.from(this.host.childNodes).forEach(e=>{(e.nodeName===`OPTION`||e.nodeName===`DATA`)&&this.addNode(e)}),this.createOptions(),this.observer.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`disabled`,`selected`,`value`],attributeOldValue:!0,characterData:!0})}hostDisconnected(){this.observer.disconnect()}addNode(e){(e.nodeName===`OPTION`||e.nodeName===`DATA`)&&(e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-skip`)&&e.setAttribute(`data-hidden`,`true`),!e.hasAttribute(`hidden`)&&e.hasAttribute(`data-skip`)&&e.hasAttribute(`data-hidden`)&&e.removeAttribute(`data-hidden`),e.setAttribute(`class`,`pkt-hide`),e.setAttribute(`data-skip`,`true`),e.setAttribute(`hidden`,`true`),this.nodes.includes(e)||this.nodes.push(e))}createOptions(){this.options=this.nodes.map(e=>({value:e.hasAttribute(`value`)?e.getAttribute(`value`)??``:e.textContent??``,label:e.textContent||e.getAttribute(`value`)||``,selected:e.hasAttribute(`selected`),disabled:e.hasAttribute(`disabled`),hidden:e.hasAttribute(`data-hidden`)})),this.generation++,this.host.requestUpdate()}handleMutations(t){let n=!1;t.forEach(t=>{if(t.type===`childList`){if(t.target!==this.host){let r=t.target;e.r(r)&&r.parentNode===this.host&&(n=!0);return}t.addedNodes.forEach(t=>{e.r(t)&&(this.addNode(t),n=!0)}),t.removedNodes.forEach(t=>{e.r(t)&&(this.nodes=this.nodes.filter(e=>e!==t),n=!0)})}if(t.type===`attributes`){let r=t.target;if(!e.r(r)||r.parentNode!==this.host||t.attributeName&&r.getAttribute(t.attributeName)===t.oldValue)return;this.addNode(r),n=!0}if(t.type===`characterData`){let r=t.target.parentElement;r&&e.r(r)&&r.parentNode===this.host&&(n=!0)}}),n&&this.createOptions()}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
@@ -1,4 +1,4 @@
1
- import { r as e } from "./element-with-slot-BvG9ctC-.js";
1
+ import { r as e } from "./element-with-slot-YUAUFRqw.js";
2
2
  //#region src/controllers/pkt-options-controller.ts
3
3
  var t = class {
4
4
  constructor(e) {
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./progressbar-D5MmnQId.cjs");exports.PktProgressbar=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./progressbar-X9mSvpjw.cjs");exports.PktProgressbar=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./progressbar-CbcfLerF.js";
1
+ import { n as e, t } from "./progressbar-BexQQw1o.js";
2
2
  export { e as PktProgressbar, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-DpsO1F-8.cjs");exports.PktRadioButton=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-ln29Ad3U.cjs");exports.PktRadioButton=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./radiobutton-BUnf3EPi.js";
1
+ import { n as e, t } from "./radiobutton-CkhTasn4.js";
2
2
  export { e as PktRadioButton, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-Bh975rjX.cjs");exports.PktSearchInput=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-CPgMEAZZ.cjs");exports.PktSearchInput=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./searchinput-DwnjsvJ1.js";
1
+ import { n as e, t } from "./searchinput-Da7dKHBH.js";
2
2
  export { e as PktSearchInput, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-BOJi6H6T.cjs");exports.PktSelect=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-DCuvdAuK.cjs");exports.PktSelect=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./select-DMre80qs.js";
1
+ import { n as e, t } from "./select-jabMSjft.js";
2
2
  export { e as PktSelect, t as default };
package/dist/pkt-tabs.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-Cf9ai0FD.cjs");exports.PktTabItem=e.n,exports.PktTabs=e.r,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-DV5CQNDL.cjs");exports.PktTabItem=e.n,exports.PktTabs=e.r,exports.default=e.t;
package/dist/pkt-tabs.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./tabs-TvxgbrCF.js";
1
+ import { n as e, r as t, t as n } from "./tabs-D_hoi1zu.js";
2
2
  export { e as PktTabItem, t as PktTabs, n as default };
package/dist/pkt-tag.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-CzojNU7z.cjs");exports.PktTag=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-BxYulmZn.cjs");exports.PktTag=e.n,exports.default=e.t;
package/dist/pkt-tag.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./tag-Ds6n1LIs.js";
1
+ import { n as e, t } from "./tag-DK5SgKry.js";
2
2
  export { e as PktTag, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-BydiLM9Z.cjs");exports.PktTextarea=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-ffBD_VHq.cjs");exports.PktTextarea=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./textarea-vfzIcXhX.js";
1
+ import { n as e, t } from "./textarea-BR7Riace.js";
2
2
  export { e as PktTextarea, t as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-DGdicNSx.cjs");exports.PktTextinput=e.n,exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-CtHFzAux.cjs");exports.PktTextinput=e.n,exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./textinput-CMP2jPP_.js";
1
+ import { n as e, t } from "./textinput-CRNrsRNV.js";
2
2
  export { e as PktTextinput, t as default };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-DYrnLHqN.cjs");exports.PktTimepicker=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-AfgJipo6.cjs");exports.PktTimepicker=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "./timepicker-ClwgYywH.js";
1
+ import { t as e } from "./timepicker-ixs_E5RY.js";
2
2
  export { e as PktTimepicker };
@@ -1,12 +1,12 @@
1
- import { a as e, c as t, d as n, f as r, l as i, n as a, o, p as s, s as c, t as l, u } from "./element-ChsFgr_B.js";
2
- import { t as d } from "./class-map-CnWCnBSX.js";
3
- import "./icon-D-LA22xD.js";
4
- import { n as f, t as p } from "./ref-CWD6PjVd.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, t as l, u } from "./element-BKSPVgs2.js";
2
+ import { t as d } from "./class-map-F1DJHyb7.js";
3
+ import "./icon-HYU1f54x.js";
4
+ import { n as f, t as p } from "./ref-Chc_DZAb.js";
5
5
  import { n as m } from "./utils-BwF4QSrq.js";
6
6
  //#region ../../node_modules/lit-html/directives/style-map.js
7
- var h = "important", g = " !" + h, _ = t(class extends i {
7
+ var h = "important", g = " !" + h, _ = n(class extends c {
8
8
  constructor(e) {
9
- if (super(e), e.type !== u.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
9
+ if (super(e), e.type !== o.ATTRIBUTE || e.name !== "style" || e.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
10
10
  }
11
11
  render(e) {
12
12
  return Object.keys(e).reduce((t, n) => {
@@ -39,7 +39,7 @@ var h = "important", g = " !" + h, _ = t(class extends i {
39
39
  super.updated(e), e.has("valueCurrent") && this.labelRef.value && (this.labelWidth = this.labelRef.value.getBoundingClientRect().width || 0), e.has("id") && this.id && (this.progressBarId = this.id), (e.has("statusType") || e.has("id") || e.has("ariaLabelledby")) && (this.progressbarId = this.id || m(), this.computedAriaLabelledby = this.ariaLabelledby || `${this.progressbarId}-title`), (e.has("ariaValueText") || e.has("valueCurrent") || e.has("valueMax")) && (this.computedAriaValueText = this.statusType === "fraction" && !this.ariaValueText ? `${this.valueCurrent} av ${this.valueMax - this.valueMin}` : this.ariaValueText || ""), this.syncAttributes();
40
40
  }
41
41
  render() {
42
- let e = this.statusType !== "none", t = this.valueMax - this.valueMin, r = this.valueCurrent / t * 100, i = this.statusType === "fraction" ? Math.round(r) : Math.round((this.valueCurrent - this.valueMin) / (this.valueMax - this.valueMin) * 100), a = `${this.valueCurrent} av ${t}`, o = d({
42
+ let t = this.statusType !== "none", n = this.valueMax - this.valueMin, r = this.valueCurrent / n * 100, a = this.statusType === "fraction" ? Math.round(r) : Math.round((this.valueCurrent - this.valueMin) / (this.valueMax - this.valueMin) * 100), o = `${this.valueCurrent} av ${n}`, s = d({
43
43
  "pkt-progressbar__bar": !0,
44
44
  [`pkt-progressbar__bar--${this.skin}`]: !!this.skin
45
45
  }), c = d({
@@ -53,25 +53,25 @@ var h = "important", g = " !" + h, _ = t(class extends i {
53
53
  "pkt-progressbar__status-placement--center": this.statusPlacement === "center",
54
54
  "pkt-progressbar__status-placement--left": this.statusPlacement === "left"
55
55
  });
56
- return s` <div
56
+ return e` <div
57
57
  class="pkt-progressbar__container"
58
58
  .ref=${this.progressBarRef}
59
59
  style=${_({
60
60
  "--pkt-progress-label-width": `${this.labelWidth}px`,
61
- "--pkt-progress-width": `${i}%`
61
+ "--pkt-progress-width": `${a}%`
62
62
  })}
63
63
  >
64
- ${this.title ? s`<p id=${`${this.progressBarId}-title`} class=${c}>${this.title}</p>` : n}
64
+ ${this.title ? e`<p id=${`${this.progressBarId}-title`} class=${c}>${this.title}</p>` : i}
65
65
 
66
66
  <div class="pkt-progressbar__bar-wrapper">
67
- <div class=${o}></div>
67
+ <div class=${s}></div>
68
68
  </div>
69
69
 
70
- ${e ? s`<div class=${l}>
70
+ ${t ? e`<div class=${l}>
71
71
  <span class=${u} ${f(this.labelRef)}>
72
- ${this.statusType === "percentage" ? `${i}%` : a}
72
+ ${this.statusType === "percentage" ? `${a}%` : o}
73
73
  </span>
74
- </div>` : n}
74
+ </div>` : i}
75
75
  </div>`;
76
76
  }
77
77
  setComputedValues() {
@@ -84,24 +84,24 @@ var h = "important", g = " !" + h, _ = t(class extends i {
84
84
  t == null || t === "" ? this.removeAttribute(e) : this.setAttribute(e, String(t));
85
85
  }
86
86
  };
87
- a([o({ type: String })], v.prototype, "ariaLabel", void 0), a([o({
87
+ s([u({ type: String })], v.prototype, "ariaLabel", void 0), s([u({
88
88
  type: String,
89
89
  reflect: !0
90
- })], v.prototype, "ariaLabelledby", void 0), a([o({
90
+ })], v.prototype, "ariaLabelledby", void 0), s([u({
91
91
  type: String,
92
92
  reflect: !0
93
- })], v.prototype, "ariaValueText", void 0), a([o({ type: String })], v.prototype, "ariaLive", void 0), a([o({
93
+ })], v.prototype, "ariaValueText", void 0), s([u({ type: String })], v.prototype, "ariaLive", void 0), s([u({
94
94
  type: String,
95
95
  reflect: !0
96
- })], v.prototype, "id", void 0), a([o({ type: String })], v.prototype, "role", void 0), a([o({ type: String })], v.prototype, "skin", void 0), a([o({ type: String })], v.prototype, "statusPlacement", void 0), a([o({ type: String })], v.prototype, "statusType", void 0), a([o({
96
+ })], v.prototype, "id", void 0), s([u({ type: String })], v.prototype, "role", void 0), s([u({ type: String })], v.prototype, "skin", void 0), s([u({ type: String })], v.prototype, "statusPlacement", void 0), s([u({ type: String })], v.prototype, "statusType", void 0), s([u({
97
97
  type: String,
98
98
  reflect: !0
99
- })], v.prototype, "title", void 0), a([o({ type: String })], v.prototype, "titlePosition", void 0), a([o({
99
+ })], v.prototype, "title", void 0), s([u({ type: String })], v.prototype, "titlePosition", void 0), s([u({
100
100
  type: Number,
101
101
  reflect: !0
102
- })], v.prototype, "valueCurrent", void 0), a([o({ type: Number })], v.prototype, "valueMax", void 0), a([o({ type: Number })], v.prototype, "valueMin", void 0), a([e()], v.prototype, "labelWidth", void 0), a([e()], v.prototype, "progressbarId", void 0), a([e()], v.prototype, "computedAriaLabelledby", void 0), a([e()], v.prototype, "computedAriaValueText", void 0);
102
+ })], v.prototype, "valueCurrent", void 0), s([u({ type: Number })], v.prototype, "valueMax", void 0), s([u({ type: Number })], v.prototype, "valueMin", void 0), s([a()], v.prototype, "labelWidth", void 0), s([a()], v.prototype, "progressbarId", void 0), s([a()], v.prototype, "computedAriaLabelledby", void 0), s([a()], v.prototype, "computedAriaValueText", void 0);
103
103
  try {
104
- c("pkt-progressbar")(v);
104
+ t("pkt-progressbar")(v);
105
105
  } catch {
106
106
  console.warn("Forsøker å definere <pkt-progressbar>, men den er allerede definert");
107
107
  }
@@ -1,17 +1,17 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs");require("./icon-9iwd2F2l.cjs");const n=require("./ref-CQoEIIp0.cjs"),r=require("./utils-63cRpWut.cjs");var i=`important`,a=` !`+i,o=e.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.ATTRIBUTE||t.name!==`style`||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`},``)}update(t,[n]){let{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(let e of this.ft)n[e]??(this.ft.delete(e),e.includes(`-`)?r.removeProperty(e):r[e]=null);for(let e in n){let t=n[e];if(t!=null){this.ft.add(e);let n=typeof t==`string`&&t.endsWith(a);e.includes(`-`)||n?r.setProperty(e,n?t.slice(0,-11):t,n?i:``):r[e]=t}}return e.f}}),s=class extends e.t{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive=`polite`,this.id=r.n(),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=n.t(),this.progressBarRef=n.t()}firstUpdated(e){super.firstUpdated(e),this.setComputedValues(),this.syncAttributes()}updated(e){super.updated(e),e.has(`valueCurrent`)&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),e.has(`id`)&&this.id&&(this.progressBarId=this.id),(e.has(`statusType`)||e.has(`id`)||e.has(`ariaLabelledby`))&&(this.progressbarId=this.id||r.n(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(e.has(`ariaValueText`)||e.has(`valueCurrent`)||e.has(`valueMax`))&&(this.computedAriaValueText=this.statusType===`fraction`&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||``),this.syncAttributes()}render(){let r=this.statusType!==`none`,i=this.valueMax-this.valueMin,a=this.valueCurrent/i*100,s=this.statusType===`fraction`?Math.round(a):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),c=`${this.valueCurrent} av ${i}`,l=t.t({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),u=t.t({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition===`center`}),d=t.t({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement===`center`}),f=t.t({"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.p` <div
1
+ const e=require("./element-B8OGznK0.cjs"),t=require("./class-map-CzCE5pqG.cjs");require("./icon-BmMC09mi.cjs");const n=require("./ref-CHbJYtKE.cjs"),r=require("./utils-63cRpWut.cjs");var i=`important`,a=` !`+i,o=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.ATTRIBUTE||t.name!==`style`||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`},``)}update(t,[n]){let{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(let e of this.ft)n[e]??(this.ft.delete(e),e.includes(`-`)?r.removeProperty(e):r[e]=null);for(let e in n){let t=n[e];if(t!=null){this.ft.add(e);let n=typeof t==`string`&&t.endsWith(a);e.includes(`-`)||n?r.setProperty(e,n?t.slice(0,-11):t,n?i:``):r[e]=t}}return e.g}}),s=class extends e.t{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive=`polite`,this.id=r.n(),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=n.t(),this.progressBarRef=n.t()}firstUpdated(e){super.firstUpdated(e),this.setComputedValues(),this.syncAttributes()}updated(e){super.updated(e),e.has(`valueCurrent`)&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0),e.has(`id`)&&this.id&&(this.progressBarId=this.id),(e.has(`statusType`)||e.has(`id`)||e.has(`ariaLabelledby`))&&(this.progressbarId=this.id||r.n(),this.computedAriaLabelledby=this.ariaLabelledby||`${this.progressbarId}-title`),(e.has(`ariaValueText`)||e.has(`valueCurrent`)||e.has(`valueMax`))&&(this.computedAriaValueText=this.statusType===`fraction`&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||``),this.syncAttributes()}render(){let r=this.statusType!==`none`,i=this.valueMax-this.valueMin,a=this.valueCurrent/i*100,s=this.statusType===`fraction`?Math.round(a):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),c=`${this.valueCurrent} av ${i}`,l=t.t({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),u=t.t({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition===`center`}),d=t.t({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement===`center`}),f=t.t({"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._` <div
2
2
  class="pkt-progressbar__container"
3
3
  .ref=${this.progressBarRef}
4
4
  style=${o({"--pkt-progress-label-width":`${this.labelWidth}px`,"--pkt-progress-width":`${s}%`})}
5
5
  >
6
- ${this.title?e.p`<p id=${`${this.progressBarId}-title`} class=${u}>${this.title}</p>`:e.d}
6
+ ${this.title?e._`<p id=${`${this.progressBarId}-title`} class=${u}>${this.title}</p>`:e.h}
7
7
 
8
8
  <div class="pkt-progressbar__bar-wrapper">
9
9
  <div class=${l}></div>
10
10
  </div>
11
11
 
12
- ${r?e.p`<div class=${d}>
12
+ ${r?e._`<div class=${d}>
13
13
  <span class=${f} ${n.n(this.labelRef)}>
14
14
  ${this.statusType===`percentage`?`${s}%`:c}
15
15
  </span>
16
- </div>`:e.d}
17
- </div>`}setComputedValues(){this.progressbarId=this.id||r.n(),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(e,t){t==null||t===``?this.removeAttribute(e):this.setAttribute(e,String(t))}};e.n([e.o({type:String})],s.prototype,`ariaLabel`,void 0),e.n([e.o({type:String,reflect:!0})],s.prototype,`ariaLabelledby`,void 0),e.n([e.o({type:String,reflect:!0})],s.prototype,`ariaValueText`,void 0),e.n([e.o({type:String})],s.prototype,`ariaLive`,void 0),e.n([e.o({type:String,reflect:!0})],s.prototype,`id`,void 0),e.n([e.o({type:String})],s.prototype,`role`,void 0),e.n([e.o({type:String})],s.prototype,`skin`,void 0),e.n([e.o({type:String})],s.prototype,`statusPlacement`,void 0),e.n([e.o({type:String})],s.prototype,`statusType`,void 0),e.n([e.o({type:String,reflect:!0})],s.prototype,`title`,void 0),e.n([e.o({type:String})],s.prototype,`titlePosition`,void 0),e.n([e.o({type:Number,reflect:!0})],s.prototype,`valueCurrent`,void 0),e.n([e.o({type:Number})],s.prototype,`valueMax`,void 0),e.n([e.o({type:Number})],s.prototype,`valueMin`,void 0),e.n([e.a()],s.prototype,`labelWidth`,void 0),e.n([e.a()],s.prototype,`progressbarId`,void 0),e.n([e.a()],s.prototype,`computedAriaLabelledby`,void 0),e.n([e.a()],s.prototype,`computedAriaValueText`,void 0);try{e.s(`pkt-progressbar`)(s)}catch{console.warn(`Forsøker å definere <pkt-progressbar>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
16
+ </div>`:e.h}
17
+ </div>`}setComputedValues(){this.progressbarId=this.id||r.n(),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(e,t){t==null||t===``?this.removeAttribute(e):this.setAttribute(e,String(t))}};e.n([e.u({type:String})],s.prototype,`ariaLabel`,void 0),e.n([e.u({type:String,reflect:!0})],s.prototype,`ariaLabelledby`,void 0),e.n([e.u({type:String,reflect:!0})],s.prototype,`ariaValueText`,void 0),e.n([e.u({type:String})],s.prototype,`ariaLive`,void 0),e.n([e.u({type:String,reflect:!0})],s.prototype,`id`,void 0),e.n([e.u({type:String})],s.prototype,`role`,void 0),e.n([e.u({type:String})],s.prototype,`skin`,void 0),e.n([e.u({type:String})],s.prototype,`statusPlacement`,void 0),e.n([e.u({type:String})],s.prototype,`statusType`,void 0),e.n([e.u({type:String,reflect:!0})],s.prototype,`title`,void 0),e.n([e.u({type:String})],s.prototype,`titlePosition`,void 0),e.n([e.u({type:Number,reflect:!0})],s.prototype,`valueCurrent`,void 0),e.n([e.u({type:Number})],s.prototype,`valueMax`,void 0),e.n([e.u({type:Number})],s.prototype,`valueMin`,void 0),e.n([e.l()],s.prototype,`labelWidth`,void 0),e.n([e.l()],s.prototype,`progressbarId`,void 0),e.n([e.l()],s.prototype,`computedAriaLabelledby`,void 0),e.n([e.l()],s.prototype,`computedAriaValueText`,void 0);try{e.d(`pkt-progressbar`)(s)}catch{console.warn(`Forsøker å definere <pkt-progressbar>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,11 +1,11 @@
1
- import { a as e, d as t, n, o as r, p as i, s as a } from "./element-ChsFgr_B.js";
2
- import { t as o } from "./class-map-CnWCnBSX.js";
3
- import { n as s, t as c } from "./ref-CWD6PjVd.js";
4
- import { t as l } from "./input-element-DBMNBplu.js";
1
+ import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-BKSPVgs2.js";
2
+ import { t as o } from "./class-map-F1DJHyb7.js";
3
+ import { n as s, t as c } from "./ref-Chc_DZAb.js";
4
+ import { t as l } from "./input-element-D07DmR34.js";
5
5
  //#region src/components/radiobutton/radiobutton.ts
6
6
  var u = class extends l {
7
7
  constructor(...e) {
8
- super(...e), this.inputRef = c(), 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;
8
+ super(...e), this.inputRef = c(), this.value = "", this.checkHelptext = null, this.defaultChecked = !1, this.hasTile = !1, this.checked = null, this.type = "radio", this.tagText = null, this.optionalTag = !1, this.requiredTag = !1, this._checked = !1;
9
9
  }
10
10
  connectedCallback() {
11
11
  super.connectedCallback();
@@ -14,24 +14,24 @@ var u = class extends l {
14
14
  e === "defaultChecked" && (this._checked = this.defaultChecked), e === "checked" && (this._checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(e, t, n);
15
15
  }
16
16
  render() {
17
- let e = o({
17
+ let t = o({
18
18
  "pkt-input-check__input": !0,
19
19
  "pkt-input-check__input--tile": this.hasTile,
20
20
  "pkt-input-check__input--tile-disabled": this.disabled && this.hasTile
21
- }), n = o({
21
+ }), r = o({
22
22
  "pkt-input-check__input-checkbox": !0,
23
23
  "pkt-input-check__input-checkbox--error": this.hasError
24
- }), r = o({
24
+ }), i = o({
25
25
  "pkt-input-check__input-label": !0,
26
26
  "pkt-input-check__input-label--disabled": this.disabled,
27
27
  "pkt-sr-only": this.hideLabel
28
- }), a = "pkt-tag pkt-tag--small pkt-tag--thin-text";
29
- return i`
28
+ }), a = "pkt-tag pkt-tag--small pkt-tag--thin-text", c = this.pktStrings.get("forms");
29
+ return e`
30
30
  <div class="pkt-input-check">
31
- <div class=${e}>
31
+ <div class=${t}>
32
32
  <input
33
33
  id=${this.id + "-internal"}
34
- class=${n}
34
+ class=${r}
35
35
  type="radio"
36
36
  role="radio"
37
37
  ?disabled=${this.disabled}
@@ -44,14 +44,14 @@ var u = class extends l {
44
44
  @focus=${this.onFocus}
45
45
  ?checked=${this.checked}
46
46
  />
47
- ${i`
48
- <label class=${r} for=${this.id + "-internal"}>
49
- ${this.label} ${i`
50
- ${this.tagText ? i`<span class=${a + " pkt-tag--gray"}>${this.tagText}</span>` : t}
51
- ${this.optionalTag ? i`<span class=${a + " pkt-tag--blue-light"}>${this.optionalText}</span>` : t}
52
- ${this.requiredTag ? i`<span class=${a + " pkt-tag--beige"}>${this.requiredText}</span>` : t}
47
+ ${e`
48
+ <label class=${i} for=${this.id + "-internal"}>
49
+ ${this.label} ${e`
50
+ ${this.tagText ? e`<span class=${a + " pkt-tag--gray"}>${this.tagText}</span>` : n}
51
+ ${this.optionalTag ? e`<span class=${a + " pkt-tag--blue-light"}>${this.optionalText ?? c.optional}</span>` : n}
52
+ ${this.requiredTag ? e`<span class=${a + " pkt-tag--beige"}>${this.requiredText ?? c.required}</span>` : n}
53
53
  `}
54
- ${this.checkHelptext ? i`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>` : t}
54
+ ${this.checkHelptext ? e`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>` : n}
55
55
  </label>
56
56
  `}
57
57
  </div>
@@ -65,18 +65,18 @@ var u = class extends l {
65
65
  e && e.preventDefault(), e && e.stopImmediatePropagation(), this.touched = !0, this.inputRef.value && (this._checked = this.inputRef.value.matches(":checked"), this.valueChecked(this._checked));
66
66
  }
67
67
  };
68
- n([r({
68
+ i([a({
69
69
  type: String,
70
70
  reflect: !0
71
- })], u.prototype, "value", void 0), n([r({ type: String })], u.prototype, "checkHelptext", void 0), n([r({ type: Boolean })], u.prototype, "defaultChecked", void 0), n([r({ type: Boolean })], u.prototype, "hasTile", void 0), n([r({
71
+ })], u.prototype, "value", void 0), i([a({ type: String })], u.prototype, "checkHelptext", void 0), i([a({ type: Boolean })], u.prototype, "defaultChecked", void 0), i([a({ type: Boolean })], u.prototype, "hasTile", void 0), i([a({
72
72
  type: Boolean,
73
73
  reflect: !0
74
- })], u.prototype, "checked", void 0), n([r({
74
+ })], u.prototype, "checked", void 0), i([a({
75
75
  type: String,
76
76
  reflect: !0
77
- })], u.prototype, "type", void 0), n([r({ type: String })], u.prototype, "tagText", void 0), n([r({ type: Boolean })], u.prototype, "optionalTag", void 0), n([r({ type: String })], u.prototype, "optionalText", void 0), n([r({ type: Boolean })], u.prototype, "requiredTag", void 0), n([r({ type: String })], u.prototype, "requiredText", void 0), n([e()], u.prototype, "_checked", void 0);
77
+ })], u.prototype, "type", void 0), i([a({ type: String })], u.prototype, "tagText", void 0), i([a({ type: Boolean })], u.prototype, "optionalTag", void 0), i([a({ type: String })], u.prototype, "optionalText", void 0), i([a({ type: Boolean })], u.prototype, "requiredTag", void 0), i([a({ type: String })], u.prototype, "requiredText", void 0), i([r()], u.prototype, "_checked", void 0);
78
78
  try {
79
- a("pkt-radiobutton")(u);
79
+ t("pkt-radiobutton")(u);
80
80
  } catch {
81
81
  console.warn("Forsøker å definere <pkt-radiobutton>, men den er allerede definert");
82
82
  }
@@ -1,4 +1,4 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./ref-CQoEIIp0.cjs"),r=require("./input-element-DYmQw-fH.cjs");var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),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,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`;return e.p`
1
+ const e=require("./element-B8OGznK0.cjs"),t=require("./class-map-CzCE5pqG.cjs"),n=require("./ref-CHbJYtKE.cjs"),r=require("./input-element-DumGj_oJ.cjs");var i=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type=`radio`,this.tagText=null,this.optionalTag=!1,this.requiredTag=!1,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&(this._checked=this.defaultChecked),e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`,s=this.pktStrings.get(`forms`);return e._`
2
2
  <div class="pkt-input-check">
3
3
  <div class=${r}>
4
4
  <input
@@ -16,16 +16,16 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
16
16
  @focus=${this.onFocus}
17
17
  ?checked=${this.checked}
18
18
  />
19
- ${e.p`
19
+ ${e._`
20
20
  <label class=${a} for=${this.id+`-internal`}>
21
- ${this.label} ${e.p`
22
- ${this.tagText?e.p`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.d}
23
- ${this.optionalTag?e.p`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText}</span>`:e.d}
24
- ${this.requiredTag?e.p`<span class=${o+` pkt-tag--beige`}>${this.requiredText}</span>`:e.d}
21
+ ${this.label} ${e._`
22
+ ${this.tagText?e._`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.h}
23
+ ${this.optionalTag?e._`<span class=${o+` pkt-tag--blue-light`}>${this.optionalText??s.optional}</span>`:e.h}
24
+ ${this.requiredTag?e._`<span class=${o+` pkt-tag--beige`}>${this.requiredText??s.required}</span>`:e.h}
25
25
  `}
26
- ${this.checkHelptext?e.p`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.d}
26
+ ${this.checkHelptext?e._`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.h}
27
27
  </label>
28
28
  `}
29
29
  </div>
30
30
  </div>
31
- `}handleInput(e){e.stopImmediatePropagation(),this.onInput()}toggleChecked(e=null){e&&e.preventDefault(),e&&e.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(`:checked`),this.valueChecked(this._checked))}};e.n([e.o({type:String,reflect:!0})],i.prototype,`value`,void 0),e.n([e.o({type:String})],i.prototype,`checkHelptext`,void 0),e.n([e.o({type:Boolean})],i.prototype,`defaultChecked`,void 0),e.n([e.o({type:Boolean})],i.prototype,`hasTile`,void 0),e.n([e.o({type:Boolean,reflect:!0})],i.prototype,`checked`,void 0),e.n([e.o({type:String,reflect:!0})],i.prototype,`type`,void 0),e.n([e.o({type:String})],i.prototype,`tagText`,void 0),e.n([e.o({type:Boolean})],i.prototype,`optionalTag`,void 0),e.n([e.o({type:String})],i.prototype,`optionalText`,void 0),e.n([e.o({type:Boolean})],i.prototype,`requiredTag`,void 0),e.n([e.o({type:String})],i.prototype,`requiredText`,void 0),e.n([e.a()],i.prototype,`_checked`,void 0);try{e.s(`pkt-radiobutton`)(i)}catch{console.warn(`Forsøker å definere <pkt-radiobutton>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
31
+ `}handleInput(e){e.stopImmediatePropagation(),this.onInput()}toggleChecked(e=null){e&&e.preventDefault(),e&&e.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(`:checked`),this.valueChecked(this._checked))}};e.n([e.u({type:String,reflect:!0})],i.prototype,`value`,void 0),e.n([e.u({type:String})],i.prototype,`checkHelptext`,void 0),e.n([e.u({type:Boolean})],i.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],i.prototype,`hasTile`,void 0),e.n([e.u({type:Boolean,reflect:!0})],i.prototype,`checked`,void 0),e.n([e.u({type:String,reflect:!0})],i.prototype,`type`,void 0),e.n([e.u({type:String})],i.prototype,`tagText`,void 0),e.n([e.u({type:Boolean})],i.prototype,`optionalTag`,void 0),e.n([e.u({type:String})],i.prototype,`optionalText`,void 0),e.n([e.u({type:Boolean})],i.prototype,`requiredTag`,void 0),e.n([e.u({type:String})],i.prototype,`requiredText`,void 0),e.n([e.l()],i.prototype,`_checked`,void 0);try{e.d(`pkt-radiobutton`)(i)}catch{console.warn(`Forsøker å definere <pkt-radiobutton>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
@@ -1 +1 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./async-directive-Da7TJpnq.cjs");var n=()=>new r,r=class{},i=new WeakMap,a=e.c(class extends t.t{render(t){return e.d}update(t,[n]){let r=n!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.d}rt(e){if(this.G!==void 0){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=i.get(t);n===void 0&&(n=new WeakMap,i.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}}get lt(){return typeof this.G==`function`?i.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
1
+ const e=require("./element-B8OGznK0.cjs"),t=require("./async-directive-B5pcIMfO.cjs");var n=()=>new r,r=class{},i=new WeakMap,a=e.f(class extends t.t{render(t){return e.h}update(t,[n]){let r=n!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.h}rt(e){if(this.G!==void 0){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=i.get(t);n===void 0&&(n=new WeakMap,i.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}}get lt(){return typeof this.G==`function`?i.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
@@ -1,5 +1,5 @@
1
- import { c as e, d as t } from "./element-ChsFgr_B.js";
2
- import { t as n } from "./async-directive-BPf6K-V2.js";
1
+ import { f as e, h as t } from "./element-BKSPVgs2.js";
2
+ import { t as n } from "./async-directive-D2Sht790.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-BA8v6S7z.cjs"),t=require("./directive-helpers-BlAV5EQD.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.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.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.f}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
1
+ const e=require("./element-B8OGznK0.cjs"),t=require("./directive-helpers-D6AAMFKs.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,13 +1,13 @@
1
- import { c as e, f as t, l as n, u as r } from "./element-ChsFgr_B.js";
2
- import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-CI8YZqku.js";
1
+ import { f as e, g as t, m as n, p as r } from "./element-BKSPVgs2.js";
2
+ import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-BARw3nEZ.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();
6
6
  for (let i = t; i <= n; i++) r.set(e[i], i);
7
7
  return r;
8
- }, u = e(class extends n {
8
+ }, u = e(class extends r {
9
9
  constructor(e) {
10
- if (super(e), e.type !== r.CHILD) throw Error("repeat() can only be used in text expressions");
10
+ if (super(e), e.type !== n.CHILD) throw Error("repeat() can only be used in text expressions");
11
11
  }
12
12
  dt(e, t, n) {
13
13
  let r;
@@ -0,0 +1,60 @@
1
+ const e=require("./element-B8OGznK0.cjs"),t=require("./class-map-CzCE5pqG.cjs");require("./icon-BmMC09mi.cjs");const n=require("./if-defined-CVYApOgK.cjs"),r=require("./focus-modality-controller-C1ocyv2J.cjs");var i=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=``,this.value=``,this.focusModality=new r.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
+ ${t.title?e._`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.h}
3
+ ${t.text?e._`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.h}
4
+ `;return t.href?e._`<a
5
+ href=${t.href}
6
+ class="pkt-searchinput__suggestion"
7
+ @click=${e=>this.onSuggestionClick(e,t,n)}
8
+ >
9
+ ${r}
10
+ </a>`:t.nonInteractive?e._`<div class="pkt-searchinput__suggestion">${r}</div>`:e._`<button
11
+ type="button"
12
+ class="pkt-searchinput__suggestion"
13
+ @click=${e=>this.onSuggestionClick(e,t,n)}
14
+ >
15
+ ${r}
16
+ </button>`}render(){let r=this.pktStrings.get(`searchinput`),i=t.t({"pkt-searchinput":!0,[`pkt-searchinput--${this.appearance}`]:!0,[`pkt-searchinput--${this.inputSize}`]:!0,"pkt-searchinput--fullwidth":this.fullwidth}),a=t.t({"pkt-searchinput__button":!0,"pkt-input-icon":this.appearance===`local`,"pkt-btn":!0,[`pkt-btn--${this.inputSize}`]:!0,"pkt-btn--icon-only":!0,"pkt-btn--tertiary":this.appearance===`local`,"pkt-btn--primary":this.appearance===`global`||this.appearance===`local-with-button`,"pkt-btn--yellow":this.appearance===`global`}),o=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth}),s=this.appearance===`local`?`pkt-input__container pkt-input__container--${this.inputSize}`:`pkt-searchinput__field`,c=e._`
17
+ ${this.label?e._`<label for=${n.t(this.id||void 0)} class="pkt-inputwrapper__label"
18
+ >${this.label}</label
19
+ >`:e.h}
20
+ <div class=${s}>
21
+ <input
22
+ class=${o}
23
+ type="search"
24
+ name=${this.name||this.id}
25
+ id=${this.id}
26
+ placeholder=${this.placeholder||r.placeholder}
27
+ .value=${this.value}
28
+ ?disabled=${this.disabled}
29
+ autocomplete="off"
30
+ aria-label=${n.t(this.inputAriaLabel)}
31
+ aria-autocomplete=${this.suggestions?`list`:e.h}
32
+ aria-controls=${this.suggestions?this.suggestionsId:e.h}
33
+ @input=${this.onInput}
34
+ @keydown=${this.onInputKeydown}
35
+ />
36
+ <button
37
+ type="submit"
38
+ class=${a}
39
+ ?disabled=${this.disabled}
40
+ @click=${this.onSearchClick}
41
+ >
42
+ <pkt-icon class="pkt-btn__icon" name="magnifying-glass-big"></pkt-icon>
43
+ <span class="pkt-btn__text">${this.label||this.placeholder||r.placeholder}</span>
44
+ </button>
45
+ </div>
46
+ ${this.suggestions?e._`<ul
47
+ id=${this.suggestionsId}
48
+ class="pkt-searchinput__suggestions"
49
+ aria-live="assertive"
50
+ >
51
+ ${this.suggestions.map((t,n)=>e._` <li>${this.renderSuggestion(t,n)}</li> `)}
52
+ </ul>`:e.h}
53
+ `;return this.action?e._`<form
54
+ role="search"
55
+ class=${i}
56
+ action=${this.action}
57
+ method=${n.t(this.method)}
58
+ >
59
+ ${c}
60
+ </form>`:e._`<div role="search" class=${i}>${c}</div>`}};e.n([e.u({type:String})],i.prototype,`appearance`,void 0),e.n([e.u({type:String,attribute:`input-size`})],i.prototype,`inputSize`,void 0),e.n([e.u({type:Boolean,reflect:!0})],i.prototype,`disabled`,void 0),e.n([e.u({type:Boolean,reflect:!0})],i.prototype,`fullwidth`,void 0),e.n([e.u({type:String,reflect:!0})],i.prototype,`id`,void 0),e.n([e.u({type:String})],i.prototype,`label`,void 0),e.n([e.u({type:String})],i.prototype,`name`,void 0),e.n([e.u({type:String})],i.prototype,`placeholder`,void 0),e.n([e.u({type:String})],i.prototype,`value`,void 0),e.n([e.u({type:Array})],i.prototype,`suggestions`,void 0),e.n([e.u({type:String})],i.prototype,`action`,void 0),e.n([e.u({type:String})],i.prototype,`method`,void 0),e.n([e.l()],i.prototype,`inputAriaLabel`,void 0);try{e.d(`pkt-searchinput`)(i)}catch{console.warn(`Forsøker å definere <pkt-searchinput>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});