@alfalab/core-components-switch 4.5.4 → 4.5.5

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 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":"switch__switch_1isfm","label":"switch__label_1isfm","hint":"switch__hint_1isfm","checked":"switch__checked_1isfm","disabled":"switch__disabled_1isfm"};
18
+ var defaultStyles = {"switch":"switch__switch_ii587","label":"switch__label_ii587","hint":"switch__hint_ii587","checked":"switch__checked_ii587","disabled":"switch__disabled_ii587"};
19
19
  require('./default.css')
20
20
 
21
- var styles = {"component":"switch__component_x8whv","start":"switch__start_x8whv","center":"switch__center_x8whv","addons":"switch__addons_x8whv","block":"switch__block_x8whv","switch":"switch__switch_x8whv","content":"switch__content_x8whv","label":"switch__label_x8whv","errorMessage":"switch__errorMessage_x8whv","hint":"switch__hint_x8whv","reversed":"switch__reversed_x8whv","checked":"switch__checked_x8whv","disabled":"switch__disabled_x8whv","focused":"switch__focused_x8whv"};
21
+ var styles = {"component":"switch__component_ppzcq","start":"switch__start_ppzcq","center":"switch__center_ppzcq","addons":"switch__addons_ppzcq","block":"switch__block_ppzcq","switch":"switch__switch_ppzcq","content":"switch__content_ppzcq","label":"switch__label_ppzcq","errorMessage":"switch__errorMessage_ppzcq","hint":"switch__hint_ppzcq","reversed":"switch__reversed_ppzcq","checked":"switch__checked_ppzcq","disabled":"switch__disabled_ppzcq","focused":"switch__focused_ppzcq"};
22
22
  require('./index.css')
23
23
 
24
- var invertedStyles = {"switch":"switch__switch_fa858","label":"switch__label_fa858","hint":"switch__hint_fa858","checked":"switch__checked_fa858","disabled":"switch__disabled_fa858"};
24
+ var invertedStyles = {"switch":"switch__switch_1u3bw","label":"switch__label_1u3bw","hint":"switch__hint_1u3bw","checked":"switch__checked_1u3bw","disabled":"switch__disabled_1u3bw"};
25
25
  require('./inverted.css')
26
26
 
27
27
  var colorStyles = {
@@ -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 {
@@ -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
- --gap-0: 0;
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);
@@ -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: 89yrn */
1
+ /* hash: 154e7 */
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
- } .switch__switch_1isfm {
55
+ } .switch__switch_ii587 {
53
56
  background-color: var(--switch-bg-color)
54
- } .switch__switch_1isfm:hover {
57
+ } .switch__switch_ii587:hover {
55
58
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_1isfm {
59
+ } .switch__label_ii587 {
57
60
  color: var(--switch-label-color);
58
- } .switch__hint_1isfm {
61
+ } .switch__hint_ii587 {
59
62
  color: var(--switch-hint-color);
60
- } .switch__checked_1isfm .switch__switch_1isfm {
63
+ } .switch__checked_ii587 .switch__switch_ii587 {
61
64
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_1isfm .switch__switch_1isfm:hover {
65
+ } .switch__checked_ii587 .switch__switch_ii587:hover {
63
66
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_1isfm .switch__label_1isfm {
67
+ } .switch__disabled_ii587 .switch__label_ii587 {
65
68
  color: var(--switch-disabled-color);
66
- } .switch__disabled_1isfm .switch__hint_1isfm {
69
+ } .switch__disabled_ii587 .switch__hint_ii587 {
67
70
  color: var(--switch-disabled-color);
68
- } .switch__disabled_1isfm .switch__switch_1isfm {
71
+ } .switch__disabled_ii587 .switch__switch_ii587 {
69
72
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_1isfm .switch__switch_1isfm:before {
73
+ } .switch__disabled_ii587 .switch__switch_ii587:before {
71
74
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_1isfm.switch__checked_1isfm .switch__switch_1isfm {
75
+ } .switch__disabled_ii587.switch__checked_ii587 .switch__switch_ii587 {
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":"switch__switch_1isfm","label":"switch__label_1isfm","hint":"switch__hint_1isfm","checked":"switch__checked_1isfm","disabled":"switch__disabled_1isfm"};
8
+ var defaultStyles = {"switch":"switch__switch_ii587","label":"switch__label_ii587","hint":"switch__hint_ii587","checked":"switch__checked_ii587","disabled":"switch__disabled_ii587"};
9
9
  require('./default.css')
10
10
 
11
- var styles = {"component":"switch__component_x8whv","start":"switch__start_x8whv","center":"switch__center_x8whv","addons":"switch__addons_x8whv","block":"switch__block_x8whv","switch":"switch__switch_x8whv","content":"switch__content_x8whv","label":"switch__label_x8whv","errorMessage":"switch__errorMessage_x8whv","hint":"switch__hint_x8whv","reversed":"switch__reversed_x8whv","checked":"switch__checked_x8whv","disabled":"switch__disabled_x8whv","focused":"switch__focused_x8whv"};
11
+ var styles = {"component":"switch__component_ppzcq","start":"switch__start_ppzcq","center":"switch__center_ppzcq","addons":"switch__addons_ppzcq","block":"switch__block_ppzcq","switch":"switch__switch_ppzcq","content":"switch__content_ppzcq","label":"switch__label_ppzcq","errorMessage":"switch__errorMessage_ppzcq","hint":"switch__hint_ppzcq","reversed":"switch__reversed_ppzcq","checked":"switch__checked_ppzcq","disabled":"switch__disabled_ppzcq","focused":"switch__focused_ppzcq"};
12
12
  require('./index.css')
13
13
 
14
- var invertedStyles = {"switch":"switch__switch_fa858","label":"switch__label_fa858","hint":"switch__hint_fa858","checked":"switch__checked_fa858","disabled":"switch__disabled_fa858"};
14
+ var invertedStyles = {"switch":"switch__switch_1u3bw","label":"switch__label_1u3bw","hint":"switch__hint_1u3bw","checked":"switch__checked_1u3bw","disabled":"switch__disabled_1u3bw"};
15
15
  require('./inverted.css')
16
16
 
17
17
  var colorStyles = {
package/esm/default.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 89yrn */
1
+ /* hash: 154e7 */
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
- } .switch__switch_1isfm {
55
+ } .switch__switch_ii587 {
53
56
  background-color: var(--switch-bg-color)
54
- } .switch__switch_1isfm:hover {
57
+ } .switch__switch_ii587:hover {
55
58
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_1isfm {
59
+ } .switch__label_ii587 {
57
60
  color: var(--switch-label-color);
58
- } .switch__hint_1isfm {
61
+ } .switch__hint_ii587 {
59
62
  color: var(--switch-hint-color);
60
- } .switch__checked_1isfm .switch__switch_1isfm {
63
+ } .switch__checked_ii587 .switch__switch_ii587 {
61
64
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_1isfm .switch__switch_1isfm:hover {
65
+ } .switch__checked_ii587 .switch__switch_ii587:hover {
63
66
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_1isfm .switch__label_1isfm {
67
+ } .switch__disabled_ii587 .switch__label_ii587 {
65
68
  color: var(--switch-disabled-color);
66
- } .switch__disabled_1isfm .switch__hint_1isfm {
69
+ } .switch__disabled_ii587 .switch__hint_ii587 {
67
70
  color: var(--switch-disabled-color);
68
- } .switch__disabled_1isfm .switch__switch_1isfm {
71
+ } .switch__disabled_ii587 .switch__switch_ii587 {
69
72
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_1isfm .switch__switch_1isfm:before {
73
+ } .switch__disabled_ii587 .switch__switch_ii587:before {
71
74
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_1isfm.switch__checked_1isfm .switch__switch_1isfm {
75
+ } .switch__disabled_ii587.switch__checked_ii587 .switch__switch_ii587 {
73
76
  background-color: var(--switch-disabled-checked-bg-color);
74
77
  }
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 123x6 */
1
+ /* hash: s41hh */
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
- --gap-0: 0;
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
- } .switch__component_x8whv {
57
+ } .switch__component_ppzcq {
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
- } .switch__component_x8whv input {
65
+ } .switch__component_ppzcq input {
63
66
  opacity: 0;
64
67
  position: absolute;
65
- } .switch__start_x8whv {
68
+ } .switch__start_ppzcq {
66
69
  align-items: flex-start;
67
- } .switch__center_x8whv {
70
+ } .switch__center_ppzcq {
68
71
  align-items: center;
69
- } .switch__addons_x8whv {
72
+ } .switch__addons_ppzcq {
70
73
  margin-left: auto;
71
74
  padding-left: var(--gap-16);
72
75
  line-height: 24px;
73
- } .switch__block_x8whv {
76
+ } .switch__block_ppzcq {
74
77
  width: 100%;
75
- } .switch__switch_x8whv {
78
+ } .switch__switch_ppzcq {
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
- } .switch__switch_x8whv:before {
88
+ } .switch__switch_ppzcq: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
- } .switch__content_x8whv {
100
+ } .switch__content_ppzcq {
98
101
  margin-left: var(--gap-12);
99
102
  flex-grow: 1;
100
- } .switch__label_x8whv {
103
+ } .switch__label_ppzcq {
101
104
  font-size: 16px;
102
105
  line-height: 24px;
103
106
  font-weight: 400;
104
107
  display: block;
105
- } .switch__label_x8whv:not(:only-child) {
108
+ } .switch__label_ppzcq:not(:only-child) {
106
109
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_x8whv {
110
+ } .switch__errorMessage_ppzcq {
108
111
  font-size: 14px;
109
112
  line-height: 18px;
110
113
  font-weight: 400;
111
114
  color: var(--switch-error-color);
112
- } .switch__hint_x8whv {
115
+ } .switch__hint_ppzcq {
113
116
  font-size: 14px;
114
117
  line-height: 18px;
115
118
  font-weight: 400;
116
119
  display: block;
117
- } /* Reversed state */ .switch__component_x8whv.switch__reversed_x8whv {
120
+ } /* Reversed state */ .switch__component_ppzcq.switch__reversed_ppzcq {
118
121
  flex-direction: row-reverse;
119
- } .switch__reversed_x8whv .switch__content_x8whv {
122
+ } .switch__reversed_ppzcq .switch__content_ppzcq {
120
123
  margin-right: var(--gap-16);
121
124
  margin-left: var(--gap-0);
122
- } .switch__reversed_x8whv .switch__addons_x8whv {
125
+ } .switch__reversed_ppzcq .switch__addons_ppzcq {
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 */ .switch__checked_x8whv .switch__switch_x8whv:before {
130
+ } /* Checked state */ .switch__checked_ppzcq .switch__switch_ppzcq:before {
128
131
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
132
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_x8whv {
133
+ } /* Disabled state */ .switch__disabled_ppzcq {
131
134
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_x8whv .switch__switch_x8whv {
135
+ } /* Focused state */ .switch__focused_ppzcq .switch__switch_ppzcq {
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: 1vw8g */
1
+ /* hash: tpju7 */
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
- } .switch__switch_fa858 {
55
+ } .switch__switch_1u3bw {
53
56
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_fa858:hover {
57
+ } .switch__switch_1u3bw:hover {
55
58
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_fa858 {
59
+ } .switch__label_1u3bw {
57
60
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_fa858 {
61
+ } .switch__hint_1u3bw {
59
62
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_fa858 .switch__switch_fa858 {
63
+ } .switch__checked_1u3bw .switch__switch_1u3bw {
61
64
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_fa858 .switch__switch_fa858:hover {
65
+ } .switch__checked_1u3bw .switch__switch_1u3bw:hover {
63
66
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_fa858 .switch__label_fa858 {
67
+ } .switch__disabled_1u3bw .switch__label_1u3bw {
65
68
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_fa858 .switch__hint_fa858 {
69
+ } .switch__disabled_1u3bw .switch__hint_1u3bw {
67
70
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_fa858 .switch__switch_fa858 {
71
+ } .switch__disabled_1u3bw .switch__switch_1u3bw {
69
72
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_fa858 .switch__switch_fa858:before {
73
+ } .switch__disabled_1u3bw .switch__switch_1u3bw:before {
71
74
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_fa858.switch__checked_fa858 .switch__switch_fa858 {
75
+ } .switch__disabled_1u3bw.switch__checked_1u3bw .switch__switch_1u3bw {
73
76
  background-color: var(--switch-disabled-checked-bg-inverted-color);
74
77
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 123x6 */
1
+ /* hash: s41hh */
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
- --gap-0: 0;
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
- } .switch__component_x8whv {
57
+ } .switch__component_ppzcq {
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
- } .switch__component_x8whv input {
65
+ } .switch__component_ppzcq input {
63
66
  opacity: 0;
64
67
  position: absolute;
65
- } .switch__start_x8whv {
68
+ } .switch__start_ppzcq {
66
69
  align-items: flex-start;
67
- } .switch__center_x8whv {
70
+ } .switch__center_ppzcq {
68
71
  align-items: center;
69
- } .switch__addons_x8whv {
72
+ } .switch__addons_ppzcq {
70
73
  margin-left: auto;
71
74
  padding-left: var(--gap-16);
72
75
  line-height: 24px;
73
- } .switch__block_x8whv {
76
+ } .switch__block_ppzcq {
74
77
  width: 100%;
75
- } .switch__switch_x8whv {
78
+ } .switch__switch_ppzcq {
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
- } .switch__switch_x8whv:before {
88
+ } .switch__switch_ppzcq: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
- } .switch__content_x8whv {
100
+ } .switch__content_ppzcq {
98
101
  margin-left: var(--gap-12);
99
102
  flex-grow: 1;
100
- } .switch__label_x8whv {
103
+ } .switch__label_ppzcq {
101
104
  font-size: 16px;
102
105
  line-height: 24px;
103
106
  font-weight: 400;
104
107
  display: block;
105
- } .switch__label_x8whv:not(:only-child) {
108
+ } .switch__label_ppzcq:not(:only-child) {
106
109
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_x8whv {
110
+ } .switch__errorMessage_ppzcq {
108
111
  font-size: 14px;
109
112
  line-height: 18px;
110
113
  font-weight: 400;
111
114
  color: var(--switch-error-color);
112
- } .switch__hint_x8whv {
115
+ } .switch__hint_ppzcq {
113
116
  font-size: 14px;
114
117
  line-height: 18px;
115
118
  font-weight: 400;
116
119
  display: block;
117
- } /* Reversed state */ .switch__component_x8whv.switch__reversed_x8whv {
120
+ } /* Reversed state */ .switch__component_ppzcq.switch__reversed_ppzcq {
118
121
  flex-direction: row-reverse;
119
- } .switch__reversed_x8whv .switch__content_x8whv {
122
+ } .switch__reversed_ppzcq .switch__content_ppzcq {
120
123
  margin-right: var(--gap-16);
121
124
  margin-left: var(--gap-0);
122
- } .switch__reversed_x8whv .switch__addons_x8whv {
125
+ } .switch__reversed_ppzcq .switch__addons_ppzcq {
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 */ .switch__checked_x8whv .switch__switch_x8whv:before {
130
+ } /* Checked state */ .switch__checked_ppzcq .switch__switch_ppzcq:before {
128
131
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
132
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_x8whv {
133
+ } /* Disabled state */ .switch__disabled_ppzcq {
131
134
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_x8whv .switch__switch_x8whv {
135
+ } /* Focused state */ .switch__focused_ppzcq .switch__switch_ppzcq {
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: 1vw8g */
1
+ /* hash: tpju7 */
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
- } .switch__switch_fa858 {
55
+ } .switch__switch_1u3bw {
53
56
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_fa858:hover {
57
+ } .switch__switch_1u3bw:hover {
55
58
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_fa858 {
59
+ } .switch__label_1u3bw {
57
60
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_fa858 {
61
+ } .switch__hint_1u3bw {
59
62
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_fa858 .switch__switch_fa858 {
63
+ } .switch__checked_1u3bw .switch__switch_1u3bw {
61
64
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_fa858 .switch__switch_fa858:hover {
65
+ } .switch__checked_1u3bw .switch__switch_1u3bw:hover {
63
66
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_fa858 .switch__label_fa858 {
67
+ } .switch__disabled_1u3bw .switch__label_1u3bw {
65
68
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_fa858 .switch__hint_fa858 {
69
+ } .switch__disabled_1u3bw .switch__hint_1u3bw {
67
70
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_fa858 .switch__switch_fa858 {
71
+ } .switch__disabled_1u3bw .switch__switch_1u3bw {
69
72
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_fa858 .switch__switch_fa858:before {
73
+ } .switch__disabled_1u3bw .switch__switch_1u3bw:before {
71
74
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_fa858.switch__checked_fa858 .switch__switch_fa858 {
75
+ } .switch__disabled_1u3bw.switch__checked_1u3bw .switch__switch_1u3bw {
73
76
  background-color: var(--switch-disabled-checked-bg-inverted-color);
74
77
  }
@@ -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":"switch__switch_1isfm","label":"switch__label_1isfm","hint":"switch__hint_1isfm","checked":"switch__checked_1isfm","disabled":"switch__disabled_1isfm"};
7
+ const defaultStyles = {"switch":"switch__switch_ii587","label":"switch__label_ii587","hint":"switch__hint_ii587","checked":"switch__checked_ii587","disabled":"switch__disabled_ii587"};
8
8
  require('./default.css')
9
9
 
10
- const styles = {"component":"switch__component_x8whv","start":"switch__start_x8whv","center":"switch__center_x8whv","addons":"switch__addons_x8whv","block":"switch__block_x8whv","switch":"switch__switch_x8whv","content":"switch__content_x8whv","label":"switch__label_x8whv","errorMessage":"switch__errorMessage_x8whv","hint":"switch__hint_x8whv","reversed":"switch__reversed_x8whv","checked":"switch__checked_x8whv","disabled":"switch__disabled_x8whv","focused":"switch__focused_x8whv"};
10
+ const styles = {"component":"switch__component_ppzcq","start":"switch__start_ppzcq","center":"switch__center_ppzcq","addons":"switch__addons_ppzcq","block":"switch__block_ppzcq","switch":"switch__switch_ppzcq","content":"switch__content_ppzcq","label":"switch__label_ppzcq","errorMessage":"switch__errorMessage_ppzcq","hint":"switch__hint_ppzcq","reversed":"switch__reversed_ppzcq","checked":"switch__checked_ppzcq","disabled":"switch__disabled_ppzcq","focused":"switch__focused_ppzcq"};
11
11
  require('./index.css')
12
12
 
13
- const invertedStyles = {"switch":"switch__switch_fa858","label":"switch__label_fa858","hint":"switch__hint_fa858","checked":"switch__checked_fa858","disabled":"switch__disabled_fa858"};
13
+ const invertedStyles = {"switch":"switch__switch_1u3bw","label":"switch__label_1u3bw","hint":"switch__hint_1u3bw","checked":"switch__checked_1u3bw","disabled":"switch__disabled_1u3bw"};
14
14
  require('./inverted.css')
15
15
 
16
16
  const colorStyles = {
@@ -1,4 +1,4 @@
1
- /* hash: 89yrn */
1
+ /* hash: 154e7 */
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
- } .switch__switch_1isfm {
55
+ } .switch__switch_ii587 {
53
56
  background-color: var(--switch-bg-color)
54
- } .switch__switch_1isfm:hover {
57
+ } .switch__switch_ii587:hover {
55
58
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_1isfm {
59
+ } .switch__label_ii587 {
57
60
  color: var(--switch-label-color);
58
- } .switch__hint_1isfm {
61
+ } .switch__hint_ii587 {
59
62
  color: var(--switch-hint-color);
60
- } .switch__checked_1isfm .switch__switch_1isfm {
63
+ } .switch__checked_ii587 .switch__switch_ii587 {
61
64
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_1isfm .switch__switch_1isfm:hover {
65
+ } .switch__checked_ii587 .switch__switch_ii587:hover {
63
66
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_1isfm .switch__label_1isfm {
67
+ } .switch__disabled_ii587 .switch__label_ii587 {
65
68
  color: var(--switch-disabled-color);
66
- } .switch__disabled_1isfm .switch__hint_1isfm {
69
+ } .switch__disabled_ii587 .switch__hint_ii587 {
67
70
  color: var(--switch-disabled-color);
68
- } .switch__disabled_1isfm .switch__switch_1isfm {
71
+ } .switch__disabled_ii587 .switch__switch_ii587 {
69
72
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_1isfm .switch__switch_1isfm:before {
73
+ } .switch__disabled_ii587 .switch__switch_ii587:before {
71
74
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_1isfm.switch__checked_1isfm .switch__switch_1isfm {
75
+ } .switch__disabled_ii587.switch__checked_ii587 .switch__switch_ii587 {
73
76
  background-color: var(--switch-disabled-checked-bg-color);
74
77
  }
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 123x6 */
1
+ /* hash: s41hh */
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
- --gap-0: 0;
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
- } .switch__component_x8whv {
57
+ } .switch__component_ppzcq {
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
- } .switch__component_x8whv input {
65
+ } .switch__component_ppzcq input {
63
66
  opacity: 0;
64
67
  position: absolute;
65
- } .switch__start_x8whv {
68
+ } .switch__start_ppzcq {
66
69
  align-items: flex-start;
67
- } .switch__center_x8whv {
70
+ } .switch__center_ppzcq {
68
71
  align-items: center;
69
- } .switch__addons_x8whv {
72
+ } .switch__addons_ppzcq {
70
73
  margin-left: auto;
71
74
  padding-left: var(--gap-16);
72
75
  line-height: 24px;
73
- } .switch__block_x8whv {
76
+ } .switch__block_ppzcq {
74
77
  width: 100%;
75
- } .switch__switch_x8whv {
78
+ } .switch__switch_ppzcq {
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
- } .switch__switch_x8whv:before {
88
+ } .switch__switch_ppzcq: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
- } .switch__content_x8whv {
100
+ } .switch__content_ppzcq {
98
101
  margin-left: var(--gap-12);
99
102
  flex-grow: 1;
100
- } .switch__label_x8whv {
103
+ } .switch__label_ppzcq {
101
104
  font-size: 16px;
102
105
  line-height: 24px;
103
106
  font-weight: 400;
104
107
  display: block;
105
- } .switch__label_x8whv:not(:only-child) {
108
+ } .switch__label_ppzcq:not(:only-child) {
106
109
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_x8whv {
110
+ } .switch__errorMessage_ppzcq {
108
111
  font-size: 14px;
109
112
  line-height: 18px;
110
113
  font-weight: 400;
111
114
  color: var(--switch-error-color);
112
- } .switch__hint_x8whv {
115
+ } .switch__hint_ppzcq {
113
116
  font-size: 14px;
114
117
  line-height: 18px;
115
118
  font-weight: 400;
116
119
  display: block;
117
- } /* Reversed state */ .switch__component_x8whv.switch__reversed_x8whv {
120
+ } /* Reversed state */ .switch__component_ppzcq.switch__reversed_ppzcq {
118
121
  flex-direction: row-reverse;
119
- } .switch__reversed_x8whv .switch__content_x8whv {
122
+ } .switch__reversed_ppzcq .switch__content_ppzcq {
120
123
  margin-right: var(--gap-16);
121
124
  margin-left: var(--gap-0);
122
- } .switch__reversed_x8whv .switch__addons_x8whv {
125
+ } .switch__reversed_ppzcq .switch__addons_ppzcq {
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 */ .switch__checked_x8whv .switch__switch_x8whv:before {
130
+ } /* Checked state */ .switch__checked_ppzcq .switch__switch_ppzcq:before {
128
131
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
132
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_x8whv {
133
+ } /* Disabled state */ .switch__disabled_ppzcq {
131
134
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_x8whv .switch__switch_x8whv {
135
+ } /* Focused state */ .switch__focused_ppzcq .switch__switch_ppzcq {
133
136
  outline: 2px solid var(--focus-color);
134
137
  outline-offset: 2px;
135
138
  }
@@ -1,4 +1,4 @@
1
- /* hash: 1vw8g */
1
+ /* hash: tpju7 */
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
- } .switch__switch_fa858 {
55
+ } .switch__switch_1u3bw {
53
56
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_fa858:hover {
57
+ } .switch__switch_1u3bw:hover {
55
58
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_fa858 {
59
+ } .switch__label_1u3bw {
57
60
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_fa858 {
61
+ } .switch__hint_1u3bw {
59
62
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_fa858 .switch__switch_fa858 {
63
+ } .switch__checked_1u3bw .switch__switch_1u3bw {
61
64
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_fa858 .switch__switch_fa858:hover {
65
+ } .switch__checked_1u3bw .switch__switch_1u3bw:hover {
63
66
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_fa858 .switch__label_fa858 {
67
+ } .switch__disabled_1u3bw .switch__label_1u3bw {
65
68
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_fa858 .switch__hint_fa858 {
69
+ } .switch__disabled_1u3bw .switch__hint_1u3bw {
67
70
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_fa858 .switch__switch_fa858 {
71
+ } .switch__disabled_1u3bw .switch__switch_1u3bw {
69
72
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_fa858 .switch__switch_fa858:before {
73
+ } .switch__disabled_1u3bw .switch__switch_1u3bw:before {
71
74
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_fa858.switch__checked_fa858 .switch__switch_fa858 {
75
+ } .switch__disabled_1u3bw.switch__checked_1u3bw .switch__switch_1u3bw {
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.4",
3
+ "version": "4.5.5",
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.14.1",
20
+ "@alfalab/core-components-shared": "^0.15.0",
21
21
  "classnames": "^2.5.1",
22
22
  "react-merge-refs": "^1.1.0",
23
23
  "tslib": "^2.4.0"
24
24
  },
25
25
  "themesVersion": "13.7.0",
26
- "varsVersion": "9.16.0"
26
+ "varsVersion": "9.18.0"
27
27
  }