@hh.ru/magritte-ui-switch 2.0.60 → 2.0.62

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_2-0-60","slider":"magritte-slider___YN62u_2-0-60","checked":"magritte-checked___QEAn5_2-0-60","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-60","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-60"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_2-0-62","slider":"magritte-slider___YN62u_2-0-62","checked":"magritte-checked___QEAn5_2-0-62","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-62","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-62"};
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-DoMkjQIx.js.map
12
+ //# sourceMappingURL=Skeleton-Cvq3XpnY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-DoMkjQIx.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-Cvq3XpnY.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-DoMkjQIx.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-Cvq3XpnY.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-DoMkjQIx.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-Cvq3XpnY.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
@@ -46,46 +46,46 @@
46
46
  --magritte-shadow-level-1-blur-v22-0-0:12px;
47
47
  --magritte-shadow-level-1-spread-v22-0-0:0px;
48
48
  }
49
- .magritte-switch___0AZYC_2-0-60{
50
- width:56px;
51
- height:36px;
49
+ .magritte-switch___0AZYC_2-0-62{
50
+ width:52px;
51
+ height:32px;
52
52
  background-color:var(--magritte-color-component-switch-background-container-unchecked-v22-0-0);
53
- border-radius:18px;
53
+ border-radius:16px;
54
54
  cursor:pointer;
55
55
  position:relative;
56
56
  }
57
- .magritte-switch___0AZYC_2-0-60:active:not(:disabled){
57
+ .magritte-switch___0AZYC_2-0-62:active:not(:disabled){
58
58
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v22-0-0);
59
59
  }
60
- .magritte-switch___0AZYC_2-0-60:active:not(:disabled) .magritte-slider___YN62u_2-0-60{
60
+ .magritte-switch___0AZYC_2-0-62:active:not(:disabled) .magritte-slider___YN62u_2-0-62{
61
61
  border-radius:14px;
62
62
  background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v22-0-0);
63
- width:36px;
63
+ width:32px;
64
64
  }
65
- .magritte-switch___0AZYC_2-0-60:disabled{
65
+ .magritte-switch___0AZYC_2-0-62:disabled{
66
66
  cursor:not-allowed;
67
67
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v22-0-0);
68
68
  border-radius:20px;
69
69
  }
70
- .magritte-switch___0AZYC_2-0-60:disabled.magritte-checked___QEAn5_2-0-60{
70
+ .magritte-switch___0AZYC_2-0-62:disabled.magritte-checked___QEAn5_2-0-62{
71
71
  background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v22-0-0);
72
72
  }
73
- .magritte-switch___0AZYC_2-0-60.focus-visible{
73
+ .magritte-switch___0AZYC_2-0-62.focus-visible{
74
74
  outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v22-0-0) solid 4px;
75
75
  }
76
76
  @media (min-width: 1020px){
77
- body.magritte-old-layout .magritte-switch___0AZYC_2-0-60:hover:not(:disabled):not(:active){
77
+ body.magritte-old-layout .magritte-switch___0AZYC_2-0-62:hover:not(:disabled):not(:active){
78
78
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v22-0-0);
79
79
  }
80
80
  }
81
81
  @media (min-width: 1024px){
82
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-60:hover:not(:disabled):not(:active){
82
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-62:hover:not(:disabled):not(:active){
83
83
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v22-0-0);
84
84
  }
85
85
  }
86
- .magritte-slider___YN62u_2-0-60{
87
- width:28px;
88
- height:28px;
86
+ .magritte-slider___YN62u_2-0-62{
87
+ width:24px;
88
+ height:24px;
89
89
  background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v22-0-0);
90
90
  border-radius:50%;
91
91
  position:absolute;
@@ -101,34 +101,34 @@
101
101
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v22-0-0);
102
102
  box-shadow:var(--magritte-shadow-level-1-x-v22-0-0) var(--magritte-shadow-level-1-y-v22-0-0) var(--magritte-shadow-level-1-blur-v22-0-0) var(--magritte-shadow-level-1-spread-v22-0-0) var(--magritte-shadow-level-1-color-v22-0-0);
103
103
  }
104
- .magritte-checked___QEAn5_2-0-60{
104
+ .magritte-checked___QEAn5_2-0-62{
105
105
  background-color:var(--magritte-color-component-switch-background-container-checked-v22-0-0);
106
106
  }
107
- .magritte-checked___QEAn5_2-0-60 .magritte-slider___YN62u_2-0-60{
107
+ .magritte-checked___QEAn5_2-0-62 .magritte-slider___YN62u_2-0-62{
108
108
  background-color:var(--magritte-color-component-switch-background-toggle-checked-v22-0-0);
109
- left:calc(56px - (28px + 4px*2));
109
+ left:calc(52px - (24px + 4px*2));
110
110
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v22-0-0);
111
111
  }
112
- .magritte-checked___QEAn5_2-0-60:active:not(:disabled){
112
+ .magritte-checked___QEAn5_2-0-62:active:not(:disabled){
113
113
  background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v22-0-0);
114
114
  }
115
- .magritte-checked___QEAn5_2-0-60:active:not(:disabled) .magritte-slider___YN62u_2-0-60{
115
+ .magritte-checked___QEAn5_2-0-62:active:not(:disabled) .magritte-slider___YN62u_2-0-62{
116
116
  background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v22-0-0);
117
- width:36px;
118
- left:calc(56px - (36px + 4px*2));
117
+ width:32px;
118
+ left:calc(52px - (32px + 4px*2));
119
119
  }
120
120
  @media (min-width: 1020px){
121
- body.magritte-old-layout .magritte-checked___QEAn5_2-0-60:hover:not(:disabled):not(:active){
121
+ body.magritte-old-layout .magritte-checked___QEAn5_2-0-62:hover:not(:disabled):not(:active){
122
122
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v22-0-0);
123
123
  }
124
124
  }
125
125
  @media (min-width: 1024px){
126
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-60:hover:not(:disabled):not(:active){
126
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-62:hover:not(:disabled):not(:active){
127
127
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v22-0-0);
128
128
  }
129
129
  }
130
- .magritte-switch-skeleton___g1MEY_2-0-60{
131
- width:56px;
132
- height:36px;
133
- border-radius:18px;
130
+ .magritte-switch-skeleton___g1MEY_2-0-62{
131
+ width:52px;
132
+ height:32px;
133
+ border-radius:16px;
134
134
  }
package/index.js CHANGED
@@ -6,5 +6,5 @@ import 'classnames';
6
6
  import '@hh.ru/magritte-common-use-disabled';
7
7
  import '@hh.ru/magritte-ui-icon/icon';
8
8
  import '@hh.ru/magritte-ui-skeleton';
9
- import './Skeleton-DoMkjQIx.js';
9
+ import './Skeleton-Cvq3XpnY.js';
10
10
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-switch",
3
- "version": "2.0.60",
3
+ "version": "2.0.62",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -22,7 +22,7 @@
22
22
  "@hh.ru/magritte-common-use-disabled": "1.0.12",
23
23
  "@hh.ru/magritte-design-tokens": "22.0.0",
24
24
  "@hh.ru/magritte-ui-breakpoint": "5.0.3",
25
- "@hh.ru/magritte-ui-icon": "11.0.13",
25
+ "@hh.ru/magritte-ui-icon": "11.0.14",
26
26
  "@hh.ru/magritte-ui-skeleton": "2.1.37",
27
27
  "@hh.ru/magritte-ui-theme-provider": "1.1.51"
28
28
  },
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "1b6b5c9c24a432af6e815388099e856eeda3caaf"
36
+ "gitHead": "2ebd6df9d1b2345f196790e097db803ad4575c51"
37
37
  }