@everymatrix/general-input 1.32.4 → 1.33.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.
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +36077 -0
- package/dist/cjs/general-input.cjs.entry.js +75 -0
- package/dist/cjs/general-input.cjs.js +19 -0
- package/dist/cjs/index-132a0774.js +1327 -0
- package/dist/cjs/index.cjs.js +18 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/locale.utils-cef1d3b6.js +128 -0
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +85 -0
- package/dist/cjs/tooltipIcon-092a795f.js +5 -0
- package/dist/collection/collection-manifest.json +23 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +82 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +366 -0
- package/dist/collection/components/checkbox-input/checkbox-input.css +68 -0
- package/dist/collection/components/checkbox-input/checkbox-input.js +324 -0
- package/dist/collection/components/date-input/date-input.css +101 -0
- package/dist/collection/components/date-input/date-input.js +396 -0
- package/dist/collection/components/email-input/email-input.css +95 -0
- package/dist/collection/components/email-input/email-input.js +403 -0
- package/dist/collection/components/general-input/general-input.css +4 -0
- package/dist/collection/components/general-input/general-input.js +373 -0
- package/dist/collection/components/number-input/number-input.css +102 -0
- package/dist/collection/components/number-input/number-input.js +368 -0
- package/dist/collection/components/password-input/password-input.css +182 -0
- package/dist/collection/components/password-input/password-input.js +527 -0
- package/dist/collection/components/radio-input/radio-input.css +43 -0
- package/dist/collection/components/radio-input/radio-input.js +297 -0
- package/dist/collection/components/select-input/select-input.css +122 -0
- package/dist/collection/components/select-input/select-input.js +429 -0
- package/dist/collection/components/tel-input/tel-input.css +145 -0
- package/dist/collection/components/tel-input/tel-input.js +440 -0
- package/dist/collection/components/text-input/text-input.css +98 -0
- package/dist/collection/components/text-input/text-input.js +448 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +324 -0
- package/dist/collection/index.js +17 -0
- package/dist/collection/utils/locale.utils.js +123 -0
- package/dist/collection/utils/tooltipIcon.svg +5 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/collection/utils/utils.js +5 -0
- package/dist/components/active-mixin.js +975 -0
- package/dist/components/checkbox-group-input.d.ts +11 -0
- package/dist/components/checkbox-group-input.js +6 -0
- package/dist/components/checkbox-group-input2.js +1078 -0
- package/dist/components/checkbox-input.d.ts +11 -0
- package/dist/components/checkbox-input.js +6 -0
- package/dist/components/checkbox-input2.js +129 -0
- package/dist/components/date-input.d.ts +11 -0
- package/dist/components/date-input.js +6 -0
- package/dist/components/date-input2.js +11556 -0
- package/dist/components/email-input.d.ts +11 -0
- package/dist/components/email-input.js +6 -0
- package/dist/components/email-input2.js +171 -0
- package/dist/components/field-mixin.js +12426 -0
- package/dist/components/general-input.d.ts +11 -0
- package/dist/components/general-input.js +6 -0
- package/dist/components/general-input2.js +341 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +18 -0
- package/dist/components/input-field-shared-styles.js +1211 -0
- package/dist/components/number-input.d.ts +11 -0
- package/dist/components/number-input.js +6 -0
- package/dist/components/number-input2.js +158 -0
- package/dist/components/password-input.d.ts +11 -0
- package/dist/components/password-input.js +6 -0
- package/dist/components/password-input2.js +1041 -0
- package/dist/components/radio-input.d.ts +11 -0
- package/dist/components/radio-input.js +6 -0
- package/dist/components/radio-input2.js +114 -0
- package/dist/components/select-input.d.ts +11 -0
- package/dist/components/select-input.js +6 -0
- package/dist/components/select-input2.js +183 -0
- package/dist/components/tel-input.d.ts +11 -0
- package/dist/components/tel-input.js +6 -0
- package/dist/components/tel-input2.js +197 -0
- package/dist/components/text-input.d.ts +11 -0
- package/dist/components/text-input.js +6 -0
- package/dist/components/text-input2.js +199 -0
- package/dist/components/toggle-checkbox-input.d.ts +11 -0
- package/dist/components/toggle-checkbox-input.js +6 -0
- package/dist/components/tooltipIcon.js +127 -0
- package/dist/components/vaadin-button.js +490 -0
- package/dist/components/vaadin-combo-box.js +4512 -0
- package/dist/components/virtual-keyboard-controller.js +2001 -0
- package/dist/esm/checkbox-group-input_10.entry.js +36064 -0
- package/dist/esm/general-input.entry.js +71 -0
- package/dist/esm/general-input.js +17 -0
- package/dist/esm/index-db76d5b5.js +1299 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/locale.utils-de759721.js +125 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/toggle-checkbox-input.entry.js +81 -0
- package/dist/esm/tooltipIcon-99c1c7b7.js +3 -0
- package/dist/general-input/general-input.esm.js +1 -0
- package/dist/general-input/index.esm.js +1 -0
- package/dist/general-input/p-10efdf3f.js +1 -0
- package/dist/general-input/p-613c3e00.entry.js +1 -0
- package/dist/general-input/p-660bcdd1.entry.js +1 -0
- package/dist/general-input/p-9b6b0396.entry.js +3646 -0
- package/dist/general-input/p-b408093e.js +1 -0
- package/dist/general-input/p-f4f4ccda.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +2 -0
- package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +74 -0
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +65 -0
- package/dist/types/components/date-input/date-input.d.ts +84 -0
- package/dist/types/components/email-input/email-input.d.ts +80 -0
- package/dist/types/components/general-input/general-input.d.ts +75 -0
- package/dist/types/components/number-input/number-input.d.ts +74 -0
- package/dist/types/components/password-input/password-input.d.ts +91 -0
- package/dist/types/components/radio-input/radio-input.d.ts +59 -0
- package/dist/types/components/select-input/select-input.d.ts +83 -0
- package/dist/types/components/tel-input/tel-input.d.ts +89 -0
- package/dist/types/components/text-input/text-input.d.ts +84 -0
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
- package/dist/types/components.d.ts +1268 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/locale.utils.d.ts +17 -0
- package/dist/types/utils/types.d.ts +87 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +2 -3
- package/LICENSE +0 -21
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { Component, h, State, Prop, Watch, Event, Element, Listen } from '@stencil/core';
|
|
2
|
+
import { translate } from '../../utils/locale.utils';
|
|
3
|
+
import '@vaadin/date-picker';
|
|
4
|
+
import tooltipIcon from '../../utils/tooltipIcon.svg';
|
|
5
|
+
import dateFnsFormat from 'date-fns/format';
|
|
6
|
+
import dateFnsParse from 'date-fns/parse';
|
|
7
|
+
import { isBefore, isAfter } from 'date-fns';
|
|
8
|
+
export class DateInput {
|
|
9
|
+
constructor() {
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via inline style
|
|
12
|
+
*/
|
|
13
|
+
this.clientStyling = '';
|
|
14
|
+
this.limitStylingAppends = false;
|
|
15
|
+
this.showTooltip = false;
|
|
16
|
+
this.touched = false;
|
|
17
|
+
this.formatDate = (dateParts) => {
|
|
18
|
+
const { year, month, day } = dateParts;
|
|
19
|
+
const date = new Date(year, month, day);
|
|
20
|
+
return dateFnsFormat(date, this.dateFormat || 'yyyy-MM-dd');
|
|
21
|
+
};
|
|
22
|
+
this.parseDate = (inputValue) => {
|
|
23
|
+
const date = dateFnsParse(inputValue, this.dateFormat || 'yyyy-MM-dd', new Date());
|
|
24
|
+
return { year: date.getFullYear(), month: date.getMonth(), day: date.getDate() };
|
|
25
|
+
};
|
|
26
|
+
this.handleBlur = () => {
|
|
27
|
+
this.isValid = this.setValidity();
|
|
28
|
+
this.errorMessage = this.setErrorMessage();
|
|
29
|
+
this.touched = true;
|
|
30
|
+
};
|
|
31
|
+
this.setClientStyling = () => {
|
|
32
|
+
let sheet = document.createElement('style');
|
|
33
|
+
sheet.innerHTML = this.clientStyling;
|
|
34
|
+
this.stylingContainer.prepend(sheet);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
validityChanged() {
|
|
38
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
39
|
+
if (this.emitValue == true) {
|
|
40
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
validityStateHandler(inputStateEvent) {
|
|
44
|
+
this.sendValidityState.emit(inputStateEvent);
|
|
45
|
+
}
|
|
46
|
+
emitValueHandler(newValue) {
|
|
47
|
+
if (newValue == true && this.isValid) {
|
|
48
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
valueHandler(inputValueEvent) {
|
|
52
|
+
this.sendInputValue.emit(inputValueEvent);
|
|
53
|
+
}
|
|
54
|
+
handleClickOutside(event) {
|
|
55
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
56
|
+
return;
|
|
57
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
58
|
+
this.showTooltip = false;
|
|
59
|
+
}
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
this.minDate = dateFnsParse(((_a = this.validation.min) === null || _a === void 0 ? void 0 : _a.toString()) || '', 'yyyy-MM-dd', new Date());
|
|
63
|
+
this.maxDate = dateFnsParse(((_b = this.validation.max) === null || _b === void 0 ? void 0 : _b.toString()) || '', 'yyyy-MM-dd', new Date());
|
|
64
|
+
}
|
|
65
|
+
componentDidRender() {
|
|
66
|
+
// start custom styling area
|
|
67
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
68
|
+
if (this.clientStyling)
|
|
69
|
+
this.setClientStyling();
|
|
70
|
+
this.limitStylingAppends = true;
|
|
71
|
+
}
|
|
72
|
+
// end custom styling area
|
|
73
|
+
}
|
|
74
|
+
componentDidLoad() {
|
|
75
|
+
this.datePicker = this.element.shadowRoot.querySelector('vaadin-date-picker');
|
|
76
|
+
this.inputReference = this.element.shadowRoot.querySelector('input');
|
|
77
|
+
this.datePicker.i18n = Object.assign(Object.assign({}, this.datePicker.i18n), { formatDate: this.formatDate, parseDate: this.parseDate });
|
|
78
|
+
this.isValid = this.setValidity();
|
|
79
|
+
if (this.defaultValue) {
|
|
80
|
+
this.value = this.defaultValue;
|
|
81
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
handleInput(event) {
|
|
85
|
+
this.value = event.target.value;
|
|
86
|
+
this.touched = true;
|
|
87
|
+
this.valueAsDate = dateFnsParse(this.value || '', 'yyyy-MM-dd', new Date());
|
|
88
|
+
this.isValid = this.setValidity();
|
|
89
|
+
this.errorMessage = this.setErrorMessage();
|
|
90
|
+
this.emitValueHandler(true);
|
|
91
|
+
}
|
|
92
|
+
setValidity() {
|
|
93
|
+
if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
return this.inputReference.validity.valid;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
setErrorMessage() {
|
|
101
|
+
if (isBefore(this.valueAsDate, this.minDate) || isAfter(this.valueAsDate, this.maxDate)) {
|
|
102
|
+
return translate('dateError2', this.language);
|
|
103
|
+
}
|
|
104
|
+
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
105
|
+
return translate('dateError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
106
|
+
}
|
|
107
|
+
if (this.inputReference.validity.valueMissing) {
|
|
108
|
+
return translate('requiredError', this.language);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
renderTooltip() {
|
|
112
|
+
if (this.showTooltip) {
|
|
113
|
+
return (h("div", { class: `date__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
114
|
+
}
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
let invalidClass = '';
|
|
119
|
+
if (this.touched) {
|
|
120
|
+
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
121
|
+
}
|
|
122
|
+
return h("div", { class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el },
|
|
123
|
+
h("label", { class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` },
|
|
124
|
+
this.displayName,
|
|
125
|
+
" ",
|
|
126
|
+
this.validation.mandatory ? '*' : ''),
|
|
127
|
+
h("vaadin-date-picker", { id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e), onBlur: this.handleBlur }),
|
|
128
|
+
h("small", { class: 'date__error-message' }, this.errorMessage),
|
|
129
|
+
this.tooltip &&
|
|
130
|
+
h("img", { class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
|
|
131
|
+
this.renderTooltip());
|
|
132
|
+
}
|
|
133
|
+
static get is() { return "date-input"; }
|
|
134
|
+
static get encapsulation() { return "shadow"; }
|
|
135
|
+
static get originalStyleUrls() { return {
|
|
136
|
+
"$": ["date-input.scss"]
|
|
137
|
+
}; }
|
|
138
|
+
static get styleUrls() { return {
|
|
139
|
+
"$": ["date-input.css"]
|
|
140
|
+
}; }
|
|
141
|
+
static get properties() { return {
|
|
142
|
+
"name": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "Name of the input."
|
|
155
|
+
},
|
|
156
|
+
"attribute": "name",
|
|
157
|
+
"reflect": true
|
|
158
|
+
},
|
|
159
|
+
"displayName": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Name of input to be shown to the user."
|
|
172
|
+
},
|
|
173
|
+
"attribute": "display-name",
|
|
174
|
+
"reflect": true
|
|
175
|
+
},
|
|
176
|
+
"placeholder": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "string",
|
|
181
|
+
"resolved": "string",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": "Placeholder text to be shown."
|
|
189
|
+
},
|
|
190
|
+
"attribute": "placeholder",
|
|
191
|
+
"reflect": true
|
|
192
|
+
},
|
|
193
|
+
"validation": {
|
|
194
|
+
"type": "unknown",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "ValidationSchema",
|
|
198
|
+
"resolved": "ValidationSchema",
|
|
199
|
+
"references": {
|
|
200
|
+
"ValidationSchema": {
|
|
201
|
+
"location": "import",
|
|
202
|
+
"path": "../../utils/types"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": false,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Object of validation rules for the input."
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"defaultValue": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"mutable": false,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "string",
|
|
218
|
+
"resolved": "string",
|
|
219
|
+
"references": {}
|
|
220
|
+
},
|
|
221
|
+
"required": false,
|
|
222
|
+
"optional": false,
|
|
223
|
+
"docs": {
|
|
224
|
+
"tags": [],
|
|
225
|
+
"text": "Default value for the input."
|
|
226
|
+
},
|
|
227
|
+
"attribute": "default-value",
|
|
228
|
+
"reflect": true
|
|
229
|
+
},
|
|
230
|
+
"autofilled": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "boolean",
|
|
235
|
+
"resolved": "boolean",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": false,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "Boolean. Determines if input should be readonly."
|
|
243
|
+
},
|
|
244
|
+
"attribute": "autofilled",
|
|
245
|
+
"reflect": true
|
|
246
|
+
},
|
|
247
|
+
"tooltip": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"mutable": false,
|
|
250
|
+
"complexType": {
|
|
251
|
+
"original": "string",
|
|
252
|
+
"resolved": "string",
|
|
253
|
+
"references": {}
|
|
254
|
+
},
|
|
255
|
+
"required": false,
|
|
256
|
+
"optional": false,
|
|
257
|
+
"docs": {
|
|
258
|
+
"tags": [],
|
|
259
|
+
"text": "Tooltip text."
|
|
260
|
+
},
|
|
261
|
+
"attribute": "tooltip",
|
|
262
|
+
"reflect": true
|
|
263
|
+
},
|
|
264
|
+
"language": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"mutable": false,
|
|
267
|
+
"complexType": {
|
|
268
|
+
"original": "string",
|
|
269
|
+
"resolved": "string",
|
|
270
|
+
"references": {}
|
|
271
|
+
},
|
|
272
|
+
"required": false,
|
|
273
|
+
"optional": false,
|
|
274
|
+
"docs": {
|
|
275
|
+
"tags": [],
|
|
276
|
+
"text": "Currently selected language."
|
|
277
|
+
},
|
|
278
|
+
"attribute": "language",
|
|
279
|
+
"reflect": true
|
|
280
|
+
},
|
|
281
|
+
"emitValue": {
|
|
282
|
+
"type": "boolean",
|
|
283
|
+
"mutable": false,
|
|
284
|
+
"complexType": {
|
|
285
|
+
"original": "boolean",
|
|
286
|
+
"resolved": "boolean",
|
|
287
|
+
"references": {}
|
|
288
|
+
},
|
|
289
|
+
"required": false,
|
|
290
|
+
"optional": false,
|
|
291
|
+
"docs": {
|
|
292
|
+
"tags": [],
|
|
293
|
+
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
294
|
+
},
|
|
295
|
+
"attribute": "emit-value",
|
|
296
|
+
"reflect": true
|
|
297
|
+
},
|
|
298
|
+
"clientStyling": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"mutable": false,
|
|
301
|
+
"complexType": {
|
|
302
|
+
"original": "string",
|
|
303
|
+
"resolved": "string",
|
|
304
|
+
"references": {}
|
|
305
|
+
},
|
|
306
|
+
"required": false,
|
|
307
|
+
"optional": false,
|
|
308
|
+
"docs": {
|
|
309
|
+
"tags": [],
|
|
310
|
+
"text": "Client custom styling via inline style"
|
|
311
|
+
},
|
|
312
|
+
"attribute": "client-styling",
|
|
313
|
+
"reflect": true,
|
|
314
|
+
"defaultValue": "''"
|
|
315
|
+
},
|
|
316
|
+
"dateFormat": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"mutable": false,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "string",
|
|
321
|
+
"resolved": "string",
|
|
322
|
+
"references": {}
|
|
323
|
+
},
|
|
324
|
+
"required": false,
|
|
325
|
+
"optional": false,
|
|
326
|
+
"docs": {
|
|
327
|
+
"tags": [],
|
|
328
|
+
"text": "Date format for date picker."
|
|
329
|
+
},
|
|
330
|
+
"attribute": "date-format",
|
|
331
|
+
"reflect": true
|
|
332
|
+
}
|
|
333
|
+
}; }
|
|
334
|
+
static get states() { return {
|
|
335
|
+
"errorMessage": {},
|
|
336
|
+
"isValid": {},
|
|
337
|
+
"limitStylingAppends": {},
|
|
338
|
+
"showTooltip": {}
|
|
339
|
+
}; }
|
|
340
|
+
static get events() { return [{
|
|
341
|
+
"method": "sendValidityState",
|
|
342
|
+
"name": "sendValidityState",
|
|
343
|
+
"bubbles": true,
|
|
344
|
+
"cancelable": true,
|
|
345
|
+
"composed": true,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": ""
|
|
349
|
+
},
|
|
350
|
+
"complexType": {
|
|
351
|
+
"original": "InputStateEvent",
|
|
352
|
+
"resolved": "InputStateEvent",
|
|
353
|
+
"references": {
|
|
354
|
+
"InputStateEvent": {
|
|
355
|
+
"location": "import",
|
|
356
|
+
"path": "../../utils/types"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}, {
|
|
361
|
+
"method": "sendInputValue",
|
|
362
|
+
"name": "sendInputValue",
|
|
363
|
+
"bubbles": true,
|
|
364
|
+
"cancelable": true,
|
|
365
|
+
"composed": true,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": ""
|
|
369
|
+
},
|
|
370
|
+
"complexType": {
|
|
371
|
+
"original": "InputValueEvent",
|
|
372
|
+
"resolved": "InputValueEvent",
|
|
373
|
+
"references": {
|
|
374
|
+
"InputValueEvent": {
|
|
375
|
+
"location": "import",
|
|
376
|
+
"path": "../../utils/types"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}]; }
|
|
381
|
+
static get elementRef() { return "element"; }
|
|
382
|
+
static get watchers() { return [{
|
|
383
|
+
"propName": "isValid",
|
|
384
|
+
"methodName": "validityChanged"
|
|
385
|
+
}, {
|
|
386
|
+
"propName": "emitValue",
|
|
387
|
+
"methodName": "emitValueHandler"
|
|
388
|
+
}]; }
|
|
389
|
+
static get listeners() { return [{
|
|
390
|
+
"name": "click",
|
|
391
|
+
"method": "handleClickOutside",
|
|
392
|
+
"target": "document",
|
|
393
|
+
"capture": false,
|
|
394
|
+
"passive": false
|
|
395
|
+
}]; }
|
|
396
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.email {
|
|
10
|
+
font-family: "Roboto";
|
|
11
|
+
font-style: normal;
|
|
12
|
+
}
|
|
13
|
+
.email__wrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
.email__wrapper--autofilled {
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
.email__wrapper--autofilled .email__label {
|
|
21
|
+
color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
|
|
22
|
+
}
|
|
23
|
+
.email__wrapper--autofilled .email__input {
|
|
24
|
+
color: var(--emfe-w-color-black, #000000);
|
|
25
|
+
}
|
|
26
|
+
.email__wrapper--flex {
|
|
27
|
+
display: flex;
|
|
28
|
+
gap: 5px;
|
|
29
|
+
}
|
|
30
|
+
.email__wrapper--relative {
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
.email__label {
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
font-style: normal;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
line-height: 20px;
|
|
39
|
+
color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
|
|
40
|
+
}
|
|
41
|
+
.email__label--required::after {
|
|
42
|
+
content: "*";
|
|
43
|
+
font-family: inherit;
|
|
44
|
+
color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
45
|
+
margin-left: 2px;
|
|
46
|
+
}
|
|
47
|
+
.email__input {
|
|
48
|
+
font-family: inherit;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 40px;
|
|
52
|
+
border: 2px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
53
|
+
color: var(--emfe-w-color-black, #000000);
|
|
54
|
+
border-radius: 5px;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
font-weight: 300;
|
|
58
|
+
line-height: 1.5;
|
|
59
|
+
padding: 10px;
|
|
60
|
+
}
|
|
61
|
+
.email__input:focus {
|
|
62
|
+
outline-color: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
63
|
+
}
|
|
64
|
+
.email__input--invalid {
|
|
65
|
+
border: 1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
66
|
+
}
|
|
67
|
+
.email__input::placeholder {
|
|
68
|
+
color: var(--emfe-w-color-gray-150, #828282);
|
|
69
|
+
}
|
|
70
|
+
.email__error-message {
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: calc(100% + 5px);
|
|
73
|
+
left: 0;
|
|
74
|
+
color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));
|
|
75
|
+
}
|
|
76
|
+
.email__tooltip-icon {
|
|
77
|
+
width: 16px;
|
|
78
|
+
height: auto;
|
|
79
|
+
}
|
|
80
|
+
.email__tooltip {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 20px;
|
|
84
|
+
background-color: var(--emfe-w-color-white, #FFFFFF);
|
|
85
|
+
border: 1px solid var(--emfe-w-color-gray-100, #E6E6E6);
|
|
86
|
+
color: var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));
|
|
87
|
+
padding: 10px;
|
|
88
|
+
border-radius: 5px;
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transition: opacity 0.3s ease-in-out;
|
|
91
|
+
z-index: 10;
|
|
92
|
+
}
|
|
93
|
+
.email__tooltip.visible {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|