@hh.ru/magritte-ui-switch 2.0.41 → 2.0.42

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-41","slider":"magritte-slider___YN62u_2-0-41","checked":"magritte-checked___QEAn5_2-0-41","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-41","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-41"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_2-0-42","slider":"magritte-slider___YN62u_2-0-42","checked":"magritte-checked___QEAn5_2-0-42","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-42","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-42"};
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-CCWZ3lCQ.js.map
12
+ //# sourceMappingURL=Skeleton-C1pBA26p.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-CCWZ3lCQ.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-C1pBA26p.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-CCWZ3lCQ.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-C1pBA26p.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-CCWZ3lCQ.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-C1pBA26p.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,7 +46,7 @@
46
46
  --magritte-shadow-level-1-blur-v21-3-2:12px;
47
47
  --magritte-shadow-level-1-spread-v21-3-2:0px;
48
48
  }
49
- .magritte-switch___0AZYC_2-0-41{
49
+ .magritte-switch___0AZYC_2-0-42{
50
50
  width:56px;
51
51
  height:36px;
52
52
  background-color:var(--magritte-color-component-switch-background-container-unchecked-v21-3-2);
@@ -54,36 +54,36 @@
54
54
  cursor:pointer;
55
55
  position:relative;
56
56
  }
57
- .magritte-switch___0AZYC_2-0-41:active:not(:disabled){
57
+ .magritte-switch___0AZYC_2-0-42:active:not(:disabled){
58
58
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v21-3-2);
59
59
  }
60
- .magritte-switch___0AZYC_2-0-41:active:not(:disabled) .magritte-slider___YN62u_2-0-41{
60
+ .magritte-switch___0AZYC_2-0-42:active:not(:disabled) .magritte-slider___YN62u_2-0-42{
61
61
  border-radius:14px;
62
62
  background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v21-3-2);
63
63
  width:36px;
64
64
  }
65
- .magritte-switch___0AZYC_2-0-41:disabled{
65
+ .magritte-switch___0AZYC_2-0-42:disabled{
66
66
  cursor:not-allowed;
67
67
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v21-3-2);
68
68
  border-radius:20px;
69
69
  }
70
- .magritte-switch___0AZYC_2-0-41:disabled.magritte-checked___QEAn5_2-0-41{
70
+ .magritte-switch___0AZYC_2-0-42:disabled.magritte-checked___QEAn5_2-0-42{
71
71
  background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v21-3-2);
72
72
  }
73
- .magritte-switch___0AZYC_2-0-41.focus-visible{
73
+ .magritte-switch___0AZYC_2-0-42.focus-visible{
74
74
  outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v21-3-2) solid 4px;
75
75
  }
76
76
  @media (min-width: 1020px){
77
- body.magritte-old-layout .magritte-switch___0AZYC_2-0-41:hover:not(:disabled):not(:active){
77
+ body.magritte-old-layout .magritte-switch___0AZYC_2-0-42:hover:not(:disabled):not(:active){
78
78
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v21-3-2);
79
79
  }
80
80
  }
81
81
  @media (min-width: 1024px){
82
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-41:hover:not(:disabled):not(:active){
82
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-42:hover:not(:disabled):not(:active){
83
83
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v21-3-2);
84
84
  }
85
85
  }
86
- .magritte-slider___YN62u_2-0-41{
86
+ .magritte-slider___YN62u_2-0-42{
87
87
  width:28px;
88
88
  height:28px;
89
89
  background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v21-3-2);
@@ -101,33 +101,33 @@
101
101
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v21-3-2);
102
102
  box-shadow:var(--magritte-shadow-level-1-x-v21-3-2) var(--magritte-shadow-level-1-y-v21-3-2) var(--magritte-shadow-level-1-blur-v21-3-2) var(--magritte-shadow-level-1-spread-v21-3-2) var(--magritte-shadow-level-1-color-v21-3-2);
103
103
  }
104
- .magritte-checked___QEAn5_2-0-41{
104
+ .magritte-checked___QEAn5_2-0-42{
105
105
  background-color:var(--magritte-color-component-switch-background-container-checked-v21-3-2);
106
106
  }
107
- .magritte-checked___QEAn5_2-0-41 .magritte-slider___YN62u_2-0-41{
107
+ .magritte-checked___QEAn5_2-0-42 .magritte-slider___YN62u_2-0-42{
108
108
  background-color:var(--magritte-color-component-switch-background-toggle-checked-v21-3-2);
109
109
  left:calc(56px - (28px + 4px*2));
110
110
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v21-3-2);
111
111
  }
112
- .magritte-checked___QEAn5_2-0-41:active:not(:disabled){
112
+ .magritte-checked___QEAn5_2-0-42:active:not(:disabled){
113
113
  background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v21-3-2);
114
114
  }
115
- .magritte-checked___QEAn5_2-0-41:active:not(:disabled) .magritte-slider___YN62u_2-0-41{
115
+ .magritte-checked___QEAn5_2-0-42:active:not(:disabled) .magritte-slider___YN62u_2-0-42{
116
116
  background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v21-3-2);
117
117
  width:36px;
118
118
  left:calc(56px - (36px + 4px*2));
119
119
  }
120
120
  @media (min-width: 1020px){
121
- body.magritte-old-layout .magritte-checked___QEAn5_2-0-41:hover:not(:disabled):not(:active){
121
+ body.magritte-old-layout .magritte-checked___QEAn5_2-0-42:hover:not(:disabled):not(:active){
122
122
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v21-3-2);
123
123
  }
124
124
  }
125
125
  @media (min-width: 1024px){
126
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-41:hover:not(:disabled):not(:active){
126
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-42:hover:not(:disabled):not(:active){
127
127
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v21-3-2);
128
128
  }
129
129
  }
130
- .magritte-switch-skeleton___g1MEY_2-0-41{
130
+ .magritte-switch-skeleton___g1MEY_2-0-42{
131
131
  width:56px;
132
132
  height:36px;
133
133
  border-radius:18px;
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-CCWZ3lCQ.js';
9
+ import './Skeleton-C1pBA26p.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.41",
3
+ "version": "2.0.42",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "0e4b0b94efe23dfdde06869bd8c294469ce0fe6b"
37
+ "gitHead": "701d9de63f5201fe61f21bbc9f0252a59201c9e3"
38
38
  }