@hh.ru/magritte-ui-switch 2.0.30 → 2.0.31

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-30","slider":"magritte-slider___YN62u_2-0-30","checked":"magritte-checked___QEAn5_2-0-30","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-30","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-30"};
5
+ var styles = {"switch":"magritte-switch___0AZYC_2-0-31","slider":"magritte-slider___YN62u_2-0-31","checked":"magritte-checked___QEAn5_2-0-31","switch-skeleton":"magritte-switch-skeleton___g1MEY_2-0-31","switchSkeleton":"magritte-switch-skeleton___g1MEY_2-0-31"};
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-C4dU1eeK.js.map
12
+ //# sourceMappingURL=Skeleton-ztkNFaMr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton-C4dU1eeK.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-ztkNFaMr.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-C4dU1eeK.js';
4
+ export { S as SwitchSkeleton } from './Skeleton-ztkNFaMr.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-C4dU1eeK.js';
7
+ import { S as SwitchSkeleton, s as styles } from './Skeleton-ztkNFaMr.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
@@ -576,7 +576,7 @@
576
576
  --magritte-typography-_custom-5-italic-text-transform-v20-1-0:none;
577
577
  --magritte-typography-_custom-5-italic-text-decoration-v20-1-0:none;
578
578
  }
579
- .magritte-switch___0AZYC_2-0-30{
579
+ .magritte-switch___0AZYC_2-0-31{
580
580
  width:56px;
581
581
  height:36px;
582
582
  background-color:var(--magritte-color-component-switch-background-container-unchecked-v20-1-0);
@@ -584,36 +584,36 @@
584
584
  cursor:pointer;
585
585
  position:relative;
586
586
  }
587
- .magritte-switch___0AZYC_2-0-30:active:not(:disabled){
587
+ .magritte-switch___0AZYC_2-0-31:active:not(:disabled){
588
588
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-pressed-v20-1-0);
589
589
  }
590
- .magritte-switch___0AZYC_2-0-30:active:not(:disabled) .magritte-slider___YN62u_2-0-30{
590
+ .magritte-switch___0AZYC_2-0-31:active:not(:disabled) .magritte-slider___YN62u_2-0-31{
591
591
  border-radius:14px;
592
592
  background-color:var(--magritte-color-component-switch-background-state-toggle-unchecked-pressed-v20-1-0);
593
593
  width:36px;
594
594
  }
595
- .magritte-switch___0AZYC_2-0-30:disabled{
595
+ .magritte-switch___0AZYC_2-0-31:disabled{
596
596
  cursor:not-allowed;
597
597
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-disabled-v20-1-0);
598
598
  border-radius:20px;
599
599
  }
600
- .magritte-switch___0AZYC_2-0-30:disabled.magritte-checked___QEAn5_2-0-30{
600
+ .magritte-switch___0AZYC_2-0-31:disabled.magritte-checked___QEAn5_2-0-31{
601
601
  background-color:var(--magritte-color-component-switch-background-state-container-checked-disabled-v20-1-0);
602
602
  }
603
- .magritte-switch___0AZYC_2-0-30.focus-visible{
603
+ .magritte-switch___0AZYC_2-0-31.focus-visible{
604
604
  outline:var(--magritte-color-component-switch-stroke-state-focused-accessible-v20-1-0) solid 4px;
605
605
  }
606
606
  @media (min-width: 1020px){
607
- body.magritte-old-layout .magritte-switch___0AZYC_2-0-30:hover:not(:disabled):not(:active){
607
+ body.magritte-old-layout .magritte-switch___0AZYC_2-0-31:hover:not(:disabled):not(:active){
608
608
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v20-1-0);
609
609
  }
610
610
  }
611
611
  @media (min-width: 1024px){
612
- body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-30:hover:not(:disabled):not(:active){
612
+ body:not(.magritte-old-layout) .magritte-switch___0AZYC_2-0-31:hover:not(:disabled):not(:active){
613
613
  background-color:var(--magritte-color-component-switch-background-state-container-unchecked-hovered-v20-1-0);
614
614
  }
615
615
  }
616
- .magritte-slider___YN62u_2-0-30{
616
+ .magritte-slider___YN62u_2-0-31{
617
617
  width:28px;
618
618
  height:28px;
619
619
  background-color:var(--magritte-color-component-switch-background-toggle-unchecked-v20-1-0);
@@ -631,33 +631,33 @@
631
631
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-unchecked-disabled-v20-1-0);
632
632
  box-shadow:var(--magritte-shadow-level-1-x-v20-1-0) var(--magritte-shadow-level-1-y-v20-1-0) var(--magritte-shadow-level-1-blur-v20-1-0) var(--magritte-shadow-level-1-spread-v20-1-0) var(--magritte-shadow-level-1-color-v20-1-0);
633
633
  }
634
- .magritte-checked___QEAn5_2-0-30{
634
+ .magritte-checked___QEAn5_2-0-31{
635
635
  background-color:var(--magritte-color-component-switch-background-container-checked-v20-1-0);
636
636
  }
637
- .magritte-checked___QEAn5_2-0-30 .magritte-slider___YN62u_2-0-30{
637
+ .magritte-checked___QEAn5_2-0-31 .magritte-slider___YN62u_2-0-31{
638
638
  background-color:var(--magritte-color-component-switch-background-toggle-checked-v20-1-0);
639
639
  left:calc(56px - (28px + 4px*2));
640
640
  --magritte-ui-icon-color-override:var(--magritte-color-component-switch-icon-state-toggle-checked-disabled-v20-1-0);
641
641
  }
642
- .magritte-checked___QEAn5_2-0-30:active:not(:disabled){
642
+ .magritte-checked___QEAn5_2-0-31:active:not(:disabled){
643
643
  background-color:var(--magritte-color-component-switch-background-state-container-checked-pressed-v20-1-0);
644
644
  }
645
- .magritte-checked___QEAn5_2-0-30:active:not(:disabled) .magritte-slider___YN62u_2-0-30{
645
+ .magritte-checked___QEAn5_2-0-31:active:not(:disabled) .magritte-slider___YN62u_2-0-31{
646
646
  background-color:var(--magritte-color-component-switch-background-state-toggle-checked-pressed-v20-1-0);
647
647
  width:36px;
648
648
  left:calc(56px - (36px + 4px*2));
649
649
  }
650
650
  @media (min-width: 1020px){
651
- body.magritte-old-layout .magritte-checked___QEAn5_2-0-30:hover:not(:disabled):not(:active){
651
+ body.magritte-old-layout .magritte-checked___QEAn5_2-0-31:hover:not(:disabled):not(:active){
652
652
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v20-1-0);
653
653
  }
654
654
  }
655
655
  @media (min-width: 1024px){
656
- body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-30:hover:not(:disabled):not(:active){
656
+ body:not(.magritte-old-layout) .magritte-checked___QEAn5_2-0-31:hover:not(:disabled):not(:active){
657
657
  background-color:var(--magritte-color-component-switch-background-state-container-checked-hovered-v20-1-0);
658
658
  }
659
659
  }
660
- .magritte-switch-skeleton___g1MEY_2-0-30{
660
+ .magritte-switch-skeleton___g1MEY_2-0-31{
661
661
  width:56px;
662
662
  height:36px;
663
663
  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-C4dU1eeK.js';
9
+ import './Skeleton-ztkNFaMr.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.30",
3
+ "version": "2.0.31",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -23,8 +23,8 @@
23
23
  "@hh.ru/magritte-common-use-disabled": "1.0.10",
24
24
  "@hh.ru/magritte-design-tokens": "20.1.0",
25
25
  "@hh.ru/magritte-ui-breakpoint": "4.1.1",
26
- "@hh.ru/magritte-ui-icon": "7.9.9",
27
- "@hh.ru/magritte-ui-skeleton": "2.1.19",
26
+ "@hh.ru/magritte-ui-icon": "7.9.10",
27
+ "@hh.ru/magritte-ui-skeleton": "2.1.20",
28
28
  "@hh.ru/magritte-ui-theme-provider": "1.1.35"
29
29
  },
30
30
  "peerDependencies": {
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "e7fdddfb173fef52fee57b97129483cf8663f8cf"
37
+ "gitHead": "57867dfe289f03cc69932c1de56a3eba0e25a9b4"
38
38
  }