@volverjs/style 0.1.12-beta.9 → 0.1.13

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 (82) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/dist/base.css +1 -1
  4. package/dist/components/vv-accordion-group.css +1 -1
  5. package/dist/components/vv-accordion.css +1 -1
  6. package/dist/components/vv-alert-group.css +1 -1
  7. package/dist/components/vv-alert.css +1 -1
  8. package/dist/components/vv-avatar.css +1 -1
  9. package/dist/components/vv-badge.css +1 -1
  10. package/dist/components/vv-breadcrumb.css +1 -1
  11. package/dist/components/vv-button-group.css +1 -1
  12. package/dist/components/vv-button.css +1 -1
  13. package/dist/components/vv-card.css +1 -1
  14. package/dist/components/vv-checkbox-group.css +1 -1
  15. package/dist/components/vv-checkbox.css +1 -1
  16. package/dist/components/vv-dialog.css +1 -1
  17. package/dist/components/vv-input-file.css +1 -1
  18. package/dist/components/vv-input-text.css +1 -1
  19. package/dist/components/vv-nav.css +1 -1
  20. package/dist/components/vv-radio-group.css +1 -1
  21. package/dist/components/vv-radio.css +1 -1
  22. package/dist/components/vv-select.css +1 -1
  23. package/dist/components/vv-textarea.css +1 -1
  24. package/dist/components/vv-tooltip.css +1 -1
  25. package/dist/components.css +1 -1
  26. package/dist/export.css +1 -1
  27. package/dist/props/background.css +1 -1
  28. package/dist/props/spacing.css +1 -1
  29. package/dist/props/transitions.css +1 -1
  30. package/dist/props/typography.css +1 -1
  31. package/dist/props.css +1 -1
  32. package/dist/themes/dark/props.css +1 -1
  33. package/dist/themes/dark/volver.css +1 -1
  34. package/dist/utilities/backgrounds.css +1 -1
  35. package/dist/utilities/effects.css +1 -1
  36. package/dist/utilities/interactivity.css +1 -1
  37. package/dist/utilities/sizing.css +1 -1
  38. package/dist/utilities/transforms.css +1 -1
  39. package/dist/utilities/typography.css +1 -1
  40. package/dist/utilities.css +1 -1
  41. package/dist/volver.css +1 -1
  42. package/package.json +34 -33
  43. package/src/_preflight.scss +21 -2
  44. package/src/components/vv-button-group.scss +6 -6
  45. package/src/components/vv-tooltip.scss +1 -1
  46. package/src/export.scss +16 -14
  47. package/src/props/breakpoints.scss +5 -4
  48. package/src/props/spacing.scss +2 -2
  49. package/src/props/typography.scss +3 -2
  50. package/src/settings/_colors.scss +11 -11
  51. package/src/settings/_effects.scss +3 -3
  52. package/src/settings/_interactivity.scss +14 -0
  53. package/src/settings/_typography.scss +9 -1
  54. package/src/settings/components/_vv-accordion-group.scss +2 -2
  55. package/src/settings/components/_vv-accordion.scss +2 -0
  56. package/src/settings/components/_vv-alert-group.scss +5 -2
  57. package/src/settings/components/_vv-alert.scss +1 -1
  58. package/src/settings/components/_vv-avatar-group.scss +1 -0
  59. package/src/settings/components/_vv-avatar.scss +12 -8
  60. package/src/settings/components/_vv-badge.scss +2 -0
  61. package/src/settings/components/_vv-breadcrumb.scss +1 -0
  62. package/src/settings/components/_vv-button.scss +1 -0
  63. package/src/settings/components/_vv-card.scss +2 -0
  64. package/src/settings/components/_vv-checkbox-group.scss +2 -0
  65. package/src/settings/components/_vv-checkbox.scss +6 -0
  66. package/src/settings/components/_vv-dialog.scss +1 -0
  67. package/src/settings/components/_vv-input-file.scss +32 -3
  68. package/src/settings/components/_vv-input-text.scss +4 -1
  69. package/src/settings/components/_vv-radio.scss +1 -0
  70. package/src/settings/components/_vv-select.scss +4 -1
  71. package/src/settings/components/_vv-textarea.scss +5 -1
  72. package/src/themes/dark/settings/_colors.scss +8 -8
  73. package/src/tools/_breakpoints.scss +64 -11
  74. package/src/tools/_functions.scss +100 -26
  75. package/src/tools/_mixins.scss +57 -21
  76. package/src/utilities/flexbox.scss +6 -1
  77. package/src/utilities/interactivity.scss +17 -1
  78. package/src/utilities/layout.scss +9 -3
  79. package/src/utilities/sizing.scss +10 -2
  80. package/src/utilities/spacing.scss +10 -1
  81. package/src/utilities/transforms.scss +2 -2
  82. package/src/utilities/typography.scss +11 -0
@@ -5,17 +5,55 @@
5
5
  @use 'sass:list';
6
6
  @use 'sass:math';
7
7
 
8
+ @function color-hue($color) {
9
+ @return color.channel($color, 'hue', $space: hsl);
10
+ }
11
+
12
+ @function color-saturation($color) {
13
+ @return color.channel($color, 'saturation', $space: hsl);
14
+ }
15
+
16
+ @function color-lightness($color) {
17
+ @return color.channel($color, 'lightness', $space: hsl);
18
+ }
19
+
20
+ @function color-alpha($color) {
21
+ @return color.channel($color, 'alpha');
22
+ }
23
+
24
+ @function color-hsla($color) {
25
+ @return hsla(
26
+ color-hue($color),
27
+ color.channel($color, 'saturation', $space: hsl),
28
+ color.channel($color, 'lightness', $space: hsl),
29
+ color.channel($color, 'alpha')
30
+ );
31
+ }
32
+
33
+ @function color-red($color) {
34
+ @return color.channel($color, 'red', $space: rgb);
35
+ }
36
+
37
+ @function color-green($color) {
38
+ @return color.channel($color, 'green', $space: rgb);
39
+ }
40
+
41
+ @function color-blue($color) {
42
+ @return color.channel($color, 'blue', $space: rgb);
43
+ }
44
+
8
45
  @function hsla-map($color, $name, $noVarExport: false) {
9
46
  @if $noVarExport {
10
47
  @return (
11
- #{$name}: hsla(color.hue($color), color.saturation($color), color.lightness($color), color.alpha($color))
48
+ #{$name}: hsla(color-hue($color), color.channel($color, 'saturation', $space:
49
+ hsl), color.channel($color, 'lightness', $space: hsl), color.channel($color, 'alpha'))
12
50
  );
13
51
  } @else {
14
52
  @return (
15
- hue: color.hue($color),
16
- saturation: color.saturation($color),
17
- lightness: color.lightness($color),
18
- #{$name}: hsla(var(--color-#{$name}-hue), var(--color-#{$name}-saturation), var(--color-#{$name}-lightness), color.alpha($color))
53
+ hue: color-hue($color),
54
+ saturation: color.channel($color, 'saturation', $space: hsl),
55
+ lightness: color.channel($color, 'lightness', $space: hsl),
56
+ #{$name}: hsla(var(--color-#{$name}-hue), var(--color-#{$name}-saturation), var(--color-#{$name}-lightness), color.channel($color, 'alpha'))
19
57
  );
20
58
  }
21
59
  }
@@ -24,9 +62,9 @@
24
62
  @if $noVarExport {
25
63
  @return (
26
64
  hsla(
27
- color.hue($color),
28
- color.saturation($color),
29
- color.lightness($color),
65
+ color-hue($color),
66
+ color.channel($color, 'saturation', $space: hsl),
67
+ color.channel($color, 'lightness', $space: hsl),
30
68
  $alpha
31
69
  )
32
70
  );
@@ -41,7 +79,9 @@
41
79
  }
42
80
 
43
81
  @function hex-to-rgb($hex) {
44
- @return red($hex), green($hex), blue($hex);
82
+ @return color.channel($hex, 'red', $space: rgb),
83
+ color.channel($hex, 'green', $space: rgb),
84
+ color.channel($hex, 'blue', $space: rgb);
45
85
  }
46
86
 
47
87
  @function color-alpha-map(
@@ -52,6 +92,7 @@
52
92
  $noVarExport: false
53
93
  ) {
54
94
  $result: hsla-map($color, $name, $noVarExport);
95
+
55
96
  @for $index from 1 to ($steps + 1) {
56
97
  $result: map.merge(
57
98
  $result,
@@ -61,6 +102,7 @@
61
102
  )
62
103
  );
63
104
  }
105
+
64
106
  @return $result;
65
107
  }
66
108
 
@@ -96,6 +138,7 @@
96
138
  $noVarExport
97
139
  )
98
140
  );
141
+
99
142
  @return $result;
100
143
  }
101
144
 
@@ -110,29 +153,38 @@
110
153
  $inverted: true
111
154
  ) {
112
155
  $result: hsla-map($color, $name, $noVarExport);
156
+
113
157
  @for $counter from 1 to ($steps + 1) {
114
158
  $index: $counter;
159
+
115
160
  @if $inverted {
116
161
  $index: $steps + 1 - $counter;
117
162
  }
118
163
 
119
164
  $key: $index;
165
+
120
166
  @if $prefix != '' {
121
167
  $key: $prefix + '-' + $index;
122
168
  }
123
169
 
124
170
  @if $fixed {
125
171
  $increment: $scale * $index;
172
+
126
173
  @if $noVarExport {
127
- $alpha: color.lightness($color) + $increment;
174
+ $alpha: color.channel($color, 'lightness', $space: hsl) +
175
+ $increment;
128
176
  $result: map.merge(
129
177
  $result,
130
178
  (
131
179
  #{$key}:
132
180
  hsla(
133
- color.hue($color),
134
- color.saturation($color),
135
- color.lightness($color),
181
+ color-hue($color),
182
+ color.channel(
183
+ $color,
184
+ 'saturation',
185
+ $space: hsl
186
+ ),
187
+ color.channel($color, 'lightness', $space: hsl),
136
188
  $alpha
137
189
  )
138
190
  )
@@ -157,16 +209,22 @@
157
209
  $increment: math.div($scale * $index, 100);
158
210
  $increment: math.div($increment, ($increment * 0 + 1));
159
211
  $increment: $increment + 1;
212
+
160
213
  @if $noVarExport {
161
- $alpha: color.lightness($color) * $increment;
214
+ $alpha: color.channel($color, 'lightness', $space: hsl) *
215
+ $increment;
162
216
  $result: map.merge(
163
217
  $result,
164
218
  (
165
219
  #{$key}:
166
220
  hsla(
167
- color.hue($color),
168
- color.saturation($color),
169
- color.lightness($color),
221
+ color-hue($color),
222
+ color.channel(
223
+ $color,
224
+ 'saturation',
225
+ $space: hsl
226
+ ),
227
+ color.channel($color, 'lightness', $space: hsl),
170
228
  $alpha
171
229
  )
172
230
  )
@@ -189,6 +247,7 @@
189
247
  }
190
248
  }
191
249
  }
250
+
192
251
  @return $result;
193
252
  }
194
253
 
@@ -206,27 +265,35 @@
206
265
 
207
266
  @for $counter from 1 to ($steps + 1) {
208
267
  $index: $counter;
268
+
209
269
  @if $inverted {
210
270
  $index: $steps + 1 - $counter;
211
271
  }
212
272
 
213
273
  $key: $index;
274
+
214
275
  @if $prefix != '' {
215
276
  $key: $prefix + '-' + $index;
216
277
  }
217
278
 
218
279
  @if $fixed {
219
280
  $decrement: $scale * $index;
281
+
220
282
  @if $noVarExport {
221
- $alpha: color.lightness($color) - $decrement;
283
+ $alpha: color.channel($color, 'lightness', $space: hsl) -
284
+ $decrement;
222
285
  $result: map.merge(
223
286
  $result,
224
287
  (
225
288
  #{$key}:
226
289
  hsla(
227
- color.hue($color),
228
- color.saturation($color),
229
- color.lightness($color),
290
+ color-hue($color),
291
+ color.channel(
292
+ $color,
293
+ 'saturation',
294
+ $space: hsl
295
+ ),
296
+ color.channel($color, 'lightness', $space: hsl),
230
297
  $alpha
231
298
  )
232
299
  )
@@ -251,16 +318,22 @@
251
318
  $decrement: math.div($scale * $index, 100);
252
319
  $decrement: math.div($decrement, ($decrement * 0 + 1));
253
320
  $decrement: 1 - $decrement;
321
+
254
322
  @if $noVarExport {
255
- $alpha: color.lightness($color) * $decrement;
323
+ $alpha: color.channel($color, 'lightness', $space: hsl) *
324
+ $decrement;
256
325
  $result: map.merge(
257
326
  $result,
258
327
  (
259
328
  #{$key}:
260
329
  hsla(
261
- color.hue($color),
262
- color.saturation($color),
263
- color.lightness($color),
330
+ color-hue($color),
331
+ color.channel(
332
+ $color,
333
+ 'saturation',
334
+ $space: hsl
335
+ ),
336
+ color.channel($color, 'lightness', $space: hsl),
264
337
  $alpha
265
338
  )
266
339
  )
@@ -283,6 +356,7 @@
283
356
  }
284
357
  }
285
358
  }
359
+
286
360
  @return $result;
287
361
  }
288
362
 
@@ -320,7 +394,7 @@
320
394
  @function list-to-string($list, $glue: ', ') {
321
395
  $result: null;
322
396
 
323
- @for $i from 1 through length($list) {
397
+ @for $i from 1 through list.length($list) {
324
398
  $e: list.nth($list, $i);
325
399
 
326
400
  @if $result and $e {
@@ -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 comparable($prev-num, $num) {
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 $attribute != ''
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
- @if type-of($value) == 'map' and $deep {
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
- @if type-of(map.get($map, $key)) == 'map' {
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
  (
@@ -685,10 +710,12 @@
685
710
  @if not $original {
686
711
  $original: $map;
687
712
  }
713
+
688
714
  @if not $block {
689
715
  $block: &;
690
716
  }
691
- @if type-of(map.get($map, $key)) == 'map' {
717
+
718
+ @if meta.type-of(map.get($map, $key)) == 'map' {
692
719
  @each $breakpoint, $value in map.get($map, $key) {
693
720
  @if string.index($breakpoint, '-') {
694
721
  $operator: list.nth(string.split($breakpoint, '-'), 1);
@@ -712,6 +739,7 @@
712
739
  }
713
740
  }
714
741
  }
742
+
715
743
  @if $operator == 'down' {
716
744
  @include wrap-with-where(
717
745
  $selector: '#{$modifier}#{$block}',
@@ -729,6 +757,7 @@
729
757
  }
730
758
  }
731
759
  }
760
+
732
761
  @if map.has-key($bps, $operator) {
733
762
  @include wrap-with-where(
734
763
  $selector: '#{$modifier}#{$block}',
@@ -818,10 +847,13 @@
818
847
  xxs: 0,
819
848
  )
820
849
  ) {
821
- @if type-of($map) == 'map' and $prefix != '' {
850
+ @if meta.type-of($map) == 'map' and $prefix != '' {
822
851
  @each $key, $value in $map {
823
852
  @if not list.index($ignore, $key) {
824
- @if type-of($value) == 'map' and ($deep or $key == 'pseudo') {
853
+ @if meta.type-of($value) ==
854
+ 'map' and
855
+ ($deep or $key == 'pseudo')
856
+ {
825
857
  $original: map.get($original, $key);
826
858
 
827
859
  @if not $original {
@@ -831,9 +863,10 @@
831
863
  @if $postfix != '' {
832
864
  $key: #{$postfix}-#{$key};
833
865
  }
866
+
834
867
  @if $key == 'pseudo' {
835
868
  @each $pseudo-element, $pseudo-map in $value {
836
- @if type-of($pseudo-map) == 'map' {
869
+ @if meta.type-of($pseudo-map) == 'map' {
837
870
  @if list.index(
838
871
  (
839
872
  before,
@@ -916,7 +949,7 @@
916
949
  );
917
950
  }
918
951
  } @else if
919
- type-of($value) !=
952
+ meta.type-of($value) !=
920
953
  'map' and
921
954
  (string.slice(meta.inspect($key), 1, 1) != '_')
922
955
  {
@@ -968,9 +1001,10 @@
968
1001
 
969
1002
  // Wrap selector with :where()
970
1003
  @mixin wrap-with-where($selector, $enabled: true) {
971
- @if type-of($selector) == 'map' or type-of($selector) == 'list' {
1004
+ @if meta.type-of($selector) == 'map' or meta.type-of($selector) == 'list' {
972
1005
  $selector: #{$selector};
973
1006
  }
1007
+
974
1008
  @if $enabled {
975
1009
  $selector: ':where(#{unquote($selector)})';
976
1010
  }
@@ -1000,7 +1034,7 @@
1000
1034
  $custom-transitions: false,
1001
1035
  $bps: (xxs: 0)
1002
1036
  ) {
1003
- @if type-of($map) == 'map' and $block != '' {
1037
+ @if meta.type-of($map) == 'map' and $block != '' {
1004
1038
  $selector: '.' + $block;
1005
1039
 
1006
1040
  // custom props
@@ -1028,6 +1062,7 @@
1028
1062
  // content
1029
1063
  @content;
1030
1064
  }
1065
+
1031
1066
  @include wrap-with-where(
1032
1067
  $selector: $selector,
1033
1068
  $enabled: $zero-specificity
@@ -1131,12 +1166,13 @@
1131
1166
  @if not $block {
1132
1167
  $block: &;
1133
1168
  }
1134
- @if type-of(map.get($map, $key)) == 'map' {
1169
+
1170
+ @if meta.type-of(map.get($map, $key)) == 'map' {
1135
1171
  @each $transition, $states in map.get($map, $key) {
1136
1172
  @each $state, $value in $states {
1137
1173
  @if $state in [ 'enter-from', 'enter-active', 'enter-to',
1138
1174
  'leave-from', 'leave-active', 'leave-to', 'active',
1139
- 'inert'] and type-of($value) == 'map'
1175
+ 'inert'] and meta.type-of($value) == 'map'
1140
1176
  {
1141
1177
  $selector: '.#{$transition}';
1142
1178
 
@@ -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
@@ -1,10 +1,26 @@
1
1
  @use 'sass:map';
2
2
  @use '../context' as *;
3
3
 
4
- // grid template columns
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
- @if not map-has-key($placement, $size) {
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
- @if type-of($value) != 'map' {
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 in(w: width, h: height, max-w: max-width, max-h: max-height)
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),