@oslokommune/punkt-react 11.16.0 → 11.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [11.16.1](https://github.com/oslokommune/punkt/compare/11.16.0...11.16.1) (2024-07-31)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * LinkCard --> no default icon (#1846). - Removing default icon on LinkCard as the Vue version do not have any.
18
+ - None of our users use the default icon anyways as they all set one.
19
+
20
+
21
+ ### Chores
22
+ Ingen
23
+
24
+ ---
25
+
26
+
8
27
  ## [11.15.0](https://github.com/oslokommune/punkt/compare/11.14.1...11.15.0) (2024-07-12)
9
28
 
10
29
  ### ⚠ BREAKING CHANGES
@@ -1397,7 +1397,7 @@ const Mt = S(
1397
1397
  ({
1398
1398
  children: r,
1399
1399
  className: n,
1400
- iconName: o = "user",
1400
+ iconName: o,
1401
1401
  openInNewTab: l = !1,
1402
1402
  skin: c = "normal",
1403
1403
  href: s = "#",
@@ -1416,7 +1416,7 @@ const Mt = S(
1416
1416
  rel: l ? "noopener noreferrer" : void 0,
1417
1417
  ref: p,
1418
1418
  children: [
1419
- /* @__PURE__ */ e.jsx(x, { className: "pkt-link__icon", name: o }),
1419
+ o && /* @__PURE__ */ e.jsx(x, { className: "pkt-link__icon", name: o }),
1420
1420
  /* @__PURE__ */ e.jsxs("div", { className: "pkt-linkcard__content", children: [
1421
1421
  /* @__PURE__ */ e.jsx("div", { className: `pkt-linkcard__title ${d ? "pkt-link pkt-link--external" : ""}`, children: a }),
1422
1422
  /* @__PURE__ */ e.jsx("div", { className: "pkt-linkcard__text", children: r })
@@ -33,4 +33,4 @@ React keys must be passed directly to JSX without using spread:
33
33
  Copyright (c) 2018 Jed Watson.
34
34
  Licensed under the MIT License (MIT), see
35
35
  http://jedwatson.github.io/classnames
36
- */(function(r){(function(){var n={}.hasOwnProperty;function o(){for(var s="",d=0;d<arguments.length;d++){var a=arguments[d];a&&(s=c(s,l(a)))}return s}function l(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return o.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var d="";for(var a in s)n.call(s,a)&&s[a]&&(d=c(d,a));return d}function c(s,d){return d?s?s+" "+d:s+d:s}r.exports?(o.default=o,r.exports=o):window.classNames=o})()})(Re);var dt=Re.exports;const L=st(dt),ft=m.forwardRef(({title:r,className:n,children:o,toggleProps:l,defaultOpen:c=!1,id:s},d)=>{const[a,u]=m.useState(c),p=l?l.isOpen:a,k=y=>y??void 0,_=(y,S)=>{y.preventDefault(),l!==void 0&&l.onToggleClick(y,S),u(!p)},j=L(n,"pkt-accordion-item");return e.jsxs("details",{className:j,ref:d,id:s,open:k(l?l.isOpen:a),children:[e.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${s}`,onClick:y=>_(y,s),children:[r,e.jsx(v,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),e.jsx("div",{id:`pkt-accordion-item-content-${s}`,role:"region",className:"pkt-accordion-item__content",children:o})]})}),Ie=m.forwardRef(({children:r,className:n,skin:o="info",closeAlert:l=!1,onClose:c,title:s,date:d,ariaLive:a="polite",compact:u=!1,...p},k)=>{const _=[n,"pkt-alert",o&&`pkt-alert--${o}`,u&&"pkt-alert--compact"].filter(Boolean).join(" "),[j,y]=m.useState(!0),S=()=>{y(!1),c&&c()};return j?e.jsxs("div",{...p,className:_,"aria-live":a,ref:k,children:[e.jsx(v,{className:"pkt-alert__icon",name:o==="info"?"alert-information":`alert-${o}`}),l&&e.jsx("div",{className:"pkt-alert__close",children:e.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:S,children:e.jsx(v,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),s&&e.jsx("div",{className:"pkt-alert__title",children:s}),e.jsx("div",{className:"pkt-alert__text",children:r}),d&&e.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",d]})]}):null}),kt=m.forwardRef(({href:r,text:n,onClick:o,className:l,...c},s)=>{const d=[l,"pkt-back-link"].filter(Boolean).join(" "),a=u=>{o&&o(u)};return e.jsx("nav",{ref:s,className:d,"aria-label":"Gå tilbake et steg",children:e.jsxs("a",{href:r||"/",className:"pkt-link pkt-link--icon-left",onClick:a,...c,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),e.jsx("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})}),mt=m.forwardRef(({breadcrumbs:r,navigationType:n,className:o,...l},c)=>{const s=r.slice(0,4),d=s[s.length-2],a=[o,"pkt-breadcrumbs"].filter(Boolean).join(" ");return e.jsxs("nav",{ref:c,"aria-label":"brødsmulemeny",className:a,children:[e.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:s.map((u,p)=>e.jsx("li",{className:"pkt-breadcrumbs__item",children:p===s.length-1?e.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})}):n==="router"?e.jsxs(Ee.Link,{to:u.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[e.jsx(v,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]}):e.jsxs("a",{href:u.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[e.jsx(v,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]})},`breadcrumb-${p}`))}),n==="router"?e.jsxs(Ee.Link,{to:d.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):e.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})]})}),ee=m.forwardRef(({children:r,className:n,iconName:o="user",secondIconName:l="user",size:c="medium",skin:s="primary",type:d="button",variant:a="label-only",color:u,isLoading:p=!1,...k},_)=>{const j=[n,"pkt-btn",c&&`pkt-btn--${c}`,s&&`pkt-btn--${s}`,a&&`pkt-btn--${a}`,u&&`pkt-btn--${u}`,p&&"pkt-btn--active"].filter(Boolean).join(" ");return e.jsxs("button",{...k,className:j,type:d,ref:_,children:[p&&e.jsx(v,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.16/animations/"}),a!=="label-only"&&e.jsx(v,{className:"pkt-btn__icon",name:o}),e.jsx("span",{className:"pkt-btn__text",children:r}),a==="icons-right-and-left"&&e.jsx(v,{className:"pkt-btn__icon",name:l})]})});ee.displayName="PktButton";const Oe=m.forwardRef(({id:r,hasTile:n=!1,disabled:o=!1,label:l,labelPosition:c="right",hideLabel:s=!1,checkHelptext:d,hasError:a=!1,isSwitch:u=!1,className:p,...k},_)=>{const j=[p,"pkt-input-check"].filter(Boolean).join(" ");return e.jsx("div",{className:j,children:e.jsxs("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${o&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l&&c==="left"&&e.jsxs("label",{className:`pkt-input-check__input-label ${s?"pkt-sr-only":""}`,htmlFor:r,children:[l,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]}),e.jsx("input",{ref:_,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:u?"switch":"checkbox",id:r,disabled:o,...k}),l&&c==="right"&&e.jsxs("label",{className:`pkt-input-check__input-label ${s?"pkt-sr-only":""}`,htmlFor:r,children:[l,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]})]})})});Oe.displayName="PktCheckbox";const ht=({columnOne:r,columnTwo:n,socialLinks:o,className:l,personvernOgInfoLink:c="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:s="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var a,u;const d=[l,"pkt-footer"].filter(Boolean).join(" ");return e.jsx("footer",{className:d,"data-mode":"dark",children:e.jsxs("div",{className:"pkt-footer__container",children:[e.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:r.title}),e.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&e.jsx("li",{className:"pkt-footer__text",children:r.text}),(a=r.links)==null?void 0:a.map((p,k)=>e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:`pkt-footer__link ${p.external?"pkt-link--external":""}`,href:p.href,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),p.text]})},`links-${k}`))]})]}),e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:n.title}),e.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&e.jsx("li",{className:"pkt-footer__text",children:n.text}),(u=n.links)==null?void 0:u.map((p,k)=>e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:`pkt-footer__link ${p.external?"pkt-link--external":""}`,href:p.href,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),p.text]})},`links-${k}`))]})]}),e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),e.jsxs("ul",{className:"pkt-footer__list",children:[e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:"pkt-footer__link",href:c,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:"pkt-footer__link",href:s,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),o&&e.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[e.jsx("div",{className:"pkt-footer__social-languages",children:o.filter(p=>p.language).map((p,k)=>e.jsx("div",{className:"pkt-footer__social-language",children:e.jsx("a",{href:p.href,"aria-label":`til ${p.language} versjon av nettsiden`,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:p.language})},`sociallinks-language-${k}`))}),e.jsx("div",{className:"pkt-footer__social-icons",children:o.filter(p=>p.iconName).map((p,k)=>e.jsx(m.Fragment,{children:e.jsx("a",{href:p.href,"aria-label":`til ${p.iconName}`,className:"pkt-footer__social-icon-link",target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:e.jsx(v,{className:"pkt-footer__social-icon",name:p.iconName})})},`sociallinks-${k}`))})]})]})})},_t=({links:r=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/",className:l})=>{const c=[l,"pkt-footer-simple"].filter(Boolean).join(" ");return e.jsx("footer",{className:c,"data-mode":"dark",children:e.jsx("div",{className:"pkt-footer-simple__container",children:e.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((s,d)=>e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:`pkt-footer-simple__link ${s.external?" pkt-link--external":""}`,href:s.href,target:s.openInNewTab?"_blank":"_self",rel:s.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),s.text]})},d)),e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:"pkt-footer-simple__link",href:n,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:"pkt-footer-simple__link",href:o,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},bt=m.forwardRef(({className:r,logoLink:n="https://www.oslo.kommune.no/",serviceName:o,fixed:l=!0,scrollToHide:c=!0,user:s,userMenu:d,representing:a,userOptions:u,userMenuFooter:p,canChangeRepresentation:k=!0,showMenuButton:_=!1,showLogOutButton:j=!1,openMenu:y,logOut:S,changeRepresentation:O,children:R,...E},C)=>{const g=m.useMemo(()=>typeof(s==null?void 0:s.lastLoggedIn)=="string"?s.lastLoggedIn:s!=null&&s.lastLoggedIn?new Date(s.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[s]),[F,H]=m.useState(!1),[W,V]=m.useState(0),[G,M]=m.useState(!1),J=m.useRef(null);m.useEffect(()=>(document.addEventListener("mouseup",U),window.addEventListener("scroll",$),()=>{document.removeEventListener("mouseup",U),window.removeEventListener("scroll",$)}));const z=()=>{M(!G)},U=h=>{J.current&&!J.current.contains(h.target)&&M(!1)},$=()=>{if(c){const h=window.pageYOffset||document.documentElement.scrollTop;if(h<0||Math.abs(h-W)<60)return;H(h>W),V(h)}};return e.jsxs("header",{...E,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:L(r,"pkt-header",{"pkt-header--fixed":l,"pkt-header--scroll-to-hide":c,"pkt-header--hidden":F}),ref:C,children:[e.jsxs("div",{className:"pkt-header__logo",children:[typeof n=="string"?e.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:e.jsx(v,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.16/logos/"})}):e.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:e.jsx(v,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.16/logos/"})}),e.jsx("span",{className:"pkt-header__logo-service",children:o})]}),e.jsx("nav",{className:"pkt-header__actions",children:e.jsxs("ul",{className:"pkt-header__actions-row",children:[_&&e.jsx("li",{children:e.jsx(ee,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:y,children:"Meny"})}),(s||a)&&e.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${G&&!F?"pkt-header--open-dropdown":""}`,ref:J,children:[e.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":G,onClick:z,children:[e.jsx(v,{name:"user",className:"pkt-btn__icon"}),e.jsx("span",{className:"pkt-header__user-fullname",children:(a==null?void 0:a.name)||(s==null?void 0:s.name)}),e.jsx("span",{className:"pkt-header__user-shortname",children:(a==null?void 0:a.shortname)||(s==null?void 0:s.shortname)}),e.jsx(v,{name:"chevron-thin-down",className:"pkt-btn--closed"}),e.jsx(v,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),e.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[s&&e.jsxs("li",{children:[e.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),e.jsx("div",{className:"pkt-user-menu__name",children:s.name}),s.lastLoggedIn&&e.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",e.jsx("time",{children:g})]})]}),d&&e.jsx("li",{children:e.jsx("ul",{className:"pkt-list",children:d.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsxs("a",{href:h.target,className:"pkt-link",children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]}):e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]})},`userMenu-${A}`))})}),(a||k)&&e.jsxs("li",{children:[a&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),e.jsx("div",{className:"pkt-user-menu__name",children:a.name}),a.orgNumber&&e.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",a.orgNumber]})]}),e.jsx("ul",{className:"pkt-list mt-size-16",children:k&&e.jsx("li",{children:e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:O,children:[e.jsx(v,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),e.jsx("li",{children:e.jsx("ul",{className:"pkt-list",children:(u||!j)&&e.jsxs(e.Fragment,{children:[u==null?void 0:u.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsxs("a",{href:h.target,className:"pkt-link",children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]}):e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]})},`userOptions-${A}`)),!j&&e.jsx("li",{children:e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:S,children:[e.jsx(v,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&e.jsx("li",{className:"footer",children:e.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsx("a",{href:h.target,className:"pkt-link",children:h.title}):e.jsx("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:h.title})},`userMenuFooter-${A}`))})})]})]}),R&&e.jsx("li",{children:R}),j&&e.jsx("li",{children:e.jsx(ee,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:S,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Fe=m.forwardRef(({label:r,id:n,children:o,...l},c)=>e.jsxs("div",{className:"pkt-form-group",children:[e.jsx("label",{htmlFor:n,className:"pkt-form-label",children:r}),e.jsx("input",{className:"pkt-form-input",id:n,...l,ref:c}),o]}));Fe.displayName="PktInput";const ae=m.forwardRef(({forId:r,label:n,helptext:o,helptextDropdown:l,helptextDropdownButton:c,optionalTag:s=!1,optionalText:d="Valgfritt",requiredTag:a=!1,requiredText:u="Må fylles ut",hasError:p,errorMessage:k,disabled:_,inline:j,ariaDescribedby:y,useWrapper:S=!0,children:O,className:R,hasFieldset:E=!1},C)=>{const[g,F]=m.useState(!1),H=()=>{F(!g)},W=()=>s?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":a?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",V=s?d:a?u:"",G=_?"pkt-inputwrapper--disabled":"",M=j?"pkt-inputwrapper--inline":"",J=p?"pkt-inputwrapper--error":"",z=!!l&&l!=="",U=c||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',$=E?"fieldset":z?"div":"label",h=E?"legend":z?"h2":"span",A=y||(o?`${r}-helptext`:void 0);return e.jsxs("div",{className:["pkt-inputwrapper",R,G,M,J].join(" "),ref:C,children:[S?e.jsx(e.Fragment,{children:e.jsxs($,{htmlFor:E?void 0:r,"aria-describedby":z?void 0:y,className:`pkt-inputwrapper__label${E?" pkt-inputwrapper__fieldset":""}`,children:[e.jsxs(h,{id:`${r}-label`,className:`${E?" pkt-inputwrapper__legend":""}`,children:[n,V!==""&&e.jsx("span",{className:W(),children:V})]}),o&&e.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${r}-helptext`,dangerouslySetInnerHTML:{__html:o}}),z&&l!==""&&e.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[e.jsx(ee,{skin:"tertiary",size:"small",variant:"icon-right",iconName:g?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:H,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:U}})}),e.jsx("div",{className:`pkt-inputwrapper__helptext ${g?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:l}})}),!E&&e.jsx("label",{htmlFor:r,className:"pkt-sr-only","aria-describedby":A,children:n})]}),e.jsx(e.Fragment,{children:O})]})}):e.jsxs(e.Fragment,{children:[!E&&e.jsx("label",{htmlFor:r,className:"pkt-sr-only","aria-describedby":A,id:`${r}-label`,children:n}),O]}),p&&k&&e.jsx("div",{children:e.jsx(Ie,{skin:"error","aria-live":"assertive",id:`${r}-error`,compact:!0,children:k})})]})});ae.displayName="PktInputWrapper";const De=m.forwardRef(({children:r,className:n,iconName:o="user",openInNewTab:l=!1,skin:c="normal",href:s="#",external:d=!1,title:a,...u},p)=>{const k=[n,"pkt-linkcard",c&&`pkt-linkcard--${c}`].filter(Boolean).join(" ");return e.jsxs("a",{...u,href:s,className:`pkt-linkcard pkt-link ${k}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:p,children:[e.jsx(v,{className:"pkt-link__icon",name:o}),e.jsxs("div",{className:"pkt-linkcard__content",children:[e.jsx("div",{className:`pkt-linkcard__title ${d?"pkt-link pkt-link--external":""}`,children:a}),e.jsx("div",{className:"pkt-linkcard__text",children:r})]})]})});De.displayName="PktLinkCard";const vt=m.forwardRef(({className:r,message:n,size:o="medium",inline:l=!1,isLoading:c=!0,variant:s="rainbow",delay:d=0,children:a,...u},p)=>{const k=`pkt-loader pkt-loader--${o}`,[_,j]=m.useState(!(d>0));d>0&&setTimeout(()=>{j(!0)},d);const y=S=>S==="shapes"?"loader":S==="blue"?"spinner-blue":"spinner";return e.jsx("div",{role:"status","aria-live":"polite","aria-busy":c,className:`pkt-loader--${l?"inline":"box"} ${r||""}`,children:c?e.jsx(e.Fragment,{children:_?e.jsxs("div",{className:k,"data-testid":"pkt-loader",ref:p,...u,children:[e.jsx(v,{name:y(s),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.16/animations/",className:`pkt-loader__svg pkt-loader__${s}`}),n&&e.jsx("p",{children:n})]}):null}):a})}),xt=m.forwardRef(({children:r,className:n,compact:o=!1,closable:l=!1,skin:c="beige",title:s,onClose:d,...a},u)=>{const[p,k]=m.useState(!0),_=()=>{k(!1),d&&d()},j=[n,"pkt-messagebox",c&&`pkt-messagebox--${c}`,o&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return p?e.jsxs("div",{...a,className:j,ref:u,children:[l&&e.jsx("div",{className:"pkt-messagebox__close",children:e.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:_,children:e.jsx(v,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),s&&e.jsx("div",{className:"pkt-messagebox__title",children:s}),e.jsx("div",{className:"pkt-messagebox__text",children:r})]}):null});for(var B=[],be=0;be<256;++be)B.push((be+256).toString(16).slice(1));function jt(r,n=0){return(B[r[n+0]]+B[r[n+1]]+B[r[n+2]]+B[r[n+3]]+"-"+B[r[n+4]]+B[r[n+5]]+"-"+B[r[n+6]]+B[r[n+7]]+"-"+B[r[n+8]]+B[r[n+9]]+"-"+B[r[n+10]]+B[r[n+11]]+B[r[n+12]]+B[r[n+13]]+B[r[n+14]]+B[r[n+15]]).toLowerCase()}var ce,gt=new Uint8Array(16);function Nt(){if(!ce&&(ce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ce(gt)}var yt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ae={randomUUID:yt};function wt(r,n,o){if(Ae.randomUUID&&!n&&!r)return Ae.randomUUID();r=r||{};var l=r.random||(r.rng||Nt)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,n){o=o||0;for(var c=0;c<16;++c)n[o+c]=l[c];return n}return jt(l)}const Pt=m.forwardRef(({valueCurrent:r,valueMin:n=0,valueMax:o=100,skin:l="dark-blue",title:c,titlePosition:s="left",statusType:d="none",statusPlacement:a="following",id:u,ariaLabel:p,ariaLabelledby:k,role:_="progressbar",className:j,ariaValueText:y,...S},O)=>{const R=m.useRef(null),[E,C]=m.useState(0),[g,F]=m.useState(u);m.useEffect(()=>{u||F(wt())},[u]),m.useEffect(()=>{if(R.current){const h=R.current;C(h.getBoundingClientRect().width)}});const H=o-n,W=r/H*100,V=o!==100||n!==0?Math.round(W):r,G=`${r} av ${o}`,M=d!=="none",J=L("pkt-progressbar__bar",{[`pkt-progressbar__bar--${l}`]:l}),z=L("pkt-progressbar__title",{"pkt-progressbar__title-center":s==="center"}),U=L("pkt-progressbar__status",{"pkt-progressbar__status--center":a==="center"}),$=L({"pkt-progressbar__status-placement--following":a==="following","pkt-progressbar__status-placement--center":a==="center","pkt-progressbar__status-placement--left":a==="left"});return e.jsxs("div",{...S,ref:O,className:L("pkt-progressbar__container",j),id:g,style:{"--pkt-progress-label-width":`${E}px`,"--pkt-progress-width":`${V}%`},children:[c&&e.jsx("p",{id:`${g}-title`,className:z,children:c}),e.jsx("div",{role:_,className:"pkt-progressbar__bar-wrapper","aria-valuemin":n,"aria-valuemax":o,"aria-valuenow":r,"aria-labelledby":k||c&&`${g}-title`,"aria-label":p,"aria-valuetext":y,children:e.jsx("div",{className:J})}),M&&e.jsx("div",{className:U,children:e.jsx("span",{className:$,ref:R,children:d==="percentage"?`${V}%`:G})})]})}),Le=m.forwardRef(({id:r,name:n,label:o,className:l,hasTile:c=!1,disabled:s=!1,checkHelptext:d,hasError:a=!1,...u},p)=>{const k=[l,"pkt-input-check"].filter(Boolean).join(" ");return e.jsx("div",{className:k,children:e.jsxs("div",{className:`pkt-input-check__input ${c?"pkt-input-check__input--tile":""} ${s&&c?"pkt-input-check__input--tile-disabled":""}`,children:[e.jsx("input",{ref:p,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:r,disabled:s,name:n,...u}),e.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[o,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]})]})})});Le.displayName="PktRadioButton";const Ct=m.forwardRef(({action:r,appearance:n="local",disabled:o=!1,fullwidth:l=!1,id:c,label:s,method:d="get",name:a,placeholder:u="Søk…",suggestions:p,value:k="",onSearch:_,onSuggestionClick:j,...y},S)=>{const O=(g,F)=>{g?g():j&&j(F)},R=`pkt-searchinput pkt-searchinput--${n} ${l?"pkt-searchinput--fullwidth":""}`,E=r?"form":"div",C=s?"label":"div";return e.jsxs(E,{className:R,onSubmit:_&&(()=>_(k)),action:r||void 0,method:r?d:void 0,role:"search",ref:S,...y,children:[e.jsxs(C,{htmlFor:s?c:void 0,className:s?"pkt-inputwrapper__label":"",children:[s&&e.jsx(e.Fragment,{children:s}),e.jsxs("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[e.jsx("input",{className:`pkt-input ${l?"pkt-input--fullwidth":""}`,type:"search",name:a||c,id:c,placeholder:u,defaultValue:k,disabled:o,onInput:_&&(g=>_(g.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${c}-suggestions`}),e.jsx(ee,{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:o,onClick:_&&(()=>_(k)),onKeyUp:_&&(g=>g.key==="Enter"&&_(k)),children:s||u})]})]}),p&&e.jsx("ul",{id:`${c}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:p.map((g,F)=>e.jsx("li",{children:m.createElement(g.href?"a":g.onClick?"button":"div",{href:g.href,className:`pkt-searchinput__suggestion ${g.onClick?"pkt-link-button":""} ${g.href||g.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:g.onClick?"button":void 0,onClick:()=>O(g.onClick,F),onKeyUp:()=>O(g.onClick,F)},e.jsxs(e.Fragment,{children:[g.title&&e.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:g.title}),g.text&&e.jsx("p",{className:"pkt-searchinput__suggestion-text",children:g.text})]}))},`search-suggestion-${F}`))})]})}),Et=m.forwardRef(({ariaDescribedby:r,ariaLabelledby:n,children:o,className:l,disabled:c=!1,errorMessage:s,hasError:d,helptext:a,helptextDropdown:u,helptextDropdownButton:p,id:k,inline:_=!1,fullwidth:j=!1,label:y,name:S,optionalTag:O=!1,optionalText:R,requiredTag:E=!1,requiredText:C,...g},F)=>{const H=[l,"pkt-select"].join(" ");return e.jsx(ae,{className:H,forId:k,label:y,helptext:a,helptextDropdown:u,helptextDropdownButton:p,optionalTag:O,optionalText:R,requiredTag:E,requiredText:C,hasError:d,errorMessage:s,disabled:c,inline:_,ariaDescribedby:r,children:e.jsx("select",{ref:F,className:`pkt-input ${j?"pkt-input--fullwidth":""}`,"aria-invalid":d,"aria-errormessage":`${k}-error`,"aria-labelledby":n||`${k}-label`,disabled:c,id:k,name:S||k,...g,children:o})})}),St=m.forwardRef(({activeStep:r,className:n,children:o,hideNonActiveStepsContent:l=!0,orientation:c="vertical",...s},d)=>{const a=L(n,"pkt-stepper",c==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),u=m.Children.map(o,(p,k)=>m.isValidElement(p)?m.cloneElement(p,{className:L(p.props.className,{"pkt-step--hidden":l&&k!==r})}):p);return e.jsx("ol",{"data-testid":"pkt-stepper",className:a,ref:d,...s,children:u})}),Tt=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:e.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),$t=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[e.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),e.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Rt=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[e.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),e.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"})]}),It=({children:r,className:n,status:o="incomplete",title:l})=>e.jsxs("li",{className:L("pkt-step",n,`pkt-step--${o}`),"data-testid":"pkt-step",children:[e.jsx("span",{className:"pkt-step__line pkt-step__line--1"}),e.jsx("span",{className:"pkt-step__line pkt-step__line--2"}),e.jsx("span",{className:L("pkt-step__indicator"),children:o==="current"?$t:o==="completed"?Rt:Tt}),e.jsx("span",{className:"pkt-step__line pkt-step__line--3",role:"separator"}),e.jsxs("div",{className:"pkt-step__wrapper",children:[e.jsx("div",{className:"pkt-step__title",children:l}),e.jsx("div",{className:"pkt-step__content",children:r})]})]}),Ot=({className:r,compact:n=!1,skin:o="basic",responsiveView:l=!0,children:c})=>e.jsx("table",{"data-testid":"pkt-table",className:L(r,"pkt-table",{"pkt-table--responsive":l,"pkt-table--compact":n,"pkt-table--basic":o==="basic","pkt-table--zebra-blue":o==="zebra-blue"}),role:"table",children:c}),Ft=({children:r,className:n,dataLabel:o})=>e.jsx("td",{className:L(n,"pkt-table__data-cell",{}),"data-label":o,role:"cell","data-testid":"pkt-table__data-cell",children:r}),Dt=({className:r,children:n})=>e.jsx("th",{className:L(r,"pkt-table__header-cell",{}),role:"columnheader",children:n}),At=({className:r,children:n})=>e.jsx("thead",{className:L(r,"pkt-table__header",{}),role:"rowgroup",children:n}),Lt=({className:r,children:n})=>e.jsx("tr",{className:L(r,"pkt-table__row",{}),role:"row",children:n}),Bt=({children:r,className:n})=>e.jsx("tbody",{className:L(n,"pkt-table__body",{}),role:"rowgroup",children:r}),pe=m.forwardRef(({children:r,className:n,skin:o="blue",textStyle:l="normal-text",size:c="medium",closeTag:s=!1,iconName:d="",type:a="button",ariaLabel:u="close",onClick:p=()=>{}},k)=>{const[_,j]=m.useState(!1),y=E=>{j(!0),p(E)},S=["pkt-tag",c&&`pkt-tag--${c}`,o&&`pkt-tag--${o}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),O=["pkt-tag","pkt-btn","pkt-btn--tertiary",c&&`pkt-tag--${c}`,o&&`pkt-tag--${o}`,l&&`pkt-tag--${l}`,d&&s?"pkt-btn--icons-right-and-left":null,s&&!d?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),R=!_;return s&&d?e.jsx(e.Fragment,{children:R&&e.jsxs("button",{className:O,type:a,"aria-label":u,onClick:y,ref:k,children:[e.jsx(v,{className:"pkt-tag__icon",name:d}),r,e.jsx(v,{className:"pkt-tag__close-btn",name:"close"})]})}):s?e.jsx(e.Fragment,{children:R&&e.jsxs("button",{className:O,type:a,"aria-label":u,onClick:y,ref:k,children:[e.jsx(v,{className:"pkt-tag__close-btn",name:"close"}),r]})}):d?e.jsxs("span",{className:S,children:[e.jsx(v,{className:"pkt-tag__icon",name:d}),r]}):e.jsx("span",{className:S,children:r})});pe.displayName="PktTag";const Ut=m.forwardRef(({arrowNav:r=!0,tabs:n,onTabSelected:o},l)=>{const c=m.useRef([]);m.useEffect(()=>{c.current=c.current.slice(0,n.length)},[n]);const s=(a,u)=>{u.action&&u.action(a),o&&o(a)},d=(a,u)=>{var p,k;r&&(u.code==="ArrowLeft"&&a!==0&&((p=c.current[a-1])==null||p.focus()),u.code==="ArrowRight"&&a<n.length-1&&((k=c.current[a+1])==null||k.focus()),(u.code==="ArrowDown"||u.code==="Space")&&s(a,n[a]))};return e.jsx("div",{className:"pkt-tabs",ref:l,children:e.jsx("div",{className:"pkt-tabs__list",role:r?"tablist":"navigation",children:n.map((a,u)=>e.jsx(m.Fragment,{children:a.href?e.jsxs("a",{"aria-selected":!!a.active,role:r?"tab":void 0,href:a.href,"aria-controls":a.controls,className:`pkt-tabs__link ${a.active?"active":""}`,onKeyUp:p=>d(u,p),onClick:()=>s(u,a),tabIndex:a.active||!r?void 0:-1,ref:p=>{c.current[u]=p},children:[a.icon&&e.jsx(v,{name:a.icon,className:"pkt-icon--small"}),a.text,a.tag&&e.jsx(pe,{skin:a.tag.skin,size:"small",children:a.tag.text})]}):e.jsxs("button",{"aria-selected":!!a.active,role:r?"tab":void 0,type:"button","aria-controls":a.controls,className:`pkt-tabs__button pkt-link-button ${a.active?"active":""}`,onKeyUp:p=>d(u,p),onClick:()=>s(u,a),tabIndex:a.active||!r?void 0:-1,ref:p=>{c.current[u]=p},children:[a.icon&&e.jsx(v,{name:a.icon,className:"pkt-icon--small"}),a.text,a.tag&&e.jsx(pe,{skin:a.tag.skin,size:"small",children:a.tag.text})]},"b-"+u)},u))})})}),Wt=m.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:o,counter:l,counterMaxLength:c,className:s,disabled:d,errorMessage:a,hasError:u,helptext:p,helptextDropdown:k,helptextDropdownButton:_,inline:j,fullwidth:y=!1,label:S,name:O,optionalTag:R=!1,optionalText:E,requiredTag:C=!1,requiredText:g,placeholder:F,rows:H,useWrapper:W=!0,onChange:V,...G},M)=>{const J=[s,"pkt-textinput","pkt-textarea"].join(" "),z=o||`${r}-label`,U=m.useRef(null),[$,h]=m.useState(0),A=X=>{var Z,le;if(l&&h(((le=(Z=X.currentTarget)==null?void 0:Z.value)==null?void 0:le.length)||0),V)return V(X)};return m.useEffect(()=>{var X,Z;typeof M=="function"&&M(U.current),l&&h(((Z=(X=U==null?void 0:U.current)==null?void 0:X.value)==null?void 0:Z.length)||0)},[M]),e.jsxs(ae,{ariaDescribedby:n,className:J,disabled:d,errorMessage:a,forId:r,hasError:u,helptext:p,helptextDropdown:k,helptextDropdownButton:_,inline:j,label:S,optionalTag:R,optionalText:E,requiredTag:C,requiredText:g,useWrapper:W,children:[e.jsx("textarea",{ref:U,className:`pkt-input ${y?"pkt-input--fullwidth":""} ${c&&$>c?"pkt-input--counter-error":""}`,name:O||r,id:r,placeholder:F,disabled:d,rows:H,"aria-labelledby":z,"aria-invalid":u,"aria-errormessage":`${r}-error`,...G,onChange:A}),l&&e.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[$||0,c&&`/${c}`]})]})}),Vt=m.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:o,autocomplete:l="off",className:c,disabled:s=!1,errorMessage:d,hasError:a=!1,helptext:u,helptextDropdown:p,helptextDropdownButton:k,iconNameRight:_,inline:j=!1,fullwidth:y=!1,label:S,name:O,optionalTag:R=!1,optionalText:E,requiredTag:C=!1,requiredText:g,placeholder:F,prefix:H,suffix:W,type:V="text",useWrapper:G=!0,omitSearchIcon:M=!1,value:J,...z},U)=>{const $=[c,"pkt-textinput"].join(" "),h=o||`${r}-label`,A=V==="search"&&!_&&!M;return e.jsx(ae,{ariaDescribedby:n,className:$,disabled:s,errorMessage:d,forId:r,hasError:a,helptext:u,helptextDropdown:p,helptextDropdownButton:k,inline:j,label:S,optionalTag:R,optionalText:E,requiredTag:C,requiredText:g,useWrapper:G,children:e.jsxs("div",{className:"pkt-input__container",children:[H&&e.jsx("div",{className:"pkt-input-prefix",children:H}),e.jsx("input",{ref:U,className:`pkt-input ${y?"pkt-input--fullwidth":""}`,type:V,name:O||r,id:r,placeholder:F,autoComplete:l,value:J,disabled:s,"aria-invalid":a,"aria-errormessage":`${r}-error`,"aria-labelledby":h,...z}),W&&e.jsxs("p",{className:"pkt-input-suffix",children:[W,_&&e.jsx(v,{className:"pkt-input-suffix-icon",name:_}),A&&e.jsx(v,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!W&&_&&e.jsx(v,{className:"pkt-input-icon",name:_}),!W&&A&&e.jsx(v,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});x.PktAccordion=it,x.PktAccordionItem=ft,x.PktAlert=Ie,x.PktBackLink=kt,x.PktBreadcrumbs=mt,x.PktButton=ee,x.PktCheckbox=Oe,x.PktFooter=ht,x.PktFooterSimple=_t,x.PktHeader=bt,x.PktIcon=v,x.PktIconContext=$e,x.PktInput=Fe,x.PktInputWrapper=ae,x.PktLinkCard=De,x.PktLoader=vt,x.PktMessagebox=xt,x.PktProgressbar=Pt,x.PktRadioButton=Le,x.PktSearchInput=Ct,x.PktSelect=Et,x.PktStep=It,x.PktStepper=St,x.PktTable=Ot,x.PktTableBody=Bt,x.PktTableDataCell=Ft,x.PktTableHeader=At,x.PktTableHeaderCell=Dt,x.PktTableRow=Lt,x.PktTabs=Ut,x.PktTag=pe,x.PktTextarea=Wt,x.PktTextinput=Vt,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
36
+ */(function(r){(function(){var n={}.hasOwnProperty;function o(){for(var s="",d=0;d<arguments.length;d++){var a=arguments[d];a&&(s=c(s,l(a)))}return s}function l(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return o.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var d="";for(var a in s)n.call(s,a)&&s[a]&&(d=c(d,a));return d}function c(s,d){return d?s?s+" "+d:s+d:s}r.exports?(o.default=o,r.exports=o):window.classNames=o})()})(Re);var dt=Re.exports;const L=st(dt),ft=m.forwardRef(({title:r,className:n,children:o,toggleProps:l,defaultOpen:c=!1,id:s},d)=>{const[a,u]=m.useState(c),p=l?l.isOpen:a,k=y=>y??void 0,_=(y,S)=>{y.preventDefault(),l!==void 0&&l.onToggleClick(y,S),u(!p)},j=L(n,"pkt-accordion-item");return e.jsxs("details",{className:j,ref:d,id:s,open:k(l?l.isOpen:a),children:[e.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${s}`,onClick:y=>_(y,s),children:[r,e.jsx(v,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),e.jsx("div",{id:`pkt-accordion-item-content-${s}`,role:"region",className:"pkt-accordion-item__content",children:o})]})}),Ie=m.forwardRef(({children:r,className:n,skin:o="info",closeAlert:l=!1,onClose:c,title:s,date:d,ariaLive:a="polite",compact:u=!1,...p},k)=>{const _=[n,"pkt-alert",o&&`pkt-alert--${o}`,u&&"pkt-alert--compact"].filter(Boolean).join(" "),[j,y]=m.useState(!0),S=()=>{y(!1),c&&c()};return j?e.jsxs("div",{...p,className:_,"aria-live":a,ref:k,children:[e.jsx(v,{className:"pkt-alert__icon",name:o==="info"?"alert-information":`alert-${o}`}),l&&e.jsx("div",{className:"pkt-alert__close",children:e.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:S,children:e.jsx(v,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),s&&e.jsx("div",{className:"pkt-alert__title",children:s}),e.jsx("div",{className:"pkt-alert__text",children:r}),d&&e.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",d]})]}):null}),kt=m.forwardRef(({href:r,text:n,onClick:o,className:l,...c},s)=>{const d=[l,"pkt-back-link"].filter(Boolean).join(" "),a=u=>{o&&o(u)};return e.jsx("nav",{ref:s,className:d,"aria-label":"Gå tilbake et steg",children:e.jsxs("a",{href:r||"/",className:"pkt-link pkt-link--icon-left",onClick:a,...c,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),e.jsx("span",{className:"pkt-back-link__text",children:n||"Forsiden"})]})})}),mt=m.forwardRef(({breadcrumbs:r,navigationType:n,className:o,...l},c)=>{const s=r.slice(0,4),d=s[s.length-2],a=[o,"pkt-breadcrumbs"].filter(Boolean).join(" ");return e.jsxs("nav",{ref:c,"aria-label":"brødsmulemeny",className:a,children:[e.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:s.map((u,p)=>e.jsx("li",{className:"pkt-breadcrumbs__item",children:p===s.length-1?e.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})}):n==="router"?e.jsxs(Ee.Link,{to:u.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[e.jsx(v,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]}):e.jsxs("a",{href:u.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...l,children:[e.jsx(v,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]})},`breadcrumb-${p}`))}),n==="router"?e.jsxs(Ee.Link,{to:d.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):e.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...l,children:[e.jsx(v,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),e.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})]})}),ee=m.forwardRef(({children:r,className:n,iconName:o="user",secondIconName:l="user",size:c="medium",skin:s="primary",type:d="button",variant:a="label-only",color:u,isLoading:p=!1,...k},_)=>{const j=[n,"pkt-btn",c&&`pkt-btn--${c}`,s&&`pkt-btn--${s}`,a&&`pkt-btn--${a}`,u&&`pkt-btn--${u}`,p&&"pkt-btn--active"].filter(Boolean).join(" ");return e.jsxs("button",{...k,className:j,type:d,ref:_,children:[p&&e.jsx(v,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/11.16/animations/"}),a!=="label-only"&&e.jsx(v,{className:"pkt-btn__icon",name:o}),e.jsx("span",{className:"pkt-btn__text",children:r}),a==="icons-right-and-left"&&e.jsx(v,{className:"pkt-btn__icon",name:l})]})});ee.displayName="PktButton";const Oe=m.forwardRef(({id:r,hasTile:n=!1,disabled:o=!1,label:l,labelPosition:c="right",hideLabel:s=!1,checkHelptext:d,hasError:a=!1,isSwitch:u=!1,className:p,...k},_)=>{const j=[p,"pkt-input-check"].filter(Boolean).join(" ");return e.jsx("div",{className:j,children:e.jsxs("div",{className:`pkt-input-check__input ${n?"pkt-input-check__input--tile":""} ${o&&n?"pkt-input-check__input--tile-disabled":""}`,children:[l&&c==="left"&&e.jsxs("label",{className:`pkt-input-check__input-label ${s?"pkt-sr-only":""}`,htmlFor:r,children:[l,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]}),e.jsx("input",{ref:_,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:u?"switch":"checkbox",id:r,disabled:o,...k}),l&&c==="right"&&e.jsxs("label",{className:`pkt-input-check__input-label ${s?"pkt-sr-only":""}`,htmlFor:r,children:[l,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]})]})})});Oe.displayName="PktCheckbox";const ht=({columnOne:r,columnTwo:n,socialLinks:o,className:l,personvernOgInfoLink:c="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:s="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var a,u;const d=[l,"pkt-footer"].filter(Boolean).join(" ");return e.jsx("footer",{className:d,"data-mode":"dark",children:e.jsxs("div",{className:"pkt-footer__container",children:[e.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:r.title}),e.jsxs("ul",{className:"pkt-footer__list",children:[r.text&&e.jsx("li",{className:"pkt-footer__text",children:r.text}),(a=r.links)==null?void 0:a.map((p,k)=>e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:`pkt-footer__link ${p.external?"pkt-link--external":""}`,href:p.href,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),p.text]})},`links-${k}`))]})]}),e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:n.title}),e.jsxs("ul",{className:"pkt-footer__list",children:[n.text&&e.jsx("li",{className:"pkt-footer__text",children:n.text}),(u=n.links)==null?void 0:u.map((p,k)=>e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:`pkt-footer__link ${p.external?"pkt-link--external":""}`,href:p.href,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),p.text]})},`links-${k}`))]})]}),e.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[e.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),e.jsxs("ul",{className:"pkt-footer__list",children:[e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:"pkt-footer__link",href:c,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),e.jsx("li",{className:"pkt-footer__list-item",children:e.jsxs("a",{className:"pkt-footer__link",href:s,children:[e.jsx(v,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),o&&e.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[e.jsx("div",{className:"pkt-footer__social-languages",children:o.filter(p=>p.language).map((p,k)=>e.jsx("div",{className:"pkt-footer__social-language",children:e.jsx("a",{href:p.href,"aria-label":`til ${p.language} versjon av nettsiden`,target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:p.language})},`sociallinks-language-${k}`))}),e.jsx("div",{className:"pkt-footer__social-icons",children:o.filter(p=>p.iconName).map((p,k)=>e.jsx(m.Fragment,{children:e.jsx("a",{href:p.href,"aria-label":`til ${p.iconName}`,className:"pkt-footer__social-icon-link",target:p.openInNewTab?"_blank":"_self",rel:p.openInNewTab?"noopener noreferrer":void 0,children:e.jsx(v,{className:"pkt-footer__social-icon",name:p.iconName})})},`sociallinks-${k}`))})]})]})})},_t=({links:r=[],personvernOgInfoLink:n="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/",className:l})=>{const c=[l,"pkt-footer-simple"].filter(Boolean).join(" ");return e.jsx("footer",{className:c,"data-mode":"dark",children:e.jsx("div",{className:"pkt-footer-simple__container",children:e.jsxs("ul",{className:"pkt-footer-simple__list",children:[r.map((s,d)=>e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:`pkt-footer-simple__link ${s.external?" pkt-link--external":""}`,href:s.href,target:s.openInNewTab?"_blank":"_self",rel:s.openInNewTab?"noopener noreferrer":void 0,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),s.text]})},d)),e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:"pkt-footer-simple__link",href:n,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),e.jsx("li",{className:"pkt-footer-simple__list-item",children:e.jsxs("a",{className:"pkt-footer-simple__link",href:o,children:[e.jsx(v,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},bt=m.forwardRef(({className:r,logoLink:n="https://www.oslo.kommune.no/",serviceName:o,fixed:l=!0,scrollToHide:c=!0,user:s,userMenu:d,representing:a,userOptions:u,userMenuFooter:p,canChangeRepresentation:k=!0,showMenuButton:_=!1,showLogOutButton:j=!1,openMenu:y,logOut:S,changeRepresentation:O,children:R,...E},C)=>{const g=m.useMemo(()=>typeof(s==null?void 0:s.lastLoggedIn)=="string"?s.lastLoggedIn:s!=null&&s.lastLoggedIn?new Date(s.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[s]),[F,H]=m.useState(!1),[W,V]=m.useState(0),[G,M]=m.useState(!1),J=m.useRef(null);m.useEffect(()=>(document.addEventListener("mouseup",U),window.addEventListener("scroll",$),()=>{document.removeEventListener("mouseup",U),window.removeEventListener("scroll",$)}));const z=()=>{M(!G)},U=h=>{J.current&&!J.current.contains(h.target)&&M(!1)},$=()=>{if(c){const h=window.pageYOffset||document.documentElement.scrollTop;if(h<0||Math.abs(h-W)<60)return;H(h>W),V(h)}};return e.jsxs("header",{...E,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:L(r,"pkt-header",{"pkt-header--fixed":l,"pkt-header--scroll-to-hide":c,"pkt-header--hidden":F}),ref:C,children:[e.jsxs("div",{className:"pkt-header__logo",children:[typeof n=="string"?e.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:n,children:e.jsx(v,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.16/logos/"})}):e.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:n,children:e.jsx(v,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/11.16/logos/"})}),e.jsx("span",{className:"pkt-header__logo-service",children:o})]}),e.jsx("nav",{className:"pkt-header__actions",children:e.jsxs("ul",{className:"pkt-header__actions-row",children:[_&&e.jsx("li",{children:e.jsx(ee,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:y,children:"Meny"})}),(s||a)&&e.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${G&&!F?"pkt-header--open-dropdown":""}`,ref:J,children:[e.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":G,onClick:z,children:[e.jsx(v,{name:"user",className:"pkt-btn__icon"}),e.jsx("span",{className:"pkt-header__user-fullname",children:(a==null?void 0:a.name)||(s==null?void 0:s.name)}),e.jsx("span",{className:"pkt-header__user-shortname",children:(a==null?void 0:a.shortname)||(s==null?void 0:s.shortname)}),e.jsx(v,{name:"chevron-thin-down",className:"pkt-btn--closed"}),e.jsx(v,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),e.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[s&&e.jsxs("li",{children:[e.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),e.jsx("div",{className:"pkt-user-menu__name",children:s.name}),s.lastLoggedIn&&e.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",e.jsx("time",{children:g})]})]}),d&&e.jsx("li",{children:e.jsx("ul",{className:"pkt-list",children:d.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsxs("a",{href:h.target,className:"pkt-link",children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]}):e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]})},`userMenu-${A}`))})}),(a||k)&&e.jsxs("li",{children:[a&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),e.jsx("div",{className:"pkt-user-menu__name",children:a.name}),a.orgNumber&&e.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",a.orgNumber]})]}),e.jsx("ul",{className:"pkt-list mt-size-16",children:k&&e.jsx("li",{children:e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:O,children:[e.jsx(v,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),e.jsx("li",{children:e.jsx("ul",{className:"pkt-list",children:(u||!j)&&e.jsxs(e.Fragment,{children:[u==null?void 0:u.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsxs("a",{href:h.target,className:"pkt-link",children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]}):e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:[h.iconName&&e.jsx(v,{name:h.iconName,className:"pkt-link__icon"}),h.title]})},`userOptions-${A}`)),!j&&e.jsx("li",{children:e.jsxs("button",{className:"pkt-link-button pkt-link",onClick:S,children:[e.jsx(v,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),p&&e.jsx("li",{className:"footer",children:e.jsx("ul",{className:"pkt-list-horizontal bordered",children:p.map((h,A)=>e.jsx("li",{children:typeof h.target=="string"?e.jsx("a",{href:h.target,className:"pkt-link",children:h.title}):e.jsx("button",{className:"pkt-link-button pkt-link",onClick:h.target,children:h.title})},`userMenuFooter-${A}`))})})]})]}),R&&e.jsx("li",{children:R}),j&&e.jsx("li",{children:e.jsx(ee,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:S,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Fe=m.forwardRef(({label:r,id:n,children:o,...l},c)=>e.jsxs("div",{className:"pkt-form-group",children:[e.jsx("label",{htmlFor:n,className:"pkt-form-label",children:r}),e.jsx("input",{className:"pkt-form-input",id:n,...l,ref:c}),o]}));Fe.displayName="PktInput";const ae=m.forwardRef(({forId:r,label:n,helptext:o,helptextDropdown:l,helptextDropdownButton:c,optionalTag:s=!1,optionalText:d="Valgfritt",requiredTag:a=!1,requiredText:u="Må fylles ut",hasError:p,errorMessage:k,disabled:_,inline:j,ariaDescribedby:y,useWrapper:S=!0,children:O,className:R,hasFieldset:E=!1},C)=>{const[g,F]=m.useState(!1),H=()=>{F(!g)},W=()=>s?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":a?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",V=s?d:a?u:"",G=_?"pkt-inputwrapper--disabled":"",M=j?"pkt-inputwrapper--inline":"",J=p?"pkt-inputwrapper--error":"",z=!!l&&l!=="",U=c||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',$=E?"fieldset":z?"div":"label",h=E?"legend":z?"h2":"span",A=y||(o?`${r}-helptext`:void 0);return e.jsxs("div",{className:["pkt-inputwrapper",R,G,M,J].join(" "),ref:C,children:[S?e.jsx(e.Fragment,{children:e.jsxs($,{htmlFor:E?void 0:r,"aria-describedby":z?void 0:y,className:`pkt-inputwrapper__label${E?" pkt-inputwrapper__fieldset":""}`,children:[e.jsxs(h,{id:`${r}-label`,className:`${E?" pkt-inputwrapper__legend":""}`,children:[n,V!==""&&e.jsx("span",{className:W(),children:V})]}),o&&e.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${r}-helptext`,dangerouslySetInnerHTML:{__html:o}}),z&&l!==""&&e.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[e.jsx(ee,{skin:"tertiary",size:"small",variant:"icon-right",iconName:g?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:H,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:U}})}),e.jsx("div",{className:`pkt-inputwrapper__helptext ${g?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:e.jsx("span",{dangerouslySetInnerHTML:{__html:l}})}),!E&&e.jsx("label",{htmlFor:r,className:"pkt-sr-only","aria-describedby":A,children:n})]}),e.jsx(e.Fragment,{children:O})]})}):e.jsxs(e.Fragment,{children:[!E&&e.jsx("label",{htmlFor:r,className:"pkt-sr-only","aria-describedby":A,id:`${r}-label`,children:n}),O]}),p&&k&&e.jsx("div",{children:e.jsx(Ie,{skin:"error","aria-live":"assertive",id:`${r}-error`,compact:!0,children:k})})]})});ae.displayName="PktInputWrapper";const De=m.forwardRef(({children:r,className:n,iconName:o,openInNewTab:l=!1,skin:c="normal",href:s="#",external:d=!1,title:a,...u},p)=>{const k=[n,"pkt-linkcard",c&&`pkt-linkcard--${c}`].filter(Boolean).join(" ");return e.jsxs("a",{...u,href:s,className:`pkt-linkcard pkt-link ${k}`,target:l?"_blank":"_self",rel:l?"noopener noreferrer":void 0,ref:p,children:[o&&e.jsx(v,{className:"pkt-link__icon",name:o}),e.jsxs("div",{className:"pkt-linkcard__content",children:[e.jsx("div",{className:`pkt-linkcard__title ${d?"pkt-link pkt-link--external":""}`,children:a}),e.jsx("div",{className:"pkt-linkcard__text",children:r})]})]})});De.displayName="PktLinkCard";const vt=m.forwardRef(({className:r,message:n,size:o="medium",inline:l=!1,isLoading:c=!0,variant:s="rainbow",delay:d=0,children:a,...u},p)=>{const k=`pkt-loader pkt-loader--${o}`,[_,j]=m.useState(!(d>0));d>0&&setTimeout(()=>{j(!0)},d);const y=S=>S==="shapes"?"loader":S==="blue"?"spinner-blue":"spinner";return e.jsx("div",{role:"status","aria-live":"polite","aria-busy":c,className:`pkt-loader--${l?"inline":"box"} ${r||""}`,children:c?e.jsx(e.Fragment,{children:_?e.jsxs("div",{className:k,"data-testid":"pkt-loader",ref:p,...u,children:[e.jsx(v,{name:y(s),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/11.16/animations/",className:`pkt-loader__svg pkt-loader__${s}`}),n&&e.jsx("p",{children:n})]}):null}):a})}),xt=m.forwardRef(({children:r,className:n,compact:o=!1,closable:l=!1,skin:c="beige",title:s,onClose:d,...a},u)=>{const[p,k]=m.useState(!0),_=()=>{k(!1),d&&d()},j=[n,"pkt-messagebox",c&&`pkt-messagebox--${c}`,o&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return p?e.jsxs("div",{...a,className:j,ref:u,children:[l&&e.jsx("div",{className:"pkt-messagebox__close",children:e.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:_,children:e.jsx(v,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),s&&e.jsx("div",{className:"pkt-messagebox__title",children:s}),e.jsx("div",{className:"pkt-messagebox__text",children:r})]}):null});for(var B=[],be=0;be<256;++be)B.push((be+256).toString(16).slice(1));function jt(r,n=0){return(B[r[n+0]]+B[r[n+1]]+B[r[n+2]]+B[r[n+3]]+"-"+B[r[n+4]]+B[r[n+5]]+"-"+B[r[n+6]]+B[r[n+7]]+"-"+B[r[n+8]]+B[r[n+9]]+"-"+B[r[n+10]]+B[r[n+11]]+B[r[n+12]]+B[r[n+13]]+B[r[n+14]]+B[r[n+15]]).toLowerCase()}var ce,gt=new Uint8Array(16);function Nt(){if(!ce&&(ce=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ce))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ce(gt)}var yt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ae={randomUUID:yt};function wt(r,n,o){if(Ae.randomUUID&&!n&&!r)return Ae.randomUUID();r=r||{};var l=r.random||(r.rng||Nt)();if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,n){o=o||0;for(var c=0;c<16;++c)n[o+c]=l[c];return n}return jt(l)}const Pt=m.forwardRef(({valueCurrent:r,valueMin:n=0,valueMax:o=100,skin:l="dark-blue",title:c,titlePosition:s="left",statusType:d="none",statusPlacement:a="following",id:u,ariaLabel:p,ariaLabelledby:k,role:_="progressbar",className:j,ariaValueText:y,...S},O)=>{const R=m.useRef(null),[E,C]=m.useState(0),[g,F]=m.useState(u);m.useEffect(()=>{u||F(wt())},[u]),m.useEffect(()=>{if(R.current){const h=R.current;C(h.getBoundingClientRect().width)}});const H=o-n,W=r/H*100,V=o!==100||n!==0?Math.round(W):r,G=`${r} av ${o}`,M=d!=="none",J=L("pkt-progressbar__bar",{[`pkt-progressbar__bar--${l}`]:l}),z=L("pkt-progressbar__title",{"pkt-progressbar__title-center":s==="center"}),U=L("pkt-progressbar__status",{"pkt-progressbar__status--center":a==="center"}),$=L({"pkt-progressbar__status-placement--following":a==="following","pkt-progressbar__status-placement--center":a==="center","pkt-progressbar__status-placement--left":a==="left"});return e.jsxs("div",{...S,ref:O,className:L("pkt-progressbar__container",j),id:g,style:{"--pkt-progress-label-width":`${E}px`,"--pkt-progress-width":`${V}%`},children:[c&&e.jsx("p",{id:`${g}-title`,className:z,children:c}),e.jsx("div",{role:_,className:"pkt-progressbar__bar-wrapper","aria-valuemin":n,"aria-valuemax":o,"aria-valuenow":r,"aria-labelledby":k||c&&`${g}-title`,"aria-label":p,"aria-valuetext":y,children:e.jsx("div",{className:J})}),M&&e.jsx("div",{className:U,children:e.jsx("span",{className:$,ref:R,children:d==="percentage"?`${V}%`:G})})]})}),Le=m.forwardRef(({id:r,name:n,label:o,className:l,hasTile:c=!1,disabled:s=!1,checkHelptext:d,hasError:a=!1,...u},p)=>{const k=[l,"pkt-input-check"].filter(Boolean).join(" ");return e.jsx("div",{className:k,children:e.jsxs("div",{className:`pkt-input-check__input ${c?"pkt-input-check__input--tile":""} ${s&&c?"pkt-input-check__input--tile-disabled":""}`,children:[e.jsx("input",{ref:p,className:`pkt-input-check__input-checkbox ${a?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:r,disabled:s,name:n,...u}),e.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:r,children:[o,d&&e.jsx("div",{className:"pkt-input-check__input-helptext",children:d})]})]})})});Le.displayName="PktRadioButton";const Ct=m.forwardRef(({action:r,appearance:n="local",disabled:o=!1,fullwidth:l=!1,id:c,label:s,method:d="get",name:a,placeholder:u="Søk…",suggestions:p,value:k="",onSearch:_,onSuggestionClick:j,...y},S)=>{const O=(g,F)=>{g?g():j&&j(F)},R=`pkt-searchinput pkt-searchinput--${n} ${l?"pkt-searchinput--fullwidth":""}`,E=r?"form":"div",C=s?"label":"div";return e.jsxs(E,{className:R,onSubmit:_&&(()=>_(k)),action:r||void 0,method:r?d:void 0,role:"search",ref:S,...y,children:[e.jsxs(C,{htmlFor:s?c:void 0,className:s?"pkt-inputwrapper__label":"",children:[s&&e.jsx(e.Fragment,{children:s}),e.jsxs("div",{className:n==="local"?"pkt-input__container":"pkt-searchinput__field",children:[e.jsx("input",{className:`pkt-input ${l?"pkt-input--fullwidth":""}`,type:"search",name:a||c,id:c,placeholder:u,defaultValue:k,disabled:o,onInput:_&&(g=>_(g.currentTarget.value)),autoComplete:"off","aria-autocomplete":"list","aria-controls":`${c}-suggestions`}),e.jsx(ee,{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:o,onClick:_&&(()=>_(k)),onKeyUp:_&&(g=>g.key==="Enter"&&_(k)),children:s||u})]})]}),p&&e.jsx("ul",{id:`${c}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:p.map((g,F)=>e.jsx("li",{children:m.createElement(g.href?"a":g.onClick?"button":"div",{href:g.href,className:`pkt-searchinput__suggestion ${g.onClick?"pkt-link-button":""} ${g.href||g.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:g.onClick?"button":void 0,onClick:()=>O(g.onClick,F),onKeyUp:()=>O(g.onClick,F)},e.jsxs(e.Fragment,{children:[g.title&&e.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:g.title}),g.text&&e.jsx("p",{className:"pkt-searchinput__suggestion-text",children:g.text})]}))},`search-suggestion-${F}`))})]})}),Et=m.forwardRef(({ariaDescribedby:r,ariaLabelledby:n,children:o,className:l,disabled:c=!1,errorMessage:s,hasError:d,helptext:a,helptextDropdown:u,helptextDropdownButton:p,id:k,inline:_=!1,fullwidth:j=!1,label:y,name:S,optionalTag:O=!1,optionalText:R,requiredTag:E=!1,requiredText:C,...g},F)=>{const H=[l,"pkt-select"].join(" ");return e.jsx(ae,{className:H,forId:k,label:y,helptext:a,helptextDropdown:u,helptextDropdownButton:p,optionalTag:O,optionalText:R,requiredTag:E,requiredText:C,hasError:d,errorMessage:s,disabled:c,inline:_,ariaDescribedby:r,children:e.jsx("select",{ref:F,className:`pkt-input ${j?"pkt-input--fullwidth":""}`,"aria-invalid":d,"aria-errormessage":`${k}-error`,"aria-labelledby":n||`${k}-label`,disabled:c,id:k,name:S||k,...g,children:o})})}),St=m.forwardRef(({activeStep:r,className:n,children:o,hideNonActiveStepsContent:l=!0,orientation:c="vertical",...s},d)=>{const a=L(n,"pkt-stepper",c==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),u=m.Children.map(o,(p,k)=>m.isValidElement(p)?m.cloneElement(p,{className:L(p.props.className,{"pkt-step--hidden":l&&k!==r})}):p);return e.jsx("ol",{"data-testid":"pkt-stepper",className:a,ref:d,...s,children:u})}),Tt=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:e.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),$t=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[e.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),e.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),Rt=e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[e.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),e.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"})]}),It=({children:r,className:n,status:o="incomplete",title:l})=>e.jsxs("li",{className:L("pkt-step",n,`pkt-step--${o}`),"data-testid":"pkt-step",children:[e.jsx("span",{className:"pkt-step__line pkt-step__line--1"}),e.jsx("span",{className:"pkt-step__line pkt-step__line--2"}),e.jsx("span",{className:L("pkt-step__indicator"),children:o==="current"?$t:o==="completed"?Rt:Tt}),e.jsx("span",{className:"pkt-step__line pkt-step__line--3",role:"separator"}),e.jsxs("div",{className:"pkt-step__wrapper",children:[e.jsx("div",{className:"pkt-step__title",children:l}),e.jsx("div",{className:"pkt-step__content",children:r})]})]}),Ot=({className:r,compact:n=!1,skin:o="basic",responsiveView:l=!0,children:c})=>e.jsx("table",{"data-testid":"pkt-table",className:L(r,"pkt-table",{"pkt-table--responsive":l,"pkt-table--compact":n,"pkt-table--basic":o==="basic","pkt-table--zebra-blue":o==="zebra-blue"}),role:"table",children:c}),Ft=({children:r,className:n,dataLabel:o})=>e.jsx("td",{className:L(n,"pkt-table__data-cell",{}),"data-label":o,role:"cell","data-testid":"pkt-table__data-cell",children:r}),Dt=({className:r,children:n})=>e.jsx("th",{className:L(r,"pkt-table__header-cell",{}),role:"columnheader",children:n}),At=({className:r,children:n})=>e.jsx("thead",{className:L(r,"pkt-table__header",{}),role:"rowgroup",children:n}),Lt=({className:r,children:n})=>e.jsx("tr",{className:L(r,"pkt-table__row",{}),role:"row",children:n}),Bt=({children:r,className:n})=>e.jsx("tbody",{className:L(n,"pkt-table__body",{}),role:"rowgroup",children:r}),pe=m.forwardRef(({children:r,className:n,skin:o="blue",textStyle:l="normal-text",size:c="medium",closeTag:s=!1,iconName:d="",type:a="button",ariaLabel:u="close",onClick:p=()=>{}},k)=>{const[_,j]=m.useState(!1),y=E=>{j(!0),p(E)},S=["pkt-tag",c&&`pkt-tag--${c}`,o&&`pkt-tag--${o}`,l&&`pkt-tag--${l}`,n].filter(Boolean).join(" "),O=["pkt-tag","pkt-btn","pkt-btn--tertiary",c&&`pkt-tag--${c}`,o&&`pkt-tag--${o}`,l&&`pkt-tag--${l}`,d&&s?"pkt-btn--icons-right-and-left":null,s&&!d?"pkt-btn--icon-right":null,n].filter(Boolean).join(" "),R=!_;return s&&d?e.jsx(e.Fragment,{children:R&&e.jsxs("button",{className:O,type:a,"aria-label":u,onClick:y,ref:k,children:[e.jsx(v,{className:"pkt-tag__icon",name:d}),r,e.jsx(v,{className:"pkt-tag__close-btn",name:"close"})]})}):s?e.jsx(e.Fragment,{children:R&&e.jsxs("button",{className:O,type:a,"aria-label":u,onClick:y,ref:k,children:[e.jsx(v,{className:"pkt-tag__close-btn",name:"close"}),r]})}):d?e.jsxs("span",{className:S,children:[e.jsx(v,{className:"pkt-tag__icon",name:d}),r]}):e.jsx("span",{className:S,children:r})});pe.displayName="PktTag";const Ut=m.forwardRef(({arrowNav:r=!0,tabs:n,onTabSelected:o},l)=>{const c=m.useRef([]);m.useEffect(()=>{c.current=c.current.slice(0,n.length)},[n]);const s=(a,u)=>{u.action&&u.action(a),o&&o(a)},d=(a,u)=>{var p,k;r&&(u.code==="ArrowLeft"&&a!==0&&((p=c.current[a-1])==null||p.focus()),u.code==="ArrowRight"&&a<n.length-1&&((k=c.current[a+1])==null||k.focus()),(u.code==="ArrowDown"||u.code==="Space")&&s(a,n[a]))};return e.jsx("div",{className:"pkt-tabs",ref:l,children:e.jsx("div",{className:"pkt-tabs__list",role:r?"tablist":"navigation",children:n.map((a,u)=>e.jsx(m.Fragment,{children:a.href?e.jsxs("a",{"aria-selected":!!a.active,role:r?"tab":void 0,href:a.href,"aria-controls":a.controls,className:`pkt-tabs__link ${a.active?"active":""}`,onKeyUp:p=>d(u,p),onClick:()=>s(u,a),tabIndex:a.active||!r?void 0:-1,ref:p=>{c.current[u]=p},children:[a.icon&&e.jsx(v,{name:a.icon,className:"pkt-icon--small"}),a.text,a.tag&&e.jsx(pe,{skin:a.tag.skin,size:"small",children:a.tag.text})]}):e.jsxs("button",{"aria-selected":!!a.active,role:r?"tab":void 0,type:"button","aria-controls":a.controls,className:`pkt-tabs__button pkt-link-button ${a.active?"active":""}`,onKeyUp:p=>d(u,p),onClick:()=>s(u,a),tabIndex:a.active||!r?void 0:-1,ref:p=>{c.current[u]=p},children:[a.icon&&e.jsx(v,{name:a.icon,className:"pkt-icon--small"}),a.text,a.tag&&e.jsx(pe,{skin:a.tag.skin,size:"small",children:a.tag.text})]},"b-"+u)},u))})})}),Wt=m.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:o,counter:l,counterMaxLength:c,className:s,disabled:d,errorMessage:a,hasError:u,helptext:p,helptextDropdown:k,helptextDropdownButton:_,inline:j,fullwidth:y=!1,label:S,name:O,optionalTag:R=!1,optionalText:E,requiredTag:C=!1,requiredText:g,placeholder:F,rows:H,useWrapper:W=!0,onChange:V,...G},M)=>{const J=[s,"pkt-textinput","pkt-textarea"].join(" "),z=o||`${r}-label`,U=m.useRef(null),[$,h]=m.useState(0),A=X=>{var Z,le;if(l&&h(((le=(Z=X.currentTarget)==null?void 0:Z.value)==null?void 0:le.length)||0),V)return V(X)};return m.useEffect(()=>{var X,Z;typeof M=="function"&&M(U.current),l&&h(((Z=(X=U==null?void 0:U.current)==null?void 0:X.value)==null?void 0:Z.length)||0)},[M]),e.jsxs(ae,{ariaDescribedby:n,className:J,disabled:d,errorMessage:a,forId:r,hasError:u,helptext:p,helptextDropdown:k,helptextDropdownButton:_,inline:j,label:S,optionalTag:R,optionalText:E,requiredTag:C,requiredText:g,useWrapper:W,children:[e.jsx("textarea",{ref:U,className:`pkt-input ${y?"pkt-input--fullwidth":""} ${c&&$>c?"pkt-input--counter-error":""}`,name:O||r,id:r,placeholder:F,disabled:d,rows:H,"aria-labelledby":z,"aria-invalid":u,"aria-errormessage":`${r}-error`,...G,onChange:A}),l&&e.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[$||0,c&&`/${c}`]})]})}),Vt=m.forwardRef(({id:r,ariaDescribedby:n,ariaLabelledby:o,autocomplete:l="off",className:c,disabled:s=!1,errorMessage:d,hasError:a=!1,helptext:u,helptextDropdown:p,helptextDropdownButton:k,iconNameRight:_,inline:j=!1,fullwidth:y=!1,label:S,name:O,optionalTag:R=!1,optionalText:E,requiredTag:C=!1,requiredText:g,placeholder:F,prefix:H,suffix:W,type:V="text",useWrapper:G=!0,omitSearchIcon:M=!1,value:J,...z},U)=>{const $=[c,"pkt-textinput"].join(" "),h=o||`${r}-label`,A=V==="search"&&!_&&!M;return e.jsx(ae,{ariaDescribedby:n,className:$,disabled:s,errorMessage:d,forId:r,hasError:a,helptext:u,helptextDropdown:p,helptextDropdownButton:k,inline:j,label:S,optionalTag:R,optionalText:E,requiredTag:C,requiredText:g,useWrapper:G,children:e.jsxs("div",{className:"pkt-input__container",children:[H&&e.jsx("div",{className:"pkt-input-prefix",children:H}),e.jsx("input",{ref:U,className:`pkt-input ${y?"pkt-input--fullwidth":""}`,type:V,name:O||r,id:r,placeholder:F,autoComplete:l,value:J,disabled:s,"aria-invalid":a,"aria-errormessage":`${r}-error`,"aria-labelledby":h,...z}),W&&e.jsxs("p",{className:"pkt-input-suffix",children:[W,_&&e.jsx(v,{className:"pkt-input-suffix-icon",name:_}),A&&e.jsx(v,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!W&&_&&e.jsx(v,{className:"pkt-input-icon",name:_}),!W&&A&&e.jsx(v,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})});x.PktAccordion=it,x.PktAccordionItem=ft,x.PktAlert=Ie,x.PktBackLink=kt,x.PktBreadcrumbs=mt,x.PktButton=ee,x.PktCheckbox=Oe,x.PktFooter=ht,x.PktFooterSimple=_t,x.PktHeader=bt,x.PktIcon=v,x.PktIconContext=$e,x.PktInput=Fe,x.PktInputWrapper=ae,x.PktLinkCard=De,x.PktLoader=vt,x.PktMessagebox=xt,x.PktProgressbar=Pt,x.PktRadioButton=Le,x.PktSearchInput=Ct,x.PktSelect=Et,x.PktStep=It,x.PktStepper=St,x.PktTable=Ot,x.PktTableBody=Bt,x.PktTableDataCell=Ft,x.PktTableHeader=At,x.PktTableHeaderCell=Dt,x.PktTableRow=Lt,x.PktTabs=Ut,x.PktTag=pe,x.PktTextarea=Wt,x.PktTextinput=Vt,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "11.16.0",
3
+ "version": "11.16.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",
@@ -32,8 +32,8 @@
32
32
  "test": "react-scripts test --env=jsdom"
33
33
  },
34
34
  "devDependencies": {
35
- "@oslokommune/punkt-assets": "^11.15.1",
36
- "@oslokommune/punkt-css": "^11.16.0",
35
+ "@oslokommune/punkt-assets": "^11.16.2",
36
+ "@oslokommune/punkt-css": "^11.16.2",
37
37
  "@testing-library/jest-dom": "^6.4.5",
38
38
  "@testing-library/react": "^15.0.7",
39
39
  "@testing-library/user-event": "^14.5.2",
@@ -91,5 +91,5 @@
91
91
  "url": "https://github.com/oslokommune/punkt/issues"
92
92
  },
93
93
  "license": "MIT",
94
- "gitHead": "6004f81c3b9765100c16b6ad0770aab5d7f634f0"
94
+ "gitHead": "173fb4e539ffb9c4748fd5b7e24de30ab6cd43d0"
95
95
  }
@@ -16,7 +16,7 @@ export const PktLinkCard = forwardRef(
16
16
  {
17
17
  children,
18
18
  className,
19
- iconName = 'user',
19
+ iconName,
20
20
  openInNewTab = false,
21
21
  skin = 'normal',
22
22
  href = '#',
@@ -36,7 +36,7 @@ export const PktLinkCard = forwardRef(
36
36
  rel={openInNewTab ? 'noopener noreferrer' : undefined}
37
37
  ref={ref}
38
38
  >
39
- <PktIcon className="pkt-link__icon" name={iconName}></PktIcon>
39
+ {iconName && <PktIcon className="pkt-link__icon" name={iconName}></PktIcon>}
40
40
  <div className="pkt-linkcard__content">
41
41
  <div className={`pkt-linkcard__title ${external ? 'pkt-link pkt-link--external' : ''}`}>{title}</div>
42
42
  <div className="pkt-linkcard__text">{children}</div>