@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
@@ -6,25 +6,42 @@ import CprValidator from '../../framework/Validation/Validators/CPR';
6
6
  @CustomElement({
7
7
  selector: 'cpr-element',
8
8
  template: `
9
+ <div class="field-label">
10
+ </div>
11
+ <div class="field-input">
9
12
  <div class="wrapper">
10
13
  <input type="text" id='cpr-field' placeholder='DDMMYY-SSSS'/>
11
- </div>`,
14
+ </div>
15
+ </div>`,
12
16
  style: `
13
- :host{
17
+ :host{
14
18
  width:100%;
15
- }
16
- .wrapper{
19
+ }
20
+ .wrapper{
17
21
  display:flex;
18
- }
19
- input{
22
+ }
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
- }
27
- `,
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
+ `,
28
45
  useShadow: true,
29
46
  })
30
47
  export class CPRElement extends CustomInputElement {
@@ -49,6 +66,7 @@ export class CPRElement extends CustomInputElement {
49
66
 
50
67
  connectedCallback(): void {
51
68
  super.connectedCallback();
69
+ super.addLabel(this.text);
52
70
  }
53
71
 
54
72
  initChildInputs() {
@@ -7,25 +7,42 @@ import CvrValidator from '../../framework/Validation/Validators/CVR';
7
7
  @CustomElement({
8
8
  selector: 'cvr-element',
9
9
  template: `
10
+ <div class="field-label">
11
+ </div>
12
+ <div class="field-input">
10
13
  <div class="wrapper">
11
14
  <input type="text" id='cvr-field' placeholder='SSSSSSSS'/>
12
- </div>`,
15
+ </div>
16
+ </div>`,
13
17
  style: `
14
- :host{
18
+ :host{
15
19
  width:100%;
16
- }
17
- .wrapper{
20
+ }
21
+ .wrapper{
18
22
  display:flex;
19
- }
20
- input{
23
+ }
24
+ input{
21
25
  box-sizing: border-box;
22
26
  width: 100% !important;
23
- border: none;
24
- background-color: #f1f4ff;
27
+ border: .1rem solid #27282D;
28
+ border-radius: .25rem;
25
29
  margin: 0.125rem;
26
30
  resize: none;
27
- }
28
- `,
31
+ }
32
+ input::placeholder {
33
+ color: rgb(117, 117, 117);
34
+ }
35
+ .field-label {
36
+ color: #27282d;
37
+ font-size: .75rem;
38
+ font-weight: 600;
39
+ word-wrap: break-word;
40
+ }
41
+ .field-input {
42
+ font-size: 0.813rem;
43
+ min-height: 1.438rem;
44
+ }
45
+ `,
29
46
  useShadow: true,
30
47
  })
31
48
  export class CVRElement extends CustomInputElement {
@@ -50,6 +67,7 @@ export class CVRElement extends CustomInputElement {
50
67
 
51
68
  connectedCallback(): void {
52
69
  super.connectedCallback();
70
+ super.addLabel(this.text);
53
71
  }
54
72
 
55
73
  initChildInputs() {
@@ -6,8 +6,12 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
6
6
  @CustomElement({
7
7
  selector: 'checkbox-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
16
  :host{
13
17
  width:100%;
@@ -25,15 +29,28 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
25
29
  input[type='checkbox']{
26
30
  box-sizing: border-box;
27
31
  width: auto !important;
28
- border: none;
29
- background-color: #f1f4ff;
32
+ border: .1rem solid #27282D;
33
+ border-radius: .25rem;
30
34
  margin: 0.125rem;
31
35
  resize: none;
32
36
  }
37
+ input[type='checkbox']::placeholder {
38
+ color: rgb(117, 117, 117);
39
+ }
33
40
  fieldset {
34
41
  border: none;
35
42
  padding: 0;
36
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
+ }
37
54
  `,
38
55
  useShadow: true,
39
56
  })
@@ -67,6 +84,8 @@ export class CheckBoxElement extends CustomInputElement {
67
84
 
68
85
  connectedCallback(): void {
69
86
  super.connectedCallback();
87
+ const firstCheckbox = super.getChildElement('input[type="checkbox"]') as HTMLInputElement;
88
+ super.addLabel(firstCheckbox);
70
89
  }
71
90
 
72
91
  initChildInputs() {
@@ -7,11 +7,15 @@ import { defaultDateFormat, supportedDateFormats, validateDateString } from './C
7
7
  @CustomElement({
8
8
  selector: 'custom-format-date-element',
9
9
  template: `
10
- <div class="wrapper">
11
- <input type="text" id="date-field">
12
- <button id="picker-trigger" aria-label="Open date picker">
13
- <svg class="svg-picker" data-toggle viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="4" width="20" height="18" rx="1" fill="#000"/><rect x="4" y="8" width="16" height="12" fill="white"/><path d="M4 10H20" stroke="#000" stroke-width="1"/><circle cx="16" cy="14" r="2" fill="#F44336"/><rect x="6" y="2" width="3" height="4" rx=".5" fill="#000"/><rect x="15" y="2" width="3" height="4" rx=".5" fill="#000"/></svg>
14
- </button>
10
+ <div class="field-label">
11
+ </div>
12
+ <div class="field-input">
13
+ <div class="wrapper">
14
+ <input type="text" id="date-field">
15
+ <button id="picker-trigger" aria-label="Open date picker">
16
+ <svg class="svg-picker" data-toggle viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="4" width="20" height="18" rx="1" fill="#000"/><rect x="4" y="8" width="16" height="12" fill="white"/><path d="M4 10H20" stroke="#000" stroke-width="1"/><circle cx="16" cy="14" r="2" fill="#F44336"/><rect x="6" y="2" width="3" height="4" rx=".5" fill="#000"/><rect x="15" y="2" width="3" height="4" rx=".5" fill="#000"/></svg>
17
+ </button>
18
+ </div>
15
19
  </div>`,
16
20
  style: `
17
21
  :host{
@@ -27,11 +31,14 @@ import { defaultDateFormat, supportedDateFormats, validateDateString } from './C
27
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
38
  }
39
+ input::placeholder {
40
+ color: rgb(117, 117, 117);
41
+ }
35
42
  #date-field::after {
36
43
  content: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */
37
44
  cursor: pointer;
@@ -54,6 +61,16 @@ import { defaultDateFormat, supportedDateFormats, validateDateString } from './C
54
61
  top: 15%;
55
62
  padding: 0;
56
63
  }
64
+ .field-label {
65
+ color: #27282d;
66
+ font-size: .75rem;
67
+ font-weight: 600;
68
+ word-wrap: break-word;
69
+ }
70
+ .field-input {
71
+ font-size: 0.813rem;
72
+ min-height: 1.438rem;
73
+ }
57
74
  `,
58
75
  useShadow: true,
59
76
  })
@@ -83,6 +100,7 @@ export class CustomFormatDateFieldElement extends CustomInputElement {
83
100
 
84
101
  connectedCallback(): void {
85
102
  super.connectedCallback();
103
+ this.addLabel(this.date);
86
104
  }
87
105
 
88
106
  initChildInputs() {
@@ -5,25 +5,42 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'regex-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='regex-field'/>
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 CustomRegularExpressionElement extends CustomInputElement {
@@ -52,6 +69,7 @@ export class CustomRegularExpressionElement extends CustomInputElement {
52
69
 
53
70
  connectedCallback(): void {
54
71
  super.connectedCallback();
72
+ super.addLabel(this.text);
55
73
  }
56
74
 
57
75
  initChildInputs() {
@@ -5,25 +5,42 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'date-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="date" id='date-field'/>
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 DateFieldElement extends CustomInputElement {
@@ -47,6 +64,7 @@ export class DateFieldElement extends CustomInputElement {
47
64
 
48
65
  connectedCallback(): void {
49
66
  super.connectedCallback();
67
+ super.addLabel(this.date);
50
68
  }
51
69
 
52
70
  initChildInputs() {
@@ -6,35 +6,52 @@ import { StringUtil } from '../../framework/Utilities/StringUtil';
6
6
  @CustomElement({
7
7
  selector: 'drop-down-element',
8
8
  template: `
9
+ <div class="field-label">
10
+ </div>
11
+ <div class="field-input">
9
12
  <div class="wrapper">
10
13
  <select id='select-list'>
11
14
  <option selected disabled>-</option>
12
15
  </select>
13
- </div>`,
16
+ </div>
17
+ </div>`,
14
18
  style: `
15
- :host{
16
- width:100%;
17
- }
18
- .wrapper{
19
- display:flex;
20
- justify-content: center;
21
- }
22
- .radio-button {
23
- width: auto;
24
- margin: auto 0.188rem;
25
- display: flex;
26
- flex-grow: 0.1;
27
- justify-content: space-around;
28
- }
29
- select{
30
- box-sizing: border-box;
31
- width: 100% !important;
32
- border: none;
33
- background-color: #f1f4ff;
34
- margin: 0.125rem;
35
- resize: none;
36
- }
37
- `,
19
+ :host{
20
+ width:100%;
21
+ }
22
+ .wrapper{
23
+ display:flex;
24
+ justify-content: center;
25
+ }
26
+ .radio-button {
27
+ width: auto;
28
+ margin: auto 0.188rem;
29
+ display: flex;
30
+ flex-grow: 0.1;
31
+ justify-content: space-around;
32
+ }
33
+ select{
34
+ box-sizing: border-box;
35
+ width: 100% !important;
36
+ border: .1rem solid #27282D;
37
+ border-radius: .25rem;
38
+ margin: 0.125rem;
39
+ resize: none;
40
+ }
41
+ select::placeholder {
42
+ color: rgb(117, 117, 117);
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 DropDownListElement extends CustomInputElement {
@@ -70,6 +87,7 @@ export class DropDownListElement extends CustomInputElement {
70
87
 
71
88
  connectedCallback(): void {
72
89
  super.connectedCallback();
90
+ super.addLabel(this.select);
73
91
  }
74
92
 
75
93
  initChildInputs() {
@@ -18,6 +18,7 @@ import { TypeAheadElement } from './TypeAhead/TypeAheadElement';
18
18
  import { SEPersonalNumberElement } from './SEPersonalNumberElement/SEPersonalNumberElement';
19
19
  import { SECompanyRegistrationElement } from './SECompanyRegistrationElement/SECompanyRegistrationElement';
20
20
  import { CustomFormatDateFieldElement } from './CustomFormatDateFieldElement/CustomFormatDateFieldElement';
21
+ import { ResidentIdentificationElement } from './ResidentIdentification/ResidentIdentificationElement';
21
22
 
22
23
  export {
23
24
  AddressElement,
@@ -40,4 +41,5 @@ export {
40
41
  TypeAheadElement,
41
42
  SEPersonalNumberElement,
42
43
  SECompanyRegistrationElement,
44
+ ResidentIdentificationElement,
43
45
  };
@@ -5,25 +5,42 @@ import { CustomElementEventArgs } from '../../framework/CustomEvents';
5
5
  @CustomElement({
6
6
  selector: 'email-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='email-field'/>
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 EmailFieldElement extends CustomInputElement {
@@ -53,6 +70,7 @@ export class EmailFieldElement extends CustomInputElement {
53
70
  connectedCallback(): void {
54
71
  this.initChildInputs();
55
72
  super.connectedCallback();
73
+ super.addLabel(this.email);
56
74
  }
57
75
 
58
76
  initChildInputs() {
@@ -7,25 +7,42 @@ import EXIF = require('exif-js');
7
7
  @CustomElement({
8
8
  selector: 'file-element',
9
9
  template: `
10
+ <div class="field-label">
11
+ </div>
12
+ <div class="field-input">
10
13
  <div class="wrapper">
11
14
  <input type="file" id='file-field' accept="image/*,application/pdf"/>
12
- </div>`,
15
+ </div>
16
+ </div>`,
13
17
  style: `
14
- :host{
18
+ :host{
15
19
  width:100%;
16
- }
17
- .wrapper{
20
+ }
21
+ .wrapper{
18
22
  display:flex;
19
- }
20
- input{
23
+ }
24
+ input{
21
25
  box-sizing: border-box;
22
26
  width: 100% !important;
23
- border: none;
24
- background-color: #f1f4ff;
27
+ border: .1rem solid #27282D;
28
+ border-radius: .25rem;
25
29
  margin: 0.125rem;
26
30
  resize: none;
27
- }
28
- `,
31
+ }
32
+ input::placeholder {
33
+ color: rgb(117, 117, 117);
34
+ }
35
+ .field-label {
36
+ color: #27282d;
37
+ font-size: .75rem;
38
+ font-weight: 600;
39
+ word-wrap: break-word;
40
+ }
41
+ .field-input {
42
+ font-size: 0.813rem;
43
+ min-height: 1.438rem;
44
+ }
45
+ `,
29
46
  useShadow: true,
30
47
  })
31
48
  export class FileFieldElement extends CustomInputElement {
@@ -52,6 +69,7 @@ export class FileFieldElement extends CustomInputElement {
52
69
  connectedCallback(): void {
53
70
  this.initChildInputs();
54
71
  super.connectedCallback();
72
+ super.addLabel(this.file);
55
73
  }
56
74
 
57
75
  componentDidMount() {
@@ -10,6 +10,9 @@ import BankIdNorwayValidator from '../../framework/Validation/Validators/BankIdN
10
10
  @CustomElement({
11
11
  selector: 'id-element',
12
12
  template: `
13
+ <div class="field-label">
14
+ </div>
15
+ <div class="field-input">
13
16
  <div class="wrapper">
14
17
  <select id='id-type'>
15
18
  <option value='cvr'>Danish CVR</option>
@@ -18,28 +21,42 @@ import BankIdNorwayValidator from '../../framework/Validation/Validators/BankIdN
18
21
  <option value='nor'>Norway Bank Id</option>
19
22
  </select>
20
23
  <input type="text" id='id-field' placeholder=''/>
21
- </div>`,
24
+ </div>
25
+ </div>`,
22
26
  style: `
23
- :host{
27
+ :host{
24
28
  width:100%;
25
- }
26
- .wrapper{
29
+ }
30
+ .wrapper{
27
31
  display:flex;
28
- }
29
- input, select{
32
+ }
33
+ input, select{
30
34
  box-sizing: border-box;
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
- }
36
- input{
39
+ }
40
+ input{
37
41
  width: 75% !important;
38
- }
39
- select{
42
+ }
43
+ select{
40
44
  width: 25% !important;
41
- }
42
- `,
45
+ }
46
+ input::placeholder {
47
+ color: rgb(117, 117, 117);
48
+ }
49
+ .field-label {
50
+ color: #27282d;
51
+ font-size: .75rem;
52
+ font-weight: 600;
53
+ word-wrap: break-word;
54
+ }
55
+ .field-input {
56
+ font-size: 0.813rem;
57
+ min-height: 1.438rem;
58
+ }
59
+ `,
43
60
  useShadow: true,
44
61
  })
45
62
  export class IdentificationElement extends CustomInputElement {
@@ -75,6 +92,7 @@ export class IdentificationElement extends CustomInputElement {
75
92
 
76
93
  connectedCallback(): void {
77
94
  super.connectedCallback();
95
+ super.addLabel(this.text);
78
96
  }
79
97
 
80
98
  initChildInputs() {