@oslokommune/punkt-elements 12.40.9 → 12.40.10
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 +17 -0
- package/dist/{checkbox-CtM5Hr2H.js → checkbox-B67_cfqW.js} +1 -0
- package/dist/{checkbox-Dqd2_fcU.cjs → checkbox-CiXWukkL.cjs} +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/{radiobutton-CxEBrLss.js → radiobutton-BaIDDCwK.js} +24 -18
- package/dist/{radiobutton-C7tqzN0V.cjs → radiobutton-x10h-JEh.cjs} +9 -7
- package/package.json +3 -3
- package/src/components/checkbox/checkbox.ts +1 -0
- package/src/components/radiobutton/radiobutton.ts +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.40.10](https://github.com/oslokommune/punkt/compare/12.40.9...12.40.10) (2025-06-10)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
8
25
|
## [12.40.8](https://github.com/oslokommune/punkt/compare/12.40.7...12.40.8) (2025-06-02)
|
|
9
26
|
|
|
10
27
|
### ⚠ BREAKING CHANGES
|
|
@@ -30,6 +30,7 @@ let t = class extends k {
|
|
|
30
30
|
"pkt-input-check__input-checkbox--error": this.hasError
|
|
31
31
|
}), c = u({
|
|
32
32
|
"pkt-input-check__input-label": !0,
|
|
33
|
+
"pkt-input-check__input-label--disabled": this.disabled,
|
|
33
34
|
"pkt-input-check__input-label--left": this.labelPosition === "left",
|
|
34
35
|
"pkt-input-check__input-label--right": this.labelPosition === "right",
|
|
35
36
|
"pkt-sr-only": this.hideLabel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-90YeMNbV.cjs"),a=require("./input-element-CInrWeac.cjs"),k=require("./ref-B-w1vCo8.cjs"),o=require("./class-map-DWDPOqjO.cjs");var r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(l,t,s,h)=>{for(var i=h>1?void 0:h?u(t,s):t,n=l.length-1,p;n>=0;n--)(p=l[n])&&(i=(h?p(t,s,i):p(i))||i);return h&&i&&r(t,s,i),i};exports.PktCheckbox=class extends a.PktInputElement{constructor(){super(...arguments),this.inputRef=k.e(),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"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,s,h){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,s,h)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}render(){const t=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),s=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),h=o.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),a=require("./input-element-CInrWeac.cjs"),k=require("./ref-B-w1vCo8.cjs"),o=require("./class-map-DWDPOqjO.cjs");var r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(l,t,s,h)=>{for(var i=h>1?void 0:h?u(t,s):t,n=l.length-1,p;n>=0;n--)(p=l[n])&&(i=(h?p(t,s,i):p(i))||i);return h&&i&&r(t,s,i),i};exports.PktCheckbox=class extends a.PktInputElement{constructor(){super(...arguments),this.inputRef=k.e(),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"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,s,h){t==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),t==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,s,h)}firstUpdated(t){t.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),super.firstUpdated(t)}render(){const t=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),s=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),h=o.e({"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}),i=()=>e.x`
|
|
2
2
|
<label class=${h} for=${this.id+"-internal"}>
|
|
3
3
|
${this.label}
|
|
4
4
|
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
package/dist/pkt-checkbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./checkbox-CiXWukkL.cjs"),t=e.PktCheckbox;Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>e.PktCheckbox});exports.default=t;
|
package/dist/pkt-checkbox.js
CHANGED
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-D2PhTV94.cjs"),l=require("./accordionitem-Dz6jwPpb.cjs"),d=require("./backlink-CcAZfB1d.cjs"),b=require("./button-oZThyRNI.cjs"),k=require("./calendar-BDeaGBaH.cjs"),m=require("./card-CmdIb2X9.cjs"),g=require("./combobox-lds6Lryq.cjs"),h=require("./consent-CkDh30xr.cjs"),f=require("./checkbox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-D2PhTV94.cjs"),l=require("./accordionitem-Dz6jwPpb.cjs"),d=require("./backlink-CcAZfB1d.cjs"),b=require("./button-oZThyRNI.cjs"),k=require("./calendar-BDeaGBaH.cjs"),m=require("./card-CmdIb2X9.cjs"),g=require("./combobox-lds6Lryq.cjs"),h=require("./consent-CkDh30xr.cjs"),f=require("./checkbox-CiXWukkL.cjs"),t=require("./element-90YeMNbV.cjs"),y=require("./pkt-slot-controller-Da-RgXfS.cjs"),s=require("./ref-B-w1vCo8.cjs"),O=require("./class-map-DWDPOqjO.cjs"),j=require("./datepicker-DpQV8G6g.cjs"),q=require("./helptext-AqNI_oFG.cjs"),x=require("./heading-CxJ0IqpU.cjs"),C=require("./icon-B1_BRNqf.cjs"),v=require("./input-wrapper-B_TtkGqo.cjs"),S=require("./link-BWJrqWi7.cjs"),$=require("./linkcard-0KLDuaGM.cjs"),L=require("./loader--5h6NKGl.cjs"),_=require("./messagebox-IJOkv427.cjs"),A=require("./modal-CBURcXBd.cjs"),B=require("./progressbar-BrXtjUvh.cjs"),p=require("./radiobutton-x10h-JEh.cjs"),T=require("./tag-lU4vz70a.cjs"),I=require("./textarea-j8kBS-hf.cjs"),M=require("./textinput-kmcj-FlC.cjs"),R=require("./select-BUvu5SFp.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new y.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
|
|
2
2
|
<div class="${O.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
package/dist/pkt-index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { P as D } from "./calendar-Beno8yU7.js";
|
|
|
7
7
|
import { P as G } from "./card-BxHlJq4J.js";
|
|
8
8
|
import { P as K } from "./combobox-Ct7-a2Vy.js";
|
|
9
9
|
import { P as U } from "./consent-B_cBTKCZ.js";
|
|
10
|
-
import { P as q } from "./checkbox-
|
|
10
|
+
import { P as q } from "./checkbox-B67_cfqW.js";
|
|
11
11
|
import { P as k, t as h, x as P, n, a as c } from "./element-gAd63VwC.js";
|
|
12
12
|
import { P as x } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
13
13
|
import { e as m, n as d } from "./ref-DnSbnXsj.js";
|
|
@@ -23,7 +23,7 @@ import { P as it } from "./loader-xkMMWgaj.js";
|
|
|
23
23
|
import { P as lt } from "./messagebox-BLTBG8nD.js";
|
|
24
24
|
import { P as mt } from "./modal-C6ljjVs6.js";
|
|
25
25
|
import { P as ft } from "./progressbar-BSO0KWzv.js";
|
|
26
|
-
import { P as ht, P as ct } from "./radiobutton-
|
|
26
|
+
import { P as ht, P as ct } from "./radiobutton-BaIDDCwK.js";
|
|
27
27
|
import { P as ut } from "./tag-CX-zbR-7.js";
|
|
28
28
|
import { P as vt } from "./textarea-CmXiVLbl.js";
|
|
29
29
|
import { P as bt } from "./textinput-LLaLZX3h.js";
|
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./radiobutton-x10h-JEh.cjs"),e=t.PktRadioButton;Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>t.PktRadioButton});exports.default=e;
|
package/dist/pkt-radiobutton.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { x as n, E as u, n as p, a as d } from "./element-gAd63VwC.js";
|
|
2
2
|
import { r as k } from "./state-BxrO4zNJ.js";
|
|
3
3
|
import { P as f } from "./input-element-BEvaQK4g.js";
|
|
4
4
|
import { e as _, n as b } from "./ref-DnSbnXsj.js";
|
|
5
5
|
import { e as o } from "./class-map-m7ZCZ49w.js";
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
(a = e[r]) && (
|
|
9
|
-
return l &&
|
|
6
|
+
var $ = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, i, s, l) => {
|
|
7
|
+
for (var h = l > 1 ? void 0 : l ? v(i, s) : i, r = e.length - 1, a; r >= 0; r--)
|
|
8
|
+
(a = e[r]) && (h = (l ? a(i, s, h) : a(h)) || h);
|
|
9
|
+
return l && h && $(i, s, h), h;
|
|
10
10
|
};
|
|
11
11
|
let t = class extends f {
|
|
12
12
|
constructor() {
|
|
@@ -15,8 +15,8 @@ let t = class extends f {
|
|
|
15
15
|
connectedCallback() {
|
|
16
16
|
super.connectedCallback();
|
|
17
17
|
}
|
|
18
|
-
attributeChangedCallback(e, i,
|
|
19
|
-
e === "defaultChecked" && (this._checked = this.defaultChecked), e === "checked" && (this._checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(e, i,
|
|
18
|
+
attributeChangedCallback(e, i, s) {
|
|
19
|
+
e === "defaultChecked" && (this._checked = this.defaultChecked), e === "checked" && (this._checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(e, i, s);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const e = o({
|
|
@@ -26,7 +26,16 @@ let t = class extends f {
|
|
|
26
26
|
}), i = o({
|
|
27
27
|
"pkt-input-check__input-checkbox": !0,
|
|
28
28
|
"pkt-input-check__input-checkbox--error": this.hasError
|
|
29
|
-
})
|
|
29
|
+
}), s = o({
|
|
30
|
+
"pkt-input-check__input-label": !0,
|
|
31
|
+
"pkt-input-check__input-label--disabled": this.disabled,
|
|
32
|
+
"pkt-sr-only": this.hideLabel
|
|
33
|
+
}), l = () => n`
|
|
34
|
+
<label class=${s} for=${this.id + "-internal"}>
|
|
35
|
+
${this.label}
|
|
36
|
+
${this.checkHelptext ? n`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>` : u}
|
|
37
|
+
</label>
|
|
38
|
+
`;
|
|
30
39
|
return n`
|
|
31
40
|
<div class="pkt-input-check">
|
|
32
41
|
<div class=${e}>
|
|
@@ -45,10 +54,7 @@ let t = class extends f {
|
|
|
45
54
|
@focus=${this.onFocus}
|
|
46
55
|
?checked=${this.checked}
|
|
47
56
|
/>
|
|
48
|
-
|
|
49
|
-
${this.label}
|
|
50
|
-
${this.checkHelptext ? n`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>` : u}
|
|
51
|
-
</label>
|
|
57
|
+
${l()}
|
|
52
58
|
</div>
|
|
53
59
|
</div>
|
|
54
60
|
`;
|
|
@@ -58,22 +64,22 @@ let t = class extends f {
|
|
|
58
64
|
}
|
|
59
65
|
};
|
|
60
66
|
c([
|
|
61
|
-
|
|
67
|
+
p({ type: String, reflect: !0 })
|
|
62
68
|
], t.prototype, "value", 2);
|
|
63
69
|
c([
|
|
64
|
-
|
|
70
|
+
p({ type: String })
|
|
65
71
|
], t.prototype, "checkHelptext", 2);
|
|
66
72
|
c([
|
|
67
|
-
|
|
73
|
+
p({ type: Boolean })
|
|
68
74
|
], t.prototype, "defaultChecked", 2);
|
|
69
75
|
c([
|
|
70
|
-
|
|
76
|
+
p({ type: Boolean })
|
|
71
77
|
], t.prototype, "hasTile", 2);
|
|
72
78
|
c([
|
|
73
|
-
|
|
79
|
+
p({ type: Boolean, reflect: !0 })
|
|
74
80
|
], t.prototype, "checked", 2);
|
|
75
81
|
c([
|
|
76
|
-
|
|
82
|
+
p({ type: String, reflect: !0 })
|
|
77
83
|
], t.prototype, "type", 2);
|
|
78
84
|
c([
|
|
79
85
|
k()
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
"use strict";const e=require("./element-90YeMNbV.cjs"),p=require("./state-D-Recv7U.cjs"),r=require("./input-element-CInrWeac.cjs"),o=require("./ref-B-w1vCo8.cjs"),
|
|
1
|
+
"use strict";const e=require("./element-90YeMNbV.cjs"),p=require("./state-D-Recv7U.cjs"),r=require("./input-element-CInrWeac.cjs"),o=require("./ref-B-w1vCo8.cjs"),u=require("./class-map-DWDPOqjO.cjs");var d=Object.defineProperty,k=Object.getOwnPropertyDescriptor,s=(l,t,n,c)=>{for(var i=c>1?void 0:c?k(t,n):t,h=l.length-1,a;h>=0;h--)(a=l[h])&&(i=(c?a(t,n,i):a(i))||i);return c&&i&&d(t,n,i),i};exports.PktRadioButton=class extends r.PktInputElement{constructor(){super(...arguments),this.inputRef=o.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(t,n,c){t==="defaultChecked"&&(this._checked=this.defaultChecked),t==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(t,n,c)}render(){const t=u.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),n=u.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),c=u.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-sr-only":this.hideLabel}),i=()=>e.x`
|
|
2
|
+
<label class=${c} for=${this.id+"-internal"}>
|
|
3
|
+
${this.label}
|
|
4
|
+
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
5
|
+
</label>
|
|
6
|
+
`;return e.x`
|
|
2
7
|
<div class="pkt-input-check">
|
|
3
8
|
<div class=${t}>
|
|
4
9
|
<input
|
|
5
10
|
id=${this.id+"-internal"}
|
|
6
|
-
class=${
|
|
11
|
+
class=${n}
|
|
7
12
|
type="radio"
|
|
8
13
|
role="radio"
|
|
9
14
|
?disabled=${this.disabled}
|
|
@@ -16,10 +21,7 @@
|
|
|
16
21
|
@focus=${this.onFocus}
|
|
17
22
|
?checked=${this.checked}
|
|
18
23
|
/>
|
|
19
|
-
|
|
20
|
-
${this.label}
|
|
21
|
-
${this.checkHelptext?e.x`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`:e.E}
|
|
22
|
-
</label>
|
|
24
|
+
${i()}
|
|
23
25
|
</div>
|
|
24
26
|
</div>
|
|
25
|
-
`}toggleChecked(t=null){t&&t.preventDefault(),t&&t.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(":checked"),this.valueChecked(this._checked))}};
|
|
27
|
+
`}toggleChecked(t=null){t&&t.preventDefault(),t&&t.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(":checked"),this.valueChecked(this._checked))}};s([e.n({type:String,reflect:!0})],exports.PktRadioButton.prototype,"value",2);s([e.n({type:String})],exports.PktRadioButton.prototype,"checkHelptext",2);s([e.n({type:Boolean})],exports.PktRadioButton.prototype,"defaultChecked",2);s([e.n({type:Boolean})],exports.PktRadioButton.prototype,"hasTile",2);s([e.n({type:Boolean,reflect:!0})],exports.PktRadioButton.prototype,"checked",2);s([e.n({type:String,reflect:!0})],exports.PktRadioButton.prototype,"type",2);s([p.r()],exports.PktRadioButton.prototype,"_checked",2);exports.PktRadioButton=s([e.t("pkt-radiobutton")],exports.PktRadioButton);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "12.40.
|
|
3
|
+
"version": "12.40.10",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@oslokommune/punkt-assets": "^12.39.2",
|
|
35
|
-
"@oslokommune/punkt-css": "^12.40.
|
|
35
|
+
"@oslokommune/punkt-css": "^12.40.10",
|
|
36
36
|
"sass": "^1.78.0",
|
|
37
37
|
"typescript": "^5.6.2",
|
|
38
38
|
"vite": "^5.4.18",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "cc642acc20fb7c667d25909bd6309fe613f66c6f"
|
|
63
63
|
}
|
|
@@ -54,6 +54,7 @@ export class PktCheckbox extends PktInputElement {
|
|
|
54
54
|
|
|
55
55
|
const labelClasses = classMap({
|
|
56
56
|
'pkt-input-check__input-label': true,
|
|
57
|
+
'pkt-input-check__input-label--disabled': this.disabled,
|
|
57
58
|
'pkt-input-check__input-label--left': this.labelPosition === 'left',
|
|
58
59
|
'pkt-input-check__input-label--right': this.labelPosition === 'right',
|
|
59
60
|
'pkt-sr-only': this.hideLabel,
|
|
@@ -44,6 +44,23 @@ export class PktRadioButton extends PktInputElement {
|
|
|
44
44
|
'pkt-input-check__input-checkbox--error': this.hasError,
|
|
45
45
|
})
|
|
46
46
|
|
|
47
|
+
const labelClasses = classMap({
|
|
48
|
+
'pkt-input-check__input-label': true,
|
|
49
|
+
'pkt-input-check__input-label--disabled': this.disabled,
|
|
50
|
+
'pkt-sr-only': this.hideLabel,
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
const labelAndHelptext = () => {
|
|
54
|
+
return html`
|
|
55
|
+
<label class=${labelClasses} for=${this.id + '-internal'}>
|
|
56
|
+
${this.label}
|
|
57
|
+
${this.checkHelptext
|
|
58
|
+
? html`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`
|
|
59
|
+
: nothing}
|
|
60
|
+
</label>
|
|
61
|
+
`
|
|
62
|
+
}
|
|
63
|
+
|
|
47
64
|
return html`
|
|
48
65
|
<div class="pkt-input-check">
|
|
49
66
|
<div class=${inputTileClasses}>
|
|
@@ -62,12 +79,7 @@ export class PktRadioButton extends PktInputElement {
|
|
|
62
79
|
@focus=${this.onFocus}
|
|
63
80
|
?checked=${this.checked}
|
|
64
81
|
/>
|
|
65
|
-
|
|
66
|
-
${this.label}
|
|
67
|
-
${this.checkHelptext
|
|
68
|
-
? html`<div class="pkt-input-check__input-helptext">${this.checkHelptext}</div>`
|
|
69
|
-
: nothing}
|
|
70
|
-
</label>
|
|
82
|
+
${labelAndHelptext()}
|
|
71
83
|
</div>
|
|
72
84
|
</div>
|
|
73
85
|
`
|