@fluid-topics/ft-switch 1.0.29 → 1.0.30
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.
|
@@ -44,8 +44,6 @@ class FtSwitchOption extends FtLitElement {
|
|
|
44
44
|
"ft-switch-option--selected": this.selected,
|
|
45
45
|
};
|
|
46
46
|
return this.addTooltip(html `
|
|
47
|
-
<input id="input" type="radio" class="ft-switch-option--input"
|
|
48
|
-
.checked=${this.selected}>
|
|
49
47
|
<label part="label" for="input" class=${classMap(classes)}
|
|
50
48
|
@click=${this.onChange}>
|
|
51
49
|
<div class="ft-switch-option--content">
|
|
@@ -59,14 +57,16 @@ class FtSwitchOption extends FtLitElement {
|
|
|
59
57
|
${this.resolveIcon()}
|
|
60
58
|
</div>
|
|
61
59
|
</label>
|
|
60
|
+
<input id="input" type="radio" class="ft-switch-option--input"
|
|
61
|
+
.checked=${this.selected}>
|
|
62
62
|
`);
|
|
63
63
|
}
|
|
64
|
-
addTooltip(
|
|
65
|
-
return this.hasTextContent() || this.getLabel().trim().length === 0 ?
|
|
64
|
+
addTooltip(optionHtml) {
|
|
65
|
+
return this.hasTextContent() || this.getLabel().trim().length === 0 ? optionHtml : html `
|
|
66
66
|
<ft-tooltip part="tooltip"
|
|
67
67
|
text="${this.getLabel()}"
|
|
68
68
|
position="${this.tooltipPosition}">
|
|
69
|
-
${
|
|
69
|
+
${optionHtml}
|
|
70
70
|
</ft-tooltip>
|
|
71
71
|
`;
|
|
72
72
|
}
|
package/build/ft-switch.light.js
CHANGED
|
@@ -401,8 +401,6 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
401
401
|
color: ${Mi.selectedTextColor};
|
|
402
402
|
}
|
|
403
403
|
`;var Di=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ki extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Li extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Ki)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(e.html`
|
|
404
|
-
<input id="input" type="radio" class="ft-switch-option--input"
|
|
405
|
-
.checked=${this.selected}>
|
|
406
404
|
<label part="label" for="input" class=${s.classMap(t)}
|
|
407
405
|
@click=${this.onChange}>
|
|
408
406
|
<div class="ft-switch-option--content">
|
|
@@ -416,6 +414,8 @@ const tt=Symbol.for(""),it=t=>{if((null==t?void 0:t.r)===tt)return null==t?void
|
|
|
416
414
|
${this.resolveIcon()}
|
|
417
415
|
</div>
|
|
418
416
|
</label>
|
|
417
|
+
<input id="input" type="radio" class="ft-switch-option--input"
|
|
418
|
+
.checked=${this.selected}>
|
|
419
419
|
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
420
420
|
<ft-tooltip part="tooltip"
|
|
421
421
|
text="${this.getLabel()}"
|
package/build/ft-switch.min.js
CHANGED
|
@@ -519,8 +519,6 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
519
519
|
color: ${ze.selectedTextColor};
|
|
520
520
|
}
|
|
521
521
|
`;var Be=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Te extends CustomEvent{constructor(){super("option-change",{bubbles:!0,composed:!0})}}class Pe extends kt{constructor(){super(...arguments),this.value="",this.label="",this.tooltipPosition="bottom",this.selected=!1,this.trailingIcon=!1,this.unselectable=!1}focus(){this.input.focus()}updated(t){super.updated(t),t.has("selected")&&this.dispatchEvent(new Te)}render(){const t={"ft-switch-option":!0,"ft-switch-option--trailing-icon":this.trailingIcon,"ft-switch-option--selected":this.selected};return this.addTooltip(q`
|
|
522
|
-
<input id="input" type="radio" class="ft-switch-option--input"
|
|
523
|
-
.checked=${this.selected}>
|
|
524
522
|
<label part="label" for="input" class=${At(t)}
|
|
525
523
|
@click=${this.onChange}>
|
|
526
524
|
<div class="ft-switch-option--content">
|
|
@@ -534,6 +532,8 @@ class ke extends zt{constructor(t){if(super(t),this.et=Y,t.type!==jt)throw Error
|
|
|
534
532
|
${this.resolveIcon()}
|
|
535
533
|
</div>
|
|
536
534
|
</label>
|
|
535
|
+
<input id="input" type="radio" class="ft-switch-option--input"
|
|
536
|
+
.checked=${this.selected}>
|
|
537
537
|
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:q`
|
|
538
538
|
<ft-tooltip part="tooltip"
|
|
539
539
|
text="${this.getLabel()}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-switch",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"description": "two-state",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
23
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
24
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.30",
|
|
23
|
+
"@fluid-topics/ft-ripple": "1.0.30",
|
|
24
|
+
"@fluid-topics/ft-tooltip": "1.0.30",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.30",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.30",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "72be58696ee1a1c080a094809e9c20e47d9ead73"
|
|
30
30
|
}
|