@oslokommune/punkt-react 13.0.1 → 13.0.2
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
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [13.0.2](https://github.com/oslokommune/punkt/compare/13.0.1...13.0.2) (2025-07-07)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* Checkbox/Radio: Støtte både controlled og uncontrolled (#2686).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [13.0.1](https://github.com/oslokommune/punkt/compare/13.0.0...13.0.1) (2025-07-04)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -28947,7 +28947,7 @@ const YS = xr(
|
|
|
28947
28947
|
type: "checkbox",
|
|
28948
28948
|
id: r,
|
|
28949
28949
|
disabled: i,
|
|
28950
|
-
defaultChecked: $
|
|
28950
|
+
...N !== void 0 ? { checked: N } : { defaultChecked: $ },
|
|
28951
28951
|
...R
|
|
28952
28952
|
}
|
|
28953
28953
|
),
|
|
@@ -40281,7 +40281,7 @@ const iH = xr(
|
|
|
40281
40281
|
name: n,
|
|
40282
40282
|
disabled: h,
|
|
40283
40283
|
className: `pkt-input-check__input-checkbox ${D ? "pkt-input-check__input-checkbox--error" : ""}`,
|
|
40284
|
-
defaultChecked: x
|
|
40284
|
+
...E !== void 0 ? { checked: E } : { defaultChecked: x },
|
|
40285
40285
|
...$
|
|
40286
40286
|
}
|
|
40287
40287
|
),
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1429,7 +1429,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1429
1429
|
<ul>
|
|
1430
1430
|
${r.map(n=>we`<li>${n}</li>`)}
|
|
1431
1431
|
</ul>
|
|
1432
|
-
`}doStuff(r){return r.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Ig([z({type:String})],Nh.prototype,"string",2),Ig([z({converter:Hx})],Nh.prototype,"strings",2),Ig([z({type:Boolean})],Nh.prototype,"darkmode",2),Ig([z({type:Array})],Nh.prototype,"_list",2),Nh=Ig([fr("pkt-component")],Nh);const dR=ti({tagName:"pkt-accordion",elementClass:RP,react:$e,displayName:"PktAccordion"}),Xx=$e.forwardRef(({children:r,...n},i)=>L.jsx(dR,{"data-testid":"pkt-accordion",...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));Xx.displayName="PktAccordion";const fR=ti({tagName:"pkt-accordion-item",elementClass:BP,react:$e,displayName:"PktAccordionItem",events:{onClick:"click"}}),Jx=$e.forwardRef(({children:r,...n},i)=>L.jsx(fR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));Jx.displayName="PktAccordionItem";const pR=ti({tagName:"pkt-alert",elementClass:_s,react:$e,displayName:"PktAlert",events:{onClose:"close"}}),w0=$e.forwardRef(({children:r,...n},i)=>L.jsx(pR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));w0.displayName="PktAlert";const Qx=ti({tagName:"pkt-backlink",elementClass:_h,react:$e,displayName:"PktBackLink"});Qx.displayName="PktBackLink";const Mn=ti({tagName:"pkt-icon",elementClass:Bf,react:$e,displayName:"PktIcon",events:{}}),hR=$e.forwardRef(({breadcrumbs:r,navigationType:n,className:i,...l},c)=>{const h=r,m=h[h.length-2],D=[i,"pkt-breadcrumbs"].filter(Boolean).join(" ");return L.jsxs("nav",{ref:c,"aria-label":"brødsmulemeny",className:D,children:[L.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:h.map((C,E)=>L.jsx("li",{className:"pkt-breadcrumbs__item",children:E===h.length-1?L.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})}):n==="router"?L.jsxs($f.Link,{to:C.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(Mn,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})]}):L.jsxs("a",{href:C.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(Mn,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})]})},`breadcrumb-${E}`))}),n==="router"?L.jsxs($f.Link,{to:m.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(Mn,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:m.text})]}):L.jsxs("a",{href:m.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(Mn,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:m.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.0/animations/";const bc=$e.forwardRef(({children:r,className:n,iconName:i="user",secondIconName:l="user",size:c="medium",skin:h="primary",type:m="button",variant:D="label-only",state:C,color:E,isLoading:$=void 0,disabled:P=void 0,loadingAnimationPath:R=window.pktAnimationPath,...O},I)=>{const J=[n,"pkt-btn",c&&`pkt-btn--${c}`,h&&`pkt-btn--${h}`,D&&`pkt-btn--${D}`,E&&`pkt-btn--${E}`,C&&`pkt-btn--${C}`,$&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return L.jsxs("button",{...O,"aria-busy":$||void 0,"aria-disabled":P||void 0,disabled:P,className:J,type:m,ref:I,children:[$&&L.jsx(Mn,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:R}),D!=="label-only"&&L.jsx(Mn,{className:"pkt-btn__icon",name:i}),L.jsx("span",{className:"pkt-btn__text",children:r}),D==="icons-right-and-left"&&L.jsx(Mn,{className:"pkt-btn__icon",name:l})]})});bc.displayName="PktButton";const mR=ti({tagName:"pkt-card",elementClass:Sa,react:$e,displayName:"PktCard",events:{}}),Kx=$e.forwardRef(({children:r,...n},i)=>L.jsx(mR,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));Kx.displayName="PktCard";const ib=$e.forwardRef(({id:r,hasTile:n=!1,disabled:i=!1,label:l,checkHelptext:c,hasError:h=!1,className:m,isSwitch:D=!1,hideLabel:C=!1,labelPosition:E,defaultChecked:$,checked:P,...R},O)=>{const I=[m,"pkt-input-check"].filter(Boolean).join(" ");return L.jsx("div",{className:I,children:L.jsxs("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""}`,children:[L.jsx("input",{role:D?"switch":"checkbox",ref:O,className:`pkt-input-check__input-checkbox ${h?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:r,disabled:i,defaultChecked:$||P,...R}),L.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[l,c&&L.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});ib.displayName="PktCheckbox";const gR=ti({tagName:"pkt-combobox",elementClass:Ur,react:$e,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),Zx=$e.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(gR,{...i,ref:l,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));Zx.displayName="PktCombobox";const ob=ti({tagName:"pkt-consent",elementClass:Ts,react:$e,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});ob.displayName="PktConsent";const vR=ti({tagName:"pkt-datepicker",elementClass:Xr,react:$e,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),D0=$e.forwardRef(({helptext:r,...n},i)=>L.jsx(vR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",slot:"helptext",children:r})}));D0.displayName="PktDatepicker";const yR=({columnOne:r,columnTwo:n,socialLinks:i,className:l,openLinksInNewTab:c=!1,personvernOgInfoLink:h="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:m="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:D=!1,hotjarId:C=null,googleAnalyticsId:E=null,devMode:$=!1,cookieDomain:P=null,cookieSecure:R=null,cookieExpiryDays:O=null,onToggleConsent:I=J=>{console.log(J.detail)}})=>{var V,De;const J=[l,"pkt-footer"].filter(Boolean).join(" ");return L.jsx("footer",{className:J,"data-mode":"dark",children:L.jsxs("div",{className:"pkt-footer__container",children:[L.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:r.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&L.jsx("li",{className:"pkt-footer__text",children:r.text}),(V=r.links)==null?void 0:V.map((q,W)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${q.external?"pkt-link--external":""}`,href:q.href,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),q.text]})},`links-${W}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:n.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&L.jsx("li",{className:"pkt-footer__text",children:n.text}),(De=n.links)==null?void 0:De.map((q,W)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${q.external?"pkt-link--external":""}`,href:q.href,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),q.text]})},`links-${W}`))]})]}),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:h,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{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:m,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),D&&L.jsx("li",{className:"pkt-footer__list-item",children:L.jsx(ob,{triggerType:"footerlink",hotjarId:C,googleAnalyticsId:E,devMode:$,cookieDomain:P,cookieSecure:R,cookieExpiryDays:O,onToggleConsent:I})})]})]})]}),i&&L.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[L.jsx("div",{className:"pkt-footer__social-languages",children:i.filter(q=>q.language).map((q,W)=>L.jsx("div",{className:"pkt-footer__social-language",children:L.jsx("a",{href:q.href,"aria-label":`til ${q.language} versjon av nettsiden`,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:q.language})},`sociallinks-language-${W}`))}),L.jsx("div",{className:"pkt-footer__social-icons",children:i.filter(q=>q.iconName).map((q,W)=>L.jsx($e.Fragment,{children:L.jsx("a",{href:q.href,"aria-label":`til ${q.iconName}`,className:"pkt-footer__social-icon-link",target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:L.jsx(Mn,{className:"pkt-footer__social-icon",name:q.iconName})})},`sociallinks-${W}`))})]})]})})},bR=({links:r=[],openLinksInNewTab:n=!1,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:l="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:c=!1,hotjarId:h=null,googleAnalyticsId:m=null,devMode:D=!1,cookieDomain:C=null,cookieSecure:E=null,cookieExpiryDays:$=null,onToggleConsent:P=O=>{console.log(O.detail)},className:R})=>{const O=[R,"pkt-footer-simple"].filter(Boolean).join(" ");return L.jsx("footer",{className:O,"data-mode":"dark",children:L.jsx("div",{className:"pkt-footer-simple__container",children:L.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((I,J)=>L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:`pkt-footer-simple__link ${I.external?" pkt-link--external":""}`,href:I.href,target:I.openInNewTab||n?"_blank":"_self",rel:I.openInNewTab||n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),I.text]})},J)),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:l,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),c&&L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsx(ob,{triggerType:"footerlink",hotjarId:h,googleAnalyticsId:m,devMode:D,cookieDomain:C,cookieSecure:E,cookieExpiryDays:$,onToggleConsent:P})})]})})})};var e_={exports:{}};/*!
|
|
1432
|
+
`}doStuff(r){return r.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};Ig([z({type:String})],Nh.prototype,"string",2),Ig([z({converter:Hx})],Nh.prototype,"strings",2),Ig([z({type:Boolean})],Nh.prototype,"darkmode",2),Ig([z({type:Array})],Nh.prototype,"_list",2),Nh=Ig([fr("pkt-component")],Nh);const dR=ti({tagName:"pkt-accordion",elementClass:RP,react:$e,displayName:"PktAccordion"}),Xx=$e.forwardRef(({children:r,...n},i)=>L.jsx(dR,{"data-testid":"pkt-accordion",...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));Xx.displayName="PktAccordion";const fR=ti({tagName:"pkt-accordion-item",elementClass:BP,react:$e,displayName:"PktAccordionItem",events:{onClick:"click"}}),Jx=$e.forwardRef(({children:r,...n},i)=>L.jsx(fR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));Jx.displayName="PktAccordionItem";const pR=ti({tagName:"pkt-alert",elementClass:_s,react:$e,displayName:"PktAlert",events:{onClose:"close"}}),w0=$e.forwardRef(({children:r,...n},i)=>L.jsx(pR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));w0.displayName="PktAlert";const Qx=ti({tagName:"pkt-backlink",elementClass:_h,react:$e,displayName:"PktBackLink"});Qx.displayName="PktBackLink";const Mn=ti({tagName:"pkt-icon",elementClass:Bf,react:$e,displayName:"PktIcon",events:{}}),hR=$e.forwardRef(({breadcrumbs:r,navigationType:n,className:i,...l},c)=>{const h=r,m=h[h.length-2],D=[i,"pkt-breadcrumbs"].filter(Boolean).join(" ");return L.jsxs("nav",{ref:c,"aria-label":"brødsmulemeny",className:D,children:[L.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:h.map((C,E)=>L.jsx("li",{className:"pkt-breadcrumbs__item",children:E===h.length-1?L.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})}):n==="router"?L.jsxs($f.Link,{to:C.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(Mn,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})]}):L.jsxs("a",{href:C.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[L.jsx(Mn,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:C.text})]})},`breadcrumb-${E}`))}),n==="router"?L.jsxs($f.Link,{to:m.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(Mn,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:m.text})]}):L.jsxs("a",{href:m.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[L.jsx(Mn,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),L.jsx("span",{className:"pkt-breadcrumbs__text",children:m.text})]})]})});window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.0/animations/";const bc=$e.forwardRef(({children:r,className:n,iconName:i="user",secondIconName:l="user",size:c="medium",skin:h="primary",type:m="button",variant:D="label-only",state:C,color:E,isLoading:$=void 0,disabled:P=void 0,loadingAnimationPath:R=window.pktAnimationPath,...O},I)=>{const J=[n,"pkt-btn",c&&`pkt-btn--${c}`,h&&`pkt-btn--${h}`,D&&`pkt-btn--${D}`,E&&`pkt-btn--${E}`,C&&`pkt-btn--${C}`,$&&"pkt-btn--isLoading"].filter(Boolean).join(" ");return L.jsxs("button",{...O,"aria-busy":$||void 0,"aria-disabled":P||void 0,disabled:P,className:J,type:m,ref:I,children:[$&&L.jsx(Mn,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:R}),D!=="label-only"&&L.jsx(Mn,{className:"pkt-btn__icon",name:i}),L.jsx("span",{className:"pkt-btn__text",children:r}),D==="icons-right-and-left"&&L.jsx(Mn,{className:"pkt-btn__icon",name:l})]})});bc.displayName="PktButton";const mR=ti({tagName:"pkt-card",elementClass:Sa,react:$e,displayName:"PktCard",events:{}}),Kx=$e.forwardRef(({children:r,...n},i)=>L.jsx(mR,{...n,ref:i,children:L.jsx("div",{className:"pkt-contents",children:r})}));Kx.displayName="PktCard";const ib=$e.forwardRef(({id:r,hasTile:n=!1,disabled:i=!1,label:l,checkHelptext:c,hasError:h=!1,className:m,isSwitch:D=!1,hideLabel:C=!1,labelPosition:E,defaultChecked:$,checked:P,...R},O)=>{const I=[m,"pkt-input-check"].filter(Boolean).join(" ");return L.jsx("div",{className:I,children:L.jsxs("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""}`,children:[L.jsx("input",{role:D?"switch":"checkbox",ref:O,className:`pkt-input-check__input-checkbox ${h?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",id:r,disabled:i,...P!==void 0?{checked:P}:{defaultChecked:$},...R}),L.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[l,c&&L.jsx("div",{className:"pkt-input-check__input-helptext",children:c})]})]})})});ib.displayName="PktCheckbox";const gR=ti({tagName:"pkt-combobox",elementClass:Ur,react:$e,displayName:"PktCombobox",events:{onClick:"click",onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),Zx=$e.forwardRef(({children:r,helptext:n,...i},l)=>L.jsxs(gR,{...i,ref:l,children:[n&&L.jsx("div",{slot:"helptext",className:"pkt-contents",children:n}),r]}));Zx.displayName="PktCombobox";const ob=ti({tagName:"pkt-consent",elementClass:Ts,react:$e,displayName:"PktConsent",events:{onToggleConsent:"toggle-consent"}});ob.displayName="PktConsent";const vR=ti({tagName:"pkt-datepicker",elementClass:Xr,react:$e,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),D0=$e.forwardRef(({helptext:r,...n},i)=>L.jsx(vR,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",slot:"helptext",children:r})}));D0.displayName="PktDatepicker";const yR=({columnOne:r,columnTwo:n,socialLinks:i,className:l,openLinksInNewTab:c=!1,personvernOgInfoLink:h="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:m="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:D=!1,hotjarId:C=null,googleAnalyticsId:E=null,devMode:$=!1,cookieDomain:P=null,cookieSecure:R=null,cookieExpiryDays:O=null,onToggleConsent:I=J=>{console.log(J.detail)}})=>{var V,De;const J=[l,"pkt-footer"].filter(Boolean).join(" ");return L.jsx("footer",{className:J,"data-mode":"dark",children:L.jsxs("div",{className:"pkt-footer__container",children:[L.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:r.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&L.jsx("li",{className:"pkt-footer__text",children:r.text}),(V=r.links)==null?void 0:V.map((q,W)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${q.external?"pkt-link--external":""}`,href:q.href,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),q.text]})},`links-${W}`))]})]}),L.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[L.jsx("h2",{className:"pkt-footer__title",children:n.title}),L.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&L.jsx("li",{className:"pkt-footer__text",children:n.text}),(De=n.links)==null?void 0:De.map((q,W)=>L.jsx("li",{className:"pkt-footer__list-item",children:L.jsxs("a",{className:`pkt-footer__link ${q.external?"pkt-link--external":""}`,href:q.href,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),q.text]})},`links-${W}`))]})]}),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:h,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{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:m,target:c?"_blank":"_self",rel:c?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),D&&L.jsx("li",{className:"pkt-footer__list-item",children:L.jsx(ob,{triggerType:"footerlink",hotjarId:C,googleAnalyticsId:E,devMode:$,cookieDomain:P,cookieSecure:R,cookieExpiryDays:O,onToggleConsent:I})})]})]})]}),i&&L.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[L.jsx("div",{className:"pkt-footer__social-languages",children:i.filter(q=>q.language).map((q,W)=>L.jsx("div",{className:"pkt-footer__social-language",children:L.jsx("a",{href:q.href,"aria-label":`til ${q.language} versjon av nettsiden`,target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:q.language})},`sociallinks-language-${W}`))}),L.jsx("div",{className:"pkt-footer__social-icons",children:i.filter(q=>q.iconName).map((q,W)=>L.jsx($e.Fragment,{children:L.jsx("a",{href:q.href,"aria-label":`til ${q.iconName}`,className:"pkt-footer__social-icon-link",target:q.openInNewTab||c?"_blank":"_self",rel:q.openInNewTab||c?"noopener noreferrer":void 0,children:L.jsx(Mn,{className:"pkt-footer__social-icon",name:q.iconName})})},`sociallinks-${W}`))})]})]})})},bR=({links:r=[],openLinksInNewTab:n=!1,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:l="https://www.oslo.kommune.no/tilgjengelighet/",includeConsent:c=!1,hotjarId:h=null,googleAnalyticsId:m=null,devMode:D=!1,cookieDomain:C=null,cookieSecure:E=null,cookieExpiryDays:$=null,onToggleConsent:P=O=>{console.log(O.detail)},className:R})=>{const O=[R,"pkt-footer-simple"].filter(Boolean).join(" ");return L.jsx("footer",{className:O,"data-mode":"dark",children:L.jsx("div",{className:"pkt-footer-simple__container",children:L.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((I,J)=>L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:`pkt-footer-simple__link ${I.external?" pkt-link--external":""}`,href:I.href,target:I.openInNewTab||n?"_blank":"_self",rel:I.openInNewTab||n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),I.text]})},J)),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:i,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsxs("a",{className:"pkt-footer-simple__link",href:l,target:n?"_blank":"_self",rel:n?"noopener noreferrer":void 0,children:[L.jsx(Mn,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})}),c&&L.jsx("li",{className:"pkt-footer-simple__list-item",children:L.jsx(ob,{triggerType:"footerlink",hotjarId:h,googleAnalyticsId:m,devMode:D,cookieDomain:C,cookieSecure:E,cookieExpiryDays:$,onToggleConsent:P})})]})})})};var e_={exports:{}};/*!
|
|
1433
1433
|
Copyright (c) 2018 Jed Watson.
|
|
1434
1434
|
Licensed under the MIT License (MIT), see
|
|
1435
1435
|
http://jedwatson.github.io/classnames
|
|
@@ -1545,4 +1545,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1545
1545
|
*/var i=function(l){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,h=0,m={},D={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function q(W){return W instanceof C?new C(W.type,q(W.content),W.alias):Array.isArray(W)?W.map(q):W.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(q){return Object.prototype.toString.call(q).slice(8,-1)},objId:function(q){return q.__id||Object.defineProperty(q,"__id",{value:++h}),q.__id},clone:function q(W,K){K=K||{};var X,ae;switch(D.util.type(W)){case"Object":if(ae=D.util.objId(W),K[ae])return K[ae];X={},K[ae]=X;for(var ue in W)W.hasOwnProperty(ue)&&(X[ue]=q(W[ue],K));return X;case"Array":return ae=D.util.objId(W),K[ae]?K[ae]:(X=[],K[ae]=X,W.forEach(function(xe,ye){X[ye]=q(xe,K)}),X);default:return W}},getLanguage:function(q){for(;q;){var W=c.exec(q.className);if(W)return W[1].toLowerCase();q=q.parentElement}return"none"},setLanguage:function(q,W){q.className=q.className.replace(RegExp(c,"gi"),""),q.classList.add("language-"+W)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(X){var q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(X.stack)||[])[1];if(q){var W=document.getElementsByTagName("script");for(var K in W)if(W[K].src==q)return W[K]}return null}},isActive:function(q,W,K){for(var X="no-"+W;q;){var ae=q.classList;if(ae.contains(W))return!0;if(ae.contains(X))return!1;q=q.parentElement}return!!K}},languages:{plain:m,plaintext:m,text:m,txt:m,extend:function(q,W){var K=D.util.clone(D.languages[q]);for(var X in W)K[X]=W[X];return K},insertBefore:function(q,W,K,X){X=X||D.languages;var ae=X[q],ue={};for(var xe in ae)if(ae.hasOwnProperty(xe)){if(xe==W)for(var ye in K)K.hasOwnProperty(ye)&&(ue[ye]=K[ye]);K.hasOwnProperty(xe)||(ue[xe]=ae[xe])}var Ye=X[q];return X[q]=ue,D.languages.DFS(D.languages,function(We,Me){Me===Ye&&We!=q&&(this[We]=ue)}),ue},DFS:function q(W,K,X,ae){ae=ae||{};var ue=D.util.objId;for(var xe in W)if(W.hasOwnProperty(xe)){K.call(W,xe,W[xe],X||xe);var ye=W[xe],Ye=D.util.type(ye);Ye==="Object"&&!ae[ue(ye)]?(ae[ue(ye)]=!0,q(ye,K,null,ae)):Ye==="Array"&&!ae[ue(ye)]&&(ae[ue(ye)]=!0,q(ye,K,xe,ae))}}},plugins:{},highlightAll:function(q,W){D.highlightAllUnder(document,q,W)},highlightAllUnder:function(q,W,K){var X={callback:K,container:q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};D.hooks.run("before-highlightall",X),X.elements=Array.prototype.slice.apply(X.container.querySelectorAll(X.selector)),D.hooks.run("before-all-elements-highlight",X);for(var ae=0,ue;ue=X.elements[ae++];)D.highlightElement(ue,W===!0,X.callback)},highlightElement:function(q,W,K){var X=D.util.getLanguage(q),ae=D.languages[X];D.util.setLanguage(q,X);var ue=q.parentElement;ue&&ue.nodeName.toLowerCase()==="pre"&&D.util.setLanguage(ue,X);var xe=q.textContent,ye={element:q,language:X,grammar:ae,code:xe};function Ye(Me){ye.highlightedCode=Me,D.hooks.run("before-insert",ye),ye.element.innerHTML=ye.highlightedCode,D.hooks.run("after-highlight",ye),D.hooks.run("complete",ye),K&&K.call(ye.element)}if(D.hooks.run("before-sanity-check",ye),ue=ye.element.parentElement,ue&&ue.nodeName.toLowerCase()==="pre"&&!ue.hasAttribute("tabindex")&&ue.setAttribute("tabindex","0"),!ye.code){D.hooks.run("complete",ye),K&&K.call(ye.element);return}if(D.hooks.run("before-highlight",ye),!ye.grammar){Ye(D.util.encode(ye.code));return}if(W&&l.Worker){var We=new Worker(D.filename);We.onmessage=function(Me){Ye(Me.data)},We.postMessage(JSON.stringify({language:ye.language,code:ye.code,immediateClose:!0}))}else Ye(D.highlight(ye.code,ye.grammar,ye.language))},highlight:function(q,W,K){var X={code:q,grammar:W,language:K};if(D.hooks.run("before-tokenize",X),!X.grammar)throw new Error('The language "'+X.language+'" has no grammar.');return X.tokens=D.tokenize(X.code,X.grammar),D.hooks.run("after-tokenize",X),C.stringify(D.util.encode(X.tokens),X.language)},tokenize:function(q,W){var K=W.rest;if(K){for(var X in K)W[X]=K[X];delete W.rest}var ae=new P;return R(ae,ae.head,q),$(q,ae,W,ae.head,0),I(ae)},hooks:{all:{},add:function(q,W){var K=D.hooks.all;K[q]=K[q]||[],K[q].push(W)},run:function(q,W){var K=D.hooks.all[q];if(!(!K||!K.length))for(var X=0,ae;ae=K[X++];)ae(W)}},Token:C};l.Prism=D;function C(q,W,K,X){this.type=q,this.content=W,this.alias=K,this.length=(X||"").length|0}C.stringify=function q(W,K){if(typeof W=="string")return W;if(Array.isArray(W)){var X="";return W.forEach(function(Ye){X+=q(Ye,K)}),X}var ae={type:W.type,content:q(W.content,K),tag:"span",classes:["token",W.type],attributes:{},language:K},ue=W.alias;ue&&(Array.isArray(ue)?Array.prototype.push.apply(ae.classes,ue):ae.classes.push(ue)),D.hooks.run("wrap",ae);var xe="";for(var ye in ae.attributes)xe+=" "+ye+'="'+(ae.attributes[ye]||"").replace(/"/g,""")+'"';return"<"+ae.tag+' class="'+ae.classes.join(" ")+'"'+xe+">"+ae.content+"</"+ae.tag+">"};function E(q,W,K,X){q.lastIndex=W;var ae=q.exec(K);if(ae&&X&&ae[1]){var ue=ae[1].length;ae.index+=ue,ae[0]=ae[0].slice(ue)}return ae}function $(q,W,K,X,ae,ue){for(var xe in K)if(!(!K.hasOwnProperty(xe)||!K[xe])){var ye=K[xe];ye=Array.isArray(ye)?ye:[ye];for(var Ye=0;Ye<ye.length;++Ye){if(ue&&ue.cause==xe+","+Ye)return;var We=ye[Ye],Me=We.inside,Qe=!!We.lookbehind,Ie=!!We.greedy,at=We.alias;if(Ie&&!We.pattern.global){var Le=We.pattern.toString().match(/[imsuy]*$/)[0];We.pattern=RegExp(We.pattern.source,Le+"g")}for(var Ae=We.pattern||We,ce=X.next,Ne=ae;ce!==W.tail&&!(ue&&Ne>=ue.reach);Ne+=ce.value.length,ce=ce.next){var Se=ce.value;if(W.length>q.length)return;if(!(Se instanceof C)){var Q=1,le;if(Ie){if(le=E(Ae,Ne,q,Qe),!le||le.index>=q.length)break;var lt=le.index,it=le.index+le[0].length,Je=Ne;for(Je+=ce.value.length;lt>=Je;)ce=ce.next,Je+=ce.value.length;if(Je-=ce.value.length,Ne=Je,ce.value instanceof C)continue;for(var pt=ce;pt!==W.tail&&(Je<it||typeof pt.value=="string");pt=pt.next)Q++,Je+=pt.value.length;Q--,Se=q.slice(Ne,Je),le.index-=Ne}else if(le=E(Ae,0,Se,Qe),!le)continue;var lt=le.index,gt=le[0],vt=Se.slice(0,lt),Et=Se.slice(lt+gt.length),tn=Ne+Se.length;ue&&tn>ue.reach&&(ue.reach=tn);var zt=ce.prev;vt&&(zt=R(W,zt,vt),Ne+=vt.length),O(W,zt,Q);var zn=new C(xe,Me?D.tokenize(gt,Me):gt,at,gt);if(ce=R(W,zt,zn),Et&&R(W,ce,Et),Q>1){var At={cause:xe+","+Ye,reach:tn};$(q,W,K,ce.prev,Ne,At),ue&&At.reach>ue.reach&&(ue.reach=At.reach)}}}}}}function P(){var q={value:null,prev:null,next:null},W={value:null,prev:q,next:null};q.next=W,this.head=q,this.tail=W,this.length=0}function R(q,W,K){var X=W.next,ae={value:K,prev:W,next:X};return W.next=ae,X.prev=ae,q.length++,ae}function O(q,W,K){for(var X=W.next,ae=0;ae<K&&X!==q.tail;ae++)X=X.next;W.next=X,X.prev=W,q.length-=ae}function I(q){for(var W=[],K=q.head.next;K!==q.tail;)W.push(K.value),K=K.next;return W}if(!l.document)return l.addEventListener&&(D.disableWorkerMessageHandler||l.addEventListener("message",function(q){var W=JSON.parse(q.data),K=W.language,X=W.code,ae=W.immediateClose;l.postMessage(D.highlight(X,D.languages[K],K)),ae&&l.close()},!1)),D;var J=D.util.currentScript();J&&(D.filename=J.src,J.hasAttribute("data-manual")&&(D.manual=!0));function V(){D.manual||D.highlightAll()}if(!D.manual){var De=document.readyState;De==="loading"||De==="interactive"&&J&&J.defer?document.addEventListener("DOMContentLoaded",V):window.requestAnimationFrame?window.requestAnimationFrame(V):window.setTimeout(V,16)}return D}(n);r.exports&&(r.exports=i),typeof Cd<"u"&&(Cd.Prism=i)})($E);var r4=$E.exports,a4=C2;C2.displayName="markup",C2.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function C2(r){r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(i,l){var c={};c["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[l]},c.cdata=/^<!\[CDATA\[|\]\]>$/i;var h={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:c}};h["language-"+l]={pattern:/[\s\S]+/,inside:r.languages[l]};var m={};m[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:h},r.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,i){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:r.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml}var i4=x2;x2.displayName="css",x2.aliases=[];function x2(r){(function(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var l=n.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))})(r)}var o4=_2;_2.displayName="clike",_2.aliases=[];function _2(r){r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var s4=E2;E2.displayName="javascript",E2.aliases=["js"];function E2(r){r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript}var Kg=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Cd=="object"?Cd:{},l4=C4();Kg.Prism={manual:!0,disableWorkerMessageHandler:!0};var u4=Dj,c4=jj,PE=r4,d4=a4,f4=i4,p4=o4,h4=s4;l4();var T2={}.hasOwnProperty;function NE(){}NE.prototype=PE;var pa=new NE,m4=pa;pa.highlight=v4,pa.register=Zg,pa.alias=g4,pa.registered=y4,pa.listLanguages=b4,Zg(d4),Zg(f4),Zg(p4),Zg(h4),pa.util.encode=D4,pa.Token.stringify=k4;function Zg(r){if(typeof r!="function"||!r.displayName)throw new Error("Expected `function` for `grammar`, got `"+r+"`");pa.languages[r.displayName]===void 0&&r(pa)}function g4(r,n){var i=pa.languages,l=r,c,h,m,D;n&&(l={},l[r]=n);for(c in l)for(h=l[c],h=typeof h=="string"?[h]:h,m=h.length,D=-1;++D<m;)i[h[D]]=i[c]}function v4(r,n){var i=PE.highlight,l;if(typeof r!="string")throw new Error("Expected `string` for `value`, got `"+r+"`");if(pa.util.type(n)==="Object")l=n,n=null;else{if(typeof n!="string")throw new Error("Expected `string` for `name`, got `"+n+"`");if(T2.call(pa.languages,n))l=pa.languages[n];else throw new Error("Unknown language: `"+n+"` is not registered")}return i.call(this,r,l,n)}function y4(r){if(typeof r!="string")throw new Error("Expected `string` for `language`, got `"+r+"`");return T2.call(pa.languages,r)}function b4(){var r=pa.languages,n=[],i;for(i in r)T2.call(r,i)&&typeof r[i]=="object"&&n.push(i);return n}function k4(r,n,i){var l;return typeof r=="string"?{type:"text",value:r}:pa.util.type(r)==="Array"?w4(r,n):(l={type:r.type,content:pa.Token.stringify(r.content,n,i),tag:"span",classes:["token",r.type],attributes:{},language:n,parent:i},r.alias&&(l.classes=l.classes.concat(r.alias)),pa.hooks.run("wrap",l),u4(l.tag+"."+l.classes.join("."),S4(l.attributes),l.content))}function w4(r,n){for(var i=[],l=r.length,c=-1,h;++c<l;)h=r[c],h!==""&&h!==null&&h!==void 0&&i.push(h);for(c=-1,l=i.length;++c<l;)h=i[c],i[c]=pa.Token.stringify(h,n,i);return i}function D4(r){return r}function S4(r){var n;for(n in r)r[n]=c4(r[n]);return r}function C4(){var r="Prism"in Kg,n=r?Kg.Prism:void 0;return i;function i(){r?Kg.Prism=n:delete Kg.Prism,r=void 0,n=void 0}}const F2=Iy(m4);var ev=aI(F2,{});ev.registerLanguage=function(r,n){return F2.register(n)},ev.alias=function(r,n){return F2.alias(r,n)};const RE={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var x4=A2;A2.displayName="jsx",A2.aliases=[];function A2(r){(function(n){var i=n.util.clone(n.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,c=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,h=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function m(E,$){return E=E.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return c}).replace(/<SPREAD>/g,function(){return h}),RegExp(E,$)}h=m(h).source,n.languages.jsx=n.languages.extend("markup",i),n.languages.jsx.tag.pattern=m(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),n.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,n.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,n.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,n.languages.jsx.tag.inside.comment=i.comment,n.languages.insertBefore("inside","attr-name",{spread:{pattern:m(/<SPREAD>/.source),inside:n.languages.jsx}},n.languages.jsx.tag),n.languages.insertBefore("inside","special-attr",{script:{pattern:m(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:n.languages.jsx}}},n.languages.jsx.tag);var D=function(E){return E?typeof E=="string"?E:typeof E.content=="string"?E.content:E.content.map(D).join(""):""},C=function(E){for(var $=[],P=0;P<E.length;P++){var R=E[P],O=!1;if(typeof R!="string"&&(R.type==="tag"&&R.content[0]&&R.content[0].type==="tag"?R.content[0].content[0].content==="</"?$.length>0&&$[$.length-1].tagName===D(R.content[0].content[1])&&$.pop():R.content[R.content.length-1].content==="/>"||$.push({tagName:D(R.content[0].content[1]),openedBraces:0}):$.length>0&&R.type==="punctuation"&&R.content==="{"?$[$.length-1].openedBraces++:$.length>0&&$[$.length-1].openedBraces>0&&R.type==="punctuation"&&R.content==="}"?$[$.length-1].openedBraces--:O=!0),(O||typeof R=="string")&&$.length>0&&$[$.length-1].openedBraces===0){var I=D(R);P<E.length-1&&(typeof E[P+1]=="string"||E[P+1].type==="plain-text")&&(I+=D(E[P+1]),E.splice(P+1,1)),P>0&&(typeof E[P-1]=="string"||E[P-1].type==="plain-text")&&(I=D(E[P-1])+I,E.splice(P-1,1),P--),E[P]=new n.Token("plain-text",I,null,I)}R.content&&typeof R.content!="string"&&C(R.content)}};n.hooks.add("after-tokenize",function(E){E.language!=="jsx"&&E.language!=="tsx"||C(E.tokens)})})(r)}const _4=Iy(x4),E4=ti({tagName:"pkt-tag",elementClass:Es,react:$e,displayName:"PktTag",events:{onClose:"close"}}),Yh=$e.forwardRef(({children:r,...n},i)=>L.jsx(E4,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));Yh.displayName="PktTag";const LE=$e.forwardRef(({arrowNav:r=!0,tabs:n,onTabSelected:i},l)=>{const c=$e.useRef([]);$e.useEffect(()=>{c.current=c.current.slice(0,n.length)},[n]);const h=(D,C)=>{C.action&&C.action(D),i&&i(D)},m=(D,C)=>{var E,$;r&&(C.code==="ArrowLeft"&&D!==0&&((E=c.current[D-1])==null||E.focus()),C.code==="ArrowRight"&&D<n.length-1&&(($=c.current[D+1])==null||$.focus()),(C.code==="ArrowDown"||C.code==="Space")&&h(D,n[D]))};return L.jsx("div",{className:"pkt-tabs",ref:l,children:L.jsx("div",{className:"pkt-tabs__list",role:r?"tablist":"navigation",children:n.map((D,C)=>L.jsx($e.Fragment,{children:D.href?L.jsxs("a",{"aria-selected":!!D.active,role:r?"tab":void 0,href:D.href,"aria-controls":D.controls,className:`pkt-tabs__link ${D.active?"active":""}`,onKeyUp:E=>m(C,E),onClick:()=>h(C,D),tabIndex:D.active||!r?void 0:-1,ref:E=>{c.current[C]=E},children:[D.icon&&L.jsx(Mn,{name:D.icon,className:"pkt-icon--small"}),D.text,D.tag&&L.jsx(Yh,{skin:D.tag.skin,size:"small",children:D.tag.text})]}):L.jsxs("button",{"aria-selected":!!D.active,role:r?"tab":void 0,type:"button","aria-controls":D.controls,className:`pkt-tabs__button pkt-link-button ${D.active?"active":""}`,onKeyUp:E=>m(C,E),onClick:()=>h(C,D),tabIndex:D.active||!r?void 0:-1,ref:E=>{c.current[C]=E},children:[D.icon&&L.jsx(Mn,{name:D.icon,className:"pkt-icon--small"}),D.text,D.tag&&L.jsx(Yh,{skin:D.tag.skin,size:"small",children:D.tag.text})]},"b-"+C)},C))})})}),Nb=$e.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:i,autocomplete:l="off",counter:c,counterMaxLength:h,className:m,disabled:D=!1,errorMessage:C,hasError:E=!1,helptext:$,helptextDropdown:P,helptextDropdownButton:R,iconNameRight:O,inline:I=!1,fullwidth:J=!1,label:V,name:De,optionalTag:q=!1,optionalText:W,requiredTag:K=!1,requiredText:X,placeholder:ae,prefix:ue,suffix:xe,type:ye="text",useWrapper:Ye=!0,omitSearchIcon:We=!1,value:Me,minLength:Qe,maxLength:Ie,min:at,max:Le,step:Ae,size:ce,readonly:Ne,required:Se,dataTestid:Q,onChange:le,skipForwardTestid:it=!1,...Je},pt)=>{const lt=[m,"pkt-textinput"].join(" "),gt=ye==="search"&&!O&&!We,vt=ye==="date"&&Me?Me.slice(0,10):Me,[Et,tn]=$e.useState((Me==null?void 0:Me.length)||0),zt=`${r}`,zn=`${zt}-label`,At=i||zn,ot=Un=>{const yn=Un.currentTarget.value;c&&tn((yn==null?void 0:yn.length)||0),le&&le(Un)};return $e.useEffect(()=>{Me!==void 0&&tn((Me==null?void 0:Me.length)||0)},[Me]),L.jsx(Rh,{ariaDescribedby:n,className:lt,disabled:D,errorMessage:C,forId:zt,hasError:E,helptext:$,helptextDropdown:P,helptextDropdownButton:R,inline:I,label:V,optionalTag:q,optionalText:W,requiredTag:K,requiredText:X,useWrapper:Ye,counter:c,counterCurrent:Et,counterMaxLength:h,children:L.jsxs("div",{className:"pkt-input__container","data-testid":Q,"data-skip-forward-testid":it?"true":void 0,children:[ue&&L.jsx("div",{className:"pkt-input-prefix",children:ue}),L.jsx("input",{...Je,ref:pt,className:`pkt-input ${J?"pkt-input--fullwidth":""} ${h&&Et>h?"pkt-input--counter-error":""}`,type:ye,name:`${De||r}`,value:vt,id:zt,placeholder:ae,autoComplete:l,disabled:D,"aria-invalid":E,"aria-errormessage":`${r}-error`,"aria-labelledby":At,min:at,max:Le,onChange:ot,step:Ae,minLength:Qe,maxLength:Ie,size:ce,required:Se}),xe&&L.jsxs("p",{className:"pkt-input-suffix",children:[xe,O&&L.jsx(Mn,{className:"pkt-input-suffix-icon",name:O}),gt&&L.jsx(Mn,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!xe&&O&&L.jsx(Mn,{className:"pkt-input-icon",name:O}),!xe&>&&L.jsx(Mn,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})}),Rb=({className:r,compact:n=!1,skin:i="basic",responsiveView:l=!0,children:c})=>L.jsx("table",{"data-testid":"pkt-table",className:ml(r,"pkt-table",{"pkt-table--responsive":l,"pkt-table--compact":n,"pkt-table--basic":i==="basic","pkt-table--zebra-blue":i==="zebra-blue"}),role:"table",children:c}),Lb=({className:r,children:n})=>L.jsx("thead",{className:ml(r,"pkt-table__header",{}),role:"rowgroup",children:n}),Ob=({children:r,className:n})=>L.jsx("tbody",{className:ml(n,"pkt-table__body",{}),role:"rowgroup",children:r}),np=({className:r,children:n})=>L.jsx("tr",{className:ml(r,"pkt-table__row",{}),role:"row",children:n}),gl=({className:r,children:n})=>L.jsx("th",{className:ml(r,"pkt-table__header-cell",{}),role:"columnheader",children:n}),Zo=({children:r,className:n,dataLabel:i})=>L.jsx("td",{className:ml(n,"pkt-table__data-cell",{}),"data-label":i,role:"cell","data-testid":"pkt-table__data-cell",children:r}),T4=({specs:r})=>{const n=l=>Array.isArray(l)?l.join(`
|
|
1546
1546
|
`):l,i=l=>typeof l=="boolean"?l?"true":"false":l;return L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Egenskaper"}),L.jsxs(Rb,{compact:!0,children:[L.jsx(Lb,{children:L.jsxs(np,{children:[L.jsx(gl,{children:"Prop"}),L.jsx(gl,{children:"Navn"}),L.jsx(gl,{children:"Beskrivelse"}),L.jsx(gl,{children:"Type"}),L.jsx(gl,{children:"Standardverdi"})]})}),L.jsx(Ob,{children:Object.entries(r.props||{}).map(([l,c])=>L.jsxs(np,{children:[L.jsx(Zo,{dataLabel:"Prop",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Navn",children:!Array.isArray(c)&&c.name||l}),Array.isArray(c)?L.jsxs(L.Fragment,{children:[L.jsx(Zo,{dataLabel:"Beskrivelse"}),L.jsx(Zo,{dataLabel:"Type",children:L.jsx("pre",{children:c.join(`
|
|
1547
1547
|
`)})})]}):L.jsxs(L.Fragment,{children:[L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:L.jsx("pre",{children:c.type&&n(c.type)})}),L.jsx(Zo,{dataLabel:"Standardverdi",children:L.jsx("pre",{children:i(c.default)})})]})]},l))})]}),r.events&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Hendelser / handlinger"}),L.jsxs(Rb,{compact:!0,children:[L.jsx(Lb,{children:L.jsxs(np,{children:[L.jsx(gl,{children:"Event"}),L.jsx(gl,{children:"Beskrivelse"}),L.jsx(gl,{children:"Type"})]})}),L.jsx(Ob,{children:Object.entries(r.events||{}).map(([l,c])=>L.jsxs(np,{children:[L.jsx(Zo,{dataLabel:"Event",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})}),L.jsx(Zo,{dataLabel:"Type",children:c.type})]},l))})]})]}),r.slots&&L.jsxs(L.Fragment,{children:[L.jsx("h2",{children:"Innhold"}),L.jsxs(Rb,{compact:!0,children:[L.jsx(Lb,{children:L.jsxs(np,{children:[L.jsx(gl,{children:"Slot"}),L.jsx(gl,{children:"Beskrivelse"})]})}),L.jsx(Ob,{children:Object.entries(r.slots||{}).map(([l,c])=>L.jsxs(np,{children:[L.jsx(Zo,{dataLabel:"Slot",children:L.jsx("pre",{children:l})}),L.jsx(Zo,{dataLabel:"Beskrivelse",children:L.jsx("span",{dangerouslySetInnerHTML:{__html:c.description||""}})})]},l))})]})]})]})},$2=$e.forwardRef(({ariaDescribedby:r,ariaLabelledby:n,children:i,className:l,disabled:c=!1,errorMessage:h,hasError:m,helptext:D,helptextDropdown:C,helptextDropdownButton:E,id:$,inline:P=!1,fullwidth:R=!1,label:O,name:I,optionalTag:J=!1,optionalText:V,requiredTag:De=!1,requiredText:q,...W},K)=>{const X=[l,"pkt-select"].join(" ");return L.jsx(Rh,{className:X,forId:`${$}-input`,label:O,helptext:D,helptextDropdown:C,helptextDropdownButton:E,optionalTag:J,optionalText:V,requiredTag:De,requiredText:q,hasError:m,errorMessage:h,disabled:c,inline:P,ariaDescribedby:r,children:L.jsx("select",{ref:K,className:`pkt-input ${R?"pkt-input--fullwidth":""}`,"aria-invalid":m,"aria-errormessage":`${$}-error`,"aria-labelledby":n||void 0,disabled:c,id:`${$}-input`,name:I||$,...W,children:i})})}),F4=[{id:"24h",fn:"24h.svg",cat:"health"},{id:"access-prohibited",fn:"access-prohibited.svg",cat:"signs"},{id:"accessibility",fn:"accessibility.svg",cat:"signs"},{id:"accessible-water-access",fn:"accessible-water-access.svg",cat:"activities"},{id:"active-person",fn:"active-person.svg",cat:"activities"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"advice",fn:"advice.svg",cat:"social"},{id:"alcohol-prohibited",fn:"alcohol-prohibited.svg",cat:"food"},{id:"alert-circle",fn:"alert-circle.svg",cat:"status"},{id:"alert-error-system",fn:"alert-error-system.svg",cat:"status"},{id:"alert-error",fn:"alert-error.svg",cat:"status"},{id:"alert-information",fn:"alert-information.svg",cat:"status"},{id:"alert-success-system",fn:"alert-success-system.svg",cat:"status"},{id:"alert-success",fn:"alert-success.svg",cat:"status"},{id:"alert-warning",fn:"alert-warning.svg",cat:"status"},{id:"ambulance",fn:"ambulance.svg",cat:"travel"},{id:"apple",fn:"apple.svg",cat:"food"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow-return",fn:"arrow-return.svg",cat:"navigation"},{id:"arrow",fn:"arrow.svg",cat:"navigation"},{id:"arts-and-culture",fn:"arts-and-culture.svg",cat:"places"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"audioguide",fn:"audioguide.svg",cat:"objects"},{id:"baby-bottle",fn:"baby-bottle.svg",cat:"food"},{id:"baby-changing-room",fn:"baby-changing-room.svg",cat:"activities"},{id:"backpack-prohibited",fn:"backpack-prohibited.svg",cat:"objects"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"ball-sports",fn:"ball-sports.svg",cat:"activities"},{id:"balloons",fn:"balloons.svg",cat:"objects"},{id:"bath",fn:"bath.svg",cat:"objects"},{id:"bed",fn:"bed.svg",cat:"objects"},{id:"beehive",fn:"beehive.svg",cat:"objects"},{id:"bicycle-parking",fn:"bicycle-parking.svg",cat:"travel"},{id:"bicycle-prohibited",fn:"bicycle-prohibited.svg",cat:"travel"},{id:"bicycle-service",fn:"bicycle-service.svg",cat:"travel"},{id:"bicycle",fn:"bicycle.svg",cat:"travel"},{id:"books",fn:"books.svg",cat:"health"},{id:"boys-shower",fn:"boys-shower.svg",cat:"signs"},{id:"boys-toilet",fn:"boys-toilet.svg",cat:"user"},{id:"brain-heart",fn:"brain-heart.svg",cat:"health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"health"},{id:"brain",fn:"brain.svg",cat:"health"},{id:"briefcase",fn:"briefcase.svg",cat:"objects"},{id:"bulb",fn:"bulb.svg",cat:"objects"},{id:"bullseye",fn:"bullseye.svg",cat:"objects"},{id:"bus",fn:"bus.svg",cat:"travel"},{id:"cafe",fn:"cafe.svg",cat:"food"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera-surveillance-CCTV",fn:"camera-surveillance-CCTV.svg",cat:"objects"},{id:"camera",fn:"camera.svg",cat:"objects"},{id:"campfire-site",fn:"campfire-site.svg",cat:"health"},{id:"camping",fn:"camping.svg",cat:"places"},{id:"car",fn:"car.svg",cat:"travel"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"status"},{id:"character-information",fn:"character-information.svg",cat:"status"},{id:"charging-point",fn:"charging-point.svg",cat:"objects"},{id:"check-big",fn:"check-big.svg",cat:"ui"},{id:"check-box-checked",fn:"check-box-checked.svg",cat:"ui"},{id:"check-box-unchecked",fn:"check-box-unchecked.svg",cat:"ui"},{id:"check-circle",fn:"check-circle.svg",cat:"ui"},{id:"check-medium",fn:"check-medium.svg",cat:"ui"},{id:"check",fn:"check.svg",cat:"ui"},{id:"chevron-down",fn:"chevron-down.svg",cat:"navigation"},{id:"chevron-left",fn:"chevron-left.svg",cat:"navigation"},{id:"chevron-right",fn:"chevron-right.svg",cat:"navigation"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"navigation"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"navigation"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"navigation"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"navigation"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"navigation"},{id:"childrens-toilet",fn:"childrens-toilet.svg",cat:"signs"},{id:"circular-economy",fn:"circular-economy.svg",cat:"ui"},{id:"climbing",fn:"climbing.svg",cat:"activities"},{id:"clock-history",fn:"clock-history.svg",cat:"ui"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"objects"},{id:"code",fn:"code.svg",cat:"data"},{id:"coffee",fn:"coffee.svg",cat:"food"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"health"},{id:"computer",fn:"computer.svg",cat:"objects"},{id:"cookie",fn:"cookie.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"places"},{id:"crayfish",fn:"crayfish.svg",cat:"objects"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill-large",fn:"cross-circle-fill-large.svg",cat:"ui"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"cupboard",fn:"cupboard.svg",cat:"objects"},{id:"dancing",fn:"dancing.svg",cat:"activities"},{id:"data",fn:"data.svg",cat:"data"},{id:"deer",fn:"deer.svg",cat:"objects"},{id:"defibrillators",fn:"defibrillators.svg",cat:"signs"},{id:"district",fn:"district.svg",cat:"places"},{id:"diving-prohibited",fn:"diving-prohibited.svg",cat:"activities"},{id:"dock",fn:"dock.svg",cat:"places"},{id:"document-code",fn:"document-code.svg",cat:"ui"},{id:"document-pdf",fn:"document-pdf.svg",cat:"ui"},{id:"document-plain",fn:"document-plain.svg",cat:"ui"},{id:"document-table",fn:"document-table.svg",cat:"ui"},{id:"document-text",fn:"document-text.svg",cat:"ui"},{id:"dog-forbidden",fn:"dog-forbidden.svg",cat:"objects"},{id:"dog-on-a-leash",fn:"dog-on-a-leash.svg",cat:"objects"},{id:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"food"},{id:"drone",fn:"drone.svg",cat:"objects"},{id:"drugs-prohibited",fn:"drugs-prohibited.svg",cat:"objects"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"elderly",fn:"elderly.svg",cat:"user"},{id:"electric-car",fn:"electric-car.svg",cat:"travel"},{id:"electric-van",fn:"electric-van.svg",cat:"travel"},{id:"elevator",fn:"elevator.svg",cat:"signs"},{id:"email",fn:"email.svg",cat:"social"},{id:"escalator",fn:"escalator.svg",cat:"signs"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"status"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"status"},{id:"exit-door",fn:"exit-door.svg",cat:"ui"},{id:"exit",fn:"exit.svg",cat:"navigation"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"places"},{id:"feedback",fn:"feedback.svg",cat:"social"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filming-prohibited",fn:"filming-prohibited.svg",cat:"signs"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-prohibited",fn:"fire-prohibited.svg",cat:"signs"},{id:"fire-safety",fn:"fire-safety.svg",cat:"health"},{id:"fireworks-prohibited",fn:"fireworks-prohibited.svg",cat:"signs"},{id:"fishing-prohibited",fn:"fishing-prohibited.svg",cat:"signs"},{id:"fixed-bench",fn:"fixed-bench.svg",cat:"objects"},{id:"fixed-grill",fn:"fixed-grill.svg",cat:"objects"},{id:"flammable-waste",fn:"flammable-waste.svg",cat:"signs"},{id:"flash-prohibited",fn:"flash-prohibited.svg",cat:"objects"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"food-and-drinks-prohibited",fn:"food-and-drinks-prohibited.svg",cat:"food"},{id:"fountain",fn:"fountain.svg",cat:"places"},{id:"game-console",fn:"game-console.svg",cat:"objects"},{id:"girls-shower",fn:"girls-shower.svg",cat:"signs"},{id:"girls-toilet",fn:"girls-toilet.svg",cat:"user"},{id:"github",fn:"github.svg",cat:"social"},{id:"graffiti-allowed",fn:"graffiti-allowed.svg",cat:"objects"},{id:"graffiti-prohibited",fn:"graffiti-prohibited.svg",cat:"objects"},{id:"graph",fn:"graph.svg",cat:"data"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"gym",fn:"gym.svg",cat:"objects"},{id:"handicap-elevator",fn:"handicap-elevator.svg",cat:"signs"},{id:"handicap",fn:"handicap.svg",cat:"user"},{id:"hands-globe",fn:"hands-globe.svg",cat:"health"},{id:"headset",fn:"headset.svg",cat:"objects"},{id:"heart-hand",fn:"heart-hand.svg",cat:"health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"health"},{id:"heart",fn:"heart.svg",cat:"health"},{id:"height-restriction",fn:"height-restriction.svg",cat:"objects"},{id:"helmet",fn:"helmet.svg",cat:"objects"},{id:"hiking-trail",fn:"hiking-trail.svg",cat:"places"},{id:"holding-hands",fn:"holding-hands.svg",cat:"user"},{id:"home",fn:"home.svg",cat:"places"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"places"},{id:"ice-skating",fn:"ice-skating.svg",cat:"objects"},{id:"indoor-pool",fn:"indoor-pool.svg",cat:"activities"},{id:"information",fn:"information.svg",cat:"status"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"objects"},{id:"ladies-toilet",fn:"ladies-toilet.svg",cat:"user"},{id:"language",fn:"language.svg",cat:"user"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"user"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"sign"},{id:"lecture",fn:"lecture.svg",cat:"activities"},{id:"life-ring",fn:"life-ring.svg",cat:"objects"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"living-room",fn:"living-room.svg",cat:"objects"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"travel"},{id:"location-pin",fn:"location-pin.svg",cat:"travel"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"luggage-prohibited",fn:"luggage-prohibited.svg",cat:"objects"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"travel"},{id:"medicine-cabinet",fn:"medicine-cabinet.svg",cat:"objects"},{id:"megaphone",fn:"megaphone.svg",cat:"objects"},{id:"memorial-stone",fn:"memorial-stone.svg",cat:"objects"},{id:"mens-toilet",fn:"mens-toilet.svg",cat:"user"},{id:"menu",fn:"menu.svg",cat:"navigation"},{id:"message",fn:"message.svg",cat:"social"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"ui"},{id:"minus-circle",fn:"minus-circle.svg",cat:"ui"},{id:"minus-sign",fn:"minus-sign.svg",cat:"ui"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"objects"},{id:"moon",fn:"moon.svg",cat:"objects"},{id:"motorcycle",fn:"motorcycle.svg",cat:"travel"},{id:"museum",fn:"museum.svg",cat:"places"},{id:"music-notes",fn:"music-notes.svg",cat:"objects"},{id:"nature-plant-2",fn:"nature-plant-2.svg",cat:"objects"},{id:"nature-plant",fn:"nature-plant.svg",cat:"objects"},{id:"new-window-small",fn:"new-window-small.svg",cat:"navigation"},{id:"new-window",fn:"new-window.svg",cat:"navigation"},{id:"no-walking",fn:"no-walking.svg",cat:"activities"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"objects"},{id:"organization",fn:"organization.svg",cat:"places"},{id:"package",fn:"package.svg",cat:"data"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"objects"},{id:"palette",fn:"palette.svg",cat:"objects"},{id:"paragraph",fn:"paragraph.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"places"},{id:"parking-meter",fn:"parking-meter.svg",cat:"signs"},{id:"partner-workout",fn:"partner-workout.svg",cat:"activities"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"picnic-table",fn:"picnic-table.svg",cat:"objects"},{id:"picture",fn:"picture.svg",cat:"objects"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"planter-box",fn:"planter-box.svg",cat:"places"},{id:"playground",fn:"playground.svg",cat:"places"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"ui"},{id:"plus-circle",fn:"plus-circle.svg",cat:"ui"},{id:"plus-sign",fn:"plus-sign.svg",cat:"ui"},{id:"pregnant",fn:"pregnant.svg",cat:"user"},{id:"pride-heart",fn:"pride-heart.svg",cat:"health"},{id:"print",fn:"print.svg",cat:"objects"},{id:"privacy",fn:"privacy.svg",cat:"user"},{id:"process-back",fn:"process-back.svg",cat:"ui"},{id:"process-forward",fn:"process-forward.svg",cat:"ui"},{id:"process-iteration",fn:"process-iteration.svg",cat:"ui"},{id:"processing",fn:"processing.svg",cat:"ui"},{id:"prohibited",fn:"prohibited.svg",cat:"signs"},{id:"punkt-circle-blue",fn:"punkt-circle-blue.svg",cat:"social"},{id:"qr-code",fn:"qr-code.svg",cat:"ui"},{id:"question",fn:"question.svg",cat:"ui"},{id:"radio-checked",fn:"radio-checked.svg",cat:"ui"},{id:"radio-unchecked",fn:"radio-unchecked.svg",cat:"ui"},{id:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"health"},{id:"restaurant",fn:"restaurant.svg",cat:"food"},{id:"roadblock",fn:"roadblock.svg",cat:"objects"},{id:"ruler",fn:"ruler.svg",cat:"objects"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"sauna",fn:"sauna.svg",cat:"activities"},{id:"save",fn:"save.svg",cat:"ui"},{id:"scooter-prohibited",fn:"scooter-prohibited.svg",cat:"travel"},{id:"scooter",fn:"scooter.svg",cat:"travel"},{id:"search-icon-round-active",fn:"search-icon-round-active.svg",cat:"uncategorized"},{id:"search-icon-round-disabled",fn:"search-icon-round-disabled.svg",cat:"uncategorized"},{id:"search-icon-round-normal",fn:"search-icon-round-normal.svg",cat:"uncategorized"},{id:"search-icon-square-active",fn:"search-icon-square-active.svg",cat:"uncategorized"},{id:"search-icon-square-disabled",fn:"search-icon-square-disabled.svg",cat:"uncategorized"},{id:"search-icon-square-normal",fn:"search-icon-square-normal.svg",cat:"uncategorized"},{id:"share-outline",fn:"share-outline.svg",cat:"social"},{id:"share",fn:"share.svg",cat:"social"},{id:"shield-fire",fn:"shield-fire.svg",cat:"health"},{id:"shield-law-paragraph",fn:"shield-law-paragraph.svg",cat:"user"},{id:"shoes-prohibited",fn:"shoes-prohibited.svg",cat:"objects"},{id:"shopping-bag",fn:"shopping-bag.svg",cat:"objects"},{id:"shower",fn:"shower.svg",cat:"objects"},{id:"signature",fn:"signature.svg",cat:"objects"},{id:"skateboarding",fn:"skateboarding.svg",cat:"activities"},{id:"slack",fn:"slack.svg",cat:"social"},{id:"sledding",fn:"sledding.svg",cat:"activities"},{id:"smiley-neutral",fn:"smiley-neutral.svg",cat:"feedback"},{id:"smiley-sad",fn:"smiley-sad.svg",cat:"feedback"},{id:"smiley-smile",fn:"smiley-smile.svg",cat:"feedback"},{id:"smoking-prohibited",fn:"smoking-prohibited.svg",cat:"signs"},{id:"snow",fn:"snow.svg",cat:"objects"},{id:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"status"},{id:"sound-on",fn:"sound-on.svg",cat:"status"},{id:"sparkles",fn:"sparkles.svg",cat:"objects"},{id:"stairs-down",fn:"stairs-down.svg",cat:"signs"},{id:"stairs-up",fn:"stairs-up.svg",cat:"signs"},{id:"stairs",fn:"stairs.svg",cat:"signs"},{id:"street-vendor",fn:"street-vendor.svg",cat:"places"},{id:"stroller-prohibited",fn:"stroller-prohibited.svg",cat:"objects"},{id:"stroller",fn:"stroller.svg",cat:"objects"},{id:"studded-tires",fn:"studded-tires.svg",cat:"objects"},{id:"svg",fn:"svg.svg",cat:"social"},{id:"swimming-area",fn:"swimming-area.svg",cat:"activities"},{id:"swingset",fn:"swingset.svg",cat:"places"},{id:"table",fn:"table.svg",cat:"data"},{id:"tap",fn:"tap.svg",cat:"objects"},{id:"target",fn:"target.svg",cat:"ui"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"tickets",fn:"tickets.svg",cat:"objects"},{id:"toilet-unisex",fn:"toilet-unisex.svg",cat:"user"},{id:"toilet",fn:"toilet.svg",cat:"signs"},{id:"tool",fn:"tool.svg",cat:"objects"},{id:"touching-prohibited",fn:"touching-prohibited.svg",cat:"signs"},{id:"trail-gate",fn:"trail-gate.svg",cat:"objects"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"tram",fn:"tram.svg",cat:"travel"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trash",fn:"trash.svg",cat:"activities"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"activities"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"activities"},{id:"umbrella-prohibited",fn:"umbrella-prohibited.svg",cat:"objects"},{id:"urban-landscape",fn:"urban-landscape.svg",cat:"places"},{id:"urinal",fn:"urinal.svg",cat:"signs"},{id:"user",fn:"user.svg",cat:"user"},{id:"van",fn:"van.svg",cat:"travel"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"viewpoint",fn:"viewpoint.svg",cat:"objects"},{id:"virus",fn:"virus.svg",cat:"objects"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"walking",fn:"walking.svg",cat:"activities"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"signs"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"signs"},{id:"wardrobe",fn:"wardrobe.svg",cat:"objects"},{id:"waste-container",fn:"waste-container.svg",cat:"objects"},{id:"water-faucet",fn:"water-faucet.svg",cat:"health"},{id:"wheelchair-ramp",fn:"wheelchair-ramp.svg",cat:"activities"},{id:"wheelchair",fn:"wheelchair.svg",cat:"sign"},{id:"wifi",fn:"wifi.svg",cat:"signs"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"food"},{id:"workplace",fn:"workplace.svg",cat:"social"},{id:"wrench",fn:"wrench.svg",cat:"objects"},{id:"x",fn:"x.svg",cat:"social"}],P2=({propKey:r,spec:n,props:i,handleChange:l})=>{const c={BOOLEAN:"boolean",ICON:"icon",ARRAY:"array",OBJECT:"object",DATE:"ISOdatestring",NUMBER:"number"},h=(E,$)=>{l(r,{...i[r],[E]:$})},m=(E,$,P)=>{const R=[...i[r]];R[E]={...R[E],[$]:P},l(r,R)},D=()=>{const E=[...i[r],{}];l(r,E)},C=E=>{const $=i[r].filter((P,R)=>R!==E);l(r,$)};if(n.type===c.BOOLEAN)return L.jsx(Rh,{label:n.name||r,forId:r,helptext:n.description||null,hasFieldset:!0,requiredTag:n.required,children:L.jsx(ib,{id:r,label:r,type:"checkbox",checked:i[r]||!1,onChange:E=>l(r,E.target.checked,n.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(n.type===c.ICON)return L.jsxs($2,{label:n.name||r,helptext:n.description||null,id:r,value:i[r]||"",onChange:E=>l(r,E.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),F4.map(E=>L.jsx("option",{value:E.id,children:E.id},E.id))]});if(n.type===c.DATE)return L.jsx(D0,{id:r,label:n.name||r,helptext:n.description||null,value:i[r]||"",multiple:n.variant==="multiple",maxlength:999,onChange:E=>l(r,E.target.value),requiredTag:n.required});if(Array.isArray(n)||Array.isArray(n.type)||Array.isArray(n.values)){const E=Array.isArray(n)?n:n.values||n.type;return L.jsxs($2,{label:n.name||r,helptext:n.description||null,id:r,value:i[r],onChange:$=>l(r,$.target.value),requiredTag:n.required,children:[L.jsx("option",{value:""}),E.map($=>L.jsx("option",{value:$,children:$},$))]})}return n.type===c.NUMBER?L.jsx(Nb,{id:r,label:n.name||r,helptext:n.description||null,type:"number",value:i[r]||"",onChange:E=>l(r,parseFloat(E.currentTarget.value)),requiredTag:n.required}):n.type===c.OBJECT?(i[r]||(i[r]={}),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),L.jsxs("fieldset",{children:[L.jsx("legend",{children:n.name||r}),Object.entries(n.properties).map(([E,$])=>L.jsx(P2,{propKey:E,props:i[r],spec:$,handleChange:(P,R)=>h(P,R)},E))]})]})):n.type===c.ARRAY&&n.items.type===c.OBJECT?(i[r]||(i[r]=[]),L.jsxs("div",{children:[L.jsx("div",{className:"pkt-inputwrapper__label",children:L.jsx("h2",{children:n.name||r})}),n.description&&L.jsx("p",{children:n.description}),i[r].map((E,$)=>L.jsx("div",{children:L.jsxs("fieldset",{children:[L.jsxs("legend",{children:["Item ",$+1]}),Object.entries(n.items.properties).map(([P,R])=>L.jsx(P2,{propKey:P,props:E,spec:R,handleChange:(O,I)=>m($,O,I)},P)),L.jsx(bc,{onClick:()=>C($),children:"Fjern denne"})]})},$)),L.jsx(bc,{onClick:D,children:"Legg til ny"})]})):L.jsx(Nb,{id:r,label:n.name||r,helptext:n.description||null,type:"text",value:i[r]||"",onChange:E=>l(r,n.type==="number"?parseFloat(E.currentTarget.value):E.currentTarget.value),requiredTag:n.required})};ev.registerLanguage("jsx",_4);const OE=({specs:r,children:n,fullWidth:i})=>{var Ie,at;const l=r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).reduce((Le,[Ae,ce])=>(typeof ce=="object"&&!Array.isArray(ce)&&ce.previewDefault!==void 0&&ce.previewDefault!==null?(ce.previewDefault==="false"&&(ce.previewDefault=!1),ce.previewDefault==="true"&&(ce.previewDefault=!0),Le[Ae]=ce.previewDefault):typeof ce=="object"&&!Array.isArray(ce)&&ce.default!==void 0&&ce.default!==null&&(ce.default==="false"&&(ce.default=!1),ce.default==="true"&&(ce.default=!0),Le[Ae]=ce.default),Le),{}):{},[c,h]=$e.useState(0),[m,D]=$e.useState(l),[C,E]=$e.useState("light"),[$,P]=$e.useState(""),[R,O]=$e.useState(""),[I,J]=$e.useState(""),[V,De]=$e.useState("Rediger innhold"),[q,W]=$e.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${r.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),K=Le=>{Le===1&&ue(),Le===2&&ae(),J(""),W(Ae=>Ae.map((ce,Ne)=>({...ce,active:Ne===Le})))},X=$e.useRef(null),ae=async()=>{if(r.isElement&&$e.isValidElement(Me)){const Le=$e.isValidElement(Me)?Me.type.displayName||Me.type.name:r.name,Ae=Object.entries(m).map(([Ne,Se])=>{if(Se&&!ye(Se)&&!Ye(Se))return typeof Se=="object"?`${Ne}='${JSON.stringify(Se)}'`:`${Ne}="${Se}"`}).join(" "),ce=await Tb(`<${r.name||Le} ${Ae}>${V}</${r.name||Le}>`,{parser:"html",plugins:[j1]});P(`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
1548
|
-
`+ce)}else{const Le=await Tb(X.current.innerHTML,{parser:"html",plugins:[j1]});P(Le.replace(/<\!--.*?-->/g,""))}},ue=async()=>{const Le=await yL(Me);return O(Le),Promise.resolve()},xe=(Le,Ae)=>{navigator.clipboard.writeText(Ae).then(()=>{J(Le),console.log("Copied to clipboard",Le)})},ye=Le=>Array.isArray(Le)&&Le.length===0,Ye=Le=>Le&&typeof Le=="object"&&!Object.keys(Le).length,We=(Le,Ae)=>L.jsxs("div",{className:"pkt-preview__copy",children:[I===Le&&L.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),L.jsx(bc,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>xe(Le,Ae),children:"Kopier kode"})]}),Me=$e.isValidElement(n)&&$e.cloneElement(n,{...m},n.props.children?n.props.children:(Ie=r.slots)!=null&&Ie.default?V:null),Qe=(Le,Ae,ce=!1)=>{if(h(c+1),!ce&&(!Ae||Ae=="false")){const{[Le]:Ne,...Se}=m;D(Se)}else D(Ne=>({...Ne,[Le]:Ae}))};return L.jsxs("div",{className:"pkt-preview",children:[L.jsxs("div",{className:"pkt-preview__component-container","data-mode":C,children:[r["dark-mode"]&&L.jsx("div",{className:"pkt-preview__mode",children:L.jsx(ib,{id:"mode",label:"Dark mode",type:"checkbox",checked:C==="dark",onChange:Le=>E(Le.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),L.jsx("div",{className:`pkt-preview__component ${i&&"pkt-preview__component--fullwidth"}`,ref:X,children:L.jsx("div",{children:Me})},c)]}),L.jsx(LE,{tabs:q,onTabSelected:K}),L.jsxs("div",{className:`pkt-grid pkt-preview__opts ${q[0].active?"":"pkt-hide"}`,children:[((at=r.slots)==null?void 0:at.default)&&!n.props.children&&L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),L.jsx(Nb,{id:"slot",label:"Slot",helptext:r.slots.default.description||"Innholdet i slot",type:"text",value:V,onChange:Le=>De(Le.currentTarget.value)})]}),r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).map(([Le,Ae])=>L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:Le}),L.jsx(P2,{propKey:Le,props:m,spec:Ae,handleChange:Qe})]},Le)):L.jsx("p",{children:"OBS! Specs mangler props!"})]}),L.jsxs("div",{className:`pkt-preview__code ${q[1].active?"":"pkt-hide"}`,children:[L.jsx(ev,{language:"jsx",style:RE,children:R}),We("jsx",R)]}),L.jsxs("div",{className:`pkt-preview__code ${q[2].active?"":"pkt-hide"}`,children:[L.jsx(ev,{language:"html",style:RE,children:$}),We("html",$)]}),L.jsx("div",{className:`pkt-preview__specs ${q[3].active?"":"pkt-hide"}`,children:L.jsx(T4,{specs:r})})]})};OE.displayName="PktPreview";const A4=ti({tagName:"pkt-progressbar",elementClass:ra,react:$e,displayName:"PktProgressbar",events:{}}),BE=$e.forwardRef(({children:r,...n},i)=>L.jsx(A4,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));BE.displayName="PktProgressbar";const ME=$e.forwardRef(({id:r,name:n,label:i,className:l,hasTile:c=!1,disabled:h=!1,checkHelptext:m,hasError:D=!1,defaultChecked:C,checked:E,...$},P)=>{const R=[l,"pkt-input-check"].filter(Boolean).join(" ");return L.jsx("div",{className:R,children:L.jsxs("div",{className:`pkt-input-check__input ${c?"pkt-input-check__input--tile":""} ${h&&c?"pkt-input-check__input--tile-disabled":""}`,children:[L.jsx("input",{ref:P,id:r,type:"radio",name:n,disabled:h,className:`pkt-input-check__input-checkbox ${D?"pkt-input-check__input-checkbox--error":""}`,defaultChecked:C||E,...$}),L.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[i,m&&L.jsx("div",{className:"pkt-input-check__input-helptext",children:m})]})]})})});ME.displayName="PktRadioButton";const $4=$e.forwardRef(({appearance:r="local",disabled:n=!1,fullwidth:i=!1,id:l,label:c,name:h,placeholder:m="Søk…",suggestions:D,value:C="",action:E,method:$,onChange:P,onSearch:R,onSuggestionClick:O,...I},J)=>{const V=(K,X)=>{K?K():O&&O(X)},De=K=>{C=K.target.value},q=`pkt-searchinput pkt-searchinput--${r} ${i?"pkt-searchinput--fullwidth":""}`;let W;return E?W=K=>L.jsx("form",{role:"search",className:q,action:E,method:$,children:K}):W=K=>L.jsx("div",{role:"search",className:q,children:K}),W(L.jsxs(L.Fragment,{children:[c&&L.jsx("label",{htmlFor:c?l:void 0,className:c?"pkt-inputwrapper__label":"",children:c}),L.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[L.jsx("input",{className:`pkt-input ${i?"pkt-input--fullwidth":""}`,type:"search",name:h||l,id:l,placeholder:m,defaultValue:C,disabled:n,autoComplete:"off","aria-autocomplete":"list",ref:J,"aria-controls":`${l}-suggestions`,onChange:P||De,onKeyUp:R&&(K=>{K.key==="Enter"&&(K.preventDefault(),R(C))}),...I}),L.jsx(bc,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:n,onClick:R&&(K=>{K.preventDefault(),R(C)}),children:c||m})]}),D&&L.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:D.map((K,X)=>L.jsx("li",{children:$e.createElement(K.href?"a":K.onClick?"button":"div",{href:K.href,className:`pkt-searchinput__suggestion ${K.onClick?"pkt-link-button":""} ${K.href||K.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:K.onClick?"button":void 0,onClick:()=>V(K.onClick,X),onKeyUp:ae=>ae.key==="Enter"&&V(K.onClick,X)},L.jsxs(L.Fragment,{children:[K.title&&L.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:K.title}),K.text&&L.jsx("p",{className:"pkt-searchinput__suggestion-text",children:K.text})]}))},`search-suggestion-${X}`))})]}))}),P4=$e.forwardRef(({activeStep:r,className:n,children:i,hideNonActiveSteps:l=!1,hideNonActiveStepsContent:c=!0,orientation:h="vertical",...m},D)=>{const C=ml(n,"pkt-stepper",h==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),E=$e.Children.map(i,($,P)=>$e.isValidElement($)?$e.cloneElement($,{className:ml($.props.className,{"pkt-step--hideStep":l&&P!==r,"pkt-step--hideContent":c&&P!==r})}):$);return L.jsx("ol",{"data-testid":"pkt-stepper",className:C,ref:D,...m,children:E})}),N4=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)"}})}),R4=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"})]}),L4=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"})]}),O4=({children:r,className:n,status:i="incomplete",title:l})=>L.jsxs("li",{className:ml("pkt-step",n,`pkt-step--${i}`),"data-testid":"pkt-step",children:[L.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),L.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),L.jsx("span",{className:ml("pkt-step__indicator"),children:i==="current"?R4:i==="completed"?L4:N4}),L.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),L.jsxs("div",{className:"pkt-step__wrapper",children:[L.jsx("div",{className:"pkt-step__title",children:l}),L.jsx("div",{className:"pkt-step__content",children:r})]})]}),B4=$e.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:i,counter:l,counterMaxLength:c,className:h,disabled:m,errorMessage:D,hasError:C,helptext:E,helptextDropdown:$,helptextDropdownButton:P,inline:R,fullwidth:O=!1,label:I,name:J,optionalTag:V=!1,optionalText:De,requiredTag:q=!1,requiredText:W,placeholder:K,rows:X,useWrapper:ae=!0,onChange:ue,value:xe,autoComplete:ye="off",minLength:Ye,maxLength:We,readOnly:Me=!1,skipForwardTestid:Qe=!1,...Ie},at)=>{const Le=[h,"pkt-textinput","pkt-textarea"].join(" "),Ae=`${r}-input`,ce=`${Ae}-label`,Ne=i||ce,Se=$e.useRef(null),[Q,le]=$e.useState(0),it=Je=>{var pt,lt;if(l&&le(((lt=(pt=Je.currentTarget)==null?void 0:pt.value)==null?void 0:lt.length)||0),ue)return ue(Je)};return $e.useEffect(()=>{var Je,pt;typeof at=="function"&&at(Se.current),l&&le(((pt=(Je=Se==null?void 0:Se.current)==null?void 0:Je.value)==null?void 0:pt.length)||0)},[at]),L.jsx(Rh,{ariaDescribedby:n,className:Le,disabled:m,errorMessage:D,forId:Ae,hasError:C,helptext:E,helptextDropdown:$,helptextDropdownButton:P,inline:R,label:I,optionalTag:V,optionalText:De,requiredTag:q,requiredText:W,useWrapper:ae,counter:l,counterCurrent:Q,counterMaxLength:c,children:L.jsx("textarea",{ref:Se,className:`pkt-input ${O?"pkt-input--fullwidth":""} ${c&&Q>c?"pkt-input--counter-error":""}`,name:`${J||r}-input`,id:Ae,placeholder:K,disabled:m,rows:X,"aria-labelledby":Ne,"aria-invalid":C,"aria-errormessage":`${r}-error`,...Ie,onChange:it,value:xe,autoComplete:ye,minLength:Ye,maxLength:We,"data-skip-forward-testid":Qe?"true":void 0})})});var Gh=window.CustomEvent;(!Gh||typeof Gh=="object")&&(Gh=function(r,n){n=n||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(r,!!n.bubbles,!!n.cancelable,n.detail||null),i},Gh.prototype=window.Event.prototype);function IE(r,n){var i="on"+n.type.toLowerCase();return typeof r[i]=="function"&&r[i](n),r.dispatchEvent(n)}function M4(r){for(;r&&r!==document.body;){var n=window.getComputedStyle(r),i=function(l,c){return!(n[l]===void 0||n[l]===c)};if(n.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||n.isolation==="isolate"||n.position==="fixed"||n.webkitOverflowScrolling==="touch")return!0;r=r.parentElement}return!1}function tv(r){for(;r;){if(r.localName==="dialog")return r;r.parentElement?r=r.parentElement:r.parentNode?r=r.parentNode.host:r=null}return null}function jE(r){for(;r&&r.shadowRoot&&r.shadowRoot.activeElement;)r=r.shadowRoot.activeElement;r&&r.blur&&r!==document.body&&r.blur()}function I4(r,n){for(var i=0;i<r.length;++i)if(r[i]===n)return!0;return!1}function N2(r){return!r||!r.hasAttribute("method")?!1:r.getAttribute("method").toLowerCase()==="dialog"}function zE(r){var n=["button","input","keygen","select","textarea"],i=n.map(function(m){return m+":not([disabled])"});i.push('[tabindex]:not([disabled]):not([tabindex=""])');var l=r.querySelector(i.join(", "));if(!l&&"attachShadow"in Element.prototype)for(var c=r.querySelectorAll("*"),h=0;h<c.length&&!(c[h].tagName&&c[h].shadowRoot&&(l=zE(c[h].shadowRoot),l));h++);return l}function UE(r){return r.isConnected||document.body.contains(r)}function HE(r){if(r.submitter)return r.submitter;var n=r.target;if(!(n instanceof HTMLFormElement))return null;var i=jn.formSubmitter;if(!i){var l=r.target,c="getRootNode"in l&&l.getRootNode()||document;i=c.activeElement}return!i||i.form!==n?null:i}function j4(r){if(!r.defaultPrevented){var n=r.target,i=jn.imagemapUseValue,l=HE(r);i===null&&l&&(i=l.value);var c=tv(n);if(c){var h=l&&l.getAttribute("formmethod")||n.getAttribute("method");h==="dialog"&&(r.preventDefault(),i!=null?c.close(i):c.close())}}}function WE(r){if(this.dialog_=r,this.replacedStyleTop_=!1,this.openAsModal_=!1,r.hasAttribute("role")||r.setAttribute("role","dialog"),r.show=this.show.bind(this),r.showModal=this.showModal.bind(this),r.close=this.close.bind(this),r.addEventListener("submit",j4,!1),"returnValue"in r||(r.returnValue=""),"MutationObserver"in window){var n=new MutationObserver(this.maybeHideModal.bind(this));n.observe(r,{attributes:!0,attributeFilter:["open"]})}else{var i=!1,l=(function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}).bind(this),c,h=function(m){if(m.target===r){var D="DOMNodeRemoved";i|=m.type.substr(0,D.length)===D,window.clearTimeout(c),c=window.setTimeout(l,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(m){r.addEventListener(m,h)})}Object.defineProperty(r,"open",{set:this.setOpen.bind(this),get:r.hasAttribute.bind(r,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}WE.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&UE(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_),jn.dm.removeDialog(this))},setOpen:function(r){r?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(r){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var n=document.createElement("div");this.dialog_.insertBefore(n,this.dialog_.firstChild),n.tabIndex=-1,n.focus(),this.dialog_.removeChild(n)}var i=document.createEvent("MouseEvents");i.initMouseEvent(r.type,r.bubbles,r.cancelable,window,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget),this.dialog_.dispatchEvent(i),r.stopPropagation()},focus_:function(){var r=this.dialog_.querySelector("[autofocus]:not([disabled])");!r&&this.dialog_.tabIndex>=0&&(r=this.dialog_),r||(r=zE(this.dialog_)),jE(document.activeElement),r&&r.focus()},updateZIndex:function(r,n){if(r<n)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=r,this.backdrop_.style.zIndex=n},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!UE(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!jn.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");M4(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,jn.needsCentering(this.dialog_)?(jn.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(r){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),r!==void 0&&(this.dialog_.returnValue=r);var n=new Gh("close",{bubbles:!1,cancelable:!1});IE(this.dialog_,n)}};var jn={};if(jn.reposition=function(r){var n=document.body.scrollTop||document.documentElement.scrollTop,i=n+(window.innerHeight-r.offsetHeight)/2;r.style.top=Math.max(n,i)+"px"},jn.isInlinePositionSetByStylesheet=function(r){for(var n=0;n<document.styleSheets.length;++n){var i=document.styleSheets[n],l=null;try{l=i.cssRules}catch{}if(l)for(var c=0;c<l.length;++c){var h=l[c],m=null;try{m=document.querySelectorAll(h.selectorText)}catch{}if(!(!m||!I4(m,r))){var D=h.style.getPropertyValue("top"),C=h.style.getPropertyValue("bottom");if(D&&D!=="auto"||C&&C!=="auto")return!0}}}return!1},jn.needsCentering=function(r){var n=window.getComputedStyle(r);return n.position!=="absolute"||r.style.top!=="auto"&&r.style.top!==""||r.style.bottom!=="auto"&&r.style.bottom!==""?!1:!jn.isInlinePositionSetByStylesheet(r)},jn.forceRegisterDialog=function(r){if((window.HTMLDialogElement||r.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",r),r.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new WE(r)},jn.registerDialog=function(r){r.showModal||jn.forceRegisterDialog(r)},jn.DialogManager=function(){this.pendingDialogStack=[];var r=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(n){this.forwardTab_=void 0,n.stopPropagation(),r([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(n){var i=[];n.forEach(function(l){for(var c=0,h;h=l.removedNodes[c];++c){if(h instanceof Element)h.localName==="dialog"&&i.push(h);else continue;i=i.concat(h.querySelectorAll("dialog"))}}),i.length&&r(i)}))},jn.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})},jn.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},jn.DialogManager.prototype.updateStacking=function(){for(var r=this.zIndexHigh_,n=0,i;i=this.pendingDialogStack[n];++n)i.updateZIndex(--r,--r),n===0&&(this.overlay.style.zIndex=--r);var l=this.pendingDialogStack[0];if(l){var c=l.dialog.parentNode||document.body;c.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},jn.DialogManager.prototype.containedByTopDialog_=function(r){for(;r=tv(r);){for(var n=0,i;i=this.pendingDialogStack[n];++n)if(i.dialog===r)return n===0;r=r.parentElement}return!1},jn.DialogManager.prototype.handleFocus_=function(r){var n=r.composedPath?r.composedPath()[0]:r.target;if(!this.containedByTopDialog_(n)&&document.activeElement!==document.documentElement&&(r.preventDefault(),r.stopPropagation(),jE(n),this.forwardTab_!==void 0)){var i=this.pendingDialogStack[0],l=i.dialog,c=l.compareDocumentPosition(n);return c&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():n!==document.documentElement&&document.documentElement.focus()),!1}},jn.DialogManager.prototype.handleKey_=function(r){if(this.forwardTab_=void 0,r.keyCode===27){r.preventDefault(),r.stopPropagation();var n=new Gh("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&IE(i.dialog,n)&&i.dialog.close()}else r.keyCode===9&&(this.forwardTab_=!r.shiftKey)},jn.DialogManager.prototype.checkDOM_=function(r){var n=this.pendingDialogStack.slice();n.forEach(function(i){r.indexOf(i.dialog)!==-1?i.downgradeModal():i.maybeHideModal()})},jn.DialogManager.prototype.pushDialog=function(r){var n=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=n?!1:(this.pendingDialogStack.unshift(r)===1&&this.blockDocument(),this.updateStacking(),!0)},jn.DialogManager.prototype.removeDialog=function(r){var n=this.pendingDialogStack.indexOf(r);n!==-1&&(this.pendingDialogStack.splice(n,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},jn.dm=new jn.DialogManager,jn.formSubmitter=null,jn.imagemapUseValue=null,window.HTMLDialogElement===void 0){var qE=document.createElement("form");if(qE.setAttribute("method","dialog"),qE.method!=="dialog"){var Xh=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(Xh){var z4=Xh.get;Xh.get=function(){return N2(this)?"dialog":z4.call(this)};var U4=Xh.set;Xh.set=function(r){return typeof r=="string"&&r.toLowerCase()==="dialog"?this.setAttribute("method",r):U4.call(this,r)},Object.defineProperty(HTMLFormElement.prototype,"method",Xh)}}document.addEventListener("click",function(r){if(jn.formSubmitter=null,jn.imagemapUseValue=null,!r.defaultPrevented){var n=r.target;if("composedPath"in r){var i=r.composedPath();n=i.shift()||n}if(!(!n||!N2(n.form))){var l=n.type==="submit"&&["button","input"].indexOf(n.localName)>-1;if(!l){if(!(n.localName==="input"&&n.type==="image"))return;jn.imagemapUseValue=r.offsetX+","+r.offsetY}var c=tv(n);c&&(jn.formSubmitter=n)}}},!1),document.addEventListener("submit",function(r){var n=r.target,i=tv(n);if(!i){var l=HE(r),c=l&&l.getAttribute("formmethod")||n.getAttribute("method");c==="dialog"&&r.preventDefault()}});var H4=HTMLFormElement.prototype.submit,W4=function(){if(!N2(this))return H4.call(this);var r=tv(this);r&&r.close()};HTMLFormElement.prototype.submit=W4}const q4=Object.freeze(Object.defineProperty({__proto__:null,default:jn},Symbol.toStringTag,{value:"Module"}));Ot.PktAccordion=Xx,Ot.PktAccordionItem=Jx,Ot.PktAlert=w0,Ot.PktBackLink=Qx,Ot.PktBreadcrumbs=hR,Ot.PktButton=bc,Ot.PktCard=Kx,Ot.PktCheckbox=ib,Ot.PktCombobox=Zx,Ot.PktConsent=ob,Ot.PktDatepicker=D0,Ot.PktFooter=yR,Ot.PktFooterSimple=bR,Ot.PktHeader=wR,Ot.PktHelptext=t_,Ot.PktIcon=Mn,Ot.PktInput=n_,Ot.PktInputWrapper=Rh,Ot.PktLink=r_,Ot.PktLinkCard=a_,Ot.PktLoader=i_,Ot.PktMessagebox=o_,Ot.PktModal=s_,Ot.PktPreview=OE,Ot.PktProgressbar=BE,Ot.PktRadioButton=ME,Ot.PktSearchInput=$4,Ot.PktSelect=$2,Ot.PktStep=O4,Ot.PktStepper=P4,Ot.PktTable=Rb,Ot.PktTableBody=Ob,Ot.PktTableDataCell=Zo,Ot.PktTableHeader=Lb,Ot.PktTableHeaderCell=gl,Ot.PktTableRow=np,Ot.PktTabs=LE,Ot.PktTag=Yh,Ot.PktTextarea=B4,Ot.PktTextinput=Nb,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
|
|
1548
|
+
`+ce)}else{const Le=await Tb(X.current.innerHTML,{parser:"html",plugins:[j1]});P(Le.replace(/<\!--.*?-->/g,""))}},ue=async()=>{const Le=await yL(Me);return O(Le),Promise.resolve()},xe=(Le,Ae)=>{navigator.clipboard.writeText(Ae).then(()=>{J(Le),console.log("Copied to clipboard",Le)})},ye=Le=>Array.isArray(Le)&&Le.length===0,Ye=Le=>Le&&typeof Le=="object"&&!Object.keys(Le).length,We=(Le,Ae)=>L.jsxs("div",{className:"pkt-preview__copy",children:[I===Le&&L.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),L.jsx(bc,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>xe(Le,Ae),children:"Kopier kode"})]}),Me=$e.isValidElement(n)&&$e.cloneElement(n,{...m},n.props.children?n.props.children:(Ie=r.slots)!=null&&Ie.default?V:null),Qe=(Le,Ae,ce=!1)=>{if(h(c+1),!ce&&(!Ae||Ae=="false")){const{[Le]:Ne,...Se}=m;D(Se)}else D(Ne=>({...Ne,[Le]:Ae}))};return L.jsxs("div",{className:"pkt-preview",children:[L.jsxs("div",{className:"pkt-preview__component-container","data-mode":C,children:[r["dark-mode"]&&L.jsx("div",{className:"pkt-preview__mode",children:L.jsx(ib,{id:"mode",label:"Dark mode",type:"checkbox",checked:C==="dark",onChange:Le=>E(Le.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),L.jsx("div",{className:`pkt-preview__component ${i&&"pkt-preview__component--fullwidth"}`,ref:X,children:L.jsx("div",{children:Me})},c)]}),L.jsx(LE,{tabs:q,onTabSelected:K}),L.jsxs("div",{className:`pkt-grid pkt-preview__opts ${q[0].active?"":"pkt-hide"}`,children:[((at=r.slots)==null?void 0:at.default)&&!n.props.children&&L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),L.jsx(Nb,{id:"slot",label:"Slot",helptext:r.slots.default.description||"Innholdet i slot",type:"text",value:V,onChange:Le=>De(Le.currentTarget.value)})]}),r.props&&typeof r.props=="object"&&!Array.isArray(r.props)?Object.entries(r.props).map(([Le,Ae])=>L.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[L.jsx(Yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:Le}),L.jsx(P2,{propKey:Le,props:m,spec:Ae,handleChange:Qe})]},Le)):L.jsx("p",{children:"OBS! Specs mangler props!"})]}),L.jsxs("div",{className:`pkt-preview__code ${q[1].active?"":"pkt-hide"}`,children:[L.jsx(ev,{language:"jsx",style:RE,children:R}),We("jsx",R)]}),L.jsxs("div",{className:`pkt-preview__code ${q[2].active?"":"pkt-hide"}`,children:[L.jsx(ev,{language:"html",style:RE,children:$}),We("html",$)]}),L.jsx("div",{className:`pkt-preview__specs ${q[3].active?"":"pkt-hide"}`,children:L.jsx(T4,{specs:r})})]})};OE.displayName="PktPreview";const A4=ti({tagName:"pkt-progressbar",elementClass:ra,react:$e,displayName:"PktProgressbar",events:{}}),BE=$e.forwardRef(({children:r,...n},i)=>L.jsx(A4,{ref:i,...n,children:L.jsx("div",{className:"pkt-contents",children:r})}));BE.displayName="PktProgressbar";const ME=$e.forwardRef(({id:r,name:n,label:i,className:l,hasTile:c=!1,disabled:h=!1,checkHelptext:m,hasError:D=!1,defaultChecked:C,checked:E,...$},P)=>{const R=[l,"pkt-input-check"].filter(Boolean).join(" ");return L.jsx("div",{className:R,children:L.jsxs("div",{className:`pkt-input-check__input ${c?"pkt-input-check__input--tile":""} ${h&&c?"pkt-input-check__input--tile-disabled":""}`,children:[L.jsx("input",{ref:P,id:r,type:"radio",name:n,disabled:h,className:`pkt-input-check__input-checkbox ${D?"pkt-input-check__input-checkbox--error":""}`,...E!==void 0?{checked:E}:{defaultChecked:C},...$}),L.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[i,m&&L.jsx("div",{className:"pkt-input-check__input-helptext",children:m})]})]})})});ME.displayName="PktRadioButton";const $4=$e.forwardRef(({appearance:r="local",disabled:n=!1,fullwidth:i=!1,id:l,label:c,name:h,placeholder:m="Søk…",suggestions:D,value:C="",action:E,method:$,onChange:P,onSearch:R,onSuggestionClick:O,...I},J)=>{const V=(K,X)=>{K?K():O&&O(X)},De=K=>{C=K.target.value},q=`pkt-searchinput pkt-searchinput--${r} ${i?"pkt-searchinput--fullwidth":""}`;let W;return E?W=K=>L.jsx("form",{role:"search",className:q,action:E,method:$,children:K}):W=K=>L.jsx("div",{role:"search",className:q,children:K}),W(L.jsxs(L.Fragment,{children:[c&&L.jsx("label",{htmlFor:c?l:void 0,className:c?"pkt-inputwrapper__label":"",children:c}),L.jsxs("div",{className:r==="local"?"pkt-input__container":"pkt-searchinput__field",children:[L.jsx("input",{className:`pkt-input ${i?"pkt-input--fullwidth":""}`,type:"search",name:h||l,id:l,placeholder:m,defaultValue:C,disabled:n,autoComplete:"off","aria-autocomplete":"list",ref:J,"aria-controls":`${l}-suggestions`,onChange:P||De,onKeyUp:R&&(K=>{K.key==="Enter"&&(K.preventDefault(),R(C))}),...I}),L.jsx(bc,{className:`pkt-searchinput__button ${r==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:r==="local"?"tertiary":"primary",color:r==="global"?"yellow":void 0,type:"submit",disabled:n,onClick:R&&(K=>{K.preventDefault(),R(C)}),children:c||m})]}),D&&L.jsx("ul",{id:`${l}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:D.map((K,X)=>L.jsx("li",{children:$e.createElement(K.href?"a":K.onClick?"button":"div",{href:K.href,className:`pkt-searchinput__suggestion ${K.onClick?"pkt-link-button":""} ${K.href||K.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:K.onClick?"button":void 0,onClick:()=>V(K.onClick,X),onKeyUp:ae=>ae.key==="Enter"&&V(K.onClick,X)},L.jsxs(L.Fragment,{children:[K.title&&L.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:K.title}),K.text&&L.jsx("p",{className:"pkt-searchinput__suggestion-text",children:K.text})]}))},`search-suggestion-${X}`))})]}))}),P4=$e.forwardRef(({activeStep:r,className:n,children:i,hideNonActiveSteps:l=!1,hideNonActiveStepsContent:c=!0,orientation:h="vertical",...m},D)=>{const C=ml(n,"pkt-stepper",h==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),E=$e.Children.map(i,($,P)=>$e.isValidElement($)?$e.cloneElement($,{className:ml($.props.className,{"pkt-step--hideStep":l&&P!==r,"pkt-step--hideContent":c&&P!==r})}):$);return L.jsx("ol",{"data-testid":"pkt-stepper",className:C,ref:D,...m,children:E})}),N4=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)"}})}),R4=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"})]}),L4=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"})]}),O4=({children:r,className:n,status:i="incomplete",title:l})=>L.jsxs("li",{className:ml("pkt-step",n,`pkt-step--${i}`),"data-testid":"pkt-step",children:[L.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),L.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),L.jsx("span",{className:ml("pkt-step__indicator"),children:i==="current"?R4:i==="completed"?L4:N4}),L.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),L.jsxs("div",{className:"pkt-step__wrapper",children:[L.jsx("div",{className:"pkt-step__title",children:l}),L.jsx("div",{className:"pkt-step__content",children:r})]})]}),B4=$e.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:i,counter:l,counterMaxLength:c,className:h,disabled:m,errorMessage:D,hasError:C,helptext:E,helptextDropdown:$,helptextDropdownButton:P,inline:R,fullwidth:O=!1,label:I,name:J,optionalTag:V=!1,optionalText:De,requiredTag:q=!1,requiredText:W,placeholder:K,rows:X,useWrapper:ae=!0,onChange:ue,value:xe,autoComplete:ye="off",minLength:Ye,maxLength:We,readOnly:Me=!1,skipForwardTestid:Qe=!1,...Ie},at)=>{const Le=[h,"pkt-textinput","pkt-textarea"].join(" "),Ae=`${r}-input`,ce=`${Ae}-label`,Ne=i||ce,Se=$e.useRef(null),[Q,le]=$e.useState(0),it=Je=>{var pt,lt;if(l&&le(((lt=(pt=Je.currentTarget)==null?void 0:pt.value)==null?void 0:lt.length)||0),ue)return ue(Je)};return $e.useEffect(()=>{var Je,pt;typeof at=="function"&&at(Se.current),l&&le(((pt=(Je=Se==null?void 0:Se.current)==null?void 0:Je.value)==null?void 0:pt.length)||0)},[at]),L.jsx(Rh,{ariaDescribedby:n,className:Le,disabled:m,errorMessage:D,forId:Ae,hasError:C,helptext:E,helptextDropdown:$,helptextDropdownButton:P,inline:R,label:I,optionalTag:V,optionalText:De,requiredTag:q,requiredText:W,useWrapper:ae,counter:l,counterCurrent:Q,counterMaxLength:c,children:L.jsx("textarea",{ref:Se,className:`pkt-input ${O?"pkt-input--fullwidth":""} ${c&&Q>c?"pkt-input--counter-error":""}`,name:`${J||r}-input`,id:Ae,placeholder:K,disabled:m,rows:X,"aria-labelledby":Ne,"aria-invalid":C,"aria-errormessage":`${r}-error`,...Ie,onChange:it,value:xe,autoComplete:ye,minLength:Ye,maxLength:We,"data-skip-forward-testid":Qe?"true":void 0})})});var Gh=window.CustomEvent;(!Gh||typeof Gh=="object")&&(Gh=function(r,n){n=n||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(r,!!n.bubbles,!!n.cancelable,n.detail||null),i},Gh.prototype=window.Event.prototype);function IE(r,n){var i="on"+n.type.toLowerCase();return typeof r[i]=="function"&&r[i](n),r.dispatchEvent(n)}function M4(r){for(;r&&r!==document.body;){var n=window.getComputedStyle(r),i=function(l,c){return!(n[l]===void 0||n[l]===c)};if(n.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||n.isolation==="isolate"||n.position==="fixed"||n.webkitOverflowScrolling==="touch")return!0;r=r.parentElement}return!1}function tv(r){for(;r;){if(r.localName==="dialog")return r;r.parentElement?r=r.parentElement:r.parentNode?r=r.parentNode.host:r=null}return null}function jE(r){for(;r&&r.shadowRoot&&r.shadowRoot.activeElement;)r=r.shadowRoot.activeElement;r&&r.blur&&r!==document.body&&r.blur()}function I4(r,n){for(var i=0;i<r.length;++i)if(r[i]===n)return!0;return!1}function N2(r){return!r||!r.hasAttribute("method")?!1:r.getAttribute("method").toLowerCase()==="dialog"}function zE(r){var n=["button","input","keygen","select","textarea"],i=n.map(function(m){return m+":not([disabled])"});i.push('[tabindex]:not([disabled]):not([tabindex=""])');var l=r.querySelector(i.join(", "));if(!l&&"attachShadow"in Element.prototype)for(var c=r.querySelectorAll("*"),h=0;h<c.length&&!(c[h].tagName&&c[h].shadowRoot&&(l=zE(c[h].shadowRoot),l));h++);return l}function UE(r){return r.isConnected||document.body.contains(r)}function HE(r){if(r.submitter)return r.submitter;var n=r.target;if(!(n instanceof HTMLFormElement))return null;var i=jn.formSubmitter;if(!i){var l=r.target,c="getRootNode"in l&&l.getRootNode()||document;i=c.activeElement}return!i||i.form!==n?null:i}function j4(r){if(!r.defaultPrevented){var n=r.target,i=jn.imagemapUseValue,l=HE(r);i===null&&l&&(i=l.value);var c=tv(n);if(c){var h=l&&l.getAttribute("formmethod")||n.getAttribute("method");h==="dialog"&&(r.preventDefault(),i!=null?c.close(i):c.close())}}}function WE(r){if(this.dialog_=r,this.replacedStyleTop_=!1,this.openAsModal_=!1,r.hasAttribute("role")||r.setAttribute("role","dialog"),r.show=this.show.bind(this),r.showModal=this.showModal.bind(this),r.close=this.close.bind(this),r.addEventListener("submit",j4,!1),"returnValue"in r||(r.returnValue=""),"MutationObserver"in window){var n=new MutationObserver(this.maybeHideModal.bind(this));n.observe(r,{attributes:!0,attributeFilter:["open"]})}else{var i=!1,l=(function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}).bind(this),c,h=function(m){if(m.target===r){var D="DOMNodeRemoved";i|=m.type.substr(0,D.length)===D,window.clearTimeout(c),c=window.setTimeout(l,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach(function(m){r.addEventListener(m,h)})}Object.defineProperty(r,"open",{set:this.setOpen.bind(this),get:r.hasAttribute.bind(r,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}WE.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&UE(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_),jn.dm.removeDialog(this))},setOpen:function(r){r?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(r){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var n=document.createElement("div");this.dialog_.insertBefore(n,this.dialog_.firstChild),n.tabIndex=-1,n.focus(),this.dialog_.removeChild(n)}var i=document.createEvent("MouseEvents");i.initMouseEvent(r.type,r.bubbles,r.cancelable,window,r.detail,r.screenX,r.screenY,r.clientX,r.clientY,r.ctrlKey,r.altKey,r.shiftKey,r.metaKey,r.button,r.relatedTarget),this.dialog_.dispatchEvent(i),r.stopPropagation()},focus_:function(){var r=this.dialog_.querySelector("[autofocus]:not([disabled])");!r&&this.dialog_.tabIndex>=0&&(r=this.dialog_),r||(r=zE(this.dialog_)),jE(document.activeElement),r&&r.focus()},updateZIndex:function(r,n){if(r<n)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=r,this.backdrop_.style.zIndex=n},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!UE(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!jn.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");M4(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,jn.needsCentering(this.dialog_)?(jn.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(r){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),r!==void 0&&(this.dialog_.returnValue=r);var n=new Gh("close",{bubbles:!1,cancelable:!1});IE(this.dialog_,n)}};var jn={};if(jn.reposition=function(r){var n=document.body.scrollTop||document.documentElement.scrollTop,i=n+(window.innerHeight-r.offsetHeight)/2;r.style.top=Math.max(n,i)+"px"},jn.isInlinePositionSetByStylesheet=function(r){for(var n=0;n<document.styleSheets.length;++n){var i=document.styleSheets[n],l=null;try{l=i.cssRules}catch{}if(l)for(var c=0;c<l.length;++c){var h=l[c],m=null;try{m=document.querySelectorAll(h.selectorText)}catch{}if(!(!m||!I4(m,r))){var D=h.style.getPropertyValue("top"),C=h.style.getPropertyValue("bottom");if(D&&D!=="auto"||C&&C!=="auto")return!0}}}return!1},jn.needsCentering=function(r){var n=window.getComputedStyle(r);return n.position!=="absolute"||r.style.top!=="auto"&&r.style.top!==""||r.style.bottom!=="auto"&&r.style.bottom!==""?!1:!jn.isInlinePositionSetByStylesheet(r)},jn.forceRegisterDialog=function(r){if((window.HTMLDialogElement||r.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",r),r.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new WE(r)},jn.registerDialog=function(r){r.showModal||jn.forceRegisterDialog(r)},jn.DialogManager=function(){this.pendingDialogStack=[];var r=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(n){this.forwardTab_=void 0,n.stopPropagation(),r([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(n){var i=[];n.forEach(function(l){for(var c=0,h;h=l.removedNodes[c];++c){if(h instanceof Element)h.localName==="dialog"&&i.push(h);else continue;i=i.concat(h.querySelectorAll("dialog"))}}),i.length&&r(i)}))},jn.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})},jn.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},jn.DialogManager.prototype.updateStacking=function(){for(var r=this.zIndexHigh_,n=0,i;i=this.pendingDialogStack[n];++n)i.updateZIndex(--r,--r),n===0&&(this.overlay.style.zIndex=--r);var l=this.pendingDialogStack[0];if(l){var c=l.dialog.parentNode||document.body;c.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},jn.DialogManager.prototype.containedByTopDialog_=function(r){for(;r=tv(r);){for(var n=0,i;i=this.pendingDialogStack[n];++n)if(i.dialog===r)return n===0;r=r.parentElement}return!1},jn.DialogManager.prototype.handleFocus_=function(r){var n=r.composedPath?r.composedPath()[0]:r.target;if(!this.containedByTopDialog_(n)&&document.activeElement!==document.documentElement&&(r.preventDefault(),r.stopPropagation(),jE(n),this.forwardTab_!==void 0)){var i=this.pendingDialogStack[0],l=i.dialog,c=l.compareDocumentPosition(n);return c&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():n!==document.documentElement&&document.documentElement.focus()),!1}},jn.DialogManager.prototype.handleKey_=function(r){if(this.forwardTab_=void 0,r.keyCode===27){r.preventDefault(),r.stopPropagation();var n=new Gh("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&IE(i.dialog,n)&&i.dialog.close()}else r.keyCode===9&&(this.forwardTab_=!r.shiftKey)},jn.DialogManager.prototype.checkDOM_=function(r){var n=this.pendingDialogStack.slice();n.forEach(function(i){r.indexOf(i.dialog)!==-1?i.downgradeModal():i.maybeHideModal()})},jn.DialogManager.prototype.pushDialog=function(r){var n=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=n?!1:(this.pendingDialogStack.unshift(r)===1&&this.blockDocument(),this.updateStacking(),!0)},jn.DialogManager.prototype.removeDialog=function(r){var n=this.pendingDialogStack.indexOf(r);n!==-1&&(this.pendingDialogStack.splice(n,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())},jn.dm=new jn.DialogManager,jn.formSubmitter=null,jn.imagemapUseValue=null,window.HTMLDialogElement===void 0){var qE=document.createElement("form");if(qE.setAttribute("method","dialog"),qE.method!=="dialog"){var Xh=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(Xh){var z4=Xh.get;Xh.get=function(){return N2(this)?"dialog":z4.call(this)};var U4=Xh.set;Xh.set=function(r){return typeof r=="string"&&r.toLowerCase()==="dialog"?this.setAttribute("method",r):U4.call(this,r)},Object.defineProperty(HTMLFormElement.prototype,"method",Xh)}}document.addEventListener("click",function(r){if(jn.formSubmitter=null,jn.imagemapUseValue=null,!r.defaultPrevented){var n=r.target;if("composedPath"in r){var i=r.composedPath();n=i.shift()||n}if(!(!n||!N2(n.form))){var l=n.type==="submit"&&["button","input"].indexOf(n.localName)>-1;if(!l){if(!(n.localName==="input"&&n.type==="image"))return;jn.imagemapUseValue=r.offsetX+","+r.offsetY}var c=tv(n);c&&(jn.formSubmitter=n)}}},!1),document.addEventListener("submit",function(r){var n=r.target,i=tv(n);if(!i){var l=HE(r),c=l&&l.getAttribute("formmethod")||n.getAttribute("method");c==="dialog"&&r.preventDefault()}});var H4=HTMLFormElement.prototype.submit,W4=function(){if(!N2(this))return H4.call(this);var r=tv(this);r&&r.close()};HTMLFormElement.prototype.submit=W4}const q4=Object.freeze(Object.defineProperty({__proto__:null,default:jn},Symbol.toStringTag,{value:"Module"}));Ot.PktAccordion=Xx,Ot.PktAccordionItem=Jx,Ot.PktAlert=w0,Ot.PktBackLink=Qx,Ot.PktBreadcrumbs=hR,Ot.PktButton=bc,Ot.PktCard=Kx,Ot.PktCheckbox=ib,Ot.PktCombobox=Zx,Ot.PktConsent=ob,Ot.PktDatepicker=D0,Ot.PktFooter=yR,Ot.PktFooterSimple=bR,Ot.PktHeader=wR,Ot.PktHelptext=t_,Ot.PktIcon=Mn,Ot.PktInput=n_,Ot.PktInputWrapper=Rh,Ot.PktLink=r_,Ot.PktLinkCard=a_,Ot.PktLoader=i_,Ot.PktMessagebox=o_,Ot.PktModal=s_,Ot.PktPreview=OE,Ot.PktProgressbar=BE,Ot.PktRadioButton=ME,Ot.PktSearchInput=$4,Ot.PktSelect=$2,Ot.PktStep=O4,Ot.PktStepper=P4,Ot.PktTable=Rb,Ot.PktTableBody=Ob,Ot.PktTableDataCell=Zo,Ot.PktTableHeader=Lb,Ot.PktTableHeaderCell=gl,Ot.PktTableRow=np,Ot.PktTabs=LE,Ot.PktTag=Yh,Ot.PktTextarea=B4,Ot.PktTextinput=Nb,Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
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",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
113
113
|
},
|
|
114
114
|
"license": "MIT",
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "d9156d8957067b7739c06dc568500541dab90bd8"
|
|
116
116
|
}
|
|
@@ -47,7 +47,7 @@ export const PktCheckbox = forwardRef(
|
|
|
47
47
|
type="checkbox"
|
|
48
48
|
id={id}
|
|
49
49
|
disabled={disabled}
|
|
50
|
-
|
|
50
|
+
{...(checked !== undefined ? { checked } : { defaultChecked })}
|
|
51
51
|
{...props}
|
|
52
52
|
/>
|
|
53
53
|
<label className="pkt-input-check__input-label" htmlFor={id}>
|
|
@@ -47,7 +47,7 @@ export const PktRadioButton = forwardRef(
|
|
|
47
47
|
name={name}
|
|
48
48
|
disabled={disabled}
|
|
49
49
|
className={`pkt-input-check__input-checkbox ${hasError ? 'pkt-input-check__input-checkbox--error' : ''}`}
|
|
50
|
-
|
|
50
|
+
{...(checked !== undefined ? { checked } : { defaultChecked })}
|
|
51
51
|
{...props}
|
|
52
52
|
/>
|
|
53
53
|
<label className="pkt-input-check__input-label" htmlFor={id}>
|