@luftborn/custom-elements 2.13.7 → 2.13.8
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 +5 -5
- package/demo/index.min.js +4 -4
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +2 -2
- package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +2 -2
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +1 -13
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +1 -13
|
@@ -74,7 +74,7 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
74
74
|
fieldset = document.createElement('fieldset');
|
|
75
75
|
wrapper.appendChild(fieldset);
|
|
76
76
|
if (this.label) {
|
|
77
|
-
fieldset.
|
|
77
|
+
fieldset.setAttribute('aria-label', this.label);
|
|
78
78
|
}
|
|
79
79
|
this.options.forEach(function (element, index) {
|
|
80
80
|
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.checkboxTemplate, _this.name, element, _this.name + "-" + index));
|
|
@@ -101,7 +101,7 @@ var CheckBoxElement = /** @class */ (function (_super) {
|
|
|
101
101
|
(0, custom_element_decorator_1.default)({
|
|
102
102
|
selector: 'checkbox-element',
|
|
103
103
|
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
|
|
104
|
-
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\
|
|
104
|
+
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\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t",
|
|
105
105
|
useShadow: true,
|
|
106
106
|
})
|
|
107
107
|
], CheckBoxElement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBoxElement.js","sourceRoot":"","sources":["../../../src/elements/CheckBoxElement/CheckBoxElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,mEAAkE;
|
|
1
|
+
{"version":3,"file":"CheckBoxElement.js","sourceRoot":"","sources":["../../../src/elements/CheckBoxElement/CheckBoxElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,mEAAkE;AAoClE;IAAqC,mCAAkB;IAQtD;QAAA,YACC,iBAAO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,eAAe,CAkF3B;IAAD,sBAAC;CAAA,AAlFD,CAAqC,uCAAkB,GAkFtD;AAlFY,0CAAe"}
|
|
@@ -80,7 +80,7 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
80
80
|
fieldset = document.createElement('fieldset');
|
|
81
81
|
wrapper.appendChild(fieldset);
|
|
82
82
|
if (this.label) {
|
|
83
|
-
fieldset.
|
|
83
|
+
fieldset.setAttribute('aria-label', this.label);
|
|
84
84
|
}
|
|
85
85
|
this.options.forEach(function (element, index) {
|
|
86
86
|
fieldset.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.radioButtonTemplate, _this.name, element, _this.name + "-" + index, "" + (_this.required ? 'required' : '')));
|
|
@@ -100,7 +100,7 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
|
|
|
100
100
|
(0, custom_element_decorator_1.default)({
|
|
101
101
|
selector: 'radio-group-element',
|
|
102
102
|
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t</div>",
|
|
103
|
-
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\
|
|
103
|
+
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\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t",
|
|
104
104
|
useShadow: true,
|
|
105
105
|
})
|
|
106
106
|
], RadioButtonGroupElement);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonGroupElement.js","sourceRoot":"","sources":["../../../src/elements/RadioButtonGroup/RadioButtonGroupElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,mEAAkE;
|
|
1
|
+
{"version":3,"file":"RadioButtonGroupElement.js","sourceRoot":"","sources":["../../../src/elements/RadioButtonGroup/RadioButtonGroupElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE;AACrE,yEAAwE;AACxE,6DAAsE;AACtE,mEAAkE;AAoClE;IAA6C,2CAAkB;IAQ9D;QAAA,YACC,iBAAO,SACP;QARD,yBAAmB,GAAG,iJAIf,CAAC;;IAIR,CAAC;IAED,sBAAI,0CAAK;aAAT;YACC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,OAAO,EAAT,CAAS,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,EAAP,CAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;aAED,UAAU,KAAa;YACtB,IAAI,YAAY,GAA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|
@@ -30,15 +30,6 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
30
30
|
margin: 0.125rem;
|
|
31
31
|
resize: none;
|
|
32
32
|
}
|
|
33
|
-
.sr-only:not(:focus):not(:active) {
|
|
34
|
-
clip: rect(0 0 0 0);
|
|
35
|
-
clip-path: inset(50%);
|
|
36
|
-
height: 0.063rem;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
position: absolute;
|
|
39
|
-
white-space: nowrap;
|
|
40
|
-
width: 0.063rem;
|
|
41
|
-
}
|
|
42
33
|
fieldset {
|
|
43
34
|
border: none;
|
|
44
35
|
padding: 0;
|
|
@@ -93,10 +84,7 @@ export class CheckBoxElement extends CustomInputElement {
|
|
|
93
84
|
fieldset = document.createElement('fieldset');
|
|
94
85
|
wrapper.appendChild(fieldset);
|
|
95
86
|
if (this.label) {
|
|
96
|
-
fieldset.
|
|
97
|
-
'beforeend',
|
|
98
|
-
`<legend class="sr-only">${this.label}</legend>`,
|
|
99
|
-
);
|
|
87
|
+
fieldset.setAttribute('aria-label', this.label);
|
|
100
88
|
}
|
|
101
89
|
this.options.forEach((element, index) => {
|
|
102
90
|
fieldset.insertAdjacentHTML(
|
|
@@ -30,15 +30,6 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
30
30
|
margin: 0.2rem;
|
|
31
31
|
resize: none;
|
|
32
32
|
}
|
|
33
|
-
.sr-only:not(:focus):not(:active) {
|
|
34
|
-
clip: rect(0 0 0 0);
|
|
35
|
-
clip-path: inset(50%);
|
|
36
|
-
height: 0.063rem;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
position: absolute;
|
|
39
|
-
white-space: nowrap;
|
|
40
|
-
width: 0.063rem;
|
|
41
|
-
}
|
|
42
33
|
fieldset {
|
|
43
34
|
border: none;
|
|
44
35
|
padding: 0;
|
|
@@ -99,10 +90,7 @@ export class RadioButtonGroupElement extends CustomInputElement {
|
|
|
99
90
|
fieldset = document.createElement('fieldset');
|
|
100
91
|
wrapper.appendChild(fieldset);
|
|
101
92
|
if (this.label) {
|
|
102
|
-
fieldset.
|
|
103
|
-
'beforeend',
|
|
104
|
-
`<legend class="sr-only">${this.label}</legend>`,
|
|
105
|
-
);
|
|
93
|
+
fieldset.setAttribute('aria-label', this.label);
|
|
106
94
|
}
|
|
107
95
|
this.options.forEach((element, index) => {
|
|
108
96
|
fieldset.insertAdjacentHTML(
|