@sankhyalabs/ezui 1.1.4 → 1.1.5
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/{ezui/DataUnit-285bec19.js → cjs/DataUnit-6a98d9de.js} +379 -369
- package/dist/{ezui/index-919090de.js → cjs/RequestMetadata-2cd01e8a.js} +4 -383
- package/dist/cjs/ez-action-chip.cjs.entry.js +52 -0
- package/dist/cjs/ez-button_14.cjs.entry.js +3338 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +131 -0
- package/dist/cjs/ez-modal.cjs.entry.js +115 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +248 -0
- package/dist/cjs/ez-time-input.cjs.entry.js +180 -0
- package/dist/cjs/ezui.cjs.js +19 -0
- package/dist/cjs/form-metadata.cjs.entry.js +74 -0
- package/dist/cjs/index-9403fe8f.js +1322 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/ez-action-chip/ez-action-chip.css +82 -0
- package/dist/collection/components/ez-action-chip/ez-action-chip.js +109 -0
- package/dist/collection/components/ez-button/ez-button.css +94 -0
- package/dist/collection/components/ez-button/ez-button.js +125 -0
- package/dist/collection/components/ez-calendar/ez-calendar.css +210 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js +215 -0
- package/dist/collection/components/ez-check/ez-check.css +266 -0
- package/dist/collection/components/ez-check/ez-check.js +168 -0
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.css +68 -0
- package/dist/collection/components/ez-collapsable-box/ez-collapsable-box.js +108 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-interfaces.js +2 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +167 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +363 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css +39 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js +172 -0
- package/dist/collection/components/ez-form/ez-form.css +19 -0
- package/dist/collection/components/ez-form/ez-form.js +365 -0
- package/dist/collection/components/ez-form/store/Form.actions.js +132 -0
- package/dist/collection/components/ez-form/store/Form.reducer.js +194 -0
- package/dist/collection/components/ez-form/store/Form.selectors.js +44 -0
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +204 -0
- package/dist/collection/components/ez-form/subcomponents/FormMetadata.js +16 -0
- package/dist/collection/components/ez-form/subcomponents/css/place-holder.css +24 -0
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +173 -0
- package/dist/collection/components/ez-form/subcomponents/place-holder.js +14 -0
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +71 -0
- package/dist/collection/components/ez-form/subcomponents/structure/FieldSet.js +27 -0
- package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +40 -0
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +27 -0
- package/dist/collection/components/ez-icon/ez-icon.css +37 -0
- package/dist/collection/components/ez-icon/ez-icon.js +56 -0
- package/dist/collection/components/ez-label-chip/ez-label-chip.css +117 -0
- package/dist/collection/components/ez-label-chip/ez-label-chip.js +276 -0
- package/dist/collection/components/ez-modal/ez-modal.css +87 -0
- package/dist/collection/components/ez-modal/ez-modal.js +224 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css +144 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +465 -0
- package/dist/collection/components/ez-popover/ez-popover.css +39 -0
- package/dist/collection/components/ez-popover/ez-popover.js +323 -0
- package/dist/collection/components/ez-search/ez-search.css +296 -0
- package/dist/{ezui/ez-search.entry.js → collection/components/ez-search/ez-search.js} +527 -334
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +126 -0
- package/dist/{ezui/ez-tabselector.entry.js → collection/components/ez-tabselector/ez-tabselector.js} +283 -209
- package/dist/collection/components/ez-text-area/ez-text-area.css +140 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +267 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +170 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +395 -0
- package/dist/collection/components/ez-time-input/ez-time-input.css +155 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +326 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/servidor.js +101 -0
- package/dist/collection/utils/FloatingManager.js +16 -0
- package/dist/collection/utils/utils.js +6 -0
- package/dist/custom-elements/index.js +5065 -0
- package/dist/esm/DataUnit-ac4cc054.js +375 -0
- package/dist/esm/RequestMetadata-c265c9d5.js +527 -0
- package/dist/{ezui → esm}/ez-action-chip.entry.js +42 -42
- package/dist/esm/ez-button_14.entry.js +3321 -0
- package/dist/{ezui → esm}/ez-label-chip.entry.js +121 -121
- package/dist/{ezui → esm}/ez-modal.entry.js +105 -96
- package/dist/{ezui → esm}/ez-number-input.entry.js +238 -238
- package/dist/{ezui → esm}/ez-time-input.entry.js +170 -170
- package/dist/esm/ezui.js +17 -0
- package/dist/{ezui → esm}/form-metadata.entry.js +66 -66
- package/dist/esm/index-95bb3fd9.js +1293 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/ezui/ezui.esm.js +1 -122
- package/dist/ezui/index.esm.js +0 -1
- package/dist/ezui/p-185c57f4.js +1 -0
- package/dist/ezui/p-22b82efb.entry.js +1 -0
- package/dist/ezui/p-346050cf.entry.js +1 -0
- package/dist/ezui/p-593c03ba.js +1 -0
- package/dist/ezui/p-77fdb4fd.entry.js +1 -0
- package/dist/ezui/p-9dfccb16.js +1 -0
- package/dist/ezui/p-dd4331b7.entry.js +1 -0
- package/dist/ezui/p-f6fd31ab.entry.js +1 -0
- package/dist/ezui/p-f95e3c71.entry.js +1 -0
- package/dist/ezui/p-fa260f22.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- 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 +31 -27
- package/dist/types/components/ez-form/store/Form.actions.d.ts +111 -104
- package/dist/types/components/ez-form/store/Form.reducer.d.ts +20 -11
- package/dist/types/components/ez-form/store/Form.selectors.d.ts +14 -13
- package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +55 -48
- 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 -7
- 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 -26
- 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/components.d.ts +8 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +2 -2
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +13 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +114 -114
- package/react/components.d.ts +22 -0
- package/react/components.js +25 -0
- package/react/components.js.map +1 -0
- package/react/react-component-lib/createComponent.d.ts +10 -0
- package/react/react-component-lib/createComponent.js +59 -0
- package/react/react-component-lib/createComponent.js.map +1 -0
- package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
- package/react/react-component-lib/createOverlayComponent.js +89 -0
- package/react/react-component-lib/createOverlayComponent.js.map +1 -0
- package/react/react-component-lib/index.d.ts +2 -0
- package/react/react-component-lib/index.js +3 -0
- package/react/react-component-lib/index.js.map +1 -0
- package/react/react-component-lib/interfaces.d.ts +29 -0
- package/react/react-component-lib/interfaces.js +1 -0
- package/react/react-component-lib/interfaces.js.map +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +12 -0
- package/react/react-component-lib/utils/attachProps.js +96 -0
- package/react/react-component-lib/utils/attachProps.js.map +1 -0
- package/react/react-component-lib/utils/case.d.ts +2 -0
- package/react/react-component-lib/utils/case.js +7 -0
- package/react/react-component-lib/utils/case.js.map +1 -0
- package/react/react-component-lib/utils/dev.d.ts +2 -0
- package/react/react-component-lib/utils/dev.js +13 -0
- package/react/react-component-lib/utils/dev.js.map +1 -0
- package/react/react-component-lib/utils/index.d.ts +7 -0
- package/react/react-component-lib/utils/index.js +21 -0
- package/react/react-component-lib/utils/index.js.map +1 -0
- package/dist/ezui/app-globals-0f993ce5.js +0 -3
- package/dist/ezui/css-shim-003e9264.js +0 -4
- package/dist/ezui/dom-1b195079.js +0 -73
- package/dist/ezui/ez-button.entry.js +0 -47
- package/dist/ezui/ez-calendar.entry.js +0 -102
- package/dist/ezui/ez-check.entry.js +0 -62
- package/dist/ezui/ez-collapsable-box.entry.js +0 -32
- package/dist/ezui/ez-combo-box.entry.js +0 -181
- package/dist/ezui/ez-date-input.entry.js +0 -77
- package/dist/ezui/ez-form.entry.js +0 -1907
- package/dist/ezui/ez-icon.entry.js +0 -17
- package/dist/ezui/ez-popover.entry.js +0 -112
- package/dist/ezui/ez-text-area.entry.js +0 -105
- package/dist/ezui/ez-text-input.entry.js +0 -202
- package/dist/ezui/index-39044be2.js +0 -2832
- package/dist/ezui/place-holder.entry.js +0 -15
- package/dist/ezui/shadow-css-c1ad5fdc.js +0 -383
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Component, Prop, h, Watch, Method, Event } from '@stencil/core';
|
|
2
|
+
export class EzCheck {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Deixa o campo disponível ou não interagir com o usuário.
|
|
6
|
+
*/
|
|
7
|
+
this.enabled = true;
|
|
8
|
+
/**
|
|
9
|
+
* Existem dois modos de visualização: regular e switch.
|
|
10
|
+
* Se esta propriedade for omitida, o componete assume o formato "regular";
|
|
11
|
+
* No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
|
|
12
|
+
* No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
|
|
13
|
+
*/
|
|
14
|
+
this.mode = "regular";
|
|
15
|
+
}
|
|
16
|
+
adjustMode() {
|
|
17
|
+
if (this.mode === "switch") {
|
|
18
|
+
this._inputElem.classList.remove("regularMode");
|
|
19
|
+
this._inputElem.classList.add("switchMode");
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this._inputElem.classList.remove("switchMode");
|
|
23
|
+
this._inputElem.classList.add("regularMode");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//---------------------------------------------
|
|
27
|
+
// Public methods
|
|
28
|
+
//---------------------------------------------
|
|
29
|
+
/**
|
|
30
|
+
* Devolve o modo escolhido para o componente
|
|
31
|
+
*/
|
|
32
|
+
async getMode() {
|
|
33
|
+
return this.mode;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Faz o foco no componente de input
|
|
37
|
+
*/
|
|
38
|
+
async setFocus() {
|
|
39
|
+
this._inputElem.focus();
|
|
40
|
+
}
|
|
41
|
+
componentDidLoad() {
|
|
42
|
+
this.adjustMode();
|
|
43
|
+
}
|
|
44
|
+
changeValue() {
|
|
45
|
+
this.value = !this.value;
|
|
46
|
+
this.valueChange.emit();
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
return (h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }));
|
|
50
|
+
}
|
|
51
|
+
static get is() { return "ez-check"; }
|
|
52
|
+
static get encapsulation() { return "shadow"; }
|
|
53
|
+
static get originalStyleUrls() { return {
|
|
54
|
+
"$": ["ez-check.css"]
|
|
55
|
+
}; }
|
|
56
|
+
static get styleUrls() { return {
|
|
57
|
+
"$": ["ez-check.css"]
|
|
58
|
+
}; }
|
|
59
|
+
static get properties() { return {
|
|
60
|
+
"value": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"mutable": true,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "boolean",
|
|
65
|
+
"resolved": "boolean",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": "Como se trata de um componente bin\u00E1rio, o valor alterna entre true e false (marcado / desmarcado)"
|
|
73
|
+
},
|
|
74
|
+
"attribute": "value",
|
|
75
|
+
"reflect": true
|
|
76
|
+
},
|
|
77
|
+
"enabled": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "boolean",
|
|
82
|
+
"resolved": "boolean",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "Deixa o campo dispon\u00EDvel ou n\u00E3o interagir com o usu\u00E1rio."
|
|
90
|
+
},
|
|
91
|
+
"attribute": "enabled",
|
|
92
|
+
"reflect": true,
|
|
93
|
+
"defaultValue": "true"
|
|
94
|
+
},
|
|
95
|
+
"mode": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": false,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Existem dois modos de visualiza\u00E7\u00E3o: regular e switch.\nSe esta propriedade for omitida, o componete assume o formato \"regular\";\nNo modo \"regular\" a visualiza\u00E7\u00E3o \u00E9 a tradicional de uma caixinha marcada/desmarcada.\nNo modo \"switch\" o campo tem uma interface em formato de um pino liga/desliga."
|
|
108
|
+
},
|
|
109
|
+
"attribute": "mode",
|
|
110
|
+
"reflect": true,
|
|
111
|
+
"defaultValue": "\"regular\""
|
|
112
|
+
}
|
|
113
|
+
}; }
|
|
114
|
+
static get events() { return [{
|
|
115
|
+
"method": "valueChange",
|
|
116
|
+
"name": "valueChange",
|
|
117
|
+
"bubbles": true,
|
|
118
|
+
"cancelable": true,
|
|
119
|
+
"composed": true,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "string",
|
|
126
|
+
"resolved": "string",
|
|
127
|
+
"references": {}
|
|
128
|
+
}
|
|
129
|
+
}]; }
|
|
130
|
+
static get methods() { return {
|
|
131
|
+
"getMode": {
|
|
132
|
+
"complexType": {
|
|
133
|
+
"signature": "() => Promise<string>",
|
|
134
|
+
"parameters": [],
|
|
135
|
+
"references": {
|
|
136
|
+
"Promise": {
|
|
137
|
+
"location": "global"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"return": "Promise<string>"
|
|
141
|
+
},
|
|
142
|
+
"docs": {
|
|
143
|
+
"text": "Devolve o modo escolhido para o componente",
|
|
144
|
+
"tags": []
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"setFocus": {
|
|
148
|
+
"complexType": {
|
|
149
|
+
"signature": "() => Promise<void>",
|
|
150
|
+
"parameters": [],
|
|
151
|
+
"references": {
|
|
152
|
+
"Promise": {
|
|
153
|
+
"location": "global"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"return": "Promise<void>"
|
|
157
|
+
},
|
|
158
|
+
"docs": {
|
|
159
|
+
"text": "Faz o foco no componente de input",
|
|
160
|
+
"tags": []
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}; }
|
|
164
|
+
static get watchers() { return [{
|
|
165
|
+
"propName": "mode",
|
|
166
|
+
"methodName": "adjustMode"
|
|
167
|
+
}]; }
|
|
168
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--collapsable-box--height: 42px;
|
|
3
|
+
|
|
4
|
+
--collapsable-box--font-size: var(--title--medium, 14px);
|
|
5
|
+
--collapsable-box--font-family: var(--font-pattern, Arial);
|
|
6
|
+
--collapsable-box--font-weight: var(--text-weight--large, 600);
|
|
7
|
+
--collapsable-box--color: var(--title--primary);
|
|
8
|
+
|
|
9
|
+
--collapsable-box__btn--path: path("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");
|
|
10
|
+
--collapsable-box__btn--fill: var(--collapsable-box--color);
|
|
11
|
+
--collapsable-box__btn--width: 10px;
|
|
12
|
+
--collapsable-box__btn--height: 16px;
|
|
13
|
+
|
|
14
|
+
/***************
|
|
15
|
+
host style
|
|
16
|
+
***************/
|
|
17
|
+
/*private*/
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.collapsable-box__title{
|
|
24
|
+
/*private*/
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.collapsable-box__label{
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
/*public*/
|
|
37
|
+
font-family: var(--collapsable-box--font-family);
|
|
38
|
+
font-size: var(--collapsable-box--font-size);
|
|
39
|
+
font-weight: var(--collapsable-box--font-weight);
|
|
40
|
+
color: var(--collapsable-box--color);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.collapsable-box__btn{
|
|
44
|
+
/*private*/
|
|
45
|
+
outline: none;
|
|
46
|
+
border: none;
|
|
47
|
+
background-color: unset;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
padding: 1px 6px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.collapsable-box__btn::after{
|
|
53
|
+
/*private*/
|
|
54
|
+
content: '';
|
|
55
|
+
display: flex;
|
|
56
|
+
|
|
57
|
+
/*public*/
|
|
58
|
+
clip-path: var(--collapsable-box__btn--path);
|
|
59
|
+
background-color: var( --collapsable-box__btn--fill);/*parece estranho, mas o bg funciona como fill pq aplicaremos clip-path.*/
|
|
60
|
+
width: var(--collapsable-box__btn--width);
|
|
61
|
+
height: var(--collapsable-box__btn--height);
|
|
62
|
+
transition: transform var(--transition);
|
|
63
|
+
transform: rotate(90deg);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.collapsable-box__btn--collapsed::after{
|
|
67
|
+
transform: rotate(0deg);
|
|
68
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Component, h, Host, Prop, Event, Watch, Method } from '@stencil/core';
|
|
2
|
+
export class EzCollapsableBox {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Valor externalizado que garante a exibição ou não do componente
|
|
6
|
+
*/
|
|
7
|
+
this.value = false;
|
|
8
|
+
}
|
|
9
|
+
observeValue() {
|
|
10
|
+
this.ezChange.emit();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Esconde ou revela o conteúdo do componente
|
|
14
|
+
*/
|
|
15
|
+
async showHide() {
|
|
16
|
+
this.value = !this.value;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null,
|
|
20
|
+
h("div", { class: "collapsable-box__title" },
|
|
21
|
+
h("button", { class: this.value ? "collapsable-box__btn collapsable-box__btn--collapsed" : "collapsable-box__btn", onClick: () => this.showHide() }),
|
|
22
|
+
h("label", { class: "collapsable-box__label", title: this.label }, this.label)),
|
|
23
|
+
!this.value ? h("slot", null) : null));
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "ez-collapsable-box"; }
|
|
26
|
+
static get encapsulation() { return "shadow"; }
|
|
27
|
+
static get originalStyleUrls() { return {
|
|
28
|
+
"$": ["ez-collapsable-box.css"]
|
|
29
|
+
}; }
|
|
30
|
+
static get styleUrls() { return {
|
|
31
|
+
"$": ["ez-collapsable-box.css"]
|
|
32
|
+
}; }
|
|
33
|
+
static get properties() { return {
|
|
34
|
+
"value": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"mutable": true,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "boolean",
|
|
39
|
+
"resolved": "boolean",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Valor externalizado que garante a exibi\u00E7\u00E3o ou n\u00E3o do componente"
|
|
47
|
+
},
|
|
48
|
+
"attribute": "value",
|
|
49
|
+
"reflect": true,
|
|
50
|
+
"defaultValue": "false"
|
|
51
|
+
},
|
|
52
|
+
"label": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "Label \u00E9 o t\u00EDtulo do campo"
|
|
65
|
+
},
|
|
66
|
+
"attribute": "label",
|
|
67
|
+
"reflect": true
|
|
68
|
+
}
|
|
69
|
+
}; }
|
|
70
|
+
static get events() { return [{
|
|
71
|
+
"method": "ezChange",
|
|
72
|
+
"name": "ezChange",
|
|
73
|
+
"bubbles": true,
|
|
74
|
+
"cancelable": true,
|
|
75
|
+
"composed": true,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
}
|
|
85
|
+
}]; }
|
|
86
|
+
static get methods() { return {
|
|
87
|
+
"showHide": {
|
|
88
|
+
"complexType": {
|
|
89
|
+
"signature": "() => Promise<void>",
|
|
90
|
+
"parameters": [],
|
|
91
|
+
"references": {
|
|
92
|
+
"Promise": {
|
|
93
|
+
"location": "global"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"return": "Promise<void>"
|
|
97
|
+
},
|
|
98
|
+
"docs": {
|
|
99
|
+
"text": "Esconde ou revela o conte\u00FAdo do componente",
|
|
100
|
+
"tags": []
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}; }
|
|
104
|
+
static get watchers() { return [{
|
|
105
|
+
"propName": "value",
|
|
106
|
+
"methodName": "observeValue"
|
|
107
|
+
}]; }
|
|
108
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/* dimensions */
|
|
3
|
+
--cx--height: 42px;
|
|
4
|
+
--cx--width: 100%;
|
|
5
|
+
--cx__icon--width: 48px;
|
|
6
|
+
/* general */
|
|
7
|
+
--cx--border-radius: var(--border--radius-medium, 12px);
|
|
8
|
+
--cx--border-radius-small: var(--border--radius-small, 6px);
|
|
9
|
+
--cx--font-size: var(--text--medium, 14px);
|
|
10
|
+
--cx--font-family: var(--font-pattern, Arial);
|
|
11
|
+
--cx--font-weight--large: var(--text-weight--large, 500);
|
|
12
|
+
--cx--font-weight--medium: var(--text-weight--medium, 400);
|
|
13
|
+
--cx--space--medium: var(--space--medium, 12px);
|
|
14
|
+
--cx--space--small: var(--space--small, 6px);
|
|
15
|
+
--cx--shadow: var(--shadow, 0px 0px 16px 0px rgba(0, 38, 111, .12));
|
|
16
|
+
--cx--background-color--xlight: var(--background--xlight,#fff);
|
|
17
|
+
|
|
18
|
+
/* input */
|
|
19
|
+
--cx__input--background-color: var(--background--medium, #e0e0e0);
|
|
20
|
+
--cx__input--border: var(--border--medium, 2px solid);
|
|
21
|
+
--cx__input--border-color: var(--cx__input--background-color);
|
|
22
|
+
/*no modo normal usamos a borda com a mesma cor do bg*/
|
|
23
|
+
--cx__input--focus--border-color: var(--color--primary, #008561);
|
|
24
|
+
--cx__input--disabled--background-color: var(--color--disable-secondary, #F2F5F8);
|
|
25
|
+
--cx__input--disabled--color: var(--text--disable, #AFB6C0);
|
|
26
|
+
--cx__input--error--border-color: #CC2936;
|
|
27
|
+
/* label */
|
|
28
|
+
--cx__label--color: var(--title--primary, #919191);
|
|
29
|
+
/* message box */
|
|
30
|
+
--cx__message_box--font-size: var(--text--small, 12px);
|
|
31
|
+
--cx__message_box--info--color: var(--color--success, #22085d);
|
|
32
|
+
--cx__message_box--error--color: var(--color--error, #FF0000);
|
|
33
|
+
|
|
34
|
+
/* list */
|
|
35
|
+
--cx__list-text--primary:var(--text--primary,#626e82);
|
|
36
|
+
--cx__list-text--secondary:var(--text--secondary,#a2abb9);
|
|
37
|
+
--cx__list-height:calc(var(--cx--font-size) + var(--cx--space--medium));
|
|
38
|
+
|
|
39
|
+
/***************
|
|
40
|
+
host style
|
|
41
|
+
***************/
|
|
42
|
+
/*private*/
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-wrap: wrap;
|
|
45
|
+
position: relative;
|
|
46
|
+
/*public*/
|
|
47
|
+
width: var(--cx--width);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
ez-text-input{
|
|
51
|
+
--it__input--background-color: var(--cx__input--background-color, #FFFFFF);
|
|
52
|
+
--it__input--border-color: var(--cx__input--border-color, #DCE0E8);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.invisible {
|
|
56
|
+
visibility: hidden;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.list-container{
|
|
60
|
+
scroll-behavior: smooth;
|
|
61
|
+
z-index: var(--cx__list-z-index);
|
|
62
|
+
padding: var(--cx--space--small);
|
|
63
|
+
background: var(--cx--background-color--xlight);
|
|
64
|
+
border-radius: var(--cx--border-radius);
|
|
65
|
+
width: 100%;
|
|
66
|
+
overflow: auto;
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
/* height of 4 internal elements plus upper and down padding */
|
|
69
|
+
max-height: calc(4*var(--cx__list-height) + 2*var(--cx--space--small));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
li{
|
|
73
|
+
|
|
74
|
+
list-style-type: none;
|
|
75
|
+
border-radius: var(--cx--border-radius-small);
|
|
76
|
+
padding: 0 var(--cx--space--small);
|
|
77
|
+
display: flex;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
align-items: center;
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
li:hover{
|
|
84
|
+
background-color: var(--background--medium);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.--li--preselected{
|
|
88
|
+
background-color: var(--background--strong);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.--li__spanlabel{
|
|
92
|
+
color: var(--cx__list-text--primary);
|
|
93
|
+
border-radius: var(--cx--border-radius-small);
|
|
94
|
+
padding: 0 var(--cx--space--small);
|
|
95
|
+
height: var(--cx__list-height);
|
|
96
|
+
font-weight: var(--cx--font-weight--large);
|
|
97
|
+
font-family: var(--cx--font-family);
|
|
98
|
+
line-height: var(--cx__list-height);
|
|
99
|
+
vertical-align: middle;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
width: 80%;
|
|
102
|
+
min-width: 30px;
|
|
103
|
+
overflow-x: hidden;
|
|
104
|
+
text-align: left;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.--li__spanlabel--full-width{
|
|
108
|
+
color: var(--cx__list-text--primary);
|
|
109
|
+
border-radius: var(--cx--border-radius-small);
|
|
110
|
+
padding: 0 var(--cx--space--small);
|
|
111
|
+
height: var(--cx__list-height);
|
|
112
|
+
font-weight: var(--cx--font-weight--large);
|
|
113
|
+
font-family: var(--cx--font-family);
|
|
114
|
+
line-height: var(--cx__list-height);
|
|
115
|
+
vertical-align: middle;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
width: 100%;
|
|
118
|
+
min-width: 30px;
|
|
119
|
+
overflow-x: hidden;
|
|
120
|
+
text-align: left;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.--li__spanvalue{
|
|
124
|
+
color: var(--cx__list-text--secondary);
|
|
125
|
+
border-radius: var(--cx--border-radius-small);
|
|
126
|
+
padding: 0 var(--cx--space--small);
|
|
127
|
+
height: var(--cx__list-height);
|
|
128
|
+
font-weight: var(--cx--font-weight--medium);
|
|
129
|
+
font-family: var(--cx--font-family);
|
|
130
|
+
line-height: var(--cx__list-height);
|
|
131
|
+
vertical-align: middle;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
width: 20%;
|
|
134
|
+
min-width: 20px;
|
|
135
|
+
overflow-x: hidden;
|
|
136
|
+
text-align: left;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.btn-open-options{
|
|
140
|
+
outline: none;
|
|
141
|
+
border: none;
|
|
142
|
+
background-color: unset;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.btn-open-options:disabled{
|
|
147
|
+
cursor: unset;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.btn-open-options::after{
|
|
151
|
+
content: '';
|
|
152
|
+
display: flex;
|
|
153
|
+
background-color: var(--text--primary, #008561);
|
|
154
|
+
width: 16px;
|
|
155
|
+
height: 16px;
|
|
156
|
+
clip-path: path("M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z");
|
|
157
|
+
}
|
|
158
|
+
.btn-open-options:disabled:after{
|
|
159
|
+
background-color: var(--text--disable, #AFB6C0);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.btn-open-options:enabled:hover::after{
|
|
163
|
+
background-color: var(--color--primary, #4e4e4e);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|