@luftborn/custom-elements 2.13.10 → 2.15.0

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.
Files changed (139) hide show
  1. package/demo/index.html +269 -259
  2. package/demo/index.js +455 -125
  3. package/demo/index.min.js +454 -124
  4. package/demo/index.min.js.map +1 -1
  5. package/dist/elements/Address/AddressElement.js +3 -2
  6. package/dist/elements/Address/AddressElement.js.map +1 -1
  7. package/dist/elements/BankField/BankFieldElement.js +3 -2
  8. package/dist/elements/BankField/BankFieldElement.js.map +1 -1
  9. package/dist/elements/CPRElement/CPRElement.js +3 -2
  10. package/dist/elements/CPRElement/CPRElement.js.map +1 -1
  11. package/dist/elements/CVRElement/CVRElement.js +3 -2
  12. package/dist/elements/CVRElement/CVRElement.js.map +1 -1
  13. package/dist/elements/CheckBoxElement/CheckBoxElement.js +4 -2
  14. package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
  15. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +3 -2
  16. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
  17. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +3 -2
  18. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
  19. package/dist/elements/DateField/DateFieldElement.js +3 -2
  20. package/dist/elements/DateField/DateFieldElement.js.map +1 -1
  21. package/dist/elements/DropDownList/DropDownListElement.js +3 -2
  22. package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
  23. package/dist/elements/Elements.d.ts +2 -1
  24. package/dist/elements/Elements.js +3 -1
  25. package/dist/elements/Elements.js.map +1 -1
  26. package/dist/elements/EmailField/EmailFieldElement.js +3 -2
  27. package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
  28. package/dist/elements/FileField/FileFieldElement.js +3 -2
  29. package/dist/elements/FileField/FileFieldElement.js.map +1 -1
  30. package/dist/elements/IdentificationElement/IdentificationElement.js +3 -2
  31. package/dist/elements/IdentificationElement/IdentificationElement.js.map +1 -1
  32. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +3 -2
  33. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
  34. package/dist/elements/NumericField/NumericFieldElement.js +3 -2
  35. package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
  36. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +4 -2
  37. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
  38. package/dist/elements/ResidentIdentification/ResidentIdentificationElement.d.ts +22 -0
  39. package/dist/elements/ResidentIdentification/ResidentIdentificationElement.js +145 -0
  40. package/dist/elements/ResidentIdentification/ResidentIdentificationElement.js.map +1 -0
  41. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +3 -2
  42. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
  43. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +3 -2
  44. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
  45. package/dist/elements/TextAreaElement/TextAreaElement.js +3 -2
  46. package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
  47. package/dist/elements/TextField/TextFieldElement.js +3 -2
  48. package/dist/elements/TextField/TextFieldElement.js.map +1 -1
  49. package/dist/elements/TypeAhead/TypeAheadElement.js +3 -2
  50. package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
  51. package/dist/framework/CustomInputElement.d.ts +1 -0
  52. package/dist/framework/CustomInputElement.js +17 -0
  53. package/dist/framework/CustomInputElement.js.map +1 -1
  54. package/dist/framework/Language/Languages/CzechDictionary.js +7 -1
  55. package/dist/framework/Language/Languages/CzechDictionary.js.map +1 -1
  56. package/dist/framework/Language/Languages/DanishDictionary.js +7 -1
  57. package/dist/framework/Language/Languages/DanishDictionary.js.map +1 -1
  58. package/dist/framework/Language/Languages/DutchDictionary.js +7 -1
  59. package/dist/framework/Language/Languages/DutchDictionary.js.map +1 -1
  60. package/dist/framework/Language/Languages/EnglishDictionary.js +7 -1
  61. package/dist/framework/Language/Languages/EnglishDictionary.js.map +1 -1
  62. package/dist/framework/Language/Languages/EstonianDictionary.js +7 -1
  63. package/dist/framework/Language/Languages/EstonianDictionary.js.map +1 -1
  64. package/dist/framework/Language/Languages/FinnishDictionary.js +7 -1
  65. package/dist/framework/Language/Languages/FinnishDictionary.js.map +1 -1
  66. package/dist/framework/Language/Languages/FrenchDictionary.js +7 -1
  67. package/dist/framework/Language/Languages/FrenchDictionary.js.map +1 -1
  68. package/dist/framework/Language/Languages/GermanDictionary.js +7 -1
  69. package/dist/framework/Language/Languages/GermanDictionary.js.map +1 -1
  70. package/dist/framework/Language/Languages/GreekDictionary.js +7 -1
  71. package/dist/framework/Language/Languages/GreekDictionary.js.map +1 -1
  72. package/dist/framework/Language/Languages/HungarianDictionary.js +7 -1
  73. package/dist/framework/Language/Languages/HungarianDictionary.js.map +1 -1
  74. package/dist/framework/Language/Languages/IcelandicDictionary.js +7 -1
  75. package/dist/framework/Language/Languages/IcelandicDictionary.js.map +1 -1
  76. package/dist/framework/Language/Languages/ItalianDictionary.js +7 -1
  77. package/dist/framework/Language/Languages/ItalianDictionary.js.map +1 -1
  78. package/dist/framework/Language/Languages/LatvianDictionary.js +7 -1
  79. package/dist/framework/Language/Languages/LatvianDictionary.js.map +1 -1
  80. package/dist/framework/Language/Languages/LituanianDictionary.js +7 -1
  81. package/dist/framework/Language/Languages/LituanianDictionary.js.map +1 -1
  82. package/dist/framework/Language/Languages/NorwegianDictionary.js +7 -1
  83. package/dist/framework/Language/Languages/NorwegianDictionary.js.map +1 -1
  84. package/dist/framework/Language/Languages/PolishDictionary.js +7 -1
  85. package/dist/framework/Language/Languages/PolishDictionary.js.map +1 -1
  86. package/dist/framework/Language/Languages/PortugueseDictionary.js +7 -1
  87. package/dist/framework/Language/Languages/PortugueseDictionary.js.map +1 -1
  88. package/dist/framework/Language/Languages/SpanishDictionary.js +7 -1
  89. package/dist/framework/Language/Languages/SpanishDictionary.js.map +1 -1
  90. package/dist/framework/Language/Languages/SwedishDictionary.js +7 -1
  91. package/dist/framework/Language/Languages/SwedishDictionary.js.map +1 -1
  92. package/dist/framework/Validation/Validators/ResidentIdentification.d.ts +5 -0
  93. package/dist/framework/Validation/Validators/ResidentIdentification.js +28 -0
  94. package/dist/framework/Validation/Validators/ResidentIdentification.js.map +1 -0
  95. package/package.json +1 -1
  96. package/src/elements/Address/AddressElement.ts +37 -18
  97. package/src/elements/BankField/BankFieldElement.ts +34 -16
  98. package/src/elements/CPRElement/CPRElement.ts +28 -10
  99. package/src/elements/CVRElement/CVRElement.ts +28 -10
  100. package/src/elements/CheckBoxElement/CheckBoxElement.ts +22 -3
  101. package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +25 -7
  102. package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +28 -10
  103. package/src/elements/DateField/DateFieldElement.ts +28 -10
  104. package/src/elements/DropDownList/DropDownListElement.ts +42 -24
  105. package/src/elements/Elements.ts +2 -0
  106. package/src/elements/EmailField/EmailFieldElement.ts +28 -10
  107. package/src/elements/FileField/FileFieldElement.ts +28 -10
  108. package/src/elements/IdentificationElement/IdentificationElement.ts +32 -14
  109. package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +36 -19
  110. package/src/elements/NumericField/NumericFieldElement.ts +28 -10
  111. package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +46 -27
  112. package/src/elements/ResidentIdentification/ResidentIdentificationElement.ts +155 -0
  113. package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +24 -5
  114. package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +24 -5
  115. package/src/elements/TextAreaElement/TextAreaElement.ts +28 -10
  116. package/src/elements/TextField/TextFieldElement.ts +30 -11
  117. package/src/elements/TypeAhead/TypeAheadElement.ts +27 -9
  118. package/src/framework/CustomInputElement.ts +18 -0
  119. package/src/framework/Language/Languages/CzechDictionary.ts +7 -1
  120. package/src/framework/Language/Languages/DanishDictionary.ts +8 -1
  121. package/src/framework/Language/Languages/DutchDictionary.ts +7 -1
  122. package/src/framework/Language/Languages/EnglishDictionary.ts +7 -1
  123. package/src/framework/Language/Languages/EstonianDictionary.ts +7 -1
  124. package/src/framework/Language/Languages/FinnishDictionary.ts +7 -1
  125. package/src/framework/Language/Languages/FrenchDictionary.ts +7 -1
  126. package/src/framework/Language/Languages/GermanDictionary.ts +7 -1
  127. package/src/framework/Language/Languages/GreekDictionary.ts +7 -1
  128. package/src/framework/Language/Languages/HungarianDictionary.ts +7 -1
  129. package/src/framework/Language/Languages/IcelandicDictionary.ts +7 -1
  130. package/src/framework/Language/Languages/ItalianDictionary.ts +7 -1
  131. package/src/framework/Language/Languages/LatvianDictionary.ts +7 -1
  132. package/src/framework/Language/Languages/LituanianDictionary.ts +7 -1
  133. package/src/framework/Language/Languages/NorwegianDictionary.ts +7 -1
  134. package/src/framework/Language/Languages/PolishDictionary.ts +7 -1
  135. package/src/framework/Language/Languages/PortugueseDictionary.ts +7 -1
  136. package/src/framework/Language/Languages/SpanishDictionary.ts +7 -1
  137. package/src/framework/Language/Languages/SwedishDictionary.ts +7 -1
  138. package/src/framework/Validation/Validators/ResidentIdentification.ts +28 -0
  139. package/src/elements/Address/html.html +0 -0
@@ -10,35 +10,51 @@ import GetFlags2XUrl from './Flags2x';
10
10
  @CustomElement({
11
11
  selector: 'int-phone-element',
12
12
  template: `
13
+ <div class="field-label">
14
+ </div>
15
+ <div class="field-input">
13
16
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/css/intlTelInput.css" >
14
17
  <div class="wrapper">
15
18
  <input type="tel" id="phone-field" />
16
- </div>`,
19
+ </div>
20
+ </div>`,
17
21
  style: `
18
- :host{
22
+ :host{
19
23
  width:100%;
20
- }
21
- .wrapper{
24
+ }
25
+ .wrapper{
22
26
  display:flex;
23
- }
24
- .iti {
25
- width: 100% !important;
26
- }
27
- input{
27
+ }
28
+ .iti {
29
+ width: 100% !important;
30
+ }
31
+ input{
28
32
  box-sizing: border-box;
29
33
  width: 100% !important;
30
- border: none;
31
- background-color: #f1f4ff;
34
+ border: .1rem solid #27282D;
35
+ border-radius: .25rem;
32
36
  margin: 0.125rem;
33
37
  resize: none;
34
- }
35
-
36
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
37
- .iti__flag {
38
- background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/img/flags@2x.png'), url(${GetFlags2XUrl()});
39
- }
40
- }
41
- `,
38
+ }
39
+ input::placeholder {
40
+ color: rgb(117, 117, 117);
41
+ }
42
+ .field-label {
43
+ color: #27282d;
44
+ font-size: .75rem;
45
+ font-weight: 600;
46
+ word-wrap: break-word;
47
+ }
48
+ .field-input {
49
+ font-size: 0.813rem;
50
+ min-height: 1.438rem;
51
+ }
52
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
53
+ .iti__flag {
54
+ background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/img/flags@2x.png'), url(${GetFlags2XUrl()});
55
+ }
56
+ }
57
+ `,
42
58
  useShadow: true,
43
59
  })
44
60
  export class IntPhoneFieldElement extends CustomInputElement {
@@ -68,6 +84,7 @@ export class IntPhoneFieldElement extends CustomInputElement {
68
84
  connectedCallback(): void {
69
85
  this.setIntlTelInput();
70
86
  super.connectedCallback();
87
+ super.addLabel(this.phone);
71
88
  }
72
89
 
73
90
  initChildInputs() {
@@ -5,25 +5,42 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'numeric-element',
7
7
  template: `
8
+ <div class="field-label">
9
+ </div>
10
+ <div class="field-input">
8
11
  <div class="wrapper">
9
12
  <input type="number" id="numeric-field" step="any" />
10
- </div>`,
13
+ </div>
14
+ </div>`,
11
15
  style: `
12
- :host{
16
+ :host{
13
17
  width:100%;
14
- }
15
- .wrapper{
18
+ }
19
+ .wrapper{
16
20
  display:flex;
17
- }
18
- input{
21
+ }
22
+ input{
19
23
  box-sizing: border-box;
20
24
  width: 100% !important;
21
- border: none;
22
- background-color: #f1f4ff;
25
+ border: .1rem solid #27282D;
26
+ border-radius: .25rem;
23
27
  margin: 0.125rem;
24
28
  resize: none;
25
- }
26
- `,
29
+ }
30
+ input::placeholder {
31
+ color: rgb(117, 117, 117);
32
+ }
33
+ .field-label {
34
+ color: #27282d;
35
+ font-size: .75rem;
36
+ font-weight: 600;
37
+ word-wrap: break-word;
38
+ }
39
+ .field-input {
40
+ font-size: 0.813rem;
41
+ min-height: 1.438rem;
42
+ }
43
+ `,
27
44
  useShadow: true,
28
45
  })
29
46
  export class NumericFieldElement extends CustomInputElement {
@@ -50,6 +67,7 @@ export class NumericFieldElement extends CustomInputElement {
50
67
 
51
68
  connectedCallback(): void {
52
69
  super.connectedCallback();
70
+ super.addLabel(this.number);
53
71
  }
54
72
 
55
73
  initChildInputs() {
@@ -6,35 +6,52 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
6
6
  @CustomElement({
7
7
  selector: 'radio-group-element',
8
8
  template: `
9
+ <div class="field-label">
10
+ </div>
11
+ <div class="field-input">
9
12
  <div class="wrapper">
10
- </div>`,
13
+ </div>
14
+ </div>`,
11
15
  style: `
12
- :host{
13
- width:100%;
14
- }
15
- .radio-button {
16
- width: auto;
17
- margin: auto 0.188rem;
18
- color: rgba(72, 72, 72, 0.75);
19
- font-size: 0.813rem;
20
- margin-top: 0.25rem;
21
- }
22
- .radio-button:first-of-type {
23
- margin-top: 0;
24
- }
25
- input{
26
- box-sizing: border-box;
27
- width: auto !important;
28
- border: none;
29
- background-color: #f1f4ff;
30
- margin: 0.2rem;
31
- resize: none;
32
- }
33
- fieldset {
34
- border: none;
35
- padding: 0;
36
- }
37
- `,
16
+ :host{
17
+ width:100%;
18
+ }
19
+ .radio-button {
20
+ width: auto;
21
+ margin: auto 0.188rem;
22
+ color: rgba(72, 72, 72, 0.75);
23
+ font-size: 0.813rem;
24
+ margin-top: 0.25rem;
25
+ }
26
+ .radio-button:first-of-type {
27
+ margin-top: 0;
28
+ }
29
+ input{
30
+ box-sizing: border-box;
31
+ width: auto !important;
32
+ border: .1rem solid #27282D;
33
+ border-radius: .25rem;
34
+ margin: 0.2rem;
35
+ resize: none;
36
+ }
37
+ input::placeholder {
38
+ color: rgb(117, 117, 117);
39
+ }
40
+ fieldset {
41
+ border: none;
42
+ padding: 0;
43
+ }
44
+ .field-label {
45
+ color: #27282d;
46
+ font-size: .75rem;
47
+ font-weight: 600;
48
+ word-wrap: break-word;
49
+ }
50
+ .field-input {
51
+ font-size: 0.813rem;
52
+ min-height: 1.438rem;
53
+ }
54
+ `,
38
55
  useShadow: true,
39
56
  })
40
57
  export class RadioButtonGroupElement extends CustomInputElement {
@@ -70,6 +87,8 @@ export class RadioButtonGroupElement extends CustomInputElement {
70
87
 
71
88
  connectedCallback(): void {
72
89
  super.connectedCallback();
90
+ const firstRadioButton = super.getChildElement('input[type="radio"]') as HTMLInputElement;
91
+ super.addLabel(firstRadioButton);
73
92
  }
74
93
 
75
94
  initChildInputs() {
@@ -0,0 +1,155 @@
1
+ import CustomElement from '../../framework/custom-element.decorator';
2
+ import { CustomInputElement } from '../../framework/CustomInputElement';
3
+ import { CustomElementEventArgs } from '../../framework/CustomEvents';
4
+ import Translator from '../../framework/Language/Translator';
5
+ import getAttributeNamesPolyfill from '../../framework/Polyfills/getAttributeNamesPolyfill';
6
+ import ResidentIdentificationValidator from '../../framework/Validation/Validators/ResidentIdentification';
7
+
8
+ @CustomElement({
9
+ selector: 'resident-identification-element',
10
+ template: `
11
+ <div class="field-label">
12
+ </div>
13
+ <div class="field-input">
14
+ <div class="field-wrapper">
15
+ <input class='field-part' id='company' type="text" placeholder='Company'/>
16
+ <input class='field-part' id='property' type="text" placeholder='Property'/>
17
+ <input class='field-part' id='tenancy' type="text" placeholder='Tenancy'/>
18
+ <input class='field-part' id='tenant' type="text" placeholder='Tenant'/>
19
+ </div>
20
+ </div>`,
21
+ style: `
22
+ .field-wrapper{
23
+ display: flex;
24
+ flex-wrap: nowrap;
25
+ }
26
+ input.field-part{
27
+ box-sizing: border-box;
28
+ border: .1rem solid #27282D;
29
+ border-radius: .25rem;
30
+ margin: 0.125rem;
31
+ resize: none;
32
+ width:33% !important;
33
+ }
34
+ input.field-part::placeholder {
35
+ color: rgb(117, 117, 117);
36
+ }
37
+ .field-label {
38
+ color: #27282d;
39
+ font-size: .75rem;
40
+ font-weight: 600;
41
+ word-wrap: break-word;
42
+ }
43
+ .field-input {
44
+ font-size: 0.813rem;
45
+ min-height: 1.438rem;
46
+ }
47
+ `,
48
+ templatePath: './html.html',
49
+ useShadow: true,
50
+ })
51
+ export class ResidentIdentificationElement extends CustomInputElement {
52
+ company: HTMLInputElement;
53
+ property: HTMLInputElement;
54
+ tenancy: HTMLInputElement;
55
+ tenant: HTMLInputElement;
56
+ validator: ResidentIdentificationValidator = new ResidentIdentificationValidator();
57
+
58
+ constructor() {
59
+ super();
60
+ getAttributeNamesPolyfill();
61
+ }
62
+
63
+ get value(): string {
64
+ let company = this.company.value || '';
65
+ let property = this.property.value ? `-${this.property.value}` : '';
66
+ let tenancy = this.tenancy.value ? `-${this.tenancy.value}` : '';
67
+ let tenant = this.tenant.value ? `-${this.tenant.value}` : '';
68
+ return `${company}${property}${tenancy}${tenant}`;
69
+ }
70
+
71
+ set value(value: string) {
72
+ const values = value.split(',');
73
+ this.company.value = values[0];
74
+ this.property.value = values[1];
75
+ this.tenancy.value = values[2];
76
+ this.tenant.value = values[3];
77
+ }
78
+
79
+ get valid(): boolean {
80
+ return this.validator.isSatisfiedBy(this.value, !this.required);
81
+ }
82
+
83
+ connectedCallback(): void {
84
+ super.connectedCallback();
85
+ super.addLabel(this.company);
86
+ }
87
+
88
+ componentDidMount() {
89
+ this.initChildInputs();
90
+ this.getAttributeNames().forEach(attributeName => {
91
+ let attributeValue = this.getAttribute(attributeName);
92
+ this.attributeChanged(attributeName, null, attributeValue);
93
+ });
94
+ }
95
+
96
+ initChildInputs() {
97
+ this.company = super.getChildInput('#company');
98
+ this.property = super.getChildInput('#property');
99
+ this.tenancy = super.getChildInput('#tenancy');
100
+ this.tenant = super.getChildInput('#tenant');
101
+ this.company.addEventListener('change', this.change.bind(this));
102
+ this.property.addEventListener('change', this.change.bind(this));
103
+ this.tenancy.addEventListener('change', this.change.bind(this));
104
+ this.tenant.addEventListener('change', this.change.bind(this));
105
+ if (this.required) {
106
+ this.company.setAttribute('required', 'required');
107
+ this.property.setAttribute('required', 'required');
108
+ this.tenancy.setAttribute('required', 'required');
109
+ this.tenant.setAttribute('required', 'required');
110
+ }
111
+ if (this.label) {
112
+ const wrapper = this.shadowRoot.querySelector('.field-wrapper');
113
+ if (wrapper) {
114
+ wrapper.setAttribute('aria-label', this.label);
115
+ }
116
+ }
117
+ }
118
+
119
+ // events
120
+ public change($event): void {
121
+ this.touched = true;
122
+ this.onChange.emit(new CustomElementEventArgs(this.value, 'change'));
123
+ }
124
+
125
+ public validate(): void {
126
+ this.valid;
127
+ this.onValidate.emit(
128
+ new CustomElementEventArgs(this.value, 'validate'),
129
+ );
130
+ }
131
+
132
+ changeLanguage(language: string) {
133
+ if (!this.company || !this.property || !this.tenancy || !this.tenant) {
134
+ return;
135
+ }
136
+ this.company.placeholder = Translator.Translate('ResidentIdentificationElement.Company', language);
137
+ this.property.placeholder = Translator.Translate('ResidentIdentificationElement.Property', language);
138
+ this.tenancy.placeholder = Translator.Translate('ResidentIdentificationElement.Tenancy', language);
139
+ this.tenant.placeholder = Translator.Translate('ResidentIdentificationElement.Tenant', language);
140
+ }
141
+
142
+ static get observedAttributes() {
143
+ return ['language'];
144
+ }
145
+ attributeChangedCallback(name: string, oldVal: string, newVal: string) {
146
+ this.attributeChanged(name, oldVal, newVal);
147
+ }
148
+ private attributeChanged(name: string, oldVal: string, newVal: string) {
149
+ switch (name) {
150
+ case 'language':
151
+ this.changeLanguage(newVal)
152
+ break;
153
+ }
154
+ }
155
+ }
@@ -6,8 +6,12 @@ import SECompanyRegistrationValidator from '../../framework/Validation/Validator
6
6
  @CustomElement({
7
7
  selector: 'se-company-registration-element',
8
8
  template: `
9
- <div class="wrapper">
10
- <input type="text" id='se-company-registration-field' placeholder='SSSSSSSSSS'/>
9
+ <div class="field-label">
10
+ </div>
11
+ <div class="field-input">
12
+ <div class="wrapper">
13
+ <input type="text" id='se-company-registration-field' placeholder='SSSSSSSSSS'/>
14
+ </div>
11
15
  </div>`,
12
16
  style: `
13
17
  :host{
@@ -19,11 +23,25 @@ import SECompanyRegistrationValidator from '../../framework/Validation/Validator
19
23
  input{
20
24
  box-sizing: border-box;
21
25
  width: 100% !important;
22
- border: none;
23
- background-color: #f1f4ff;
26
+ border: .1rem solid #27282D;
27
+ border-radius: .25rem;
24
28
  margin: 0.125rem;
25
29
  resize: none;
26
- }`,
30
+ }
31
+ input::placeholder {
32
+ color: rgb(117, 117, 117);
33
+ }
34
+ .field-label {
35
+ color: #27282d;
36
+ font-size: .75rem;
37
+ font-weight: 600;
38
+ word-wrap: break-word;
39
+ }
40
+ .field-input {
41
+ font-size: 0.813rem;
42
+ min-height: 1.438rem;
43
+ }
44
+ `,
27
45
  useShadow: true,
28
46
  })
29
47
  export class SECompanyRegistrationElement extends CustomInputElement {
@@ -48,6 +66,7 @@ export class SECompanyRegistrationElement extends CustomInputElement {
48
66
 
49
67
  connectedCallback(): void {
50
68
  super.connectedCallback();
69
+ super.addLabel(this.text);
51
70
  }
52
71
 
53
72
  initChildInputs() {
@@ -6,8 +6,12 @@ import SEPersonalNumberValidator from '../../framework/Validation/Validators/SEP
6
6
  @CustomElement({
7
7
  selector: 'se-personal-number-element',
8
8
  template: `
9
- <div class="wrapper">
10
- <input type="text" id='se-personal-number-field' placeholder='(YY)YYMMDD-SSSS'/>
9
+ <div class="field-label">
10
+ </div>
11
+ <div class="field-input">
12
+ <div class="wrapper">
13
+ <input type="text" id='se-personal-number-field' placeholder='(YY)YYMMDD-SSSS'/>
14
+ </div>
11
15
  </div>`,
12
16
  style: `
13
17
  :host{
@@ -19,11 +23,25 @@ import SEPersonalNumberValidator from '../../framework/Validation/Validators/SEP
19
23
  input{
20
24
  box-sizing: border-box;
21
25
  width: 100% !important;
22
- border: none;
23
- background-color: #f1f4ff;
26
+ border: .1rem solid #27282D;
27
+ border-radius: .25rem;
24
28
  margin: 0.125rem;
25
29
  resize: none;
26
- }`,
30
+ }
31
+ input::placeholder {
32
+ color: rgb(117, 117, 117);
33
+ }
34
+ .field-label {
35
+ color: #27282d;
36
+ font-size: .75rem;
37
+ font-weight: 600;
38
+ word-wrap: break-word;
39
+ }
40
+ .field-input {
41
+ font-size: 0.813rem;
42
+ min-height: 1.438rem;
43
+ }
44
+ `,
27
45
  useShadow: true,
28
46
  })
29
47
  export class SEPersonalNumberElement extends CustomInputElement {
@@ -48,6 +66,7 @@ export class SEPersonalNumberElement extends CustomInputElement {
48
66
 
49
67
  connectedCallback(): void {
50
68
  super.connectedCallback();
69
+ super.addLabel(this.text);
51
70
  }
52
71
 
53
72
  initChildInputs() {
@@ -5,25 +5,42 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'text-area-element',
7
7
  template: `
8
+ <div class="field-label">
9
+ </div>
10
+ <div class="field-input">
8
11
  <div class="wrapper">
9
12
  <textarea rows=5 id='text-area-field'></textarea>
10
- </div>`,
13
+ </div>
14
+ </div>`,
11
15
  style: `
12
- :host{
16
+ :host{
13
17
  width:100%;
14
- }
15
- .wrapper{
18
+ }
19
+ .wrapper{
16
20
  display:flex;
17
- }
18
- textarea{
21
+ }
22
+ textarea{
19
23
  box-sizing: border-box;
20
24
  width: 100% !important;
21
- border: none;
22
- background-color: #f1f4ff;
25
+ border: .1rem solid #27282D;
26
+ border-radius: .25rem;
23
27
  margin: 0.125rem;
24
28
  resize: none;
25
- }
26
- `,
29
+ }
30
+ textarea::placeholder {
31
+ color: rgb(117, 117, 117);
32
+ }
33
+ .field-label {
34
+ color: #27282d;
35
+ font-size: .75rem;
36
+ font-weight: 600;
37
+ word-wrap: break-word;
38
+ }
39
+ .field-input {
40
+ font-size: 0.813rem;
41
+ min-height: 1.438rem;
42
+ }
43
+ `,
27
44
  useShadow: true,
28
45
  })
29
46
  export class TextAreaElement extends CustomInputElement {
@@ -47,6 +64,7 @@ export class TextAreaElement extends CustomInputElement {
47
64
 
48
65
  connectedCallback(): void {
49
66
  super.connectedCallback();
67
+ super.addLabel(this.text);
50
68
  }
51
69
 
52
70
  initChildInputs() {
@@ -5,25 +5,43 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'text-element',
7
7
  template: `
8
+ <div class="field-label">
9
+ </div>
10
+ <div class="field-input">
8
11
  <div class="wrapper">
9
12
  <input type="text" id='text-field' />
10
- </div>`,
13
+ </div>
14
+ </div>
15
+ `,
11
16
  style: `
12
- :host{
17
+ :host{
13
18
  width:100%;
14
- }
15
- .wrapper{
19
+ }
20
+ .wrapper{
16
21
  display:flex;
17
- }
18
- input{
22
+ }
23
+ input{
19
24
  box-sizing: border-box;
20
25
  width: 100% !important;
21
- border: none;
22
- background-color: #f1f4ff;
26
+ border: .1rem solid #27282D;
27
+ border-radius: .25rem;
23
28
  margin: 0.125rem;
24
29
  resize: none;
25
- }
26
- `,
30
+ }
31
+ input::placeholder {
32
+ color: rgb(117, 117, 117);
33
+ }
34
+ .field-label {
35
+ color: #27282d;
36
+ font-size: .75rem;
37
+ font-weight: 600;
38
+ word-wrap: break-word;
39
+ }
40
+ .field-input {
41
+ font-size: 0.813rem;
42
+ min-height: 1.438rem;
43
+ }
44
+ `,
27
45
  useShadow: true,
28
46
  })
29
47
  export class TextFieldElement extends CustomInputElement {
@@ -47,7 +65,8 @@ export class TextFieldElement extends CustomInputElement {
47
65
 
48
66
  connectedCallback(): void {
49
67
  super.connectedCallback();
50
- }
68
+ super.addLabel(this.text);
69
+ }
51
70
 
52
71
  initChildInputs() {
53
72
  this.text = super.getChildInput('#text-field');
@@ -7,12 +7,16 @@ import DomUtility from '../../framework/Utilities/DomUtility';
7
7
  @CustomElement({
8
8
  selector: 'type-ahead-element',
9
9
  template: `
10
- <div class="wrapper" role="combobox" aria-expanded="false" aria-owns="options-list" aria-haspopup="listbox">
11
- <input type="text" id="text-input" aria-autocomplete="list" aria-controls="options-list" aria-activedescendant="" role="textbox">
12
- <div id="description" aria-live="polite"></div>
13
- <div id="options-list" role="listbox" class="options-list" hidden>
14
- <!-- Options will be dynamically added here -->
15
- </div>
10
+ <div class="field-label">
11
+ </div>
12
+ <div class="field-input">
13
+ <div class="wrapper" role="combobox" aria-expanded="false" aria-owns="options-list" aria-haspopup="listbox">
14
+ <input type="text" class="text-input" id="text-input" aria-autocomplete="list" aria-controls="options-list" aria-activedescendant="" role="textbox">
15
+ <div id="description" aria-live="polite"></div>
16
+ <div id="options-list" role="listbox" class="options-list" hidden>
17
+ <!-- Options will be dynamically added here -->
18
+ </div>
19
+ </div>
16
20
  </div>`,
17
21
  style: `
18
22
  :host {
@@ -25,14 +29,17 @@ import DomUtility from '../../framework/Utilities/DomUtility';
25
29
  justify-content: center;
26
30
  align-items: center;
27
31
  }
28
- #text-input {
32
+ .text-input {
29
33
  box-sizing: border-box;
30
34
  width: 100% !important;
31
- border: none;
32
- background-color: #f1f4ff;
35
+ border: .1rem solid #27282D;
36
+ border-radius: .25rem;
33
37
  margin: 0.125rem;
34
38
  resize: none;
35
39
  }
40
+ .text-input::placeholder {
41
+ color: rgb(117, 117, 117);
42
+ }
36
43
  .wrapper #description {
37
44
  width: 100%;
38
45
  padding: 0 0.125rem;
@@ -69,6 +76,16 @@ import DomUtility from '../../framework/Utilities/DomUtility';
69
76
  .options-list-item-description {
70
77
  font-size: 0.625rem;
71
78
  }
79
+ .field-label {
80
+ color: #27282d;
81
+ font-size: .75rem;
82
+ font-weight: 600;
83
+ word-wrap: break-word;
84
+ }
85
+ .field-input {
86
+ font-size: 0.813rem;
87
+ min-height: 1.438rem;
88
+ }
72
89
  `,
73
90
  useShadow: true,
74
91
  })
@@ -122,6 +139,7 @@ export class TypeAheadElement extends CustomInputElement {
122
139
 
123
140
  connectedCallback(): void {
124
141
  super.connectedCallback();
142
+ super.addLabel(this.textInputElement);
125
143
  }
126
144
 
127
145
  initChildInputs() {