@sankhyalabs/ezui 1.1.68 → 1.1.71
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 +97 -97
- package/dist/cjs/ez-dialog.cjs.entry.js +7 -1
- package/dist/cjs/ez-modal.cjs.entry.js +16 -69
- package/dist/cjs/ez-popover.cjs.entry.js +13 -18
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- 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 +11 -6
- package/dist/collection/components/ez-button/ez-button.js +4 -1
- package/dist/collection/components/ez-calendar/ez-calendar.css +2 -2
- package/dist/collection/components/ez-check/ez-check.js +6 -6
- 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 +36 -37
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -1
- 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/FormSheet.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.js +2 -2
- 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-numeric-input/ez-numeric-input.css +1 -1
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +2 -2
- 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 +3 -3
- 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 +4 -4
- package/dist/collection/components/ez-text-input/ez-text-input.css +8 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +3 -3
- package/dist/collection/components/ez-time-input/ez-time-input.css +8 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +1 -1
- 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 +140 -192
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-button_16.entry.js +97 -97
- package/dist/esm/ez-dialog.entry.js +7 -1
- package/dist/esm/ez-modal.entry.js +16 -69
- package/dist/esm/ez-popover.entry.js +13 -18
- package/dist/esm/ez-popup.entry.js +2 -2
- 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-5aa8871e.entry.js +1 -0
- 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/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 +7 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -1
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
- package/dist/types/components/ez-icon/ez-icon.d.ts +1 -1
- 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-numeric-input/ez-numeric-input.d.ts +2 -2
- 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 +2 -2
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +19 -10
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +3 -3
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +3 -3
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +1 -1
- package/dist/types/components/ez-upload/ez-upload.d.ts +3 -3
- package/dist/types/components.d.ts +116 -92
- package/package.json +1 -1
- package/dist/ezui/p-7c7dbfcb.entry.js +0 -1
- package/dist/ezui/p-7d066b1c.entry.js +0 -1
- package/dist/ezui/p-8c8f1c00.entry.js +0 -1
- package/dist/ezui/p-d185d7e8.entry.js +0 -1
- package/dist/ezui/p-ee5058c1.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Prop, Method, Event, forceUpdate } from
|
|
1
|
+
import { Component, h, Prop, Method, Event, forceUpdate } from "@stencil/core";
|
|
2
2
|
class Message {
|
|
3
3
|
constructor(title, message, critical, confirm, icon, callBack) {
|
|
4
4
|
this.title = title;
|
|
@@ -25,6 +25,9 @@ export class EzDialog {
|
|
|
25
25
|
this.opened = false;
|
|
26
26
|
this._messageQueue = [];
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Lida com o clique nos botões de dentro do componente.
|
|
30
|
+
*/
|
|
28
31
|
async handleButtonClick(selectedOption) {
|
|
29
32
|
this.opened = this._messageQueue.length > 0;
|
|
30
33
|
if (this._currentMessage.callBack) {
|
|
@@ -36,6 +39,9 @@ export class EzDialog {
|
|
|
36
39
|
this._currentMessage = this._messageQueue.shift();
|
|
37
40
|
forceUpdate(this);
|
|
38
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Faz com que o componente seja exibido.
|
|
44
|
+
*/
|
|
39
45
|
async show(title, message, critical, confirm, icon) {
|
|
40
46
|
this.opened = true;
|
|
41
47
|
return new Promise(resolve => {
|
|
@@ -175,7 +181,7 @@ export class EzDialog {
|
|
|
175
181
|
"optional": false,
|
|
176
182
|
"docs": {
|
|
177
183
|
"tags": [],
|
|
178
|
-
"text": "Define o \u00EDcone a ser exibido ao lado do t\u00EDtulo do"
|
|
184
|
+
"text": "Define o \u00EDcone a ser exibido ao lado do t\u00EDtulo do componente"
|
|
179
185
|
},
|
|
180
186
|
"attribute": "personalized-icon-path",
|
|
181
187
|
"reflect": false
|
|
@@ -245,7 +251,7 @@ export class EzDialog {
|
|
|
245
251
|
"return": "Promise<void>"
|
|
246
252
|
},
|
|
247
253
|
"docs": {
|
|
248
|
-
"text": "",
|
|
254
|
+
"text": "Lida com o clique nos bot\u00F5es de dentro do componente.",
|
|
249
255
|
"tags": []
|
|
250
256
|
}
|
|
251
257
|
},
|
|
@@ -276,7 +282,7 @@ export class EzDialog {
|
|
|
276
282
|
"return": "Promise<boolean>"
|
|
277
283
|
},
|
|
278
284
|
"docs": {
|
|
279
|
-
"text": "",
|
|
285
|
+
"text": "Faz com que o componente seja exibido.",
|
|
280
286
|
"tags": []
|
|
281
287
|
}
|
|
282
288
|
}
|
|
@@ -33,7 +33,7 @@ export const FormSheet = ({ store, parentName, source, parentDataUnit, dataUnitB
|
|
|
33
33
|
buttons.previousVisible = false;
|
|
34
34
|
}
|
|
35
35
|
return h("div", { class: "form-sheet" },
|
|
36
|
-
tabs ? h("ez-tabselector", {
|
|
36
|
+
tabs ? h("ez-tabselector", { selectedIndex: selectedTab, selectedTab: name, onChange: (evt) => changeTabHandler(evt.target.selectedindex) }, tabs) : null,
|
|
37
37
|
dataUnit ? h(NavigationBar, { enabled: enabled, dataUnit: dataUnit, buttonProps: buttons }) : null,
|
|
38
38
|
h("div", { class: "tab__container" },
|
|
39
39
|
items ? items.map(item => buildFormItem(item, name, store, currentDU, enabled)) : null,
|
|
@@ -2,7 +2,7 @@ import { Component, h, Host, Prop } from '@stencil/core';
|
|
|
2
2
|
export class EzIcon {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
|
-
* Tamanho do
|
|
5
|
+
* Tamanho do ícone
|
|
6
6
|
*/
|
|
7
7
|
this.size = 'medium';
|
|
8
8
|
}
|
|
@@ -38,7 +38,7 @@ export class EzIcon {
|
|
|
38
38
|
"optional": false,
|
|
39
39
|
"docs": {
|
|
40
40
|
"tags": [],
|
|
41
|
-
"text": "Tamanho do
|
|
41
|
+
"text": "Tamanho do \u00EDcone"
|
|
42
42
|
},
|
|
43
43
|
"attribute": "size",
|
|
44
44
|
"reflect": true,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--lc__label__container--border: 1px solid;
|
|
23
23
|
/*@doc Define a cor da borda do container.*/
|
|
24
24
|
--lc__label__container--border-color-strokes: var(--color--strokes, #DCE0E8);
|
|
25
|
-
/*@doc Define a cor do texto, do ícone do label (quando o chip está ativo)
|
|
25
|
+
/*@doc Define a cor do texto, do ícone do label e do botão de remoção (quando o chip está ativo).*/
|
|
26
26
|
--lc__label__container--color-primary: var(--color--primary, #008561);
|
|
27
27
|
/*@doc Define a cor da borda e do fundo quando o chip está desativado.*/
|
|
28
28
|
--lc__label__container-color--disable-secondary: var(--color--disable-secondary, #F2F5F8);
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
--lc__label__container--text--disabled: var(--text--disable, #AFB6C0);
|
|
39
39
|
|
|
40
40
|
/* Buttons */
|
|
41
|
+
/* @doc Contém o ícone do botão de fechamento. */
|
|
41
42
|
--lc__btn__close--image: url('data:image/svg+xml;utf8,<svg width="8" height="8" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg"><path d="M 4.7098145,3.9968334 7.8535703,0.85318776 C 7.9473034,0.75946455 8,0.63233985 8,0.49978585 8,0.36723841 7.947304,0.24011361 7.8535703,0.14638378 7.7598354,0.05266059 7.6327257,6.48e-8 7.500152,6.48e-8 7.3676457,6.48e-8 7.2404691,0.0526608 7.1467354,0.14638378 L 4.00298,3.2900293 0.8591984,0.14638378 C 0.76546463,0.05266059 0.63834103,6.48e-8 0.50578123,6.48e-8 0.3732281,6.48e-8 0.24609783,0.05266059 0.15236397,0.14638378 0.05863012,0.24011361 0.00597395,0.36723841 0.00597395,0.49978585 c 0,0.132554 0.05265617,0.2596787 0.14639002,0.35340191 L 3.2961455,3.9968334 0.15236397,7.1411589 C 0.10466427,7.1872561 0.06663114,7.2424161 0.04046961,7.303371 0.01431473,7.3643212 5.6180845e-4,7.429943 1.6859246e-5,7.4962264 -5.2808998e-4,7.5625744 0.01214297,7.6283944 0.03729854,7.6897476 c 0.02514888,0.061416 0.06227604,0.1171794 0.1092096,0.1640783 0.0469402,0.046903 0.10274083,0.083936 0.16415749,0.1090508 0.0614166,0.025114 0.12721688,0.037703 0.19355667,0.037103 0.06634,-5.714e-4 0.13190027,-0.014457 0.19284393,-0.04064 0.0609507,-0.026246 0.11606474,-0.064351 0.16213217,-0.1120492 L 4.00298,4.7036374 7.1467354,7.8472967 c 0.093734,0.09373 0.2209103,0.1463572 0.3534166,0.1463572 0.1325737,0 0.2596834,-0.052623 0.3534183,-0.1463572 C 7.9473034,7.753567 8,7.6264624 8,7.493895 8,7.3613281 7.9473086,7.2342224 7.8535703,7.1404927 Z"/></svg>');
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
/*@doc Define a camada que o componente será exibido.*/
|
|
2
|
+
/*@doc Define a camada em que o componente será exibido.*/
|
|
3
3
|
--modal-z-index: var(--most-visible, 3);
|
|
4
4
|
/*@doc Define o espaçamento vertical do conteúdo do modal.*/
|
|
5
5
|
--modal-vertical-padding: var(--space--large, 24px);
|
|
@@ -1,104 +1,51 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Watch, Event } from
|
|
1
|
+
import { Component, Host, h, Prop, Watch, Event } from "@stencil/core";
|
|
2
2
|
export class EzModal {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
5
|
* Controle de exibição do Modal
|
|
6
6
|
*/
|
|
7
|
-
this.
|
|
7
|
+
this.opened = true;
|
|
8
8
|
/**
|
|
9
|
-
* Define se o modal será fechado ao
|
|
9
|
+
* Define se o modal será fechado ao clicar ESC
|
|
10
10
|
*/
|
|
11
|
-
this.
|
|
11
|
+
this.closeEsc = false;
|
|
12
12
|
/**
|
|
13
13
|
* Define se o modal será fechado ao clicar fora do conteúdo.
|
|
14
14
|
*/
|
|
15
|
-
this.
|
|
15
|
+
this.closeOutsideClick = false;
|
|
16
16
|
this.handleKeyboardEvent = (ev) => {
|
|
17
|
-
if ((ev === null || ev === void 0 ? void 0 : ev.key) ===
|
|
17
|
+
if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
|
|
18
18
|
this.closeModal();
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// this.oppened = false;
|
|
26
|
-
// this.ezChange.emit(this.oppened);
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
handleOppenedChange() {
|
|
30
|
-
if (this.oppened) {
|
|
31
|
-
document.addEventListener('keydown', this.handleKeyboardEvent);
|
|
22
|
+
handleopenedChange() {
|
|
23
|
+
if (this.opened) {
|
|
24
|
+
document.addEventListener("keydown", this.handleKeyboardEvent);
|
|
32
25
|
}
|
|
33
26
|
else {
|
|
34
|
-
document.removeEventListener(
|
|
27
|
+
document.removeEventListener("keydown", this.handleKeyboardEvent);
|
|
35
28
|
}
|
|
36
29
|
}
|
|
37
30
|
closeModal() {
|
|
38
|
-
this.
|
|
39
|
-
this.ezCloseModal.emit(this.
|
|
31
|
+
this.opened = false;
|
|
32
|
+
this.ezCloseModal.emit(this.opened);
|
|
40
33
|
}
|
|
41
|
-
///////
|
|
42
|
-
// trapTabKey(e) {
|
|
43
|
-
// // Check for TAB key press
|
|
44
|
-
// if (e.keyCode === 9) {
|
|
45
|
-
// // SHIFT + TAB
|
|
46
|
-
// if (e.shiftKey) {
|
|
47
|
-
// if (document.activeElement === this._firstTabStop) {
|
|
48
|
-
// e.preventDefault();
|
|
49
|
-
// this._lastTabStop.focus();
|
|
50
|
-
// }
|
|
51
|
-
// // TAB
|
|
52
|
-
// } else {
|
|
53
|
-
// if (document.activeElement === this._lastTabStop) {
|
|
54
|
-
// e.preventDefault();
|
|
55
|
-
// this._firstTabStop.focus();
|
|
56
|
-
// }
|
|
57
|
-
// }
|
|
58
|
-
// }
|
|
59
|
-
// if (e.keyCode === 27) {
|
|
60
|
-
// this.closeModal();
|
|
61
|
-
// }
|
|
62
|
-
// }
|
|
63
|
-
// closeModal() {
|
|
64
|
-
// this.oppened = false;
|
|
65
|
-
// this._focusedElementBeforeModal.focus();
|
|
66
|
-
// }
|
|
67
|
-
// componentDidLoad() {
|
|
68
|
-
// this._overlay.addEventListener('keydown', (ev) => { this.trapTabKey(ev) });
|
|
69
|
-
// // Save current focus
|
|
70
|
-
// this._focusedElementBeforeModal = document.activeElement;
|
|
71
|
-
// // Find all focusable children
|
|
72
|
-
// var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]';
|
|
73
|
-
// var focusableElements = this._modalContainer.querySelectorAll(focusableElementsString);
|
|
74
|
-
// // Convert NodeList to Array
|
|
75
|
-
// focusableElements = Array.prototype.slice.call(focusableElements);
|
|
76
|
-
// this._firstTabStop = focusableElements[0];
|
|
77
|
-
// this._lastTabStop = focusableElements[focusableElements.length - 1];
|
|
78
|
-
// // Focus first child
|
|
79
|
-
// this._firstTabStop.focus();
|
|
80
|
-
// }
|
|
81
|
-
// componentDidUpdate() {
|
|
82
|
-
// var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]';
|
|
83
|
-
// var focusableElements = this._modalContainer.querySelectorAll(focusableElementsString);
|
|
84
|
-
// }
|
|
85
|
-
/////
|
|
86
34
|
componentDidLoad() {
|
|
87
|
-
this.
|
|
35
|
+
this.handleopenedChange();
|
|
88
36
|
}
|
|
89
37
|
onMouseDownHandler(event) {
|
|
90
|
-
if (this.
|
|
38
|
+
if (this.closeOutsideClick && event.target === this._overlay) {
|
|
91
39
|
this.closeModal();
|
|
92
40
|
}
|
|
93
41
|
}
|
|
94
|
-
//Ainda teremos ajustes visuais
|
|
95
42
|
render() {
|
|
96
43
|
const positionSufix = this.align === "left" ? "left" : "right";
|
|
97
|
-
return (h(Host, null, this.
|
|
44
|
+
return (h(Host, null, this.opened
|
|
98
45
|
?
|
|
99
|
-
h("div", { class:
|
|
46
|
+
h("div", { class: "modal", onMouseDown: evt => this.onMouseDownHandler(evt) },
|
|
100
47
|
h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref },
|
|
101
|
-
h("div", { class: `modal__content modal__content--${positionSufix} ${this.
|
|
48
|
+
h("div", { class: `modal__content modal__content--${positionSufix} ${this.modalSize}` },
|
|
102
49
|
h("slot", null))))
|
|
103
50
|
:
|
|
104
51
|
undefined));
|
|
@@ -112,7 +59,7 @@ export class EzModal {
|
|
|
112
59
|
"$": ["ez-modal.css"]
|
|
113
60
|
}; }
|
|
114
61
|
static get properties() { return {
|
|
115
|
-
"
|
|
62
|
+
"modalSize": {
|
|
116
63
|
"type": "string",
|
|
117
64
|
"mutable": false,
|
|
118
65
|
"complexType": {
|
|
@@ -124,9 +71,9 @@ export class EzModal {
|
|
|
124
71
|
"optional": false,
|
|
125
72
|
"docs": {
|
|
126
73
|
"tags": [],
|
|
127
|
-
"text": "Define o tamanho do modal
|
|
74
|
+
"text": "Define o tamanho do modal. Devem ser utilizados os tamanhos definidos de colunas como \"col-sd-3\""
|
|
128
75
|
},
|
|
129
|
-
"attribute": "
|
|
76
|
+
"attribute": "modal-size",
|
|
130
77
|
"reflect": false
|
|
131
78
|
},
|
|
132
79
|
"align": {
|
|
@@ -141,12 +88,12 @@ export class EzModal {
|
|
|
141
88
|
"optional": false,
|
|
142
89
|
"docs": {
|
|
143
90
|
"tags": [],
|
|
144
|
-
"text": "Define o alinhamento do modal
|
|
91
|
+
"text": "Define o alinhamento do modal. Seus valores podem ser \"right\" ou \"left\""
|
|
145
92
|
},
|
|
146
93
|
"attribute": "align",
|
|
147
94
|
"reflect": false
|
|
148
95
|
},
|
|
149
|
-
"
|
|
96
|
+
"opened": {
|
|
150
97
|
"type": "boolean",
|
|
151
98
|
"mutable": false,
|
|
152
99
|
"complexType": {
|
|
@@ -160,11 +107,11 @@ export class EzModal {
|
|
|
160
107
|
"tags": [],
|
|
161
108
|
"text": "Controle de exibi\u00E7\u00E3o do Modal"
|
|
162
109
|
},
|
|
163
|
-
"attribute": "
|
|
110
|
+
"attribute": "opened",
|
|
164
111
|
"reflect": false,
|
|
165
112
|
"defaultValue": "true"
|
|
166
113
|
},
|
|
167
|
-
"
|
|
114
|
+
"closeEsc": {
|
|
168
115
|
"type": "boolean",
|
|
169
116
|
"mutable": false,
|
|
170
117
|
"complexType": {
|
|
@@ -176,13 +123,13 @@ export class EzModal {
|
|
|
176
123
|
"optional": false,
|
|
177
124
|
"docs": {
|
|
178
125
|
"tags": [],
|
|
179
|
-
"text": "Define se o modal ser\u00E1 fechado ao
|
|
126
|
+
"text": "Define se o modal ser\u00E1 fechado ao clicar ESC"
|
|
180
127
|
},
|
|
181
|
-
"attribute": "
|
|
128
|
+
"attribute": "close-esc",
|
|
182
129
|
"reflect": false,
|
|
183
130
|
"defaultValue": "false"
|
|
184
131
|
},
|
|
185
|
-
"
|
|
132
|
+
"closeOutsideClick": {
|
|
186
133
|
"type": "boolean",
|
|
187
134
|
"mutable": false,
|
|
188
135
|
"complexType": {
|
|
@@ -196,7 +143,7 @@ export class EzModal {
|
|
|
196
143
|
"tags": [],
|
|
197
144
|
"text": "Define se o modal ser\u00E1 fechado ao clicar fora do conte\u00FAdo."
|
|
198
145
|
},
|
|
199
|
-
"attribute": "
|
|
146
|
+
"attribute": "close-outside-click",
|
|
200
147
|
"reflect": false,
|
|
201
148
|
"defaultValue": "false"
|
|
202
149
|
}
|
|
@@ -218,7 +165,7 @@ export class EzModal {
|
|
|
218
165
|
}
|
|
219
166
|
}]; }
|
|
220
167
|
static get watchers() { return [{
|
|
221
|
-
"propName": "
|
|
222
|
-
"methodName": "
|
|
168
|
+
"propName": "opened",
|
|
169
|
+
"methodName": "handleopenedChange"
|
|
223
170
|
}]; }
|
|
224
171
|
}
|
|
@@ -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);
|
|
@@ -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
|
|
@@ -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",
|
|
@@ -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
|