@oslokommune/punkt-react 13.15.2 → 13.15.3
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
|
@@ -5958,13 +5958,13 @@ let vt = class extends M {
|
|
|
5958
5958
|
super.connectedCallback();
|
|
5959
5959
|
}
|
|
5960
5960
|
attributeChangedCallback(t, e, s) {
|
|
5961
|
-
t === "defaultChecked" && !this.checked && (this.checked = this.defaultChecked), t === "checked" && (this.checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(t, e, s);
|
|
5961
|
+
t === "defaultChecked" && !this.checked && (this.checked = this.defaultChecked), t === "checked" && (this.checked = this.checked === "" || this.checked === "true" || this.checked === !0, this.inputRef.value && (this.inputRef.value.checked = this.checked)), super.attributeChangedCallback(t, e, s);
|
|
5962
5962
|
}
|
|
5963
5963
|
firstUpdated(t) {
|
|
5964
5964
|
t.has("defaultChecked") && !this.checked && (this.checked = this.defaultChecked), super.firstUpdated(t);
|
|
5965
5965
|
}
|
|
5966
5966
|
updated(t) {
|
|
5967
|
-
t.has("defaultChecked") && !this.checked && (this.checked = this.defaultChecked), super.updated(t);
|
|
5967
|
+
t.has("defaultChecked") && !this.checked && (this.checked = this.defaultChecked), t.has("checked") && this.inputRef.value && (this.inputRef.value.checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.updated(t);
|
|
5968
5968
|
}
|
|
5969
5969
|
render() {
|
|
5970
5970
|
const t = O({
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
@click=${this.openModal}
|
|
726
726
|
>
|
|
727
727
|
>${this.triggerText}</pkt-button
|
|
728
|
-
>`:u`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`}};ee([o({type:Boolean})],Ut.prototype,"devMode",2),ee([o({type:String})],Ut.prototype,"hotjarId",2),ee([o({type:String})],Ut.prototype,"googleAnalyticsId",2),ee([o({type:String})],Ut.prototype,"cookieDomain",2),ee([o({type:String})],Ut.prototype,"cookieSecure",2),ee([o({type:String})],Ut.prototype,"cookieExpiryDays",2),ee([o({type:String})],Ut.prototype,"triggerType",2),ee([o({type:String})],Ut.prototype,"triggerText",2),ee([o({type:String})],Ut.prototype,"i18nLanguage",2),Ut=ee([j("pkt-consent")],Ut);var Nl=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,$t=(s,t,e,i)=>{for(var a=i>1?void 0:i?Al(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Nl(t,e,a),a};let yt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,e,i){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,e,i)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}updated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.updated(t)}render(){const t=O({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),e=O({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),i=O({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),a="pkt-tag pkt-tag--small pkt-tag--thin-text",n=()=>u`
|
|
728
|
+
>`:u`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`}};ee([o({type:Boolean})],Ut.prototype,"devMode",2),ee([o({type:String})],Ut.prototype,"hotjarId",2),ee([o({type:String})],Ut.prototype,"googleAnalyticsId",2),ee([o({type:String})],Ut.prototype,"cookieDomain",2),ee([o({type:String})],Ut.prototype,"cookieSecure",2),ee([o({type:String})],Ut.prototype,"cookieExpiryDays",2),ee([o({type:String})],Ut.prototype,"triggerType",2),ee([o({type:String})],Ut.prototype,"triggerText",2),ee([o({type:String})],Ut.prototype,"i18nLanguage",2),Ut=ee([j("pkt-consent")],Ut);var Nl=Object.defineProperty,Al=Object.getOwnPropertyDescriptor,$t=(s,t,e,i)=>{for(var a=i>1?void 0:i?Al(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Nl(t,e,a),a};let yt=class extends D{constructor(){super(...arguments),this.inputRef=A(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,e,i){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),super.attributeChangedCallback(t,e,i)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}updated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),t.has("checked")&&this.inputRef.value&&(this.inputRef.value.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.updated(t)}render(){const t=O({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),e=O({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),i=O({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),a="pkt-tag pkt-tag--small pkt-tag--thin-text",n=()=>u`
|
|
729
729
|
${this.tagText?u`<span class=${a+" pkt-tag--gray"}>${this.tagText}</span>`:$}
|
|
730
730
|
${this.optionalTag?u`<span class=${a+" pkt-tag--blue-light"}>${this.optionalText}</span>`:$}
|
|
731
731
|
${this.requiredTag?u`<span class=${a+" pkt-tag--beige"}>${this.requiredText}</span>`:$}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.15.
|
|
3
|
+
"version": "13.15.3",
|
|
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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
41
41
|
"@lit/react": "^1.0.7",
|
|
42
|
-
"@oslokommune/punkt-elements": "^13.15.
|
|
42
|
+
"@oslokommune/punkt-elements": "^13.15.3",
|
|
43
43
|
"classnames": "^2.5.1",
|
|
44
44
|
"prettier": "^3.3.3",
|
|
45
45
|
"react-hook-form": "^7.53.0"
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
104
104
|
},
|
|
105
105
|
"license": "MIT",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "ae9ae0308a5d02aafd7c27c3fb1d9f13804df269"
|
|
107
107
|
}
|