@luftborn/custom-elements 2.14.0 → 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 (73) hide show
  1. package/demo/index.html +269 -259
  2. package/demo/index.js +83 -43
  3. package/demo/index.min.js +82 -42
  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/EmailField/EmailFieldElement.js +3 -2
  24. package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
  25. package/dist/elements/FileField/FileFieldElement.js +3 -2
  26. package/dist/elements/FileField/FileFieldElement.js.map +1 -1
  27. package/dist/elements/IdentificationElement/IdentificationElement.js +3 -2
  28. package/dist/elements/IdentificationElement/IdentificationElement.js.map +1 -1
  29. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +3 -2
  30. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
  31. package/dist/elements/NumericField/NumericFieldElement.js +3 -2
  32. package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
  33. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +4 -2
  34. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
  35. package/dist/elements/ResidentIdentification/ResidentIdentificationElement.js +3 -2
  36. package/dist/elements/ResidentIdentification/ResidentIdentificationElement.js.map +1 -1
  37. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +3 -2
  38. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
  39. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +3 -2
  40. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
  41. package/dist/elements/TextAreaElement/TextAreaElement.js +3 -2
  42. package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
  43. package/dist/elements/TextField/TextFieldElement.js +3 -2
  44. package/dist/elements/TextField/TextFieldElement.js.map +1 -1
  45. package/dist/elements/TypeAhead/TypeAheadElement.js +3 -2
  46. package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
  47. package/dist/framework/CustomInputElement.d.ts +1 -0
  48. package/dist/framework/CustomInputElement.js +17 -0
  49. package/dist/framework/CustomInputElement.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/elements/Address/AddressElement.ts +37 -18
  52. package/src/elements/BankField/BankFieldElement.ts +34 -16
  53. package/src/elements/CPRElement/CPRElement.ts +28 -10
  54. package/src/elements/CVRElement/CVRElement.ts +28 -10
  55. package/src/elements/CheckBoxElement/CheckBoxElement.ts +22 -3
  56. package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +25 -7
  57. package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +28 -10
  58. package/src/elements/DateField/DateFieldElement.ts +28 -10
  59. package/src/elements/DropDownList/DropDownListElement.ts +42 -24
  60. package/src/elements/EmailField/EmailFieldElement.ts +28 -10
  61. package/src/elements/FileField/FileFieldElement.ts +28 -10
  62. package/src/elements/IdentificationElement/IdentificationElement.ts +32 -14
  63. package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +36 -19
  64. package/src/elements/NumericField/NumericFieldElement.ts +28 -10
  65. package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +46 -27
  66. package/src/elements/ResidentIdentification/ResidentIdentificationElement.ts +33 -14
  67. package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +24 -5
  68. package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +24 -5
  69. package/src/elements/TextAreaElement/TextAreaElement.ts +28 -10
  70. package/src/elements/TextField/TextFieldElement.ts +30 -11
  71. package/src/elements/TypeAhead/TypeAheadElement.ts +27 -9
  72. package/src/framework/CustomInputElement.ts +18 -0
  73. package/src/elements/Address/html.html +0 -0
@@ -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() {
@@ -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() {
@@ -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() {