@optionfactory/ful 6.0.5 → 6.0.6
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/ful.iife.js +4 -3
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +4 -3
- package/dist/ful.mjs.map +1 -1
- package/package.json +1 -1
package/dist/ful.mjs
CHANGED
|
@@ -2642,7 +2642,7 @@ class Checkbox extends ParsedElement {
|
|
|
2642
2642
|
static template = `
|
|
2643
2643
|
<div data-tpl-class="klass">
|
|
2644
2644
|
<div class="input-container">
|
|
2645
|
-
<input class="form-check-input" type="checkbox" role="switch" form="" placeholder=" ">
|
|
2645
|
+
<input class="form-check-input" type="checkbox" data-tpl-role="isSwitch ? 'switch' : false" form="" placeholder=" ">
|
|
2646
2646
|
</div>
|
|
2647
2647
|
<div class="form-check-label">
|
|
2648
2648
|
<label>{{{{ slots.default }}}}</label>
|
|
@@ -2661,8 +2661,9 @@ class Checkbox extends ParsedElement {
|
|
|
2661
2661
|
this.internals.role = 'presentation';
|
|
2662
2662
|
}
|
|
2663
2663
|
render({ slots, observed, disabled }) {
|
|
2664
|
-
const
|
|
2665
|
-
const
|
|
2664
|
+
const isSwitch = this.getAttribute('type') == 'switch';
|
|
2665
|
+
const klass = isSwitch ? "form-check form-switch" : "form-check";
|
|
2666
|
+
const fragment = this.template().withOverlay({ slots, klass, isSwitch }).render();
|
|
2666
2667
|
this.#container = fragment.firstElementChild;
|
|
2667
2668
|
this.#input = fragment.querySelector("input");
|
|
2668
2669
|
Attributes.forward('input-', this, this.#input);
|