@volverjs/style 0.1.24-beta.4 → 0.1.25
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/dist/base.css +1 -1
- package/dist/components/vv-dropdown.css +1 -1
- package/dist/components.css +1 -1
- package/dist/export.css +1 -1
- package/dist/props/layout.css +1 -1
- package/dist/props.css +1 -1
- package/dist/utilities/layout.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +5 -5
- package/src/settings/_layout.scss +3 -1
- package/src/settings/components/_vv-dropdown.scss +14 -0
- package/src/tools/mixin-modules/_bem.scss +32 -70
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/volverjs/style/issues"
|
|
26
26
|
},
|
|
27
|
-
"version": "0.1.
|
|
27
|
+
"version": "0.1.25",
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">= 20.x"
|
|
30
30
|
},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@iconify/vue": "^5.0.1",
|
|
41
41
|
"@nabla/vite-plugin-eslint": "^3.0.1",
|
|
42
|
-
"@types/node": "^
|
|
42
|
+
"@types/node": "^26.0.0",
|
|
43
43
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
44
44
|
"@vueuse/core": "^14.3.0",
|
|
45
45
|
"@vueuse/head": "^2.0.0",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"eslint-plugin-vue": "^10.9.2",
|
|
49
49
|
"glob": "^13.0.6",
|
|
50
50
|
"icss-utils": "^5.1.0",
|
|
51
|
-
"markdown-it": "^
|
|
51
|
+
"markdown-it": "^15.0.0",
|
|
52
52
|
"markdown-it-anchor": "^9.2.0",
|
|
53
53
|
"markdown-it-prism": "^3.0.1",
|
|
54
54
|
"postcss": "^8.5.15",
|
|
55
|
-
"postcss-html": "^
|
|
55
|
+
"postcss-html": "^2.0.0",
|
|
56
56
|
"postcss-preset-env": "^11.3.1",
|
|
57
57
|
"prettier": "^3.8.4",
|
|
58
58
|
"prism-themes": "^1.9.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"sass-embedded": "^1.100.0",
|
|
66
66
|
"stylelint": "^17.13.0",
|
|
67
67
|
"stylelint-config-recommended-scss": "^17.0.1",
|
|
68
|
-
"stylelint-config-recommended-vue": "^
|
|
68
|
+
"stylelint-config-recommended-vue": "^2.0.0",
|
|
69
69
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
70
70
|
"unplugin-auto-import": "^21.0.0",
|
|
71
71
|
"unplugin-vue-components": "^32.1.0",
|
|
@@ -113,11 +113,13 @@ $visibility: (
|
|
|
113
113
|
) !default;
|
|
114
114
|
|
|
115
115
|
// z-index
|
|
116
|
+
// Floating layers (dropdown, popover, tooltip) sit above the app chrome
|
|
117
|
+
// (sticky, fixed): a menu anchored to a fixed header has to cover it.
|
|
116
118
|
$z-index: (
|
|
117
119
|
1: 1,
|
|
118
|
-
dropdown: 1000,
|
|
119
120
|
sticky: 1010,
|
|
120
121
|
fixed: 1020,
|
|
122
|
+
dropdown: 1025,
|
|
121
123
|
modal-backdrop: 1030,
|
|
122
124
|
modal: 1040,
|
|
123
125
|
confirm-backdrop: 1050,
|
|
@@ -7,6 +7,20 @@ $vv-dropdown: (
|
|
|
7
7
|
flex-direction: column,
|
|
8
8
|
box-shadow: var(--shadow-lg),
|
|
9
9
|
width: max-content,
|
|
10
|
+
state: (
|
|
11
|
+
// Neutralize the user agent styles applied to [popover] elements, so a
|
|
12
|
+
// dropdown promoted to the top layer keeps the coordinates it gets from
|
|
13
|
+
// its positioning library instead of being centered in the viewport
|
|
14
|
+
popover: (
|
|
15
|
+
inset: auto,
|
|
16
|
+
margin: 0,
|
|
17
|
+
padding: 0,
|
|
18
|
+
border: 0,
|
|
19
|
+
overflow: visible,
|
|
20
|
+
background: transparent,
|
|
21
|
+
color: inherit,
|
|
22
|
+
),
|
|
23
|
+
),
|
|
10
24
|
element: (
|
|
11
25
|
list: (
|
|
12
26
|
_alias: 'div:is([role="menu"],[role="list-box"])',
|
|
@@ -19,7 +19,31 @@ $-valid-states: (
|
|
|
19
19
|
active, focus, hover, focus-within, target, visited, focus-visible,
|
|
20
20
|
disabled, checked, checked-within, multiple, selected, readonly,
|
|
21
21
|
empty, placeholder-shown, dirty, valid, invalid, indeterminate,
|
|
22
|
-
first-child, last-child, open, close, determinate, pressed, current
|
|
22
|
+
first-child, last-child, open, close, determinate, pressed, current,
|
|
23
|
+
popover, popover-open
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// Selector suffixes appended to the block, and to its alias when there is one,
|
|
27
|
+
// for the states that are not plain pseudo-classes. A state can need more than
|
|
28
|
+
// one suffix: "disabled" also matches the aria attribute. States missing here
|
|
29
|
+
// fall back to ":not([disabled]):<state>", while "current" adds no suffix at
|
|
30
|
+
// all and keeps only the BEM selectors built by the caller.
|
|
31
|
+
$-state-suffixes: (
|
|
32
|
+
checked: ':checked',
|
|
33
|
+
checked-within: ':has(input:checked)',
|
|
34
|
+
close: ':not([open])',
|
|
35
|
+
dirty: ':not(:has(*:placeholder-shown))',
|
|
36
|
+
disabled: ('[disabled]', '[aria-disabled="true"]'),
|
|
37
|
+
focus-visible: ':not(:active):not([disabled]):not([tabindex="-1"]):not([aria-disabled="true"]):focus-visible',
|
|
38
|
+
multiple: '[multiple]',
|
|
39
|
+
open: '[open]',
|
|
40
|
+
// Element promoted to the top layer through the Popover API: "popover"
|
|
41
|
+
// matches it whether it is open or not, "popover-open" only when it is
|
|
42
|
+
popover: '[popover]',
|
|
43
|
+
popover-open: ':popover-open',
|
|
44
|
+
pressed: '[aria-pressed="true"]',
|
|
45
|
+
readonly: '[readonly]',
|
|
46
|
+
selected: '[aria-selected="true"]',
|
|
23
47
|
);
|
|
24
48
|
|
|
25
49
|
// ============================================
|
|
@@ -494,79 +518,17 @@ $-valid-states: (
|
|
|
494
518
|
// Helper to add state-specific selectors
|
|
495
519
|
// Returns the updated selectors list
|
|
496
520
|
@function -add-state-selectors($state, $block-item, $modifier, $alias, $selectors) {
|
|
497
|
-
@if $state == '
|
|
498
|
-
|
|
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"]');
|
|
521
|
+
@if $state == 'current' {
|
|
522
|
+
@return $selectors;
|
|
523
|
+
}
|
|
555
524
|
|
|
556
|
-
|
|
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"]');
|
|
525
|
+
$suffixes: map.get($-state-suffixes, $state) or ':not([disabled]):#{$state}';
|
|
561
526
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
} @else if $state != 'current' {
|
|
566
|
-
$selectors: list.join($selectors, '#{$modifier}#{$block-item}:not([disabled]):#{$state}');
|
|
527
|
+
@each $suffix in $suffixes {
|
|
528
|
+
$selectors: list.join($selectors, '#{$modifier}#{$block-item}#{$suffix}');
|
|
567
529
|
|
|
568
530
|
@if $alias {
|
|
569
|
-
$selectors: list.join($selectors, '#{$modifier}#{$alias}
|
|
531
|
+
$selectors: list.join($selectors, '#{$modifier}#{$alias}#{$suffix}');
|
|
570
532
|
}
|
|
571
533
|
}
|
|
572
534
|
|