@oslokommune/punkt-react 13.5.0 → 13.5.1
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
|
@@ -24809,7 +24809,7 @@ let fh = class extends zS {
|
|
|
24809
24809
|
super.connectedCallback(), this.setAttribute("role", "heading"), this.setAttribute("aria-level", String(this.level)), this.updateHostClasses();
|
|
24810
24810
|
}
|
|
24811
24811
|
attributeChangedCallback(t, a, o) {
|
|
24812
|
-
super.attributeChangedCallback(t, a, o), t === "level" && o && this.setLevel(Number(o)), (t === "size" || t === "visuallyHidden" || t === "align") && this.updateHostClasses();
|
|
24812
|
+
super.attributeChangedCallback(t, a, o), t === "level" && o && this.setLevel(Number(o)), t === "visuallyHidden" && (this.visuallyHidden = o !== null && o !== "false"), (t === "size" || t === "visuallyHidden" || t === "align") && this.updateHostClasses();
|
|
24813
24813
|
}
|
|
24814
24814
|
updated(t) {
|
|
24815
24815
|
super.updated(t), t.has("level") && this.setLevel(this.level), (t.has("size") || t.has("visuallyHidden") || t.has("align")) && this.updateHostClasses();
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -564,7 +564,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
564
564
|
${this.iconName&&Se`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
|
|
565
565
|
<span ${fn(this.defaultSlot)}></span>
|
|
566
566
|
</span>
|
|
567
|
-
`}};vu([G({type:Boolean,reflect:!0})],Ls.prototype,"closeTag",2),vu([G({type:String,reflect:!0})],Ls.prototype,"size",2),vu([G({type:String,reflect:!0})],Ls.prototype,"skin",2),vu([G({type:String,reflect:!0})],Ls.prototype,"textStyle",2),vu([G({type:String,reflect:!0})],Ls.prototype,"iconName",2),vu([G({type:String})],Ls.prototype,"type",2),vu([G({type:String})],Ls.prototype,"ariaLabel",2),vu([Fn()],Ls.prototype,"_isClosed",2),vu([Fn()],Ls.prototype,"_ariaDescription",2),Ls=vu([hr("pkt-tag")],Ls);var oH=Object.defineProperty,sH=Object.getOwnPropertyDescriptor,Km=(e,t,a,o)=>{for(var u=o>1?void 0:o?sH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&oH(t,a,u),u};let Gp=class extends dy{constructor(){super(...arguments),this.size="medium",this.level=2,this.visuallyHidden=!1,this.align="start"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),t==="level"&&o&&this.setLevel(Number(o)),(t==="size"||t==="visuallyHidden"||t==="align")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&this.setLevel(this.level),(t.has("size")||t.has("visuallyHidden")||t.has("align"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return Se`<slot></slot>`}};Km([G({type:String,reflect:!0})],Gp.prototype,"size",2),Km([G({type:Number,reflect:!0})],Gp.prototype,"level",2),Km([G({type:Boolean,reflect:!0})],Gp.prototype,"visuallyHidden",2),Km([G({type:String,reflect:!0})],Gp.prototype,"align",2),Gp=Km([hr("pkt-heading")],Gp);const lH={layout:{default:"vertical"},skin:{type:["outlined","outlined-beige","gray","blue","beige","green"],default:"outlined"},padding:{default:"default"}},Mh={props:lH};var uH=Object.defineProperty,cH=Object.getOwnPropertyDescriptor,ri=(e,t,a,o)=>{for(var u=o>1?void 0:o?cH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&uH(t,a,u),u};let Ca=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=Mh.props.layout.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=Mh.props.padding.default,this.skin=Mh.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new qa(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var t,a;const o={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},u=((t=this.ariaLabel)==null?void 0:t.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),d=((a=this.ariaLabel)==null?void 0:a.trim())||(this.heading?this.heading:"kort");return Se`
|
|
567
|
+
`}};vu([G({type:Boolean,reflect:!0})],Ls.prototype,"closeTag",2),vu([G({type:String,reflect:!0})],Ls.prototype,"size",2),vu([G({type:String,reflect:!0})],Ls.prototype,"skin",2),vu([G({type:String,reflect:!0})],Ls.prototype,"textStyle",2),vu([G({type:String,reflect:!0})],Ls.prototype,"iconName",2),vu([G({type:String})],Ls.prototype,"type",2),vu([G({type:String})],Ls.prototype,"ariaLabel",2),vu([Fn()],Ls.prototype,"_isClosed",2),vu([Fn()],Ls.prototype,"_ariaDescription",2),Ls=vu([hr("pkt-tag")],Ls);var oH=Object.defineProperty,sH=Object.getOwnPropertyDescriptor,Km=(e,t,a,o)=>{for(var u=o>1?void 0:o?sH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&oH(t,a,u),u};let Gp=class extends dy{constructor(){super(...arguments),this.size="medium",this.level=2,this.visuallyHidden=!1,this.align="start"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","heading"),this.setAttribute("aria-level",String(this.level)),this.updateHostClasses()}attributeChangedCallback(t,a,o){super.attributeChangedCallback(t,a,o),t==="level"&&o&&this.setLevel(Number(o)),t==="visuallyHidden"&&(this.visuallyHidden=o!==null&&o!=="false"),(t==="size"||t==="visuallyHidden"||t==="align")&&this.updateHostClasses()}updated(t){super.updated(t),t.has("level")&&this.setLevel(this.level),(t.has("size")||t.has("visuallyHidden")||t.has("align"))&&this.updateHostClasses()}setLevel(t){t>=1&&t<=6?(this.level=t,this.setAttribute("aria-level",String(t))):console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`)}updateHostClasses(){this.classList.remove("pkt-heading","pkt-heading--xsmall","pkt-heading--small","pkt-heading--medium","pkt-heading--large","pkt-heading--xlarge","pkt-sr-only","pkt-heading--start","pkt-heading--center","pkt-heading--end"),this.classList.add("pkt-heading"),this.size&&this.classList.add(`pkt-heading--${this.size}`),this.visuallyHidden&&this.classList.add("pkt-sr-only"),this.align&&this.classList.add(`pkt-heading--${this.align}`)}render(){return Se`<slot></slot>`}};Km([G({type:String,reflect:!0})],Gp.prototype,"size",2),Km([G({type:Number,reflect:!0})],Gp.prototype,"level",2),Km([G({type:Boolean,reflect:!0})],Gp.prototype,"visuallyHidden",2),Km([G({type:String,reflect:!0})],Gp.prototype,"align",2),Gp=Km([hr("pkt-heading")],Gp);const lH={layout:{default:"vertical"},skin:{type:["outlined","outlined-beige","gray","blue","beige","green"],default:"outlined"},padding:{default:"default"}},Mh={props:lH};var uH=Object.defineProperty,cH=Object.getOwnPropertyDescriptor,ri=(e,t,a,o)=>{for(var u=o>1?void 0:o?cH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&uH(t,a,u),u};let Ca=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.ariaLabel="",this.metaLead=null,this.borderOnHover=!0,this.clickCardLink=null,this.metaTrail=null,this.layout=Mh.props.layout.default,this.heading="",this.headinglevel=3,this.image={src:"",alt:""},this.imageShape="square",this.openLinkInNewTab=!1,this.padding=Mh.props.padding.default,this.skin=Mh.props.skin.default,this.subheading="",this.tagPosition="top",this.tags=[],this.slotController=new qa(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){var t,a;const o={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,[`pkt-card--padding-${this.padding}`]:this.padding,"pkt-card--border-on-hover":this.borderOnHover},u=((t=this.ariaLabel)==null?void 0:t.trim())||(this.heading?`${this.heading} lenkekort`:"lenkekort"),d=((a=this.ariaLabel)==null?void 0:a.trim())||(this.heading?this.heading:"kort");return Se`
|
|
568
568
|
<article
|
|
569
569
|
class=${Jt(o)}
|
|
570
570
|
aria-label=${Ut(this.clickCardLink?u:d)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.1",
|
|
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.7",
|
|
41
|
-
"@oslokommune/punkt-elements": "^13.5.
|
|
41
|
+
"@oslokommune/punkt-elements": "^13.5.1",
|
|
42
42
|
"prettier": "^3.3.3",
|
|
43
43
|
"react-element-to-jsx-string": "^15.0.0",
|
|
44
44
|
"react-hook-form": "^7.53.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "5892d94f903527e3e228915d86653bfbfdf209c8"
|
|
114
114
|
}
|