@oslokommune/punkt-react 12.42.10 → 12.42.11
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.
package/dist/punkt-react.es.js
CHANGED
|
@@ -38478,7 +38478,7 @@ const rH = [
|
|
|
38478
38478
|
{
|
|
38479
38479
|
id: "cross-circle-fill-large",
|
|
38480
38480
|
fn: "cross-circle-fill-large.svg",
|
|
38481
|
-
cat: "
|
|
38481
|
+
cat: "ui"
|
|
38482
38482
|
},
|
|
38483
38483
|
{
|
|
38484
38484
|
id: "cross-circle-fill",
|
|
@@ -39678,7 +39678,7 @@ const rH = [
|
|
|
39678
39678
|
{
|
|
39679
39679
|
id: "wheelchair",
|
|
39680
39680
|
fn: "wheelchair.svg",
|
|
39681
|
-
cat: "
|
|
39681
|
+
cat: "sign"
|
|
39682
39682
|
},
|
|
39683
39683
|
{
|
|
39684
39684
|
id: "wifi",
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1542,5 +1542,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1542
1542
|
* @public
|
|
1543
1543
|
*/var i=function(l){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,h=0,m={},D={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function V(q){return q instanceof C?new C(q.type,V(q.content),q.alias):Array.isArray(q)?q.map(V):q.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(V){return Object.prototype.toString.call(V).slice(8,-1)},objId:function(V){return V.__id||Object.defineProperty(V,"__id",{value:++h}),V.__id},clone:function V(q,Z){Z=Z||{};var K,ae;switch(D.util.type(q)){case"Object":if(ae=D.util.objId(q),Z[ae])return Z[ae];K={},Z[ae]=K;for(var pe in q)q.hasOwnProperty(pe)&&(K[pe]=V(q[pe],Z));return K;case"Array":return ae=D.util.objId(q),Z[ae]?Z[ae]:(K=[],Z[ae]=K,q.forEach(function(Te,ke){K[ke]=V(Te,Z)}),K);default:return q}},getLanguage:function(V){for(;V;){var q=c.exec(V.className);if(q)return q[1].toLowerCase();V=V.parentElement}return"none"},setLanguage:function(V,q){V.className=V.className.replace(RegExp(c,"gi"),""),V.classList.add("language-"+q)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(K){var V=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(K.stack)||[])[1];if(V){var q=document.getElementsByTagName("script");for(var Z in q)if(q[Z].src==V)return q[Z]}return null}},isActive:function(V,q,Z){for(var K="no-"+q;V;){var ae=V.classList;if(ae.contains(q))return!0;if(ae.contains(K))return!1;V=V.parentElement}return!!Z}},languages:{plain:m,plaintext:m,text:m,txt:m,extend:function(V,q){var Z=D.util.clone(D.languages[V]);for(var K in q)Z[K]=q[K];return Z},insertBefore:function(V,q,Z,K){K=K||D.languages;var ae=K[V],pe={};for(var Te in ae)if(ae.hasOwnProperty(Te)){if(Te==q)for(var ke in Z)Z.hasOwnProperty(ke)&&(pe[ke]=Z[ke]);Z.hasOwnProperty(Te)||(pe[Te]=ae[Te])}var Ge=K[V];return K[V]=pe,D.languages.DFS(D.languages,function(Ve,Ke){Ke===Ge&&Ve!=V&&(this[Ve]=pe)}),pe},DFS:function V(q,Z,K,ae){ae=ae||{};var pe=D.util.objId;for(var Te in q)if(q.hasOwnProperty(Te)){Z.call(q,Te,q[Te],K||Te);var ke=q[Te],Ge=D.util.type(ke);Ge==="Object"&&!ae[pe(ke)]?(ae[pe(ke)]=!0,V(ke,Z,null,ae)):Ge==="Array"&&!ae[pe(ke)]&&(ae[pe(ke)]=!0,V(ke,Z,Te,ae))}}},plugins:{},highlightAll:function(V,q){D.highlightAllUnder(document,V,q)},highlightAllUnder:function(V,q,Z){var K={callback:Z,container:V,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};D.hooks.run("before-highlightall",K),K.elements=Array.prototype.slice.apply(K.container.querySelectorAll(K.selector)),D.hooks.run("before-all-elements-highlight",K);for(var ae=0,pe;pe=K.elements[ae++];)D.highlightElement(pe,q===!0,K.callback)},highlightElement:function(V,q,Z){var K=D.util.getLanguage(V),ae=D.languages[K];D.util.setLanguage(V,K);var pe=V.parentElement;pe&&pe.nodeName.toLowerCase()==="pre"&&D.util.setLanguage(pe,K);var Te=V.textContent,ke={element:V,language:K,grammar:ae,code:Te};function Ge(Ke){ke.highlightedCode=Ke,D.hooks.run("before-insert",ke),ke.element.innerHTML=ke.highlightedCode,D.hooks.run("after-highlight",ke),D.hooks.run("complete",ke),Z&&Z.call(ke.element)}if(D.hooks.run("before-sanity-check",ke),pe=ke.element.parentElement,pe&&pe.nodeName.toLowerCase()==="pre"&&!pe.hasAttribute("tabindex")&&pe.setAttribute("tabindex","0"),!ke.code){D.hooks.run("complete",ke),Z&&Z.call(ke.element);return}if(D.hooks.run("before-highlight",ke),!ke.grammar){Ge(D.util.encode(ke.code));return}if(q&&l.Worker){var Ve=new Worker(D.filename);Ve.onmessage=function(Ke){Ge(Ke.data)},Ve.postMessage(JSON.stringify({language:ke.language,code:ke.code,immediateClose:!0}))}else Ge(D.highlight(ke.code,ke.grammar,ke.language))},highlight:function(V,q,Z){var K={code:V,grammar:q,language:Z};if(D.hooks.run("before-tokenize",K),!K.grammar)throw new Error('The language "'+K.language+'" has no grammar.');return K.tokens=D.tokenize(K.code,K.grammar),D.hooks.run("after-tokenize",K),C.stringify(D.util.encode(K.tokens),K.language)},tokenize:function(V,q){var Z=q.rest;if(Z){for(var K in Z)q[K]=Z[K];delete q.rest}var ae=new N;return O(ae,ae.head,V),$(V,ae,q,ae.head,0),j(ae)},hooks:{all:{},add:function(V,q){var Z=D.hooks.all;Z[V]=Z[V]||[],Z[V].push(q)},run:function(V,q){var Z=D.hooks.all[V];if(!(!Z||!Z.length))for(var K=0,ae;ae=Z[K++];)ae(q)}},Token:C};l.Prism=D;function C(V,q,Z,K){this.type=V,this.content=q,this.alias=Z,this.length=(K||"").length|0}C.stringify=function V(q,Z){if(typeof q=="string")return q;if(Array.isArray(q)){var K="";return q.forEach(function(Ge){K+=V(Ge,Z)}),K}var ae={type:q.type,content:V(q.content,Z),tag:"span",classes:["token",q.type],attributes:{},language:Z},pe=q.alias;pe&&(Array.isArray(pe)?Array.prototype.push.apply(ae.classes,pe):ae.classes.push(pe)),D.hooks.run("wrap",ae);var Te="";for(var ke in ae.attributes)Te+=" "+ke+'="'+(ae.attributes[ke]||"").replace(/"/g,""")+'"';return"<"+ae.tag+' class="'+ae.classes.join(" ")+'"'+Te+">"+ae.content+"</"+ae.tag+">"};function T(V,q,Z,K){V.lastIndex=q;var ae=V.exec(Z);if(ae&&K&&ae[1]){var pe=ae[1].length;ae.index+=pe,ae[0]=ae[0].slice(pe)}return ae}function $(V,q,Z,K,ae,pe){for(var Te in Z)if(!(!Z.hasOwnProperty(Te)||!Z[Te])){var ke=Z[Te];ke=Array.isArray(ke)?ke:[ke];for(var Ge=0;Ge<ke.length;++Ge){if(pe&&pe.cause==Te+","+Ge)return;var Ve=ke[Ge],Ke=Ve.inside,nt=!!Ve.lookbehind,He=!!Ve.greedy,dt=Ve.alias;if(He&&!Ve.pattern.global){var Me=Ve.pattern.toString().match(/[imsuy]*$/)[0];Ve.pattern=RegExp(Ve.pattern.source,Me+"g")}for(var Le=Ve.pattern||Ve,de=K.next,Re=ae;de!==q.tail&&!(pe&&Re>=pe.reach);Re+=de.value.length,de=de.next){var _e=de.value;if(q.length>V.length)return;if(!(_e instanceof C)){var X=1,he;if(He){if(he=T(Le,Re,V,nt),!he||he.index>=V.length)break;var ht=he.index,ot=he.index+he[0].length,rt=Re;for(rt+=de.value.length;ht>=rt;)de=de.next,rt+=de.value.length;if(rt-=de.value.length,Re=rt,de.value instanceof C)continue;for(var Dt=de;Dt!==q.tail&&(rt<ot||typeof Dt.value=="string");Dt=Dt.next)X++,rt+=Dt.value.length;X--,_e=V.slice(Re,rt),he.index-=Re}else if(he=T(Le,0,_e,nt),!he)continue;var ht=he.index,bt=he[0],vt=_e.slice(0,ht),Lt=_e.slice(ht+bt.length),fn=Re+_e.length;pe&&fn>pe.reach&&(pe.reach=fn);var tn=de.prev;vt&&(tn=O(q,tn,vt),Re+=vt.length),R(q,tn,X);var Qn=new C(Te,Ke?D.tokenize(bt,Ke):bt,dt,bt);if(de=O(q,tn,Qn),Lt&&O(q,de,Lt),X>1){var Bt={cause:Te+","+Ge,reach:fn};$(V,q,Z,de.prev,Re,Bt),pe&&Bt.reach>pe.reach&&(pe.reach=Bt.reach)}}}}}}function N(){var V={value:null,prev:null,next:null},q={value:null,prev:V,next:null};V.next=q,this.head=V,this.tail=q,this.length=0}function O(V,q,Z){var K=q.next,ae={value:Z,prev:q,next:K};return q.next=ae,K.prev=ae,V.length++,ae}function R(V,q,Z){for(var K=q.next,ae=0;ae<Z&&K!==V.tail;ae++)K=K.next;q.next=K,K.prev=q,V.length-=ae}function j(V){for(var q=[],Z=V.head.next;Z!==V.tail;)q.push(Z.value),Z=Z.next;return q}if(!l.document)return l.addEventListener&&(D.disableWorkerMessageHandler||l.addEventListener("message",function(V){var q=JSON.parse(V.data),Z=q.language,K=q.code,ae=q.immediateClose;l.postMessage(D.highlight(K,D.languages[Z],Z)),ae&&l.close()},!1)),D;var Q=D.util.currentScript();Q&&(D.filename=Q.src,Q.hasAttribute("data-manual")&&(D.manual=!0));function G(){D.manual||D.highlightAll()}if(!D.manual){var Se=document.readyState;Se==="loading"||Se==="interactive"&&Q&&Q.defer?document.addEventListener("DOMContentLoaded",G):window.requestAnimationFrame?window.requestAnimationFrame(G):window.setTimeout(G,16)}return D}(n);r.exports&&(r.exports=i),typeof Sd<"u"&&(Sd.Prism=i)})(FE);var r4=FE.exports,a4=D2;D2.displayName="markup",D2.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function D2(r){r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(i,l){var c={};c["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[l]},c.cdata=/^<!\[CDATA\[|\]\]>$/i;var h={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:c}};h["language-"+l]={pattern:/[\s\S]+/,inside:r.languages[l]};var m={};m[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:h},r.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,i){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:r.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml}var i4=S2;S2.displayName="css",S2.aliases=[];function S2(r){(function(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var l=n.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))})(r)}var o4=C2;C2.displayName="clike",C2.aliases=[];function C2(r){r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var s4=_2;_2.displayName="javascript",_2.aliases=["js"];function _2(r){r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript}var Xg=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Sd=="object"?Sd:{},l4=C4();Xg.Prism={manual:!0,disableWorkerMessageHandler:!0};var u4=Dj,c4=jj,$E=r4,d4=a4,f4=i4,p4=o4,h4=s4;l4();var x2={}.hasOwnProperty;function PE(){}PE.prototype=$E;var ha=new PE,m4=ha;ha.highlight=v4,ha.register=Jg,ha.alias=g4,ha.registered=y4,ha.listLanguages=b4,Jg(d4),Jg(f4),Jg(p4),Jg(h4),ha.util.encode=D4,ha.Token.stringify=k4;function Jg(r){if(typeof r!="function"||!r.displayName)throw new Error("Expected `function` for `grammar`, got `"+r+"`");ha.languages[r.displayName]===void 0&&r(ha)}function g4(r,n){var i=ha.languages,l=r,c,h,m,D;n&&(l={},l[r]=n);for(c in l)for(h=l[c],h=typeof h=="string"?[h]:h,m=h.length,D=-1;++D<m;)i[h[D]]=i[c]}function v4(r,n){var i=$E.highlight,l;if(typeof r!="string")throw new Error("Expected `string` for `value`, got `"+r+"`");if(ha.util.type(n)==="Object")l=n,n=null;else{if(typeof n!="string")throw new Error("Expected `string` for `name`, got `"+n+"`");if(x2.call(ha.languages,n))l=ha.languages[n];else throw new Error("Unknown language: `"+n+"` is not registered")}return i.call(this,r,l,n)}function y4(r){if(typeof r!="string")throw new Error("Expected `string` for `language`, got `"+r+"`");return x2.call(ha.languages,r)}function b4(){var r=ha.languages,n=[],i;for(i in r)x2.call(r,i)&&typeof r[i]=="object"&&n.push(i);return n}function k4(r,n,i){var l;return typeof r=="string"?{type:"text",value:r}:ha.util.type(r)==="Array"?w4(r,n):(l={type:r.type,content:ha.Token.stringify(r.content,n,i),tag:"span",classes:["token",r.type],attributes:{},language:n,parent:i},r.alias&&(l.classes=l.classes.concat(r.alias)),ha.hooks.run("wrap",l),u4(l.tag+"."+l.classes.join("."),S4(l.attributes),l.content))}function w4(r,n){for(var i=[],l=r.length,c=-1,h;++c<l;)h=r[c],h!==""&&h!==null&&h!==void 0&&i.push(h);for(c=-1,l=i.length;++c<l;)h=i[c],i[c]=ha.Token.stringify(h,n,i);return i}function D4(r){return r}function S4(r){var n;for(n in r)r[n]=c4(r[n]);return r}function C4(){var r="Prism"in Xg,n=r?Xg.Prism:void 0;return i;function i(){r?Xg.Prism=n:delete Xg.Prism,r=void 0,n=void 0}}const E2=Iy(m4);var Zg=aI(E2,{});Zg.registerLanguage=function(r,n){return E2.register(n)},Zg.alias=function(r,n){return E2.alias(r,n)};const NE={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var _4=T2;T2.displayName="jsx",T2.aliases=[];function T2(r){(function(n){var i=n.util.clone(n.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,c=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,h=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function m(T,$){return T=T.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return c}).replace(/<SPREAD>/g,function(){return h}),RegExp(T,$)}h=m(h).source,n.languages.jsx=n.languages.extend("markup",i),n.languages.jsx.tag.pattern=m(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),n.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,n.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,n.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,n.languages.jsx.tag.inside.comment=i.comment,n.languages.insertBefore("inside","attr-name",{spread:{pattern:m(/<SPREAD>/.source),inside:n.languages.jsx}},n.languages.jsx.tag),n.languages.insertBefore("inside","special-attr",{script:{pattern:m(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:n.languages.jsx}}},n.languages.jsx.tag);var D=function(T){return T?typeof T=="string"?T:typeof T.content=="string"?T.content:T.content.map(D).join(""):""},C=function(T){for(var $=[],N=0;N<T.length;N++){var O=T[N],R=!1;if(typeof O!="string"&&(O.type==="tag"&&O.content[0]&&O.content[0].type==="tag"?O.content[0].content[0].content==="</"?$.length>0&&$[$.length-1].tagName===D(O.content[0].content[1])&&$.pop():O.content[O.content.length-1].content==="/>"||$.push({tagName:D(O.content[0].content[1]),openedBraces:0}):$.length>0&&O.type==="punctuation"&&O.content==="{"?$[$.length-1].openedBraces++:$.length>0&&$[$.length-1].openedBraces>0&&O.type==="punctuation"&&O.content==="}"?$[$.length-1].openedBraces--:R=!0),(R||typeof O=="string")&&$.length>0&&$[$.length-1].openedBraces===0){var j=D(O);N<T.length-1&&(typeof T[N+1]=="string"||T[N+1].type==="plain-text")&&(j+=D(T[N+1]),T.splice(N+1,1)),N>0&&(typeof T[N-1]=="string"||T[N-1].type==="plain-text")&&(j=D(T[N-1])+j,T.splice(N-1,1),N--),T[N]=new n.Token("plain-text",j,null,j)}O.content&&typeof O.content!="string"&&C(O.content)}};n.hooks.add("after-tokenize",function(T){T.language!=="jsx"&&T.language!=="tsx"||C(T.tokens)})})(r)}const x4=Iy(_4),E4=zr({tagName:"pkt-tag",elementClass:Es,react:$e,displayName:"PktTag",events:{onClose:"close"}}),Gh=$e.forwardRef(({children:r,...n},i)=>L.jsx(E4,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));Gh.displayName="PktTag";const OE=$e.forwardRef(({arrowNav:r=!0,tabs:n,onTabSelected:i},l)=>{const c=$e.useRef([]);$e.useEffect(()=>{c.current=c.current.slice(0,n.length)},[n]);const h=(D,C)=>{C.action&&C.action(D),i&&i(D)},m=(D,C)=>{var T,$;r&&(C.code==="ArrowLeft"&&D!==0&&((T=c.current[D-1])==null||T.focus()),C.code==="ArrowRight"&&D<n.length-1&&(($=c.current[D+1])==null||$.focus()),(C.code==="ArrowDown"||C.code==="Space")&&h(D,n[D]))};return L.jsx("div",{className:"pkt-tabs",ref:l,children:L.jsx("div",{className:"pkt-tabs__list",role:r?"tablist":"navigation",children:n.map((D,C)=>L.jsx($e.Fragment,{children:D.href?L.jsxs("a",{"aria-selected":!!D.active,role:r?"tab":void 0,href:D.href,"aria-controls":D.controls,className:`pkt-tabs__link ${D.active?"active":""}`,onKeyUp:T=>m(C,T),onClick:()=>h(C,D),tabIndex:D.active||!r?void 0:-1,ref:T=>{c.current[C]=T},children:[D.icon&&L.jsx(or,{name:D.icon,className:"pkt-icon--small"}),D.text,D.tag&&L.jsx(Gh,{skin:D.tag.skin,size:"small",children:D.tag.text})]}):L.jsxs("button",{"aria-selected":!!D.active,role:r?"tab":void 0,type:"button","aria-controls":D.controls,className:`pkt-tabs__button pkt-link-button ${D.active?"active":""}`,onKeyUp:T=>m(C,T),onClick:()=>h(C,D),tabIndex:D.active||!r?void 0:-1,ref:T=>{c.current[C]=T},children:[D.icon&&L.jsx(or,{name:D.icon,className:"pkt-icon--small"}),D.text,D.tag&&L.jsx(Gh,{skin:D.tag.skin,size:"small",children:D.tag.text})]},"b-"+C)},C))})})}),T4=zr({tagName:"pkt-textinput",elementClass:Fs,react:$e,displayName:"PktTextinput",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),ev=$e.forwardRef(({helptext:r,...n},i)=>L.jsx(T4,{...n,ref:i,children:r&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:r})}));ev.displayName="PktTextinput";const $b=({className:r,compact:n=!1,skin:i="basic",responsiveView:l=!0,children:c})=>L.jsx("table",{"data-testid":"pkt-table",className:ml(r,"pkt-table",{"pkt-table--responsive":l,"pkt-table--compact":n,"pkt-table--basic":i==="basic","pkt-table--zebra-blue":i==="zebra-blue"}),role:"table",children:c}),Pb=({className:r,children:n})=>L.jsx("thead",{className:ml(r,"pkt-table__header",{}),role:"rowgroup",children:n}),Nb=({children:r,className:n})=>L.jsx("tbody",{className:ml(n,"pkt-table__body",{}),role:"rowgroup",children:r}),ap=({className:r,children:n})=>L.jsx("tr",{className:ml(r,"pkt-table__row",{}),role:"row",children:n}),gl=({className:r,children:n})=>L.jsx("th",{className:ml(r,"pkt-table__header-cell",{}),role:"columnheader",children:n}),Zo=({children:r,className:n,dataLabel:i})=>L.jsx("td",{className:ml(n,"pkt-table__data-cell",{}),"data-label":i,role:"cell","data-testid":"pkt-table__data-cell",children:r}),A4=({specs:r})=>{const n=l=>Array.isArray(l)?l.join(`
|
|
1544
1544
|
`):l,i=l=>typeof l=="boolean"?l?"true":"false":l;return L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Egenskaper"}),L.jsxs($b,{compact:!0,children:[L.jsx(Pb,{children:L.jsxs(ap,{children:[L.jsx(gl,{children:"Prop"}),L.jsx(gl,{children:"Navn"}),L.jsx(gl,{children:"Beskrivelse"}),L.jsx(gl,{children:"Type"}),L.jsx(gl,{children:"Standardverdi"})]})}),L.jsx(Nb,{children:Object.entries(r.props||{}).map(([l,c])=>L.jsxs(ap,{children:[L.jsx(Zo,{dataLabel:"Prop",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Navn",children:!Array.isArray(c)&&c.name||l}),Array.isArray(c)?L.jsxs(L.Fragment,{children:[L.jsx(Zo,{dataLabel:"Beskrivelse"}),L.jsx(Zo,{dataLabel:"Type",children:L.jsx("pre",{children:c.join(`
|
|
1545
|
-
`)})})]}):L.jsxs(L.Fragment,{children:[L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:L.jsx("pre",{children:c.type&&n(c.type)})}),L.jsx(Zo,{dataLabel:"Standardverdi",children:L.jsx("pre",{children:i(c.default)})})]})]},l))})]}),r.events&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Hendelser / handlinger"}),L.jsxs($b,{compact:!0,children:[L.jsx(Pb,{children:L.jsxs(ap,{children:[L.jsx(gl,{children:"Event"}),L.jsx(gl,{children:"Beskrivelse"}),L.jsx(gl,{children:"Type"})]})}),L.jsx(Nb,{children:Object.entries(r.events||{}).map(([l,c])=>L.jsxs(ap,{children:[L.jsx(Zo,{dataLabel:"Event",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:c.type})]},l))})]})]}),r.slots&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Innhold"}),L.jsxs($b,{compact:!0,children:[L.jsx(Pb,{children:L.jsxs(ap,{children:[L.jsx(gl,{children:"Slot"}),L.jsx(gl,{children:"Beskrivelse"})]})}),L.jsx(Nb,{children:Object.entries(r.slots||{}).map(([l,c])=>L.jsxs(ap,{children:[L.jsx(Zo,{dataLabel:"Slot",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})})]},l))})]})]})]})},F4=zr({tagName:"pkt-select",elementClass:Oh,react:$e,displayName:"PktSelect",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),Ob=$e.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(F4,{ref:l,...i,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));Ob.displayName="PktSelect";const $4=[{id:"24h",fn:"24h.svg",cat:"services"},{id:"access-prohibited",fn:"access-prohibited.svg",cat:"uncategorized"},{id:"accessibility",fn:"accessibility.svg",cat:"uncategorized"},{id:"accessible-water-access",fn:"accessible-water-access.svg",cat:"uncategorized"},{id:"active-person",fn:"active-person.svg",cat:"people-and-health"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"advice",fn:"advice.svg",cat:"ui"},{id:"alcohol-prohibited",fn:"alcohol-prohibited.svg",cat:"uncategorized"},{id:"alert-circle",fn:"alert-circle.svg",cat:"ui"},{id:"alert-error-system",fn:"alert-error-system.svg",cat:"uncategorized"},{id:"alert-error",fn:"alert-error.svg",cat:"ui"},{id:"alert-information",fn:"alert-information.svg",cat:"ui"},{id:"alert-success-system",fn:"alert-success-system.svg",cat:"uncategorized"},{id:"alert-success",fn:"alert-success.svg",cat:"ui"},{id:"alert-warning",fn:"alert-warning.svg",cat:"ui"},{id:"ambulance",fn:"ambulance.svg",cat:"uncategorized"},{id:"apple",fn:"apple.svg",cat:"ui"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow-return",fn:"arrow-return.svg",cat:"arrows"},{id:"arrow",fn:"arrow.svg",cat:"arrows"},{id:"arts-and-culture",fn:"arts-and-culture.svg",cat:"uncategorized"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"audioguide",fn:"audioguide.svg",cat:"uncategorized"},{id:"baby-bottle",fn:"baby-bottle.svg",cat:"uncategorized"},{id:"backpack-prohibited",fn:"backpack-prohibited.svg",cat:"uncategorized"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"ball-sports",fn:"ball-sports.svg",cat:"uncategorized"},{id:"balloons",fn:"balloons.svg",cat:"ui"},{id:"bath",fn:"bath.svg",cat:"uncategorized"},{id:"bed",fn:"bed.svg",cat:"uncategorized"},{id:"beehive",fn:"beehive.svg",cat:"uncategorized"},{id:"bicycle-prohibited",fn:"bicycle-prohibited.svg",cat:"uncategorized"},{id:"bicycle-service",fn:"bicycle-service.svg",cat:"uncategorized"},{id:"bicycle",fn:"bicycle.svg",cat:"uncategorized"},{id:"bike-helmet",fn:"bike-helmet.svg",cat:"uncategorized"},{id:"bike-parking",fn:"bike-parking.svg",cat:"uncategorized"},{id:"bike",fn:"bike.svg",cat:"uncategorized"},{id:"blitz-prohibited",fn:"blitz-prohibited.svg",cat:"uncategorized"},{id:"books",fn:"books.svg",cat:"services"},{id:"boys-shower",fn:"boys-shower.svg",cat:"uncategorized"},{id:"boys-toilet",fn:"boys-toilet.svg",cat:"uncategorized"},{id:"brain-heart",fn:"brain-heart.svg",cat:"people-and-health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"people-and-health"},{id:"brain",fn:"brain.svg",cat:"uncategorized"},{id:"briefcase",fn:"briefcase.svg",cat:"sign"},{id:"bulb",fn:"bulb.svg",cat:"uncategorized"},{id:"bullseye",fn:"bullseye.svg",cat:"ui"},{id:"bus",fn:"bus.svg",cat:"services"},{id:"cafe",fn:"cafe.svg",cat:"sign"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera-surveillance-CCTV",fn:"camera-surveillance-CCTV.svg",cat:"uncategorized"},{id:"camera",fn:"camera.svg",cat:"ui"},{id:"campfire-site",fn:"campfire-site.svg",cat:"uncategorized"},{id:"camping",fn:"camping.svg",cat:"uncategorized"},{id:"car",fn:"car.svg",cat:"sign"},{id:"care-room",fn:"care-room.svg",cat:"sign"},{id:"changing-room",fn:"changing-room.svg",cat:"uncategorized"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"ui"},{id:"character-information",fn:"character-information.svg",cat:"ui"},{id:"charging-point",fn:"charging-point.svg",cat:"uncategorized"},{id:"check-big",fn:"check-big.svg",cat:"ui"},{id:"check-box-checked",fn:"check-box-checked.svg",cat:"uncategorized"},{id:"check-box-unchecked",fn:"check-box-unchecked.svg",cat:"uncategorized"},{id:"check-circle",fn:"check-circle.svg",cat:"ui"},{id:"check-medium",fn:"check-medium.svg",cat:"ui"},{id:"check",fn:"check.svg",cat:"ui"},{id:"chevron-down",fn:"chevron-down.svg",cat:"arrows"},{id:"chevron-left",fn:"chevron-left.svg",cat:"arrows"},{id:"chevron-right",fn:"chevron-right.svg",cat:"arrows"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"arrows"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"arrows"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"arrows"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"arrows"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"arrows"},{id:"childrens-toilet",fn:"childrens-toilet.svg",cat:"uncategorized"},{id:"circular-economy",fn:"circular-economy.svg",cat:"uncategorized"},{id:"climbing",fn:"climbing.svg",cat:"uncategorized"},{id:"clock-history",fn:"clock-history.svg",cat:"ui"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"ui"},{id:"code",fn:"code.svg",cat:"ui"},{id:"coffee",fn:"coffee.svg",cat:"sign"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"services"},{id:"computer",fn:"computer.svg",cat:"ui"},{id:"cookie",fn:"cookie.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"services"},{id:"crayfish",fn:"crayfish.svg",cat:"uncategorized"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill-large",fn:"cross-circle-fill-large.svg",cat:"none"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"cupboard",fn:"cupboard.svg",cat:"uncategorized"},{id:"dancing",fn:"dancing.svg",cat:"uncategorized"},{id:"data",fn:"data.svg",cat:"ui"},{id:"deer",fn:"deer.svg",cat:"uncategorized"},{id:"defibrillators",fn:"defibrillators.svg",cat:"sign"},{id:"district",fn:"district.svg",cat:"ui"},{id:"diving-prohibited",fn:"diving-prohibited.svg",cat:"uncategorized"},{id:"dock",fn:"dock.svg",cat:"uncategorized"},{id:"document-code",fn:"document-code.svg",cat:"ui"},{id:"document-pdf",fn:"document-pdf.svg",cat:"ui"},{id:"document-plain",fn:"document-plain.svg",cat:"ui"},{id:"document-table",fn:"document-table.svg",cat:"ui"},{id:"document-text",fn:"document-text.svg",cat:"ui"},{id:"dog-forbidden",fn:"dog-forbidden.svg",cat:"uncategorized"},{id:"dog-on-a-leash",fn:"dog-on-a-leash.svg",cat:"uncategorized"},{id:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"sign"},{id:"drone",fn:"drone.svg",cat:"uncategorized"},{id:"drugs-prohibited",fn:"drugs-prohibited.svg",cat:"uncategorized"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"people-and-health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"elderly",fn:"elderly.svg",cat:"uncategorized"},{id:"electric-car",fn:"electric-car.svg",cat:"uncategorized"},{id:"electric-van",fn:"electric-van.svg",cat:"uncategorized"},{id:"elevator",fn:"elevator.svg",cat:"uncategorized"},{id:"email",fn:"email.svg",cat:"ui"},{id:"escalator",fn:"escalator.svg",cat:"uncategorized"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"ui"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"ui"},{id:"exit-door",fn:"exit-door.svg",cat:"uncategorized"},{id:"exit",fn:"exit.svg",cat:"ui"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"ui"},{id:"feedback",fn:"feedback.svg",cat:"ui"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filming-prohibited",fn:"filming-prohibited.svg",cat:"uncategorized"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-prohibited",fn:"fire-prohibited.svg",cat:"uncategorized"},{id:"fire-safety",fn:"fire-safety.svg",cat:"people-and-health"},{id:"fireworks-prohibited",fn:"fireworks-prohibited.svg",cat:"uncategorized"},{id:"fishing-prohibited",fn:"fishing-prohibited.svg",cat:"uncategorized"},{id:"fixed-bench",fn:"fixed-bench.svg",cat:"uncategorized"},{id:"fixed-grill",fn:"fixed-grill.svg",cat:"uncategorized"},{id:"flammable-waste",fn:"flammable-waste.svg",cat:"uncategorized"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"food-and-drinks-prohibited",fn:"food-and-drinks-prohibited.svg",cat:"uncategorized"},{id:"fountain",fn:"fountain.svg",cat:"uncategorized"},{id:"game-console",fn:"game-console.svg",cat:"ui"},{id:"girls-shower",fn:"girls-shower.svg",cat:"uncategorized"},{id:"girls-toilet",fn:"girls-toilet.svg",cat:"uncategorized"},{id:"github",fn:"github.svg",cat:"social"},{id:"graffiti-allowed",fn:"graffiti-allowed.svg",cat:"uncategorized"},{id:"graffiti-prohibited",fn:"graffiti-prohibited.svg",cat:"uncategorized"},{id:"graph",fn:"graph.svg",cat:"ui"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"gym",fn:"gym.svg",cat:"uncategorized"},{id:"handicap-elevator",fn:"handicap-elevator.svg",cat:"uncategorized"},{id:"handicap",fn:"handicap.svg",cat:"uncategorized"},{id:"hands-globe",fn:"hands-globe.svg",cat:"people-and-health"},{id:"headset",fn:"headset.svg",cat:"ui"},{id:"heart-hand",fn:"heart-hand.svg",cat:"people-and-health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"services"},{id:"heart",fn:"heart.svg",cat:"ui"},{id:"height-restriction",fn:"height-restriction.svg",cat:"uncategorized"},{id:"helmet",fn:"helmet.svg",cat:"uncategorized"},{id:"hiking-trail",fn:"hiking-trail.svg",cat:"uncategorized"},{id:"holding-hands",fn:"holding-hands.svg",cat:"people-and-health"},{id:"home",fn:"home.svg",cat:"ui"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"services"},{id:"ice-skating",fn:"ice-skating.svg",cat:"uncategorized"},{id:"indoor-pool",fn:"indoor-pool.svg",cat:"uncategorized"},{id:"information",fn:"information.svg",cat:"ui"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"ui"},{id:"ladies-toilet",fn:"ladies-toilet.svg",cat:"uncategorized"},{id:"language",fn:"language.svg",cat:"ui"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"ui"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"sign"},{id:"lecture",fn:"lecture.svg",cat:"uncategorized"},{id:"life-ring",fn:"life-ring.svg",cat:"uncategorized"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"living-room",fn:"living-room.svg",cat:"uncategorized"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"ui"},{id:"location-pin",fn:"location-pin.svg",cat:"ui"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"luggage-prohibited",fn:"luggage-prohibited.svg",cat:"uncategorized"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"ui"},{id:"medicine-cabinet",fn:"medicine-cabinet.svg",cat:"ui"},{id:"megaphone",fn:"megaphone.svg",cat:"uncategorized"},{id:"memorial-stone",fn:"memorial-stone.svg",cat:"uncategorized"},{id:"mens-toilet",fn:"mens-toilet.svg",cat:"uncategorized"},{id:"menu",fn:"menu.svg",cat:"ui"},{id:"message",fn:"message.svg",cat:"ui"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"plusminus"},{id:"minus-circle",fn:"minus-circle.svg",cat:"plusminus"},{id:"minus-sign",fn:"minus-sign.svg",cat:"plusminus"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"ui"},{id:"moon",fn:"moon.svg",cat:"uncategorized"},{id:"motorcycle",fn:"motorcycle.svg",cat:"uncategorized"},{id:"museum",fn:"museum.svg",cat:"uncategorized"},{id:"music-notes",fn:"music-notes.svg",cat:"ui"},{id:"nature-plant-2",fn:"nature-plant-2.svg",cat:"uncategorized"},{id:"nature-plant",fn:"nature-plant.svg",cat:"uncategorized"},{id:"new-window-small",fn:"new-window-small.svg",cat:"ui"},{id:"new-window",fn:"new-window.svg",cat:"ui"},{id:"no-walking",fn:"no-walking.svg",cat:"uncategorized"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"ui"},{id:"organization",fn:"organization.svg",cat:"ui"},{id:"package",fn:"package.svg",cat:"uncategorized"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"ui"},{id:"palette",fn:"palette.svg",cat:"ui"},{id:"paragraph",fn:"paragraph.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"services"},{id:"parking-meter",fn:"parking-meter.svg",cat:"uncategorized"},{id:"partner-workout",fn:"partner-workout.svg",cat:"people-and-health"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"picnic-table",fn:"picnic-table.svg",cat:"uncategorized"},{id:"picture",fn:"picture.svg",cat:"ui"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"planter-box",fn:"planter-box.svg",cat:"uncategorized"},{id:"playground",fn:"playground.svg",cat:"uncategorized"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"plusminus"},{id:"plus-circle",fn:"plus-circle.svg",cat:"plusminus"},{id:"plus-sign",fn:"plus-sign.svg",cat:"plusminus"},{id:"pregnant",fn:"pregnant.svg",cat:"uncategorized"},{id:"pride-heart",fn:"pride-heart.svg",cat:"people-and-health"},{id:"print",fn:"print.svg",cat:"ui"},{id:"privacy",fn:"privacy.svg",cat:"ui"},{id:"process-back",fn:"process-back.svg",cat:"uncategorized"},{id:"process-forward",fn:"process-forward.svg",cat:"uncategorized"},{id:"process-iteration",fn:"process-iteration.svg",cat:"uncategorized"},{id:"processing",fn:"processing.svg",cat:"uncategorized"},{id:"prohibited",fn:"prohibited.svg",cat:"uncategorized"},{id:"punkt-circle-blue",fn:"punkt-circle-blue.svg",cat:"social"},{id:"qr-code",fn:"qr-code.svg",cat:"ui"},{id:"question",fn:"question.svg",cat:"ui"},{id:"radio-checked",fn:"radio-checked.svg",cat:"uncategorized"},{id:"radio-unchecked",fn:"radio-unchecked.svg",cat:"uncategorized"},{id:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"services"},{id:"restaurant",fn:"restaurant.svg",cat:"sign"},{id:"roadblock",fn:"roadblock.svg",cat:"uncategorized"},{id:"ruler",fn:"ruler.svg",cat:"ui"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"sauna",fn:"sauna.svg",cat:"uncategorized"},{id:"save",fn:"save.svg",cat:"ui"},{id:"scooter-prohibited",fn:"scooter-prohibited.svg",cat:"uncategorized"},{id:"scooter",fn:"scooter.svg",cat:"ui"},{id:"search-icon-round-active",fn:"search-icon-round-active.svg",cat:"uncategorized"},{id:"search-icon-round-disabled",fn:"search-icon-round-disabled.svg",cat:"uncategorized"},{id:"search-icon-round-normal",fn:"search-icon-round-normal.svg",cat:"uncategorized"},{id:"search-icon-square-active",fn:"search-icon-square-active.svg",cat:"uncategorized"},{id:"search-icon-square-disabled",fn:"search-icon-square-disabled.svg",cat:"uncategorized"},{id:"search-icon-square-normal",fn:"search-icon-square-normal.svg",cat:"uncategorized"},{id:"share-outline",fn:"share-outline.svg",cat:"ui"},{id:"share",fn:"share.svg",cat:"ui"},{id:"shield-fire",fn:"shield-fire.svg",cat:"services"},{id:"shield-law-paragraph",fn:"shield-law-paragraph.svg",cat:"ui"},{id:"shoes-prohibited",fn:"shoes-prohibited.svg",cat:"uncategorized"},{id:"shop",fn:"shop.svg",cat:"uncategorized"},{id:"shower",fn:"shower.svg",cat:"uncategorized"},{id:"signature",fn:"signature.svg",cat:"uncategorized"},{id:"skateboarding",fn:"skateboarding.svg",cat:"uncategorized"},{id:"slack",fn:"slack.svg",cat:"social"},{id:"sledding",fn:"sledding.svg",cat:"uncategorized"},{id:"smiley-neutral",fn:"smiley-neutral.svg",cat:"feedback"},{id:"smiley-sad",fn:"smiley-sad.svg",cat:"feedback"},{id:"smiley-smile",fn:"smiley-smile.svg",cat:"feedback"},{id:"smoking-prohibited",fn:"smoking-prohibited.svg",cat:"uncategorized"},{id:"snow",fn:"snow.svg",cat:"uncategorized"},{id:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"ui"},{id:"sound-on",fn:"sound-on.svg",cat:"ui"},{id:"sparkles",fn:"sparkles.svg",cat:"ui"},{id:"stairs-down",fn:"stairs-down.svg",cat:"uncategorized"},{id:"stairs-up",fn:"stairs-up.svg",cat:"uncategorized"},{id:"stairs",fn:"stairs.svg",cat:"uncategorized"},{id:"street-vendor",fn:"street-vendor.svg",cat:"uncategorized"},{id:"stroller-prohibited",fn:"stroller-prohibited.svg",cat:"uncategorized"},{id:"stroller",fn:"stroller.svg",cat:"uncategorized"},{id:"studded-tires",fn:"studded-tires.svg",cat:"uncategorized"},{id:"svg-logo",fn:"svg.svg",cat:"social"},{id:"swimming-area",fn:"swimming-area.svg",cat:"uncategorized"},{id:"swingset",fn:"swingset.svg",cat:"services"},{id:"table",fn:"table.svg",cat:"ui"},{id:"tap",fn:"tap.svg",cat:"ui"},{id:"target",fn:"target.svg",cat:"ui"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"tickets",fn:"tickets.svg",cat:"sign"},{id:"toilet-unisex",fn:"toilet-unisex.svg",cat:"uncategorized"},{id:"toilet",fn:"toilet.svg",cat:"uncategorized"},{id:"tool",fn:"tool.svg",cat:"uncategorized"},{id:"touching-prohibited",fn:"touching-prohibited.svg",cat:"uncategorized"},{id:"trail-gate",fn:"trail-gate.svg",cat:"uncategorized"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"tram",fn:"tram.svg",cat:"uncategorized"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trash",fn:"trash.svg",cat:"sign"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"people-and-health"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"people-and-health"},{id:"umbrella-prohibited",fn:"umbrella-prohibited.svg",cat:"uncategorized"},{id:"urban-landscape",fn:"urban-landscape.svg",cat:"uncategorized"},{id:"urinal",fn:"urinal.svg",cat:"uncategorized"},{id:"user",fn:"user.svg",cat:"ui"},{id:"van",fn:"van.svg",cat:"uncategorized"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"viewpoint",fn:"viewpoint.svg",cat:"uncategorized"},{id:"virus",fn:"virus.svg",cat:"uncategorized"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"walking",fn:"walking.svg",cat:"uncategorized"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"sign"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"sign"},{id:"wardrobe",fn:"wardrobe.svg",cat:"sign"},{id:"waste-container",fn:"waste-container.svg",cat:"uncategorized"},{id:"water-faucet",fn:"water-faucet.svg",cat:"services"},{id:"wheelchair-ramp",fn:"wheelchair-ramp.svg",cat:"uncategorized"},{id:"wheelchair",fn:"wheelchair.svg",cat:"none"},{id:"wifi",fn:"wifi.svg",cat:"sign"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"people-and-health"},{id:"workplace",fn:"workplace.svg",cat:"social"},{id:"wrench",fn:"wrench.svg",cat:"ui"},{id:"x",fn:"x.svg",cat:"uncategorized"}],A2=({propKey:r,spec:n,props:i,handleChange:l})=>{const c={BOOLEAN:"boolean",ICON:"icon",ARRAY:"array",OBJECT:"object",DATE:"ISOdatestring",NUMBER:"number"},h=(T,$)=>{l(r,{...i[r],[T]:$})},m=(T,$,N)=>{const O=[...i[r]];O[T]={...O[T],[$]:N},l(r,O)},D=()=>{const T=[...i[r],{}];l(r,T)},C=T=>{const $=i[r].filter((N,O)=>O!==T);l(r,$)};if(n.type===c.BOOLEAN)return L.jsx(tx,{label:n.name||r,forId:r,helptext:n.description||null,hasFieldset:!0,requiredTag:n.required,children:L.jsx(b0,{id:r,label:r,type:"checkbox",checked:i[r]||!1,onChange:T=>l(r,T.target.checked,n.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(n.type===c.ICON)return L.jsxs(Ob,{label:n.name||r,helptext:n.description||null,id:r,value:i[r]||"",onChange:T=>l(r,T.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),$4.map(T=>L.jsx("option",{value:T.id,children:T.id},T.id))]});if(n.type===c.DATE)return L.jsx(k0,{id:r,label:n.name||r,helptext:n.description||null,value:i[r]||"",multiple:n.variant==="multiple",maxlength:999,onChange:T=>l(r,T.target.value),requiredTag:n.required});if(Array.isArray(n)||Array.isArray(n.type)||Array.isArray(n.values)){const T=Array.isArray(n)?n:n.values||n.type;return L.jsxs(Ob,{label:n.name||r,helptext:n.description||null,id:r,value:i[r],onChange:$=>l(r,$.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),T.map($=>L.jsx("option",{value:$,children:$},$))]})}return n.type===c.NUMBER?L.jsx(ev,{id:r,label:n.name||r,helptext:n.description||null,type:"number",value:i[r]||"",onChange:T=>l(r,parseFloat(T.currentTarget.value)),requiredTag:n.required}):n.type===c.OBJECT?(i[r]||(i[r]={}),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:n.name||r}),Object.entries(n.properties).map(([T,$])=>L.jsx(A2,{propKey:T,props:i[r],spec:$,handleChange:(N,O)=>h(N,O)},T))]})]})):n.type===c.ARRAY&&n.items.type===c.OBJECT?(i[r]||(i[r]=[]),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),i[r].map((T,$)=>L.jsx("div",{children:L.jsxs("fieldset",{children:[L.jsxs("legend",{children:["Item ",$+1]}),Object.entries(n.items.properties).map(([N,O])=>L.jsx(A2,{propKey:N,props:T,spec:O,handleChange:(R,j)=>m($,R,j)},N)),L.jsx($d,{onClick:()=>C($),children:"Fjern denne"})]})},$)),L.jsx($d,{onClick:D,children:"Legg til ny"})]})):L.jsx(ev,{id:r,label:n.name||r,helptext:n.description||null,type:"text",value:i[r]||"",onChange:T=>l(r,n.type==="number"?parseFloat(T.currentTarget.value):T.currentTarget.value),requiredTag:n.required})};Zg.registerLanguage("jsx",x4);const RE=({specs:r,children:n,fullWidth:i})=>{var He,dt;const l=r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).reduce((Me,[Le,de])=>(typeof de=="object"&&!Array.isArray(de)&&de.previewDefault!==void 0&&de.previewDefault!==null?(de.previewDefault==="false"&&(de.previewDefault=!1),de.previewDefault==="true"&&(de.previewDefault=!0),Me[Le]=de.previewDefault):typeof de=="object"&&!Array.isArray(de)&&de.default!==void 0&&de.default!==null&&(de.default==="false"&&(de.default=!1),de.default==="true"&&(de.default=!0),Me[Le]=de.default),Me),{}):{},[c,h]=$e.useState(0),[m,D]=$e.useState(l),[C,T]=$e.useState("light"),[$,N]=$e.useState(""),[O,R]=$e.useState(""),[j,Q]=$e.useState(""),[G,Se]=$e.useState("Rediger innhold"),[V,q]=$e.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${r.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),Z=Me=>{Me===1&&pe(),Me===2&&ae(),Q(""),q(Le=>Le.map((de,Re)=>({...de,active:Re===Me})))},K=$e.useRef(null),ae=async()=>{if(r.isElement&&$e.isValidElement(Ke)){const Me=$e.isValidElement(Ke)?Ke.type.displayName||Ke.type.name:r.name,Le=Object.entries(m).map(([Re,_e])=>{if(_e&&!ke(_e)&&!Ge(_e))return typeof _e=="object"?`${Re}='${JSON.stringify(_e)}'`:`${Re}="${_e}"`}).join(" "),de=await xb(`<${r.name||Me} ${Le}>${G}</${r.name||Me}>`,{parser:"html",plugins:[I1]});N(`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
1545
|
+
`)})})]}):L.jsxs(L.Fragment,{children:[L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:L.jsx("pre",{children:c.type&&n(c.type)})}),L.jsx(Zo,{dataLabel:"Standardverdi",children:L.jsx("pre",{children:i(c.default)})})]})]},l))})]}),r.events&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Hendelser / handlinger"}),L.jsxs($b,{compact:!0,children:[L.jsx(Pb,{children:L.jsxs(ap,{children:[L.jsx(gl,{children:"Event"}),L.jsx(gl,{children:"Beskrivelse"}),L.jsx(gl,{children:"Type"})]})}),L.jsx(Nb,{children:Object.entries(r.events||{}).map(([l,c])=>L.jsxs(ap,{children:[L.jsx(Zo,{dataLabel:"Event",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:c.type})]},l))})]})]}),r.slots&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Innhold"}),L.jsxs($b,{compact:!0,children:[L.jsx(Pb,{children:L.jsxs(ap,{children:[L.jsx(gl,{children:"Slot"}),L.jsx(gl,{children:"Beskrivelse"})]})}),L.jsx(Nb,{children:Object.entries(r.slots||{}).map(([l,c])=>L.jsxs(ap,{children:[L.jsx(Zo,{dataLabel:"Slot",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})})]},l))})]})]})]})},F4=zr({tagName:"pkt-select",elementClass:Oh,react:$e,displayName:"PktSelect",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),Ob=$e.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(F4,{ref:l,...i,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));Ob.displayName="PktSelect";const $4=[{id:"24h",fn:"24h.svg",cat:"services"},{id:"access-prohibited",fn:"access-prohibited.svg",cat:"uncategorized"},{id:"accessibility",fn:"accessibility.svg",cat:"uncategorized"},{id:"accessible-water-access",fn:"accessible-water-access.svg",cat:"uncategorized"},{id:"active-person",fn:"active-person.svg",cat:"people-and-health"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"advice",fn:"advice.svg",cat:"ui"},{id:"alcohol-prohibited",fn:"alcohol-prohibited.svg",cat:"uncategorized"},{id:"alert-circle",fn:"alert-circle.svg",cat:"ui"},{id:"alert-error-system",fn:"alert-error-system.svg",cat:"uncategorized"},{id:"alert-error",fn:"alert-error.svg",cat:"ui"},{id:"alert-information",fn:"alert-information.svg",cat:"ui"},{id:"alert-success-system",fn:"alert-success-system.svg",cat:"uncategorized"},{id:"alert-success",fn:"alert-success.svg",cat:"ui"},{id:"alert-warning",fn:"alert-warning.svg",cat:"ui"},{id:"ambulance",fn:"ambulance.svg",cat:"uncategorized"},{id:"apple",fn:"apple.svg",cat:"ui"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow-return",fn:"arrow-return.svg",cat:"arrows"},{id:"arrow",fn:"arrow.svg",cat:"arrows"},{id:"arts-and-culture",fn:"arts-and-culture.svg",cat:"uncategorized"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"audioguide",fn:"audioguide.svg",cat:"uncategorized"},{id:"baby-bottle",fn:"baby-bottle.svg",cat:"uncategorized"},{id:"backpack-prohibited",fn:"backpack-prohibited.svg",cat:"uncategorized"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"ball-sports",fn:"ball-sports.svg",cat:"uncategorized"},{id:"balloons",fn:"balloons.svg",cat:"ui"},{id:"bath",fn:"bath.svg",cat:"uncategorized"},{id:"bed",fn:"bed.svg",cat:"uncategorized"},{id:"beehive",fn:"beehive.svg",cat:"uncategorized"},{id:"bicycle-prohibited",fn:"bicycle-prohibited.svg",cat:"uncategorized"},{id:"bicycle-service",fn:"bicycle-service.svg",cat:"uncategorized"},{id:"bicycle",fn:"bicycle.svg",cat:"uncategorized"},{id:"bike-helmet",fn:"bike-helmet.svg",cat:"uncategorized"},{id:"bike-parking",fn:"bike-parking.svg",cat:"uncategorized"},{id:"bike",fn:"bike.svg",cat:"uncategorized"},{id:"blitz-prohibited",fn:"blitz-prohibited.svg",cat:"uncategorized"},{id:"books",fn:"books.svg",cat:"services"},{id:"boys-shower",fn:"boys-shower.svg",cat:"uncategorized"},{id:"boys-toilet",fn:"boys-toilet.svg",cat:"uncategorized"},{id:"brain-heart",fn:"brain-heart.svg",cat:"people-and-health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"people-and-health"},{id:"brain",fn:"brain.svg",cat:"uncategorized"},{id:"briefcase",fn:"briefcase.svg",cat:"sign"},{id:"bulb",fn:"bulb.svg",cat:"uncategorized"},{id:"bullseye",fn:"bullseye.svg",cat:"ui"},{id:"bus",fn:"bus.svg",cat:"services"},{id:"cafe",fn:"cafe.svg",cat:"sign"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera-surveillance-CCTV",fn:"camera-surveillance-CCTV.svg",cat:"uncategorized"},{id:"camera",fn:"camera.svg",cat:"ui"},{id:"campfire-site",fn:"campfire-site.svg",cat:"uncategorized"},{id:"camping",fn:"camping.svg",cat:"uncategorized"},{id:"car",fn:"car.svg",cat:"sign"},{id:"care-room",fn:"care-room.svg",cat:"sign"},{id:"changing-room",fn:"changing-room.svg",cat:"uncategorized"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"ui"},{id:"character-information",fn:"character-information.svg",cat:"ui"},{id:"charging-point",fn:"charging-point.svg",cat:"uncategorized"},{id:"check-big",fn:"check-big.svg",cat:"ui"},{id:"check-box-checked",fn:"check-box-checked.svg",cat:"uncategorized"},{id:"check-box-unchecked",fn:"check-box-unchecked.svg",cat:"uncategorized"},{id:"check-circle",fn:"check-circle.svg",cat:"ui"},{id:"check-medium",fn:"check-medium.svg",cat:"ui"},{id:"check",fn:"check.svg",cat:"ui"},{id:"chevron-down",fn:"chevron-down.svg",cat:"arrows"},{id:"chevron-left",fn:"chevron-left.svg",cat:"arrows"},{id:"chevron-right",fn:"chevron-right.svg",cat:"arrows"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"arrows"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"arrows"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"arrows"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"arrows"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"arrows"},{id:"childrens-toilet",fn:"childrens-toilet.svg",cat:"uncategorized"},{id:"circular-economy",fn:"circular-economy.svg",cat:"uncategorized"},{id:"climbing",fn:"climbing.svg",cat:"uncategorized"},{id:"clock-history",fn:"clock-history.svg",cat:"ui"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"ui"},{id:"code",fn:"code.svg",cat:"ui"},{id:"coffee",fn:"coffee.svg",cat:"sign"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"services"},{id:"computer",fn:"computer.svg",cat:"ui"},{id:"cookie",fn:"cookie.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"services"},{id:"crayfish",fn:"crayfish.svg",cat:"uncategorized"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill-large",fn:"cross-circle-fill-large.svg",cat:"ui"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"cupboard",fn:"cupboard.svg",cat:"uncategorized"},{id:"dancing",fn:"dancing.svg",cat:"uncategorized"},{id:"data",fn:"data.svg",cat:"ui"},{id:"deer",fn:"deer.svg",cat:"uncategorized"},{id:"defibrillators",fn:"defibrillators.svg",cat:"sign"},{id:"district",fn:"district.svg",cat:"ui"},{id:"diving-prohibited",fn:"diving-prohibited.svg",cat:"uncategorized"},{id:"dock",fn:"dock.svg",cat:"uncategorized"},{id:"document-code",fn:"document-code.svg",cat:"ui"},{id:"document-pdf",fn:"document-pdf.svg",cat:"ui"},{id:"document-plain",fn:"document-plain.svg",cat:"ui"},{id:"document-table",fn:"document-table.svg",cat:"ui"},{id:"document-text",fn:"document-text.svg",cat:"ui"},{id:"dog-forbidden",fn:"dog-forbidden.svg",cat:"uncategorized"},{id:"dog-on-a-leash",fn:"dog-on-a-leash.svg",cat:"uncategorized"},{id:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"sign"},{id:"drone",fn:"drone.svg",cat:"uncategorized"},{id:"drugs-prohibited",fn:"drugs-prohibited.svg",cat:"uncategorized"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"people-and-health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"elderly",fn:"elderly.svg",cat:"uncategorized"},{id:"electric-car",fn:"electric-car.svg",cat:"uncategorized"},{id:"electric-van",fn:"electric-van.svg",cat:"uncategorized"},{id:"elevator",fn:"elevator.svg",cat:"uncategorized"},{id:"email",fn:"email.svg",cat:"ui"},{id:"escalator",fn:"escalator.svg",cat:"uncategorized"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"ui"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"ui"},{id:"exit-door",fn:"exit-door.svg",cat:"uncategorized"},{id:"exit",fn:"exit.svg",cat:"ui"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"ui"},{id:"feedback",fn:"feedback.svg",cat:"ui"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filming-prohibited",fn:"filming-prohibited.svg",cat:"uncategorized"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-prohibited",fn:"fire-prohibited.svg",cat:"uncategorized"},{id:"fire-safety",fn:"fire-safety.svg",cat:"people-and-health"},{id:"fireworks-prohibited",fn:"fireworks-prohibited.svg",cat:"uncategorized"},{id:"fishing-prohibited",fn:"fishing-prohibited.svg",cat:"uncategorized"},{id:"fixed-bench",fn:"fixed-bench.svg",cat:"uncategorized"},{id:"fixed-grill",fn:"fixed-grill.svg",cat:"uncategorized"},{id:"flammable-waste",fn:"flammable-waste.svg",cat:"uncategorized"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"food-and-drinks-prohibited",fn:"food-and-drinks-prohibited.svg",cat:"uncategorized"},{id:"fountain",fn:"fountain.svg",cat:"uncategorized"},{id:"game-console",fn:"game-console.svg",cat:"ui"},{id:"girls-shower",fn:"girls-shower.svg",cat:"uncategorized"},{id:"girls-toilet",fn:"girls-toilet.svg",cat:"uncategorized"},{id:"github",fn:"github.svg",cat:"social"},{id:"graffiti-allowed",fn:"graffiti-allowed.svg",cat:"uncategorized"},{id:"graffiti-prohibited",fn:"graffiti-prohibited.svg",cat:"uncategorized"},{id:"graph",fn:"graph.svg",cat:"ui"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"gym",fn:"gym.svg",cat:"uncategorized"},{id:"handicap-elevator",fn:"handicap-elevator.svg",cat:"uncategorized"},{id:"handicap",fn:"handicap.svg",cat:"uncategorized"},{id:"hands-globe",fn:"hands-globe.svg",cat:"people-and-health"},{id:"headset",fn:"headset.svg",cat:"ui"},{id:"heart-hand",fn:"heart-hand.svg",cat:"people-and-health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"services"},{id:"heart",fn:"heart.svg",cat:"ui"},{id:"height-restriction",fn:"height-restriction.svg",cat:"uncategorized"},{id:"helmet",fn:"helmet.svg",cat:"uncategorized"},{id:"hiking-trail",fn:"hiking-trail.svg",cat:"uncategorized"},{id:"holding-hands",fn:"holding-hands.svg",cat:"people-and-health"},{id:"home",fn:"home.svg",cat:"ui"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"services"},{id:"ice-skating",fn:"ice-skating.svg",cat:"uncategorized"},{id:"indoor-pool",fn:"indoor-pool.svg",cat:"uncategorized"},{id:"information",fn:"information.svg",cat:"ui"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"ui"},{id:"ladies-toilet",fn:"ladies-toilet.svg",cat:"uncategorized"},{id:"language",fn:"language.svg",cat:"ui"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"ui"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"sign"},{id:"lecture",fn:"lecture.svg",cat:"uncategorized"},{id:"life-ring",fn:"life-ring.svg",cat:"uncategorized"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"living-room",fn:"living-room.svg",cat:"uncategorized"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"ui"},{id:"location-pin",fn:"location-pin.svg",cat:"ui"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"luggage-prohibited",fn:"luggage-prohibited.svg",cat:"uncategorized"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"ui"},{id:"medicine-cabinet",fn:"medicine-cabinet.svg",cat:"ui"},{id:"megaphone",fn:"megaphone.svg",cat:"uncategorized"},{id:"memorial-stone",fn:"memorial-stone.svg",cat:"uncategorized"},{id:"mens-toilet",fn:"mens-toilet.svg",cat:"uncategorized"},{id:"menu",fn:"menu.svg",cat:"ui"},{id:"message",fn:"message.svg",cat:"ui"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"plusminus"},{id:"minus-circle",fn:"minus-circle.svg",cat:"plusminus"},{id:"minus-sign",fn:"minus-sign.svg",cat:"plusminus"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"ui"},{id:"moon",fn:"moon.svg",cat:"uncategorized"},{id:"motorcycle",fn:"motorcycle.svg",cat:"uncategorized"},{id:"museum",fn:"museum.svg",cat:"uncategorized"},{id:"music-notes",fn:"music-notes.svg",cat:"ui"},{id:"nature-plant-2",fn:"nature-plant-2.svg",cat:"uncategorized"},{id:"nature-plant",fn:"nature-plant.svg",cat:"uncategorized"},{id:"new-window-small",fn:"new-window-small.svg",cat:"ui"},{id:"new-window",fn:"new-window.svg",cat:"ui"},{id:"no-walking",fn:"no-walking.svg",cat:"uncategorized"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"ui"},{id:"organization",fn:"organization.svg",cat:"ui"},{id:"package",fn:"package.svg",cat:"uncategorized"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"ui"},{id:"palette",fn:"palette.svg",cat:"ui"},{id:"paragraph",fn:"paragraph.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"services"},{id:"parking-meter",fn:"parking-meter.svg",cat:"uncategorized"},{id:"partner-workout",fn:"partner-workout.svg",cat:"people-and-health"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"picnic-table",fn:"picnic-table.svg",cat:"uncategorized"},{id:"picture",fn:"picture.svg",cat:"ui"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"planter-box",fn:"planter-box.svg",cat:"uncategorized"},{id:"playground",fn:"playground.svg",cat:"uncategorized"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"plusminus"},{id:"plus-circle",fn:"plus-circle.svg",cat:"plusminus"},{id:"plus-sign",fn:"plus-sign.svg",cat:"plusminus"},{id:"pregnant",fn:"pregnant.svg",cat:"uncategorized"},{id:"pride-heart",fn:"pride-heart.svg",cat:"people-and-health"},{id:"print",fn:"print.svg",cat:"ui"},{id:"privacy",fn:"privacy.svg",cat:"ui"},{id:"process-back",fn:"process-back.svg",cat:"uncategorized"},{id:"process-forward",fn:"process-forward.svg",cat:"uncategorized"},{id:"process-iteration",fn:"process-iteration.svg",cat:"uncategorized"},{id:"processing",fn:"processing.svg",cat:"uncategorized"},{id:"prohibited",fn:"prohibited.svg",cat:"uncategorized"},{id:"punkt-circle-blue",fn:"punkt-circle-blue.svg",cat:"social"},{id:"qr-code",fn:"qr-code.svg",cat:"ui"},{id:"question",fn:"question.svg",cat:"ui"},{id:"radio-checked",fn:"radio-checked.svg",cat:"uncategorized"},{id:"radio-unchecked",fn:"radio-unchecked.svg",cat:"uncategorized"},{id:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"services"},{id:"restaurant",fn:"restaurant.svg",cat:"sign"},{id:"roadblock",fn:"roadblock.svg",cat:"uncategorized"},{id:"ruler",fn:"ruler.svg",cat:"ui"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"sauna",fn:"sauna.svg",cat:"uncategorized"},{id:"save",fn:"save.svg",cat:"ui"},{id:"scooter-prohibited",fn:"scooter-prohibited.svg",cat:"uncategorized"},{id:"scooter",fn:"scooter.svg",cat:"ui"},{id:"search-icon-round-active",fn:"search-icon-round-active.svg",cat:"uncategorized"},{id:"search-icon-round-disabled",fn:"search-icon-round-disabled.svg",cat:"uncategorized"},{id:"search-icon-round-normal",fn:"search-icon-round-normal.svg",cat:"uncategorized"},{id:"search-icon-square-active",fn:"search-icon-square-active.svg",cat:"uncategorized"},{id:"search-icon-square-disabled",fn:"search-icon-square-disabled.svg",cat:"uncategorized"},{id:"search-icon-square-normal",fn:"search-icon-square-normal.svg",cat:"uncategorized"},{id:"share-outline",fn:"share-outline.svg",cat:"ui"},{id:"share",fn:"share.svg",cat:"ui"},{id:"shield-fire",fn:"shield-fire.svg",cat:"services"},{id:"shield-law-paragraph",fn:"shield-law-paragraph.svg",cat:"ui"},{id:"shoes-prohibited",fn:"shoes-prohibited.svg",cat:"uncategorized"},{id:"shop",fn:"shop.svg",cat:"uncategorized"},{id:"shower",fn:"shower.svg",cat:"uncategorized"},{id:"signature",fn:"signature.svg",cat:"uncategorized"},{id:"skateboarding",fn:"skateboarding.svg",cat:"uncategorized"},{id:"slack",fn:"slack.svg",cat:"social"},{id:"sledding",fn:"sledding.svg",cat:"uncategorized"},{id:"smiley-neutral",fn:"smiley-neutral.svg",cat:"feedback"},{id:"smiley-sad",fn:"smiley-sad.svg",cat:"feedback"},{id:"smiley-smile",fn:"smiley-smile.svg",cat:"feedback"},{id:"smoking-prohibited",fn:"smoking-prohibited.svg",cat:"uncategorized"},{id:"snow",fn:"snow.svg",cat:"uncategorized"},{id:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"ui"},{id:"sound-on",fn:"sound-on.svg",cat:"ui"},{id:"sparkles",fn:"sparkles.svg",cat:"ui"},{id:"stairs-down",fn:"stairs-down.svg",cat:"uncategorized"},{id:"stairs-up",fn:"stairs-up.svg",cat:"uncategorized"},{id:"stairs",fn:"stairs.svg",cat:"uncategorized"},{id:"street-vendor",fn:"street-vendor.svg",cat:"uncategorized"},{id:"stroller-prohibited",fn:"stroller-prohibited.svg",cat:"uncategorized"},{id:"stroller",fn:"stroller.svg",cat:"uncategorized"},{id:"studded-tires",fn:"studded-tires.svg",cat:"uncategorized"},{id:"svg-logo",fn:"svg.svg",cat:"social"},{id:"swimming-area",fn:"swimming-area.svg",cat:"uncategorized"},{id:"swingset",fn:"swingset.svg",cat:"services"},{id:"table",fn:"table.svg",cat:"ui"},{id:"tap",fn:"tap.svg",cat:"ui"},{id:"target",fn:"target.svg",cat:"ui"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"tickets",fn:"tickets.svg",cat:"sign"},{id:"toilet-unisex",fn:"toilet-unisex.svg",cat:"uncategorized"},{id:"toilet",fn:"toilet.svg",cat:"uncategorized"},{id:"tool",fn:"tool.svg",cat:"uncategorized"},{id:"touching-prohibited",fn:"touching-prohibited.svg",cat:"uncategorized"},{id:"trail-gate",fn:"trail-gate.svg",cat:"uncategorized"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"tram",fn:"tram.svg",cat:"uncategorized"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trash",fn:"trash.svg",cat:"sign"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"people-and-health"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"people-and-health"},{id:"umbrella-prohibited",fn:"umbrella-prohibited.svg",cat:"uncategorized"},{id:"urban-landscape",fn:"urban-landscape.svg",cat:"uncategorized"},{id:"urinal",fn:"urinal.svg",cat:"uncategorized"},{id:"user",fn:"user.svg",cat:"ui"},{id:"van",fn:"van.svg",cat:"uncategorized"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"viewpoint",fn:"viewpoint.svg",cat:"uncategorized"},{id:"virus",fn:"virus.svg",cat:"uncategorized"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"walking",fn:"walking.svg",cat:"uncategorized"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"sign"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"sign"},{id:"wardrobe",fn:"wardrobe.svg",cat:"sign"},{id:"waste-container",fn:"waste-container.svg",cat:"uncategorized"},{id:"water-faucet",fn:"water-faucet.svg",cat:"services"},{id:"wheelchair-ramp",fn:"wheelchair-ramp.svg",cat:"uncategorized"},{id:"wheelchair",fn:"wheelchair.svg",cat:"sign"},{id:"wifi",fn:"wifi.svg",cat:"sign"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"people-and-health"},{id:"workplace",fn:"workplace.svg",cat:"social"},{id:"wrench",fn:"wrench.svg",cat:"ui"},{id:"x",fn:"x.svg",cat:"uncategorized"}],A2=({propKey:r,spec:n,props:i,handleChange:l})=>{const c={BOOLEAN:"boolean",ICON:"icon",ARRAY:"array",OBJECT:"object",DATE:"ISOdatestring",NUMBER:"number"},h=(T,$)=>{l(r,{...i[r],[T]:$})},m=(T,$,N)=>{const O=[...i[r]];O[T]={...O[T],[$]:N},l(r,O)},D=()=>{const T=[...i[r],{}];l(r,T)},C=T=>{const $=i[r].filter((N,O)=>O!==T);l(r,$)};if(n.type===c.BOOLEAN)return L.jsx(tx,{label:n.name||r,forId:r,helptext:n.description||null,hasFieldset:!0,requiredTag:n.required,children:L.jsx(b0,{id:r,label:r,type:"checkbox",checked:i[r]||!1,onChange:T=>l(r,T.target.checked,n.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(n.type===c.ICON)return L.jsxs(Ob,{label:n.name||r,helptext:n.description||null,id:r,value:i[r]||"",onChange:T=>l(r,T.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),$4.map(T=>L.jsx("option",{value:T.id,children:T.id},T.id))]});if(n.type===c.DATE)return L.jsx(k0,{id:r,label:n.name||r,helptext:n.description||null,value:i[r]||"",multiple:n.variant==="multiple",maxlength:999,onChange:T=>l(r,T.target.value),requiredTag:n.required});if(Array.isArray(n)||Array.isArray(n.type)||Array.isArray(n.values)){const T=Array.isArray(n)?n:n.values||n.type;return L.jsxs(Ob,{label:n.name||r,helptext:n.description||null,id:r,value:i[r],onChange:$=>l(r,$.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),T.map($=>L.jsx("option",{value:$,children:$},$))]})}return n.type===c.NUMBER?L.jsx(ev,{id:r,label:n.name||r,helptext:n.description||null,type:"number",value:i[r]||"",onChange:T=>l(r,parseFloat(T.currentTarget.value)),requiredTag:n.required}):n.type===c.OBJECT?(i[r]||(i[r]={}),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:n.name||r}),Object.entries(n.properties).map(([T,$])=>L.jsx(A2,{propKey:T,props:i[r],spec:$,handleChange:(N,O)=>h(N,O)},T))]})]})):n.type===c.ARRAY&&n.items.type===c.OBJECT?(i[r]||(i[r]=[]),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),i[r].map((T,$)=>L.jsx("div",{children:L.jsxs("fieldset",{children:[L.jsxs("legend",{children:["Item ",$+1]}),Object.entries(n.items.properties).map(([N,O])=>L.jsx(A2,{propKey:N,props:T,spec:O,handleChange:(R,j)=>m($,R,j)},N)),L.jsx($d,{onClick:()=>C($),children:"Fjern denne"})]})},$)),L.jsx($d,{onClick:D,children:"Legg til ny"})]})):L.jsx(ev,{id:r,label:n.name||r,helptext:n.description||null,type:"text",value:i[r]||"",onChange:T=>l(r,n.type==="number"?parseFloat(T.currentTarget.value):T.currentTarget.value),requiredTag:n.required})};Zg.registerLanguage("jsx",x4);const RE=({specs:r,children:n,fullWidth:i})=>{var He,dt;const l=r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).reduce((Me,[Le,de])=>(typeof de=="object"&&!Array.isArray(de)&&de.previewDefault!==void 0&&de.previewDefault!==null?(de.previewDefault==="false"&&(de.previewDefault=!1),de.previewDefault==="true"&&(de.previewDefault=!0),Me[Le]=de.previewDefault):typeof de=="object"&&!Array.isArray(de)&&de.default!==void 0&&de.default!==null&&(de.default==="false"&&(de.default=!1),de.default==="true"&&(de.default=!0),Me[Le]=de.default),Me),{}):{},[c,h]=$e.useState(0),[m,D]=$e.useState(l),[C,T]=$e.useState("light"),[$,N]=$e.useState(""),[O,R]=$e.useState(""),[j,Q]=$e.useState(""),[G,Se]=$e.useState("Rediger innhold"),[V,q]=$e.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${r.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),Z=Me=>{Me===1&&pe(),Me===2&&ae(),Q(""),q(Le=>Le.map((de,Re)=>({...de,active:Re===Me})))},K=$e.useRef(null),ae=async()=>{if(r.isElement&&$e.isValidElement(Ke)){const Me=$e.isValidElement(Ke)?Ke.type.displayName||Ke.type.name:r.name,Le=Object.entries(m).map(([Re,_e])=>{if(_e&&!ke(_e)&&!Ge(_e))return typeof _e=="object"?`${Re}='${JSON.stringify(_e)}'`:`${Re}="${_e}"`}).join(" "),de=await xb(`<${r.name||Me} ${Le}>${G}</${r.name||Me}>`,{parser:"html",plugins:[I1]});N(`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
1546
1546
|
`+de)}else{const Me=await xb(K.current.innerHTML,{parser:"html",plugins:[I1]});N(Me.replace(/<\!--.*?-->/g,""))}},pe=async()=>{const Me=await yR(Ke);return R(Me),Promise.resolve()},Te=(Me,Le)=>{navigator.clipboard.writeText(Le).then(()=>{Q(Me),console.log("Copied to clipboard",Me)})},ke=Me=>Array.isArray(Me)&&Me.length===0,Ge=Me=>Me&&typeof Me=="object"&&!Object.keys(Me).length,Ve=(Me,Le)=>L.jsxs("div",{className:"pkt-preview__copy",children:[j===Me&&L.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),L.jsx($d,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>Te(Me,Le),children:"Kopier kode"})]}),Ke=$e.isValidElement(n)&&$e.cloneElement(n,{...m},n.props.children?n.props.children:(He=r.slots)!=null&&He.default?G:null),nt=(Me,Le,de=!1)=>{if(h(c+1),!de&&(!Le||Le=="false")){const{[Me]:Re,..._e}=m;D(_e)}else D(Re=>({...Re,[Me]:Le}))};return L.jsxs("div",{className:"pkt-preview",children:[L.jsxs("div",{className:"pkt-preview__component-container","data-mode":C,children:[r["dark-mode"]&&L.jsx("div",{className:"pkt-preview__mode",children:L.jsx(b0,{id:"mode",label:"Dark mode",type:"checkbox",checked:C==="dark",onChange:Me=>T(Me.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),L.jsx("div",{className:`pkt-preview__component ${i&&"pkt-preview__component--fullwidth"}`,ref:K,children:L.jsx("div",{children:Ke})},c)]}),L.jsx(OE,{tabs:V,onTabSelected:Z}),L.jsxs("div",{className:`pkt-grid pkt-preview__opts ${V[0].active?"":"pkt-hide"}`,children:[((dt=r.slots)==null?void 0:dt.default)&&!n.props.children&&L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Gh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),L.jsx(ev,{id:"slot",label:"Slot",helptext:r.slots.default.description||"Innholdet i slot",type:"text",value:G,onChange:Me=>Se(Me.currentTarget.value)})]}),r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).map(([Me,Le])=>L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Gh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:Me}),L.jsx(A2,{propKey:Me,props:m,spec:Le,handleChange:nt})]},Me)):L.jsx("p",{children:"OBS! Specs mangler props!"})]}),L.jsxs("div",{className:`pkt-preview__code ${V[1].active?"":"pkt-hide"}`,children:[L.jsx(Zg,{language:"jsx",style:NE,children:O}),Ve("jsx",O)]}),L.jsxs("div",{className:`pkt-preview__code ${V[2].active?"":"pkt-hide"}`,children:[L.jsx(Zg,{language:"html",style:NE,children:$}),Ve("html",$)]}),L.jsx("div",{className:`pkt-preview__specs ${V[3].active?"":"pkt-hide"}`,children:L.jsx(A4,{specs:r})})]})};RE.displayName="PktPreview";const P4=zr({tagName:"pkt-progressbar",elementClass:ia,react:$e,displayName:"PktProgressbar",events:{}}),LE=$e.forwardRef(({children:r,...n},i)=>L.jsx(P4,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));LE.displayName="PktProgressbar";const N4=zr({tagName:"pkt-radiobutton",elementClass:mu,react:$e,displayName:"PktRadioButton",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange"}}),O4=$e.forwardRef(({appearance:r="local",disabled:n=!1,fullwidth:i=!1,id:l,label:c,name:h,placeholder:m="Søk…",suggestions:D,value:C="",action:T,method:$,onChange:N,onSearch:O,onSuggestionClick:R,...j},Q)=>{const G=(Z,K)=>{Z?Z():R&&R(K)},Se=Z=>{C=Z.target.value},V=`pkt-searchinput pkt-searchinput--${r} ${i?"pkt-searchinput--fullwidth":""}`;let q;return T?q=Z=>L.jsx("form",{role:"search",className:V,action:T,method:$,children:Z}):q=Z=>L.jsx("div",{role:"search",className:V,children:Z}),q(L.jsxs(L.Fragment,{children:[c&&L.jsx("label",{htmlFor:c?l:void 0,className:c?"pkt-inputwrapper__label":"",children:c}),L.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[L.jsx("input",{className:`pkt-input ${i?"pkt-input--fullwidth":""}`,type:"search",name:h||l,id:l,placeholder:m,defaultValue:C,disabled:n,autoComplete:"off","aria-autocomplete":"list",ref:Q,"aria-controls":`${l}-suggestions`,onChange:N||Se,onKeyUp:O&&(Z=>{Z.key==="Enter"&&(Z.preventDefault(),O(C))}),...j}),L.jsx($d,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:n,onClick:O&&(Z=>{Z.preventDefault(),O(C)}),children:c||m})]}),D&&L.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:D.map((Z,K)=>L.jsx("li",{children:$e.createElement(Z.href?"a":Z.onClick?"button":"div",{href:Z.href,className:`pkt-searchinput__suggestion ${Z.onClick?"pkt-link-button":""} ${Z.href||Z.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:Z.onClick?"button":void 0,onClick:()=>G(Z.onClick,K),onKeyUp:ae=>ae.key==="Enter"&&G(Z.onClick,K)},L.jsxs(L.Fragment,{children:[Z.title&&L.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:Z.title}),Z.text&&L.jsx("p",{className:"pkt-searchinput__suggestion-text",children:Z.text})]}))},`search-suggestion-${K}`))})]}))}),R4=$e.forwardRef(({activeStep:r,className:n,children:i,hideNonActiveSteps:l=!1,hideNonActiveStepsContent:c=!0,orientation:h="vertical",...m},D)=>{const C=ml(n,"pkt-stepper",h==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),T=$e.Children.map(i,($,N)=>$e.isValidElement($)?$e.cloneElement($,{className:ml($.props.className,{"pkt-step--hideStep":l&&N!==r,"pkt-step--hideContent":c&&N!==r})}):$);return L.jsx("ol",{"data-testid":"pkt-stepper",className:C,ref:D,...m,children:T})}),L4=L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:L.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),B4=L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[L.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),L.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),M4=L.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[L.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),L.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),I4=({children:r,className:n,status:i="incomplete",title:l})=>L.jsxs("li",{className:ml("pkt-step",n,`pkt-step--${i}`),"data-testid":"pkt-step",children:[L.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),L.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),L.jsx("span",{className:ml("pkt-step__indicator"),children:i==="current"?B4:i==="completed"?M4:L4}),L.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),L.jsxs("div",{className:"pkt-step__wrapper",children:[L.jsx("div",{className:"pkt-step__title",children:l}),L.jsx("div",{className:"pkt-step__content",children:r})]})]}),j4=zr({tagName:"pkt-textarea",elementClass:Wf,react:$e,displayName:"PktTextarea",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),BE=$e.forwardRef(({helptext:r,...n},i)=>L.jsx(j4,{...n,ref:i,children:r&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:r})}));BE.displayName="PktTextarea";var Kh=window.CustomEvent;(!Kh||typeof Kh=="object")&&(Kh=function(r,n){n=n||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(r,!!n.bubbles,!!n.cancelable,n.detail||null),i},Kh.prototype=window.Event.prototype);function ME(r,n){var i="on"+n.type.toLowerCase();return typeof r[i]=="function"&&r[i](n),r.dispatchEvent(n)}function z4(r){for(;r&&r!==document.body;){var n=window.getComputedStyle(r),i=function(l,c){return!(n[l]===void 0||n[l]===c)};if(n.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||n.isolation==="isolate"||n.position==="fixed"||n.webkitOverflowScrolling==="touch")return!0;r=r.parentElement}return!1}function tv(r){for(;r;){if(r.localName==="dialog")return r;r.parentElement?r=r.parentElement:r.parentNode?r=r.parentNode.host:r=null}return null}function IE(r){for(;r&&r.shadowRoot&&r.shadowRoot.activeElement;)r=r.shadowRoot.activeElement;r&&r.blur&&r!==document.body&&r.blur()}function U4(r,n){for(var i=0;i<r.length;++i)if(r[i]===n)return!0;return!1}function F2(r){return!r||!r.hasAttribute("method")?!1:r.getAttribute("method").toLowerCase()==="dialog"}function jE(r){var n=["button","input","keygen","select","textarea"],i=n.map(function(m){return m+":not([disabled])"});i.push('[tabindex]:not([disabled]):not([tabindex=""])');var l=r.querySelector(i.join(", "));if(!l&&"attachShadow"in Element.prototype)for(var c=r.querySelectorAll("*"),h=0;h<c.length&&!(c[h].tagName&&c[h].shadowRoot&&(l=jE(c[h].shadowRoot),l));h++);return l}function zE(r){return r.isConnected||document.body.contains(r)}function UE(r){if(r.submitter)return r.submitter;var n=r.target;if(!(n instanceof HTMLFormElement))return null;var i=In.formSubmitter;if(!i){var l=r.target,c="getRootNode"in l&&l.getRootNode()||document;i=c.activeElement}return!i||i.form!==n?null:i}function H4(r){if(!r.defaultPrevented){var n=r.target,i=In.imagemapUseValue,l=UE(r);i===null&&l&&(i=l.value);var c=tv(n);if(c){var h=l&&l.getAttribute("formmethod")||n.getAttribute("method");h==="dialog"&&(r.preventDefault(),i!=null?c.close(i):c.close())}}}function HE(r){if(this.dialog_=r,this.replacedStyleTop_=!1,this.openAsModal_=!1,r.hasAttribute("role")||r.setAttribute("role","dialog"),r.show=this.show.bind(this),r.showModal=this.showModal.bind(this),r.close=this.close.bind(this),r.addEventListener("submit",H4,!1),"returnValue"in r||(r.returnValue=""),"MutationObserver"in window){var n=new MutationObserver(this.maybeHideModal.bind(this));n.observe(r,{attributes:!0,attributeFilter:["open"]})}else{var i=!1,l=(function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}).bind(this),c,h=function(m){if(m.target===r){var D="DOMNodeRemoved";i|=m.type.substr(0,D.length)===D,window.clearTimeout(c),c=window.setTimeout(l,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(m){r.addEventListener(m,h)})}Object.defineProperty(r,"open",{set:this.setOpen.bind(this),get:r.hasAttribute.bind(r,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}HE.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&zE(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),In.dm.removeDialog(this))},setOpen:function(r){r?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(r){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var n=document.createElement("div");this.dialog_.insertBefore(n,this.dialog_.firstChild),n.tabIndex=-1,n.focus(),this.dialog_.removeChild(n)}var i=document.createEvent("MouseEvents");i.initMouseEvent(r.type,r.bubbles,r.cancelable,window,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget),this.dialog_.dispatchEvent(i),r.stopPropagation()},focus_:function(){var r=this.dialog_.querySelector("[autofocus]:not([disabled])");!r&&this.dialog_.tabIndex>=0&&(r=this.dialog_),r||(r=jE(this.dialog_)),IE(document.activeElement),r&&r.focus()},updateZIndex:function(r,n){if(r<n)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=r,this.backdrop_.style.zIndex=n},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!zE(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!In.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");z4(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,In.needsCentering(this.dialog_)?(In.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(r){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),r!==void 0&&(this.dialog_.returnValue=r);var n=new Kh("close",{bubbles:!1,cancelable:!1});ME(this.dialog_,n)}};var In={};if(In.reposition=function(r){var n=document.body.scrollTop||document.documentElement.scrollTop,i=n+(window.innerHeight-r.offsetHeight)/2;r.style.top=Math.max(n,i)+"px"},In.isInlinePositionSetByStylesheet=function(r){for(var n=0;n<document.styleSheets.length;++n){var i=document.styleSheets[n],l=null;try{l=i.cssRules}catch{}if(l)for(var c=0;c<l.length;++c){var h=l[c],m=null;try{m=document.querySelectorAll(h.selectorText)}catch{}if(!(!m||!U4(m,r))){var D=h.style.getPropertyValue("top"),C=h.style.getPropertyValue("bottom");if(D&&D!=="auto"||C&&C!=="auto")return!0}}}return!1},In.needsCentering=function(r){var n=window.getComputedStyle(r);return n.position!=="absolute"||r.style.top!=="auto"&&r.style.top!==""||r.style.bottom!=="auto"&&r.style.bottom!==""?!1:!In.isInlinePositionSetByStylesheet(r)},In.forceRegisterDialog=function(r){if((window.HTMLDialogElement||r.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",r),r.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new HE(r)},In.registerDialog=function(r){r.showModal||In.forceRegisterDialog(r)},In.DialogManager=function(){this.pendingDialogStack=[];var r=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(n){this.forwardTab_=void 0,n.stopPropagation(),r([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(n){var i=[];n.forEach(function(l){for(var c=0,h;h=l.removedNodes[c];++c){if(h instanceof Element)h.localName==="dialog"&&i.push(h);else continue;i=i.concat(h.querySelectorAll("dialog"))}}),i.length&&r(i)}))},In.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},In.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},In.DialogManager.prototype.updateStacking=function(){for(var r=this.zIndexHigh_,n=0,i;i=this.pendingDialogStack[n];++n)i.updateZIndex(--r,--r),n===0&&(this.overlay.style.zIndex=--r);var l=this.pendingDialogStack[0];if(l){var c=l.dialog.parentNode||document.body;c.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},In.DialogManager.prototype.containedByTopDialog_=function(r){for(;r=tv(r);){for(var n=0,i;i=this.pendingDialogStack[n];++n)if(i.dialog===r)return n===0;r=r.parentElement}return!1},In.DialogManager.prototype.handleFocus_=function(r){var n=r.composedPath?r.composedPath()[0]:r.target;if(!this.containedByTopDialog_(n)&&document.activeElement!==document.documentElement&&(r.preventDefault(),r.stopPropagation(),IE(n),this.forwardTab_!==void 0)){var i=this.pendingDialogStack[0],l=i.dialog,c=l.compareDocumentPosition(n);return c&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():n!==document.documentElement&&document.documentElement.focus()),!1}},In.DialogManager.prototype.handleKey_=function(r){if(this.forwardTab_=void 0,r.keyCode===27){r.preventDefault(),r.stopPropagation();var n=new Kh("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&ME(i.dialog,n)&&i.dialog.close()}else r.keyCode===9&&(this.forwardTab_=!r.shiftKey)},In.DialogManager.prototype.checkDOM_=function(r){var n=this.pendingDialogStack.slice();n.forEach(function(i){r.indexOf(i.dialog)!==-1?i.downgradeModal():i.maybeHideModal()})},In.DialogManager.prototype.pushDialog=function(r){var n=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=n?!1:(this.pendingDialogStack.unshift(r)===1&&this.blockDocument(),this.updateStacking(),!0)},In.DialogManager.prototype.removeDialog=function(r){var n=this.pendingDialogStack.indexOf(r);n!==-1&&(this.pendingDialogStack.splice(n,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},In.dm=new In.DialogManager,In.formSubmitter=null,In.imagemapUseValue=null,window.HTMLDialogElement===void 0){var qE=document.createElement("form");if(qE.setAttribute("method","dialog"),qE.method!=="dialog"){var Qh=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(Qh){var q4=Qh.get;Qh.get=function(){return F2(this)?"dialog":q4.call(this)};var V4=Qh.set;Qh.set=function(r){return typeof r=="string"&&r.toLowerCase()==="dialog"?this.setAttribute("method",r):V4.call(this,r)},Object.defineProperty(HTMLFormElement.prototype,"method",Qh)}}document.addEventListener("click",function(r){if(In.formSubmitter=null,In.imagemapUseValue=null,!r.defaultPrevented){var n=r.target;if("composedPath"in r){var i=r.composedPath();n=i.shift()||n}if(!(!n||!F2(n.form))){var l=n.type==="submit"&&["button","input"].indexOf(n.localName)>-1;if(!l){if(!(n.localName==="input"&&n.type==="image"))return;In.imagemapUseValue=r.offsetX+","+r.offsetY}var c=tv(n);c&&(In.formSubmitter=n)}}},!1),document.addEventListener("submit",function(r){var n=r.target,i=tv(n);if(!i){var l=UE(r),c=l&&l.getAttribute("formmethod")||n.getAttribute("method");c==="dialog"&&r.preventDefault()}});var W4=HTMLFormElement.prototype.submit,Y4=function(){if(!F2(this))return W4.call(this);var r=tv(this);r&&r.close()};HTMLFormElement.prototype.submit=Y4}const G4=Object.freeze(Object.defineProperty({__proto__:null,default:In},Symbol.toStringTag,{value:"Module"}));Ot.PktAccordion=W_,Ot.PktAccordionItem=Y_,Ot.PktAlert=G_,Ot.PktBackLink=K_,Ot.PktBreadcrumbs=pO,Ot.PktButton=$d,Ot.PktCard=Q_,Ot.PktCheckbox=b0,Ot.PktCombobox=X_,Ot.PktConsent=ab,Ot.PktDatepicker=k0,Ot.PktFooter=vO,Ot.PktFooterSimple=yO,Ot.PktHeader=kO,Ot.PktHelptext=Z_,Ot.PktIcon=or,Ot.PktInput=ex,Ot.PktInputWrapper=tx,Ot.PktLink=nx,Ot.PktLinkCard=rx,Ot.PktLoader=ax,Ot.PktMessagebox=ix,Ot.PktModal=ox,Ot.PktPreview=RE,Ot.PktProgressbar=LE,Ot.PktRadioButton=N4,Ot.PktSearchInput=O4,Ot.PktSelect=Ob,Ot.PktStep=I4,Ot.PktStepper=R4,Ot.PktTable=$b,Ot.PktTableBody=Nb,Ot.PktTableDataCell=Zo,Ot.PktTableHeader=Pb,Ot.PktTableHeaderCell=gl,Ot.PktTableRow=ap,Ot.PktTabs=OE,Ot.PktTag=Gh,Ot.PktTextarea=BE,Ot.PktTextinput=ev,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.42.
|
|
3
|
+
"version": "12.42.11",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
40
40
|
"@lit/react": "^1.0.7",
|
|
41
|
-
"@oslokommune/punkt-elements": "^12.42.
|
|
41
|
+
"@oslokommune/punkt-elements": "^12.42.11",
|
|
42
42
|
"angular-html-parser": "^6.0.2",
|
|
43
43
|
"html-format": "^1.1.7",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
|
51
|
-
"@oslokommune/punkt-assets": "^12.42.
|
|
52
|
-
"@oslokommune/punkt-css": "^12.42.
|
|
51
|
+
"@oslokommune/punkt-assets": "^12.42.11",
|
|
52
|
+
"@oslokommune/punkt-css": "^12.42.11",
|
|
53
53
|
"@testing-library/jest-dom": "^6.5.0",
|
|
54
54
|
"@testing-library/react": "^16.0.1",
|
|
55
55
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
113
113
|
},
|
|
114
114
|
"license": "MIT",
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "f5831df3345ab47a5fb829d207aaf7b05fa14b30"
|
|
116
116
|
}
|