@sankhyalabs/ezui 5.20.0-dev.10 → 5.20.0-dev.12

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.
Files changed (70) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -0
  4. package/dist/cjs/ez-grid.cjs.entry.js +7 -0
  5. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
  6. package/dist/cjs/ez-number-input.cjs.entry.js +3 -0
  7. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
  9. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  10. package/dist/cjs/ez-split-panel.cjs.entry.js +6 -5
  11. package/dist/cjs/ezui.cjs.js +1 -1
  12. package/dist/cjs/index-a7b0c73d.js +8 -4
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +1 -0
  15. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
  16. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
  17. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
  18. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -0
  19. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -0
  20. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
  21. package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
  22. package/dist/collection/components/ez-popup/ez-popup.css +2 -4
  23. package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
  24. package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
  25. package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
  26. package/dist/collection/components/ez-split-panel/ez-split-panel.css +0 -1
  27. package/dist/collection/components/ez-split-panel/ez-split-panel.js +5 -4
  28. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +7 -3
  29. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +23 -2
  30. package/dist/custom-elements/index.d.ts +6 -0
  31. package/dist/custom-elements/index.js +174 -21
  32. package/dist/esm/ez-combo-box.entry.js +1 -1
  33. package/dist/esm/ez-date-input.entry.js +3 -0
  34. package/dist/esm/ez-date-time-input.entry.js +3 -0
  35. package/dist/esm/ez-grid.entry.js +7 -0
  36. package/dist/esm/ez-multi-selection-list.entry.js +2 -10
  37. package/dist/esm/ez-number-input.entry.js +3 -0
  38. package/dist/esm/ez-popup.entry.js +1 -1
  39. package/dist/esm/ez-split-button.entry.js +143 -0
  40. package/dist/esm/ez-split-item.entry.js +4 -3
  41. package/dist/esm/ez-split-panel.entry.js +6 -5
  42. package/dist/esm/ezui.js +1 -1
  43. package/dist/esm/index-baa5e267.js +8 -4
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/ezui/ezui.esm.js +1 -1
  46. package/dist/ezui/{p-300bf244.entry.js → p-07cbffce.entry.js} +1 -1
  47. package/dist/ezui/{p-c0f1715f.entry.js → p-18e7870d.entry.js} +1 -1
  48. package/dist/ezui/p-25ed09c6.entry.js +1 -0
  49. package/dist/ezui/p-50186acb.entry.js +1 -0
  50. package/dist/ezui/{p-ab629244.entry.js → p-661f6820.entry.js} +1 -1
  51. package/dist/ezui/p-672dd122.entry.js +1 -0
  52. package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
  53. package/dist/ezui/{p-02c8831a.entry.js → p-abc23d6f.entry.js} +1 -1
  54. package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
  55. package/dist/ezui/p-e562d05e.entry.js +1 -0
  56. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
  57. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  58. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
  59. package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
  60. package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
  61. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  62. package/dist/types/components.d.ts +123 -0
  63. package/package.json +2 -1
  64. package/react/components.d.ts +1 -0
  65. package/react/components.js +1 -0
  66. package/react/components.js.map +1 -1
  67. package/dist/ezui/p-133fae4a.entry.js +0 -1
  68. package/dist/ezui/p-24d3fede.entry.js +0 -1
  69. package/dist/ezui/p-596634e9.entry.js +0 -1
  70. package/dist/ezui/p-cd0499a2.entry.js +0 -1
@@ -0,0 +1,436 @@
1
+ import { ElementIDUtils } from '@sankhyalabs/core';
2
+ import { h } from '@stencil/core';
3
+ export class EzSplitButton {
4
+ constructor() {
5
+ this.rightDefaultTitle = 'Mais opções';
6
+ this.show = false;
7
+ this.enabled = true;
8
+ this.iconName = undefined;
9
+ this.image = undefined;
10
+ this.items = undefined;
11
+ this.label = undefined;
12
+ this.leftTitle = undefined;
13
+ this.rightTitle = 'Mais opções';
14
+ this.mode = 'default';
15
+ this.size = 'medium';
16
+ }
17
+ /**
18
+ * Remove o foco de ambos os botões.
19
+ */
20
+ async setBlur() {
21
+ this.leftButton.blur();
22
+ this.rightButton.blur();
23
+ }
24
+ /**
25
+ * Aplica o foco no botão principal.
26
+ */
27
+ async setLeftButtonFocus() {
28
+ this.leftButton.focus();
29
+ }
30
+ /**
31
+ * Aplica o foco no botão do dropdown.
32
+ */
33
+ async setRightButtonFocus() {
34
+ this.rightButton.focus();
35
+ }
36
+ clickListener(evt) {
37
+ if (!this.enabled) {
38
+ evt.preventDefault();
39
+ evt.stopPropagation();
40
+ evt.stopImmediatePropagation();
41
+ }
42
+ }
43
+ getIconSize(sizeParam = 'medium') {
44
+ var _a;
45
+ const sizeList = ['medium', 'large'];
46
+ const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
47
+ return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
48
+ }
49
+ closeDropdown() {
50
+ this.show = false;
51
+ }
52
+ toggleDropdown() {
53
+ this.show = !this.show;
54
+ }
55
+ handleButtonClick() {
56
+ this.buttonClick.emit();
57
+ }
58
+ handleDropdownItemClick(evt) {
59
+ this.dropdownItemClick.emit(evt.detail);
60
+ evt.stopPropagation();
61
+ this.closeDropdown();
62
+ }
63
+ handleDropdownSubActionClick(evt) {
64
+ this.dropdownSubActionClick.emit(evt.detail);
65
+ evt.stopPropagation();
66
+ this.closeDropdown();
67
+ }
68
+ /**
69
+ * Método responsável em posicionar o dropdown na tela.
70
+ * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
71
+ */
72
+ positionDropdown() {
73
+ const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
74
+ const rightButtonRect = _rightButton.getBoundingClientRect();
75
+ const dropdownParentRect = _dropdownParent.getBoundingClientRect();
76
+ const spaceBelow = window.innerHeight - rightButtonRect.bottom;
77
+ const spaceAbove = rightButtonRect.top;
78
+ const spaceRight = window.innerWidth - rightButtonRect.right;
79
+ const spaceLeft = rightButtonRect.left;
80
+ const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
81
+ const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
82
+ let top = `${rightButtonRect.bottom + window.scrollY}px`;
83
+ let left = `${rightButtonRect.left + window.scrollX}px`;
84
+ let bottom = 'auto';
85
+ if (hasSpaceBelow) {
86
+ bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
87
+ top = 'auto';
88
+ _dropdownParent.style.maxHeight = `${spaceAbove}px`;
89
+ }
90
+ if (hasSpaceRight) {
91
+ left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
92
+ }
93
+ _dropdownParent.style.top = top;
94
+ _dropdownParent.style.bottom = bottom;
95
+ _dropdownParent.style.left = left;
96
+ }
97
+ setEvents() {
98
+ window.removeEventListener('scroll', this.positionDropdown.bind(this));
99
+ window.addEventListener('scroll', this.positionDropdown.bind(this));
100
+ }
101
+ componentWillLoad() {
102
+ this.setEvents();
103
+ }
104
+ componentDidLoad() {
105
+ if (this._element)
106
+ ElementIDUtils.addIDInfo(this._element);
107
+ if (this.leftButton) {
108
+ const dataInfo = { id: 'embedded' };
109
+ ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
110
+ }
111
+ if (this.rightButton) {
112
+ const dataInfo = { id: 'embedded' };
113
+ ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
114
+ }
115
+ this.positionDropdown();
116
+ }
117
+ componentDidUpdate() {
118
+ this.positionDropdown();
119
+ }
120
+ render() {
121
+ const hasIconButton = this.shouldShowIconOnLeftButton();
122
+ const hasLabelButton = this.shouldShowLabelOnLeftButton();
123
+ const iconSize = this.getIconSize();
124
+ return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
125
+ }
126
+ shouldShowLabelOnLeftButton() {
127
+ return ['icon-left', 'default'].includes(this.mode);
128
+ }
129
+ shouldShowIconOnLeftButton() {
130
+ return ['icon-left', 'icon-only'].includes(this.mode);
131
+ }
132
+ static get is() { return "ez-split-button"; }
133
+ static get encapsulation() { return "shadow"; }
134
+ static get originalStyleUrls() {
135
+ return {
136
+ "$": ["ez-split-button.css"]
137
+ };
138
+ }
139
+ static get styleUrls() {
140
+ return {
141
+ "$": ["ez-split-button.css"]
142
+ };
143
+ }
144
+ static get properties() {
145
+ return {
146
+ "enabled": {
147
+ "type": "boolean",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "boolean",
151
+ "resolved": "boolean",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "Se false o usu\u00E1rio n\u00E3o pode interagir com o bot\u00E3o."
159
+ },
160
+ "attribute": "enabled",
161
+ "reflect": true,
162
+ "defaultValue": "true"
163
+ },
164
+ "iconName": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string",
169
+ "resolved": "string",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": "Define o \u00EDcone a ser usado da biblioteca de \u00EDcones: [ez-icons](https://gilded-nasturtium-6b64dd.netlify.app/docs/components/layout-doc/icons/)"
177
+ },
178
+ "attribute": "icon-name",
179
+ "reflect": true
180
+ },
181
+ "image": {
182
+ "type": "string",
183
+ "mutable": false,
184
+ "complexType": {
185
+ "original": "string",
186
+ "resolved": "string",
187
+ "references": {}
188
+ },
189
+ "required": false,
190
+ "optional": false,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": "Define o caminho usado nos modos `icon-only` e `icon-left` para imagens n\u00E3o contempladas na biblioteca de \u00EDcones."
194
+ },
195
+ "attribute": "image",
196
+ "reflect": true
197
+ },
198
+ "items": {
199
+ "type": "unknown",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "Array<IDropdownItem>",
203
+ "resolved": "IDropdownItem[]",
204
+ "references": {
205
+ "Array": {
206
+ "location": "global"
207
+ },
208
+ "IDropdownItem": {
209
+ "location": "import",
210
+ "path": "../ez-dropdown/structure/DropdownItem"
211
+ }
212
+ }
213
+ },
214
+ "required": false,
215
+ "optional": false,
216
+ "docs": {
217
+ "tags": [],
218
+ "text": "Define o conte\u00FAdo do dropdown."
219
+ }
220
+ },
221
+ "label": {
222
+ "type": "string",
223
+ "mutable": false,
224
+ "complexType": {
225
+ "original": "string",
226
+ "resolved": "string",
227
+ "references": {}
228
+ },
229
+ "required": false,
230
+ "optional": false,
231
+ "docs": {
232
+ "tags": [],
233
+ "text": "Texto a ser apresentado como label do bot\u00E3o."
234
+ },
235
+ "attribute": "label",
236
+ "reflect": true
237
+ },
238
+ "leftTitle": {
239
+ "type": "string",
240
+ "mutable": false,
241
+ "complexType": {
242
+ "original": "string",
243
+ "resolved": "string",
244
+ "references": {}
245
+ },
246
+ "required": false,
247
+ "optional": false,
248
+ "docs": {
249
+ "tags": [],
250
+ "text": "Texto a ser apresentado como title do bot\u00E3o principal"
251
+ },
252
+ "attribute": "left-title",
253
+ "reflect": true
254
+ },
255
+ "rightTitle": {
256
+ "type": "string",
257
+ "mutable": false,
258
+ "complexType": {
259
+ "original": "string",
260
+ "resolved": "string",
261
+ "references": {}
262
+ },
263
+ "required": false,
264
+ "optional": false,
265
+ "docs": {
266
+ "tags": [],
267
+ "text": "Texto a ser apresentado como title do bot\u00E3o dropdown"
268
+ },
269
+ "attribute": "right-title",
270
+ "reflect": true,
271
+ "defaultValue": "'Mais op\u00E7\u00F5es'"
272
+ },
273
+ "mode": {
274
+ "type": "string",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "'default' | 'icon-only' | 'icon-left'",
278
+ "resolved": "\"default\" | \"icon-left\" | \"icon-only\"",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": false,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": "Define o modo de uso do bot\u00E3o."
286
+ },
287
+ "attribute": "mode",
288
+ "reflect": true,
289
+ "defaultValue": "'default'"
290
+ },
291
+ "size": {
292
+ "type": "string",
293
+ "mutable": false,
294
+ "complexType": {
295
+ "original": "'medium' | 'large'",
296
+ "resolved": "\"large\" | \"medium\"",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": "Define o tamanho do ez-split-button."
304
+ },
305
+ "attribute": "size",
306
+ "reflect": true,
307
+ "defaultValue": "'medium'"
308
+ }
309
+ };
310
+ }
311
+ static get states() {
312
+ return {
313
+ "show": {}
314
+ };
315
+ }
316
+ static get events() {
317
+ return [{
318
+ "method": "buttonClick",
319
+ "name": "buttonClick",
320
+ "bubbles": true,
321
+ "cancelable": true,
322
+ "composed": true,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": "Emitido quando o bot\u00E3o principal \u00E9 clicado"
326
+ },
327
+ "complexType": {
328
+ "original": "void",
329
+ "resolved": "void",
330
+ "references": {}
331
+ }
332
+ }, {
333
+ "method": "dropdownItemClick",
334
+ "name": "dropdownItemClick",
335
+ "bubbles": true,
336
+ "cancelable": true,
337
+ "composed": true,
338
+ "docs": {
339
+ "tags": [],
340
+ "text": "Emitido quando um item do dropdown \u00E9 clicado"
341
+ },
342
+ "complexType": {
343
+ "original": "IDropdownItem",
344
+ "resolved": "IDropdownItem",
345
+ "references": {
346
+ "IDropdownItem": {
347
+ "location": "import",
348
+ "path": "../ez-dropdown/structure/DropdownItem"
349
+ }
350
+ }
351
+ }
352
+ }, {
353
+ "method": "dropdownSubActionClick",
354
+ "name": "dropdownSubActionClick",
355
+ "bubbles": true,
356
+ "cancelable": true,
357
+ "composed": true,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": "Emitido quando uma subAction de um item do dropdown \u00E9 clicada"
361
+ },
362
+ "complexType": {
363
+ "original": "IDropdownSubAction",
364
+ "resolved": "IDropdownSubAction",
365
+ "references": {
366
+ "IDropdownSubAction": {
367
+ "location": "import",
368
+ "path": "../ez-dropdown/structure/DropdownItem"
369
+ }
370
+ }
371
+ }
372
+ }];
373
+ }
374
+ static get methods() {
375
+ return {
376
+ "setBlur": {
377
+ "complexType": {
378
+ "signature": "() => Promise<void>",
379
+ "parameters": [],
380
+ "references": {
381
+ "Promise": {
382
+ "location": "global"
383
+ }
384
+ },
385
+ "return": "Promise<void>"
386
+ },
387
+ "docs": {
388
+ "text": "Remove o foco de ambos os bot\u00F5es.",
389
+ "tags": []
390
+ }
391
+ },
392
+ "setLeftButtonFocus": {
393
+ "complexType": {
394
+ "signature": "() => Promise<void>",
395
+ "parameters": [],
396
+ "references": {
397
+ "Promise": {
398
+ "location": "global"
399
+ }
400
+ },
401
+ "return": "Promise<void>"
402
+ },
403
+ "docs": {
404
+ "text": "Aplica o foco no bot\u00E3o principal.",
405
+ "tags": []
406
+ }
407
+ },
408
+ "setRightButtonFocus": {
409
+ "complexType": {
410
+ "signature": "() => Promise<void>",
411
+ "parameters": [],
412
+ "references": {
413
+ "Promise": {
414
+ "location": "global"
415
+ }
416
+ },
417
+ "return": "Promise<void>"
418
+ },
419
+ "docs": {
420
+ "text": "Aplica o foco no bot\u00E3o do dropdown.",
421
+ "tags": []
422
+ }
423
+ }
424
+ };
425
+ }
426
+ static get elementRef() { return "_element"; }
427
+ static get listeners() {
428
+ return [{
429
+ "name": "click",
430
+ "method": "clickListener",
431
+ "target": undefined,
432
+ "capture": true,
433
+ "passive": false
434
+ }];
435
+ }
436
+ }
@@ -0,0 +1,42 @@
1
+ export const dropdownItems = [
2
+ {
3
+ id: "1",
4
+ label: "label1",
5
+ type: 'item',
6
+ iconName: "iconName1",
7
+ subAction: {
8
+ id: "1",
9
+ label: "subActionLabel1",
10
+ type: "primary"
11
+ },
12
+ group: "group"
13
+ }, {
14
+ id: "2",
15
+ label: "label2",
16
+ type: 'item',
17
+ iconName: "iconName2",
18
+ subAction: null,
19
+ group: null,
20
+ }, {
21
+ id: "3",
22
+ label: "label3",
23
+ type: 'item',
24
+ iconName: "iconName3",
25
+ subAction: null,
26
+ group: null,
27
+ }, {
28
+ id: "",
29
+ label: "",
30
+ type: 'divider',
31
+ iconName: "",
32
+ subAction: null,
33
+ group: null,
34
+ }, {
35
+ id: "4",
36
+ label: "label4",
37
+ type: 'item',
38
+ iconName: "iconName4",
39
+ subAction: null,
40
+ group: null,
41
+ }
42
+ ];
@@ -1,5 +1,4 @@
1
1
  :host {
2
- height: 100%;
3
2
  }
4
3
 
5
4
  .ez-split-gutter {
@@ -71,16 +71,17 @@ export class SplitPanel {
71
71
  }
72
72
  getGridTemplate() {
73
73
  let template = '';
74
- this._items.forEach((_col, index) => {
74
+ this._items.forEach((col, index) => {
75
+ const size = col.size || '1fr';
75
76
  if (index === this._items.length - 1) {
76
- template += ` 1fr`;
77
+ template += ` ${size}`;
77
78
  return;
78
79
  }
79
80
  if (index === 0) {
80
- template += `1fr 5px`;
81
+ template += `${size} 5px`;
81
82
  return;
82
83
  }
83
- template += ` 1fr 5px`;
84
+ template += ` ${size} 5px`;
84
85
  });
85
86
  return template;
86
87
  }
@@ -1,12 +1,16 @@
1
1
  .box_split-item {
2
2
  background-color: var(--background--xlight);
3
- padding: var(--space--nano);
4
3
  width: 100%;
5
4
  height: 100%;
6
5
  border-radius: var(--border--radius-medium);
7
6
  box-shadow: var(--shadow);
8
- display: flex;
9
7
  flex-direction: column;
8
+ overflow: hidden;
9
+ display: flex;
10
+ padding: var(--space--nano);
11
+ }
12
+
13
+ .box_split-item > .ez-split-item--content {
10
14
  overflow: auto;
11
15
  }
12
16
 
@@ -32,5 +36,5 @@
32
36
 
33
37
  .ez-split-item--content {
34
38
  display: block;
35
- height: -webkit-fill-available;
39
+ height: 100%;
36
40
  }
@@ -1,9 +1,10 @@
1
- import { h } from '@stencil/core';
1
+ import { Host, h } from '@stencil/core';
2
2
  export class SplitItem {
3
3
  constructor() {
4
4
  this.label = undefined;
5
5
  this.enableExpand = true;
6
6
  this._expanded = false;
7
+ this.size = undefined;
7
8
  }
8
9
  /**
9
10
  * Alterna a visibilidade do painel.
@@ -12,7 +13,7 @@ export class SplitItem {
12
13
  this._expanded = !this._expanded;
13
14
  }
14
15
  render() {
15
- return (h("div", { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
16
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
16
17
  }
17
18
  static get is() { return "ez-split-item"; }
18
19
  static get originalStyleUrls() {
@@ -61,6 +62,26 @@ export class SplitItem {
61
62
  "attribute": "enable-expand",
62
63
  "reflect": true,
63
64
  "defaultValue": "true"
65
+ },
66
+ "size": {
67
+ "type": "string",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "string",
71
+ "resolved": "string",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": true,
76
+ "docs": {
77
+ "tags": [{
78
+ "name": "values",
79
+ "text": "'%', 'fr'"
80
+ }],
81
+ "text": "Define o tamanho inicial do painel."
82
+ },
83
+ "attribute": "size",
84
+ "reflect": false
64
85
  }
65
86
  };
66
87
  }
@@ -224,6 +224,12 @@ export const EzSkeleton: {
224
224
  new (): EzSkeleton;
225
225
  };
226
226
 
227
+ interface EzSplitButton extends Components.EzSplitButton, HTMLElement {}
228
+ export const EzSplitButton: {
229
+ prototype: EzSplitButton;
230
+ new (): EzSplitButton;
231
+ };
232
+
227
233
  interface EzSplitItem extends Components.EzSplitItem, HTMLElement {}
228
234
  export const EzSplitItem: {
229
235
  prototype: EzSplitItem;