@wizco/fenixds-core 1.0.1
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 +24 -0
- package/esm2022/lib/styles/styles.component.mjs +12 -0
- package/esm2022/public-api.mjs +5 -0
- package/esm2022/wizco-fenixds-core.mjs +5 -0
- package/fesm2022/wizco-fenixds-core.mjs +23 -0
- package/fesm2022/wizco-fenixds-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/styles/styles.component.d.ts +5 -0
- package/package.json +33 -0
- package/public-api.d.ts +1 -0
- package/styles/core.css +3310 -0
- package/styles/scss/button.scss +288 -0
- package/styles/scss/core.scss +6 -0
- package/styles/scss/forms.scss +343 -0
- package/styles/scss/helpers.scss +4213 -0
- package/styles/scss/tooltip.scss +179 -0
- package/styles/scss/typography.scss +84 -0
- package/styles/scss/variables.scss +113 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
button.btn,
|
|
2
|
+
a.btn {
|
|
3
|
+
font-size: var(--btn-size, 16px);
|
|
4
|
+
gap: var(--btn-gap, 8px);
|
|
5
|
+
border-radius: var(--btn-radius, 8px);
|
|
6
|
+
min-height: var(--btn-min-h, 48px);
|
|
7
|
+
padding: var(--btn-padding, 8px 16px);
|
|
8
|
+
// border: 2px solid var(--btn-border-color, transparent);
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
position: relative;
|
|
13
|
+
border: none;
|
|
14
|
+
width: fit-content;
|
|
15
|
+
letter-spacing: 1.1px;
|
|
16
|
+
transition: all 300ms ease-in-out, outline 0ms linear;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
// &:focus-within:not(:active),
|
|
19
|
+
&:focus-visible {
|
|
20
|
+
outline: 2px solid var(--btn-focus, var(--textBtn));
|
|
21
|
+
}
|
|
22
|
+
&:not([class*=" bg-"]) {
|
|
23
|
+
background-color: var(--bgBtn);
|
|
24
|
+
color: var(--textBtn);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:disabled:not(.btn-loading) {
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
--bgBtn: var(--wco-color-neutral-300);
|
|
30
|
+
--textBtn: var(--wco-color-neutral-900);
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
opacity: 0.4;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:not(:disabled),
|
|
36
|
+
&:not(.btn-loading) {
|
|
37
|
+
&:hover {
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
box-shadow: var(--wco-shadow-level-1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:active {
|
|
43
|
+
transform: scale(0.99) translateY(0.5px);
|
|
44
|
+
box-shadow: var(--wco-shadow-level-0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:not([class*=" btn-loading"]) {
|
|
49
|
+
&:after {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
bottom: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
height: 0px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
background-color: black;
|
|
57
|
+
filter: contrast(100px);
|
|
58
|
+
opacity: 0.1;
|
|
59
|
+
transition: all 300ms ease;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.btn-primary {
|
|
64
|
+
--bgBtn: var(--wco-color-primary-600);
|
|
65
|
+
--textBtn: var(--wco-color-primary-text);
|
|
66
|
+
--btn-focus: var(--wco-color-primary-900);
|
|
67
|
+
|
|
68
|
+
&:hover:not(.btn-outline) {
|
|
69
|
+
--bgBtn: var(--wco-color-primary-700);
|
|
70
|
+
--textBtn: var(--wco-color-primary-text);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:active:not(.btn-outline) {
|
|
74
|
+
--bgBtn: var(--wco-color-primary-700);
|
|
75
|
+
--textBtn: var(--wco-color-primary-text);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.btn-outline {
|
|
79
|
+
background-color: transparent;
|
|
80
|
+
--textBtn: var(--wco-color-primary-600);
|
|
81
|
+
--btn-focus: var(--wco-color-primary-600);
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: var(--wco-color-primary-50);
|
|
84
|
+
--textBtn: var(--wco-color-primary-700);
|
|
85
|
+
--bgBtn: var(--wco-color-primary-700);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:active {
|
|
89
|
+
background-color: var(--wco-color-primary-50);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
&.btn-basic {
|
|
93
|
+
box-shadow: none;
|
|
94
|
+
--bgBtn: transparent;
|
|
95
|
+
--textBtn: var(--wco-color-primary-600);
|
|
96
|
+
&:hover {
|
|
97
|
+
--textBtn: var(--wco-color-primary-700);
|
|
98
|
+
--bgBtn: var(--wco-color-primary-50);
|
|
99
|
+
}
|
|
100
|
+
&:focus-visible,
|
|
101
|
+
// &:focus-within,
|
|
102
|
+
&:active {
|
|
103
|
+
--textBtn: var(--wco-color-primary-900);
|
|
104
|
+
--bgBtn: var(--wco-color-primary-100);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.btn-secondary {
|
|
110
|
+
--bgBtn: var(--wco-color-secondary-100);
|
|
111
|
+
--textBtn: var(--wco-color-secondary-900);
|
|
112
|
+
--btn-focus: var(--wco-color-secondary-900);
|
|
113
|
+
&:hover:not(.btn-outline) {
|
|
114
|
+
--bgBtn: var(--wco-color-secondary-50);
|
|
115
|
+
--textBtn: var(--wco-color-secondary-900);
|
|
116
|
+
box-shadow: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:active:not(.btn-outline) {
|
|
120
|
+
--bgBtn: var(--wco-color-secondary-50);
|
|
121
|
+
--textBtn: var(--wco-color-secondary-900);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&.btn-outline {
|
|
125
|
+
background-color: transparent;
|
|
126
|
+
--textBtn: var(--wco-color-secondary-600);
|
|
127
|
+
--btn-focus: var(--wco-color-secondary-600);
|
|
128
|
+
|
|
129
|
+
&:hover {
|
|
130
|
+
background-color: var(--wco-color-secondary-50);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:active {
|
|
134
|
+
background-color: var(--wco-color-secondary-100);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.btn-basic {
|
|
139
|
+
box-shadow: none;
|
|
140
|
+
--bgBtn: transparent;
|
|
141
|
+
--textBtn: var(--wco-color-secondary-600);
|
|
142
|
+
|
|
143
|
+
&:hover {
|
|
144
|
+
--textBtn: var(--wco-color-secondary-700);
|
|
145
|
+
--bgBtn: var(--wco-color-secondary-50);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:focus-visible,
|
|
149
|
+
// &:focus-within,
|
|
150
|
+
&:active {
|
|
151
|
+
--textBtn: var(--wco-color-secondary-900);
|
|
152
|
+
--bgBtn: var(--wco-color-secondary-100);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.btn-link {
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
--textBtn: var(--wco-color-primary-600);
|
|
160
|
+
text-decoration: underline;
|
|
161
|
+
&:hover:not(.btn-outline) {
|
|
162
|
+
--textBtn: var(--wco-color-primary-700);
|
|
163
|
+
box-shadow: none;
|
|
164
|
+
}
|
|
165
|
+
&:active:not(.btn-outline) {
|
|
166
|
+
background-color: var(--wco-color-primary-100);
|
|
167
|
+
--bgBtn: var(--wco-color-primary-900);
|
|
168
|
+
--textBtn: var(--wco-color-primary-900);
|
|
169
|
+
box-shadow: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.btn-outline {
|
|
173
|
+
border: 0px solid transparent;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
//// tamanhos
|
|
178
|
+
&.btn-full {
|
|
179
|
+
width: 100%;
|
|
180
|
+
min-width: max-content;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.btn-md {
|
|
184
|
+
--btn-min-h: 40px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&.btn-sm {
|
|
188
|
+
--btn-min-h: 32px;
|
|
189
|
+
--btn-padding: 4px 16px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/// Outline
|
|
193
|
+
&.btn-outline {
|
|
194
|
+
border: 2px solid var(--bgBtn);
|
|
195
|
+
|
|
196
|
+
&:disabled {
|
|
197
|
+
background-color: transparent;
|
|
198
|
+
--textBtn: var(--wco-color-neutral-50);
|
|
199
|
+
--bgBtn: var(--wco-color-neutral-700);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/// Basico
|
|
204
|
+
// &.btn-basic:not(:hover, :active) {
|
|
205
|
+
// --textBtn: var(--bgBtn);
|
|
206
|
+
// background-color: transparent;
|
|
207
|
+
// }
|
|
208
|
+
|
|
209
|
+
&.btn-loading {
|
|
210
|
+
position: relative;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
pointer-events: none;
|
|
213
|
+
cursor: none;
|
|
214
|
+
|
|
215
|
+
&:before {
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: 0;
|
|
218
|
+
left: 0;
|
|
219
|
+
width: 0%;
|
|
220
|
+
height: 100%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&:before {
|
|
224
|
+
content: "";
|
|
225
|
+
background-color: rgba(33, 29, 29, 0.15);
|
|
226
|
+
animation: loadingButton 2s ease infinite;
|
|
227
|
+
z-index: 22;
|
|
228
|
+
|
|
229
|
+
@keyframes loadingButton {
|
|
230
|
+
to {
|
|
231
|
+
width: 100%;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&.btn-icon {
|
|
238
|
+
--btn-padding: 4px;
|
|
239
|
+
min-height: var(--btn-min-h, 48px);
|
|
240
|
+
min-width: var(--btn-min-h, 48px);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/// /////////////
|
|
244
|
+
/// Notificações
|
|
245
|
+
/// /////////////
|
|
246
|
+
&.btn.btn-notification {
|
|
247
|
+
--btn-notification-size: var(--wco-spacing-xxs);
|
|
248
|
+
--btn-notification-time: 2s;
|
|
249
|
+
--btn-notification-count: infinite;
|
|
250
|
+
--btn-notification-color: var(--bgBtn);
|
|
251
|
+
&:not(.btn-outline) {
|
|
252
|
+
&:before {
|
|
253
|
+
outline: 2px solid var(--textBtn);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:before {
|
|
258
|
+
content: "";
|
|
259
|
+
position: absolute;
|
|
260
|
+
top: calc(var(--btn-notification-size) / -2);
|
|
261
|
+
right: calc(var(--btn-notification-size) / -2);
|
|
262
|
+
height: 16px;
|
|
263
|
+
width: 16px;
|
|
264
|
+
border-radius: 50%;
|
|
265
|
+
background-color: var(--btn-notification-color);
|
|
266
|
+
filter: saturate(0.8);
|
|
267
|
+
opacity: 1;
|
|
268
|
+
transition: all 300ms ease;
|
|
269
|
+
animation: btnNotificationAnimation var(--btn-notification-time, 300ms) ease var(--btn-notification-count) alternate;
|
|
270
|
+
box-shadow: var(--wco-shadow-level-1);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@keyframes btnNotificationAnimation {
|
|
274
|
+
0% {
|
|
275
|
+
transform: scale(1);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
50% {
|
|
279
|
+
transform: scale(1.2);
|
|
280
|
+
box-shadow: var(--wco-shadow-level-2);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
100% {
|
|
284
|
+
transform: scale(1);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
.form-field {
|
|
2
|
+
display: flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
--input-radius: var(--wco-radius-sm, 4px);
|
|
5
|
+
--input-color-error: var(--wco-color-danger-500, #E00707);
|
|
6
|
+
--input-default-color: var(--wco-color-primary-700,#004E87);
|
|
7
|
+
--input-border: 1px solid var(--wco-color-neutral-100);
|
|
8
|
+
--input-size: 16px;
|
|
9
|
+
--input-shadow: 0px 0px 0px 0px transparent;
|
|
10
|
+
accent-color: var(--input-default-color);
|
|
11
|
+
transition: box-shadow 300ms ease-in-out, border-color 300ms ease-in-out;
|
|
12
|
+
// input Invalid
|
|
13
|
+
input:required+label::after,
|
|
14
|
+
textarea:required+label::after,
|
|
15
|
+
input:invalid:not(:placeholder-shown):required+label{
|
|
16
|
+
content: " *";
|
|
17
|
+
color: var(--wco-color-danger-100);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// input custom
|
|
21
|
+
.form-field__input,
|
|
22
|
+
.form-field__textarea,
|
|
23
|
+
.form-field__select {
|
|
24
|
+
border: var(--input-border);
|
|
25
|
+
border-radius: var(--input-radius);
|
|
26
|
+
font-size: var(--input-size, 16px);
|
|
27
|
+
box-shadow: var(--input-shadow);
|
|
28
|
+
padding: 16px;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
line-height: 150%;
|
|
32
|
+
color: #212223;
|
|
33
|
+
outline: none;
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
// native effects
|
|
37
|
+
&:invalid:not(:placeholder-shown), &.form-field--error:not(:placeholder-shown) {
|
|
38
|
+
--input-border: 1px solid var(--input-color-error);
|
|
39
|
+
--input-shadow: 0px 2px 0px 1px var(--input-color-error);
|
|
40
|
+
color: var(--input-color-error);
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.form-field--error:not(:placeholder-shown) ~ label {
|
|
45
|
+
color: var(--input-color-error);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:hover:not(:focus):not(:disabled):not(:invalid):not(:read-only) {
|
|
49
|
+
border: 1px solid var(--wco-color-primary-500, var(--input-default-color));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// &:focus:not(:disabled):not(:invalid) {
|
|
53
|
+
// --input-border: 2px solid var(--wco-color-primary-700, var(--input-default-color));;
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
&:disabled {
|
|
57
|
+
border: 1px solid #6F7276;
|
|
58
|
+
background: var(--wco-color-neutral-100est);
|
|
59
|
+
color: #6F7276;
|
|
60
|
+
+ label {
|
|
61
|
+
color: var(--wco-color-neutral-700);
|
|
62
|
+
--input-bg: var(--wco-color-neutral-100est);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:read-only:not(:disabled):not(select) {
|
|
67
|
+
background: #EAEBEB;
|
|
68
|
+
border: 1px solid #C1C3C5;
|
|
69
|
+
color: #6F7276;
|
|
70
|
+
&:focus {
|
|
71
|
+
--input-border: 2px solid #C1C3C5;
|
|
72
|
+
}
|
|
73
|
+
+ label {
|
|
74
|
+
--input-bg: #EAEBEB;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// sizes
|
|
79
|
+
&.input-sm {
|
|
80
|
+
height: 32px;
|
|
81
|
+
}
|
|
82
|
+
&.input-md {
|
|
83
|
+
height: 40px;
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
&.input-lg {
|
|
87
|
+
height: 48px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
label {
|
|
92
|
+
position: absolute;
|
|
93
|
+
left: 0;
|
|
94
|
+
top: 50%;
|
|
95
|
+
transform: translateY(-50%);
|
|
96
|
+
background-image: linear-gradient(0deg, var(--input-bg, #fff) 44%, rgba(93,118,137,0) 44%);
|
|
97
|
+
color: var(--input-default-color);
|
|
98
|
+
padding: 0 4px;
|
|
99
|
+
margin-left: 20px;
|
|
100
|
+
transition: 0.1s ease-out;
|
|
101
|
+
transform-origin: left top;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
textarea ~ label {
|
|
106
|
+
top: 16px;
|
|
107
|
+
transform: translateY(0);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
select[value=""]:focus+label,
|
|
111
|
+
textarea:focus+label,
|
|
112
|
+
input:focus+label {
|
|
113
|
+
color: var(--input-default-color);
|
|
114
|
+
top: 0;
|
|
115
|
+
transform: translateY(-50%) scale(0.9) !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
select:not([value=""]):valid~label,
|
|
119
|
+
textarea:not(:placeholder-shown)+label,
|
|
120
|
+
input:not(:placeholder-shown)+label {
|
|
121
|
+
top: 0;
|
|
122
|
+
transform: translateY(-50%) scale(0.9) !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
textarea:not(:focus)::placeholder,
|
|
126
|
+
input:not(:focus)::placeholder {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/// Input com ícone no inicio
|
|
132
|
+
> span:first-child {
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 50%;
|
|
135
|
+
left: 12px;
|
|
136
|
+
transform: translateY(-50%);
|
|
137
|
+
}
|
|
138
|
+
> span ~ .form-field__input + label,
|
|
139
|
+
> span ~ .form-field__select + label {
|
|
140
|
+
margin-left: 44px;
|
|
141
|
+
}
|
|
142
|
+
> span ~ .form-field__select,
|
|
143
|
+
> span ~ .form-field__input {
|
|
144
|
+
padding-left: 44px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
> .form-field__select + label + span,
|
|
148
|
+
> .form-field__input + label + span {
|
|
149
|
+
position: absolute;
|
|
150
|
+
top: 50%;
|
|
151
|
+
right: 12px;
|
|
152
|
+
transform: translateY(-50%);
|
|
153
|
+
&::before {
|
|
154
|
+
content: '';
|
|
155
|
+
position: relative;
|
|
156
|
+
top: 2px;
|
|
157
|
+
width: 30px;
|
|
158
|
+
height: 30px;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// Input com ícone no final
|
|
163
|
+
&.form-field--suffixe {
|
|
164
|
+
> .form-field__select,
|
|
165
|
+
> .form-field__input {
|
|
166
|
+
padding-right: 44px;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
//// Select Custom
|
|
171
|
+
.form-field__select {
|
|
172
|
+
appearance: none;
|
|
173
|
+
-webkit-appearance: none;
|
|
174
|
+
-moz-appearance: none;
|
|
175
|
+
~ label ~ span {
|
|
176
|
+
color: var(--input-default-color);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
///////////
|
|
182
|
+
/// RADIO
|
|
183
|
+
///////////
|
|
184
|
+
label.form-radio, .form-radio {
|
|
185
|
+
--accent-color: var(--wco-color-primary-700);
|
|
186
|
+
--radio-size: 16px;
|
|
187
|
+
--radio-gap: 8px;
|
|
188
|
+
display: inline-flex;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: var(--radio-gap);
|
|
192
|
+
|
|
193
|
+
/// Somente se o label
|
|
194
|
+
/// for filho direto do input
|
|
195
|
+
label {
|
|
196
|
+
display: inline-flex;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
align-items: center;
|
|
199
|
+
gap: var(--radio-gap);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
input[type="radio"] {
|
|
203
|
+
display: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/// input não selecionado
|
|
207
|
+
input[type="radio"] ~ .radio {
|
|
208
|
+
height: var(--radio-size);
|
|
209
|
+
width: var(--radio-size);
|
|
210
|
+
display: inline-flex;
|
|
211
|
+
position: relative;
|
|
212
|
+
border-radius: 50%;
|
|
213
|
+
border: 1px solid var(--wco-color-neutral-500);
|
|
214
|
+
&::before {
|
|
215
|
+
content: "";
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: 50%;
|
|
218
|
+
left: 50%;
|
|
219
|
+
transform: translate(-50%, -50%);
|
|
220
|
+
width: 50%;
|
|
221
|
+
height: 50%;
|
|
222
|
+
border-radius: 50%;
|
|
223
|
+
transition: box-shadow 300ms ease-in-out;
|
|
224
|
+
box-shadow: inset 0px 0px 0px 0px var(--accent-color);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/// input selecionado
|
|
228
|
+
input[type="radio"]:checked ~ .radio {
|
|
229
|
+
border: 1px solid var(--accent-color);
|
|
230
|
+
&::before {
|
|
231
|
+
box-shadow: inset 0px 0px 12px 12px var(--accent-color);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.label {
|
|
236
|
+
color: var(--wco-color-primary-700);
|
|
237
|
+
font-size: var(--wco-font-size-xs);
|
|
238
|
+
font-weight: 400;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
input[type="radio"]:disabled ~ .radio {
|
|
242
|
+
--accent-color: var(--wco-color-neutral-600);
|
|
243
|
+
background-color: var(--wco-color-neutral-100est);
|
|
244
|
+
}
|
|
245
|
+
input[type="radio"]:checked:disabled ~ .radio {
|
|
246
|
+
--accent-color: var(--wco-color-neutral-600);
|
|
247
|
+
border: 1px solid var(--wco-color-neutral-600);
|
|
248
|
+
&::before {
|
|
249
|
+
box-shadow: inset 0px 0px 12px 12px var(--wco-color-neutral-600);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
/// Checkbox
|
|
256
|
+
///////////
|
|
257
|
+
label.form-check, .form-check {
|
|
258
|
+
--accent-color: var(--wco-color-primary-700);
|
|
259
|
+
--checkbox-size: 16px;
|
|
260
|
+
--checkbox-gap: 8px;
|
|
261
|
+
--checkbox-radius: 4px;
|
|
262
|
+
display: inline-flex;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
align-items: center;
|
|
265
|
+
gap: var(--checkbox-gap);
|
|
266
|
+
|
|
267
|
+
/// Somente se o label
|
|
268
|
+
/// for filho direto do input
|
|
269
|
+
label {
|
|
270
|
+
display: inline-flex;
|
|
271
|
+
justify-content: center;
|
|
272
|
+
align-items: center;
|
|
273
|
+
gap: var(--checkbox-gap);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
input[type="checkbox"] {
|
|
277
|
+
display: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/// input não selecionado
|
|
281
|
+
input[type="checkbox"] ~ .check {
|
|
282
|
+
height: var(--checkbox-size);
|
|
283
|
+
width: var(--checkbox-size);
|
|
284
|
+
display: inline-flex;
|
|
285
|
+
position: relative;
|
|
286
|
+
border-radius: var(--checkbox-radius);
|
|
287
|
+
border: 1px solid var(--wco-color-neutral-500);
|
|
288
|
+
&::before {
|
|
289
|
+
content: "";
|
|
290
|
+
position: absolute;
|
|
291
|
+
top: 50%;
|
|
292
|
+
left: 50%;
|
|
293
|
+
transform: translate(-50%, -50%);
|
|
294
|
+
width: 80%;
|
|
295
|
+
height: 100%;
|
|
296
|
+
background-position: center;
|
|
297
|
+
background-repeat: no-repeat;
|
|
298
|
+
background-size: 0px;
|
|
299
|
+
opacity: 0;
|
|
300
|
+
transition: background-size 100ms linear;
|
|
301
|
+
background-image: url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.00009 6.77988L1.68676 4.46655C1.42676 4.20655 1.00676 4.20655 0.746758 4.46655C0.486758 4.72655 0.486758 5.14655 0.746758 5.40655L3.53342 8.19322C3.79342 8.45322 4.21342 8.45322 4.47342 8.19322L11.5268 1.13988C11.7868 0.879883 11.7868 0.459883 11.5268 0.199883C11.2668 -0.0601172 10.8468 -0.0601172 10.5868 0.199883L4.00009 6.77988Z' fill='%23F9F7F7'/%3E%3C/svg%3E%0A");
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/// input selecionado
|
|
305
|
+
input[type="checkbox"]:checked ~ .check {
|
|
306
|
+
border: 1px solid var(--accent-color);
|
|
307
|
+
background-color: var(--accent-color);
|
|
308
|
+
&::before {
|
|
309
|
+
opacity: 1;
|
|
310
|
+
background-size: 100%;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.label {
|
|
315
|
+
color: var(--wco-color-neutral-900);
|
|
316
|
+
font-size: var(--wco-font-size-xs);
|
|
317
|
+
font-weight: 400;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/// hover
|
|
321
|
+
&:hover {
|
|
322
|
+
&:has(input[type="checkbox"]:not(:checked):not(:disabled)) {
|
|
323
|
+
.check {
|
|
324
|
+
border: 1px solid var(--accent-color);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
input[type="checkbox"]:disabled ~ .check {
|
|
330
|
+
--accent-color: var(--wco-color-neutral-600);
|
|
331
|
+
background-color: var(--wco-color-neutral-100est);
|
|
332
|
+
}
|
|
333
|
+
input[type="checkbox"]:checked:disabled ~ .check {
|
|
334
|
+
--accent-color: var(--wco-color-neutral-600);
|
|
335
|
+
border: 1px solid var(--wco-color-neutral-600);
|
|
336
|
+
&::before {
|
|
337
|
+
filter: brightness(0.5);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
input[type="checkbox"]:checked:disabled ~ .label {
|
|
341
|
+
color: var(--wco-color-neutral-600est);
|
|
342
|
+
}
|
|
343
|
+
}
|