@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.
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +35539 -0
- package/dist/cjs/general-input.cjs.entry.js +34 -13
- package/dist/cjs/general-input.cjs.js +2 -2
- package/dist/cjs/{index-64a5cb7f.js → index-132a0774.js} +119 -6
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/locale.utils-7665b010.js +71 -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 +3 -1
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +62 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +366 -0
- package/dist/collection/components/checkbox-input/checkbox-input.css +47 -1
- package/dist/collection/components/checkbox-input/checkbox-input.js +143 -16
- package/dist/collection/components/date-input/date-input.css +64 -30
- package/dist/collection/components/date-input/date-input.js +194 -13
- package/dist/collection/components/email-input/email-input.css +63 -28
- package/dist/collection/components/email-input/email-input.js +197 -21
- package/dist/collection/components/general-input/general-input.js +163 -21
- package/dist/collection/components/number-input/number-input.css +65 -30
- package/dist/collection/components/number-input/number-input.js +174 -19
- package/dist/collection/components/password-input/password-input.css +120 -29
- package/dist/collection/components/password-input/password-input.js +341 -25
- package/dist/collection/components/radio-input/radio-input.css +22 -1
- package/dist/collection/components/radio-input/radio-input.js +89 -10
- package/dist/collection/components/select-input/select-input.css +75 -22
- package/dist/collection/components/select-input/select-input.js +180 -37
- package/dist/collection/components/tel-input/tel-input.css +91 -33
- package/dist/collection/components/tel-input/tel-input.js +202 -24
- package/dist/collection/components/text-input/text-input.css +63 -28
- package/dist/collection/components/text-input/text-input.js +208 -39
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +76 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +324 -0
- package/dist/collection/utils/locale.utils.js +52 -13
- package/dist/collection/utils/tooltipIcon.svg +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 +1125 -0
- package/dist/components/checkbox-input2.js +62 -12
- package/dist/components/date-input2.js +10247 -15
- package/dist/components/email-input2.js +98 -21
- package/dist/components/field-mixin.js +12712 -0
- package/dist/components/general-input.js +1 -118
- package/dist/components/general-input2.js +331 -0
- package/dist/components/input-field-shared-styles.js +1114 -0
- package/dist/components/number-input2.js +92 -16
- package/dist/components/password-input2.js +924 -24
- package/dist/components/pattern-mixin.js +85 -0
- package/dist/components/radio-input2.js +45 -11
- package/dist/components/select-input2.js +87 -27
- package/dist/components/tel-input2.js +122 -22
- package/dist/components/text-input2.js +120 -34
- package/dist/components/toggle-checkbox-input.d.ts +11 -0
- package/dist/components/toggle-checkbox-input.js +6 -0
- package/dist/components/tooltipIcon.js +70 -0
- package/dist/components/vaadin-button.js +461 -0
- package/dist/components/vaadin-combo-box.js +4329 -0
- package/dist/components/virtual-keyboard-controller.js +2658 -0
- package/dist/esm/checkbox-group-input_10.entry.js +35526 -0
- package/dist/esm/general-input.entry.js +34 -13
- package/dist/esm/general-input.js +2 -2
- package/dist/esm/{index-df80f936.js → index-db76d5b5.js} +118 -7
- package/dist/esm/loader.js +2 -2
- package/dist/esm/locale.utils-95ea2605.js +68 -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 -1
- package/dist/general-input/p-0966f523.entry.js +3581 -0
- package/dist/general-input/p-916a1319.entry.js +1 -0
- package/dist/general-input/p-b408093e.js +1 -0
- package/dist/general-input/p-c2d4d6ac.entry.js +1 -0
- package/dist/general-input/p-f4f4ccda.js +1 -0
- package/dist/general-input/p-f6132f1d.js +1 -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 +28 -2
- package/dist/types/components/date-input/date-input.d.ts +43 -1
- package/dist/types/components/email-input/email-input.d.ts +37 -3
- package/dist/types/components/general-input/general-input.d.ts +30 -0
- package/dist/types/components/number-input/number-input.d.ts +34 -3
- package/dist/types/components/password-input/password-input.d.ts +56 -7
- package/dist/types/components/radio-input/radio-input.d.ts +17 -1
- package/dist/types/components/select-input/select-input.d.ts +36 -3
- package/dist/types/components/tel-input/tel-input.d.ts +40 -5
- 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 +568 -9
- package/dist/types/utils/locale.utils.d.ts +9 -0
- package/dist/types/utils/types.d.ts +41 -9
- package/package.json +8 -1
- package/dist/cjs/checkbox-input_9.cjs.entry.js +0 -623
- package/dist/components/locale.utils.js +0 -29
- package/dist/esm/checkbox-input_9.entry.js +0 -611
- package/dist/general-input/p-1703fce3.entry.js +0 -1
- package/dist/general-input/p-d9f7fa2e.js +0 -1
- package/dist/general-input/p-dea0a4ac.entry.js +0 -1
- /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
|
@@ -1,63 +1,130 @@
|
|
|
1
|
-
import { Component, h, Prop, State, Watch, Event } from '@stencil/core';
|
|
1
|
+
import { Component, h, Prop, State, Watch, Event, Listen } from '@stencil/core';
|
|
2
2
|
import { translate } from '../../utils/locale.utils';
|
|
3
|
+
import tooltipIcon from '../../utils/tooltipIcon.svg';
|
|
3
4
|
export class TextInput {
|
|
4
5
|
constructor() {
|
|
5
6
|
/**
|
|
6
7
|
* Default value for the input.
|
|
7
8
|
*/
|
|
8
9
|
this.defaultValue = '';
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via inline style
|
|
12
|
+
*/
|
|
13
|
+
this.clientStyling = '';
|
|
9
14
|
this.errorMessage = '';
|
|
15
|
+
this.limitStylingAppends = false;
|
|
16
|
+
this.showTooltip = false;
|
|
10
17
|
this.value = '';
|
|
11
|
-
this.customRules = [];
|
|
12
18
|
this.validationPattern = '';
|
|
19
|
+
this.duplicateInputValue = null;
|
|
20
|
+
this.touched = false;
|
|
21
|
+
this.handleInput = (event) => {
|
|
22
|
+
this.value = event.target.value;
|
|
23
|
+
this.touched = true;
|
|
24
|
+
if (this.debounceTime) {
|
|
25
|
+
clearTimeout(this.debounceTime);
|
|
26
|
+
}
|
|
27
|
+
this.debounceTime = setTimeout(() => {
|
|
28
|
+
this.isValid = this.setValidity();
|
|
29
|
+
this.errorMessage = this.setErrorMessage();
|
|
30
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
31
|
+
this.emitValueHandler(true);
|
|
32
|
+
}, 500);
|
|
33
|
+
};
|
|
34
|
+
this.handleBlur = (event) => {
|
|
35
|
+
this.value = event.target.value;
|
|
36
|
+
this.touched = true;
|
|
37
|
+
this.isValid = this.setValidity();
|
|
38
|
+
this.errorMessage = this.setErrorMessage();
|
|
39
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
40
|
+
};
|
|
41
|
+
this.setClientStyling = () => {
|
|
42
|
+
let sheet = document.createElement('style');
|
|
43
|
+
sheet.innerHTML = this.clientStyling;
|
|
44
|
+
this.stylingContainer.prepend(sheet);
|
|
45
|
+
};
|
|
13
46
|
}
|
|
14
47
|
validityChanged() {
|
|
48
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
15
49
|
if (this.emitValue == true) {
|
|
16
50
|
this.valueHandler({ name: this.name, value: this.value });
|
|
17
51
|
}
|
|
18
52
|
}
|
|
19
|
-
validityStateHandler(inputStateEvent) {
|
|
20
|
-
this.sendValidityState.emit(inputStateEvent);
|
|
21
|
-
}
|
|
22
53
|
emitValueHandler(newValue) {
|
|
23
54
|
if (newValue == true && this.isValid) {
|
|
24
55
|
this.valueHandler({ name: this.name, value: this.value });
|
|
25
56
|
}
|
|
26
57
|
}
|
|
58
|
+
validityStateHandler(inputStateEvent) {
|
|
59
|
+
this.sendValidityState.emit(inputStateEvent);
|
|
60
|
+
}
|
|
27
61
|
valueHandler(inputValueEvent) {
|
|
28
62
|
this.sendInputValue.emit(inputValueEvent);
|
|
29
63
|
}
|
|
64
|
+
handleClickOutside(event) {
|
|
65
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
66
|
+
return;
|
|
67
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
68
|
+
this.showTooltip = false;
|
|
69
|
+
}
|
|
70
|
+
valueChangedHandler(event) {
|
|
71
|
+
if (this.isDuplicateInput && this.name === event.detail.name + 'Duplicate') {
|
|
72
|
+
this.duplicateInputValue = event.detail.value;
|
|
73
|
+
if (this.touched) {
|
|
74
|
+
this.isValid = this.setValidity();
|
|
75
|
+
this.errorMessage = this.setErrorMessage();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (this.name === event.detail.name + 'Duplicate'
|
|
79
|
+
&& this.name.replace('Duplicate', '') === event.detail.name
|
|
80
|
+
&& this.touched === true) {
|
|
81
|
+
this.isValid = this.setValidity();
|
|
82
|
+
this.errorMessage = this.setErrorMessage();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
30
85
|
connectedCallback() {
|
|
31
|
-
// @TODO do something with customRules !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
32
|
-
this.customRules = this.setCustomRules();
|
|
33
86
|
this.validationPattern = this.setPattern();
|
|
34
87
|
}
|
|
35
|
-
|
|
36
|
-
|
|
88
|
+
componentDidRender() {
|
|
89
|
+
// start custom styling area
|
|
90
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
91
|
+
if (this.clientStyling)
|
|
92
|
+
this.setClientStyling();
|
|
93
|
+
this.limitStylingAppends = true;
|
|
94
|
+
}
|
|
95
|
+
// end custom styling area
|
|
96
|
+
}
|
|
97
|
+
componentDidLoad() {
|
|
98
|
+
if (this.defaultValue) {
|
|
99
|
+
this.value = this.defaultValue;
|
|
100
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
101
|
+
if (this.isDuplicateInput) {
|
|
102
|
+
this.touched = true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
37
105
|
this.isValid = this.setValidity();
|
|
38
|
-
this.errorMessage = this.setErrorMessage();
|
|
39
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
40
|
-
this.emitValueHandler(true);
|
|
41
106
|
}
|
|
42
107
|
setValidity() {
|
|
43
|
-
return this.inputReference.validity.valid;
|
|
44
|
-
}
|
|
45
|
-
// @TODO type here
|
|
46
|
-
setCustomRules() {
|
|
47
108
|
var _a;
|
|
48
|
-
if (
|
|
49
|
-
return
|
|
109
|
+
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
return (_a = this.inputReference) === null || _a === void 0 ? void 0 : _a.validity.valid;
|
|
50
114
|
}
|
|
51
115
|
}
|
|
52
116
|
setPattern() {
|
|
53
|
-
var _a;
|
|
117
|
+
var _a, _b;
|
|
54
118
|
if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
55
|
-
return this.validation.custom.find(customValidation => customValidation.rule === 'regex').pattern;
|
|
119
|
+
return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
|
|
56
120
|
}
|
|
57
121
|
}
|
|
58
122
|
setErrorMessage() {
|
|
123
|
+
var _a, _b, _c, _d;
|
|
59
124
|
if (this.inputReference.validity.patternMismatch) {
|
|
60
|
-
|
|
125
|
+
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
126
|
+
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
127
|
+
return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
|
|
61
128
|
}
|
|
62
129
|
if (this.inputReference.validity.tooShort || this.inputReference.validity.tooLong) {
|
|
63
130
|
return translate('lengthError', this.language, { values: { minLength: this.validation.minLength, maxLength: this.validation.maxLength } });
|
|
@@ -65,13 +132,31 @@ export class TextInput {
|
|
|
65
132
|
if (this.inputReference.validity.valueMissing) {
|
|
66
133
|
return translate('requiredError', this.language);
|
|
67
134
|
}
|
|
135
|
+
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
136
|
+
const errorCode = (_c = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _c === void 0 ? void 0 : _c.errorKey;
|
|
137
|
+
const errorMessage = (_d = this.validation.custom.find(customRule => customRule.rule === 'duplicate-input')) === null || _d === void 0 ? void 0 : _d.errorMessage;
|
|
138
|
+
return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
renderTooltip() {
|
|
142
|
+
if (this.showTooltip) {
|
|
143
|
+
return (h("div", { class: `text__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
68
146
|
}
|
|
69
147
|
render() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
148
|
+
let invalidClass = '';
|
|
149
|
+
if (this.touched) {
|
|
150
|
+
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
151
|
+
}
|
|
152
|
+
return h("div", { class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el },
|
|
153
|
+
h("div", { class: 'text__wrapper--flex' },
|
|
154
|
+
h("label", { class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName),
|
|
155
|
+
h("div", { class: 'text__wrapper--relative' },
|
|
156
|
+
this.tooltip &&
|
|
157
|
+
h("img", { class: 'text__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }),
|
|
158
|
+
this.renderTooltip())),
|
|
159
|
+
h("input", { name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, pattern: this.validationPattern, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }),
|
|
75
160
|
h("small", { class: 'text__error-message' }, this.errorMessage));
|
|
76
161
|
}
|
|
77
162
|
static get is() { return "text-input"; }
|
|
@@ -85,7 +170,7 @@ export class TextInput {
|
|
|
85
170
|
static get properties() { return {
|
|
86
171
|
"name": {
|
|
87
172
|
"type": "string",
|
|
88
|
-
"mutable":
|
|
173
|
+
"mutable": false,
|
|
89
174
|
"complexType": {
|
|
90
175
|
"original": "string",
|
|
91
176
|
"resolved": "string",
|
|
@@ -98,7 +183,7 @@ export class TextInput {
|
|
|
98
183
|
"text": "Name of the input."
|
|
99
184
|
},
|
|
100
185
|
"attribute": "name",
|
|
101
|
-
"reflect":
|
|
186
|
+
"reflect": true
|
|
102
187
|
},
|
|
103
188
|
"displayName": {
|
|
104
189
|
"type": "string",
|
|
@@ -115,7 +200,24 @@ export class TextInput {
|
|
|
115
200
|
"text": "Name of input to be shown to the user."
|
|
116
201
|
},
|
|
117
202
|
"attribute": "display-name",
|
|
118
|
-
"reflect":
|
|
203
|
+
"reflect": true
|
|
204
|
+
},
|
|
205
|
+
"placeholder": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"mutable": false,
|
|
208
|
+
"complexType": {
|
|
209
|
+
"original": "string",
|
|
210
|
+
"resolved": "string",
|
|
211
|
+
"references": {}
|
|
212
|
+
},
|
|
213
|
+
"required": false,
|
|
214
|
+
"optional": false,
|
|
215
|
+
"docs": {
|
|
216
|
+
"tags": [],
|
|
217
|
+
"text": "Placeholder text to be shown."
|
|
218
|
+
},
|
|
219
|
+
"attribute": "placeholder",
|
|
220
|
+
"reflect": true
|
|
119
221
|
},
|
|
120
222
|
"validation": {
|
|
121
223
|
"type": "unknown",
|
|
@@ -139,7 +241,7 @@ export class TextInput {
|
|
|
139
241
|
},
|
|
140
242
|
"defaultValue": {
|
|
141
243
|
"type": "string",
|
|
142
|
-
"mutable":
|
|
244
|
+
"mutable": false,
|
|
143
245
|
"complexType": {
|
|
144
246
|
"original": "string",
|
|
145
247
|
"resolved": "string",
|
|
@@ -152,10 +254,27 @@ export class TextInput {
|
|
|
152
254
|
"text": "Default value for the input."
|
|
153
255
|
},
|
|
154
256
|
"attribute": "default-value",
|
|
155
|
-
"reflect":
|
|
257
|
+
"reflect": true,
|
|
156
258
|
"defaultValue": "''"
|
|
157
259
|
},
|
|
158
|
-
"
|
|
260
|
+
"autofilled": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Boolean. Determines if input should be readonly."
|
|
273
|
+
},
|
|
274
|
+
"attribute": "autofilled",
|
|
275
|
+
"reflect": true
|
|
276
|
+
},
|
|
277
|
+
"tooltip": {
|
|
159
278
|
"type": "string",
|
|
160
279
|
"mutable": false,
|
|
161
280
|
"complexType": {
|
|
@@ -167,10 +286,10 @@ export class TextInput {
|
|
|
167
286
|
"optional": false,
|
|
168
287
|
"docs": {
|
|
169
288
|
"tags": [],
|
|
170
|
-
"text": "
|
|
289
|
+
"text": "Tooltip text."
|
|
171
290
|
},
|
|
172
|
-
"attribute": "
|
|
173
|
-
"reflect":
|
|
291
|
+
"attribute": "tooltip",
|
|
292
|
+
"reflect": true
|
|
174
293
|
},
|
|
175
294
|
"language": {
|
|
176
295
|
"type": "string",
|
|
@@ -187,7 +306,7 @@ export class TextInput {
|
|
|
187
306
|
"text": "Currently selected language."
|
|
188
307
|
},
|
|
189
308
|
"attribute": "language",
|
|
190
|
-
"reflect":
|
|
309
|
+
"reflect": true
|
|
191
310
|
},
|
|
192
311
|
"checkValidity": {
|
|
193
312
|
"type": "boolean",
|
|
@@ -204,7 +323,7 @@ export class TextInput {
|
|
|
204
323
|
"text": "State passed down from the parent element. Will trigger the input to check for validity."
|
|
205
324
|
},
|
|
206
325
|
"attribute": "check-validity",
|
|
207
|
-
"reflect":
|
|
326
|
+
"reflect": true
|
|
208
327
|
},
|
|
209
328
|
"emitValue": {
|
|
210
329
|
"type": "boolean",
|
|
@@ -221,12 +340,49 @@ export class TextInput {
|
|
|
221
340
|
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
222
341
|
},
|
|
223
342
|
"attribute": "emit-value",
|
|
224
|
-
"reflect":
|
|
343
|
+
"reflect": true
|
|
344
|
+
},
|
|
345
|
+
"isDuplicateInput": {
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"mutable": false,
|
|
348
|
+
"complexType": {
|
|
349
|
+
"original": "boolean",
|
|
350
|
+
"resolved": "boolean",
|
|
351
|
+
"references": {}
|
|
352
|
+
},
|
|
353
|
+
"required": false,
|
|
354
|
+
"optional": false,
|
|
355
|
+
"docs": {
|
|
356
|
+
"tags": [],
|
|
357
|
+
"text": "Boolean that triggers certain validation rules, for duplicated inputs."
|
|
358
|
+
},
|
|
359
|
+
"attribute": "is-duplicate-input",
|
|
360
|
+
"reflect": true
|
|
361
|
+
},
|
|
362
|
+
"clientStyling": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"mutable": false,
|
|
365
|
+
"complexType": {
|
|
366
|
+
"original": "string",
|
|
367
|
+
"resolved": "string",
|
|
368
|
+
"references": {}
|
|
369
|
+
},
|
|
370
|
+
"required": false,
|
|
371
|
+
"optional": false,
|
|
372
|
+
"docs": {
|
|
373
|
+
"tags": [],
|
|
374
|
+
"text": "Client custom styling via inline style"
|
|
375
|
+
},
|
|
376
|
+
"attribute": "client-styling",
|
|
377
|
+
"reflect": true,
|
|
378
|
+
"defaultValue": "''"
|
|
225
379
|
}
|
|
226
380
|
}; }
|
|
227
381
|
static get states() { return {
|
|
228
382
|
"isValid": {},
|
|
229
|
-
"errorMessage": {}
|
|
383
|
+
"errorMessage": {},
|
|
384
|
+
"limitStylingAppends": {},
|
|
385
|
+
"showTooltip": {}
|
|
230
386
|
}; }
|
|
231
387
|
static get events() { return [{
|
|
232
388
|
"method": "sendValidityState",
|
|
@@ -276,4 +432,17 @@ export class TextInput {
|
|
|
276
432
|
"propName": "emitValue",
|
|
277
433
|
"methodName": "emitValueHandler"
|
|
278
434
|
}]; }
|
|
435
|
+
static get listeners() { return [{
|
|
436
|
+
"name": "click",
|
|
437
|
+
"method": "handleClickOutside",
|
|
438
|
+
"target": "document",
|
|
439
|
+
"capture": false,
|
|
440
|
+
"passive": false
|
|
441
|
+
}, {
|
|
442
|
+
"name": "sendInputValue",
|
|
443
|
+
"method": "valueChangedHandler",
|
|
444
|
+
"target": "body",
|
|
445
|
+
"capture": false,
|
|
446
|
+
"passive": false
|
|
447
|
+
}]; }
|
|
279
448
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.togglecheckbox {
|
|
10
|
+
font-family: "Roboto";
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-size: 15px;
|
|
13
|
+
}
|
|
14
|
+
.togglecheckbox__wrapper {
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
.togglecheckbox__wrapper--flex {
|
|
18
|
+
display: flex;
|
|
19
|
+
gap: 5px;
|
|
20
|
+
align-content: flex-start;
|
|
21
|
+
}
|
|
22
|
+
.togglecheckbox__wrapper--relative {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: inline;
|
|
25
|
+
}
|
|
26
|
+
.togglecheckbox__input {
|
|
27
|
+
transform: scale(1.307, 1.307);
|
|
28
|
+
margin-left: 2px;
|
|
29
|
+
}
|
|
30
|
+
.togglecheckbox__label {
|
|
31
|
+
font-style: inherit;
|
|
32
|
+
font-family: inherit;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
color: #2B2D3F;
|
|
36
|
+
line-height: 14px;
|
|
37
|
+
}
|
|
38
|
+
.togglecheckbox__label-text {
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
}
|
|
41
|
+
.togglecheckbox__error-message {
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: calc(100% + 5px);
|
|
44
|
+
left: 0;
|
|
45
|
+
color: #cc0000b3;
|
|
46
|
+
}
|
|
47
|
+
.togglecheckbox__tooltip-icon {
|
|
48
|
+
width: 16px;
|
|
49
|
+
height: auto;
|
|
50
|
+
}
|
|
51
|
+
.togglecheckbox__tooltip {
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 0;
|
|
54
|
+
right: 0;
|
|
55
|
+
background-color: #FFFFFF;
|
|
56
|
+
border: 1px solid #B0B0B0;
|
|
57
|
+
color: #2B2D3F;
|
|
58
|
+
padding: 10px;
|
|
59
|
+
border-radius: 5px;
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transition: opacity 0.3s ease-in-out;
|
|
62
|
+
z-index: 10;
|
|
63
|
+
}
|
|
64
|
+
.togglecheckbox__tooltip.visible {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
.togglecheckbox__fields-wrapper {
|
|
68
|
+
margin-top: 40px;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 40px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hidden {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|