@volverjs/style 0.1.12-beta.2 → 0.1.12-beta.20
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/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/base.css +1 -1
- package/dist/components/vv-accordion-group.css +1 -1
- package/dist/components/vv-accordion.css +1 -1
- package/dist/components/vv-alert-group.css +1 -1
- package/dist/components/vv-alert.css +1 -1
- package/dist/components/vv-avatar-group.css +1 -1
- package/dist/components/vv-avatar.css +1 -1
- package/dist/components/vv-badge.css +1 -1
- package/dist/components/vv-breadcrumb.css +1 -1
- package/dist/components/vv-button-group.css +1 -1
- package/dist/components/vv-button.css +1 -1
- package/dist/components/vv-card.css +1 -1
- package/dist/components/vv-checkbox-group.css +1 -1
- package/dist/components/vv-checkbox.css +1 -1
- package/dist/components/vv-dialog.css +1 -1
- package/dist/components/vv-dropdown-action.css +1 -1
- package/dist/components/vv-dropdown-optgroup.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 -0
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-nav.css +1 -1
- package/dist/components/vv-progress.css +1 -1
- package/dist/components/vv-radio-group.css +1 -1
- package/dist/components/vv-radio.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-skeleton.css +1 -1
- package/dist/components/vv-tab.css +1 -1
- package/dist/components/vv-table.css +1 -1
- package/dist/components/vv-text.css +1 -1
- package/dist/components/vv-textarea.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/background.css +1 -1
- package/dist/props/colors.css +1 -1
- package/dist/props/filters.css +1 -1
- package/dist/props/input.css +1 -1
- package/dist/props/layout.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/reset.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/backgrounds.css +1 -1
- package/dist/utilities/colors.css +1 -1
- package/dist/utilities/effects.css +1 -1
- package/dist/utilities/filters.css +1 -1
- package/dist/utilities/interactivity.css +1 -1
- package/dist/utilities/layout.css +1 -1
- package/dist/utilities/sizing.css +1 -1
- package/dist/utilities/transforms.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 +44 -44
- package/src/_config.scss +10 -9
- package/src/_preflight.scss +35 -1
- package/src/components/index.scss +1 -0
- package/src/components/vv-button-group.scss +6 -6
- package/src/components/vv-button.scss +1 -12
- package/src/components/vv-input-file.scss +93 -0
- package/src/components/vv-input-text.scss +54 -11
- package/src/components/vv-select.scss +53 -10
- package/src/components/vv-textarea.scss +53 -10
- package/src/components/vv-tooltip.scss +1 -1
- package/src/export.scss +33 -59
- package/src/props/background.scss +1 -0
- package/src/props/breakpoints.scss +5 -4
- package/src/props/index.scss +0 -1
- package/src/props/spacing.scss +2 -2
- package/src/props/transitions.scss +19 -0
- package/src/props/typography.scss +3 -2
- package/src/settings/_background.scss +228 -0
- package/src/settings/_colors.scss +16 -53
- package/src/settings/_effects.scss +0 -18
- package/src/settings/_filters.scss +15 -0
- package/src/settings/_index.scss +1 -1
- package/src/settings/_input.scss +4 -3
- package/src/settings/_interactivity.scss +14 -0
- package/src/settings/_layout.scss +1 -0
- package/src/settings/_transitions.scss +1 -0
- package/src/settings/_typography.scss +9 -1
- package/src/settings/components/_vv-accordion-group.scss +2 -2
- package/src/settings/components/_vv-accordion.scss +6 -5
- package/src/settings/components/_vv-alert-group.scss +14 -4
- package/src/settings/components/_vv-alert.scss +9 -9
- package/src/settings/components/_vv-avatar-group.scss +1 -0
- package/src/settings/components/_vv-avatar.scss +54 -52
- package/src/settings/components/_vv-badge.scss +67 -27
- package/src/settings/components/_vv-breadcrumb.scss +1 -0
- package/src/settings/components/_vv-button.scss +11 -5
- package/src/settings/components/_vv-card.scss +2 -0
- package/src/settings/components/_vv-checkbox-group.scss +3 -0
- package/src/settings/components/_vv-checkbox.scss +1 -0
- package/src/settings/components/_vv-dialog.scss +4 -0
- package/src/settings/components/_vv-dropdown-option.scss +2 -2
- package/src/settings/components/_vv-dropdown.scss +93 -7
- package/src/settings/components/_vv-input-file.scss +503 -0
- package/src/settings/components/_vv-input-text.scss +5 -1
- package/src/settings/components/_vv-nav.scss +10 -9
- package/src/settings/components/_vv-progress.scss +2 -0
- package/src/settings/components/_vv-radio.scss +3 -2
- package/src/settings/components/_vv-select.scss +6 -1
- package/src/settings/components/_vv-table.scss +19 -1
- package/src/settings/components/_vv-text.scss +1 -0
- package/src/settings/components/_vv-textarea.scss +6 -1
- package/src/themes/dark/components/_vv-avatar.scss +22 -0
- package/src/themes/dark/components/_vv-badge.scss +22 -0
- package/src/themes/dark/components/_vv-dropdown-action.scss +22 -0
- package/src/themes/dark/components/_vv-dropdown-option.scss +22 -0
- package/src/themes/dark/components/_vv-nav.scss +22 -0
- package/src/themes/dark/components/index.scss +6 -1
- package/src/themes/dark/settings/_background.scss +2 -0
- package/src/themes/dark/settings/_colors.scss +4 -38
- package/src/themes/dark/settings/_index.scss +6 -1
- package/src/themes/dark/settings/components/_vv-alert.scss +1 -1
- package/src/themes/dark/settings/components/_vv-avatar.scss +27 -0
- package/src/themes/dark/settings/components/_vv-badge.scss +50 -0
- package/src/themes/dark/settings/components/_vv-button.scss +13 -8
- package/src/themes/dark/settings/components/_vv-dropdown-action.scss +3 -0
- package/src/themes/dark/settings/components/_vv-dropdown-option.scss +19 -0
- package/src/themes/dark/settings/components/_vv-nav.scss +15 -0
- package/src/tools/_breakpoints.scss +13 -4
- package/src/tools/_functions.scss +26 -13
- package/src/tools/_mixins.scss +97 -26
- package/src/utilities/backgrounds.scss +14 -4
- package/src/utilities/flexbox.scss +6 -1
- package/src/utilities/index.scss +0 -1
- package/src/utilities/interactivity.scss +17 -1
- package/src/utilities/layout.scss +9 -3
- package/src/utilities/sizing.scss +10 -2
- package/src/utilities/spacing.scss +10 -1
- package/src/utilities/transforms.scss +2 -2
- package/src/utilities/typography.scss +21 -0
- package/dist/props/gradient.css +0 -1
- package/dist/utilities/gradients.css +0 -1
- package/src/props/gradient.scss +0 -7
- package/src/settings/_gradient.scss +0 -201
- package/src/utilities/gradients.scss +0 -11
package/src/tools/_mixins.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use 'sass:string';
|
|
4
4
|
@use 'sass:meta';
|
|
5
5
|
@use 'sass:selector';
|
|
6
|
+
@use 'sass:math';
|
|
6
7
|
@use 'functions' as *;
|
|
7
8
|
@use 'breakpoints' as *;
|
|
8
9
|
|
|
@@ -11,10 +12,11 @@
|
|
|
11
12
|
@mixin assert-ascending($map, $map-name) {
|
|
12
13
|
$prev-key: null;
|
|
13
14
|
$prev-num: null;
|
|
15
|
+
|
|
14
16
|
@each $key, $num in $map {
|
|
15
|
-
@if not $prev-num or unit($num) == '%' {
|
|
17
|
+
@if not $prev-num or math.unit($num) == '%' {
|
|
16
18
|
// Do nothing
|
|
17
|
-
} @else if not
|
|
19
|
+
} @else if not compatible($prev-num, $num) {
|
|
18
20
|
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
19
21
|
} @else if $prev-num >= $num {
|
|
20
22
|
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
@mixin assert-starts-at-zero($map, $map-name: '$grid-breakpoints') {
|
|
31
33
|
$values: map.values($map);
|
|
32
34
|
$first-value: list.nth($values, 1);
|
|
35
|
+
|
|
33
36
|
@if $first-value != 0 {
|
|
34
37
|
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
|
35
38
|
}
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
@mixin spread-map-into-props($map: (), $prefix: '', $old-key: '', $deep: true) {
|
|
40
43
|
@each $key, $value in $map {
|
|
41
44
|
$name: meta.inspect($key);
|
|
45
|
+
|
|
42
46
|
@if $name == meta.inspect($old-key) {
|
|
43
47
|
$name: $prefix;
|
|
44
48
|
} @else if $prefix != '' and meta.inspect($prefix) != meta.inspect($key)
|
|
@@ -56,7 +60,7 @@
|
|
|
56
60
|
string.slice(meta.inspect($key), 1, 1) !=
|
|
57
61
|
'['
|
|
58
62
|
{
|
|
59
|
-
@if type-of($value) == 'map' {
|
|
63
|
+
@if meta.type-of($value) == 'map' {
|
|
60
64
|
@if $deep {
|
|
61
65
|
@include spread-map-into-props($value, $name, $key);
|
|
62
66
|
}
|
|
@@ -81,17 +85,21 @@
|
|
|
81
85
|
$prefix: '',
|
|
82
86
|
$zero-specificity: false
|
|
83
87
|
) {
|
|
84
|
-
@if (type-of($map) == 'map' or type-of($map) == 'list') and
|
|
88
|
+
@if (meta.type-of($map) == 'map' or meta.type-of($map) == 'list') and
|
|
89
|
+
$attribute !=
|
|
90
|
+
''
|
|
85
91
|
{
|
|
86
92
|
@each $breakpoint, $breakpoint-value in $bps {
|
|
87
93
|
@if $breakpoint-value > 0 {
|
|
88
94
|
$prefix: $breakpoint + '\\:';
|
|
89
95
|
}
|
|
96
|
+
|
|
90
97
|
@each $key, $value in $map {
|
|
91
98
|
@if $name != '' and meta.inspect($key) != meta.inspect($name) {
|
|
92
99
|
$key: #{$name}-#{meta.inspect($key)};
|
|
93
100
|
}
|
|
94
|
-
|
|
101
|
+
|
|
102
|
+
@if meta.type-of($value) == 'map' and $deep {
|
|
95
103
|
@include spread-map-into-utilities(
|
|
96
104
|
$map: $value,
|
|
97
105
|
$class: $class,
|
|
@@ -125,27 +133,28 @@
|
|
|
125
133
|
$var: str-replace($var, '\\/', '-');
|
|
126
134
|
|
|
127
135
|
// check if value is not a map (spacing-dynamic)
|
|
128
|
-
@if type-of($value) != 'map' {
|
|
136
|
+
@if meta.type-of($value) != 'map' {
|
|
129
137
|
$default: $value;
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
// check if map is a list
|
|
133
|
-
@if type-of($map) ==
|
|
141
|
+
@if meta.type-of($map) ==
|
|
134
142
|
'list' and
|
|
135
143
|
(not $default or $default == '')
|
|
136
144
|
{
|
|
137
145
|
$default: $key;
|
|
138
146
|
}
|
|
139
147
|
|
|
140
|
-
@if type-of($default) == 'string' {
|
|
148
|
+
@if meta.type-of($default) == 'string' {
|
|
141
149
|
$default: string.unquote($default);
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
%#{$prefix}#{$class-name} {
|
|
145
153
|
@include media-breakpoint-up($breakpoint, $bps) {
|
|
146
|
-
@if type-of($attribute) != 'list' {
|
|
154
|
+
@if meta.type-of($attribute) != 'list' {
|
|
147
155
|
$attribute: ($attribute);
|
|
148
156
|
}
|
|
157
|
+
|
|
149
158
|
@each $attr in $attribute {
|
|
150
159
|
@if $default {
|
|
151
160
|
@if $var != '' {
|
|
@@ -159,6 +168,7 @@
|
|
|
159
168
|
}
|
|
160
169
|
}
|
|
161
170
|
}
|
|
171
|
+
|
|
162
172
|
@include wrap-with-where(
|
|
163
173
|
$selector: '.' + $prefix + $class-name,
|
|
164
174
|
$enabled: $zero-specificity
|
|
@@ -188,10 +198,12 @@
|
|
|
188
198
|
@if not $original {
|
|
189
199
|
$original: $map;
|
|
190
200
|
}
|
|
201
|
+
|
|
191
202
|
@if not $block {
|
|
192
203
|
$block: &;
|
|
193
204
|
}
|
|
194
|
-
|
|
205
|
+
|
|
206
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
195
207
|
@each $item, $value in map.get($map, $key) {
|
|
196
208
|
$selector: $block + '--' + $item;
|
|
197
209
|
|
|
@@ -300,13 +312,25 @@
|
|
|
300
312
|
$block: &;
|
|
301
313
|
}
|
|
302
314
|
|
|
303
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
315
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
304
316
|
@each $element, $value in map.get($map, $key) {
|
|
305
317
|
$selector: $block + '__' + $element;
|
|
306
318
|
|
|
319
|
+
// combinator
|
|
320
|
+
$combinator: map.get($value, '_combinator');
|
|
321
|
+
|
|
322
|
+
@if not $combinator {
|
|
323
|
+
$combinator: map.get($original, $key, $element, '_combinator');
|
|
324
|
+
}
|
|
325
|
+
|
|
307
326
|
@if $modifier {
|
|
308
327
|
$selectors: ();
|
|
328
|
+
|
|
309
329
|
@each $item in selector.parse($modifier) {
|
|
330
|
+
@if $combinator {
|
|
331
|
+
$item: '#{$item} #{$combinator}';
|
|
332
|
+
}
|
|
333
|
+
|
|
310
334
|
$selectors: list.join(
|
|
311
335
|
$selectors,
|
|
312
336
|
selector.nest($item, $selector)
|
|
@@ -326,6 +350,7 @@
|
|
|
326
350
|
@if $alias {
|
|
327
351
|
@if $modifier {
|
|
328
352
|
$aliases: ();
|
|
353
|
+
|
|
329
354
|
@each $item in selector.parse($modifier) {
|
|
330
355
|
$aliases: list.join(
|
|
331
356
|
$aliases,
|
|
@@ -414,7 +439,7 @@
|
|
|
414
439
|
$blocks: &;
|
|
415
440
|
}
|
|
416
441
|
|
|
417
|
-
@if type-of(map.get($map, $key)) == 'map' {
|
|
442
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
418
443
|
@each $state, $value in map.get($map, $key) {
|
|
419
444
|
@if list.index(
|
|
420
445
|
(
|
|
@@ -428,6 +453,7 @@
|
|
|
428
453
|
disabled,
|
|
429
454
|
checked,
|
|
430
455
|
checked-within,
|
|
456
|
+
multiple,
|
|
431
457
|
selected,
|
|
432
458
|
readonly,
|
|
433
459
|
empty,
|
|
@@ -514,7 +540,14 @@
|
|
|
514
540
|
'#{$modifier}#{$alias}:not(:has(*:placeholder-shown))'
|
|
515
541
|
);
|
|
516
542
|
}
|
|
517
|
-
} @else if
|
|
543
|
+
} @else if
|
|
544
|
+
$state ==
|
|
545
|
+
'disabled' or
|
|
546
|
+
$state ==
|
|
547
|
+
'readonly' or
|
|
548
|
+
$state ==
|
|
549
|
+
'multiple'
|
|
550
|
+
{
|
|
518
551
|
$selectors: list.join(
|
|
519
552
|
$selectors,
|
|
520
553
|
'#{$modifier}#{$block-item}[#{$state}]'
|
|
@@ -677,10 +710,12 @@
|
|
|
677
710
|
@if not $original {
|
|
678
711
|
$original: $map;
|
|
679
712
|
}
|
|
713
|
+
|
|
680
714
|
@if not $block {
|
|
681
715
|
$block: &;
|
|
682
716
|
}
|
|
683
|
-
|
|
717
|
+
|
|
718
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
684
719
|
@each $breakpoint, $value in map.get($map, $key) {
|
|
685
720
|
@if string.index($breakpoint, '-') {
|
|
686
721
|
$operator: list.nth(string.split($breakpoint, '-'), 1);
|
|
@@ -704,6 +739,7 @@
|
|
|
704
739
|
}
|
|
705
740
|
}
|
|
706
741
|
}
|
|
742
|
+
|
|
707
743
|
@if $operator == 'down' {
|
|
708
744
|
@include wrap-with-where(
|
|
709
745
|
$selector: '#{$modifier}#{$block}',
|
|
@@ -721,6 +757,7 @@
|
|
|
721
757
|
}
|
|
722
758
|
}
|
|
723
759
|
}
|
|
760
|
+
|
|
724
761
|
@if map.has-key($bps, $operator) {
|
|
725
762
|
@include wrap-with-where(
|
|
726
763
|
$selector: '#{$modifier}#{$block}',
|
|
@@ -810,10 +847,13 @@
|
|
|
810
847
|
xxs: 0,
|
|
811
848
|
)
|
|
812
849
|
) {
|
|
813
|
-
@if type-of($map) == 'map' and $prefix != '' {
|
|
850
|
+
@if meta.type-of($map) == 'map' and $prefix != '' {
|
|
814
851
|
@each $key, $value in $map {
|
|
815
852
|
@if not list.index($ignore, $key) {
|
|
816
|
-
@if type-of($value) ==
|
|
853
|
+
@if meta.type-of($value) ==
|
|
854
|
+
'map' and
|
|
855
|
+
($deep or $key == 'pseudo')
|
|
856
|
+
{
|
|
817
857
|
$original: map.get($original, $key);
|
|
818
858
|
|
|
819
859
|
@if not $original {
|
|
@@ -823,9 +863,10 @@
|
|
|
823
863
|
@if $postfix != '' {
|
|
824
864
|
$key: #{$postfix}-#{$key};
|
|
825
865
|
}
|
|
866
|
+
|
|
826
867
|
@if $key == 'pseudo' {
|
|
827
868
|
@each $pseudo-element, $pseudo-map in $value {
|
|
828
|
-
@if type-of($pseudo-map) == 'map' {
|
|
869
|
+
@if meta.type-of($pseudo-map) == 'map' {
|
|
829
870
|
@if list.index(
|
|
830
871
|
(
|
|
831
872
|
before,
|
|
@@ -844,6 +885,8 @@
|
|
|
844
885
|
datetime-edit,
|
|
845
886
|
datetime-edit-fields-wrapper,
|
|
846
887
|
datetime-edit-day-field,
|
|
888
|
+
backdrop,
|
|
889
|
+
file-selector-button,
|
|
847
890
|
-webkit-progress-bar,
|
|
848
891
|
-webkit-progress-value,
|
|
849
892
|
-webkit-inner-element,
|
|
@@ -851,7 +894,9 @@
|
|
|
851
894
|
-moz-progress-value,
|
|
852
895
|
-moz-inner-element,
|
|
853
896
|
-webkit-details-marker,
|
|
854
|
-
-webkit-scrollbar
|
|
897
|
+
-webkit-scrollbar,
|
|
898
|
+
-webkit-scrollbar-track,
|
|
899
|
+
-webkit-scrollbar-thumb
|
|
855
900
|
),
|
|
856
901
|
$pseudo-element
|
|
857
902
|
)
|
|
@@ -904,7 +949,7 @@
|
|
|
904
949
|
);
|
|
905
950
|
}
|
|
906
951
|
} @else if
|
|
907
|
-
type-of($value) !=
|
|
952
|
+
meta.type-of($value) !=
|
|
908
953
|
'map' and
|
|
909
954
|
(string.slice(meta.inspect($key), 1, 1) != '_')
|
|
910
955
|
{
|
|
@@ -933,9 +978,15 @@
|
|
|
933
978
|
$prop-to-replace-with: #{$prop-to-replace-with}-#{$key};
|
|
934
979
|
|
|
935
980
|
@if map.get($original, $key) {
|
|
936
|
-
|
|
981
|
+
& {
|
|
982
|
+
#{$prop-to-replace}: var(
|
|
983
|
+
#{$prop-to-replace-with}
|
|
984
|
+
);
|
|
985
|
+
}
|
|
937
986
|
} @else {
|
|
938
|
-
|
|
987
|
+
& {
|
|
988
|
+
#{$key}: var(#{$prop-to-replace-with});
|
|
989
|
+
}
|
|
939
990
|
}
|
|
940
991
|
} @else {
|
|
941
992
|
@if string.slice(meta.inspect($key), 1, 1) == '[' {
|
|
@@ -946,7 +997,9 @@
|
|
|
946
997
|
);
|
|
947
998
|
}
|
|
948
999
|
|
|
949
|
-
|
|
1000
|
+
& {
|
|
1001
|
+
#{$key}: $value;
|
|
1002
|
+
}
|
|
950
1003
|
}
|
|
951
1004
|
}
|
|
952
1005
|
}
|
|
@@ -956,9 +1009,10 @@
|
|
|
956
1009
|
|
|
957
1010
|
// Wrap selector with :where()
|
|
958
1011
|
@mixin wrap-with-where($selector, $enabled: true) {
|
|
959
|
-
@if type-of($selector) == 'map' or type-of($selector) == 'list' {
|
|
1012
|
+
@if meta.type-of($selector) == 'map' or meta.type-of($selector) == 'list' {
|
|
960
1013
|
$selector: #{$selector};
|
|
961
1014
|
}
|
|
1015
|
+
|
|
962
1016
|
@if $enabled {
|
|
963
1017
|
$selector: ':where(#{unquote($selector)})';
|
|
964
1018
|
}
|
|
@@ -988,7 +1042,7 @@
|
|
|
988
1042
|
$custom-transitions: false,
|
|
989
1043
|
$bps: (xxs: 0)
|
|
990
1044
|
) {
|
|
991
|
-
@if type-of($map) == 'map' and $block != '' {
|
|
1045
|
+
@if meta.type-of($map) == 'map' and $block != '' {
|
|
992
1046
|
$selector: '.' + $block;
|
|
993
1047
|
|
|
994
1048
|
// custom props
|
|
@@ -1016,6 +1070,7 @@
|
|
|
1016
1070
|
// content
|
|
1017
1071
|
@content;
|
|
1018
1072
|
}
|
|
1073
|
+
|
|
1019
1074
|
@include wrap-with-where(
|
|
1020
1075
|
$selector: $selector,
|
|
1021
1076
|
$enabled: $zero-specificity
|
|
@@ -1119,12 +1174,13 @@
|
|
|
1119
1174
|
@if not $block {
|
|
1120
1175
|
$block: &;
|
|
1121
1176
|
}
|
|
1122
|
-
|
|
1177
|
+
|
|
1178
|
+
@if meta.type-of(map.get($map, $key)) == 'map' {
|
|
1123
1179
|
@each $transition, $states in map.get($map, $key) {
|
|
1124
1180
|
@each $state, $value in $states {
|
|
1125
1181
|
@if $state in [ 'enter-from', 'enter-active', 'enter-to',
|
|
1126
1182
|
'leave-from', 'leave-active', 'leave-to', 'active',
|
|
1127
|
-
'inert'] and type-of($value) == 'map'
|
|
1183
|
+
'inert'] and meta.type-of($value) == 'map'
|
|
1128
1184
|
{
|
|
1129
1185
|
$selector: '.#{$transition}';
|
|
1130
1186
|
|
|
@@ -1178,6 +1234,21 @@
|
|
|
1178
1234
|
$bps: $bps
|
|
1179
1235
|
);
|
|
1180
1236
|
}
|
|
1237
|
+
|
|
1238
|
+
// map breakpoints
|
|
1239
|
+
@if map.get($value, 'breakpoint') {
|
|
1240
|
+
@include spread-map-into-breakpoints(
|
|
1241
|
+
$original: $map,
|
|
1242
|
+
$map: $value,
|
|
1243
|
+
$prefix: #{$prefix}-#{$key}-#{$transition}-#{$state},
|
|
1244
|
+
$key: 'breakpoint',
|
|
1245
|
+
$block: $block,
|
|
1246
|
+
$modifier: $selector,
|
|
1247
|
+
$props: $props,
|
|
1248
|
+
$zero-specificity: $zero-specificity,
|
|
1249
|
+
$bps: $bps
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1181
1252
|
}
|
|
1182
1253
|
}
|
|
1183
1254
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// background-attachment
|
|
4
4
|
@include spread-map-into-utilities(
|
|
5
5
|
$map: $background-attachment,
|
|
6
|
-
$class:
|
|
6
|
+
$class: bg,
|
|
7
7
|
$attribute: 'background-attachment',
|
|
8
8
|
$zero-specificity: $zero-specificity-for-utilities
|
|
9
9
|
);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// background-clip
|
|
12
12
|
@include spread-map-into-utilities(
|
|
13
13
|
$map: $background-clip,
|
|
14
|
-
$class:
|
|
14
|
+
$class: bg-clip,
|
|
15
15
|
$attribute: 'background-clip',
|
|
16
16
|
$zero-specificity: $zero-specificity-for-utilities
|
|
17
17
|
);
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// background-origin
|
|
20
20
|
@include spread-map-into-utilities(
|
|
21
21
|
$map: $background-origin,
|
|
22
|
-
$class:
|
|
22
|
+
$class: bg-origin,
|
|
23
23
|
$attribute: 'background-origin',
|
|
24
24
|
$zero-specificity: $zero-specificity-for-utilities
|
|
25
25
|
);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// background-position
|
|
28
28
|
@include spread-map-into-utilities(
|
|
29
29
|
$map: $background-position,
|
|
30
|
-
$class:
|
|
30
|
+
$class: bg,
|
|
31
31
|
$attribute: 'background-position',
|
|
32
32
|
$zero-specificity: $zero-specificity-for-utilities
|
|
33
33
|
);
|
|
@@ -53,5 +53,15 @@
|
|
|
53
53
|
$map: $background-image,
|
|
54
54
|
$class: bg,
|
|
55
55
|
$attribute: background-image,
|
|
56
|
+
$prop: bg,
|
|
57
|
+
$zero-specificity: $zero-specificity-for-utilities
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// background gradients
|
|
61
|
+
@include spread-map-into-utilities(
|
|
62
|
+
$map: $gradient,
|
|
63
|
+
$class: bg-gradient,
|
|
64
|
+
$attribute: background-image,
|
|
65
|
+
$prop: gradient,
|
|
56
66
|
$zero-specificity: $zero-specificity-for-utilities
|
|
57
67
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
// flex direction
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
%#{$prefix}#{$postfix} {
|
|
35
36
|
#{$prop}: #{$value};
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
@include wrap-with-where(
|
|
38
40
|
$selector: '.#{$prefix}#{$postfix}',
|
|
39
41
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
$default: null;
|
|
58
60
|
|
|
59
61
|
// check if value is not a map (spacing-dynamic)
|
|
60
|
-
@if type-of($value) != 'map' {
|
|
62
|
+
@if meta.type-of($value) != 'map' {
|
|
61
63
|
$default: $value;
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
%gap-#{$size} {
|
|
68
70
|
gap: #{$var};
|
|
69
71
|
}
|
|
72
|
+
|
|
70
73
|
@include wrap-with-where(
|
|
71
74
|
$selector: '.gap-#{$size}',
|
|
72
75
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -78,6 +81,7 @@
|
|
|
78
81
|
%gap-x-#{$size} {
|
|
79
82
|
column-gap: #{$var};
|
|
80
83
|
}
|
|
84
|
+
|
|
81
85
|
@include wrap-with-where(
|
|
82
86
|
$selector: '.gap-x-#{$size}',
|
|
83
87
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -89,6 +93,7 @@
|
|
|
89
93
|
%gap-y-#{$size} {
|
|
90
94
|
row-gap: #{$var};
|
|
91
95
|
}
|
|
96
|
+
|
|
92
97
|
@include wrap-with-where(
|
|
93
98
|
$selector: '.gap-y-#{$size}',
|
|
94
99
|
$enabled: $zero-specificity-for-utilities
|
package/src/utilities/index.scss
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../context' as *;
|
|
3
3
|
|
|
4
|
-
//
|
|
4
|
+
// cursor
|
|
5
5
|
@include spread-map-into-utilities(
|
|
6
6
|
$map: $cursor,
|
|
7
7
|
$class: cursor,
|
|
8
8
|
$attribute: cursor,
|
|
9
9
|
$zero-specificity: $zero-specificity-for-utilities
|
|
10
10
|
);
|
|
11
|
+
|
|
12
|
+
// pointer events
|
|
13
|
+
@include spread-map-into-utilities(
|
|
14
|
+
$map: $pointer-events,
|
|
15
|
+
$class: pointer-events,
|
|
16
|
+
$attribute: pointer-events,
|
|
17
|
+
$zero-specificity: $zero-specificity-for-utilities
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// user select
|
|
21
|
+
@include spread-map-into-utilities(
|
|
22
|
+
$map: $user-select,
|
|
23
|
+
$class: user-select,
|
|
24
|
+
$attribute: user-select,
|
|
25
|
+
$zero-specificity: $zero-specificity-for-utilities
|
|
26
|
+
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
// aspect
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
$attribute: display,
|
|
64
65
|
$zero-specificity: $zero-specificity-for-utilities
|
|
65
66
|
);
|
|
66
|
-
|
|
67
67
|
@include spread-map-into-utilities(
|
|
68
68
|
$map: $display-with-breakpoints,
|
|
69
69
|
$attribute: display,
|
|
@@ -135,10 +135,12 @@
|
|
|
135
135
|
$value in map.merge($placement, map.merge($spacing, $spacing-dynamic))
|
|
136
136
|
{
|
|
137
137
|
$var: $value;
|
|
138
|
-
|
|
138
|
+
|
|
139
|
+
@if not map.has-key($placement, $size) {
|
|
139
140
|
// check if value is not a map (spacing-dynamic)
|
|
140
141
|
$var: var(--spacing-#{$size});
|
|
141
|
-
|
|
142
|
+
|
|
143
|
+
@if meta.type-of($value) != 'map' {
|
|
142
144
|
$var: var(--spacing-#{$size}, #{$value});
|
|
143
145
|
}
|
|
144
146
|
}
|
|
@@ -147,6 +149,7 @@
|
|
|
147
149
|
%inset-#{$size} {
|
|
148
150
|
inset: #{$var};
|
|
149
151
|
}
|
|
152
|
+
|
|
150
153
|
@include wrap-with-where(
|
|
151
154
|
$selector: '.inset-#{$size}',
|
|
152
155
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -158,6 +161,7 @@
|
|
|
158
161
|
%inset-x-#{$size} {
|
|
159
162
|
inset-inline: #{$var};
|
|
160
163
|
}
|
|
164
|
+
|
|
161
165
|
@include wrap-with-where(
|
|
162
166
|
$selector: '.inset-x-#{$size}',
|
|
163
167
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -169,6 +173,7 @@
|
|
|
169
173
|
%inset-y-#{$size} {
|
|
170
174
|
inset-block: #{$var};
|
|
171
175
|
}
|
|
176
|
+
|
|
172
177
|
@include wrap-with-where(
|
|
173
178
|
$selector: '.inset-y-#{$size}',
|
|
174
179
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -181,6 +186,7 @@
|
|
|
181
186
|
%#{$direction}-#{$size} {
|
|
182
187
|
#{$direction}: #{$var};
|
|
183
188
|
}
|
|
189
|
+
|
|
184
190
|
@include wrap-with-where(
|
|
185
191
|
$selector: '.#{$direction}-#{$size}',
|
|
186
192
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../context' as *;
|
|
3
3
|
|
|
4
|
-
// width / height / max-width / max-height
|
|
4
|
+
// width / height / max-width / max-height / min-width / min-height
|
|
5
5
|
@each $class,
|
|
6
|
-
$attribute
|
|
6
|
+
$attribute
|
|
7
|
+
in(
|
|
8
|
+
w: width,
|
|
9
|
+
h: height,
|
|
10
|
+
max-w: max-width,
|
|
11
|
+
max-h: max-height,
|
|
12
|
+
min-w: min-width,
|
|
13
|
+
min-h: min-height
|
|
14
|
+
)
|
|
7
15
|
{
|
|
8
16
|
@include spread-map-into-utilities(
|
|
9
17
|
$map: map.merge($spacing, $spacing-dynamic),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use '../context' as *;
|
|
3
4
|
|
|
4
5
|
@each $prefix, $prop in (m: margin, p: padding, n: margin) {
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
$var: var(--spacing-#{$size});
|
|
7
8
|
|
|
8
9
|
// check if value is not a map (spacing-dynamic)
|
|
9
|
-
@if type-of($value) != 'map' {
|
|
10
|
+
@if meta.type-of($value) != 'map' {
|
|
10
11
|
$var: var(--spacing-#{$size}, #{$value});
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
%#{$prefix}#{$size} {
|
|
20
21
|
#{$prop}: #{$var};
|
|
21
22
|
}
|
|
23
|
+
|
|
22
24
|
@include wrap-with-where(
|
|
23
25
|
$selector: '.#{$prefix}-#{$size}',
|
|
24
26
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -30,6 +32,7 @@
|
|
|
30
32
|
%#{$prefix}x-#{$size} {
|
|
31
33
|
#{$prop}-inline: #{$var};
|
|
32
34
|
}
|
|
35
|
+
|
|
33
36
|
@include wrap-with-where(
|
|
34
37
|
$selector: '.#{$prefix}x-#{$size}',
|
|
35
38
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
%#{$prefix}y-#{$size} {
|
|
42
45
|
#{$prop}-block: #{$var};
|
|
43
46
|
}
|
|
47
|
+
|
|
44
48
|
@include wrap-with-where(
|
|
45
49
|
$selector: '.#{$prefix}y-#{$size}',
|
|
46
50
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -55,6 +59,7 @@
|
|
|
55
59
|
%#{$prefix}#{$direction-prefix}-#{$size} {
|
|
56
60
|
#{$prop}-#{$direction}: #{$var};
|
|
57
61
|
}
|
|
62
|
+
|
|
58
63
|
@include wrap-with-where(
|
|
59
64
|
$selector: '.#{$prefix}#{$direction-prefix}-#{$size}',
|
|
60
65
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -69,6 +74,7 @@
|
|
|
69
74
|
%m-auto {
|
|
70
75
|
margin: auto;
|
|
71
76
|
}
|
|
77
|
+
|
|
72
78
|
@include wrap-with-where(
|
|
73
79
|
$selector: '.m-auto',
|
|
74
80
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -79,6 +85,7 @@
|
|
|
79
85
|
%mx-auto {
|
|
80
86
|
margin-inline: auto;
|
|
81
87
|
}
|
|
88
|
+
|
|
82
89
|
@include wrap-with-where(
|
|
83
90
|
$selector: '.mx-auto',
|
|
84
91
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -89,6 +96,7 @@
|
|
|
89
96
|
%my-auto {
|
|
90
97
|
margin-block: auto;
|
|
91
98
|
}
|
|
99
|
+
|
|
92
100
|
@include wrap-with-where(
|
|
93
101
|
$selector: '.my-auto',
|
|
94
102
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -100,6 +108,7 @@
|
|
|
100
108
|
%m#{$direction-prefix}-auto {
|
|
101
109
|
margin-#{$direction}: auto;
|
|
102
110
|
}
|
|
111
|
+
|
|
103
112
|
@include wrap-with-where(
|
|
104
113
|
$selector: '.m#{$direction-prefix}-auto',
|
|
105
114
|
$enabled: $zero-specificity-for-utilities
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
%translate-x-#{$size} {
|
|
65
|
-
translate: #{$value};
|
|
65
|
+
translate: #{$value} 0;
|
|
66
66
|
}
|
|
67
67
|
@include wrap-with-where(
|
|
68
68
|
$selector: '.translate-x-#{$size}',
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
%-translate-x-#{$size} {
|
|
95
|
-
translate: -#{$value};
|
|
95
|
+
translate: -#{$value} 0;
|
|
96
96
|
}
|
|
97
97
|
@include wrap-with-where(
|
|
98
98
|
$selector: '.-translate-x-#{$size}',
|