@alfalab/core-components-switch 4.4.0 → 4.5.0

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_14m20","label":"switch__label_14m20","hint":"switch__hint_14m20","checked":"switch__checked_14m20","disabled":"switch__disabled_14m20"};
18
+ var defaultStyles = {"switch":"switch__switch_1polz","label":"switch__label_1polz","hint":"switch__hint_1polz","checked":"switch__checked_1polz","disabled":"switch__disabled_1polz"};
19
19
  require('./default.css')
20
20
 
21
- var styles = {"component":"switch__component_110yj","start":"switch__start_110yj","center":"switch__center_110yj","addons":"switch__addons_110yj","block":"switch__block_110yj","switch":"switch__switch_110yj","content":"switch__content_110yj","label":"switch__label_110yj","errorMessage":"switch__errorMessage_110yj","hint":"switch__hint_110yj","reversed":"switch__reversed_110yj","checked":"switch__checked_110yj","disabled":"switch__disabled_110yj","focused":"switch__focused_110yj"};
21
+ var styles = {"component":"switch__component_1muot","start":"switch__start_1muot","center":"switch__center_1muot","addons":"switch__addons_1muot","block":"switch__block_1muot","switch":"switch__switch_1muot","content":"switch__content_1muot","label":"switch__label_1muot","errorMessage":"switch__errorMessage_1muot","hint":"switch__hint_1muot","reversed":"switch__reversed_1muot","checked":"switch__checked_1muot","disabled":"switch__disabled_1muot","focused":"switch__focused_1muot"};
22
22
  require('./index.css')
23
23
 
24
- var invertedStyles = {"switch":"switch__switch_u8wl7","label":"switch__label_u8wl7","hint":"switch__hint_u8wl7","checked":"switch__checked_u8wl7","disabled":"switch__disabled_u8wl7"};
24
+ var invertedStyles = {"switch":"switch__switch_1fbgj","label":"switch__label_1fbgj","hint":"switch__hint_1fbgj","checked":"switch__checked_1fbgj","disabled":"switch__disabled_1fbgj"};
25
25
  require('./inverted.css')
26
26
 
27
27
  var colorStyles = {
package/default.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: i5l8h */
1
+ /* hash: 1qonb */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
52
- } .switch__switch_14m20 {
52
+ } .switch__switch_1polz {
53
53
  background-color: var(--switch-bg-color)
54
- } .switch__switch_14m20:hover {
54
+ } .switch__switch_1polz:hover {
55
55
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_14m20 {
56
+ } .switch__label_1polz {
57
57
  color: var(--switch-label-color);
58
- } .switch__hint_14m20 {
58
+ } .switch__hint_1polz {
59
59
  color: var(--switch-hint-color);
60
- } .switch__checked_14m20 .switch__switch_14m20 {
60
+ } .switch__checked_1polz .switch__switch_1polz {
61
61
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_14m20 .switch__switch_14m20:hover {
62
+ } .switch__checked_1polz .switch__switch_1polz:hover {
63
63
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_14m20 .switch__label_14m20 {
64
+ } .switch__disabled_1polz .switch__label_1polz {
65
65
  color: var(--switch-disabled-color);
66
- } .switch__disabled_14m20 .switch__hint_14m20 {
66
+ } .switch__disabled_1polz .switch__hint_1polz {
67
67
  color: var(--switch-disabled-color);
68
- } .switch__disabled_14m20 .switch__switch_14m20 {
68
+ } .switch__disabled_1polz .switch__switch_1polz {
69
69
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_14m20 .switch__switch_14m20:before {
70
+ } .switch__disabled_1polz .switch__switch_1polz:before {
71
71
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_14m20.switch__checked_14m20 .switch__switch_14m20 {
72
+ } .switch__disabled_1polz.switch__checked_1polz .switch__switch_1polz {
73
73
  background-color: var(--switch-disabled-checked-bg-color);
74
74
  }
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_14m20","label":"switch__label_14m20","hint":"switch__hint_14m20","checked":"switch__checked_14m20","disabled":"switch__disabled_14m20"};
8
+ var defaultStyles = {"switch":"switch__switch_1polz","label":"switch__label_1polz","hint":"switch__hint_1polz","checked":"switch__checked_1polz","disabled":"switch__disabled_1polz"};
9
9
  require('./default.css')
10
10
 
11
- var styles = {"component":"switch__component_110yj","start":"switch__start_110yj","center":"switch__center_110yj","addons":"switch__addons_110yj","block":"switch__block_110yj","switch":"switch__switch_110yj","content":"switch__content_110yj","label":"switch__label_110yj","errorMessage":"switch__errorMessage_110yj","hint":"switch__hint_110yj","reversed":"switch__reversed_110yj","checked":"switch__checked_110yj","disabled":"switch__disabled_110yj","focused":"switch__focused_110yj"};
11
+ var styles = {"component":"switch__component_1muot","start":"switch__start_1muot","center":"switch__center_1muot","addons":"switch__addons_1muot","block":"switch__block_1muot","switch":"switch__switch_1muot","content":"switch__content_1muot","label":"switch__label_1muot","errorMessage":"switch__errorMessage_1muot","hint":"switch__hint_1muot","reversed":"switch__reversed_1muot","checked":"switch__checked_1muot","disabled":"switch__disabled_1muot","focused":"switch__focused_1muot"};
12
12
  require('./index.css')
13
13
 
14
- var invertedStyles = {"switch":"switch__switch_u8wl7","label":"switch__label_u8wl7","hint":"switch__hint_u8wl7","checked":"switch__checked_u8wl7","disabled":"switch__disabled_u8wl7"};
14
+ var invertedStyles = {"switch":"switch__switch_1fbgj","label":"switch__label_1fbgj","hint":"switch__hint_1fbgj","checked":"switch__checked_1fbgj","disabled":"switch__disabled_1fbgj"};
15
15
  require('./inverted.css')
16
16
 
17
17
  var colorStyles = {
package/esm/default.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: i5l8h */
1
+ /* hash: 1qonb */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
52
- } .switch__switch_14m20 {
52
+ } .switch__switch_1polz {
53
53
  background-color: var(--switch-bg-color)
54
- } .switch__switch_14m20:hover {
54
+ } .switch__switch_1polz:hover {
55
55
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_14m20 {
56
+ } .switch__label_1polz {
57
57
  color: var(--switch-label-color);
58
- } .switch__hint_14m20 {
58
+ } .switch__hint_1polz {
59
59
  color: var(--switch-hint-color);
60
- } .switch__checked_14m20 .switch__switch_14m20 {
60
+ } .switch__checked_1polz .switch__switch_1polz {
61
61
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_14m20 .switch__switch_14m20:hover {
62
+ } .switch__checked_1polz .switch__switch_1polz:hover {
63
63
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_14m20 .switch__label_14m20 {
64
+ } .switch__disabled_1polz .switch__label_1polz {
65
65
  color: var(--switch-disabled-color);
66
- } .switch__disabled_14m20 .switch__hint_14m20 {
66
+ } .switch__disabled_1polz .switch__hint_1polz {
67
67
  color: var(--switch-disabled-color);
68
- } .switch__disabled_14m20 .switch__switch_14m20 {
68
+ } .switch__disabled_1polz .switch__switch_1polz {
69
69
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_14m20 .switch__switch_14m20:before {
70
+ } .switch__disabled_1polz .switch__switch_1polz:before {
71
71
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_14m20.switch__checked_14m20 .switch__switch_14m20 {
72
+ } .switch__disabled_1polz.switch__checked_1polz .switch__switch_1polz {
73
73
  background-color: var(--switch-disabled-checked-bg-color);
74
74
  }
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: c39sc */
1
+ /* hash: y0953 */
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;
@@ -51,7 +51,7 @@
51
51
 
52
52
  /* icon */
53
53
  --switch-icon-color: var(--color-static-neutral-0);
54
- } .switch__component_110yj {
54
+ } .switch__component_1muot {
55
55
  display: inline-flex;
56
56
  align-items: flex-start;
57
57
  margin: var(--gap-0);
@@ -59,20 +59,20 @@
59
59
  border: 0;
60
60
  cursor: pointer;
61
61
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
62
- } .switch__component_110yj input {
62
+ } .switch__component_1muot input {
63
63
  opacity: 0;
64
64
  position: absolute;
65
- } .switch__start_110yj {
65
+ } .switch__start_1muot {
66
66
  align-items: flex-start;
67
- } .switch__center_110yj {
67
+ } .switch__center_1muot {
68
68
  align-items: center;
69
- } .switch__addons_110yj {
69
+ } .switch__addons_1muot {
70
70
  margin-left: auto;
71
71
  padding-left: var(--gap-16);
72
72
  line-height: 24px;
73
- } .switch__block_110yj {
73
+ } .switch__block_1muot {
74
74
  width: 100%;
75
- } .switch__switch_110yj {
75
+ } .switch__switch_1muot {
76
76
  position: relative;
77
77
  border-radius: var(--border-radius-16);
78
78
  width: 36px;
@@ -82,7 +82,7 @@
82
82
  border: 2px solid var(--switch-border-color);
83
83
  transition: background-color 0.2s ease, border-color 0.2s ease;
84
84
  box-sizing: border-box;
85
- } .switch__switch_110yj:before {
85
+ } .switch__switch_1muot:before {
86
86
  content: '';
87
87
  position: absolute;
88
88
  top: var(--gap-0);
@@ -94,42 +94,42 @@
94
94
  background-color: var(--switch-icon-color);
95
95
  box-sizing: border-box;
96
96
  transition: transform 0.2s ease;
97
- } .switch__content_110yj {
97
+ } .switch__content_1muot {
98
98
  margin-left: var(--gap-12);
99
99
  flex-grow: 1;
100
- } .switch__label_110yj {
100
+ } .switch__label_1muot {
101
101
  font-size: 16px;
102
102
  line-height: 24px;
103
103
  font-weight: 400;
104
104
  display: block;
105
- } .switch__label_110yj:not(:only-child) {
105
+ } .switch__label_1muot:not(:only-child) {
106
106
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_110yj {
107
+ } .switch__errorMessage_1muot {
108
108
  font-size: 14px;
109
109
  line-height: 18px;
110
110
  font-weight: 400;
111
111
  color: var(--switch-error-color);
112
- } .switch__hint_110yj {
112
+ } .switch__hint_1muot {
113
113
  font-size: 14px;
114
114
  line-height: 18px;
115
115
  font-weight: 400;
116
116
  display: block;
117
- } /* Reversed state */ .switch__component_110yj.switch__reversed_110yj {
117
+ } /* Reversed state */ .switch__component_1muot.switch__reversed_1muot {
118
118
  flex-direction: row-reverse;
119
- } .switch__reversed_110yj .switch__content_110yj {
119
+ } .switch__reversed_1muot .switch__content_1muot {
120
120
  margin-right: var(--gap-16);
121
121
  margin-left: var(--gap-0);
122
- } .switch__reversed_110yj .switch__addons_110yj {
122
+ } .switch__reversed_1muot .switch__addons_1muot {
123
123
  margin-left: var(--gap-0);
124
124
  padding-left: var(--gap-0);
125
125
  margin-right: auto;
126
126
  padding-right: var(--gap-16);
127
- } /* Checked state */ .switch__checked_110yj .switch__switch_110yj:before {
127
+ } /* Checked state */ .switch__checked_1muot .switch__switch_1muot:before {
128
128
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
129
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_110yj {
130
+ } /* Disabled state */ .switch__disabled_1muot {
131
131
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_110yj .switch__switch_110yj {
132
+ } /* Focused state */ .switch__focused_1muot .switch__switch_1muot {
133
133
  outline: 2px solid var(--focus-color);
134
134
  outline-offset: 2px;
135
135
  }
package/esm/inverted.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 6qqvm */
1
+ /* hash: 1f9sy */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
52
- } .switch__switch_u8wl7 {
52
+ } .switch__switch_1fbgj {
53
53
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_u8wl7:hover {
54
+ } .switch__switch_1fbgj:hover {
55
55
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_u8wl7 {
56
+ } .switch__label_1fbgj {
57
57
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_u8wl7 {
58
+ } .switch__hint_1fbgj {
59
59
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_u8wl7 .switch__switch_u8wl7 {
60
+ } .switch__checked_1fbgj .switch__switch_1fbgj {
61
61
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_u8wl7 .switch__switch_u8wl7:hover {
62
+ } .switch__checked_1fbgj .switch__switch_1fbgj:hover {
63
63
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_u8wl7 .switch__label_u8wl7 {
64
+ } .switch__disabled_1fbgj .switch__label_1fbgj {
65
65
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_u8wl7 .switch__hint_u8wl7 {
66
+ } .switch__disabled_1fbgj .switch__hint_1fbgj {
67
67
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_u8wl7 .switch__switch_u8wl7 {
68
+ } .switch__disabled_1fbgj .switch__switch_1fbgj {
69
69
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_u8wl7 .switch__switch_u8wl7:before {
70
+ } .switch__disabled_1fbgj .switch__switch_1fbgj:before {
71
71
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_u8wl7.switch__checked_u8wl7 .switch__switch_u8wl7 {
72
+ } .switch__disabled_1fbgj.switch__checked_1fbgj .switch__switch_1fbgj {
73
73
  background-color: var(--switch-disabled-checked-bg-inverted-color);
74
74
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: c39sc */
1
+ /* hash: y0953 */
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;
@@ -51,7 +51,7 @@
51
51
 
52
52
  /* icon */
53
53
  --switch-icon-color: var(--color-static-neutral-0);
54
- } .switch__component_110yj {
54
+ } .switch__component_1muot {
55
55
  display: inline-flex;
56
56
  align-items: flex-start;
57
57
  margin: var(--gap-0);
@@ -59,20 +59,20 @@
59
59
  border: 0;
60
60
  cursor: pointer;
61
61
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
62
- } .switch__component_110yj input {
62
+ } .switch__component_1muot input {
63
63
  opacity: 0;
64
64
  position: absolute;
65
- } .switch__start_110yj {
65
+ } .switch__start_1muot {
66
66
  align-items: flex-start;
67
- } .switch__center_110yj {
67
+ } .switch__center_1muot {
68
68
  align-items: center;
69
- } .switch__addons_110yj {
69
+ } .switch__addons_1muot {
70
70
  margin-left: auto;
71
71
  padding-left: var(--gap-16);
72
72
  line-height: 24px;
73
- } .switch__block_110yj {
73
+ } .switch__block_1muot {
74
74
  width: 100%;
75
- } .switch__switch_110yj {
75
+ } .switch__switch_1muot {
76
76
  position: relative;
77
77
  border-radius: var(--border-radius-16);
78
78
  width: 36px;
@@ -82,7 +82,7 @@
82
82
  border: 2px solid var(--switch-border-color);
83
83
  transition: background-color 0.2s ease, border-color 0.2s ease;
84
84
  box-sizing: border-box;
85
- } .switch__switch_110yj:before {
85
+ } .switch__switch_1muot:before {
86
86
  content: '';
87
87
  position: absolute;
88
88
  top: var(--gap-0);
@@ -94,42 +94,42 @@
94
94
  background-color: var(--switch-icon-color);
95
95
  box-sizing: border-box;
96
96
  transition: transform 0.2s ease;
97
- } .switch__content_110yj {
97
+ } .switch__content_1muot {
98
98
  margin-left: var(--gap-12);
99
99
  flex-grow: 1;
100
- } .switch__label_110yj {
100
+ } .switch__label_1muot {
101
101
  font-size: 16px;
102
102
  line-height: 24px;
103
103
  font-weight: 400;
104
104
  display: block;
105
- } .switch__label_110yj:not(:only-child) {
105
+ } .switch__label_1muot:not(:only-child) {
106
106
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_110yj {
107
+ } .switch__errorMessage_1muot {
108
108
  font-size: 14px;
109
109
  line-height: 18px;
110
110
  font-weight: 400;
111
111
  color: var(--switch-error-color);
112
- } .switch__hint_110yj {
112
+ } .switch__hint_1muot {
113
113
  font-size: 14px;
114
114
  line-height: 18px;
115
115
  font-weight: 400;
116
116
  display: block;
117
- } /* Reversed state */ .switch__component_110yj.switch__reversed_110yj {
117
+ } /* Reversed state */ .switch__component_1muot.switch__reversed_1muot {
118
118
  flex-direction: row-reverse;
119
- } .switch__reversed_110yj .switch__content_110yj {
119
+ } .switch__reversed_1muot .switch__content_1muot {
120
120
  margin-right: var(--gap-16);
121
121
  margin-left: var(--gap-0);
122
- } .switch__reversed_110yj .switch__addons_110yj {
122
+ } .switch__reversed_1muot .switch__addons_1muot {
123
123
  margin-left: var(--gap-0);
124
124
  padding-left: var(--gap-0);
125
125
  margin-right: auto;
126
126
  padding-right: var(--gap-16);
127
- } /* Checked state */ .switch__checked_110yj .switch__switch_110yj:before {
127
+ } /* Checked state */ .switch__checked_1muot .switch__switch_1muot:before {
128
128
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
129
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_110yj {
130
+ } /* Disabled state */ .switch__disabled_1muot {
131
131
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_110yj .switch__switch_110yj {
132
+ } /* Focused state */ .switch__focused_1muot .switch__switch_1muot {
133
133
  outline: 2px solid var(--focus-color);
134
134
  outline-offset: 2px;
135
135
  }
package/inverted.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 6qqvm */
1
+ /* hash: 1f9sy */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
52
- } .switch__switch_u8wl7 {
52
+ } .switch__switch_1fbgj {
53
53
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_u8wl7:hover {
54
+ } .switch__switch_1fbgj:hover {
55
55
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_u8wl7 {
56
+ } .switch__label_1fbgj {
57
57
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_u8wl7 {
58
+ } .switch__hint_1fbgj {
59
59
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_u8wl7 .switch__switch_u8wl7 {
60
+ } .switch__checked_1fbgj .switch__switch_1fbgj {
61
61
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_u8wl7 .switch__switch_u8wl7:hover {
62
+ } .switch__checked_1fbgj .switch__switch_1fbgj:hover {
63
63
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_u8wl7 .switch__label_u8wl7 {
64
+ } .switch__disabled_1fbgj .switch__label_1fbgj {
65
65
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_u8wl7 .switch__hint_u8wl7 {
66
+ } .switch__disabled_1fbgj .switch__hint_1fbgj {
67
67
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_u8wl7 .switch__switch_u8wl7 {
68
+ } .switch__disabled_1fbgj .switch__switch_1fbgj {
69
69
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_u8wl7 .switch__switch_u8wl7:before {
70
+ } .switch__disabled_1fbgj .switch__switch_1fbgj:before {
71
71
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_u8wl7.switch__checked_u8wl7 .switch__switch_u8wl7 {
72
+ } .switch__disabled_1fbgj.switch__checked_1fbgj .switch__switch_1fbgj {
73
73
  background-color: var(--switch-disabled-checked-bg-inverted-color);
74
74
  }
@@ -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_14m20","label":"switch__label_14m20","hint":"switch__hint_14m20","checked":"switch__checked_14m20","disabled":"switch__disabled_14m20"};
7
+ const defaultStyles = {"switch":"switch__switch_1polz","label":"switch__label_1polz","hint":"switch__hint_1polz","checked":"switch__checked_1polz","disabled":"switch__disabled_1polz"};
8
8
  require('./default.css')
9
9
 
10
- const styles = {"component":"switch__component_110yj","start":"switch__start_110yj","center":"switch__center_110yj","addons":"switch__addons_110yj","block":"switch__block_110yj","switch":"switch__switch_110yj","content":"switch__content_110yj","label":"switch__label_110yj","errorMessage":"switch__errorMessage_110yj","hint":"switch__hint_110yj","reversed":"switch__reversed_110yj","checked":"switch__checked_110yj","disabled":"switch__disabled_110yj","focused":"switch__focused_110yj"};
10
+ const styles = {"component":"switch__component_1muot","start":"switch__start_1muot","center":"switch__center_1muot","addons":"switch__addons_1muot","block":"switch__block_1muot","switch":"switch__switch_1muot","content":"switch__content_1muot","label":"switch__label_1muot","errorMessage":"switch__errorMessage_1muot","hint":"switch__hint_1muot","reversed":"switch__reversed_1muot","checked":"switch__checked_1muot","disabled":"switch__disabled_1muot","focused":"switch__focused_1muot"};
11
11
  require('./index.css')
12
12
 
13
- const invertedStyles = {"switch":"switch__switch_u8wl7","label":"switch__label_u8wl7","hint":"switch__hint_u8wl7","checked":"switch__checked_u8wl7","disabled":"switch__disabled_u8wl7"};
13
+ const invertedStyles = {"switch":"switch__switch_1fbgj","label":"switch__label_1fbgj","hint":"switch__hint_1fbgj","checked":"switch__checked_1fbgj","disabled":"switch__disabled_1fbgj"};
14
14
  require('./inverted.css')
15
15
 
16
16
  const colorStyles = {
@@ -1,4 +1,4 @@
1
- /* hash: i5l8h */
1
+ /* hash: 1qonb */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-color: var(--color-light-neutral-translucent-500);
52
- } .switch__switch_14m20 {
52
+ } .switch__switch_1polz {
53
53
  background-color: var(--switch-bg-color)
54
- } .switch__switch_14m20:hover {
54
+ } .switch__switch_1polz:hover {
55
55
  background-color: var(--switch-hover-bg-color);
56
- } .switch__label_14m20 {
56
+ } .switch__label_1polz {
57
57
  color: var(--switch-label-color);
58
- } .switch__hint_14m20 {
58
+ } .switch__hint_1polz {
59
59
  color: var(--switch-hint-color);
60
- } .switch__checked_14m20 .switch__switch_14m20 {
60
+ } .switch__checked_1polz .switch__switch_1polz {
61
61
  background-color: var(--switch-checked-bg-color)
62
- } .switch__checked_14m20 .switch__switch_14m20:hover {
62
+ } .switch__checked_1polz .switch__switch_1polz:hover {
63
63
  background-color: var(--switch-checked-hover-bg-color);
64
- } .switch__disabled_14m20 .switch__label_14m20 {
64
+ } .switch__disabled_1polz .switch__label_1polz {
65
65
  color: var(--switch-disabled-color);
66
- } .switch__disabled_14m20 .switch__hint_14m20 {
66
+ } .switch__disabled_1polz .switch__hint_1polz {
67
67
  color: var(--switch-disabled-color);
68
- } .switch__disabled_14m20 .switch__switch_14m20 {
68
+ } .switch__disabled_1polz .switch__switch_1polz {
69
69
  background-color: var(--switch-disabled-bg-color)
70
- } .switch__disabled_14m20 .switch__switch_14m20:before {
70
+ } .switch__disabled_1polz .switch__switch_1polz:before {
71
71
  background-color: var(--switch-icon-disabled-color);
72
- } .switch__disabled_14m20.switch__checked_14m20 .switch__switch_14m20 {
72
+ } .switch__disabled_1polz.switch__checked_1polz .switch__switch_1polz {
73
73
  background-color: var(--switch-disabled-checked-bg-color);
74
74
  }
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: c39sc */
1
+ /* hash: y0953 */
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;
@@ -51,7 +51,7 @@
51
51
 
52
52
  /* icon */
53
53
  --switch-icon-color: var(--color-static-neutral-0);
54
- } .switch__component_110yj {
54
+ } .switch__component_1muot {
55
55
  display: inline-flex;
56
56
  align-items: flex-start;
57
57
  margin: var(--gap-0);
@@ -59,20 +59,20 @@
59
59
  border: 0;
60
60
  cursor: pointer;
61
61
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
62
- } .switch__component_110yj input {
62
+ } .switch__component_1muot input {
63
63
  opacity: 0;
64
64
  position: absolute;
65
- } .switch__start_110yj {
65
+ } .switch__start_1muot {
66
66
  align-items: flex-start;
67
- } .switch__center_110yj {
67
+ } .switch__center_1muot {
68
68
  align-items: center;
69
- } .switch__addons_110yj {
69
+ } .switch__addons_1muot {
70
70
  margin-left: auto;
71
71
  padding-left: var(--gap-16);
72
72
  line-height: 24px;
73
- } .switch__block_110yj {
73
+ } .switch__block_1muot {
74
74
  width: 100%;
75
- } .switch__switch_110yj {
75
+ } .switch__switch_1muot {
76
76
  position: relative;
77
77
  border-radius: var(--border-radius-16);
78
78
  width: 36px;
@@ -82,7 +82,7 @@
82
82
  border: 2px solid var(--switch-border-color);
83
83
  transition: background-color 0.2s ease, border-color 0.2s ease;
84
84
  box-sizing: border-box;
85
- } .switch__switch_110yj:before {
85
+ } .switch__switch_1muot:before {
86
86
  content: '';
87
87
  position: absolute;
88
88
  top: var(--gap-0);
@@ -94,42 +94,42 @@
94
94
  background-color: var(--switch-icon-color);
95
95
  box-sizing: border-box;
96
96
  transition: transform 0.2s ease;
97
- } .switch__content_110yj {
97
+ } .switch__content_1muot {
98
98
  margin-left: var(--gap-12);
99
99
  flex-grow: 1;
100
- } .switch__label_110yj {
100
+ } .switch__label_1muot {
101
101
  font-size: 16px;
102
102
  line-height: 24px;
103
103
  font-weight: 400;
104
104
  display: block;
105
- } .switch__label_110yj:not(:only-child) {
105
+ } .switch__label_1muot:not(:only-child) {
106
106
  margin-bottom: var(--gap-4);
107
- } .switch__errorMessage_110yj {
107
+ } .switch__errorMessage_1muot {
108
108
  font-size: 14px;
109
109
  line-height: 18px;
110
110
  font-weight: 400;
111
111
  color: var(--switch-error-color);
112
- } .switch__hint_110yj {
112
+ } .switch__hint_1muot {
113
113
  font-size: 14px;
114
114
  line-height: 18px;
115
115
  font-weight: 400;
116
116
  display: block;
117
- } /* Reversed state */ .switch__component_110yj.switch__reversed_110yj {
117
+ } /* Reversed state */ .switch__component_1muot.switch__reversed_1muot {
118
118
  flex-direction: row-reverse;
119
- } .switch__reversed_110yj .switch__content_110yj {
119
+ } .switch__reversed_1muot .switch__content_1muot {
120
120
  margin-right: var(--gap-16);
121
121
  margin-left: var(--gap-0);
122
- } .switch__reversed_110yj .switch__addons_110yj {
122
+ } .switch__reversed_1muot .switch__addons_1muot {
123
123
  margin-left: var(--gap-0);
124
124
  padding-left: var(--gap-0);
125
125
  margin-right: auto;
126
126
  padding-right: var(--gap-16);
127
- } /* Checked state */ .switch__checked_110yj .switch__switch_110yj:before {
127
+ } /* Checked state */ .switch__checked_1muot .switch__switch_1muot:before {
128
128
  /* ширина компонента(36px + 2*2px) - отступы(2 * 2px) - размер кружка(20px) */
129
129
  transform: translateX(16px);
130
- } /* Disabled state */ .switch__disabled_110yj {
130
+ } /* Disabled state */ .switch__disabled_1muot {
131
131
  cursor: var(--disabled-cursor);
132
- } /* Focused state */ .switch__focused_110yj .switch__switch_110yj {
132
+ } /* Focused state */ .switch__focused_1muot .switch__switch_1muot {
133
133
  outline: 2px solid var(--focus-color);
134
134
  outline-offset: 2px;
135
135
  }
@@ -1,4 +1,4 @@
1
- /* hash: 6qqvm */
1
+ /* hash: 1f9sy */
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);
@@ -49,26 +49,26 @@
49
49
 
50
50
  /* icon */
51
51
  --switch-icon-disabled-inverted-color: var(--color-light-neutral-translucent-500-inverted);
52
- } .switch__switch_u8wl7 {
52
+ } .switch__switch_1fbgj {
53
53
  background-color: var(--switch-bg-inverted-color)
54
- } .switch__switch_u8wl7:hover {
54
+ } .switch__switch_1fbgj:hover {
55
55
  background-color: var(--switch-hover-bg-inverted-color);
56
- } .switch__label_u8wl7 {
56
+ } .switch__label_1fbgj {
57
57
  color: var(--switch-label-inverted-color);
58
- } .switch__hint_u8wl7 {
58
+ } .switch__hint_1fbgj {
59
59
  color: var(--switch-hint-inverted-color);
60
- } .switch__checked_u8wl7 .switch__switch_u8wl7 {
60
+ } .switch__checked_1fbgj .switch__switch_1fbgj {
61
61
  background-color: var(--switch-checked-bg-inverted-color)
62
- } .switch__checked_u8wl7 .switch__switch_u8wl7:hover {
62
+ } .switch__checked_1fbgj .switch__switch_1fbgj:hover {
63
63
  background-color: var(--switch-checked-hover-bg-inverted-color);
64
- } .switch__disabled_u8wl7 .switch__label_u8wl7 {
64
+ } .switch__disabled_1fbgj .switch__label_1fbgj {
65
65
  color: var(--switch-disabled-inverted-color);
66
- } .switch__disabled_u8wl7 .switch__hint_u8wl7 {
66
+ } .switch__disabled_1fbgj .switch__hint_1fbgj {
67
67
  color: var(--switch-disabled-inverted-color);
68
- } .switch__disabled_u8wl7 .switch__switch_u8wl7 {
68
+ } .switch__disabled_1fbgj .switch__switch_1fbgj {
69
69
  background-color: var(--switch-disabled-bg-inverted-color)
70
- } .switch__disabled_u8wl7 .switch__switch_u8wl7:before {
70
+ } .switch__disabled_1fbgj .switch__switch_1fbgj:before {
71
71
  background-color: var(--switch-icon-disabled-inverted-color);
72
- } .switch__disabled_u8wl7.switch__checked_u8wl7 .switch__switch_u8wl7 {
72
+ } .switch__disabled_1fbgj.switch__checked_1fbgj .switch__switch_1fbgj {
73
73
  background-color: var(--switch-disabled-checked-bg-inverted-color);
74
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-switch",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "",
5
5
  "gitHead": "f054fef20200664c65e2501ef1f916c555cdf05d",
6
6
  "keywords": [],
@@ -21,6 +21,6 @@
21
21
  "react-merge-refs": "^1.1.0",
22
22
  "tslib": "^2.4.0"
23
23
  },
24
- "themesVersion": "13.4.0",
25
- "varsVersion": "9.13.1"
24
+ "themesVersion": "13.5.0",
25
+ "varsVersion": "9.15.0"
26
26
  }