@volverjs/style 0.1.25 → 0.1.27
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-alert.css +1 -1
- package/dist/components/vv-checkbox.css +1 -1
- package/dist/components/vv-dialog.css +1 -1
- package/dist/components/vv-input-range.css +1 -0
- package/dist/components/vv-tooltip.css +1 -1
- package/dist/components.css +1 -1
- package/dist/props/input.css +1 -1
- package/dist/props/layout.css +1 -1
- package/dist/props.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +23 -18
- package/src/_config.scss +1 -0
- package/src/components/index.scss +1 -0
- package/src/components/vv-input-file.scss +7 -83
- package/src/components/vv-input-range.scss +28 -0
- package/src/components/vv-input-text.scss +7 -83
- package/src/components/vv-select.scss +7 -83
- package/src/components/vv-textarea.scss +7 -83
- package/src/props/layout.scss +28 -0
- package/src/settings/_index.scss +1 -0
- package/src/settings/_input.scss +12 -0
- package/src/settings/components/_vv-alert.scss +4 -4
- package/src/settings/components/_vv-checkbox.scss +5 -3
- package/src/settings/components/_vv-dialog.scss +56 -3
- package/src/settings/components/_vv-input-range.scss +189 -0
- package/src/settings/components/_vv-tooltip.scss +10 -8
- package/src/tools/mixin-modules/_attrs.scss +28 -14
- package/src/tools/mixin-modules/_bem.scss +179 -8
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.27",
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">= 20.x"
|
|
30
30
|
},
|
|
@@ -37,24 +37,27 @@
|
|
|
37
37
|
"design-tokens.json"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
40
41
|
"@iconify/vue": "^5.0.1",
|
|
41
42
|
"@nabla/vite-plugin-eslint": "^3.0.1",
|
|
42
|
-
"@types/node": "^26.
|
|
43
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
44
|
-
"@vueuse/core": "^14.
|
|
43
|
+
"@types/node": "^26.4.1",
|
|
44
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
45
|
+
"@vueuse/core": "^14.4.0",
|
|
45
46
|
"@vueuse/head": "^2.0.0",
|
|
47
|
+
"eslint": "^10.10.0",
|
|
46
48
|
"eslint-config-prettier": "^10.1.8",
|
|
47
49
|
"eslint-plugin-prettier": "^5.5.6",
|
|
48
|
-
"eslint-plugin-vue": "^10.
|
|
50
|
+
"eslint-plugin-vue": "^10.11.0",
|
|
49
51
|
"glob": "^13.0.6",
|
|
52
|
+
"globals": "^17.12.0",
|
|
50
53
|
"icss-utils": "^5.1.0",
|
|
51
|
-
"markdown-it": "^15.0.
|
|
52
|
-
"markdown-it-anchor": "^
|
|
53
|
-
"markdown-it-prism": "^
|
|
54
|
-
"postcss": "^8.5.
|
|
54
|
+
"markdown-it": "^15.0.1",
|
|
55
|
+
"markdown-it-anchor": "^10.0.0",
|
|
56
|
+
"markdown-it-prism": "^4.0.0",
|
|
57
|
+
"postcss": "^8.5.28",
|
|
55
58
|
"postcss-html": "^2.0.0",
|
|
56
|
-
"postcss-preset-env": "^11.
|
|
57
|
-
"prettier": "^3.
|
|
59
|
+
"postcss-preset-env": "^11.5.2",
|
|
60
|
+
"prettier": "^3.9.6",
|
|
58
61
|
"prism-themes": "^1.9.0",
|
|
59
62
|
"prismjs": "^1.30.0",
|
|
60
63
|
"reduce-css-calc": "^2.1.8",
|
|
@@ -62,25 +65,25 @@
|
|
|
62
65
|
"remark-frontmatter": "^5.0.0",
|
|
63
66
|
"remark-gfm": "^4.0.1",
|
|
64
67
|
"remark-lint": "^10.0.1",
|
|
65
|
-
"sass-embedded": "^1.
|
|
66
|
-
"stylelint": "^17.
|
|
68
|
+
"sass-embedded": "^1.104.0",
|
|
69
|
+
"stylelint": "^17.15.0",
|
|
67
70
|
"stylelint-config-recommended-scss": "^17.0.1",
|
|
68
71
|
"stylelint-config-recommended-vue": "^2.0.0",
|
|
69
72
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
70
|
-
"unplugin-auto-import": "^21.
|
|
73
|
+
"unplugin-auto-import": "^21.1.0",
|
|
71
74
|
"unplugin-vue-components": "^32.1.0",
|
|
72
|
-
"vite": "^8.
|
|
75
|
+
"vite": "^8.2.2",
|
|
73
76
|
"vite-plugin-css-export": "^3.1.0",
|
|
74
77
|
"vite-plugin-handlebars": "^2.0.3",
|
|
75
78
|
"vite-plugin-markdown": "^2.2.0",
|
|
76
79
|
"vite-plugin-pages": "^0.33.3",
|
|
77
|
-
"vite-plugin-stylelint": "^6.
|
|
80
|
+
"vite-plugin-stylelint": "^6.3.0",
|
|
78
81
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
79
82
|
"vite-ssg": "^28.3.0",
|
|
80
83
|
"vite-ssg-sitemap": "^0.10.0",
|
|
81
|
-
"vue": "^3.5.
|
|
84
|
+
"vue": "^3.5.42",
|
|
82
85
|
"vue-live": "^2.5.4",
|
|
83
|
-
"vue-router": "^5.1
|
|
86
|
+
"vue-router": "^5.3.1"
|
|
84
87
|
},
|
|
85
88
|
"exports": {
|
|
86
89
|
".": "./dist/volver.css",
|
|
@@ -105,6 +108,7 @@
|
|
|
105
108
|
"./components/vv-dropdown-optgroup": "./dist/components/vv-dropdown-optgroup.css",
|
|
106
109
|
"./components/vv-dropdown-option": "./dist/components/vv-dropdown-option.css",
|
|
107
110
|
"./components/vv-input-file": "./dist/components/vv-input-file.css",
|
|
111
|
+
"./components/vv-input-range": "./dist/components/vv-input-range.css",
|
|
108
112
|
"./components/vv-input-text": "./dist/components/vv-input-text.css",
|
|
109
113
|
"./components/vv-nav": "./dist/components/vv-nav.css",
|
|
110
114
|
"./components/vv-progress": "./dist/components/vv-progress.css",
|
|
@@ -155,6 +159,7 @@
|
|
|
155
159
|
"./scss/components/vv-dropdown-optgroup": "./src/components/vv-dropdown-optgroup.scss",
|
|
156
160
|
"./scss/components/vv-dropdown-option": "./src/components/vv-dropdown-option.scss",
|
|
157
161
|
"./scss/components/vv-input-file": "./src/components/vv-input-file.scss",
|
|
162
|
+
"./scss/components/vv-input-range": "./src/components/vv-input-range.scss",
|
|
158
163
|
"./scss/components/vv-input-text": "./src/components/vv-input-text.scss",
|
|
159
164
|
"./scss/components/vv-nav": "./src/components/vv-nav.scss",
|
|
160
165
|
"./scss/components/vv-progress": "./src/components/vv-progress.scss",
|
package/src/_config.scss
CHANGED
|
@@ -46,6 +46,7 @@ $components-names: (
|
|
|
46
46
|
vv-dropdown-option: $components-prefix + -dropdown-option,
|
|
47
47
|
vv-dropdown: $components-prefix + -dropdown,
|
|
48
48
|
vv-input-file: $components-prefix + -input-file,
|
|
49
|
+
vv-input-range: $components-prefix + -input-range,
|
|
49
50
|
vv-input-text: $components-prefix + -input-text,
|
|
50
51
|
vv-nav: $components-prefix + -nav,
|
|
51
52
|
vv-progress: $components-prefix + -progress,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:list';
|
|
3
2
|
@use '../context' as *;
|
|
4
3
|
|
|
5
4
|
@include layer(components, $use-css-layers, $layer-prefix) {
|
|
6
5
|
$component-name: map.get($components-names, vv-input-file);
|
|
7
6
|
$component-map: $vv-input-file;
|
|
8
|
-
$component-selector: '.#{$component-name}';
|
|
9
7
|
|
|
10
8
|
@include spread-map-into-bem(
|
|
11
9
|
$map: $component-map,
|
|
@@ -16,86 +14,12 @@ $component-selector: '.#{$component-name}';
|
|
|
16
14
|
);
|
|
17
15
|
|
|
18
16
|
// disabled and readonly
|
|
19
|
-
@
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@extend %#{$component-name}--#{$state} !optional;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// element
|
|
30
|
-
@if map.get($component-map, 'state', $state, 'element') {
|
|
31
|
-
@each $element,
|
|
32
|
-
$map in map.get($component-map, 'state', $state, 'element')
|
|
33
|
-
{
|
|
34
|
-
$element-selector: (
|
|
35
|
-
'#{$selector} #{$component-selector}__#{$element}'
|
|
36
|
-
);
|
|
37
|
-
$alias: map.get($component-map, 'element', $element, '_alias');
|
|
38
|
-
|
|
39
|
-
@if $alias {
|
|
40
|
-
$element-selector: list.append(
|
|
41
|
-
$element-selector,
|
|
42
|
-
('#{$selector} #{$alias}')
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include wrap-with-where(
|
|
47
|
-
$selector: $element-selector,
|
|
48
|
-
$enabled: $zero-specificity-for-components
|
|
49
|
-
) {
|
|
50
|
-
@extend %#{$component-name}-state-#{$state}__#{$element}
|
|
51
|
-
!optional;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// element state
|
|
55
|
-
@each $elementState, $elementMap in map.get($map, 'state') {
|
|
56
|
-
@if $elementState {
|
|
57
|
-
$element-selector-state: ();
|
|
58
|
-
|
|
59
|
-
@each $item in $element-selector {
|
|
60
|
-
$element-selector-state: list.append(
|
|
61
|
-
$element-selector-state,
|
|
62
|
-
('#{$item}:#{$elementState}')
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include wrap-with-where(
|
|
67
|
-
$selector: $element-selector-state,
|
|
68
|
-
$enabled: $zero-specificity-for-components
|
|
69
|
-
) {
|
|
70
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$elementState}
|
|
71
|
-
!optional;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// element pseudo
|
|
77
|
-
@each $pseudo, $pseudoMap in map.get($map, 'pseudo') {
|
|
78
|
-
@if $pseudo {
|
|
79
|
-
$element-selector-pseudo: ();
|
|
80
|
-
|
|
81
|
-
@each $item in $element-selector {
|
|
82
|
-
$element-selector-pseudo: list.append(
|
|
83
|
-
$element-selector-pseudo,
|
|
84
|
-
('#{$item}::#{$pseudo}')
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@include wrap-with-where(
|
|
89
|
-
$selector: $element-selector-pseudo,
|
|
90
|
-
$enabled: $zero-specificity-for-components
|
|
91
|
-
) {
|
|
92
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$pseudo}
|
|
93
|
-
!optional;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
17
|
+
@include spread-map-into-control-states(
|
|
18
|
+
$map: $component-map,
|
|
19
|
+
$block: $component-name,
|
|
20
|
+
$control: 'input',
|
|
21
|
+
$states: ('disabled', 'readonly'),
|
|
22
|
+
$zero-specificity: $zero-specificity-for-components
|
|
23
|
+
);
|
|
100
24
|
|
|
101
25
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../context' as *;
|
|
3
|
+
|
|
4
|
+
@include layer(components, $use-css-layers, $layer-prefix) {
|
|
5
|
+
$component-name: map.get($components-names, vv-input-range);
|
|
6
|
+
$component-map: $vv-input-range;
|
|
7
|
+
|
|
8
|
+
@include spread-map-into-bem(
|
|
9
|
+
$map: $component-map,
|
|
10
|
+
$block: $component-name,
|
|
11
|
+
$use-custom-props: $use-custom-props-for-components,
|
|
12
|
+
$zero-specificity: $zero-specificity-for-components,
|
|
13
|
+
$bps: $breakpoints
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
// A range input has no readonly state in HTML, so `disabled` is the only
|
|
17
|
+
// attribute that can style the field without the modifier class, and the
|
|
18
|
+
// readonly modifier is what the field uses to undo that look.
|
|
19
|
+
@include spread-map-into-control-states(
|
|
20
|
+
$map: $component-map,
|
|
21
|
+
$block: $component-name,
|
|
22
|
+
$control: 'input',
|
|
23
|
+
$states: ('disabled'),
|
|
24
|
+
$except-modifiers: ('readonly'),
|
|
25
|
+
$zero-specificity: $zero-specificity-for-components
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:list';
|
|
3
2
|
@use '../context' as *;
|
|
4
3
|
|
|
5
4
|
@include layer(components, $use-css-layers, $layer-prefix) {
|
|
6
5
|
$component-name: map.get($components-names, vv-input-text);
|
|
7
6
|
$component-map: $vv-input-text;
|
|
8
|
-
$component-selector: '.#{$component-name}';
|
|
9
7
|
|
|
10
8
|
@include spread-map-into-bem(
|
|
11
9
|
$map: $component-map,
|
|
@@ -16,86 +14,12 @@ $component-selector: '.#{$component-name}';
|
|
|
16
14
|
);
|
|
17
15
|
|
|
18
16
|
// disabled and readonly
|
|
19
|
-
@
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@extend %#{$component-name}--#{$state} !optional;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// element
|
|
30
|
-
@if map.get($component-map, 'state', $state, 'element') {
|
|
31
|
-
@each $element,
|
|
32
|
-
$map in map.get($component-map, 'state', $state, 'element')
|
|
33
|
-
{
|
|
34
|
-
$element-selector: (
|
|
35
|
-
'#{$selector} #{$component-selector}__#{$element}'
|
|
36
|
-
);
|
|
37
|
-
$alias: map.get($component-map, 'element', $element, '_alias');
|
|
38
|
-
|
|
39
|
-
@if $alias {
|
|
40
|
-
$element-selector: list.append(
|
|
41
|
-
$element-selector,
|
|
42
|
-
('#{$selector} #{$alias}')
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include wrap-with-where(
|
|
47
|
-
$selector: $element-selector,
|
|
48
|
-
$enabled: $zero-specificity-for-components
|
|
49
|
-
) {
|
|
50
|
-
@extend %#{$component-name}-state-#{$state}__#{$element}
|
|
51
|
-
!optional;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// element state
|
|
55
|
-
@each $elementState, $elementMap in map.get($map, 'state') {
|
|
56
|
-
@if $elementState {
|
|
57
|
-
$element-selector-state: ();
|
|
58
|
-
|
|
59
|
-
@each $item in $element-selector {
|
|
60
|
-
$element-selector-state: list.append(
|
|
61
|
-
$element-selector-state,
|
|
62
|
-
('#{$item}:#{$elementState}')
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include wrap-with-where(
|
|
67
|
-
$selector: $element-selector-state,
|
|
68
|
-
$enabled: $zero-specificity-for-components
|
|
69
|
-
) {
|
|
70
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$elementState}
|
|
71
|
-
!optional;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// element pseudo
|
|
77
|
-
@each $pseudo, $pseudoMap in map.get($map, 'pseudo') {
|
|
78
|
-
@if $pseudo {
|
|
79
|
-
$element-selector-pseudo: ();
|
|
80
|
-
|
|
81
|
-
@each $item in $element-selector {
|
|
82
|
-
$element-selector-pseudo: list.append(
|
|
83
|
-
$element-selector-pseudo,
|
|
84
|
-
('#{$item}::#{$pseudo}')
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@include wrap-with-where(
|
|
89
|
-
$selector: $element-selector-pseudo,
|
|
90
|
-
$enabled: $zero-specificity-for-components
|
|
91
|
-
) {
|
|
92
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$pseudo}
|
|
93
|
-
!optional;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
17
|
+
@include spread-map-into-control-states(
|
|
18
|
+
$map: $component-map,
|
|
19
|
+
$block: $component-name,
|
|
20
|
+
$control: 'input',
|
|
21
|
+
$states: ('disabled', 'readonly'),
|
|
22
|
+
$zero-specificity: $zero-specificity-for-components
|
|
23
|
+
);
|
|
100
24
|
|
|
101
25
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:list';
|
|
3
2
|
@use '../context' as *;
|
|
4
3
|
|
|
5
4
|
@include layer(components, $use-css-layers, $layer-prefix) {
|
|
6
5
|
$component-name: map.get($components-names, vv-select);
|
|
7
6
|
$component-map: $vv-select;
|
|
8
|
-
$component-selector: '.#{ $component-name}';
|
|
9
7
|
|
|
10
8
|
@include spread-map-into-bem(
|
|
11
9
|
$map: $component-map,
|
|
@@ -16,86 +14,12 @@ $component-selector: '.#{ $component-name}';
|
|
|
16
14
|
);
|
|
17
15
|
|
|
18
16
|
// disabled
|
|
19
|
-
@
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@extend %#{$component-name}--#{$state} !optional;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// element
|
|
30
|
-
@if map.get($component-map, 'state', $state, 'element') {
|
|
31
|
-
@each $element,
|
|
32
|
-
$map in map.get($component-map, 'state', $state, 'element')
|
|
33
|
-
{
|
|
34
|
-
$element-selector: (
|
|
35
|
-
'#{$selector} #{$component-selector}__#{$element}'
|
|
36
|
-
);
|
|
37
|
-
$alias: map.get($component-map, 'element', $element, '_alias');
|
|
38
|
-
|
|
39
|
-
@if $alias {
|
|
40
|
-
$element-selector: list.append(
|
|
41
|
-
$element-selector,
|
|
42
|
-
('#{$selector} #{$alias}')
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include wrap-with-where(
|
|
47
|
-
$selector: $element-selector,
|
|
48
|
-
$enabled: $zero-specificity-for-components
|
|
49
|
-
) {
|
|
50
|
-
@extend %#{$component-name}-state-#{$state}__#{$element}
|
|
51
|
-
!optional;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// element state
|
|
55
|
-
@each $elementState, $elementMap in map.get($map, 'state') {
|
|
56
|
-
@if $elementState {
|
|
57
|
-
$element-selector-state: ();
|
|
58
|
-
|
|
59
|
-
@each $item in $element-selector {
|
|
60
|
-
$element-selector-state: list.append(
|
|
61
|
-
$element-selector-state,
|
|
62
|
-
('#{$item}:#{$elementState}')
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include wrap-with-where(
|
|
67
|
-
$selector: $element-selector-state,
|
|
68
|
-
$enabled: $zero-specificity-for-components
|
|
69
|
-
) {
|
|
70
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$elementState}
|
|
71
|
-
!optional;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// element pseudo
|
|
77
|
-
@each $pseudo, $pseudoMap in map.get($map, 'pseudo') {
|
|
78
|
-
@if $pseudo {
|
|
79
|
-
$element-selector-pseudo: ();
|
|
80
|
-
|
|
81
|
-
@each $item in $element-selector {
|
|
82
|
-
$element-selector-pseudo: list.append(
|
|
83
|
-
$element-selector-pseudo,
|
|
84
|
-
('#{$item}::#{$pseudo}')
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@include wrap-with-where(
|
|
89
|
-
$selector: $element-selector-pseudo,
|
|
90
|
-
$enabled: $zero-specificity-for-components
|
|
91
|
-
) {
|
|
92
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$pseudo}
|
|
93
|
-
!optional;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
17
|
+
@include spread-map-into-control-states(
|
|
18
|
+
$map: $component-map,
|
|
19
|
+
$block: $component-name,
|
|
20
|
+
$control: 'select',
|
|
21
|
+
$states: ('disabled'),
|
|
22
|
+
$zero-specificity: $zero-specificity-for-components
|
|
23
|
+
);
|
|
100
24
|
|
|
101
25
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:list';
|
|
3
2
|
@use '../context' as *;
|
|
4
3
|
|
|
5
4
|
@include layer(components, $use-css-layers, $layer-prefix) {
|
|
6
5
|
$component-name: map.get($components-names, vv-textarea);
|
|
7
6
|
$component-map: $vv-textarea;
|
|
8
|
-
$component-selector: '.#{ $component-name}';
|
|
9
7
|
|
|
10
8
|
@include spread-map-into-bem(
|
|
11
9
|
$map: $component-map,
|
|
@@ -16,86 +14,12 @@ $component-selector: '.#{ $component-name}';
|
|
|
16
14
|
);
|
|
17
15
|
|
|
18
16
|
// disabled and readonly
|
|
19
|
-
@
|
|
20
|
-
$
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@extend %#{$component-name}--#{$state} !optional;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// element
|
|
30
|
-
@if map.get($component-map, 'state', $state, 'element') {
|
|
31
|
-
@each $element,
|
|
32
|
-
$map in map.get($component-map, 'state', $state, 'element')
|
|
33
|
-
{
|
|
34
|
-
$element-selector: (
|
|
35
|
-
'#{$selector} #{$component-selector}__#{$element}'
|
|
36
|
-
);
|
|
37
|
-
$alias: map.get($component-map, 'element', $element, '_alias');
|
|
38
|
-
|
|
39
|
-
@if $alias {
|
|
40
|
-
$element-selector: list.append(
|
|
41
|
-
$element-selector,
|
|
42
|
-
('#{$selector} #{$alias}')
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include wrap-with-where(
|
|
47
|
-
$selector: $element-selector,
|
|
48
|
-
$enabled: $zero-specificity-for-components
|
|
49
|
-
) {
|
|
50
|
-
@extend %#{$component-name}-state-#{$state}__#{$element}
|
|
51
|
-
!optional;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// element state
|
|
55
|
-
@each $elementState, $elementMap in map.get($map, 'state') {
|
|
56
|
-
@if $elementState {
|
|
57
|
-
$element-selector-state: ();
|
|
58
|
-
|
|
59
|
-
@each $item in $element-selector {
|
|
60
|
-
$element-selector-state: list.append(
|
|
61
|
-
$element-selector-state,
|
|
62
|
-
('#{$item}:#{$elementState}')
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@include wrap-with-where(
|
|
67
|
-
$selector: $element-selector-state,
|
|
68
|
-
$enabled: $zero-specificity-for-components
|
|
69
|
-
) {
|
|
70
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$elementState}
|
|
71
|
-
!optional;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// element pseudo
|
|
77
|
-
@each $pseudo, $pseudoMap in map.get($map, 'pseudo') {
|
|
78
|
-
@if $pseudo {
|
|
79
|
-
$element-selector-pseudo: ();
|
|
80
|
-
|
|
81
|
-
@each $item in $element-selector {
|
|
82
|
-
$element-selector-pseudo: list.append(
|
|
83
|
-
$element-selector-pseudo,
|
|
84
|
-
('#{$item}::#{$pseudo}')
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@include wrap-with-where(
|
|
89
|
-
$selector: $element-selector-pseudo,
|
|
90
|
-
$enabled: $zero-specificity-for-components
|
|
91
|
-
) {
|
|
92
|
-
@extend %#{$component-name}-state-#{$state}-element-#{$element}--#{$pseudo}
|
|
93
|
-
!optional;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
17
|
+
@include spread-map-into-control-states(
|
|
18
|
+
$map: $component-map,
|
|
19
|
+
$block: $component-name,
|
|
20
|
+
$control: 'textarea',
|
|
21
|
+
$states: ('disabled', 'readonly'),
|
|
22
|
+
$zero-specificity: $zero-specificity-for-components
|
|
23
|
+
);
|
|
100
24
|
|
|
101
25
|
}
|
package/src/props/layout.scss
CHANGED
|
@@ -5,4 +5,32 @@
|
|
|
5
5
|
@include spread-map-into-props($map: $aspect-ratio, $prefix: aspect);
|
|
6
6
|
@include spread-map-into-props($map: $z-index, $prefix: z);
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
// Sign of the inline axis: 1 where it runs left to right, -1 where it runs
|
|
10
|
+
// the other way. CSS has logical properties for the box, but none for
|
|
11
|
+
// `translate`, `rotate` or `scale`, so a component that moves an element
|
|
12
|
+
// along the inline axis multiplies its offset by this instead of naming a
|
|
13
|
+
// physical direction.
|
|
14
|
+
|
|
15
|
+
// The default is declared on the document root alone, and not on the
|
|
16
|
+
// `:host` and `.theme` scopes the props above share: those sit inside the
|
|
17
|
+
// document and inherit a direction from their ancestors, so re-declaring
|
|
18
|
+
// the default there would replace it, and a themed section of a
|
|
19
|
+
// right-to-left document would move its components the other way. Nothing
|
|
20
|
+
// can be inherited at the root, so the default belongs there and nowhere
|
|
21
|
+
// else. Every declaration reading the token passes a `1` fallback anyway,
|
|
22
|
+
// so a cherry-picked component keeps working without this file.
|
|
23
|
+
:where(:root) {
|
|
24
|
+
--direction: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// The `dir` attribute rather than `:dir()`, so that an island of one
|
|
28
|
+
// direction inside a document of the other turns with its container.
|
|
29
|
+
:where([dir='rtl']) {
|
|
30
|
+
--direction: -1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where([dir='ltr']) {
|
|
34
|
+
--direction: 1;
|
|
35
|
+
}
|
|
8
36
|
}
|
package/src/settings/_index.scss
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
@forward 'components/vv-avatar';
|
|
40
40
|
@forward 'components/vv-avatar-group';
|
|
41
41
|
@forward 'components/vv-input-file';
|
|
42
|
+
@forward 'components/vv-input-range';
|
|
42
43
|
@forward 'components/vv-input-text';
|
|
43
44
|
@forward 'components/vv-nav';
|
|
44
45
|
@forward 'components/vv-progress';
|
package/src/settings/_input.scss
CHANGED
|
@@ -59,4 +59,16 @@ $input: (
|
|
|
59
59
|
translate: 0 -0.8em,
|
|
60
60
|
),
|
|
61
61
|
),
|
|
62
|
+
range: (
|
|
63
|
+
accent-color: var(--color-brand),
|
|
64
|
+
track-color: var(--color-surface-3),
|
|
65
|
+
track-height: var(--spacing-6),
|
|
66
|
+
thumb-size: var(--spacing-20),
|
|
67
|
+
thumb-shadow: var(--shadow-sm),
|
|
68
|
+
thumb-shadow-hover: 0 0 0 var(--spacing-4) var(--color-surface-brand),
|
|
69
|
+
// Share of the track that is filled. A range input exposes no such
|
|
70
|
+
// value to CSS, so the component writes it inline on the block and
|
|
71
|
+
// this default keeps static markup from breaking the gradient.
|
|
72
|
+
progress: 0%,
|
|
73
|
+
),
|
|
62
74
|
) !default;
|
|
@@ -338,11 +338,11 @@ $vv-alert: (
|
|
|
338
338
|
),
|
|
339
339
|
enter-from: (
|
|
340
340
|
opacity: var(--opacity-0),
|
|
341
|
-
translate: 100
|
|
341
|
+
[translate]: calc(100% * var(--direction, 1)),
|
|
342
342
|
),
|
|
343
343
|
leave-to: (
|
|
344
344
|
opacity: var(--opacity-0),
|
|
345
|
-
translate: 100
|
|
345
|
+
[translate]: calc(100% * var(--direction, 1)),
|
|
346
346
|
),
|
|
347
347
|
),
|
|
348
348
|
fade-inline-start: (
|
|
@@ -351,11 +351,11 @@ $vv-alert: (
|
|
|
351
351
|
),
|
|
352
352
|
enter-from: (
|
|
353
353
|
opacity: var(--opacity-0),
|
|
354
|
-
translate: -100
|
|
354
|
+
[translate]: calc(-100% * var(--direction, 1)),
|
|
355
355
|
),
|
|
356
356
|
leave-to: (
|
|
357
357
|
opacity: var(--opacity-0),
|
|
358
|
-
translate: -100
|
|
358
|
+
[translate]: calc(-100% * var(--direction, 1)),
|
|
359
359
|
),
|
|
360
360
|
),
|
|
361
361
|
fade-block-top: (
|
|
@@ -82,7 +82,8 @@ $vv-checkbox: (
|
|
|
82
82
|
height: var(--spacing-20),
|
|
83
83
|
border-radius: 50%,
|
|
84
84
|
position: absolute,
|
|
85
|
-
inset: var(--spacing-2) 0
|
|
85
|
+
inset-block: var(--spacing-2) 0,
|
|
86
|
+
inset-inline: var(--spacing-2) 0,
|
|
86
87
|
background: var(--color-white),
|
|
87
88
|
will-change: transform,
|
|
88
89
|
transition: var(--transition-transform),
|
|
@@ -99,7 +100,7 @@ $vv-checkbox: (
|
|
|
99
100
|
background-image: none,
|
|
100
101
|
pseudo: (
|
|
101
102
|
after: (
|
|
102
|
-
translate: 50
|
|
103
|
+
[translate]: calc(50% * var(--direction, 1)),
|
|
103
104
|
),
|
|
104
105
|
),
|
|
105
106
|
),
|
|
@@ -108,7 +109,8 @@ $vv-checkbox: (
|
|
|
108
109
|
background-color: var(--color-brand),
|
|
109
110
|
pseudo: (
|
|
110
111
|
after: (
|
|
111
|
-
translate:
|
|
112
|
+
[translate]:
|
|
113
|
+
calc(100% * var(--direction, 1)),
|
|
112
114
|
),
|
|
113
115
|
),
|
|
114
116
|
),
|