@luftborn/custom-elements 2.12.9 → 2.13.1
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/assets/style.css +10 -10
- package/demo/index.js +85 -100
- package/demo/index.min.js +84 -99
- package/demo/index.min.js.map +1 -1
- package/dist/elements/Address/AddressElement.js +3 -3
- package/dist/elements/Address/AddressElement.js.map +1 -1
- package/dist/elements/BankField/BankFieldElement.js +3 -3
- package/dist/elements/BankField/BankFieldElement.js.map +1 -1
- package/dist/elements/CPRElement/CPRElement.js +3 -3
- package/dist/elements/CPRElement/CPRElement.js.map +1 -1
- package/dist/elements/CVRElement/CVRElement.js +3 -3
- package/dist/elements/CVRElement/CVRElement.js.map +1 -1
- package/dist/elements/CheckBoxElement/CheckBoxElement.js +8 -7
- package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js +13 -13
- package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js.map +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.d.ts +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js.map +1 -1
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +3 -3
- package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +3 -3
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
- package/dist/elements/DateField/DateFieldElement.js +3 -3
- package/dist/elements/DateField/DateFieldElement.js.map +1 -1
- package/dist/elements/DropDownList/DropDownListElement.js +3 -3
- package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
- package/dist/elements/EmailField/EmailFieldElement.js +3 -3
- package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
- package/dist/elements/FileField/FileFieldElement.js +3 -3
- package/dist/elements/FileField/FileFieldElement.js.map +1 -1
- package/dist/elements/IdentificationElement/IdentificationElement.js +3 -3
- package/dist/elements/IdentificationElement/IdentificationElement.js.map +1 -1
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +3 -3
- package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
- package/dist/elements/NumericField/NumericFieldElement.js +3 -3
- package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +7 -7
- package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +3 -3
- package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +3 -3
- package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
- package/dist/elements/TextAreaElement/TextAreaElement.js +3 -3
- package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
- package/dist/elements/TextField/TextFieldElement.js +3 -3
- package/dist/elements/TextField/TextFieldElement.js.map +1 -1
- package/dist/elements/TypeAhead/TypeAheadElement.js +3 -3
- package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
- package/dist/framework/CustomInputElement.d.ts +1 -2
- package/dist/framework/CustomInputElement.js +1 -17
- package/dist/framework/CustomInputElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/Address/AddressElement.ts +3 -3
- package/src/elements/BankField/BankFieldElement.ts +3 -3
- package/src/elements/CPRElement/CPRElement.ts +3 -3
- package/src/elements/CVRElement/CVRElement.ts +3 -3
- package/src/elements/CheckBoxElement/CheckBoxElement.ts +30 -8
- package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.ts +13 -13
- package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.ts +16 -16
- package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +7 -7
- package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +3 -3
- package/src/elements/DateField/DateFieldElement.ts +3 -3
- package/src/elements/DropDownList/DropDownListElement.ts +4 -4
- package/src/elements/EmailField/EmailFieldElement.ts +3 -3
- package/src/elements/FileField/FileFieldElement.ts +3 -3
- package/src/elements/IdentificationElement/IdentificationElement.ts +3 -3
- package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +3 -3
- package/src/elements/NumericField/NumericFieldElement.ts +3 -3
- package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +29 -8
- package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +3 -3
- package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +3 -3
- package/src/elements/TextAreaElement/TextAreaElement.ts +3 -3
- package/src/elements/TextField/TextFieldElement.ts +3 -3
- package/src/elements/TypeAhead/TypeAheadElement.ts +10 -10
- package/src/framework/CustomInputElement.ts +2 -18
|
@@ -22,7 +22,7 @@ import CvrValidator from '../../framework/Validation/Validators/CVR';
|
|
|
22
22
|
width: 100% !important;
|
|
23
23
|
border: none;
|
|
24
24
|
background-color: #f1f4ff;
|
|
25
|
-
margin:
|
|
25
|
+
margin: 0.125rem;
|
|
26
26
|
resize: none;
|
|
27
27
|
}
|
|
28
28
|
`,
|
|
@@ -61,8 +61,8 @@ export class CVRElement extends CustomInputElement {
|
|
|
61
61
|
if (this.initialValue) {
|
|
62
62
|
this.value = this.initialValue;
|
|
63
63
|
}
|
|
64
|
-
if (this.
|
|
65
|
-
this.text.setAttribute('aria-
|
|
64
|
+
if (this.label) {
|
|
65
|
+
this.text.setAttribute('aria-label', this.label);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -7,6 +7,7 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
7
7
|
selector: 'checkbox-element',
|
|
8
8
|
template: `
|
|
9
9
|
<div class="wrapper">
|
|
10
|
+
<fieldset></fieldset>
|
|
10
11
|
</div>`,
|
|
11
12
|
style: `
|
|
12
13
|
:host{
|
|
@@ -14,18 +15,35 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
14
15
|
}
|
|
15
16
|
.checkbox {
|
|
16
17
|
width: auto;
|
|
17
|
-
margin: auto
|
|
18
|
+
margin: auto 0.188rem;
|
|
18
19
|
color: rgba(72, 72, 72, 0.75);
|
|
19
|
-
font-size:
|
|
20
|
+
font-size: 0.813rem;
|
|
21
|
+
margin-top: 0.25rem;
|
|
22
|
+
}
|
|
23
|
+
.checkbox:first-of-type {
|
|
24
|
+
margin-top: 0;
|
|
20
25
|
}
|
|
21
26
|
input[type='checkbox']{
|
|
22
27
|
box-sizing: border-box;
|
|
23
28
|
width: auto !important;
|
|
24
29
|
border: none;
|
|
25
30
|
background-color: #f1f4ff;
|
|
26
|
-
margin:
|
|
31
|
+
margin: 0.125rem;
|
|
27
32
|
resize: none;
|
|
28
33
|
}
|
|
34
|
+
.sr-only:not(:focus):not(:active) {
|
|
35
|
+
clip: rect(0 0 0 0);
|
|
36
|
+
clip-path: inset(50%);
|
|
37
|
+
height: 0.063rem;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
position: absolute;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
width: 0.063rem;
|
|
42
|
+
}
|
|
43
|
+
fieldset {
|
|
44
|
+
border: none;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
29
47
|
`,
|
|
30
48
|
useShadow: true,
|
|
31
49
|
})
|
|
@@ -67,16 +85,20 @@ export class CheckBoxElement extends CustomInputElement {
|
|
|
67
85
|
this.checkbox.forEach(c =>
|
|
68
86
|
c.addEventListener('change', this.change.bind(this)),
|
|
69
87
|
);
|
|
70
|
-
if (this.labelId) {
|
|
71
|
-
this.checkbox[0].setAttribute('aria-labelledby', this.labelId);
|
|
72
|
-
}
|
|
73
88
|
}
|
|
74
89
|
|
|
75
90
|
private addCheckBoxes() {
|
|
76
91
|
const wrapper = super.getChildElement('.wrapper');
|
|
77
|
-
|
|
92
|
+
const fieldset = wrapper.querySelector('fieldset');
|
|
93
|
+
if (this.label) {
|
|
94
|
+
// fieldset.setAttribute('aria-label', this.label);
|
|
95
|
+
fieldset.insertAdjacentHTML(
|
|
96
|
+
'beforeend',
|
|
97
|
+
`<legend class="sr-only">${this.label}</legend>`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
78
100
|
this.options.forEach((element, index) => {
|
|
79
|
-
|
|
101
|
+
fieldset.insertAdjacentHTML(
|
|
80
102
|
'beforeend',
|
|
81
103
|
StringUtil.StringFormat(
|
|
82
104
|
this.checkboxTemplate,
|
|
@@ -223,9 +223,9 @@ export default class CustomDatepicker {
|
|
|
223
223
|
let tempCurrentYear = this.currentYear;
|
|
224
224
|
|
|
225
225
|
this.selectMonthYear.style.display = 'none';
|
|
226
|
-
this.selectMonthYear.style.height = '
|
|
226
|
+
this.selectMonthYear.style.height = '12.5rem';
|
|
227
227
|
if (isMobileDevice()) {
|
|
228
|
-
this.selectMonthYear.style.height = '
|
|
228
|
+
this.selectMonthYear.style.height = '18.75rem';
|
|
229
229
|
}
|
|
230
230
|
this.selectMonthYear.innerHTML = '';
|
|
231
231
|
let monthsContainer = document.createElement('div');
|
|
@@ -331,31 +331,31 @@ export default class CustomDatepicker {
|
|
|
331
331
|
|
|
332
332
|
let datepickerHeight = 250;
|
|
333
333
|
if (isMobileDevice()) {
|
|
334
|
-
this.datepicker.style.height = '
|
|
334
|
+
this.datepicker.style.height = '25rem';
|
|
335
335
|
this.datepicker.style.top = '50%';
|
|
336
336
|
this.datepicker.style.left = '50%';
|
|
337
337
|
this.datepicker.style.transform = 'translate(-50%, -50%)';
|
|
338
338
|
this.datepicker.style.width = '90%';
|
|
339
|
-
this.datepicker.style.maxWidth = '
|
|
340
|
-
this.datepicker.style.fontSize = '
|
|
341
|
-
this.datepicker.style.padding = '
|
|
342
|
-
this.header.style.marginBottom = '
|
|
339
|
+
this.datepicker.style.maxWidth = '18.75rem';
|
|
340
|
+
this.datepicker.style.fontSize = '1rem';
|
|
341
|
+
this.datepicker.style.padding = '1.875rem';
|
|
342
|
+
this.header.style.marginBottom = '1.25rem';
|
|
343
343
|
let weekdaysSpans = this.weekdays.querySelectorAll('span');
|
|
344
344
|
let daysSpans = this.days.querySelectorAll('span');
|
|
345
|
-
weekdaysSpans.forEach(span => span.style.marginBottom = '
|
|
346
|
-
daysSpans.forEach(span => span.style.marginBottom = '
|
|
345
|
+
weekdaysSpans.forEach(span => span.style.marginBottom = '0.625rem');
|
|
346
|
+
daysSpans.forEach(span => span.style.marginBottom = '0.625rem');
|
|
347
347
|
} else {
|
|
348
|
-
this.datepicker.style.height = datepickerHeight + '
|
|
348
|
+
this.datepicker.style.height = datepickerHeight / 16.0 + 'rem';
|
|
349
349
|
let dateInputRect = this.input.getBoundingClientRect();
|
|
350
350
|
datepickerHeight += 20;
|
|
351
351
|
if (window.innerHeight - dateInputRect.bottom < datepickerHeight) {
|
|
352
352
|
this.datepicker.style.top = 'auto';
|
|
353
|
-
this.datepicker.style.bottom = window.innerHeight - dateInputRect.top + '
|
|
353
|
+
this.datepicker.style.bottom = (window.innerHeight - dateInputRect.top) / 16.0 + 'rem';
|
|
354
354
|
} else {
|
|
355
355
|
this.datepicker.style.bottom = 'auto';
|
|
356
|
-
this.datepicker.style.top = dateInputRect.bottom + '
|
|
356
|
+
this.datepicker.style.top = dateInputRect.bottom / 16.0 + 'rem';
|
|
357
357
|
}
|
|
358
|
-
this.datepicker.style.left = dateInputRect.left + '
|
|
358
|
+
this.datepicker.style.left = dateInputRect.left / 16.0 + 'rem';
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
|
package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.ts
CHANGED
|
@@ -3,20 +3,20 @@ export const CustomDatepickerStyles = `
|
|
|
3
3
|
position: fixed;
|
|
4
4
|
background-color: #fff;
|
|
5
5
|
display: none;
|
|
6
|
-
width:
|
|
7
|
-
border:
|
|
8
|
-
border-radius:
|
|
9
|
-
padding:
|
|
6
|
+
width: 12.5rem;
|
|
7
|
+
border: 0.063rem solid #ccc;
|
|
8
|
+
border-radius: 0.313rem;
|
|
9
|
+
padding: 0.625rem;
|
|
10
10
|
margin: 0 auto;
|
|
11
|
-
box-shadow: 0 0
|
|
12
|
-
font:
|
|
11
|
+
box-shadow: 0 0 0.625rem 0 #ccc;
|
|
12
|
+
font: 0.75rem Arial, sans-serif;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.custom-datepicker .custom-datepicer-header {
|
|
16
16
|
display: flex;
|
|
17
17
|
justify-content: space-between;
|
|
18
18
|
align-items: center;
|
|
19
|
-
margin-bottom:
|
|
19
|
+
margin-bottom: 0.625rem;
|
|
20
20
|
}
|
|
21
21
|
.custom-datepicker .weekdays {
|
|
22
22
|
display: flex;
|
|
@@ -25,7 +25,7 @@ export const CustomDatepickerStyles = `
|
|
|
25
25
|
.custom-datepicker .weekdays span {
|
|
26
26
|
width: 14.28%;
|
|
27
27
|
text-align: center;
|
|
28
|
-
padding:
|
|
28
|
+
padding: 0.313rem 0;
|
|
29
29
|
}
|
|
30
30
|
.custom-datepicker .days {
|
|
31
31
|
display: flex;
|
|
@@ -34,14 +34,14 @@ export const CustomDatepickerStyles = `
|
|
|
34
34
|
.custom-datepicker .days span {
|
|
35
35
|
width: 14.28%;
|
|
36
36
|
text-align: center;
|
|
37
|
-
padding:
|
|
37
|
+
padding: 0.313rem 0;
|
|
38
38
|
}
|
|
39
39
|
.custom-datepicker .days span:hover {
|
|
40
40
|
background-color: #B2d5ff;
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
}
|
|
43
43
|
.custom-datepicker .days span.today {
|
|
44
|
-
border:
|
|
44
|
+
border: 0.063rem solid #000;
|
|
45
45
|
}
|
|
46
46
|
.custom-datepicker .days span.selected-day {
|
|
47
47
|
background-color: #0075ff;
|
|
@@ -64,8 +64,8 @@ export const CustomDatepickerStyles = `
|
|
|
64
64
|
.custom-datepicker .select-month-year .year {
|
|
65
65
|
text-align: center;
|
|
66
66
|
background-color: #f0f0f0;
|
|
67
|
-
border-bottom:
|
|
68
|
-
padding:
|
|
67
|
+
border-bottom: 0.063rem solid #3f3d3d;
|
|
68
|
+
padding: 0.313rem 0;
|
|
69
69
|
cursor: pointer;
|
|
70
70
|
}
|
|
71
71
|
.custom-datepicker .select-month-year .year .months {
|
|
@@ -75,7 +75,7 @@ export const CustomDatepickerStyles = `
|
|
|
75
75
|
.custom-datepicker .select-month-year .year .months span {
|
|
76
76
|
width: 25%;
|
|
77
77
|
text-align: center;
|
|
78
|
-
padding:
|
|
78
|
+
padding: 0.625rem 0;
|
|
79
79
|
background-color: #fff;
|
|
80
80
|
}
|
|
81
81
|
.custom-datepicker .select-month-year .year .months span:hover {
|
|
@@ -85,14 +85,14 @@ export const CustomDatepickerStyles = `
|
|
|
85
85
|
.custom-datepicker .actions {
|
|
86
86
|
display: flex;
|
|
87
87
|
justify-content: space-between;
|
|
88
|
-
margin-top:
|
|
88
|
+
margin-top: 0.625rem;
|
|
89
89
|
}
|
|
90
90
|
.custom-datepicker .actions input {
|
|
91
91
|
color: #0075ff;
|
|
92
92
|
border: none;
|
|
93
93
|
background-color: transparent;
|
|
94
|
-
padding:
|
|
95
|
-
border:
|
|
94
|
+
padding: 0.313rem;
|
|
95
|
+
border: 0.063rem solid transparent;
|
|
96
96
|
}
|
|
97
97
|
.custom-datepicker .actions input:hover {
|
|
98
98
|
background-color: #B2d5ff;
|
|
@@ -27,20 +27,20 @@ import { defaultDateFormat, supportedDateFormats, validateDateString } from './C
|
|
|
27
27
|
width: 100% !important;
|
|
28
28
|
border: none;
|
|
29
29
|
background-color: #f1f4ff;
|
|
30
|
-
margin:
|
|
30
|
+
margin: 0.125rem;
|
|
31
31
|
resize: none;
|
|
32
32
|
}
|
|
33
33
|
#date-field::after {
|
|
34
34
|
content: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */
|
|
35
35
|
cursor: pointer;
|
|
36
|
-
right:
|
|
36
|
+
right: 0.625rem;
|
|
37
37
|
}
|
|
38
38
|
#picker-trigger {
|
|
39
39
|
cursor: pointer;
|
|
40
|
-
width:
|
|
41
|
-
height:
|
|
40
|
+
width: 0.938rem;
|
|
41
|
+
height: 0.938rem;
|
|
42
42
|
position:absolute;
|
|
43
|
-
right:
|
|
43
|
+
right: 0.125rem;
|
|
44
44
|
top: 15%;
|
|
45
45
|
}
|
|
46
46
|
`,
|
|
@@ -102,8 +102,8 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
|
|
|
102
102
|
if (!this.justPreview) {
|
|
103
103
|
this.initCustomPicker();
|
|
104
104
|
}
|
|
105
|
-
if (this.
|
|
106
|
-
this.date.setAttribute('aria-
|
|
105
|
+
if (this.label) {
|
|
106
|
+
this.date.setAttribute('aria-label', this.label);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -66,8 +66,8 @@ export class CustomRegularExpressionElement extends CustomInputElement {
|
|
|
66
66
|
if (this.placeholder) {
|
|
67
67
|
this.text.setAttribute('placeholder', this.placeholder);
|
|
68
68
|
}
|
|
69
|
-
if (this.
|
|
70
|
-
this.text.setAttribute('aria-
|
|
69
|
+
if (this.label) {
|
|
70
|
+
this.text.setAttribute('aria-label', this.label);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -64,8 +64,8 @@ export class DateFieldElement extends CustomInputElement {
|
|
|
64
64
|
if (this.initialValue) {
|
|
65
65
|
this.value = this.initialValue;
|
|
66
66
|
}
|
|
67
|
-
if (this.
|
|
68
|
-
this.date.setAttribute('aria-
|
|
67
|
+
if (this.label) {
|
|
68
|
+
this.date.setAttribute('aria-label', this.label);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -21,7 +21,7 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
21
21
|
}
|
|
22
22
|
.radio-button {
|
|
23
23
|
width: auto;
|
|
24
|
-
margin: auto
|
|
24
|
+
margin: auto 0.188rem;
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-grow: 0.1;
|
|
27
27
|
justify-content: space-around;
|
|
@@ -31,7 +31,7 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
31
31
|
width: 100% !important;
|
|
32
32
|
border: none;
|
|
33
33
|
background-color: #f1f4ff;
|
|
34
|
-
margin:
|
|
34
|
+
margin: 0.125rem;
|
|
35
35
|
resize: none;
|
|
36
36
|
}
|
|
37
37
|
`,
|
|
@@ -85,8 +85,8 @@ export class DropDownListElement extends CustomInputElement {
|
|
|
85
85
|
this.value = this.initialValue;
|
|
86
86
|
}
|
|
87
87
|
this.select.addEventListener('change', this.change.bind(this));
|
|
88
|
-
if (this.
|
|
89
|
-
this.select.setAttribute('aria-
|
|
88
|
+
if (this.label) {
|
|
89
|
+
this.select.setAttribute('aria-label', this.label);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -67,8 +67,8 @@ export class EmailFieldElement extends CustomInputElement {
|
|
|
67
67
|
if (this.initialValue) {
|
|
68
68
|
this.value = this.initialValue;
|
|
69
69
|
}
|
|
70
|
-
if (this.
|
|
71
|
-
this.email.setAttribute('aria-
|
|
70
|
+
if (this.label) {
|
|
71
|
+
this.email.setAttribute('aria-label', this.label);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -22,7 +22,7 @@ import EXIF = require('exif-js');
|
|
|
22
22
|
width: 100% !important;
|
|
23
23
|
border: none;
|
|
24
24
|
background-color: #f1f4ff;
|
|
25
|
-
margin:
|
|
25
|
+
margin: 0.125rem;
|
|
26
26
|
resize: none;
|
|
27
27
|
}
|
|
28
28
|
`,
|
|
@@ -71,8 +71,8 @@ export class FileFieldElement extends CustomInputElement {
|
|
|
71
71
|
if (this.multi) {
|
|
72
72
|
this.file.setAttribute('multiple', '');
|
|
73
73
|
}
|
|
74
|
-
if (this.
|
|
75
|
-
this.file.setAttribute('aria-
|
|
74
|
+
if (this.label) {
|
|
75
|
+
this.file.setAttribute('aria-label', this.label);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -30,7 +30,7 @@ import BankIdNorwayValidator from '../../framework/Validation/Validators/BankIdN
|
|
|
30
30
|
box-sizing: border-box;
|
|
31
31
|
border: none;
|
|
32
32
|
background-color: #f1f4ff;
|
|
33
|
-
margin:
|
|
33
|
+
margin: 0.125rem;
|
|
34
34
|
resize: none;
|
|
35
35
|
}
|
|
36
36
|
input{
|
|
@@ -86,8 +86,8 @@ export class IdentificationElement extends CustomInputElement {
|
|
|
86
86
|
this.text.setAttribute('required', '');
|
|
87
87
|
}
|
|
88
88
|
this.type = this.typeSelector.value;
|
|
89
|
-
if (this.
|
|
90
|
-
this.text.setAttribute('aria-
|
|
89
|
+
if (this.label) {
|
|
90
|
+
this.text.setAttribute('aria-label', this.label);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -29,7 +29,7 @@ import GetFlags2XUrl from './Flags2x';
|
|
|
29
29
|
width: 100% !important;
|
|
30
30
|
border: none;
|
|
31
31
|
background-color: #f1f4ff;
|
|
32
|
-
margin:
|
|
32
|
+
margin: 0.125rem;
|
|
33
33
|
resize: none;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -79,8 +79,8 @@ export class IntPhoneFieldElement extends CustomInputElement {
|
|
|
79
79
|
this.phone.setAttribute('placeholder', this.placeholder);
|
|
80
80
|
this.intlTelInput.options.autoPlaceholder = 'off';
|
|
81
81
|
}
|
|
82
|
-
if (this.
|
|
83
|
-
this.phone.setAttribute('aria-
|
|
82
|
+
if (this.label) {
|
|
83
|
+
this.phone.setAttribute('aria-label', this.label);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
setIntlTelInput() {
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -73,8 +73,8 @@ export class NumericFieldElement extends CustomInputElement {
|
|
|
73
73
|
if (this.initialValue) {
|
|
74
74
|
this.value = this.initialValue;
|
|
75
75
|
}
|
|
76
|
-
if (this.
|
|
77
|
-
this.number.setAttribute('aria-
|
|
76
|
+
if (this.label) {
|
|
77
|
+
this.number.setAttribute('aria-label', this.label);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -7,6 +7,7 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
7
7
|
selector: 'radio-group-element',
|
|
8
8
|
template: `
|
|
9
9
|
<div class="wrapper">
|
|
10
|
+
<fieldset></fieldset>
|
|
10
11
|
</div>`,
|
|
11
12
|
style: `
|
|
12
13
|
:host{
|
|
@@ -14,18 +15,35 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
|
|
|
14
15
|
}
|
|
15
16
|
.radio-button {
|
|
16
17
|
width: auto;
|
|
17
|
-
margin: auto
|
|
18
|
+
margin: auto 0.188rem;
|
|
18
19
|
color: rgba(72, 72, 72, 0.75);
|
|
19
|
-
font-size:
|
|
20
|
+
font-size: 0.813rem;
|
|
21
|
+
margin-top: 0.25rem;
|
|
22
|
+
}
|
|
23
|
+
.radio-button:first-of-type {
|
|
24
|
+
margin-top: 0;
|
|
20
25
|
}
|
|
21
26
|
input{
|
|
22
27
|
box-sizing: border-box;
|
|
23
28
|
width: auto !important;
|
|
24
29
|
border: none;
|
|
25
30
|
background-color: #f1f4ff;
|
|
26
|
-
margin:
|
|
31
|
+
margin: 0.125rem;
|
|
27
32
|
resize: none;
|
|
28
33
|
}
|
|
34
|
+
.sr-only:not(:focus):not(:active) {
|
|
35
|
+
clip: rect(0 0 0 0);
|
|
36
|
+
clip-path: inset(50%);
|
|
37
|
+
height: 0.063rem;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
position: absolute;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
width: 0.063rem;
|
|
42
|
+
}
|
|
43
|
+
fieldset {
|
|
44
|
+
border: none;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
29
47
|
`,
|
|
30
48
|
useShadow: true,
|
|
31
49
|
})
|
|
@@ -73,16 +91,19 @@ export class RadioButtonGroupElement extends CustomInputElement {
|
|
|
73
91
|
if (this.initialValue) {
|
|
74
92
|
this.value = this.initialValue;
|
|
75
93
|
}
|
|
76
|
-
if (this.labelId) {
|
|
77
|
-
this.radioButton[0].setAttribute('aria-labelledby', this.labelId);
|
|
78
|
-
}
|
|
79
94
|
}
|
|
80
95
|
|
|
81
96
|
private addRadioButtons() {
|
|
82
97
|
const wrapper = super.getChildElement('.wrapper');
|
|
83
|
-
|
|
98
|
+
const fieldset = wrapper.querySelector('fieldset');
|
|
99
|
+
if (this.label) {
|
|
100
|
+
fieldset.insertAdjacentHTML(
|
|
101
|
+
'beforeend',
|
|
102
|
+
`<legend class="sr-only">${this.label}</legend>`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
84
105
|
this.options.forEach((element, index) => {
|
|
85
|
-
|
|
106
|
+
fieldset.insertAdjacentHTML(
|
|
86
107
|
'beforeend',
|
|
87
108
|
StringUtil.StringFormat(
|
|
88
109
|
this.radioButtonTemplate,
|
|
@@ -21,7 +21,7 @@ import SECompanyRegistrationValidator from '../../framework/Validation/Validator
|
|
|
21
21
|
width: 100% !important;
|
|
22
22
|
border: none;
|
|
23
23
|
background-color: #f1f4ff;
|
|
24
|
-
margin:
|
|
24
|
+
margin: 0.125rem;
|
|
25
25
|
resize: none;
|
|
26
26
|
}`,
|
|
27
27
|
useShadow: true,
|
|
@@ -59,8 +59,8 @@ export class SECompanyRegistrationElement extends CustomInputElement {
|
|
|
59
59
|
if (this.initialValue) {
|
|
60
60
|
this.value = this.initialValue;
|
|
61
61
|
}
|
|
62
|
-
if (this.
|
|
63
|
-
this.text.setAttribute('aria-
|
|
62
|
+
if (this.label) {
|
|
63
|
+
this.text.setAttribute('aria-label', this.label);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -21,7 +21,7 @@ import SEPersonalNumberValidator from '../../framework/Validation/Validators/SEP
|
|
|
21
21
|
width: 100% !important;
|
|
22
22
|
border: none;
|
|
23
23
|
background-color: #f1f4ff;
|
|
24
|
-
margin:
|
|
24
|
+
margin: 0.125rem;
|
|
25
25
|
resize: none;
|
|
26
26
|
}`,
|
|
27
27
|
useShadow: true,
|
|
@@ -59,8 +59,8 @@ export class SEPersonalNumberElement extends CustomInputElement {
|
|
|
59
59
|
if (this.initialValue) {
|
|
60
60
|
this.value = this.initialValue;
|
|
61
61
|
}
|
|
62
|
-
if (this.
|
|
63
|
-
this.text.setAttribute('aria-
|
|
62
|
+
if (this.label) {
|
|
63
|
+
this.text.setAttribute('aria-label', this.label);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -61,8 +61,8 @@ export class TextAreaElement extends CustomInputElement {
|
|
|
61
61
|
if (this.initialValue) {
|
|
62
62
|
this.value = this.initialValue;
|
|
63
63
|
}
|
|
64
|
-
if (this.
|
|
65
|
-
this.text.setAttribute('aria-
|
|
64
|
+
if (this.label) {
|
|
65
|
+
this.text.setAttribute('aria-label', this.label);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -20,7 +20,7 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
|
|
|
20
20
|
width: 100% !important;
|
|
21
21
|
border: none;
|
|
22
22
|
background-color: #f1f4ff;
|
|
23
|
-
margin:
|
|
23
|
+
margin: 0.125rem;
|
|
24
24
|
resize: none;
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
@@ -61,8 +61,8 @@ export class TextFieldElement extends CustomInputElement {
|
|
|
61
61
|
if (this.initialValue) {
|
|
62
62
|
this.value = this.initialValue;
|
|
63
63
|
}
|
|
64
|
-
if (this.
|
|
65
|
-
this.text.setAttribute('aria-
|
|
64
|
+
if (this.label) {
|
|
65
|
+
this.text.setAttribute('aria-label', this.label);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -27,31 +27,31 @@ import DomUtility from '../../framework/Utilities/DomUtility';
|
|
|
27
27
|
width: 100% !important;
|
|
28
28
|
border: none;
|
|
29
29
|
background-color: #f1f4ff;
|
|
30
|
-
margin:
|
|
30
|
+
margin: 0.125rem;
|
|
31
31
|
resize: none;
|
|
32
32
|
}
|
|
33
33
|
.wrapper #description {
|
|
34
34
|
width: 100%;
|
|
35
|
-
padding: 0
|
|
35
|
+
padding: 0 0.125rem;
|
|
36
36
|
box-sizing: border-box;
|
|
37
37
|
}
|
|
38
38
|
.options-list {
|
|
39
39
|
position: absolute;
|
|
40
|
-
border:
|
|
40
|
+
border: 0.063rem solid #E8E8E8;
|
|
41
41
|
border-bottom: none;
|
|
42
42
|
border-top: none;
|
|
43
43
|
z-index: 3;
|
|
44
44
|
top: 100%;
|
|
45
45
|
left: 0;
|
|
46
46
|
right: 0;
|
|
47
|
-
max-height:
|
|
47
|
+
max-height: 12.5rem;
|
|
48
48
|
overflow-y: auto;
|
|
49
49
|
}
|
|
50
50
|
.options-list-item {
|
|
51
|
-
padding:
|
|
51
|
+
padding: 0.625rem;
|
|
52
52
|
cursor: pointer;
|
|
53
53
|
background-color: #FFFFFF;
|
|
54
|
-
border-bottom:
|
|
54
|
+
border-bottom: 0.063rem solid #E8E8E8;
|
|
55
55
|
}
|
|
56
56
|
.options-list-item:hover {
|
|
57
57
|
background-color: #E8E8E8;
|
|
@@ -62,10 +62,10 @@ import DomUtility from '../../framework/Utilities/DomUtility';
|
|
|
62
62
|
color: #FFFFFF;
|
|
63
63
|
}
|
|
64
64
|
.options-list-item-title {
|
|
65
|
-
font-size:
|
|
65
|
+
font-size: 1rem;
|
|
66
66
|
}
|
|
67
67
|
.options-list-item-description {
|
|
68
|
-
font-size:
|
|
68
|
+
font-size: 0.625rem;
|
|
69
69
|
}
|
|
70
70
|
`,
|
|
71
71
|
useShadow: true,
|
|
@@ -134,8 +134,8 @@ export class TypeAheadElement extends CustomInputElement {
|
|
|
134
134
|
if (this.initialValue) {
|
|
135
135
|
this.value = this.initialValue;
|
|
136
136
|
}
|
|
137
|
-
if (this.
|
|
138
|
-
this.textInputElement.setAttribute('aria-
|
|
137
|
+
if (this.label) {
|
|
138
|
+
this.textInputElement.setAttribute('aria-label', this.label);
|
|
139
139
|
}
|
|
140
140
|
this.textInputElement.addEventListener('change', this.change.bind(this));
|
|
141
141
|
this.textInputElement.addEventListener('input', () => {
|