@masterkeymaterial/ui 0.0.2 → 0.0.4
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/fesm2022/masterkeymaterial-ui.mjs +6457 -0
- package/fesm2022/masterkeymaterial-ui.mjs.map +1 -0
- package/package.json +14 -5
- package/types/masterkeymaterial-ui.d.ts +928 -0
- package/ng-package.json +0 -10
- package/src/elements/ui-button/ui-button.css +0 -229
- package/src/elements/ui-button/ui-button.html +0 -12
- package/src/elements/ui-button/ui-button.ts +0 -133
- package/src/elements/ui-check-box/ui-check-box.css +0 -66
- package/src/elements/ui-check-box/ui-check-box.html +0 -5
- package/src/elements/ui-check-box/ui-check-box.ts +0 -65
- package/src/elements/ui-chip/ui-chip.css +0 -24
- package/src/elements/ui-chip/ui-chip.html +0 -3
- package/src/elements/ui-chip/ui-chip.ts +0 -25
- package/src/elements/ui-drop-zone/ui-drop-zone.css +0 -91
- package/src/elements/ui-drop-zone/ui-drop-zone.html +0 -8
- package/src/elements/ui-drop-zone/ui-drop-zone.ts +0 -153
- package/src/elements/ui-file-list/ui-file-list.css +0 -43
- package/src/elements/ui-file-list/ui-file-list.html +0 -17
- package/src/elements/ui-file-list/ui-file-list.ts +0 -22
- package/src/elements/ui-list-errors/ui-list-errors.css +0 -30
- package/src/elements/ui-list-errors/ui-list-errors.html +0 -10
- package/src/elements/ui-list-errors/ui-list-errors.ts +0 -14
- package/src/elements/ui-loading/ui-loading.css +0 -13
- package/src/elements/ui-loading/ui-loading.html +0 -1
- package/src/elements/ui-loading/ui-loading.ts +0 -10
- package/src/elements/ui-menu/ui-menu.css +0 -69
- package/src/elements/ui-menu/ui-menu.html +0 -20
- package/src/elements/ui-menu/ui-menu.ts +0 -267
- package/src/elements/ui-procurar/ui-procurar.css +0 -48
- package/src/elements/ui-procurar/ui-procurar.html +0 -14
- package/src/elements/ui-procurar/ui-procurar.ts +0 -82
- package/src/elements/ui-progress/ui-progress.css +0 -0
- package/src/elements/ui-progress/ui-progress.html +0 -1
- package/src/elements/ui-progress/ui-progress.ts +0 -15
- package/src/elements/ui-select/ui-select.css +0 -211
- package/src/elements/ui-select/ui-select.html +0 -46
- package/src/elements/ui-select/ui-select.ts +0 -482
- package/src/elements/ui-slide/ui-slide.css +0 -75
- package/src/elements/ui-slide/ui-slide.html +0 -7
- package/src/elements/ui-slide/ui-slide.ts +0 -61
- package/src/fields/Base/BaseFieldsForm/BaseFieldsForm.component.ts +0 -113
- package/src/fields/Base/BaseFieldsValues/BaseFieldsValues.ts +0 -112
- package/src/fields/Formulario/Formulario.ts +0 -1056
- package/src/fields/Formulario/form-action/form-action.css +0 -98
- package/src/fields/Formulario/form-action/form-action.html +0 -75
- package/src/fields/Formulario/form-action/form-action.ts +0 -187
- package/src/fields/Formulario/form-controls/form-controls.css +0 -108
- package/src/fields/Formulario/form-controls/form-controls.html +0 -105
- package/src/fields/Formulario/form-controls/form-controls.ts +0 -122
- package/src/fields/Formulario/form-fase/form-fase.css +0 -84
- package/src/fields/Formulario/form-fase/form-fase.html +0 -24
- package/src/fields/Formulario/form-fase/form-fase.ts +0 -157
- package/src/fields/Formulario/form-filter/form-filter.css +0 -50
- package/src/fields/Formulario/form-filter/form-filter.html +0 -25
- package/src/fields/Formulario/form-filter/form-filter.ts +0 -53
- package/src/fields/Formulario/form-no-action/form-no-action.css +0 -32
- package/src/fields/Formulario/form-no-action/form-no-action.html +0 -12
- package/src/fields/Formulario/form-no-action/form-no-action.ts +0 -21
- package/src/fields/Formulario/formated-values/formated-values.css +0 -104
- package/src/fields/Formulario/formated-values/formated-values.html +0 -15
- package/src/fields/Formulario/formated-values/formated-values.ts +0 -186
- package/src/fields/Formulario/single-values/single-values.css +0 -88
- package/src/fields/Formulario/single-values/single-values.html +0 -11
- package/src/fields/Formulario/single-values/single-values.ts +0 -65
- package/src/fields/autocomplete/autocomplete.css +0 -94
- package/src/fields/autocomplete/autocomplete.html +0 -38
- package/src/fields/autocomplete/autocomplete.ts +0 -294
- package/src/fields/button/button.css +0 -7
- package/src/fields/button/button.html +0 -19
- package/src/fields/button/button.ts +0 -38
- package/src/fields/checkbox/checkbox.css +0 -27
- package/src/fields/checkbox/checkbox.html +0 -20
- package/src/fields/checkbox/checkbox.ts +0 -44
- package/src/fields/color/CirculoColorido/circulocolorido.css +0 -50
- package/src/fields/color/CirculoColorido/circulocolorido.html +0 -8
- package/src/fields/color/CirculoColorido/circulocolorido.ts +0 -24
- package/src/fields/color/color.css +0 -15
- package/src/fields/color/color.html +0 -24
- package/src/fields/color/color.ts +0 -47
- package/src/fields/date/date.html +0 -19
- package/src/fields/date/date.ts +0 -29
- package/src/fields/datetime/datetime.html +0 -19
- package/src/fields/datetime/datetime.ts +0 -29
- package/src/fields/display/display.css +0 -7
- package/src/fields/display/display.html +0 -20
- package/src/fields/display/display.ts +0 -43
- package/src/fields/editor/editor.css +0 -51
- package/src/fields/editor/editor.html +0 -37
- package/src/fields/editor/editor.ts +0 -218
- package/src/fields/email/email.html +0 -19
- package/src/fields/email/email.ts +0 -29
- package/src/fields/fields.css +0 -180
- package/src/fields/generic/generic.html +0 -3
- package/src/fields/generic/generic.ts +0 -91
- package/src/fields/hidden/hidden.html +0 -3
- package/src/fields/hidden/hidden.ts +0 -20
- package/src/fields/icon/icon.css +0 -19
- package/src/fields/icon/icon.html +0 -27
- package/src/fields/icon/icon.ts +0 -31
- package/src/fields/multifactor/multifactor.css +0 -21
- package/src/fields/multifactor/multifactor.html +0 -39
- package/src/fields/multifactor/multifactor.ts +0 -106
- package/src/fields/multikv/multikv.css +0 -43
- package/src/fields/multikv/multikv.html +0 -47
- package/src/fields/multikv/multikv.ts +0 -88
- package/src/fields/multitext/multitext.css +0 -36
- package/src/fields/multitext/multitext.html +0 -38
- package/src/fields/multitext/multitext.ts +0 -75
- package/src/fields/number/number.html +0 -20
- package/src/fields/number/number.ts +0 -35
- package/src/fields/password/password.html +0 -23
- package/src/fields/password/password.ts +0 -37
- package/src/fields/search/search.css +0 -0
- package/src/fields/search/search.html +0 -19
- package/src/fields/search/search.ts +0 -54
- package/src/fields/select/select.css +0 -15
- package/src/fields/select/select.html +0 -18
- package/src/fields/select/select.ts +0 -52
- package/src/fields/slide/slide.css +0 -27
- package/src/fields/slide/slide.html +0 -20
- package/src/fields/slide/slide.ts +0 -45
- package/src/fields/text/text.html +0 -19
- package/src/fields/text/text.ts +0 -30
- package/src/fields/textarea/textarea.css +0 -4
- package/src/fields/textarea/textarea.html +0 -20
- package/src/fields/textarea/textarea.ts +0 -31
- package/src/fields/time/time.html +0 -19
- package/src/fields/time/time.ts +0 -29
- package/src/fields/upload/upload.css +0 -24
- package/src/fields/upload/upload.html +0 -41
- package/src/fields/upload/upload.ts +0 -137
- package/src/interfaces/interfaces.ts +0 -61
- package/src/public-api.ts +0 -38
- package/src/util/ClassOf.pipe.ts +0 -11
- package/src/util/JsonColorido.pipe.ts +0 -11
- package/src/util/util.ts +0 -2151
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -13
package/ng-package.json
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
user-select: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
button {
|
|
7
|
-
width: var(--ui-width, 100%);
|
|
8
|
-
height: var(--ui-height, 40px);
|
|
9
|
-
min-height: var(--ui-min-height, auto);
|
|
10
|
-
display: var(--ui-display, flex);
|
|
11
|
-
flex-direction: var(--ui-flex-direction, row);
|
|
12
|
-
justify-content: var(--ui-justify-content, center);
|
|
13
|
-
align-items: var(--ui-align-items, center);
|
|
14
|
-
background-color: var(--ui-background, var(--sys-background));
|
|
15
|
-
color: var(--ui-on-background, var(--sys-on-background));
|
|
16
|
-
border-radius: var(--ui-border-radius, var(--MasterRadius, 15px));
|
|
17
|
-
gap: var(--ui-gap, 0.5rem);
|
|
18
|
-
text-align: var(--ui-text-align, center);
|
|
19
|
-
font-size: var(--ui-font-size, 14px);
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
text-decoration: none;
|
|
22
|
-
border: none;
|
|
23
|
-
position: relative;
|
|
24
|
-
padding: var(--ui-padding, 0 16px);
|
|
25
|
-
outline: 1px solid var(--ui-outline-color, transparent);
|
|
26
|
-
outline-offset: var(--ui-outline-offset, -1px);
|
|
27
|
-
margin: var(--ui-margin, 0);
|
|
28
|
-
--button-transparency: var(--ui-effect-color, light-dark(#00000025, #ffffff25));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
button.radiusTabFormat {
|
|
32
|
-
border-radius: var(--MasterRadius, 15px) var(--MasterRadius, 15px) 0 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* TODOS HOVER */
|
|
36
|
-
button:hover,
|
|
37
|
-
button:focus-visible {
|
|
38
|
-
filter: brightness(1.1) saturate(1.1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
button.icon:hover,
|
|
42
|
-
button.nofill:hover,
|
|
43
|
-
button.outlined:hover,
|
|
44
|
-
button.menu-item:hover,
|
|
45
|
-
button.menu-item-category:hover,
|
|
46
|
-
button.sidebar-item:hover,
|
|
47
|
-
button.sidebar-item-category:hover,
|
|
48
|
-
button.big:hover,
|
|
49
|
-
button.big:focus-visible,
|
|
50
|
-
button.icon:focus-visible,
|
|
51
|
-
button.nofill:focus-visible {
|
|
52
|
-
background-color: color-mix(in srgb, var(--btnr-corFundo, hsl(0 0 50)) 10%, transparent 90%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.expandedClick:hover {
|
|
56
|
-
cursor: pointer;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* FIM DOS HOVER */
|
|
60
|
-
|
|
61
|
-
button.fill {
|
|
62
|
-
background-color: var(--btnr-corFundo, var(--sys-background));
|
|
63
|
-
color: var(--btnr-corFrente, var(--sys-on-background));
|
|
64
|
-
--ui-cor-icone: var(--btnr-corFrente, var(--sys-on-background));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
button.nofill {
|
|
68
|
-
background-color: var(--ui-background, transparent);
|
|
69
|
-
color: var(--ui-on-background, var(--btnr-corFundo, var(--sys-on-background)));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
button.icon {
|
|
73
|
-
background-color: transparent;
|
|
74
|
-
--ui-cor-icone: var(--ui-on-background, var(--btnr-corFundo));
|
|
75
|
-
/* color: var(--ui-on-background, var(--btnr-corFundo)); */
|
|
76
|
-
height: var(--ui-height, 100%);
|
|
77
|
-
min-width: 36px;
|
|
78
|
-
aspect-ratio: 1 / 1;
|
|
79
|
-
padding: 0;
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
button.outlined {
|
|
86
|
-
outline: 1px solid var(--ui-outline-color, var(--sys-outline));
|
|
87
|
-
color: var(--btnr-corFundo);
|
|
88
|
-
background-color: transparent;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
button.menu-item {
|
|
92
|
-
color: var(--ui-color, var(--sys-on-background));
|
|
93
|
-
background-color: transparent;
|
|
94
|
-
border-radius: 0px;
|
|
95
|
-
padding: var(--ui-padding, 0 16px);
|
|
96
|
-
height: var(--ui-height, auto);
|
|
97
|
-
min-height: var(--ui-min-height, 40px);
|
|
98
|
-
justify-content: var(--ui-justify-content, flex-start);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
button.menu-item-category {
|
|
102
|
-
color: var(--ui-color, var(--sys-on-background));
|
|
103
|
-
background-color: transparent;
|
|
104
|
-
border-radius: 0px;
|
|
105
|
-
padding: var(--ui-padding, 0 16px);
|
|
106
|
-
height: var(--ui-height, auto);
|
|
107
|
-
min-height: var(--ui-min-height, 40px);
|
|
108
|
-
justify-content: var(--ui-justify-content, flex-start);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
button.raised {
|
|
112
|
-
color: var(--btnr-corFundo);
|
|
113
|
-
background-color: color-mix(in srgb, var(--sys-background) 40%, transparent 60%);
|
|
114
|
-
box-shadow:
|
|
115
|
-
2px 2px 4px var(--button-transparency),
|
|
116
|
-
inset -1px -1px 1px var(--button-transparency);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
button.big {
|
|
120
|
-
background-color: transparent;
|
|
121
|
-
color: var(--btnr-corFundo);
|
|
122
|
-
height: var(--ui-height, 100%);
|
|
123
|
-
padding: var(--ui-padding, 10px);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
button.sidebar-item {
|
|
127
|
-
color: var(--ui-color, var(--sys-on-background));
|
|
128
|
-
background-color: transparent;
|
|
129
|
-
border-radius: 0px;
|
|
130
|
-
padding: var(--ui-padding, 0 16px);
|
|
131
|
-
height: var(--ui-height, auto);
|
|
132
|
-
min-height: var(--ui-min-height, 40px);
|
|
133
|
-
justify-content: var(--ui-justify-content, flex-start);
|
|
134
|
-
border-top-right-radius: var(--MasterRadius);
|
|
135
|
-
border-bottom-right-radius: var(--MasterRadius);
|
|
136
|
-
transition: all 0.3s;
|
|
137
|
-
outline: none;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
button.sidebar-item-category {
|
|
141
|
-
color: var(--ui-color, var(--sys-on-background));
|
|
142
|
-
background-color: transparent;
|
|
143
|
-
border-radius: 0px;
|
|
144
|
-
padding: var(--ui-padding, 0 16px);
|
|
145
|
-
height: var(--ui-height, auto);
|
|
146
|
-
min-height: var(--ui-min-height, 40px);
|
|
147
|
-
justify-content: var(--ui-justify-content, flex-start);
|
|
148
|
-
border-top-right-radius: var(--MasterRadius);
|
|
149
|
-
border-bottom-right-radius: var(--MasterRadius);
|
|
150
|
-
transition: all 0.3s;
|
|
151
|
-
outline: none;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.ripple {
|
|
157
|
-
position: absolute;
|
|
158
|
-
border-radius: 50%;
|
|
159
|
-
background: var(--button-transparency);
|
|
160
|
-
transform: scale(0);
|
|
161
|
-
animation: ripple-animation 0.7s ease-out;
|
|
162
|
-
pointer-events: none;
|
|
163
|
-
z-index: 2;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@keyframes ripple-animation {
|
|
167
|
-
to {
|
|
168
|
-
transform: scale(1.4);
|
|
169
|
-
opacity: 0;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.expandedClick {
|
|
174
|
-
position: absolute;
|
|
175
|
-
top: 0;
|
|
176
|
-
left: 0;
|
|
177
|
-
width: 100%;
|
|
178
|
-
height: 100%;
|
|
179
|
-
z-index: 2;
|
|
180
|
-
overflow: hidden;
|
|
181
|
-
border-radius: inherit;
|
|
182
|
-
/* background-color: red; */
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.icon .expandedClick {
|
|
187
|
-
transform: scale(1.1);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.disabled,
|
|
191
|
-
.disabled .expandedClick {
|
|
192
|
-
pointer-events: none;
|
|
193
|
-
cursor: default;
|
|
194
|
-
filter: grayscale(1);
|
|
195
|
-
opacity: 0.7;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.icone {
|
|
199
|
-
flex: 0;
|
|
200
|
-
opacity: var(--ui-opacity, 1);
|
|
201
|
-
font-size: var(--ui-font-size-icone, var(--ui-font-size));
|
|
202
|
-
color: var(--ui-cor-icone, var(--btnr-corFundo, var(--sys-on-background)));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.iconeCategory {
|
|
206
|
-
position: absolute;
|
|
207
|
-
right: 10px;
|
|
208
|
-
transition: transform 0.3s;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.ativo {
|
|
212
|
-
outline: 1px outset var(--sys-high);
|
|
213
|
-
box-shadow:
|
|
214
|
-
0 0 1px var(--sys-high),
|
|
215
|
-
inset 0 0 5px var(--sys-high);
|
|
216
|
-
border-radius: var(--MasterRadius);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
button.sidebar-item.ativo,
|
|
220
|
-
button.sidebar-item-category.ativo {
|
|
221
|
-
outline: none;
|
|
222
|
-
box-shadow: none;
|
|
223
|
-
background-color: color-mix(in srgb, var(--btnr-corFundo, hsl(0 0 50)) 10%, transparent 90%);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
button.sidebar-item-category.category.ativo .iconeCategory {
|
|
227
|
-
transform: rotate(180deg);
|
|
228
|
-
transition: transform 0.3s;
|
|
229
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<button #botao type="button" [class]="buttonClasses()" [style.--btnr-corFundo]="corFundo()"
|
|
2
|
-
[style.--btnr-corFrente]="corFrente()" [disabled]="disabled()" [tabIndex]="tabindex()"
|
|
3
|
-
[class.radiusTabFormat]="radiusTabFormat()" [class.disabled]="disabled()" [class.ativo]="ativo()"
|
|
4
|
-
(keyup.Enter)="onKeyPressed($event)" [class.category]="isCategory()">
|
|
5
|
-
@if(icone() && iconeAntes()){ <div class="icone iconeAntes"><i [class]="icone()"></i></div> }
|
|
6
|
-
<ng-content />
|
|
7
|
-
@if(icone() && iconeDepois()){ <div class="icone iconeDepois"><i [class]="icone()"></i></div> }
|
|
8
|
-
@if(isCategory()){ <div class="icone iconeCategory"><i [class]="iconeCategory()"></i></div> }
|
|
9
|
-
<span #rippleEffect class="expandedClick" (click)="onClickExpanded($event)">
|
|
10
|
-
<span #ripple class="ripple"></span>
|
|
11
|
-
</span>
|
|
12
|
-
</button>
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { Component, computed, effect, ElementRef, input, model, OnInit, output, signal, viewChild } from '@angular/core';
|
|
2
|
-
import { ITipoBotao, ITiposTema } from '../../interfaces/interfaces';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'ui-button',
|
|
6
|
-
templateUrl: './ui-button.html',
|
|
7
|
-
styleUrl: './ui-button.css',
|
|
8
|
-
})
|
|
9
|
-
export class UiButton {
|
|
10
|
-
|
|
11
|
-
botao = viewChild('botao', { read: ElementRef });
|
|
12
|
-
rippleEffect = viewChild('rippleEffect', { read: ElementRef });
|
|
13
|
-
ripple = viewChild('ripple', { read: ElementRef });
|
|
14
|
-
|
|
15
|
-
icone = model<string | undefined | null>(null);
|
|
16
|
-
iconeAntes = model<boolean>(true);
|
|
17
|
-
iconeDepois = model<boolean>(false);
|
|
18
|
-
iconeCategory = model<string>('fa fa-chevron-right');
|
|
19
|
-
|
|
20
|
-
clicked = output<PointerEvent>();
|
|
21
|
-
|
|
22
|
-
disabled = input<boolean>();
|
|
23
|
-
eventPropagation = input<boolean>(false);
|
|
24
|
-
radiusTabFormat = input<boolean>(false);
|
|
25
|
-
tabindex = input<number | string>();
|
|
26
|
-
tipo = input<ITipoBotao | undefined>("fill");
|
|
27
|
-
tema = model<ITiposTema | undefined>("");
|
|
28
|
-
classes = input<string>("");
|
|
29
|
-
ativo = input<boolean>(false);
|
|
30
|
-
|
|
31
|
-
isCategory = computed(() => this.tipo() === 'menu-item-category' || this.tipo() === 'sidebar-item-category');
|
|
32
|
-
buttonClasses = computed(() => {
|
|
33
|
-
return `btnr ${this.tipo() || 'fill'} ${this.classes()}`;
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
corFundo = signal<string | undefined>(undefined);
|
|
37
|
-
corFrente = signal<string | undefined>(undefined);
|
|
38
|
-
|
|
39
|
-
constructor() {
|
|
40
|
-
effect(() => {
|
|
41
|
-
let tema = this.tema();
|
|
42
|
-
switch (tema) {
|
|
43
|
-
case "primary":
|
|
44
|
-
this.corFundo.set(`var(--sys-primary)`);
|
|
45
|
-
this.corFrente.set(`var(--sys-on-primary)`);
|
|
46
|
-
break;
|
|
47
|
-
case "secondary":
|
|
48
|
-
this.corFundo.set(`var(--sys-secondary)`);
|
|
49
|
-
this.corFrente.set(`var(--sys-on-secondary)`);
|
|
50
|
-
break;
|
|
51
|
-
case "high":
|
|
52
|
-
this.corFundo.set(`var(--sys-high)`);
|
|
53
|
-
this.corFrente.set(`var(--sys-on-high)`);
|
|
54
|
-
break;
|
|
55
|
-
case "success":
|
|
56
|
-
this.corFundo.set(`var(--sys-success)`);
|
|
57
|
-
this.corFrente.set(`var(--sys-on-success)`);
|
|
58
|
-
break;
|
|
59
|
-
case "warning":
|
|
60
|
-
this.corFundo.set(`var(--sys-warning)`);
|
|
61
|
-
this.corFrente.set(`var(--sys-on-warning)`);
|
|
62
|
-
break;
|
|
63
|
-
case "error":
|
|
64
|
-
this.corFundo.set(`var(--sys-error)`);
|
|
65
|
-
this.corFrente.set(`var(--sys-on-error)`);
|
|
66
|
-
break;
|
|
67
|
-
case "info":
|
|
68
|
-
this.corFundo.set(`var(--sys-info)`);
|
|
69
|
-
this.corFrente.set(`var(--sys-on-info)`);
|
|
70
|
-
break;
|
|
71
|
-
case "white":
|
|
72
|
-
this.corFundo.set(`var(--sys-white)`);
|
|
73
|
-
this.corFrente.set(`var(--sys-on-white)`);
|
|
74
|
-
break;
|
|
75
|
-
case "black":
|
|
76
|
-
this.corFundo.set(`var(--sys-black)`);
|
|
77
|
-
this.corFrente.set(`var(--sys-on-black)`);
|
|
78
|
-
break;
|
|
79
|
-
case "card":
|
|
80
|
-
this.corFundo.set(`var(--sys-card)`);
|
|
81
|
-
this.corFrente.set(`var(--sys-on-card)`);
|
|
82
|
-
break;
|
|
83
|
-
case "": // Sem Tema
|
|
84
|
-
default: // Tema Desconhecido
|
|
85
|
-
this.corFundo.set(undefined);
|
|
86
|
-
this.corFrente.set(undefined);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
onKeyPressed(ev: Event) {
|
|
94
|
-
this.onClickExpanded(ev as any);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
onClickExpanded(ev: PointerEvent) {
|
|
98
|
-
if (this.disabled()) {
|
|
99
|
-
ev.preventDefault();
|
|
100
|
-
if (this.eventPropagation()) {
|
|
101
|
-
ev.stopPropagation();
|
|
102
|
-
}
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
this.botao()?.nativeElement.focus();
|
|
106
|
-
if (ev instanceof PointerEvent) {
|
|
107
|
-
this.createRipple(ev);
|
|
108
|
-
}
|
|
109
|
-
this.clicked.emit(ev);
|
|
110
|
-
if (this.eventPropagation()) {
|
|
111
|
-
ev.stopPropagation();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
createRipple(e: PointerEvent) {
|
|
116
|
-
const rippleEffect = e.currentTarget ?? this.rippleEffect()?.nativeElement;
|
|
117
|
-
const ripple = this.ripple()?.nativeElement.cloneNode(true) as HTMLElement;
|
|
118
|
-
const rect = rippleEffect.getBoundingClientRect();
|
|
119
|
-
// Calcula a posição do clique relativa ao botão
|
|
120
|
-
const x = e.clientX - rect.left;
|
|
121
|
-
const y = e.clientY - rect.top;
|
|
122
|
-
// Define o tamanho do ripple (maior dimensão do botão * 2)
|
|
123
|
-
const size = Math.max(rect.width, rect.height) * 2;
|
|
124
|
-
ripple.style.width = ripple.style.height = size + 'px';
|
|
125
|
-
ripple.style.left = (x - size / 2) + 'px';
|
|
126
|
-
ripple.style.top = (y - size / 2) + 'px';
|
|
127
|
-
ripple.classList.add('ripple');
|
|
128
|
-
rippleEffect.appendChild(ripple);
|
|
129
|
-
ripple.addEventListener('animationend', () => {
|
|
130
|
-
ripple.remove();
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: contents;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.marcador-area {
|
|
6
|
-
width: var(--ui-size, 22px);
|
|
7
|
-
height: var(--ui-size, 22px);
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
user-select: none;
|
|
13
|
-
border-radius: 50%;
|
|
14
|
-
outline: 1px dashed var(--ui-outline, var(--sys-outline));
|
|
15
|
-
position: relative;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.marcador-area.multiple {
|
|
19
|
-
border-radius: 4px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.marcador-area:focus-visible,
|
|
23
|
-
.marcador-area:hover {
|
|
24
|
-
outline: 1px solid var(--ui-color, var(--sys-primary));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.marcador-area.ativo {
|
|
28
|
-
outline: 1px solid var(--ui-color, var(--sys-primary));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.marcador-area.ativo .checkmark {
|
|
32
|
-
display: block;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.marcador-area.disabled {
|
|
36
|
-
cursor: not-allowed;
|
|
37
|
-
opacity: 0.6;
|
|
38
|
-
filter: grayscale(1);
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.checkmark.simples.ativo {
|
|
43
|
-
background-color: var(--ui-color, var(--sys-primary));
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
border-radius: 50%;
|
|
47
|
-
transform: scale(0.75);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.checkmark.multiple.ativo {
|
|
51
|
-
width: 60%;
|
|
52
|
-
height: 38%;
|
|
53
|
-
border-left: 2px solid var(--ui-color, var(--sys-primary));
|
|
54
|
-
border-bottom: 2px solid var(--ui-color, var(--sys-primary));
|
|
55
|
-
transform: rotate(-45deg) translateX(1px);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.checkmark.multiple.hasDash:not(.ativo) {
|
|
59
|
-
width: 60%;
|
|
60
|
-
height: 2px;
|
|
61
|
-
background-color: var(--ui-color, var(--sys-primary));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.marcador-area:has(.hasDash:not(.ativo)) {
|
|
65
|
-
outline: 1px solid var(--ui-outline, var(--sys-outline));
|
|
66
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<div #marcabox class="marcador-area" tabindex="0" (click)="onClickMarcador()" [class.ativo]="ativo()"
|
|
2
|
-
[class.multiple]="!single()" (focus)="onFocus($event)" (blur)="onBlur($event)" [class.disabled]="disabled()">
|
|
3
|
-
<div class="checkmark {{ single() ? 'simples' : 'multiple' }}" [class.hasDash]="hasDash()" [class.ativo]="ativo()">
|
|
4
|
-
</div>
|
|
5
|
-
</div>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, Component, computed, effect, ElementRef, input, model, output, viewChild } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'ui-check-box',
|
|
5
|
-
templateUrl: './ui-check-box.html',
|
|
6
|
-
styleUrl: './ui-check-box.css',
|
|
7
|
-
host: {
|
|
8
|
-
'[class.focused]': 'focused()',
|
|
9
|
-
}
|
|
10
|
-
})
|
|
11
|
-
export class UiCheckBox implements AfterViewInit {
|
|
12
|
-
|
|
13
|
-
marcabox = viewChild('marcabox', { read: ElementRef });
|
|
14
|
-
|
|
15
|
-
value = model<boolean>(false);
|
|
16
|
-
disabled = input<boolean>();
|
|
17
|
-
focused = model<boolean>(false);
|
|
18
|
-
focus = input<boolean>(false);
|
|
19
|
-
changed = output<boolean>();
|
|
20
|
-
single = input<boolean>(false);
|
|
21
|
-
hasDash = input<boolean>(false);
|
|
22
|
-
|
|
23
|
-
ativo = computed(() => {
|
|
24
|
-
const val = (this.value() as any);
|
|
25
|
-
return val === true || val === 'true' || val === 1 || val === '1';
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
constructor() {
|
|
29
|
-
effect(() => {
|
|
30
|
-
if (this.focus()) {
|
|
31
|
-
this.marcabox()?.nativeElement.focus();
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
ngAfterViewInit(): void {
|
|
37
|
-
this.marcabox()?.nativeElement.addEventListener('keydown', (event: KeyboardEvent) => {
|
|
38
|
-
if (event.key === ' ' || event.key === 'Enter') {
|
|
39
|
-
event.preventDefault();
|
|
40
|
-
this.onClickMarcador();
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
onClickMarcador() {
|
|
46
|
-
if (this.disabled()) return;
|
|
47
|
-
|
|
48
|
-
const currentValue = (this.value() as any);
|
|
49
|
-
const newValue = !(currentValue === true || currentValue === 'true' || currentValue === 1 || currentValue === '1');
|
|
50
|
-
this.value.set(newValue);
|
|
51
|
-
this.changed.emit(newValue);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
onFocus(ev: FocusEvent) {
|
|
55
|
-
if (this.disabled()) return;
|
|
56
|
-
|
|
57
|
-
this.focused.set(true);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
onBlur(ev: FocusEvent) {
|
|
61
|
-
this.focused.set(false);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: var(--ui-display, contents);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.baseChip {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
font-weight: 500;
|
|
8
|
-
white-space: nowrap;
|
|
9
|
-
user-select: none;
|
|
10
|
-
vertical-align: middle;
|
|
11
|
-
line-height: 1;
|
|
12
|
-
outline-offset: -2px;
|
|
13
|
-
padding: 4px 7px;
|
|
14
|
-
color: white;
|
|
15
|
-
letter-spacing: 1.1px;
|
|
16
|
-
text-transform: uppercase;
|
|
17
|
-
font-family: monospace;
|
|
18
|
-
font-size: 12px;
|
|
19
|
-
border-radius: var(--MasterRadius);
|
|
20
|
-
|
|
21
|
-
outline: 1px solid hsl(var(--ChipHue) 50 var(--lightnessHalf) / 50%);
|
|
22
|
-
color: hsl(var(--ChipHue) 50 var(--lightnessHalf));
|
|
23
|
-
background-color: hsl(var(--ChipHue) 50 50 / 10%);
|
|
24
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Component, computed, input } from '@angular/core';
|
|
2
|
-
import { LibUtil } from '../../util/util';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'ui-chip',
|
|
6
|
-
templateUrl: './ui-chip.html',
|
|
7
|
-
styleUrl: './ui-chip.css',
|
|
8
|
-
})
|
|
9
|
-
export class UiChip {
|
|
10
|
-
|
|
11
|
-
// HSL
|
|
12
|
-
cor = input<number | null | undefined>();
|
|
13
|
-
|
|
14
|
-
hue = computed<number | null>(() => {
|
|
15
|
-
let hue = this.cor();
|
|
16
|
-
if (LibUtil.classof(hue) == 'number') {
|
|
17
|
-
if (hue! < 0) { return 0; };
|
|
18
|
-
if (hue! > 359) { return 359; };
|
|
19
|
-
return hue!;
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
flex: 1;
|
|
6
|
-
position: relative;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
padding: 5px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
min-height: var(--ui-min-height, 200px);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dropzone {
|
|
14
|
-
--minOffset: 1px;
|
|
15
|
-
padding: 2px;
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
border-radius: var(--MasterRadius);
|
|
20
|
-
background-color: var(--sys-primary-15);
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
outline: 1px dashed var(--sys-primary);
|
|
23
|
-
outline-offset: var(--minOffset);
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 5px;
|
|
26
|
-
left: 5px;
|
|
27
|
-
width: calc(100% - 10px);
|
|
28
|
-
height: calc(100% - 10px);
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
z-index: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.dropzone.naosobrepor {
|
|
34
|
-
z-index: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.dropzone.disabled {
|
|
38
|
-
filter: grayscale(1);
|
|
39
|
-
cursor: auto;
|
|
40
|
-
pointer-events: none;
|
|
41
|
-
opacity: 0.8;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.dropzone * {
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.dropzone.dragging .grid {
|
|
49
|
-
pointer-events: none !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.dropzone.dragging {
|
|
53
|
-
outline: 3px dashed var(--sys-primary);
|
|
54
|
-
animation: onDragging 0.8s infinite ease-in-out;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@keyframes onDragging {
|
|
58
|
-
0% {
|
|
59
|
-
outline-offset: var(--minOffset);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
50% {
|
|
63
|
-
outline-offset: -8px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
100% {
|
|
67
|
-
outline-offset: var(--minOffset);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.ripple {
|
|
73
|
-
position: absolute;
|
|
74
|
-
border-radius: 50%;
|
|
75
|
-
background: rgba(var(--toDark), 0.2);
|
|
76
|
-
transform: scale(0);
|
|
77
|
-
animation: ripple-animation 0.7s ease-out;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
z-index: 2;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@keyframes ripple-animation {
|
|
83
|
-
to {
|
|
84
|
-
transform: scale(1.4);
|
|
85
|
-
opacity: 0;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.ripple.red {
|
|
90
|
-
background: rgba(255, 0, 0, 0.2);
|
|
91
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<div #dropzonearea class="dropzone" [class.naosobrepor]="!sobrepor()" (dragenter)="onDropZone('dragenter',$event)"
|
|
2
|
-
(dragleave)="onDropZone('dragleave',$event)" (drop)="onDrop($event)" (dragover)="onDropZone('dragover',$event)"
|
|
3
|
-
(click)="onDropZone('click',$event)" [class.disabled]="disabled()" [class.dragging]="isDragging">
|
|
4
|
-
<span #rippleEffect class="rippleArea">
|
|
5
|
-
<span #ripple class="ripple"></span>
|
|
6
|
-
</span>
|
|
7
|
-
</div>
|
|
8
|
-
<ng-content></ng-content>
|