@oslokommune/punkt-elements 16.7.1 → 16.7.4

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 (286) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/accordion-BB1JrONI.cjs +34 -0
  3. package/dist/accordion-nNH87Y60.js +130 -0
  4. package/dist/alert-BEEnTiCb.cjs +33 -0
  5. package/dist/alert-ePJuDtmm.js +171 -0
  6. package/dist/async-directive-B9P1Qa0k.cjs +1 -0
  7. package/dist/async-directive-CaQiqjyV.js +55 -0
  8. package/dist/backlink-Ba03LlbB.cjs +13 -0
  9. package/dist/backlink-CiwXrQYD.js +38 -0
  10. package/dist/booleanish-BmcOU-43.js +11 -0
  11. package/dist/booleanish-jJLlnr6-.cjs +1 -0
  12. package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
  13. package/dist/breadcrumbs-CpuVqWhF.js +76 -0
  14. package/dist/button-BIpd1xJh.js +95 -0
  15. package/dist/button-D-TOBaJB.cjs +27 -0
  16. package/dist/calendar-BzEtOJla.js +2031 -0
  17. package/dist/calendar-E5jJLt8D.cjs +90 -0
  18. package/dist/card-BYJu1MYm.js +339 -0
  19. package/dist/card-CUFhMVim.cjs +87 -0
  20. package/dist/checkbox-BARDb9iV.cjs +31 -0
  21. package/dist/checkbox-Cspxcvt_.js +111 -0
  22. package/dist/class-map-C8HuhNzZ.js +27 -0
  23. package/dist/class-map-CJ-msbHs.cjs +1 -0
  24. package/dist/classutils-DEL164Ur.js +7 -0
  25. package/dist/classutils-z8YsPlOf.cjs +1 -0
  26. package/dist/combobox-BcdLZRDU.js +984 -0
  27. package/dist/combobox-CGbFTWq_.cjs +135 -0
  28. package/dist/consent-DeB_5sWH.js +197 -0
  29. package/dist/consent-hwu7pp3S.cjs +11 -0
  30. package/dist/datepicker-DpmlsnH_.cjs +273 -0
  31. package/dist/datepicker-OVd8pmnZ.js +1125 -0
  32. package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
  33. package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
  34. package/dist/directive-3THFsVew.js +28 -0
  35. package/dist/directive-CJ2giQBZ.cjs +1 -0
  36. package/dist/directive-helpers-D1QSxY17.cjs +1 -0
  37. package/dist/directive-helpers-Dkv2gKgs.js +25 -0
  38. package/dist/element-DjtxO-1r.cjs +2 -0
  39. package/dist/element-cZ85T_aa.js +693 -0
  40. package/dist/element-with-slot-4J2o3SeU.js +166 -0
  41. package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
  42. package/dist/header-DWgPgGfS.cjs +304 -0
  43. package/dist/header-a6ztVNp3.js +782 -0
  44. package/dist/heading-BgSWIRii.cjs +1 -0
  45. package/dist/heading-DiQLPxdf.js +73 -0
  46. package/dist/helptext-CCBKKLus.js +65 -0
  47. package/dist/helptext-D-3QfZv5.cjs +24 -0
  48. package/dist/icon-Co72KtgF.js +86 -0
  49. package/dist/icon-Dr8sfT2X.cjs +1 -0
  50. package/dist/if-defined-Cjj8qN-Z.js +5 -0
  51. package/dist/if-defined-XKOD_t_V.cjs +1 -0
  52. package/dist/index.d.ts +1 -2
  53. package/dist/input-element-B1yxcfz4.cjs +1 -0
  54. package/dist/input-element-Bw1s6NlF.js +643 -0
  55. package/dist/input-wrapper-BRuVELpK.cjs +54 -0
  56. package/dist/input-wrapper-CDyHTR1V.js +164 -0
  57. package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
  58. package/dist/input-wrapper-YfTmpSSY.js +117 -0
  59. package/dist/link-CKAFMz9j.js +89 -0
  60. package/dist/link-CyTCpI0k.cjs +7 -0
  61. package/dist/linkcard-B0KOGaGj.js +55 -0
  62. package/dist/linkcard-BE4-FewK.cjs +13 -0
  63. package/dist/listbox-DCA2JoPV.cjs +106 -0
  64. package/dist/listbox-DuBgTFvH.js +397 -0
  65. package/dist/loader-6kFZUErT.js +66 -0
  66. package/dist/loader-CX2rsC01.cjs +16 -0
  67. package/dist/messagebox-Cwlg5sOr.js +110 -0
  68. package/dist/messagebox-Din9X53b.cjs +13 -0
  69. package/dist/modal-C_wtsh9m.js +209 -0
  70. package/dist/modal-DS_wUOIv.cjs +36 -0
  71. package/dist/pkt-accordion.cjs +1 -1
  72. package/dist/pkt-accordion.js +2 -7
  73. package/dist/pkt-alert.cjs +1 -1
  74. package/dist/pkt-alert.js +2 -6
  75. package/dist/pkt-backlink.cjs +1 -1
  76. package/dist/pkt-backlink.js +2 -6
  77. package/dist/pkt-breadcrumbs.cjs +1 -43
  78. package/dist/pkt-breadcrumbs.js +2 -79
  79. package/dist/pkt-button.cjs +1 -1
  80. package/dist/pkt-button.js +2 -6
  81. package/dist/pkt-calendar.cjs +1 -1
  82. package/dist/pkt-calendar.js +2 -6
  83. package/dist/pkt-card.cjs +1 -1
  84. package/dist/pkt-card.js +2 -6
  85. package/dist/pkt-checkbox.cjs +1 -1
  86. package/dist/pkt-checkbox.js +2 -6
  87. package/dist/pkt-combobox.cjs +1 -1
  88. package/dist/pkt-combobox.js +2 -6
  89. package/dist/pkt-consent.cjs +1 -1
  90. package/dist/pkt-consent.js +2 -6
  91. package/dist/pkt-datepicker.cjs +1 -1
  92. package/dist/pkt-datepicker.js +5 -10
  93. package/dist/pkt-header.cjs +1 -304
  94. package/dist/pkt-header.js +2 -855
  95. package/dist/pkt-heading.cjs +1 -1
  96. package/dist/pkt-heading.js +2 -6
  97. package/dist/pkt-helptext.cjs +1 -1
  98. package/dist/pkt-helptext.js +2 -6
  99. package/dist/pkt-icon.cjs +1 -1
  100. package/dist/pkt-icon.js +2 -6
  101. package/dist/pkt-index.cjs +1 -1
  102. package/dist/pkt-index.js +30 -66
  103. package/dist/pkt-input-wrapper.cjs +1 -1
  104. package/dist/pkt-input-wrapper.js +2 -6
  105. package/dist/pkt-link.cjs +1 -1
  106. package/dist/pkt-link.js +2 -6
  107. package/dist/pkt-linkcard.cjs +1 -1
  108. package/dist/pkt-linkcard.js +2 -6
  109. package/dist/pkt-listbox.cjs +1 -1
  110. package/dist/pkt-listbox.js +2 -6
  111. package/dist/pkt-loader.cjs +1 -1
  112. package/dist/pkt-loader.js +2 -6
  113. package/dist/pkt-messagebox.cjs +1 -1
  114. package/dist/pkt-messagebox.js +2 -6
  115. package/dist/pkt-modal.cjs +1 -1
  116. package/dist/pkt-modal.js +2 -6
  117. package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
  118. package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
  119. package/dist/pkt-progressbar.cjs +1 -1
  120. package/dist/pkt-progressbar.js +2 -6
  121. package/dist/pkt-radiobutton.cjs +1 -1
  122. package/dist/pkt-radiobutton.js +2 -6
  123. package/dist/pkt-select.cjs +1 -1
  124. package/dist/pkt-select.js +2 -6
  125. package/dist/pkt-tabs.cjs +1 -1
  126. package/dist/pkt-tabs.js +2 -7
  127. package/dist/pkt-tag.cjs +1 -1
  128. package/dist/pkt-tag.js +2 -6
  129. package/dist/pkt-textarea.cjs +1 -1
  130. package/dist/pkt-textarea.js +2 -6
  131. package/dist/pkt-textinput.cjs +1 -1
  132. package/dist/pkt-textinput.js +2 -6
  133. package/dist/pkt-timepicker.cjs +1 -191
  134. package/dist/pkt-timepicker.js +2 -558
  135. package/dist/progressbar-CdXtmOBb.cjs +17 -0
  136. package/dist/progressbar-Dy9AiYQz.js +113 -0
  137. package/dist/radiobutton-GOnpUbCW.cjs +31 -0
  138. package/dist/radiobutton-V_KPbup_.js +84 -0
  139. package/dist/ref-BaJ0mBT_.cjs +1 -0
  140. package/dist/ref-RS8Uv6uC.js +30 -0
  141. package/dist/repeat-Cepr3469.js +57 -0
  142. package/dist/repeat-CqcDYBxr.cjs +1 -0
  143. package/dist/select-BSAFd8Wa.js +164 -0
  144. package/dist/select-C2i8sOk5.cjs +49 -0
  145. package/dist/tabs-D8nL9rWx.cjs +37 -0
  146. package/dist/tabs-Y7utmJi9.js +318 -0
  147. package/dist/tag-DLthw5b4.cjs +27 -0
  148. package/dist/tag-VwykmuQR.js +179 -0
  149. package/dist/textarea-D7aGOyDf.cjs +46 -0
  150. package/dist/textarea-DYOBhJrN.js +115 -0
  151. package/dist/textinput-BUgntXnM.js +124 -0
  152. package/dist/textinput-DFh8_9cx.cjs +70 -0
  153. package/dist/timepicker-BIfE7KKJ.cjs +191 -0
  154. package/dist/timepicker-DaSwn1FA.js +503 -0
  155. package/dist/utils-CUqCKGvp.js +7 -0
  156. package/dist/utils-CjAbIttF.cjs +1 -0
  157. package/package.json +6 -6
  158. package/src/components/accordion/accordion.ts +6 -1
  159. package/src/components/accordion/accordionitem.ts +6 -1
  160. package/src/components/alert/alert.test.ts +1 -1
  161. package/src/components/alert/alert.ts +12 -7
  162. package/src/components/backlink/backlink.ts +6 -1
  163. package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
  164. package/src/components/button/button.ts +6 -1
  165. package/src/components/calendar/calendar.ts +6 -1
  166. package/src/components/card/card.ts +6 -1
  167. package/src/components/checkbox/checkbox.ts +6 -1
  168. package/src/components/combobox/combobox.ts +6 -1
  169. package/src/components/consent/consent.ts +6 -1
  170. package/src/components/datepicker/date-tags.ts +6 -1
  171. package/src/components/datepicker/datepicker-multiple.ts +6 -1
  172. package/src/components/datepicker/datepicker-popup.ts +6 -1
  173. package/src/components/datepicker/datepicker-range.ts +6 -1
  174. package/src/components/datepicker/datepicker-single.ts +6 -1
  175. package/src/components/datepicker/datepicker-utils.test.ts +16 -23
  176. package/src/components/datepicker/datepicker.ts +6 -1
  177. package/src/components/header/header-service.ts +6 -1
  178. package/src/components/header/header-user-menu.ts +6 -1
  179. package/src/components/header/header.ts +6 -1
  180. package/src/components/heading/heading.ts +6 -1
  181. package/src/components/helptext/helptext.ts +6 -1
  182. package/src/components/icon/icon.ts +6 -1
  183. package/src/components/input-wrapper/input-wrapper.ts +6 -1
  184. package/src/components/link/link.ts +6 -1
  185. package/src/components/linkcard/linkcard.ts +6 -1
  186. package/src/components/listbox/listbox.ts +6 -1
  187. package/src/components/loader/loader.ts +6 -1
  188. package/src/components/messagebox/messagebox.ts +6 -1
  189. package/src/components/modal/modal.ts +6 -1
  190. package/src/components/progressbar/progressbar.ts +6 -1
  191. package/src/components/radiobutton/radiobutton.ts +6 -1
  192. package/src/components/select/select.ts +6 -1
  193. package/src/components/tabs/tabitem.ts +6 -1
  194. package/src/components/tabs/tabs.ts +6 -1
  195. package/src/components/tag/tag.ts +6 -1
  196. package/src/components/textarea/textarea.ts +6 -1
  197. package/src/components/textinput/textinput.ts +6 -1
  198. package/src/components/timepicker/timepicker.ts +6 -1
  199. package/dist/accordionitem-D1Agl1bB.cjs +0 -34
  200. package/dist/accordionitem-ZlaXvjt5.js +0 -138
  201. package/dist/alert-BuAXrnKl.js +0 -115
  202. package/dist/alert-DFkFNTxh.cjs +0 -33
  203. package/dist/async-directive-CMzWMlZ5.js +0 -65
  204. package/dist/async-directive-DoMuclel.cjs +0 -5
  205. package/dist/backlink-EiAXUUZP.cjs +0 -13
  206. package/dist/backlink-V4DAt17e.js +0 -47
  207. package/dist/booleanish-BKVonob4.cjs +0 -1
  208. package/dist/booleanish-C9R0tdXH.js +0 -11
  209. package/dist/button-DEyvt1LI.js +0 -137
  210. package/dist/button-DYv5Dg4M.cjs +0 -27
  211. package/dist/calendar-HIE9nxcc.cjs +0 -90
  212. package/dist/calendar-S63oreVW.js +0 -2138
  213. package/dist/card-CyeH6l1c.cjs +0 -87
  214. package/dist/card-DDiLfuO4.js +0 -231
  215. package/dist/checkbox-BLlwTABj.cjs +0 -31
  216. package/dist/checkbox-ejBUa5qQ.js +0 -145
  217. package/dist/class-map-CEnykyO_.js +0 -34
  218. package/dist/class-map-CsENJXf1.cjs +0 -5
  219. package/dist/classutils-BwNK82ZQ.cjs +0 -1
  220. package/dist/classutils-RQs1k6D9.js +0 -7
  221. package/dist/combobox-BmxSecfE.js +0 -818
  222. package/dist/combobox-Hb2V-fPX.cjs +0 -135
  223. package/dist/consent-iXyx5v6J.js +0 -173
  224. package/dist/consent-ruWAEVXW.cjs +0 -11
  225. package/dist/datepicker-CZl7b8Na.js +0 -1158
  226. package/dist/datepicker-D2H7U6MS.cjs +0 -273
  227. package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
  228. package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
  229. package/dist/directive-C7oCP5Bh.cjs +0 -5
  230. package/dist/directive-helpers-BP2WOx60.cjs +0 -5
  231. package/dist/directive-helpers-rm-28gIj.js +0 -38
  232. package/dist/directive-oAbCiebi.js +0 -27
  233. package/dist/element-CPpT3rFQ.js +0 -638
  234. package/dist/element-gR_VtSiD.cjs +0 -27
  235. package/dist/element-with-slot-Dqk6-TRR.js +0 -240
  236. package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
  237. package/dist/heading-CKt7cVn7.js +0 -101
  238. package/dist/heading-Cvz8m1xL.cjs +0 -1
  239. package/dist/helptext-5Mzp65-F.cjs +0 -24
  240. package/dist/helptext-jIoWRcCF.js +0 -80
  241. package/dist/icon-BlKA8YuW.js +0 -103
  242. package/dist/icon-Bqj9oBbl.cjs +0 -9
  243. package/dist/if-defined-B0krMLad.js +0 -10
  244. package/dist/if-defined-BOW3ODSj.cjs +0 -5
  245. package/dist/input-element-8nLwuQS4.js +0 -837
  246. package/dist/input-element-DdVhUvva.cjs +0 -1
  247. package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
  248. package/dist/input-wrapper-B2JpK016.js +0 -179
  249. package/dist/input-wrapper-CDgenrYA.js +0 -6
  250. package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
  251. package/dist/link-R_lNhViF.cjs +0 -7
  252. package/dist/link-Z_GizclR.js +0 -53
  253. package/dist/linkcard-BlQvdB1a.js +0 -54
  254. package/dist/linkcard-C7HbSLlX.cjs +0 -13
  255. package/dist/listbox-BQKDZvZn.js +0 -438
  256. package/dist/listbox-CGgV9MAe.cjs +0 -106
  257. package/dist/loader-Ci3CHU8k.js +0 -93
  258. package/dist/loader-e2gs_1xz.cjs +0 -16
  259. package/dist/messagebox-Bf-XMlvW.js +0 -69
  260. package/dist/messagebox-D67w71VX.cjs +0 -13
  261. package/dist/modal-CyvEkbfQ.cjs +0 -36
  262. package/dist/modal-DzGe1g8Z.js +0 -154
  263. package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
  264. package/dist/pkt-options-controller-B5YalfCb.js +0 -39
  265. package/dist/progressbar-By7e0lEI.js +0 -162
  266. package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
  267. package/dist/radiobutton-6frNG9J_.js +0 -111
  268. package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
  269. package/dist/ref-Bg_Swj5w.js +0 -42
  270. package/dist/ref-CL-Xk9Xm.cjs +0 -5
  271. package/dist/repeat-BD8TKgJb.js +0 -61
  272. package/dist/repeat-Cfq8CDlf.cjs +0 -5
  273. package/dist/select-CXZt1nHS.js +0 -228
  274. package/dist/select-WFhS4Vfp.cjs +0 -49
  275. package/dist/state-C_1EOo3D.js +0 -12
  276. package/dist/state-Dg-53wQ8.cjs +0 -5
  277. package/dist/tabitem-CB8wkKmv.js +0 -332
  278. package/dist/tabitem-DZpspU4Q.cjs +0 -65
  279. package/dist/tag-BuCpqaks.js +0 -115
  280. package/dist/tag-X6xdjR0N.cjs +0 -27
  281. package/dist/textarea-Bzuymclz.js +0 -131
  282. package/dist/textarea-DoeHJ7HR.cjs +0 -50
  283. package/dist/textinput-9lHjs4ce.js +0 -150
  284. package/dist/textinput-BNsLd26i.cjs +0 -70
  285. package/dist/utils-DznhwRXm.js +0 -8
  286. package/dist/utils-byXsEz1u.cjs +0 -1
@@ -1,27 +0,0 @@
1
- "use strict";/**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const C=globalThis,J=r=>r,T=C.trustedTypes,W=T?T.createPolicy("lit-html",{createHTML:r=>r}):void 0,rt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,nt="?"+f,pt=`<${nt}>`,y=document,x=()=>y.createComment(""),U=r=>r===null||typeof r!="object"&&typeof r!="function",I=Array.isArray,ut=r=>I(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",D=`[
6
- \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,K=/>/g,m=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
7
- \f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,ot=/^(?:script|style|textarea|title)$/i,$t=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),ft=$t(1),v=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),X=new WeakMap,g=y.createTreeWalker(y,129);function ht(r,t){if(!I(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return W!==void 0?W.createHTML(t):t}const _t=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=P;for(let a=0;a<e;a++){const h=r[a];let c,p,l=-1,u=0;for(;u<h.length&&(o.lastIndex=u,p=o.exec(h),p!==null);)u=o.lastIndex,o===P?p[1]==="!--"?o=Z:p[1]!==void 0?o=K:p[2]!==void 0?(ot.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=m):p[3]!==void 0&&(o=m):o===m?p[0]===">"?(o=i??P,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?m:p[3]==='"'?Q:G):o===Q||o===G?o=m:o===Z||o===K?o=P:(o=m,i=void 0);const $=o===m&&r[a+1].startsWith("/>")?" ":"";n+=o===P?h+pt:l>=0?(s.push(c),h.slice(0,l)+rt+h.slice(l)+f+$):h+f+(l===-2?a:$)}return[ht(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};let F=class at{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,h=this.parts,[c,p]=_t(t,e);if(this.el=at.createElement(c,s),g.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=g.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(rt)){const u=p[o++],$=i.getAttribute(l).split(f),O=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:O[2],strings:$,ctor:O[1]==="."?gt:O[1]==="?"?At:O[1]==="@"?yt:N}),i.removeAttribute(l)}else l.startsWith(f)&&(h.push({type:6,index:n}),i.removeAttribute(l));if(ot.test(i.tagName)){const l=i.textContent.split(f),u=l.length-1;if(u>0){i.textContent=T?T.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],x()),g.nextNode(),h.push({type:2,index:++n});i.append(l[u],x())}}}else if(i.nodeType===8)if(i.data===nt)h.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(f,l+1))!==-1;)h.push({type:7,index:n}),l+=f.length-1}n++}}static createElement(t,e){const s=y.createElement("template");return s.innerHTML=t,s}};function b(r,t,e=r,s){var o,a;if(t===v)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=U(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=b(r,i._$AS(r,t.values),i,s)),t}class mt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??y).importNode(e,!0);g.currentNode=i;let n=g.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new w(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new vt(n,this,t)),this._$AV.push(c),h=s[++a]}o!==(h==null?void 0:h.index)&&(n=g.nextNode(),o++)}return g.currentNode=y,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class w{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),U(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ut(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=F.createElement(ht(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new mt(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=X.get(t.strings);return e===void 0&&X.set(t.strings,e=new F(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new w(this.O(x()),this.O(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=J(t).nextSibling;J(t).remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=b(this,t,e,0),o=!U(t)||t!==this._$AH&&t!==v,o&&(this._$AH=t);else{const a=t;let h,c;for(t=n[0],h=0;h<n.length-1;h++)c=b(this,a[s+h],e,h),c===v&&(c=this._$AH[h]),o||(o=!U(c)||c!==this._$AH[h]),c===d?t=d:t!==d&&(t+=(c??"")+n[h+1]),this._$AH[h]=c}o&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class gt extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class At extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class yt extends N{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=b(this,t,e,0)??d)===v)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}const Et={I:w},j=C.litHtmlPolyfillSupport;j==null||j(F,w),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.3.2");const St=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new w(t.insertBefore(x(),n),n,void 0,e??{})}return i._$AI(r),i};/**
8
- * @license
9
- * Copyright 2017 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */const bt=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
12
- * @license
13
- * Copyright 2019 Google LLC
14
- * SPDX-License-Identifier: BSD-3-Clause
15
- */const k=globalThis,B=k.ShadowRoot&&(k.ShadyCSS===void 0||k.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol(),Y=new WeakMap;let wt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Y.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Y.set(e,t))}return t}toString(){return this.cssText}};const Pt=r=>new wt(typeof r=="string"?r:r+"",void 0,lt),Ct=(r,t)=>{if(B)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=k.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},tt=B?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Pt(e)})(r):r;/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */const{is:Mt,defineProperty:xt,getOwnPropertyDescriptor:Ut,getOwnPropertyNames:Ot,getOwnPropertySymbols:kt,getPrototypeOf:Tt}=Object,_=globalThis,et=_.trustedTypes,Ht=et?et.emptyScript:"",L=_.reactiveElementPolyfillSupport,M=(r,t)=>r,H={toAttribute(r,t){switch(t){case Boolean:r=r?Ht:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},q=(r,t)=>!Mt(r,t),st={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&xt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=Ut(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const t=Tt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const e=this.properties,s=[...Ot(e),...kt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(tt(i))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ct(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:H).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),h=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:H;this._$Em=i;const c=h.fromAttribute(e,a.type);this[i]=c??((o=this._$Ej)==null?void 0:o.get(i))??c,this._$Em=null}}requestUpdate(t,e,s,i=!1,n){var o;if(t!==void 0){const a=this.constructor;if(i===!1&&(n=this[t]),s??(s=a.getPropertyOptions(t)),!((s.hasChanged??q)(n,e)||s.useDefault&&s.reflect&&n===((o=this._$Ej)==null?void 0:o.get(t))&&!this.hasAttribute(a._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i){const{wrapped:a}=o,h=this[n];a!==!0||this._$AL.has(n)||h===void 0||this.C(n,void 0,o,h)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[M("elementProperties")]=new Map,E[M("finalized")]=new Map,L==null||L({ReactiveElement:E}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.1.2");/**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */const Nt={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:q},Rt=(r=Nt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,r,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,r,a),a}}}if(s==="setter"){const{name:o}=e;return function(a){const h=this[o];t.call(this,a),this.requestUpdate(o,h,r,!0,a)}}throw Error("Unsupported decorator location: "+s)};function V(r){return(t,e)=>typeof e=="object"?Rt(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */const A=globalThis;class S extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=St(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}}var it;S._$litElement$=!0,S.finalized=!0,(it=A.litElementHydrateSupport)==null||it.call(A,{LitElement:S});const z=A.litElementPolyfillSupport;z==null||z({LitElement:S});(A.litElementVersions??(A.litElementVersions=[])).push("4.2.2");const Dt={hi:"Hei!"},jt={from:"Fra",to:"Til"},Lt={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},zt={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Ft={hours:"Timer",minutes:"Minutter",openPicker:"Åpne tidspunkt-velger",prevTime:"Forrige tidspunkt",nextTime:"Neste tidspunkt",selectTime:"Velg tidspunkt"},It={search:{placeholder:"Søk…"},labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",stepMismatch:"Må treffe på steget som er definert i elementet",timeStepMismatch:"Må treffe på et steg, for eksempel 0, {step} minutter",timeStepMismatchHour:"Må treffe på hver hele time",timeStepMismatchHalfHour:"Må treffe på hver hele eller halve time",rangeUnderflowMin:"Verdien må være større enn eller lik {min}.",rangeOverflowMax:"Verdien må være mindre enn eller lik {max}.",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},helptext:{helptextDropdownButton:"Les mer"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},ct={example:Dt,generic:jt,calendar:Lt,dates:zt,timepicker:Ft,forms:It};var Bt=Object.defineProperty,dt=(r,t,e,s)=>{for(var i=void 0,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=o(t,e,i)||i);return i&&Bt(t,e,i),i};class R extends S{constructor(){super(...arguments),this.strings=ct,this.role=null}hotReplacedCallback(){this.requestUpdate()}}dt([V({type:Object})],R.prototype,"strings");dt([V({type:String})],R.prototype,"role");class qt extends R{createRenderRoot(){return this}}exports.A=d;exports.E=v;exports.PktElement=qt;exports.PktShadowElement=R;exports.b=ft;exports.i=S;exports.j=Et;exports.n=V;exports.strings=ct;exports.t=bt;
@@ -1,240 +0,0 @@
1
- import { E as l, P as C } from "./element-CPpT3rFQ.js";
2
- import { f as y } from "./async-directive-CMzWMlZ5.js";
3
- import { e as O, t as D } from "./directive-oAbCiebi.js";
4
- function T(s) {
5
- return s.classList && (s.classList.contains("_dialog_overlay") || s.classList.contains("backdrop")) ? !0 : typeof s.hasAttribute == "function" && s.hasAttribute("data-skip");
6
- }
7
- function E(s) {
8
- return s.nodeName === "OPTION" || s.nodeName === "DATA";
9
- }
10
- function b(s) {
11
- var e;
12
- return s.nodeType === Node.TEXT_NODE && ((e = s.nodeValue) == null ? void 0 : e.trim()) !== "";
13
- }
14
- const p = /* @__PURE__ */ new WeakMap();
15
- function f(s) {
16
- let e = p.get(s);
17
- return e || (e = new m(s), p.set(s, e)), e;
18
- }
19
- const N = Symbol("default");
20
- function g(s) {
21
- return s === void 0 ? N : s;
22
- }
23
- function v(s, e) {
24
- if (s.nodeType === Node.COMMENT_NODE) return !1;
25
- if (s.nodeType === Node.TEXT_NODE)
26
- return b(s) ? (u(e, N, s), !0) : !1;
27
- if (s.nodeType === Node.ELEMENT_NODE) {
28
- const t = s;
29
- if (T(t) || E(t)) return !1;
30
- if (t instanceof HTMLTemplateElement) {
31
- const h = Array.from(t.content.childNodes), a = g(t.getAttribute("slot") ?? void 0);
32
- for (const i of h)
33
- u(e, a, i);
34
- return !0;
35
- }
36
- const o = t.getAttribute("slot"), r = o !== null ? g(o) : N;
37
- return u(e, r, s), !0;
38
- }
39
- return !1;
40
- }
41
- function u(s, e, t) {
42
- let o = s.get(e);
43
- o || (o = [], s.set(e, o)), o.push(t);
44
- }
45
- const c = class c {
46
- constructor(e) {
47
- this.observer = null, this.nodesBySlot = /* @__PURE__ */ new Map(), this.directives = /* @__PURE__ */ new Set(), this.observing = !1, this.trackedNodes = /* @__PURE__ */ new Set(), this.generation = 0, this.initialCollectionDone = !1, this.processingMutations = !1, this.placeholderToNode = /* @__PURE__ */ new Map(), this.nodeToPlaceholder = /* @__PURE__ */ new Map(), this.host = e;
48
- }
49
- /**
50
- * Collect original children BEFORE Lit's first render.
51
- * Must be called in connectedCallback or earlier.
52
- * Safe to call multiple times — only the first call scans.
53
- */
54
- collectNodes() {
55
- if (this.initialCollectionDone) return;
56
- this.initialCollectionDone = !0, this.generation++;
57
- const e = Array.from(this.host.childNodes);
58
- for (const t of e)
59
- v(t, this.nodesBySlot) && this.trackedNodes.add(t);
60
- }
61
- /**
62
- * Register a directive instance and start observing for dynamic changes.
63
- */
64
- addDirective(e) {
65
- this.directives.add(e), this.startObserving();
66
- }
67
- /**
68
- * Unregister a directive instance. Stops observing if no directives remain.
69
- */
70
- removeDirective(e) {
71
- this.directives.delete(e), this.directives.size === 0 && this.stopObserving();
72
- }
73
- /**
74
- * Returns nodes matching the given slot name.
75
- */
76
- getNodes(e) {
77
- return this.nodesBySlot.get(g(e)) ?? [];
78
- }
79
- /**
80
- * Returns whether the given slot has any content.
81
- */
82
- hasContent(e) {
83
- return this.getNodes(e).length > 0;
84
- }
85
- /**
86
- * Ensure a placeholder comment exists for a node that is about to be distributed.
87
- * Called by the directive before Lit moves the node to the target position.
88
- * The placeholder stays between Lit's ChildPart markers so that when the parent
89
- * template conditionally removes the content, the MutationObserver can detect
90
- * the placeholder removal and clean up the real node.
91
- */
92
- ensurePlaceholder(e) {
93
- if (this.nodeToPlaceholder.has(e) || e.parentNode !== this.host) return;
94
- const t = document.createComment(c.PLACEHOLDER_PREFIX);
95
- this.host.insertBefore(t, e), this.placeholderToNode.set(t, e), this.nodeToPlaceholder.set(e, t);
96
- }
97
- // --- Private ---
98
- /**
99
- * Start MutationObserver for dynamic child changes.
100
- * Deferred via setTimeout to avoid catching Lit's first render mutations.
101
- */
102
- startObserving() {
103
- this.observing || (this.observing = !0, setTimeout(() => {
104
- this.observing && (this.observer = new MutationObserver((e) => {
105
- this.handleMutations(e);
106
- }), this.observer.observe(this.host, { childList: !0 }));
107
- }, 0));
108
- }
109
- stopObserving() {
110
- var e;
111
- this.observing && (this.observing = !1, (e = this.observer) == null || e.disconnect(), this.observer = null);
112
- }
113
- /**
114
- * Handle MutationObserver mutations incrementally.
115
- * Only processes nodes that are NOT already part of Lit's rendered template.
116
- *
117
- * Uses a guard flag to prevent recursive handling: when notifyDirectives()
118
- * causes setValue() to move nodes (e.g., from host into a ChildPart container),
119
- * that move triggers another mutation which must be ignored.
120
- */
121
- handleMutations(e) {
122
- var o, r, h;
123
- if (this.processingMutations) return;
124
- this.processingMutations = !0;
125
- let t = !1;
126
- for (const a of e)
127
- if (a.target === this.host) {
128
- for (const i of a.removedNodes) {
129
- const n = this.placeholderToNode.get(i);
130
- if (n) {
131
- (o = n.parentNode) == null || o.removeChild(n), this.trackedNodes.delete(n), this.removeFromSlots(n), this.placeholderToNode.delete(i), this.nodeToPlaceholder.delete(n), t = !0;
132
- continue;
133
- }
134
- if (this.trackedNodes.has(i)) {
135
- this.trackedNodes.delete(i), this.removeFromSlots(i);
136
- const d = this.nodeToPlaceholder.get(i);
137
- d && ((r = d.parentNode) == null || r.removeChild(d), this.placeholderToNode.delete(d), this.nodeToPlaceholder.delete(i)), t = !0;
138
- }
139
- }
140
- for (const i of a.addedNodes)
141
- this.placeholderToNode.has(i) || !this.trackedNodes.has(i) && this.isUserContent(i) && v(i, this.nodesBySlot) && (this.trackedNodes.add(i), t = !0);
142
- }
143
- t && (this.generation++, this.notifyDirectives()), (h = this.observer) == null || h.takeRecords(), this.processingMutations = !1;
144
- }
145
- /**
146
- * Determines if a node is user-provided content (not Lit's rendered template).
147
- * Lit's rendered content includes comment markers and elements created by the template.
148
- */
149
- isUserContent(e) {
150
- if (e.nodeType === Node.COMMENT_NODE) return !1;
151
- if (e.nodeType === Node.TEXT_NODE)
152
- return b(e);
153
- if (e.nodeType === Node.ELEMENT_NODE) {
154
- const t = e;
155
- return !(T(t) || E(t));
156
- }
157
- return !1;
158
- }
159
- removeFromSlots(e) {
160
- for (const [t, o] of this.nodesBySlot) {
161
- const r = o.indexOf(e);
162
- if (r !== -1) {
163
- o.splice(r, 1), o.length === 0 && this.nodesBySlot.delete(t);
164
- return;
165
- }
166
- }
167
- }
168
- notifyDirectives() {
169
- for (const e of this.directives)
170
- e.handleNodesChanged();
171
- }
172
- };
173
- c.PLACEHOLDER_PREFIX = "pkt-slot";
174
- let m = c;
175
- class P extends y {
176
- constructor(e) {
177
- if (super(e), this.manager = null, this.lastGeneration = -1, e.type !== D.CHILD)
178
- throw new Error("slotContent() can only be used in child expressions");
179
- }
180
- render(e, t) {
181
- return l;
182
- }
183
- update(e, [t, o]) {
184
- return this.slotName = o, this.manager || (this.manager = f(t), this.manager.collectNodes(), this.manager.addDirective(this)), this.ensurePlaceholders(), this.getNodesOrNoChange();
185
- }
186
- /**
187
- * Called by SlotManager when child mutations are detected.
188
- * Uses setValue() to push an async update to Lit.
189
- */
190
- handleNodesChanged() {
191
- if (!this.isConnected || !this.manager) return;
192
- this.ensurePlaceholders();
193
- const e = this.getNodesOrNoChange();
194
- e !== l && this.setValue(e);
195
- }
196
- /**
197
- * Insert placeholders for nodes that are still direct children of the host.
198
- * Must be called before Lit moves them to the target position.
199
- */
200
- ensurePlaceholders() {
201
- if (!this.manager) return;
202
- const e = this.manager.getNodes(this.slotName);
203
- for (const t of e)
204
- this.manager.ensurePlaceholder(t);
205
- }
206
- disconnected() {
207
- var e;
208
- (e = this.manager) == null || e.removeDirective(this), this.manager = null, this.lastGeneration = -1;
209
- }
210
- reconnected() {
211
- }
212
- getNodesOrNoChange() {
213
- if (!this.manager) return l;
214
- const e = this.manager.generation;
215
- return e === this.lastGeneration ? l : (this.lastGeneration = e, this.manager.getNodes(this.slotName));
216
- }
217
- }
218
- const L = O(P);
219
- class A extends C {
220
- /**
221
- * Pre-collect children before Lit's first render clears them.
222
- * This ensures slotContent() has access to the original children.
223
- */
224
- connectedCallback() {
225
- f(this).collectNodes(), super.connectedCallback();
226
- }
227
- /**
228
- * Checks if a slot has content distributed to it via the slotContent directive.
229
- *
230
- * @param slotName - Name of the slot. Omit for the default slot.
231
- */
232
- hasSlotContent(e) {
233
- return f(this).hasContent(e);
234
- }
235
- }
236
- export {
237
- A as P,
238
- E as i,
239
- L as s
240
- };
@@ -1 +0,0 @@
1
- "use strict";const h=require("./element-gR_VtSiD.cjs"),y=require("./async-directive-DoMuclel.cjs"),E=require("./directive-C7oCP5Bh.cjs");function C(s){return s.classList&&(s.classList.contains("_dialog_overlay")||s.classList.contains("backdrop"))?!0:typeof s.hasAttribute=="function"&&s.hasAttribute("data-skip")}function p(s){return s.nodeName==="OPTION"||s.nodeName==="DATA"}function b(s){var e;return s.nodeType===Node.TEXT_NODE&&((e=s.nodeValue)==null?void 0:e.trim())!==""}const v=new WeakMap;function f(s){let e=v.get(s);return e||(e=new m(s),v.set(s,e)),e}const N=Symbol("default");function g(s){return s===void 0?N:s}function T(s,e){if(s.nodeType===Node.COMMENT_NODE)return!1;if(s.nodeType===Node.TEXT_NODE)return b(s)?(u(e,N,s),!0):!1;if(s.nodeType===Node.ELEMENT_NODE){const t=s;if(C(t)||p(t))return!1;if(t instanceof HTMLTemplateElement){const l=Array.from(t.content.childNodes),a=g(t.getAttribute("slot")??void 0);for(const i of l)u(e,a,i);return!0}const o=t.getAttribute("slot"),n=o!==null?g(o):N;return u(e,n,s),!0}return!1}function u(s,e,t){let o=s.get(e);o||(o=[],s.set(e,o)),o.push(t)}const c=class c{constructor(e){this.observer=null,this.nodesBySlot=new Map,this.directives=new Set,this.observing=!1,this.trackedNodes=new Set,this.generation=0,this.initialCollectionDone=!1,this.processingMutations=!1,this.placeholderToNode=new Map,this.nodeToPlaceholder=new Map,this.host=e}collectNodes(){if(this.initialCollectionDone)return;this.initialCollectionDone=!0,this.generation++;const e=Array.from(this.host.childNodes);for(const t of e)T(t,this.nodesBySlot)&&this.trackedNodes.add(t)}addDirective(e){this.directives.add(e),this.startObserving()}removeDirective(e){this.directives.delete(e),this.directives.size===0&&this.stopObserving()}getNodes(e){return this.nodesBySlot.get(g(e))??[]}hasContent(e){return this.getNodes(e).length>0}ensurePlaceholder(e){if(this.nodeToPlaceholder.has(e)||e.parentNode!==this.host)return;const t=document.createComment(c.PLACEHOLDER_PREFIX);this.host.insertBefore(t,e),this.placeholderToNode.set(t,e),this.nodeToPlaceholder.set(e,t)}startObserving(){this.observing||(this.observing=!0,setTimeout(()=>{this.observing&&(this.observer=new MutationObserver(e=>{this.handleMutations(e)}),this.observer.observe(this.host,{childList:!0}))},0))}stopObserving(){var e;this.observing&&(this.observing=!1,(e=this.observer)==null||e.disconnect(),this.observer=null)}handleMutations(e){var o,n,l;if(this.processingMutations)return;this.processingMutations=!0;let t=!1;for(const a of e)if(a.target===this.host){for(const i of a.removedNodes){const r=this.placeholderToNode.get(i);if(r){(o=r.parentNode)==null||o.removeChild(r),this.trackedNodes.delete(r),this.removeFromSlots(r),this.placeholderToNode.delete(i),this.nodeToPlaceholder.delete(r),t=!0;continue}if(this.trackedNodes.has(i)){this.trackedNodes.delete(i),this.removeFromSlots(i);const d=this.nodeToPlaceholder.get(i);d&&((n=d.parentNode)==null||n.removeChild(d),this.placeholderToNode.delete(d),this.nodeToPlaceholder.delete(i)),t=!0}}for(const i of a.addedNodes)this.placeholderToNode.has(i)||!this.trackedNodes.has(i)&&this.isUserContent(i)&&T(i,this.nodesBySlot)&&(this.trackedNodes.add(i),t=!0)}t&&(this.generation++,this.notifyDirectives()),(l=this.observer)==null||l.takeRecords(),this.processingMutations=!1}isUserContent(e){if(e.nodeType===Node.COMMENT_NODE)return!1;if(e.nodeType===Node.TEXT_NODE)return b(e);if(e.nodeType===Node.ELEMENT_NODE){const t=e;return!(C(t)||p(t))}return!1}removeFromSlots(e){for(const[t,o]of this.nodesBySlot){const n=o.indexOf(e);if(n!==-1){o.splice(n,1),o.length===0&&this.nodesBySlot.delete(t);return}}}notifyDirectives(){for(const e of this.directives)e.handleNodesChanged()}};c.PLACEHOLDER_PREFIX="pkt-slot";let m=c;class O extends y.f{constructor(e){if(super(e),this.manager=null,this.lastGeneration=-1,e.type!==E.t.CHILD)throw new Error("slotContent() can only be used in child expressions")}render(e,t){return h.E}update(e,[t,o]){return this.slotName=o,this.manager||(this.manager=f(t),this.manager.collectNodes(),this.manager.addDirective(this)),this.ensurePlaceholders(),this.getNodesOrNoChange()}handleNodesChanged(){if(!this.isConnected||!this.manager)return;this.ensurePlaceholders();const e=this.getNodesOrNoChange();e!==h.E&&this.setValue(e)}ensurePlaceholders(){if(!this.manager)return;const e=this.manager.getNodes(this.slotName);for(const t of e)this.manager.ensurePlaceholder(t)}disconnected(){var e;(e=this.manager)==null||e.removeDirective(this),this.manager=null,this.lastGeneration=-1}reconnected(){}getNodesOrNoChange(){if(!this.manager)return h.E;const e=this.manager.generation;return e===this.lastGeneration?h.E:(this.lastGeneration=e,this.manager.getNodes(this.slotName))}}const D=E.e(O);class P extends h.PktElement{connectedCallback(){f(this).collectNodes(),super.connectedCallback()}hasSlotContent(e){return f(this).hasContent(e)}}exports.PktElementWithSlot=P;exports.isOptionElement=p;exports.slotContent=D;
@@ -1,101 +0,0 @@
1
- import { a as n, b as g, n as r, t as p } from "./element-CPpT3rFQ.js";
2
- var o = Object.defineProperty, c = Object.getOwnPropertyDescriptor, a = (e, l, t, h) => {
3
- for (var i = h > 1 ? void 0 : h ? c(l, t) : l, d = e.length - 1, u; d >= 0; d--)
4
- (u = e[d]) && (i = (h ? u(l, t, i) : u(i)) || i);
5
- return h && i && o(l, t, i), i;
6
- };
7
- let s = class extends n {
8
- constructor() {
9
- super(...arguments), this.size = void 0, this.level = 2, this.weight = void 0, this.visuallyHidden = !1, this.align = void 0;
10
- }
11
- connectedCallback() {
12
- super.connectedCallback(), this.setAttribute("role", "heading"), this.setAttribute("aria-level", String(this.level)), this.updateHostClasses();
13
- }
14
- attributeChangedCallback(e, l, t) {
15
- super.attributeChangedCallback(e, l, t), e === "level" && t && this.setLevel(Number(t)), e === "visuallyHidden" && (this.visuallyHidden = t !== null && t !== "false"), (e === "size" || e === "visuallyHidden" || e === "align" || e === "weight") && this.updateHostClasses();
16
- }
17
- updated(e) {
18
- super.updated(e), e.has("level") && (this.setLevel(this.level), this.hasAttribute("size") || (this.size = this.defaultSizeForLevel), this.hasAttribute("weight") || (this.weight = this.defaultWeightForLevel)), !this.hasAttribute("size") && (e.has("level") || this.size === void 0) && (this.size = this.defaultSizeForLevel), (e.has("size") || e.has("visuallyHidden") || e.has("align") || e.has("weight")) && this.updateHostClasses();
19
- }
20
- setLevel(e) {
21
- e >= 1 && e <= 6 ? (this.level = e, this.setAttribute("aria-level", String(e))) : console.warn(`Invalid heading level: ${e}. Must be between 1 and 6.`);
22
- }
23
- get defaultSizeForLevel() {
24
- switch (this.level) {
25
- case 1:
26
- return "xlarge";
27
- case 2:
28
- return "large";
29
- case 3:
30
- return "medium";
31
- case 4:
32
- return "small";
33
- case 5:
34
- return "xsmall";
35
- case 6:
36
- return "xsmall";
37
- default:
38
- return "medium";
39
- }
40
- }
41
- get defaultWeightForLevel() {
42
- switch (this.level) {
43
- case 1:
44
- return "regular";
45
- case 2:
46
- return "regular";
47
- case 3:
48
- return "medium";
49
- case 4:
50
- return "medium";
51
- case 5:
52
- return "medium";
53
- case 6:
54
- return "medium";
55
- default:
56
- return "medium";
57
- }
58
- }
59
- updateHostClasses() {
60
- this.classList.remove(
61
- "pkt-heading",
62
- "pkt-heading--xsmall",
63
- "pkt-heading--small",
64
- "pkt-heading--medium",
65
- "pkt-heading--large",
66
- "pkt-heading--xlarge",
67
- "pkt-sr-only",
68
- "pkt-heading--start",
69
- "pkt-heading--center",
70
- "pkt-heading--end",
71
- "pkt-heading--light",
72
- "pkt-heading--regular",
73
- "pkt-heading--medium",
74
- "pkt-heading--bold"
75
- ), this.classList.add("pkt-heading"), this.size && this.classList.add(`pkt-heading--${this.size}`), this.weight && this.classList.add(`pkt-heading--fw-${this.weight}`), this.visuallyHidden && this.classList.add("pkt-sr-only"), this.align && this.classList.add(`pkt-heading--${this.align}`);
76
- }
77
- render() {
78
- return g`<slot></slot>`;
79
- }
80
- };
81
- a([
82
- r({ type: String, reflect: !0 })
83
- ], s.prototype, "size", 2);
84
- a([
85
- r({ type: Number, reflect: !0 })
86
- ], s.prototype, "level", 2);
87
- a([
88
- r({ type: String, reflect: !0 })
89
- ], s.prototype, "weight", 2);
90
- a([
91
- r({ type: Boolean, reflect: !0 })
92
- ], s.prototype, "visuallyHidden", 2);
93
- a([
94
- r({ type: String, reflect: !0 })
95
- ], s.prototype, "align", 2);
96
- s = a([
97
- p("pkt-heading")
98
- ], s);
99
- export {
100
- s as P
101
- };
@@ -1 +0,0 @@
1
- "use strict";const i=require("./element-gR_VtSiD.cjs");var n=Object.defineProperty,u=Object.getOwnPropertyDescriptor,a=(r,e,l,t)=>{for(var s=t>1?void 0:t?u(e,l):e,d=r.length-1,h;d>=0;d--)(h=r[d])&&(s=(t?h(e,l,s):h(s))||s);return t&&s&&n(e,l,s),s};exports.PktHeading=class extends i.PktShadowElement{constructor(){super(...arguments),this.size=void 0,this.level=2,this.weight=void 0,this.visuallyHidden=!1,this.align=void 0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(e,l,t){super.attributeChangedCallback(e,l,t),e==="level"&&t&&this.setLevel(Number(t)),e==="visuallyHidden"&&(this.visuallyHidden=t!==null&&t!=="false"),(e==="size"||e==="visuallyHidden"||e==="align"||e==="weight")&&this.updateHostClasses()}updated(e){super.updated(e),e.has("level")&&(this.setLevel(this.level),this.hasAttribute("size")||(this.size=this.defaultSizeForLevel),this.hasAttribute("weight")||(this.weight=this.defaultWeightForLevel)),!this.hasAttribute("size")&&(e.has("level")||this.size===void 0)&&(this.size=this.defaultSizeForLevel),(e.has("size")||e.has("visuallyHidden")||e.has("align")||e.has("weight"))&&this.updateHostClasses()}setLevel(e){e>=1&&e<=6?(this.level=e,this.setAttribute("aria-level",String(e))):console.warn(`Invalid heading level: ${e}. Must be between 1 and 6.`)}get defaultSizeForLevel(){switch(this.level){case 1:return"xlarge";case 2:return"large";case 3:return"medium";case 4:return"small";case 5:return"xsmall";case 6:return"xsmall";default:return"medium"}}get defaultWeightForLevel(){switch(this.level){case 1:return"regular";case 2:return"regular";case 3:return"medium";case 4:return"medium";case 5:return"medium";case 6:return"medium";default:return"medium"}}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end","pkt-heading--light","pkt-heading--regular","pkt-heading--medium","pkt-heading--bold"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.weight&&this.classList.add(`pkt-heading--fw-${this.weight}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return i.b`<slot></slot>`}};a([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"size",2);a([i.n({type:Number,reflect:!0})],exports.PktHeading.prototype,"level",2);a([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"weight",2);a([i.n({type:Boolean,reflect:!0})],exports.PktHeading.prototype,"visuallyHidden",2);a([i.n({type:String,reflect:!0})],exports.PktHeading.prototype,"align",2);exports.PktHeading=a([i.t("pkt-heading")],exports.PktHeading);
@@ -1,24 +0,0 @@
1
- "use strict";const x=require("./element-with-slot-ZX-up7jO.cjs"),e=require("./element-gR_VtSiD.cjs"),h=require("./icon-Bqj9oBbl.cjs"),c=require("./class-map-CsENJXf1.cjs"),u=require("./state-Dg-53wQ8.cjs"),a=require("./utils-byXsEz1u.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs");var k=Object.defineProperty,_=Object.getOwnPropertyDescriptor,r=(o,p,l,n)=>{for(var t=n>1?void 0:n?_(p,l):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&k(p,l,t),t};exports.PktHelptext=class extends x.PktElementWithSlot{constructor(){super(...arguments),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},l=c.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.hasSlotContent()}),n=()=>this.helptextDropdown?e.b`<div class="pkt-inputwrapper__helptext-expandable">
2
- <button
3
- class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
4
- type="button"
5
- @click=${p}
6
- >
7
- <pkt-icon
8
- class="pkt-btn__icon"
9
- name="${this.isHelpTextOpen?"chevron-thin-up":"chevron-thin-down"}"
10
- ></pkt-icon>
11
- <span class="pkt-btn__text">${h.o(this.helptextDropdownButton)}</span>
12
- </button>
13
- <div
14
- class="${c.e({"pkt-inputwrapper__helptext":!0,"pkt-inputwrapper__helptext-expandable-open":this.isHelpTextOpen,"pkt-inputwrapper__helptext-expandable-closed":!this.isHelpTextOpen})}"
15
- >
16
- ${h.o(this.helptextDropdown)}
17
- </div>
18
- </div>`:e.A,t=()=>e.b`<div class="${l}">
19
- <div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
20
- <div class="pkt-contents" name="helptext">${x.slotContent(this)}</div>
21
- ${this.helptext&&h.o(this.helptext)}
22
- </div>
23
- ${n()}
24
- </div>`;return e.b`${t()}`}};r([e.n({type:String,reflect:!0})],exports.PktHelptext.prototype,"forId",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptext",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdown",2);r([e.n({type:String})],exports.PktHelptext.prototype,"helptextDropdownButton",2);r([u.r()],exports.PktHelptext.prototype,"isHelpTextOpen",2);exports.PktHelptext=r([e.t("pkt-helptext")],exports.PktHelptext);
@@ -1,80 +0,0 @@
1
- import { P as u, s as c } from "./element-with-slot-Dqk6-TRR.js";
2
- import { b as a, A as _, n as i, t as m } from "./element-CPpT3rFQ.js";
3
- import { o as x } from "./icon-BlKA8YuW.js";
4
- import { e as d } from "./class-map-CEnykyO_.js";
5
- import { r as w } from "./state-C_1EOo3D.js";
6
- import { u as v } from "./utils-DznhwRXm.js";
7
- import { s as f } from "./input-wrapper-CDgenrYA.js";
8
- var k = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (s, p, r, o) => {
9
- for (var t = o > 1 ? void 0 : o ? b(p, r) : p, l = s.length - 1, h; l >= 0; l--)
10
- (h = s[l]) && (t = (o ? h(p, r, t) : h(t)) || t);
11
- return o && t && k(p, r, t), t;
12
- };
13
- let e = class extends u {
14
- constructor() {
15
- super(...arguments), this.forId = v(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = f.props.helptextDropdownButton.default, this.isHelpTextOpen = !1;
16
- }
17
- render() {
18
- const s = () => {
19
- const t = !this.isHelpTextOpen;
20
- this.isHelpTextOpen = t, this.dispatchEvent(
21
- new CustomEvent("toggleHelpText", {
22
- bubbles: !0,
23
- detail: { isOpen: t }
24
- })
25
- );
26
- }, p = d({
27
- "pkt-inputwrapper__helptext-container": !0,
28
- "pkt-inputwrapper__has-helptext": this.helptext || this.helptextDropdown || this.hasSlotContent()
29
- }), r = () => this.helptextDropdown ? a`<div class="pkt-inputwrapper__helptext-expandable">
30
- <button
31
- class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
32
- type="button"
33
- @click=${s}
34
- >
35
- <pkt-icon
36
- class="pkt-btn__icon"
37
- name="${this.isHelpTextOpen ? "chevron-thin-up" : "chevron-thin-down"}"
38
- ></pkt-icon>
39
- <span class="pkt-btn__text">${x(this.helptextDropdownButton)}</span>
40
- </button>
41
- <div
42
- class="${d({
43
- "pkt-inputwrapper__helptext": !0,
44
- "pkt-inputwrapper__helptext-expandable-open": this.isHelpTextOpen,
45
- "pkt-inputwrapper__helptext-expandable-closed": !this.isHelpTextOpen
46
- })}"
47
- >
48
- ${x(this.helptextDropdown)}
49
- </div>
50
- </div>` : _;
51
- return a`${a`<div class="${p}">
52
- <div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
53
- <div class="pkt-contents" name="helptext">${c(this)}</div>
54
- ${this.helptext && x(this.helptext)}
55
- </div>
56
- ${r()}
57
- </div>`}`;
58
- }
59
- };
60
- n([
61
- i({ type: String, reflect: !0 })
62
- ], e.prototype, "forId", 2);
63
- n([
64
- i({ type: String })
65
- ], e.prototype, "helptext", 2);
66
- n([
67
- i({ type: String })
68
- ], e.prototype, "helptextDropdown", 2);
69
- n([
70
- i({ type: String })
71
- ], e.prototype, "helptextDropdownButton", 2);
72
- n([
73
- w()
74
- ], e.prototype, "isHelpTextOpen", 2);
75
- e = n([
76
- m("pkt-helptext")
77
- ], e);
78
- export {
79
- e as P
80
- };
@@ -1,103 +0,0 @@
1
- import { A as y, E as P, P as k, b as I, n as p, t as _ } from "./element-CPpT3rFQ.js";
2
- import { e as m, i as S, t as b } from "./directive-oAbCiebi.js";
3
- /**
4
- * @license
5
- * Copyright 2017 Google LLC
6
- * SPDX-License-Identifier: BSD-3-Clause
7
- */
8
- class h extends S {
9
- constructor(t) {
10
- if (super(t), this.it = y, t.type !== b.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
11
- }
12
- render(t) {
13
- if (t === y || t == null) return this._t = void 0, this.it = t;
14
- if (t === P) return t;
15
- if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
16
- if (t === this.it) return this._t;
17
- this.it = t;
18
- const n = [t];
19
- return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] };
20
- }
21
- }
22
- h.directiveName = "unsafeHTML", h.resultType = 1;
23
- const R = m(h);
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- class l extends h {
30
- }
31
- l.directiveName = "unsafeSVG", l.resultType = 2;
32
- const f = m(l);
33
- var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor, c = (e, t, n, s) => {
34
- for (var o = s > 1 ? void 0 : s ? E(t, n) : t, d = e.length - 1, u; d >= 0; d--)
35
- (u = e[d]) && (o = (s ? u(t, n, o) : u(o)) || o);
36
- return s && o && C(t, n, o), o;
37
- };
38
- const w = "https://punkt-cdn.oslo.kommune.no/latest/icons/";
39
- typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || w);
40
- const a = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', r = {}, T = 2, F = 1500, g = typeof Storage < "u" && typeof sessionStorage < "u", $ = (e) => window.pktFetch(e).then((t) => {
41
- if (!t.ok)
42
- throw new Error("Missing icon: " + e);
43
- return t.text();
44
- }), v = async (e, t = T) => {
45
- try {
46
- return await $(e);
47
- } catch {
48
- return t > 0 ? (await new Promise((s) => setTimeout(s, F)), v(e, t - 1)) : (console.error("Failed to fetch icon: " + e), a);
49
- }
50
- }, A = async (e, t) => {
51
- const n = t + e + ".svg";
52
- return g && sessionStorage.getItem(n) ? sessionStorage.getItem(n) : n in r ? r[n] : typeof window < "u" && typeof window.pktFetch == "function" ? (r[n] = v(n).then((s) => (s !== a && g && sessionStorage.setItem(n, s), delete r[n], s)), r[n]) : a;
53
- };
54
- let i = class extends k {
55
- constructor() {
56
- super(...arguments), this.path = typeof window < "u" ? window.pktIconPath : w, this.name = "", this.icon = f(a), this._updatedProps = [];
57
- }
58
- connectedCallback() {
59
- super.connectedCallback(), this.classList.add("pkt-icon");
60
- }
61
- async attributeChangedCallback(e, t, n) {
62
- super.attributeChangedCallback(e, t, n), (e === "name" || e === "path") && this.getIcon(this.name);
63
- }
64
- async updated(e) {
65
- super.updated(e), (e.has("name") || e.has("path")) && this.getIcon(this.name);
66
- }
67
- async getIcon(e = "") {
68
- if (this._updatedProps.length > 0) {
69
- this.path || (this.path = typeof window < "u" ? window.pktIconPath : w);
70
- try {
71
- this.icon = f(
72
- await A(this.name || "", this.path)
73
- );
74
- } catch {
75
- this.icon = f(a);
76
- }
77
- this._updatedProps = [];
78
- } else
79
- this._updatedProps.includes(e) || this._updatedProps.push(e);
80
- }
81
- render() {
82
- return I`${this.name && this.icon}`;
83
- }
84
- };
85
- c([
86
- p({ type: String, reflect: !1 })
87
- ], i.prototype, "path", 2);
88
- c([
89
- p({ type: String, reflect: !0 })
90
- ], i.prototype, "name", 2);
91
- c([
92
- p({ type: SVGElement })
93
- ], i.prototype, "icon", 2);
94
- c([
95
- p({ type: Array, noAccessor: !0 })
96
- ], i.prototype, "_updatedProps", 2);
97
- i = c([
98
- _("pkt-icon")
99
- ], i);
100
- export {
101
- i as P,
102
- R as o
103
- };
@@ -1,9 +0,0 @@
1
- "use strict";const s=require("./element-gR_VtSiD.cjs"),h=require("./directive-C7oCP5Bh.cjs");/**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */class p extends h.i{constructor(t){if(super(t),this.it=s.A,t.type!==h.t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s.A||t==null)return this._t=void 0,this.it=t;if(t===s.E)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}p.directiveName="unsafeHTML",p.resultType=1;const k=h.e(p);/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */class l extends p{}l.directiveName="unsafeSVG",l.resultType=2;const f=h.e(l);var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(n,t,e,o)=>{for(var i=o>1?void 0:o?P(t,e):t,d=n.length-1,u;d>=0;d--)(u=n[d])&&(i=(o?u(t,e,i):u(i))||i);return o&&i&&I(t,e,i),i};const w="https://punkt-cdn.oslo.kommune.no/latest/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||w);const c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',r={},m=2,v=1500,y=typeof Storage<"u"&&typeof sessionStorage<"u",_=n=>window.pktFetch(n).then(t=>{if(!t.ok)throw new Error("Missing icon: "+n);return t.text()}),g=async(n,t=m)=>{try{return await _(n)}catch{return t>0?(await new Promise(o=>setTimeout(o,v)),g(n,t-1)):(console.error("Failed to fetch icon: "+n),c)}},S=async(n,t)=>{const e=t+n+".svg";return y&&sessionStorage.getItem(e)?sessionStorage.getItem(e):e in r?r[e]:typeof window<"u"&&typeof window.pktFetch=="function"?(r[e]=g(e).then(o=>(o!==c&&y&&sessionStorage.setItem(e,o),delete r[e],o)),r[e]):c};exports.PktIcon=class extends s.PktElement{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:w,this.name="",this.icon=f(c),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,o){super.attributeChangedCallback(t,e,o),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){if(this._updatedProps.length>0){this.path||(this.path=typeof window<"u"?window.pktIconPath:w);try{this.icon=f(await S(this.name||"",this.path))}catch{this.icon=f(c)}this._updatedProps=[]}else this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return s.b`${this.name&&this.icon}`}};a([s.n({type:String,reflect:!1})],exports.PktIcon.prototype,"path",2);a([s.n({type:String,reflect:!0})],exports.PktIcon.prototype,"name",2);a([s.n({type:SVGElement})],exports.PktIcon.prototype,"icon",2);a([s.n({type:Array,noAccessor:!0})],exports.PktIcon.prototype,"_updatedProps",2);exports.PktIcon=a([s.t("pkt-icon")],exports.PktIcon);exports.o=k;