@everymatrix/general-input 0.0.1 → 1.0.69
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_10.cjs.entry.js +20007 -16663
- package/dist/cjs/general-input.cjs.entry.js +67 -40
- package/dist/cjs/general-input.cjs.js +17 -11
- package/dist/cjs/index-8cb018cb.js +1316 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/locale.utils-7a3dfe2f.js +128 -0
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +91 -0
- package/dist/cjs/tooltipIcon-7e9ee226.js +5 -0
- package/dist/collection/collection-manifest.json +14 -13
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.css +26 -6
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +372 -335
- package/dist/collection/components/checkbox-input/checkbox-input.css +16 -10
- package/dist/collection/components/checkbox-input/checkbox-input.js +325 -310
- package/dist/collection/components/date-input/date-input.css +35 -19
- package/dist/collection/components/date-input/date-input.js +401 -328
- package/dist/collection/components/email-input/email-input.css +30 -18
- package/dist/collection/components/email-input/email-input.js +405 -365
- package/dist/collection/components/general-input/general-input.css +1 -0
- package/dist/collection/components/general-input/general-input.js +374 -291
- package/dist/collection/components/general-input/index.js +1 -0
- package/dist/collection/components/number-input/number-input.css +28 -16
- package/dist/collection/components/number-input/number-input.js +371 -334
- package/dist/collection/components/password-input/password-input.css +105 -11
- package/dist/collection/components/password-input/password-input.js +518 -378
- package/dist/collection/components/radio-input/radio-input.css +4 -4
- package/dist/collection/components/radio-input/radio-input.js +301 -287
- package/dist/collection/components/select-input/select-input.css +47 -19
- package/dist/collection/components/select-input/select-input.js +428 -398
- package/dist/collection/components/tel-input/tel-input.css +52 -23
- package/dist/collection/components/tel-input/tel-input.js +441 -404
- package/dist/collection/components/text-input/text-input.css +33 -18
- package/dist/collection/components/text-input/text-input.js +446 -389
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.css +82 -0
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +336 -0
- package/dist/collection/index.js +16 -0
- package/dist/collection/utils/locale.utils.js +118 -21
- package/dist/collection/utils/tooltipIcon.svg +4 -4
- package/dist/collection/utils/utils.js +3 -3
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_10.entry.js +20007 -16663
- package/dist/esm/general-input.entry.js +67 -40
- package/dist/esm/general-input.js +14 -11
- package/dist/esm/index-514fda47.js +1287 -0
- package/dist/esm/index.js +16 -1
- package/dist/esm/loader.js +7 -13
- package/dist/esm/locale.utils-21605050.js +125 -0
- package/dist/esm/toggle-checkbox-input.entry.js +87 -0
- package/dist/esm/tooltipIcon-0a5a06a2.js +3 -0
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/index.esm.js +1 -0
- package/dist/general-input/p-03e81c11.js +2 -0
- package/dist/general-input/p-2dccd0bf.js +1 -0
- package/dist/general-input/p-34939f14.entry.js +1 -0
- package/dist/general-input/p-b32f19c2.entry.js +5430 -0
- package/dist/general-input/p-c43bb82e.entry.js +1 -0
- package/dist/general-input/p-cfe9eb31.js +1 -0
- package/dist/general-input/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +69 -67
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +61 -60
- package/dist/types/components/date-input/date-input.d.ts +79 -65
- package/dist/types/components/email-input/email-input.d.ts +76 -73
- package/dist/types/components/general-input/general-input.d.ts +72 -57
- package/dist/types/components/general-input/index.d.ts +1 -0
- package/dist/types/components/number-input/number-input.d.ts +70 -66
- package/dist/types/components/password-input/password-input.d.ts +87 -75
- package/dist/types/components/radio-input/radio-input.d.ts +55 -55
- package/dist/types/components/select-input/select-input.d.ts +78 -77
- package/dist/types/components/tel-input/tel-input.d.ts +84 -80
- package/dist/types/components/text-input/text-input.d.ts +81 -78
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +67 -0
- package/dist/types/components.d.ts +331 -25
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +13 -1
- package/dist/types/utils/types.d.ts +58 -47
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +9 -9
- package/dist/cjs/index-1768513d.js +0 -1286
- package/dist/components/active-mixin.js +0 -975
- package/dist/components/checkbox-group-input.d.ts +0 -11
- package/dist/components/checkbox-group-input.js +0 -6
- package/dist/components/checkbox-group-input2.js +0 -5793
- package/dist/components/checkbox-input.d.ts +0 -11
- package/dist/components/checkbox-input.js +0 -6
- package/dist/components/checkbox-input2.js +0 -127
- package/dist/components/date-input.d.ts +0 -11
- package/dist/components/date-input.js +0 -6
- package/dist/components/date-input2.js +0 -5182
- package/dist/components/email-input.d.ts +0 -11
- package/dist/components/email-input.js +0 -6
- package/dist/components/email-input2.js +0 -150
- package/dist/components/field-mixin.js +0 -12712
- package/dist/components/general-input.d.ts +0 -11
- package/dist/components/general-input.js +0 -140
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/input-field-shared-styles.js +0 -1067
- package/dist/components/number-input.d.ts +0 -11
- package/dist/components/number-input.js +0 -6
- package/dist/components/number-input2.js +0 -139
- package/dist/components/password-input.d.ts +0 -11
- package/dist/components/password-input.js +0 -6
- package/dist/components/password-input2.js +0 -879
- package/dist/components/pattern-mixin.js +0 -85
- package/dist/components/radio-input.d.ts +0 -11
- package/dist/components/radio-input.js +0 -6
- package/dist/components/radio-input2.js +0 -115
- package/dist/components/select-input.d.ts +0 -11
- package/dist/components/select-input.js +0 -6
- package/dist/components/select-input2.js +0 -166
- package/dist/components/tel-input.d.ts +0 -11
- package/dist/components/tel-input.js +0 -6
- package/dist/components/tel-input2.js +0 -178
- package/dist/components/text-input.d.ts +0 -11
- package/dist/components/text-input.js +0 -6
- package/dist/components/text-input2.js +0 -157
- package/dist/components/tooltipIcon.js +0 -30
- package/dist/components/vaadin-button.js +0 -461
- package/dist/components/vaadin-combo-box.js +0 -4329
- package/dist/components/virtual-keyboard-controller.js +0 -2693
- package/dist/esm/index-7e24a6f1.js +0 -1259
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/general-input/p-61d76ec3.entry.js +0 -1
- package/dist/general-input/p-a79eb0a3.entry.js +0 -4413
- package/dist/general-input/p-fb647820.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface CheckboxInput extends Components.CheckboxInput, HTMLElement {}
|
|
4
|
-
export const CheckboxInput: {
|
|
5
|
-
prototype: CheckboxInput;
|
|
6
|
-
new (): CheckboxInput;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { t as translate, a as tooltipIconSvg } from './tooltipIcon.js';
|
|
3
|
-
|
|
4
|
-
const checkboxInputCss = "*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:\"Roboto\";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--flex{display:flex;gap:5px}.checkbox__wrapper--relative{position:relative}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__label-text{font-size:16px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}";
|
|
5
|
-
|
|
6
|
-
const CheckboxInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
12
|
-
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Default value for the input.
|
|
15
|
-
*/
|
|
16
|
-
this.defaultValue = '';
|
|
17
|
-
/**
|
|
18
|
-
* Client custom styling via inline style
|
|
19
|
-
*/
|
|
20
|
-
this.clientStyling = '';
|
|
21
|
-
this.limitStylingAppends = false;
|
|
22
|
-
this.showTooltip = false;
|
|
23
|
-
this.value = '';
|
|
24
|
-
this.setClientStyling = () => {
|
|
25
|
-
let sheet = document.createElement('style');
|
|
26
|
-
sheet.innerHTML = this.clientStyling;
|
|
27
|
-
this.stylingContainer.prepend(sheet);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
validityChanged() {
|
|
31
|
-
if (this.emitValue == true) {
|
|
32
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
validityStateHandler(inputStateEvent) {
|
|
36
|
-
this.sendValidityState.emit(inputStateEvent);
|
|
37
|
-
}
|
|
38
|
-
emitValueHandler(newValue) {
|
|
39
|
-
if (newValue == true && this.isValid) {
|
|
40
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
valueHandler(inputValueEvent) {
|
|
44
|
-
this.sendInputValue.emit(inputValueEvent);
|
|
45
|
-
}
|
|
46
|
-
handleClickOutside(event) {
|
|
47
|
-
if (event.composedPath()[0] === this.tooltipIconReference)
|
|
48
|
-
return;
|
|
49
|
-
if (event.composedPath()[0] !== this.tooltipReference)
|
|
50
|
-
this.showTooltip = false;
|
|
51
|
-
}
|
|
52
|
-
componentDidRender() {
|
|
53
|
-
// start custom styling area
|
|
54
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
55
|
-
if (this.clientStyling)
|
|
56
|
-
this.setClientStyling();
|
|
57
|
-
this.limitStylingAppends = true;
|
|
58
|
-
}
|
|
59
|
-
// end custom styling area
|
|
60
|
-
if (this.defaultValue) {
|
|
61
|
-
this.value = this.defaultValue;
|
|
62
|
-
this.valueHandler({ name: this.name, value: this.value });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
handleClick() {
|
|
66
|
-
this.value = this.inputReference.checked.toString();
|
|
67
|
-
this.errorMessage = this.setErrorMessage();
|
|
68
|
-
this.isValid = this.setValidity();
|
|
69
|
-
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
70
|
-
this.emitValueHandler(true);
|
|
71
|
-
}
|
|
72
|
-
setValidity() {
|
|
73
|
-
return this.inputReference.validity.valid;
|
|
74
|
-
}
|
|
75
|
-
setErrorMessage() {
|
|
76
|
-
if (this.inputReference.validity.valueMissing) {
|
|
77
|
-
return translate('requiredError', this.language);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
renderLabel() {
|
|
81
|
-
return (h("label", { class: 'checkbox__label', htmlFor: `${this.name}__input` }, h("div", { class: 'checkbox__label-text', innerHTML: `${this.displayName} ${this.validation.mandatory ? '*' : ''}` })));
|
|
82
|
-
}
|
|
83
|
-
renderTooltip() {
|
|
84
|
-
if (this.showTooltip) {
|
|
85
|
-
return (h("div", { class: `checkbox__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.tooltip }));
|
|
86
|
-
}
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
render() {
|
|
90
|
-
return h("div", { class: 'checkbox__wrapper', ref: el => this.stylingContainer = el }, h("input", { type: "checkbox", id: `${this.name}__input`, ref: (el) => this.inputReference = el, name: this.name, checked: this.defaultValue === "true", readOnly: this.autofilled, required: this.validation.mandatory, value: this.value, onClick: () => this.handleClick() }), this.renderLabel(), h("small", { class: 'checkbox__error-message' }, this.errorMessage), h("div", { class: 'checkbox__wrapper--relative' }, this.tooltip &&
|
|
91
|
-
h("img", { class: 'checkbox__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip()));
|
|
92
|
-
}
|
|
93
|
-
static get watchers() { return {
|
|
94
|
-
"isValid": ["validityChanged"],
|
|
95
|
-
"emitValue": ["emitValueHandler"]
|
|
96
|
-
}; }
|
|
97
|
-
static get style() { return checkboxInputCss; }
|
|
98
|
-
}, [1, "checkbox-input", {
|
|
99
|
-
"name": [513],
|
|
100
|
-
"displayName": [513, "display-name"],
|
|
101
|
-
"defaultValue": [513, "default-value"],
|
|
102
|
-
"autofilled": [516],
|
|
103
|
-
"tooltip": [513],
|
|
104
|
-
"validation": [16],
|
|
105
|
-
"language": [513],
|
|
106
|
-
"emitValue": [516, "emit-value"],
|
|
107
|
-
"clientStyling": [513, "client-styling"],
|
|
108
|
-
"errorMessage": [32],
|
|
109
|
-
"isValid": [32],
|
|
110
|
-
"limitStylingAppends": [32],
|
|
111
|
-
"showTooltip": [32]
|
|
112
|
-
}, [[4, "click", "handleClickOutside"]]]);
|
|
113
|
-
function defineCustomElement() {
|
|
114
|
-
if (typeof customElements === "undefined") {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const components = ["checkbox-input"];
|
|
118
|
-
components.forEach(tagName => { switch (tagName) {
|
|
119
|
-
case "checkbox-input":
|
|
120
|
-
if (!customElements.get(tagName)) {
|
|
121
|
-
customElements.define(tagName, CheckboxInput);
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
} });
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export { CheckboxInput as C, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface DateInput extends Components.DateInput, HTMLElement {}
|
|
4
|
-
export const DateInput: {
|
|
5
|
-
prototype: DateInput;
|
|
6
|
-
new (): DateInput;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|