@sankhyalabs/ezui 1.1.75 → 1.1.78

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 (195) hide show
  1. package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
  2. package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
  3. package/dist/cjs/CSSVarsUtils-66e86394.js +18 -0
  4. package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
  5. package/dist/cjs/DateUtils-716769e0.js +46 -0
  6. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-application.cjs.entry.js +26 -0
  8. package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
  9. package/dist/cjs/ez-calendar.cjs.entry.js +217 -0
  10. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +634 -0
  11. package/dist/cjs/ez-combo-box.cjs.entry.js +254 -0
  12. package/dist/cjs/ez-date-time-input.cjs.entry.js +133 -0
  13. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-form.cjs.entry.js +1838 -0
  15. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-number-input.cjs.entry.js +36 -212
  17. package/dist/cjs/ez-popover.cjs.entry.js +3 -3
  18. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  19. package/dist/cjs/ez-time-input.cjs.entry.js +10 -9
  20. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  21. package/dist/cjs/ezui.cjs.js +3 -3
  22. package/dist/cjs/form-metadata.cjs.entry.js +129 -0
  23. package/dist/cjs/index-40ebb2be.js +7422 -0
  24. package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
  25. package/dist/cjs/loader.cjs.js +3 -3
  26. package/dist/collection/collection-manifest.json +8 -3
  27. package/dist/collection/components/ez-application/ez-application.css +3 -0
  28. package/dist/collection/components/ez-application/ez-application.js +35 -0
  29. package/dist/collection/components/ez-button/ez-button.css +78 -44
  30. package/dist/collection/components/ez-button/ez-button.js +36 -4
  31. package/dist/collection/components/ez-calendar/ez-calendar.css +70 -3
  32. package/dist/collection/components/ez-calendar/ez-calendar.js +173 -24
  33. package/dist/collection/components/ez-check/ez-check.css +78 -78
  34. package/dist/collection/components/ez-check/ez-check.js +3 -3
  35. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
  36. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
  37. package/dist/collection/components/ez-combo-box/ez-combo-box.css +65 -54
  38. package/dist/collection/components/ez-combo-box/ez-combo-box.js +5 -0
  39. package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
  40. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -3
  41. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
  42. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +243 -0
  43. package/dist/collection/components/ez-form/ez-form.js +37 -35
  44. package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
  45. package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
  46. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
  47. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
  48. package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
  49. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +21 -21
  50. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  51. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
  52. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
  53. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  54. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
  55. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
  56. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  57. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  58. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
  59. package/dist/collection/components/ez-grid/ez-grid.css +15 -0
  60. package/dist/collection/components/ez-grid/ez-grid.js +414 -0
  61. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
  62. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
  63. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
  64. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
  65. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  66. package/dist/collection/components/ez-list/ez-list.css +227 -44
  67. package/dist/collection/components/ez-list/ez-list.js +529 -149
  68. package/dist/collection/components/ez-modal/ez-modal.css +4 -4
  69. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  70. package/dist/collection/components/ez-number-input/ez-number-input.css +1 -165
  71. package/dist/collection/components/ez-number-input/ez-number-input.js +53 -339
  72. package/dist/collection/components/ez-popover/ez-popover.css +10 -6
  73. package/dist/collection/components/ez-popup/ez-popup.css +25 -27
  74. package/dist/collection/components/ez-search/ez-search.js +6 -1
  75. package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
  76. package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
  77. package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
  78. package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
  79. package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
  80. package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
  81. package/dist/collection/components/ez-upload/ez-upload.js +3 -3
  82. package/dist/collection/components/test-du/test-du.css +3 -0
  83. package/dist/collection/components/test-du/test-du.js +45 -0
  84. package/dist/collection/servidor.js +94 -94
  85. package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
  86. package/dist/collection/utils/AssetsUtils.js +19 -0
  87. package/dist/collection/utils/CSSVarsUtils.js +6 -6
  88. package/dist/custom-elements/index.d.ts +36 -6
  89. package/dist/custom-elements/index.js +120886 -2964
  90. package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
  91. package/dist/esm/AssetsUtils-3803e935.js +22 -0
  92. package/dist/esm/CSSVarsUtils-aeee9825.js +16 -0
  93. package/dist/esm/DataUnit-1cd45202.js +464 -0
  94. package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
  95. package/dist/esm/ez-action-chip.entry.js +1 -1
  96. package/dist/esm/ez-application.entry.js +22 -0
  97. package/dist/esm/ez-button_11.entry.js +111757 -0
  98. package/dist/esm/ez-calendar.entry.js +213 -0
  99. package/dist/esm/ez-collapsible-box_6.entry.js +625 -0
  100. package/dist/esm/ez-combo-box.entry.js +250 -0
  101. package/dist/esm/ez-date-time-input.entry.js +129 -0
  102. package/dist/esm/ez-dialog.entry.js +1 -1
  103. package/dist/esm/ez-form.entry.js +1834 -0
  104. package/dist/esm/ez-label-chip.entry.js +1 -1
  105. package/dist/esm/ez-number-input.entry.js +36 -212
  106. package/dist/esm/ez-popover.entry.js +3 -3
  107. package/dist/esm/ez-popup.entry.js +2 -2
  108. package/dist/esm/ez-time-input.entry.js +5 -4
  109. package/dist/esm/ez-toast.entry.js +1 -1
  110. package/dist/esm/ezui.js +3 -3
  111. package/dist/esm/form-metadata.entry.js +125 -0
  112. package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
  113. package/dist/esm/index-ca8700cb.js +7414 -0
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/ezui/ezui.esm.js +1 -1
  116. package/dist/ezui/p-14bee38e.entry.js +1 -0
  117. package/dist/ezui/p-37a611ea.js +1 -0
  118. package/dist/ezui/p-3a09c678.entry.js +1 -0
  119. package/dist/ezui/p-43c15c94.entry.js +1 -0
  120. package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
  121. package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
  122. package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
  123. package/dist/ezui/p-7107d7ef.js +1 -0
  124. package/dist/ezui/p-72ff3c95.entry.js +1 -0
  125. package/dist/ezui/p-74f978db.entry.js +369 -0
  126. package/dist/ezui/p-88f45a83.entry.js +1 -0
  127. package/dist/ezui/p-8b099482.js +1 -0
  128. package/dist/ezui/p-8d6cdd3e.entry.js +1 -0
  129. package/dist/ezui/p-8f4851a6.js +1 -0
  130. package/dist/ezui/p-9dfd537e.js +1 -0
  131. package/dist/ezui/p-a0331955.entry.js +1 -0
  132. package/dist/ezui/p-a15093e3.entry.js +1 -0
  133. package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
  134. package/dist/ezui/p-a19f2af3.entry.js +1 -0
  135. package/dist/ezui/p-c6d469fc.entry.js +1 -0
  136. package/dist/ezui/p-c89629eb.js +1 -0
  137. package/dist/ezui/p-da929c01.js +1 -0
  138. package/dist/ezui/p-f3c5f27e.entry.js +1 -0
  139. package/dist/types/components/ez-application/ez-application.d.ts +10 -0
  140. package/dist/types/components/ez-button/ez-button.d.ts +5 -0
  141. package/dist/types/components/ez-calendar/ez-calendar.d.ts +21 -0
  142. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  143. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
  144. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
  145. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
  146. package/dist/types/components/ez-form/ez-form.d.ts +9 -9
  147. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
  148. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
  149. package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
  150. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
  151. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
  152. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
  153. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  154. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  155. package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
  156. package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
  157. package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
  158. package/dist/types/components/ez-list/ez-list.d.ts +70 -17
  159. package/dist/types/components/ez-number-input/ez-number-input.d.ts +29 -63
  160. package/dist/types/components/ez-search/ez-search.d.ts +2 -0
  161. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  162. package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
  163. package/dist/types/components/test-du/test-du.d.ts +6 -0
  164. package/dist/types/components.d.ts +289 -139
  165. package/dist/types/stencil-public-runtime.d.ts +6 -4
  166. package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
  167. package/dist/types/utils/AssetsUtils.d.ts +1 -0
  168. package/dist/types/utils/CSSVarsUtils.d.ts +1 -1
  169. package/package.json +10 -8
  170. package/react/components.d.ts +6 -1
  171. package/react/components.js +6 -1
  172. package/react/components.js.map +1 -1
  173. package/dist/cjs/CSSVarsUtils-f8827674.js +0 -18
  174. package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
  175. package/dist/cjs/ez-button_16.cjs.entry.js +0 -4071
  176. package/dist/cjs/ez-list.cjs.entry.js +0 -174
  177. package/dist/cjs/ez-modal.cjs.entry.js +0 -65
  178. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
  179. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
  180. package/dist/esm/CSSVarsUtils-e0128b01.js +0 -16
  181. package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
  182. package/dist/esm/ez-button_16.entry.js +0 -4052
  183. package/dist/esm/ez-list.entry.js +0 -170
  184. package/dist/esm/ez-modal.entry.js +0 -61
  185. package/dist/ezui/p-061d21ba.entry.js +0 -1
  186. package/dist/ezui/p-15743b09.entry.js +0 -1
  187. package/dist/ezui/p-46d07e59.entry.js +0 -1
  188. package/dist/ezui/p-4df6f855.js +0 -1
  189. package/dist/ezui/p-50464bdf.entry.js +0 -1
  190. package/dist/ezui/p-67410dfa.entry.js +0 -1
  191. package/dist/ezui/p-7be54779.entry.js +0 -1
  192. package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
  193. package/dist/ezui/p-9dfccb16.js +0 -1
  194. package/dist/ezui/p-d1889704.js +0 -1
  195. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
@@ -6,6 +6,8 @@ export class EzCalendar {
6
6
  this._todayLabel = "Hoje";
7
7
  this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
8
8
  this._monthLabels = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
9
+ this._hoursLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"];
10
+ this._minutosLabel = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"];
9
11
  /**
10
12
  * A data selecionada no calendário
11
13
  */
@@ -15,6 +17,14 @@ export class EzCalendar {
15
17
  * quando o método show() for acionado.
16
18
  */
17
19
  this.floating = false;
20
+ /**
21
+ * Exibe ou não as horas e minutos no calendario
22
+ */
23
+ this.time = false;
24
+ /**
25
+ * Exibe ou não os segundos no calendario
26
+ */
27
+ this.showSeconds = false;
18
28
  }
19
29
  /**
20
30
  * Usado no modo floating. Faz com que o componente seja exibido.
@@ -72,48 +82,151 @@ export class EzCalendar {
72
82
  forceUpdate(this);
73
83
  }
74
84
  selectDate(d) {
75
- this.value = d;
85
+ let newDate = d;
86
+ if (this.value && (this.time || this.showSeconds)) {
87
+ newDate.setHours(this.value.getHours());
88
+ newDate.setMinutes(this.value.getMinutes());
89
+ if (this.showSeconds) {
90
+ newDate.setSeconds(this.value.getSeconds());
91
+ }
92
+ else {
93
+ newDate.setSeconds(0);
94
+ }
95
+ }
96
+ this.value = newDate;
97
+ this.ezChange.emit();
98
+ }
99
+ selectHours(hour) {
100
+ if (!this.value) {
101
+ this.value = new Date();
102
+ }
103
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
76
104
  this.ezChange.emit();
77
105
  }
106
+ selectMinutes(minute) {
107
+ if (!this.value) {
108
+ this.value = new Date();
109
+ }
110
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
111
+ this.ezChange.emit();
112
+ }
113
+ selectSeconds(second) {
114
+ if (!this.value) {
115
+ this.value = new Date();
116
+ }
117
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
118
+ this.ezChange.emit();
119
+ }
120
+ updateScroll(element) {
121
+ if (element) {
122
+ const { scrollHeight, clientHeight, scrollTop } = element;
123
+ const remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
124
+ if (remainingScroll > 0) {
125
+ element.classList.add("endHidden");
126
+ }
127
+ else {
128
+ element.classList.remove("endHidden");
129
+ }
130
+ }
131
+ }
78
132
  componentDidRender() {
79
133
  if (this.floating && this._firstRender) {
80
134
  this._calendarHeight = this._box.clientHeight;
81
135
  this._box.remove();
82
136
  this._firstRender = false;
83
137
  }
138
+ this.updateScroll(this._hoursScroll);
139
+ this.updateScroll(this._minutesScroll);
140
+ this.updateScroll(this._secondsScroll);
141
+ }
142
+ componentDidLoad() {
143
+ if (this.time || this.showSeconds) {
144
+ this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
145
+ this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
146
+ if (this.showSeconds) {
147
+ this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
148
+ }
149
+ }
84
150
  }
85
151
  render() {
86
152
  if (this._currentPosition == null) {
87
153
  this._currentPosition = new Date();
88
- this._currentPosition.setTime(this.value.getTime());
154
+ if (this.value) {
155
+ this._currentPosition.setTime(this.value.getTime());
156
+ }
89
157
  this._currentPosition.setDate(1);
90
158
  }
91
159
  const firstDate = new Date();
92
160
  firstDate.setTime(this._currentPosition.getTime());
93
161
  firstDate.setDate(1 - firstDate.getDay());
94
162
  return (h("section", { ref: elem => this._container = elem },
95
- h("div", { class: "calendar", ref: elem => this._box = elem },
96
- h("div", { class: "calendar__header" },
97
- h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
98
- h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
99
- h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
100
- h("div", { class: "calendar__body" },
101
- h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
102
- [0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
103
- const date = new Date();
104
- date.setTime(firstDate.getTime());
105
- date.setDate(date.getDate() + offset + index);
106
- let classNames = "calendar__cell";
107
- if (this._currentPosition.getMonth() != date.getMonth()) {
108
- classNames += " calendar__cell--secondary";
109
- }
110
- else if (this.isSelectedDate(date)) {
111
- classNames += " calendar__cell--selected";
112
- }
113
- return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
114
- })))),
115
- h("div", { class: "calendar__footer" },
116
- h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel)))));
163
+ h("div", { ref: elem => this._box = elem, style: { display: 'flex' } },
164
+ h("div", { class: "calendar" },
165
+ h("div", { class: "calendar__header" },
166
+ h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
167
+ h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
168
+ h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
169
+ h("div", { class: "calendar__body" },
170
+ h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
171
+ [0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
172
+ const date = new Date();
173
+ date.setTime(firstDate.getTime());
174
+ date.setDate(date.getDate() + offset + index);
175
+ let classNames = "calendar__cell";
176
+ if (this._currentPosition.getMonth() != date.getMonth()) {
177
+ classNames += " calendar__cell--secondary";
178
+ }
179
+ else if (this.isSelectedDate(date)) {
180
+ classNames += " calendar__cell--selected";
181
+ }
182
+ return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
183
+ })))),
184
+ h("div", { class: "calendar__footer" },
185
+ h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))),
186
+ (this.time || this.showSeconds) &&
187
+ h("div", { class: "calendarTime" },
188
+ h("div", { class: "calendarTime__header" },
189
+ h("div", null, "H"),
190
+ h("div", { class: "separatorTime" }, ":"),
191
+ h("div", null, "M"),
192
+ this.showSeconds &&
193
+ h("div", { class: "separatorTime" }, ":"),
194
+ this.showSeconds &&
195
+ h("div", null, "S")),
196
+ h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '6px', paddingRight: '6px' } },
197
+ h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index) => {
198
+ if (index === this.value.getHours()) {
199
+ return (h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem },
200
+ h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index) }, offset),
201
+ h("div", { class: "separatorTime" }, ":")));
202
+ }
203
+ else {
204
+ return (h("div", { style: { display: 'flex' } },
205
+ h("div", { class: "calendar__cell", onClick: () => this.selectHours(index) }, offset),
206
+ h("div", { class: "separatorTime" }, ":")));
207
+ }
208
+ })),
209
+ h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index) => {
210
+ if (index === this.value.getMinutes()) {
211
+ return (h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem },
212
+ h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index) }, offset),
213
+ this.showSeconds && h("div", { class: "separatorTime" }, ":")));
214
+ }
215
+ else {
216
+ return (h("div", { style: { display: 'flex' } },
217
+ h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index) }, offset),
218
+ this.showSeconds && h("div", { class: "separatorTime" }, ":")));
219
+ }
220
+ })),
221
+ this.showSeconds &&
222
+ h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index) => {
223
+ if (index === this.value.getSeconds()) {
224
+ return (h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index), ref: elem => this._secondsSelect = elem }, offset));
225
+ }
226
+ else {
227
+ return (h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index) }, offset));
228
+ }
229
+ })))))));
117
230
  }
118
231
  static get is() { return "ez-calendar"; }
119
232
  static get encapsulation() { return "shadow"; }
@@ -161,6 +274,42 @@ export class EzCalendar {
161
274
  "attribute": "floating",
162
275
  "reflect": true,
163
276
  "defaultValue": "false"
277
+ },
278
+ "time": {
279
+ "type": "boolean",
280
+ "mutable": false,
281
+ "complexType": {
282
+ "original": "boolean",
283
+ "resolved": "boolean",
284
+ "references": {}
285
+ },
286
+ "required": false,
287
+ "optional": false,
288
+ "docs": {
289
+ "tags": [],
290
+ "text": "Exibe ou n\u00E3o as horas e minutos no calendario"
291
+ },
292
+ "attribute": "time",
293
+ "reflect": true,
294
+ "defaultValue": "false"
295
+ },
296
+ "showSeconds": {
297
+ "type": "boolean",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "boolean",
301
+ "resolved": "boolean",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": false,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": "Exibe ou n\u00E3o os segundos no calendario"
309
+ },
310
+ "attribute": "show-seconds",
311
+ "reflect": true,
312
+ "defaultValue": "false"
164
313
  }
165
314
  }; }
166
315
  static get events() { return [{
@@ -5,96 +5,96 @@
5
5
  ***************/
6
6
  /*dimensions */
7
7
  /*@doc Define a largura do box do checkbox.*/
8
- --check--box--width: 18px;
8
+ --ez-check--box--width: 18px;
9
9
  /*@doc Define a altura do box do checkbox.*/
10
- --check--box--height: 18px;
10
+ --ez-check--box--height: 18px;
11
11
  /*@doc Define a largura do input do checkbox.*/
12
- --check--width: calc(var(--check--box--width) + 14px);
12
+ --ez-check--width: calc(var(--ez-check--box--width) + 14px);
13
13
  /*@doc Define a altura do input do checkbox */
14
- --check--height: calc(var(--check--box--width) + 14px);
14
+ --ez-check--height: calc(var(--ez-check--box--width) + 14px);
15
15
 
16
16
  /*general*/
17
17
  /*@doc Define o raio da borda do input do checkbox.*/
18
- --check--border-radius: var(--border--radius-small);
18
+ --ez-check--border-radius: var(--border--radius-small);
19
19
 
20
20
  /*box*/
21
21
  /*@doc Define a cor de fundo do input do checkbox quando marcado.*/
22
- --check--checked--background-color: var(--color--primary-200);
22
+ --ez-check--checked--background-color: var(--color--primary-200);
23
23
  /*@doc Define a cor de fundo do input do checkbox quando focado.*/
24
- --check--focus--background-color: var(--color--strokes, #FFFFFF);
24
+ --ez-check--focus--background-color: var(--color--strokes, #FFFFFF);
25
25
  /*@doc Define a cor de fundo do input do checkbox quando o cursor está sobre ele.*/
26
- --check--hover--background-color: var(--background--medium);
26
+ --ez-check--hover--background-color: var(--background--medium);
27
27
  /*@doc Define a cor de fundo do input do checkbox quando marcado e desabilitado.*/
28
- --check--checked--disabled--background-color: var(--color--disable-secondary);
28
+ --ez-check--checked--disabled--background-color: var(--color--disable-secondary);
29
29
 
30
30
  /*@doc Define o estilo da borda do input do checkbox.*/
31
- --check--border: var(--border--medium) var(--title--primary);
31
+ --ez-check--border: var(--border--medium) var(--title--primary);
32
32
  /*@doc Define o estilo da borda do input do checkbox quando desabilitado.*/
33
- --check--disabled--border: var(--border--medium) var(--color--strokes);
33
+ --ez-check--disabled--border: var(--border--medium) var(--color--strokes);
34
34
  /*@doc Define o estilo da borda do input do checkbox quando marcado.*/
35
- --check--checked--border: var(--border--medium) var(--color--primary);
35
+ --ez-check--checked--border: var(--border--medium) var(--color--primary);
36
36
 
37
37
 
38
38
  /*@doc Define a cor de fundo do input do checkbox quando ativo e com o cursor sobre ele.*/
39
- --check--checked--hover--background-color: var(--color--primary-200);
39
+ --ez-check--checked--hover--background-color: var(--color--primary-200);
40
40
  /*@doc Define a cor de fundo do input do checkbox quando ativo e focado.*/
41
- --check--checked--focus--background-color: var(--color--primary-300, #FFFFFF);
41
+ --ez-check--checked--focus--background-color: var(--color--primary-300, #FFFFFF);
42
42
 
43
43
  /*check*/
44
44
  /*@doc Contém o ícone do input marcado.*/
45
- --check--check--image: url('data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>');
45
+ --ez-check--check--image: url('data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>');
46
46
  /*@doc Define a cor de fundo do slot do ícone quando marcado.*/
47
- --check--check--background-color: var(--color--primary);
47
+ --ez-check--check--background-color: var(--color--primary);
48
48
  /*@doc Define a cor de fundo do slot do ícone quando marcado e desabilitado.*/
49
- --check--check--disabled--background-color: var(--color--strokes);
49
+ --ez-check--check--disabled--background-color: var(--color--strokes);
50
50
 
51
51
  /***************
52
52
  Switch mode
53
53
  ***************/
54
54
  /*dimensions */
55
55
  /*@doc Define a largura do slider do checkbox.*/
56
- --switch--slider--width: 34px;
56
+ --ez-switch--slider--width: 34px;
57
57
  /*@doc Define a altura do slider do checkbox.*/
58
- --switch--slider--height: 14px;
58
+ --ez-switch--slider--height: 14px;
59
59
  /*@doc Define a largura do pino do slider do checkbox.*/
60
- --switch--pin--width: 20px;
60
+ --ez-switch--pin--width: 20px;
61
61
  /*@doc Define a altura do pino do slider do checkbox.*/
62
- --switch--pin--height: 20px;
62
+ --ez-switch--pin--height: 20px;
63
63
  /*@doc Define a largura do slider quando focado.*/
64
- --switch--focus--width: 32px;
64
+ --ez-switch--focus--width: 32px;
65
65
  /*@doc Define a altura do slider quando focado.*/
66
- --switch--focus--height: 32px;
66
+ --ez-switch--focus--height: 32px;
67
67
 
68
68
  /*background*/
69
69
  /*@doc Define a cor de fundo do checkbox no modo switch.*/
70
- --switch--background-color: var(--color--strokes);
70
+ --ez-switch--background-color: var(--color--strokes);
71
71
  /*@doc Define a cor de fundo do checkbox desabilitado no modo switch.*/
72
- --switch--disabled--background-color: var(--color--disable-secondary);
72
+ --ez-switch--disabled--background-color: var(--color--disable-secondary);
73
73
  /*@doc Define a cor de fundo do checkbox marcado no modo switch.*/
74
- --switch--checked--background-color: var(--color--primary-300);
74
+ --ez-switch--checked--background-color: var(--color--primary-300);
75
75
 
76
76
  /*pin*/
77
77
  /*@doc Define a cor de fundo do pino do slider. */
78
- --switch--pin--background-color: var(--background--xlight);
78
+ --ez-switch--pin--background-color: var(--background--xlight);
79
79
  /*@doc Define a cor de fundo do pino do slider quando desabilitado. */
80
- --switch--pin--disabled--background-color: var(--color--disable-secondary);
80
+ --ez-switch--pin--disabled--background-color: var(--color--disable-secondary);
81
81
  /*@doc Define a cor de fundo do pino do slider quando marcado. */
82
- --switch--pin--checked--background-color: var(--color--primary);
82
+ --ez-switch--pin--checked--background-color: var(--color--primary);
83
83
  /*@doc Define a cor de fundo do pino do slider quando marcado e desabilitado1. */
84
- --switch--pin--checked--disabled--background-color: #E8F7F4;
84
+ --ez-switch--pin--checked--disabled--background-color: #E8F7F4;
85
85
  /*@doc Define a cor de fundo do pino do slider quando focado. */
86
- --switch--pin--focus--background-color: var(--text--disable);
86
+ --ez-switch--pin--focus--background-color: var(--text--disable);
87
87
  /*@doc Define a cor de fundo do pino do slider quando marcado e focado. */
88
- --switch--pin--checked--focus--background-color: var(--color--primary);
88
+ --ez-switch--pin--checked--focus--background-color: var(--color--primary);
89
89
 
90
90
  /*@doc Define o tamanho da fonte do label.*/
91
- --check--label--font-size: var(--text--medium, 14px);
91
+ --ez-check--label--font-size: var(--text--medium, 14px);
92
92
  /*@doc Define a família da fonte do label.*/
93
- --check--label--font-family: var(--font-pattern, Arial);
93
+ --ez-check--label--font-family: var(--font-pattern, Arial);
94
94
  /*@doc Define a cor da fonte do label.*/
95
- --check--label--color: var(--title--primary, #000);
95
+ --ez-check--label--color: var(--title--primary, #000);
96
96
  /*@doc Define a cor da fonte do label quando desabilitado.*/
97
- --check--label--disabled--color: var(--text--disable, #AFB6C0);
97
+ --ez-check--label--disabled--color: var(--text--disable, #AFB6C0);
98
98
 
99
99
  /***************
100
100
  host style
@@ -123,14 +123,14 @@ input.regularMode {
123
123
 
124
124
 
125
125
  /*public*/
126
- width: var(--check--width);
127
- height: var(--check--height);
126
+ width: var(--ez-check--width);
127
+ height: var(--ez-check--height);
128
128
  }
129
129
 
130
130
 
131
131
  input.regularMode:enabled:hover {
132
132
  /*public*/
133
- background-color: var(--check--hover--background-color);
133
+ background-color: var(--ez-check--hover--background-color);
134
134
  }
135
135
 
136
136
  input.regularMode:enabled:focus {
@@ -138,7 +138,7 @@ input.regularMode:enabled:focus {
138
138
  outline: none;
139
139
 
140
140
  /*public*/
141
- background-color: var(--check--focus--background-color);
141
+ background-color: var(--ez-check--focus--background-color);
142
142
  }
143
143
 
144
144
  input.regularMode:disabled {
@@ -154,38 +154,38 @@ input.regularMode::before {
154
154
  display: block;
155
155
 
156
156
  /*public*/
157
- width: var(--check--box--width);
158
- height: var(--check--box--height);
159
- border-radius: var(--check--border-radius);
160
- border: var(--check--border);
157
+ width: var(--ez-check--box--width);
158
+ height: var(--ez-check--box--height);
159
+ border-radius: var(--ez-check--border-radius);
160
+ border: var(--ez-check--border);
161
161
  }
162
162
 
163
163
  input.regularMode:disabled::before {
164
164
  /*public*/
165
- border: var(--check--disabled--border);
165
+ border: var(--ez-check--disabled--border);
166
166
  }
167
167
 
168
168
  /*-------------------------------checked---------------------------------*/
169
169
  input.regularMode:checked:enabled:hover {
170
170
  /*public*/
171
- background-color: var(--check--checked--hover--background-color);
171
+ background-color: var(--ez-check--checked--hover--background-color);
172
172
  }
173
173
 
174
174
  input.regularMode:checked:enabled:focus {
175
175
  /*public*/
176
- background-color: var(--check--checked--focus--background-color);
176
+ background-color: var(--ez-check--checked--focus--background-color);
177
177
  }
178
178
 
179
179
  input.regularMode:checked::before {
180
180
  /*public*/
181
- border: var(--check--checked--border);
182
- background-color: var(--check--checked--background-color);
181
+ border: var(--ez-check--checked--border);
182
+ background-color: var(--ez-check--checked--background-color);
183
183
  }
184
184
 
185
185
  input.regularMode:checked:disabled:before {
186
186
  /*public*/
187
- border: var(--check--disabled--border);
188
- background-color: var(--check--checked--disabled--background-color);
187
+ border: var(--ez-check--disabled--border);
188
+ background-color: var(--ez-check--checked--disabled--background-color);
189
189
  }
190
190
 
191
191
  input.regularMode:checked::after {
@@ -193,18 +193,18 @@ input.regularMode:checked::after {
193
193
  display: flex;
194
194
  position: absolute;
195
195
  content: "";
196
- background-color: var(--check--check--background-color);
196
+ background-color: var(--ez-check--check--background-color);
197
197
  width: 8px;
198
198
  height: 7px;
199
199
 
200
200
  /*public*/
201
- -webkit-mask-image: var(--check--check--image);
202
- mask-image: var(--check--check--image);
201
+ -webkit-mask-image: var(--ez-check--check--image);
202
+ mask-image: var(--ez-check--check--image);
203
203
  }
204
204
 
205
205
  input.regularMode:checked:disabled::after {
206
206
  /*public*/
207
- background-color: var(--check--check--disabled--background-color);
207
+ background-color: var(--ez-check--check--disabled--background-color);
208
208
  }
209
209
 
210
210
  /******** SWITCH MODE ********/
@@ -222,14 +222,14 @@ input.switchMode {
222
222
  transition: background-color var(--transition);
223
223
 
224
224
  /*public*/
225
- width: var(--switch--slider--width);
226
- height: var(--switch--slider--height);
227
- background-color: var(--switch--background-color);
225
+ width: var(--ez-switch--slider--width);
226
+ height: var(--ez-switch--slider--height);
227
+ background-color: var(--ez-switch--background-color);
228
228
  }
229
229
 
230
230
  input.switchMode:disabled {
231
231
  /*public*/
232
- background-color: var(--switch--disabled--background-color);
232
+ background-color: var(--ez-switch--disabled--background-color);
233
233
  }
234
234
 
235
235
  input.switchMode::after {
@@ -244,14 +244,14 @@ input.switchMode::after {
244
244
  border-radius: 50%;
245
245
 
246
246
  /*public*/
247
- width: var(--switch--pin--width);
248
- height: var(--switch--pin--height);
249
- background-color: var(--switch--pin--background-color);
247
+ width: var(--ez-switch--pin--width);
248
+ height: var(--ez-switch--pin--height);
249
+ background-color: var(--ez-switch--pin--background-color);
250
250
  }
251
251
 
252
252
  input.switchMode:disabled::after {
253
253
  /*public*/
254
- background-color: var(--switch--pin--disabled--background-color);
254
+ background-color: var(--ez-switch--pin--disabled--background-color);
255
255
  }
256
256
 
257
257
  /*-------------------------------ON---------------------------------*/
@@ -260,7 +260,7 @@ input.switchMode:checked {
260
260
  transition: background-color var(--transition);
261
261
 
262
262
  /*public*/
263
- background-color: var(--switch--checked--background-color);
263
+ background-color: var(--ez-switch--checked--background-color);
264
264
  }
265
265
 
266
266
  input.switchMode::before {
@@ -273,11 +273,11 @@ input.switchMode::before {
273
273
  opacity: 0;
274
274
 
275
275
  /*public*/
276
- width: var(--switch--focus--width);
277
- height: var(--switch--focus--height);
278
- top: calc((var(--switch--slider--height) - var(--switch--focus--height)) / 2);
279
- left: calc((var(--switch--pin--width) - var(--switch--focus--width))/2);
280
- background-color: var(--switch--pin--focus--background-color);
276
+ width: var(--ez-switch--focus--width);
277
+ height: var(--ez-switch--focus--height);
278
+ top: calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);
279
+ left: calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);
280
+ background-color: var(--ez-switch--pin--focus--background-color);
281
281
  }
282
282
 
283
283
  input.switchMode:focus::before {
@@ -288,24 +288,24 @@ input.switchMode:focus::before {
288
288
 
289
289
  input.switchMode:checked:focus::before {
290
290
  /*private*/
291
- background-color: var(--switch--pin--checked--focus--background-color);
292
- transform: translateX(calc(var(--switch--slider--width) - var(--switch--pin--width)));
291
+ background-color: var(--ez-switch--pin--checked--focus--background-color);
292
+ transform: translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)));
293
293
  }
294
294
 
295
295
  input.switchMode:checked::after {
296
296
  /*private*/
297
297
  transition: transform var(--transition);
298
298
  transition: background-color var(--transition);
299
- transform: translateX(calc(var(--switch--slider--width) - var(--switch--pin--width))) translateY(-3px);
299
+ transform: translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);
300
300
  box-shadow: var(--shadow);
301
301
 
302
302
  /*public*/
303
- background-color: var(--switch--pin--checked--background-color);
303
+ background-color: var(--ez-switch--pin--checked--background-color);
304
304
  }
305
305
 
306
306
  input.switchMode:checked:disabled::after {
307
307
  /*public*/
308
- background-color: var(--switch--pin--checked--disabled--background-color);
308
+ background-color: var(--ez-switch--pin--checked--disabled--background-color);
309
309
  }
310
310
 
311
311
  .label {
@@ -313,14 +313,14 @@ input.switchMode:checked:disabled::after {
313
313
  white-space: nowrap;
314
314
  overflow: hidden;
315
315
  text-overflow: ellipsis;
316
- color: var(--check--label--color);
316
+ color: var(--ez-check--label--color);
317
317
  text-shadow: var(--text-shadow);
318
- font-size: var(--check--label--font-size);
319
- font-family: var(--check--label--font-family);
318
+ font-size: var(--ez-check--label--font-size);
319
+ font-family: var(--ez-check--label--font-family);
320
320
  cursor: default;
321
321
  padding-left: var(--space--small);
322
322
  }
323
323
 
324
324
  .label--disabled {
325
- color: var(--check--label--disabled--color);
325
+ color: var(--ez-check--label--disabled--color);
326
326
  }
@@ -43,7 +43,7 @@ export class EzCheck {
43
43
  }
44
44
  changeValue() {
45
45
  this.value = !this.value;
46
- this.ezChange.emit();
46
+ this.ezChange.emit(this.value);
47
47
  }
48
48
  getLabelClasses() {
49
49
  let classes = "label";
@@ -148,8 +148,8 @@ export class EzCheck {
148
148
  "text": "Evento disparado ao mudar o estado do check(onEzChange)."
149
149
  },
150
150
  "complexType": {
151
- "original": "string",
152
- "resolved": "string",
151
+ "original": "any",
152
+ "resolved": "any",
153
153
  "references": {}
154
154
  }
155
155
  }]; }