@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.
- package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
- package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
- package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
- package/dist/cjs/DateUtils-716769e0.js +46 -0
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +28 -0
- package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
- package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
- package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1838 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
- package/dist/cjs/ez-popover.cjs.entry.js +3 -3
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -8
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +3 -3
- package/dist/cjs/form-metadata.cjs.entry.js +129 -0
- package/dist/cjs/index-262d703b.js +7442 -0
- package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +8 -3
- package/dist/collection/components/ez-application/ez-application.css +3 -0
- package/dist/collection/components/ez-application/ez-application.js +37 -0
- package/dist/collection/components/ez-button/ez-button.css +78 -44
- package/dist/collection/components/ez-button/ez-button.js +36 -4
- package/dist/collection/components/ez-calendar/ez-calendar.css +132 -65
- package/dist/collection/components/ez-calendar/ez-calendar.js +180 -33
- package/dist/collection/components/ez-check/ez-check.css +78 -78
- package/dist/collection/components/ez-check/ez-check.js +3 -3
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
- package/dist/collection/components/ez-date-input/ez-date-input.js +2 -2
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
- package/dist/collection/components/ez-form/ez-form.js +37 -35
- package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
- package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +22 -22
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
- package/dist/collection/components/ez-grid/ez-grid.css +15 -0
- package/dist/collection/components/ez-grid/ez-grid.js +414 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
- package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-list/ez-list.css +227 -44
- package/dist/collection/components/ez-list/ez-list.js +529 -149
- package/dist/collection/components/ez-modal/ez-modal.css +4 -4
- package/dist/collection/components/ez-modal/ez-modal.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
- package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
- package/dist/collection/components/ez-popover/ez-popover.css +10 -6
- package/dist/collection/components/ez-popup/ez-popup.css +25 -27
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
- package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
- package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
- package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
- package/dist/collection/components/ez-upload/ez-upload.css +41 -41
- package/dist/collection/components/ez-upload/ez-upload.js +55 -52
- package/dist/collection/components/test-du/test-du.css +3 -0
- package/dist/collection/components/test-du/test-du.js +45 -0
- package/dist/collection/servidor.js +94 -94
- package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
- package/dist/collection/utils/AssetsUtils.js +19 -0
- package/dist/custom-elements/index.d.ts +36 -6
- package/dist/custom-elements/index.js +121017 -3022
- package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
- package/dist/esm/AssetsUtils-3803e935.js +22 -0
- package/dist/esm/DataUnit-1cd45202.js +464 -0
- package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +24 -0
- package/dist/esm/ez-button_11.entry.js +111757 -0
- package/dist/esm/ez-calendar.entry.js +208 -0
- package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
- package/dist/esm/ez-combo-box.entry.js +246 -0
- package/dist/esm/ez-date-time-input.entry.js +140 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1834 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +61 -190
- package/dist/esm/ez-popover.entry.js +3 -3
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-time-input.entry.js +4 -3
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/form-metadata.entry.js +125 -0
- package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
- package/dist/esm/index-cfd5e193.js +7433 -0
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1ea8187e.entry.js +369 -0
- package/dist/ezui/p-37a611ea.js +1 -0
- package/dist/ezui/p-45689464.entry.js +1 -0
- package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
- package/dist/ezui/p-57291f97.entry.js +1 -0
- package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
- package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
- package/dist/ezui/p-69416bec.entry.js +1 -0
- package/dist/ezui/p-7107d7ef.js +1 -0
- package/dist/ezui/p-7ef97c5f.entry.js +1 -0
- package/dist/ezui/p-88f45a83.entry.js +1 -0
- package/dist/ezui/p-8c51a6aa.entry.js +1 -0
- package/dist/ezui/p-8f4851a6.js +1 -0
- package/dist/ezui/p-9dfd537e.js +1 -0
- package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
- package/dist/ezui/p-a223eed8.entry.js +1 -0
- package/dist/ezui/p-b36308e7.js +1 -0
- package/dist/ezui/p-c0af195b.entry.js +1 -0
- package/dist/ezui/p-c6d469fc.entry.js +1 -0
- package/dist/ezui/p-c89629eb.js +1 -0
- package/dist/ezui/p-e7ee2836.entry.js +1 -0
- package/dist/ezui/p-f7b835cf.entry.js +1 -0
- package/dist/types/components/ez-application/ez-application.d.ts +12 -0
- package/dist/types/components/ez-button/ez-button.d.ts +5 -0
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +25 -1
- package/dist/types/components/ez-check/ez-check.d.ts +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
- package/dist/types/components/ez-form/ez-form.d.ts +9 -9
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
- package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
- package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
- package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
- package/dist/types/components/ez-list/ez-list.d.ts +70 -17
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
- package/dist/types/components/ez-upload/ez-upload.d.ts +10 -7
- package/dist/types/components/test-du/test-du.d.ts +6 -0
- package/dist/types/components.d.ts +321 -149
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
- package/dist/types/utils/AssetsUtils.d.ts +1 -0
- package/package.json +10 -8
- package/react/components.d.ts +6 -1
- package/react/components.js +6 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
- package/dist/cjs/ez-button_16.cjs.entry.js +0 -4065
- package/dist/cjs/ez-list.cjs.entry.js +0 -174
- package/dist/cjs/ez-modal.cjs.entry.js +0 -65
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
- package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
- package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
- package/dist/esm/ez-button_16.entry.js +0 -4046
- package/dist/esm/ez-list.entry.js +0 -170
- package/dist/esm/ez-modal.entry.js +0 -61
- package/dist/ezui/p-061d21ba.entry.js +0 -1
- package/dist/ezui/p-15743b09.entry.js +0 -1
- package/dist/ezui/p-25953d44.entry.js +0 -1
- package/dist/ezui/p-4df6f855.js +0 -1
- package/dist/ezui/p-50464bdf.entry.js +0 -1
- package/dist/ezui/p-67410dfa.entry.js +0 -1
- package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
- package/dist/ezui/p-907de194.entry.js +0 -1
- package/dist/ezui/p-9dfccb16.js +0 -1
- 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
|
-
--
|
|
3
|
+
--ez-calendar--font-family: var(--font-pattern, Arial);
|
|
4
4
|
/*@doc Define a cor dos textos dentro do componente.*/
|
|
5
|
-
--
|
|
5
|
+
--ez-calendar--color: var(--title--primary, #626e82);
|
|
6
6
|
/*@doc Define a sombra dos textos dentro do componente.*/
|
|
7
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
15
|
+
--ez-calendar__body--padding: var(--space--medium, 12px);
|
|
14
16
|
/*@doc Define o raio da borda do corpo do calendário.*/
|
|
15
|
-
--
|
|
17
|
+
--ez-calendar__body--border-radius: var(--border--radius-medium, 12px);
|
|
16
18
|
/*@doc Define a sombra do corpo do calendário.*/
|
|
17
|
-
--
|
|
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
|
-
--
|
|
23
|
+
--ez-calendar__header-line--stroke: 2px;
|
|
22
24
|
/*@doc Define a cor da borda inferior do header.*/
|
|
23
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
31
|
+
--ez-calendar__nav-btn--hover--fill: var(--color--primary, #350404);
|
|
30
32
|
/*@doc Define a largura do ícone de navegação.*/
|
|
31
|
-
--
|
|
33
|
+
--ez-calendar__nav-btn--width: 10px;
|
|
32
34
|
/*@doc Define a altura do ícone de navegação.*/
|
|
33
|
-
--
|
|
35
|
+
--ez-calendar__nav-btn--height: 16px;
|
|
34
36
|
/*@doc Contém a imagem do ícone de navegação à esquerda.*/
|
|
35
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
43
|
+
--ez-calendar__cell--margin: 0px var(--space--small, 12px);
|
|
42
44
|
/*@doc Define a largura das células.*/
|
|
43
|
-
--
|
|
45
|
+
--ez-calendar__cell--width: var(--space--large, 24px);
|
|
44
46
|
/*@doc Define o espaçamento horizontal entre as células.*/
|
|
45
|
-
--
|
|
47
|
+
--ez-calendar__cell--padding: var(--space--extra-small, 3px) 0px;
|
|
46
48
|
/*@doc Define o raio da borda das células.*/
|
|
47
|
-
--
|
|
49
|
+
--ez-calendar__cell--border-radius: var(--border--radius-small, 6px);
|
|
48
50
|
/*@doc Define a cor de fundo das células.*/
|
|
49
|
-
--
|
|
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
|
-
--
|
|
53
|
+
--ez-calendar__cell--outset--color: var(--color--strokes, #C0C0C0);
|
|
52
54
|
/*@doc Define a cor de fundo das células selecionadas.*/
|
|
53
|
-
--
|
|
55
|
+
--ez-calendar__cell--selected--background-color: var(--color--primary, #008561);
|
|
54
56
|
/*@doc Define a cor do texto da célula selecionada.*/
|
|
55
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
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
|
-
--
|
|
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(--
|
|
82
|
-
padding: var(--
|
|
83
|
-
border-radius: var(--
|
|
84
|
-
box-shadow: var(--
|
|
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(--
|
|
96
|
-
color: var(--
|
|
97
|
-
text-shadow: var(--
|
|
98
|
-
border-bottom: solid var(--
|
|
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(--
|
|
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(--
|
|
119
|
-
height: var(--
|
|
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(--
|
|
125
|
-
mask-image: var(--
|
|
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(--
|
|
131
|
-
mask-image: var(--
|
|
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(--
|
|
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(--
|
|
146
|
-
color: var(--
|
|
147
|
-
text-shadow: var(--
|
|
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(--
|
|
167
|
-
color: var(--
|
|
168
|
-
text-shadow: var(--
|
|
169
|
-
padding: var(--
|
|
170
|
-
margin: var(--
|
|
171
|
-
min-width: var(--
|
|
172
|
-
border-radius: var(--
|
|
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(--
|
|
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(--
|
|
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(--
|
|
199
|
-
color: var(--
|
|
200
|
-
text-shadow: var(--
|
|
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(--
|
|
206
|
-
color: var(--
|
|
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(--
|
|
231
|
-
text-shadow: var(--
|
|
232
|
-
color: var(--
|
|
233
|
-
border-radius: var(--
|
|
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(--
|
|
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
|
|
2
|
-
import { Component, forceUpdate, h, Prop, Method, Event, Watch } from
|
|
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 =
|
|
7
|
-
this._weekDayLabels = [
|
|
8
|
-
this._monthLabels = [
|
|
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:
|
|
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 +
|
|
50
|
+
this.show(topOffset + "px", undefined, "unset");
|
|
38
51
|
}
|
|
39
52
|
else {
|
|
40
|
-
this.show(
|
|
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
|
-
|
|
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
|
-
|
|
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", {
|
|
93
|
-
h("div", { class: "
|
|
94
|
-
h("
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
h("div", { class: "
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
h("
|
|
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
|
},
|