@oslokommune/punkt-react 13.3.1 → 13.4.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
|
@@ -22309,7 +22309,7 @@ var ZW = Object.defineProperty, JW = Object.getOwnPropertyDescriptor, $v = (e, t
|
|
|
22309
22309
|
return o && u && ZW(t, a, u), u;
|
|
22310
22310
|
};
|
|
22311
22311
|
window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch;
|
|
22312
|
-
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
22312
|
+
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/13.4/icons/";
|
|
22313
22313
|
const QW = (e) => new Promise((t) => setTimeout(t, e)), vS = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', fC = {}, e8 = async (e, t) => {
|
|
22314
22314
|
let a = 0;
|
|
22315
22315
|
for (; fC[t + e + ".svg"] === "fetching" && (a++, !(a > 50)); )
|
|
@@ -22651,7 +22651,7 @@ var c8 = Object.defineProperty, d8 = Object.getOwnPropertyDescriptor, Jo = (e, t
|
|
|
22651
22651
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
22652
22652
|
return o && u && c8(t, a, u), u;
|
|
22653
22653
|
};
|
|
22654
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
22654
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.4/animations/";
|
|
22655
22655
|
let vo = class extends ka {
|
|
22656
22656
|
constructor() {
|
|
22657
22657
|
super(), this.defaultSlot = gn(), this.iconName = "user", this.secondIconName = "user", this.mode = "light", this.size = "medium", this.skin = "primary", this.variant = "label-only", this.state = "normal", this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = window.pktAnimationPath, this.slotController = new ni(this, this.defaultSlot);
|
|
@@ -27818,7 +27818,7 @@ var d6 = Object.defineProperty, p6 = Object.getOwnPropertyDescriptor, Ed = (e, t
|
|
|
27818
27818
|
(f = e[d]) && (u = (o ? f(t, a, u) : f(u)) || u);
|
|
27819
27819
|
return o && u && d6(t, a, u), u;
|
|
27820
27820
|
};
|
|
27821
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
27821
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.4/animations/";
|
|
27822
27822
|
let pu = class extends ka {
|
|
27823
27823
|
constructor() {
|
|
27824
27824
|
super(), this.defaultSlot = gn(), this.delay = 0, this.inline = !1, this.isLoading = !0, this.message = null, this.size = "medium", this.variant = "shapes", this.loadingAnimationPath = window.pktAnimationPath, this._shouldDisplayLoader = !1, this.slotController = new ni(this, this.defaultSlot);
|
|
@@ -28977,7 +28977,7 @@ const F6 = yr(
|
|
|
28977
28977
|
] });
|
|
28978
28978
|
}
|
|
28979
28979
|
);
|
|
28980
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
28980
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.4/animations/";
|
|
28981
28981
|
const Xo = yr(
|
|
28982
28982
|
({
|
|
28983
28983
|
children: e,
|
|
@@ -29448,7 +29448,7 @@ const hu = /* @__PURE__ */ Pv(j6), z6 = yr(
|
|
|
29448
29448
|
name: "oslologo",
|
|
29449
29449
|
className: "pkt-header__logo-svg",
|
|
29450
29450
|
"aria-hidden": "true",
|
|
29451
|
-
path: "https://punkt-cdn.oslo.kommune.no/13.
|
|
29451
|
+
path: "https://punkt-cdn.oslo.kommune.no/13.4/logos/"
|
|
29452
29452
|
}
|
|
29453
29453
|
) }) : /* @__PURE__ */ O.jsx(
|
|
29454
29454
|
"button",
|
|
@@ -29462,7 +29462,7 @@ const hu = /* @__PURE__ */ Pv(j6), z6 = yr(
|
|
|
29462
29462
|
name: "oslologo",
|
|
29463
29463
|
className: "pkt-header__logo-svg",
|
|
29464
29464
|
"aria-hidden": "true",
|
|
29465
|
-
path: "https://punkt-cdn.oslo.kommune.no/13.
|
|
29465
|
+
path: "https://punkt-cdn.oslo.kommune.no/13.4/logos/"
|
|
29466
29466
|
}
|
|
29467
29467
|
)
|
|
29468
29468
|
}
|
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 Dk=class extends py{};Dk.directiveName="unsafeSVG",Dk.resultType=2;const d2=$p(Dk);var wz=Object.defineProperty,_z=Object.getOwnPropertyDescriptor,Um=(e,t,a,o)=>{for(var u=o>1?void 0:o?_z(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&wz(t,a,u),u};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/13.
|
|
338
|
+
*/let Dk=class extends py{};Dk.directiveName="unsafeSVG",Dk.resultType=2;const d2=$p(Dk);var wz=Object.defineProperty,_z=Object.getOwnPropertyDescriptor,Um=(e,t,a,o)=>{for(var u=o>1?void 0:o?_z(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&wz(t,a,u),u};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/13.4/icons/";const Cz=e=>new Promise(t=>setTimeout(t,e)),hy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',Tk={},Dz=async(e,t)=>{let a=0;for(;Tk[t+e+".svg"]==="fetching"&&(a++,!(a>50));)await Cz(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.pktFetch=="function"?(Tk[t+e+".svg"]="fetching",Promise.resolve(window.pktFetch(t+e+".svg").then(o=>o.ok?o.text():(console.error("Missing icon: "+t+e+".svg"),hy)).then(o=>(o!==hy&&localStorage.setItem(t+e+".svg",o),Tk[t+e+".svg"]="fetched",o)))):Promise.resolve(hy)};let Up=class extends pa{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=d2(hy),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),(t==="name"||t==="path")&&this.getIcon(this.name)}async updated(t){super.updated(t),(t.has("name")||t.has("path"))&&this.getIcon(this.name)}async getIcon(t=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=d2(await Dz(this.name||"",this.path).then(a=>a)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return Se`${this.name&&this.icon}`}};Um([G({type:String,reflect:!1})],Up.prototype,"path",2),Um([G({type:String,reflect:!0})],Up.prototype,"name",2),Um([G({type:SVGElement})],Up.prototype,"icon",2),Um([G({type:Array,noAccessor:!0})],Up.prototype,"_updatedProps",2),Up=Um([hr("pkt-icon")],Up);const Tz={skin:{default:"info"},ariaLive:{default:"polite"},compact:{default:!1},closeAlert:{default:!1}},gy={props:Tz};var Az=Object.defineProperty,xz=Object.getOwnPropertyDescriptor,mu=(e,t,a,o)=>{for(var u=o>1?void 0:o?xz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Az(t,a,u),u};let Os=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.compact=gy.props.compact.default,this.title="",this.skin=gy.props.skin.default,this.ariaLive=gy.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=gy.props.closeAlert.default,this.date=null,this.role="status",this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0,composed:!0}))},this.slotController=new za(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(t,a,o){t==="ariaLive"&&(this["aria-live"]=o),super.attributeChangedCallback(t,a,o)}updated(t){super.updated(t),t.has("ariaLive")&&(this["aria-live"]=this.ariaLive),t.has("_isClosed")&&c2(this,"pkt-hide",this._isClosed)}render(){const t={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed},a={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return Se`
|
|
339
339
|
<div class=${en(t)} aria-live=${this["aria-live"]}>
|
|
340
340
|
<div class=${en(a)}>
|
|
341
341
|
<pkt-icon
|
|
@@ -415,7 +415,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
415
415
|
></pkt-icon
|
|
416
416
|
><span class="pkt-back-link__text">${this.text}</span></a
|
|
417
417
|
>
|
|
418
|
-
</nav>`}};my([G({type:String,reflect:!0})],Oh.prototype,"href",2),my([G({type:String,reflect:!0})],Oh.prototype,"text",2),my([G({type:String,reflect:!0})],Oh.prototype,"ariaLabel",2),Oh=my([hr("pkt-backlink")],Oh);var Mz=Object.defineProperty,Pz=Object.getOwnPropertyDescriptor,wo=(e,t,a,o)=>{for(var u=o>1?void 0:o?Pz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Mz(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.
|
|
418
|
+
</nav>`}};my([G({type:String,reflect:!0})],Oh.prototype,"href",2),my([G({type:String,reflect:!0})],Oh.prototype,"text",2),my([G({type:String,reflect:!0})],Oh.prototype,"ariaLabel",2),Oh=my([hr("pkt-backlink")],Oh);var Mz=Object.defineProperty,Pz=Object.getOwnPropertyDescriptor,wo=(e,t,a,o)=>{for(var u=o>1?void 0:o?Pz(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&Mz(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.4/animations/";let Xi=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new za(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.preventDefault(),t.stopImmediatePropagation())},!0),this.addEventListener("keydown",t=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.stopImmediatePropagation())},!0)}attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),t==="disabled"&&o==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&o==="false"&&(this.isLoading=!1)}firstUpdated(t){super.firstUpdated(t),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const t=this.form??this.getAttribute("form")??void 0,a={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return Se`
|
|
419
419
|
<button
|
|
420
420
|
class=${en(a)}
|
|
421
421
|
type=${this.type}
|
|
@@ -1145,7 +1145,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1145
1145
|
|
|
1146
1146
|
<div class="pkt-linkcard__text" ${fn(this.defaultSlot)}></div>
|
|
1147
1147
|
</a>
|
|
1148
|
-
`}};Kp([G({type:String,reflect:!0})],Sc.prototype,"title",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"href",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"iconName",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"external",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"openInNewTab",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"skin",2),Sc=Kp([hr("pkt-linkcard")],Sc);var $H=Object.defineProperty,BH=Object.getOwnPropertyDescriptor,kc=(e,t,a,o)=>{for(var u=o>1?void 0:o?BH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&$H(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.
|
|
1148
|
+
`}};Kp([G({type:String,reflect:!0})],Sc.prototype,"title",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"href",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"iconName",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"external",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"openInNewTab",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"skin",2),Sc=Kp([hr("pkt-linkcard")],Sc);var $H=Object.defineProperty,BH=Object.getOwnPropertyDescriptor,kc=(e,t,a,o)=>{for(var u=o>1?void 0:o?BH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&$H(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.4/animations/";let yl=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new za(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=en({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=en({"pkt-contents":!0,"pkt-hide":this.isLoading});return Se`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${t}>
|
|
1149
1149
|
${this.isLoading&&this._shouldDisplayLoader?Se`<div class="pkt-loader__spinner">
|
|
1150
1150
|
<pkt-icon
|
|
1151
1151
|
name=${this.getVariant(this.variant)}
|
|
@@ -1446,11 +1446,11 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1446
1446
|
<ul>
|
|
1447
1447
|
${e.map(t=>Se`<li>${t}</li>`)}
|
|
1448
1448
|
</ul>
|
|
1449
|
-
`}doStuff(e){return e.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Zm([G({type:String})],Bh.prototype,"string",2),Zm([G({converter:x2})],Bh.prototype,"strings",2),Zm([G({type:Boolean})],Bh.prototype,"darkmode",2),Zm([G({type:Array})],Bh.prototype,"_list",2),Bh=Zm([hr("pkt-component")],Bh);const On=ki({tagName:"pkt-icon",elementClass:Up,react:Te,displayName:"PktIcon",events:{}}),Uh=Te.forwardRef(({defaultOpen:e=!1,id:t,title:a,skin:o,compact:u=!1,isOpen:d,children:f,name:y,className:E,onClick:_,onToggle:T},x)=>{const[N,L]=Te.useState(e),{name:P}=R3(),j=y||P,$=d!==void 0?d:N;Te.useEffect(()=>{d===void 0&&L(e)},[e,d]);const te=V=>{const J=V.currentTarget.open;d===void 0&&L(J),T==null||T(V)},U=V=>{setTimeout(()=>{_==null||_(V)},0)},z=["pkt-accordion-item",u&&"pkt-accordion-item--compact",o&&`pkt-accordion-item--${o}`,E].filter(Boolean).join(" ");return O.jsxs("details",{ref:x,className:z,id:t,open:$,onClick:U,name:j,onToggle:te,children:[O.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[a,O.jsx(On,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),O.jsx("div",{className:"pkt-accordion-item__content",id:`pkt-accordion-item__content-${t}`,role:"region",children:O.jsx("div",{className:"pkt-accordion-item__content-inner",children:f})})]})});Uh.displayName="PktAccordionItem";const s4=ki({tagName:"pkt-alert",elementClass:Os,react:Te,displayName:"PktAlert",events:{onClose:"close"}}),Sy=Te.forwardRef(({children:e,...t},a)=>O.jsx(s4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",children:e})}));Sy.displayName="PktAlert";const Bk=ki({tagName:"pkt-backlink",elementClass:Oh,react:Te,displayName:"PktBackLink"});Bk.displayName="PktBackLink";const M2=Te.forwardRef(({breadcrumbs:e,navigationType:t,className:a,...o},u)=>{const d=e,f=d[d.length-2],y=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:u,"aria-label":"brødsmulemeny",className:y,children:[O.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:d.map((E,_)=>O.jsx("li",{className:"pkt-breadcrumbs__item",children:_===d.length-1?O.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})}):t==="router"?O.jsxs(Lp.Link,{to:E.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})]}):O.jsxs("a",{href:E.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})]})},`breadcrumb-${_}`))}),t==="router"?O.jsxs(Lp.Link,{to:f.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):O.jsxs("a",{href:f.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.3/animations/";const Ji=Te.forwardRef(({children:e,className:t,iconName:a="user",secondIconName:o="user",size:u="medium",skin:d="primary",type:f="button",variant:y="label-only",state:E,color:_,isLoading:T=void 0,disabled:x=void 0,loadingAnimationPath:N=window.pktAnimationPath,...L},P)=>{const j=[t,"pkt-btn",u&&`pkt-btn--${u}`,d&&`pkt-btn--${d}`,y&&`pkt-btn--${y}`,_&&`pkt-btn--${_}`,E&&`pkt-btn--${E}`,T&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return O.jsxs("button",{...L,"aria-busy":T||void 0,"aria-disabled":x||void 0,disabled:x,className:j,type:f,ref:P,children:[T&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:N}),y!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:a}),O.jsx("span",{className:"pkt-btn__text",children:e}),y==="icons-right-and-left"&&O.jsx(On,{className:"pkt-btn__icon",name:o})]})});Ji.displayName="PktButton";const l4=ki({tagName:"pkt-card",elementClass:_a,react:Te,displayName:"PktCard",events:{}}),Uk=Te.forwardRef(({children:e,...t},a)=>O.jsx(l4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Uk.displayName="PktCard";const jh=Te.forwardRef(({id:e,hasTile:t=!1,disabled:a=!1,label:o,checkHelptext:u,hasError:d=!1,className:f,isSwitch:y=!1,hideLabel:E=!1,labelPosition:_="right",defaultChecked:T,checked:x,optionalTag:N,optionalText:L="Valgfritt",requiredTag:P,requiredText:j="Må fylles ut",tagText:$,...te},U)=>{const z=[f,"pkt-input-check"].filter(Boolean).join(" "),V=["pkt-input-check__input-label",a?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${_}`,E?"pkt-sr-only":""].filter(Boolean).join(" "),Y=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",a&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),J=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ne=()=>O.jsxs(O.Fragment,{children:[$&&O.jsx("span",{className:J+" pkt-tag--gray",children:$}),N&&O.jsx("span",{className:J+" pkt-tag--blue-light",children:L}),P&&O.jsx("span",{className:J+" pkt-tag--beige",children:j})]});return O.jsx("div",{className:z,children:O.jsxs("div",{className:Y,children:[_==="left"&&O.jsxs("label",{className:V,htmlFor:e,children:[o," ",ne(),u&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]}),O.jsx("input",{role:y?"switch":"checkbox",ref:U,className:`pkt-input-check__input-checkbox ${d?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:a,...x!==void 0?{checked:x}:{defaultChecked:T},...te}),_==="right"&&O.jsxs("label",{className:V,htmlFor:e,children:[o," ",ne(),u&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});jh.displayName="PktCheckbox";const u4=ki({tagName:"pkt-combobox",elementClass:qr,react:Te,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),jk=Te.forwardRef(({children:e,helptext:t,...a},o)=>O.jsxs(u4,{...a,ref:o,children:[t&&O.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),e]}));jk.displayName="PktCombobox";const Jm=ki({tagName:"pkt-consent",elementClass:Fs,react:Te,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});Jm.displayName="PktConsent";const c4=ki({tagName:"pkt-datepicker",elementClass:Xr,react:Te,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),ky=Te.forwardRef(({helptext:e,...t},a)=>O.jsx(c4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",slot:"helptext",children:e})}));ky.displayName="PktDatepicker";const P2=({columnOne:e,columnTwo:t,socialLinks:a,className:o,openLinksInNewTab:u=!1,personvernOgInfoLink:d="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:f="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:y=!1,hotjarId:E=null,googleAnalyticsId:_=null,devMode:T=!1,cookieDomain:x=null,cookieSecure:N=null,cookieExpiryDays:L=null,onToggleConsent:P=j=>{console.log(j.detail)}})=>{var $,te;const j=[o,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:j,"data-mode":"dark",children:O.jsxs("div",{className:"pkt-footer__container",children:[O.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:e.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&O.jsx("li",{className:"pkt-footer__text",children:e.text}),($=e.links)==null?void 0:$.map((U,z)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${U.external?"pkt-link--external":""}`,href:U.href,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),U.text]})},`links-${z}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:t.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&O.jsx("li",{className:"pkt-footer__text",children:t.text}),(te=t.links)==null?void 0:te.map((U,z)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${U.external?"pkt-link--external":""}`,href:U.href,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),U.text]})},`links-${z}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),O.jsxs("ul",{className:"pkt-footer__list",children:[O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:d,target:u?"_blank":"_self",rel:u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:f,target:u?"_blank":"_self",rel:u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),y&&O.jsx("li",{className:"pkt-footer__list-item",children:O.jsx(Jm,{triggerType:"footerlink",hotjarId:E,googleAnalyticsId:_,devMode:T,cookieDomain:x,cookieSecure:N,cookieExpiryDays:L,onToggleConsent:P})})]})]})]}),a&&O.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[O.jsx("div",{className:"pkt-footer__social-languages",children:a.filter(U=>U.language).map((U,z)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:U.href,"aria-label":`til ${U.language} versjon av nettsiden`,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:U.language})},`sociallinks-language-${z}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:a.filter(U=>U.iconName).map((U,z)=>O.jsx(Te.Fragment,{children:O.jsx("a",{href:U.href,"aria-label":`til ${U.iconName}`,className:"pkt-footer__social-icon-link",target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:U.iconName})})},`sociallinks-${z}`))})]})]})})},$2=({links:e=[],openLinksInNewTab:t=!1,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:u=!1,hotjarId:d=null,googleAnalyticsId:f=null,devMode:y=!1,cookieDomain:E=null,cookieSecure:_=null,cookieExpiryDays:T=null,onToggleConsent:x=L=>{console.log(L.detail)},className:N})=>{const L=[N,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:L,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((P,j)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${P.external?" pkt-link--external":""}`,href:P.href,target:P.openInNewTab||t?"_blank":"_self",rel:P.openInNewTab||t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),P.text]})},j)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:a,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:o,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),u&&O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsx(Jm,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:f,devMode:y,cookieDomain:E,cookieSecure:_,cookieExpiryDays:T,onToggleConsent:x})})]})})})};var B2={exports:{}};/*!
|
|
1449
|
+
`}doStuff(e){return e.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Zm([G({type:String})],Bh.prototype,"string",2),Zm([G({converter:x2})],Bh.prototype,"strings",2),Zm([G({type:Boolean})],Bh.prototype,"darkmode",2),Zm([G({type:Array})],Bh.prototype,"_list",2),Bh=Zm([hr("pkt-component")],Bh);const On=ki({tagName:"pkt-icon",elementClass:Up,react:Te,displayName:"PktIcon",events:{}}),Uh=Te.forwardRef(({defaultOpen:e=!1,id:t,title:a,skin:o,compact:u=!1,isOpen:d,children:f,name:y,className:E,onClick:_,onToggle:T},x)=>{const[N,L]=Te.useState(e),{name:P}=R3(),j=y||P,$=d!==void 0?d:N;Te.useEffect(()=>{d===void 0&&L(e)},[e,d]);const te=V=>{const J=V.currentTarget.open;d===void 0&&L(J),T==null||T(V)},U=V=>{setTimeout(()=>{_==null||_(V)},0)},z=["pkt-accordion-item",u&&"pkt-accordion-item--compact",o&&`pkt-accordion-item--${o}`,E].filter(Boolean).join(" ");return O.jsxs("details",{ref:x,className:z,id:t,open:$,onClick:U,name:j,onToggle:te,children:[O.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${t}`,children:[a,O.jsx(On,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),O.jsx("div",{className:"pkt-accordion-item__content",id:`pkt-accordion-item__content-${t}`,role:"region",children:O.jsx("div",{className:"pkt-accordion-item__content-inner",children:f})})]})});Uh.displayName="PktAccordionItem";const s4=ki({tagName:"pkt-alert",elementClass:Os,react:Te,displayName:"PktAlert",events:{onClose:"close"}}),Sy=Te.forwardRef(({children:e,...t},a)=>O.jsx(s4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",children:e})}));Sy.displayName="PktAlert";const Bk=ki({tagName:"pkt-backlink",elementClass:Oh,react:Te,displayName:"PktBackLink"});Bk.displayName="PktBackLink";const M2=Te.forwardRef(({breadcrumbs:e,navigationType:t,className:a,...o},u)=>{const d=e,f=d[d.length-2],y=[a,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:u,"aria-label":"brødsmulemeny",className:y,children:[O.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:d.map((E,_)=>O.jsx("li",{className:"pkt-breadcrumbs__item",children:_===d.length-1?O.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})}):t==="router"?O.jsxs(Lp.Link,{to:E.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})]}):O.jsxs("a",{href:E.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...o,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:E.text})]})},`breadcrumb-${_}`))}),t==="router"?O.jsxs(Lp.Link,{to:f.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]}):O.jsxs("a",{href:f.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...o,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:f.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.4/animations/";const Ji=Te.forwardRef(({children:e,className:t,iconName:a="user",secondIconName:o="user",size:u="medium",skin:d="primary",type:f="button",variant:y="label-only",state:E,color:_,isLoading:T=void 0,disabled:x=void 0,loadingAnimationPath:N=window.pktAnimationPath,...L},P)=>{const j=[t,"pkt-btn",u&&`pkt-btn--${u}`,d&&`pkt-btn--${d}`,y&&`pkt-btn--${y}`,_&&`pkt-btn--${_}`,E&&`pkt-btn--${E}`,T&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return O.jsxs("button",{...L,"aria-busy":T||void 0,"aria-disabled":x||void 0,disabled:x,className:j,type:f,ref:P,children:[T&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:N}),y!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:a}),O.jsx("span",{className:"pkt-btn__text",children:e}),y==="icons-right-and-left"&&O.jsx(On,{className:"pkt-btn__icon",name:o})]})});Ji.displayName="PktButton";const l4=ki({tagName:"pkt-card",elementClass:_a,react:Te,displayName:"PktCard",events:{}}),Uk=Te.forwardRef(({children:e,...t},a)=>O.jsx(l4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Uk.displayName="PktCard";const jh=Te.forwardRef(({id:e,hasTile:t=!1,disabled:a=!1,label:o,checkHelptext:u,hasError:d=!1,className:f,isSwitch:y=!1,hideLabel:E=!1,labelPosition:_="right",defaultChecked:T,checked:x,optionalTag:N,optionalText:L="Valgfritt",requiredTag:P,requiredText:j="Må fylles ut",tagText:$,...te},U)=>{const z=[f,"pkt-input-check"].filter(Boolean).join(" "),V=["pkt-input-check__input-label",a?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${_}`,E?"pkt-sr-only":""].filter(Boolean).join(" "),Y=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",a&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),J=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ne=()=>O.jsxs(O.Fragment,{children:[$&&O.jsx("span",{className:J+" pkt-tag--gray",children:$}),N&&O.jsx("span",{className:J+" pkt-tag--blue-light",children:L}),P&&O.jsx("span",{className:J+" pkt-tag--beige",children:j})]});return O.jsx("div",{className:z,children:O.jsxs("div",{className:Y,children:[_==="left"&&O.jsxs("label",{className:V,htmlFor:e,children:[o," ",ne(),u&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]}),O.jsx("input",{role:y?"switch":"checkbox",ref:U,className:`pkt-input-check__input-checkbox ${d?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:e,disabled:a,...x!==void 0?{checked:x}:{defaultChecked:T},...te}),_==="right"&&O.jsxs("label",{className:V,htmlFor:e,children:[o," ",ne(),u&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});jh.displayName="PktCheckbox";const u4=ki({tagName:"pkt-combobox",elementClass:qr,react:Te,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),jk=Te.forwardRef(({children:e,helptext:t,...a},o)=>O.jsxs(u4,{...a,ref:o,children:[t&&O.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),e]}));jk.displayName="PktCombobox";const Jm=ki({tagName:"pkt-consent",elementClass:Fs,react:Te,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});Jm.displayName="PktConsent";const c4=ki({tagName:"pkt-datepicker",elementClass:Xr,react:Te,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),ky=Te.forwardRef(({helptext:e,...t},a)=>O.jsx(c4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",slot:"helptext",children:e})}));ky.displayName="PktDatepicker";const P2=({columnOne:e,columnTwo:t,socialLinks:a,className:o,openLinksInNewTab:u=!1,personvernOgInfoLink:d="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:f="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:y=!1,hotjarId:E=null,googleAnalyticsId:_=null,devMode:T=!1,cookieDomain:x=null,cookieSecure:N=null,cookieExpiryDays:L=null,onToggleConsent:P=j=>{console.log(j.detail)}})=>{var $,te;const j=[o,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:j,"data-mode":"dark",children:O.jsxs("div",{className:"pkt-footer__container",children:[O.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:e.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&O.jsx("li",{className:"pkt-footer__text",children:e.text}),($=e.links)==null?void 0:$.map((U,z)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${U.external?"pkt-link--external":""}`,href:U.href,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),U.text]})},`links-${z}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:t.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&O.jsx("li",{className:"pkt-footer__text",children:t.text}),(te=t.links)==null?void 0:te.map((U,z)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${U.external?"pkt-link--external":""}`,href:U.href,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),U.text]})},`links-${z}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),O.jsxs("ul",{className:"pkt-footer__list",children:[O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:d,target:u?"_blank":"_self",rel:u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:f,target:u?"_blank":"_self",rel:u?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),y&&O.jsx("li",{className:"pkt-footer__list-item",children:O.jsx(Jm,{triggerType:"footerlink",hotjarId:E,googleAnalyticsId:_,devMode:T,cookieDomain:x,cookieSecure:N,cookieExpiryDays:L,onToggleConsent:P})})]})]})]}),a&&O.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[O.jsx("div",{className:"pkt-footer__social-languages",children:a.filter(U=>U.language).map((U,z)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:U.href,"aria-label":`til ${U.language} versjon av nettsiden`,target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:U.language})},`sociallinks-language-${z}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:a.filter(U=>U.iconName).map((U,z)=>O.jsx(Te.Fragment,{children:O.jsx("a",{href:U.href,"aria-label":`til ${U.iconName}`,className:"pkt-footer__social-icon-link",target:U.openInNewTab||u?"_blank":"_self",rel:U.openInNewTab||u?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:U.iconName})})},`sociallinks-${z}`))})]})]})})},$2=({links:e=[],openLinksInNewTab:t=!1,personvernOgInfoLink:a="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:u=!1,hotjarId:d=null,googleAnalyticsId:f=null,devMode:y=!1,cookieDomain:E=null,cookieSecure:_=null,cookieExpiryDays:T=null,onToggleConsent:x=L=>{console.log(L.detail)},className:N})=>{const L=[N,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:L,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((P,j)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${P.external?" pkt-link--external":""}`,href:P.href,target:P.openInNewTab||t?"_blank":"_self",rel:P.openInNewTab||t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),P.text]})},j)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:a,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:o,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),u&&O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsx(Jm,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:f,devMode:y,cookieDomain:E,cookieSecure:_,cookieExpiryDays:T,onToggleConsent:x})})]})})})};var B2={exports:{}};/*!
|
|
1450
1450
|
Copyright (c) 2018 Jed Watson.
|
|
1451
1451
|
Licensed under the MIT License (MIT), see
|
|
1452
1452
|
http://jedwatson.github.io/classnames
|
|
1453
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function a(){for(var d="",f=0;f<arguments.length;f++){var y=arguments[f];y&&(d=u(d,o(y)))}return d}function o(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return a.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var y in d)t.call(d,y)&&d[y]&&(f=u(f,y));return f}function u(d,f){return f?d?d+" "+f:d+f:d}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(B2);var d4=B2.exports;const kl=Am(d4),U2=Te.forwardRef(({className:e,logoLink:t="https://www.oslo.kommune.no/",serviceName:a,fixed:o=!0,scrollToHide:u=!0,user:d,userMenu:f,representing:y,userOptions:E,userMenuFooter:_,canChangeRepresentation:T=!0,showMenuButton:x=!1,showLogOutButton:N=!1,openMenu:L,logOut:P,changeRepresentation:j,children:$,...te},U)=>{const z=Te.useMemo(()=>typeof(d==null?void 0:d.lastLoggedIn)=="string"?d.lastLoggedIn:d!=null&&d.lastLoggedIn?new Date(d.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[d]),[V,Y]=Te.useState(!1),[J,ne]=Te.useState(0),[he,le]=Te.useState(!1),xe=Te.useRef(null);Te.useEffect(()=>(document&&(document.addEventListener("mouseup",ze),window.addEventListener("scroll",Me)),()=>{document&&(document.removeEventListener("mouseup",ze),window.removeEventListener("scroll",Me))}));const Re=()=>{le(!he)},ze=Fe=>{xe.current&&!xe.current.contains(Fe.target)&&le(!1)},Me=()=>{if(u){const Fe=window.pageYOffset||document.documentElement.scrollTop;if(Fe<0||Math.abs(Fe-J)<60)return;Y(Fe>J),ne(Fe)}};return O.jsxs("header",{...te,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kl(e,"pkt-header",{"pkt-header--fixed":o,"pkt-header--scroll-to-hide":u,"pkt-header--hidden":V}),ref:U,children:[O.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?O.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.3/logos/"})}):O.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.3/logos/"})}),O.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:a})]}),O.jsx("nav",{className:"pkt-header__actions",children:O.jsxs("ul",{className:"pkt-header__actions-row",children:[x&&O.jsx("li",{children:O.jsx(Ji,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:L,children:"Meny"})}),(d||y)&&O.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${he&&!V?"pkt-header--open-dropdown":""}`,ref:xe,children:[O.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":he,onClick:Re,children:[O.jsx(On,{name:"user",className:"pkt-btn__icon"}),O.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(y==null?void 0:y.name)||(d==null?void 0:d.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(y==null?void 0:y.shortname)||(d==null?void 0:d.shortname)}),O.jsx(On,{name:"chevron-thin-down",className:"pkt-btn--closed"}),O.jsx(On,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),O.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[d&&O.jsxs("li",{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:d.name}),d.lastLoggedIn&&O.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",O.jsx("time",{children:z})]})]}),f&&O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:f.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsxs("a",{href:Fe.target,className:"pkt-link",children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]})},`userMenu-${Qe}`))})}),(y||T)&&O.jsxs("li",{children:[y&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:y.name}),y.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",y.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:T&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:j,children:[O.jsx(On,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:(E||!N)&&O.jsxs(O.Fragment,{children:[E==null?void 0:E.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsxs("a",{href:Fe.target,className:"pkt-link",children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]})},`userOptions-${Qe}`)),!N&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:P,children:[O.jsx(On,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),_&&O.jsx("li",{className:"footer",children:O.jsx("ul",{className:"pkt-list-horizontal bordered",children:_.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsx("a",{href:Fe.target,className:"pkt-link",children:Fe.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:Fe.title})},`userMenuFooter-${Qe}`))})})]})]}),$&&O.jsx("li",{children:$}),N&&O.jsx("li",{children:O.jsx(Ji,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),p4=ki({tagName:"pkt-heading",elementClass:Yp,react:Te,displayName:"PktHeading"}),Qm=Te.forwardRef(({children:e,...t},a)=>O.jsx(p4,{"data-testid":"pkt-heading",...t,ref:a,children:e}));Qm.displayName="PktHeading";const f4=ki({tagName:"pkt-helptext",elementClass:Ec,react:Te,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),zk=Te.forwardRef(({children:e,...t},a)=>O.jsx(f4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));zk.displayName="PktHelptext";const j2=Te.forwardRef(({label:e,id:t,children:a,...o},u)=>O.jsxs("div",{className:"pkt-form-group",children:[O.jsx("label",{htmlFor:t,className:"pkt-form-label",children:e}),O.jsx("input",{className:"pkt-form-input",id:t,...o,ref:u}),a]}));j2.displayName="PktInput";const zh=Te.forwardRef(({forId:e,label:t,helptext:a,helptextDropdown:o,helptextDropdownButton:u,counter:d,counterCurrent:f=0,counterMaxLength:y,optionalTag:E=!1,optionalText:_="Valgfritt",requiredTag:T=!1,requiredText:x="Må fylles ut",tagText:N=null,hasError:L=!1,errorMessage:P,disabled:j=!1,inline:$=!1,ariaDescribedby:te,useWrapper:U=!0,children:z,className:V="",hasFieldset:Y=!1,role:J="group",counterPosition:ne="bottom"},he)=>{const[le,xe]=Te.useState(!1),Re=te||(a?`${e}-helptext`:void 0),ze=!!d,Me=ze&&ne==="top",Fe=ze&&ne==="bottom",Qe=()=>xe(Ze=>!Ze),$e=["pkt-inputwrapper",V,L?"pkt-inputwrapper--error":"",j?"pkt-inputwrapper--disabled":"",$?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),Oe=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ue=()=>ze?O.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[f,y?`/${y}`:""]}):null,Le=()=>O.jsxs(O.Fragment,{children:[N&&O.jsx("span",{className:Oe+" pkt-tag--gray",children:N}),E&&O.jsx("span",{className:Oe+" pkt-tag--blue-light",children:_}),T&&O.jsx("span",{className:Oe+" pkt-tag--beige",children:x})]}),Ce=()=>{const Ze=O.jsxs(O.Fragment,{children:[t," ",Le()]});return U?Y?O.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${e}-label`,children:Ze}):O.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:e,"aria-describedby":Re,id:`${e}-label`,children:Ze}):O.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":Re,id:`${e}-label`,children:t})},Z=()=>!a&&!o?null:O.jsxs(O.Fragment,{children:[a&&U&&O.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:a}),o&&O.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[O.jsx(Ji,{skin:"tertiary",size:"small",variant:"icon-right",iconName:le?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:Qe,children:O.jsx("span",{dangerouslySetInnerHTML:{__html:u??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),O.jsx("div",{className:`pkt-inputwrapper__helptext ${le?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:o})]})]}),de=O.jsxs(O.Fragment,{children:[Ce(),Z(),Me&&O.jsx(ue,{}),z,Fe&&O.jsx(ue,{}),L&&P&&O.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:O.jsx(Sy,{skin:"error","aria-live":"assertive",role:"alert",id:`${e}-error`,compact:!0,children:P})})]});return O.jsx("div",{className:$e,ref:he,role:J,children:Y?O.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Re,children:de}):O.jsx("div",{className:"pkt-inputwrapper__fieldset",children:de})})});zh.displayName="PktInputWrapper";const h4=ki({tagName:"pkt-link",elementClass:Od,react:Te,displayName:"PktLink"}),qk=Te.forwardRef(({children:e,...t},a)=>O.jsx(h4,{...t,ref:a,children:O.jsx("span",{className:"pkt-contents",children:e})}));qk.displayName="PktLink";const g4=ki({tagName:"pkt-linkcard",elementClass:Sc,react:Te,displayName:"PktLinkCard",events:{}}),Hk=Te.forwardRef(({children:e,...t},a)=>O.jsx(g4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",children:e})}));Hk.displayName="PktLinkCard";const m4=ki({tagName:"pkt-loader",elementClass:yl,react:Te,displayName:"PktLoader",events:{}}),Gk=Te.forwardRef(({children:e,...t},a)=>O.jsx(m4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Gk.displayName="PktLoader";const b4=ki({tagName:"pkt-messagebox",elementClass:Ld,react:Te,displayName:"PktMessagebox",events:{onClose:"close"}}),Vk=Te.forwardRef(({children:e,...t},a)=>O.jsx(b4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Vk.displayName="PktMessagebox";const v4=ki({tagName:"pkt-modal",elementClass:as,react:Te,displayName:"PktModal",events:{}}),wy=Te.forwardRef(({children:e,...t},a)=>O.jsx(v4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));wy.displayName="PktModal";/*!
|
|
1453
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function a(){for(var d="",f=0;f<arguments.length;f++){var y=arguments[f];y&&(d=u(d,o(y)))}return d}function o(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return a.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var y in d)t.call(d,y)&&d[y]&&(f=u(f,y));return f}function u(d,f){return f?d?d+" "+f:d+f:d}e.exports?(a.default=a,e.exports=a):window.classNames=a})()})(B2);var d4=B2.exports;const kl=Am(d4),U2=Te.forwardRef(({className:e,logoLink:t="https://www.oslo.kommune.no/",serviceName:a,fixed:o=!0,scrollToHide:u=!0,user:d,userMenu:f,representing:y,userOptions:E,userMenuFooter:_,canChangeRepresentation:T=!0,showMenuButton:x=!1,showLogOutButton:N=!1,openMenu:L,logOut:P,changeRepresentation:j,children:$,...te},U)=>{const z=Te.useMemo(()=>typeof(d==null?void 0:d.lastLoggedIn)=="string"?d.lastLoggedIn:d!=null&&d.lastLoggedIn?new Date(d.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[d]),[V,Y]=Te.useState(!1),[J,ne]=Te.useState(0),[he,le]=Te.useState(!1),xe=Te.useRef(null);Te.useEffect(()=>(document&&(document.addEventListener("mouseup",ze),window.addEventListener("scroll",Me)),()=>{document&&(document.removeEventListener("mouseup",ze),window.removeEventListener("scroll",Me))}));const Re=()=>{le(!he)},ze=Fe=>{xe.current&&!xe.current.contains(Fe.target)&&le(!1)},Me=()=>{if(u){const Fe=window.pageYOffset||document.documentElement.scrollTop;if(Fe<0||Math.abs(Fe-J)<60)return;Y(Fe>J),ne(Fe)}};return O.jsxs("header",{...te,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:kl(e,"pkt-header",{"pkt-header--fixed":o,"pkt-header--scroll-to-hide":u,"pkt-header--hidden":V}),ref:U,children:[O.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?O.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.4/logos/"})}):O.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.4/logos/"})}),O.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:a})]}),O.jsx("nav",{className:"pkt-header__actions",children:O.jsxs("ul",{className:"pkt-header__actions-row",children:[x&&O.jsx("li",{children:O.jsx(Ji,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:L,children:"Meny"})}),(d||y)&&O.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${he&&!V?"pkt-header--open-dropdown":""}`,ref:xe,children:[O.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":he,onClick:Re,children:[O.jsx(On,{name:"user",className:"pkt-btn__icon"}),O.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(y==null?void 0:y.name)||(d==null?void 0:d.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(y==null?void 0:y.shortname)||(d==null?void 0:d.shortname)}),O.jsx(On,{name:"chevron-thin-down",className:"pkt-btn--closed"}),O.jsx(On,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),O.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[d&&O.jsxs("li",{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:d.name}),d.lastLoggedIn&&O.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",O.jsx("time",{children:z})]})]}),f&&O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:f.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsxs("a",{href:Fe.target,className:"pkt-link",children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]})},`userMenu-${Qe}`))})}),(y||T)&&O.jsxs("li",{children:[y&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:y.name}),y.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",y.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:T&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:j,children:[O.jsx(On,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:(E||!N)&&O.jsxs(O.Fragment,{children:[E==null?void 0:E.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsxs("a",{href:Fe.target,className:"pkt-link",children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:[Fe.iconName&&O.jsx(On,{name:Fe.iconName,className:"pkt-link__icon"}),Fe.title]})},`userOptions-${Qe}`)),!N&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:P,children:[O.jsx(On,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),_&&O.jsx("li",{className:"footer",children:O.jsx("ul",{className:"pkt-list-horizontal bordered",children:_.map((Fe,Qe)=>O.jsx("li",{children:typeof Fe.target=="string"?O.jsx("a",{href:Fe.target,className:"pkt-link",children:Fe.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Fe.target,children:Fe.title})},`userMenuFooter-${Qe}`))})})]})]}),$&&O.jsx("li",{children:$}),N&&O.jsx("li",{children:O.jsx(Ji,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:P,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),p4=ki({tagName:"pkt-heading",elementClass:Yp,react:Te,displayName:"PktHeading"}),Qm=Te.forwardRef(({children:e,...t},a)=>O.jsx(p4,{"data-testid":"pkt-heading",...t,ref:a,children:e}));Qm.displayName="PktHeading";const f4=ki({tagName:"pkt-helptext",elementClass:Ec,react:Te,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),zk=Te.forwardRef(({children:e,...t},a)=>O.jsx(f4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));zk.displayName="PktHelptext";const j2=Te.forwardRef(({label:e,id:t,children:a,...o},u)=>O.jsxs("div",{className:"pkt-form-group",children:[O.jsx("label",{htmlFor:t,className:"pkt-form-label",children:e}),O.jsx("input",{className:"pkt-form-input",id:t,...o,ref:u}),a]}));j2.displayName="PktInput";const zh=Te.forwardRef(({forId:e,label:t,helptext:a,helptextDropdown:o,helptextDropdownButton:u,counter:d,counterCurrent:f=0,counterMaxLength:y,optionalTag:E=!1,optionalText:_="Valgfritt",requiredTag:T=!1,requiredText:x="Må fylles ut",tagText:N=null,hasError:L=!1,errorMessage:P,disabled:j=!1,inline:$=!1,ariaDescribedby:te,useWrapper:U=!0,children:z,className:V="",hasFieldset:Y=!1,role:J="group",counterPosition:ne="bottom"},he)=>{const[le,xe]=Te.useState(!1),Re=te||(a?`${e}-helptext`:void 0),ze=!!d,Me=ze&&ne==="top",Fe=ze&&ne==="bottom",Qe=()=>xe(Ze=>!Ze),$e=["pkt-inputwrapper",V,L?"pkt-inputwrapper--error":"",j?"pkt-inputwrapper--disabled":"",$?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),Oe=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),ue=()=>ze?O.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[f,y?`/${y}`:""]}):null,Le=()=>O.jsxs(O.Fragment,{children:[N&&O.jsx("span",{className:Oe+" pkt-tag--gray",children:N}),E&&O.jsx("span",{className:Oe+" pkt-tag--blue-light",children:_}),T&&O.jsx("span",{className:Oe+" pkt-tag--beige",children:x})]}),Ce=()=>{const Ze=O.jsxs(O.Fragment,{children:[t," ",Le()]});return U?Y?O.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${e}-label`,children:Ze}):O.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:e,"aria-describedby":Re,id:`${e}-label`,children:Ze}):O.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":Re,id:`${e}-label`,children:t})},Z=()=>!a&&!o?null:O.jsxs(O.Fragment,{children:[a&&U&&O.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:a}),o&&O.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[O.jsx(Ji,{skin:"tertiary",size:"small",variant:"icon-right",iconName:le?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:Qe,children:O.jsx("span",{dangerouslySetInnerHTML:{__html:u??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),O.jsx("div",{className:`pkt-inputwrapper__helptext ${le?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:o})]})]}),de=O.jsxs(O.Fragment,{children:[Ce(),Z(),Me&&O.jsx(ue,{}),z,Fe&&O.jsx(ue,{}),L&&P&&O.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:O.jsx(Sy,{skin:"error","aria-live":"assertive",role:"alert",id:`${e}-error`,compact:!0,children:P})})]});return O.jsx("div",{className:$e,ref:he,role:J,children:Y?O.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Re,children:de}):O.jsx("div",{className:"pkt-inputwrapper__fieldset",children:de})})});zh.displayName="PktInputWrapper";const h4=ki({tagName:"pkt-link",elementClass:Od,react:Te,displayName:"PktLink"}),qk=Te.forwardRef(({children:e,...t},a)=>O.jsx(h4,{...t,ref:a,children:O.jsx("span",{className:"pkt-contents",children:e})}));qk.displayName="PktLink";const g4=ki({tagName:"pkt-linkcard",elementClass:Sc,react:Te,displayName:"PktLinkCard",events:{}}),Hk=Te.forwardRef(({children:e,...t},a)=>O.jsx(g4,{ref:a,...t,children:O.jsx("div",{className:"pkt-contents",children:e})}));Hk.displayName="PktLinkCard";const m4=ki({tagName:"pkt-loader",elementClass:yl,react:Te,displayName:"PktLoader",events:{}}),Gk=Te.forwardRef(({children:e,...t},a)=>O.jsx(m4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Gk.displayName="PktLoader";const b4=ki({tagName:"pkt-messagebox",elementClass:Ld,react:Te,displayName:"PktMessagebox",events:{onClose:"close"}}),Vk=Te.forwardRef(({children:e,...t},a)=>O.jsx(b4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));Vk.displayName="PktMessagebox";const v4=ki({tagName:"pkt-modal",elementClass:as,react:Te,displayName:"PktModal",events:{}}),wy=Te.forwardRef(({children:e,...t},a)=>O.jsx(v4,{...t,ref:a,children:O.jsx("div",{className:"pkt-contents",children:e})}));wy.displayName="PktModal";/*!
|
|
1454
1454
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1455
1455
|
*
|
|
1456
1456
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.4.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.7",
|
|
41
|
-
"@oslokommune/punkt-elements": "^13.
|
|
41
|
+
"@oslokommune/punkt-elements": "^13.4.0",
|
|
42
42
|
"prettier": "^3.3.3",
|
|
43
43
|
"react-element-to-jsx-string": "^15.0.0",
|
|
44
44
|
"react-hook-form": "^7.53.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "1049219634cc4d4585dbd1c6f1592acf341a99f7"
|
|
114
114
|
}
|