@everymatrix/general-input 1.10.2 → 1.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 (96) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +35539 -0
  2. package/dist/cjs/general-input.cjs.entry.js +34 -13
  3. package/dist/cjs/general-input.cjs.js +2 -2
  4. package/dist/cjs/{index-64a5cb7f.js → index-132a0774.js} +119 -6
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/locale.utils-7665b010.js +71 -0
  7. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +85 -0
  8. package/dist/cjs/tooltipIcon-092a795f.js +5 -0
  9. package/dist/collection/collection-manifest.json +3 -1
  10. package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +62 -0
  11. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +366 -0
  12. package/dist/collection/components/checkbox-input/checkbox-input.css +47 -1
  13. package/dist/collection/components/checkbox-input/checkbox-input.js +143 -16
  14. package/dist/collection/components/date-input/date-input.css +64 -30
  15. package/dist/collection/components/date-input/date-input.js +194 -13
  16. package/dist/collection/components/email-input/email-input.css +63 -28
  17. package/dist/collection/components/email-input/email-input.js +197 -21
  18. package/dist/collection/components/general-input/general-input.js +163 -21
  19. package/dist/collection/components/number-input/number-input.css +65 -30
  20. package/dist/collection/components/number-input/number-input.js +174 -19
  21. package/dist/collection/components/password-input/password-input.css +120 -29
  22. package/dist/collection/components/password-input/password-input.js +341 -25
  23. package/dist/collection/components/radio-input/radio-input.css +22 -1
  24. package/dist/collection/components/radio-input/radio-input.js +89 -10
  25. package/dist/collection/components/select-input/select-input.css +75 -22
  26. package/dist/collection/components/select-input/select-input.js +180 -37
  27. package/dist/collection/components/tel-input/tel-input.css +91 -33
  28. package/dist/collection/components/tel-input/tel-input.js +202 -24
  29. package/dist/collection/components/text-input/text-input.css +63 -28
  30. package/dist/collection/components/text-input/text-input.js +208 -39
  31. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +76 -0
  32. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +324 -0
  33. package/dist/collection/utils/locale.utils.js +52 -13
  34. package/dist/collection/utils/tooltipIcon.svg +5 -0
  35. package/dist/components/active-mixin.js +975 -0
  36. package/dist/components/checkbox-group-input.d.ts +11 -0
  37. package/dist/components/checkbox-group-input.js +6 -0
  38. package/dist/components/checkbox-group-input2.js +1125 -0
  39. package/dist/components/checkbox-input2.js +62 -12
  40. package/dist/components/date-input2.js +10247 -15
  41. package/dist/components/email-input2.js +98 -21
  42. package/dist/components/field-mixin.js +12712 -0
  43. package/dist/components/general-input.js +1 -118
  44. package/dist/components/general-input2.js +331 -0
  45. package/dist/components/input-field-shared-styles.js +1114 -0
  46. package/dist/components/number-input2.js +92 -16
  47. package/dist/components/password-input2.js +924 -24
  48. package/dist/components/pattern-mixin.js +85 -0
  49. package/dist/components/radio-input2.js +45 -11
  50. package/dist/components/select-input2.js +87 -27
  51. package/dist/components/tel-input2.js +122 -22
  52. package/dist/components/text-input2.js +120 -34
  53. package/dist/components/toggle-checkbox-input.d.ts +11 -0
  54. package/dist/components/toggle-checkbox-input.js +6 -0
  55. package/dist/components/tooltipIcon.js +70 -0
  56. package/dist/components/vaadin-button.js +461 -0
  57. package/dist/components/vaadin-combo-box.js +4329 -0
  58. package/dist/components/virtual-keyboard-controller.js +2658 -0
  59. package/dist/esm/checkbox-group-input_10.entry.js +35526 -0
  60. package/dist/esm/general-input.entry.js +34 -13
  61. package/dist/esm/general-input.js +2 -2
  62. package/dist/esm/{index-df80f936.js → index-db76d5b5.js} +118 -7
  63. package/dist/esm/loader.js +2 -2
  64. package/dist/esm/locale.utils-95ea2605.js +68 -0
  65. package/dist/esm/toggle-checkbox-input.entry.js +81 -0
  66. package/dist/esm/tooltipIcon-99c1c7b7.js +3 -0
  67. package/dist/general-input/general-input.esm.js +1 -1
  68. package/dist/general-input/p-0966f523.entry.js +3581 -0
  69. package/dist/general-input/p-916a1319.entry.js +1 -0
  70. package/dist/general-input/p-b408093e.js +1 -0
  71. package/dist/general-input/p-c2d4d6ac.entry.js +1 -0
  72. package/dist/general-input/p-f4f4ccda.js +1 -0
  73. package/dist/general-input/p-f6132f1d.js +1 -0
  74. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +74 -0
  75. package/dist/types/components/checkbox-input/checkbox-input.d.ts +28 -2
  76. package/dist/types/components/date-input/date-input.d.ts +43 -1
  77. package/dist/types/components/email-input/email-input.d.ts +37 -3
  78. package/dist/types/components/general-input/general-input.d.ts +30 -0
  79. package/dist/types/components/number-input/number-input.d.ts +34 -3
  80. package/dist/types/components/password-input/password-input.d.ts +56 -7
  81. package/dist/types/components/radio-input/radio-input.d.ts +17 -1
  82. package/dist/types/components/select-input/select-input.d.ts +36 -3
  83. package/dist/types/components/tel-input/tel-input.d.ts +40 -5
  84. package/dist/types/components/text-input/text-input.d.ts +84 -0
  85. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
  86. package/dist/types/components.d.ts +568 -9
  87. package/dist/types/utils/locale.utils.d.ts +9 -0
  88. package/dist/types/utils/types.d.ts +41 -9
  89. package/package.json +8 -1
  90. package/dist/cjs/checkbox-input_9.cjs.entry.js +0 -623
  91. package/dist/components/locale.utils.js +0 -29
  92. package/dist/esm/checkbox-input_9.entry.js +0 -611
  93. package/dist/general-input/p-1703fce3.entry.js +0 -1
  94. package/dist/general-input/p-d9f7fa2e.js +0 -1
  95. package/dist/general-input/p-dea0a4ac.entry.js +0 -1
  96. /package/dist/types/Users/{user/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -0
@@ -6,62 +6,120 @@
6
6
  box-sizing: border-box;
7
7
  }
8
8
 
9
+ .tel {
10
+ font-family: "Roboto";
11
+ font-style: normal;
12
+ }
9
13
  .tel__wrapper {
10
14
  position: relative;
15
+ width: 100%;
16
+ }
17
+ .tel__wrapper--autofilled {
18
+ pointer-events: none;
19
+ }
20
+ .tel__wrapper--autofilled .tel__label {
21
+ color: #979797;
22
+ }
23
+ .tel__wrapper--autofilled .tel__input::part(input-field) {
24
+ color: #979797;
25
+ }
26
+ .tel__wrapper--flex {
27
+ width: inherit;
11
28
  display: flex;
12
- flex-direction: column-reverse;
13
- padding-top: 10px;
29
+ align-items: stretch;
30
+ border-radius: 4px;
31
+ border: 2px solid #DEE1EE;
32
+ }
33
+ .tel__wrapper--flex:focus-within {
34
+ border: 2px solid #3E3E3E;
35
+ }
36
+ .tel__wrapper--flex--invalid {
37
+ border: 2px solid #cc0000b3;
38
+ }
39
+ .tel__wrapper--flex-label {
40
+ display: flex;
41
+ gap: 5px;
42
+ }
43
+ .tel__wrapper--flex--relative {
44
+ position: relative;
14
45
  }
15
46
  .tel__label {
16
- color: #474747;
47
+ font-family: inherit;
48
+ font-style: normal;
49
+ font-weight: 500;
17
50
  font-size: 16px;
18
- position: absolute;
19
- bottom: 15px;
20
- left: 5px;
21
- transform: translateY(-25px);
22
- transition: all 0.3s cubic-bezier(0.5, 0, 0.5, 1);
51
+ line-height: 20px;
52
+ color: #2A3841;
23
53
  }
24
54
  .tel__label--required::after {
25
55
  content: "*";
26
- margin-left: 5px;
27
- color: #666666;
56
+ font-family: inherit;
57
+ color: #2A3841;
58
+ margin-left: 2px;
59
+ }
60
+ .tel__prefix {
61
+ width: 120px;
62
+ }
63
+ .tel__prefix[focus] {
64
+ outline: none;
65
+ }
66
+ .tel__prefix::part(input-field) {
67
+ border-radius: 0 4px 4px 0;
68
+ background-color: #DEE1EE;
69
+ color: #1F1F1F;
70
+ font-family: inherit;
71
+ font-style: normal;
72
+ font-weight: 300;
73
+ font-size: 16px;
74
+ line-height: 19px;
28
75
  }
29
76
  .tel__input {
30
- width: inherit;
31
- padding: 15px 6px;
32
- position: relative;
33
- border: none;
34
- border-bottom: 3px solid #666666;
77
+ border-radius: 4px;
35
78
  background-color: transparent;
36
- color: #666666;
37
- font-size: 16px;
38
79
  font-family: inherit;
80
+ font-style: normal;
81
+ font-weight: 300;
82
+ font-size: 16px;
83
+ line-height: 19px;
84
+ color: #2A2E3F;
85
+ border: none;
86
+ padding: 10px 20px;
87
+ width: inherit;
88
+ position: relative;
39
89
  /* Firefox */
40
90
  -moz-appearance: textfield;
41
91
  /* Chrome, Safari, Edge, Opera */
42
92
  }
43
- .tel__input::-webkit-outer-spin-button, .tel__input::-webkit-inner-spin-button {
44
- -webkit-appearance: none;
45
- margin: 0;
46
- }
47
93
  .tel__input:focus {
48
94
  outline: none;
49
- box-shadow: 0 5px 5px rgba(16, 15, 15, 0.1);
50
95
  }
51
- .tel__input::placeholder {
52
- color: #666666;
53
- }
54
- .tel__input--invalid {
55
- border-bottom: 3px solid #cc0000;
56
- }
57
- .tel__input:placeholder-shown + .tel__label {
58
- opacity: 0;
59
- visibility: hidden;
60
- transform: translateY(0);
96
+ .tel__input::-webkit-outer-spin-button, .tel__input::-webkit-inner-spin-button {
97
+ -webkit-appearance: none;
98
+ margin: 0;
61
99
  }
62
100
  .tel__error-message {
63
101
  position: absolute;
64
102
  top: calc(100% + 5px);
65
103
  left: 0;
66
- color: #cc0000;
104
+ color: #cc0000b3;
105
+ }
106
+ .tel__tooltip-icon {
107
+ width: 16px;
108
+ height: auto;
109
+ }
110
+ .tel__tooltip {
111
+ position: absolute;
112
+ top: 0;
113
+ left: 20px;
114
+ background-color: #FFFFFF;
115
+ border: 1px solid #B0B0B0;
116
+ color: #2B2D3F;
117
+ padding: 10px;
118
+ border-radius: 5px;
119
+ opacity: 0;
120
+ transition: opacity 0.3s ease-in-out;
121
+ z-index: 10;
122
+ }
123
+ .tel__tooltip.visible {
124
+ opacity: 1;
67
125
  }
@@ -1,13 +1,45 @@
1
- import { Component, h, Prop, State, Event, Watch } from '@stencil/core';
1
+ import { Component, h, Prop, State, Event, Watch, Listen } from '@stencil/core';
2
2
  import { translate } from '../../utils/locale.utils';
3
+ import '@vaadin/combo-box';
4
+ import tooltipIcon from '../../utils/tooltipIcon.svg';
3
5
  export class TelInput {
4
6
  constructor() {
7
+ /**
8
+ * Client custom styling via inline style
9
+ */
10
+ this.clientStyling = '';
11
+ this.limitStylingAppends = false;
12
+ this.showTooltip = false;
5
13
  this.validationPattern = '';
14
+ this.touched = false;
15
+ this.handleInput = (event) => {
16
+ this.phoneValue = event.target.value;
17
+ this.value = { prefix: this.prefixValue, phone: this.phoneValue };
18
+ this.touched = true;
19
+ if (this.debounceTime) {
20
+ clearTimeout(this.debounceTime);
21
+ }
22
+ this.debounceTime = setTimeout(() => {
23
+ this.isValid = this.setValidity();
24
+ this.errorMessage = this.setErrorMessage();
25
+ this.emitValueHandler(true);
26
+ }, 500);
27
+ };
28
+ this.handleBlur = () => {
29
+ this.isValid = this.setValidity();
30
+ this.touched = true;
31
+ this.errorMessage = this.setErrorMessage();
32
+ };
33
+ this.setClientStyling = () => {
34
+ let sheet = document.createElement('style');
35
+ sheet.innerHTML = this.clientStyling;
36
+ this.stylingContainer.prepend(sheet);
37
+ };
6
38
  }
7
39
  validityChanged() {
8
40
  this.validityStateHandler({ valid: this.isValid, name: this.name });
9
41
  if (this.emitValue == true) {
10
- this.valueHandler({ name: this.name, value: this.value });
42
+ this.valueHandler({ name: this.name, value: this.value, type: 'tel' });
11
43
  }
12
44
  }
13
45
  validityStateHandler(inputStateEvent) {
@@ -15,34 +47,86 @@ export class TelInput {
15
47
  }
16
48
  emitValueHandler(newValue) {
17
49
  if (newValue == true && this.isValid) {
18
- this.valueHandler({ name: this.name, value: this.value });
50
+ this.valueHandler({ name: this.name, value: this.value, type: 'tel' });
19
51
  }
20
52
  }
21
53
  valueHandler(inputValueEvent) {
22
54
  this.sendInputValue.emit(inputValueEvent);
23
55
  }
56
+ handleClickOutside(event) {
57
+ if (event.composedPath()[0] === this.tooltipIconReference)
58
+ return;
59
+ if (event.composedPath()[0] !== this.tooltipReference)
60
+ this.showTooltip = false;
61
+ }
24
62
  connectedCallback() {
25
63
  this.validationPattern = this.setPattern();
64
+ if (this.defaultValue) {
65
+ this.prefixValue = this.defaultValue.prefix ? this.defaultValue.prefix : this.defaultValue;
66
+ this.phoneValue = this.defaultValue.phone || null;
67
+ }
26
68
  }
27
- handleInput(event) {
28
- this.value = event.target.value;
29
- this.errorMessage = this.setErrorMessage();
69
+ componentWillLoad() {
70
+ if (this.action) {
71
+ if (this.action.split(" ")[0] == 'GET') {
72
+ const endpoint = this.action.split(" ")[1];
73
+ return this.getPhoneCodes(endpoint).then((options) => {
74
+ this.phoneCodesOptions = options.phoneCodes.map(code => {
75
+ return { label: code.Prefix, value: code.Prefix };
76
+ });
77
+ });
78
+ }
79
+ }
80
+ }
81
+ componentDidRender() {
82
+ // start custom styling area
83
+ if (!this.limitStylingAppends && this.stylingContainer) {
84
+ if (this.clientStyling)
85
+ this.setClientStyling();
86
+ this.limitStylingAppends = true;
87
+ }
88
+ // end custom styling area
89
+ }
90
+ componentDidLoad() {
30
91
  this.isValid = this.setValidity();
31
- this.validityStateHandler({ valid: this.isValid, name: this.name });
92
+ if (this.defaultValue) {
93
+ this.value = this.defaultValue;
94
+ this.valueHandler({ name: this.name, value: this.value, type: 'tel' });
95
+ }
96
+ }
97
+ getPhoneCodes(endpoint) {
98
+ const url = new URL(endpoint);
99
+ return new Promise((resolve, reject) => {
100
+ fetch(url.href)
101
+ .then((res) => res.json())
102
+ .then((options) => {
103
+ resolve(options);
104
+ }).catch((err) => {
105
+ console.error(err);
106
+ reject(err);
107
+ });
108
+ });
109
+ }
110
+ handlePrefixInput(event) {
111
+ this.prefixValue = event.target.value;
112
+ this.value = { prefix: this.prefixValue, phone: this.phoneValue };
32
113
  this.emitValueHandler(true);
33
114
  }
34
115
  setValidity() {
35
116
  return this.inputReference.validity.valid;
36
117
  }
37
118
  setPattern() {
38
- var _a;
119
+ var _a, _b;
39
120
  if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
40
- return this.validation.custom.find(customValidation => customValidation.rule === 'regex').pattern;
121
+ return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
41
122
  }
42
123
  }
43
124
  setErrorMessage() {
125
+ var _a, _b;
44
126
  if (this.inputReference.validity.patternMismatch) {
45
- return this.validation.custom.find(customValidation => customValidation.rule === 'regex').errorMessage;
127
+ const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
128
+ const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
129
+ return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
46
130
  }
47
131
  if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
48
132
  return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
@@ -51,11 +135,27 @@ export class TelInput {
51
135
  return translate('requiredError', this.language);
52
136
  }
53
137
  }
138
+ renderTooltip() {
139
+ if (this.showTooltip) {
140
+ return (h("div", { class: `tel__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
141
+ }
142
+ return null;
143
+ }
54
144
  render() {
55
- const invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'tel__input--invalid';
56
- return h("div", { class: 'tel__wrapper' },
57
- h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, value: this.defaultValue, class: `tel__input ${invalidClass}`, placeholder: `${this.displayName} ${this.validation.mandatory ? '*' : ''}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: (e) => this.handleInput(e) }),
58
- h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
145
+ let invalidClass = '';
146
+ if (this.touched) {
147
+ invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
148
+ }
149
+ return h("div", { class: `tel__wrapper ${this.autofilled ? 'tel__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el },
150
+ h("div", { class: 'tel__wrapper--flex-label' },
151
+ h("label", { class: `tel__label ${this.validation.mandatory ? 'tel__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
152
+ h("div", { class: 'tel__wrapper--relative' },
153
+ this.tooltip &&
154
+ h("img", { class: 'tel__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
155
+ this.renderTooltip())),
156
+ h("div", { class: `tel__wrapper--flex ${invalidClass}` },
157
+ h("vaadin-combo-box", { class: 'tel__prefix', items: this.phoneCodesOptions, value: this.prefixValue, readOnly: this.autofilled, onChange: (e) => this.handlePrefixInput(e) }),
158
+ h("input", { type: "tel", ref: (el) => this.inputReference = el, id: `${this.name}__input`, readOnly: this.autofilled, class: `tel__input`, value: this.phoneValue, placeholder: `${this.placeholder}`, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, pattern: this.validationPattern, onInput: this.handleInput, onBlur: this.handleBlur })),
59
159
  h("small", { class: 'tel__error-message' }, this.errorMessage));
60
160
  }
61
161
  static get is() { return "tel-input"; }
@@ -82,7 +182,7 @@ export class TelInput {
82
182
  "text": "Name of the input."
83
183
  },
84
184
  "attribute": "name",
85
- "reflect": false
185
+ "reflect": true
86
186
  },
87
187
  "displayName": {
88
188
  "type": "string",
@@ -99,7 +199,24 @@ export class TelInput {
99
199
  "text": "Name of input to be shown to the user."
100
200
  },
101
201
  "attribute": "display-name",
102
- "reflect": false
202
+ "reflect": true
203
+ },
204
+ "placeholder": {
205
+ "type": "string",
206
+ "mutable": false,
207
+ "complexType": {
208
+ "original": "string",
209
+ "resolved": "string",
210
+ "references": {}
211
+ },
212
+ "required": false,
213
+ "optional": false,
214
+ "docs": {
215
+ "tags": [],
216
+ "text": "Placeholder text to be shown."
217
+ },
218
+ "attribute": "placeholder",
219
+ "reflect": true
103
220
  },
104
221
  "showLabels": {
105
222
  "type": "boolean",
@@ -116,7 +233,7 @@ export class TelInput {
116
233
  "text": "Boolean that defines if the widget show labels or placeholders."
117
234
  },
118
235
  "attribute": "show-labels",
119
- "reflect": false
236
+ "reflect": true
120
237
  },
121
238
  "action": {
122
239
  "type": "string",
@@ -133,7 +250,7 @@ export class TelInput {
133
250
  "text": "Special behaviour an input should have. Can be fetching for data."
134
251
  },
135
252
  "attribute": "action",
136
- "reflect": false
253
+ "reflect": true
137
254
  },
138
255
  "validation": {
139
256
  "type": "unknown",
@@ -159,8 +276,8 @@ export class TelInput {
159
276
  "type": "any",
160
277
  "mutable": false,
161
278
  "complexType": {
162
- "original": "number | string",
163
- "resolved": "number | string",
279
+ "original": "string | any",
280
+ "resolved": "any",
164
281
  "references": {}
165
282
  },
166
283
  "required": false,
@@ -170,7 +287,41 @@ export class TelInput {
170
287
  "text": "Default value for the input."
171
288
  },
172
289
  "attribute": "default-value",
173
- "reflect": false
290
+ "reflect": true
291
+ },
292
+ "autofilled": {
293
+ "type": "boolean",
294
+ "mutable": false,
295
+ "complexType": {
296
+ "original": "boolean",
297
+ "resolved": "boolean",
298
+ "references": {}
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": "Boolean. Determines if input should be readonly."
305
+ },
306
+ "attribute": "autofilled",
307
+ "reflect": true
308
+ },
309
+ "tooltip": {
310
+ "type": "string",
311
+ "mutable": false,
312
+ "complexType": {
313
+ "original": "string",
314
+ "resolved": "string",
315
+ "references": {}
316
+ },
317
+ "required": false,
318
+ "optional": false,
319
+ "docs": {
320
+ "tags": [],
321
+ "text": "Tooltip text."
322
+ },
323
+ "attribute": "tooltip",
324
+ "reflect": true
174
325
  },
175
326
  "language": {
176
327
  "type": "string",
@@ -187,7 +338,7 @@ export class TelInput {
187
338
  "text": "Currently selected language."
188
339
  },
189
340
  "attribute": "language",
190
- "reflect": false
341
+ "reflect": true
191
342
  },
192
343
  "emitValue": {
193
344
  "type": "boolean",
@@ -204,12 +355,32 @@ export class TelInput {
204
355
  "text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
205
356
  },
206
357
  "attribute": "emit-value",
207
- "reflect": false
358
+ "reflect": true
359
+ },
360
+ "clientStyling": {
361
+ "type": "string",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string",
365
+ "resolved": "string",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": "Client custom styling via inline style"
373
+ },
374
+ "attribute": "client-styling",
375
+ "reflect": true,
376
+ "defaultValue": "''"
208
377
  }
209
378
  }; }
210
379
  static get states() { return {
211
380
  "isValid": {},
212
- "errorMessage": {}
381
+ "errorMessage": {},
382
+ "limitStylingAppends": {},
383
+ "showTooltip": {}
213
384
  }; }
214
385
  static get events() { return [{
215
386
  "method": "sendValidityState",
@@ -259,4 +430,11 @@ export class TelInput {
259
430
  "propName": "emitValue",
260
431
  "methodName": "emitValueHandler"
261
432
  }]; }
433
+ static get listeners() { return [{
434
+ "name": "click",
435
+ "method": "handleClickOutside",
436
+ "target": "document",
437
+ "capture": false,
438
+ "passive": false
439
+ }]; }
262
440
  }
@@ -6,55 +6,90 @@
6
6
  box-sizing: border-box;
7
7
  }
8
8
 
9
+ .text {
10
+ font-family: "Roboto";
11
+ font-style: normal;
12
+ }
9
13
  .text__wrapper {
10
14
  position: relative;
15
+ width: 100%;
16
+ }
17
+ .text__wrapper--autofilled {
18
+ pointer-events: none;
19
+ }
20
+ .text__wrapper--autofilled .text__label {
21
+ color: #979797;
22
+ }
23
+ .text__wrapper--autofilled .text__input::part(input-field) {
24
+ color: #979797;
25
+ }
26
+ .text__wrapper--flex {
11
27
  display: flex;
12
- flex-direction: column-reverse;
13
- padding-top: 10px;
28
+ gap: 5px;
29
+ }
30
+ .text__wrapper--relative {
31
+ position: relative;
14
32
  }
15
33
  .text__label {
16
- color: #474747;
34
+ font-family: inherit;
35
+ font-style: normal;
36
+ font-weight: 500;
17
37
  font-size: 16px;
18
- position: absolute;
19
- bottom: 15px;
20
- left: 5px;
21
- transform: translateY(-25px);
22
- transition: all 0.3s cubic-bezier(0.5, 0, 0.5, 1);
38
+ line-height: 20px;
39
+ color: #2A3841;
23
40
  }
24
41
  .text__label--required::after {
25
42
  content: "*";
26
- margin-left: 5px;
27
- color: #666666;
43
+ font-family: inherit;
44
+ color: #2A3841;
45
+ margin-left: 2px;
28
46
  }
29
47
  .text__input {
30
- width: inherit;
31
- padding: 15px 6px;
32
- position: relative;
33
- border: none;
34
- border-bottom: 3px solid #666666;
48
+ border-radius: 4px;
35
49
  background-color: transparent;
36
- color: #666666;
37
- font-size: 16px;
38
50
  font-family: inherit;
51
+ font-style: normal;
52
+ font-weight: 300;
53
+ font-size: 16px;
54
+ line-height: 19px;
55
+ color: #2A2E3F;
56
+ padding: 10px 20px;
57
+ width: inherit;
58
+ position: relative;
59
+ border: 2px solid #DEE1EE;
39
60
  }
40
61
  .text__input:focus {
41
- outline: none;
42
- box-shadow: 0 5px 5px rgba(16, 15, 15, 0.1);
43
- }
44
- .text__input::placeholder {
45
- color: #666666;
62
+ outline-color: #3E3E3E;
46
63
  }
47
64
  .text__input--invalid {
48
- border-bottom: 3px solid #cc0000;
65
+ border: 2px solid #cc0000b3;
49
66
  }
50
- .text__input:placeholder-shown + .text__label {
51
- opacity: 0;
52
- visibility: hidden;
53
- transform: translateY(0);
67
+ .text__input::placeholder {
68
+ color: #979797;
54
69
  }
55
70
  .text__error-message {
56
71
  position: absolute;
57
72
  top: calc(100% + 5px);
58
73
  left: 0;
59
- color: #cc0000;
74
+ color: #cc0000b3;
75
+ }
76
+ .text__tooltip-icon {
77
+ width: 16px;
78
+ height: auto;
79
+ }
80
+ .text__tooltip {
81
+ position: absolute;
82
+ top: 0;
83
+ left: 20px;
84
+ background-color: #FFFFFF;
85
+ border: 1px solid #B0B0B0;
86
+ color: #2B2D3F;
87
+ padding: 10px;
88
+ border-radius: 5px;
89
+ opacity: 0;
90
+ transition: opacity 0.3s ease-in-out;
91
+ z-index: 10;
92
+ }
93
+ .text__tooltip.visible {
94
+ opacity: 1;
60
95
  }