@volverjs/style 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-textarea.css +1 -1
- package/dist/components.css +1 -1
- package/dist/props/input.css +1 -1
- package/dist/props.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +1 -1
- package/src/_preflight.scss +1 -0
- package/src/settings/_input.scss +10 -1
- package/src/settings/components/_vv-input-text.scss +16 -9
- package/src/settings/components/_vv-select.scss +55 -14
- package/src/settings/components/_vv-textarea.scss +12 -6
- package/src/tools/_mixins.scss +35 -14
package/package.json
CHANGED
package/src/_preflight.scss
CHANGED
package/src/settings/_input.scss
CHANGED
|
@@ -15,7 +15,8 @@ $input: (
|
|
|
15
15
|
min-width: 0,
|
|
16
16
|
label: (
|
|
17
17
|
color: var(--color-word-2),
|
|
18
|
-
display:
|
|
18
|
+
display: flex,
|
|
19
|
+
align-items: center,
|
|
19
20
|
font-size: var(--text-xs),
|
|
20
21
|
gap: var(--spacing-xs),
|
|
21
22
|
white-space: nowrap,
|
|
@@ -50,4 +51,12 @@ $input: (
|
|
|
50
51
|
invalid: (
|
|
51
52
|
color: var(--color-danger),
|
|
52
53
|
),
|
|
54
|
+
floating: (
|
|
55
|
+
padding-top: calc(var(--input-spacing-top) + 0.55em),
|
|
56
|
+
padding-bottom: calc(var(--input-spacing-bottom) - 0.55em),
|
|
57
|
+
label: (
|
|
58
|
+
font-size: var(--text-12),
|
|
59
|
+
transform: translateY(-0.8em),
|
|
60
|
+
),
|
|
61
|
+
),
|
|
53
62
|
) !default;
|
|
@@ -10,6 +10,7 @@ $vv-input-text: (
|
|
|
10
10
|
label: (
|
|
11
11
|
_alias: '> label',
|
|
12
12
|
display: var(--input-label-display),
|
|
13
|
+
align-items: var(--input-label-align-items),
|
|
13
14
|
font-size: var(--input-label-font-size),
|
|
14
15
|
color: var(--input-label-color),
|
|
15
16
|
margin: 0 0 var(--input-label-gap) 0,
|
|
@@ -27,7 +28,6 @@ $vv-input-text: (
|
|
|
27
28
|
background-color: var(--input-background-color),
|
|
28
29
|
will-change: background-color,
|
|
29
30
|
transition: var(--transition-colors),
|
|
30
|
-
min-height: var(--input-min-height),
|
|
31
31
|
pseudo: (
|
|
32
32
|
before: (
|
|
33
33
|
position: absolute,
|
|
@@ -65,14 +65,17 @@ $vv-input-text: (
|
|
|
65
65
|
display: block,
|
|
66
66
|
flex: 1,
|
|
67
67
|
color: var(--input-color),
|
|
68
|
-
|
|
68
|
+
line-height: var(--leading-none),
|
|
69
|
+
[padding-block]: var(--input-spacing-top)
|
|
70
|
+
var(--input-spacing-bottom),
|
|
69
71
|
[padding-inline]: var(--input-spacing-left)
|
|
70
72
|
var(--input-spacing-right),
|
|
71
73
|
min-width: 0,
|
|
72
|
-
|
|
74
|
+
min-height: var(--input-min-height),
|
|
73
75
|
pseudo: (
|
|
74
76
|
placeholder: (
|
|
75
77
|
color: var(--input-placeholder-color),
|
|
78
|
+
text-overlow: ellipsis,
|
|
76
79
|
),
|
|
77
80
|
calendar-picker-indicator: (
|
|
78
81
|
position: absolute,
|
|
@@ -306,11 +309,13 @@ $vv-input-text: (
|
|
|
306
309
|
focus-within: (
|
|
307
310
|
element: (
|
|
308
311
|
label: (
|
|
309
|
-
transform:
|
|
310
|
-
font-size: var(--
|
|
312
|
+
transform: var(--input-floating-label-transform),
|
|
313
|
+
font-size: var(--input-floating-label-font-size),
|
|
311
314
|
),
|
|
312
315
|
input: (
|
|
313
|
-
|
|
316
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
317
|
+
[padding-bottom]:
|
|
318
|
+
var(--input-floating-padding-bottom),
|
|
314
319
|
pseudo: (
|
|
315
320
|
placeholder: (
|
|
316
321
|
opacity: var(--opacity-100),
|
|
@@ -322,11 +327,13 @@ $vv-input-text: (
|
|
|
322
327
|
dirty: (
|
|
323
328
|
element: (
|
|
324
329
|
label: (
|
|
325
|
-
transform:
|
|
326
|
-
font-size: var(--
|
|
330
|
+
transform: var(--input-floating-label-transform),
|
|
331
|
+
font-size: var(--input-floating-label-font-size),
|
|
327
332
|
),
|
|
328
333
|
input: (
|
|
329
|
-
|
|
334
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
335
|
+
[padding-bottom]:
|
|
336
|
+
var(--input-floating-padding-bottom),
|
|
330
337
|
pseudo: (
|
|
331
338
|
placeholder: (
|
|
332
339
|
opacity: var(--opacity-100),
|
|
@@ -11,6 +11,7 @@ $vv-select: (
|
|
|
11
11
|
label: (
|
|
12
12
|
_alias: '> label',
|
|
13
13
|
display: var(--input-label-display),
|
|
14
|
+
align-items: var(--input-label-align-items),
|
|
14
15
|
font-size: var(--input-label-font-size),
|
|
15
16
|
color: var(--input-label-color),
|
|
16
17
|
margin: 0 0 var(--input-label-gap) 0,
|
|
@@ -94,6 +95,9 @@ $vv-select: (
|
|
|
94
95
|
),
|
|
95
96
|
),
|
|
96
97
|
),
|
|
98
|
+
option: (
|
|
99
|
+
_alias: 'select > option',
|
|
100
|
+
),
|
|
97
101
|
icon: (
|
|
98
102
|
_alias: ':where(svg, [data-icon])',
|
|
99
103
|
margin: var(--input-spacing-top) var(--input-spacing-right)
|
|
@@ -129,6 +133,36 @@ $vv-select: (
|
|
|
129
133
|
),
|
|
130
134
|
),
|
|
131
135
|
),
|
|
136
|
+
multiple: (
|
|
137
|
+
element: (
|
|
138
|
+
wrapper: (
|
|
139
|
+
align-items: flex-start,
|
|
140
|
+
),
|
|
141
|
+
input: (
|
|
142
|
+
overflow: auto,
|
|
143
|
+
background-image: none,
|
|
144
|
+
padding: 0,
|
|
145
|
+
),
|
|
146
|
+
option: (
|
|
147
|
+
[padding]: var(--input-spacing-top)
|
|
148
|
+
var(--input-spacing-right) var(--input-spacing-bottom)
|
|
149
|
+
var(--input-spacing-left),
|
|
150
|
+
min-height: var(--input-min-height),
|
|
151
|
+
display: flex,
|
|
152
|
+
align-items: center,
|
|
153
|
+
color: var(--input-color),
|
|
154
|
+
state: (
|
|
155
|
+
checked: (
|
|
156
|
+
color: var(--color-brand),
|
|
157
|
+
background-color: var(--color-surface-brand),
|
|
158
|
+
),
|
|
159
|
+
disabled: (
|
|
160
|
+
color: var(--input-placeholder-color),
|
|
161
|
+
),
|
|
162
|
+
),
|
|
163
|
+
),
|
|
164
|
+
),
|
|
165
|
+
),
|
|
132
166
|
icon-left: (
|
|
133
167
|
--input-spacing-left: calc(var(--spacing-sm) * 2 + 1em),
|
|
134
168
|
),
|
|
@@ -213,30 +247,37 @@ $vv-select: (
|
|
|
213
247
|
transition: var(--transition-all),
|
|
214
248
|
),
|
|
215
249
|
input: (
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
250
|
+
opacity: var(--opacity-0),
|
|
251
|
+
),
|
|
252
|
+
),
|
|
253
|
+
state: (
|
|
254
|
+
focus-within: (
|
|
255
|
+
element: (
|
|
256
|
+
label: (
|
|
257
|
+
transform: var(--input-floating-label-transform),
|
|
258
|
+
font-size: var(--input-floating-label-font-size),
|
|
259
|
+
),
|
|
260
|
+
input: (
|
|
261
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
262
|
+
[padding-bottom]:
|
|
263
|
+
var(--input-floating-padding-bottom),
|
|
264
|
+
opacity: var(--opacity-100),
|
|
219
265
|
),
|
|
220
266
|
),
|
|
221
267
|
),
|
|
222
268
|
),
|
|
223
|
-
|
|
269
|
+
modifier: (
|
|
224
270
|
dirty: (
|
|
225
271
|
element: (
|
|
226
272
|
label: (
|
|
227
|
-
transform:
|
|
228
|
-
font-size: var(--
|
|
273
|
+
transform: var(--input-floating-label-transform),
|
|
274
|
+
font-size: var(--input-floating-label-font-size),
|
|
229
275
|
),
|
|
230
276
|
input: (
|
|
231
|
-
[padding-top]:
|
|
232
|
-
calc(var(--input-spacing-top) + 0.55em),
|
|
277
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
233
278
|
[padding-bottom]:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
placeholder: (
|
|
237
|
-
opacity: var(--opacity-100),
|
|
238
|
-
),
|
|
239
|
-
),
|
|
279
|
+
var(--input-floating-padding-bottom),
|
|
280
|
+
opacity: var(--opacity-100),
|
|
240
281
|
),
|
|
241
282
|
),
|
|
242
283
|
),
|
|
@@ -10,6 +10,7 @@ $vv-textarea: (
|
|
|
10
10
|
label: (
|
|
11
11
|
_alias: '> label',
|
|
12
12
|
display: var(--input-label-display),
|
|
13
|
+
align-items: var(--input-label-align-items),
|
|
13
14
|
font-size: var(--input-label-font-size),
|
|
14
15
|
color: var(--input-label-color),
|
|
15
16
|
margin: 0 0 var(--input-label-gap) 0,
|
|
@@ -78,6 +79,7 @@ $vv-textarea: (
|
|
|
78
79
|
pseudo: (
|
|
79
80
|
placeholder: (
|
|
80
81
|
color: var(--input-placeholder-color),
|
|
82
|
+
text-overlow: ellipsis,
|
|
81
83
|
),
|
|
82
84
|
),
|
|
83
85
|
state: (
|
|
@@ -236,11 +238,13 @@ $vv-textarea: (
|
|
|
236
238
|
focus-within: (
|
|
237
239
|
element: (
|
|
238
240
|
label: (
|
|
239
|
-
transform:
|
|
240
|
-
font-size: var(--
|
|
241
|
+
transform: var(--input-floating-label-transform),
|
|
242
|
+
font-size: var(--input-floating-label-font-size),
|
|
241
243
|
),
|
|
242
244
|
input: (
|
|
243
|
-
|
|
245
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
246
|
+
[padding-bottom]:
|
|
247
|
+
var(--input-floating-padding-bottom),
|
|
244
248
|
pseudo: (
|
|
245
249
|
placeholder: (
|
|
246
250
|
opacity: var(--opacity-100),
|
|
@@ -252,11 +256,13 @@ $vv-textarea: (
|
|
|
252
256
|
dirty: (
|
|
253
257
|
element: (
|
|
254
258
|
label: (
|
|
255
|
-
transform:
|
|
256
|
-
font-size: var(--
|
|
259
|
+
transform: var(--input-floating-label-transform),
|
|
260
|
+
font-size: var(--input-floating-label-font-size),
|
|
257
261
|
),
|
|
258
262
|
input: (
|
|
259
|
-
|
|
263
|
+
[padding-top]: var(--input-floating-padding-top),
|
|
264
|
+
[padding-bottom]:
|
|
265
|
+
var(--input-floating-padding-bottom),
|
|
260
266
|
pseudo: (
|
|
261
267
|
placeholder: (
|
|
262
268
|
opacity: var(--opacity-100),
|
package/src/tools/_mixins.scss
CHANGED
|
@@ -173,34 +173,40 @@
|
|
|
173
173
|
|
|
174
174
|
// Transform a map into a list of modifiers
|
|
175
175
|
@mixin spread-map-into-modifiers(
|
|
176
|
+
$original: null,
|
|
176
177
|
$map: (),
|
|
177
178
|
$prefix: '',
|
|
178
179
|
$key: 'modifier',
|
|
179
180
|
$block: null,
|
|
181
|
+
$modifier: '',
|
|
180
182
|
$props: true,
|
|
181
183
|
$zero-specificity: true,
|
|
182
184
|
$bps: (
|
|
183
185
|
xxs: 0,
|
|
184
186
|
)
|
|
185
187
|
) {
|
|
188
|
+
@if not $original {
|
|
189
|
+
$original: $map;
|
|
190
|
+
}
|
|
186
191
|
@if not $block {
|
|
187
192
|
$block: &;
|
|
188
193
|
}
|
|
189
194
|
@if type-of(map.get($map, $key)) == 'map' {
|
|
190
|
-
@each $
|
|
191
|
-
$selector: $block + '--' + $
|
|
195
|
+
@each $item, $value in map.get($map, $key) {
|
|
196
|
+
$selector: $block + '--' + $item;
|
|
192
197
|
|
|
193
|
-
%#{$prefix + '--' + $
|
|
198
|
+
%#{$prefix + '--' + $item} {
|
|
194
199
|
@include spread-map-into-attrs(
|
|
195
|
-
$original: $
|
|
200
|
+
$original: $original,
|
|
196
201
|
$map: $value,
|
|
197
202
|
$prefix: $prefix,
|
|
198
|
-
$variant: #{$key}-#{$
|
|
203
|
+
$variant: #{$key}-#{$item},
|
|
199
204
|
$deep: true,
|
|
200
205
|
$ignore: (
|
|
201
206
|
'state',
|
|
202
207
|
'breakpoint',
|
|
203
208
|
'element',
|
|
209
|
+
'modifier',
|
|
204
210
|
),
|
|
205
211
|
$props: $props
|
|
206
212
|
);
|
|
@@ -208,21 +214,21 @@
|
|
|
208
214
|
|
|
209
215
|
// map props and attributes
|
|
210
216
|
@include wrap-with-where(
|
|
211
|
-
$selector: $selector + $block,
|
|
217
|
+
$selector: $modifier + $selector + $block,
|
|
212
218
|
$enabled: $zero-specificity
|
|
213
219
|
) {
|
|
214
|
-
@extend %#{$prefix + '--' + $
|
|
220
|
+
@extend %#{$prefix + '--' + $item};
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
// map elements
|
|
218
224
|
@if map.get($value, 'element') {
|
|
219
225
|
@include spread-map-into-elements(
|
|
220
|
-
$original: $
|
|
226
|
+
$original: $original,
|
|
221
227
|
$map: $value,
|
|
222
|
-
$prefix: #{$prefix}-#{$key}-#{$
|
|
228
|
+
$prefix: #{$prefix}-#{$key}-#{$item},
|
|
223
229
|
$key: 'element',
|
|
224
230
|
$block: $block,
|
|
225
|
-
$modifier: $selector,
|
|
231
|
+
$modifier: $modifier + $selector,
|
|
226
232
|
$props: $props,
|
|
227
233
|
$zero-specificity: $zero-specificity
|
|
228
234
|
);
|
|
@@ -231,12 +237,12 @@
|
|
|
231
237
|
// map states
|
|
232
238
|
@if map.get($value, 'state') {
|
|
233
239
|
@include spread-map-into-states(
|
|
234
|
-
$original: $
|
|
240
|
+
$original: $original,
|
|
235
241
|
$map: $value,
|
|
236
|
-
$prefix: #{$prefix}-#{$key}-#{$
|
|
242
|
+
$prefix: #{$prefix}-#{$key}-#{$item},
|
|
237
243
|
$key: 'state',
|
|
238
244
|
$block: $block,
|
|
239
|
-
$modifier: $selector,
|
|
245
|
+
$modifier: $modifier + $selector,
|
|
240
246
|
$props: $props,
|
|
241
247
|
$zero-specificity: $zero-specificity
|
|
242
248
|
);
|
|
@@ -246,13 +252,28 @@
|
|
|
246
252
|
@if map.get($value, 'breakpoint') {
|
|
247
253
|
@include spread-map-into-breakpoints(
|
|
248
254
|
$map: $value,
|
|
249
|
-
$prefix: #{$prefix}-#{$key}-#{$
|
|
255
|
+
$prefix: #{$prefix}-#{$key}-#{$item},
|
|
250
256
|
$key: 'breakpoint',
|
|
251
257
|
$block: $selector,
|
|
252
258
|
$props: $props,
|
|
253
259
|
$zero-specificity: $zero-specificity
|
|
254
260
|
);
|
|
255
261
|
}
|
|
262
|
+
|
|
263
|
+
// map modifiers
|
|
264
|
+
@if map.get($value, 'modifier') {
|
|
265
|
+
@include spread-map-into-modifiers(
|
|
266
|
+
$original: $original,
|
|
267
|
+
$map: $value,
|
|
268
|
+
$prefix: #{$prefix}-#{$key}-#{$item},
|
|
269
|
+
$key: 'modifier',
|
|
270
|
+
$block: $block,
|
|
271
|
+
$modifier: $modifier + $selector,
|
|
272
|
+
$props: $props,
|
|
273
|
+
$zero-specificity: $zero-specificity,
|
|
274
|
+
$bps: $bps
|
|
275
|
+
);
|
|
276
|
+
}
|
|
256
277
|
}
|
|
257
278
|
}
|
|
258
279
|
}
|