@sankhyalabs/ezui 1.1.8 → 1.1.9
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/README.md +72 -72
- package/dist/cjs/{DataUnit-28b290cb.js → DataUnit-9a4a35ca.js} +415 -371
- package/dist/cjs/ez-action-chip.cjs.entry.js +41 -41
- package/dist/cjs/ez-button_14.cjs.entry.js +1911 -1911
- package/dist/cjs/ez-label-chip.cjs.entry.js +120 -120
- package/dist/cjs/ez-modal.cjs.entry.js +104 -104
- package/dist/cjs/ez-number-input.cjs.entry.js +236 -236
- package/dist/cjs/ez-time-input.cjs.entry.js +168 -168
- package/dist/cjs/form-metadata.cjs.entry.js +65 -65
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -82
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -109
- package/dist/collection/components/ez-button/ez-button.css +94 -94
- package/dist/collection/components/ez-button/ez-button.js +125 -125
- package/dist/collection/components/ez-calendar/ez-calendar.css +210 -210
- package/dist/collection/components/ez-calendar/ez-calendar.js +215 -215
- package/dist/collection/components/ez-check/ez-check.css +265 -265
- package/dist/collection/components/ez-check/ez-check.js +168 -168
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +67 -67
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -108
- package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -167
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -363
- package/dist/collection/components/ez-date-input/ez-date-input.css +38 -38
- package/dist/collection/components/ez-date-input/ez-date-input.js +172 -172
- package/dist/collection/components/ez-form/ez-form.css +19 -19
- package/dist/collection/components/ez-form/ez-form.js +368 -368
- package/dist/collection/components/ez-form/store/Form.actions.js +132 -132
- package/dist/collection/components/ez-form/store/Form.reducer.js +194 -194
- package/dist/collection/components/ez-form/store/Form.selectors.js +44 -44
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +251 -207
- package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -16
- package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +23 -23
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -173
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -14
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -71
- package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -27
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -40
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -27
- package/dist/collection/components/ez-icon/ez-icon.css +36 -36
- package/dist/collection/components/ez-icon/ez-icon.js +56 -56
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -117
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -276
- package/dist/collection/components/ez-modal/ez-modal.css +86 -86
- package/dist/collection/components/ez-modal/ez-modal.js +224 -224
- package/dist/collection/components/ez-number-input/ez-number-input.css +144 -144
- package/dist/collection/components/ez-number-input/ez-number-input.js +465 -465
- package/dist/collection/components/ez-popover/ez-popover.css +38 -38
- package/dist/collection/components/ez-popover/ez-popover.js +323 -323
- package/dist/collection/components/ez-search/ez-search.css +295 -295
- package/dist/collection/components/ez-search/ez-search.js +527 -527
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +125 -125
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +283 -283
- package/dist/collection/components/ez-text-area/ez-text-area.css +139 -139
- package/dist/collection/components/ez-text-area/ez-text-area.js +267 -267
- package/dist/collection/components/ez-text-input/ez-text-input.css +169 -169
- package/dist/collection/components/ez-text-input/ez-text-input.js +395 -395
- package/dist/collection/components/ez-time-input/ez-time-input.css +155 -155
- package/dist/collection/components/ez-time-input/ez-time-input.js +326 -326
- package/dist/collection/index.js +1 -1
- package/dist/collection/servidor.js +100 -100
- package/dist/collection/utils/FloatingManager.js +15 -15
- package/dist/collection/utils/utils.js +6 -6
- package/dist/custom-elements/index.js +3125 -3081
- package/dist/esm/{DataUnit-69e518fa.js → DataUnit-d5d4c9a3.js} +415 -371
- package/dist/esm/ez-action-chip.entry.js +41 -41
- package/dist/esm/ez-button_14.entry.js +1911 -1911
- package/dist/esm/ez-label-chip.entry.js +120 -120
- package/dist/esm/ez-modal.entry.js +104 -104
- package/dist/esm/ez-number-input.entry.js +236 -236
- package/dist/esm/ez-time-input.entry.js +168 -168
- package/dist/esm/form-metadata.entry.js +65 -65
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-b0974f4f.entry.js → p-0fcdfb51.entry.js} +1 -1
- package/dist/ezui/p-dac7a6c2.js +1 -0
- package/dist/ezui/{p-db11c600.entry.js → p-dbef7060.entry.js} +1 -1
- package/dist/types/components/ez-action-chip/ez-action-chip.d.ts +16 -16
- package/dist/types/components/ez-button/ez-button.d.ts +20 -20
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +42 -42
- package/dist/types/components/ez-check/ez-check.d.ts +32 -32
- package/dist/types/components/ez-collapsable-box/ez-collapsable-box.d.ts +18 -18
- package/dist/types/components/ez-combo-box/ez-combo-box-interfaces.d.ts +4 -4
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +68 -68
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +31 -31
- package/dist/types/components/ez-form/ez-form.d.ts +26 -31
- package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -111
- package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -20
- package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -14
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +60 -55
- package/dist/types/components/ez-form/subcomponents/FormMetadata.d.ts +41 -41
- package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +15 -15
- package/dist/types/components/ez-form/subcomponents/place-holder.d.ts +3 -3
- package/dist/types/components/ez-form/subcomponents/structure/Field.d.ts +10 -10
- package/dist/types/components/ez-form/subcomponents/structure/FieldSet.d.ts +12 -12
- package/dist/types/components/ez-form/subcomponents/structure/FormSheet.d.ts +13 -13
- package/dist/types/components/ez-form/subcomponents/structure/NavigationBar.d.ts +17 -17
- package/dist/types/components/ez-icon/ez-icon.d.ts +5 -5
- package/dist/types/components/ez-label-chip/ez-label-chip.d.ts +40 -40
- package/dist/types/components/ez-modal/ez-modal.d.ts +32 -32
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +73 -73
- package/dist/types/components/ez-popover/ez-popover.d.ts +52 -52
- package/dist/types/components/ez-search/ez-search.d.ts +95 -95
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +31 -31
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +49 -49
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +64 -64
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +53 -53
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +2 -2
- package/package.json +114 -114
- package/dist/ezui/p-10ef58b3.js +0 -1
- package/react/components.d.ts +0 -22
- package/react/components.js +0 -25
- package/react/components.js.map +0 -1
- package/react/react-component-lib/createComponent.d.ts +0 -10
- package/react/react-component-lib/createComponent.js +0 -59
- package/react/react-component-lib/createComponent.js.map +0 -1
- package/react/react-component-lib/createOverlayComponent.d.ts +0 -20
- package/react/react-component-lib/createOverlayComponent.js +0 -89
- package/react/react-component-lib/createOverlayComponent.js.map +0 -1
- package/react/react-component-lib/index.d.ts +0 -2
- package/react/react-component-lib/index.js +0 -3
- package/react/react-component-lib/index.js.map +0 -1
- package/react/react-component-lib/interfaces.d.ts +0 -29
- package/react/react-component-lib/interfaces.js +0 -1
- package/react/react-component-lib/interfaces.js.map +0 -1
- package/react/react-component-lib/utils/attachProps.d.ts +0 -12
- package/react/react-component-lib/utils/attachProps.js +0 -96
- package/react/react-component-lib/utils/attachProps.js.map +0 -1
- package/react/react-component-lib/utils/case.d.ts +0 -2
- package/react/react-component-lib/utils/case.js +0 -7
- package/react/react-component-lib/utils/case.js.map +0 -1
- package/react/react-component-lib/utils/dev.d.ts +0 -2
- package/react/react-component-lib/utils/dev.js +0 -13
- package/react/react-component-lib/utils/dev.js.map +0 -1
- package/react/react-component-lib/utils/index.d.ts +0 -7
- package/react/react-component-lib/utils/index.js +0 -21
- package/react/react-component-lib/utils/index.js.map +0 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
--it__input--background-color: var(--background--medium, #e0e0e0);
|
|
5
|
-
--it__input--border-color: var(--it__input--background-color);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.text-input{
|
|
9
|
-
--it__input--background-color: inherit;
|
|
10
|
-
--it__input--border-color: inherit;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.btn-open-cal{
|
|
14
|
-
outline: none;
|
|
15
|
-
border: none;
|
|
16
|
-
background-color: unset;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.btn-open-cal:disabled{
|
|
21
|
-
cursor: unset;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.btn-open-cal::after{
|
|
25
|
-
content: '';
|
|
26
|
-
display: flex;
|
|
27
|
-
background-color: var(--text--primary, #008561);
|
|
28
|
-
width: 15px;
|
|
29
|
-
height: 16px;
|
|
30
|
-
clip-path: path("M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.btn-open-cal:disabled:after{
|
|
34
|
-
background-color: var(--text--disable, #AFB6C0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.btn-open-cal:enabled:hover::after{
|
|
38
|
-
background-color: var(--color--primary, #4e4e4e);
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
--it__input--background-color: var(--background--medium, #e0e0e0);
|
|
5
|
+
--it__input--border-color: var(--it__input--background-color);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.text-input{
|
|
9
|
+
--it__input--background-color: inherit;
|
|
10
|
+
--it__input--border-color: inherit;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.btn-open-cal{
|
|
14
|
+
outline: none;
|
|
15
|
+
border: none;
|
|
16
|
+
background-color: unset;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.btn-open-cal:disabled{
|
|
21
|
+
cursor: unset;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.btn-open-cal::after{
|
|
25
|
+
content: '';
|
|
26
|
+
display: flex;
|
|
27
|
+
background-color: var(--text--primary, #008561);
|
|
28
|
+
width: 15px;
|
|
29
|
+
height: 16px;
|
|
30
|
+
clip-path: path("M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.btn-open-cal:disabled:after{
|
|
34
|
+
background-color: var(--text--disable, #AFB6C0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.btn-open-cal:enabled:hover::after{
|
|
38
|
+
background-color: var(--color--primary, #4e4e4e);
|
|
39
39
|
}
|
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
2
|
-
import { DateUtils } from '@sankhyalabs/core';
|
|
3
|
-
export class EzDateInput {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* Deixa o campo disponível ou não para uso.
|
|
7
|
-
*/
|
|
8
|
-
this.enabled = true;
|
|
9
|
-
}
|
|
10
|
-
setLabel() {
|
|
11
|
-
this._textInput.label = this.label;
|
|
12
|
-
}
|
|
13
|
-
setErrorMessage() {
|
|
14
|
-
this._textInput.errormessage = this.errormessage;
|
|
15
|
-
}
|
|
16
|
-
applyValueToInput() {
|
|
17
|
-
this._textInput.value = this.getTextValue(this.value);
|
|
18
|
-
}
|
|
19
|
-
changeValue(newValue) {
|
|
20
|
-
newValue = newValue == null ? null : DateUtils.clearTime(newValue);
|
|
21
|
-
this._textInput.errormessage = "";
|
|
22
|
-
if (this.getTextValue(newValue) !== this.getTextValue(this.value)) {
|
|
23
|
-
this.value = newValue;
|
|
24
|
-
this.ezChange.emit();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
showCalendar() {
|
|
28
|
-
this.parseDate();
|
|
29
|
-
this._calendar.value = this.value;
|
|
30
|
-
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
31
|
-
//posição errada no futuro. Preferi fazer simples no começo,
|
|
32
|
-
//porque não quis onerar o text input com essa funcionalidade...
|
|
33
|
-
const top = this._textInput.errormessage ? '0px' : '-17px';
|
|
34
|
-
this._calendar.show(top);
|
|
35
|
-
}
|
|
36
|
-
hideCalendar() {
|
|
37
|
-
this.changeValue(this._calendar.value);
|
|
38
|
-
this._calendar.hide();
|
|
39
|
-
}
|
|
40
|
-
parseDate() {
|
|
41
|
-
const strValue = this._textInput.value;
|
|
42
|
-
const parsedDate = DateUtils.strToDate(strValue);
|
|
43
|
-
if (parsedDate || !strValue) {
|
|
44
|
-
if (this.value === parsedDate) {
|
|
45
|
-
this.changeValue(this.value);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
this.changeValue(parsedDate);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
this._textInput.errormessage = "O valor digitado não é uma data válida";
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
getTextValue(d) {
|
|
56
|
-
return d ? new Intl.DateTimeFormat('pt-BR').format(d) : null;
|
|
57
|
-
}
|
|
58
|
-
render() {
|
|
59
|
-
return (h(Host, null,
|
|
60
|
-
h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { if (event.key === 'H' || event.key === 'h')
|
|
61
|
-
this.changeValue(new Date()); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errormessage: this.errormessage },
|
|
62
|
-
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
63
|
-
h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
64
|
-
}
|
|
65
|
-
static get is() { return "ez-date-input"; }
|
|
66
|
-
static get encapsulation() { return "shadow"; }
|
|
67
|
-
static get originalStyleUrls() { return {
|
|
68
|
-
"$": ["ez-date-input.css"]
|
|
69
|
-
}; }
|
|
70
|
-
static get styleUrls() { return {
|
|
71
|
-
"$": ["ez-date-input.css"]
|
|
72
|
-
}; }
|
|
73
|
-
static get properties() { return {
|
|
74
|
-
"label": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"mutable": false,
|
|
77
|
-
"complexType": {
|
|
78
|
-
"original": "string",
|
|
79
|
-
"resolved": "string",
|
|
80
|
-
"references": {}
|
|
81
|
-
},
|
|
82
|
-
"required": false,
|
|
83
|
-
"optional": false,
|
|
84
|
-
"docs": {
|
|
85
|
-
"tags": [],
|
|
86
|
-
"text": "Label \u00E9 o t\u00EDtulo do campo"
|
|
87
|
-
},
|
|
88
|
-
"attribute": "label",
|
|
89
|
-
"reflect": true
|
|
90
|
-
},
|
|
91
|
-
"value": {
|
|
92
|
-
"type": "unknown",
|
|
93
|
-
"mutable": true,
|
|
94
|
-
"complexType": {
|
|
95
|
-
"original": "Date",
|
|
96
|
-
"resolved": "Date",
|
|
97
|
-
"references": {
|
|
98
|
-
"Date": {
|
|
99
|
-
"location": "global"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"required": false,
|
|
104
|
-
"optional": false,
|
|
105
|
-
"docs": {
|
|
106
|
-
"tags": [],
|
|
107
|
-
"text": "A data informada pelo usu\u00E1rio"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"enabled": {
|
|
111
|
-
"type": "boolean",
|
|
112
|
-
"mutable": false,
|
|
113
|
-
"complexType": {
|
|
114
|
-
"original": "boolean",
|
|
115
|
-
"resolved": "boolean",
|
|
116
|
-
"references": {}
|
|
117
|
-
},
|
|
118
|
-
"required": false,
|
|
119
|
-
"optional": false,
|
|
120
|
-
"docs": {
|
|
121
|
-
"tags": [],
|
|
122
|
-
"text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para uso."
|
|
123
|
-
},
|
|
124
|
-
"attribute": "enabled",
|
|
125
|
-
"reflect": true,
|
|
126
|
-
"defaultValue": "true"
|
|
127
|
-
},
|
|
128
|
-
"errormessage": {
|
|
129
|
-
"type": "string",
|
|
130
|
-
"mutable": true,
|
|
131
|
-
"complexType": {
|
|
132
|
-
"original": "string",
|
|
133
|
-
"resolved": "string",
|
|
134
|
-
"references": {}
|
|
135
|
-
},
|
|
136
|
-
"required": false,
|
|
137
|
-
"optional": false,
|
|
138
|
-
"docs": {
|
|
139
|
-
"tags": [],
|
|
140
|
-
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
141
|
-
},
|
|
142
|
-
"attribute": "errormessage",
|
|
143
|
-
"reflect": true
|
|
144
|
-
}
|
|
145
|
-
}; }
|
|
146
|
-
static get events() { return [{
|
|
147
|
-
"method": "ezChange",
|
|
148
|
-
"name": "ezChange",
|
|
149
|
-
"bubbles": true,
|
|
150
|
-
"cancelable": true,
|
|
151
|
-
"composed": true,
|
|
152
|
-
"docs": {
|
|
153
|
-
"tags": [],
|
|
154
|
-
"text": ""
|
|
155
|
-
},
|
|
156
|
-
"complexType": {
|
|
157
|
-
"original": "string",
|
|
158
|
-
"resolved": "string",
|
|
159
|
-
"references": {}
|
|
160
|
-
}
|
|
161
|
-
}]; }
|
|
162
|
-
static get watchers() { return [{
|
|
163
|
-
"propName": "label",
|
|
164
|
-
"methodName": "setLabel"
|
|
165
|
-
}, {
|
|
166
|
-
"propName": "errormessage",
|
|
167
|
-
"methodName": "setErrorMessage"
|
|
168
|
-
}, {
|
|
169
|
-
"propName": "value",
|
|
170
|
-
"methodName": "applyValueToInput"
|
|
171
|
-
}]; }
|
|
172
|
-
}
|
|
1
|
+
import { Component, Host, h, Prop, Watch, Event } from '@stencil/core';
|
|
2
|
+
import { DateUtils } from '@sankhyalabs/core';
|
|
3
|
+
export class EzDateInput {
|
|
4
|
+
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* Deixa o campo disponível ou não para uso.
|
|
7
|
+
*/
|
|
8
|
+
this.enabled = true;
|
|
9
|
+
}
|
|
10
|
+
setLabel() {
|
|
11
|
+
this._textInput.label = this.label;
|
|
12
|
+
}
|
|
13
|
+
setErrorMessage() {
|
|
14
|
+
this._textInput.errormessage = this.errormessage;
|
|
15
|
+
}
|
|
16
|
+
applyValueToInput() {
|
|
17
|
+
this._textInput.value = this.getTextValue(this.value);
|
|
18
|
+
}
|
|
19
|
+
changeValue(newValue) {
|
|
20
|
+
newValue = newValue == null ? null : DateUtils.clearTime(newValue);
|
|
21
|
+
this._textInput.errormessage = "";
|
|
22
|
+
if (this.getTextValue(newValue) !== this.getTextValue(this.value)) {
|
|
23
|
+
this.value = newValue;
|
|
24
|
+
this.ezChange.emit();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
showCalendar() {
|
|
28
|
+
this.parseDate();
|
|
29
|
+
this._calendar.value = this.value;
|
|
30
|
+
//FIXME: Provavelmente isso fará com que o popup abra em uma
|
|
31
|
+
//posição errada no futuro. Preferi fazer simples no começo,
|
|
32
|
+
//porque não quis onerar o text input com essa funcionalidade...
|
|
33
|
+
const top = this._textInput.errormessage ? '0px' : '-17px';
|
|
34
|
+
this._calendar.show(top);
|
|
35
|
+
}
|
|
36
|
+
hideCalendar() {
|
|
37
|
+
this.changeValue(this._calendar.value);
|
|
38
|
+
this._calendar.hide();
|
|
39
|
+
}
|
|
40
|
+
parseDate() {
|
|
41
|
+
const strValue = this._textInput.value;
|
|
42
|
+
const parsedDate = DateUtils.strToDate(strValue);
|
|
43
|
+
if (parsedDate || !strValue) {
|
|
44
|
+
if (this.value === parsedDate) {
|
|
45
|
+
this.changeValue(this.value);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.changeValue(parsedDate);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this._textInput.errormessage = "O valor digitado não é uma data válida";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
getTextValue(d) {
|
|
56
|
+
return d ? new Intl.DateTimeFormat('pt-BR').format(d) : null;
|
|
57
|
+
}
|
|
58
|
+
render() {
|
|
59
|
+
return (h(Host, null,
|
|
60
|
+
h("ez-text-input", { class: "text-input", ref: elem => this._textInput = elem, onBlur: () => this.parseDate(), onKeyDown: event => { if (event.key === 'H' || event.key === 'h')
|
|
61
|
+
this.changeValue(new Date()); }, label: this.label, onEzChange: event => event.stopPropagation(), value: this.getTextValue(this.value), restrict: "0123456789/", enabled: this.enabled, errormessage: this.errormessage },
|
|
62
|
+
h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })),
|
|
63
|
+
h("ez-calendar", { onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
|
|
64
|
+
}
|
|
65
|
+
static get is() { return "ez-date-input"; }
|
|
66
|
+
static get encapsulation() { return "shadow"; }
|
|
67
|
+
static get originalStyleUrls() { return {
|
|
68
|
+
"$": ["ez-date-input.css"]
|
|
69
|
+
}; }
|
|
70
|
+
static get styleUrls() { return {
|
|
71
|
+
"$": ["ez-date-input.css"]
|
|
72
|
+
}; }
|
|
73
|
+
static get properties() { return {
|
|
74
|
+
"label": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "string",
|
|
79
|
+
"resolved": "string",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": "Label \u00E9 o t\u00EDtulo do campo"
|
|
87
|
+
},
|
|
88
|
+
"attribute": "label",
|
|
89
|
+
"reflect": true
|
|
90
|
+
},
|
|
91
|
+
"value": {
|
|
92
|
+
"type": "unknown",
|
|
93
|
+
"mutable": true,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "Date",
|
|
96
|
+
"resolved": "Date",
|
|
97
|
+
"references": {
|
|
98
|
+
"Date": {
|
|
99
|
+
"location": "global"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "A data informada pelo usu\u00E1rio"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"enabled": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "boolean",
|
|
115
|
+
"resolved": "boolean",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Deixa o campo dispon\u00EDvel ou n\u00E3o para uso."
|
|
123
|
+
},
|
|
124
|
+
"attribute": "enabled",
|
|
125
|
+
"reflect": true,
|
|
126
|
+
"defaultValue": "true"
|
|
127
|
+
},
|
|
128
|
+
"errormessage": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"mutable": true,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "string",
|
|
133
|
+
"resolved": "string",
|
|
134
|
+
"references": {}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": false,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [],
|
|
140
|
+
"text": "Quando h\u00E1 um problema de valida\u00E7\u00E3o, serve como orienta\u00E7\u00E3o ao usu\u00E1rio"
|
|
141
|
+
},
|
|
142
|
+
"attribute": "errormessage",
|
|
143
|
+
"reflect": true
|
|
144
|
+
}
|
|
145
|
+
}; }
|
|
146
|
+
static get events() { return [{
|
|
147
|
+
"method": "ezChange",
|
|
148
|
+
"name": "ezChange",
|
|
149
|
+
"bubbles": true,
|
|
150
|
+
"cancelable": true,
|
|
151
|
+
"composed": true,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
}
|
|
161
|
+
}]; }
|
|
162
|
+
static get watchers() { return [{
|
|
163
|
+
"propName": "label",
|
|
164
|
+
"methodName": "setLabel"
|
|
165
|
+
}, {
|
|
166
|
+
"propName": "errormessage",
|
|
167
|
+
"methodName": "setErrorMessage"
|
|
168
|
+
}, {
|
|
169
|
+
"propName": "value",
|
|
170
|
+
"methodName": "applyValueToInput"
|
|
171
|
+
}]; }
|
|
172
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
ez-form {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.form-sheet {
|
|
8
|
-
display: flex;
|
|
9
|
-
width: 100%;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tab__container {
|
|
15
|
-
display: flex;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
position: relative;
|
|
19
|
-
}
|
|
1
|
+
ez-form {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.form-sheet {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tab__container {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: 100%;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|