@volverjs/style 0.1.2-beta.25 → 0.1.2-beta.27

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.
Files changed (58) hide show
  1. package/dist/components/vv-accordion.css +1 -1
  2. package/dist/components/vv-button.css +1 -1
  3. package/dist/components/vv-dialog.css +1 -1
  4. package/dist/components/vv-input-checkbox.css +1 -1
  5. package/dist/components/vv-input-radio.css +1 -1
  6. package/dist/components/vv-input-text.css +1 -1
  7. package/dist/components/vv-nav.css +1 -1
  8. package/dist/components/vv-select.css +1 -1
  9. package/dist/components/vv-skeleton.css +1 -0
  10. package/dist/components/vv-textarea.css +1 -1
  11. package/dist/components/vv-tooltip.css +1 -1
  12. package/dist/components.css +1 -1
  13. package/dist/export.css +1 -1
  14. package/dist/props/filters.css +1 -1
  15. package/dist/props/transitions.css +1 -0
  16. package/dist/props.css +1 -1
  17. package/dist/utilities/borders.css +1 -1
  18. package/dist/utilities/filters.css +1 -1
  19. package/dist/utilities/interactivity.css +1 -0
  20. package/dist/utilities/transitions.css +1 -1
  21. package/dist/utilities/typography.css +1 -1
  22. package/dist/utilities.css +1 -1
  23. package/dist/volver.css +1 -1
  24. package/package.json +24 -22
  25. package/src/_config.scss +1 -0
  26. package/src/_preflight.scss +33 -5
  27. package/src/components/index.scss +1 -0
  28. package/src/components/vv-button.scss +0 -4
  29. package/src/components/vv-skeleton.scss +14 -0
  30. package/src/export.scss +21 -2
  31. package/src/props/filters.scss +1 -0
  32. package/src/props/index.scss +3 -3
  33. package/src/props/{animation.scss → transitions.scss} +41 -1
  34. package/src/settings/_filters.scss +9 -0
  35. package/src/settings/_index.scss +8 -7
  36. package/src/settings/_interactivity.scss +39 -0
  37. package/src/settings/_transitions.scss +4 -1
  38. package/src/settings/components/_vv-accordion.scss +2 -2
  39. package/src/settings/components/_vv-button.scss +1 -1
  40. package/src/settings/components/_vv-dialog.scss +63 -87
  41. package/src/settings/components/_vv-input-checkbox.scss +2 -2
  42. package/src/settings/components/_vv-input-radio.scss +1 -1
  43. package/src/settings/components/_vv-input-text.scss +8 -11
  44. package/src/settings/components/_vv-nav.scss +1 -1
  45. package/src/settings/components/_vv-select.scss +9 -9
  46. package/src/settings/components/_vv-skeleton.scss +22 -0
  47. package/src/settings/components/_vv-textarea.scss +7 -7
  48. package/src/settings/components/_vv-tooltip.scss +1 -1
  49. package/src/tools/_mixins.scss +95 -0
  50. package/src/utilities/borders.scss +5 -0
  51. package/src/utilities/filters.scss +8 -0
  52. package/src/utilities/index.scss +2 -2
  53. package/src/utilities/{animation.scss → interactivity.scss} +5 -4
  54. package/src/utilities/transitions.scss +18 -1
  55. package/src/utilities/typography.scss +1 -0
  56. package/dist/props/animation.css +0 -1
  57. package/dist/utilities/animation.css +0 -1
  58. package/src/settings/_animation.scss +0 -9
@@ -57,7 +57,7 @@ $vv-input-checkbox: (
57
57
  background-color: var(--color-word-5),
58
58
  position: relative,
59
59
  will-change: background-color,
60
- transition: background-color 0.3s ease-in-out,
60
+ transition: var(--transition-colors),
61
61
  pseudo: (
62
62
  after: (
63
63
  width: var(--spacing-20),
@@ -67,7 +67,7 @@ $vv-input-checkbox: (
67
67
  inset: var(--spacing-2) 0 0 var(--spacing-2),
68
68
  background: var(--color-white),
69
69
  will-change: transform,
70
- transition: transform 0.3s ease-in-out,
70
+ transition: var(--transition-transform),
71
71
  ),
72
72
  ),
73
73
  state: (
@@ -41,7 +41,7 @@ $vv-input-radio: (
41
41
  border-radius: 50%,
42
42
  transform: translate(-50%, -50%) scale(0),
43
43
  will-change: transform,
44
- transition: transform 0.3s ease-in-out,
44
+ transition: var(--transition-transform),
45
45
  ),
46
46
  ),
47
47
  state: (
@@ -26,7 +26,7 @@ $vv-input-text: (
26
26
  overflow: hidden,
27
27
  background-color: var(--input-background-color),
28
28
  will-change: background-color,
29
- transition: background-color 0.3s ease-in-out,
29
+ transition: var(--transition-colors),
30
30
  pseudo: (
31
31
  before: (
32
32
  position: absolute,
@@ -42,7 +42,7 @@ $vv-input-text: (
42
42
  transform: scaleX(0),
43
43
  transform-origin: left,
44
44
  will-change: transform,
45
- transition: transform 0.3s ease-in-out,
45
+ transition: var(--transition-transform),
46
46
  ),
47
47
  ),
48
48
  state: (
@@ -80,10 +80,7 @@ $vv-input-text: (
80
80
  opacity: 0,
81
81
  ),
82
82
  search-cancel-button: (
83
- position: absolute,
84
- padding: var(--spacing-sm),
85
- top: 0,
86
- right: 0,
83
+ -webkit-appearance: none,
87
84
  opacity: 0,
88
85
  ),
89
86
  color-swatch: (
@@ -271,7 +268,7 @@ $vv-input-text: (
271
268
  margin: 0,
272
269
  will-change: 'transform',
273
270
  transform-origin: left,
274
- transition: all 0.3s ease-in-out,
271
+ transition: var(--transition-all),
275
272
  ),
276
273
  input: (
277
274
  pseudo: (
@@ -285,11 +282,11 @@ $vv-input-text: (
285
282
  focus-within: (
286
283
  element: (
287
284
  label: (
288
- transform: translateY(-1.2ch),
285
+ transform: translateY(-0.8em),
289
286
  font-size: var(--text-12),
290
287
  ),
291
288
  input: (
292
- transform: translateY(0.85ch),
289
+ transform: translateY(0.55em),
293
290
  pseudo: (
294
291
  placeholder: (
295
292
  opacity: 1,
@@ -301,11 +298,11 @@ $vv-input-text: (
301
298
  dirty: (
302
299
  element: (
303
300
  label: (
304
- transform: translateY(-1.2ch),
301
+ transform: translateY(-0.8em),
305
302
  font-size: var(--text-12),
306
303
  ),
307
304
  input: (
308
- transform: translateY(0.85ch),
305
+ transform: translateY(0.55em),
309
306
  pseudo: (
310
307
  placeholder: (
311
308
  opacity: 1,
@@ -22,7 +22,7 @@ $vv-nav: (
22
22
  display: flex,
23
23
  align-items: center,
24
24
  will-change: background-color color,
25
- transition: all 0.3s ease-in-out,
25
+ transition: var(--transition-all),
26
26
  color: var(--color-word-3),
27
27
  [padding]: var(--nav-item-padding),
28
28
  state: (
@@ -26,7 +26,7 @@ $vv-select: (
26
26
  flex: 1,
27
27
  background-color: var(--input-background-color),
28
28
  will-change: background-color,
29
- transition: background-color 0.3s ease-in-out,
29
+ transition: var(--transition-colors),
30
30
  pseudo: (
31
31
  before: (
32
32
  position: absolute,
@@ -42,7 +42,7 @@ $vv-select: (
42
42
  transform: scaleX(0),
43
43
  transform-origin: left,
44
44
  will-change: transform,
45
- transition: transform 0.3s ease-in-out,
45
+ transition: var(--transition-transform),
46
46
  ),
47
47
  ),
48
48
  state: (
@@ -209,7 +209,7 @@ $vv-select: (
209
209
  margin: 0,
210
210
  will-change: 'transform',
211
211
  transform-origin: left,
212
- transition: all 0.3s ease-in-out,
212
+ transition: var(--transition-all),
213
213
  ),
214
214
  input: (
215
215
  pseudo: (
@@ -223,14 +223,14 @@ $vv-select: (
223
223
  focus-within: (
224
224
  element: (
225
225
  label: (
226
- transform: translateY(-1.2ch),
226
+ transform: translateY(-0.8em),
227
227
  font-size: var(--text-12),
228
228
  ),
229
229
  input: (
230
230
  [padding-top]:
231
- calc(var(--input-padding-top) + 0.85ch),
231
+ calc(var(--input-padding-top) + 0.55em),
232
232
  [padding-bottom]:
233
- calc(var(--input-padding-bottom) - 0.85ch),
233
+ calc(var(--input-padding-bottom) - 0.55em),
234
234
  pseudo: (
235
235
  placeholder: (
236
236
  opacity: 1,
@@ -242,14 +242,14 @@ $vv-select: (
242
242
  dirty: (
243
243
  element: (
244
244
  label: (
245
- transform: translateY(-1.2ch),
245
+ transform: translateY(-0.8em),
246
246
  font-size: var(--text-12),
247
247
  ),
248
248
  input: (
249
249
  [padding-top]:
250
- calc(var(--input-padding-top) + 0.85ch),
250
+ calc(var(--input-padding-top) + 0.55em),
251
251
  [padding-bottom]:
252
- calc(var(--input-padding-bottom) - 0.85ch),
252
+ calc(var(--input-padding-bottom) - 0.55em),
253
253
  pseudo: (
254
254
  placeholder: (
255
255
  opacity: 1,
@@ -0,0 +1,22 @@
1
+ $vv-skeleton: (
2
+ --skeleton-background: var(--color-surface-2),
3
+ --skeleton-shine-color: var(--color-surface),
4
+ display: grid,
5
+ gap: calc(1em * (var(--leading-normal) - 1)),
6
+ element: (
7
+ item: (
8
+ [background]:
9
+ linear-gradient(
10
+ 110deg,
11
+ var(--skeleton-background) 8%,
12
+ var(--skeleton-shine-color) 18%,
13
+ var(--skeleton-background) 33%
14
+ ),
15
+ [color]: transparent,
16
+ background-size: 200% 100%,
17
+ height: 1em,
18
+ border-radius: var(--rounded),
19
+ animation: var(--animation-shine),
20
+ ),
21
+ ),
22
+ ) !default;
@@ -33,7 +33,7 @@ $vv-textarea: (
33
33
  overflow: hidden,
34
34
  background-color: var(--input-background-color),
35
35
  will-change: background-color,
36
- transition: background-color 0.3s ease-in-out,
36
+ transition: var(--transition-colors),
37
37
  pseudo: (
38
38
  before: (
39
39
  position: absolute,
@@ -49,7 +49,7 @@ $vv-textarea: (
49
49
  transform: scaleX(0),
50
50
  transform-origin: left,
51
51
  will-change: transform,
52
- transition: transform 0.3s ease-in-out,
52
+ transition: var(--transition-transform),
53
53
  ),
54
54
  ),
55
55
  state: (
@@ -218,7 +218,7 @@ $vv-textarea: (
218
218
  margin: 0,
219
219
  will-change: 'transform',
220
220
  transform-origin: left,
221
- transition: all 0.3s ease-in-out,
221
+ transition: var(--transition-all),
222
222
  ),
223
223
  input: (
224
224
  pseudo: (
@@ -232,11 +232,11 @@ $vv-textarea: (
232
232
  focus-within: (
233
233
  element: (
234
234
  label: (
235
- transform: translateY(-1.2ch),
235
+ transform: translateY(-0.8em),
236
236
  font-size: var(--text-12),
237
237
  ),
238
238
  input: (
239
- transform: translateY(0.85ch),
239
+ transform: translateY(0.55em),
240
240
  pseudo: (
241
241
  placeholder: (
242
242
  opacity: 1,
@@ -248,11 +248,11 @@ $vv-textarea: (
248
248
  dirty: (
249
249
  element: (
250
250
  label: (
251
- transform: translateY(-1.2ch),
251
+ transform: translateY(-0.8em),
252
252
  font-size: var(--text-12),
253
253
  ),
254
254
  input: (
255
- transform: translateY(0.85ch),
255
+ transform: translateY(0.55em),
256
256
  pseudo: (
257
257
  placeholder: (
258
258
  opacity: 1,
@@ -17,7 +17,7 @@ $vv-tooltip: (
17
17
  text-align: center,
18
18
  box-shadow: var(--shadow-md),
19
19
  will-change: opacity,
20
- transition: opacity 0.3s ease-in-out,
20
+ transition: var(--transition-opacity),
21
21
  pseudo: (
22
22
  after: (
23
23
  position: absolute,
@@ -857,6 +857,7 @@
857
857
  $modifiers-key: 'modifier',
858
858
  $states-key: 'state',
859
859
  $breakpoints-key: 'breakpoint',
860
+ $transitions-key: 'transition',
860
861
  $props: true,
861
862
  $zero-specificity: true,
862
863
  $custom-props: false,
@@ -865,6 +866,7 @@
865
866
  $custom-modifiers: false,
866
867
  $custom-states: false,
867
868
  $custom-breakpoints: false,
869
+ $custom-transitions: false,
868
870
  $bps: (xxs: 0)
869
871
  ) {
870
872
  @if type-of($map) == 'map' and $block != '' {
@@ -951,6 +953,21 @@
951
953
  }
952
954
  }
953
955
 
956
+ // transition
957
+ @if not $custom-transitions {
958
+ @if map.has-key($map, $transitions-key) {
959
+ @include spread-map-into-transitions(
960
+ $map: $map,
961
+ $prefix: $block,
962
+ $key: $transitions-key,
963
+ $block: $selector,
964
+ $props: $props,
965
+ $zero-specificity: $zero-specificity,
966
+ $bps: $bps
967
+ );
968
+ }
969
+ }
970
+
954
971
  // breakpoints
955
972
  @if not $custom-breakpoints {
956
973
  @if map.has-key($map, $breakpoints-key) {
@@ -967,3 +984,81 @@
967
984
  }
968
985
  }
969
986
  }
987
+
988
+ // Transform a map into a list of transitions
989
+ @mixin spread-map-into-transitions(
990
+ $map: (),
991
+ $prefix: '',
992
+ $key: 'transition',
993
+ $block: null,
994
+ $props: true,
995
+ $zero-specificity: true,
996
+ $bps: (
997
+ xxs: 0,
998
+ )
999
+ ) {
1000
+ @if not $block {
1001
+ $block: &;
1002
+ }
1003
+ @if type-of(map.get($map, $key)) == 'map' {
1004
+ @each $transition, $states in map.get($map, $key) {
1005
+ @each $state, $value in $states {
1006
+ @if $state in [ 'enter-from', 'enter-active', 'enter-to',
1007
+ 'leave-from', 'leave-active', 'leave-to', 'active',
1008
+ 'inert' ] and type-of($value) == 'map'
1009
+ {
1010
+ $selector: '.#{$transition}';
1011
+
1012
+ @if $prefix != '' {
1013
+ $selector: '.#{$prefix}--#{$transition}';
1014
+ }
1015
+
1016
+ @if $state == 'active' {
1017
+ $selector: (
1018
+ '#{$selector}-enter-active',
1019
+ '#{$selector}-leave-active'
1020
+ );
1021
+ } @else if $state == 'inert' {
1022
+ $selector: (
1023
+ '#{$selector}-enter-from',
1024
+ '#{$selector}-leave-to'
1025
+ );
1026
+ } @else {
1027
+ $selector: '#{$selector}-#{$state}';
1028
+ }
1029
+
1030
+ // map props and attributes
1031
+ @include wrap-with-where(
1032
+ $selector,
1033
+ $enabled: $zero-specificity
1034
+ ) {
1035
+ @include spread-map-into-attrs(
1036
+ $map: $value,
1037
+ $prefix: $prefix,
1038
+ $variant: #{$key}-#{$transition}-#{$state},
1039
+ $deep: true,
1040
+ $ignore: (
1041
+ 'element',
1042
+ ),
1043
+ $props: $props
1044
+ );
1045
+ }
1046
+
1047
+ // map elements
1048
+ @if map.get($value, 'element') {
1049
+ @include spread-map-into-elements(
1050
+ $original: $map,
1051
+ $map: $value,
1052
+ $prefix: #{$prefix}-#{$key}-#{$transition}-#{$state},
1053
+ $key: 'element',
1054
+ $block: $block,
1055
+ $modifier: $selector,
1056
+ $props: $props,
1057
+ $zero-specificity: $zero-specificity
1058
+ );
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
@@ -41,6 +41,7 @@
41
41
  $class: border,
42
42
  $attribute: border-width,
43
43
  $prop: border,
44
+ $bps: $breakpoints,
44
45
  $zero-specificity: $zero-specificity-for-utilities
45
46
  );
46
47
 
@@ -51,6 +52,7 @@
51
52
  border-right-width,
52
53
  border-left-width,
53
54
  ),
55
+ $bps: $breakpoints,
54
56
  $prop: border,
55
57
  $zero-specificity: $zero-specificity-for-utilities
56
58
  );
@@ -62,6 +64,7 @@
62
64
  border-top-width,
63
65
  border-bottom-width,
64
66
  ),
67
+ $bps: $breakpoints,
65
68
  $prop: border,
66
69
  $zero-specificity: $zero-specificity-for-utilities
67
70
  );
@@ -73,6 +76,7 @@
73
76
  $attribute: (
74
77
  border- + $value + -width,
75
78
  ),
79
+ $bps: $breakpoints,
76
80
  $prop: border,
77
81
  $zero-specificity: $zero-specificity-for-utilities
78
82
  );
@@ -83,5 +87,6 @@
83
87
  $map: $border-style,
84
88
  $class: border,
85
89
  $attribute: border-style,
90
+ $bps: $breakpoints,
86
91
  $zero-specificity: $zero-specificity-for-utilities
87
92
  );
@@ -16,6 +16,14 @@
16
16
  $zero-specificity: $zero-specificity-for-utilities
17
17
  );
18
18
 
19
+ // saturation
20
+ @include spread-map-into-utilities(
21
+ $map: $saturation,
22
+ $class: saturate,
23
+ $attribute: filter,
24
+ $zero-specificity: $zero-specificity-for-utilities
25
+ );
26
+
19
27
  // backdrop blur
20
28
  @include spread-map-into-utilities(
21
29
  $map: $blur,
@@ -1,4 +1,3 @@
1
- @forward 'animation';
2
1
  @forward 'backgrounds';
3
2
  @forward 'borders';
4
3
  @forward 'colors';
@@ -6,8 +5,9 @@
6
5
  @forward 'filters';
7
6
  @forward 'flexbox';
8
7
  @forward 'grid';
8
+ @forward 'interactivity';
9
9
  @forward 'layout';
10
10
  @forward 'sizing';
11
11
  @forward 'spacing';
12
- @forward 'typography';
13
12
  @forward 'transitions';
13
+ @forward 'typography';
@@ -1,9 +1,10 @@
1
+ @use 'sass:map';
1
2
  @use '../context' as *;
2
3
 
3
- // animate
4
+ // grid template columns
4
5
  @include spread-map-into-utilities(
5
- $map: $animate,
6
- $class: 'animate',
7
- $attribute: 'animation',
6
+ $map: $cursor,
7
+ $class: cursor,
8
+ $attribute: cursor,
8
9
  $zero-specificity: $zero-specificity-for-utilities
9
10
  );
@@ -1,10 +1,11 @@
1
1
  @use 'sass:map';
2
+ @use 'sass:string';
2
3
  @use '../context' as *;
3
4
 
4
5
  // transition property
5
6
  @include spread-map-into-utilities(
6
7
  $map: $transition-property,
7
- $class: transition,
8
+ $class: transition-property,
8
9
  $attribute: transition-property,
9
10
  $zero-specificity: $zero-specificity-for-utilities
10
11
  );
@@ -28,3 +29,19 @@
28
29
  $attribute: transition-timing-function,
29
30
  $zero-specificity: $zero-specificity-for-utilities
30
31
  );
32
+
33
+ @each $property, $value in $transition-property {
34
+ @include wrap-with-where(
35
+ $selector: '.transition-#{$property}',
36
+ $enabled: $zero-specificity-for-utilities
37
+ ) {
38
+ transition-property: string.unquote($value);
39
+ @if $property != 'none' {
40
+ transition-duration: map.get($transition-duration-delay, 300);
41
+ transition-timing-function: map.get(
42
+ $transition-timing-function,
43
+ 'in-out'
44
+ );
45
+ }
46
+ }
47
+ }
@@ -24,6 +24,7 @@
24
24
  $map: map.merge($font-size, $font-size-dynamic),
25
25
  $class: text,
26
26
  $attribute: font-size,
27
+ $bps: $breakpoints,
27
28
  $prop: text,
28
29
  $deep: false,
29
30
  $zero-specificity: $zero-specificity-for-utilities
@@ -1 +0,0 @@
1
- @media (prefers-reduced-motion: no-preference){:where(:host,:root,.theme){--animate-none: none;--animate-indeterminate: indeterminate 2s infinite;--animate-progress-indeterminate: progress-indeterminate 1.5s linear infinite;--animate-spin: spin 1s infinite;--animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce: bounce 1s infinite}}@keyframes indeterminate{0%{transform:scaleX(0)}50%{transform:scaleX(1);transform-origin:left}51%{transform:scaleX(1);transform-origin:center right}to{transform:scaleX(0);transform-origin:center right}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes progress-indeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes pie-masks{0%{opacity:1}50%,to{opacity:0}}
@@ -1 +0,0 @@
1
- :where(.animate-none){animation:none}:where(.animate-indeterminate){animation:indeterminate 2s infinite}:where(.animate-progress-indeterminate){animation:progress-indeterminate 1.5s linear infinite}:where(.animate-spin){animation:spin 1s infinite}:where(.animate-ping){animation:ping 1s cubic-bezier(0,0,.2,1) infinite}:where(.animate-pulse){animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}:where(.animate-bounce){animation:bounce 1s infinite}
@@ -1,9 +0,0 @@
1
- $animate: (
2
- none: none,
3
- indeterminate: indeterminate 2s infinite,
4
- progress-indeterminate: progress-indeterminate 1.5s linear infinite,
5
- spin: spin 1s infinite,
6
- ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite,
7
- pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite,
8
- bounce: bounce 1s infinite,
9
- ) !default;