@sankhyalabs/ezui 1.1.67 → 1.1.70
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/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-button_16.cjs.entry.js +133 -144
- package/dist/cjs/ez-dialog.cjs.entry.js +7 -1
- package/dist/cjs/ez-modal.cjs.entry.js +16 -69
- package/dist/cjs/ez-number-input.cjs.entry.js +9 -9
- package/dist/cjs/ez-popover.cjs.entry.js +13 -18
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +6 -6
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +2 -1
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +1 -1
- package/dist/collection/components/ez-button/ez-button.css +48 -45
- package/dist/collection/components/ez-button/ez-button.js +5 -5
- package/dist/collection/components/ez-calendar/ez-calendar.css +2 -2
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +7 -7
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +46 -44
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +38 -39
- package/dist/collection/components/ez-date-input/ez-date-input.js +9 -9
- package/dist/collection/components/ez-dialog/ez-dialog.css +43 -43
- package/dist/collection/components/ez-dialog/ez-dialog.js +10 -4
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +6 -6
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +3 -1
- package/dist/collection/components/ez-icon/ez-icon.js +5 -3
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +2 -1
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +1 -1
- package/dist/collection/components/ez-modal/ez-modal.css +1 -1
- package/dist/collection/components/ez-modal/ez-modal.js +30 -83
- package/dist/collection/components/ez-number-input/ez-number-input.js +11 -11
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +1 -1
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +9 -9
- package/dist/collection/components/ez-popover/ez-popover.css +4 -5
- package/dist/collection/components/ez-popover/ez-popover.js +25 -30
- package/dist/collection/components/ez-popup/ez-popup.css +7 -7
- package/dist/collection/components/ez-popup/ez-popup.js +4 -4
- package/dist/collection/components/ez-search/ez-search.js +5 -5
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +7 -10
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +68 -70
- package/dist/collection/components/ez-text-area/ez-text-area.css +6 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +9 -9
- package/dist/collection/components/ez-text-input/ez-text-input.css +68 -60
- package/dist/collection/components/ez-text-input/ez-text-input.js +14 -38
- package/dist/collection/components/ez-time-input/ez-time-input.css +8 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +9 -9
- package/dist/collection/components/ez-toast/ez-toast.css +2 -2
- package/dist/collection/components/ez-upload/ez-upload.css +4 -1
- package/dist/collection/components/ez-upload/ez-upload.js +3 -3
- package/dist/custom-elements/index.js +198 -261
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-button_16.entry.js +133 -144
- package/dist/esm/ez-dialog.entry.js +7 -1
- package/dist/esm/ez-modal.entry.js +16 -69
- package/dist/esm/ez-number-input.entry.js +9 -9
- package/dist/esm/ez-popover.entry.js +13 -18
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +6 -6
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1bc9ddad.entry.js +1 -0
- package/dist/ezui/{p-4f4b8aae.entry.js → p-1c33a56d.entry.js} +1 -1
- package/dist/ezui/{p-d8a47f23.entry.js → p-74e4415e.entry.js} +1 -1
- package/dist/ezui/p-a7e23f65.entry.js +1 -0
- package/dist/ezui/p-a88ee12f.entry.js +1 -0
- package/dist/ezui/p-b692a0ab.entry.js +1 -0
- package/dist/ezui/p-b6e0fd3e.entry.js +1 -0
- package/dist/ezui/{p-7f528c19.entry.js → p-f7d7fb7f.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +1 -1
- package/dist/types/components/ez-button/ez-button.d.ts +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +3 -3
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +8 -8
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -2
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
- package/dist/types/components/ez-icon/ez-icon.d.ts +6 -0
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +1 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +9 -9
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +1 -1
- package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +3 -3
- package/dist/types/components/ez-popover/ez-popover.d.ts +4 -5
- package/dist/types/components/ez-popup/ez-popup.d.ts +3 -3
- package/dist/types/components/ez-search/ez-search.d.ts +3 -3
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +19 -10
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -4
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -8
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -2
- package/dist/types/components/ez-upload/ez-upload.d.ts +3 -3
- package/dist/types/components.d.ts +142 -114
- package/package.json +2 -1
- package/dist/ezui/p-7c7dbfcb.entry.js +0 -1
- package/dist/ezui/p-8c8f1c00.entry.js +0 -1
- package/dist/ezui/p-afc553a4.entry.js +0 -1
- package/dist/ezui/p-d185d7e8.entry.js +0 -1
- package/dist/ezui/p-ee5058c1.entry.js +0 -1
|
@@ -31,7 +31,7 @@ export class NumberInput {
|
|
|
31
31
|
this.checkNumberValidation = (valuePtBRorNumber) => {
|
|
32
32
|
try {
|
|
33
33
|
if (valuePtBRorNumber != "" && NumberUtils.format(valuePtBRorNumber, this.precision, this.prettyprecision) === "NaN") {
|
|
34
|
-
this.
|
|
34
|
+
this.errorMessage = `Valor não é um número válido`;
|
|
35
35
|
this.value = undefined;
|
|
36
36
|
this.strvalue = undefined;
|
|
37
37
|
if (this._inputElem) {
|
|
@@ -41,14 +41,14 @@ export class NumberInput {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
catch (err) {
|
|
44
|
-
this.
|
|
44
|
+
this.errorMessage = err.message;
|
|
45
45
|
return false;
|
|
46
46
|
}
|
|
47
47
|
return true;
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
showError() {
|
|
51
|
-
const hasError = typeof this.
|
|
51
|
+
const hasError = typeof this.errorMessage === 'string' && this.errorMessage !== '';
|
|
52
52
|
if (this._inputElem) {
|
|
53
53
|
if (hasError) {
|
|
54
54
|
this._inputElem.classList.add('hasError');
|
|
@@ -76,7 +76,7 @@ export class NumberInput {
|
|
|
76
76
|
if (isNaN(newValue) && newValue !== undefined) {
|
|
77
77
|
this.value = undefined;
|
|
78
78
|
this.strvalue = "";
|
|
79
|
-
this.
|
|
79
|
+
this.errorMessage = `Valor não é um número válido`;
|
|
80
80
|
this.adjustFloatingLabel();
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
@@ -122,7 +122,7 @@ export class NumberInput {
|
|
|
122
122
|
async handleFocusout() {
|
|
123
123
|
//Setting value and strvalue by stringinput
|
|
124
124
|
if (this._inputElem) {
|
|
125
|
-
this.
|
|
125
|
+
this.errorMessage = "";
|
|
126
126
|
if (this._inputElem.value !== "") {
|
|
127
127
|
this._inputElem.value = this.settingStrValueIntNumber(this._inputElem.value);
|
|
128
128
|
const value = NumberUtils.keepOnlyDecimalSeparator(this._inputElem.value, this.formatnumber.toUpperCase());
|
|
@@ -134,7 +134,7 @@ export class NumberInput {
|
|
|
134
134
|
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? NumberUtils.format(value, this.precision, this.prettyprecision) : NumberUtils.changeFormat(NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
135
135
|
}
|
|
136
136
|
catch (e) {
|
|
137
|
-
this.
|
|
137
|
+
this.errorMessage = e.message;
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -189,7 +189,7 @@ export class NumberInput {
|
|
|
189
189
|
this._inputElem.value = this.formatnumber.toUpperCase() !== "EN-US" ? NumberUtils.format(value, this.precision, this.prettyprecision) : NumberUtils.changeFormat(NumberUtils.format(value, this.precision, this.prettyprecision));
|
|
190
190
|
}
|
|
191
191
|
catch (e) {
|
|
192
|
-
this.
|
|
192
|
+
this.errorMessage = e.message;
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
this.strvalue = this._inputElem.value;
|
|
@@ -231,7 +231,7 @@ export class NumberInput {
|
|
|
231
231
|
labelInput,
|
|
232
232
|
h("input", { onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", value: this.strvalue, disabled: !this.enabled, onInput: this.handleChange.bind(this), onFocusout: this.handleFocusout.bind(this) }),
|
|
233
233
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
234
|
-
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.
|
|
234
|
+
h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el }, this.errorMessage)));
|
|
235
235
|
}
|
|
236
236
|
static get is() { return "ez-number-input"; }
|
|
237
237
|
static get encapsulation() { return "shadow"; }
|
|
@@ -311,7 +311,7 @@ export class NumberInput {
|
|
|
311
311
|
"reflect": true,
|
|
312
312
|
"defaultValue": "true"
|
|
313
313
|
},
|
|
314
|
-
"
|
|
314
|
+
"errorMessage": {
|
|
315
315
|
"type": "string",
|
|
316
316
|
"mutable": true,
|
|
317
317
|
"complexType": {
|
|
@@ -325,7 +325,7 @@ export class NumberInput {
|
|
|
325
325
|
"tags": [],
|
|
326
326
|
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
327
327
|
},
|
|
328
|
-
"attribute": "
|
|
328
|
+
"attribute": "error-message",
|
|
329
329
|
"reflect": true
|
|
330
330
|
},
|
|
331
331
|
"precision": {
|
|
@@ -467,7 +467,7 @@ export class NumberInput {
|
|
|
467
467
|
}; }
|
|
468
468
|
static get elementRef() { return "el"; }
|
|
469
469
|
static get watchers() { return [{
|
|
470
|
-
"propName": "
|
|
470
|
+
"propName": "errorMessage",
|
|
471
471
|
"methodName": "showError"
|
|
472
472
|
}, {
|
|
473
473
|
"propName": "precision",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
|
-
/*@doc Define a cor
|
|
4
|
+
/*@doc Define a cor de fundo do input.*/
|
|
5
5
|
--it__input--background-color: var(--background--medium, #e0e0e0);
|
|
6
6
|
/*@doc Define a cor da borda do input.*/
|
|
7
7
|
--it__input--border-color: var(--it__input--background-color);
|
|
@@ -11,7 +11,7 @@ export class EzNumericInput {
|
|
|
11
11
|
this._textInput.label = this.label;
|
|
12
12
|
}
|
|
13
13
|
setErrorMessage() {
|
|
14
|
-
this._textInput.
|
|
14
|
+
this._textInput.errorMessage = this.errorMessage;
|
|
15
15
|
}
|
|
16
16
|
applyValueToInput() {
|
|
17
17
|
if (this._textInput) {
|
|
@@ -19,7 +19,7 @@ export class EzNumericInput {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
changeValue(newValue) {
|
|
22
|
-
this._textInput.
|
|
22
|
+
this._textInput.errorMessage = "";
|
|
23
23
|
if (newValue !== this.value) {
|
|
24
24
|
this.value = newValue;
|
|
25
25
|
this.ezChange.emit();
|
|
@@ -28,7 +28,7 @@ export class EzNumericInput {
|
|
|
28
28
|
parseNumber() {
|
|
29
29
|
const parsedNumber = this._textInput.value ? NumberUtils.stringToNumber(this._textInput.value) : null;
|
|
30
30
|
if (parsedNumber != null && isNaN(parsedNumber)) {
|
|
31
|
-
this._textInput.
|
|
31
|
+
this._textInput.errorMessage = "O valor digitado não é um número válido";
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
this.changeValue(parsedNumber);
|
|
@@ -41,7 +41,7 @@ export class EzNumericInput {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled,
|
|
44
|
+
return (h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseNumber(), label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage }));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "ez-numeric-input"; }
|
|
47
47
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,7 @@ export class EzNumericInput {
|
|
|
64
64
|
"optional": false,
|
|
65
65
|
"docs": {
|
|
66
66
|
"tags": [],
|
|
67
|
-
"text": "
|
|
67
|
+
"text": "T\u00EDtulo do campo"
|
|
68
68
|
},
|
|
69
69
|
"attribute": "label",
|
|
70
70
|
"reflect": true
|
|
@@ -104,7 +104,7 @@ export class EzNumericInput {
|
|
|
104
104
|
"reflect": true,
|
|
105
105
|
"defaultValue": "true"
|
|
106
106
|
},
|
|
107
|
-
"
|
|
107
|
+
"errorMessage": {
|
|
108
108
|
"type": "string",
|
|
109
109
|
"mutable": true,
|
|
110
110
|
"complexType": {
|
|
@@ -118,7 +118,7 @@ export class EzNumericInput {
|
|
|
118
118
|
"tags": [],
|
|
119
119
|
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
120
120
|
},
|
|
121
|
-
"attribute": "
|
|
121
|
+
"attribute": "error-message",
|
|
122
122
|
"reflect": true
|
|
123
123
|
},
|
|
124
124
|
"precision": {
|
|
@@ -164,7 +164,7 @@ export class EzNumericInput {
|
|
|
164
164
|
"composed": true,
|
|
165
165
|
"docs": {
|
|
166
166
|
"tags": [],
|
|
167
|
-
"text": "
|
|
167
|
+
"text": "Evento disparado quando o estado do componente \u00E9 alterado (onEzChange)."
|
|
168
168
|
},
|
|
169
169
|
"complexType": {
|
|
170
170
|
"original": "string",
|
|
@@ -176,7 +176,7 @@ export class EzNumericInput {
|
|
|
176
176
|
"propName": "label",
|
|
177
177
|
"methodName": "setLabel"
|
|
178
178
|
}, {
|
|
179
|
-
"propName": "
|
|
179
|
+
"propName": "errorMessage",
|
|
180
180
|
"methodName": "setErrorMessage"
|
|
181
181
|
}, {
|
|
182
182
|
"propName": "value",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/* box */
|
|
4
4
|
/*@doc Define o raio da borda do popover.*/
|
|
5
|
-
--
|
|
5
|
+
--popover__box--border-radius: var(--border--radius-medium, 12px);
|
|
6
6
|
/*@doc Define a sombra do popover.*/
|
|
7
|
-
--
|
|
7
|
+
--popover__box--box-shadow: var(--shadow, 0px 0px 16px 0px #000);
|
|
8
8
|
|
|
9
9
|
/***************
|
|
10
10
|
host style
|
|
@@ -24,12 +24,11 @@
|
|
|
24
24
|
flex-direction: column;
|
|
25
25
|
|
|
26
26
|
height: fit-content;
|
|
27
|
-
/* width: fit-content; */
|
|
28
27
|
|
|
29
28
|
/*public*/
|
|
30
29
|
background-color: var(--background--xlight);
|
|
31
|
-
border-radius: var(--
|
|
32
|
-
box-shadow: var(--
|
|
30
|
+
border-radius: var(--popover__box--border-radius);
|
|
31
|
+
box-shadow: var(--popover__box--box-shadow);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
.box--fit-content {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component, h, Method, Element, Host, Prop, Event, Watch } from
|
|
2
|
-
import { FloatingManager } from
|
|
1
|
+
import { Component, h, Method, Element, Host, Prop, Event, Watch } from "@stencil/core";
|
|
2
|
+
import { FloatingManager } from "@sankhyalabs/core";
|
|
3
3
|
export class EzPopover {
|
|
4
4
|
constructor() {
|
|
5
5
|
this._firstRender = true;
|
|
@@ -7,28 +7,28 @@ export class EzPopover {
|
|
|
7
7
|
* No modo floating = false o popover só se tornará visível
|
|
8
8
|
* quando o método show() for acionado.
|
|
9
9
|
*/
|
|
10
|
-
this.
|
|
10
|
+
this.autoClose = true;
|
|
11
11
|
/**
|
|
12
12
|
* Offset top do popover em relação ao componente pai
|
|
13
13
|
*/
|
|
14
|
-
this.top =
|
|
14
|
+
this.top = "0px";
|
|
15
15
|
/**
|
|
16
16
|
* Offset left do popover em relação ao componente pai
|
|
17
17
|
*/
|
|
18
|
-
this.left =
|
|
18
|
+
this.left = "0px";
|
|
19
19
|
/**
|
|
20
20
|
* Offset bottom do popover em relação ao componente pai
|
|
21
21
|
*/
|
|
22
|
-
this.bottom =
|
|
22
|
+
this.bottom = "0px";
|
|
23
23
|
/**
|
|
24
24
|
* Offset right do popover em relação ao componente pai
|
|
25
25
|
*/
|
|
26
|
-
this.right =
|
|
26
|
+
this.right = "0px";
|
|
27
27
|
/**
|
|
28
28
|
* Ajusta o comportamento da largura do popover.
|
|
29
29
|
* Opções: "100% e "fit-content" (default)
|
|
30
30
|
*/
|
|
31
|
-
this.
|
|
31
|
+
this.boxWidth = "fit-content";
|
|
32
32
|
}
|
|
33
33
|
dispatchVisibilityChange(newValue, oldValue) {
|
|
34
34
|
if (newValue != oldValue) {
|
|
@@ -40,7 +40,7 @@ export class EzPopover {
|
|
|
40
40
|
*/
|
|
41
41
|
async updatePosition(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
42
42
|
const floatingOptions = {
|
|
43
|
-
autoClose: this.
|
|
43
|
+
autoClose: this.autoClose,
|
|
44
44
|
top,
|
|
45
45
|
left,
|
|
46
46
|
bottom,
|
|
@@ -52,8 +52,6 @@ export class EzPopover {
|
|
|
52
52
|
if (_container.shadowRoot && _container.shadowRoot.contains(node)) {
|
|
53
53
|
return true;
|
|
54
54
|
}
|
|
55
|
-
//Here: we pass this._box as parameter but we need to change to _host
|
|
56
|
-
//because we need to get the lasChild (inner content to put in slot)
|
|
57
55
|
_container = this._host;
|
|
58
56
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
59
57
|
}
|
|
@@ -62,11 +60,10 @@ export class EzPopover {
|
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
62
|
* Faz com que o popover seja renderizado na DOM.
|
|
65
|
-
*
|
|
66
63
|
*/
|
|
67
64
|
async show(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
|
|
68
65
|
const floatingOptions = {
|
|
69
|
-
autoClose: this.
|
|
66
|
+
autoClose: this.autoClose,
|
|
70
67
|
top,
|
|
71
68
|
left,
|
|
72
69
|
bottom,
|
|
@@ -78,14 +75,12 @@ export class EzPopover {
|
|
|
78
75
|
if (_container.shadowRoot && _container.shadowRoot.contains(node)) {
|
|
79
76
|
return true;
|
|
80
77
|
}
|
|
81
|
-
// Here: we pass this._box as parameter but we need to change to _host
|
|
82
|
-
// because we need to get the lasChild (inner content to put in slot)
|
|
83
78
|
_container = this._host;
|
|
84
79
|
return !_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node);
|
|
85
80
|
}
|
|
86
81
|
};
|
|
87
82
|
this._floatingID = FloatingManager.float(this._box, this._container, floatingOptions);
|
|
88
|
-
this.
|
|
83
|
+
this.opened = true;
|
|
89
84
|
}
|
|
90
85
|
/**
|
|
91
86
|
* Usado no modo floating. Faz com que o componente seja ocultado.
|
|
@@ -94,7 +89,7 @@ export class EzPopover {
|
|
|
94
89
|
if (this._floatingID !== undefined) {
|
|
95
90
|
FloatingManager.close(this._floatingID);
|
|
96
91
|
this._floatingID = undefined;
|
|
97
|
-
this.
|
|
92
|
+
this.opened = false;
|
|
98
93
|
}
|
|
99
94
|
}
|
|
100
95
|
componentDidRender() {
|
|
@@ -106,7 +101,7 @@ export class EzPopover {
|
|
|
106
101
|
render() {
|
|
107
102
|
return (h(Host, null,
|
|
108
103
|
h("section", { ref: el => this._container = el },
|
|
109
|
-
h("div", { class: `box ${this.
|
|
104
|
+
h("div", { class: `box ${this.boxWidth === "fit-content" ? "box--fit-content" : "box--full-width"}`, ref: el => this._box = el },
|
|
110
105
|
h("slot", null)))));
|
|
111
106
|
}
|
|
112
107
|
static get is() { return "ez-popover"; }
|
|
@@ -118,7 +113,7 @@ export class EzPopover {
|
|
|
118
113
|
"$": ["ez-popover.css"]
|
|
119
114
|
}; }
|
|
120
115
|
static get properties() { return {
|
|
121
|
-
"
|
|
116
|
+
"autoClose": {
|
|
122
117
|
"type": "boolean",
|
|
123
118
|
"mutable": false,
|
|
124
119
|
"complexType": {
|
|
@@ -132,7 +127,7 @@ export class EzPopover {
|
|
|
132
127
|
"tags": [],
|
|
133
128
|
"text": "No modo floating = false o popover s\u00F3 se tornar\u00E1 vis\u00EDvel\nquando o m\u00E9todo show() for acionado."
|
|
134
129
|
},
|
|
135
|
-
"attribute": "
|
|
130
|
+
"attribute": "auto-close",
|
|
136
131
|
"reflect": true,
|
|
137
132
|
"defaultValue": "true"
|
|
138
133
|
},
|
|
@@ -152,7 +147,7 @@ export class EzPopover {
|
|
|
152
147
|
},
|
|
153
148
|
"attribute": "top",
|
|
154
149
|
"reflect": true,
|
|
155
|
-
"defaultValue": "
|
|
150
|
+
"defaultValue": "\"0px\""
|
|
156
151
|
},
|
|
157
152
|
"left": {
|
|
158
153
|
"type": "string",
|
|
@@ -170,7 +165,7 @@ export class EzPopover {
|
|
|
170
165
|
},
|
|
171
166
|
"attribute": "left",
|
|
172
167
|
"reflect": true,
|
|
173
|
-
"defaultValue": "
|
|
168
|
+
"defaultValue": "\"0px\""
|
|
174
169
|
},
|
|
175
170
|
"bottom": {
|
|
176
171
|
"type": "string",
|
|
@@ -188,7 +183,7 @@ export class EzPopover {
|
|
|
188
183
|
},
|
|
189
184
|
"attribute": "bottom",
|
|
190
185
|
"reflect": true,
|
|
191
|
-
"defaultValue": "
|
|
186
|
+
"defaultValue": "\"0px\""
|
|
192
187
|
},
|
|
193
188
|
"right": {
|
|
194
189
|
"type": "string",
|
|
@@ -206,9 +201,9 @@ export class EzPopover {
|
|
|
206
201
|
},
|
|
207
202
|
"attribute": "right",
|
|
208
203
|
"reflect": true,
|
|
209
|
-
"defaultValue": "
|
|
204
|
+
"defaultValue": "\"0px\""
|
|
210
205
|
},
|
|
211
|
-
"
|
|
206
|
+
"boxWidth": {
|
|
212
207
|
"type": "string",
|
|
213
208
|
"mutable": false,
|
|
214
209
|
"complexType": {
|
|
@@ -222,11 +217,11 @@ export class EzPopover {
|
|
|
222
217
|
"tags": [],
|
|
223
218
|
"text": "Ajusta o comportamento da largura do popover.\nOp\u00E7\u00F5es: \"100% e \"fit-content\" (default)"
|
|
224
219
|
},
|
|
225
|
-
"attribute": "
|
|
220
|
+
"attribute": "box-width",
|
|
226
221
|
"reflect": true,
|
|
227
|
-
"defaultValue": "
|
|
222
|
+
"defaultValue": "\"fit-content\""
|
|
228
223
|
},
|
|
229
|
-
"
|
|
224
|
+
"opened": {
|
|
230
225
|
"type": "boolean",
|
|
231
226
|
"mutable": true,
|
|
232
227
|
"complexType": {
|
|
@@ -240,7 +235,7 @@ export class EzPopover {
|
|
|
240
235
|
"tags": [],
|
|
241
236
|
"text": "Externaliza estado atual do componente."
|
|
242
237
|
},
|
|
243
|
-
"attribute": "
|
|
238
|
+
"attribute": "opened",
|
|
244
239
|
"reflect": true
|
|
245
240
|
}
|
|
246
241
|
}; }
|
|
@@ -342,7 +337,7 @@ export class EzPopover {
|
|
|
342
337
|
}; }
|
|
343
338
|
static get elementRef() { return "_host"; }
|
|
344
339
|
static get watchers() { return [{
|
|
345
|
-
"propName": "
|
|
340
|
+
"propName": "opened",
|
|
346
341
|
"methodName": "dispatchVisibilityChange"
|
|
347
342
|
}]; }
|
|
348
343
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: flex;
|
|
3
3
|
/* General */
|
|
4
|
-
/*@doc Define a camada que o componente será exibido.*/
|
|
4
|
+
/*@doc Define a camada em que o componente será exibido.*/
|
|
5
5
|
--popup-z-index: var(--most-visible, 3);
|
|
6
6
|
|
|
7
7
|
/* Popup */
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
--popup__title--font-weight: var(--text-weight--large, 600);
|
|
26
26
|
|
|
27
27
|
/* Buttons */
|
|
28
|
-
/* @doc Define a cor
|
|
29
|
-
--popup__btn__close--
|
|
28
|
+
/* @doc Define a cor do ícone do botão de fechamento. */
|
|
29
|
+
--popup__btn__close--icon-color: var(--title--primary, #2b3a54);
|
|
30
30
|
/* @doc Contém o ícone do botão de fechamento. */
|
|
31
|
-
--popup__btn__close--
|
|
31
|
+
--popup__btn__close--icon: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>');
|
|
32
32
|
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
.btn-close::after {
|
|
119
119
|
content: '';
|
|
120
120
|
display: flex;
|
|
121
|
-
background-color: var(--popup__btn__close--
|
|
121
|
+
background-color: var(--popup__btn__close--icon-color);
|
|
122
122
|
width: 14px;
|
|
123
123
|
height: 14px;
|
|
124
|
-
-webkit-mask-image: var(--popup__btn__close--
|
|
125
|
-
mask-image: var(--popup__btn__close--
|
|
124
|
+
-webkit-mask-image: var(--popup__btn__close--icon);
|
|
125
|
+
mask-image: var(--popup__btn__close--icon);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.btn-close--solo {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Event } from
|
|
1
|
+
import { Component, Host, h, Prop, Event } from "@stencil/core";
|
|
2
2
|
export class EzPopup {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.sizeClasses = {
|
|
@@ -18,7 +18,7 @@ export class EzPopup {
|
|
|
18
18
|
*/
|
|
19
19
|
this.opened = false;
|
|
20
20
|
/**
|
|
21
|
-
* Define o componente utilizará um cabeçalho com botão de fechamento.
|
|
21
|
+
* Define se o componente utilizará um cabeçalho com botão de fechamento.
|
|
22
22
|
*/
|
|
23
23
|
this.useHeader = false;
|
|
24
24
|
}
|
|
@@ -99,7 +99,7 @@ export class EzPopup {
|
|
|
99
99
|
"optional": false,
|
|
100
100
|
"docs": {
|
|
101
101
|
"tags": [],
|
|
102
|
-
"text": "Define o componente utilizar\u00E1 um cabe\u00E7alho com bot\u00E3o de fechamento."
|
|
102
|
+
"text": "Define se o componente utilizar\u00E1 um cabe\u00E7alho com bot\u00E3o de fechamento."
|
|
103
103
|
},
|
|
104
104
|
"attribute": "use-header",
|
|
105
105
|
"reflect": true,
|
|
@@ -117,7 +117,7 @@ export class EzPopup {
|
|
|
117
117
|
"optional": false,
|
|
118
118
|
"docs": {
|
|
119
119
|
"tags": [],
|
|
120
|
-
"text": "
|
|
120
|
+
"text": "T\u00EDtulo do componente."
|
|
121
121
|
},
|
|
122
122
|
"attribute": "ez-title",
|
|
123
123
|
"reflect": false
|
|
@@ -25,7 +25,7 @@ export class EzSearch {
|
|
|
25
25
|
this.ezChange.emit(evt.detail);
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled,
|
|
28
|
+
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionloader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showselectedvalue, showOptionValue: this.showoptionvalue }));
|
|
29
29
|
}
|
|
30
30
|
;
|
|
31
31
|
static get is() { return "ez-search"; }
|
|
@@ -71,7 +71,7 @@ export class EzSearch {
|
|
|
71
71
|
"optional": false,
|
|
72
72
|
"docs": {
|
|
73
73
|
"tags": [],
|
|
74
|
-
"text": "
|
|
74
|
+
"text": "T\u00EDtulo do campo"
|
|
75
75
|
},
|
|
76
76
|
"attribute": "label",
|
|
77
77
|
"reflect": true
|
|
@@ -94,7 +94,7 @@ export class EzSearch {
|
|
|
94
94
|
"reflect": true,
|
|
95
95
|
"defaultValue": "true"
|
|
96
96
|
},
|
|
97
|
-
"
|
|
97
|
+
"errorMessage": {
|
|
98
98
|
"type": "string",
|
|
99
99
|
"mutable": true,
|
|
100
100
|
"complexType": {
|
|
@@ -108,7 +108,7 @@ export class EzSearch {
|
|
|
108
108
|
"tags": [],
|
|
109
109
|
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
110
110
|
},
|
|
111
|
-
"attribute": "
|
|
111
|
+
"attribute": "error-message",
|
|
112
112
|
"reflect": true
|
|
113
113
|
},
|
|
114
114
|
"optionloader": {
|
|
@@ -195,7 +195,7 @@ export class EzSearch {
|
|
|
195
195
|
"composed": true,
|
|
196
196
|
"docs": {
|
|
197
197
|
"tags": [],
|
|
198
|
-
"text": "
|
|
198
|
+
"text": "Evento emitido ao clicar para abrir o popup"
|
|
199
199
|
},
|
|
200
200
|
"complexType": {
|
|
201
201
|
"original": "any",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
margin-bottom: var(--space--large, 24px);
|
|
17
17
|
/* @doc Define a sombra do box da aba. */
|
|
18
|
-
/* --
|
|
18
|
+
/* --tabselector__box--box-shadow: var(--shadow, 0px 0px 8px 0px #000); */
|
|
19
19
|
/*@doc Contém o ícone de voltar para a aba anterior.*/
|
|
20
|
-
--
|
|
20
|
+
--tabselector--backward-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>');
|
|
21
21
|
/*@doc Contém o ícone de avançar para a aba posterior.*/
|
|
22
|
-
--
|
|
22
|
+
--tabselector--forward-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>');
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.scroll {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
background-color: unset;
|
|
50
50
|
cursor: pointer;
|
|
51
51
|
padding: 6px 12px;
|
|
52
|
-
/*FIXME: Oza - precisamos usar tokens?*/
|
|
53
52
|
align-items: center;
|
|
54
53
|
justify-content: center;
|
|
55
54
|
color: var(--text--primary, #626e82);
|
|
@@ -78,8 +77,6 @@
|
|
|
78
77
|
|
|
79
78
|
.is-focused {
|
|
80
79
|
border: 1px dashed var(--color--primary, #000000c5);
|
|
81
|
-
/* border-radius: 5px 5px 0px 0px; */
|
|
82
|
-
/* box-shadow: var(--tab__box--box-shadow); */
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
.tab-label {
|
|
@@ -120,13 +117,13 @@
|
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
.forward-button::after {
|
|
123
|
-
-webkit-mask-image: var(--
|
|
124
|
-
mask-image: var(--
|
|
120
|
+
-webkit-mask-image: var(--tabselector--forward-icon);
|
|
121
|
+
mask-image: var(--tabselector--forward-icon);
|
|
125
122
|
}
|
|
126
123
|
|
|
127
124
|
.backward-button::after {
|
|
128
|
-
-webkit-mask-image: var(--
|
|
129
|
-
mask-image: var(--
|
|
125
|
+
-webkit-mask-image: var(--tabselector--backward-icon);
|
|
126
|
+
mask-image: var(--tabselector--backward-icon);
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
.forward-button:hover::after, .backward-button:hover::after {
|