@alfalab/core-components-switch 4.5.4 → 4.5.6
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/Component.js +3 -3
- package/cssm/default.module.css +3 -0
- package/cssm/index.module.css +4 -1
- package/cssm/inverted.module.css +3 -0
- package/default.css +15 -12
- package/esm/Component.js +3 -3
- package/esm/default.css +15 -12
- package/esm/index.css +24 -21
- package/esm/inverted.css +15 -12
- package/index.css +24 -21
- package/inverted.css +15 -12
- package/modern/Component.js +3 -3
- package/modern/default.css +15 -12
- package/modern/index.css +24 -21
- package/modern/inverted.css +15 -12
- package/package.json +4 -4
package/Component.js
CHANGED
|
@@ -15,13 +15,13 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
15
15
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var defaultStyles = {"switch":"
|
|
18
|
+
var defaultStyles = {"switch":"switch__switch_95gov","label":"switch__label_95gov","hint":"switch__hint_95gov","checked":"switch__checked_95gov","disabled":"switch__disabled_95gov"};
|
|
19
19
|
require('./default.css')
|
|
20
20
|
|
|
21
|
-
var styles = {"component":"
|
|
21
|
+
var styles = {"component":"switch__component_agi88","start":"switch__start_agi88","center":"switch__center_agi88","addons":"switch__addons_agi88","block":"switch__block_agi88","switch":"switch__switch_agi88","content":"switch__content_agi88","label":"switch__label_agi88","errorMessage":"switch__errorMessage_agi88","hint":"switch__hint_agi88","reversed":"switch__reversed_agi88","checked":"switch__checked_agi88","disabled":"switch__disabled_agi88","focused":"switch__focused_agi88"};
|
|
22
22
|
require('./index.css')
|
|
23
23
|
|
|
24
|
-
var invertedStyles = {"switch":"
|
|
24
|
+
var invertedStyles = {"switch":"switch__switch_1kqnc","label":"switch__label_1kqnc","hint":"switch__hint_1kqnc","checked":"switch__checked_1kqnc","disabled":"switch__disabled_1kqnc"};
|
|
25
25
|
require('./inverted.css')
|
|
26
26
|
|
|
27
27
|
var colorStyles = {
|
package/cssm/default.module.css
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
24
24
|
|
|
25
25
|
/* новые значения, используйте их */
|
|
26
|
+
|
|
27
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
28
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
26
29
|
} :root {
|
|
27
30
|
} :root {
|
|
28
31
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
package/cssm/index.module.css
CHANGED
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
26
26
|
|
|
27
27
|
/* новые значения, используйте их */
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
30
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
31
|
+
--gap-0: 0px;
|
|
29
32
|
--gap-2: var(--gap-3xs);
|
|
30
33
|
--gap-4: var(--gap-2xs);
|
|
31
34
|
--gap-12: var(--gap-s);
|
package/cssm/inverted.module.css
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
24
24
|
|
|
25
25
|
/* новые значения, используйте их */
|
|
26
|
+
|
|
27
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
28
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
26
29
|
} :root {
|
|
27
30
|
} :root {
|
|
28
31
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
package/default.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1bpit */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_95gov {
|
|
53
56
|
background-color: var(--switch-bg-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_95gov:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_95gov {
|
|
57
60
|
color: var(--switch-label-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_95gov {
|
|
59
62
|
color: var(--switch-hint-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_95gov .switch__switch_95gov {
|
|
61
64
|
background-color: var(--switch-checked-bg-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_95gov .switch__switch_95gov:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_95gov .switch__label_95gov {
|
|
65
68
|
color: var(--switch-disabled-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_95gov .switch__hint_95gov {
|
|
67
70
|
color: var(--switch-disabled-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_95gov .switch__switch_95gov {
|
|
69
72
|
background-color: var(--switch-disabled-bg-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_95gov .switch__switch_95gov:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_95gov.switch__checked_95gov .switch__switch_95gov {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-color);
|
|
74
77
|
}
|
package/esm/Component.js
CHANGED
|
@@ -5,13 +5,13 @@ import cn from 'classnames';
|
|
|
5
5
|
import { dom } from '@alfalab/core-components-shared/esm';
|
|
6
6
|
import { useFocus } from '@alfalab/hooks';
|
|
7
7
|
|
|
8
|
-
var defaultStyles = {"switch":"
|
|
8
|
+
var defaultStyles = {"switch":"switch__switch_95gov","label":"switch__label_95gov","hint":"switch__hint_95gov","checked":"switch__checked_95gov","disabled":"switch__disabled_95gov"};
|
|
9
9
|
require('./default.css')
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"
|
|
11
|
+
var styles = {"component":"switch__component_agi88","start":"switch__start_agi88","center":"switch__center_agi88","addons":"switch__addons_agi88","block":"switch__block_agi88","switch":"switch__switch_agi88","content":"switch__content_agi88","label":"switch__label_agi88","errorMessage":"switch__errorMessage_agi88","hint":"switch__hint_agi88","reversed":"switch__reversed_agi88","checked":"switch__checked_agi88","disabled":"switch__disabled_agi88","focused":"switch__focused_agi88"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
var invertedStyles = {"switch":"
|
|
14
|
+
var invertedStyles = {"switch":"switch__switch_1kqnc","label":"switch__label_1kqnc","hint":"switch__hint_1kqnc","checked":"switch__checked_1kqnc","disabled":"switch__disabled_1kqnc"};
|
|
15
15
|
require('./inverted.css')
|
|
16
16
|
|
|
17
17
|
var colorStyles = {
|
package/esm/default.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1bpit */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_95gov {
|
|
53
56
|
background-color: var(--switch-bg-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_95gov:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_95gov {
|
|
57
60
|
color: var(--switch-label-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_95gov {
|
|
59
62
|
color: var(--switch-hint-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_95gov .switch__switch_95gov {
|
|
61
64
|
background-color: var(--switch-checked-bg-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_95gov .switch__switch_95gov:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_95gov .switch__label_95gov {
|
|
65
68
|
color: var(--switch-disabled-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_95gov .switch__hint_95gov {
|
|
67
70
|
color: var(--switch-disabled-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_95gov .switch__switch_95gov {
|
|
69
72
|
background-color: var(--switch-disabled-bg-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_95gov .switch__switch_95gov:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_95gov.switch__checked_95gov .switch__switch_95gov {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-color);
|
|
74
77
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: otfj7 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
27
27
|
|
|
28
28
|
/* новые значения, используйте их */
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
31
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
32
|
+
--gap-0: 0px;
|
|
30
33
|
--gap-2: var(--gap-3xs);
|
|
31
34
|
--gap-4: var(--gap-2xs);
|
|
32
35
|
--gap-12: var(--gap-s);
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
|
|
52
55
|
/* icon */
|
|
53
56
|
--switch-icon-color: var(--color-static-neutral-0);
|
|
54
|
-
} .
|
|
57
|
+
} .switch__component_agi88 {
|
|
55
58
|
display: inline-flex;
|
|
56
59
|
align-items: flex-start;
|
|
57
60
|
margin: var(--gap-0);
|
|
@@ -59,20 +62,20 @@
|
|
|
59
62
|
border: 0;
|
|
60
63
|
cursor: pointer;
|
|
61
64
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
62
|
-
} .
|
|
65
|
+
} .switch__component_agi88 input {
|
|
63
66
|
opacity: 0;
|
|
64
67
|
position: absolute;
|
|
65
|
-
} .
|
|
68
|
+
} .switch__start_agi88 {
|
|
66
69
|
align-items: flex-start;
|
|
67
|
-
} .
|
|
70
|
+
} .switch__center_agi88 {
|
|
68
71
|
align-items: center;
|
|
69
|
-
} .
|
|
72
|
+
} .switch__addons_agi88 {
|
|
70
73
|
margin-left: auto;
|
|
71
74
|
padding-left: var(--gap-16);
|
|
72
75
|
line-height: 24px;
|
|
73
|
-
} .
|
|
76
|
+
} .switch__block_agi88 {
|
|
74
77
|
width: 100%;
|
|
75
|
-
} .
|
|
78
|
+
} .switch__switch_agi88 {
|
|
76
79
|
position: relative;
|
|
77
80
|
border-radius: var(--border-radius-16);
|
|
78
81
|
width: 36px;
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
border: 2px solid var(--switch-border-color);
|
|
83
86
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
84
87
|
box-sizing: border-box;
|
|
85
|
-
} .
|
|
88
|
+
} .switch__switch_agi88:before {
|
|
86
89
|
content: '';
|
|
87
90
|
position: absolute;
|
|
88
91
|
top: var(--gap-0);
|
|
@@ -94,42 +97,42 @@
|
|
|
94
97
|
background-color: var(--switch-icon-color);
|
|
95
98
|
box-sizing: border-box;
|
|
96
99
|
transition: transform 0.2s ease;
|
|
97
|
-
} .
|
|
100
|
+
} .switch__content_agi88 {
|
|
98
101
|
margin-left: var(--gap-12);
|
|
99
102
|
flex-grow: 1;
|
|
100
|
-
} .
|
|
103
|
+
} .switch__label_agi88 {
|
|
101
104
|
font-size: 16px;
|
|
102
105
|
line-height: 24px;
|
|
103
106
|
font-weight: 400;
|
|
104
107
|
display: block;
|
|
105
|
-
} .
|
|
108
|
+
} .switch__label_agi88:not(:only-child) {
|
|
106
109
|
margin-bottom: var(--gap-4);
|
|
107
|
-
} .
|
|
110
|
+
} .switch__errorMessage_agi88 {
|
|
108
111
|
font-size: 14px;
|
|
109
112
|
line-height: 18px;
|
|
110
113
|
font-weight: 400;
|
|
111
114
|
color: var(--switch-error-color);
|
|
112
|
-
} .
|
|
115
|
+
} .switch__hint_agi88 {
|
|
113
116
|
font-size: 14px;
|
|
114
117
|
line-height: 18px;
|
|
115
118
|
font-weight: 400;
|
|
116
119
|
display: block;
|
|
117
|
-
} /* Reversed state */ .
|
|
120
|
+
} /* Reversed state */ .switch__component_agi88.switch__reversed_agi88 {
|
|
118
121
|
flex-direction: row-reverse;
|
|
119
|
-
} .
|
|
122
|
+
} .switch__reversed_agi88 .switch__content_agi88 {
|
|
120
123
|
margin-right: var(--gap-16);
|
|
121
124
|
margin-left: var(--gap-0);
|
|
122
|
-
} .
|
|
125
|
+
} .switch__reversed_agi88 .switch__addons_agi88 {
|
|
123
126
|
margin-left: var(--gap-0);
|
|
124
127
|
padding-left: var(--gap-0);
|
|
125
128
|
margin-right: auto;
|
|
126
129
|
padding-right: var(--gap-16);
|
|
127
|
-
} /* Checked state */ .
|
|
130
|
+
} /* Checked state */ .switch__checked_agi88 .switch__switch_agi88:before {
|
|
128
131
|
/* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
|
|
129
132
|
transform: translateX(16px);
|
|
130
|
-
} /* Disabled state */ .
|
|
133
|
+
} /* Disabled state */ .switch__disabled_agi88 {
|
|
131
134
|
cursor: var(--disabled-cursor);
|
|
132
|
-
} /* Focused state */ .
|
|
135
|
+
} /* Focused state */ .switch__focused_agi88 .switch__switch_agi88 {
|
|
133
136
|
outline: 2px solid var(--focus-color);
|
|
134
137
|
outline-offset: 2px;
|
|
135
138
|
}
|
package/esm/inverted.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 10aog */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200-inverted: rgba(225, 225, 248, 0.09);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_1kqnc {
|
|
53
56
|
background-color: var(--switch-bg-inverted-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_1kqnc:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-inverted-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_1kqnc {
|
|
57
60
|
color: var(--switch-label-inverted-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_1kqnc {
|
|
59
62
|
color: var(--switch-hint-inverted-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc {
|
|
61
64
|
background-color: var(--switch-checked-bg-inverted-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-inverted-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_1kqnc .switch__label_1kqnc {
|
|
65
68
|
color: var(--switch-disabled-inverted-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_1kqnc .switch__hint_1kqnc {
|
|
67
70
|
color: var(--switch-disabled-inverted-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc {
|
|
69
72
|
background-color: var(--switch-disabled-bg-inverted-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-inverted-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_1kqnc.switch__checked_1kqnc .switch__switch_1kqnc {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-inverted-color);
|
|
74
77
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: otfj7 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
27
27
|
|
|
28
28
|
/* новые значения, используйте их */
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
31
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
32
|
+
--gap-0: 0px;
|
|
30
33
|
--gap-2: var(--gap-3xs);
|
|
31
34
|
--gap-4: var(--gap-2xs);
|
|
32
35
|
--gap-12: var(--gap-s);
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
|
|
52
55
|
/* icon */
|
|
53
56
|
--switch-icon-color: var(--color-static-neutral-0);
|
|
54
|
-
} .
|
|
57
|
+
} .switch__component_agi88 {
|
|
55
58
|
display: inline-flex;
|
|
56
59
|
align-items: flex-start;
|
|
57
60
|
margin: var(--gap-0);
|
|
@@ -59,20 +62,20 @@
|
|
|
59
62
|
border: 0;
|
|
60
63
|
cursor: pointer;
|
|
61
64
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
62
|
-
} .
|
|
65
|
+
} .switch__component_agi88 input {
|
|
63
66
|
opacity: 0;
|
|
64
67
|
position: absolute;
|
|
65
|
-
} .
|
|
68
|
+
} .switch__start_agi88 {
|
|
66
69
|
align-items: flex-start;
|
|
67
|
-
} .
|
|
70
|
+
} .switch__center_agi88 {
|
|
68
71
|
align-items: center;
|
|
69
|
-
} .
|
|
72
|
+
} .switch__addons_agi88 {
|
|
70
73
|
margin-left: auto;
|
|
71
74
|
padding-left: var(--gap-16);
|
|
72
75
|
line-height: 24px;
|
|
73
|
-
} .
|
|
76
|
+
} .switch__block_agi88 {
|
|
74
77
|
width: 100%;
|
|
75
|
-
} .
|
|
78
|
+
} .switch__switch_agi88 {
|
|
76
79
|
position: relative;
|
|
77
80
|
border-radius: var(--border-radius-16);
|
|
78
81
|
width: 36px;
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
border: 2px solid var(--switch-border-color);
|
|
83
86
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
84
87
|
box-sizing: border-box;
|
|
85
|
-
} .
|
|
88
|
+
} .switch__switch_agi88:before {
|
|
86
89
|
content: '';
|
|
87
90
|
position: absolute;
|
|
88
91
|
top: var(--gap-0);
|
|
@@ -94,42 +97,42 @@
|
|
|
94
97
|
background-color: var(--switch-icon-color);
|
|
95
98
|
box-sizing: border-box;
|
|
96
99
|
transition: transform 0.2s ease;
|
|
97
|
-
} .
|
|
100
|
+
} .switch__content_agi88 {
|
|
98
101
|
margin-left: var(--gap-12);
|
|
99
102
|
flex-grow: 1;
|
|
100
|
-
} .
|
|
103
|
+
} .switch__label_agi88 {
|
|
101
104
|
font-size: 16px;
|
|
102
105
|
line-height: 24px;
|
|
103
106
|
font-weight: 400;
|
|
104
107
|
display: block;
|
|
105
|
-
} .
|
|
108
|
+
} .switch__label_agi88:not(:only-child) {
|
|
106
109
|
margin-bottom: var(--gap-4);
|
|
107
|
-
} .
|
|
110
|
+
} .switch__errorMessage_agi88 {
|
|
108
111
|
font-size: 14px;
|
|
109
112
|
line-height: 18px;
|
|
110
113
|
font-weight: 400;
|
|
111
114
|
color: var(--switch-error-color);
|
|
112
|
-
} .
|
|
115
|
+
} .switch__hint_agi88 {
|
|
113
116
|
font-size: 14px;
|
|
114
117
|
line-height: 18px;
|
|
115
118
|
font-weight: 400;
|
|
116
119
|
display: block;
|
|
117
|
-
} /* Reversed state */ .
|
|
120
|
+
} /* Reversed state */ .switch__component_agi88.switch__reversed_agi88 {
|
|
118
121
|
flex-direction: row-reverse;
|
|
119
|
-
} .
|
|
122
|
+
} .switch__reversed_agi88 .switch__content_agi88 {
|
|
120
123
|
margin-right: var(--gap-16);
|
|
121
124
|
margin-left: var(--gap-0);
|
|
122
|
-
} .
|
|
125
|
+
} .switch__reversed_agi88 .switch__addons_agi88 {
|
|
123
126
|
margin-left: var(--gap-0);
|
|
124
127
|
padding-left: var(--gap-0);
|
|
125
128
|
margin-right: auto;
|
|
126
129
|
padding-right: var(--gap-16);
|
|
127
|
-
} /* Checked state */ .
|
|
130
|
+
} /* Checked state */ .switch__checked_agi88 .switch__switch_agi88:before {
|
|
128
131
|
/* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
|
|
129
132
|
transform: translateX(16px);
|
|
130
|
-
} /* Disabled state */ .
|
|
133
|
+
} /* Disabled state */ .switch__disabled_agi88 {
|
|
131
134
|
cursor: var(--disabled-cursor);
|
|
132
|
-
} /* Focused state */ .
|
|
135
|
+
} /* Focused state */ .switch__focused_agi88 .switch__switch_agi88 {
|
|
133
136
|
outline: 2px solid var(--focus-color);
|
|
134
137
|
outline-offset: 2px;
|
|
135
138
|
}
|
package/inverted.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 10aog */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200-inverted: rgba(225, 225, 248, 0.09);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_1kqnc {
|
|
53
56
|
background-color: var(--switch-bg-inverted-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_1kqnc:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-inverted-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_1kqnc {
|
|
57
60
|
color: var(--switch-label-inverted-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_1kqnc {
|
|
59
62
|
color: var(--switch-hint-inverted-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc {
|
|
61
64
|
background-color: var(--switch-checked-bg-inverted-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-inverted-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_1kqnc .switch__label_1kqnc {
|
|
65
68
|
color: var(--switch-disabled-inverted-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_1kqnc .switch__hint_1kqnc {
|
|
67
70
|
color: var(--switch-disabled-inverted-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc {
|
|
69
72
|
background-color: var(--switch-disabled-bg-inverted-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-inverted-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_1kqnc.switch__checked_1kqnc .switch__switch_1kqnc {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-inverted-color);
|
|
74
77
|
}
|
package/modern/Component.js
CHANGED
|
@@ -4,13 +4,13 @@ import cn from 'classnames';
|
|
|
4
4
|
import { dom } from '@alfalab/core-components-shared/modern';
|
|
5
5
|
import { useFocus } from '@alfalab/hooks';
|
|
6
6
|
|
|
7
|
-
const defaultStyles = {"switch":"
|
|
7
|
+
const defaultStyles = {"switch":"switch__switch_95gov","label":"switch__label_95gov","hint":"switch__hint_95gov","checked":"switch__checked_95gov","disabled":"switch__disabled_95gov"};
|
|
8
8
|
require('./default.css')
|
|
9
9
|
|
|
10
|
-
const styles = {"component":"
|
|
10
|
+
const styles = {"component":"switch__component_agi88","start":"switch__start_agi88","center":"switch__center_agi88","addons":"switch__addons_agi88","block":"switch__block_agi88","switch":"switch__switch_agi88","content":"switch__content_agi88","label":"switch__label_agi88","errorMessage":"switch__errorMessage_agi88","hint":"switch__hint_agi88","reversed":"switch__reversed_agi88","checked":"switch__checked_agi88","disabled":"switch__disabled_agi88","focused":"switch__focused_agi88"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
|
-
const invertedStyles = {"switch":"
|
|
13
|
+
const invertedStyles = {"switch":"switch__switch_1kqnc","label":"switch__label_1kqnc","hint":"switch__hint_1kqnc","checked":"switch__checked_1kqnc","disabled":"switch__disabled_1kqnc"};
|
|
14
14
|
require('./inverted.css')
|
|
15
15
|
|
|
16
16
|
const colorStyles = {
|
package/modern/default.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1bpit */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200: rgba(30, 43, 68, 0.08);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_95gov {
|
|
53
56
|
background-color: var(--switch-bg-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_95gov:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_95gov {
|
|
57
60
|
color: var(--switch-label-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_95gov {
|
|
59
62
|
color: var(--switch-hint-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_95gov .switch__switch_95gov {
|
|
61
64
|
background-color: var(--switch-checked-bg-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_95gov .switch__switch_95gov:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_95gov .switch__label_95gov {
|
|
65
68
|
color: var(--switch-disabled-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_95gov .switch__hint_95gov {
|
|
67
70
|
color: var(--switch-disabled-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_95gov .switch__switch_95gov {
|
|
69
72
|
background-color: var(--switch-disabled-bg-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_95gov .switch__switch_95gov:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_95gov.switch__checked_95gov .switch__switch_95gov {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-color);
|
|
74
77
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: otfj7 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
27
27
|
|
|
28
28
|
/* новые значения, используйте их */
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
31
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
32
|
+
--gap-0: 0px;
|
|
30
33
|
--gap-2: var(--gap-3xs);
|
|
31
34
|
--gap-4: var(--gap-2xs);
|
|
32
35
|
--gap-12: var(--gap-s);
|
|
@@ -51,7 +54,7 @@
|
|
|
51
54
|
|
|
52
55
|
/* icon */
|
|
53
56
|
--switch-icon-color: var(--color-static-neutral-0);
|
|
54
|
-
} .
|
|
57
|
+
} .switch__component_agi88 {
|
|
55
58
|
display: inline-flex;
|
|
56
59
|
align-items: flex-start;
|
|
57
60
|
margin: var(--gap-0);
|
|
@@ -59,20 +62,20 @@
|
|
|
59
62
|
border: 0;
|
|
60
63
|
cursor: pointer;
|
|
61
64
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
62
|
-
} .
|
|
65
|
+
} .switch__component_agi88 input {
|
|
63
66
|
opacity: 0;
|
|
64
67
|
position: absolute;
|
|
65
|
-
} .
|
|
68
|
+
} .switch__start_agi88 {
|
|
66
69
|
align-items: flex-start;
|
|
67
|
-
} .
|
|
70
|
+
} .switch__center_agi88 {
|
|
68
71
|
align-items: center;
|
|
69
|
-
} .
|
|
72
|
+
} .switch__addons_agi88 {
|
|
70
73
|
margin-left: auto;
|
|
71
74
|
padding-left: var(--gap-16);
|
|
72
75
|
line-height: 24px;
|
|
73
|
-
} .
|
|
76
|
+
} .switch__block_agi88 {
|
|
74
77
|
width: 100%;
|
|
75
|
-
} .
|
|
78
|
+
} .switch__switch_agi88 {
|
|
76
79
|
position: relative;
|
|
77
80
|
border-radius: var(--border-radius-16);
|
|
78
81
|
width: 36px;
|
|
@@ -82,7 +85,7 @@
|
|
|
82
85
|
border: 2px solid var(--switch-border-color);
|
|
83
86
|
transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
84
87
|
box-sizing: border-box;
|
|
85
|
-
} .
|
|
88
|
+
} .switch__switch_agi88:before {
|
|
86
89
|
content: '';
|
|
87
90
|
position: absolute;
|
|
88
91
|
top: var(--gap-0);
|
|
@@ -94,42 +97,42 @@
|
|
|
94
97
|
background-color: var(--switch-icon-color);
|
|
95
98
|
box-sizing: border-box;
|
|
96
99
|
transition: transform 0.2s ease;
|
|
97
|
-
} .
|
|
100
|
+
} .switch__content_agi88 {
|
|
98
101
|
margin-left: var(--gap-12);
|
|
99
102
|
flex-grow: 1;
|
|
100
|
-
} .
|
|
103
|
+
} .switch__label_agi88 {
|
|
101
104
|
font-size: 16px;
|
|
102
105
|
line-height: 24px;
|
|
103
106
|
font-weight: 400;
|
|
104
107
|
display: block;
|
|
105
|
-
} .
|
|
108
|
+
} .switch__label_agi88:not(:only-child) {
|
|
106
109
|
margin-bottom: var(--gap-4);
|
|
107
|
-
} .
|
|
110
|
+
} .switch__errorMessage_agi88 {
|
|
108
111
|
font-size: 14px;
|
|
109
112
|
line-height: 18px;
|
|
110
113
|
font-weight: 400;
|
|
111
114
|
color: var(--switch-error-color);
|
|
112
|
-
} .
|
|
115
|
+
} .switch__hint_agi88 {
|
|
113
116
|
font-size: 14px;
|
|
114
117
|
line-height: 18px;
|
|
115
118
|
font-weight: 400;
|
|
116
119
|
display: block;
|
|
117
|
-
} /* Reversed state */ .
|
|
120
|
+
} /* Reversed state */ .switch__component_agi88.switch__reversed_agi88 {
|
|
118
121
|
flex-direction: row-reverse;
|
|
119
|
-
} .
|
|
122
|
+
} .switch__reversed_agi88 .switch__content_agi88 {
|
|
120
123
|
margin-right: var(--gap-16);
|
|
121
124
|
margin-left: var(--gap-0);
|
|
122
|
-
} .
|
|
125
|
+
} .switch__reversed_agi88 .switch__addons_agi88 {
|
|
123
126
|
margin-left: var(--gap-0);
|
|
124
127
|
padding-left: var(--gap-0);
|
|
125
128
|
margin-right: auto;
|
|
126
129
|
padding-right: var(--gap-16);
|
|
127
|
-
} /* Checked state */ .
|
|
130
|
+
} /* Checked state */ .switch__checked_agi88 .switch__switch_agi88:before {
|
|
128
131
|
/* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
|
|
129
132
|
transform: translateX(16px);
|
|
130
|
-
} /* Disabled state */ .
|
|
133
|
+
} /* Disabled state */ .switch__disabled_agi88 {
|
|
131
134
|
cursor: var(--disabled-cursor);
|
|
132
|
-
} /* Focused state */ .
|
|
135
|
+
} /* Focused state */ .switch__focused_agi88 .switch__switch_agi88 {
|
|
133
136
|
outline: 2px solid var(--focus-color);
|
|
134
137
|
outline-offset: 2px;
|
|
135
138
|
}
|
package/modern/inverted.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 10aog */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-translucent-200-inverted: rgba(225, 225, 248, 0.09);
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
25
25
|
|
|
26
26
|
/* новые значения, используйте их */
|
|
27
|
+
|
|
28
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
29
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
30
|
} :root {
|
|
28
31
|
} :root {
|
|
29
32
|
} /* сбрасывает синюю подсветку при нажатии */ :root {
|
|
@@ -49,26 +52,26 @@
|
|
|
49
52
|
|
|
50
53
|
/* icon */
|
|
51
54
|
--switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
|
|
52
|
-
} .
|
|
55
|
+
} .switch__switch_1kqnc {
|
|
53
56
|
background-color: var(--switch-bg-inverted-color)
|
|
54
|
-
} .
|
|
57
|
+
} .switch__switch_1kqnc:hover {
|
|
55
58
|
background-color: var(--switch-hover-bg-inverted-color);
|
|
56
|
-
} .
|
|
59
|
+
} .switch__label_1kqnc {
|
|
57
60
|
color: var(--switch-label-inverted-color);
|
|
58
|
-
} .
|
|
61
|
+
} .switch__hint_1kqnc {
|
|
59
62
|
color: var(--switch-hint-inverted-color);
|
|
60
|
-
} .
|
|
63
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc {
|
|
61
64
|
background-color: var(--switch-checked-bg-inverted-color)
|
|
62
|
-
} .
|
|
65
|
+
} .switch__checked_1kqnc .switch__switch_1kqnc:hover {
|
|
63
66
|
background-color: var(--switch-checked-hover-bg-inverted-color);
|
|
64
|
-
} .
|
|
67
|
+
} .switch__disabled_1kqnc .switch__label_1kqnc {
|
|
65
68
|
color: var(--switch-disabled-inverted-color);
|
|
66
|
-
} .
|
|
69
|
+
} .switch__disabled_1kqnc .switch__hint_1kqnc {
|
|
67
70
|
color: var(--switch-disabled-inverted-color);
|
|
68
|
-
} .
|
|
71
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc {
|
|
69
72
|
background-color: var(--switch-disabled-bg-inverted-color)
|
|
70
|
-
} .
|
|
73
|
+
} .switch__disabled_1kqnc .switch__switch_1kqnc:before {
|
|
71
74
|
background-color: var(--switch-icon-disabled-inverted-color);
|
|
72
|
-
} .
|
|
75
|
+
} .switch__disabled_1kqnc.switch__checked_1kqnc .switch__switch_1kqnc {
|
|
73
76
|
background-color: var(--switch-disabled-checked-bg-inverted-color);
|
|
74
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-switch",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"gitHead": "f054fef20200664c65e2501ef1f916c555cdf05d",
|
|
6
6
|
"keywords": [],
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@alfalab/hooks": "^1.13.1",
|
|
20
|
-
"@alfalab/core-components-shared": "^0.
|
|
20
|
+
"@alfalab/core-components-shared": "^0.16.0",
|
|
21
21
|
"classnames": "^2.5.1",
|
|
22
22
|
"react-merge-refs": "^1.1.0",
|
|
23
23
|
"tslib": "^2.4.0"
|
|
24
24
|
},
|
|
25
|
-
"themesVersion": "13.7.
|
|
26
|
-
"varsVersion": "9.
|
|
25
|
+
"themesVersion": "13.7.1",
|
|
26
|
+
"varsVersion": "9.18.0"
|
|
27
27
|
}
|