@oslokommune/punkt-react 13.10.0 → 13.11.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/CHANGELOG.md +17 -0
- package/dist/punkt-react.es.js +6 -6
- package/dist/punkt-react.umd.js +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [13.10.1](https://github.com/oslokommune/punkt/compare/13.10.0...13.10.1) (2025-10-29)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
8
25
|
## [13.10.0](https://github.com/oslokommune/punkt/compare/13.9.1...13.10.0) (2025-10-29)
|
|
9
26
|
|
|
10
27
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -1020,7 +1020,7 @@ var sr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, Di = (i, t
|
|
|
1020
1020
|
(r = i[n]) && (a = (s ? r(t, e, a) : r(a)) || a);
|
|
1021
1021
|
return s && a && sr(t, e, a), a;
|
|
1022
1022
|
};
|
|
1023
|
-
const Ms = "https://punkt-cdn.oslo.kommune.no/13.
|
|
1023
|
+
const Ms = "https://punkt-cdn.oslo.kommune.no/13.11/icons/";
|
|
1024
1024
|
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || Ms);
|
|
1025
1025
|
const nr = (i) => new Promise((t) => setTimeout(t, i)), Zi = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', $s = {}, rr = async (i, t) => {
|
|
1026
1026
|
let e = 0;
|
|
@@ -1079,7 +1079,7 @@ var or = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, Tt = (i, t
|
|
|
1079
1079
|
(r = i[n]) && (a = (s ? r(t, e, a) : r(a)) || a);
|
|
1080
1080
|
return s && a && or(t, e, a), a;
|
|
1081
1081
|
};
|
|
1082
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
1082
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.11/animations/";
|
|
1083
1083
|
let bt = class extends G {
|
|
1084
1084
|
constructor() {
|
|
1085
1085
|
super(), this.defaultSlot = N(), 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 ot(this, this.defaultSlot);
|
|
@@ -7525,7 +7525,7 @@ var Ll = Object.defineProperty, Bl = Object.getOwnPropertyDescriptor, me = (i, t
|
|
|
7525
7525
|
(r = i[n]) && (a = (s ? r(t, e, a) : r(a)) || a);
|
|
7526
7526
|
return s && a && Ll(t, e, a), a;
|
|
7527
7527
|
};
|
|
7528
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
7528
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.11/animations/";
|
|
7529
7529
|
let Zt = class extends G {
|
|
7530
7530
|
constructor() {
|
|
7531
7531
|
super(), this.defaultSlot = N(), 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 ot(this, this.defaultSlot);
|
|
@@ -9093,7 +9093,7 @@ const Kd = W(
|
|
|
9093
9093
|
] });
|
|
9094
9094
|
}
|
|
9095
9095
|
);
|
|
9096
|
-
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.
|
|
9096
|
+
window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/13.11/animations/";
|
|
9097
9097
|
const ri = W(
|
|
9098
9098
|
({
|
|
9099
9099
|
children: i,
|
|
@@ -9526,7 +9526,7 @@ const Gd = ({
|
|
|
9526
9526
|
name: "oslologo",
|
|
9527
9527
|
className: "pkt-header__logo-svg",
|
|
9528
9528
|
"aria-hidden": "true",
|
|
9529
|
-
path: "https://punkt-cdn.oslo.kommune.no/13.
|
|
9529
|
+
path: "https://punkt-cdn.oslo.kommune.no/13.11/logos/"
|
|
9530
9530
|
}
|
|
9531
9531
|
) }) : /* @__PURE__ */ h(
|
|
9532
9532
|
"button",
|
|
@@ -9540,7 +9540,7 @@ const Gd = ({
|
|
|
9540
9540
|
name: "oslologo",
|
|
9541
9541
|
className: "pkt-header__logo-svg",
|
|
9542
9542
|
"aria-hidden": "true",
|
|
9543
|
-
path: "https://punkt-cdn.oslo.kommune.no/13.
|
|
9543
|
+
path: "https://punkt-cdn.oslo.kommune.no/13.11/logos/"
|
|
9544
9544
|
}
|
|
9545
9545
|
)
|
|
9546
9546
|
}
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
* @license
|
|
96
96
|
* Copyright 2017 Google LLC
|
|
97
97
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
98
|
-
*/let $i=class extends Xs{};$i.directiveName="unsafeSVG",$i.resultType=2;const $a=Ne($i);var br=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,$s=(s,t,e,i)=>{for(var a=i>1?void 0:i?yr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&br(t,e,a),a};const _i="https://punkt-cdn.oslo.kommune.no/13.
|
|
98
|
+
*/let $i=class extends Xs{};$i.directiveName="unsafeSVG",$i.resultType=2;const $a=Ne($i);var br=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,$s=(s,t,e,i)=>{for(var a=i>1?void 0:i?yr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&br(t,e,a),a};const _i="https://punkt-cdn.oslo.kommune.no/13.11/icons/";typeof window<"u"&&(window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||_i);const kr=s=>new Promise(t=>setTimeout(t,s)),Qs='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',wi={},$r=async(s,t)=>{let e=0;for(;wi[t+s+".svg"]==="fetching"&&(e++,!(e>50));)await kr(50);const i=typeof Storage<"u"&&typeof localStorage<"u";return i&&localStorage.getItem(t+s+".svg")?Promise.resolve(localStorage.getItem(t+s+".svg")):typeof window<"u"&&typeof window.pktFetch=="function"?(wi[t+s+".svg"]="fetching",Promise.resolve(window.pktFetch(t+s+".svg").then(a=>a.ok?a.text():(console.error("Missing icon: "+t+s+".svg"),Qs)).then(a=>(a!==Qs&&i&&localStorage.setItem(t+s+".svg",a),wi[t+s+".svg"]="fetched",a)))):Promise.resolve(Qs)};let Ee=class extends Y{constructor(){super(...arguments),this.path=typeof window<"u"?window.pktIconPath:_i,this.name="",this.icon=$a(Qs),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),(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=typeof window<"u"?window.pktIconPath:_i),this.icon=$a(await $r(this.name||"",this.path).then(e=>e)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return u`${this.name&&this.icon}`}};$s([o({type:String,reflect:!1})],Ee.prototype,"path",2),$s([o({type:String,reflect:!0})],Ee.prototype,"name",2),$s([o({type:SVGElement})],Ee.prototype,"icon",2),$s([o({type:Array,noAccessor:!0})],Ee.prototype,"_updatedProps",2),Ee=$s([F("pkt-icon")],Ee);/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2018 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/const S=s=>s??$;var _r=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,_t=(s,t,e,i)=>{for(var a=i>1?void 0:i?wr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_r(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.
|
|
102
|
+
*/const S=s=>s??$;var _r=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,_t=(s,t,e,i)=>{for(var a=i>1?void 0:i?wr(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&_r(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.11/animations/";let yt=class extends Y{constructor(){super(),this.defaultSlot=T(),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 at(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,e,i){super.attributeChangedCallback(t,e,i),t==="disabled"&&i==="false"&&(this.disabled=!1),(t==="isloading"||t==="isLoading")&&i==="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,e={"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 u`
|
|
103
103
|
<button
|
|
104
104
|
class=${P(e)}
|
|
105
105
|
type=${this.type}
|
|
@@ -1061,7 +1061,7 @@
|
|
|
1061
1061
|
|
|
1062
1062
|
<div class="pkt-linkcard__text" ${A(this.defaultSlot)}></div>
|
|
1063
1063
|
</a>
|
|
1064
|
-
`}};Ve([o({type:String,reflect:!0})],he.prototype,"title",2),Ve([o({type:String,reflect:!0})],he.prototype,"href",2),Ve([o({type:String,reflect:!0})],he.prototype,"iconName",2),Ve([o({type:Boolean,reflect:!0})],he.prototype,"external",2),Ve([o({type:Boolean,reflect:!0})],he.prototype,"openInNewTab",2),Ve([o({type:String,reflect:!0})],he.prototype,"skin",2),he=Ve([F("pkt-linkcard")],he);var Jl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,de=(s,t,e,i)=>{for(var a=i>1?void 0:i?Ql(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Jl(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.
|
|
1064
|
+
`}};Ve([o({type:String,reflect:!0})],he.prototype,"title",2),Ve([o({type:String,reflect:!0})],he.prototype,"href",2),Ve([o({type:String,reflect:!0})],he.prototype,"iconName",2),Ve([o({type:Boolean,reflect:!0})],he.prototype,"external",2),Ve([o({type:Boolean,reflect:!0})],he.prototype,"openInNewTab",2),Ve([o({type:String,reflect:!0})],he.prototype,"skin",2),he=Ve([F("pkt-linkcard")],he);var Jl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,de=(s,t,e,i)=>{for(var a=i>1?void 0:i?Ql(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Jl(t,e,a),a};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.11/animations/";let Yt=class extends Y{constructor(){super(),this.defaultSlot=T(),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 at(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=P({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),e=P({"pkt-contents":!0,"pkt-hide":this.isLoading});return u`<div
|
|
1065
1065
|
role="status"
|
|
1066
1066
|
aria-live="polite"
|
|
1067
1067
|
aria-busy=${this.isLoading?"true":"false"}
|
|
@@ -1436,4 +1436,4 @@
|
|
|
1436
1436
|
Copyright (c) 2018 Jed Watson.
|
|
1437
1437
|
Licensed under the MIT License (MIT), see
|
|
1438
1438
|
http://jedwatson.github.io/classnames
|
|
1439
|
-
*/var Qa;function Eh(){return Qa||(Qa=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var n="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(n=a(n,i(h)))}return n}function i(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var h in n)t.call(n,h)&&n[h]&&(r=a(r,h));return r}function a(n,r){return r?n?n+" "+r:n+r:n}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(Di)),Di.exports}var Ph=Eh();const Lt=Ah(Ph),Ii=({children:s,closeAlert:t,compact:e,title:i,date:a,ariaLive:n,"aria-live":r="polite",role:h="status",skin:d="info",...p})=>{const[m,g]=x.useState(!1),k={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":m},b={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},y=x.useCallback(()=>{g(!0),p.onClose&&p.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[p.onClose,g]),w=n||r;return l.jsx("div",{...p,"aria-live":w,role:h,className:Lt(k),children:l.jsxs("div",{className:Lt(b),children:[l.jsx(H,{className:"pkt-alert__icon","aria-hidden":"true",name:d==="info"?"alert-information":`alert-${d}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(He,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:y,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),a&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",a]})]})})};Ii.displayName="PktAlert";const tn=vt({tagName:"pkt-backlink",elementClass:Je,react:x,displayName:"PktBackLink"});tn.displayName="PktBackLink";const Oh=x.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},a)=>{const n=s,r=n[n.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:a,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:n.map((d,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===n.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?l.jsxs(zi.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(H,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):l.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(H,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(zi.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(H,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(H,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.10/animations/";const He=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",size:a="medium",skin:n="primary",type:r="button",variant:h="label-only",state:d,color:p,isLoading:m=void 0,disabled:g=void 0,loadingAnimationPath:k=window.pktAnimationPath,...b},y)=>{const w=[t,"pkt-btn",a&&`pkt-btn--${a}`,n&&`pkt-btn--${n}`,h&&`pkt-btn--${h}`,p&&`pkt-btn--${p}`,d&&`pkt-btn--${d}`,m&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...b,"aria-busy":m||void 0,"aria-disabled":g||void 0,disabled:g,className:w,type:r,ref:y,children:[m&&l.jsx(H,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:k}),h!=="label-only"&&l.jsx(H,{className:"pkt-btn__icon",name:e}),l.jsx("span",{className:"pkt-btn__text",children:s}),h==="icons-right-and-left"&&l.jsx(H,{className:"pkt-btn__icon",name:i})]})});He.displayName="PktButton";const Mh=vt({tagName:"pkt-card",elementClass:lt,react:x,displayName:"PktCard",events:{}}),en=x.forwardRef(({children:s,...t},e)=>l.jsx(Mh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));en.displayName="PktCard";const sn=x.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:a,hasError:n=!1,className:r,isSwitch:h=!1,hideLabel:d=!1,labelPosition:p="right",defaultChecked:m,checked:g,optionalTag:k,optionalText:b="Valgfritt",requiredTag:y,requiredText:w="Må fylles ut",tagText:C,...M},N)=>{const U=[r,"pkt-input-check"].filter(Boolean).join(" "),E=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,d?"pkt-sr-only":""].filter(Boolean).join(" "),G=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),J=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Bt=()=>l.jsxs(l.Fragment,{children:[C&&l.jsx("span",{className:J+" pkt-tag--gray",children:C}),k&&l.jsx("span",{className:J+" pkt-tag--blue-light",children:b}),y&&l.jsx("span",{className:J+" pkt-tag--beige",children:w})]});return l.jsx("div",{className:U,children:l.jsxs("div",{className:G,children:[p==="left"&&l.jsxs("label",{className:E,htmlFor:s,children:[i," ",Bt(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:N,className:`pkt-input-check__input-checkbox ${n?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...g!==void 0?{checked:g}:{defaultChecked:m},...M}),p==="right"&&l.jsxs("label",{className:E,htmlFor:s,children:[i," ",Bt(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});sn.displayName="PktCheckbox";const Dh=vt({tagName:"pkt-combobox",elementClass:Q,react:x,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),an=x.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Dh,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));an.displayName="PktCombobox";const oi=vt({tagName:"pkt-consent",elementClass:zt,react:x,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});oi.displayName="PktConsent";const Ih=vt({tagName:"pkt-datepicker",elementClass:et,react:x,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),nn=x.forwardRef(({helptext:s,...t},e)=>l.jsx(Ih,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));nn.displayName="PktDatepicker";const Lh=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:a=!1,personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:d=null,googleAnalyticsId:p=null,devMode:m=!1,cookieDomain:g=null,cookieSecure:k=null,cookieExpiryDays:b=null,onToggleConsent:y=w=>{console.log(w.detail)}})=>{var C,M;const w=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:w,"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:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(C=s.links)==null?void 0:C.map((N,U)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${U}`))]})]}),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:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(M=t.links)==null?void 0:M.map((N,U)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${U}`))]})]}),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:n,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(H,{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:r,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(oi,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:p,devMode:m,cookieDomain:g,cookieSecure:k,cookieExpiryDays:b,onToggleConsent:y})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(N=>N.language).map((N,U)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:N.href,"aria-label":`til ${N.language} versjon av nettsiden`,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:N.language})},`sociallinks-language-${U}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(N=>N.iconName).map((N,U)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:N.href,"aria-label":`til ${N.iconName}`,className:"pkt-footer__social-icon-link",target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(H,{className:"pkt-footer__social-icon",name:N.iconName})})},`sociallinks-${U}`))})]})]})})},Bh=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:a=!1,hotjarId:n=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:d=null,cookieSecure:p=null,cookieExpiryDays:m=null,onToggleConsent:g=b=>{console.log(b.detail)},className:k})=>{const b=[k,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((y,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${y.external?" pkt-link--external":""}`,href:y.href,target:y.openInNewTab||t?"_blank":"_self",rel:y.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),y.text]})},w)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(H,{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:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),a&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(oi,{triggerType:"footerlink",hotjarId:n,googleAnalyticsId:r,devMode:h,cookieDomain:d,cookieSecure:p,cookieExpiryDays:m,onToggleConsent:g})})]})})})},Fh=x.forwardRef(({className:s,logoLink:t="https://www.oslo.kommune.no/",serviceName:e,fixed:i=!0,scrollToHide:a=!0,user:n,userMenu:r,representing:h,userOptions:d,userMenuFooter:p,canChangeRepresentation:m=!0,showMenuButton:g=!1,showLogOutButton:k=!1,openMenu:b,logOut:y,changeRepresentation:w,children:C,...M},N)=>{const U=x.useMemo(()=>typeof(n==null?void 0:n.lastLoggedIn)=="string"?n.lastLoggedIn:n!=null&&n.lastLoggedIn?new Date(n.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[n]),[E,G]=x.useState(!1),[J,Bt]=x.useState(0),[Ft,it]=x.useState(!1),rt=x.useRef(null);x.useEffect(()=>(document&&(document.addEventListener("mouseup",jt),window.addEventListener("scroll",ot)),()=>{document&&(document.removeEventListener("mouseup",jt),window.removeEventListener("scroll",ot))}));const Vt=()=>{it(!Ft)},jt=L=>{rt.current&&!rt.current.contains(L.target)&&it(!1)},ot=()=>{if(a){const L=window.pageYOffset||document.documentElement.scrollTop;if(L<0||Math.abs(L-J)<60)return;G(L>J),Bt(L)}};return l.jsxs("header",{...M,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Lt(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":E}),ref:N,children:[l.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?l.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:l.jsx(H,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.10/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(H,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.10/logos/"})}),l.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:e})]}),l.jsx("nav",{className:"pkt-header__actions",children:l.jsxs("ul",{className:"pkt-header__actions-row",children:[g&&l.jsx("li",{children:l.jsx(He,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(n||h)&&l.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Ft&&!E?"pkt-header--open-dropdown":""}`,ref:rt,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":Ft,onClick:Vt,children:[l.jsx(H,{name:"user",className:"pkt-btn__icon"}),l.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(h==null?void 0:h.name)||(n==null?void 0:n.name)}),l.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(h==null?void 0:h.shortname)||(n==null?void 0:n.shortname)}),l.jsx(H,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(H,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),l.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[n&&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:n.name}),n.lastLoggedIn&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:U})]})]}),r&&l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:r.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsxs("a",{href:L.target,className:"pkt-link",children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]})},`userMenu-${Tt}`))})}),(h||m)&&l.jsxs("li",{children:[h&&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:h.name}),h.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",h.orgNumber]})]}),l.jsx("ul",{className:"pkt-list mt-size-16",children:m&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:w,children:[l.jsx(H,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!k)&&l.jsxs(l.Fragment,{children:[d==null?void 0:d.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsxs("a",{href:L.target,className:"pkt-link",children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]})},`userOptions-${Tt}`)),!k&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[l.jsx(H,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&l.jsx("li",{className:"footer",children:l.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsx("a",{href:L.target,className:"pkt-link",children:L.title}):l.jsx("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:L.title})},`userMenuFooter-${Tt}`))})})]})]}),C&&l.jsx("li",{children:C}),k&&l.jsx("li",{children:l.jsx(He,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Vh=vt({tagName:"pkt-heading",elementClass:Ie,react:x,displayName:"PktHeading"}),rn=x.forwardRef(({children:s,...t},e)=>l.jsx(Vh,{"data-testid":"pkt-heading",...t,ref:e,children:s}));rn.displayName="PktHeading";const jh=vt({tagName:"pkt-helptext",elementClass:le,react:x,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),on=x.forwardRef(({children:s,...t},e)=>l.jsx(jh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));on.displayName="PktHelptext";const ln=x.forwardRef(({label:s,id:t,children:e,...i},a)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:a}),e]}));ln.displayName="PktInput";const Bs=x.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:a,counter:n,counterCurrent:r=0,counterMaxLength:h,optionalTag:d=!1,optionalText:p="Valgfritt",requiredTag:m=!1,requiredText:g="Må fylles ut",tagText:k=null,hasError:b=!1,errorMessage:y,disabled:w=!1,inline:C=!1,ariaDescribedby:M,useWrapper:N=!0,children:U,className:E="",hasFieldset:G=!1,role:J="group",counterPosition:Bt="bottom"},Ft)=>{const[it,rt]=x.useState(!1),Vt=M||(e?`${s}-helptext`:void 0),jt=!!n,ot=jt&&Bt==="top",L=jt&&Bt==="bottom",Tt=()=>rt(ct=>!ct),ne=["pkt-inputwrapper",E,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",C?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),pe=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),re=()=>jt?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,Ue=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:pe+" pkt-tag--gray",children:k}),d&&l.jsx("span",{className:pe+" pkt-tag--blue-light",children:p}),m&&l.jsx("span",{className:pe+" pkt-tag--beige",children:g})]}),ds=()=>{const ct=l.jsxs(l.Fragment,{children:[t," ",Ue()]});return N?G?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ct}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Vt,id:`${s}-label`,children:ct}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":Vt,id:`${s}-label`,children:t})},ue=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&N&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(He,{skin:"tertiary",size:"small",variant:"icon-right",iconName:it?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:Tt,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:a??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${it?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),Rt=l.jsxs(l.Fragment,{children:[ds(),ue(),ot&&l.jsx(re,{}),U,L&&l.jsx(re,{}),b&&y&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(Ii,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:y})})]});return l.jsx("div",{className:ne,ref:Ft,role:J,children:G?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Vt,children:Rt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:Rt})})});Bs.displayName="PktInputWrapper";const Hh=vt({tagName:"pkt-link",elementClass:_e,react:x,displayName:"PktLink"}),hn=x.forwardRef(({children:s,...t},e)=>l.jsx(Hh,{...t,ref:e,children:l.jsx("span",{className:"pkt-contents",children:s})}));hn.displayName="PktLink";const Uh=vt({tagName:"pkt-linkcard",elementClass:he,react:x,displayName:"PktLinkCard",events:{}}),dn=x.forwardRef(({children:s,...t},e)=>l.jsx(Uh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));dn.displayName="PktLinkCard";const qh=vt({tagName:"pkt-loader",elementClass:Yt,react:x,displayName:"PktLoader",events:{}}),cn=x.forwardRef(({children:s,...t},e)=>l.jsx(qh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));cn.displayName="PktLoader";const zh=vt({tagName:"pkt-messagebox",elementClass:we,react:x,displayName:"PktMessagebox",events:{onClose:"close"}}),pn=x.forwardRef(({children:s,...t},e)=>l.jsx(zh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));pn.displayName="PktMessagebox";const Wh=vt({tagName:"pkt-modal",elementClass:Dt,react:x,displayName:"PktModal",events:{}}),un=x.forwardRef(({children:s,...t},e)=>l.jsx(Wh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));un.displayName="PktModal";const Rh=vt({tagName:"pkt-progressbar",elementClass:st,react:x,displayName:"PktProgressbar",events:{}}),fn=x.forwardRef(({children:s,...t},e)=>l.jsx(Rh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));fn.displayName="PktProgressbar";const gn=x.forwardRef(({id:s,name:t,label:e,className:i,hasTile:a=!1,disabled:n=!1,checkHelptext:r,hasError:h=!1,defaultChecked:d,checked:p,optionalTag:m,optionalText:g,requiredTag:k,requiredText:b,tagText:y,...w},C)=>{const M=[i,"pkt-input-check"].filter(Boolean).join(" "),N=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),U=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),E=["pkt-input-check__input-label",n?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),G=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),J=()=>l.jsxs(l.Fragment,{children:[y&&l.jsx("span",{className:G+" pkt-tag--gray",children:y}),m&&l.jsx("span",{className:G+" pkt-tag--blue-light",children:g}),k&&l.jsx("span",{className:G+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:M,children:l.jsxs("div",{className:N,children:[l.jsx("input",{ref:C,id:s,type:"radio",name:t,disabled:n,className:U,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:E,htmlFor:s,children:[e," ",J(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});gn.displayName="PktRadioButton";const Kh=x.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:a,name:n,placeholder:r="Søk…",suggestions:h,value:d="",action:p,method:m,onChange:g,onSearch:k,onSuggestionClick:b,...y},w)=>{const C=(E,G)=>{E?E():b&&b(G)},M=E=>{d=E.target.value},N=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let U;return p?U=E=>l.jsx("form",{role:"search",className:N,action:p,method:m,children:E}):U=E=>l.jsx("div",{role:"search",className:N,children:E}),U(l.jsxs(l.Fragment,{children:[a&&l.jsx("label",{htmlFor:a?i:void 0,className:a?"pkt-inputwrapper__label":"",children:a}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:n||i,id:i,placeholder:r,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:w,"aria-controls":`${i}-suggestions`,onChange:g||M,onKeyUp:k&&(E=>{E.key==="Enter"&&(E.preventDefault(),k(d))}),...y}),l.jsx(He,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:k&&(E=>{E.preventDefault(),k(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((E,G)=>l.jsx("li",{children:x.createElement(E.href?"a":E.onClick?"button":"div",{href:E.href,className:`pkt-searchinput__suggestion ${E.onClick?"pkt-link-button":""} ${E.href||E.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:E.onClick?"button":void 0,onClick:()=>C(E.onClick,G),onKeyUp:J=>J.key==="Enter"&&C(E.onClick,G)},l.jsxs(l.Fragment,{children:[E.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:E.title}),E.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:E.text})]}))},`search-suggestion-${G}`))})]}))}),Gh=x.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:a=!1,errorMessage:n,hasError:r,helptext:h,helptextDropdown:d,helptextDropdownButton:p,id:m,inline:g=!1,fullwidth:k=!1,label:b,name:y,optionalTag:w=!1,optionalText:C,requiredTag:M=!1,requiredText:N,tagText:U,...E},G)=>{const J=[i,"pkt-select"].join(" ");return l.jsx(Bs,{className:J,forId:`${m}-input`,label:b,helptext:h,helptextDropdown:d,helptextDropdownButton:p,optionalTag:w,optionalText:C,requiredTag:M,requiredText:N,tagText:U,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:G,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${m}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${m}-input`,name:y||m,...E,children:e})})}),Yh=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),Zh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Xh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Jh=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:Lt("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:Lt("pkt-step__indicator"),children:e==="current"?Zh:e==="completed"?Xh:Yh}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Qh=x.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:a=!0,orientation:n="vertical",...r},h)=>{const d=Lt(t,"pkt-stepper",n==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=x.Children.map(e,(m,g)=>x.isValidElement(m)?x.cloneElement(m,{className:Lt(m.props.className,{"pkt-step--hideStep":i&&g!==s,"pkt-step--hideContent":a&&g!==s})}):m);return l.jsx("ol",{"data-testid":"pkt-stepper",className:d,ref:h,...r,children:p})}),td=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:a,...n})=>l.jsx("table",{"data-testid":"pkt-table",className:Lt(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...n,children:a}),ed=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:Lt(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),sd=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:Lt(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),id=({className:s,children:t,...e})=>l.jsx("thead",{className:Lt(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),ad=({className:s,children:t,...e})=>l.jsx("th",{className:Lt(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),nd=({className:s,children:t,...e})=>l.jsx("tr",{className:Lt(s,"pkt-table__row",{}),role:"row",...e,children:t}),rd=vt({tagName:"pkt-tag",elementClass:qt,react:Pn,displayName:"PktTag",events:{onClose:"close"}}),Li=x.forwardRef(({children:s,...t},e)=>l.jsx(rd,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));Li.displayName="PktTag";const Bi=x.forwardRef(({children:s,active:t,href:e,onClick:i,icon:a,controls:n,tag:r,tagSkin:h,index:d=0},p)=>{const{arrowNav:m,registerTabRef:g,handleKeyPress:k,selectTab:b}=od(),w={"aria-selected":m?!!t:void 0,"aria-controls":n,role:m?"tab":void 0,onKeyUp:M=>k(d,M),onClick:M=>{b(d),i==null||i(M)},tabIndex:t||!m?void 0:-1,ref:M=>{g(d,M),typeof p=="function"?p(M):p&&(p.current=M)}},C=l.jsxs(l.Fragment,{children:[a&&l.jsx(H,{name:a,className:"pkt-icon--small"}),s,r&&l.jsx(Li,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...w,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:C}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:C})});Bi.displayName="PktTabItem";const mn=x.createContext(null),od=()=>{const s=x.useContext(mn);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},ld=x.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:a},n)=>{const r=x.useRef([]),h=s&&!t,p=a&&x.Children.count(a)>0?x.Children.count(a):(e==null?void 0:e.length)||0;x.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const m=y=>{const w=e==null?void 0:e[y];w!=null&&w.action&&w.action(y),i&&i(y)},g=(y,w)=>{var C,M;h&&(w.code==="ArrowLeft"&&y!==0&&((C=r.current[y-1])==null||C.focus()),w.code==="ArrowRight"&&y<p-1&&((M=r.current[y+1])==null||M.focus()),(w.code==="ArrowDown"||w.code==="Space")&&m(y))},k=(y,w)=>{r.current[y]=w},b=e==null?void 0:e.map((y,w)=>{var C,M;return l.jsx(Bi,{active:y.active,href:y.href,onClick:()=>m(w),icon:y.icon,controls:y.controls,tag:(C=y.tag)==null?void 0:C.text,tagSkin:(M=y.tag)==null?void 0:M.skin,index:w,children:y.text},w)});return l.jsx(mn.Provider,{value:{arrowNav:h,registerTabRef:k,handleKeyPress:g,selectTab:m},children:l.jsx("div",{className:"pkt-tabs",ref:n,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:a||b})})})}),hd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:a,className:n,disabled:r,errorMessage:h,hasError:d,helptext:p,helptextDropdown:m,helptextDropdownButton:g,inline:k,fullwidth:b=!1,label:y,name:w,optionalTag:C=!1,optionalText:M,requiredTag:N=!1,requiredText:U,tagText:E=null,placeholder:G,rows:J,useWrapper:Bt=!0,onChange:Ft,value:it,autoComplete:rt="off",minLength:Vt,maxLength:jt,readOnly:ot=!1,skipForwardTestid:L=!1,...Tt},ne)=>{const pe=[n,"pkt-textinput","pkt-textarea"].join(" "),re=`${s}-input`,Ue=`${re}-label`,ds=e||Ue,[ue,Rt]=x.useState(0),ct=qe=>{var ze,fe;if(i&&Rt(((fe=(ze=qe.currentTarget)==null?void 0:ze.value)==null?void 0:fe.length)||0),Ft)return Ft(qe)};return x.useEffect(()=>{it!==void 0&&Rt((it==null?void 0:it.length)||0)},[it]),l.jsx(Bs,{ariaDescribedby:t,className:pe,disabled:r,errorMessage:h,forId:re,hasError:d,helptext:p,helptextDropdown:m,helptextDropdownButton:g,inline:k,label:y,optionalTag:C,optionalText:M,requiredTag:N,requiredText:U,tagText:E,useWrapper:Bt,counter:i,counterCurrent:ue,counterMaxLength:a,children:l.jsx("textarea",{ref:ne,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${a&&ue>a?"pkt-input--counter-error":""}`,name:`${w||s}`,id:re,placeholder:G,disabled:r,rows:J,"aria-labelledby":ds,"aria-invalid":d,"aria-errormessage":`${s}-error`,...Tt,onChange:ct,value:it,autoComplete:rt,minLength:Vt,maxLength:jt,"data-skip-forward-testid":L?"true":void 0})})}),dd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:a,counterMaxLength:n,className:r,disabled:h=!1,errorMessage:d,hasError:p=!1,helptext:m,helptextDropdown:g,helptextDropdownButton:k,iconNameRight:b,inline:y=!1,fullwidth:w=!1,label:C,name:M,optionalTag:N=!1,optionalText:U,requiredTag:E=!1,requiredText:G,tagText:J=null,placeholder:Bt,prefix:Ft,suffix:it,type:rt="text",useWrapper:Vt=!0,omitSearchIcon:jt=!1,value:ot,minLength:L,maxLength:Tt,min:ne,max:pe,step:re,size:Ue,readonly:ds,required:ue,dataTestid:Rt,onChange:ct,skipForwardTestid:qe=!1,...ze},fe)=>{const Vi=[r,"pkt-textinput"].join(" "),li=rt==="search"&&!b&&!jt,ji=rt==="date"&&ot?ot.slice(0,10):ot,[hi,cs]=x.useState((ot==null?void 0:ot.length)||0),ps=`${s}`,Vs=`${ps}-label`,di=e||Vs,Hi=xe=>{var ci,pi;a&&cs(((pi=(ci=xe.currentTarget)==null?void 0:ci.value)==null?void 0:pi.length)||0),ct&&ct(xe)};return x.useEffect(()=>{ot!==void 0&&cs((ot==null?void 0:ot.length)||0)},[ot]),l.jsx(Bs,{ariaDescribedby:t,className:Vi,disabled:h,errorMessage:d,forId:ps,hasError:p,helptext:m,helptextDropdown:g,helptextDropdownButton:k,inline:y,label:C,optionalTag:N,optionalText:U,requiredTag:E,requiredText:G,tagText:J,useWrapper:Vt,counter:a,counterCurrent:hi,counterMaxLength:n,children:l.jsxs("div",{className:"pkt-input__container","data-testid":Rt,"data-skip-forward-testid":qe?"true":void 0,children:[Ft&&l.jsx("div",{className:"pkt-input-prefix",children:Ft}),l.jsx("input",{...ze,ref:fe,className:`pkt-input ${w?"pkt-input--fullwidth":""} ${n&&hi>n?"pkt-input--counter-error":""}`,type:rt,name:`${M||s}`,value:ji,id:ps,placeholder:Bt,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":di,min:ne,max:pe,onChange:Hi,step:re,minLength:L,maxLength:Tt,size:Ue,required:ue}),it&&l.jsxs("p",{className:"pkt-input-suffix",children:[it,b&&l.jsx(H,{className:"pkt-input-suffix-icon",name:b}),li&&l.jsx(H,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!it&&b&&l.jsx(H,{className:"pkt-input-icon",name:b}),!it&&li&&l.jsx(H,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});var ls=window.CustomEvent;(!ls||typeof ls=="object")&&(ls=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},ls.prototype=window.Event.prototype);function vn(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function cd(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,a){return!(t[i]===void 0||t[i]===a)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function Fs(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function bn(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function pd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function Fi(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function yn(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var a=s.querySelectorAll("*"),n=0;n<a.length&&!(a[n].tagName&&a[n].shadowRoot&&(i=yn(a[n].shadowRoot),i));n++);return i}function kn(s){return s.isConnected||document.body.contains(s)}function $n(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=z.formSubmitter;if(!e){var i=s.target,a="getRootNode"in i&&i.getRootNode()||document;e=a.activeElement}return!e||e.form!==t?null:e}function ud(s){if(!s.defaultPrevented){var t=s.target,e=z.imagemapUseValue,i=$n(s);e===null&&i&&(e=i.value);var a=Fs(t);if(a){var n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&(s.preventDefault(),e!=null?a.close(e):a.close())}}}function _n(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",ud,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),a,n=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(a),a=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,n)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}_n.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&kn(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),z.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=yn(this.dialog_)),bn(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!kn(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!z.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");cd(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,z.needsCentering(this.dialog_)?(z.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new ls("close",{bubbles:!1,cancelable:!1});vn(this.dialog_,t)}};var z={};if(z.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},z.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var a=0;a<i.length;++a){var n=i[a],r=null;try{r=document.querySelectorAll(n.selectorText)}catch{}if(!(!r||!pd(r,s))){var h=n.style.getPropertyValue("top"),d=n.style.getPropertyValue("bottom");if(h&&h!=="auto"||d&&d!=="auto")return!0}}}return!1},z.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!z.isInlinePositionSetByStylesheet(s)},z.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new _n(s)},z.registerDialog=function(s){s.showModal||z.forceRegisterDialog(s)},z.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var a=0,n;n=i.removedNodes[a];++a){if(n instanceof Element)n.localName==="dialog"&&e.push(n);else continue;e=e.concat(n.querySelectorAll("dialog"))}}),e.length&&s(e)}))},z.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},z.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},z.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var a=i.dialog.parentNode||document.body;a.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},z.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=Fs(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},z.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),bn(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,a=i.compareDocumentPosition(t);return a&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},z.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new ls("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&vn(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},z.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},z.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},z.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},z.dm=new z.DialogManager,z.formSubmitter=null,z.imagemapUseValue=null,window.HTMLDialogElement===void 0){var wn=document.createElement("form");if(wn.setAttribute("method","dialog"),wn.method!=="dialog"){var hs=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(hs){var fd=hs.get;hs.get=function(){return Fi(this)?"dialog":fd.call(this)};var gd=hs.set;hs.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):gd.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",hs)}}document.addEventListener("click",function(s){if(z.formSubmitter=null,z.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!Fi(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;z.imagemapUseValue=s.offsetX+","+s.offsetY}var a=Fs(t);a&&(z.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=Fs(t);if(!e){var i=$n(s),a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&s.preventDefault()}});var md=HTMLFormElement.prototype.submit,vd=function(){if(!Fi(this))return md.call(this);var s=Fs(this);s&&s.close()};HTMLFormElement.prototype.submit=vd}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));O.PktAccordion=Ri,O.PktAccordionItem=Ja,O.PktAlert=Ii,O.PktBackLink=tn,O.PktBreadcrumbs=Oh,O.PktButton=He,O.PktCard=en,O.PktCheckbox=sn,O.PktCombobox=an,O.PktConsent=oi,O.PktDatepicker=nn,O.PktFooter=Lh,O.PktFooterSimple=Bh,O.PktHeader=Fh,O.PktHeading=rn,O.PktHelptext=on,O.PktIcon=H,O.PktInput=ln,O.PktInputWrapper=Bs,O.PktLink=hn,O.PktLinkCard=dn,O.PktLoader=cn,O.PktMessagebox=pn,O.PktModal=un,O.PktProgressbar=fn,O.PktRadioButton=gn,O.PktSearchInput=Kh,O.PktSelect=Gh,O.PktStep=Jh,O.PktStepper=Qh,O.PktTabItem=Bi,O.PktTable=td,O.PktTableBody=ed,O.PktTableDataCell=sd,O.PktTableHeader=id,O.PktTableHeaderCell=ad,O.PktTableRow=nd,O.PktTabs=ld,O.PktTag=Li,O.PktTextarea=hd,O.PktTextinput=dd,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
|
|
1439
|
+
*/var Qa;function Eh(){return Qa||(Qa=1,(function(s){(function(){var t={}.hasOwnProperty;function e(){for(var n="",r=0;r<arguments.length;r++){var h=arguments[r];h&&(n=a(n,i(h)))}return n}function i(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var h in n)t.call(n,h)&&n[h]&&(r=a(r,h));return r}function a(n,r){return r?n?n+" "+r:n+r:n}s.exports?(e.default=e,s.exports=e):window.classNames=e})()})(Di)),Di.exports}var Ph=Eh();const Lt=Ah(Ph),Ii=({children:s,closeAlert:t,compact:e,title:i,date:a,ariaLive:n,"aria-live":r="polite",role:h="status",skin:d="info",...p})=>{const[m,g]=x.useState(!1),k={"pkt-alert":!0,"pkt-alert--compact":e,[`pkt-alert--${d}`]:d,"pkt-hide":m},b={"pkt-alert__grid":!0,"pkt-alert__noTitle":!i,"pkt-alert__noDate":!a},y=x.useCallback(()=>{g(!0),p.onClose&&p.onClose(new CustomEvent("close",{detail:{origin:event},bubbles:!0,composed:!0}))},[p.onClose,g]),w=n||r;return l.jsx("div",{...p,"aria-live":w,role:h,className:Lt(k),children:l.jsxs("div",{className:Lt(b),children:[l.jsx(H,{className:"pkt-alert__icon","aria-hidden":"true",name:d==="info"?"alert-information":`alert-${d}`}),t&&l.jsx("div",{className:"pkt-alert__close",children:l.jsx(He,{tabIndex:0,"aria-label":"close",size:e?"small":"medium",type:"button",skin:"tertiary",iconName:"close",variant:"icon-only",onClick:y,children:l.jsx("span",{className:"sr-only",children:"Lukk"})})}),i&&l.jsx("div",{className:"pkt-alert__title",children:i}),l.jsx("div",{className:"pkt-alert__text",children:s}),a&&l.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",a]})]})})};Ii.displayName="PktAlert";const tn=vt({tagName:"pkt-backlink",elementClass:Je,react:x,displayName:"PktBackLink"});tn.displayName="PktBackLink";const Oh=x.forwardRef(({breadcrumbs:s,navigationType:t,className:e,...i},a)=>{const n=s,r=n[n.length-2],h=[e,"pkt-breadcrumbs"].filter(Boolean).join(" ");return l.jsxs("nav",{ref:a,"aria-label":"brødsmulemeny",className:h,children:[l.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:n.map((d,p)=>l.jsx("li",{className:"pkt-breadcrumbs__item",children:p===n.length-1?l.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?l.jsxs(zi.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(H,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):l.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...i,children:[l.jsx(H,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${p}`))}),t==="router"?l.jsxs(zi.Link,{to:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(H,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]}):l.jsxs("a",{href:r.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...i,children:[l.jsx(H,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),l.jsx("span",{className:"pkt-breadcrumbs__text",children:r.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.11/animations/";const He=x.forwardRef(({children:s,className:t,iconName:e="user",secondIconName:i="user",size:a="medium",skin:n="primary",type:r="button",variant:h="label-only",state:d,color:p,isLoading:m=void 0,disabled:g=void 0,loadingAnimationPath:k=window.pktAnimationPath,...b},y)=>{const w=[t,"pkt-btn",a&&`pkt-btn--${a}`,n&&`pkt-btn--${n}`,h&&`pkt-btn--${h}`,p&&`pkt-btn--${p}`,d&&`pkt-btn--${d}`,m&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return l.jsxs("button",{...b,"aria-busy":m||void 0,"aria-disabled":g||void 0,disabled:g,className:w,type:r,ref:y,children:[m&&l.jsx(H,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:k}),h!=="label-only"&&l.jsx(H,{className:"pkt-btn__icon",name:e}),l.jsx("span",{className:"pkt-btn__text",children:s}),h==="icons-right-and-left"&&l.jsx(H,{className:"pkt-btn__icon",name:i})]})});He.displayName="PktButton";const Mh=vt({tagName:"pkt-card",elementClass:lt,react:x,displayName:"PktCard",events:{}}),en=x.forwardRef(({children:s,...t},e)=>l.jsx(Mh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));en.displayName="PktCard";const sn=x.forwardRef(({id:s,hasTile:t=!1,disabled:e=!1,label:i,checkHelptext:a,hasError:n=!1,className:r,isSwitch:h=!1,hideLabel:d=!1,labelPosition:p="right",defaultChecked:m,checked:g,optionalTag:k,optionalText:b="Valgfritt",requiredTag:y,requiredText:w="Må fylles ut",tagText:C,...M},N)=>{const U=[r,"pkt-input-check"].filter(Boolean).join(" "),E=["pkt-input-check__input-label",e?"pkt-input-check__input-label--disabled":"",`pkt-input-check__input-label--${p}`,d?"pkt-sr-only":""].filter(Boolean).join(" "),G=["pkt-input-check__input",t?"pkt-input-check__input--tile":"",e&&t?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),J=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),Bt=()=>l.jsxs(l.Fragment,{children:[C&&l.jsx("span",{className:J+" pkt-tag--gray",children:C}),k&&l.jsx("span",{className:J+" pkt-tag--blue-light",children:b}),y&&l.jsx("span",{className:J+" pkt-tag--beige",children:w})]});return l.jsx("div",{className:U,children:l.jsxs("div",{className:G,children:[p==="left"&&l.jsxs("label",{className:E,htmlFor:s,children:[i," ",Bt(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]}),l.jsx("input",{role:h?"switch":"checkbox",ref:N,className:`pkt-input-check__input-checkbox ${n?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:s,disabled:e,...g!==void 0?{checked:g}:{defaultChecked:m},...M}),p==="right"&&l.jsxs("label",{className:E,htmlFor:s,children:[i," ",Bt(),a&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:a})]})]})})});sn.displayName="PktCheckbox";const Dh=vt({tagName:"pkt-combobox",elementClass:Q,react:x,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),an=x.forwardRef(({children:s,helptext:t,...e},i)=>l.jsxs(Dh,{...e,ref:i,children:[t&&l.jsx("div",{slot:"helptext",className:"pkt-contents",children:t}),s]}));an.displayName="PktCombobox";const oi=vt({tagName:"pkt-consent",elementClass:zt,react:x,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});oi.displayName="PktConsent";const Ih=vt({tagName:"pkt-datepicker",elementClass:et,react:x,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),nn=x.forwardRef(({helptext:s,...t},e)=>l.jsx(Ih,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",slot:"helptext",children:s})}));nn.displayName="PktDatepicker";const Lh=({columnOne:s,columnTwo:t,socialLinks:e,className:i,openLinksInNewTab:a=!1,personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:r="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:h=!1,hotjarId:d=null,googleAnalyticsId:p=null,devMode:m=!1,cookieDomain:g=null,cookieSecure:k=null,cookieExpiryDays:b=null,onToggleConsent:y=w=>{console.log(w.detail)}})=>{var C,M;const w=[i,"pkt-footer"].filter(Boolean).join(" ");return l.jsx("footer",{className:w,"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:s.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[s.text&&l.jsx("li",{className:"pkt-footer__text",children:s.text}),(C=s.links)==null?void 0:C.map((N,U)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${U}`))]})]}),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:t.title}),l.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&l.jsx("li",{className:"pkt-footer__text",children:t.text}),(M=t.links)==null?void 0:M.map((N,U)=>l.jsx("li",{className:"pkt-footer__list-item",children:l.jsxs("a",{className:`pkt-footer__link ${N.external?"pkt-link--external":""}`,href:N.href,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),N.text]})},`links-${U}`))]})]}),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:n,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(H,{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:r,target:a?"_blank":"_self",rel:a?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),h&&l.jsx("li",{className:"pkt-footer__list-item",children:l.jsx(oi,{triggerType:"footerlink",hotjarId:d,googleAnalyticsId:p,devMode:m,cookieDomain:g,cookieSecure:k,cookieExpiryDays:b,onToggleConsent:y})})]})]})]}),e&&l.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[l.jsx("div",{className:"pkt-footer__social-languages",children:e.filter(N=>N.language).map((N,U)=>l.jsx("div",{className:"pkt-footer__social-language",children:l.jsx("a",{href:N.href,"aria-label":`til ${N.language} versjon av nettsiden`,target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:N.language})},`sociallinks-language-${U}`))}),l.jsx("div",{className:"pkt-footer__social-icons",children:e.filter(N=>N.iconName).map((N,U)=>l.jsx(x.Fragment,{children:l.jsx("a",{href:N.href,"aria-label":`til ${N.iconName}`,className:"pkt-footer__social-icon-link",target:N.openInNewTab||a?"_blank":"_self",rel:N.openInNewTab||a?"noopener noreferrer":void 0,children:l.jsx(H,{className:"pkt-footer__social-icon",name:N.iconName})})},`sociallinks-${U}`))})]})]})})},Bh=({links:s=[],openLinksInNewTab:t=!1,personvernOgInfoLink:e="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:i="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:a=!1,hotjarId:n=null,googleAnalyticsId:r=null,devMode:h=!1,cookieDomain:d=null,cookieSecure:p=null,cookieExpiryDays:m=null,onToggleConsent:g=b=>{console.log(b.detail)},className:k})=>{const b=[k,"pkt-footer-simple"].filter(Boolean).join(" ");return l.jsx("footer",{className:b,"data-mode":"dark",children:l.jsx("div",{className:"pkt-footer-simple__container",children:l.jsxs("ul",{className:"pkt-footer-simple__list",children:[s.map((y,w)=>l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:`pkt-footer-simple__link ${y.external?" pkt-link--external":""}`,href:y.href,target:y.openInNewTab||t?"_blank":"_self",rel:y.openInNewTab||t?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),y.text]})},w)),l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsxs("a",{className:"pkt-footer-simple__link",href:e,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(H,{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:i,target:t?"_blank":"_self",rel:t?"noopener noreferrer":void 0,children:[l.jsx(H,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),a&&l.jsx("li",{className:"pkt-footer-simple__list-item",children:l.jsx(oi,{triggerType:"footerlink",hotjarId:n,googleAnalyticsId:r,devMode:h,cookieDomain:d,cookieSecure:p,cookieExpiryDays:m,onToggleConsent:g})})]})})})},Fh=x.forwardRef(({className:s,logoLink:t="https://www.oslo.kommune.no/",serviceName:e,fixed:i=!0,scrollToHide:a=!0,user:n,userMenu:r,representing:h,userOptions:d,userMenuFooter:p,canChangeRepresentation:m=!0,showMenuButton:g=!1,showLogOutButton:k=!1,openMenu:b,logOut:y,changeRepresentation:w,children:C,...M},N)=>{const U=x.useMemo(()=>typeof(n==null?void 0:n.lastLoggedIn)=="string"?n.lastLoggedIn:n!=null&&n.lastLoggedIn?new Date(n.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[n]),[E,G]=x.useState(!1),[J,Bt]=x.useState(0),[Ft,it]=x.useState(!1),rt=x.useRef(null);x.useEffect(()=>(document&&(document.addEventListener("mouseup",jt),window.addEventListener("scroll",ot)),()=>{document&&(document.removeEventListener("mouseup",jt),window.removeEventListener("scroll",ot))}));const Vt=()=>{it(!Ft)},jt=L=>{rt.current&&!rt.current.contains(L.target)&&it(!1)},ot=()=>{if(a){const L=window.pageYOffset||document.documentElement.scrollTop;if(L<0||Math.abs(L-J)<60)return;G(L>J),Bt(L)}};return l.jsxs("header",{...M,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Lt(s,"pkt-header",{"pkt-header--fixed":i,"pkt-header--scroll-to-hide":a,"pkt-header--hidden":E}),ref:N,children:[l.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?l.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:l.jsx(H,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.11/logos/"})}):l.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:l.jsx(H,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/13.11/logos/"})}),l.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:e})]}),l.jsx("nav",{className:"pkt-header__actions",children:l.jsxs("ul",{className:"pkt-header__actions-row",children:[g&&l.jsx("li",{children:l.jsx(He,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(n||h)&&l.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Ft&&!E?"pkt-header--open-dropdown":""}`,ref:rt,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":Ft,onClick:Vt,children:[l.jsx(H,{name:"user",className:"pkt-btn__icon"}),l.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(h==null?void 0:h.name)||(n==null?void 0:n.name)}),l.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(h==null?void 0:h.shortname)||(n==null?void 0:n.shortname)}),l.jsx(H,{name:"chevron-thin-down",className:"pkt-btn--closed"}),l.jsx(H,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),l.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[n&&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:n.name}),n.lastLoggedIn&&l.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",l.jsx("time",{children:U})]})]}),r&&l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:r.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsxs("a",{href:L.target,className:"pkt-link",children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]})},`userMenu-${Tt}`))})}),(h||m)&&l.jsxs("li",{children:[h&&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:h.name}),h.orgNumber&&l.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",h.orgNumber]})]}),l.jsx("ul",{className:"pkt-list mt-size-16",children:m&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:w,children:[l.jsx(H,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),l.jsx("li",{children:l.jsx("ul",{className:"pkt-list",children:(d||!k)&&l.jsxs(l.Fragment,{children:[d==null?void 0:d.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsxs("a",{href:L.target,className:"pkt-link",children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]}):l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:[L.iconName&&l.jsx(H,{name:L.iconName,className:"pkt-link__icon"}),L.title]})},`userOptions-${Tt}`)),!k&&l.jsx("li",{children:l.jsxs("button",{className:"pkt-link-button pkt-link",onClick:y,children:[l.jsx(H,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&l.jsx("li",{className:"footer",children:l.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((L,Tt)=>l.jsx("li",{children:typeof L.target=="string"?l.jsx("a",{href:L.target,className:"pkt-link",children:L.title}):l.jsx("button",{className:"pkt-link-button pkt-link",onClick:L.target,children:L.title})},`userMenuFooter-${Tt}`))})})]})]}),C&&l.jsx("li",{children:C}),k&&l.jsx("li",{children:l.jsx(He,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:y,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Vh=vt({tagName:"pkt-heading",elementClass:Ie,react:x,displayName:"PktHeading"}),rn=x.forwardRef(({children:s,...t},e)=>l.jsx(Vh,{"data-testid":"pkt-heading",...t,ref:e,children:s}));rn.displayName="PktHeading";const jh=vt({tagName:"pkt-helptext",elementClass:le,react:x,displayName:"PktHelptext",events:{onToggleHelpText:"toggleHelpText"}}),on=x.forwardRef(({children:s,...t},e)=>l.jsx(jh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));on.displayName="PktHelptext";const ln=x.forwardRef(({label:s,id:t,children:e,...i},a)=>l.jsxs("div",{className:"pkt-form-group",children:[l.jsx("label",{htmlFor:t,className:"pkt-form-label",children:s}),l.jsx("input",{className:"pkt-form-input",id:t,...i,ref:a}),e]}));ln.displayName="PktInput";const Bs=x.forwardRef(({forId:s,label:t,helptext:e,helptextDropdown:i,helptextDropdownButton:a,counter:n,counterCurrent:r=0,counterMaxLength:h,optionalTag:d=!1,optionalText:p="Valgfritt",requiredTag:m=!1,requiredText:g="Må fylles ut",tagText:k=null,hasError:b=!1,errorMessage:y,disabled:w=!1,inline:C=!1,ariaDescribedby:M,useWrapper:N=!0,children:U,className:E="",hasFieldset:G=!1,role:J="group",counterPosition:Bt="bottom"},Ft)=>{const[it,rt]=x.useState(!1),Vt=M||(e?`${s}-helptext`:void 0),jt=!!n,ot=jt&&Bt==="top",L=jt&&Bt==="bottom",Tt=()=>rt(ct=>!ct),ne=["pkt-inputwrapper",E,b?"pkt-inputwrapper--error":"",w?"pkt-inputwrapper--disabled":"",C?"pkt-inputwrapper--inline":""].filter(Boolean).join(" "),pe=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),re=()=>jt?l.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":"true",children:[r,h?`/${h}`:""]}):null,Ue=()=>l.jsxs(l.Fragment,{children:[k&&l.jsx("span",{className:pe+" pkt-tag--gray",children:k}),d&&l.jsx("span",{className:pe+" pkt-tag--blue-light",children:p}),m&&l.jsx("span",{className:pe+" pkt-tag--beige",children:g})]}),ds=()=>{const ct=l.jsxs(l.Fragment,{children:[t," ",Ue()]});return N?G?l.jsx("legend",{className:"pkt-inputwrapper__legend",id:`${s}-label`,children:ct}):l.jsx("label",{className:"pkt-inputwrapper__label",htmlFor:s,"aria-describedby":Vt,id:`${s}-label`,children:ct}):l.jsx("label",{htmlFor:s,className:"pkt-sr-only","aria-describedby":Vt,id:`${s}-label`,children:t})},ue=()=>!e&&!i?null:l.jsxs(l.Fragment,{children:[e&&N&&l.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${s}-helptext`,children:e}),i&&l.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[l.jsx(He,{skin:"tertiary",size:"small",variant:"icon-right",iconName:it?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:Tt,children:l.jsx("span",{dangerouslySetInnerHTML:{__html:a??'Les mer <span class="pkt-sr-only">om inputfeltet</span>'}})}),l.jsx("div",{className:`pkt-inputwrapper__helptext ${it?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:i})]})]}),Rt=l.jsxs(l.Fragment,{children:[ds(),ue(),ot&&l.jsx(re,{}),U,L&&l.jsx(re,{}),b&&y&&l.jsx("div",{className:"pkt-inputwrapper__alert-wrapper",children:l.jsx(Ii,{skin:"error","aria-live":"assertive",role:"alert",id:`${s}-error`,compact:!0,children:y})})]});return l.jsx("div",{className:ne,ref:Ft,role:J,children:G?l.jsx("fieldset",{className:"pkt-inputwrapper__fieldset","aria-describedby":Vt,children:Rt}):l.jsx("div",{className:"pkt-inputwrapper__fieldset",children:Rt})})});Bs.displayName="PktInputWrapper";const Hh=vt({tagName:"pkt-link",elementClass:_e,react:x,displayName:"PktLink"}),hn=x.forwardRef(({children:s,...t},e)=>l.jsx(Hh,{...t,ref:e,children:l.jsx("span",{className:"pkt-contents",children:s})}));hn.displayName="PktLink";const Uh=vt({tagName:"pkt-linkcard",elementClass:he,react:x,displayName:"PktLinkCard",events:{}}),dn=x.forwardRef(({children:s,...t},e)=>l.jsx(Uh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));dn.displayName="PktLinkCard";const qh=vt({tagName:"pkt-loader",elementClass:Yt,react:x,displayName:"PktLoader",events:{}}),cn=x.forwardRef(({children:s,...t},e)=>l.jsx(qh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));cn.displayName="PktLoader";const zh=vt({tagName:"pkt-messagebox",elementClass:we,react:x,displayName:"PktMessagebox",events:{onClose:"close"}}),pn=x.forwardRef(({children:s,...t},e)=>l.jsx(zh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));pn.displayName="PktMessagebox";const Wh=vt({tagName:"pkt-modal",elementClass:Dt,react:x,displayName:"PktModal",events:{}}),un=x.forwardRef(({children:s,...t},e)=>l.jsx(Wh,{...t,ref:e,children:l.jsx("div",{className:"pkt-contents",children:s})}));un.displayName="PktModal";const Rh=vt({tagName:"pkt-progressbar",elementClass:st,react:x,displayName:"PktProgressbar",events:{}}),fn=x.forwardRef(({children:s,...t},e)=>l.jsx(Rh,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));fn.displayName="PktProgressbar";const gn=x.forwardRef(({id:s,name:t,label:e,className:i,hasTile:a=!1,disabled:n=!1,checkHelptext:r,hasError:h=!1,defaultChecked:d,checked:p,optionalTag:m,optionalText:g,requiredTag:k,requiredText:b,tagText:y,...w},C)=>{const M=[i,"pkt-input-check"].filter(Boolean).join(" "),N=["pkt-input-check__input",a?"pkt-input-check__input--tile":"",n&&a?"pkt-input-check__input--tile-disabled":""].filter(Boolean).join(" "),U=["pkt-input-check__input-checkbox",h?"pkt-input-check__input-checkbox--error":""].filter(Boolean).join(" "),E=["pkt-input-check__input-label",n?"pkt-input-check__input-label--disabled":""].filter(Boolean).join(" "),G=["pkt-tag","pkt-tag--small","pkt-tag--thin-text"].join(" "),J=()=>l.jsxs(l.Fragment,{children:[y&&l.jsx("span",{className:G+" pkt-tag--gray",children:y}),m&&l.jsx("span",{className:G+" pkt-tag--blue-light",children:g}),k&&l.jsx("span",{className:G+" pkt-tag--beige",children:b})]});return l.jsx("div",{className:M,children:l.jsxs("div",{className:N,children:[l.jsx("input",{ref:C,id:s,type:"radio",name:t,disabled:n,className:U,...p!==void 0?{checked:p}:{defaultChecked:d},...w}),l.jsxs("label",{className:E,htmlFor:s,children:[e," ",J(),r&&l.jsx("div",{className:"pkt-input-check__input-helptext",children:r})]})]})})});gn.displayName="PktRadioButton";const Kh=x.forwardRef(({appearance:s="local",disabled:t=!1,fullwidth:e=!1,id:i,label:a,name:n,placeholder:r="Søk…",suggestions:h,value:d="",action:p,method:m,onChange:g,onSearch:k,onSuggestionClick:b,...y},w)=>{const C=(E,G)=>{E?E():b&&b(G)},M=E=>{d=E.target.value},N=`pkt-searchinput pkt-searchinput--${s} ${e?"pkt-searchinput--fullwidth":""}`;let U;return p?U=E=>l.jsx("form",{role:"search",className:N,action:p,method:m,children:E}):U=E=>l.jsx("div",{role:"search",className:N,children:E}),U(l.jsxs(l.Fragment,{children:[a&&l.jsx("label",{htmlFor:a?i:void 0,className:a?"pkt-inputwrapper__label":"",children:a}),l.jsxs("div",{className:s==="local"?"pkt-input__container":"pkt-searchinput__field",children:[l.jsx("input",{className:`pkt-input ${e?"pkt-input--fullwidth":""}`,type:"search",name:n||i,id:i,placeholder:r,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:w,"aria-controls":`${i}-suggestions`,onChange:g||M,onKeyUp:k&&(E=>{E.key==="Enter"&&(E.preventDefault(),k(d))}),...y}),l.jsx(He,{className:`pkt-searchinput__button ${s==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:s==="local"?"tertiary":"primary",color:s==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:k&&(E=>{E.preventDefault(),k(d)}),children:a||r})]}),h&&l.jsx("ul",{id:`${i}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:h.map((E,G)=>l.jsx("li",{children:x.createElement(E.href?"a":E.onClick?"button":"div",{href:E.href,className:`pkt-searchinput__suggestion ${E.onClick?"pkt-link-button":""} ${E.href||E.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:E.onClick?"button":void 0,onClick:()=>C(E.onClick,G),onKeyUp:J=>J.key==="Enter"&&C(E.onClick,G)},l.jsxs(l.Fragment,{children:[E.title&&l.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:E.title}),E.text&&l.jsx("p",{className:"pkt-searchinput__suggestion-text",children:E.text})]}))},`search-suggestion-${G}`))})]}))}),Gh=x.forwardRef(({ariaDescribedby:s,ariaLabelledby:t,children:e,className:i,disabled:a=!1,errorMessage:n,hasError:r,helptext:h,helptextDropdown:d,helptextDropdownButton:p,id:m,inline:g=!1,fullwidth:k=!1,label:b,name:y,optionalTag:w=!1,optionalText:C,requiredTag:M=!1,requiredText:N,tagText:U,...E},G)=>{const J=[i,"pkt-select"].join(" ");return l.jsx(Bs,{className:J,forId:`${m}-input`,label:b,helptext:h,helptextDropdown:d,helptextDropdownButton:p,optionalTag:w,optionalText:C,requiredTag:M,requiredText:N,tagText:U,hasError:r,errorMessage:n,disabled:a,inline:g,ariaDescribedby:s,children:l.jsx("select",{ref:G,className:`pkt-input ${k?"pkt-input--fullwidth":""}`,"aria-invalid":r,"aria-errormessage":`${m}-error`,"aria-labelledby":t||void 0,disabled:a,id:`${m}-input`,name:y||m,...E,children:e})})}),Yh=l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:l.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),Zh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),l.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Xh=l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[l.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),l.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),Jh=({children:s,className:t,status:e="incomplete",title:i})=>l.jsxs("li",{className:Lt("pkt-step",t,`pkt-step--${e}`),"data-testid":"pkt-step",children:[l.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),l.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),l.jsx("span",{className:Lt("pkt-step__indicator"),children:e==="current"?Zh:e==="completed"?Xh:Yh}),l.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),l.jsxs("div",{className:"pkt-step__wrapper",children:[l.jsx("div",{className:"pkt-step__title",children:i}),l.jsx("div",{className:"pkt-step__content",children:s})]})]}),Qh=x.forwardRef(({activeStep:s,className:t,children:e,hideNonActiveSteps:i=!1,hideNonActiveStepsContent:a=!0,orientation:n="vertical",...r},h)=>{const d=Lt(t,"pkt-stepper",n==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),p=x.Children.map(e,(m,g)=>x.isValidElement(m)?x.cloneElement(m,{className:Lt(m.props.className,{"pkt-step--hideStep":i&&g!==s,"pkt-step--hideContent":a&&g!==s})}):m);return l.jsx("ol",{"data-testid":"pkt-stepper",className:d,ref:h,...r,children:p})}),td=({className:s,compact:t=!1,skin:e="basic",responsiveView:i=!0,children:a,...n})=>l.jsx("table",{"data-testid":"pkt-table",className:Lt(s,"pkt-table",{"pkt-table--responsive":i,"pkt-table--compact":t,"pkt-table--basic":e==="basic","pkt-table--zebra-blue":e==="zebra-blue"}),role:"table",...n,children:a}),ed=({id:s,children:t,className:e,...i})=>l.jsx("tbody",{id:s,className:Lt(e,"pkt-table__body",{}),...i,role:"rowgroup",children:t}),sd=({children:s,className:t,dataLabel:e,...i})=>l.jsx("td",{className:Lt(t,"pkt-table__data-cell",{}),"data-label":e,role:"cell","data-testid":"pkt-table__data-cell",...i,children:s}),id=({className:s,children:t,...e})=>l.jsx("thead",{className:Lt(s,"pkt-table__header",{}),role:"rowgroup",...e,children:t}),ad=({className:s,children:t,...e})=>l.jsx("th",{className:Lt(s,"pkt-table__header-cell",{}),role:"columnheader",...e,children:t}),nd=({className:s,children:t,...e})=>l.jsx("tr",{className:Lt(s,"pkt-table__row",{}),role:"row",...e,children:t}),rd=vt({tagName:"pkt-tag",elementClass:qt,react:Pn,displayName:"PktTag",events:{onClose:"close"}}),Li=x.forwardRef(({children:s,...t},e)=>l.jsx(rd,{ref:e,...t,children:l.jsx("div",{className:"pkt-contents",children:s})}));Li.displayName="PktTag";const Bi=x.forwardRef(({children:s,active:t,href:e,onClick:i,icon:a,controls:n,tag:r,tagSkin:h,index:d=0},p)=>{const{arrowNav:m,registerTabRef:g,handleKeyPress:k,selectTab:b}=od(),w={"aria-selected":m?!!t:void 0,"aria-controls":n,role:m?"tab":void 0,onKeyUp:M=>k(d,M),onClick:M=>{b(d),i==null||i(M)},tabIndex:t||!m?void 0:-1,ref:M=>{g(d,M),typeof p=="function"?p(M):p&&(p.current=M)}},C=l.jsxs(l.Fragment,{children:[a&&l.jsx(H,{name:a,className:"pkt-icon--small"}),s,r&&l.jsx(Li,{skin:h,size:"small",children:r})]});return e?l.jsx("a",{...w,href:e,className:`pkt-tabs__link ${t?"active":""}`,children:C}):l.jsx("button",{...w,type:"button",className:`pkt-tabs__button pkt-link-button ${t?"active":""}`,children:C})});Bi.displayName="PktTabItem";const mn=x.createContext(null),od=()=>{const s=x.useContext(mn);if(!s)throw new Error("TabItem must be used within a Tabs component");return s},ld=x.forwardRef(({arrowNav:s=!0,disableArrowNav:t=!1,tabs:e,onTabSelected:i,children:a},n)=>{const r=x.useRef([]),h=s&&!t,p=a&&x.Children.count(a)>0?x.Children.count(a):(e==null?void 0:e.length)||0;x.useEffect(()=>{r.current=r.current.slice(0,p)},[p]);const m=y=>{const w=e==null?void 0:e[y];w!=null&&w.action&&w.action(y),i&&i(y)},g=(y,w)=>{var C,M;h&&(w.code==="ArrowLeft"&&y!==0&&((C=r.current[y-1])==null||C.focus()),w.code==="ArrowRight"&&y<p-1&&((M=r.current[y+1])==null||M.focus()),(w.code==="ArrowDown"||w.code==="Space")&&m(y))},k=(y,w)=>{r.current[y]=w},b=e==null?void 0:e.map((y,w)=>{var C,M;return l.jsx(Bi,{active:y.active,href:y.href,onClick:()=>m(w),icon:y.icon,controls:y.controls,tag:(C=y.tag)==null?void 0:C.text,tagSkin:(M=y.tag)==null?void 0:M.skin,index:w,children:y.text},w)});return l.jsx(mn.Provider,{value:{arrowNav:h,registerTabRef:k,handleKeyPress:g,selectTab:m},children:l.jsx("div",{className:"pkt-tabs",ref:n,children:l.jsx("div",{className:"pkt-tabs__list",role:h?"tablist":"navigation",children:a||b})})})}),hd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,counter:i,counterMaxLength:a,className:n,disabled:r,errorMessage:h,hasError:d,helptext:p,helptextDropdown:m,helptextDropdownButton:g,inline:k,fullwidth:b=!1,label:y,name:w,optionalTag:C=!1,optionalText:M,requiredTag:N=!1,requiredText:U,tagText:E=null,placeholder:G,rows:J,useWrapper:Bt=!0,onChange:Ft,value:it,autoComplete:rt="off",minLength:Vt,maxLength:jt,readOnly:ot=!1,skipForwardTestid:L=!1,...Tt},ne)=>{const pe=[n,"pkt-textinput","pkt-textarea"].join(" "),re=`${s}-input`,Ue=`${re}-label`,ds=e||Ue,[ue,Rt]=x.useState(0),ct=qe=>{var ze,fe;if(i&&Rt(((fe=(ze=qe.currentTarget)==null?void 0:ze.value)==null?void 0:fe.length)||0),Ft)return Ft(qe)};return x.useEffect(()=>{it!==void 0&&Rt((it==null?void 0:it.length)||0)},[it]),l.jsx(Bs,{ariaDescribedby:t,className:pe,disabled:r,errorMessage:h,forId:re,hasError:d,helptext:p,helptextDropdown:m,helptextDropdownButton:g,inline:k,label:y,optionalTag:C,optionalText:M,requiredTag:N,requiredText:U,tagText:E,useWrapper:Bt,counter:i,counterCurrent:ue,counterMaxLength:a,children:l.jsx("textarea",{ref:ne,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${a&&ue>a?"pkt-input--counter-error":""}`,name:`${w||s}`,id:re,placeholder:G,disabled:r,rows:J,"aria-labelledby":ds,"aria-invalid":d,"aria-errormessage":`${s}-error`,...Tt,onChange:ct,value:it,autoComplete:rt,minLength:Vt,maxLength:jt,"data-skip-forward-testid":L?"true":void 0})})}),dd=x.forwardRef(({id:s,ariaDescribedby:t,ariaLabelledby:e,autocomplete:i="off",counter:a,counterMaxLength:n,className:r,disabled:h=!1,errorMessage:d,hasError:p=!1,helptext:m,helptextDropdown:g,helptextDropdownButton:k,iconNameRight:b,inline:y=!1,fullwidth:w=!1,label:C,name:M,optionalTag:N=!1,optionalText:U,requiredTag:E=!1,requiredText:G,tagText:J=null,placeholder:Bt,prefix:Ft,suffix:it,type:rt="text",useWrapper:Vt=!0,omitSearchIcon:jt=!1,value:ot,minLength:L,maxLength:Tt,min:ne,max:pe,step:re,size:Ue,readonly:ds,required:ue,dataTestid:Rt,onChange:ct,skipForwardTestid:qe=!1,...ze},fe)=>{const Vi=[r,"pkt-textinput"].join(" "),li=rt==="search"&&!b&&!jt,ji=rt==="date"&&ot?ot.slice(0,10):ot,[hi,cs]=x.useState((ot==null?void 0:ot.length)||0),ps=`${s}`,Vs=`${ps}-label`,di=e||Vs,Hi=xe=>{var ci,pi;a&&cs(((pi=(ci=xe.currentTarget)==null?void 0:ci.value)==null?void 0:pi.length)||0),ct&&ct(xe)};return x.useEffect(()=>{ot!==void 0&&cs((ot==null?void 0:ot.length)||0)},[ot]),l.jsx(Bs,{ariaDescribedby:t,className:Vi,disabled:h,errorMessage:d,forId:ps,hasError:p,helptext:m,helptextDropdown:g,helptextDropdownButton:k,inline:y,label:C,optionalTag:N,optionalText:U,requiredTag:E,requiredText:G,tagText:J,useWrapper:Vt,counter:a,counterCurrent:hi,counterMaxLength:n,children:l.jsxs("div",{className:"pkt-input__container","data-testid":Rt,"data-skip-forward-testid":qe?"true":void 0,children:[Ft&&l.jsx("div",{className:"pkt-input-prefix",children:Ft}),l.jsx("input",{...ze,ref:fe,className:`pkt-input ${w?"pkt-input--fullwidth":""} ${n&&hi>n?"pkt-input--counter-error":""}`,type:rt,name:`${M||s}`,value:ji,id:ps,placeholder:Bt,autoComplete:i,disabled:h,"aria-invalid":p,"aria-errormessage":`${s}-error`,"aria-labelledby":di,min:ne,max:pe,onChange:Hi,step:re,minLength:L,maxLength:Tt,size:Ue,required:ue}),it&&l.jsxs("p",{className:"pkt-input-suffix",children:[it,b&&l.jsx(H,{className:"pkt-input-suffix-icon",name:b}),li&&l.jsx(H,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!it&&b&&l.jsx(H,{className:"pkt-input-icon",name:b}),!it&&li&&l.jsx(H,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});var ls=window.CustomEvent;(!ls||typeof ls=="object")&&(ls=function(s,t){t=t||{};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,!!t.bubbles,!!t.cancelable,t.detail||null),e},ls.prototype=window.Event.prototype);function vn(s,t){var e="on"+t.type.toLowerCase();return typeof s[e]=="function"&&s[e](t),s.dispatchEvent(t)}function cd(s){for(;s&&s!==document.body;){var t=window.getComputedStyle(s),e=function(i,a){return!(t[i]===void 0||t[i]===a)};if(t.opacity<1||e("zIndex","auto")||e("transform","none")||e("mixBlendMode","normal")||e("filter","none")||e("perspective","none")||t.isolation==="isolate"||t.position==="fixed"||t.webkitOverflowScrolling==="touch")return!0;s=s.parentElement}return!1}function Fs(s){for(;s;){if(s.localName==="dialog")return s;s.parentElement?s=s.parentElement:s.parentNode?s=s.parentNode.host:s=null}return null}function bn(s){for(;s&&s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;s&&s.blur&&s!==document.body&&s.blur()}function pd(s,t){for(var e=0;e<s.length;++e)if(s[e]===t)return!0;return!1}function Fi(s){return!s||!s.hasAttribute("method")?!1:s.getAttribute("method").toLowerCase()==="dialog"}function yn(s){var t=["button","input","keygen","select","textarea"],e=t.map(function(r){return r+":not([disabled])"});e.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=s.querySelector(e.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var a=s.querySelectorAll("*"),n=0;n<a.length&&!(a[n].tagName&&a[n].shadowRoot&&(i=yn(a[n].shadowRoot),i));n++);return i}function kn(s){return s.isConnected||document.body.contains(s)}function $n(s){if(s.submitter)return s.submitter;var t=s.target;if(!(t instanceof HTMLFormElement))return null;var e=z.formSubmitter;if(!e){var i=s.target,a="getRootNode"in i&&i.getRootNode()||document;e=a.activeElement}return!e||e.form!==t?null:e}function ud(s){if(!s.defaultPrevented){var t=s.target,e=z.imagemapUseValue,i=$n(s);e===null&&i&&(e=i.value);var a=Fs(t);if(a){var n=i&&i.getAttribute("formmethod")||t.getAttribute("method");n==="dialog"&&(s.preventDefault(),e!=null?a.close(e):a.close())}}}function _n(s){if(this.dialog_=s,this.replacedStyleTop_=!1,this.openAsModal_=!1,s.hasAttribute("role")||s.setAttribute("role","dialog"),s.show=this.show.bind(this),s.showModal=this.showModal.bind(this),s.close=this.close.bind(this),s.addEventListener("submit",ud,!1),"returnValue"in s||(s.returnValue=""),"MutationObserver"in window){var t=new MutationObserver(this.maybeHideModal.bind(this));t.observe(s,{attributes:!0,attributeFilter:["open"]})}else{var e=!1,i=(function(){e?this.downgradeModal():this.maybeHideModal(),e=!1}).bind(this),a,n=function(r){if(r.target===s){var h="DOMNodeRemoved";e|=r.type.substr(0,h.length)===h,window.clearTimeout(a),a=window.setTimeout(i,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(r){s.addEventListener(r,n)})}Object.defineProperty(s,"open",{set:this.setOpen.bind(this),get:s.hasAttribute.bind(s,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}_n.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&kn(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),z.dm.removeDialog(this))},setOpen:function(s){s?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(s){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var e=document.createEvent("MouseEvents");e.initMouseEvent(s.type,s.bubbles,s.cancelable,window,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget),this.dialog_.dispatchEvent(e),s.stopPropagation()},focus_:function(){var s=this.dialog_.querySelector("[autofocus]:not([disabled])");!s&&this.dialog_.tabIndex>=0&&(s=this.dialog_),s||(s=yn(this.dialog_)),bn(document.activeElement),s&&s.focus()},updateZIndex:function(s,t){if(s<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=s,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!kn(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!z.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");cd(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,z.needsCentering(this.dialog_)?(z.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(s){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),s!==void 0&&(this.dialog_.returnValue=s);var t=new ls("close",{bubbles:!1,cancelable:!1});vn(this.dialog_,t)}};var z={};if(z.reposition=function(s){var t=document.body.scrollTop||document.documentElement.scrollTop,e=t+(window.innerHeight-s.offsetHeight)/2;s.style.top=Math.max(t,e)+"px"},z.isInlinePositionSetByStylesheet=function(s){for(var t=0;t<document.styleSheets.length;++t){var e=document.styleSheets[t],i=null;try{i=e.cssRules}catch{}if(i)for(var a=0;a<i.length;++a){var n=i[a],r=null;try{r=document.querySelectorAll(n.selectorText)}catch{}if(!(!r||!pd(r,s))){var h=n.style.getPropertyValue("top"),d=n.style.getPropertyValue("bottom");if(h&&h!=="auto"||d&&d!=="auto")return!0}}}return!1},z.needsCentering=function(s){var t=window.getComputedStyle(s);return t.position!=="absolute"||s.style.top!=="auto"&&s.style.top!==""||s.style.bottom!=="auto"&&s.style.bottom!==""?!1:!z.isInlinePositionSetByStylesheet(s)},z.forceRegisterDialog=function(s){if((window.HTMLDialogElement||s.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",s),s.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new _n(s)},z.registerDialog=function(s){s.showModal||z.forceRegisterDialog(s)},z.DialogManager=function(){this.pendingDialogStack=[];var s=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(t){this.forwardTab_=void 0,t.stopPropagation(),s([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var e=[];t.forEach(function(i){for(var a=0,n;n=i.removedNodes[a];++a){if(n instanceof Element)n.localName==="dialog"&&e.push(n);else continue;e=e.concat(n.querySelectorAll("dialog"))}}),e.length&&s(e)}))},z.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},z.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},z.DialogManager.prototype.updateStacking=function(){for(var s=this.zIndexHigh_,t=0,e;e=this.pendingDialogStack[t];++t)e.updateZIndex(--s,--s),t===0&&(this.overlay.style.zIndex=--s);var i=this.pendingDialogStack[0];if(i){var a=i.dialog.parentNode||document.body;a.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},z.DialogManager.prototype.containedByTopDialog_=function(s){for(;s=Fs(s);){for(var t=0,e;e=this.pendingDialogStack[t];++t)if(e.dialog===s)return t===0;s=s.parentElement}return!1},z.DialogManager.prototype.handleFocus_=function(s){var t=s.composedPath?s.composedPath()[0]:s.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(s.preventDefault(),s.stopPropagation(),bn(t),this.forwardTab_!==void 0)){var e=this.pendingDialogStack[0],i=e.dialog,a=i.compareDocumentPosition(t);return a&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?e.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},z.DialogManager.prototype.handleKey_=function(s){if(this.forwardTab_=void 0,s.keyCode===27){s.preventDefault(),s.stopPropagation();var t=new ls("cancel",{bubbles:!1,cancelable:!0}),e=this.pendingDialogStack[0];e&&vn(e.dialog,t)&&e.dialog.close()}else s.keyCode===9&&(this.forwardTab_=!s.shiftKey)},z.DialogManager.prototype.checkDOM_=function(s){var t=this.pendingDialogStack.slice();t.forEach(function(e){s.indexOf(e.dialog)!==-1?e.downgradeModal():e.maybeHideModal()})},z.DialogManager.prototype.pushDialog=function(s){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=t?!1:(this.pendingDialogStack.unshift(s)===1&&this.blockDocument(),this.updateStacking(),!0)},z.DialogManager.prototype.removeDialog=function(s){var t=this.pendingDialogStack.indexOf(s);t!==-1&&(this.pendingDialogStack.splice(t,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},z.dm=new z.DialogManager,z.formSubmitter=null,z.imagemapUseValue=null,window.HTMLDialogElement===void 0){var wn=document.createElement("form");if(wn.setAttribute("method","dialog"),wn.method!=="dialog"){var hs=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(hs){var fd=hs.get;hs.get=function(){return Fi(this)?"dialog":fd.call(this)};var gd=hs.set;hs.set=function(s){return typeof s=="string"&&s.toLowerCase()==="dialog"?this.setAttribute("method",s):gd.call(this,s)},Object.defineProperty(HTMLFormElement.prototype,"method",hs)}}document.addEventListener("click",function(s){if(z.formSubmitter=null,z.imagemapUseValue=null,!s.defaultPrevented){var t=s.target;if("composedPath"in s){var e=s.composedPath();t=e.shift()||t}if(!(!t||!Fi(t.form))){var i=t.type==="submit"&&["button","input"].indexOf(t.localName)>-1;if(!i){if(!(t.localName==="input"&&t.type==="image"))return;z.imagemapUseValue=s.offsetX+","+s.offsetY}var a=Fs(t);a&&(z.formSubmitter=t)}}},!1),document.addEventListener("submit",function(s){var t=s.target,e=Fs(t);if(!e){var i=$n(s),a=i&&i.getAttribute("formmethod")||t.getAttribute("method");a==="dialog"&&s.preventDefault()}});var md=HTMLFormElement.prototype.submit,vd=function(){if(!Fi(this))return md.call(this);var s=Fs(this);s&&s.close()};HTMLFormElement.prototype.submit=vd}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));O.PktAccordion=Ri,O.PktAccordionItem=Ja,O.PktAlert=Ii,O.PktBackLink=tn,O.PktBreadcrumbs=Oh,O.PktButton=He,O.PktCard=en,O.PktCheckbox=sn,O.PktCombobox=an,O.PktConsent=oi,O.PktDatepicker=nn,O.PktFooter=Lh,O.PktFooterSimple=Bh,O.PktHeader=Fh,O.PktHeading=rn,O.PktHelptext=on,O.PktIcon=H,O.PktInput=ln,O.PktInputWrapper=Bs,O.PktLink=hn,O.PktLinkCard=dn,O.PktLoader=cn,O.PktMessagebox=pn,O.PktModal=un,O.PktProgressbar=fn,O.PktRadioButton=gn,O.PktSearchInput=Kh,O.PktSelect=Gh,O.PktStep=Jh,O.PktStepper=Qh,O.PktTabItem=Bi,O.PktTable=td,O.PktTableBody=ed,O.PktTableDataCell=sd,O.PktTableHeader=id,O.PktTableHeaderCell=ad,O.PktTableRow=nd,O.PktTabs=ld,O.PktTag=Li,O.PktTextarea=hd,O.PktTextinput=dd,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.11.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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
41
41
|
"@lit/react": "^1.0.7",
|
|
42
|
-
"@oslokommune/punkt-elements": "^13.
|
|
42
|
+
"@oslokommune/punkt-elements": "^13.11.0",
|
|
43
43
|
"classnames": "^2.5.1",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
45
45
|
"react-element-to-jsx-string": "^15.0.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
|
|
51
|
-
"@oslokommune/punkt-assets": "^13.
|
|
52
|
-
"@oslokommune/punkt-css": "^13.
|
|
51
|
+
"@oslokommune/punkt-assets": "^13.11.0",
|
|
52
|
+
"@oslokommune/punkt-css": "^13.11.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",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
107
107
|
},
|
|
108
108
|
"license": "MIT",
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "f25b08c9f4382250d0097d22bc8541cfd459fe73"
|
|
110
110
|
}
|