@volverjs/style 0.1.2-beta.24 → 0.1.2-beta.26

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 (75) 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/transitions.css +1 -0
  15. package/dist/props.css +1 -1
  16. package/dist/utilities/borders.css +1 -1
  17. package/dist/utilities/interactivity.css +1 -0
  18. package/dist/utilities/transitions.css +1 -1
  19. package/dist/utilities/typography.css +1 -1
  20. package/dist/utilities.css +1 -1
  21. package/dist/volver.css +1 -1
  22. package/package.json +22 -20
  23. package/src/_config.scss +3 -2
  24. package/src/components/index.scss +1 -0
  25. package/src/components/vv-accordion.scss +1 -1
  26. package/src/components/vv-alert.scss +1 -1
  27. package/src/components/vv-avatar.scss +1 -1
  28. package/src/components/vv-badge.scss +1 -1
  29. package/src/components/vv-breadcrumb.scss +1 -1
  30. package/src/components/vv-button-group.scss +9 -9
  31. package/src/components/vv-button.scss +2 -6
  32. package/src/components/vv-card.scss +1 -1
  33. package/src/components/vv-dialog.scss +1 -1
  34. package/src/components/vv-dropdown.scss +1 -1
  35. package/src/components/vv-input-checkbox-group.scss +1 -1
  36. package/src/components/vv-input-checkbox.scss +3 -3
  37. package/src/components/vv-input-radio-group.scss +1 -1
  38. package/src/components/vv-input-radio.scss +2 -2
  39. package/src/components/vv-input-text.scss +4 -4
  40. package/src/components/vv-nav.scss +1 -1
  41. package/src/components/vv-progress.scss +1 -1
  42. package/src/components/vv-select.scss +4 -4
  43. package/src/components/vv-skeleton.scss +14 -0
  44. package/src/components/vv-tab.scss +1 -1
  45. package/src/components/vv-table.scss +1 -1
  46. package/src/components/vv-text.scss +1 -1
  47. package/src/components/vv-textarea.scss +4 -4
  48. package/src/components/vv-toast.scss +1 -1
  49. package/src/components/vv-tooltip.scss +3 -3
  50. package/src/export.scss +2 -2
  51. package/src/props/index.scss +3 -3
  52. package/src/props/{animation.scss → transitions.scss} +41 -1
  53. package/src/settings/_index.scss +8 -7
  54. package/src/settings/_interactivity.scss +39 -0
  55. package/src/settings/_transitions.scss +4 -1
  56. package/src/settings/components/_vv-accordion.scss +2 -2
  57. package/src/settings/components/_vv-button.scss +1 -1
  58. package/src/settings/components/_vv-dialog.scss +63 -87
  59. package/src/settings/components/_vv-input-checkbox.scss +2 -2
  60. package/src/settings/components/_vv-input-radio.scss +1 -1
  61. package/src/settings/components/_vv-input-text.scss +8 -11
  62. package/src/settings/components/_vv-nav.scss +1 -1
  63. package/src/settings/components/_vv-select.scss +9 -9
  64. package/src/settings/components/_vv-skeleton.scss +21 -0
  65. package/src/settings/components/_vv-textarea.scss +7 -7
  66. package/src/settings/components/_vv-tooltip.scss +1 -1
  67. package/src/tools/_mixins.scss +95 -0
  68. package/src/utilities/borders.scss +5 -0
  69. package/src/utilities/index.scss +2 -2
  70. package/src/utilities/{animation.scss → interactivity.scss} +5 -4
  71. package/src/utilities/transitions.scss +17 -1
  72. package/src/utilities/typography.scss +1 -0
  73. package/dist/props/animation.css +0 -1
  74. package/dist/utilities/animation.css +0 -1
  75. package/src/settings/_animation.scss +0 -9
@@ -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
  );
@@ -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
  );
@@ -4,7 +4,7 @@
4
4
  // transition property
5
5
  @include spread-map-into-utilities(
6
6
  $map: $transition-property,
7
- $class: transition,
7
+ $class: transition-property,
8
8
  $attribute: transition-property,
9
9
  $zero-specificity: $zero-specificity-for-utilities
10
10
  );
@@ -28,3 +28,19 @@
28
28
  $attribute: transition-timing-function,
29
29
  $zero-specificity: $zero-specificity-for-utilities
30
30
  );
31
+
32
+ @each $property in $transition-property {
33
+ @include wrap-with-where(
34
+ $selector: '.transition-#{$property}',
35
+ $enabled: $zero-specificity-for-utilities
36
+ ) {
37
+ transition-property: $property;
38
+ @if $property != 'none' {
39
+ transition-duration: map.get($transition-duration-delay, '300');
40
+ transition-timing-function: map.get(
41
+ $transition-timing-function,
42
+ 'in-out'
43
+ );
44
+ }
45
+ }
46
+ }
@@ -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;