@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.iife.js
CHANGED
|
@@ -2643,7 +2643,7 @@ var ful = (function (exports, ftl) {
|
|
|
2643
2643
|
static template = `
|
|
2644
2644
|
<div data-tpl-class="klass">
|
|
2645
2645
|
<div class="input-container">
|
|
2646
|
-
<input class="form-check-input" type="checkbox" role="switch" form="" placeholder=" ">
|
|
2646
|
+
<input class="form-check-input" type="checkbox" data-tpl-role="isSwitch ? 'switch' : false" form="" placeholder=" ">
|
|
2647
2647
|
</div>
|
|
2648
2648
|
<div class="form-check-label">
|
|
2649
2649
|
<label>{{{{ slots.default }}}}</label>
|
|
@@ -2662,8 +2662,9 @@ var ful = (function (exports, ftl) {
|
|
|
2662
2662
|
this.internals.role = 'presentation';
|
|
2663
2663
|
}
|
|
2664
2664
|
render({ slots, observed, disabled }) {
|
|
2665
|
-
const
|
|
2666
|
-
const
|
|
2665
|
+
const isSwitch = this.getAttribute('type') == 'switch';
|
|
2666
|
+
const klass = isSwitch ? "form-check form-switch" : "form-check";
|
|
2667
|
+
const fragment = this.template().withOverlay({ slots, klass, isSwitch }).render();
|
|
2667
2668
|
this.#container = fragment.firstElementChild;
|
|
2668
2669
|
this.#input = fragment.querySelector("input");
|
|
2669
2670
|
ftl.Attributes.forward('input-', this, this.#input);
|