@volverjs/style 0.1.23 → 0.1.24-beta.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 +30 -0
- package/dist/base.css +1 -1
- package/dist/components/vv-accordion.css +1 -1
- package/dist/components/vv-alert.css +1 -1
- package/dist/components/vv-badge.css +1 -1
- package/dist/components/vv-button.css +1 -1
- package/dist/components/vv-card.css +1 -1
- package/dist/components/vv-checkbox.css +1 -1
- package/dist/components/vv-dropdown-action.css +1 -1
- package/dist/components/vv-dropdown-option.css +1 -1
- package/dist/components/vv-dropdown.css +1 -1
- package/dist/components/vv-input-file.css +1 -1
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-nav.css +1 -1
- package/dist/components/vv-radio.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-text.css +1 -1
- package/dist/components/vv-tooltip.css +1 -1
- package/dist/components.css +1 -1
- package/dist/export.css +1 -1
- package/dist/props/breakpoints.css +1 -1
- package/dist/props/colors.css +1 -1
- package/dist/props/effects.css +1 -1
- package/dist/props/spacing.css +1 -1
- package/dist/props/transitions.css +1 -1
- package/dist/props/typography.css +1 -1
- package/dist/props.css +1 -1
- package/dist/themes/dark/components.css +1 -1
- package/dist/themes/dark/props.css +1 -1
- package/dist/themes/dark/volver.css +1 -1
- package/dist/utilities/borders.css +1 -1
- package/dist/utilities/colors.css +1 -1
- package/dist/utilities/effects.css +1 -1
- package/dist/utilities/flexbox.css +1 -1
- package/dist/utilities/grid.css +1 -1
- package/dist/utilities/layout.css +1 -1
- package/dist/utilities/sizing.css +1 -1
- package/dist/utilities/typography.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +17 -17
- package/src/_config.scss +12 -0
- package/src/_layers.scss +4 -0
- package/src/_preflight.scss +2 -0
- package/src/components/vv-accordion-group.scss +3 -0
- package/src/components/vv-accordion.scss +3 -0
- package/src/components/vv-alert-group.scss +3 -0
- package/src/components/vv-alert.scss +3 -0
- package/src/components/vv-avatar-group.scss +3 -0
- package/src/components/vv-avatar.scss +3 -0
- package/src/components/vv-badge.scss +3 -0
- package/src/components/vv-breadcrumb.scss +3 -0
- package/src/components/vv-button-group.scss +3 -0
- package/src/components/vv-button.scss +3 -0
- package/src/components/vv-card.scss +3 -0
- package/src/components/vv-checkbox-group.scss +3 -0
- package/src/components/vv-checkbox.scss +3 -0
- package/src/components/vv-dialog.scss +3 -0
- package/src/components/vv-dropdown-action.scss +3 -0
- package/src/components/vv-dropdown-optgroup.scss +3 -0
- package/src/components/vv-dropdown-option.scss +3 -0
- package/src/components/vv-dropdown.scss +3 -0
- package/src/components/vv-input-file.scss +3 -0
- package/src/components/vv-input-text.scss +3 -0
- package/src/components/vv-nav.scss +3 -0
- package/src/components/vv-progress.scss +3 -0
- package/src/components/vv-radio-group.scss +3 -0
- package/src/components/vv-radio.scss +3 -0
- package/src/components/vv-select.scss +3 -0
- package/src/components/vv-skeleton.scss +3 -0
- package/src/components/vv-tab.scss +3 -0
- package/src/components/vv-table.scss +3 -0
- package/src/components/vv-text.scss +3 -0
- package/src/components/vv-textarea.scss +3 -0
- package/src/components/vv-tooltip.scss +5 -7
- package/src/export.scss +0 -1
- package/src/props/background.scss +5 -3
- package/src/props/borders.scss +5 -3
- package/src/props/breakpoints.scss +11 -9
- package/src/props/colors.scss +4 -2
- package/src/props/effects.scss +5 -3
- package/src/props/filters.scss +6 -4
- package/src/props/input.scss +4 -2
- package/src/props/layout.scss +5 -3
- package/src/props/sizing.scss +5 -3
- package/src/props/spacing.scss +18 -16
- package/src/props/transitions.scss +150 -118
- package/src/props/typography.scss +26 -24
- package/src/reset.scss +4 -0
- package/src/settings/_colors.scss +80 -50
- package/src/settings/_effects.scss +7 -7
- package/src/settings/components/_vv-badge.scss +2 -10
- package/src/settings/components/_vv-button.scss +1 -1
- package/src/settings/components/_vv-card.scss +3 -17
- package/src/settings/components/_vv-nav.scss +1 -6
- package/src/settings/components/_vv-text.scss +1 -0
- package/src/themes/dark/components/_vv-alert.scss +14 -10
- package/src/themes/dark/components/_vv-avatar.scss +14 -10
- package/src/themes/dark/components/_vv-badge.scss +14 -10
- package/src/themes/dark/components/_vv-button.scss +14 -10
- package/src/themes/dark/components/_vv-dropdown-action.scss +14 -10
- package/src/themes/dark/components/_vv-dropdown-option.scss +14 -10
- package/src/themes/dark/components/_vv-nav.scss +14 -10
- package/src/themes/dark/components/_vv-select.scss +14 -10
- package/src/themes/dark/props/_background.scss +3 -0
- package/src/themes/dark/props/_colors.scss +3 -0
- package/src/themes/dark/props/_input.scss +3 -0
- package/src/themes/dark/settings/_colors.scss +42 -28
- package/src/themes/dark/settings/components/_vv-alert.scss +23 -0
- package/src/themes/dark/settings/components/_vv-avatar.scss +3 -0
- package/src/themes/dark/settings/components/_vv-button.scss +0 -1
- package/src/tools/_breakpoints.scss +20 -4
- package/src/tools/_functions.scss +157 -0
- package/src/tools/_mixins.scss +5 -1216
- package/src/tools/mixin-modules/_attrs.scss +178 -0
- package/src/tools/mixin-modules/_bem.scss +751 -0
- package/src/tools/mixin-modules/_helpers.scss +23 -0
- package/src/tools/mixin-modules/_index.scss +25 -0
- package/src/tools/mixin-modules/_layers.scss +42 -0
- package/src/tools/mixin-modules/_props.scss +41 -0
- package/src/tools/mixin-modules/_theme.scss +354 -0
- package/src/tools/mixin-modules/_utilities.scss +121 -0
- package/src/utilities/backgrounds.scss +3 -0
- package/src/utilities/borders.scss +3 -0
- package/src/utilities/colors.scss +3 -0
- package/src/utilities/effects.scss +3 -0
- package/src/utilities/filters.scss +3 -0
- package/src/utilities/flexbox.scss +3 -0
- package/src/utilities/grid.scss +3 -0
- package/src/utilities/interactivity.scss +3 -0
- package/src/utilities/layout.scss +3 -0
- package/src/utilities/sizing.scss +3 -0
- package/src/utilities/spacing.scss +3 -0
- package/src/utilities/tables.scss +3 -0
- package/src/utilities/transforms.scss +11 -6
- package/src/utilities/transitions.scss +3 -0
- package/src/utilities/typography.scss +3 -0
- package/src/volver.scss +2 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'sass:string';
|
|
5
|
+
|
|
6
|
+
// ============================================
|
|
7
|
+
// CSS Attributes Mixin
|
|
8
|
+
// Transforms a map into CSS property declarations
|
|
9
|
+
// ============================================
|
|
10
|
+
|
|
11
|
+
// Handle vendor-prefixed pseudo-elements
|
|
12
|
+
@mixin pseudo-element-placeholder($pseudo-element) {
|
|
13
|
+
@if list.index(
|
|
14
|
+
(
|
|
15
|
+
calendar-picker-indicator,
|
|
16
|
+
search-cancel-button,
|
|
17
|
+
color-swatch-wrapper,
|
|
18
|
+
color-swatch,
|
|
19
|
+
inner-spin-button,
|
|
20
|
+
outer-spin-button,
|
|
21
|
+
progress-bar,
|
|
22
|
+
progress-value,
|
|
23
|
+
progress-inner-element,
|
|
24
|
+
datetime-edit,
|
|
25
|
+
datetime-edit-fields-wrapper,
|
|
26
|
+
datetime-edit-day-field
|
|
27
|
+
),
|
|
28
|
+
$pseudo-element
|
|
29
|
+
) {
|
|
30
|
+
&::-webkit-#{$pseudo-element} {
|
|
31
|
+
@content;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::-moz-#{$pseudo-element} {
|
|
35
|
+
@content;
|
|
36
|
+
}
|
|
37
|
+
} @else {
|
|
38
|
+
&::#{$pseudo-element} {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// List of valid pseudo-elements
|
|
45
|
+
$-pseudo-elements: (
|
|
46
|
+
before, after, placeholder,
|
|
47
|
+
calendar-picker-indicator, search-cancel-button,
|
|
48
|
+
color-swatch-wrapper, color-swatch,
|
|
49
|
+
inner-spin-button, outer-spin-button,
|
|
50
|
+
progress-bar, progress-value, inner-element, marker,
|
|
51
|
+
datetime-edit, datetime-edit-fields-wrapper, datetime-edit-day-field,
|
|
52
|
+
backdrop, file-selector-button,
|
|
53
|
+
-webkit-progress-bar, -webkit-progress-value, -webkit-inner-element,
|
|
54
|
+
-moz-progress-bar, -moz-progress-value, -moz-inner-element,
|
|
55
|
+
-webkit-details-marker, -webkit-scrollbar,
|
|
56
|
+
-webkit-scrollbar-track, -webkit-scrollbar-thumb
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
// Transform a map into a list of CSS attributes
|
|
60
|
+
// @param {Map} $original - Original map for reference
|
|
61
|
+
// @param {Map} $map - The map to transform
|
|
62
|
+
// @param {String} $prefix - Variable name prefix
|
|
63
|
+
// @param {String} $variant - Variant name for CSS variable naming
|
|
64
|
+
// @param {String} $postfix - Postfix for CSS variable naming
|
|
65
|
+
// @param {Bool} $deep - Whether to recurse into nested maps
|
|
66
|
+
// @param {List} $ignore - Keys to ignore
|
|
67
|
+
// @param {Bool} $props - Whether to use CSS custom properties
|
|
68
|
+
// @param {Map} $bps - Breakpoints map
|
|
69
|
+
@mixin spread-map-into-attrs(
|
|
70
|
+
$original: (),
|
|
71
|
+
$map: (),
|
|
72
|
+
$prefix: '',
|
|
73
|
+
$variant: '',
|
|
74
|
+
$postfix: '',
|
|
75
|
+
$deep: false,
|
|
76
|
+
$ignore: (),
|
|
77
|
+
$props: true,
|
|
78
|
+
$bps: (xxs: 0)
|
|
79
|
+
) {
|
|
80
|
+
@if meta.type-of($map) == 'map' and $prefix != '' {
|
|
81
|
+
@each $key, $value in $map {
|
|
82
|
+
@if not list.index($ignore, $key) {
|
|
83
|
+
@if meta.type-of($value) == 'map' and ($deep or $key == 'pseudo') {
|
|
84
|
+
$original: map.get($original, $key);
|
|
85
|
+
|
|
86
|
+
@if not $original {
|
|
87
|
+
$original: ();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@if $postfix != '' {
|
|
91
|
+
$key: #{$postfix}-#{$key};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@if $key == 'pseudo' {
|
|
95
|
+
@each $pseudo-element, $pseudo-map in $value {
|
|
96
|
+
@if meta.type-of($pseudo-map) == 'map' {
|
|
97
|
+
@if list.index($-pseudo-elements, $pseudo-element) {
|
|
98
|
+
$original: map.get($original, $pseudo-element);
|
|
99
|
+
$key: pseudo-#{$pseudo-element};
|
|
100
|
+
|
|
101
|
+
@include pseudo-element-placeholder($pseudo-element) {
|
|
102
|
+
@if not $original {
|
|
103
|
+
@if not map.has-key($pseudo-map, 'content') {
|
|
104
|
+
content: '';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
$original: ();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include spread-map-into-attrs(
|
|
111
|
+
$original: $original,
|
|
112
|
+
$map: $pseudo-map,
|
|
113
|
+
$prefix: $prefix,
|
|
114
|
+
$variant: $variant,
|
|
115
|
+
$postfix: $key,
|
|
116
|
+
$deep: true,
|
|
117
|
+
$props: $props
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} @else {
|
|
124
|
+
@include spread-map-into-attrs(
|
|
125
|
+
$original: $original,
|
|
126
|
+
$map: $value,
|
|
127
|
+
$prefix: $prefix,
|
|
128
|
+
$variant: $variant,
|
|
129
|
+
$postfix: $key,
|
|
130
|
+
$deep: true,
|
|
131
|
+
$props: $props
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
} @else if meta.type-of($value) != 'map' and string.slice(meta.inspect($key), 1, 1) != '_' {
|
|
135
|
+
@if $props and
|
|
136
|
+
$key != 'content' and
|
|
137
|
+
string.slice(meta.inspect($key), 1, 2) != '--' and
|
|
138
|
+
string.slice(meta.inspect($key), 1, 1) != '['
|
|
139
|
+
{
|
|
140
|
+
$prop-to-replace: --#{$prefix};
|
|
141
|
+
$prop-to-replace-with: --#{$prefix};
|
|
142
|
+
|
|
143
|
+
// add variant
|
|
144
|
+
@if $variant != '' {
|
|
145
|
+
$prop-to-replace-with: #{$prop-to-replace-with}-#{$variant};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// add postfix
|
|
149
|
+
@if $postfix != '' {
|
|
150
|
+
$prop-to-replace: #{$prop-to-replace}-#{$postfix};
|
|
151
|
+
$prop-to-replace-with: #{$prop-to-replace-with}-#{$postfix};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// add key
|
|
155
|
+
$prop-to-replace: #{$prop-to-replace}-#{$key};
|
|
156
|
+
$prop-to-replace-with: #{$prop-to-replace-with}-#{$key};
|
|
157
|
+
|
|
158
|
+
@if map.get($original, $key) {
|
|
159
|
+
#{$prop-to-replace}: var(#{$prop-to-replace-with});
|
|
160
|
+
} @else {
|
|
161
|
+
#{$key}: var(#{$prop-to-replace-with});
|
|
162
|
+
}
|
|
163
|
+
} @else {
|
|
164
|
+
@if string.slice(meta.inspect($key), 1, 1) == '[' {
|
|
165
|
+
$key: string.slice(
|
|
166
|
+
meta.inspect($key),
|
|
167
|
+
2,
|
|
168
|
+
string.length(meta.inspect($key)) - 1
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
#{$key}: $value;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|