@sankhyalabs/ezui 5.20.0-dev.1 → 5.20.0-dev.11

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 (122) hide show
  1. package/README.md +4 -5
  2. package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
  3. package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +12 -156
  5. package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -0
  7. package/dist/cjs/ez-form-view.cjs.entry.js +4 -2
  8. package/dist/cjs/ez-grid.cjs.entry.js +27 -21
  9. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
  11. package/dist/cjs/ez-number-input.cjs.entry.js +3 -0
  12. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-search.cjs.entry.js +611 -31
  14. package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
  15. package/dist/cjs/ez-split-item.cjs.entry.js +12 -2
  16. package/dist/cjs/ez-split-panel.cjs.entry.js +15 -12
  17. package/dist/cjs/ezui.cjs.js +1 -1
  18. package/dist/cjs/filter-column.cjs.entry.js +16 -5
  19. package/dist/cjs/index-a7b0c73d.js +10 -10
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +4 -3
  22. package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
  23. package/dist/collection/components/ez-card-item/ez-card-item.css +35 -0
  24. package/dist/collection/components/ez-combo-box/ez-combo-box.js +13 -174
  25. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
  26. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
  27. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
  28. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +11 -10
  29. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +15 -1
  30. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
  31. package/dist/collection/components/ez-grid/ez-grid.css +1 -0
  32. package/dist/collection/components/ez-grid/ez-grid.js +2 -2
  33. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
  34. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  35. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
  36. package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
  37. package/dist/collection/components/ez-popup/ez-popup.css +0 -1
  38. package/dist/collection/components/ez-search/ez-search.css +331 -0
  39. package/dist/collection/components/ez-search/ez-search.js +689 -55
  40. package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
  41. package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
  42. package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
  43. package/dist/collection/components/ez-split-panel/ez-split-panel.css +6 -7
  44. package/dist/collection/components/ez-split-panel/ez-split-panel.js +35 -14
  45. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +40 -12
  46. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +78 -2
  47. package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
  48. package/dist/custom-elements/index.d.ts +6 -0
  49. package/dist/custom-elements/index.js +895 -281
  50. package/dist/esm/ez-alert-list.entry.js +33 -28
  51. package/dist/esm/ez-card-item_3.entry.js +176 -0
  52. package/dist/esm/ez-combo-box.entry.js +13 -157
  53. package/dist/esm/ez-date-input.entry.js +3 -0
  54. package/dist/esm/ez-date-time-input.entry.js +3 -0
  55. package/dist/esm/ez-form-view.entry.js +4 -2
  56. package/dist/esm/ez-grid.entry.js +27 -21
  57. package/dist/esm/ez-icon.entry.js +1 -1
  58. package/dist/esm/ez-multi-selection-list.entry.js +2 -10
  59. package/dist/esm/ez-number-input.entry.js +3 -0
  60. package/dist/esm/ez-popup.entry.js +1 -1
  61. package/dist/esm/ez-search.entry.js +613 -33
  62. package/dist/esm/ez-split-button.entry.js +143 -0
  63. package/dist/esm/ez-split-item.entry.js +12 -2
  64. package/dist/esm/ez-split-panel.entry.js +15 -12
  65. package/dist/esm/ezui.js +1 -1
  66. package/dist/esm/filter-column.entry.js +16 -5
  67. package/dist/esm/index-baa5e267.js +10 -10
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/ezui/ezui.esm.js +1 -1
  70. package/dist/ezui/{p-51c5e071.entry.js → p-02c8831a.entry.js} +1 -1
  71. package/dist/ezui/{p-f56dd1da.entry.js → p-07cbffce.entry.js} +1 -1
  72. package/dist/ezui/p-13dbad96.entry.js +1 -0
  73. package/dist/ezui/{p-c0f1715f.entry.js → p-18e7870d.entry.js} +1 -1
  74. package/dist/ezui/p-25ed09c6.entry.js +1 -0
  75. package/dist/ezui/p-428a05fe.entry.js +1 -0
  76. package/dist/ezui/p-50186acb.entry.js +1 -0
  77. package/dist/ezui/p-60848ef6.entry.js +1 -0
  78. package/dist/ezui/{p-6e2f8e6b.entry.js → p-661f6820.entry.js} +1 -1
  79. package/dist/ezui/p-672dd122.entry.js +1 -0
  80. package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
  81. package/dist/ezui/p-940ed30b.entry.js +1 -0
  82. package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
  83. package/dist/ezui/p-baf80b13.entry.js +1 -0
  84. package/dist/ezui/p-e52cbcc7.entry.js +1 -0
  85. package/dist/ezui/p-e562d05e.entry.js +1 -0
  86. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
  87. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -15
  88. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
  89. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  90. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
  91. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  92. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
  93. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
  94. package/dist/types/components/ez-search/ez-search.d.ts +100 -10
  95. package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
  96. package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
  97. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +23 -0
  98. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +22 -0
  99. package/dist/types/components.d.ts +170 -14
  100. package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
  101. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
  102. package/package.json +12 -4
  103. package/react/components.d.ts +1 -0
  104. package/react/components.js +1 -0
  105. package/react/components.js.map +1 -1
  106. package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
  107. package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
  108. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
  109. package/dist/esm/ez-card-item.entry.js +0 -48
  110. package/dist/esm/ez-filter-input_2.entry.js +0 -132
  111. package/dist/ezui/p-05f5a778.entry.js +0 -1
  112. package/dist/ezui/p-24d3fede.entry.js +0 -1
  113. package/dist/ezui/p-4a7f113d.entry.js +0 -1
  114. package/dist/ezui/p-5613fe63.entry.js +0 -1
  115. package/dist/ezui/p-596634e9.entry.js +0 -1
  116. package/dist/ezui/p-76ba9d67.entry.js +0 -1
  117. package/dist/ezui/p-796c1a88.entry.js +0 -1
  118. package/dist/ezui/p-a32aaac6.entry.js +0 -1
  119. package/dist/ezui/p-a5ac7151.entry.js +0 -1
  120. package/dist/ezui/p-af15c277.entry.js +0 -1
  121. package/dist/ezui/p-d6ffe679.entry.js +0 -1
  122. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
@@ -0,0 +1,229 @@
1
+ :host {
2
+
3
+ /* dimensions */
4
+ /*@doc Define a largura mínima do componente.*/
5
+ --ez-split-button--min-width: 24;
6
+ /*@doc Define a largura do componente.*/
7
+ --ez-split-button--width: 'auto';
8
+ /*@doc Define a altura do componente.*/
9
+ --ez-split-button__medium--height: 32px;
10
+ --ez-split-button__large--height: 42px;
11
+ /*@doc Define a largura do slot que contém o ícone.*/
12
+ --ez-split-button__medium-icon--width: 40px;
13
+ --ez-split-button__large-icon--width: 44px;
14
+ /*@doc Define o espaçamento entre o ícone e o label.*/
15
+ --ez-split-button__inline__icon--gap: 6px;
16
+ /*@doc Define o espaçamento superior ao label.*/
17
+ --ez-split-button__label--padding-top: 0px;
18
+ /*@doc Define o espaçamento inferior ao label.*/
19
+ --ez-split-button__label--padding-bottom: 0px;
20
+ /*@doc Define o espaçamento esquerdo ao ícone.*/
21
+ --ez-split-button__right-button--padding-left: 8px;
22
+ /* general */
23
+ /*@doc Define a cor do label.*/
24
+ --ez-split-button--color: var(--title--primary, #FFF);
25
+ /*@doc Define o tamanho do label.*/
26
+ --ez-split-button--font-size: var(--text--medium, 14px);
27
+ /*@doc Define a família da fonte do label.*/
28
+ --ez-split-button--font-family: var(--font-pattern, Arial);
29
+ /*@doc Define o peso da fonte do label.*/
30
+ --ez-split-button--font-weight: var(--text-weight--large);
31
+ /*@doc Define a cor de fundo do botão.*/
32
+ --ez-split-button--background-color: var(--background--medium, #008561);
33
+ /*@doc Define o raio da borda do botão.*/
34
+ --ez-split-button--border-radius: var(--border--radius-large, 12px);
35
+ /*@doc Define o estilo da borda do botão.*/
36
+ --ez-split-button--border: none;
37
+ /*@doc Define o alinhamento horizontal do conteúdo do botão.*/
38
+ --ez-split-button--justify-content: center;
39
+ /*@doc Define a cor do texto e do ícone quando o cursor está sobre o botão.*/
40
+ --ez-split-button--hover-color: var(--color--primary-600);
41
+ /*@doc Define a cor de fundo quando o cursor está sobre o botão.*/
42
+ --ez-split-button--hover--background-color: var(--background--medium, var(--ez-split-button--background-color));
43
+ /*@doc Define a cor do texto quando o botão está desabilitado.*/
44
+ --ez-split-button--disabled-color: var(--text--disable);
45
+ /*@doc Define a cor de fundo quando o botão está desabilitado.*/
46
+ --ez-split-button--disabled--background-color: var(--color--disable-secondary);
47
+ /*@doc Define o estido da borda quando o botão está selecionado.*/
48
+ --ez-split-button--focus--border: var(--border--medium, 2px) var(--color--primary-300);
49
+ /*@doc Define a sombra do botão quando selecionado.*/
50
+ --ez-split-button--focus--box-shadow: none;
51
+ /*@doc Define a cor do texto e do ícone ao ativar o botão.*/
52
+ --ez-split-button--active-color: var(--color--primary-700);
53
+ /*@doc Define a cor do fundo ao ativar o botão.*/
54
+ --ez-split-button--active--background-color: var(--background--strong);
55
+ }
56
+
57
+ ez-icon {
58
+ --ez-icon--color: inherit;
59
+ }
60
+
61
+ button {
62
+ /*private*/
63
+ position: relative;
64
+ display: flex;
65
+ align-items: center;
66
+ margin: 0;
67
+ cursor: pointer;
68
+ transition: background-color 0.2s linear;
69
+ white-space: nowrap;
70
+
71
+ /*public*/
72
+ min-width: var(--ez-split-button--min-width);
73
+ width: var(--ez-split-button--width);
74
+ height: var(--ez-split-button__medium--height);
75
+ font-family: var(--ez-split-button--font-family);
76
+ font-size: var(--ez-split-button--font-size);
77
+ font-weight: var(--ez-split-button--font-weight);
78
+ padding: var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;
79
+ border-top-left-radius: var(--ez-split-button--border-radius);
80
+ border-bottom-left-radius: var(--ez-split-button--border-radius);
81
+ background-color: var(--ez-split-button--background-color);
82
+ color: var(--ez-split-button--color);
83
+ fill: var(--ez-split-button--color);
84
+ border: var(--ez-split-button--border);
85
+ justify-content: var(--ez-split-button--justify-content);
86
+ }
87
+
88
+ label {
89
+ cursor: pointer;
90
+ }
91
+
92
+ button:active {
93
+ outline: none;
94
+ box-shadow: none;
95
+ background-color: var(--ez-split-button--active--background-color);
96
+ color: var(--ez-split-button--active-color);
97
+ fill: var(--ez-split-button--active-color);
98
+ --ez-icon--color: var(--ez-split-button--active-color);
99
+ }
100
+
101
+ .ez-split-button__left-button:focus,
102
+ .ez-split-button__right-button:focus {
103
+ outline: var(--ez-split-button--focus--border);
104
+ box-shadow: var(--ez-split-button--focus--box-shadow);
105
+ }
106
+
107
+ .ez-split-button__left-button:hover,
108
+ .ez-split-button__right-button:hover {
109
+ outline: none;
110
+ background-color: var(--ez-split-button--hover--background-color);
111
+ color: var(--ez-split-button--hover-color);
112
+ fill: var(--ez-split-button--hover-color);
113
+ --ez-icon--color: var(--ez-split-button--hover-color);
114
+ }
115
+
116
+ .ez-split-button__left-button:disabled,
117
+ .ez-split-button__left-button:disabled label,
118
+ .ez-split-button__right-button:disabled{
119
+ background-color: var(--ez-split-button--disabled--background-color);
120
+ color: var(--ez-split-button--disabled-color);
121
+ fill: var(--ez-split-button--disabled-color);
122
+ border: none;
123
+ --ez-icon--color: var(--ez-split-button--disabled-color);
124
+ cursor: not-allowed;
125
+ }
126
+
127
+ button.large {
128
+ height: var(--ez-split-button__large--height);
129
+ }
130
+
131
+ button.medium {
132
+ height: var(--ez-split-button__medium--height);
133
+ }
134
+
135
+ /*default*/
136
+ .default label {
137
+ padding: var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px;
138
+ }
139
+
140
+ /*icon-left*/
141
+ .icon-left {
142
+ gap: var(--ez-split-button__inline__icon--gap);
143
+ }
144
+
145
+ .icon-left label {
146
+ padding-right: 12px;
147
+ }
148
+
149
+ .icon-left ez-icon {
150
+ padding-left: 20px;
151
+ }
152
+
153
+ /*icon-only*/
154
+ .icon-only {
155
+ padding-left: 12px;
156
+ padding-right: 12px;
157
+ }
158
+
159
+ .ez-split-button__right-button {
160
+ border-top-right-radius: var(--ez-split-button--border-radius);
161
+ border-bottom-right-radius: var(--ez-split-button--border-radius);
162
+ border-top-left-radius: 0;
163
+ border-bottom-left-radius:0;
164
+ }
165
+
166
+ .ez-split-button__right-button--medium {
167
+ min-width: var(--ez-split-button__medium-icon--width);
168
+ }
169
+
170
+ .ez-split-button__right-button--large {
171
+ min-width: var(--ez-split-button__large-icon--width);
172
+ }
173
+
174
+ .ez-split-button__right-button--divider {
175
+ top: 10%;
176
+ bottom: 10%;
177
+ }
178
+ .ez-split-button__right-button--divider:before {
179
+ content: "";
180
+ position: absolute;
181
+ left: 0;
182
+ border-left: 1px solid rgba(0, 0, 0, 20%);
183
+ border-radius: 2px;
184
+ height: 75%;
185
+ }
186
+
187
+ .btn-icon--medium {
188
+ min-width: --ez-split-button__medium-icon--width;
189
+ }
190
+
191
+ .btn-icon--large {
192
+ min-width: --ez-split-button__large-icon--width;
193
+ }
194
+
195
+ .ez-split-button__right-button-container {
196
+ position: absolute;
197
+ left: 0;
198
+ padding-left: var(--ez-split-button__right-button--padding-left);
199
+ }
200
+
201
+ .label-icon {
202
+ display: flex;
203
+ flex-direction: row;
204
+ align-items: center;
205
+ color: var(--ez-split-button--color);
206
+ }
207
+
208
+ .label-icon:active {
209
+ color: var(--ez-split-button--active-color);
210
+ fill: var(--ez-split-button--active-color);
211
+ --ez-icon--color: var(--ez-split-button--active-color);
212
+ }
213
+
214
+ .dropdown {
215
+ display: flex;
216
+ }
217
+
218
+ .dropdown-content {
219
+ display: block;
220
+ position: absolute;
221
+ background-color: #f1f1f1;
222
+ min-width: 160px;
223
+ z-index: --ez-elevation--8;
224
+ border-radius: var(--ez-split-button--border-radius);
225
+ }
226
+
227
+ .dropdown-content > ez-dropdown {
228
+ position: relative;
229
+ }
@@ -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
+ ];