@oslokommune/punkt-react 12.32.8 → 12.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/punkt-react.es.js
CHANGED
|
@@ -22755,7 +22755,7 @@ var xL = Object.defineProperty, _L = Object.getOwnPropertyDescriptor, vy = (r, n
|
|
|
22755
22755
|
return l && d && xL(n, i, d), d;
|
|
22756
22756
|
};
|
|
22757
22757
|
window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch;
|
|
22758
|
-
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.
|
|
22758
|
+
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.33/icons/";
|
|
22759
22759
|
const EL = (r) => new Promise((n) => setTimeout(n, r)), Wk = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', AD = {}, TL = async (r, n) => {
|
|
22760
22760
|
let i = 0;
|
|
22761
22761
|
for (; AD[n + r + ".svg"] === "fetching" && (i++, !(i > 50)); )
|
|
@@ -22976,7 +22976,7 @@ let uo = class extends ga {
|
|
|
22976
22976
|
${this.isLoading ? Ae`<pkt-icon
|
|
22977
22977
|
class="pkt-btn__icon pkt-btn__spinner"
|
|
22978
22978
|
name="spinner-blue"
|
|
22979
|
-
path="https://punkt-cdn.oslo.kommune.no/12.
|
|
22979
|
+
path="https://punkt-cdn.oslo.kommune.no/12.33/animations/"
|
|
22980
22980
|
></pkt-icon>` : nt}
|
|
22981
22981
|
${this.variant !== "label-only" ? Ae`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>` : nt}
|
|
22982
22982
|
<span class="pkt-btn__text" ${fn(this.defaultSlot)}></span>
|
|
@@ -27211,7 +27211,7 @@ let Gu = class extends ga {
|
|
|
27211
27211
|
${this.isLoading && this._shouldDisplayLoader ? Ae`<div class="pkt-loader__spinner">
|
|
27212
27212
|
<pkt-icon
|
|
27213
27213
|
name=${this.getVariant(this.variant)}
|
|
27214
|
-
path="https://punkt-cdn.oslo.kommune.no/12.
|
|
27214
|
+
path="https://punkt-cdn.oslo.kommune.no/12.33/animations/"
|
|
27215
27215
|
class="pkt-loader__svg pkt-loader__${this.variant}"
|
|
27216
27216
|
></pkt-icon>
|
|
27217
27217
|
${this.message && Ae`<p>${this.message}</p>`}
|
|
@@ -28550,7 +28550,7 @@ const uH = ({
|
|
|
28550
28550
|
name: "oslologo",
|
|
28551
28551
|
className: "pkt-header__logo-svg",
|
|
28552
28552
|
"aria-hidden": "true",
|
|
28553
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
28553
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.33/logos/"
|
|
28554
28554
|
}
|
|
28555
28555
|
) }) : /* @__PURE__ */ L.jsx(
|
|
28556
28556
|
"button",
|
|
@@ -28564,7 +28564,7 @@ const uH = ({
|
|
|
28564
28564
|
name: "oslologo",
|
|
28565
28565
|
className: "pkt-header__logo-svg",
|
|
28566
28566
|
"aria-hidden": "true",
|
|
28567
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
28567
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.33/logos/"
|
|
28568
28568
|
}
|
|
28569
28569
|
)
|
|
28570
28570
|
}
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -335,7 +335,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
335
335
|
* @license
|
|
336
336
|
* Copyright 2017 Google LLC
|
|
337
337
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
338
|
-
*/let z0=class extends Oy{};z0.directiveName="unsafeSVG",z0.resultType=2;const Q1=Tf(z0);var Q$=Object.defineProperty,X$=Object.getOwnPropertyDescriptor,hg=(r,n,i,l)=>{for(var d=l>1?void 0:l?X$(n,i):n,g=r.length-1,v;g>=0;g--)(v=r[g])&&(d=(l?v(n,i,d):v(d))||d);return l&&d&&Q$(n,i,d),d};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.
|
|
338
|
+
*/let z0=class extends Oy{};z0.directiveName="unsafeSVG",z0.resultType=2;const Q1=Tf(z0);var Q$=Object.defineProperty,X$=Object.getOwnPropertyDescriptor,hg=(r,n,i,l)=>{for(var d=l>1?void 0:l?X$(n,i):n,g=r.length-1,v;g>=0;g--)(v=r[g])&&(d=(l?v(n,i,d):v(d))||d);return l&&d&&Q$(n,i,d),d};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.33/icons/";const K$=r=>new Promise(n=>setTimeout(n,r)),Ly='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',U0={},J$=async(r,n)=>{let i=0;for(;U0[n+r+".svg"]==="fetching"&&(i++,!(i>50));)await K$(50);return localStorage.getItem(n+r+".svg")?Promise.resolve(localStorage.getItem(n+r+".svg")):typeof window.pktFetch=="function"?(U0[n+r+".svg"]="fetching",Promise.resolve(window.pktFetch(n+r+".svg").then(l=>l.ok?l.text():(console.error("Missing icon: "+n+r+".svg"),Ly)).then(l=>(l!==Ly&&localStorage.setItem(n+r+".svg",l),U0[n+r+".svg"]="fetched",l)))):Promise.resolve(Ly)};let Af=class extends aa{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=Q1(Ly),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(n,i,l){super.attributeChangedCallback(n,i,l),(n==="name"||n==="path")&&this.getIcon(this.name)}async updated(n){super.updated(n),(n.has("name")||n.has("path"))&&this.getIcon(this.name)}async getIcon(n=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=Q1(await J$(this.name||"",this.path).then(i=>i)),this._updatedProps=[]):this._updatedProps.includes(n)||this._updatedProps.push(n)}render(){return Ae`${this.name&&this.icon}`}};hg([V({type:String,reflect:!1})],Af.prototype,"path",2),hg([V({type:String,reflect:!0})],Af.prototype,"name",2),hg([V({type:SVGElement})],Af.prototype,"icon",2),hg([V({type:Array,noAccessor:!0})],Af.prototype,"_updatedProps",2),Af=hg([Fr("pkt-icon")],Af);const Z$={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},By={props:Z$};var eP=Object.defineProperty,tP=Object.getOwnPropertyDescriptor,nc=(r,n,i,l)=>{for(var d=l>1?void 0:l?tP(n,i):n,g=r.length-1,v;g>=0;g--)(v=r[g])&&(d=(l?v(n,i,d):v(d))||d);return l&&d&&eP(n,i,d),d};let il=class extends aa{constructor(){super(),this.defaultSlot=wn(),this.compact=By.props.compact.default,this.title="",this.skin=By.props.skin.default,this.ariaLive=By.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=By.props.closeAlert.default,this.date=null,this._isClosed=!1,this.close=n=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:n},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:n},bubbles:!0,composed:!0}))},this.slotController=new Ka(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(n,i,l){n==="ariaLive"&&(this["aria-live"]=l),super.attributeChangedCallback(n,i,l)}updated(n){super.updated(n),n.has("ariaLive")&&(this["aria-live"]=this.ariaLive),n.has("_isClosed")&&Y1(this,"pkt-hide",this._isClosed)}render(){const n={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed};return Ae`
|
|
339
339
|
<div class=${cn(n)}>
|
|
340
340
|
<pkt-icon
|
|
341
341
|
class="pkt-alert__icon"
|
|
@@ -382,7 +382,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
382
382
|
${this.isLoading?Ae`<pkt-icon
|
|
383
383
|
class="pkt-btn__icon pkt-btn__spinner"
|
|
384
384
|
name="spinner-blue"
|
|
385
|
-
path="https://punkt-cdn.oslo.kommune.no/12.
|
|
385
|
+
path="https://punkt-cdn.oslo.kommune.no/12.33/animations/"
|
|
386
386
|
></pkt-icon>`:rt}
|
|
387
387
|
${this.variant!=="label-only"?Ae`<pkt-icon class="pkt-btn__icon pkt-icon" name=${this.iconName}></pkt-icon>`:rt}
|
|
388
388
|
<span class="pkt-btn__text" ${dn(this.defaultSlot)}></span>
|
|
@@ -1025,7 +1025,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1025
1025
|
${this.isLoading&&this._shouldDisplayLoader?Ae`<div class="pkt-loader__spinner">
|
|
1026
1026
|
<pkt-icon
|
|
1027
1027
|
name=${this.getVariant(this.variant)}
|
|
1028
|
-
path="https://punkt-cdn.oslo.kommune.no/12.
|
|
1028
|
+
path="https://punkt-cdn.oslo.kommune.no/12.33/animations/"
|
|
1029
1029
|
class="pkt-loader__svg pkt-loader__${this.variant}"
|
|
1030
1030
|
></pkt-icon>
|
|
1031
1031
|
${this.message&&Ae`<p>${this.message}</p>`}
|
|
@@ -1309,7 +1309,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1309
1309
|
Copyright (c) 2018 Jed Watson.
|
|
1310
1310
|
Licensed under the MIT License (MIT), see
|
|
1311
1311
|
http://jedwatson.github.io/classnames
|
|
1312
|
-
*/(function(r){(function(){var n={}.hasOwnProperty;function i(){for(var g="",v=0;v<arguments.length;v++){var D=arguments[v];D&&(g=d(g,l(D)))}return g}function l(g){if(typeof g=="string"||typeof g=="number")return g;if(typeof g!="object")return"";if(Array.isArray(g))return i.apply(null,g);if(g.toString!==Object.prototype.toString&&!g.toString.toString().includes("[native code]"))return g.toString();var v="";for(var D in g)n.call(g,D)&&g[D]&&(v=d(v,D));return v}function d(g,v){return v?g?g+" "+v:g+v:g}r.exports?(i.default=i,r.exports=i):window.classNames=i})()})(wC);var w3=wC.exports;const ws=Cy(w3),D3=Le.forwardRef(({title:r,className:n,children:i,toggleProps:l,defaultOpen:d=!1,id:g},v)=>{const[D,x]=Le.useState(d),E=l?l.isOpen:D,A=B=>B??void 0,N=(B,j)=>{B.preventDefault(),l!==void 0&&l.onToggleClick(B,j),x(!E)},O=ws(n,"pkt-accordion-item");return L.jsxs("details",{className:O,ref:v,id:g,open:A(l?l.isOpen:D),children:[L.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${g}`,onClick:B=>N(B,g),children:[r,L.jsx(dr,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),L.jsx("div",{id:`pkt-accordion-item-content-${g}`,role:"region",className:"pkt-accordion-item__content",children:i})]})}),S3=Yr({tagName:"pkt-alert",elementClass:il,react:Le,displayName:"PktAlert",events:{onClose:"close"}}),DC=Le.forwardRef(({children:r,...n},i)=>L.jsx(S3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));DC.displayName="PktAlert";const SC=Yr({tagName:"pkt-backlink",elementClass:mh,react:Le,displayName:"PktBackLink"});SC.displayName="PktBackLink";const C3=Le.forwardRef(({breadcrumbs:r,navigationType:n,className:i,...l},d)=>{const g=r.slice(0,4),v=g[g.length-2],D=[i,"pkt-breadcrumbs"].filter(Boolean).join(" ");return L.jsxs("nav",{ref:d,"aria-label":"brødsmulemeny",className:D,children:[L.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:g.map((x,E)=>L.jsx("li",{className:"pkt-breadcrumbs__item",children:E===g.length-1?L.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})}):n==="router"?L.jsxs(Cf.Link,{to:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(dr,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]}):L.jsxs("a",{href:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(dr,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]})},`breadcrumb-${E}`))}),n==="router"?L.jsxs(Cf.Link,{to:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(dr,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]}):L.jsxs("a",{href:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(dr,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]})]})}),x3=Yr({tagName:"pkt-button",elementClass:zi,react:Le,displayName:"PktButton",events:{onButtonClick:"button-click"}}),wd=Le.forwardRef(({children:r,...n},i)=>L.jsx(x3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));wd.displayName="PktButton";const _3=Yr({tagName:"pkt-card",elementClass:rc,react:Le,displayName:"PktCard",events:{}}),CC=Le.forwardRef(({children:r,...n},i)=>L.jsx(_3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));CC.displayName="PktCard";const J0=Yr({tagName:"pkt-checkbox",elementClass:bs,react:Le,displayName:"PktCheckbox",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange"}}),E3=Yr({tagName:"pkt-combobox",elementClass:zr,react:Le,displayName:"PktCombobox",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),xC=Le.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(E3,{...i,ref:l,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));xC.displayName="PktCombobox";const T3=Yr({tagName:"pkt-datepicker",elementClass:Ur,react:Le,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Z0=Le.forwardRef(({helptext:r,...n},i)=>L.jsx(T3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",slot:"helptext",children:r})}));Z0.displayName="PktDatepicker";const F3=({columnOne:r,columnTwo:n,socialLinks:i,className:l,openLinksInNewTab:d=!1,personvernOgInfoLink:g="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:v="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var x,E;const D=[l,"pkt-footer"].filter(Boolean).join(" ");return L.jsx("footer",{className:D,"data-mode":"dark",children:L.jsxs("div",{className:"pkt-footer__container",children:[L.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:r.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&L.jsx("li",{className:"pkt-footer__text",children:r.text}),(x=r.links)==null?void 0:x.map((A,N)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${N}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:n.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&L.jsx("li",{className:"pkt-footer__text",children:n.text}),(E=n.links)==null?void 0:E.map((A,N)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${N}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),L.jsxs("ul",{className:"pkt-footer__list",children:[L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:"pkt-footer__link",href:g,target:d?"_blank":"_self",rel:d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:"pkt-footer__link",href:v,target:d?"_blank":"_self",rel:d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),i&&L.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[L.jsx("div",{className:"pkt-footer__social-languages",children:i.filter(A=>A.language).map((A,N)=>L.jsx("div",{className:"pkt-footer__social-language",children:L.jsx("a",{href:A.href,"aria-label":`til ${A.language} versjon av nettsiden`,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:A.language})},`sociallinks-language-${N}`))}),L.jsx("div",{className:"pkt-footer__social-icons",children:i.filter(A=>A.iconName).map((A,N)=>L.jsx(Le.Fragment,{children:L.jsx("a",{href:A.href,"aria-label":`til ${A.iconName}`,className:"pkt-footer__social-icon-link",target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:L.jsx(dr,{className:"pkt-footer__social-icon",name:A.iconName})})},`sociallinks-${N}`))})]})]})})},A3=({links:r=[],openLinksInNewTab:n=!1,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:l="https://www.oslo.kommune.no/tilgjengelighet/",className:d})=>{const g=[d,"pkt-footer-simple"].filter(Boolean).join(" ");return L.jsx("footer",{className:g,"data-mode":"dark",children:L.jsx("div",{className:"pkt-footer-simple__container",children:L.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((v,D)=>L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:`pkt-footer-simple__link ${v.external?" pkt-link--external":""}`,href:v.href,target:v.openInNewTab||n?"_blank":"_self",rel:v.openInNewTab||n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),v.text]})},D)),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:l,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},$3=Le.forwardRef(({className:r,logoLink:n="https://www.oslo.kommune.no/",serviceName:i,fixed:l=!0,scrollToHide:d=!0,user:g,userMenu:v,representing:D,userOptions:x,userMenuFooter:E,canChangeRepresentation:A=!0,showMenuButton:N=!1,showLogOutButton:O=!1,openMenu:B,logOut:j,changeRepresentation:G,children:H,...ye},K)=>{const Y=Le.useMemo(()=>typeof(g==null?void 0:g.lastLoggedIn)=="string"?g.lastLoggedIn:g!=null&&g.lastLoggedIn?new Date(g.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[g]),[ne,U]=Le.useState(!1),[ie,le]=Le.useState(0),[Ce,ke]=Le.useState(!1),Qe=Le.useRef(null);Le.useEffect(()=>(document&&(document.addEventListener("mouseup",Ge),window.addEventListener("scroll",Ue)),()=>{document&&(document.removeEventListener("mouseup",Ge),window.removeEventListener("scroll",Ue))}));const Ye=()=>{ke(!Ce)},Ge=Ne=>{Qe.current&&!Qe.current.contains(Ne.target)&&ke(!1)},Ue=()=>{if(d){const Ne=window.pageYOffset||document.documentElement.scrollTop;if(Ne<0||Math.abs(Ne-ie)<60)return;U(Ne>ie),le(Ne)}};return L.jsxs("header",{...ye,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ws(r,"pkt-header",{"pkt-header--fixed":l,"pkt-header--scroll-to-hide":d,"pkt-header--hidden":ne}),ref:K,children:[L.jsxs("div",{className:"pkt-header__logo",children:[typeof n=="string"?L.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:L.jsx(dr,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.32/logos/"})}):L.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:L.jsx(dr,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.32/logos/"})}),L.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:i})]}),L.jsx("nav",{className:"pkt-header__actions",children:L.jsxs("ul",{className:"pkt-header__actions-row",children:[N&&L.jsx("li",{children:L.jsx(wd,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:B,children:"Meny"})}),(g||D)&&L.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Ce&&!ne?"pkt-header--open-dropdown":""}`,ref:Qe,children:[L.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":Ce,onClick:Ye,children:[L.jsx(dr,{name:"user",className:"pkt-btn__icon"}),L.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(D==null?void 0:D.name)||(g==null?void 0:g.name)}),L.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(D==null?void 0:D.shortname)||(g==null?void 0:g.shortname)}),L.jsx(dr,{name:"chevron-thin-down",className:"pkt-btn--closed"}),L.jsx(dr,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),L.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[g&&L.jsxs("li",{children:[L.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),L.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:g.name}),g.lastLoggedIn&&L.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",L.jsx("time",{children:Y})]})]}),v&&L.jsx("li",{children:L.jsx("ul",{className:"pkt-list",children:v.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userMenu-${Ke}`))})}),(D||A)&&L.jsxs("li",{children:[D&&L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),L.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:D.name}),D.orgNumber&&L.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",D.orgNumber]})]}),L.jsx("ul",{className:"pkt-list mt-size-16",children:A&&L.jsx("li",{children:L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:G,children:[L.jsx(dr,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),L.jsx("li",{children:L.jsx("ul",{className:"pkt-list",children:(x||!O)&&L.jsxs(L.Fragment,{children:[x==null?void 0:x.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userOptions-${Ke}`)),!O&&L.jsx("li",{children:L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:j,children:[L.jsx(dr,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),E&&L.jsx("li",{className:"footer",children:L.jsx("ul",{className:"pkt-list-horizontal bordered",children:E.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsx("a",{href:Ne.target,className:"pkt-link",children:Ne.title}):L.jsx("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:Ne.title})},`userMenuFooter-${Ke}`))})})]})]}),H&&L.jsx("li",{children:H}),O&&L.jsx("li",{children:L.jsx(wd,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:j,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),P3=Yr({tagName:"pkt-helptext",elementClass:md,react:Le,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),_C=Le.forwardRef(({children:r,...n},i)=>L.jsx(P3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));_C.displayName="PktHelptext";const EC=Le.forwardRef(({label:r,id:n,children:i,...l},d)=>L.jsxs("div",{className:"pkt-form-group",children:[L.jsx("label",{htmlFor:n,className:"pkt-form-label",children:r}),L.jsx("input",{className:"pkt-form-input",id:n,...l,ref:d}),i]}));EC.displayName="PktInput";const N3=Yr({tagName:"pkt-input-wrapper",elementClass:vr,react:Le,displayName:"PktInputWrapper",events:{onToggleHelpText:"toggleHelpText"}}),TC=Le.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(N3,{ref:l,...i,children:[L.jsx("div",{className:"pkt-contents",slot:"helptext",children:n}),L.jsx("div",{className:"pkt-contents",children:r})]})),O3=Yr({tagName:"pkt-link",elementClass:gd,react:Le,displayName:"PktLink",events:{onClick:"click"}}),FC=Le.forwardRef(({children:r,...n},i)=>L.jsx(O3,{...n,ref:i,children:L.jsx("span",{className:"pkt-contents",children:r})}));FC.displayName="PktLink";const R3=Yr({tagName:"pkt-linkcard",elementClass:ac,react:Le,displayName:"PktLinkCard",events:{}}),AC=Le.forwardRef(({children:r,...n},i)=>L.jsx(R3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));AC.displayName="PktLinkCard";const L3=Yr({tagName:"pkt-loader",elementClass:Jl,react:Le,displayName:"PktLoader",events:{}}),$C=Le.forwardRef(({children:r,...n},i)=>L.jsx(L3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));$C.displayName="PktLoader";const B3=Yr({tagName:"pkt-messagebox",elementClass:yd,react:Le,displayName:"PktMessagebox",events:{onClose:"close"}}),PC=Le.forwardRef(({children:r,...n},i)=>L.jsx(B3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));PC.displayName="PktMessagebox";const M3=Yr({tagName:"pkt-modal",elementClass:Zl,react:Le,displayName:"PktModal",events:{}}),NC=Le.forwardRef(({children:r,...n},i)=>L.jsx(M3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));NC.displayName="PktModal";/*!
|
|
1312
|
+
*/(function(r){(function(){var n={}.hasOwnProperty;function i(){for(var g="",v=0;v<arguments.length;v++){var D=arguments[v];D&&(g=d(g,l(D)))}return g}function l(g){if(typeof g=="string"||typeof g=="number")return g;if(typeof g!="object")return"";if(Array.isArray(g))return i.apply(null,g);if(g.toString!==Object.prototype.toString&&!g.toString.toString().includes("[native code]"))return g.toString();var v="";for(var D in g)n.call(g,D)&&g[D]&&(v=d(v,D));return v}function d(g,v){return v?g?g+" "+v:g+v:g}r.exports?(i.default=i,r.exports=i):window.classNames=i})()})(wC);var w3=wC.exports;const ws=Cy(w3),D3=Le.forwardRef(({title:r,className:n,children:i,toggleProps:l,defaultOpen:d=!1,id:g},v)=>{const[D,x]=Le.useState(d),E=l?l.isOpen:D,A=B=>B??void 0,N=(B,j)=>{B.preventDefault(),l!==void 0&&l.onToggleClick(B,j),x(!E)},O=ws(n,"pkt-accordion-item");return L.jsxs("details",{className:O,ref:v,id:g,open:A(l?l.isOpen:D),children:[L.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${g}`,onClick:B=>N(B,g),children:[r,L.jsx(dr,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),L.jsx("div",{id:`pkt-accordion-item-content-${g}`,role:"region",className:"pkt-accordion-item__content",children:i})]})}),S3=Yr({tagName:"pkt-alert",elementClass:il,react:Le,displayName:"PktAlert",events:{onClose:"close"}}),DC=Le.forwardRef(({children:r,...n},i)=>L.jsx(S3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));DC.displayName="PktAlert";const SC=Yr({tagName:"pkt-backlink",elementClass:mh,react:Le,displayName:"PktBackLink"});SC.displayName="PktBackLink";const C3=Le.forwardRef(({breadcrumbs:r,navigationType:n,className:i,...l},d)=>{const g=r.slice(0,4),v=g[g.length-2],D=[i,"pkt-breadcrumbs"].filter(Boolean).join(" ");return L.jsxs("nav",{ref:d,"aria-label":"brødsmulemeny",className:D,children:[L.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:g.map((x,E)=>L.jsx("li",{className:"pkt-breadcrumbs__item",children:E===g.length-1?L.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})}):n==="router"?L.jsxs(Cf.Link,{to:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(dr,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]}):L.jsxs("a",{href:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(dr,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]})},`breadcrumb-${E}`))}),n==="router"?L.jsxs(Cf.Link,{to:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(dr,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]}):L.jsxs("a",{href:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(dr,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]})]})}),x3=Yr({tagName:"pkt-button",elementClass:zi,react:Le,displayName:"PktButton",events:{onButtonClick:"button-click"}}),wd=Le.forwardRef(({children:r,...n},i)=>L.jsx(x3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));wd.displayName="PktButton";const _3=Yr({tagName:"pkt-card",elementClass:rc,react:Le,displayName:"PktCard",events:{}}),CC=Le.forwardRef(({children:r,...n},i)=>L.jsx(_3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));CC.displayName="PktCard";const J0=Yr({tagName:"pkt-checkbox",elementClass:bs,react:Le,displayName:"PktCheckbox",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange"}}),E3=Yr({tagName:"pkt-combobox",elementClass:zr,react:Le,displayName:"PktCombobox",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),xC=Le.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(E3,{...i,ref:l,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));xC.displayName="PktCombobox";const T3=Yr({tagName:"pkt-datepicker",elementClass:Ur,react:Le,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Z0=Le.forwardRef(({helptext:r,...n},i)=>L.jsx(T3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",slot:"helptext",children:r})}));Z0.displayName="PktDatepicker";const F3=({columnOne:r,columnTwo:n,socialLinks:i,className:l,openLinksInNewTab:d=!1,personvernOgInfoLink:g="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:v="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var x,E;const D=[l,"pkt-footer"].filter(Boolean).join(" ");return L.jsx("footer",{className:D,"data-mode":"dark",children:L.jsxs("div",{className:"pkt-footer__container",children:[L.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:r.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&L.jsx("li",{className:"pkt-footer__text",children:r.text}),(x=r.links)==null?void 0:x.map((A,N)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${N}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:n.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&L.jsx("li",{className:"pkt-footer__text",children:n.text}),(E=n.links)==null?void 0:E.map((A,N)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${A.external?"pkt-link--external":""}`,href:A.href,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),A.text]})},`links-${N}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),L.jsxs("ul",{className:"pkt-footer__list",children:[L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:"pkt-footer__link",href:g,target:d?"_blank":"_self",rel:d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:"pkt-footer__link",href:v,target:d?"_blank":"_self",rel:d?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),i&&L.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[L.jsx("div",{className:"pkt-footer__social-languages",children:i.filter(A=>A.language).map((A,N)=>L.jsx("div",{className:"pkt-footer__social-language",children:L.jsx("a",{href:A.href,"aria-label":`til ${A.language} versjon av nettsiden`,target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:A.language})},`sociallinks-language-${N}`))}),L.jsx("div",{className:"pkt-footer__social-icons",children:i.filter(A=>A.iconName).map((A,N)=>L.jsx(Le.Fragment,{children:L.jsx("a",{href:A.href,"aria-label":`til ${A.iconName}`,className:"pkt-footer__social-icon-link",target:A.openInNewTab||d?"_blank":"_self",rel:A.openInNewTab||d?"noopener noreferrer":void 0,children:L.jsx(dr,{className:"pkt-footer__social-icon",name:A.iconName})})},`sociallinks-${N}`))})]})]})})},A3=({links:r=[],openLinksInNewTab:n=!1,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:l="https://www.oslo.kommune.no/tilgjengelighet/",className:d})=>{const g=[d,"pkt-footer-simple"].filter(Boolean).join(" ");return L.jsx("footer",{className:g,"data-mode":"dark",children:L.jsx("div",{className:"pkt-footer-simple__container",children:L.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((v,D)=>L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:`pkt-footer-simple__link ${v.external?" pkt-link--external":""}`,href:v.href,target:v.openInNewTab||n?"_blank":"_self",rel:v.openInNewTab||n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),v.text]})},D)),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:l,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(dr,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},$3=Le.forwardRef(({className:r,logoLink:n="https://www.oslo.kommune.no/",serviceName:i,fixed:l=!0,scrollToHide:d=!0,user:g,userMenu:v,representing:D,userOptions:x,userMenuFooter:E,canChangeRepresentation:A=!0,showMenuButton:N=!1,showLogOutButton:O=!1,openMenu:B,logOut:j,changeRepresentation:G,children:H,...ye},K)=>{const Y=Le.useMemo(()=>typeof(g==null?void 0:g.lastLoggedIn)=="string"?g.lastLoggedIn:g!=null&&g.lastLoggedIn?new Date(g.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[g]),[ne,U]=Le.useState(!1),[ie,le]=Le.useState(0),[Ce,ke]=Le.useState(!1),Qe=Le.useRef(null);Le.useEffect(()=>(document&&(document.addEventListener("mouseup",Ge),window.addEventListener("scroll",Ue)),()=>{document&&(document.removeEventListener("mouseup",Ge),window.removeEventListener("scroll",Ue))}));const Ye=()=>{ke(!Ce)},Ge=Ne=>{Qe.current&&!Qe.current.contains(Ne.target)&&ke(!1)},Ue=()=>{if(d){const Ne=window.pageYOffset||document.documentElement.scrollTop;if(Ne<0||Math.abs(Ne-ie)<60)return;U(Ne>ie),le(Ne)}};return L.jsxs("header",{...ye,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:ws(r,"pkt-header",{"pkt-header--fixed":l,"pkt-header--scroll-to-hide":d,"pkt-header--hidden":ne}),ref:K,children:[L.jsxs("div",{className:"pkt-header__logo",children:[typeof n=="string"?L.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:L.jsx(dr,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.33/logos/"})}):L.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:L.jsx(dr,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.33/logos/"})}),L.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:i})]}),L.jsx("nav",{className:"pkt-header__actions",children:L.jsxs("ul",{className:"pkt-header__actions-row",children:[N&&L.jsx("li",{children:L.jsx(wd,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:B,children:"Meny"})}),(g||D)&&L.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Ce&&!ne?"pkt-header--open-dropdown":""}`,ref:Qe,children:[L.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":Ce,onClick:Ye,children:[L.jsx(dr,{name:"user",className:"pkt-btn__icon"}),L.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(D==null?void 0:D.name)||(g==null?void 0:g.name)}),L.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(D==null?void 0:D.shortname)||(g==null?void 0:g.shortname)}),L.jsx(dr,{name:"chevron-thin-down",className:"pkt-btn--closed"}),L.jsx(dr,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),L.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[g&&L.jsxs("li",{children:[L.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),L.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:g.name}),g.lastLoggedIn&&L.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",L.jsx("time",{children:Y})]})]}),v&&L.jsx("li",{children:L.jsx("ul",{className:"pkt-list",children:v.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userMenu-${Ke}`))})}),(D||A)&&L.jsxs("li",{children:[D&&L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),L.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:D.name}),D.orgNumber&&L.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",D.orgNumber]})]}),L.jsx("ul",{className:"pkt-list mt-size-16",children:A&&L.jsx("li",{children:L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:G,children:[L.jsx(dr,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),L.jsx("li",{children:L.jsx("ul",{className:"pkt-list",children:(x||!O)&&L.jsxs(L.Fragment,{children:[x==null?void 0:x.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&L.jsx(dr,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userOptions-${Ke}`)),!O&&L.jsx("li",{children:L.jsxs("button",{className:"pkt-link-button pkt-link",onClick:j,children:[L.jsx(dr,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),E&&L.jsx("li",{className:"footer",children:L.jsx("ul",{className:"pkt-list-horizontal bordered",children:E.map((Ne,Ke)=>L.jsx("li",{children:typeof Ne.target=="string"?L.jsx("a",{href:Ne.target,className:"pkt-link",children:Ne.title}):L.jsx("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:Ne.title})},`userMenuFooter-${Ke}`))})})]})]}),H&&L.jsx("li",{children:H}),O&&L.jsx("li",{children:L.jsx(wd,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:j,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),P3=Yr({tagName:"pkt-helptext",elementClass:md,react:Le,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),_C=Le.forwardRef(({children:r,...n},i)=>L.jsx(P3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));_C.displayName="PktHelptext";const EC=Le.forwardRef(({label:r,id:n,children:i,...l},d)=>L.jsxs("div",{className:"pkt-form-group",children:[L.jsx("label",{htmlFor:n,className:"pkt-form-label",children:r}),L.jsx("input",{className:"pkt-form-input",id:n,...l,ref:d}),i]}));EC.displayName="PktInput";const N3=Yr({tagName:"pkt-input-wrapper",elementClass:vr,react:Le,displayName:"PktInputWrapper",events:{onToggleHelpText:"toggleHelpText"}}),TC=Le.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(N3,{ref:l,...i,children:[L.jsx("div",{className:"pkt-contents",slot:"helptext",children:n}),L.jsx("div",{className:"pkt-contents",children:r})]})),O3=Yr({tagName:"pkt-link",elementClass:gd,react:Le,displayName:"PktLink",events:{onClick:"click"}}),FC=Le.forwardRef(({children:r,...n},i)=>L.jsx(O3,{...n,ref:i,children:L.jsx("span",{className:"pkt-contents",children:r})}));FC.displayName="PktLink";const R3=Yr({tagName:"pkt-linkcard",elementClass:ac,react:Le,displayName:"PktLinkCard",events:{}}),AC=Le.forwardRef(({children:r,...n},i)=>L.jsx(R3,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));AC.displayName="PktLinkCard";const L3=Yr({tagName:"pkt-loader",elementClass:Jl,react:Le,displayName:"PktLoader",events:{}}),$C=Le.forwardRef(({children:r,...n},i)=>L.jsx(L3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));$C.displayName="PktLoader";const B3=Yr({tagName:"pkt-messagebox",elementClass:yd,react:Le,displayName:"PktMessagebox",events:{onClose:"close"}}),PC=Le.forwardRef(({children:r,...n},i)=>L.jsx(B3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));PC.displayName="PktMessagebox";const M3=Yr({tagName:"pkt-modal",elementClass:Zl,react:Le,displayName:"PktModal",events:{}}),NC=Le.forwardRef(({children:r,...n},i)=>L.jsx(M3,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));NC.displayName="PktModal";/*!
|
|
1313
1313
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1314
1314
|
*
|
|
1315
1315
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.33.0",
|
|
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.5",
|
|
41
|
-
"@oslokommune/punkt-elements": "^12.
|
|
41
|
+
"@oslokommune/punkt-elements": "^12.33.0",
|
|
42
42
|
"angular-html-parser": "^6.0.2",
|
|
43
43
|
"html-format": "^1.1.7",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
|
|
51
51
|
"@oslokommune/punkt-assets": "^12.30.1",
|
|
52
|
-
"@oslokommune/punkt-css": "^12.
|
|
52
|
+
"@oslokommune/punkt-css": "^12.33.0",
|
|
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": "892989f59c2dd0af07cb234344ffdd828a652c7c"
|
|
116
116
|
}
|