@luftborn/custom-elements 2.13.6 → 2.13.7
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 +11 -7
- package/demo/index.min.js +10 -6
- package/demo/index.min.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +10 -6
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +22 -19
package/demo/index.min.js
CHANGED
|
@@ -6245,12 +6245,16 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
6245
6245
|
var _this = this;
|
|
6246
6246
|
var wrapper = _super.prototype.getChildElement.call(this, '.wrapper');
|
|
6247
6247
|
var fieldset = wrapper.querySelector('fieldset');
|
|
6248
|
-
if (
|
|
6249
|
-
fieldset.
|
|
6248
|
+
if (!fieldset) {
|
|
6249
|
+
fieldset = document.createElement('fieldset');
|
|
6250
|
+
wrapper.appendChild(fieldset);
|
|
6251
|
+
if (this.label) {
|
|
6252
|
+
fieldset.insertAdjacentHTML('beforeend', "<legend class=\"sr-only\">" + this.label + "</legend>");
|
|
6253
|
+
}
|
|
6254
|
+
this.options.forEach(function (element, index) {
|
|
6255
|
+
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.radioButtonTemplate, _this.name, element, _this.name + "-" + index, "" + (_this.required ? 'required' : '')));
|
|
6256
|
+
});
|
|
6250
6257
|
}
|
|
6251
|
-
this.options.forEach(function (element, index) {
|
|
6252
|
-
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.radioButtonTemplate, _this.name, element, _this.name + "-" + index, "" + (_this.required ? 'required' : '')));
|
|
6253
|
-
});
|
|
6254
6258
|
};
|
|
6255
6259
|
// events
|
|
6256
6260
|
RadioButtonGroupElement.prototype.change = function ($event) {
|
|
@@ -6264,7 +6268,7 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
6264
6268
|
RadioButtonGroupElement = __decorate([
|
|
6265
6269
|
(0, custom_element_decorator_1.default)({
|
|
6266
6270
|
selector: 'radio-group-element',
|
|
6267
|
-
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t
|
|
6271
|
+
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
|
|
6268
6272
|
style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.radio-button {\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.radio-button:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\tinput{\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.2rem;\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",
|
|
6269
6273
|
useShadow: true,
|
|
6270
6274
|
})
|