@sankhyalabs/ezui 1.1.127 → 1.1.130
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-button.cjs.entry.js +10 -12
- package/dist/cjs/ez-calendar.cjs.entry.js +8 -8
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -4
- package/dist/cjs/ez-combo-box.cjs.entry.js +9 -9
- package/dist/cjs/ez-form.cjs.entry.js +12 -12
- package/dist/cjs/ez-grid.cjs.entry.js +4 -4
- package/dist/cjs/ez-tabselector.cjs.entry.js +2 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/grid-config.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select-box.cjs.entry.js +1 -1
- package/dist/collection/components/ez-button/ez-button.css +73 -28
- package/dist/collection/components/ez-button/ez-button.js +15 -18
- package/dist/collection/components/ez-calendar/ez-calendar.css +2 -1
- package/dist/collection/components/ez-calendar/ez-calendar.js +7 -7
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +8 -8
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +17 -64
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +11 -9
- package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +3 -3
- package/dist/collection/components/ez-form/fieldbuilder/tpl/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextArea.tpl.js +1 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheet.js +2 -2
- package/dist/collection/components/ez-grid/ez-grid.js +7 -7
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +1 -1
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +1 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +1 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +1 -1
- package/dist/custom-elements/index.js +51 -53
- package/dist/esm/ez-button.entry.js +10 -12
- package/dist/esm/ez-calendar.entry.js +8 -8
- package/dist/esm/ez-collapsible-box.entry.js +4 -4
- package/dist/esm/ez-combo-box.entry.js +9 -9
- package/dist/esm/ez-form.entry.js +12 -12
- package/dist/esm/ez-grid.entry.js +4 -4
- package/dist/esm/ez-tabselector.entry.js +2 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/grid-config.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select-box.entry.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-27db8fba.entry.js +1 -0
- package/dist/ezui/{p-248d8511.entry.js → p-2d165ca8.entry.js} +1 -1
- package/dist/ezui/p-47fe4273.entry.js +1 -0
- package/dist/ezui/p-593a17e7.entry.js +1 -0
- package/dist/ezui/p-5b7405e8.entry.js +1 -0
- package/dist/ezui/p-66adbed5.entry.js +1 -0
- package/dist/ezui/{p-b59ab2d5.entry.js → p-6d39b7ea.entry.js} +1 -1
- package/dist/ezui/p-6e844308.entry.js +1 -0
- package/dist/ezui/p-ef17f443.entry.js +1 -0
- package/dist/types/components/ez-button/ez-button.d.ts +3 -3
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -3
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +2 -1
- package/dist/types/components.d.ts +12 -12
- package/package.json +1 -1
- package/dist/ezui/p-1c28d99b.entry.js +0 -1
- package/dist/ezui/p-35edc488.entry.js +0 -1
- package/dist/ezui/p-495cdb4c.entry.js +0 -1
- package/dist/ezui/p-7d5657c7.entry.js +0 -1
- package/dist/ezui/p-7df61f4a.entry.js +0 -1
- package/dist/ezui/p-7f87f762.entry.js +0 -1
- package/dist/ezui/p-cf8309fc.entry.js +0 -1
|
@@ -37,15 +37,10 @@
|
|
|
37
37
|
/*@doc Define o estilo da borda do botão.*/
|
|
38
38
|
--ez-button--border: none;
|
|
39
39
|
|
|
40
|
-
/*@doc Define a cor
|
|
41
|
-
--ez-button--hover--background-color: var(--background--strong, var(--ez-button--background-color));
|
|
42
|
-
/*@doc Define a cor do texto quando o cursor está sobre o botão.*/
|
|
40
|
+
/*@doc Define a cor do texto e do ícone quando o cursor está sobre o botão.*/
|
|
43
41
|
--ez-button--hover-color: var(--color--primary-600);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
--ez-button--active--background-color: var(--background--strong, --color--primary-700);
|
|
47
|
-
/*@doc Define a cor do texto quando o botão está ativado.*/
|
|
48
|
-
--ez-button--active-color: var(--color--primary-700);
|
|
42
|
+
/*@doc Define a cor de fundo quando o cursor está sobre o botão.*/
|
|
43
|
+
--ez-button--hover--background-color: var(--background--medium, var(--ez-button--background-color));
|
|
49
44
|
|
|
50
45
|
/*@doc Define a cor do texto quando o botão está desabilitado.*/
|
|
51
46
|
--ez-button--disabled-color: var(--text--disable);
|
|
@@ -57,6 +52,11 @@
|
|
|
57
52
|
/*@doc Define a sombra do botão quando selecionado.*/
|
|
58
53
|
--ez-button--focus--box-shadow: none;
|
|
59
54
|
|
|
55
|
+
/*@doc Define a cor do texto e do ícone ao ativar o botão.*/
|
|
56
|
+
--ez-button--active-color: var(--color--primary-700);
|
|
57
|
+
/*@doc Define a cor do fundo ao ativar o botão.*/
|
|
58
|
+
--ez-button--active--background-color: var(--background--strong);
|
|
59
|
+
|
|
60
60
|
/*@doc Define a cor do texto do botão no modo link.*/
|
|
61
61
|
--ez-button--link-color: var(--color--primary, '#008561');
|
|
62
62
|
--ez-button--link--hover-color: var(--color--primary-700, '#1C1D22');
|
|
@@ -92,23 +92,21 @@ button {
|
|
|
92
92
|
color: var(--ez-button--color);
|
|
93
93
|
fill: var(--ez-button--color);
|
|
94
94
|
border: var(--ez-button--border);
|
|
95
|
-
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
button:focus {
|
|
98
|
+
outline: var(--ez-button--focus--border);
|
|
99
|
+
box-shadow: var(--ez-button--focus--box-shadow);
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
button:hover {
|
|
99
103
|
outline: none;
|
|
104
|
+
background-color: var(--ez-button--hover--background-color);
|
|
100
105
|
color: var(--ez-button--hover-color);
|
|
101
106
|
fill: var(--ez-button--hover-color);
|
|
102
|
-
background-color: var(--ez-button--hover--background-color);
|
|
103
107
|
--ez-icon--color: var(--ez-button--hover-color);
|
|
104
108
|
}
|
|
105
109
|
|
|
106
|
-
button:focus {
|
|
107
|
-
outline: none;
|
|
108
|
-
outline: var(--ez-button--focus--border);
|
|
109
|
-
box-shadow: var(--ez-button--focus--box-shadow);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
110
|
button:active {
|
|
113
111
|
outline: none;
|
|
114
112
|
box-shadow: none;
|
|
@@ -122,31 +120,44 @@ button:disabled {
|
|
|
122
120
|
background-color: var(--ez-button--disabled--background-color);
|
|
123
121
|
color: var(--ez-button--disabled-color);
|
|
124
122
|
fill: var(--ez-button--disabled-color);
|
|
125
|
-
--ez-icon--color: var(--ez-button--disabled-color);
|
|
126
123
|
border: none;
|
|
124
|
+
--ez-icon--color: var(--ez-button--disabled-color);
|
|
127
125
|
cursor: no-drop;
|
|
128
126
|
}
|
|
129
127
|
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
.small{
|
|
129
|
+
height: 32px;
|
|
130
|
+
--ez-button--font-size: var(--text--small, 12px);
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
.medium{
|
|
134
|
+
height: 42px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.large{
|
|
138
|
+
height: 46px;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
|
|
141
|
+
.btn-icon {
|
|
142
|
+
padding: 0px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.btn-icon--medium {
|
|
141
146
|
width: 42px;
|
|
142
147
|
min-width: 42px;
|
|
143
148
|
height: 42px;
|
|
144
149
|
}
|
|
145
150
|
|
|
146
|
-
|
|
147
|
-
width:
|
|
148
|
-
min-width:
|
|
149
|
-
height:
|
|
151
|
+
.btn-icon--small {
|
|
152
|
+
width: 32px;
|
|
153
|
+
min-width: 32px;
|
|
154
|
+
height: 32px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.btn-icon--large {
|
|
158
|
+
width: 46px;
|
|
159
|
+
min-width: 46px;
|
|
160
|
+
height: 46px;
|
|
150
161
|
}
|
|
151
162
|
|
|
152
163
|
.label-icon {
|
|
@@ -156,6 +167,18 @@ button.large {
|
|
|
156
167
|
color: var(--ez-button--color);
|
|
157
168
|
}
|
|
158
169
|
|
|
170
|
+
.label-icon:hover {
|
|
171
|
+
color: var(--ez-button--hover-color);
|
|
172
|
+
fill: var(--ez-button--hover-color);
|
|
173
|
+
--ez-icon--color: var(--ez-button--hover-color);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.label-icon:active {
|
|
177
|
+
color: var(--ez-button--active-color);
|
|
178
|
+
fill: var(--ez-button--active-color);
|
|
179
|
+
--ez-icon--color: var(--ez-button--active-color);
|
|
180
|
+
}
|
|
181
|
+
|
|
159
182
|
.label-icon label {
|
|
160
183
|
max-width: 150px;
|
|
161
184
|
white-space: nowrap;
|
|
@@ -165,6 +188,28 @@ button.large {
|
|
|
165
188
|
font-family: var(--ez-button--font-family);
|
|
166
189
|
font-size: var(--ez-button--font-size);
|
|
167
190
|
font-weight: var(--ez-button--font-weight);
|
|
191
|
+
user-select: none;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
button:disabled+label {
|
|
195
|
+
max-width: 150px;
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
font-family: var(--ez-button--font-family);
|
|
201
|
+
font-size: var(--ez-button--font-size);
|
|
202
|
+
font-weight: var(--ez-button--font-weight);
|
|
203
|
+
color: var(--ez-button--disabled-color);
|
|
204
|
+
cursor: no-drop;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
div.label-icon{
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
div.label-icon,button:disabled{
|
|
212
|
+
cursor: no-drop;
|
|
168
213
|
}
|
|
169
214
|
|
|
170
215
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Prop, Method } from
|
|
1
|
+
import { Component, h, Prop, Method } from "@stencil/core";
|
|
2
2
|
export class EzButton {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
@@ -9,10 +9,6 @@ export class EzButton {
|
|
|
9
9
|
* Define o modo de uso do botão; opções: icon, link e regular
|
|
10
10
|
*/
|
|
11
11
|
this.mode = "regular";
|
|
12
|
-
/**
|
|
13
|
-
* É possível escolher entre [small,medium,large] (somente para os modos "icon" e "link")
|
|
14
|
-
*/
|
|
15
|
-
this.size = "medium";
|
|
16
12
|
}
|
|
17
13
|
/**
|
|
18
14
|
* Realiza o foco no botão
|
|
@@ -26,8 +22,10 @@ export class EzButton {
|
|
|
26
22
|
async setBlur() {
|
|
27
23
|
this._button.blur();
|
|
28
24
|
}
|
|
29
|
-
getIconSize() {
|
|
30
|
-
|
|
25
|
+
getIconSize(sizeParam = "medium") {
|
|
26
|
+
const sizeList = ["small", "medium", "large"];
|
|
27
|
+
const sizeLowerCase = this.size && this.size.toLowerCase();
|
|
28
|
+
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
31
29
|
}
|
|
32
30
|
handleSlotChange(ev) {
|
|
33
31
|
const slot = ev.target;
|
|
@@ -42,30 +40,30 @@ export class EzButton {
|
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
else {
|
|
45
|
-
content.style.setProperty(
|
|
43
|
+
content.style.setProperty("--ez-icon--color", "var(--ez-icon--color)");
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
render() {
|
|
49
47
|
if (this.mode == "icon") {
|
|
50
|
-
return (h("button", { class: "icon " + this.
|
|
48
|
+
return (h("button", { class: "btn-icon " + ((this.getIconSize()) ? `btn-icon--${this.getIconSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
|
|
51
49
|
h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => { if (!this.enabled)
|
|
52
50
|
evt.stopPropagation(); } })));
|
|
53
51
|
}
|
|
54
52
|
else if (this.mode == "label-icon") {
|
|
55
53
|
return (h("div", { class: "label-icon" },
|
|
56
|
-
h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
|
|
57
|
-
h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size:
|
|
54
|
+
h("button", { class: "btn-icon " + ((this.getIconSize()) ? `btn-icon--${this.getIconSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
|
|
55
|
+
h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => { if (!this.enabled)
|
|
58
56
|
evt.stopPropagation(); } })),
|
|
59
57
|
h("label", { title: this.label }, this.label)));
|
|
60
58
|
}
|
|
61
59
|
else if (this.mode == "link") {
|
|
62
|
-
return (h("a", { class: this.
|
|
60
|
+
return (h("a", { class: this.getIconSize(), ref: (el) => this._button = el },
|
|
63
61
|
h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
64
62
|
this.label,
|
|
65
63
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
66
64
|
}
|
|
67
65
|
else {
|
|
68
|
-
return (h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
|
|
66
|
+
return (h("button", { class: this.getIconSize(""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el },
|
|
69
67
|
h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }),
|
|
70
68
|
this.label,
|
|
71
69
|
h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
|
|
@@ -145,7 +143,7 @@ export class EzButton {
|
|
|
145
143
|
"optional": false,
|
|
146
144
|
"docs": {
|
|
147
145
|
"tags": [],
|
|
148
|
-
"text": "Define o icone svg que ser\u00E1 utilizado no bot\u00E3o. Esta propriedade s\u00F3 \u00E9 utilizada caso o componente esteja no modo
|
|
146
|
+
"text": "Define o icone svg que ser\u00E1 utilizado no bot\u00E3o. Esta propriedade s\u00F3 \u00E9 utilizada caso o componente esteja no modo \"icon\""
|
|
149
147
|
},
|
|
150
148
|
"attribute": "image",
|
|
151
149
|
"reflect": true
|
|
@@ -171,8 +169,8 @@ export class EzButton {
|
|
|
171
169
|
"type": "string",
|
|
172
170
|
"mutable": false,
|
|
173
171
|
"complexType": {
|
|
174
|
-
"original": "
|
|
175
|
-
"resolved": "
|
|
172
|
+
"original": "\"small\" | \"medium\" | \"large\" | undefined",
|
|
173
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
176
174
|
"references": {}
|
|
177
175
|
},
|
|
178
176
|
"required": false,
|
|
@@ -182,8 +180,7 @@ export class EzButton {
|
|
|
182
180
|
"text": "\u00C9 poss\u00EDvel escolher entre [small,medium,large] (somente para os modos \"icon\" e \"link\")"
|
|
183
181
|
},
|
|
184
182
|
"attribute": "size",
|
|
185
|
-
"reflect": true
|
|
186
|
-
"defaultValue": "\"medium\""
|
|
183
|
+
"reflect": true
|
|
187
184
|
}
|
|
188
185
|
}; }
|
|
189
186
|
static get methods() { return {
|
|
@@ -198,10 +198,11 @@
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.calendar__cell--unselectable:hover {
|
|
201
|
-
/*private*/
|
|
201
|
+
/* private */
|
|
202
202
|
background-color: unset;
|
|
203
203
|
border-radius: unset;
|
|
204
204
|
cursor: unset;
|
|
205
|
+
color: var(--ez-calendar--color);
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
.calendar__cell--unselectable {
|
|
@@ -174,7 +174,7 @@ export class EzCalendar {
|
|
|
174
174
|
h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
|
|
175
175
|
h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
|
|
176
176
|
h("div", { class: "calendar__body" },
|
|
177
|
-
h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
|
|
177
|
+
h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { "data-day": day, class: "calendar__cell calendar__cell--unselectable" }, day))),
|
|
178
178
|
[0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
|
|
179
179
|
const date = new Date();
|
|
180
180
|
date.setTime(firstDate.getTime());
|
|
@@ -204,34 +204,34 @@ export class EzCalendar {
|
|
|
204
204
|
h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index) => {
|
|
205
205
|
if (index === this.value.getHours()) {
|
|
206
206
|
return (h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem },
|
|
207
|
-
h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index) }, offset),
|
|
207
|
+
h("div", { "data-hour": offset, class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index) }, offset),
|
|
208
208
|
h("div", { class: "separatorTime" }, ":")));
|
|
209
209
|
}
|
|
210
210
|
else {
|
|
211
211
|
return (h("div", { style: { display: 'flex' } },
|
|
212
|
-
h("div", { class: "calendar__cell", onClick: () => this.selectHours(index) }, offset),
|
|
212
|
+
h("div", { "data-hour": offset, class: "calendar__cell", onClick: () => this.selectHours(index) }, offset),
|
|
213
213
|
h("div", { class: "separatorTime" }, ":")));
|
|
214
214
|
}
|
|
215
215
|
})),
|
|
216
216
|
h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index) => {
|
|
217
217
|
if (index === this.value.getMinutes()) {
|
|
218
218
|
return (h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem },
|
|
219
|
-
h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index) }, offset),
|
|
219
|
+
h("div", { "data-minute": offset, class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index) }, offset),
|
|
220
220
|
this.showSeconds && h("div", { class: "separatorTime" }, ":")));
|
|
221
221
|
}
|
|
222
222
|
else {
|
|
223
223
|
return (h("div", { style: { display: 'flex' } },
|
|
224
|
-
h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index) }, offset),
|
|
224
|
+
h("div", { "data-minute": offset, class: "calendar__cell", onClick: () => this.selectMinutes(index) }, offset),
|
|
225
225
|
this.showSeconds && h("div", { class: "separatorTime" }, ":")));
|
|
226
226
|
}
|
|
227
227
|
})),
|
|
228
228
|
this.showSeconds &&
|
|
229
229
|
h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index) => {
|
|
230
230
|
if (index === this.value.getSeconds()) {
|
|
231
|
-
return (h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index), ref: elem => this._secondsSelect = elem }, offset));
|
|
231
|
+
return (h("div", { "data-second": offset, class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index), ref: elem => this._secondsSelect = elem }, offset));
|
|
232
232
|
}
|
|
233
233
|
else {
|
|
234
|
-
return (h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index) }, offset));
|
|
234
|
+
return (h("div", { "data-second": offset, class: "calendar__cell", onClick: () => this.selectSeconds(index) }, offset));
|
|
235
235
|
}
|
|
236
236
|
})))))));
|
|
237
237
|
}
|
|
@@ -124,11 +124,11 @@
|
|
|
124
124
|
/*private*/
|
|
125
125
|
display: flex;
|
|
126
126
|
flex-wrap: wrap;
|
|
127
|
-
overflow: hidden;
|
|
128
127
|
width: 100%;
|
|
129
128
|
height: 0px;
|
|
130
129
|
max-height: 0px;
|
|
131
130
|
opacity: 0;
|
|
131
|
+
overflow: hidden;
|
|
132
132
|
|
|
133
133
|
/*public*/
|
|
134
134
|
transition: all var(--transition, 0.5s);
|
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
height: 100%;
|
|
140
140
|
max-height: none;
|
|
141
141
|
opacity: 1;
|
|
142
|
+
overflow: visible;
|
|
142
143
|
|
|
143
144
|
/*public*/
|
|
144
145
|
transition: all var(--transition, 0.5s);
|
|
@@ -7,7 +7,6 @@ export class EzCollapsibleBox {
|
|
|
7
7
|
this.value = false;
|
|
8
8
|
/**
|
|
9
9
|
* Define o tamanho do texto e do ícone do componente.
|
|
10
|
-
* Tamanhos suportados: "x-small", "small", "medium", "large" e "x-large".
|
|
11
10
|
*/
|
|
12
11
|
this.headerSize = "small";
|
|
13
12
|
/**
|
|
@@ -34,8 +33,9 @@ export class EzCollapsibleBox {
|
|
|
34
33
|
getHeaderSize() {
|
|
35
34
|
const sizeAlias = ["xsmall", "xlarge"];
|
|
36
35
|
const sizeList = ["x-small", "small", "medium", "large", "x-large"];
|
|
37
|
-
const
|
|
38
|
-
|
|
36
|
+
const sizeLowerCase = this.headerSize && this.headerSize.toLowerCase();
|
|
37
|
+
const sizeCustom = sizeAlias.includes(sizeLowerCase) ? sizeLowerCase.replace('x', 'x-') : sizeLowerCase;
|
|
38
|
+
return sizeList.includes(sizeCustom) ? sizeCustom : "small";
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
41
|
return (h("div", { class: "collapsible-box" },
|
|
@@ -96,15 +96,15 @@ export class EzCollapsibleBox {
|
|
|
96
96
|
"type": "string",
|
|
97
97
|
"mutable": false,
|
|
98
98
|
"complexType": {
|
|
99
|
-
"original": "
|
|
100
|
-
"resolved": "
|
|
99
|
+
"original": "\"x-small\" | \"small\" | \"medium\" | \"large\" | \"x-large\" | undefined",
|
|
100
|
+
"resolved": "\"large\" | \"medium\" | \"small\" | \"x-large\" | \"x-small\"",
|
|
101
101
|
"references": {}
|
|
102
102
|
},
|
|
103
103
|
"required": false,
|
|
104
104
|
"optional": false,
|
|
105
105
|
"docs": {
|
|
106
106
|
"tags": [],
|
|
107
|
-
"text": "Define o tamanho do texto e do \u00EDcone do componente
|
|
107
|
+
"text": "Define o tamanho do texto e do \u00EDcone do componente."
|
|
108
108
|
},
|
|
109
109
|
"attribute": "header-size",
|
|
110
110
|
"reflect": true,
|
|
@@ -114,8 +114,8 @@ export class EzCollapsibleBox {
|
|
|
114
114
|
"type": "string",
|
|
115
115
|
"mutable": false,
|
|
116
116
|
"complexType": {
|
|
117
|
-
"original": "
|
|
118
|
-
"resolved": "
|
|
117
|
+
"original": "\"left\" | \"right\"",
|
|
118
|
+
"resolved": "\"left\" | \"right\"",
|
|
119
119
|
"references": {}
|
|
120
120
|
},
|
|
121
121
|
"required": false,
|
|
@@ -45,17 +45,11 @@
|
|
|
45
45
|
|
|
46
46
|
/* buttons */
|
|
47
47
|
/*@doc Define a cor do botão de pesquisa do componente.*/
|
|
48
|
-
--ez-combo-box__btn
|
|
48
|
+
--ez-combo-box__btn--color: var(--text--primary, #626e82);
|
|
49
49
|
/*@doc Define a cor do botão de pesquisa do componente quando desabilitado.*/
|
|
50
|
-
--ez-combo-box__btn-
|
|
50
|
+
--ez-combo-box__btn-disabled--color: var(--text--disable, #AFB6C0);
|
|
51
51
|
/*@doc Define a cor do botão de pesquisa do componente quando o mouse está sobre ele.*/
|
|
52
|
-
--ez-combo-box__btn-
|
|
53
|
-
/*@doc Define a cor do botão de opções do componente.*/
|
|
54
|
-
--ez-combo-box__btn-options--background-color: var(--text--primary, #626e82);
|
|
55
|
-
/*@doc Define a cor do botão de opções do componente quando desabilitado.*/
|
|
56
|
-
--ez-combo-box__btn-options-disabled--background-color: var(--text--disable, #AFB6C0);
|
|
57
|
-
/*@doc Define a cor do botão de opções do componente quando o mouse está sobre ele.*/
|
|
58
|
-
--ez-combo-box__btn-options-hover--background-color: var(--color--primary, #4e4e4e);
|
|
52
|
+
--ez-combo-box__btn-hover--color: var(--color--primary, #4e4e4e);
|
|
59
53
|
|
|
60
54
|
/* label */
|
|
61
55
|
/*@doc Define a cor do label.*/
|
|
@@ -66,12 +60,7 @@
|
|
|
66
60
|
--ez-combo-box__list-text--primary: var(--text--primary, #626e82);
|
|
67
61
|
/*@doc Define a altura do box da lista de opções.*/
|
|
68
62
|
--ez-combo-box__list-height: calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));
|
|
69
|
-
|
|
70
|
-
/*@doc Contém a imagem do ícone que aciona a lista.*/
|
|
71
|
-
--ez-combo-box__drop-down-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="16px"><path d="M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z"/></svg>');
|
|
72
|
-
/*@doc Contém a imagem do ícone de pesquisa.*/
|
|
73
|
-
--ez-combo-box__search-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="22px" width="22px"><path d="m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z"/></svg>');
|
|
74
|
-
|
|
63
|
+
|
|
75
64
|
/* espaçamento */
|
|
76
65
|
/*@doc Define um espaçamento mediano entre elementos do componente.*/
|
|
77
66
|
--ez-combo-box--space--medium: var(--space--medium, 12px);
|
|
@@ -89,6 +78,10 @@
|
|
|
89
78
|
width: var(--ez-combo-box--width);
|
|
90
79
|
}
|
|
91
80
|
|
|
81
|
+
ez-icon {
|
|
82
|
+
--ez-icon--color: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
92
85
|
.suppressed-search-input{
|
|
93
86
|
--ez-text-input__input--border-color: var(--color--strokes, #dce0e8);
|
|
94
87
|
--ez-text-input__input--disabled--background-color: var(--background--xlight, #fff);
|
|
@@ -103,12 +96,10 @@
|
|
|
103
96
|
.options-list {
|
|
104
97
|
box-sizing: border-box;
|
|
105
98
|
width: 100%;
|
|
106
|
-
|
|
107
99
|
/*private*/
|
|
108
100
|
z-index: var(--more-visible, 2);
|
|
109
101
|
display: flex;
|
|
110
102
|
flex-direction: column;
|
|
111
|
-
|
|
112
103
|
/*public*/
|
|
113
104
|
background-color: var(--ez-combo-box--background-color--xlight);
|
|
114
105
|
padding: var(--ez-combo-box--space--small);
|
|
@@ -127,9 +118,7 @@
|
|
|
127
118
|
border-radius: var(--ez-combo-box--border-radius-small);
|
|
128
119
|
padding: 0 var(--ez-combo-box--space--small);
|
|
129
120
|
list-style-type: none;
|
|
130
|
-
|
|
131
121
|
min-height: var(--ez-combo-box__list-height);
|
|
132
|
-
;
|
|
133
122
|
}
|
|
134
123
|
|
|
135
124
|
.item--label {
|
|
@@ -164,60 +153,24 @@ li:hover {
|
|
|
164
153
|
background-color: var(--background--medium);
|
|
165
154
|
}
|
|
166
155
|
|
|
167
|
-
.btn
|
|
156
|
+
.btn {
|
|
168
157
|
outline: none;
|
|
169
158
|
border: none;
|
|
170
|
-
background
|
|
159
|
+
background: none;
|
|
171
160
|
cursor: pointer;
|
|
161
|
+
color: var(--ez-combo-box__btn--color);
|
|
172
162
|
}
|
|
173
163
|
|
|
174
|
-
.btn
|
|
164
|
+
.btn:disabled {
|
|
165
|
+
color: var(--ez-combo-box__btn-disabled--color);
|
|
175
166
|
cursor: unset;
|
|
176
167
|
}
|
|
177
168
|
|
|
178
|
-
.btn
|
|
179
|
-
|
|
180
|
-
display: flex;
|
|
181
|
-
background-color: var(--ez-combo-box__btn-options--background-color);
|
|
182
|
-
width: 16px;
|
|
183
|
-
height: 16px;
|
|
184
|
-
-webkit-mask-image: var(--ez-combo-box__drop-down-image);
|
|
185
|
-
mask-image: var(--ez-combo-box__drop-down-image);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.btn-open-options:disabled:after {
|
|
189
|
-
background-color: var(--ez-combo-box__btn-options-disabled--background-color);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.btn-open-options:enabled:hover::after {
|
|
193
|
-
background-color: var(--ez-combo-box__btn-options-hover--background-color);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.btn-open-search {
|
|
197
|
-
outline: none;
|
|
198
|
-
border: none;
|
|
199
|
-
background-color: unset;
|
|
200
|
-
cursor: pointer;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.btn-open-search:disabled {
|
|
169
|
+
.btn:disabled:hover {
|
|
170
|
+
color: var(--ez-combo-box__btn-disabled--color);
|
|
204
171
|
cursor: unset;
|
|
205
172
|
}
|
|
206
173
|
|
|
207
|
-
.btn
|
|
208
|
-
|
|
209
|
-
display: flex;
|
|
210
|
-
background-color: var(--ez-combo-box__btn-search--background-color);
|
|
211
|
-
width: 22px;
|
|
212
|
-
height: 22px;
|
|
213
|
-
-webkit-mask-image: var(--ez-combo-box__search-image);
|
|
214
|
-
mask-image: var(--ez-combo-box__search-image);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.btn-open-search:disabled:after {
|
|
218
|
-
background-color: var(--ez-combo-box__btn-search-disabled--background-color);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.btn-open-search:enabled:hover::after {
|
|
222
|
-
background-color: var(--ez-combo-box__btn-search-hover--background-color);
|
|
174
|
+
.btn:hover {
|
|
175
|
+
color: var(--ez-combo-box__btn-hover--color);
|
|
223
176
|
}
|
|
@@ -32,7 +32,7 @@ export class EzComboBox {
|
|
|
32
32
|
*/
|
|
33
33
|
this.mode = "regular";
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
observerValue() {
|
|
36
36
|
if (this._inputElement) {
|
|
37
37
|
this._inputElement.value = this.getText();
|
|
38
38
|
}
|
|
@@ -150,7 +150,7 @@ export class EzComboBox {
|
|
|
150
150
|
this.ezChange.emit(adjustedOpt);
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
this.
|
|
153
|
+
this.observerValue();
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
updateSource(source) {
|
|
@@ -182,7 +182,7 @@ export class EzComboBox {
|
|
|
182
182
|
this.selectOption(undefined);
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
this.
|
|
185
|
+
this.observerValue();
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
//---------------------------------------------
|
|
@@ -222,6 +222,9 @@ export class EzComboBox {
|
|
|
222
222
|
//---------------------------------------------
|
|
223
223
|
// Event handlers
|
|
224
224
|
//---------------------------------------------
|
|
225
|
+
handlerIconClick() {
|
|
226
|
+
this.searchMode ? this.loadOptions("ADVANCED") : this.showOptions();
|
|
227
|
+
}
|
|
225
228
|
onTextInputChangeHandler(event) {
|
|
226
229
|
if (!this._criteria) {
|
|
227
230
|
this._inputElement.value = event.data;
|
|
@@ -270,10 +273,9 @@ export class EzComboBox {
|
|
|
270
273
|
}
|
|
271
274
|
render() {
|
|
272
275
|
return (h(Host, null,
|
|
273
|
-
h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode },
|
|
274
|
-
h("button", { disabled: !this.enabled, tabindex: -1,
|
|
275
|
-
|
|
276
|
-
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-options", slot: "rightIcon", onClick: () => this.showOptions() })),
|
|
276
|
+
h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onEzChange: event => event.stopPropagation(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode },
|
|
277
|
+
h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() },
|
|
278
|
+
h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))),
|
|
277
279
|
h("section", { class: "list-container", ref: elem => this._listContainer = elem },
|
|
278
280
|
h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
|
|
279
281
|
}
|
|
@@ -290,7 +292,7 @@ export class EzComboBox {
|
|
|
290
292
|
"type": "string",
|
|
291
293
|
"mutable": true,
|
|
292
294
|
"complexType": {
|
|
293
|
-
"original": "Option|string",
|
|
295
|
+
"original": "Option | string",
|
|
294
296
|
"resolved": "Option | string",
|
|
295
297
|
"references": {
|
|
296
298
|
"Option": {
|
|
@@ -587,7 +589,7 @@ export class EzComboBox {
|
|
|
587
589
|
static get elementRef() { return "el"; }
|
|
588
590
|
static get watchers() { return [{
|
|
589
591
|
"propName": "value",
|
|
590
|
-
"methodName": "
|
|
592
|
+
"methodName": "observerValue"
|
|
591
593
|
}]; }
|
|
592
594
|
}
|
|
593
595
|
;
|
|
@@ -6,6 +6,6 @@ export const buildCheckBox = (fieldConfig) => {
|
|
|
6
6
|
return buildField(fieldConfig.name, fieldConfig.label, fieldConfig.readOnly, false);
|
|
7
7
|
};
|
|
8
8
|
function buildField(fieldName, fieldLabel, readOnly, switchMode = false) {
|
|
9
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 align--middle padding-horizontal--small padding-bottom--large" },
|
|
9
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
|
|
10
10
|
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? "switch" : "regular", "data-field-name": fieldName, key: fieldName })));
|
|
11
11
|
}
|
|
@@ -9,6 +9,6 @@ export const buildComboBox = ({ name, label, readOnly, required }, properties) =
|
|
|
9
9
|
else {
|
|
10
10
|
options = prop;
|
|
11
11
|
}
|
|
12
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
12
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
13
13
|
h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
|
|
14
14
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const buildDate = ({ name, label, readOnly }) => {
|
|
3
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
3
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
4
4
|
h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
5
5
|
};
|
|
6
6
|
export const buildTime = ({ name, label }) => {
|
|
7
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
7
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
8
8
|
h("ez-time-input", { label: label, "data-field-name": name, key: name })));
|
|
9
9
|
};
|
|
10
10
|
export const buildTimeDate = ({ name, label }) => {
|
|
11
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
11
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
12
12
|
h("ez-date-time-input", { label: label, "data-field-name": name, key: name })));
|
|
13
13
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const buildFile = ({ name, label, readOnly }) => {
|
|
3
|
-
return (h("div", { class: "col col--sd-12 padding-horizontal--small" },
|
|
3
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
4
4
|
h("ez-upload", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
5
5
|
};
|
|
@@ -8,6 +8,6 @@ export const buildInteger = ({ name, label, readOnly }) => {
|
|
|
8
8
|
return buildNumeric(name, label, readOnly, 0, 0);
|
|
9
9
|
};
|
|
10
10
|
function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision) {
|
|
11
|
-
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
11
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
|
|
12
12
|
h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, key: fieldName })));
|
|
13
13
|
}
|