@volverjs/style 0.1.23 → 0.1.24-beta.2

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 (140) hide show
  1. package/README.md +30 -0
  2. package/dist/base.css +1 -1
  3. package/dist/components/vv-accordion.css +1 -1
  4. package/dist/components/vv-alert.css +1 -1
  5. package/dist/components/vv-badge.css +1 -1
  6. package/dist/components/vv-button.css +1 -1
  7. package/dist/components/vv-card.css +1 -1
  8. package/dist/components/vv-checkbox.css +1 -1
  9. package/dist/components/vv-dialog.css +1 -1
  10. package/dist/components/vv-dropdown-action.css +1 -1
  11. package/dist/components/vv-dropdown-option.css +1 -1
  12. package/dist/components/vv-dropdown.css +1 -1
  13. package/dist/components/vv-input-file.css +1 -1
  14. package/dist/components/vv-input-text.css +1 -1
  15. package/dist/components/vv-nav.css +1 -1
  16. package/dist/components/vv-radio.css +1 -1
  17. package/dist/components/vv-select.css +1 -1
  18. package/dist/components/vv-text.css +1 -1
  19. package/dist/components/vv-tooltip.css +1 -1
  20. package/dist/components.css +1 -1
  21. package/dist/export.css +1 -1
  22. package/dist/props/breakpoints.css +1 -1
  23. package/dist/props/colors.css +1 -1
  24. package/dist/props/effects.css +1 -1
  25. package/dist/props/spacing.css +1 -1
  26. package/dist/props/transitions.css +1 -1
  27. package/dist/props/typography.css +1 -1
  28. package/dist/props.css +1 -1
  29. package/dist/themes/dark/components.css +1 -1
  30. package/dist/themes/dark/props.css +1 -1
  31. package/dist/themes/dark/volver.css +1 -1
  32. package/dist/utilities/borders.css +1 -1
  33. package/dist/utilities/colors.css +1 -1
  34. package/dist/utilities/effects.css +1 -1
  35. package/dist/utilities/flexbox.css +1 -1
  36. package/dist/utilities/grid.css +1 -1
  37. package/dist/utilities/layout.css +1 -1
  38. package/dist/utilities/sizing.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 +17 -17
  43. package/src/_config.scss +12 -0
  44. package/src/_layers.scss +4 -0
  45. package/src/_preflight.scss +2 -0
  46. package/src/components/vv-accordion-group.scss +4 -1
  47. package/src/components/vv-accordion.scss +4 -1
  48. package/src/components/vv-alert-group.scss +4 -1
  49. package/src/components/vv-alert.scss +4 -1
  50. package/src/components/vv-avatar-group.scss +4 -1
  51. package/src/components/vv-avatar.scss +4 -1
  52. package/src/components/vv-badge.scss +4 -1
  53. package/src/components/vv-breadcrumb.scss +4 -1
  54. package/src/components/vv-button-group.scss +4 -1
  55. package/src/components/vv-button.scss +5 -2
  56. package/src/components/vv-card.scss +4 -1
  57. package/src/components/vv-checkbox-group.scss +4 -1
  58. package/src/components/vv-checkbox.scss +4 -1
  59. package/src/components/vv-dialog.scss +4 -1
  60. package/src/components/vv-dropdown-action.scss +4 -1
  61. package/src/components/vv-dropdown-optgroup.scss +4 -1
  62. package/src/components/vv-dropdown-option.scss +4 -1
  63. package/src/components/vv-dropdown.scss +4 -1
  64. package/src/components/vv-input-file.scss +4 -1
  65. package/src/components/vv-input-text.scss +4 -1
  66. package/src/components/vv-nav.scss +4 -1
  67. package/src/components/vv-progress.scss +4 -1
  68. package/src/components/vv-radio-group.scss +4 -1
  69. package/src/components/vv-radio.scss +4 -1
  70. package/src/components/vv-select.scss +4 -1
  71. package/src/components/vv-skeleton.scss +4 -1
  72. package/src/components/vv-tab.scss +4 -1
  73. package/src/components/vv-table.scss +4 -1
  74. package/src/components/vv-text.scss +4 -1
  75. package/src/components/vv-textarea.scss +4 -1
  76. package/src/components/vv-tooltip.scss +6 -8
  77. package/src/export.scss +0 -1
  78. package/src/props/background.scss +5 -3
  79. package/src/props/borders.scss +5 -3
  80. package/src/props/breakpoints.scss +11 -9
  81. package/src/props/colors.scss +4 -2
  82. package/src/props/effects.scss +5 -3
  83. package/src/props/filters.scss +6 -4
  84. package/src/props/input.scss +4 -2
  85. package/src/props/layout.scss +5 -3
  86. package/src/props/sizing.scss +5 -3
  87. package/src/props/spacing.scss +18 -16
  88. package/src/props/transitions.scss +150 -118
  89. package/src/props/typography.scss +26 -24
  90. package/src/reset.scss +4 -0
  91. package/src/settings/_colors.scss +80 -50
  92. package/src/settings/_effects.scss +7 -7
  93. package/src/settings/components/_vv-badge.scss +2 -10
  94. package/src/settings/components/_vv-button.scss +1 -1
  95. package/src/settings/components/_vv-card.scss +3 -17
  96. package/src/settings/components/_vv-dialog.scss +1 -0
  97. package/src/settings/components/_vv-nav.scss +1 -6
  98. package/src/settings/components/_vv-text.scss +1 -0
  99. package/src/themes/dark/components/_vv-alert.scss +15 -10
  100. package/src/themes/dark/components/_vv-avatar.scss +15 -10
  101. package/src/themes/dark/components/_vv-badge.scss +15 -10
  102. package/src/themes/dark/components/_vv-button.scss +15 -10
  103. package/src/themes/dark/components/_vv-dropdown-action.scss +15 -10
  104. package/src/themes/dark/components/_vv-dropdown-option.scss +15 -10
  105. package/src/themes/dark/components/_vv-nav.scss +15 -10
  106. package/src/themes/dark/components/_vv-select.scss +15 -10
  107. package/src/themes/dark/props/_background.scss +3 -0
  108. package/src/themes/dark/props/_colors.scss +3 -0
  109. package/src/themes/dark/props/_input.scss +3 -0
  110. package/src/themes/dark/settings/_colors.scss +42 -28
  111. package/src/themes/dark/settings/components/_vv-alert.scss +23 -0
  112. package/src/themes/dark/settings/components/_vv-avatar.scss +3 -0
  113. package/src/themes/dark/settings/components/_vv-button.scss +0 -1
  114. package/src/tools/_breakpoints.scss +20 -4
  115. package/src/tools/_functions.scss +157 -0
  116. package/src/tools/_mixins.scss +5 -1216
  117. package/src/tools/mixin-modules/_attrs.scss +178 -0
  118. package/src/tools/mixin-modules/_bem.scss +751 -0
  119. package/src/tools/mixin-modules/_helpers.scss +23 -0
  120. package/src/tools/mixin-modules/_index.scss +25 -0
  121. package/src/tools/mixin-modules/_layers.scss +42 -0
  122. package/src/tools/mixin-modules/_props.scss +41 -0
  123. package/src/tools/mixin-modules/_theme.scss +373 -0
  124. package/src/tools/mixin-modules/_utilities.scss +121 -0
  125. package/src/utilities/backgrounds.scss +3 -0
  126. package/src/utilities/borders.scss +3 -0
  127. package/src/utilities/colors.scss +3 -0
  128. package/src/utilities/effects.scss +3 -0
  129. package/src/utilities/filters.scss +3 -0
  130. package/src/utilities/flexbox.scss +3 -0
  131. package/src/utilities/grid.scss +3 -0
  132. package/src/utilities/interactivity.scss +3 -0
  133. package/src/utilities/layout.scss +3 -0
  134. package/src/utilities/sizing.scss +3 -0
  135. package/src/utilities/spacing.scss +3 -0
  136. package/src/utilities/tables.scss +3 -0
  137. package/src/utilities/transforms.scss +11 -6
  138. package/src/utilities/transitions.scss +3 -0
  139. package/src/utilities/typography.scss +3 -0
  140. package/src/volver.scss +2 -1
@@ -0,0 +1,751 @@
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+ @use 'sass:meta';
4
+ @use 'sass:selector';
5
+ @use 'sass:string';
6
+ @use '../functions' as *;
7
+ @use '../breakpoints' as *;
8
+ @use 'helpers' as *;
9
+ @use 'props' as *;
10
+ @use 'attrs' as *;
11
+
12
+ // ============================================
13
+ // BEM Mixins
14
+ // Generate BEM-structured CSS from maps
15
+ // ============================================
16
+
17
+ // List of valid CSS states
18
+ $-valid-states: (
19
+ active, focus, hover, focus-within, target, visited, focus-visible,
20
+ disabled, checked, checked-within, multiple, selected, readonly,
21
+ empty, placeholder-shown, dirty, valid, invalid, indeterminate,
22
+ first-child, last-child, open, close, determinate, pressed, current
23
+ );
24
+
25
+ // ============================================
26
+ // Main BEM mixin
27
+ // ============================================
28
+
29
+ // Transform a map into complete BEM structure
30
+ // @param {Map} $map - Component configuration map
31
+ // @param {String} $block - Block name (e.g., 'vv-button')
32
+ // @param {String} $elements-key - Key for elements in map
33
+ // @param {String} $modifiers-key - Key for modifiers in map
34
+ // @param {String} $states-key - Key for states in map
35
+ // @param {String} $breakpoints-key - Key for breakpoints in map
36
+ // @param {String} $transitions-key - Key for transitions in map
37
+ // @param {Bool} $use-custom-props - Whether to use CSS custom properties
38
+ // @param {Bool} $zero-specificity - Whether to wrap in :where()
39
+ // @param {Bool} $custom-* - Flags to skip specific parts
40
+ // @param {Map} $bps - Breakpoints map
41
+ @mixin spread-map-into-bem(
42
+ $map,
43
+ $block: '',
44
+ $elements-key: 'element',
45
+ $modifiers-key: 'modifier',
46
+ $states-key: 'state',
47
+ $breakpoints-key: 'breakpoint',
48
+ $transitions-key: 'transition',
49
+ $use-custom-props: true,
50
+ $zero-specificity: true,
51
+ $custom-props: false,
52
+ $custom-block: false,
53
+ $custom-elements: false,
54
+ $custom-modifiers: false,
55
+ $custom-states: false,
56
+ $custom-breakpoints: false,
57
+ $custom-transitions: false,
58
+ $bps: (xxs: 0)
59
+ ) {
60
+ @if meta.type-of($map) == 'map' and $block != '' {
61
+ $selector: '.' + $block;
62
+
63
+ // custom props
64
+ @if not $custom-props {
65
+ @if $use-custom-props {
66
+ :where(:host, :root, .theme) {
67
+ @include spread-map-into-props(
68
+ $map: $map,
69
+ $prefix: $block,
70
+ $deep: true
71
+ );
72
+ }
73
+ }
74
+ }
75
+
76
+ // block
77
+ @if not $custom-block {
78
+ %#{$block} {
79
+ @include spread-map-into-attrs(
80
+ $map: $map,
81
+ $prefix: $block,
82
+ $use-custom-props: $use-custom-props
83
+ );
84
+
85
+ @content;
86
+ }
87
+
88
+ @include wrap-with-where($selector: $selector, $enabled: $zero-specificity) {
89
+ @extend %#{$block};
90
+ }
91
+ } @else {
92
+ @content;
93
+ }
94
+
95
+ // elements
96
+ @if not $custom-elements {
97
+ @if map.has-key($map, $elements-key) {
98
+ @include spread-map-into-elements(
99
+ $map: $map,
100
+ $prefix: $block,
101
+ $key: $elements-key,
102
+ $block: $selector,
103
+ $use-custom-props: $use-custom-props,
104
+ $zero-specificity: $zero-specificity,
105
+ $bps: $bps
106
+ );
107
+ }
108
+ }
109
+
110
+ // states
111
+ @if not $custom-states {
112
+ @if map.has-key($map, $states-key) {
113
+ @include spread-map-into-states(
114
+ $map: $map,
115
+ $prefix: $block,
116
+ $key: $states-key,
117
+ $block: $selector,
118
+ $use-custom-props: $use-custom-props,
119
+ $zero-specificity: $zero-specificity,
120
+ $bps: $bps
121
+ );
122
+ }
123
+ }
124
+
125
+ // modifiers
126
+ @if not $custom-modifiers {
127
+ @if map.has-key($map, $modifiers-key) {
128
+ @include spread-map-into-modifiers(
129
+ $map: $map,
130
+ $prefix: $block,
131
+ $key: $modifiers-key,
132
+ $block: $selector,
133
+ $use-custom-props: $use-custom-props,
134
+ $zero-specificity: $zero-specificity,
135
+ $bps: $bps
136
+ );
137
+ }
138
+ }
139
+
140
+ // transitions
141
+ @if not $custom-transitions {
142
+ @if map.has-key($map, $transitions-key) {
143
+ @include spread-map-into-transitions(
144
+ $map: $map,
145
+ $prefix: $block,
146
+ $key: $transitions-key,
147
+ $block: $selector,
148
+ $use-custom-props: $use-custom-props,
149
+ $zero-specificity: $zero-specificity,
150
+ $bps: $bps
151
+ );
152
+ }
153
+ }
154
+
155
+ // breakpoints
156
+ @if not $custom-breakpoints {
157
+ @if map.has-key($map, $breakpoints-key) {
158
+ @include spread-map-into-breakpoints(
159
+ $map: $map,
160
+ $prefix: $block,
161
+ $key: $breakpoints-key,
162
+ $block: $selector,
163
+ $use-custom-props: $use-custom-props,
164
+ $zero-specificity: $zero-specificity,
165
+ $bps: $bps
166
+ );
167
+ }
168
+ }
169
+ }
170
+ }
171
+
172
+ // ============================================
173
+ // Modifiers
174
+ // ============================================
175
+
176
+ @mixin spread-map-into-modifiers(
177
+ $original: null,
178
+ $map: (),
179
+ $prefix: '',
180
+ $key: 'modifier',
181
+ $block: null,
182
+ $modifier: '',
183
+ $use-custom-props: true,
184
+ $zero-specificity: true,
185
+ $bps: (xxs: 0)
186
+ ) {
187
+ @if not $original {
188
+ $original: $map;
189
+ }
190
+
191
+ @if not $block {
192
+ $block: &;
193
+ }
194
+
195
+ @if meta.type-of(map.get($map, $key)) == 'map' {
196
+ @each $item, $value in map.get($map, $key) {
197
+ $selector: $block + '--' + $item;
198
+
199
+ %#{$prefix + '--' + $item} {
200
+ @include spread-map-into-attrs(
201
+ $original: $original,
202
+ $map: $value,
203
+ $prefix: $prefix,
204
+ $variant: #{$key}-#{$item},
205
+ $deep: true,
206
+ $ignore: ('state', 'breakpoint', 'element', 'modifier'),
207
+ $use-custom-props: $use-custom-props
208
+ );
209
+ }
210
+
211
+ @include wrap-with-where(
212
+ $selector: $modifier + $selector + $block,
213
+ $enabled: $zero-specificity
214
+ ) {
215
+ @extend %#{$prefix + '--' + $item};
216
+ }
217
+
218
+ // map elements
219
+ @if map.get($value, 'element') {
220
+ @include spread-map-into-elements(
221
+ $original: $original,
222
+ $map: $value,
223
+ $prefix: #{$prefix}-#{$key}-#{$item},
224
+ $key: 'element',
225
+ $block: $block,
226
+ $modifier: $modifier + $selector,
227
+ $use-custom-props: $use-custom-props,
228
+ $zero-specificity: $zero-specificity,
229
+ $bps: $bps
230
+ );
231
+ }
232
+
233
+ // map states
234
+ @if map.get($value, 'state') {
235
+ @include spread-map-into-states(
236
+ $original: $original,
237
+ $map: $value,
238
+ $prefix: #{$prefix}-#{$key}-#{$item},
239
+ $key: 'state',
240
+ $block: $block,
241
+ $modifier: $modifier + $selector,
242
+ $use-custom-props: $use-custom-props,
243
+ $zero-specificity: $zero-specificity,
244
+ $bps: $bps
245
+ );
246
+ }
247
+
248
+ // map breakpoints
249
+ @if map.get($value, 'breakpoint') {
250
+ @include spread-map-into-breakpoints(
251
+ $map: $value,
252
+ $prefix: #{$prefix}-#{$key}-#{$item},
253
+ $key: 'breakpoint',
254
+ $block: $block,
255
+ $modifier: $modifier + $selector,
256
+ $use-custom-props: $use-custom-props,
257
+ $zero-specificity: $zero-specificity,
258
+ $bps: $bps
259
+ );
260
+ }
261
+
262
+ // nested modifiers
263
+ @if map.get($value, 'modifier') {
264
+ @include spread-map-into-modifiers(
265
+ $original: $original,
266
+ $map: $value,
267
+ $prefix: #{$prefix}-#{$key}-#{$item},
268
+ $key: 'modifier',
269
+ $block: $block,
270
+ $modifier: $modifier + $selector,
271
+ $use-custom-props: $use-custom-props,
272
+ $zero-specificity: $zero-specificity,
273
+ $bps: $bps
274
+ );
275
+ }
276
+ }
277
+ }
278
+ }
279
+
280
+ // ============================================
281
+ // Elements
282
+ // ============================================
283
+
284
+ @mixin spread-map-into-elements(
285
+ $original: (),
286
+ $map: (),
287
+ $prefix: '',
288
+ $key: 'element',
289
+ $block: null,
290
+ $modifier: null,
291
+ $use-custom-props: true,
292
+ $zero-specificity: true,
293
+ $bps: (xxs: 0)
294
+ ) {
295
+ @if not $block {
296
+ $block: &;
297
+ }
298
+
299
+ @if meta.type-of(map.get($map, $key)) == 'map' {
300
+ @each $element, $value in map.get($map, $key) {
301
+ $selector: $block + '__' + $element;
302
+
303
+ // combinator
304
+ $combinator: map.get($value, '_combinator');
305
+
306
+ @if not $combinator {
307
+ $combinator: map.get($original, $key, $element, '_combinator');
308
+ }
309
+
310
+ @if $modifier {
311
+ $selectors: ();
312
+
313
+ @each $item in selector.parse($modifier) {
314
+ @if $combinator {
315
+ $item: '#{$item} #{$combinator}';
316
+ }
317
+
318
+ $selectors: list.join($selectors, selector.nest($item, $selector));
319
+ }
320
+
321
+ $selector: list-to-string($selectors);
322
+ }
323
+
324
+ // alias
325
+ $alias: map.get($value, '_alias');
326
+
327
+ @if not $alias {
328
+ $alias: map.get($original, $key, $element, '_alias');
329
+ }
330
+
331
+ @if $alias {
332
+ @if $modifier {
333
+ $aliases: ();
334
+
335
+ @each $item in selector.parse($modifier) {
336
+ $aliases: list.join($aliases, selector.nest($item, $alias));
337
+ }
338
+
339
+ $alias: list-to-string($aliases);
340
+ } @else {
341
+ $alias: $block + ' ' + $alias;
342
+ }
343
+ }
344
+
345
+ %#{$prefix + '__' + $element} {
346
+ @include spread-map-into-attrs(
347
+ $map: $value,
348
+ $prefix: $prefix,
349
+ $variant: #{$key}-#{$element},
350
+ $deep: true,
351
+ $ignore: ('state', 'breakpoint'),
352
+ $use-custom-props: $use-custom-props
353
+ );
354
+ }
355
+
356
+ @include wrap-with-where(
357
+ $selector: list-to-string(($selector, $alias)),
358
+ $enabled: $zero-specificity
359
+ ) {
360
+ @extend %#{$prefix + '__' + $element};
361
+ }
362
+
363
+ // states
364
+ @if map.get($value, 'state') {
365
+ @include spread-map-into-states(
366
+ $map: $value,
367
+ $prefix: #{$prefix}-#{$key}-#{$element},
368
+ $key: 'state',
369
+ $block: $selector,
370
+ $alias: $alias,
371
+ $use-custom-props: $use-custom-props,
372
+ $zero-specificity: $zero-specificity,
373
+ $bps: $bps
374
+ );
375
+ }
376
+
377
+ // breakpoints
378
+ @if map.get($value, 'breakpoint') {
379
+ @include spread-map-into-breakpoints(
380
+ $map: $value,
381
+ $prefix: #{$prefix}-#{$key}-#{$element},
382
+ $key: 'breakpoint',
383
+ $block: list-to-string(($selector, $alias)),
384
+ $use-custom-props: $use-custom-props,
385
+ $zero-specificity: $zero-specificity,
386
+ $bps: $bps
387
+ );
388
+ }
389
+ }
390
+ }
391
+ }
392
+
393
+ // ============================================
394
+ // States
395
+ // ============================================
396
+
397
+ @mixin spread-map-into-states(
398
+ $original: null,
399
+ $map: (),
400
+ $prefix: '',
401
+ $key: 'state',
402
+ $block: null,
403
+ $modifier: '',
404
+ $alias: null,
405
+ $use-custom-props: true,
406
+ $zero-specificity: true,
407
+ $bps: (xxs: 0)
408
+ ) {
409
+ @if not $original {
410
+ $original: $map;
411
+ }
412
+
413
+ @if not $block {
414
+ $block: &;
415
+ }
416
+
417
+ @if meta.type-of(map.get($map, $key)) == 'map' {
418
+ @each $state, $value in map.get($map, $key) {
419
+ @if list.index($-valid-states, $state) {
420
+ $selectors: ();
421
+
422
+ @each $block-item in selector.parse($block) {
423
+ $selectors: list.join(
424
+ $selectors,
425
+ ('#{$modifier}#{$block-item}--#{$state}', '#{$modifier}#{$block-item}.#{$state}')
426
+ );
427
+
428
+ @if $alias {
429
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}.#{$state}');
430
+ }
431
+
432
+ // Special state handling - use function to get updated selectors
433
+ $selectors: -add-state-selectors(
434
+ $state: $state,
435
+ $block-item: $block-item,
436
+ $modifier: $modifier,
437
+ $alias: $alias,
438
+ $selectors: $selectors
439
+ );
440
+ }
441
+
442
+ $selector: list-to-string($selectors);
443
+
444
+ %#{$prefix + '--' + $state} {
445
+ @include spread-map-into-attrs(
446
+ $original: $original,
447
+ $map: $value,
448
+ $prefix: $prefix,
449
+ $variant: #{$key}-#{$state},
450
+ $ignore: ('element'),
451
+ $deep: true,
452
+ $use-custom-props: $use-custom-props
453
+ );
454
+ }
455
+
456
+ @include wrap-with-where($selector: $selector, $enabled: $zero-specificity) {
457
+ @extend %#{$prefix + '--' + $state};
458
+ }
459
+
460
+ // map elements
461
+ @if map.get($value, 'element') {
462
+ @include spread-map-into-elements(
463
+ $original: $original,
464
+ $map: $value,
465
+ $prefix: #{$prefix}-#{$key}-#{$state},
466
+ $key: 'element',
467
+ $block: $block,
468
+ $modifier: $selector,
469
+ $use-custom-props: $use-custom-props,
470
+ $zero-specificity: $zero-specificity,
471
+ $bps: $bps
472
+ );
473
+ }
474
+
475
+ // breakpoints
476
+ @if map.get($value, 'breakpoint') {
477
+ @include spread-map-into-breakpoints(
478
+ $original: $original,
479
+ $map: $value,
480
+ $prefix: #{$prefix}-#{$key}-#{$state},
481
+ $key: 'breakpoint',
482
+ $block: $block,
483
+ $modifier: $selector,
484
+ $use-custom-props: $use-custom-props,
485
+ $zero-specificity: $zero-specificity,
486
+ $bps: $bps
487
+ );
488
+ }
489
+ }
490
+ }
491
+ }
492
+ }
493
+
494
+ // Helper to add state-specific selectors
495
+ // Returns the updated selectors list
496
+ @function -add-state-selectors($state, $block-item, $modifier, $alias, $selectors) {
497
+ @if $state == 'checked-within' {
498
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}:has(input:checked)');
499
+
500
+ @if $alias {
501
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}:has(input:checked)');
502
+ }
503
+ } @else if $state == 'open' {
504
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}[open]');
505
+
506
+ @if $alias {
507
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}[open]');
508
+ }
509
+ } @else if $state == 'close' {
510
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}:not([open])');
511
+
512
+ @if $alias {
513
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}:not([open])');
514
+ }
515
+ } @else if $state == 'dirty' {
516
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}:not(:has(*:placeholder-shown))');
517
+
518
+ @if $alias {
519
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}:not(:has(*:placeholder-shown))');
520
+ }
521
+ } @else if $state == 'disabled' or $state == 'readonly' or $state == 'multiple' {
522
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}[#{$state}]');
523
+
524
+ @if $alias {
525
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}[#{$state}]');
526
+ }
527
+
528
+ @if $state == 'disabled' {
529
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}[aria-disabled="true"]');
530
+
531
+ @if $alias {
532
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}[aria-disabled="true"]');
533
+ }
534
+ }
535
+ } @else if $state == 'focus-visible' {
536
+ $selectors: list.join(
537
+ $selectors,
538
+ '#{$modifier}#{$block-item}:not(:active):not([disabled]):not([tabindex="-1"]):not([aria-disabled="true"]):#{$state}'
539
+ );
540
+
541
+ @if $alias {
542
+ $selectors: list.join(
543
+ $selectors,
544
+ '#{$modifier}#{$alias}:not(:active):not([disabled]):not([tabindex="-1"]):not([aria-disabled="true"]):#{$state}'
545
+ );
546
+ }
547
+ } @else if $state == 'checked' {
548
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}:#{$state}');
549
+
550
+ @if $alias {
551
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}:#{$state}');
552
+ }
553
+ } @else if $state == 'pressed' {
554
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}[aria-pressed="true"]');
555
+
556
+ @if $alias {
557
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}[aria-pressed="true"]');
558
+ }
559
+ } @else if $state == 'selected' {
560
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}[aria-selected="true"]');
561
+
562
+ @if $alias {
563
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}[aria-selected="true"]');
564
+ }
565
+ } @else if $state != 'current' {
566
+ $selectors: list.join($selectors, '#{$modifier}#{$block-item}:not([disabled]):#{$state}');
567
+
568
+ @if $alias {
569
+ $selectors: list.join($selectors, '#{$modifier}#{$alias}:not([disabled]):#{$state}');
570
+ }
571
+ }
572
+
573
+ @return $selectors;
574
+ }
575
+
576
+ // ============================================
577
+ // Breakpoints
578
+ // ============================================
579
+
580
+ @mixin spread-map-into-breakpoints(
581
+ $original: null,
582
+ $map: (),
583
+ $prefix: '',
584
+ $key: 'breakpoint',
585
+ $block: null,
586
+ $modifier: '',
587
+ $use-custom-props: true,
588
+ $zero-specificity: true,
589
+ $bps: (xxs: 0)
590
+ ) {
591
+ @if not $original {
592
+ $original: $map;
593
+ }
594
+
595
+ @if not $block {
596
+ $block: &;
597
+ }
598
+
599
+ @if meta.type-of(map.get($map, $key)) == 'map' {
600
+ @each $breakpoint, $value in map.get($map, $key) {
601
+ @if string.index($breakpoint, '-') {
602
+ $operator: list.nth(string.split($breakpoint, '-'), 1);
603
+ $bp: list.nth(string.split($breakpoint, '-'), 2);
604
+
605
+ @if map.has-key($bps, $bp) {
606
+ @if $operator == 'up' {
607
+ @include wrap-with-where($selector: '#{$modifier}#{$block}', $enabled: $zero-specificity) {
608
+ @include media-breakpoint-up($bp, $bps) {
609
+ @include spread-map-into-attrs(
610
+ $original: $original,
611
+ $map: $value,
612
+ $prefix: $prefix,
613
+ $variant: #{$key}-#{$breakpoint},
614
+ $deep: true,
615
+ $use-custom-props: $use-custom-props
616
+ );
617
+ }
618
+ }
619
+ }
620
+
621
+ @if $operator == 'down' {
622
+ @include wrap-with-where($selector: '#{$modifier}#{$block}', $enabled: $zero-specificity) {
623
+ @include media-breakpoint-down($bp, $bps) {
624
+ @include spread-map-into-attrs(
625
+ $original: $original,
626
+ $map: $value,
627
+ $prefix: $prefix,
628
+ $variant: #{$key}-#{$breakpoint},
629
+ $deep: true,
630
+ $use-custom-props: $use-custom-props
631
+ );
632
+ }
633
+ }
634
+ }
635
+
636
+ @if map.has-key($bps, $operator) {
637
+ @include wrap-with-where($selector: '#{$modifier}#{$block}', $enabled: $zero-specificity) {
638
+ @include media-breakpoint-between($operator, $bp, $bps) {
639
+ @include spread-map-into-attrs(
640
+ $original: $original,
641
+ $map: $value,
642
+ $prefix: $prefix,
643
+ $variant: #{$key}-#{$breakpoint},
644
+ $deep: true,
645
+ $use-custom-props: $use-custom-props
646
+ );
647
+ }
648
+ }
649
+ }
650
+ }
651
+ } @else if map.has-key($bps, $breakpoint) {
652
+ @include wrap-with-where($selector: '#{$modifier}#{$block}', $enabled: $zero-specificity) {
653
+ @include media-breakpoint-up($breakpoint, $bps) {
654
+ @include spread-map-into-attrs(
655
+ $original: $original,
656
+ $map: $value,
657
+ $prefix: $prefix,
658
+ $variant: #{$key}-#{$breakpoint},
659
+ $deep: true,
660
+ $use-custom-props: $use-custom-props
661
+ );
662
+ }
663
+ }
664
+ }
665
+ }
666
+ }
667
+ }
668
+
669
+ // ============================================
670
+ // Transitions
671
+ // ============================================
672
+
673
+ @mixin spread-map-into-transitions(
674
+ $map: (),
675
+ $prefix: '',
676
+ $key: 'transition',
677
+ $block: null,
678
+ $use-custom-props: true,
679
+ $zero-specificity: true,
680
+ $bps: (xxs: 0)
681
+ ) {
682
+ @if not $block {
683
+ $block: &;
684
+ }
685
+
686
+ @if meta.type-of(map.get($map, $key)) == 'map' {
687
+ @each $transition, $states in map.get($map, $key) {
688
+ @each $state, $value in $states {
689
+ @if list.index(('enter-from', 'enter-active', 'enter-to', 'leave-from', 'leave-active', 'leave-to', 'active', 'inert'), $state) and
690
+ meta.type-of($value) == 'map'
691
+ {
692
+ $selector: '.#{$transition}';
693
+
694
+ @if $prefix != '' {
695
+ $selector: '.#{$prefix}--#{$transition}';
696
+ }
697
+
698
+ @if $state == 'active' {
699
+ $selector: ('#{$selector}-enter-active', '#{$selector}-leave-active');
700
+ } @else if $state == 'inert' {
701
+ $selector: ('#{$selector}-enter-from', '#{$selector}-leave-to');
702
+ } @else {
703
+ $selector: '#{$selector}-#{$state}';
704
+ }
705
+
706
+ @include wrap-with-where($selector, $enabled: $zero-specificity) {
707
+ @include spread-map-into-attrs(
708
+ $map: $value,
709
+ $prefix: $prefix,
710
+ $variant: #{$key}-#{$transition}-#{$state},
711
+ $deep: true,
712
+ $ignore: ('element'),
713
+ $use-custom-props: $use-custom-props,
714
+ $bps: $bps
715
+ );
716
+ }
717
+
718
+ // map elements
719
+ @if map.get($value, 'element') {
720
+ @include spread-map-into-elements(
721
+ $original: $map,
722
+ $map: $value,
723
+ $prefix: #{$prefix}-#{$key}-#{$transition}-#{$state},
724
+ $key: 'element',
725
+ $block: $block,
726
+ $modifier: $selector,
727
+ $use-custom-props: $use-custom-props,
728
+ $zero-specificity: $zero-specificity,
729
+ $bps: $bps
730
+ );
731
+ }
732
+
733
+ // map breakpoints
734
+ @if map.get($value, 'breakpoint') {
735
+ @include spread-map-into-breakpoints(
736
+ $original: $map,
737
+ $map: $value,
738
+ $prefix: #{$prefix}-#{$key}-#{$transition}-#{$state},
739
+ $key: 'breakpoint',
740
+ $block: $block,
741
+ $modifier: $selector,
742
+ $use-custom-props: $use-custom-props,
743
+ $zero-specificity: $zero-specificity,
744
+ $bps: $bps
745
+ );
746
+ }
747
+ }
748
+ }
749
+ }
750
+ }
751
+ }