@hh.ru/magritte-ui-switch 3.0.22 → 3.0.24

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.
@@ -2,11 +2,11 @@ import './index.css';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { Skeleton } from '@hh.ru/magritte-ui-skeleton';
4
4
 
5
- var styles = {"switch":"magritte-switch___0AZYC_3-0-22","slider":"magritte-slider___YN62u_3-0-22","checked":"magritte-checked___QEAn5_3-0-22","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-22","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-22"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_3-0-24","slider":"magritte-slider___YN62u_3-0-24","checked":"magritte-checked___QEAn5_3-0-24","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-24","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-24"};
6
6
 
7
7
  const SwitchSkeleton = ({ Component: Switch,
8
8
  // skeleton props
9
9
  width, height, borderRadius, inline, additionalClass, loading, ...switchProps }) => (jsx(Skeleton, { loading: loading, additionalClass: styles.switchSkeleton, inline: true, children: jsx(Switch, { ...switchProps }) }));
10
10
 
11
11
  export { SwitchSkeleton as S, styles as s };
12
- //# sourceMappingURL=Skeleton-BpyP0WwI.js.map
12
+ //# sourceMappingURL=Skeleton-BnJDiVbb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-BpyP0WwI.js","sources":["../src/Skeleton.tsx"],"sourcesContent":["import { IncompleteSkeletonComponent, Skeleton } from '@hh.ru/magritte-ui-skeleton';\nimport { SwitchProps } from '@hh.ru/magritte-ui-switch/types';\n\nimport styles from './switch.less';\n\nexport const SwitchSkeleton: IncompleteSkeletonComponent<SwitchProps> = ({\n Component: Switch,\n\n // skeleton props\n width,\n height,\n borderRadius,\n inline,\n additionalClass,\n loading,\n\n ...switchProps\n}) => (\n <Skeleton loading={loading} additionalClass={styles.switchSkeleton} inline>\n <Switch {...switchProps} />\n </Skeleton>\n);\n"],"names":["_jsx"],"mappings":";;;;;MAKa,cAAc,GAA6C,CAAC,EACrE,SAAS,EAAE,MAAM;AAEjB;AACA,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EAEP,GAAG,WAAW,EACjB,MACGA,GAAC,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAA,IAAA,EAAA,QAAA,EACtEA,IAAC,MAAM,EAAA,EAAA,GAAK,WAAW,EAAI,CAAA,EAAA,CACpB;;;;"}
1
+ {"version":3,"file":"Skeleton-BnJDiVbb.js","sources":["../src/Skeleton.tsx"],"sourcesContent":["import { IncompleteSkeletonComponent, Skeleton } from '@hh.ru/magritte-ui-skeleton';\nimport { SwitchProps } from '@hh.ru/magritte-ui-switch/types';\n\nimport styles from './switch.less';\n\nexport const SwitchSkeleton: IncompleteSkeletonComponent<SwitchProps> = ({\n Component: Switch,\n\n // skeleton props\n width,\n height,\n borderRadius,\n inline,\n additionalClass,\n loading,\n\n ...switchProps\n}) => (\n <Skeleton loading={loading} additionalClass={styles.switchSkeleton} inline>\n <Switch {...switchProps} />\n </Skeleton>\n);\n"],"names":["_jsx"],"mappings":";;;;;MAKa,cAAc,GAA6C,CAAC,EACrE,SAAS,EAAE,MAAM;AAEjB;AACA,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EAEP,GAAG,WAAW,EACjB,MACGA,GAAC,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAA,IAAA,EAAA,QAAA,EACtEA,IAAC,MAAM,EAAA,EAAA,GAAK,WAAW,EAAI,CAAA,EAAA,CACpB;;;;"}
package/Skeleton.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './index.css';
2
2
  import 'react/jsx-runtime';
3
3
  import '@hh.ru/magritte-ui-skeleton';
4
- export { S as SwitchSkeleton } from './Skeleton-BpyP0WwI.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-BnJDiVbb.js';
5
5
  //# sourceMappingURL=Skeleton.js.map
package/Switch.js CHANGED
@@ -4,7 +4,7 @@ import classnames from 'classnames';
4
4
  import { useDisabled } from '@hh.ru/magritte-common-use-disabled';
5
5
  import { LockClosedFilledSize16 } from '@hh.ru/magritte-ui-icon/icon';
6
6
  import { enrichWithSkeleton } from '@hh.ru/magritte-ui-skeleton';
7
- import { S as SwitchSkeleton, s as styles } from './Skeleton-BpyP0WwI.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-BnJDiVbb.js';
8
8
 
9
9
  const SwitchComponent = ({ onClick, 'aria-label': ariaLabel, disabled = false, checked = false, ...props }) => {
10
10
  const forceDisabled = useDisabled();
package/index.css CHANGED
@@ -1,120 +1,120 @@
1
1
  :root{
2
- --magritte-color-component-switch-stroke-state-focused-accessible-v24-0-2:#0070ff7a;
3
- --magritte-color-component-switch-background-container-checked-v24-0-2:#0dc267;
4
- --magritte-color-component-switch-background-container-unchecked-v24-0-2:#DCE3EB;
5
- --magritte-color-component-switch-background-toggle-checked-v24-0-2:#ffffff;
6
- --magritte-color-component-switch-background-toggle-unchecked-v24-0-2:#ffffff;
7
- --magritte-color-component-switch-background-state-container-checked-hovered-v24-0-2:#5bcf83;
8
- --magritte-color-component-switch-background-state-container-checked-pressed-v24-0-2:#5bcf83;
9
- --magritte-color-component-switch-background-state-container-unchecked-hovered-v24-0-2:#CCD5DF;
10
- --magritte-color-component-switch-background-state-container-unchecked-pressed-v24-0-2:#CCD5DF;
11
- --magritte-color-component-switch-background-state-toggle-checked-pressed-v24-0-2:#ffffff;
12
- --magritte-color-component-switch-background-state-toggle-unchecked-pressed-v24-0-2:#ffffff;
13
- --magritte-color-component-switch-background-state-container-checked-disabled-v24-0-2:#0dc2677a;
14
- --magritte-color-component-switch-background-state-container-unchecked-disabled-v24-0-2:#dce3eb7a;
15
- --magritte-color-component-switch-icon-state-toggle-checked-disabled-v24-0-2:#0ea6587a;
16
- --magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v24-0-2:#7686947a;
17
- --magritte-shadow-level-1-color-v24-0-2:#7090b029;
18
- --magritte-shadow-level-1-x-v24-0-2:0px;
19
- --magritte-shadow-level-1-y-v24-0-2:4px;
20
- --magritte-shadow-level-1-blur-v24-0-2:12px;
21
- --magritte-shadow-level-1-spread-v24-0-2:0px;
2
+ --magritte-color-component-switch-stroke-state-focused-accessible-v24-1-0:#0070ff7a;
3
+ --magritte-color-component-switch-background-container-checked-v24-1-0:#0dc267;
4
+ --magritte-color-component-switch-background-container-unchecked-v24-1-0:#DCE3EB;
5
+ --magritte-color-component-switch-background-toggle-checked-v24-1-0:#ffffff;
6
+ --magritte-color-component-switch-background-toggle-unchecked-v24-1-0:#ffffff;
7
+ --magritte-color-component-switch-background-state-container-checked-hovered-v24-1-0:#5bcf83;
8
+ --magritte-color-component-switch-background-state-container-checked-pressed-v24-1-0:#5bcf83;
9
+ --magritte-color-component-switch-background-state-container-unchecked-hovered-v24-1-0:#CCD5DF;
10
+ --magritte-color-component-switch-background-state-container-unchecked-pressed-v24-1-0:#CCD5DF;
11
+ --magritte-color-component-switch-background-state-toggle-checked-pressed-v24-1-0:#ffffff;
12
+ --magritte-color-component-switch-background-state-toggle-unchecked-pressed-v24-1-0:#ffffff;
13
+ --magritte-color-component-switch-background-state-container-checked-disabled-v24-1-0:#0dc2677a;
14
+ --magritte-color-component-switch-background-state-container-unchecked-disabled-v24-1-0:#dce3eb7a;
15
+ --magritte-color-component-switch-icon-state-toggle-checked-disabled-v24-1-0:#0ea6587a;
16
+ --magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v24-1-0:#7686947a;
17
+ --magritte-shadow-level-1-color-v24-1-0:#7090b029;
18
+ --magritte-shadow-level-1-x-v24-1-0:0px;
19
+ --magritte-shadow-level-1-y-v24-1-0:4px;
20
+ --magritte-shadow-level-1-blur-v24-1-0:12px;
21
+ --magritte-shadow-level-1-spread-v24-1-0:0px;
22
22
  }
23
23
 
24
24
  :root{
25
- --magritte-semantic-animation-ease-in-out-leopard-300-timing-function-v24-0-2:cubic-bezier(0.35, 0.1, 0.1, 1);
26
- --magritte-semantic-animation-ease-in-out-leopard-300-duration-v24-0-2:300ms;
25
+ --magritte-semantic-animation-ease-in-out-leopard-300-timing-function-v24-1-0:cubic-bezier(0.35, 0.1, 0.1, 1);
26
+ --magritte-semantic-animation-ease-in-out-leopard-300-duration-v24-1-0:300ms;
27
27
  }
28
28
 
29
29
  .magritte-night-theme{
30
- --magritte-color-component-switch-background-container-unchecked-v24-0-2:#303030;
31
- --magritte-color-component-switch-background-state-container-unchecked-hovered-v24-0-2:#3B3B3B;
32
- --magritte-color-component-switch-background-state-container-unchecked-pressed-v24-0-2:#3B3B3B;
33
- --magritte-color-component-switch-background-state-container-unchecked-disabled-v24-0-2:#3030307a;
34
- --magritte-shadow-level-1-color-v24-0-2:#00000029;
30
+ --magritte-color-component-switch-background-container-unchecked-v24-1-0:#303030;
31
+ --magritte-color-component-switch-background-state-container-unchecked-hovered-v24-1-0:#3B3B3B;
32
+ --magritte-color-component-switch-background-state-container-unchecked-pressed-v24-1-0:#3B3B3B;
33
+ --magritte-color-component-switch-background-state-container-unchecked-disabled-v24-1-0:#3030307a;
34
+ --magritte-shadow-level-1-color-v24-1-0:#00000029;
35
35
  }
36
- .magritte-switch___0AZYC_3-0-22{
36
+ .magritte-switch___0AZYC_3-0-24{
37
37
  width:52px;
38
38
  height:32px;
39
- background-color:var(--magritte-color-component-switch-background-container-unchecked-v24-0-2);
39
+ background-color:var(--magritte-color-component-switch-background-container-unchecked-v24-1-0);
40
40
  border-radius:16px;
41
41
  cursor:pointer;
42
42
  position:relative;
43
43
  }
44
- .magritte-switch___0AZYC_3-0-22:active:not(:disabled){
45
- background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v24-0-2);
44
+ .magritte-switch___0AZYC_3-0-24:active:not(:disabled){
45
+ background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v24-1-0);
46
46
  }
47
- .magritte-switch___0AZYC_3-0-22:active:not(:disabled) .magritte-slider___YN62u_3-0-22{
47
+ .magritte-switch___0AZYC_3-0-24:active:not(:disabled) .magritte-slider___YN62u_3-0-24{
48
48
  border-radius:14px;
49
- background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v24-0-2);
49
+ background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v24-1-0);
50
50
  width:32px;
51
51
  }
52
- .magritte-switch___0AZYC_3-0-22:disabled{
52
+ .magritte-switch___0AZYC_3-0-24:disabled{
53
53
  cursor:not-allowed;
54
- background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v24-0-2);
54
+ background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v24-1-0);
55
55
  border-radius:20px;
56
56
  }
57
- .magritte-switch___0AZYC_3-0-22:disabled.magritte-checked___QEAn5_3-0-22{
58
- background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v24-0-2);
57
+ .magritte-switch___0AZYC_3-0-24:disabled.magritte-checked___QEAn5_3-0-24{
58
+ background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v24-1-0);
59
59
  }
60
- .magritte-switch___0AZYC_3-0-22.focus-visible{
61
- outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v24-0-2) solid 4px;
60
+ .magritte-switch___0AZYC_3-0-24.focus-visible{
61
+ outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v24-1-0) solid 4px;
62
62
  }
63
63
  @media (min-width: 1020px){
64
- body.magritte-old-layout .magritte-switch___0AZYC_3-0-22:hover:not(:disabled):not(:active){
65
- background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v24-0-2);
64
+ body.magritte-old-layout .magritte-switch___0AZYC_3-0-24:hover:not(:disabled):not(:active){
65
+ background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v24-1-0);
66
66
  }
67
67
  }
68
68
  @media (min-width: 1024px){
69
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-22:hover:not(:disabled):not(:active){
70
- background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v24-0-2);
69
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-24:hover:not(:disabled):not(:active){
70
+ background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v24-1-0);
71
71
  }
72
72
  }
73
- .magritte-slider___YN62u_3-0-22{
73
+ .magritte-slider___YN62u_3-0-24{
74
74
  width:24px;
75
75
  height:24px;
76
- background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v24-0-2);
76
+ background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v24-1-0);
77
77
  border-radius:50%;
78
78
  position:absolute;
79
79
  left:0;
80
80
  right:auto;
81
81
  top:0;
82
- transition-duration:var(--magritte-semantic-animation-ease-in-out-leopard-300-duration-v24-0-2);
83
- transition-timing-function:var(--magritte-semantic-animation-ease-in-out-leopard-300-timing-function-v24-0-2);
82
+ transition-duration:var(--magritte-semantic-animation-ease-in-out-leopard-300-duration-v24-1-0);
83
+ transition-timing-function:var(--magritte-semantic-animation-ease-in-out-leopard-300-timing-function-v24-1-0);
84
84
  margin:4px;
85
85
  display:flex;
86
86
  justify-content:center;
87
87
  align-items:center;
88
- --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v24-0-2);
89
- box-shadow:var(--magritte-shadow-level-1-x-v24-0-2) var(--magritte-shadow-level-1-y-v24-0-2) var(--magritte-shadow-level-1-blur-v24-0-2) var(--magritte-shadow-level-1-spread-v24-0-2) var(--magritte-shadow-level-1-color-v24-0-2);
88
+ --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v24-1-0);
89
+ box-shadow:var(--magritte-shadow-level-1-x-v24-1-0) var(--magritte-shadow-level-1-y-v24-1-0) var(--magritte-shadow-level-1-blur-v24-1-0) var(--magritte-shadow-level-1-spread-v24-1-0) var(--magritte-shadow-level-1-color-v24-1-0);
90
90
  }
91
- .magritte-checked___QEAn5_3-0-22{
92
- background-color:var(--magritte-color-component-switch-background-container-checked-v24-0-2);
91
+ .magritte-checked___QEAn5_3-0-24{
92
+ background-color:var(--magritte-color-component-switch-background-container-checked-v24-1-0);
93
93
  }
94
- .magritte-checked___QEAn5_3-0-22 .magritte-slider___YN62u_3-0-22{
95
- background-color:var(--magritte-color-component-switch-background-toggle-checked-v24-0-2);
94
+ .magritte-checked___QEAn5_3-0-24 .magritte-slider___YN62u_3-0-24{
95
+ background-color:var(--magritte-color-component-switch-background-toggle-checked-v24-1-0);
96
96
  left:calc(52px - (24px + 4px*2));
97
- --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v24-0-2);
97
+ --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v24-1-0);
98
98
  }
99
- .magritte-checked___QEAn5_3-0-22:active:not(:disabled){
100
- background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v24-0-2);
99
+ .magritte-checked___QEAn5_3-0-24:active:not(:disabled){
100
+ background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v24-1-0);
101
101
  }
102
- .magritte-checked___QEAn5_3-0-22:active:not(:disabled) .magritte-slider___YN62u_3-0-22{
103
- background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v24-0-2);
102
+ .magritte-checked___QEAn5_3-0-24:active:not(:disabled) .magritte-slider___YN62u_3-0-24{
103
+ background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v24-1-0);
104
104
  width:32px;
105
105
  left:calc(52px - (32px + 4px*2));
106
106
  }
107
107
  @media (min-width: 1020px){
108
- body.magritte-old-layout .magritte-checked___QEAn5_3-0-22:hover:not(:disabled):not(:active){
109
- background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v24-0-2);
108
+ body.magritte-old-layout .magritte-checked___QEAn5_3-0-24:hover:not(:disabled):not(:active){
109
+ background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v24-1-0);
110
110
  }
111
111
  }
112
112
  @media (min-width: 1024px){
113
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-22:hover:not(:disabled):not(:active){
114
- background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v24-0-2);
113
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-24:hover:not(:disabled):not(:active){
114
+ background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v24-1-0);
115
115
  }
116
116
  }
117
- .magritte-switch-skeleton___g1MEY_3-0-22{
117
+ .magritte-switch-skeleton___g1MEY_3-0-24{
118
118
  width:52px;
119
119
  height:32px;
120
120
  border-radius:16px;
package/index.js CHANGED
@@ -5,5 +5,5 @@ import 'classnames';
5
5
  import '@hh.ru/magritte-common-use-disabled';
6
6
  import '@hh.ru/magritte-ui-icon/icon';
7
7
  import '@hh.ru/magritte-ui-skeleton';
8
- import './Skeleton-BpyP0WwI.js';
8
+ import './Skeleton-BnJDiVbb.js';
9
9
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-switch",
3
- "version": "3.0.22",
3
+ "version": "3.0.24",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@hh.ru/magritte-common-use-disabled": "1.0.14",
23
- "@hh.ru/magritte-design-tokens": "24.0.2",
23
+ "@hh.ru/magritte-design-tokens": "24.1.0",
24
24
  "@hh.ru/magritte-ui-breakpoint": "6.0.2",
25
- "@hh.ru/magritte-ui-icon": "13.5.0",
26
- "@hh.ru/magritte-ui-skeleton": "3.0.11"
25
+ "@hh.ru/magritte-ui-icon": "13.5.2",
26
+ "@hh.ru/magritte-ui-skeleton": "3.0.12"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "classnames": ">=2.3.2",
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "812fec4021409ff4073989b4823e113a24812f41"
35
+ "gitHead": "bcc47002e5afb62cdb3f71fee209867b84407086"
36
36
  }