@sankhyalabs/ezui 1.1.74 → 1.1.77

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 (186) hide show
  1. package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
  2. package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
  3. package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
  4. package/dist/cjs/DateUtils-716769e0.js +46 -0
  5. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +28 -0
  7. package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
  8. package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
  9. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
  10. package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
  12. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-form.cjs.entry.js +1838 -0
  14. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
  16. package/dist/cjs/ez-popover.cjs.entry.js +3 -3
  17. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  18. package/dist/cjs/ez-time-input.cjs.entry.js +9 -8
  19. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  20. package/dist/cjs/ezui.cjs.js +3 -3
  21. package/dist/cjs/form-metadata.cjs.entry.js +129 -0
  22. package/dist/cjs/index-262d703b.js +7442 -0
  23. package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
  24. package/dist/cjs/loader.cjs.js +3 -3
  25. package/dist/collection/collection-manifest.json +8 -3
  26. package/dist/collection/components/ez-application/ez-application.css +3 -0
  27. package/dist/collection/components/ez-application/ez-application.js +37 -0
  28. package/dist/collection/components/ez-button/ez-button.css +78 -44
  29. package/dist/collection/components/ez-button/ez-button.js +36 -4
  30. package/dist/collection/components/ez-calendar/ez-calendar.css +132 -65
  31. package/dist/collection/components/ez-calendar/ez-calendar.js +180 -33
  32. package/dist/collection/components/ez-check/ez-check.css +78 -78
  33. package/dist/collection/components/ez-check/ez-check.js +3 -3
  34. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
  35. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
  36. package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
  37. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
  38. package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
  39. package/dist/collection/components/ez-date-input/ez-date-input.js +2 -2
  40. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
  41. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
  42. package/dist/collection/components/ez-form/ez-form.js +37 -35
  43. package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
  44. package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
  45. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
  46. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
  47. package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
  48. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +22 -22
  49. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  50. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
  51. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
  52. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  53. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
  54. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
  55. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  56. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  57. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
  58. package/dist/collection/components/ez-grid/ez-grid.css +15 -0
  59. package/dist/collection/components/ez-grid/ez-grid.js +414 -0
  60. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
  61. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
  62. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
  63. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
  64. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  65. package/dist/collection/components/ez-list/ez-list.css +227 -44
  66. package/dist/collection/components/ez-list/ez-list.js +529 -149
  67. package/dist/collection/components/ez-modal/ez-modal.css +4 -4
  68. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  69. package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
  70. package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
  71. package/dist/collection/components/ez-popover/ez-popover.css +10 -6
  72. package/dist/collection/components/ez-popup/ez-popup.css +25 -27
  73. package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
  74. package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
  75. package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
  76. package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
  77. package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
  78. package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
  79. package/dist/collection/components/ez-upload/ez-upload.css +41 -41
  80. package/dist/collection/components/ez-upload/ez-upload.js +55 -52
  81. package/dist/collection/components/test-du/test-du.css +3 -0
  82. package/dist/collection/components/test-du/test-du.js +45 -0
  83. package/dist/collection/servidor.js +94 -94
  84. package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
  85. package/dist/collection/utils/AssetsUtils.js +19 -0
  86. package/dist/custom-elements/index.d.ts +36 -6
  87. package/dist/custom-elements/index.js +121017 -3022
  88. package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
  89. package/dist/esm/AssetsUtils-3803e935.js +22 -0
  90. package/dist/esm/DataUnit-1cd45202.js +464 -0
  91. package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
  92. package/dist/esm/ez-action-chip.entry.js +1 -1
  93. package/dist/esm/ez-application.entry.js +24 -0
  94. package/dist/esm/ez-button_11.entry.js +111757 -0
  95. package/dist/esm/ez-calendar.entry.js +208 -0
  96. package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
  97. package/dist/esm/ez-combo-box.entry.js +246 -0
  98. package/dist/esm/ez-date-time-input.entry.js +140 -0
  99. package/dist/esm/ez-dialog.entry.js +1 -1
  100. package/dist/esm/ez-form.entry.js +1834 -0
  101. package/dist/esm/ez-label-chip.entry.js +1 -1
  102. package/dist/esm/ez-number-input.entry.js +61 -190
  103. package/dist/esm/ez-popover.entry.js +3 -3
  104. package/dist/esm/ez-popup.entry.js +2 -2
  105. package/dist/esm/ez-time-input.entry.js +4 -3
  106. package/dist/esm/ez-toast.entry.js +1 -1
  107. package/dist/esm/ezui.js +3 -3
  108. package/dist/esm/form-metadata.entry.js +125 -0
  109. package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
  110. package/dist/esm/index-cfd5e193.js +7433 -0
  111. package/dist/esm/loader.js +3 -3
  112. package/dist/ezui/ezui.esm.js +1 -1
  113. package/dist/ezui/p-1ea8187e.entry.js +369 -0
  114. package/dist/ezui/p-37a611ea.js +1 -0
  115. package/dist/ezui/p-45689464.entry.js +1 -0
  116. package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
  117. package/dist/ezui/p-57291f97.entry.js +1 -0
  118. package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
  119. package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
  120. package/dist/ezui/p-69416bec.entry.js +1 -0
  121. package/dist/ezui/p-7107d7ef.js +1 -0
  122. package/dist/ezui/p-7ef97c5f.entry.js +1 -0
  123. package/dist/ezui/p-88f45a83.entry.js +1 -0
  124. package/dist/ezui/p-8c51a6aa.entry.js +1 -0
  125. package/dist/ezui/p-8f4851a6.js +1 -0
  126. package/dist/ezui/p-9dfd537e.js +1 -0
  127. package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
  128. package/dist/ezui/p-a223eed8.entry.js +1 -0
  129. package/dist/ezui/p-b36308e7.js +1 -0
  130. package/dist/ezui/p-c0af195b.entry.js +1 -0
  131. package/dist/ezui/p-c6d469fc.entry.js +1 -0
  132. package/dist/ezui/p-c89629eb.js +1 -0
  133. package/dist/ezui/p-e7ee2836.entry.js +1 -0
  134. package/dist/ezui/p-f7b835cf.entry.js +1 -0
  135. package/dist/types/components/ez-application/ez-application.d.ts +12 -0
  136. package/dist/types/components/ez-button/ez-button.d.ts +5 -0
  137. package/dist/types/components/ez-calendar/ez-calendar.d.ts +25 -1
  138. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  139. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
  140. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
  141. package/dist/types/components/ez-form/ez-form.d.ts +9 -9
  142. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
  143. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
  144. package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
  145. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
  146. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
  147. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
  148. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  149. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  150. package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
  151. package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
  152. package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
  153. package/dist/types/components/ez-list/ez-list.d.ts +70 -17
  154. package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
  155. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  156. package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
  157. package/dist/types/components/ez-upload/ez-upload.d.ts +10 -7
  158. package/dist/types/components/test-du/test-du.d.ts +6 -0
  159. package/dist/types/components.d.ts +321 -149
  160. package/dist/types/stencil-public-runtime.d.ts +6 -4
  161. package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
  162. package/dist/types/utils/AssetsUtils.d.ts +1 -0
  163. package/package.json +10 -8
  164. package/react/components.d.ts +6 -1
  165. package/react/components.js +6 -1
  166. package/react/components.js.map +1 -1
  167. package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
  168. package/dist/cjs/ez-button_16.cjs.entry.js +0 -4065
  169. package/dist/cjs/ez-list.cjs.entry.js +0 -174
  170. package/dist/cjs/ez-modal.cjs.entry.js +0 -65
  171. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
  172. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
  173. package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
  174. package/dist/esm/ez-button_16.entry.js +0 -4046
  175. package/dist/esm/ez-list.entry.js +0 -170
  176. package/dist/esm/ez-modal.entry.js +0 -61
  177. package/dist/ezui/p-061d21ba.entry.js +0 -1
  178. package/dist/ezui/p-15743b09.entry.js +0 -1
  179. package/dist/ezui/p-25953d44.entry.js +0 -1
  180. package/dist/ezui/p-4df6f855.js +0 -1
  181. package/dist/ezui/p-50464bdf.entry.js +0 -1
  182. package/dist/ezui/p-67410dfa.entry.js +0 -1
  183. package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
  184. package/dist/ezui/p-907de194.entry.js +0 -1
  185. package/dist/ezui/p-9dfccb16.js +0 -1
  186. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
@@ -1,66 +1,68 @@
1
1
  :host {
2
2
  /*@doc Define a família da fonte do componente.*/
3
- --cal--font-family: var(--font-pattern, Arial);
3
+ --ez-calendar--font-family: var(--font-pattern, Arial);
4
4
  /*@doc Define a cor dos textos dentro do componente.*/
5
- --cal--color: var(--title--primary, #626e82);
5
+ --ez-calendar--color: var(--title--primary, #626e82);
6
6
  /*@doc Define a sombra dos textos dentro do componente.*/
7
- --cal--text-shadow: var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);
7
+ --ez-calendar--text-shadow: var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);
8
8
 
9
9
  /* cal__body */
10
10
  /*@doc Define a cor de fundo do corpo do calendário.*/
11
- --cal__body--background-color: var(--background--xlight, #FFF);
11
+ --ez-calendar__body--background-color: var(--background--xlight, #FFF);
12
+ /*@doc Define a cor de fundo do corpo da hora do calendário.*/
13
+ --ez-calendar__Time--background-color: var(--background--xlight, #FAFAFA);
12
14
  /*@doc Define o espaçamento do corpo do calendário.*/
13
- --cal__body--padding: var(--space--medium, 12px);
15
+ --ez-calendar__body--padding: var(--space--medium, 12px);
14
16
  /*@doc Define o raio da borda do corpo do calendário.*/
15
- --cal__body--border-radius: var(--border--radius-medium, 12px);
17
+ --ez-calendar__body--border-radius: var(--border--radius-medium, 12px);
16
18
  /*@doc Define a sombra do corpo do calendário.*/
17
- --cal__body--shadow: var(--shadow, 0px 0px 16px 0px #000);
19
+ --ez-calendar__body--shadow: var(--shadow, 0px 0px 16px 0px #000);
18
20
 
19
21
  /* cal__header */
20
22
  /*@doc Define a espessura da borda inferior do header.*/
21
- --cal__header-line--stroke: 2px;
23
+ --ez-calendar__header-line--stroke: 2px;
22
24
  /*@doc Define a cor da borda inferior do header.*/
23
- --cal__header-line--color: var(--color--strokes, #C0C0C0);
25
+ --ez-calendar__header-line--color: var(--color--strokes, #C0C0C0);
24
26
 
25
27
  /* nav buttons */
26
28
  /*@doc Define a cor do ícone de navegação.*/
27
- --cal__nav-btn--fill: var(--text--primary, #008561);
29
+ --ez-calendar__nav-btn--fill: var(--text--primary, #008561);
28
30
  /*@doc Define a cor do ícone de navegação quando o cursor está sobre ele.*/
29
- --cal__nav-btn--hover--fill: var(--color--primary, #350404);
31
+ --ez-calendar__nav-btn--hover--fill: var(--color--primary, #350404);
30
32
  /*@doc Define a largura do ícone de navegação.*/
31
- --cal__nav-btn--width: 10px;
33
+ --ez-calendar__nav-btn--width: 10px;
32
34
  /*@doc Define a altura do ícone de navegação.*/
33
- --cal__nav-btn--height: 16px;
35
+ --ez-calendar__nav-btn--height: 16px;
34
36
  /*@doc Contém a imagem do ícone de navegação à esquerda.*/
35
- --cal__nav-btn--previous-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>');
37
+ --ez-calendar__nav-btn--previous-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>');
36
38
  /*@doc Contém a imagem do ícone de navegação à direita.*/
37
- --cal__nav-btn--next-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>');
39
+ --ez-calendar__nav-btn--next-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>');
38
40
 
39
41
  /* cell */
40
42
  /*@doc Define o espaçamento vertical entre as células.*/
41
- --cal__cell--margin: 0px var(--space--small, 12px);
43
+ --ez-calendar__cell--margin: 0px var(--space--small, 12px);
42
44
  /*@doc Define a largura das células.*/
43
- --cal__cell--width: var(--space--large, 24px);
45
+ --ez-calendar__cell--width: var(--space--large, 24px);
44
46
  /*@doc Define o espaçamento horizontal entre as células.*/
45
- --cal__cell--padding: var(--space--extra-small, 3px) 0px;
47
+ --ez-calendar__cell--padding: var(--space--extra-small, 3px) 0px;
46
48
  /*@doc Define o raio da borda das células.*/
47
- --cal__cell--border-radius: var(--border--radius-small, 6px);
49
+ --ez-calendar__cell--border-radius: var(--border--radius-small, 6px);
48
50
  /*@doc Define a cor de fundo das células.*/
49
- --cal__cell--over--background-color: var(--color--strokes, #C0C0C0);
51
+ --ez-calendar__cell--over--background-color: var(--color--strokes, #E2F4EF);
50
52
  /*@doc Define a cor do texto para células secundárias (fora do mês selecionado).*/
51
- --cal__cell--outset--color: var(--color--strokes, #C0C0C0);
53
+ --ez-calendar__cell--outset--color: var(--color--strokes, #C0C0C0);
52
54
  /*@doc Define a cor de fundo das células selecionadas.*/
53
- --cal__cell--selected--background-color: var(--color--primary, #008561);
55
+ --ez-calendar__cell--selected--background-color: var(--color--primary, #008561);
54
56
  /*@doc Define a cor do texto da célula selecionada.*/
55
- --cal__cell--selected--color: var(--color--inverted, #FFF);
57
+ --ez-calendar__cell--selected--color: var(--color--inverted, #FFF);
56
58
 
57
59
  /* btn today */
58
60
  /*@doc Define a cor do texto do botão "Hoje".*/
59
- --cal__btn-today--color: var(--color--primary);
61
+ --ez-calendar__btn-today--color: var(--color--primary);
60
62
  /*@doc Define a cor de fundo do botão "Hoje" quando o cursor está sobre ele.*/
61
- --cal__btn-today--hover--background-color: var(--color--strokes, #C0C0C0);
63
+ --ez-calendar__btn-today--hover--background-color: var(--color--strokes, #E2F4EF);
62
64
  /*@doc Define o raio da borda do botão "Hoje".*/
63
- --cal__btn-today--border-radius: var(--border--radius-small, 6px);
65
+ --ez-calendar__btn-today--border-radius: var(--border--radius-small, 6px);
64
66
 
65
67
  /***************
66
68
  host style
@@ -78,10 +80,10 @@
78
80
  flex-direction: column;
79
81
 
80
82
  /*public*/
81
- background-color: var(--cal__body--background-color);
82
- padding: var(--cal__body--padding);
83
- border-radius: var(--cal__body--border-radius);
84
- box-shadow: var(--cal__body--shadow);
83
+ background-color: var(--ez-calendar__body--background-color);
84
+ padding: var(--ez-calendar__body--padding);
85
+ border-radius: var(--ez-calendar__body--border-radius);
86
+ box-shadow: var(--ez-calendar__body--shadow);
85
87
  }
86
88
 
87
89
  .calendar__header {
@@ -92,10 +94,10 @@
92
94
  margin: var(--space--small, 6px) var(--space--, 12px);
93
95
 
94
96
  /*public*/
95
- font-family: var(--cal--font-family);
96
- color: var(--cal--color);
97
- text-shadow: var(--cal--text-shadow);
98
- border-bottom: solid var(--cal__header-line--stroke) var(--cal__header-line--color);
97
+ font-family: var(--ez-calendar--font-family);
98
+ color: var(--ez-calendar--color);
99
+ text-shadow: var(--ez-calendar--text-shadow);
100
+ border-bottom: solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);
99
101
  }
100
102
 
101
103
  .calendar__btn-next, .calendar__btn-previous {
@@ -113,27 +115,27 @@
113
115
  display: flex;
114
116
 
115
117
  /*public*/
116
- background-color: var(--cal__nav-btn--fill);
118
+ background-color: var(--ez-calendar__nav-btn--fill);
117
119
  /*parece estranho, mas o bg funciona como fill pq aplicaremos a mascara.*/
118
- width: var(--cal__nav-btn--width);
119
- height: var(--cal__nav-btn--height);
120
+ width: var(--ez-calendar__nav-btn--width);
121
+ height: var(--ez-calendar__nav-btn--height);
120
122
  }
121
123
 
122
124
  .calendar__btn-previous::after {
123
125
  /*public*/
124
- -webkit-mask-image: var(--cal__nav-btn--previous-image);
125
- mask-image: var(--cal__nav-btn--previous-image);
126
+ -webkit-mask-image: var(--ez-calendar__nav-btn--previous-image);
127
+ mask-image: var(--ez-calendar__nav-btn--previous-image);
126
128
  }
127
129
 
128
130
  .calendar__btn-next::after {
129
131
  /*public*/
130
- -webkit-mask-image: var(--cal__nav-btn--next-image);
131
- mask-image: var(--cal__nav-btn--next-image);
132
+ -webkit-mask-image: var(--ez-calendar__nav-btn--next-image);
133
+ mask-image: var(--ez-calendar__nav-btn--next-image);
132
134
  }
133
135
 
134
136
  .calendar__btn-next:hover::after, .calendar__btn-previous:hover::after {
135
137
  /*public*/
136
- background-color: var(--cal__nav-btn--hover--fill);
138
+ background-color: var(--ez-calendar__nav-btn--hover--fill);
137
139
  }
138
140
 
139
141
  .calendar__lbl-month {
@@ -142,9 +144,9 @@
142
144
  font-size: var(--title--medium, 16px);
143
145
 
144
146
  /*public*/
145
- font-family: var(--cal--font-family);
146
- color: var(--cal--color);
147
- text-shadow: var(--cal--text-shadow);
147
+ font-family: var(--ez-calendar--font-family);
148
+ color: var(--ez-calendar--color);
149
+ text-shadow: var(--ez-calendar--text-shadow);
148
150
  }
149
151
 
150
152
  .calendar__line {
@@ -163,24 +165,24 @@
163
165
  font-size: var(--text--small, 12px);
164
166
 
165
167
  /*public*/
166
- font-family: var(--cal--font-family);
167
- color: var(--cal--color);
168
- text-shadow: var(--cal--text-shadow);
169
- padding: var(--cal__cell--padding);
170
- margin: var(--cal__cell--margin);
171
- min-width: var(--cal__cell--width);
172
- border-radius: var(--cal__cell--border-radius);
168
+ font-family: var(--ez-calendar--font-family);
169
+ color: var(--ez-calendar--color);
170
+ text-shadow: var(--ez-calendar--text-shadow);
171
+ padding: var(--ez-calendar__cell--padding);
172
+ margin: var(--ez-calendar__cell--margin);
173
+ min-width: var(--ez-calendar__cell--width);
174
+ border-radius: var(--ez-calendar__cell--border-radius);
173
175
  }
174
176
 
175
177
 
176
178
  .calendar__cell:hover {
177
179
  /*public*/
178
- background-color: var(--cal__cell--over--background-color);
180
+ background-color: var(--ez-calendar__cell--over--background-color);
179
181
  }
180
182
 
181
183
  .calendar__cell--secondary {
182
184
  /*public*/
183
- color: var(--cal__cell--outset--color);
185
+ color: var(--ez-calendar__cell--outset--color);
184
186
  }
185
187
 
186
188
  .calendar__cell--unselectable:hover {
@@ -195,15 +197,15 @@
195
197
  font-weight: var(--text-weight--large, 600);
196
198
 
197
199
  /*public*/
198
- font-family: var(--cal--font-family);
199
- color: var(--cal--color);
200
- text-shadow: var(--cal--text-shadow);
200
+ font-family: var(--ez-calendar--font-family);
201
+ color: var(--ez-calendar--color);
202
+ text-shadow: var(--ez-calendar--text-shadow);
201
203
  }
202
204
 
203
205
  .calendar__cell--selected, .calendar__cell--selected:hover {
204
206
  /*public*/
205
- background-color: var(--cal__cell--selected--background-color);
206
- color: var(--cal__cell--selected--color);
207
+ background-color: var(--ez-calendar__cell--selected--background-color);
208
+ color: var(--ez-calendar__cell--selected--color);
207
209
  }
208
210
 
209
211
  .calendar__body {
@@ -227,13 +229,78 @@
227
229
  padding: var(--space--extra-small, 6px);
228
230
 
229
231
  /*public*/
230
- font-family: var(--cal--font-family);
231
- text-shadow: var(--cal--text-shadow);
232
- color: var(--cal__btn-today--color);
233
- border-radius: var(--cal__btn-today--border-radius);
232
+ font-family: var(--ez-calendar--font-family);
233
+ text-shadow: var(--ez-calendar--text-shadow);
234
+ color: var(--ez-calendar__btn-today--color);
235
+ border-radius: var(--ez-calendar__btn-today--border-radius);
234
236
  }
235
237
 
236
238
  .calendar__btn-today:hover {
237
239
  /*public*/
238
- background-color: var(--cal__btn-today--hover--background-color);
239
- }
240
+ background-color: var(--ez-calendar__btn-today--hover--background-color);
241
+ }
242
+
243
+ section{
244
+ display: flex;
245
+ }
246
+
247
+ .calendarTime {
248
+ /*private*/
249
+ margin-left: -10px;
250
+ display: flex;
251
+ flex-direction: column;
252
+ padding: 12px 6px;
253
+ padding-left: 16px;
254
+ padding-bottom: 0px;
255
+
256
+ /*public*/
257
+ /*TODO Criar variavel para color o calendar_time var(--ez-calendar__body-time--background-color)*/
258
+ background-color: var(--ez-calendar__Time--background-color);
259
+ border-top-right-radius: var(--ez-calendar__body--border-radius);
260
+ border-bottom-right-radius: var(--ez-calendar__body--border-radius);
261
+ box-shadow: var(--ez-calendar__body--shadow);
262
+ }
263
+ .calendar__column {
264
+ height: 180px;
265
+ padding: 0px;
266
+ margin: 0px;
267
+ overflow: auto;
268
+ }
269
+
270
+ /* Scrollbar definido como 0 para não exibir o scroll mas permitir a rolagem */
271
+ .calendar__column::-webkit-scrollbar {
272
+ width: 0px;
273
+ max-width: 0px;
274
+ min-width: 0px;
275
+ }
276
+
277
+ .calendarTime__header{
278
+ /*private*/
279
+ padding-left: 6px;
280
+ padding-right: 6px;
281
+ display: flex;
282
+ justify-content: space-between;
283
+ padding-bottom: var(--space--medium, 12px);
284
+ margin: var(--space--small, 6px) var(--space--, 12px);
285
+ font-weight: var(--text-weight--large, 600);
286
+ font-size: var(--title--medium, 16px);
287
+
288
+
289
+ /*public*/
290
+ font-family: var(--ez-calendar--font-family);
291
+ color: var(--ez-calendar--color);
292
+ text-shadow: var(--ez-calendar--text-shadow);
293
+ border-bottom: solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);
294
+ font-family: var(--ez-calendar--font-family);
295
+ color: var(--ez-calendar--color);
296
+ text-shadow: var(--ez-calendar--text-shadow);
297
+ }
298
+
299
+ .separatorTime{
300
+ color: #A2ABB9;
301
+ }
302
+
303
+ .endHidden {
304
+ -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%);
305
+ }
306
+
@@ -1,11 +1,13 @@
1
- import { FloatingManager } from '@sankhyalabs/core';
2
- import { Component, forceUpdate, h, Prop, Method, Event, Watch } from '@stencil/core';
1
+ import { FloatingManager } from "@sankhyalabs/core";
2
+ import { Component, forceUpdate, h, Prop, Method, Event, Watch } from "@stencil/core";
3
3
  export class EzCalendar {
4
4
  constructor() {
5
5
  this._firstRender = true;
6
- this._todayLabel = 'Hoje';
7
- this._weekDayLabels = ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'];
8
- this._monthLabels = ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'];
6
+ this._todayLabel = "Hoje";
7
+ this._weekDayLabels = ["D", "S", "T", "Q", "Q", "S", "S"];
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.
@@ -26,18 +36,21 @@ export class EzCalendar {
26
36
  if (this.floating) {
27
37
  this._floatingID = FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
28
38
  window.requestAnimationFrame(() => {
29
- this._box.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
39
+ this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
30
40
  });
31
41
  }
32
42
  }
43
+ /**
44
+ * Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
45
+ */
33
46
  async fitVertical(topOffset, bottomOffset) {
34
47
  const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
35
48
  const availableBottom = (window.innerHeight || document.documentElement.clientHeight) > neededHeight;
36
49
  if (availableBottom) {
37
- this.show(topOffset + 'px', undefined, 'unset');
50
+ this.show(topOffset + "px", undefined, "unset");
38
51
  }
39
52
  else {
40
- this.show('unset', undefined, bottomOffset + 'px');
53
+ this.show("unset", undefined, bottomOffset + "px");
41
54
  }
42
55
  }
43
56
  /**
@@ -69,48 +82,146 @@ export class EzCalendar {
69
82
  forceUpdate(this);
70
83
  }
71
84
  selectDate(d) {
72
- this.value = d;
85
+ let newDate = d;
86
+ if (this.value) {
87
+ newDate.setHours(this.value.getHours());
88
+ newDate.setMinutes(this.value.getMinutes());
89
+ newDate.setSeconds(this.value.getSeconds());
90
+ }
91
+ this.value = newDate;
92
+ this.ezChange.emit();
93
+ }
94
+ selectHours(hour) {
95
+ if (!this.value) {
96
+ this.value = new Date();
97
+ }
98
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), hour, this.value.getMinutes(), this.value.getSeconds());
73
99
  this.ezChange.emit();
74
100
  }
101
+ selectMinutes(minute) {
102
+ if (!this.value) {
103
+ this.value = new Date();
104
+ }
105
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), minute, this.value.getSeconds());
106
+ this.ezChange.emit();
107
+ }
108
+ selectSeconds(second) {
109
+ if (!this.value) {
110
+ this.value = new Date();
111
+ }
112
+ this.value = new Date(this.value.getFullYear(), this.value.getMonth(), this.value.getDate(), this.value.getHours(), this.value.getMinutes(), second);
113
+ this.ezChange.emit();
114
+ }
115
+ updateScroll(element) {
116
+ if (element) {
117
+ const { scrollHeight, clientHeight, scrollTop } = element;
118
+ const remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
119
+ if (remainingScroll > 0) {
120
+ element.classList.add("endHidden");
121
+ }
122
+ else {
123
+ element.classList.remove("endHidden");
124
+ }
125
+ }
126
+ }
75
127
  componentDidRender() {
76
128
  if (this.floating && this._firstRender) {
77
129
  this._calendarHeight = this._box.clientHeight;
78
130
  this._box.remove();
79
131
  this._firstRender = false;
80
132
  }
133
+ this.updateScroll(this._hoursScroll);
134
+ this.updateScroll(this._minutesScroll);
135
+ this.updateScroll(this._secondsScroll);
136
+ }
137
+ componentDidLoad() {
138
+ if (this.time || this.showSeconds) {
139
+ this._hoursScroll.scrollTop = this._hoursSelect.offsetTop - 64;
140
+ this._minutesScroll.scrollTop = this._minutesSelect.offsetTop - 64;
141
+ if (this.showSeconds) {
142
+ this._secondsScroll.scrollTop = this._secondsSelect.offsetTop - 64;
143
+ }
144
+ }
81
145
  }
82
146
  render() {
83
147
  if (this._currentPosition == null) {
84
148
  this._currentPosition = new Date();
85
- this._currentPosition.setTime(this.value.getTime());
149
+ if (this.value) {
150
+ this._currentPosition.setTime(this.value.getTime());
151
+ }
86
152
  this._currentPosition.setDate(1);
87
153
  }
88
154
  const firstDate = new Date();
89
155
  firstDate.setTime(this._currentPosition.getTime());
90
156
  firstDate.setDate(1 - firstDate.getDay());
91
157
  return (h("section", { ref: elem => this._container = elem },
92
- h("div", { class: "calendar", ref: elem => this._box = elem },
93
- h("div", { class: "calendar__header" },
94
- h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
95
- h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
96
- h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
97
- h("div", { class: "calendar__body" },
98
- h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
99
- [0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
100
- const date = new Date();
101
- date.setTime(firstDate.getTime());
102
- date.setDate(date.getDate() + offset + index);
103
- let classNames = "calendar__cell";
104
- if (this._currentPosition.getMonth() != date.getMonth()) {
105
- classNames += " calendar__cell--secondary";
106
- }
107
- else if (this.isSelectedDate(date)) {
108
- classNames += " calendar__cell--selected";
109
- }
110
- return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
111
- })))),
112
- h("div", { class: "calendar__footer" },
113
- h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel)))));
158
+ h("div", { ref: elem => this._box = elem, style: { display: 'flex' } },
159
+ h("div", { class: "calendar" },
160
+ h("div", { class: "calendar__header" },
161
+ h("button", { class: "calendar__btn-previous", onClick: () => this.changeMonth(-1) }),
162
+ h("label", { class: "calendar__lbl-month" }, this.getMonthLabel()),
163
+ h("button", { class: "calendar__btn-next", onClick: () => this.changeMonth(1) })),
164
+ h("div", { class: "calendar__body" },
165
+ h("div", { class: "calendar__line" }, this._weekDayLabels.map(day => h("div", { class: "calendar__cell calendar__cell--unselectable" }, day))),
166
+ [0, 7, 14, 21, 28, 35].map(offset => h("div", { class: "calendar__line" }, [0, 1, 2, 3, 4, 5, 6].map(index => {
167
+ const date = new Date();
168
+ date.setTime(firstDate.getTime());
169
+ date.setDate(date.getDate() + offset + index);
170
+ let classNames = "calendar__cell";
171
+ if (this._currentPosition.getMonth() != date.getMonth()) {
172
+ classNames += " calendar__cell--secondary";
173
+ }
174
+ else if (this.isSelectedDate(date)) {
175
+ classNames += " calendar__cell--selected";
176
+ }
177
+ return h("div", { class: classNames, onClick: () => this.selectDate(date) }, date.getDate());
178
+ })))),
179
+ h("div", { class: "calendar__footer" },
180
+ h("button", { class: "calendar__btn-today", onClick: () => this.selectDate(new Date()) }, this._todayLabel))),
181
+ (this.time || this.showSeconds) &&
182
+ h("div", { class: "calendarTime" },
183
+ h("div", { class: "calendarTime__header" },
184
+ h("div", null, "H"),
185
+ h("div", { class: "separatorTime" }, ":"),
186
+ h("div", null, "M"),
187
+ this.showSeconds &&
188
+ h("div", { class: "separatorTime" }, ":"),
189
+ this.showSeconds &&
190
+ h("div", null, "S")),
191
+ h("div", { class: "calendar__body ", style: { display: 'flex', paddingLeft: '6px', paddingRight: '6px' } },
192
+ h("div", { class: "calendar__column", ref: elem => this._hoursScroll = elem, onScroll: () => this.updateScroll(this._hoursScroll) }, this._hoursLabel.map((offset, index) => {
193
+ if (index === this.value.getHours()) {
194
+ return (h("div", { style: { display: 'flex' }, ref: elem => this._hoursSelect = elem },
195
+ h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectHours(index) }, offset),
196
+ h("div", { class: "separatorTime" }, ":")));
197
+ }
198
+ else {
199
+ return (h("div", { style: { display: 'flex' } },
200
+ h("div", { class: "calendar__cell", onClick: () => this.selectHours(index) }, offset),
201
+ h("div", { class: "separatorTime" }, ":")));
202
+ }
203
+ })),
204
+ h("div", { class: "calendar__column", ref: elem => this._minutesScroll = elem, onScroll: () => this.updateScroll(this._minutesScroll) }, this._minutosLabel.map((offset, index) => {
205
+ if (index === this.value.getMinutes()) {
206
+ return (h("div", { style: { display: 'flex' }, ref: elem => this._minutesSelect = elem },
207
+ h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectMinutes(index) }, offset),
208
+ this.showSeconds && h("div", { class: "separatorTime" }, ":")));
209
+ }
210
+ else {
211
+ return (h("div", { style: { display: 'flex' } },
212
+ h("div", { class: "calendar__cell", onClick: () => this.selectMinutes(index) }, offset),
213
+ this.showSeconds && h("div", { class: "separatorTime" }, ":")));
214
+ }
215
+ })),
216
+ this.showSeconds &&
217
+ h("div", { class: "calendar__column", ref: elem => this._secondsScroll = elem, onScroll: () => this.updateScroll(this._secondsScroll) }, this._minutosLabel.map((offset, index) => {
218
+ if (index === this.value.getSeconds()) {
219
+ return (h("div", { class: "calendar__cell calendar__cell--selected", onClick: () => this.selectSeconds(index), ref: elem => this._secondsSelect = elem }, offset));
220
+ }
221
+ else {
222
+ return (h("div", { class: "calendar__cell", onClick: () => this.selectSeconds(index) }, offset));
223
+ }
224
+ })))))));
114
225
  }
115
226
  static get is() { return "ez-calendar"; }
116
227
  static get encapsulation() { return "shadow"; }
@@ -158,6 +269,42 @@ export class EzCalendar {
158
269
  "attribute": "floating",
159
270
  "reflect": true,
160
271
  "defaultValue": "false"
272
+ },
273
+ "time": {
274
+ "type": "boolean",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "boolean",
278
+ "resolved": "boolean",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": false,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": "Exibe ou n\u00E3o as horas e minutos no calendario"
286
+ },
287
+ "attribute": "time",
288
+ "reflect": true,
289
+ "defaultValue": "false"
290
+ },
291
+ "showSeconds": {
292
+ "type": "boolean",
293
+ "mutable": false,
294
+ "complexType": {
295
+ "original": "boolean",
296
+ "resolved": "boolean",
297
+ "references": {}
298
+ },
299
+ "required": false,
300
+ "optional": false,
301
+ "docs": {
302
+ "tags": [],
303
+ "text": "Exibe ou n\u00E3o os segundos no calendario"
304
+ },
305
+ "attribute": "show-seconds",
306
+ "reflect": true,
307
+ "defaultValue": "false"
161
308
  }
162
309
  }; }
163
310
  static get events() { return [{
@@ -223,7 +370,7 @@ export class EzCalendar {
223
370
  "return": "Promise<void>"
224
371
  },
225
372
  "docs": {
226
- "text": "",
373
+ "text": "M\u00E9todo necess\u00E1rio para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espa\u00E7o.",
227
374
  "tags": []
228
375
  }
229
376
  },