@oslokommune/punkt-react 12.25.0 → 12.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/punkt-react.es.js
CHANGED
|
@@ -22740,7 +22740,7 @@ var sL = Object.defineProperty, lL = Object.getOwnPropertyDescriptor, sy = (n, r
|
|
|
22740
22740
|
return u && f && sL(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.26/icons/";
|
|
22744
22744
|
const uL = (n) => new Promise((r) => setTimeout(r, n)), E0 = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', hw = {}, cL = async (n, r) => {
|
|
22745
22745
|
let s = 0;
|
|
22746
22746
|
for (; hw[r + n + ".svg"] === "fetching" && (s++, !(s > 50)); )
|
|
@@ -25032,10 +25032,10 @@ Pc([
|
|
|
25032
25032
|
ae({ type: String, reflect: !0 })
|
|
25033
25033
|
], Sl.prototype, "iconName", 2);
|
|
25034
25034
|
Pc([
|
|
25035
|
-
ae({ type: String
|
|
25035
|
+
ae({ type: String })
|
|
25036
25036
|
], Sl.prototype, "type", 2);
|
|
25037
25037
|
Pc([
|
|
25038
|
-
ae({ type: String
|
|
25038
|
+
ae({ type: String })
|
|
25039
25039
|
], Sl.prototype, "ariaLabel", 2);
|
|
25040
25040
|
Pc([
|
|
25041
25041
|
pa()
|
|
@@ -27652,7 +27652,7 @@ const YU = da(
|
|
|
27652
27652
|
{
|
|
27653
27653
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
27654
27654
|
name: "spinner-blue",
|
|
27655
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27655
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.26/animations/"
|
|
27656
27656
|
}
|
|
27657
27657
|
),
|
|
27658
27658
|
D !== "label-only" && /* @__PURE__ */ O.jsx(Un, { className: "pkt-btn__icon", name: s }),
|
|
@@ -27948,7 +27948,7 @@ const tI = uo({
|
|
|
27948
27948
|
name: "oslologo",
|
|
27949
27949
|
className: "pkt-header__logo-svg",
|
|
27950
27950
|
"aria-hidden": "true",
|
|
27951
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27951
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.26/logos/"
|
|
27952
27952
|
}
|
|
27953
27953
|
) }) : /* @__PURE__ */ O.jsx(
|
|
27954
27954
|
"button",
|
|
@@ -27962,7 +27962,7 @@ const tI = uo({
|
|
|
27962
27962
|
name: "oslologo",
|
|
27963
27963
|
className: "pkt-header__logo-svg",
|
|
27964
27964
|
"aria-hidden": "true",
|
|
27965
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
27965
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.26/logos/"
|
|
27966
27966
|
}
|
|
27967
27967
|
)
|
|
27968
27968
|
}
|
|
@@ -28141,7 +28141,7 @@ const uI = da(
|
|
|
28141
28141
|
Un,
|
|
28142
28142
|
{
|
|
28143
28143
|
name: B(g),
|
|
28144
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
28144
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.26/animations/",
|
|
28145
28145
|
className: `pkt-loader__svg pkt-loader__${g}`
|
|
28146
28146
|
}
|
|
28147
28147
|
),
|
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 TP=Object.defineProperty,AP=Object.getOwnPropertyDescriptor,ig=(n,r,s,u)=>{for(var f=u>1?void 0:u?AP(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&&TP(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 TP=Object.defineProperty,AP=Object.getOwnPropertyDescriptor,ig=(n,r,s,u)=>{for(var f=u>1?void 0:u?AP(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&&TP(r,s,f),f};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.26/icons/";const FP=n=>new Promise(r=>setTimeout(r,n)),Dy='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',wk={},PP=async(n,r)=>{let s=0;for(;wk[r+n+".svg"]==="fetching"&&(s++,!(s>50));)await FP(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 PP(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 NP="pkt-alert",$P=!0,RP={onClose:{description:"React: Klikk-event for 'Lukk'-knappen"},close:{description:"Vue: Klikk-event for 'Lukk'-knappen"}},OP={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}},LP={default:{description:"Innholdet i meldingen"}},Sy={name:NP,"css-class":"pkt-alert","dark-mode":!0,isElement:$P,events:RP,props:OP,slots:LP};var BP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,_u=(n,r,s,u)=>{for(var f=u>1?void 0:u?jP(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&&BP(r,s,f),f};let Us=class extends wi{constructor(){super(),this.defaultSlot=Pr(),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"
|
|
@@ -488,7 +488,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
488
488
|
${this.iconName&&Qe` <pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon> `}
|
|
489
489
|
<span ${kr(this.defaultSlot)}></span>
|
|
490
490
|
</span>
|
|
491
|
-
`}};Tu([ae({type:Boolean,reflect:!0})],qs.prototype,"closeTag",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"size",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"skin",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"textStyle",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"iconName",2),Tu([ae({type:String
|
|
491
|
+
`}};Tu([ae({type:Boolean,reflect:!0})],qs.prototype,"closeTag",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"size",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"skin",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"textStyle",2),Tu([ae({type:String,reflect:!0})],qs.prototype,"iconName",2),Tu([ae({type:String})],qs.prototype,"type",2),Tu([ae({type:String})],qs.prototype,"ariaLabel",2),Tu([ta()],qs.prototype,"_isClosed",2),qs=Tu([$a("pkt-tag")],qs);const d$="pkt-card",p$=!0,f$={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},tags:{type:"array",description:"Liste av tags på kortet. Tar inn en array med objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"icon",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag",required:!0}}}},image:{type:"object",name:"Bilde",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",properties:{src:{type:"string",description:"Bilde på kortet",required:!0},alt:{type:"string",description:"Tekst for aria-label",required:!0}}}},h$={default:{description:"Innholdet i kortet"}},rC={name:d$,"css-class":"pkt-card",isElement:p$,props:f$,slots:h$};var m$=Object.defineProperty,g$=Object.getOwnPropertyDescriptor,bp=(n,r,s,u)=>{for(var f=u>1?void 0:u?g$(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&&m$(r,s,f),f};let Au=class extends wi{constructor(){super(),this.defaultSlot=Pr(),this.skin=rC.props.skin.default,this.direction=rC.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new Eu(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const r={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return Qe`
|
|
492
492
|
<div class=${An(r)}>
|
|
493
493
|
${this.image.src&&Qe`
|
|
494
494
|
<div class="pkt-card__image">
|
|
@@ -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 D=arguments[v];D&&(g=f(g,u(D)))}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 D in g)r.call(g,D)&&g[D]&&(v=f(v,D));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[D,x]=He.useState(f),_=u?u.isOpen:D,P=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:P(u?u.isOpen:D),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(" "),D=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:D,...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],D=[s,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:f,"aria-label":"brødsmulemeny",className:D,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:D="label-only",state:x,color:_,isLoading:P=!1,...$},R)=>{const B=[r,"pkt-btn",f&&`pkt-btn--${f}`,g&&`pkt-btn--${g}`,D&&`pkt-btn--${D}`,_&&`pkt-btn--${_}`,P&&"pkt-btn--active",x&&`pkt-btn--${x}`].filter(Boolean).join(" ");return O.jsxs("button",{...$,className:B,type:v,ref:R,children:[P&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.25/animations/"}),D!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:s}),O.jsx("span",{className:"pkt-btn__text",children:n}),D==="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:D=!1,isSwitch:x=!1,className:_,...P},$)=>{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 ${D?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:x?"switch":"checkbox",id:n,disabled:s,...P}),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,openLinksInNewTab:f=!1,personvernOgInfoLink:g="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:v="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var x,_;const D=[u,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:D,"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}),(x=n.links)==null?void 0:x.map((P,$)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${P.external?"pkt-link--external":""}`,href:P.href,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),P.text]})},`links-${$}`))]})]}),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}),(_=r.links)==null?void 0:_.map((P,$)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${P.external?"pkt-link--external":""}`,href:P.href,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),P.text]})},`links-${$}`))]})]}),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:g,target:f?"_blank":"_self",rel:f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:v,target:f?"_blank":"_self",rel:f?"noopener noreferrer":void 0,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(P=>P.language).map((P,$)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:P.href,"aria-label":`til ${P.language} versjon av nettsiden`,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:P.language})},`sociallinks-language-${$}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:s.filter(P=>P.iconName).map((P,$)=>O.jsx(He.Fragment,{children:O.jsx("a",{href:P.href,"aria-label":`til ${P.iconName}`,className:"pkt-footer__social-icon-link",target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:P.iconName})})},`sociallinks-${$}`))})]})]})})},D3=({links:n=[],openLinksInNewTab:r=!1,personvernOgInfoLink:s="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:u="https://www.oslo.kommune.no/tilgjengelighet/",className:f})=>{const g=[f,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:g,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[n.map((v,D)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${v.external?" pkt-link--external":""}`,href:v.href,target:v.openInNewTab||r?"_blank":"_self",rel:v.openInNewTab||r?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),v.text]})},D)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:s,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:u,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,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:D,userOptions:x,userMenuFooter:_,canChangeRepresentation:P=!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=Ne=>{We.current&&!We.current.contains(Ne.target)&&ye(!1)},Fe=()=>{if(f){const Ne=window.pageYOffset||document.documentElement.scrollTop;if(Ne<0||Math.abs(Ne-re)<60)return;U(Ne>re),oe(Ne)}};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.25/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.25/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||D)&&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:(D==null?void 0:D.name)||(g==null?void 0:g.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(D==null?void 0:D.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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userMenu-${Ze}`))})}),(D||P)&&O.jsxs("li",{children:[D&&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:D.name}),D.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",D.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:P&&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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsx("a",{href:Ne.target,className:"pkt-link",children:Ne.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:Ne.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:Nr,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:D,...x},_)=>{const P=`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:P,"data-testid":"pkt-loader",ref:_,...x,children:[O.jsx(On,{name:B(g),path:"https://punkt-cdn.oslo.kommune.no/12.25/animations/",className:`pkt-loader__svg pkt-loader__${g}`}),r&&O.jsx("p",{children:r})]}):null}):D})});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 D=arguments[v];D&&(g=f(g,u(D)))}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 D in g)r.call(g,D)&&g[D]&&(v=f(v,D));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[D,x]=He.useState(f),_=u?u.isOpen:D,P=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:P(u?u.isOpen:D),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(" "),D=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:D,...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],D=[s,"pkt-breadcrumbs"].filter(Boolean).join(" ");return O.jsxs("nav",{ref:f,"aria-label":"brødsmulemeny",className:D,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:D="label-only",state:x,color:_,isLoading:P=!1,...$},R)=>{const B=[r,"pkt-btn",f&&`pkt-btn--${f}`,g&&`pkt-btn--${g}`,D&&`pkt-btn--${D}`,_&&`pkt-btn--${_}`,P&&"pkt-btn--active",x&&`pkt-btn--${x}`].filter(Boolean).join(" ");return O.jsxs("button",{...$,className:B,type:v,ref:R,children:[P&&O.jsx(On,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.26/animations/"}),D!=="label-only"&&O.jsx(On,{className:"pkt-btn__icon",name:s}),O.jsx("span",{className:"pkt-btn__text",children:n}),D==="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:D=!1,isSwitch:x=!1,className:_,...P},$)=>{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 ${D?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:x?"switch":"checkbox",id:n,disabled:s,...P}),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,openLinksInNewTab:f=!1,personvernOgInfoLink:g="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:v="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var x,_;const D=[u,"pkt-footer"].filter(Boolean).join(" ");return O.jsx("footer",{className:D,"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}),(x=n.links)==null?void 0:x.map((P,$)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${P.external?"pkt-link--external":""}`,href:P.href,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),P.text]})},`links-${$}`))]})]}),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}),(_=r.links)==null?void 0:_.map((P,$)=>O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:`pkt-footer__link ${P.external?"pkt-link--external":""}`,href:P.href,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),P.text]})},`links-${$}`))]})]}),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:g,target:f?"_blank":"_self",rel:f?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer__list-item",children:O.jsxs("a",{className:"pkt-footer__link",href:v,target:f?"_blank":"_self",rel:f?"noopener noreferrer":void 0,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(P=>P.language).map((P,$)=>O.jsx("div",{className:"pkt-footer__social-language",children:O.jsx("a",{href:P.href,"aria-label":`til ${P.language} versjon av nettsiden`,target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:P.language})},`sociallinks-language-${$}`))}),O.jsx("div",{className:"pkt-footer__social-icons",children:s.filter(P=>P.iconName).map((P,$)=>O.jsx(He.Fragment,{children:O.jsx("a",{href:P.href,"aria-label":`til ${P.iconName}`,className:"pkt-footer__social-icon-link",target:P.openInNewTab||f?"_blank":"_self",rel:P.openInNewTab||f?"noopener noreferrer":void 0,children:O.jsx(On,{className:"pkt-footer__social-icon",name:P.iconName})})},`sociallinks-${$}`))})]})]})})},D3=({links:n=[],openLinksInNewTab:r=!1,personvernOgInfoLink:s="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:u="https://www.oslo.kommune.no/tilgjengelighet/",className:f})=>{const g=[f,"pkt-footer-simple"].filter(Boolean).join(" ");return O.jsx("footer",{className:g,"data-mode":"dark",children:O.jsx("div",{className:"pkt-footer-simple__container",children:O.jsxs("ul",{className:"pkt-footer-simple__list",children:[n.map((v,D)=>O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:`pkt-footer-simple__link ${v.external?" pkt-link--external":""}`,href:v.href,target:v.openInNewTab||r?"_blank":"_self",rel:v.openInNewTab||r?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),v.text]})},D)),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:s,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,children:[O.jsx(On,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),O.jsx("li",{className:"pkt-footer-simple__list-item",children:O.jsxs("a",{className:"pkt-footer-simple__link",href:u,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,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:D,userOptions:x,userMenuFooter:_,canChangeRepresentation:P=!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=Ne=>{We.current&&!We.current.contains(Ne.target)&&ye(!1)},Fe=()=>{if(f){const Ne=window.pageYOffset||document.documentElement.scrollTop;if(Ne<0||Math.abs(Ne-re)<60)return;U(Ne>re),oe(Ne)}};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.26/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.26/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||D)&&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:(D==null?void 0:D.name)||(g==null?void 0:g.name)}),O.jsx("span",{className:"pkt-header__user-shortname",translate:"no",children:(D==null?void 0:D.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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]})},`userMenu-${Ze}`))})}),(D||P)&&O.jsxs("li",{children:[D&&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:D.name}),D.orgNumber&&O.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",D.orgNumber]})]}),O.jsx("ul",{className:"pkt-list mt-size-16",children:P&&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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsxs("a",{href:Ne.target,className:"pkt-link",children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.title]}):O.jsxs("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:[Ne.iconName&&O.jsx(On,{name:Ne.iconName,className:"pkt-link__icon"}),Ne.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((Ne,Ze)=>O.jsx("li",{children:typeof Ne.target=="string"?O.jsx("a",{href:Ne.target,className:"pkt-link",children:Ne.title}):O.jsx("button",{className:"pkt-link-button pkt-link",onClick:Ne.target,children:Ne.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:Nr,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:D,...x},_)=>{const P=`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:P,"data-testid":"pkt-loader",ref:_,...x,children:[O.jsx(On,{name:B(g),path:"https://punkt-cdn.oslo.kommune.no/12.26/animations/",className:`pkt-loader__svg pkt-loader__${g}`}),r&&O.jsx("p",{children:r})]}):null}):D})});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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.26.2",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -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.26.2",
|
|
42
42
|
"angular-html-parser": "^6.0.2",
|
|
43
43
|
"html-format": "^1.1.7",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@oslokommune/punkt-assets": "^12.23.0",
|
|
51
|
-
"@oslokommune/punkt-css": "^12.
|
|
51
|
+
"@oslokommune/punkt-css": "^12.26.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": "40edb9d3d4eab9308ced03492923de706deff59d"
|
|
115
115
|
}
|