@everymatrix/general-input-hsl 0.0.1
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +7303 -0
- package/dist/cjs/general-input-hsl-2832e412.js +5800 -0
- package/dist/cjs/general-input-hsl.cjs.js +25 -0
- package/dist/cjs/index-6f821b8d.js +1299 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/collection-manifest.json +24 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +89 -0
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +390 -0
- package/dist/collection/components/checkbox-input/checkbox-input.css +78 -0
- package/dist/collection/components/checkbox-input/checkbox-input.js +344 -0
- package/dist/collection/components/date-input/date-input.css +101 -0
- package/dist/collection/components/date-input/date-input.js +466 -0
- package/dist/collection/components/email-input/email-input.css +95 -0
- package/dist/collection/components/email-input/email-input.js +429 -0
- package/dist/collection/components/general-input-hsl/general-input-hsl.css +4 -0
- package/dist/collection/components/general-input-hsl/general-input-hsl.js +438 -0
- package/dist/collection/components/general-input-hsl/index.js +1 -0
- package/dist/collection/components/number-input/number-input.css +102 -0
- package/dist/collection/components/number-input/number-input.js +393 -0
- package/dist/collection/components/password-input/password-input.css +193 -0
- package/dist/collection/components/password-input/password-input.js +573 -0
- package/dist/collection/components/radio-input/radio-input.css +43 -0
- package/dist/collection/components/radio-input/radio-input.js +319 -0
- package/dist/collection/components/select-input/select-input.css +121 -0
- package/dist/collection/components/select-input/select-input.js +488 -0
- package/dist/collection/components/tel-input/tel-input.css +145 -0
- package/dist/collection/components/tel-input/tel-input.js +468 -0
- package/dist/collection/components/text-input/text-input.css +97 -0
- package/dist/collection/components/text-input/text-input.js +489 -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 +366 -0
- package/dist/collection/components/twofa-input/twofa-input.css +56 -0
- package/dist/collection/components/twofa-input/twofa-input.js +495 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +81 -0
- package/dist/collection/utils/tooltipIcon.svg +5 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_13.entry.js +7288 -0
- package/dist/esm/general-input-hsl-31f19ad0.js +5797 -0
- package/dist/esm/general-input-hsl.js +20 -0
- package/dist/esm/index-8598bfb7.js +1270 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/general-input-hsl/app-globals-0f993ce5.js +1 -0
- package/dist/general-input-hsl/checkbox-group-input_13.entry.js +1 -0
- package/dist/general-input-hsl/general-input-hsl-31f19ad0.js +5614 -0
- package/dist/general-input-hsl/general-input-hsl.esm.js +1 -0
- package/dist/general-input-hsl/index-8598bfb7.js +2 -0
- package/dist/general-input-hsl/index.esm.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/main.d.ts +3 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/packages/stencil/general-input-hsl/storybook/preview.d.ts +70 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/index.d.ts +3 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/Users/maria.bumbar/Desktop/Widgets & Template/widgets-monorepo/packages/stencil/general-input-hsl/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -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 +67 -0
- package/dist/types/components/date-input/date-input.d.ts +89 -0
- package/dist/types/components/email-input/email-input.d.ts +81 -0
- package/dist/types/components/general-input-hsl/general-input-hsl.d.ts +84 -0
- package/dist/types/components/general-input-hsl/index.d.ts +1 -0
- package/dist/types/components/number-input/number-input.d.ts +75 -0
- package/dist/types/components/password-input/password-input.d.ts +97 -0
- package/dist/types/components/radio-input/radio-input.d.ts +60 -0
- package/dist/types/components/select-input/select-input.d.ts +85 -0
- package/dist/types/components/tel-input/tel-input.d.ts +89 -0
- package/dist/types/components/text-input/text-input.d.ts +86 -0
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +73 -0
- package/dist/types/components/twofa-input/twofa-input.d.ts +84 -0
- package/dist/types/components.d.ts +1599 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +13 -0
- package/dist/types/utils/types.d.ts +111 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../utils/locale.utils";
|
|
3
|
+
import tooltipIcon from "../../utils/tooltipIcon.svg";
|
|
4
|
+
export class NumberInput {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.validationPattern = '';
|
|
7
|
+
this.touched = false;
|
|
8
|
+
this.handleInput = (event) => {
|
|
9
|
+
this.value = event.target.value;
|
|
10
|
+
this.touched = true;
|
|
11
|
+
if (this.debounceTime) {
|
|
12
|
+
clearTimeout(this.debounceTime);
|
|
13
|
+
}
|
|
14
|
+
this.debounceTime = setTimeout(() => {
|
|
15
|
+
this.isValid = this.setValidity();
|
|
16
|
+
this.errorMessage = this.setErrorMessage();
|
|
17
|
+
this.emitValueHandler(true);
|
|
18
|
+
}, 500);
|
|
19
|
+
};
|
|
20
|
+
this.handleBlur = () => {
|
|
21
|
+
this.isValid = this.setValidity();
|
|
22
|
+
this.errorMessage = this.setErrorMessage();
|
|
23
|
+
this.touched = true;
|
|
24
|
+
};
|
|
25
|
+
this.setClientStyling = () => {
|
|
26
|
+
let sheet = document.createElement('style');
|
|
27
|
+
sheet.innerHTML = this.clientStyling;
|
|
28
|
+
this.stylingContainer.prepend(sheet);
|
|
29
|
+
};
|
|
30
|
+
this.name = undefined;
|
|
31
|
+
this.displayName = undefined;
|
|
32
|
+
this.placeholder = undefined;
|
|
33
|
+
this.validation = undefined;
|
|
34
|
+
this.defaultValue = undefined;
|
|
35
|
+
this.autofilled = undefined;
|
|
36
|
+
this.tooltip = undefined;
|
|
37
|
+
this.language = undefined;
|
|
38
|
+
this.emitValue = undefined;
|
|
39
|
+
this.clientStyling = '';
|
|
40
|
+
this.errorMessage = undefined;
|
|
41
|
+
this.isValid = undefined;
|
|
42
|
+
this.limitStylingAppends = false;
|
|
43
|
+
this.showTooltip = false;
|
|
44
|
+
}
|
|
45
|
+
handleStylingChange(newValue, oldValue) {
|
|
46
|
+
if (newValue !== oldValue)
|
|
47
|
+
this.setClientStyling();
|
|
48
|
+
}
|
|
49
|
+
validityChanged() {
|
|
50
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
51
|
+
if (this.emitValue == true) {
|
|
52
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
validityStateHandler(inputStateEvent) {
|
|
56
|
+
this.sendValidityState.emit(inputStateEvent);
|
|
57
|
+
}
|
|
58
|
+
emitValueHandler(newValue) {
|
|
59
|
+
if (newValue == true && this.isValid) {
|
|
60
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
valueHandler(inputValueEvent) {
|
|
64
|
+
this.sendInputValue.emit(inputValueEvent);
|
|
65
|
+
}
|
|
66
|
+
handleClickOutside(event) {
|
|
67
|
+
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
68
|
+
return;
|
|
69
|
+
if (event.composedPath()[0] !== this.tooltipReference)
|
|
70
|
+
this.showTooltip = false;
|
|
71
|
+
}
|
|
72
|
+
connectedCallback() {
|
|
73
|
+
this.validationPattern = this.setPattern();
|
|
74
|
+
}
|
|
75
|
+
componentDidRender() {
|
|
76
|
+
// start custom styling area
|
|
77
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
78
|
+
if (this.clientStyling)
|
|
79
|
+
this.setClientStyling();
|
|
80
|
+
this.limitStylingAppends = true;
|
|
81
|
+
}
|
|
82
|
+
// end custom styling area
|
|
83
|
+
}
|
|
84
|
+
componentDidLoad() {
|
|
85
|
+
this.isValid = this.setValidity();
|
|
86
|
+
if (this.defaultValue) {
|
|
87
|
+
this.value = this.defaultValue;
|
|
88
|
+
this.valueHandler({ name: this.name, value: this.value });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
setValidity() {
|
|
92
|
+
return this.inputReference.validity.valid;
|
|
93
|
+
}
|
|
94
|
+
setPattern() {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
if (((_a = this.validation.custom) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
97
|
+
return (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.pattern;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
setErrorMessage() {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
if (this.inputReference.validity.valueMissing) {
|
|
103
|
+
return translate('requiredError', this.language);
|
|
104
|
+
}
|
|
105
|
+
if (this.inputReference.validity.rangeUnderflow || this.inputReference.validity.rangeOverflow) {
|
|
106
|
+
return translate('numberLengthError', this.language, { values: { min: this.validation.min, max: this.validation.max } });
|
|
107
|
+
}
|
|
108
|
+
if (this.inputReference.validity.patternMismatch) {
|
|
109
|
+
const errorCode = (_a = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _a === void 0 ? void 0 : _a.errorKey;
|
|
110
|
+
const errorMessage = (_b = this.validation.custom.find(customValidation => customValidation.rule === 'regex')) === null || _b === void 0 ? void 0 : _b.errorMessage;
|
|
111
|
+
return translate(`${errorCode}`, this.language) ? translate(`${errorCode}`, this.language) : errorMessage;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
renderTooltip() {
|
|
115
|
+
if (this.showTooltip) {
|
|
116
|
+
return (h("div", { class: `number__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
117
|
+
}
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
let invalidClass = '';
|
|
122
|
+
if (this.touched) {
|
|
123
|
+
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
124
|
+
}
|
|
125
|
+
return h("div", { key: 'a6e6a37c0b82e75bc66e26b104f343178deb8b81', class: `number__wrapper ${this.autofilled ? 'number__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '41d8e03f598ccab9d175dacc27ede808ec017717', class: 'number__wrapper--flex' }, h("label", { key: 'e2eb89c31bdc2c7e7e80546ea5844bb13d34c759', class: `number__label ${this.validation.mandatory ? 'number__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '91de685f2da7b9ba3ddaf48a978f5e95a40594be', class: 'number__wrapper--relative' }, this.tooltip &&
|
|
126
|
+
h("img", { key: '737d9ad4e1c74a03b140d48988e688a1898f9e57', class: 'number__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '58d140746eaaf09aca69c5c4d698983c853e5b5f', ref: (el) => this.inputReference = el, type: "number", value: this.defaultValue, readOnly: this.autofilled, id: `${this.name}__input`, class: `number__input ${invalidClass}`, pattern: this.validationPattern, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '74bda2b23c57d2ca88613c00e4d6ed63ea86daad', class: 'number__error-message' }, this.errorMessage));
|
|
127
|
+
}
|
|
128
|
+
static get is() { return "number-input"; }
|
|
129
|
+
static get encapsulation() { return "shadow"; }
|
|
130
|
+
static get originalStyleUrls() {
|
|
131
|
+
return {
|
|
132
|
+
"$": ["number-input.scss"]
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
static get styleUrls() {
|
|
136
|
+
return {
|
|
137
|
+
"$": ["number-input.css"]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
static get properties() {
|
|
141
|
+
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
|
+
"id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::ValidationSchema"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": false,
|
|
208
|
+
"optional": false,
|
|
209
|
+
"docs": {
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Object of validation rules for the input."
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"defaultValue": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "string",
|
|
219
|
+
"resolved": "string",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Default value for the input."
|
|
227
|
+
},
|
|
228
|
+
"attribute": "default-value",
|
|
229
|
+
"reflect": true
|
|
230
|
+
},
|
|
231
|
+
"autofilled": {
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "boolean",
|
|
236
|
+
"resolved": "boolean",
|
|
237
|
+
"references": {}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": "Boolean. Determines if input should be readonly."
|
|
244
|
+
},
|
|
245
|
+
"attribute": "autofilled",
|
|
246
|
+
"reflect": true
|
|
247
|
+
},
|
|
248
|
+
"tooltip": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"mutable": false,
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "string",
|
|
253
|
+
"resolved": "string",
|
|
254
|
+
"references": {}
|
|
255
|
+
},
|
|
256
|
+
"required": false,
|
|
257
|
+
"optional": false,
|
|
258
|
+
"docs": {
|
|
259
|
+
"tags": [],
|
|
260
|
+
"text": "Tooltip text."
|
|
261
|
+
},
|
|
262
|
+
"attribute": "tooltip",
|
|
263
|
+
"reflect": true
|
|
264
|
+
},
|
|
265
|
+
"language": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"mutable": false,
|
|
268
|
+
"complexType": {
|
|
269
|
+
"original": "string",
|
|
270
|
+
"resolved": "string",
|
|
271
|
+
"references": {}
|
|
272
|
+
},
|
|
273
|
+
"required": false,
|
|
274
|
+
"optional": false,
|
|
275
|
+
"docs": {
|
|
276
|
+
"tags": [],
|
|
277
|
+
"text": "Currently selected language."
|
|
278
|
+
},
|
|
279
|
+
"attribute": "language",
|
|
280
|
+
"reflect": true
|
|
281
|
+
},
|
|
282
|
+
"emitValue": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"mutable": false,
|
|
285
|
+
"complexType": {
|
|
286
|
+
"original": "boolean",
|
|
287
|
+
"resolved": "boolean",
|
|
288
|
+
"references": {}
|
|
289
|
+
},
|
|
290
|
+
"required": false,
|
|
291
|
+
"optional": false,
|
|
292
|
+
"docs": {
|
|
293
|
+
"tags": [],
|
|
294
|
+
"text": "State passed down from the parent element. Will trigger the input to send it's value through an event."
|
|
295
|
+
},
|
|
296
|
+
"attribute": "emit-value",
|
|
297
|
+
"reflect": true
|
|
298
|
+
},
|
|
299
|
+
"clientStyling": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"mutable": false,
|
|
302
|
+
"complexType": {
|
|
303
|
+
"original": "string",
|
|
304
|
+
"resolved": "string",
|
|
305
|
+
"references": {}
|
|
306
|
+
},
|
|
307
|
+
"required": false,
|
|
308
|
+
"optional": false,
|
|
309
|
+
"docs": {
|
|
310
|
+
"tags": [],
|
|
311
|
+
"text": "Client custom styling via inline style"
|
|
312
|
+
},
|
|
313
|
+
"attribute": "client-styling",
|
|
314
|
+
"reflect": true,
|
|
315
|
+
"defaultValue": "''"
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
static get states() {
|
|
320
|
+
return {
|
|
321
|
+
"errorMessage": {},
|
|
322
|
+
"isValid": {},
|
|
323
|
+
"limitStylingAppends": {},
|
|
324
|
+
"showTooltip": {}
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
static get events() {
|
|
328
|
+
return [{
|
|
329
|
+
"method": "sendValidityState",
|
|
330
|
+
"name": "sendValidityState",
|
|
331
|
+
"bubbles": true,
|
|
332
|
+
"cancelable": true,
|
|
333
|
+
"composed": true,
|
|
334
|
+
"docs": {
|
|
335
|
+
"tags": [],
|
|
336
|
+
"text": ""
|
|
337
|
+
},
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "InputStateEvent",
|
|
340
|
+
"resolved": "InputStateEvent",
|
|
341
|
+
"references": {
|
|
342
|
+
"InputStateEvent": {
|
|
343
|
+
"location": "import",
|
|
344
|
+
"path": "../../utils/types",
|
|
345
|
+
"id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputStateEvent"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}, {
|
|
350
|
+
"method": "sendInputValue",
|
|
351
|
+
"name": "sendInputValue",
|
|
352
|
+
"bubbles": true,
|
|
353
|
+
"cancelable": true,
|
|
354
|
+
"composed": true,
|
|
355
|
+
"docs": {
|
|
356
|
+
"tags": [],
|
|
357
|
+
"text": ""
|
|
358
|
+
},
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "InputValueEvent",
|
|
361
|
+
"resolved": "InputValueEvent",
|
|
362
|
+
"references": {
|
|
363
|
+
"InputValueEvent": {
|
|
364
|
+
"location": "import",
|
|
365
|
+
"path": "../../utils/types",
|
|
366
|
+
"id": "../../../../packages/stencil/general-input-hsl/src/utils/types.ts::InputValueEvent"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}];
|
|
371
|
+
}
|
|
372
|
+
static get watchers() {
|
|
373
|
+
return [{
|
|
374
|
+
"propName": "clientStyling",
|
|
375
|
+
"methodName": "handleStylingChange"
|
|
376
|
+
}, {
|
|
377
|
+
"propName": "isValid",
|
|
378
|
+
"methodName": "validityChanged"
|
|
379
|
+
}, {
|
|
380
|
+
"propName": "emitValue",
|
|
381
|
+
"methodName": "emitValueHandler"
|
|
382
|
+
}];
|
|
383
|
+
}
|
|
384
|
+
static get listeners() {
|
|
385
|
+
return [{
|
|
386
|
+
"name": "click",
|
|
387
|
+
"method": "handleClickOutside",
|
|
388
|
+
"target": "document",
|
|
389
|
+
"capture": false,
|
|
390
|
+
"passive": false
|
|
391
|
+
}];
|
|
392
|
+
}
|
|
393
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.password {
|
|
10
|
+
font-family: "Roboto";
|
|
11
|
+
font-style: normal;
|
|
12
|
+
}
|
|
13
|
+
.password__wrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 5px;
|
|
19
|
+
container-type: inline-size;
|
|
20
|
+
}
|
|
21
|
+
.password__wrapper--autofilled {
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
.password__wrapper--autofilled .password__label {
|
|
25
|
+
color: var(--emw--registration-typography, var(--emw--color-black, #000000));
|
|
26
|
+
}
|
|
27
|
+
.password__wrapper--autofilled .password__input::part(input-field) {
|
|
28
|
+
color: var(--emw--color-black, #000000);
|
|
29
|
+
}
|
|
30
|
+
.password__wrapper--flex {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: 5px;
|
|
33
|
+
}
|
|
34
|
+
.password__wrapper--relative {
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
.password__label {
|
|
38
|
+
font-family: inherit;
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
line-height: 20px;
|
|
43
|
+
color: var(--emw--registration-typography, var(--emw--color-black, #000000));
|
|
44
|
+
}
|
|
45
|
+
.password__label--required::after {
|
|
46
|
+
content: "*";
|
|
47
|
+
font-family: inherit;
|
|
48
|
+
color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));
|
|
49
|
+
margin-left: 2px;
|
|
50
|
+
}
|
|
51
|
+
.password__input {
|
|
52
|
+
width: inherit;
|
|
53
|
+
border: none;
|
|
54
|
+
}
|
|
55
|
+
.password__input[focused]::part(input-field) {
|
|
56
|
+
border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));
|
|
57
|
+
}
|
|
58
|
+
.password__input[invalid]::part(input-field) {
|
|
59
|
+
border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));
|
|
60
|
+
}
|
|
61
|
+
.password__input::part(input-field) {
|
|
62
|
+
border-radius: 4px;
|
|
63
|
+
background-color: var(--emw--color-white, #FFFFFF);
|
|
64
|
+
border: 1px solid var(--emw--color-gray-100, #E6E6E6);
|
|
65
|
+
color: var(--emw--color-black, #000000);
|
|
66
|
+
background-color: var(--emw--color-white, #FFFFFF);
|
|
67
|
+
font-family: inherit;
|
|
68
|
+
font-style: normal;
|
|
69
|
+
font-weight: 300;
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
line-height: 1.5;
|
|
72
|
+
position: relative;
|
|
73
|
+
margin-bottom: unset;
|
|
74
|
+
height: 44px;
|
|
75
|
+
padding: 0;
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
.password__input::part(reveal-button) {
|
|
79
|
+
position: relative;
|
|
80
|
+
right: 10px;
|
|
81
|
+
}
|
|
82
|
+
.password__input::part(reveal-button)::before {
|
|
83
|
+
color: var(--emw--registration-typography, var(--emw--color-black, #000000));
|
|
84
|
+
}
|
|
85
|
+
.password__input > input {
|
|
86
|
+
padding: 5px 15px;
|
|
87
|
+
}
|
|
88
|
+
.password__input > input:placeholder-shown {
|
|
89
|
+
color: var(--emw--color-gray-150, #828282);
|
|
90
|
+
}
|
|
91
|
+
.password__error-message {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: calc(100% + 5px);
|
|
94
|
+
left: 0;
|
|
95
|
+
color: var(--emw--color-error, var(--emw--color-red, #ed0909));
|
|
96
|
+
}
|
|
97
|
+
.password__complexity {
|
|
98
|
+
height: 150px;
|
|
99
|
+
position: relative;
|
|
100
|
+
padding: 10px;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 20px;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
margin-top: 20px;
|
|
106
|
+
font-weight: 300;
|
|
107
|
+
background: var(--emw--color-white, #FFFFFF);
|
|
108
|
+
-webkit-border-radius: 5px;
|
|
109
|
+
-moz-border-radius: 5px;
|
|
110
|
+
border-radius: 5px;
|
|
111
|
+
border: 1px solid #B0B0B0;
|
|
112
|
+
box-sizing: content-box;
|
|
113
|
+
/* works only in this order */
|
|
114
|
+
}
|
|
115
|
+
.password__complexity meter {
|
|
116
|
+
border-color: transparent; /* Needed for Safari */
|
|
117
|
+
}
|
|
118
|
+
.password__complexity meter[value="1"]::-moz-meter-bar {
|
|
119
|
+
background-color: var(--emw--color-valid, #48952a);
|
|
120
|
+
}
|
|
121
|
+
.password__complexity meter[value="1"]::-webkit-meter-optimum-value {
|
|
122
|
+
background-color: var(--emw--color-valid, #48952a);
|
|
123
|
+
}
|
|
124
|
+
.password__complexity meter:not([value="1"])::-moz-meter-bar {
|
|
125
|
+
background-color: var(--emw--color-error, #FD2839);
|
|
126
|
+
}
|
|
127
|
+
.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {
|
|
128
|
+
background-color: var(--emw--color-error, #FD2839);
|
|
129
|
+
}
|
|
130
|
+
.password__complexity--strength {
|
|
131
|
+
display: flex;
|
|
132
|
+
justify-content: space-evenly;
|
|
133
|
+
align-items: center;
|
|
134
|
+
}
|
|
135
|
+
.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */
|
|
136
|
+
background: #B0B0B0;
|
|
137
|
+
}
|
|
138
|
+
.password__complexity--hidden {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
.password__complexity--text-bold {
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
}
|
|
144
|
+
.password__complexity--checkbox {
|
|
145
|
+
margin-right: 5px;
|
|
146
|
+
}
|
|
147
|
+
.password__complexity:after {
|
|
148
|
+
content: "";
|
|
149
|
+
position: absolute;
|
|
150
|
+
width: 25px;
|
|
151
|
+
height: 25px;
|
|
152
|
+
border-top: 1px solid var(--emw--color-gray-150, #828282);
|
|
153
|
+
border-right: 0 solid var(--emw--color-gray-150, #828282);
|
|
154
|
+
border-left: 1px solid var(--emw--color-gray-150, #828282);
|
|
155
|
+
border-bottom: 0 solid var(--emw--color-gray-150, #828282);
|
|
156
|
+
bottom: 92%;
|
|
157
|
+
left: 50%;
|
|
158
|
+
margin-left: -25px;
|
|
159
|
+
transform: rotate(45deg);
|
|
160
|
+
margin-top: -25px;
|
|
161
|
+
background-color: var(--emw--color-white, #FFFFFF);
|
|
162
|
+
}
|
|
163
|
+
@container (max-width: 300px) {
|
|
164
|
+
.password__complexity {
|
|
165
|
+
height: 190px;
|
|
166
|
+
}
|
|
167
|
+
.password__complexity:after {
|
|
168
|
+
width: 14px;
|
|
169
|
+
height: 14px;
|
|
170
|
+
bottom: 96%;
|
|
171
|
+
left: 57%;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
.password__tooltip-icon {
|
|
175
|
+
width: 16px;
|
|
176
|
+
height: auto;
|
|
177
|
+
}
|
|
178
|
+
.password__tooltip {
|
|
179
|
+
position: absolute;
|
|
180
|
+
top: 0;
|
|
181
|
+
left: 20px;
|
|
182
|
+
background-color: var(--emw--color-white, #FFFFFF);
|
|
183
|
+
border: 1px solid var(--emw--color-gray-150, #828282);
|
|
184
|
+
color: #2B2D3F;
|
|
185
|
+
padding: 10px;
|
|
186
|
+
border-radius: 5px;
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transition: opacity 0.3s ease-in-out;
|
|
189
|
+
z-index: 10;
|
|
190
|
+
}
|
|
191
|
+
.password__tooltip.visible {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
}
|