@oslokommune/punkt-react 12.22.0 → 12.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,42 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.23.0](https://github.com/oslokommune/punkt/compare/12.22.0...12.23.0) (2025-03-04)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* flytt keyUp-event fra knapp til input (SearchInput) (#2245). Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [12.22.1](https://github.com/oslokommune/punkt/compare/12.22.0...12.22.1) (2025-03-04)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
Ingen
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
* flytt keyUp-event fra knapp til input (SearchInput) (#2245). Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [12.22.0](https://github.com/oslokommune/punkt/compare/12.21.6...12.22.0) (2025-03-03)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -22740,7 +22740,7 @@ var sO = Object.defineProperty, lO = Object.getOwnPropertyDescriptor, sy = (n, r
|
|
|
22740
22740
|
return u && f && sO(r, s, f), f;
|
|
22741
22741
|
};
|
|
22742
22742
|
window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch;
|
|
22743
|
-
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.
|
|
22743
|
+
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.23/icons/";
|
|
22744
22744
|
const uO = (n) => new Promise((r) => setTimeout(r, n)), E0 = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', h2 = {}, cO = async (n, r) => {
|
|
22745
22745
|
let s = 0;
|
|
22746
22746
|
for (; h2[r + n + ".svg"] === "fetching" && (s++, !(s > 50)); )
|
|
@@ -27651,7 +27651,7 @@ const YU = da(
|
|
|
27651
27651
|
{
|
|
27652
27652
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
27653
27653
|
name: "spinner-blue",
|
|
27654
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27654
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.23/animations/"
|
|
27655
27655
|
}
|
|
27656
27656
|
),
|
|
27657
27657
|
S !== "label-only" && /* @__PURE__ */ L.jsx(Un, { className: "pkt-btn__icon", name: s }),
|
|
@@ -27909,7 +27909,7 @@ const tj = uo({
|
|
|
27909
27909
|
name: "oslologo",
|
|
27910
27910
|
className: "pkt-header__logo-svg",
|
|
27911
27911
|
"aria-hidden": "true",
|
|
27912
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27912
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.23/logos/"
|
|
27913
27913
|
}
|
|
27914
27914
|
) }) : /* @__PURE__ */ L.jsx(
|
|
27915
27915
|
"button",
|
|
@@ -27923,7 +27923,7 @@ const tj = uo({
|
|
|
27923
27923
|
name: "oslologo",
|
|
27924
27924
|
className: "pkt-header__logo-svg",
|
|
27925
27925
|
"aria-hidden": "true",
|
|
27926
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27926
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.23/logos/"
|
|
27927
27927
|
}
|
|
27928
27928
|
)
|
|
27929
27929
|
}
|
|
@@ -28102,7 +28102,7 @@ const uj = da(
|
|
|
28102
28102
|
Un,
|
|
28103
28103
|
{
|
|
28104
28104
|
name: B(g),
|
|
28105
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
28105
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.23/animations/",
|
|
28106
28106
|
className: `pkt-loader__svg pkt-loader__${g}`
|
|
28107
28107
|
}
|
|
28108
28108
|
),
|
|
@@ -37878,6 +37878,9 @@ const XU = uo({
|
|
|
37878
37878
|
ref: V,
|
|
37879
37879
|
"aria-controls": `${u}-suggestions`,
|
|
37880
37880
|
onChange: P || ge,
|
|
37881
|
+
onKeyUp: R && ((U) => {
|
|
37882
|
+
U.key === "Enter" && (U.preventDefault(), R(C));
|
|
37883
|
+
}),
|
|
37881
37884
|
...M
|
|
37882
37885
|
}
|
|
37883
37886
|
),
|
|
@@ -37894,9 +37897,6 @@ const XU = uo({
|
|
|
37894
37897
|
onClick: R && ((U) => {
|
|
37895
37898
|
U.preventDefault(), R(C);
|
|
37896
37899
|
}),
|
|
37897
|
-
onKeyUp: R && ((U) => {
|
|
37898
|
-
U.key === "Enter" && (U.preventDefault(), R(C));
|
|
37899
|
-
}),
|
|
37900
37900
|
children: f || v
|
|
37901
37901
|
}
|
|
37902
37902
|
)
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -335,7 +335,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
335
335
|
* @license
|
|
336
336
|
* Copyright 2017 Google LLC
|
|
337
337
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
338
|
-
*/let kk=class extends ky{};kk.directiveName="unsafeSVG",kk.resultType=2;const BS=hp(kk);var TN=Object.defineProperty,AN=Object.getOwnPropertyDescriptor,ig=(n,r,s,u)=>{for(var f=u>1?void 0:u?AN(r,s):r,g=n.length-1,v;g>=0;g--)(v=n[g])&&(f=(u?v(r,s,f):v(f))||f);return u&&f&&TN(r,s,f),f};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.
|
|
338
|
+
*/let kk=class extends ky{};kk.directiveName="unsafeSVG",kk.resultType=2;const BS=hp(kk);var TN=Object.defineProperty,AN=Object.getOwnPropertyDescriptor,ig=(n,r,s,u)=>{for(var f=u>1?void 0:u?AN(r,s):r,g=n.length-1,v;g>=0;g--)(v=n[g])&&(f=(u?v(r,s,f):v(f))||f);return u&&f&&TN(r,s,f),f};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.23/icons/";const FN=n=>new Promise(r=>setTimeout(r,n)),Dy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',wk={},NN=async(n,r)=>{let s=0;for(;wk[r+n+".svg"]==="fetching"&&(s++,!(s>50));)await FN(50);return localStorage.getItem(r+n+".svg")?Promise.resolve(localStorage.getItem(r+n+".svg")):typeof window.pktFetch=="function"?(wk[r+n+".svg"]="fetching",Promise.resolve(window.pktFetch(r+n+".svg").then(u=>u.ok?u.text():(console.error("Missing icon: "+r+n+".svg"),Dy)).then(u=>(u!==Dy&&localStorage.setItem(r+n+".svg",u),wk[r+n+".svg"]="fetched",u)))):Promise.resolve(Dy)};let gp=class extends wi{constructor(){super(...arguments),this.path=window.pktIconPath,this.name="",this.icon=BS(Dy),this._updatedProps=[]}connectedCallback(){super.connectedCallback(),this.classList.add("pkt-icon")}async attributeChangedCallback(r,s,u){super.attributeChangedCallback(r,s,u),(r==="name"||r==="path")&&this.getIcon(this.name)}async updated(r){super.updated(r),(r.has("name")||r.has("path"))&&this.getIcon(this.name)}async getIcon(r=""){this._updatedProps.length>0?(this.path||(this.path,window.pktIconPath),this.icon=BS(await NN(this.name||"",this.path).then(s=>s)),this._updatedProps=[]):this._updatedProps.includes(r)||this._updatedProps.push(r)}render(){return Qe`${this.name&&this.icon}`}};ig([ae({type:String,reflect:!1})],gp.prototype,"path",2),ig([ae({type:String,reflect:!0})],gp.prototype,"name",2),ig([ae({type:SVGElement})],gp.prototype,"icon",2),ig([ae({type:Array,noAccessor:!0})],gp.prototype,"_updatedProps",2),gp=ig([$a("pkt-icon")],gp);const PN="pkt-alert",$N=!0,RN={onClose:{description:"React: Klikk-event for 'Lukk'-knappen"},close:{description:"Vue: Klikk-event for 'Lukk'-knappen"}},ON={title:{name:"Tittel",description:"Tittelen som vises øverst i på meldingen",type:"string"},skin:{name:"Utseende",description:"Hvordan type melding er dette?",type:["info","success","warning","error"],default:"info"},date:{name:"Sist oppdatert",description:"Dato som vises nederst i på meldingen",type:"string"},ariaLive:{name:"aria-live",description:"Hvordan skal skjermleseren lese opp meldingen?",type:["off","polite","assertive"],default:"polite"},compact:{name:"Kompakt",description:"Gjør meldingen mindre",type:"boolean",default:!1},closeAlert:{name:"Vis 'Lukk'-knapp",description:"Viser 'Lukk'-knappen",type:"boolean",default:!1}},LN={default:{description:"Innholdet i meldingen"}},Sy={name:PN,"css-class":"pkt-alert","dark-mode":!0,isElement:$N,events:RN,props:ON,slots:LN};var BN=Object.defineProperty,IN=Object.getOwnPropertyDescriptor,_u=(n,r,s,u)=>{for(var f=u>1?void 0:u?IN(r,s):r,g=n.length-1,v;g>=0;g--)(v=n[g])&&(f=(u?v(r,s,f):v(f))||f);return u&&f&&BN(r,s,f),f};let Us=class extends wi{constructor(){super(),this.defaultSlot=Nr(),this.compact=Sy.props.compact.default,this.title="",this.skin=Sy.props.skin.default,this.ariaLive=Sy.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=Sy.props.closeAlert.default,this.date=null,this._isClosed=!1,this.close=r=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:r},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:r},bubbles:!0,composed:!0}))},this.slotController=new Eu(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(r,s,u){r==="ariaLive"&&(this["aria-live"]=u),super.attributeChangedCallback(r,s,u)}updated(r){super.updated(r),r.has("ariaLive")&&(this["aria-live"]=this.ariaLive)}render(){const r={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed};return Qe`
|
|
339
339
|
<div class=${An(r)}>
|
|
340
340
|
<pkt-icon
|
|
341
341
|
class="pkt-alert__icon"
|
|
@@ -1022,7 +1022,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1022
1022
|
Copyright (c) 2018 Jed Watson.
|
|
1023
1023
|
Licensed under the MIT License (MIT), see
|
|
1024
1024
|
http://jedwatson.github.io/classnames
|
|
1025
|
-
*/(function(n){(function(){var r={}.hasOwnProperty;function s(){for(var g="",v=0;v<arguments.length;v++){var S=arguments[v];S&&(g=f(g,u(S)))}return g}function u(g){if(typeof g=="string"||typeof g=="number")return g;if(typeof g!="object")return"";if(Array.isArray(g))return s.apply(null,g);if(g.toString!==Object.prototype.toString&&!g.toString.toString().includes("[native code]"))return g.toString();var v="";for(var S in g)r.call(g,S)&&g[S]&&(v=f(v,S));return v}function f(g,v){return v?g?g+" "+v:g+v:g}n.exports?(s.default=s,n.exports=s):window.classNames=s})()})(lC);var g3=lC.exports;const os=py(g3),v3=He.forwardRef(({title:n,className:r,children:s,toggleProps:u,defaultOpen:f=!1,id:g},v)=>{const[S,x]=He.useState(f),_=u?u.isOpen:S,N=B=>B??void 0,$=(B,M)=>{B.preventDefault(),u!==void 0&&u.onToggleClick(B,M),x(!_)},R=os(r,"pkt-accordion-item");return O.jsxs("details",{className:R,ref:v,id:g,open:N(u?u.isOpen:S),children:[O.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${g}`,onClick:B=>$(B,g),children:[n,O.jsx(On,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),O.jsx("div",{id:`pkt-accordion-item-content-${g}`,role:"region",className:"pkt-accordion-item__content",children:s})]})}),y3=qi({tagName:"pkt-alert",elementClass:Us,react:He,displayName:"PktAlert",events:{onClose:"close"}}),uC=He.forwardRef(({children:n,...r},s)=>O.jsx(y3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));uC.displayName="PktAlert";const cC=He.forwardRef(({href:n,text:r,onClick:s,className:u,...f},g)=>{const v=[u,"pkt-back-link"].filter(Boolean).join(" "),S=x=>{s&&s(x)};return O.jsx("nav",{ref:g,className:v,"aria-label":"Gå tilbake et steg",children:O.jsxs("a",{href:n||"/",className:"pkt-link pkt-link--icon-left",onClick:S,...f,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),O.jsx("span",{className:"pkt-back-link__text",children:r||"Forsiden"})]})})});cC.displayName="PktBackLink";const b3=He.forwardRef(({breadcrumbs:n,navigationType:r,className:s,...u},f)=>{const g=n.slice(0,4),v=g[g.length-2],S=[s,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:f,"aria-label":"brødsmulemeny",className:S,children:[O.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:g.map((x,_)=>O.jsx("li",{className:"pkt-breadcrumbs__item",children:_===g.length-1?O.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})}):r==="router"?O.jsxs(up.Link,{to:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...u,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]}):O.jsxs("a",{href:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...u,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]})},`breadcrumb-${_}`))}),r==="router"?O.jsxs(up.Link,{to:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...u,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]}):O.jsxs("a",{href:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...u,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]})]})}),Vc=He.forwardRef(({children:n,className:r,iconName:s="user",secondIconName:u="user",size:f="medium",skin:g="primary",type:v="button",variant:S="label-only",state:x,color:_,isLoading:N=!1,...$},R)=>{const B=[r,"pkt-btn",f&&`pkt-btn--${f}`,g&&`pkt-btn--${g}`,S&&`pkt-btn--${S}`,_&&`pkt-btn--${_}`,N&&"pkt-btn--active",x&&`pkt-btn--${x}`].filter(Boolean).join(" ");return O.jsxs("button",{...$,className:B,type:v,ref:R,children:[N&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.22/animations/"}),S!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:s}),O.jsx("span",{className:"pkt-btn__text",children:n}),S==="icons-right-and-left"&&O.jsx(On,{className:"pkt-btn__icon",name:u})]})});Vc.displayName="PktButton";const k3=qi({tagName:"pkt-card",elementClass:Au,react:He,displayName:"PktCard",events:{}}),dC=He.forwardRef(({children:n,...r},s)=>O.jsx(k3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));dC.displayName="PktCard";const Ty=He.forwardRef(({id:n,hasTile:r=!1,disabled:s=!1,label:u,labelPosition:f="right",hideLabel:g=!1,checkHelptext:v,hasError:S=!1,isSwitch:x=!1,className:_,...N},$)=>{const R=[_,"pkt-input-check"].filter(Boolean).join(" ");return O.jsx("div",{className:R,children:O.jsxs("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${s&&r?"pkt-input-check__input--tile-disabled":""}`,children:[u&&f==="left"&&O.jsxs("label",{className:`pkt-input-check__input-label ${g?"pkt-sr-only":""}`,htmlFor:n,children:[u,v&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:v})]}),O.jsx("input",{ref:$,className:`pkt-input-check__input-checkbox ${S?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:x?"switch":"checkbox",id:n,disabled:s,...N}),u&&f==="right"&&O.jsxs("label",{className:`pkt-input-check__input-label ${g?"pkt-sr-only":""}`,htmlFor:n,children:[u,v&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:v})]})]})})});Ty.displayName="PktCheckbox";const pC=qi({tagName:"pkt-datepicker",elementClass:Mr,react:He,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),w3=({columnOne:n,columnTwo:r,socialLinks:s,className:u,personvernOgInfoLink:f="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:g="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var S,x;const v=[u,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:v,"data-mode":"dark",children:O.jsxs("div",{className:"pkt-footer__container",children:[O.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:n.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&O.jsx("li",{className:"pkt-footer__text",children:n.text}),(S=n.links)==null?void 0:S.map((_,N)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${_.external?"pkt-link--external":""}`,href:_.href,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),_.text]})},`links-${N}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:r.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&O.jsx("li",{className:"pkt-footer__text",children:r.text}),(x=r.links)==null?void 0:x.map((_,N)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${_.external?"pkt-link--external":""}`,href:_.href,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),_.text]})},`links-${N}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),O.jsxs("ul",{className:"pkt-footer__list",children:[O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:f,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:g,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&O.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[O.jsx("div",{className:"pkt-footer__social-languages",children:s.filter(_=>_.language).map((_,N)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:_.href,"aria-label":`til ${_.language} versjon av nettsiden`,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:_.language})},`sociallinks-language-${N}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:s.filter(_=>_.iconName).map((_,N)=>O.jsx(He.Fragment,{children:O.jsx("a",{href:_.href,"aria-label":`til ${_.iconName}`,className:"pkt-footer__social-icon-link",target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:_.iconName})})},`sociallinks-${N}`))})]})]})})},D3=({links:n=[],personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:s="https://www.oslo.kommune.no/tilgjengelighet/",className:u})=>{const f=[u,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:f,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[n.map((g,v)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${g.external?" pkt-link--external":""}`,href:g.href,target:g.openInNewTab?"_blank":"_self",rel:g.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),g.text]})},v)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:r,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:s,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},S3=He.forwardRef(({className:n,logoLink:r="https://www.oslo.kommune.no/",serviceName:s,fixed:u=!0,scrollToHide:f=!0,user:g,userMenu:v,representing:S,userOptions:x,userMenuFooter:_,canChangeRepresentation:N=!0,showMenuButton:$=!1,showLogOutButton:R=!1,openMenu:B,logOut:M,changeRepresentation:V,children:H,...ge},K)=>{const Y=He.useMemo(()=>typeof(g==null?void 0:g.lastLoggedIn)=="string"?g.lastLoggedIn:g!=null&&g.lastLoggedIn?new Date(g.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[g]),[te,U]=He.useState(!1),[re,oe]=He.useState(0),[Te,ye]=He.useState(!1),We=He.useRef(null);He.useEffect(()=>(document&&(document.addEventListener("mouseup",Ve),window.addEventListener("scroll",Fe)),()=>{document&&(document.removeEventListener("mouseup",Ve),window.removeEventListener("scroll",Fe))}));const rt=()=>{ye(!Te)},Ve=Pe=>{We.current&&!We.current.contains(Pe.target)&&ye(!1)},Fe=()=>{if(f){const Pe=window.pageYOffset||document.documentElement.scrollTop;if(Pe<0||Math.abs(Pe-re)<60)return;U(Pe>re),oe(Pe)}};return O.jsxs("header",{...ge,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:os(n,"pkt-header",{"pkt-header--fixed":u,"pkt-header--scroll-to-hide":f,"pkt-header--hidden":te}),ref:K,children:[O.jsxs("div",{className:"pkt-header__logo",children:[typeof r=="string"?O.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:r,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.22/logos/"})}):O.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:r,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.22/logos/"})}),O.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:s})]}),O.jsx("nav",{className:"pkt-header__actions",children:O.jsxs("ul",{className:"pkt-header__actions-row",children:[$&&O.jsx("li",{children:O.jsx(Vc,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:B,children:"Meny"})}),(g||S)&&O.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Te&&!te?"pkt-header--open-dropdown":""}`,ref:We,children:[O.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":Te,onClick:rt,children:[O.jsx(On,{name:"user",className:"pkt-btn__icon"}),O.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(S==null?void 0:S.name)||(g==null?void 0:g.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(S==null?void 0:S.shortname)||(g==null?void 0:g.shortname)}),O.jsx(On,{name:"chevron-thin-down",className:"pkt-btn--closed"}),O.jsx(On,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),O.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[g&&O.jsxs("li",{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:g.name}),g.lastLoggedIn&&O.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",O.jsx("time",{children:Y})]})]}),v&&O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:v.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsxs("a",{href:Pe.target,className:"pkt-link",children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]})},`userMenu-${Ze}`))})}),(S||N)&&O.jsxs("li",{children:[S&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:S.name}),S.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",S.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:N&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:V,children:[O.jsx(On,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:(x||!R)&&O.jsxs(O.Fragment,{children:[x==null?void 0:x.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsxs("a",{href:Pe.target,className:"pkt-link",children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]})},`userOptions-${Ze}`)),!R&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:M,children:[O.jsx(On,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),_&&O.jsx("li",{className:"footer",children:O.jsx("ul",{className:"pkt-list-horizontal bordered",children:_.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsx("a",{href:Pe.target,className:"pkt-link",children:Pe.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:Pe.title})},`userMenuFooter-${Ze}`))})})]})]}),H&&O.jsx("li",{children:H}),R&&O.jsx("li",{children:O.jsx(Vc,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:M,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),fC=He.forwardRef(({label:n,id:r,children:s,...u},f)=>O.jsxs("div",{className:"pkt-form-group",children:[O.jsx("label",{htmlFor:r,className:"pkt-form-label",children:n}),O.jsx("input",{className:"pkt-form-input",id:r,...u,ref:f}),s]}));fC.displayName="PktInput";const C3=qi({tagName:"pkt-input-wrapper",elementClass:Pr,react:He,displayName:"PktInputWrapper",events:{onToggleHelpText:"toggleHelpText"}}),hC=He.forwardRef(({children:n,...r},s)=>O.jsx(C3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})})),x3=qi({tagName:"pkt-link",elementClass:Uc,react:He,displayName:"PktLink",events:{onClick:"click"}}),mC=He.forwardRef(({children:n,...r},s)=>O.jsx(x3,{...r,ref:s,children:O.jsx("span",{className:"pkt-contents",children:n})}));mC.displayName="PktLink";const E3=qi({tagName:"pkt-linkcard",elementClass:Fu,react:He,displayName:"PktLinkCard",events:{}}),gC=He.forwardRef(({children:n,...r},s)=>O.jsx(E3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));gC.displayName="PktLinkCard";const vC=He.forwardRef(({className:n,message:r,size:s="medium",inline:u=!1,isLoading:f=!0,variant:g="rainbow",delay:v=0,children:S,...x},_)=>{const N=`pkt-loader pkt-loader--${s}`,[$,R]=He.useState(!(v>0));v>0&&setTimeout(()=>{R(!0)},v);const B=M=>M==="shapes"?"loader":M==="blue"?"spinner-blue":"spinner";return O.jsx("div",{role:"status","aria-live":"polite","aria-busy":f,className:`pkt-loader--${u?"inline":"box"} ${n||""}`,children:f?O.jsx(O.Fragment,{children:$?O.jsxs("div",{className:N,"data-testid":"pkt-loader",ref:_,...x,children:[O.jsx(On,{name:B(g),path:"https://punkt-cdn.oslo.kommune.no/12.22/animations/",className:`pkt-loader__svg pkt-loader__${g}`}),r&&O.jsx("p",{children:r})]}):null}):S})});vC.displayName="PktLoader";const _3=qi({tagName:"pkt-messagebox",elementClass:Hc,react:He,displayName:"PktMessagebox",events:{onClose:"close"}}),yC=He.forwardRef(({children:n,...r},s)=>O.jsx(_3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));yC.displayName="PktMessagebox";const T3=qi({tagName:"pkt-modal",elementClass:xl,react:He,displayName:"PktModal",events:{}}),bC=He.forwardRef(({children:n,...r},s)=>O.jsx(T3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));bC.displayName="PktModal";/*!
|
|
1025
|
+
*/(function(n){(function(){var r={}.hasOwnProperty;function s(){for(var g="",v=0;v<arguments.length;v++){var S=arguments[v];S&&(g=f(g,u(S)))}return g}function u(g){if(typeof g=="string"||typeof g=="number")return g;if(typeof g!="object")return"";if(Array.isArray(g))return s.apply(null,g);if(g.toString!==Object.prototype.toString&&!g.toString.toString().includes("[native code]"))return g.toString();var v="";for(var S in g)r.call(g,S)&&g[S]&&(v=f(v,S));return v}function f(g,v){return v?g?g+" "+v:g+v:g}n.exports?(s.default=s,n.exports=s):window.classNames=s})()})(lC);var g3=lC.exports;const os=py(g3),v3=He.forwardRef(({title:n,className:r,children:s,toggleProps:u,defaultOpen:f=!1,id:g},v)=>{const[S,x]=He.useState(f),_=u?u.isOpen:S,N=B=>B??void 0,$=(B,M)=>{B.preventDefault(),u!==void 0&&u.onToggleClick(B,M),x(!_)},R=os(r,"pkt-accordion-item");return O.jsxs("details",{className:R,ref:v,id:g,open:N(u?u.isOpen:S),children:[O.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${g}`,onClick:B=>$(B,g),children:[n,O.jsx(On,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),O.jsx("div",{id:`pkt-accordion-item-content-${g}`,role:"region",className:"pkt-accordion-item__content",children:s})]})}),y3=qi({tagName:"pkt-alert",elementClass:Us,react:He,displayName:"PktAlert",events:{onClose:"close"}}),uC=He.forwardRef(({children:n,...r},s)=>O.jsx(y3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));uC.displayName="PktAlert";const cC=He.forwardRef(({href:n,text:r,onClick:s,className:u,...f},g)=>{const v=[u,"pkt-back-link"].filter(Boolean).join(" "),S=x=>{s&&s(x)};return O.jsx("nav",{ref:g,className:v,"aria-label":"Gå tilbake et steg",children:O.jsxs("a",{href:n||"/",className:"pkt-link pkt-link--icon-left",onClick:S,...f,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),O.jsx("span",{className:"pkt-back-link__text",children:r||"Forsiden"})]})})});cC.displayName="PktBackLink";const b3=He.forwardRef(({breadcrumbs:n,navigationType:r,className:s,...u},f)=>{const g=n.slice(0,4),v=g[g.length-2],S=[s,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:f,"aria-label":"brødsmulemeny",className:S,children:[O.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:g.map((x,_)=>O.jsx("li",{className:"pkt-breadcrumbs__item",children:_===g.length-1?O.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})}):r==="router"?O.jsxs(up.Link,{to:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...u,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]}):O.jsxs("a",{href:x.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...u,children:[O.jsx(On,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:x.text})]})},`breadcrumb-${_}`))}),r==="router"?O.jsxs(up.Link,{to:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...u,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]}):O.jsxs("a",{href:v.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...u,children:[O.jsx(On,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),O.jsx("span",{className:"pkt-breadcrumbs__text",children:v.text})]})]})}),Vc=He.forwardRef(({children:n,className:r,iconName:s="user",secondIconName:u="user",size:f="medium",skin:g="primary",type:v="button",variant:S="label-only",state:x,color:_,isLoading:N=!1,...$},R)=>{const B=[r,"pkt-btn",f&&`pkt-btn--${f}`,g&&`pkt-btn--${g}`,S&&`pkt-btn--${S}`,_&&`pkt-btn--${_}`,N&&"pkt-btn--active",x&&`pkt-btn--${x}`].filter(Boolean).join(" ");return O.jsxs("button",{...$,className:B,type:v,ref:R,children:[N&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.23/animations/"}),S!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:s}),O.jsx("span",{className:"pkt-btn__text",children:n}),S==="icons-right-and-left"&&O.jsx(On,{className:"pkt-btn__icon",name:u})]})});Vc.displayName="PktButton";const k3=qi({tagName:"pkt-card",elementClass:Au,react:He,displayName:"PktCard",events:{}}),dC=He.forwardRef(({children:n,...r},s)=>O.jsx(k3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));dC.displayName="PktCard";const Ty=He.forwardRef(({id:n,hasTile:r=!1,disabled:s=!1,label:u,labelPosition:f="right",hideLabel:g=!1,checkHelptext:v,hasError:S=!1,isSwitch:x=!1,className:_,...N},$)=>{const R=[_,"pkt-input-check"].filter(Boolean).join(" ");return O.jsx("div",{className:R,children:O.jsxs("div",{className:`pkt-input-check__input ${r?"pkt-input-check__input--tile":""} ${s&&r?"pkt-input-check__input--tile-disabled":""}`,children:[u&&f==="left"&&O.jsxs("label",{className:`pkt-input-check__input-label ${g?"pkt-sr-only":""}`,htmlFor:n,children:[u,v&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:v})]}),O.jsx("input",{ref:$,className:`pkt-input-check__input-checkbox ${S?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:x?"switch":"checkbox",id:n,disabled:s,...N}),u&&f==="right"&&O.jsxs("label",{className:`pkt-input-check__input-label ${g?"pkt-sr-only":""}`,htmlFor:n,children:[u,v&&O.jsx("div",{className:"pkt-input-check__input-helptext",children:v})]})]})})});Ty.displayName="PktCheckbox";const pC=qi({tagName:"pkt-datepicker",elementClass:Mr,react:He,displayName:"PktDatepicker",events:{onChange:"change",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),w3=({columnOne:n,columnTwo:r,socialLinks:s,className:u,personvernOgInfoLink:f="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:g="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var S,x;const v=[u,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:v,"data-mode":"dark",children:O.jsxs("div",{className:"pkt-footer__container",children:[O.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:n.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&O.jsx("li",{className:"pkt-footer__text",children:n.text}),(S=n.links)==null?void 0:S.map((_,N)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${_.external?"pkt-link--external":""}`,href:_.href,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),_.text]})},`links-${N}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:r.title}),O.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&O.jsx("li",{className:"pkt-footer__text",children:r.text}),(x=r.links)==null?void 0:x.map((_,N)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${_.external?"pkt-link--external":""}`,href:_.href,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),_.text]})},`links-${N}`))]})]}),O.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[O.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),O.jsxs("ul",{className:"pkt-footer__list",children:[O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:f,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:g,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),s&&O.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[O.jsx("div",{className:"pkt-footer__social-languages",children:s.filter(_=>_.language).map((_,N)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:_.href,"aria-label":`til ${_.language} versjon av nettsiden`,target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:_.language})},`sociallinks-language-${N}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:s.filter(_=>_.iconName).map((_,N)=>O.jsx(He.Fragment,{children:O.jsx("a",{href:_.href,"aria-label":`til ${_.iconName}`,className:"pkt-footer__social-icon-link",target:_.openInNewTab?"_blank":"_self",rel:_.openInNewTab?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:_.iconName})})},`sociallinks-${N}`))})]})]})})},D3=({links:n=[],personvernOgInfoLink:r="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:s="https://www.oslo.kommune.no/tilgjengelighet/",className:u})=>{const f=[u,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:f,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[n.map((g,v)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${g.external?" pkt-link--external":""}`,href:g.href,target:g.openInNewTab?"_blank":"_self",rel:g.openInNewTab?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),g.text]})},v)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:r,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:s,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},S3=He.forwardRef(({className:n,logoLink:r="https://www.oslo.kommune.no/",serviceName:s,fixed:u=!0,scrollToHide:f=!0,user:g,userMenu:v,representing:S,userOptions:x,userMenuFooter:_,canChangeRepresentation:N=!0,showMenuButton:$=!1,showLogOutButton:R=!1,openMenu:B,logOut:M,changeRepresentation:V,children:H,...ge},K)=>{const Y=He.useMemo(()=>typeof(g==null?void 0:g.lastLoggedIn)=="string"?g.lastLoggedIn:g!=null&&g.lastLoggedIn?new Date(g.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[g]),[te,U]=He.useState(!1),[re,oe]=He.useState(0),[Te,ye]=He.useState(!1),We=He.useRef(null);He.useEffect(()=>(document&&(document.addEventListener("mouseup",Ve),window.addEventListener("scroll",Fe)),()=>{document&&(document.removeEventListener("mouseup",Ve),window.removeEventListener("scroll",Fe))}));const rt=()=>{ye(!Te)},Ve=Pe=>{We.current&&!We.current.contains(Pe.target)&&ye(!1)},Fe=()=>{if(f){const Pe=window.pageYOffset||document.documentElement.scrollTop;if(Pe<0||Math.abs(Pe-re)<60)return;U(Pe>re),oe(Pe)}};return O.jsxs("header",{...ge,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:os(n,"pkt-header",{"pkt-header--fixed":u,"pkt-header--scroll-to-hide":f,"pkt-header--hidden":te}),ref:K,children:[O.jsxs("div",{className:"pkt-header__logo",children:[typeof r=="string"?O.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:r,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.23/logos/"})}):O.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:r,children:O.jsx(On,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.23/logos/"})}),O.jsx("span",{className:"pkt-header__logo-service",translate:"no",children:s})]}),O.jsx("nav",{className:"pkt-header__actions",children:O.jsxs("ul",{className:"pkt-header__actions-row",children:[$&&O.jsx("li",{children:O.jsx(Vc,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:B,children:"Meny"})}),(g||S)&&O.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${Te&&!te?"pkt-header--open-dropdown":""}`,ref:We,children:[O.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":Te,onClick:rt,children:[O.jsx(On,{name:"user",className:"pkt-btn__icon"}),O.jsx("span",{className:"pkt-header__user-fullname",translate:"no",children:(S==null?void 0:S.name)||(g==null?void 0:g.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(S==null?void 0:S.shortname)||(g==null?void 0:g.shortname)}),O.jsx(On,{name:"chevron-thin-down",className:"pkt-btn--closed"}),O.jsx(On,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),O.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[g&&O.jsxs("li",{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:g.name}),g.lastLoggedIn&&O.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",O.jsx("time",{children:Y})]})]}),v&&O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:v.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsxs("a",{href:Pe.target,className:"pkt-link",children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]})},`userMenu-${Ze}`))})}),(S||N)&&O.jsxs("li",{children:[S&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),O.jsx("div",{className:"pkt-user-menu__name",translate:"no",children:S.name}),S.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",S.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:N&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:V,children:[O.jsx(On,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),O.jsx("li",{children:O.jsx("ul",{className:"pkt-list",children:(x||!R)&&O.jsxs(O.Fragment,{children:[x==null?void 0:x.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsxs("a",{href:Pe.target,className:"pkt-link",children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:[Pe.iconName&&O.jsx(On,{name:Pe.iconName,className:"pkt-link__icon"}),Pe.title]})},`userOptions-${Ze}`)),!R&&O.jsx("li",{children:O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:M,children:[O.jsx(On,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),_&&O.jsx("li",{className:"footer",children:O.jsx("ul",{className:"pkt-list-horizontal bordered",children:_.map((Pe,Ze)=>O.jsx("li",{children:typeof Pe.target=="string"?O.jsx("a",{href:Pe.target,className:"pkt-link",children:Pe.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Pe.target,children:Pe.title})},`userMenuFooter-${Ze}`))})})]})]}),H&&O.jsx("li",{children:H}),R&&O.jsx("li",{children:O.jsx(Vc,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:M,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),fC=He.forwardRef(({label:n,id:r,children:s,...u},f)=>O.jsxs("div",{className:"pkt-form-group",children:[O.jsx("label",{htmlFor:r,className:"pkt-form-label",children:n}),O.jsx("input",{className:"pkt-form-input",id:r,...u,ref:f}),s]}));fC.displayName="PktInput";const C3=qi({tagName:"pkt-input-wrapper",elementClass:Pr,react:He,displayName:"PktInputWrapper",events:{onToggleHelpText:"toggleHelpText"}}),hC=He.forwardRef(({children:n,...r},s)=>O.jsx(C3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})})),x3=qi({tagName:"pkt-link",elementClass:Uc,react:He,displayName:"PktLink",events:{onClick:"click"}}),mC=He.forwardRef(({children:n,...r},s)=>O.jsx(x3,{...r,ref:s,children:O.jsx("span",{className:"pkt-contents",children:n})}));mC.displayName="PktLink";const E3=qi({tagName:"pkt-linkcard",elementClass:Fu,react:He,displayName:"PktLinkCard",events:{}}),gC=He.forwardRef(({children:n,...r},s)=>O.jsx(E3,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));gC.displayName="PktLinkCard";const vC=He.forwardRef(({className:n,message:r,size:s="medium",inline:u=!1,isLoading:f=!0,variant:g="rainbow",delay:v=0,children:S,...x},_)=>{const N=`pkt-loader pkt-loader--${s}`,[$,R]=He.useState(!(v>0));v>0&&setTimeout(()=>{R(!0)},v);const B=M=>M==="shapes"?"loader":M==="blue"?"spinner-blue":"spinner";return O.jsx("div",{role:"status","aria-live":"polite","aria-busy":f,className:`pkt-loader--${u?"inline":"box"} ${n||""}`,children:f?O.jsx(O.Fragment,{children:$?O.jsxs("div",{className:N,"data-testid":"pkt-loader",ref:_,...x,children:[O.jsx(On,{name:B(g),path:"https://punkt-cdn.oslo.kommune.no/12.23/animations/",className:`pkt-loader__svg pkt-loader__${g}`}),r&&O.jsx("p",{children:r})]}):null}):S})});vC.displayName="PktLoader";const _3=qi({tagName:"pkt-messagebox",elementClass:Hc,react:He,displayName:"PktMessagebox",events:{onClose:"close"}}),yC=He.forwardRef(({children:n,...r},s)=>O.jsx(_3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));yC.displayName="PktMessagebox";const T3=qi({tagName:"pkt-modal",elementClass:xl,react:He,displayName:"PktModal",events:{}}),bC=He.forwardRef(({children:n,...r},s)=>O.jsx(T3,{...r,ref:s,children:O.jsx("div",{className:"pkt-contents",children:n})}));bC.displayName="PktModal";/*!
|
|
1026
1026
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
1027
1027
|
*
|
|
1028
1028
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
@@ -1130,4 +1130,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1130
1130
|
*/var s=function(u){var f=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,g=0,v={},S={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function K(Y){return Y instanceof x?new x(Y.type,K(Y.content),Y.alias):Array.isArray(Y)?Y.map(K):Y.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(K){return Object.prototype.toString.call(K).slice(8,-1)},objId:function(K){return K.__id||Object.defineProperty(K,"__id",{value:++g}),K.__id},clone:function K(Y,te){te=te||{};var U,re;switch(S.util.type(Y)){case"Object":if(re=S.util.objId(Y),te[re])return te[re];U={},te[re]=U;for(var oe in Y)Y.hasOwnProperty(oe)&&(U[oe]=K(Y[oe],te));return U;case"Array":return re=S.util.objId(Y),te[re]?te[re]:(U=[],te[re]=U,Y.forEach(function(Te,ye){U[ye]=K(Te,te)}),U);default:return Y}},getLanguage:function(K){for(;K;){var Y=f.exec(K.className);if(Y)return Y[1].toLowerCase();K=K.parentElement}return"none"},setLanguage:function(K,Y){K.className=K.className.replace(RegExp(f,"gi"),""),K.classList.add("language-"+Y)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(U){var K=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(U.stack)||[])[1];if(K){var Y=document.getElementsByTagName("script");for(var te in Y)if(Y[te].src==K)return Y[te]}return null}},isActive:function(K,Y,te){for(var U="no-"+Y;K;){var re=K.classList;if(re.contains(Y))return!0;if(re.contains(U))return!1;K=K.parentElement}return!!te}},languages:{plain:v,plaintext:v,text:v,txt:v,extend:function(K,Y){var te=S.util.clone(S.languages[K]);for(var U in Y)te[U]=Y[U];return te},insertBefore:function(K,Y,te,U){U=U||S.languages;var re=U[K],oe={};for(var Te in re)if(re.hasOwnProperty(Te)){if(Te==Y)for(var ye in te)te.hasOwnProperty(ye)&&(oe[ye]=te[ye]);te.hasOwnProperty(Te)||(oe[Te]=re[Te])}var We=U[K];return U[K]=oe,S.languages.DFS(S.languages,function(rt,Ve){Ve===We&&rt!=K&&(this[rt]=oe)}),oe},DFS:function K(Y,te,U,re){re=re||{};var oe=S.util.objId;for(var Te in Y)if(Y.hasOwnProperty(Te)){te.call(Y,Te,Y[Te],U||Te);var ye=Y[Te],We=S.util.type(ye);We==="Object"&&!re[oe(ye)]?(re[oe(ye)]=!0,K(ye,te,null,re)):We==="Array"&&!re[oe(ye)]&&(re[oe(ye)]=!0,K(ye,te,Te,re))}}},plugins:{},highlightAll:function(K,Y){S.highlightAllUnder(document,K,Y)},highlightAllUnder:function(K,Y,te){var U={callback:te,container:K,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};S.hooks.run("before-highlightall",U),U.elements=Array.prototype.slice.apply(U.container.querySelectorAll(U.selector)),S.hooks.run("before-all-elements-highlight",U);for(var re=0,oe;oe=U.elements[re++];)S.highlightElement(oe,Y===!0,U.callback)},highlightElement:function(K,Y,te){var U=S.util.getLanguage(K),re=S.languages[U];S.util.setLanguage(K,U);var oe=K.parentElement;oe&&oe.nodeName.toLowerCase()==="pre"&&S.util.setLanguage(oe,U);var Te=K.textContent,ye={element:K,language:U,grammar:re,code:Te};function We(Ve){ye.highlightedCode=Ve,S.hooks.run("before-insert",ye),ye.element.innerHTML=ye.highlightedCode,S.hooks.run("after-highlight",ye),S.hooks.run("complete",ye),te&&te.call(ye.element)}if(S.hooks.run("before-sanity-check",ye),oe=ye.element.parentElement,oe&&oe.nodeName.toLowerCase()==="pre"&&!oe.hasAttribute("tabindex")&&oe.setAttribute("tabindex","0"),!ye.code){S.hooks.run("complete",ye),te&&te.call(ye.element);return}if(S.hooks.run("before-highlight",ye),!ye.grammar){We(S.util.encode(ye.code));return}if(Y&&u.Worker){var rt=new Worker(S.filename);rt.onmessage=function(Ve){We(Ve.data)},rt.postMessage(JSON.stringify({language:ye.language,code:ye.code,immediateClose:!0}))}else We(S.highlight(ye.code,ye.grammar,ye.language))},highlight:function(K,Y,te){var U={code:K,grammar:Y,language:te};if(S.hooks.run("before-tokenize",U),!U.grammar)throw new Error('The language "'+U.language+'" has no grammar.');return U.tokens=S.tokenize(U.code,U.grammar),S.hooks.run("after-tokenize",U),x.stringify(S.util.encode(U.tokens),U.language)},tokenize:function(K,Y){var te=Y.rest;if(te){for(var U in te)Y[U]=te[U];delete Y.rest}var re=new $;return R(re,re.head,K),N(K,re,Y,re.head,0),M(re)},hooks:{all:{},add:function(K,Y){var te=S.hooks.all;te[K]=te[K]||[],te[K].push(Y)},run:function(K,Y){var te=S.hooks.all[K];if(!(!te||!te.length))for(var U=0,re;re=te[U++];)re(Y)}},Token:x};u.Prism=S;function x(K,Y,te,U){this.type=K,this.content=Y,this.alias=te,this.length=(U||"").length|0}x.stringify=function K(Y,te){if(typeof Y=="string")return Y;if(Array.isArray(Y)){var U="";return Y.forEach(function(We){U+=K(We,te)}),U}var re={type:Y.type,content:K(Y.content,te),tag:"span",classes:["token",Y.type],attributes:{},language:te},oe=Y.alias;oe&&(Array.isArray(oe)?Array.prototype.push.apply(re.classes,oe):re.classes.push(oe)),S.hooks.run("wrap",re);var Te="";for(var ye in re.attributes)Te+=" "+ye+'="'+(re.attributes[ye]||"").replace(/"/g,""")+'"';return"<"+re.tag+' class="'+re.classes.join(" ")+'"'+Te+">"+re.content+"</"+re.tag+">"};function _(K,Y,te,U){K.lastIndex=Y;var re=K.exec(te);if(re&&U&&re[1]){var oe=re[1].length;re.index+=oe,re[0]=re[0].slice(oe)}return re}function N(K,Y,te,U,re,oe){for(var Te in te)if(!(!te.hasOwnProperty(Te)||!te[Te])){var ye=te[Te];ye=Array.isArray(ye)?ye:[ye];for(var We=0;We<ye.length;++We){if(oe&&oe.cause==Te+","+We)return;var rt=ye[We],Ve=rt.inside,Fe=!!rt.lookbehind,Pe=!!rt.greedy,Ze=rt.alias;if(Pe&&!rt.pattern.global){var $e=rt.pattern.toString().match(/[imsuy]*$/)[0];rt.pattern=RegExp(rt.pattern.source,$e+"g")}for(var Be=rt.pattern||rt,ve=U.next,Re=re;ve!==Y.tail&&!(oe&&Re>=oe.reach);Re+=ve.value.length,ve=ve.next){var xe=ve.value;if(Y.length>K.length)return;if(!(xe instanceof x)){var G=1,ce;if(Pe){if(ce=_(Be,Re,K,Fe),!ce||ce.index>=K.length)break;var yt=ce.index,vt=ce.index+ce[0].length,ut=Re;for(ut+=ve.value.length;yt>=ut;)ve=ve.next,ut+=ve.value.length;if(ut-=ve.value.length,Re=ut,ve.value instanceof x)continue;for(var ct=ve;ct!==Y.tail&&(ut<vt||typeof ct.value=="string");ct=ct.next)G++,ut+=ct.value.length;G--,xe=K.slice(Re,ut),ce.index-=Re}else if(ce=_(Be,0,xe,Fe),!ce)continue;var yt=ce.index,it=ce[0],Rt=xe.slice(0,yt),Lt=xe.slice(yt+it.length),sn=Re+xe.length;oe&&sn>oe.reach&&(oe.reach=sn);var Fn=ve.prev;Rt&&(Fn=R(Y,Fn,Rt),Re+=Rt.length),B(Y,Fn,G);var vr=new x(Te,Ve?S.tokenize(it,Ve):it,Ze,it);if(ve=R(Y,Fn,vr),Lt&&R(Y,ve,Lt),G>1){var nn={cause:Te+","+We,reach:sn};N(K,Y,te,ve.prev,Re,nn),oe&&nn.reach>oe.reach&&(oe.reach=nn.reach)}}}}}}function $(){var K={value:null,prev:null,next:null},Y={value:null,prev:K,next:null};K.next=Y,this.head=K,this.tail=Y,this.length=0}function R(K,Y,te){var U=Y.next,re={value:te,prev:Y,next:U};return Y.next=re,U.prev=re,K.length++,re}function B(K,Y,te){for(var U=Y.next,re=0;re<te&&U!==K.tail;re++)U=U.next;Y.next=U,U.prev=Y,K.length-=re}function M(K){for(var Y=[],te=K.head.next;te!==K.tail;)Y.push(te.value),te=te.next;return Y}if(!u.document)return u.addEventListener&&(S.disableWorkerMessageHandler||u.addEventListener("message",function(K){var Y=JSON.parse(K.data),te=Y.language,U=Y.code,re=Y.immediateClose;u.postMessage(S.highlight(U,S.languages[te],te)),re&&u.close()},!1)),S;var V=S.util.currentScript();V&&(S.filename=V.src,V.hasAttribute("data-manual")&&(S.manual=!0));function H(){S.manual||S.highlightAll()}if(!S.manual){var ge=document.readyState;ge==="loading"||ge==="interactive"&&V&&V.defer?document.addEventListener("DOMContentLoaded",H):window.requestAnimationFrame?window.requestAnimationFrame(H):window.setTimeout(H,16)}return S}(r);n.exports&&(n.exports=s),typeof jc<"u"&&(jc.Prism=s)})(YE);var n4=YE.exports,r4=E1;E1.displayName="markup",E1.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function E1(n){n.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]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.value.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(s,u){var f={};f["language-"+u]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[u]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var g={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};g["language-"+u]={pattern:/[\s\S]+/,inside:n.languages[u]};var v={};v[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:g},n.languages.insertBefore("markup","cdata",v)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,s){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\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:[s,"language-"+s],inside:n.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml}var a4=_1;_1.displayName="css",_1.aliases=[];function _1(n){(function(r){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.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\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,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:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var u=r.languages.markup;u&&(u.tag.addInlined("style","css"),u.tag.addAttribute("style","css"))})(n)}var i4=T1;T1.displayName="clike",T1.aliases=[];function T1(n){n.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 o4=A1;A1.displayName="javascript",A1.aliases=["js"];function A1(n){n.languages.javascript=n.languages.extend("clike",{"class-name":[n.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}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.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:n.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:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.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:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.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:n.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"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.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")),n.languages.js=n.languages.javascript}var Eg=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof jc=="object"?jc:{},s4=S4();Eg.Prism={manual:!0,disableWorkerMessageHandler:!0};var l4=wj,u4=jj,GE=n4,c4=r4,d4=a4,p4=i4,f4=o4;s4();var F1={}.hasOwnProperty;function QE(){}QE.prototype=GE;var aa=new QE,h4=aa;aa.highlight=g4,aa.register=_g,aa.alias=m4,aa.registered=v4,aa.listLanguages=y4,_g(c4),_g(d4),_g(p4),_g(f4),aa.util.encode=w4,aa.Token.stringify=b4;function _g(n){if(typeof n!="function"||!n.displayName)throw new Error("Expected `function` for `grammar`, got `"+n+"`");aa.languages[n.displayName]===void 0&&n(aa)}function m4(n,r){var s=aa.languages,u=n,f,g,v,S;r&&(u={},u[n]=r);for(f in u)for(g=u[f],g=typeof g=="string"?[g]:g,v=g.length,S=-1;++S<v;)s[g[S]]=s[f]}function g4(n,r){var s=GE.highlight,u;if(typeof n!="string")throw new Error("Expected `string` for `value`, got `"+n+"`");if(aa.util.type(r)==="Object")u=r,r=null;else{if(typeof r!="string")throw new Error("Expected `string` for `name`, got `"+r+"`");if(F1.call(aa.languages,r))u=aa.languages[r];else throw new Error("Unknown language: `"+r+"` is not registered")}return s.call(this,n,u,r)}function v4(n){if(typeof n!="string")throw new Error("Expected `string` for `language`, got `"+n+"`");return F1.call(aa.languages,n)}function y4(){var n=aa.languages,r=[],s;for(s in n)F1.call(n,s)&&typeof n[s]=="object"&&r.push(s);return r}function b4(n,r,s){var u;return typeof n=="string"?{type:"text",value:n}:aa.util.type(n)==="Array"?k4(n,r):(u={type:n.type,content:aa.Token.stringify(n.content,r,s),tag:"span",classes:["token",n.type],attributes:{},language:r,parent:s},n.alias&&(u.classes=u.classes.concat(n.alias)),aa.hooks.run("wrap",u),l4(u.tag+"."+u.classes.join("."),D4(u.attributes),u.content))}function k4(n,r){for(var s=[],u=n.length,f=-1,g;++f<u;)g=n[f],g!==""&&g!==null&&g!==void 0&&s.push(g);for(f=-1,u=s.length;++f<u;)g=s[f],s[f]=aa.Token.stringify(g,r,s);return s}function w4(n){return n}function D4(n){var r;for(r in n)n[r]=u4(n[r]);return n}function S4(){var n="Prism"in Eg,r=n?Eg.Prism:void 0;return s;function s(){n?Eg.Prism=r:delete Eg.Prism,n=void 0,r=void 0}}const N1=py(h4);var Tg=rI(N1,{});Tg.registerLanguage=function(n,r){return N1.register(r)},Tg.alias=function(n,r){return N1.alias(n,r)};const KE={'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 C4=P1;P1.displayName="jsx",P1.aliases=[];function P1(n){(function(r){var s=r.util.clone(r.languages.javascript),u=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,f=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,g=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function v(_,N){return _=_.replace(/<S>/g,function(){return u}).replace(/<BRACES>/g,function(){return f}).replace(/<SPREAD>/g,function(){return g}),RegExp(_,N)}g=v(g).source,r.languages.jsx=r.languages.extend("markup",s),r.languages.jsx.tag.pattern=v(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),r.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,r.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,r.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,r.languages.jsx.tag.inside.comment=s.comment,r.languages.insertBefore("inside","attr-name",{spread:{pattern:v(/<SPREAD>/.source),inside:r.languages.jsx}},r.languages.jsx.tag),r.languages.insertBefore("inside","special-attr",{script:{pattern:v(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:r.languages.jsx}}},r.languages.jsx.tag);var S=function(_){return _?typeof _=="string"?_:typeof _.content=="string"?_.content:_.content.map(S).join(""):""},x=function(_){for(var N=[],$=0;$<_.length;$++){var R=_[$],B=!1;if(typeof R!="string"&&(R.type==="tag"&&R.content[0]&&R.content[0].type==="tag"?R.content[0].content[0].content==="</"?N.length>0&&N[N.length-1].tagName===S(R.content[0].content[1])&&N.pop():R.content[R.content.length-1].content==="/>"||N.push({tagName:S(R.content[0].content[1]),openedBraces:0}):N.length>0&&R.type==="punctuation"&&R.content==="{"?N[N.length-1].openedBraces++:N.length>0&&N[N.length-1].openedBraces>0&&R.type==="punctuation"&&R.content==="}"?N[N.length-1].openedBraces--:B=!0),(B||typeof R=="string")&&N.length>0&&N[N.length-1].openedBraces===0){var M=S(R);$<_.length-1&&(typeof _[$+1]=="string"||_[$+1].type==="plain-text")&&(M+=S(_[$+1]),_.splice($+1,1)),$>0&&(typeof _[$-1]=="string"||_[$-1].type==="plain-text")&&(M=S(_[$-1])+M,_.splice($-1,1),$--),_[$]=new r.Token("plain-text",M,null,M)}R.content&&typeof R.content!="string"&&x(R.content)}};r.hooks.add("after-tokenize",function(_){_.language!=="jsx"&&_.language!=="tsx"||x(_.tokens)})})(n)}const x4=py(C4),E4=qi({tagName:"pkt-tag",elementClass:qs,react:He,displayName:"PktTag",events:{onClose:"close"}}),yh=He.forwardRef(({children:n,...r},s)=>O.jsx(E4,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));yh.displayName="PktTag";const ZE=He.forwardRef(({arrowNav:n=!0,tabs:r,onTabSelected:s},u)=>{const f=He.useRef([]);He.useEffect(()=>{f.current=f.current.slice(0,r.length)},[r]);const g=(S,x)=>{x.action&&x.action(S),s&&s(S)},v=(S,x)=>{var _,N;n&&(x.code==="ArrowLeft"&&S!==0&&((_=f.current[S-1])==null||_.focus()),x.code==="ArrowRight"&&S<r.length-1&&((N=f.current[S+1])==null||N.focus()),(x.code==="ArrowDown"||x.code==="Space")&&g(S,r[S]))};return O.jsx("div",{className:"pkt-tabs",ref:u,children:O.jsx("div",{className:"pkt-tabs__list",role:n?"tablist":"navigation",children:r.map((S,x)=>O.jsx(He.Fragment,{children:S.href?O.jsxs("a",{"aria-selected":!!S.active,role:n?"tab":void 0,href:S.href,"aria-controls":S.controls,className:`pkt-tabs__link ${S.active?"active":""}`,onKeyUp:_=>v(x,_),onClick:()=>g(x,S),tabIndex:S.active||!n?void 0:-1,ref:_=>{f.current[x]=_},children:[S.icon&&O.jsx(On,{name:S.icon,className:"pkt-icon--small"}),S.text,S.tag&&O.jsx(yh,{skin:S.tag.skin,size:"small",children:S.tag.text})]}):O.jsxs("button",{"aria-selected":!!S.active,role:n?"tab":void 0,type:"button","aria-controls":S.controls,className:`pkt-tabs__button pkt-link-button ${S.active?"active":""}`,onKeyUp:_=>v(x,_),onClick:()=>g(x,S),tabIndex:S.active||!n?void 0:-1,ref:_=>{f.current[x]=_},children:[S.icon&&O.jsx(On,{name:S.icon,className:"pkt-icon--small"}),S.text,S.tag&&O.jsx(yh,{skin:S.tag.skin,size:"small",children:S.tag.text})]},"b-"+x)},x))})})}),Xy=qi({tagName:"pkt-textinput",elementClass:is,react:He,displayName:"PktTextinput",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),Jy=({className:n,compact:r=!1,skin:s="basic",responsiveView:u=!0,children:f})=>O.jsx("table",{"data-testid":"pkt-table",className:os(n,"pkt-table",{"pkt-table--responsive":u,"pkt-table--compact":r,"pkt-table--basic":s==="basic","pkt-table--zebra-blue":s==="zebra-blue"}),role:"table",children:f}),eb=({className:n,children:r})=>O.jsx("thead",{className:os(n,"pkt-table__header",{}),role:"rowgroup",children:r}),tb=({children:n,className:r})=>O.jsx("tbody",{className:os(r,"pkt-table__body",{}),role:"rowgroup",children:n}),Rp=({className:n,children:r})=>O.jsx("tr",{className:os(n,"pkt-table__row",{}),role:"row",children:r}),Ws=({className:n,children:r})=>O.jsx("th",{className:os(n,"pkt-table__header-cell",{}),role:"columnheader",children:r}),zo=({children:n,className:r,dataLabel:s})=>O.jsx("td",{className:os(r,"pkt-table__data-cell",{}),"data-label":s,role:"cell","data-testid":"pkt-table__data-cell",children:n}),_4=({specs:n})=>{const r=u=>Array.isArray(u)?u.join(`
|
|
1131
1131
|
`):u,s=u=>typeof u=="boolean"?u?"true":"false":u;return O.jsxs(O.Fragment,{children:[O.jsx("h2",{children:"Egenskaper"}),O.jsxs(Jy,{compact:!0,children:[O.jsx(eb,{children:O.jsxs(Rp,{children:[O.jsx(Ws,{children:"Prop"}),O.jsx(Ws,{children:"Navn"}),O.jsx(Ws,{children:"Beskrivelse"}),O.jsx(Ws,{children:"Type"}),O.jsx(Ws,{children:"Standardverdi"})]})}),O.jsx(tb,{children:Object.entries(n.props||{}).map(([u,f])=>O.jsxs(Rp,{children:[O.jsx(zo,{dataLabel:"Prop",children:O.jsx("pre",{children:u})}),O.jsx(zo,{dataLabel:"Navn",children:!Array.isArray(f)&&f.name||u}),Array.isArray(f)?O.jsxs(O.Fragment,{children:[O.jsx(zo,{dataLabel:"Beskrivelse"}),O.jsx(zo,{dataLabel:"Type",children:O.jsx("pre",{children:f.join(`
|
|
1132
1132
|
`)})})]}):O.jsxs(O.Fragment,{children:[O.jsx(zo,{dataLabel:"Beskrivelse",children:O.jsx("span",{dangerouslySetInnerHTML:{__html:f.description||""}})}),O.jsx(zo,{dataLabel:"Type",children:O.jsx("pre",{children:f.type&&r(f.type)})}),O.jsx(zo,{dataLabel:"Standardverdi",children:O.jsx("pre",{children:s(f.default)})})]})]},u))})]}),n.events&&O.jsxs(O.Fragment,{children:[O.jsx("h2",{children:"Hendelser / handlinger"}),O.jsxs(Jy,{compact:!0,children:[O.jsx(eb,{children:O.jsxs(Rp,{children:[O.jsx(Ws,{children:"Event"}),O.jsx(Ws,{children:"Beskrivelse"}),O.jsx(Ws,{children:"Type"})]})}),O.jsx(tb,{children:Object.entries(n.events||{}).map(([u,f])=>O.jsxs(Rp,{children:[O.jsx(zo,{dataLabel:"Event",children:O.jsx("pre",{children:u})}),O.jsx(zo,{dataLabel:"Beskrivelse",children:O.jsx("span",{dangerouslySetInnerHTML:{__html:f.description||""}})}),O.jsx(zo,{dataLabel:"Type",children:f.type})]},u))})]})]}),n.slots&&O.jsxs(O.Fragment,{children:[O.jsx("h2",{children:"Innhold"}),O.jsxs(Jy,{compact:!0,children:[O.jsx(eb,{children:O.jsxs(Rp,{children:[O.jsx(Ws,{children:"Slot"}),O.jsx(Ws,{children:"Beskrivelse"})]})}),O.jsx(tb,{children:Object.entries(n.slots||{}).map(([u,f])=>O.jsxs(Rp,{children:[O.jsx(zo,{dataLabel:"Slot",children:O.jsx("pre",{children:u})}),O.jsx(zo,{dataLabel:"Beskrivelse",children:O.jsx("span",{dangerouslySetInnerHTML:{__html:f.description||""}})})]},u))})]})]})]})},$1=qi({tagName:"pkt-select",elementClass:ih,react:He,displayName:"PktSelect",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}}),T4=[{id:"24h",fn:"24h.svg",cat:"services"},{id:"active-person",fn:"active-person.svg",cat:"people-and-health"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"advice",fn:"advice.svg",cat:"ui"},{id:"alert-circle",fn:"alert-circle.svg",cat:"ui"},{id:"alert-error",fn:"alert-error.svg",cat:"ui"},{id:"alert-information",fn:"alert-information.svg",cat:"ui"},{id:"alert-success",fn:"alert-success.svg",cat:"ui"},{id:"alert-warning",fn:"alert-warning.svg",cat:"ui"},{id:"apple",fn:"apple.svg",cat:"ui"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow",fn:"arrow.svg",cat:"arrows"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"balloons",fn:"balloons.svg",cat:"ui"},{id:"books",fn:"books.svg",cat:"services"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"sign"},{id:"brain-heart",fn:"brain-heart.svg",cat:"people-and-health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"people-and-health"},{id:"briefcase",fn:"briefcase.svg",cat:"sign"},{id:"bullseye",fn:"bullseye.svg",cat:"ui"},{id:"bus",fn:"bus.svg",cat:"services"},{id:"cafe",fn:"cafe.svg",cat:"sign"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera",fn:"camera.svg",cat:"ui"},{id:"car",fn:"car.svg",cat:"sign"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"ui"},{id:"character-information",fn:"character-information.svg",cat:"ui"},{id:"care-room",fn:"care-room.svg",cat:"sign"},{id:"check-big",fn:"check-big.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:"arrows"},{id:"chevron-left",fn:"chevron-left.svg",cat:"arrows"},{id:"chevron-right",fn:"chevron-right.svg",cat:"arrows"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"arrows"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"arrows"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"arrows"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"arrows"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"arrows"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"ui"},{id:"code",fn:"code.svg",cat:"ui"},{id:"coffee",fn:"coffee.svg",cat:"sign"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"services"},{id:"computer",fn:"computer.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"services"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle-fill-large",fn:"cross-circle-fill-large.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"data",fn:"data.svg",cat:"ui"},{id:"defibrillators",fn:"defibrillators.svg",cat:"sign"},{id:"district",fn:"district.svg",cat:"ui"},{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:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"sign"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"people-and-health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"email",fn:"email.svg",cat:"ui"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"ui"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"ui"},{id:"exit",fn:"exit.svg",cat:"ui"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"ui"},{id:"feedback",fn:"feedback.svg",cat:"ui"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-emblem",fn:"fire-emblem.svg",cat:"services"},{id:"fire-safety",fn:"fire-safety.svg",cat:"people-and-health"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"game-console",fn:"game-console.svg",cat:"ui"},{id:"github",fn:"github.svg",cat:"social"},{id:"graph",fn:"graph.svg",cat:"ui"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"hands-globe",fn:"hands-globe.svg",cat:"people-and-health"},{id:"headset",fn:"headset.svg",cat:"ui"},{id:"heart-hand",fn:"heart-hand.svg",cat:"people-and-health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"services"},{id:"heart",fn:"heart.svg",cat:"ui"},{id:"holding-hands",fn:"holding-hands.svg",cat:"people-and-health"},{id:"home",fn:"home.svg",cat:"ui"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"services"},{id:"information",fn:"information.svg",cat:"ui"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"ui"},{id:"language",fn:"language.svg",cat:"ui"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"ui"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"people-and-health"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"ui"},{id:"location-pin",fn:"location-pin.svg",cat:"ui"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"ui"},{id:"menu",fn:"menu.svg",cat:"ui"},{id:"message",fn:"message.svg",cat:"ui"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"plusminus"},{id:"minus-circle",fn:"minus-circle.svg",cat:"plusminus"},{id:"minus-sign",fn:"minus-sign.svg",cat:"plusminus"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"ui"},{id:"music-notes",fn:"music-notes.svg",cat:"ui"},{id:"new-window-small",fn:"new-window-small.svg",cat:"ui"},{id:"new-window",fn:"new-window.svg",cat:"ui"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"ui"},{id:"organization",fn:"organization.svg",cat:"ui"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"ui"},{id:"palette",fn:"palette.svg",cat:"ui"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"services"},{id:"partner-workout",fn:"partner-workout.svg",cat:"people-and-health"},{id:"picture",fn:"picture.svg",cat:"ui"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"plusminus"},{id:"plus-circle",fn:"plus-circle.svg",cat:"plusminus"},{id:"plus-sign",fn:"plus-sign.svg",cat:"plusminus"},{id:"pride-heart",fn:"pride-heart.svg",cat:"people-and-health"},{id:"print",fn:"print.svg",cat:"ui"},{id:"privacy",fn:"privacy.svg",cat:"ui"},{id:"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:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"services"},{id:"restaurant",fn:"restaurant.svg",cat:"sign"},{id:"ruler",fn:"ruler.svg",cat:"ui"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"save",fn:"save.svg",cat:"ui"},{id:"scooter",fn:"scooter.svg",cat:"ui"},{id:"share-outline",fn:"share-outline.svg",cat:"ui"},{id:"share",fn:"share.svg",cat:"ui"},{id:"slack",fn:"slack.svg",cat:"social"},{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:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"ui"},{id:"sound-on",fn:"sound-on.svg",cat:"ui"},{id:"sparkles",fn:"sparkles.svg",cat:"ui"},{id:"svg",fn:"svg.svg",cat:"social"},{id:"swingset",fn:"swingset.svg",cat:"services"},{id:"table",fn:"table.svg",cat:"ui"},{id:"target",fn:"target.svg",cat:"ui"},{id:"tickets",fn:"tickets.svg",cat:"sign"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"people-and-health"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"people-and-health"},{id:"user",fn:"user.svg",cat:"ui"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"wardrobe",fn:"wardrobe.svg",cat:"sign"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"sign"},{id:"water-faucet",fn:"water-faucet.svg",cat:"services"},{id:"wheelchair",fn:"wheelchair.svg",cat:"sign"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"people-and-health"},{id:"wifi",fn:"wifi.svg",cat:"sign"},{id:"workplace",fn:"workplace.svg",cat:"social"},{id:"wrench",fn:"wrench.svg",cat:"ui"}],R1=({propKey:n,spec:r,props:s,handleChange:u})=>{const f={BOOLEAN:"boolean",ICON:"icon",ARRAY:"array",OBJECT:"object",DATE:"ISOdatestring",NUMBER:"number",STRING:"string"},g=(_,N)=>{u(n,{...s[n],[_]:N})},v=(_,N,$)=>{const R=[...s[n]];R[_]={...R[_],[N]:$},u(n,R)},S=()=>{const _=[...s[n],{}];u(n,_)},x=_=>{const N=s[n].filter(($,R)=>R!==_);u(n,N)};if(r.type===f.BOOLEAN)return O.jsx(hC,{label:r.name||n,forId:n,helptext:r.description||null,hasFieldset:!0,requiredTag:r.required,children:O.jsx(Ty,{id:n,label:n,type:"checkbox",checked:s[n]||!1,onChange:_=>u(n,_.target.checked,r.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(r.type===f.ICON)return O.jsxs($1,{label:r.name||n,helptext:r.description||null,id:n,value:s[n]||"",onChange:_=>u(n,_.target.value),requiredTag:r.required,children:[O.jsx("option",{value:""}),T4.map(_=>O.jsx("option",{value:_.id,children:_.id},_.id))]});if(r.type===f.DATE)return O.jsx(pC,{id:n,label:r.name||n,helptext:r.description||null,value:s[n]||"",multiple:r.variant==="multiple",maxlength:999,onChange:_=>u(n,_.target.value),requiredTag:r.required});if(Array.isArray(r)||Array.isArray(r.type)||Array.isArray(r.values)){const _=Array.isArray(r)?r:r.values||r.type;return O.jsxs($1,{label:r.name||n,helptext:r.description||null,id:n,value:s[n],onChange:N=>u(n,N.target.value),requiredTag:r.required,children:[O.jsx("option",{value:""}),_.map(N=>O.jsx("option",{value:N,children:N},N))]})}return r.type===f.NUMBER?O.jsx(Xy,{id:n,label:r.name||n,helptext:r.description||null,type:"number",value:s[n]||"",onChange:_=>u(n,parseFloat(_.currentTarget.value)),requiredTag:r.required}):r.type===f.OBJECT?(s[n]||(s[n]={}),O.jsxs("div",{children:[O.jsx("div",{className:"pkt-inputwrapper__label",children:O.jsx("h2",{children:r.name||n})}),r.description&&O.jsx("p",{children:r.description}),O.jsxs("fieldset",{children:[O.jsx("legend",{children:r.name||n}),Object.entries(r.properties).map(([_,N])=>O.jsx(R1,{propKey:_,props:s[n],spec:N,handleChange:($,R)=>g($,R)},_))]})]})):r.type===f.ARRAY&&r.items.type===f.OBJECT?(s[n]||(s[n]=[]),O.jsxs("div",{children:[O.jsx("div",{className:"pkt-inputwrapper__label",children:O.jsx("h2",{children:r.name||n})}),r.description&&O.jsx("p",{children:r.description}),s[n].map((_,N)=>O.jsx("div",{children:O.jsxs("fieldset",{children:[O.jsxs("legend",{children:["Item ",N+1]}),Object.entries(r.items.properties).map(([$,R])=>O.jsx(R1,{propKey:$,props:_,spec:R,handleChange:(B,M)=>v(N,B,M)},$)),O.jsx(Vc,{onClick:()=>x(N),children:"Fjern denne"})]})},N)),O.jsx(Vc,{onClick:S,children:"Legg til ny"})]})):O.jsx(Xy,{id:n,label:r.name||n,helptext:r.description||null,type:"text",value:s[n]||"",onChange:_=>u(n,r.type==="number"?parseFloat(_.currentTarget.value):_.currentTarget.value),requiredTag:r.required})};Tg.registerLanguage("jsx",x4);const XE=({specs:n,children:r,fullWidth:s})=>{var Pe,Ze;const u=n.props&&typeof n.props=="object"&&!Array.isArray(n.props)?Object.entries(n.props).reduce(($e,[Be,ve])=>(typeof ve=="object"&&!Array.isArray(ve)&&ve.default!==void 0&&ve.default!==null&&(ve.default==="false"&&(ve.default=!1),ve.default==="true"&&(ve.default=!0),$e[Be]=ve.default),$e),{}):{},[f,g]=He.useState(0),[v,S]=He.useState(u),[x,_]=He.useState("light"),[N,$]=He.useState(""),[R,B]=He.useState(""),[M,V]=He.useState(""),[H,ge]=He.useState("Rediger innhold"),[K,Y]=He.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${n.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),te=$e=>{$e===1&&oe(),$e===2&&re(),V(""),Y(Be=>Be.map((ve,Re)=>({...ve,active:Re===$e})))},U=He.useRef(null),re=async()=>{if(n.isElement&&He.isValidElement(Ve)){const $e=He.isValidElement(Ve)?Ve.type.displayName||Ve.type.name:n.name,Be=Object.entries(v).map(([Re,xe])=>{if(xe&&!ye(xe)&&!We(xe))return typeof xe=="object"?`${Re}='${JSON.stringify(xe)}'`:`${Re}="${xe}"`}).join(" "),ve=await Yy(`<${n.name||$e} ${Be}>${H}</${n.name||$e}>`,{parser:"html",plugins:[nE]});$(`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
1133
|
-
`+ve)}else{const $e=await Yy(U.current.innerHTML,{parser:"html",plugins:[nE]});$($e.replace(/<\!--.*?-->/g,""))}},oe=async()=>{const $e=await bR(Ve);return B($e),Promise.resolve()},Te=($e,Be)=>{navigator.clipboard.writeText(Be).then(()=>{V($e),console.log("Copied to clipboard",$e)})},ye=$e=>Array.isArray($e)&&$e.length===0,We=$e=>$e&&typeof $e=="object"&&!Object.keys($e).length,rt=($e,Be)=>O.jsxs("div",{className:"pkt-preview__copy",children:[M===$e&&O.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),O.jsx(Vc,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>Te($e,Be),children:"Kopier kode"})]}),Ve=He.isValidElement(r)&&He.cloneElement(r,{...v},r.props.children?r.props.children:(Pe=n.slots)!=null&&Pe.default?H:null),Fe=($e,Be,ve=!1)=>{if(g(f+1),!ve&&(!Be||Be=="false")){const{[$e]:Re,...xe}=v;S(xe)}else S(Re=>({...Re,[$e]:Be}))};return O.jsxs("div",{className:"pkt-preview",children:[O.jsxs("div",{className:"pkt-preview__component-container","data-mode":x,children:[n["dark-mode"]&&O.jsx("div",{className:"pkt-preview__mode",children:O.jsx(Ty,{id:"mode",label:"Dark mode",type:"checkbox",checked:x==="dark",onChange:$e=>_($e.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),O.jsx("div",{className:`pkt-preview__component ${s&&"pkt-preview__component--fullwidth"}`,ref:U,children:O.jsx("div",{children:Ve})},f)]}),O.jsx(ZE,{tabs:K,onTabSelected:te}),O.jsxs("div",{className:`pkt-grid pkt-preview__opts ${K[0].active?"":"pkt-hide"}`,children:[((Ze=n.slots)==null?void 0:Ze.default)&&!r.props.children&&O.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[O.jsx(yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),O.jsx(Xy,{id:"slot",label:"Slot",helptext:n.slots.default.description||"Innholdet i slot",type:"text",value:H,onChange:$e=>ge($e.currentTarget.value)})]}),n.props&&typeof n.props=="object"&&!Array.isArray(n.props)?Object.entries(n.props).map(([$e,Be])=>O.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[O.jsx(yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:$e}),O.jsx(R1,{propKey:$e,props:v,spec:Be,handleChange:Fe})]},$e)):O.jsx("p",{children:"OBS! Specs mangler props!"})]}),O.jsxs("div",{className:`pkt-preview__code ${K[1].active?"":"pkt-hide"}`,children:[O.jsx(Tg,{language:"jsx",style:KE,children:R}),rt("jsx",R)]}),O.jsxs("div",{className:`pkt-preview__code ${K[2].active?"":"pkt-hide"}`,children:[O.jsx(Tg,{language:"html",style:KE,children:N}),rt("html",N)]}),O.jsx("div",{className:`pkt-preview__specs ${K[3].active?"":"pkt-hide"}`,children:O.jsx(_4,{specs:n})})]})};XE.displayName="PktPreview";const A4=qi({tagName:"pkt-progressbar",elementClass:Gr,react:He,displayName:"PktProgressbar",events:{}}),JE=He.forwardRef(({children:n,...r},s)=>O.jsx(A4,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));JE.displayName="PktProgressbar";const F4=qi({tagName:"pkt-radiobutton",elementClass:Nu,react:He,displayName:"PktRadioButton",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange"}}),N4=He.forwardRef(({appearance:n="local",disabled:r=!1,fullwidth:s=!1,id:u,label:f,name:g,placeholder:v="Søk…",suggestions:S,value:x="",action:_,method:N,onChange:$,onSearch:R,onSuggestionClick:B,...M},V)=>{const H=(U,re)=>{U?U():B&&B(re)},ge=U=>{x=U.target.value},K=`pkt-searchinput pkt-searchinput--${n} ${s?"pkt-searchinput--fullwidth":""}`,Y=f?"label":"div";let te;return _?te=U=>O.jsx("form",{role:"search",className:K,action:_,method:N,children:U}):te=U=>O.jsx("div",{role:"search",className:K,children:U}),te(O.jsxs(O.Fragment,{children:[O.jsxs(Y,{htmlFor:f?u:void 0,className:f?"pkt-inputwrapper__label":"",children:[f&&O.jsx(O.Fragment,{children:f}),O.jsxs("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[O.jsx("input",{className:`pkt-input ${s?"pkt-input--fullwidth":""}`,type:"search",name:g||u,id:u,placeholder:v,defaultValue:x,disabled:r,autoComplete:"off","aria-autocomplete":"list",ref:V,"aria-controls":`${u}-suggestions`,onChange:$||ge,...M}),O.jsx(Vc,{className:`pkt-searchinput__button ${n==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:n==="local"?"tertiary":"primary",color:n==="global"?"yellow":void 0,type:"submit",disabled:r,onClick:R&&(U=>{U.preventDefault(),R(x)}),
|
|
1133
|
+
`+ve)}else{const $e=await Yy(U.current.innerHTML,{parser:"html",plugins:[nE]});$($e.replace(/<\!--.*?-->/g,""))}},oe=async()=>{const $e=await bR(Ve);return B($e),Promise.resolve()},Te=($e,Be)=>{navigator.clipboard.writeText(Be).then(()=>{V($e),console.log("Copied to clipboard",$e)})},ye=$e=>Array.isArray($e)&&$e.length===0,We=$e=>$e&&typeof $e=="object"&&!Object.keys($e).length,rt=($e,Be)=>O.jsxs("div",{className:"pkt-preview__copy",children:[M===$e&&O.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),O.jsx(Vc,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>Te($e,Be),children:"Kopier kode"})]}),Ve=He.isValidElement(r)&&He.cloneElement(r,{...v},r.props.children?r.props.children:(Pe=n.slots)!=null&&Pe.default?H:null),Fe=($e,Be,ve=!1)=>{if(g(f+1),!ve&&(!Be||Be=="false")){const{[$e]:Re,...xe}=v;S(xe)}else S(Re=>({...Re,[$e]:Be}))};return O.jsxs("div",{className:"pkt-preview",children:[O.jsxs("div",{className:"pkt-preview__component-container","data-mode":x,children:[n["dark-mode"]&&O.jsx("div",{className:"pkt-preview__mode",children:O.jsx(Ty,{id:"mode",label:"Dark mode",type:"checkbox",checked:x==="dark",onChange:$e=>_($e.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),O.jsx("div",{className:`pkt-preview__component ${s&&"pkt-preview__component--fullwidth"}`,ref:U,children:O.jsx("div",{children:Ve})},f)]}),O.jsx(ZE,{tabs:K,onTabSelected:te}),O.jsxs("div",{className:`pkt-grid pkt-preview__opts ${K[0].active?"":"pkt-hide"}`,children:[((Ze=n.slots)==null?void 0:Ze.default)&&!r.props.children&&O.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[O.jsx(yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),O.jsx(Xy,{id:"slot",label:"Slot",helptext:n.slots.default.description||"Innholdet i slot",type:"text",value:H,onChange:$e=>ge($e.currentTarget.value)})]}),n.props&&typeof n.props=="object"&&!Array.isArray(n.props)?Object.entries(n.props).map(([$e,Be])=>O.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[O.jsx(yh,{size:"small",skin:"blue-light",textStyle:"thin-text",children:$e}),O.jsx(R1,{propKey:$e,props:v,spec:Be,handleChange:Fe})]},$e)):O.jsx("p",{children:"OBS! Specs mangler props!"})]}),O.jsxs("div",{className:`pkt-preview__code ${K[1].active?"":"pkt-hide"}`,children:[O.jsx(Tg,{language:"jsx",style:KE,children:R}),rt("jsx",R)]}),O.jsxs("div",{className:`pkt-preview__code ${K[2].active?"":"pkt-hide"}`,children:[O.jsx(Tg,{language:"html",style:KE,children:N}),rt("html",N)]}),O.jsx("div",{className:`pkt-preview__specs ${K[3].active?"":"pkt-hide"}`,children:O.jsx(_4,{specs:n})})]})};XE.displayName="PktPreview";const A4=qi({tagName:"pkt-progressbar",elementClass:Gr,react:He,displayName:"PktProgressbar",events:{}}),JE=He.forwardRef(({children:n,...r},s)=>O.jsx(A4,{ref:s,...r,children:O.jsx("div",{className:"pkt-contents",children:n})}));JE.displayName="PktProgressbar";const F4=qi({tagName:"pkt-radiobutton",elementClass:Nu,react:He,displayName:"PktRadioButton",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange"}}),N4=He.forwardRef(({appearance:n="local",disabled:r=!1,fullwidth:s=!1,id:u,label:f,name:g,placeholder:v="Søk…",suggestions:S,value:x="",action:_,method:N,onChange:$,onSearch:R,onSuggestionClick:B,...M},V)=>{const H=(U,re)=>{U?U():B&&B(re)},ge=U=>{x=U.target.value},K=`pkt-searchinput pkt-searchinput--${n} ${s?"pkt-searchinput--fullwidth":""}`,Y=f?"label":"div";let te;return _?te=U=>O.jsx("form",{role:"search",className:K,action:_,method:N,children:U}):te=U=>O.jsx("div",{role:"search",className:K,children:U}),te(O.jsxs(O.Fragment,{children:[O.jsxs(Y,{htmlFor:f?u:void 0,className:f?"pkt-inputwrapper__label":"",children:[f&&O.jsx(O.Fragment,{children:f}),O.jsxs("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[O.jsx("input",{className:`pkt-input ${s?"pkt-input--fullwidth":""}`,type:"search",name:g||u,id:u,placeholder:v,defaultValue:x,disabled:r,autoComplete:"off","aria-autocomplete":"list",ref:V,"aria-controls":`${u}-suggestions`,onChange:$||ge,onKeyUp:R&&(U=>{U.key==="Enter"&&(U.preventDefault(),R(x))}),...M}),O.jsx(Vc,{className:`pkt-searchinput__button ${n==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:n==="local"?"tertiary":"primary",color:n==="global"?"yellow":void 0,type:"submit",disabled:r,onClick:R&&(U=>{U.preventDefault(),R(x)}),children:f||v})]})]}),S&&O.jsx("ul",{id:`${u}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:S.map((U,re)=>O.jsx("li",{children:He.createElement(U.href?"a":U.onClick?"button":"div",{href:U.href,className:`pkt-searchinput__suggestion ${U.onClick?"pkt-link-button":""} ${U.href||U.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:U.onClick?"button":void 0,onClick:()=>H(U.onClick,re),onKeyUp:()=>H(U.onClick,re)},O.jsxs(O.Fragment,{children:[U.title&&O.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:U.title}),U.text&&O.jsx("p",{className:"pkt-searchinput__suggestion-text",children:U.text})]}))},`search-suggestion-${re}`))})]}))}),P4=He.forwardRef(({activeStep:n,className:r,children:s,hideNonActiveSteps:u=!1,hideNonActiveStepsContent:f=!0,orientation:g="vertical",...v},S)=>{const x=os(r,"pkt-stepper",g==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),_=He.Children.map(s,(N,$)=>He.isValidElement(N)?He.cloneElement(N,{className:os(N.props.className,{"pkt-step--hideStep":u&&$!==n,"pkt-step--hideContent":f&&$!==n})}):N);return O.jsx("ol",{"data-testid":"pkt-stepper",className:x,ref:S,...v,children:_})}),$4=O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:O.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),R4=O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[O.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),O.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),O4=O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[O.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),O.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"})]}),L4=({children:n,className:r,status:s="incomplete",title:u})=>O.jsxs("li",{className:os("pkt-step",r,`pkt-step--${s}`),"data-testid":"pkt-step",children:[O.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),O.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),O.jsx("span",{className:os("pkt-step__indicator"),children:s==="current"?R4:s==="completed"?O4:$4}),O.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),O.jsxs("div",{className:"pkt-step__wrapper",children:[O.jsx("div",{className:"pkt-step__title",children:u}),O.jsx("div",{className:"pkt-step__content",children:n})]})]}),B4=qi({tagName:"pkt-textarea",elementClass:Wc,react:He,displayName:"PktTextarea",events:{onChange:"change",onInput:"change",onBlur:"blur",onFocus:"focus",onValueChange:"valueChange",onToggleHelpText:"toggleHelpText"}});It.PktAccordion=HF,It.PktAccordionItem=v3,It.PktAlert=uC,It.PktBackLink=cC,It.PktBreadcrumbs=b3,It.PktButton=Vc,It.PktCard=dC,It.PktCheckbox=Ty,It.PktDatepicker=pC,It.PktFooter=w3,It.PktFooterSimple=D3,It.PktHeader=S3,It.PktIcon=On,It.PktInput=fC,It.PktInputWrapper=hC,It.PktLink=mC,It.PktLinkCard=gC,It.PktLoader=vC,It.PktMessagebox=yC,It.PktModal=bC,It.PktPreview=XE,It.PktProgressbar=JE,It.PktRadioButton=F4,It.PktSearchInput=N4,It.PktSelect=$1,It.PktStep=L4,It.PktStepper=P4,It.PktTable=Jy,It.PktTableBody=tb,It.PktTableDataCell=zo,It.PktTableHeader=eb,It.PktTableHeaderCell=Ws,It.PktTableRow=Rp,It.PktTabs=ZE,It.PktTag=yh,It.PktTextarea=B4,It.PktTextinput=Xy,Object.defineProperty(It,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.23.0",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
40
40
|
"@lit/react": "^1.0.5",
|
|
41
|
-
"@oslokommune/punkt-elements": "^12.
|
|
41
|
+
"@oslokommune/punkt-elements": "^12.23.0",
|
|
42
42
|
"angular-html-parser": "^6.0.2",
|
|
43
43
|
"html-format": "^1.1.7",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"react-syntax-highlighter": "^15.5.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@oslokommune/punkt-assets": "^12.
|
|
51
|
-
"@oslokommune/punkt-css": "^12.
|
|
50
|
+
"@oslokommune/punkt-assets": "^12.23.0",
|
|
51
|
+
"@oslokommune/punkt-css": "^12.23.0",
|
|
52
52
|
"@testing-library/jest-dom": "^6.5.0",
|
|
53
53
|
"@testing-library/react": "^16.0.1",
|
|
54
54
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
112
112
|
},
|
|
113
113
|
"license": "MIT",
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "98a44ae9962af8297e125fefb09a6c6f7e65ef74"
|
|
115
115
|
}
|
|
@@ -106,6 +106,15 @@ export const PktSearchInput = forwardRef<HTMLInputElement, ISearchInput | ISearc
|
|
|
106
106
|
ref={ref}
|
|
107
107
|
aria-controls={`${id}-suggestions`}
|
|
108
108
|
onChange={onChange ? onChange : handleNoOnChange}
|
|
109
|
+
onKeyUp={
|
|
110
|
+
onSearch &&
|
|
111
|
+
((event) => {
|
|
112
|
+
if (event.key === 'Enter') {
|
|
113
|
+
event.preventDefault()
|
|
114
|
+
onSearch(value)
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
}
|
|
109
118
|
{...props}
|
|
110
119
|
/>
|
|
111
120
|
<PktButton
|
|
@@ -123,15 +132,6 @@ export const PktSearchInput = forwardRef<HTMLInputElement, ISearchInput | ISearc
|
|
|
123
132
|
onSearch(value)
|
|
124
133
|
})
|
|
125
134
|
}
|
|
126
|
-
onKeyUp={
|
|
127
|
-
onSearch &&
|
|
128
|
-
((event) => {
|
|
129
|
-
if (event.key === 'Enter') {
|
|
130
|
-
event.preventDefault()
|
|
131
|
-
onSearch(value)
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
135
|
>
|
|
136
136
|
{label || placeholder}
|
|
137
137
|
</PktButton>
|