@volverjs/style 0.0.0

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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -0
  3. package/package.json +158 -0
  4. package/src/_config.scss +32 -0
  5. package/src/_context.scss +11 -0
  6. package/src/assets/24consulting.svg +63 -0
  7. package/src/assets/volverjs.svg +15 -0
  8. package/src/components/index.scss +17 -0
  9. package/src/components/vv-badge.scss +12 -0
  10. package/src/components/vv-button-group.scss +115 -0
  11. package/src/components/vv-button.scss +57 -0
  12. package/src/components/vv-card.scss +12 -0
  13. package/src/components/vv-collapse.scss +12 -0
  14. package/src/components/vv-dialog.scss +12 -0
  15. package/src/components/vv-dropdown.scss +12 -0
  16. package/src/components/vv-input-checkbox-group.scss +12 -0
  17. package/src/components/vv-input-checkbox.scss +28 -0
  18. package/src/components/vv-input-radio-group.scss +12 -0
  19. package/src/components/vv-input-radio.scss +20 -0
  20. package/src/components/vv-input-text.scss +49 -0
  21. package/src/components/vv-progress.scss +12 -0
  22. package/src/components/vv-select.scss +49 -0
  23. package/src/components/vv-table.scss +12 -0
  24. package/src/components/vv-text.scss +12 -0
  25. package/src/components/vv-textarea.scss +49 -0
  26. package/src/export.scss +411 -0
  27. package/src/preflight.scss +281 -0
  28. package/src/props/animation.scss +80 -0
  29. package/src/props/background.scss +5 -0
  30. package/src/props/borders.scss +6 -0
  31. package/src/props/colors.scss +5 -0
  32. package/src/props/effects.scss +5 -0
  33. package/src/props/filters.scss +6 -0
  34. package/src/props/index.scss +12 -0
  35. package/src/props/input.scss +5 -0
  36. package/src/props/layout.scss +6 -0
  37. package/src/props/media.scss +49 -0
  38. package/src/props/sizing.scss +6 -0
  39. package/src/props/spacing.scss +27 -0
  40. package/src/props/typography.scss +38 -0
  41. package/src/reset.scss +88 -0
  42. package/src/settings/_animation.scss +9 -0
  43. package/src/settings/_background.scss +56 -0
  44. package/src/settings/_borders.scss +24 -0
  45. package/src/settings/_breakpoints.scss +13 -0
  46. package/src/settings/_colors.scss +39 -0
  47. package/src/settings/_effects.scss +39 -0
  48. package/src/settings/_filters.scss +26 -0
  49. package/src/settings/_flexbox.scss +66 -0
  50. package/src/settings/_grid.scss +104 -0
  51. package/src/settings/_index.scss +34 -0
  52. package/src/settings/_input.scss +51 -0
  53. package/src/settings/_layout.scss +109 -0
  54. package/src/settings/_sizing.scss +99 -0
  55. package/src/settings/_spacing.scss +77 -0
  56. package/src/settings/_typography.scss +179 -0
  57. package/src/settings/components/_vv-badge.scss +43 -0
  58. package/src/settings/components/_vv-button-group.scss +20 -0
  59. package/src/settings/components/_vv-button.scss +214 -0
  60. package/src/settings/components/_vv-card.scss +74 -0
  61. package/src/settings/components/_vv-collapse.scss +111 -0
  62. package/src/settings/components/_vv-dialog.scss +183 -0
  63. package/src/settings/components/_vv-dropdown.scss +37 -0
  64. package/src/settings/components/_vv-input-checkbox-group.scss +60 -0
  65. package/src/settings/components/_vv-input-checkbox.scss +92 -0
  66. package/src/settings/components/_vv-input-radio-group.scss +1 -0
  67. package/src/settings/components/_vv-input-radio.scss +60 -0
  68. package/src/settings/components/_vv-input-text.scss +327 -0
  69. package/src/settings/components/_vv-progress.scss +45 -0
  70. package/src/settings/components/_vv-select.scss +216 -0
  71. package/src/settings/components/_vv-table.scss +29 -0
  72. package/src/settings/components/_vv-text.scss +42 -0
  73. package/src/settings/components/_vv-textarea.scss +275 -0
  74. package/src/style.scss +14 -0
  75. package/src/themes/dark/_context.scss +8 -0
  76. package/src/themes/dark/components/_vv-button.scss +24 -0
  77. package/src/themes/dark/components/_vv-input-checkbox.scss +24 -0
  78. package/src/themes/dark/components/index.scss +2 -0
  79. package/src/themes/dark/props/_background.scss +15 -0
  80. package/src/themes/dark/props/_colors.scss +15 -0
  81. package/src/themes/dark/props/index.scss +2 -0
  82. package/src/themes/dark/settings/_background.scss +12 -0
  83. package/src/themes/dark/settings/_colors.scss +15 -0
  84. package/src/themes/dark/settings/_index.scss +5 -0
  85. package/src/themes/dark/settings/components/_vv-button.scss +58 -0
  86. package/src/themes/dark/settings/components/_vv-input-checkbox.scss +26 -0
  87. package/src/themes/dark/style.scss +5 -0
  88. package/src/tools/_breakpoints.scss +126 -0
  89. package/src/tools/_functions.scss +138 -0
  90. package/src/tools/_index.scss +3 -0
  91. package/src/tools/_mixins.scss +902 -0
  92. package/src/utilities/animation.scss +8 -0
  93. package/src/utilities/backgrounds.scss +50 -0
  94. package/src/utilities/borders.scss +79 -0
  95. package/src/utilities/colors.scss +33 -0
  96. package/src/utilities/effects.scss +15 -0
  97. package/src/utilities/filters.scss +22 -0
  98. package/src/utilities/flexbox.scss +113 -0
  99. package/src/utilities/grid.scss +68 -0
  100. package/src/utilities/index.scss +12 -0
  101. package/src/utilities/layout.scss +188 -0
  102. package/src/utilities/sizing.scss +80 -0
  103. package/src/utilities/spacing.scss +109 -0
  104. package/src/utilities/typography.scss +226 -0
@@ -0,0 +1,5 @@
1
+ @import 'colors';
2
+ @import 'background';
3
+
4
+ @import 'components/vv-button';
5
+ @import 'components/vv-input-checkbox';
@@ -0,0 +1,58 @@
1
+ $vv-button: (
2
+ modifier: (
3
+ primary: (
4
+ border-color: var(--color-gray-lighten-3),
5
+ background: var(--color-gray-lighten-3),
6
+ state: (
7
+ focus-visible: (
8
+ outline: var(--spacing-px) solid var(--color-gray),
9
+ ),
10
+ hover: (
11
+ background: var(--color-gray-lighten-2),
12
+ border-color: var(--color-gray-lighten-2),
13
+ ),
14
+ active: (
15
+ background: var(--color-gray-lighten-1),
16
+ border-color: var(--color-gray-lighten-1),
17
+ ),
18
+ ),
19
+ ),
20
+ secondary: (
21
+ border-color: var(--color-gray-darken-1),
22
+ background: var(--color-gray-darken-3),
23
+ text-shadow: 0 1px 0 var(--color-gray-darken-5),
24
+ state: (
25
+ focus-visible: (
26
+ outline: var(--spacing-px) solid var(--color-gray),
27
+ ),
28
+ hover: (
29
+ background: var(--color-gray-darken-4),
30
+ ),
31
+ active: (
32
+ background: var(--color-gray-darken-5),
33
+ ),
34
+ ),
35
+ ),
36
+ ghost: (
37
+ background: transparent,
38
+ border-color: transparent,
39
+ color: var(--color-gray-lighten-2),
40
+ text-shadow: 0 1px 0 var(--color-gray-darken-4),
41
+ state: (
42
+ focus-visible: (
43
+ outline: var(--spacing-px) solid var(--color-gray),
44
+ outline-offset: 0,
45
+ ),
46
+ hover: (
47
+ background: var(--color-gray-darken-4),
48
+ ),
49
+ active: (
50
+ background: var(--color-gray-darken-5),
51
+ ),
52
+ ),
53
+ ),
54
+ text: (
55
+ text-shadow: 0 1px 0 var(--color-gray-darken-5),
56
+ ),
57
+ ),
58
+ ) !default;
@@ -0,0 +1,26 @@
1
+ $vv-input-checkbox: (
2
+ element: (
3
+ input: (
4
+ state: (
5
+ checked: (
6
+ background-image:
7
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(#{hex-to-rgb($color-word)})' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"),
8
+ ),
9
+ ),
10
+ ),
11
+ ),
12
+ modifier: (
13
+ partial: (
14
+ element: (
15
+ input: (
16
+ state: (
17
+ checked: (
18
+ background-image:
19
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(#{hex-to-rgb($color-word)})' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E"),
20
+ ),
21
+ ),
22
+ ),
23
+ ),
24
+ ),
25
+ ),
26
+ ) !default;
@@ -0,0 +1,5 @@
1
+ // props
2
+ @import 'props';
3
+
4
+ // components
5
+ @import 'components';
@@ -0,0 +1,126 @@
1
+ @use 'sass:map';
2
+
3
+ // Breakpoint viewport sizes and media queries.
4
+ // Breakpoints are defined as a map of (name: minimum width), order from small to large:
5
+ // (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
6
+ // The map defined in the `$breakpoints` global variable is used as the `$bps` argument by default.
7
+
8
+ // Name of the next breakpoint, or null for the last breakpoint.
9
+ // >> breakpoint-next(sm)
10
+ // md
11
+ // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
12
+ // md
13
+ // >> breakpoint-next(sm, $bps-names: (xs sm md lg xl))
14
+ // md
15
+ @function breakpoint-next(
16
+ $name,
17
+ $bps: $breakpoints,
18
+ $bps-names: map.keys($bps)
19
+ ) {
20
+ $n: list.index($bps-names, $name);
21
+ @return if(
22
+ $n != null and $n < length($bps-names),
23
+ nth($bps-names, $n + 1),
24
+ null
25
+ );
26
+ }
27
+
28
+ // Minimum breakpoint width. Null for the smallest (first) breakpoint.
29
+ // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
30
+ // 576px
31
+ @function breakpoint-min($name, $bps: $breakpoints) {
32
+ $min: map.get($bps, $name);
33
+ @return if($min != 0, $min, null);
34
+ }
35
+
36
+ // Maximum breakpoint width. Null for the largest (last) breakpoint.
37
+ // The maximum value is calculated as the minimum of the next one less 0.02px
38
+ // to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
39
+ // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
40
+ // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
41
+ // See https://bugs.webkit.org/show_bug.cgi?id=178261
42
+ // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
43
+ // 767.98px
44
+ @function breakpoint-max($name, $bps: $breakpoints) {
45
+ $next: breakpoint-next($name, $bps);
46
+ @return if($next, breakpoint-min($next, $bps) - 0.02, null);
47
+ }
48
+
49
+ // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
50
+ // Useful for making responsive utilities.
51
+ // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
52
+ // "" (Returns a blank string)
53
+ // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
54
+ // "-sm"
55
+ @function breakpoint-infix($name, $bps: $breakpoints) {
56
+ @return if(breakpoint-min($name, $bps) == null, '', '-#{$name}');
57
+ }
58
+
59
+ // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
60
+ // Makes the @content apply to the given breakpoint and wider.
61
+ @mixin media-breakpoint-up($name, $bps: $breakpoints) {
62
+ $min: breakpoint-min($name, $bps);
63
+ @if $min {
64
+ @media (min-width: $min) {
65
+ @content;
66
+ }
67
+ } @else {
68
+ @content;
69
+ }
70
+ }
71
+
72
+ // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
73
+ // Makes the @content apply to the given breakpoint and narrower.
74
+ @mixin media-breakpoint-down($name, $bps: $breakpoints) {
75
+ $max: breakpoint-max($name, $bps);
76
+ @if $max {
77
+ @media (max-width: $max) {
78
+ @content;
79
+ }
80
+ } @else {
81
+ @content;
82
+ }
83
+ }
84
+
85
+ // Media that spans multiple breakpoint widths.
86
+ // Makes the @content apply between the min and max breakpoints
87
+ @mixin media-breakpoint-between($lower, $upper, $bps: $breakpoints) {
88
+ $min: breakpoint-min($lower, $bps);
89
+ $max: breakpoint-max($upper, $bps);
90
+
91
+ @if $min != null and $max != null {
92
+ @media (min-width: $min) and (max-width: $max) {
93
+ @content;
94
+ }
95
+ } @else if $max == null {
96
+ @include media-breakpoint-up($lower, $bps) {
97
+ @content;
98
+ }
99
+ } @else if $min == null {
100
+ @include media-breakpoint-down($upper, $bps) {
101
+ @content;
102
+ }
103
+ }
104
+ }
105
+
106
+ // Media between the breakpoint's minimum and maximum widths.
107
+ // No minimum for the smallest breakpoint, and no maximum for the largest one.
108
+ // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
109
+ @mixin media-breakpoint-only($name, $bps: $breakpoints) {
110
+ $min: breakpoint-min($name, $bps);
111
+ $max: breakpoint-max($name, $bps);
112
+
113
+ @if $min != null and $max != null {
114
+ @media (min-width: $min) and (max-width: $max) {
115
+ @content;
116
+ }
117
+ } @else if $max == null {
118
+ @include media-breakpoint-up($name, $bps) {
119
+ @content;
120
+ }
121
+ } @else if $min == null {
122
+ @include media-breakpoint-down($name, $bps) {
123
+ @content;
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,138 @@
1
+ @use 'sass:meta';
2
+ @use 'sass:map';
3
+ @use 'sass:color';
4
+ @use 'sass:string';
5
+ @use 'sass:list';
6
+
7
+ @function hsla-map($color, $name) {
8
+ @return (
9
+ hue: color.hue($color),
10
+ saturation: color.saturation($color),
11
+ lightness: color.lightness($color),
12
+ #{$name}: hsla(var(--color-#{$name}-hue)
13
+ var(--color-#{$name}-saturation)
14
+ var(--color-#{$name}-lightness) / color.alpha($color))
15
+ );
16
+ }
17
+
18
+ @function alpha-color($name, $alpha) {
19
+ @return hsla(
20
+ var(--color-#{$name}-hue) var(--color-#{$name}-saturation)
21
+ var(--color-#{$name}-lightness) / #{$alpha}
22
+ );
23
+ }
24
+
25
+ @function hex-to-rgb($hex) {
26
+ @return red($hex), green($hex), blue($hex);
27
+ }
28
+
29
+ @function color-alpha-map($color, $name, $steps: 9, $scale: 10%) {
30
+ $result: hsla-map($color, $name);
31
+ @for $index from 1 to ($steps + 1) {
32
+ $result: map.merge(
33
+ $result,
34
+ (#{$index}: alpha-color($name, $index * $scale))
35
+ );
36
+ }
37
+ @return $result;
38
+ }
39
+
40
+ @function color-shades-map($color, $name, $steps: 5, $scale: 10%) {
41
+ $result: (#{$name}: $color);
42
+ @for $index from 1 to ($steps + 1) {
43
+ $result: map.merge(
44
+ map.merge(
45
+ $result,
46
+ color-lighten-map($color, $name, $steps, $scale, 'lighten')
47
+ ),
48
+ color-darken-map($color, $name, $steps, $scale, 'darken')
49
+ );
50
+ }
51
+ @return $result;
52
+ }
53
+
54
+ @function color-lighten-map(
55
+ $color,
56
+ $name,
57
+ $steps: 5,
58
+ $scale: 10%,
59
+ $prefix: ''
60
+ ) {
61
+ $result: hsla-map($color, $name);
62
+ @for $index from 1 to ($steps + 1) {
63
+ $key: $index;
64
+ @if $prefix != '' {
65
+ $key: $prefix + '-' + $index;
66
+ }
67
+
68
+ $value: color.scale($color, $lightness: $scale * $index);
69
+ $result: map.merge(
70
+ $result,
71
+ (
72
+ #{$key}:
73
+ hsl(
74
+ var(--color-#{$name}-hue)
75
+ var(--color-#{$name}-saturation)
76
+ color.lightness($value)
77
+ )
78
+ )
79
+ );
80
+ }
81
+ @return $result;
82
+ }
83
+
84
+ @function color-darken-map($color, $name, $steps: 5, $scale: 10%, $prefix: '') {
85
+ $result: hsla-map($color, $name);
86
+
87
+ @for $index from 1 to ($steps + 1) {
88
+ $key: $index;
89
+ @if $prefix != '' {
90
+ $key: $prefix + '-' + $index;
91
+ }
92
+
93
+ $value: color.scale($color, $lightness: -1 * $scale * $index);
94
+ $result: map.merge(
95
+ $result,
96
+ (
97
+ #{$key}:
98
+ hsl(
99
+ var(--color-#{$name}-hue)
100
+ var(--color-#{$name}-saturation)
101
+ color.lightness($value)
102
+ )
103
+ )
104
+ );
105
+ }
106
+ @return $result;
107
+ }
108
+
109
+ @function str-replace($string, $search, $replace: '') {
110
+ $index: string.index($string, $search);
111
+
112
+ @if $index {
113
+ @return string.slice($string, 1, $index - 1) + $replace +
114
+ str-replace(
115
+ string.slice($string, $index + string.length($search)),
116
+ $search,
117
+ $replace
118
+ );
119
+ }
120
+
121
+ @return $string;
122
+ }
123
+
124
+ @function list-to-string($list, $glue: ', ') {
125
+ $result: null;
126
+
127
+ @for $i from 1 through length($list) {
128
+ $e: list.nth($list, $i);
129
+
130
+ @if $result and $e {
131
+ $result: $result + $glue + $e;
132
+ } @else if $e {
133
+ $result: $e;
134
+ }
135
+ }
136
+
137
+ @return $result;
138
+ }
@@ -0,0 +1,3 @@
1
+ @import 'functions';
2
+ @import 'mixins';
3
+ @import 'breakpoints';