@luftborn/custom-elements 2.13.5 → 2.13.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/demo/index.js +12 -9
- package/demo/index.min.js +11 -8
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +11 -8
- package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +22 -20
package/demo/index.min.js
CHANGED
|
@@ -4050,13 +4050,16 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
4050
4050
|
var _this = this;
|
|
4051
4051
|
var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
|
|
4052
4052
|
var fieldset = wrapper.querySelector('fieldset');
|
|
4053
|
-
if (
|
|
4054
|
-
|
|
4055
|
-
|
|
4053
|
+
if (!fieldset) {
|
|
4054
|
+
fieldset = document.createElement('fieldset');
|
|
4055
|
+
wrapper.appendChild(fieldset);
|
|
4056
|
+
if (this.label) {
|
|
4057
|
+
fieldset.insertAdjacentHTML('beforeend', "<legend class=\"sr-only\">" + this.label + "</legend>");
|
|
4058
|
+
}
|
|
4059
|
+
this.options.forEach(function (element, index) {
|
|
4060
|
+
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
|
|
4061
|
+
});
|
|
4056
4062
|
}
|
|
4057
|
-
this.options.forEach(function (element, index) {
|
|
4058
|
-
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
|
|
4059
|
-
});
|
|
4060
4063
|
};
|
|
4061
4064
|
// events
|
|
4062
4065
|
CheckBoxElement.prototype.change = function ($event) {
|
|
@@ -4077,8 +4080,8 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
4077
4080
|
CheckBoxElement = __decorate([
|
|
4078
4081
|
(0, custom_element_decorator_1.default)({
|
|
4079
4082
|
selector: 'checkbox-element',
|
|
4080
|
-
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t
|
|
4081
|
-
style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 0.188rem;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 0.813rem;\n\t\t\t\tmargin-top: 0.25rem;\n\t\t\t}\n\t\t\t.checkbox:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 0.
|
|
4083
|
+
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
|
|
4084
|
+
style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 0.188rem;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 0.813rem;\n\t\t\t\tmargin-top: 0.25rem;\n\t\t\t}\n\t\t\t.checkbox:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 0.125rem;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t\t.sr-only:not(:focus):not(:active) {\n\t\t\t\tclip: rect(0 0 0 0); \n\t\t\t\tclip-path: inset(50%);\n\t\t\t\theight: 0.063rem;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\twhite-space: nowrap; \n\t\t\t\twidth: 0.063rem;\n\t\t\t}\n\t\t\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t",
|
|
4082
4085
|
useShadow: true,
|
|
4083
4086
|
})
|
|
4084
4087
|
], CheckBoxElement);
|