@hh.ru/magritte-ui-switch 3.0.0 → 3.0.2

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-0","slider":"magritte-slider___YN62u_3-0-0","checked":"magritte-checked___QEAn5_3-0-0","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-0","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-0"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_3-0-2","slider":"magritte-slider___YN62u_3-0-2","checked":"magritte-checked___QEAn5_3-0-2","switch-skeleton":"magritte-switch-skeleton___g1MEY_3-0-2","switchSkeleton":"magritte-switch-skeleton___g1MEY_3-0-2"};
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-ILKT5CjM.js.map
12
+ //# sourceMappingURL=Skeleton-sOaB-WXU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-ILKT5CjM.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-sOaB-WXU.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-ILKT5CjM.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-sOaB-WXU.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-ILKT5CjM.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-sOaB-WXU.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
@@ -68,7 +68,7 @@
68
68
  --magritte-shadow-level-1-blur-v22-1-0:12px;
69
69
  --magritte-shadow-level-1-spread-v22-1-0:0px;
70
70
  }
71
- .magritte-switch___0AZYC_3-0-0{
71
+ .magritte-switch___0AZYC_3-0-2{
72
72
  width:52px;
73
73
  height:32px;
74
74
  background-color:var(--magritte-color-component-switch-background-container-unchecked-v22-1-0);
@@ -76,36 +76,36 @@
76
76
  cursor:pointer;
77
77
  position:relative;
78
78
  }
79
- .magritte-switch___0AZYC_3-0-0:active:not(:disabled){
79
+ .magritte-switch___0AZYC_3-0-2:active:not(:disabled){
80
80
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v22-1-0);
81
81
  }
82
- .magritte-switch___0AZYC_3-0-0:active:not(:disabled) .magritte-slider___YN62u_3-0-0{
82
+ .magritte-switch___0AZYC_3-0-2:active:not(:disabled) .magritte-slider___YN62u_3-0-2{
83
83
  border-radius:14px;
84
84
  background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v22-1-0);
85
85
  width:32px;
86
86
  }
87
- .magritte-switch___0AZYC_3-0-0:disabled{
87
+ .magritte-switch___0AZYC_3-0-2:disabled{
88
88
  cursor:not-allowed;
89
89
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v22-1-0);
90
90
  border-radius:20px;
91
91
  }
92
- .magritte-switch___0AZYC_3-0-0:disabled.magritte-checked___QEAn5_3-0-0{
92
+ .magritte-switch___0AZYC_3-0-2:disabled.magritte-checked___QEAn5_3-0-2{
93
93
  background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v22-1-0);
94
94
  }
95
- .magritte-switch___0AZYC_3-0-0.focus-visible{
95
+ .magritte-switch___0AZYC_3-0-2.focus-visible{
96
96
  outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v22-1-0) solid 4px;
97
97
  }
98
98
  @media (min-width: 1020px){
99
- body.magritte-old-layout .magritte-switch___0AZYC_3-0-0:hover:not(:disabled):not(:active){
99
+ body.magritte-old-layout .magritte-switch___0AZYC_3-0-2:hover:not(:disabled):not(:active){
100
100
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v22-1-0);
101
101
  }
102
102
  }
103
103
  @media (min-width: 1024px){
104
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-0:hover:not(:disabled):not(:active){
104
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_3-0-2:hover:not(:disabled):not(:active){
105
105
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v22-1-0);
106
106
  }
107
107
  }
108
- .magritte-slider___YN62u_3-0-0{
108
+ .magritte-slider___YN62u_3-0-2{
109
109
  width:24px;
110
110
  height:24px;
111
111
  background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v22-1-0);
@@ -123,33 +123,33 @@
123
123
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v22-1-0);
124
124
  box-shadow:var(--magritte-shadow-level-1-x-v22-1-0) var(--magritte-shadow-level-1-y-v22-1-0) var(--magritte-shadow-level-1-blur-v22-1-0) var(--magritte-shadow-level-1-spread-v22-1-0) var(--magritte-shadow-level-1-color-v22-1-0);
125
125
  }
126
- .magritte-checked___QEAn5_3-0-0{
126
+ .magritte-checked___QEAn5_3-0-2{
127
127
  background-color:var(--magritte-color-component-switch-background-container-checked-v22-1-0);
128
128
  }
129
- .magritte-checked___QEAn5_3-0-0 .magritte-slider___YN62u_3-0-0{
129
+ .magritte-checked___QEAn5_3-0-2 .magritte-slider___YN62u_3-0-2{
130
130
  background-color:var(--magritte-color-component-switch-background-toggle-checked-v22-1-0);
131
131
  left:calc(52px - (24px + 4px*2));
132
132
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v22-1-0);
133
133
  }
134
- .magritte-checked___QEAn5_3-0-0:active:not(:disabled){
134
+ .magritte-checked___QEAn5_3-0-2:active:not(:disabled){
135
135
  background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v22-1-0);
136
136
  }
137
- .magritte-checked___QEAn5_3-0-0:active:not(:disabled) .magritte-slider___YN62u_3-0-0{
137
+ .magritte-checked___QEAn5_3-0-2:active:not(:disabled) .magritte-slider___YN62u_3-0-2{
138
138
  background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v22-1-0);
139
139
  width:32px;
140
140
  left:calc(52px - (32px + 4px*2));
141
141
  }
142
142
  @media (min-width: 1020px){
143
- body.magritte-old-layout .magritte-checked___QEAn5_3-0-0:hover:not(:disabled):not(:active){
143
+ body.magritte-old-layout .magritte-checked___QEAn5_3-0-2:hover:not(:disabled):not(:active){
144
144
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v22-1-0);
145
145
  }
146
146
  }
147
147
  @media (min-width: 1024px){
148
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-0:hover:not(:disabled):not(:active){
148
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_3-0-2:hover:not(:disabled):not(:active){
149
149
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v22-1-0);
150
150
  }
151
151
  }
152
- .magritte-switch-skeleton___g1MEY_3-0-0{
152
+ .magritte-switch-skeleton___g1MEY_3-0-2{
153
153
  width:52px;
154
154
  height:32px;
155
155
  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-ILKT5CjM.js';
8
+ import './Skeleton-sOaB-WXU.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.0",
3
+ "version": "3.0.2",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -21,8 +21,8 @@
21
21
  "dependencies": {
22
22
  "@hh.ru/magritte-common-use-disabled": "1.0.12",
23
23
  "@hh.ru/magritte-design-tokens": "22.1.0",
24
- "@hh.ru/magritte-ui-breakpoint": "5.0.3",
25
- "@hh.ru/magritte-ui-icon": "12.0.0",
24
+ "@hh.ru/magritte-ui-breakpoint": "6.0.0",
25
+ "@hh.ru/magritte-ui-icon": "12.1.0",
26
26
  "@hh.ru/magritte-ui-skeleton": "3.0.0"
27
27
  },
28
28
  "peerDependencies": {
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "a823b2d582e812bf99b5fdf32058a93eaa59076b"
35
+ "gitHead": "84be7fb81c268510672bdaa32f856319f7022df8"
36
36
  }