@hh.ru/magritte-ui-switch 3.0.4 → 3.0.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.
@@ -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-4","slider":"magritte-slider___YN62u_3-0-4","checked":"magritte-checked___QEAn5_3-0-4","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-4","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-4"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_3-0-5","slider":"magritte-slider___YN62u_3-0-5","checked":"magritte-checked___QEAn5_3-0-5","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-5","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-5"};
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-DNUAeIhr.js.map
12
+ //# sourceMappingURL=Skeleton-DsZjPb2e.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-DNUAeIhr.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-DsZjPb2e.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-DNUAeIhr.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-DsZjPb2e.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-DNUAeIhr.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-DsZjPb2e.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
@@ -71,7 +71,7 @@
71
71
  --magritte-shadow-level-1-blur-v23-0-0:12px;
72
72
  --magritte-shadow-level-1-spread-v23-0-0:0px;
73
73
  }
74
- .magritte-switch___0AZYC_3-0-4{
74
+ .magritte-switch___0AZYC_3-0-5{
75
75
  width:52px;
76
76
  height:32px;
77
77
  background-color:var(--magritte-color-component-switch-background-container-unchecked-v23-0-0);
@@ -79,36 +79,36 @@
79
79
  cursor:pointer;
80
80
  position:relative;
81
81
  }
82
- .magritte-switch___0AZYC_3-0-4:active:not(:disabled){
82
+ .magritte-switch___0AZYC_3-0-5:active:not(:disabled){
83
83
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v23-0-0);
84
84
  }
85
- .magritte-switch___0AZYC_3-0-4:active:not(:disabled) .magritte-slider___YN62u_3-0-4{
85
+ .magritte-switch___0AZYC_3-0-5:active:not(:disabled) .magritte-slider___YN62u_3-0-5{
86
86
  border-radius:14px;
87
87
  background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v23-0-0);
88
88
  width:32px;
89
89
  }
90
- .magritte-switch___0AZYC_3-0-4:disabled{
90
+ .magritte-switch___0AZYC_3-0-5:disabled{
91
91
  cursor:not-allowed;
92
92
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v23-0-0);
93
93
  border-radius:20px;
94
94
  }
95
- .magritte-switch___0AZYC_3-0-4:disabled.magritte-checked___QEAn5_3-0-4{
95
+ .magritte-switch___0AZYC_3-0-5:disabled.magritte-checked___QEAn5_3-0-5{
96
96
  background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v23-0-0);
97
97
  }
98
- .magritte-switch___0AZYC_3-0-4.focus-visible{
98
+ .magritte-switch___0AZYC_3-0-5.focus-visible{
99
99
  outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v23-0-0) solid 4px;
100
100
  }
101
101
  @media (min-width: 1020px){
102
- body.magritte-old-layout .magritte-switch___0AZYC_3-0-4:hover:not(:disabled):not(:active){
102
+ body.magritte-old-layout .magritte-switch___0AZYC_3-0-5:hover:not(:disabled):not(:active){
103
103
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v23-0-0);
104
104
  }
105
105
  }
106
106
  @media (min-width: 1024px){
107
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-4:hover:not(:disabled):not(:active){
107
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-5:hover:not(:disabled):not(:active){
108
108
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v23-0-0);
109
109
  }
110
110
  }
111
- .magritte-slider___YN62u_3-0-4{
111
+ .magritte-slider___YN62u_3-0-5{
112
112
  width:24px;
113
113
  height:24px;
114
114
  background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v23-0-0);
@@ -126,33 +126,33 @@
126
126
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v23-0-0);
127
127
  box-shadow:var(--magritte-shadow-level-1-x-v23-0-0) var(--magritte-shadow-level-1-y-v23-0-0) var(--magritte-shadow-level-1-blur-v23-0-0) var(--magritte-shadow-level-1-spread-v23-0-0) var(--magritte-shadow-level-1-color-v23-0-0);
128
128
  }
129
- .magritte-checked___QEAn5_3-0-4{
129
+ .magritte-checked___QEAn5_3-0-5{
130
130
  background-color:var(--magritte-color-component-switch-background-container-checked-v23-0-0);
131
131
  }
132
- .magritte-checked___QEAn5_3-0-4 .magritte-slider___YN62u_3-0-4{
132
+ .magritte-checked___QEAn5_3-0-5 .magritte-slider___YN62u_3-0-5{
133
133
  background-color:var(--magritte-color-component-switch-background-toggle-checked-v23-0-0);
134
134
  left:calc(52px - (24px + 4px*2));
135
135
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v23-0-0);
136
136
  }
137
- .magritte-checked___QEAn5_3-0-4:active:not(:disabled){
137
+ .magritte-checked___QEAn5_3-0-5:active:not(:disabled){
138
138
  background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v23-0-0);
139
139
  }
140
- .magritte-checked___QEAn5_3-0-4:active:not(:disabled) .magritte-slider___YN62u_3-0-4{
140
+ .magritte-checked___QEAn5_3-0-5:active:not(:disabled) .magritte-slider___YN62u_3-0-5{
141
141
  background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v23-0-0);
142
142
  width:32px;
143
143
  left:calc(52px - (32px + 4px*2));
144
144
  }
145
145
  @media (min-width: 1020px){
146
- body.magritte-old-layout .magritte-checked___QEAn5_3-0-4:hover:not(:disabled):not(:active){
146
+ body.magritte-old-layout .magritte-checked___QEAn5_3-0-5:hover:not(:disabled):not(:active){
147
147
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v23-0-0);
148
148
  }
149
149
  }
150
150
  @media (min-width: 1024px){
151
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-4:hover:not(:disabled):not(:active){
151
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-5:hover:not(:disabled):not(:active){
152
152
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v23-0-0);
153
153
  }
154
154
  }
155
- .magritte-switch-skeleton___g1MEY_3-0-4{
155
+ .magritte-switch-skeleton___g1MEY_3-0-5{
156
156
  width:52px;
157
157
  height:32px;
158
158
  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-DNUAeIhr.js';
8
+ import './Skeleton-DsZjPb2e.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.4",
3
+ "version": "3.0.5",
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": "23.0.0",
24
24
  "@hh.ru/magritte-ui-breakpoint": "6.0.0",
25
- "@hh.ru/magritte-ui-icon": "12.2.1",
25
+ "@hh.ru/magritte-ui-icon": "12.2.2",
26
26
  "@hh.ru/magritte-ui-skeleton": "3.0.1"
27
27
  },
28
28
  "peerDependencies": {
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "759fe057f9c0fbf62497dea6dc4f996f8c5d9a84"
35
+ "gitHead": "195120715c60ddd17f5b43c579c15a7457983504"
36
36
  }