@fluentui/react-switch 0.0.0-nightlycc44f3625c20211220.1 → 0.0.0-nightlye0b8e1fa6920220128.1

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.
Files changed (28) hide show
  1. package/CHANGELOG.json +51 -21
  2. package/CHANGELOG.md +15 -12
  3. package/dist/react-switch.d.ts +10 -15
  4. package/lib/components/Switch/Switch.js +6 -6
  5. package/lib/components/Switch/Switch.js.map +1 -1
  6. package/lib/components/Switch/Switch.types.d.ts +7 -7
  7. package/lib/components/Switch/renderSwitch.d.ts +1 -1
  8. package/lib/components/Switch/renderSwitch.js +2 -3
  9. package/lib/components/Switch/renderSwitch.js.map +1 -1
  10. package/lib/components/Switch/useSwitch.d.ts +2 -6
  11. package/lib/components/Switch/useSwitch.js +1 -6
  12. package/lib/components/Switch/useSwitch.js.map +1 -1
  13. package/lib/components/Switch/useSwitchStyles.d.ts +1 -1
  14. package/lib/components/Switch/useSwitchStyles.js +10 -24
  15. package/lib/components/Switch/useSwitchStyles.js.map +1 -1
  16. package/lib-commonjs/components/Switch/Switch.js +3 -3
  17. package/lib-commonjs/components/Switch/Switch.js.map +1 -1
  18. package/lib-commonjs/components/Switch/Switch.types.d.ts +7 -7
  19. package/lib-commonjs/components/Switch/renderSwitch.d.ts +1 -1
  20. package/lib-commonjs/components/Switch/renderSwitch.js +4 -6
  21. package/lib-commonjs/components/Switch/renderSwitch.js.map +1 -1
  22. package/lib-commonjs/components/Switch/useSwitch.d.ts +2 -6
  23. package/lib-commonjs/components/Switch/useSwitch.js +4 -9
  24. package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
  25. package/lib-commonjs/components/Switch/useSwitchStyles.d.ts +1 -1
  26. package/lib-commonjs/components/Switch/useSwitchStyles.js +25 -38
  27. package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
  28. package/package.json +7 -9
package/CHANGELOG.json CHANGED
@@ -2,17 +2,35 @@
2
2
  "name": "@fluentui/react-switch",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 20 Dec 2021 04:17:52 GMT",
6
- "tag": "@fluentui/react-switch_v0.0.0-nightlycc44f3625c20211220.1",
7
- "version": "0.0.0-nightlycc44f3625c20211220.1",
5
+ "date": "Fri, 28 Jan 2022 04:13:22 GMT",
6
+ "tag": "@fluentui/react-switch_v0.0.0-nightlye0b8e1fa6920220128.1",
7
+ "version": "0.0.0-nightlye0b8e1fa6920220128.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
11
  "author": "email not defined",
12
12
  "package": "@fluentui/react-switch",
13
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5",
13
+ "commit": "90d10ec8c2d159575962c4d3d913317633b44a7a",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
+ {
17
+ "author": "olfedias@microsoft.com",
18
+ "package": "@fluentui/react-switch",
19
+ "commit": "1df1d6e85bd3a6ab2a7b13e96a9aac324bb6d00c",
20
+ "comment": "Replace make-styles packages with griffel equivalents."
21
+ },
22
+ {
23
+ "author": "Humberto.Morimoto@microsoft.com",
24
+ "package": "@fluentui/react-switch",
25
+ "commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
26
+ "comment": "Updating based on changes to composition types."
27
+ },
28
+ {
29
+ "author": "behowell@microsoft.com",
30
+ "package": "@fluentui/react-switch",
31
+ "commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
32
+ "comment": "Remove component's shorthandProps array"
33
+ },
16
34
  {
17
35
  "author": "olfedias@microsoft.com",
18
36
  "package": "@fluentui/react-switch",
@@ -20,49 +38,55 @@
20
38
  "comment": "update styles to not use CSS shorthands"
21
39
  },
22
40
  {
23
- "author": "beachball",
41
+ "author": "Humberto.Morimoto@microsoft.com",
24
42
  "package": "@fluentui/react-switch",
25
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlycc44f3625c20211220.1",
26
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
43
+ "commit": "b52ebbbf185a2ddc4de814238f9438fd04bfba02",
44
+ "comment": "Replacing use of functions in makeStyles with direct use of tokens."
27
45
  },
28
46
  {
29
- "author": "beachball",
47
+ "author": "Humberto.Morimoto@microsoft.com",
30
48
  "package": "@fluentui/react-switch",
31
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlycc44f3625c20211220.1",
32
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
49
+ "commit": "38c8bed2c707014688ae2ae689033fa36ef23075",
50
+ "comment": "Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster."
33
51
  },
34
52
  {
35
- "author": "beachball",
53
+ "author": "behowell@microsoft.com",
36
54
  "package": "@fluentui/react-switch",
37
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightlycc44f3625c20211220.1",
38
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
55
+ "commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
56
+ "comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
39
57
  },
40
58
  {
41
59
  "author": "beachball",
42
60
  "package": "@fluentui/react-switch",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlycc44f3625c20211220.1",
44
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
61
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlye0b8e1fa6920220128.1",
62
+ "commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
45
63
  },
46
64
  {
47
65
  "author": "beachball",
48
66
  "package": "@fluentui/react-switch",
49
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlycc44f3625c20211220.1",
50
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
67
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightlye0b8e1fa6920220128.1",
68
+ "commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
51
69
  },
52
70
  {
53
71
  "author": "beachball",
54
72
  "package": "@fluentui/react-switch",
55
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlycc44f3625c20211220.1",
56
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
73
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlye0b8e1fa6920220128.1",
74
+ "commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
57
75
  },
58
76
  {
59
77
  "author": "beachball",
60
78
  "package": "@fluentui/react-switch",
61
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlycc44f3625c20211220.1",
62
- "commit": "0839b0d96424e04706bd895d731d371acd3baaf5"
79
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye0b8e1fa6920220128.1",
80
+ "commit": "90d10ec8c2d159575962c4d3d913317633b44a7a"
63
81
  }
64
82
  ],
65
83
  "none": [
84
+ {
85
+ "author": "martinhochel@microsoft.com",
86
+ "package": "@fluentui/react-switch",
87
+ "commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
88
+ "comment": "chore: use storybook runner for all vNext packages"
89
+ },
66
90
  {
67
91
  "author": "andredias@microsoft.com",
68
92
  "package": "@fluentui/react-switch",
@@ -74,6 +98,12 @@
74
98
  "package": "@fluentui/react-switch",
75
99
  "commit": "28ceaaa83cd92a0389c466f0b15b283e3d9b08e4",
76
100
  "comment": "test(react-switch): update snapshots to match new JSDOM"
101
+ },
102
+ {
103
+ "author": "olfedias@microsoft.com",
104
+ "package": "@fluentui/react-switch",
105
+ "commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
106
+ "comment": "remove inline-style-expand-shorthand from tsconfigs"
77
107
  }
78
108
  ]
79
109
  }
package/CHANGELOG.md CHANGED
@@ -1,25 +1,28 @@
1
1
  # Change Log - @fluentui/react-switch
2
2
 
3
- This log was last generated on Mon, 20 Dec 2021 04:17:52 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 28 Jan 2022 04:13:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightlycc44f3625c20211220.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightlycc44f3625c20211220.1)
7
+ ## [0.0.0-nightlye0b8e1fa6920220128.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightlye0b8e1fa6920220128.1)
8
8
 
9
- Mon, 20 Dec 2021 04:17:52 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v0.0.0-nightlycc44f3625c20211220.1)
9
+ Fri, 28 Jan 2022 04:13:22 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v0.0.0-nightlye0b8e1fa6920220128.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by email not defined)
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by email not defined)
15
+ - Replace make-styles packages with griffel equivalents. ([PR #21424](https://github.com/microsoft/fluentui/pull/21424) by olfedias@microsoft.com)
16
+ - Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
17
+ - Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
15
18
  - update styles to not use CSS shorthands ([PR #20844](https://github.com/microsoft/fluentui/pull/20844) by olfedias@microsoft.com)
16
- - Bump @fluentui/react-make-styles to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
18
- - Bump @fluentui/react-tabster to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
20
- - Bump @fluentui/babel-make-styles to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
21
- - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
22
- - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlycc44f3625c20211220.1 ([commit](https://github.com/microsoft/fluentui/commit/0839b0d96424e04706bd895d731d371acd3baaf5) by beachball)
19
+ - Replacing use of functions in makeStyles with direct use of tokens. ([PR #21056](https://github.com/microsoft/fluentui/pull/21056) by Humberto.Morimoto@microsoft.com)
20
+ - Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster. ([PR #21035](https://github.com/microsoft/fluentui/pull/21035) by Humberto.Morimoto@microsoft.com)
21
+ - BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
22
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
23
+ - Bump @fluentui/react-tabster to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
24
+ - Bump @fluentui/react-utilities to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
25
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightlye0b8e1fa6920220128.1 ([commit](https://github.com/microsoft/fluentui/commit/90d10ec8c2d159575962c4d3d913317633b44a7a) by beachball)
23
26
 
24
27
  ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.5)
25
28
 
@@ -1,13 +1,13 @@
1
1
  import type { ComponentProps } from '@fluentui/react-utilities';
2
2
  import type { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
- import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
4
+ import type { IntrinsicSlotProps } from '@fluentui/react-utilities';
5
5
  import * as React_2 from 'react';
6
6
 
7
7
  /**
8
8
  * Render the final JSX of Switch
9
9
  */
10
- export declare const renderSwitch: (state: SwitchState) => JSX.Element;
10
+ export declare const renderSwitch_unstable: (state: SwitchState) => JSX.Element;
11
11
 
12
12
  /**
13
13
  * The Switch control enables users to trigger an option on or off through pressing on the component.
@@ -46,36 +46,31 @@ export declare interface SwitchCommons {
46
46
  export declare interface SwitchProps extends Omit<ComponentProps<SwitchSlots>, 'onChange'>, SwitchCommons {
47
47
  }
48
48
 
49
- /**
50
- * Array of all shorthand properties listed in SwitchSlots
51
- */
52
- export declare const switchShorthandProps: (keyof SwitchSlots)[];
53
-
54
49
  export declare type SwitchSlots = {
55
50
  /**
56
51
  * The root of the Switch.
57
52
  */
58
- root: IntrinsicShorthandProps<'div'>;
53
+ root: IntrinsicSlotProps<'div'>;
59
54
  /**
60
55
  * The bar indicating the status of the Switch.
61
56
  */
62
- track: IntrinsicShorthandProps<'div'>;
57
+ track: IntrinsicSlotProps<'div'>;
63
58
  /**
64
59
  * The wrapper around the thumb. It is used as the active area for the thumb to position itself.
65
60
  */
66
- thumbWrapper: IntrinsicShorthandProps<'div'>;
61
+ thumbWrapper: IntrinsicSlotProps<'div'>;
67
62
  /**
68
63
  * The circular icon indicating the status of the Switch.
69
64
  */
70
- thumb: IntrinsicShorthandProps<'div'>;
65
+ thumb: IntrinsicSlotProps<'div'>;
71
66
  /**
72
67
  * The hidden input that handles the Switch's internal functionality.
73
68
  */
74
- input: IntrinsicShorthandProps<'input'>;
69
+ input: IntrinsicSlotProps<'input'>;
75
70
  /**
76
71
  * The area in which the Switch's rail allows for the thumb to be dragged.
77
72
  */
78
- activeRail: IntrinsicShorthandProps<'div'>;
73
+ activeRail: IntrinsicSlotProps<'div'>;
79
74
  };
80
75
 
81
76
  export declare interface SwitchState extends ComponentState<SwitchSlots>, SwitchCommons {
@@ -84,11 +79,11 @@ export declare interface SwitchState extends ComponentState<SwitchSlots>, Switch
84
79
  /**
85
80
  * Given user props, returns state and render function for a Switch.
86
81
  */
87
- export declare const useSwitch: (props: SwitchProps, ref: React_2.Ref<HTMLElement>) => SwitchState;
82
+ export declare const useSwitch_unstable: (props: SwitchProps, ref: React_2.Ref<HTMLElement>) => SwitchState;
88
83
 
89
84
  /**
90
85
  * Apply styling to the Switch slots based on the state
91
86
  */
92
- export declare const useSwitchStyles: (state: SwitchState) => SwitchState;
87
+ export declare const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
93
88
 
94
89
  export { }
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useSwitch } from './useSwitch';
3
- import { renderSwitch } from './renderSwitch';
4
- import { useSwitchStyles } from './useSwitchStyles';
2
+ import { useSwitch_unstable } from './useSwitch';
3
+ import { renderSwitch_unstable } from './renderSwitch';
4
+ import { useSwitchStyles_unstable } from './useSwitchStyles';
5
5
  /**
6
6
  * The Switch control enables users to trigger an option on or off through pressing on the component.
7
7
  */
8
8
 
9
9
  export const Switch = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useSwitch(props, ref);
11
- useSwitchStyles(state);
12
- return renderSwitch(state);
10
+ const state = useSwitch_unstable(props, ref);
11
+ useSwitchStyles_unstable(state);
12
+ return renderSwitch_unstable(state);
13
13
  });
14
14
  Switch.displayName = 'Switch';
15
15
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB;AACD,CANuD,CAAjD;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AAEA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CANuD,CAAjD;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
@@ -1,30 +1,30 @@
1
1
  import * as React from 'react';
2
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
2
+ import type { ComponentProps, ComponentState, IntrinsicSlotProps } from '@fluentui/react-utilities';
3
3
  export declare type SwitchSlots = {
4
4
  /**
5
5
  * The root of the Switch.
6
6
  */
7
- root: IntrinsicShorthandProps<'div'>;
7
+ root: IntrinsicSlotProps<'div'>;
8
8
  /**
9
9
  * The bar indicating the status of the Switch.
10
10
  */
11
- track: IntrinsicShorthandProps<'div'>;
11
+ track: IntrinsicSlotProps<'div'>;
12
12
  /**
13
13
  * The wrapper around the thumb. It is used as the active area for the thumb to position itself.
14
14
  */
15
- thumbWrapper: IntrinsicShorthandProps<'div'>;
15
+ thumbWrapper: IntrinsicSlotProps<'div'>;
16
16
  /**
17
17
  * The circular icon indicating the status of the Switch.
18
18
  */
19
- thumb: IntrinsicShorthandProps<'div'>;
19
+ thumb: IntrinsicSlotProps<'div'>;
20
20
  /**
21
21
  * The hidden input that handles the Switch's internal functionality.
22
22
  */
23
- input: IntrinsicShorthandProps<'input'>;
23
+ input: IntrinsicSlotProps<'input'>;
24
24
  /**
25
25
  * The area in which the Switch's rail allows for the thumb to be dragged.
26
26
  */
27
- activeRail: IntrinsicShorthandProps<'div'>;
27
+ activeRail: IntrinsicSlotProps<'div'>;
28
28
  };
29
29
  export interface SwitchCommons {
30
30
  /**
@@ -2,4 +2,4 @@ import type { SwitchState } from './Switch.types';
2
2
  /**
3
3
  * Render the final JSX of Switch
4
4
  */
5
- export declare const renderSwitch: (state: SwitchState) => JSX.Element;
5
+ export declare const renderSwitch_unstable: (state: SwitchState) => JSX.Element;
@@ -1,15 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- import { switchShorthandProps } from './useSwitch';
4
3
  /**
5
4
  * Render the final JSX of Switch
6
5
  */
7
6
 
8
- export const renderSwitch = state => {
7
+ export const renderSwitch_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
- } = getSlots(state, switchShorthandProps);
11
+ } = getSlots(state);
13
12
  return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
14
13
  }, /*#__PURE__*/React.createElement(slots.track, { ...slotProps.track
15
14
  }), /*#__PURE__*/React.createElement(slots.thumbWrapper, { ...slotProps.thumbWrapper
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/renderSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,oBAAT,QAAqC,aAArC;AAGA;;AAEG;;AACH,OAAO,MAAM,YAAY,GAAI,KAAD,IAAuB;AACjD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,EAAqB,oBAArB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,CAFF,eAKE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CALF,eAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CANF,CADF;AAUD,CAbM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Switch/renderSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;AAC1D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,CAFF,eAKE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CALF,eAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CANF,CADF;AAUD,CAbM","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { SwitchProps, SwitchSlots, SwitchState } from './Switch.types';
3
- /**
4
- * Array of all shorthand properties listed in SwitchSlots
5
- */
6
- export declare const switchShorthandProps: (keyof SwitchSlots)[];
2
+ import type { SwitchProps, SwitchState } from './Switch.types';
7
3
  /**
8
4
  * Given user props, returns state and render function for a Switch.
9
5
  */
10
- export declare const useSwitch: (props: SwitchProps, ref: React.Ref<HTMLElement>) => SwitchState;
6
+ export declare const useSwitch_unstable: (props: SwitchProps, ref: React.Ref<HTMLElement>) => SwitchState;
@@ -1,15 +1,10 @@
1
1
  import { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';
2
2
  import { useSwitchState } from './useSwitchState';
3
- /**
4
- * Array of all shorthand properties listed in SwitchSlots
5
- */
6
-
7
- export const switchShorthandProps = ['root', 'track', 'thumbWrapper', 'thumb', 'activeRail', 'input'];
8
3
  /**
9
4
  * Given user props, returns state and render function for a Switch.
10
5
  */
11
6
 
12
- export const useSwitch = (props, ref) => {
7
+ export const useSwitch_unstable = (props, ref) => {
13
8
  const {
14
9
  track,
15
10
  thumbWrapper,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/useSwitch.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,EAAkD,KAAlD,QAA+D,2BAA/D;AACA,SAAS,cAAT,QAA+B,kBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAA0B,CACzD,MADyD,EAEzD,OAFyD,EAGzD,cAHyD,EAIzD,OAJyD,EAKzD,YALyD,EAMzD,OANyD,CAApD;AASP;;AAEG;;AACH,OAAO,MAAM,SAAS,GAAG,CAAC,KAAD,EAAqB,GAArB,KAAiE;AACxF,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA,YAAT;AAAuB,IAAA,KAAvB;AAA8B,IAAA,UAA9B;AAA0C,IAAA,KAA1C;AAAiD,IAAA,cAAjD;AAAiE,IAAA,OAAjE;AAA0E,IAAA,QAA1E;AAAoF,IAAA;AAApF,MAAiG,KAAvG;AACA,QAAM,KAAK,GAAgB;AACzB,IAAA,cADyB;AAEzB,IAAA,OAFyB;AAGzB,IAAA,QAHyB;AAIzB,IAAA,QAJyB;AAKzB,IAAA,IAAI,EAAE,qBAAqB,CAAC,MAAD,EAAS;AAClC,MAAA,GADkC;AAElC,SAAG,KAF+B;AAGlC,MAAA,EAAE,EAAE,KAAK,CAAC,SAAD,EAAY,KAAK,CAAC,EAAlB;AAHyB,KAAT,CALF;AAUzB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,KAAK,EAAE,KAFG;AAGV,MAAA,YAAY,EAAE,KAHJ;AAIV,MAAA,KAAK,EAAE,KAJG;AAKV,MAAA,UAAU,EAAE,KALF;AAMV,MAAA,KAAK,EAAE;AANG,KAVa;AAkBzB,IAAA,KAAK,EAAE,gBAAgB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+B;AAGlC,MAAA,EAAE,EAAE,KAAK,CAAC,SAAD,EAAY,KAAK,CAAC,EAAlB;AAHyB,KAAT,CALF;AAUzB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,KAAK,EAAE,KAFG;AAGV,MAAA,YAAY,EAAE,KAHJ;AAIV,MAAA,KAAK,EAAE,KAJG;AAKV,MAAA,UAAU,EAAE,KALF;AAMV,MAAA,KAAK,EAAE;AANG,KAVa;AAkBzB,IAAA,KAAK,EAAE,gBAAgB,CAAC,KAAD,EAAQ;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAR,CAlBE;AAmBzB,IAAA,YAAY,EAAE,gBAAgB,CAAC,YAAD,EAAe;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAf,CAnBL;AAoBzB,IAAA,KAAK,EAAE,gBAAgB,CAAC,KAAD,EAAQ;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAR,CApBE;AAqBzB,IAAA,UAAU,EAAE,gBAAgB,CAAC,UAAD,EAAa;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAb,CArBH;AAsBzB,IAAA,KAAK,EAAE,gBAAgB,CAAC,KAAD,EAAQ;AAC7B,MAAA,QAAQ,EAAE,IADmB;AAE7B,MAAA,YAAY,EAAE;AACZ,QAAA,IAAI,EAAE;AADM;AAFe,KAAR;AAtBE,GAA3B;AA8BA,EAAA,cAAc,CAAC,KAAD,CAAd;AAEA,SAAO,KAAP;AACD,CAnCM","sourceRoot":""}
@@ -3,4 +3,4 @@ export declare const switchClassName = "fui-Switch";
3
3
  /**
4
4
  * Apply styling to the Switch slots based on the state
5
5
  */
6
- export declare const useSwitchStyles: (state: SwitchState) => SwitchState;
6
+ export declare const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
@@ -1,5 +1,6 @@
1
- import { shorthands, __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { shorthands, __styles, mergeClasses } from '@griffel/react';
2
2
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
3
+ import { tokens } from '@fluentui/react-theme';
3
4
  export const switchClassName = 'fui-Switch';
4
5
  const trackClassName = `${switchClassName}-track`;
5
6
  const thumbClassName = `${switchClassName}-thumb`;
@@ -24,10 +25,7 @@ const useRootStyles = /*#__PURE__*/__styles({
24
25
  },
25
26
  "unchecked": {
26
27
  "d48c0s": "frinyyk",
27
- "B638aae": "fhwgkv7",
28
- "Hdeks4": ["f1cjufhn", "f1395m7v"],
29
- "sn1se1": "fyo9fdn",
30
- "Bspkfwm": ["f1395m7v", "f1cjufhn"]
28
+ "Bc6qnd8": "f1g8lwx2"
31
29
  },
32
30
  "checked": {
33
31
  "Banj4pq": "fpfyfb6",
@@ -43,36 +41,24 @@ const useRootStyles = /*#__PURE__*/__styles({
43
41
  },
44
42
  "focusIndicator": {
45
43
  "B486eqv": "f2hkw1w",
46
- "vchsgm": "fbiesyy",
47
- "ozrjjd": ["fq2kn9", "f1jxwnad"],
48
- "B7lelfh": "f1il7mou",
49
- "Bp3tz3o": ["f1jxwnad", "fq2kn9"],
44
+ "c2y4jd": "fsofd9k",
50
45
  "B8vm7ur": "f12sql3b",
51
46
  "f4hv8x": "f1i4q40k",
52
47
  "Gpan81": "fcrbge9",
53
48
  "z7afg": "ft464mn",
54
49
  "rsjj6t": "fskqmiq",
55
- "E86f5s": "f1kbdjx9",
56
- "f5nhos": ["fw1d893", "fpuz8dn"],
57
- "Bhtq6h7": "f14hlsw1",
58
- "Bubk9yy": ["fpuz8dn", "fw1d893"],
59
- "dzajus": "f1bkt4b4",
60
- "B8gmrwi": ["f16hf5f2", "f1qhqcal"],
61
- "Byq6oy9": "fyyqeim",
62
- "Bdy2j38": ["f1qhqcal", "f16hf5f2"],
50
+ "Bqsd8kq": "f2gy8jn",
51
+ "sfhsbh": "f1pke3uf",
63
52
  "Bugh3ej": "f18xdlq9",
64
- "epcuuz": "filx0we",
65
- "Ba33l6n": ["f1horip2", "fgnx9ah"],
66
- "va7z1g": "fkii2tb",
67
- "Bmi6mq9": ["fgnx9ah", "f1horip2"],
53
+ "hpanx6": "f1114nks",
68
54
  "Bjkpy09": "f1rh66yx",
69
55
  "Jxg1p8": "f19ibq92",
70
56
  "Bc94xmo": ["fc3tncn", "f1veb610"],
71
57
  "Bj23z95": ["f1veb610", "fc3tncn"]
72
58
  }
73
59
  }, {
74
- "d": [".frxo1y7{--switch-width:40px;}", ".fe5s2ct{--switch-height:20px;}", ".f1n6k660{--switch-thumb-size:14px;}", ".f17m95gg{--switch-checked-opacity:0;}", ".fp7zjh8{--switch-unchecked-opacity:0;}", ".f10pi13n{position:relative;}", ".fnceurk{width:var(--switch-width);}", ".f15da5dy{height:var(--switch-height);}", ".f14t3ns0{display:inline-block;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f1sdsnyy{touch-action:none;}", ".f1qdqbpl{vertical-align:bottom;}", ".felqjlh{-webkit-tap-highlight-color:rgba(0,0,0,0);}", ".f1k6fduh{cursor:pointer;}", ".fdrzuqr{cursor:not-allowed;}", ".f1aehjj5{pointer-events:none;}", "[data-keyboard-nav] .fbiesyy:focus-within{border-top-color:transparent;}", "[data-keyboard-nav] .fq2kn9:focus-within{border-right-color:transparent;}", "[data-keyboard-nav] .f1jxwnad:focus-within{border-left-color:transparent;}", "[data-keyboard-nav] .f1il7mou:focus-within{border-bottom-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f1kbdjx9:focus-within:after{border-top-style:solid;}", "[data-keyboard-nav] .fw1d893:focus-within:after{border-right-style:solid;}", "[data-keyboard-nav] .fpuz8dn:focus-within:after{border-left-style:solid;}", "[data-keyboard-nav] .f14hlsw1:focus-within:after{border-bottom-style:solid;}", "[data-keyboard-nav] .f1bkt4b4:focus-within:after{border-top-width:2px;}", "[data-keyboard-nav] .f16hf5f2:focus-within:after{border-right-width:2px;}", "[data-keyboard-nav] .f1qhqcal:focus-within:after{border-left-width:2px;}", "[data-keyboard-nav] .fyyqeim:focus-within:after{border-bottom-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .filx0we:focus-within:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1horip2:focus-within:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fgnx9ah:focus-within:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fkii2tb:focus-within:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1rh66yx:focus-within:after{top:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f19ibq92:focus-within:after{bottom:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .fc3tncn:focus-within:after{left:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f1veb610:focus-within:after{right:calc(0px - 2px - 8px);}"],
75
- "h": [".frinyyk:hover .fui-Switch-thumb:before{background-color:var(--colorNeutralStrokeAccessibleHover);}", ".fhwgkv7:hover .fui-Switch-track:before{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1cjufhn:hover .fui-Switch-track:before{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1395m7v:hover .fui-Switch-track:before{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fyo9fdn:hover .fui-Switch-track:before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".fpfyfb6:hover .fui-Switch-track:after{background-color:var(--colorBrandBackgroundHover);}"],
60
+ "d": [".frxo1y7{--switch-width:40px;}", ".fe5s2ct{--switch-height:20px;}", ".f1n6k660{--switch-thumb-size:14px;}", ".f17m95gg{--switch-checked-opacity:0;}", ".fp7zjh8{--switch-unchecked-opacity:0;}", ".f10pi13n{position:relative;}", ".fnceurk{width:var(--switch-width);}", ".f15da5dy{height:var(--switch-height);}", ".f14t3ns0{display:inline-block;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f1sdsnyy{touch-action:none;}", ".f1qdqbpl{vertical-align:bottom;}", ".felqjlh{-webkit-tap-highlight-color:rgba(0,0,0,0);}", ".f1k6fduh{cursor:pointer;}", ".fdrzuqr{cursor:not-allowed;}", ".f1aehjj5{pointer-events:none;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1rh66yx:focus-within:after{top:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f19ibq92:focus-within:after{bottom:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .fc3tncn:focus-within:after{left:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f1veb610:focus-within:after{right:calc(0px - 2px - 8px);}"],
61
+ "h": [".frinyyk:hover .fui-Switch-thumb:before{background-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1g8lwx2:hover .fui-Switch-track:before{border-color:var(--colorNeutralStrokeAccessibleHover);}", ".fpfyfb6:hover .fui-Switch-track:after{background-color:var(--colorBrandBackgroundHover);}"],
76
62
  "a": [".f3vtzeg:active .fui-Switch-track:after{background-color:var(--colorBrandBackgroundPressed);}"],
77
63
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
78
64
  });
@@ -304,7 +290,7 @@ const useInputStyle = /*#__PURE__*/__styles({
304
290
  */
305
291
 
306
292
 
307
- export const useSwitchStyles = state => {
293
+ export const useSwitchStyles_unstable = state => {
308
294
  const {
309
295
  checked,
310
296
  disabled
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/useSwitchStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,6BAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAGA,OAAO,MAAM,eAAe,GAAG,YAAxB;AACP,MAAM,cAAc,GAAG,GAAG,eAAe,QAAzC;AACA,MAAM,cAAc,GAAG,GAAG,eAAe,QAAzC;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;AA2DA;;AAEG;;;AACH,MAAM,cAAc,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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K,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,cADkC,EAElC,WAAW,CAAC,KAFsB,EAGlC,CAAC,QAAD,IAAa,WAAW,CAAC,OAHS,EAIlC,CAAC,QAAD,IAAa,WAAW,CAAC,SAJS,EAKlC,QAAQ,IAAI,WAAW,CAAC,eALU,EAMlC,QAAQ,IAAI,WAAW,CAAC,iBANU,EAOlC,KAAK,CAAC,KAAN,CAAY,SAPsB,CAApC;AAUA,EAAA,KAAK,CAAC,UAAN,CAAiB,SAAjB,GAA6B,YAAY,CAAC,gBAAgB,CAAC,UAAlB,EAA8B,KAAK,CAAC,UAAN,CAAiB,SAA/C,CAAzC;AAEA,EAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAAC,WAAW,CAAC,KAAb,EAAoB,KAAK,CAAC,KAAN,CAAY,SAAhC,CAApC;AAEA,SAAO,KAAP;AACD,CA/CM","sourceRoot":""}
@@ -18,9 +18,9 @@ const useSwitchStyles_1 = /*#__PURE__*/require("./useSwitchStyles");
18
18
 
19
19
 
20
20
  exports.Switch = /*#__PURE__*/React.forwardRef((props, ref) => {
21
- const state = useSwitch_1.useSwitch(props, ref);
22
- useSwitchStyles_1.useSwitchStyles(state);
23
- return renderSwitch_1.renderSwitch(state);
21
+ const state = useSwitch_1.useSwitch_unstable(props, ref);
22
+ useSwitchStyles_1.useSwitchStyles_unstable(state);
23
+ return renderSwitch_1.renderSwitch_unstable(state);
24
24
  });
25
25
  exports.Switch.displayName = 'Switch';
26
26
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,WAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,CAAd;AAEA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,cAAA,CAAA,YAAA,CAAa,KAAb,CAAP;AACD,CANuD,CAA3C;AAQb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAAd;AAEA,EAAA,iBAAA,CAAA,wBAAA,CAAyB,KAAzB;AAEA,SAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,CAAP;AACD,CANuD,CAA3C;AAQb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourceRoot":""}
@@ -1,30 +1,30 @@
1
1
  import * as React from 'react';
2
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
2
+ import type { ComponentProps, ComponentState, IntrinsicSlotProps } from '@fluentui/react-utilities';
3
3
  export declare type SwitchSlots = {
4
4
  /**
5
5
  * The root of the Switch.
6
6
  */
7
- root: IntrinsicShorthandProps<'div'>;
7
+ root: IntrinsicSlotProps<'div'>;
8
8
  /**
9
9
  * The bar indicating the status of the Switch.
10
10
  */
11
- track: IntrinsicShorthandProps<'div'>;
11
+ track: IntrinsicSlotProps<'div'>;
12
12
  /**
13
13
  * The wrapper around the thumb. It is used as the active area for the thumb to position itself.
14
14
  */
15
- thumbWrapper: IntrinsicShorthandProps<'div'>;
15
+ thumbWrapper: IntrinsicSlotProps<'div'>;
16
16
  /**
17
17
  * The circular icon indicating the status of the Switch.
18
18
  */
19
- thumb: IntrinsicShorthandProps<'div'>;
19
+ thumb: IntrinsicSlotProps<'div'>;
20
20
  /**
21
21
  * The hidden input that handles the Switch's internal functionality.
22
22
  */
23
- input: IntrinsicShorthandProps<'input'>;
23
+ input: IntrinsicSlotProps<'input'>;
24
24
  /**
25
25
  * The area in which the Switch's rail allows for the thumb to be dragged.
26
26
  */
27
- activeRail: IntrinsicShorthandProps<'div'>;
27
+ activeRail: IntrinsicSlotProps<'div'>;
28
28
  };
29
29
  export interface SwitchCommons {
30
30
  /**
@@ -2,4 +2,4 @@ import type { SwitchState } from './Switch.types';
2
2
  /**
3
3
  * Render the final JSX of Switch
4
4
  */
5
- export declare const renderSwitch: (state: SwitchState) => JSX.Element;
5
+ export declare const renderSwitch_unstable: (state: SwitchState) => JSX.Element;
@@ -3,23 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderSwitch = void 0;
6
+ exports.renderSwitch_unstable = void 0;
7
7
 
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
10
10
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
- const useSwitch_1 = /*#__PURE__*/require("./useSwitch");
13
11
  /**
14
12
  * Render the final JSX of Switch
15
13
  */
16
14
 
17
15
 
18
- const renderSwitch = state => {
16
+ const renderSwitch_unstable = state => {
19
17
  const {
20
18
  slots,
21
19
  slotProps
22
- } = react_utilities_1.getSlots(state, useSwitch_1.switchShorthandProps);
20
+ } = react_utilities_1.getSlots(state);
23
21
  return React.createElement(slots.root, { ...slotProps.root
24
22
  }, React.createElement(slots.track, { ...slotProps.track
25
23
  }), React.createElement(slots.thumbWrapper, { ...slotProps.thumbWrapper
@@ -29,5 +27,5 @@ const renderSwitch = state => {
29
27
  }));
30
28
  };
31
29
 
32
- exports.renderSwitch = renderSwitch;
30
+ exports.renderSwitch_unstable = renderSwitch_unstable;
33
31
  //# sourceMappingURL=renderSwitch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/renderSwitch.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,YAAY,GAAI,KAAD,IAAuB;AACjD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAsB,KAAtB,EAA6B,WAAA,CAAA,oBAA7B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,CAFF,EAKE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CALF,EAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CANF,CADF;AAUD,CAbM;;AAAM,OAAA,CAAA,YAAA,GAAY,YAAZ","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Switch/renderSwitch.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,qBAAqB,GAAI,KAAD,IAAuB;AAC1D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAsB,KAAtB,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,YAAP,EAAmB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAnB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,CAFF,EAKE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CALF,EAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CANF,CADF;AAUD,CAbM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
- import type { SwitchProps, SwitchSlots, SwitchState } from './Switch.types';
3
- /**
4
- * Array of all shorthand properties listed in SwitchSlots
5
- */
6
- export declare const switchShorthandProps: (keyof SwitchSlots)[];
2
+ import type { SwitchProps, SwitchState } from './Switch.types';
7
3
  /**
8
4
  * Given user props, returns state and render function for a Switch.
9
5
  */
10
- export declare const useSwitch: (props: SwitchProps, ref: React.Ref<HTMLElement>) => SwitchState;
6
+ export declare const useSwitch_unstable: (props: SwitchProps, ref: React.Ref<HTMLElement>) => SwitchState;
@@ -3,22 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useSwitch = exports.switchShorthandProps = void 0;
6
+ exports.useSwitch_unstable = void 0;
7
7
 
8
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
9
 
10
10
  const useSwitchState_1 = /*#__PURE__*/require("./useSwitchState");
11
- /**
12
- * Array of all shorthand properties listed in SwitchSlots
13
- */
14
-
15
-
16
- exports.switchShorthandProps = ['root', 'track', 'thumbWrapper', 'thumb', 'activeRail', 'input'];
17
11
  /**
18
12
  * Given user props, returns state and render function for a Switch.
19
13
  */
20
14
 
21
- const useSwitch = (props, ref) => {
15
+
16
+ const useSwitch_unstable = (props, ref) => {
22
17
  const {
23
18
  track,
24
19
  thumbWrapper,
@@ -71,5 +66,5 @@ const useSwitch = (props, ref) => {
71
66
  return state;
72
67
  };
73
68
 
74
- exports.useSwitch = useSwitch;
69
+ exports.useSwitch_unstable = useSwitch_unstable;
75
70
  //# sourceMappingURL=useSwitch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/useSwitch.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,oBAAA,GAA8C,CACzD,MADyD,EAEzD,OAFyD,EAGzD,cAHyD,EAIzD,OAJyD,EAKzD,YALyD,EAMzD,OANyD,CAA9C;AASb;;AAEG;;AACI,MAAM,SAAS,GAAG,CAAC,KAAD,EAAqB,GAArB,KAA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kBzB,IAAA,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAxB,CAlBkB;AAmBzB,IAAA,YAAY,EAAE,iBAAA,CAAA,gBAAA,CAAiB,YAAjB,EAA+B;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAA/B,CAnBW;AAoBzB,IAAA,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAxB,CApBkB;AAqBzB,IAAA,UAAU,EAAE,iBAAA,CAAA,gBAAA,CAAiB,UAAjB,EAA6B;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAA7B,CArBa;AAsBzB,IAAA,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB;AAC7B,MAAA,QAAQ,EAAE,IADmB;AAE7B,MAAA,YAAY,EAAE;AACZ,QAAA,IAAI,EAAE;AADM;AAFe,KAAxB;AAtBkB,GAA3B;AA8BA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AAEA,SAAO,KAAP;AACD,CAnCM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourceRoot":""}
@@ -3,4 +3,4 @@ export declare const switchClassName = "fui-Switch";
3
3
  /**
4
4
  * Apply styling to the Switch slots based on the state
5
5
  */
6
- export declare const useSwitchStyles: (state: SwitchState) => SwitchState;
6
+ export declare const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
@@ -3,12 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useSwitchStyles = exports.switchClassName = void 0;
6
+ exports.useSwitchStyles_unstable = exports.switchClassName = void 0;
7
7
 
8
- const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
10
10
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
11
 
12
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
+
12
14
  exports.switchClassName = 'fui-Switch';
13
15
  const trackClassName = `${exports.switchClassName}-track`;
14
16
  const thumbClassName = `${exports.switchClassName}-thumb`;
@@ -16,7 +18,7 @@ const thumbClassName = `${exports.switchClassName}-thumb`;
16
18
  * Styles for the root slot
17
19
  */
18
20
 
19
- const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
21
+ const useRootStyles = /*#__PURE__*/react_1.__styles({
20
22
  "root": {
21
23
  "B64q66w": "frxo1y7",
22
24
  "yvbau0": "fe5s2ct",
@@ -33,10 +35,7 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
33
35
  },
34
36
  "unchecked": {
35
37
  "d48c0s": "frinyyk",
36
- "B638aae": "fhwgkv7",
37
- "Hdeks4": ["f1cjufhn", "f1395m7v"],
38
- "sn1se1": "fyo9fdn",
39
- "Bspkfwm": ["f1395m7v", "f1cjufhn"]
38
+ "Bc6qnd8": "f1g8lwx2"
40
39
  },
41
40
  "checked": {
42
41
  "Banj4pq": "fpfyfb6",
@@ -52,36 +51,24 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
52
51
  },
53
52
  "focusIndicator": {
54
53
  "B486eqv": "f2hkw1w",
55
- "vchsgm": "fbiesyy",
56
- "ozrjjd": ["fq2kn9", "f1jxwnad"],
57
- "B7lelfh": "f1il7mou",
58
- "Bp3tz3o": ["f1jxwnad", "fq2kn9"],
54
+ "c2y4jd": "fsofd9k",
59
55
  "B8vm7ur": "f12sql3b",
60
56
  "f4hv8x": "f1i4q40k",
61
57
  "Gpan81": "fcrbge9",
62
58
  "z7afg": "ft464mn",
63
59
  "rsjj6t": "fskqmiq",
64
- "E86f5s": "f1kbdjx9",
65
- "f5nhos": ["fw1d893", "fpuz8dn"],
66
- "Bhtq6h7": "f14hlsw1",
67
- "Bubk9yy": ["fpuz8dn", "fw1d893"],
68
- "dzajus": "f1bkt4b4",
69
- "B8gmrwi": ["f16hf5f2", "f1qhqcal"],
70
- "Byq6oy9": "fyyqeim",
71
- "Bdy2j38": ["f1qhqcal", "f16hf5f2"],
60
+ "Bqsd8kq": "f2gy8jn",
61
+ "sfhsbh": "f1pke3uf",
72
62
  "Bugh3ej": "f18xdlq9",
73
- "epcuuz": "filx0we",
74
- "Ba33l6n": ["f1horip2", "fgnx9ah"],
75
- "va7z1g": "fkii2tb",
76
- "Bmi6mq9": ["fgnx9ah", "f1horip2"],
63
+ "hpanx6": "f1114nks",
77
64
  "Bjkpy09": "f1rh66yx",
78
65
  "Jxg1p8": "f19ibq92",
79
66
  "Bc94xmo": ["fc3tncn", "f1veb610"],
80
67
  "Bj23z95": ["f1veb610", "fc3tncn"]
81
68
  }
82
69
  }, {
83
- "d": [".frxo1y7{--switch-width:40px;}", ".fe5s2ct{--switch-height:20px;}", ".f1n6k660{--switch-thumb-size:14px;}", ".f17m95gg{--switch-checked-opacity:0;}", ".fp7zjh8{--switch-unchecked-opacity:0;}", ".f10pi13n{position:relative;}", ".fnceurk{width:var(--switch-width);}", ".f15da5dy{height:var(--switch-height);}", ".f14t3ns0{display:inline-block;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f1sdsnyy{touch-action:none;}", ".f1qdqbpl{vertical-align:bottom;}", ".felqjlh{-webkit-tap-highlight-color:rgba(0,0,0,0);}", ".f1k6fduh{cursor:pointer;}", ".fdrzuqr{cursor:not-allowed;}", ".f1aehjj5{pointer-events:none;}", "[data-keyboard-nav] .fbiesyy:focus-within{border-top-color:transparent;}", "[data-keyboard-nav] .fq2kn9:focus-within{border-right-color:transparent;}", "[data-keyboard-nav] .f1jxwnad:focus-within{border-left-color:transparent;}", "[data-keyboard-nav] .f1il7mou:focus-within{border-bottom-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f1kbdjx9:focus-within:after{border-top-style:solid;}", "[data-keyboard-nav] .fw1d893:focus-within:after{border-right-style:solid;}", "[data-keyboard-nav] .fpuz8dn:focus-within:after{border-left-style:solid;}", "[data-keyboard-nav] .f14hlsw1:focus-within:after{border-bottom-style:solid;}", "[data-keyboard-nav] .f1bkt4b4:focus-within:after{border-top-width:2px;}", "[data-keyboard-nav] .f16hf5f2:focus-within:after{border-right-width:2px;}", "[data-keyboard-nav] .f1qhqcal:focus-within:after{border-left-width:2px;}", "[data-keyboard-nav] .fyyqeim:focus-within:after{border-bottom-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .filx0we:focus-within:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1horip2:focus-within:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fgnx9ah:focus-within:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fkii2tb:focus-within:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1rh66yx:focus-within:after{top:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f19ibq92:focus-within:after{bottom:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .fc3tncn:focus-within:after{left:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f1veb610:focus-within:after{right:calc(0px - 2px - 8px);}"],
84
- "h": [".frinyyk:hover .fui-Switch-thumb:before{background-color:var(--colorNeutralStrokeAccessibleHover);}", ".fhwgkv7:hover .fui-Switch-track:before{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1cjufhn:hover .fui-Switch-track:before{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1395m7v:hover .fui-Switch-track:before{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fyo9fdn:hover .fui-Switch-track:before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".fpfyfb6:hover .fui-Switch-track:after{background-color:var(--colorBrandBackgroundHover);}"],
70
+ "d": [".frxo1y7{--switch-width:40px;}", ".fe5s2ct{--switch-height:20px;}", ".f1n6k660{--switch-thumb-size:14px;}", ".f17m95gg{--switch-checked-opacity:0;}", ".fp7zjh8{--switch-unchecked-opacity:0;}", ".f10pi13n{position:relative;}", ".fnceurk{width:var(--switch-width);}", ".f15da5dy{height:var(--switch-height);}", ".f14t3ns0{display:inline-block;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f1sdsnyy{touch-action:none;}", ".f1qdqbpl{vertical-align:bottom;}", ".felqjlh{-webkit-tap-highlight-color:rgba(0,0,0,0);}", ".f1k6fduh{cursor:pointer;}", ".fdrzuqr{cursor:not-allowed;}", ".f1aehjj5{pointer-events:none;}", "[data-keyboard-nav] .fsofd9k:focus-within{border-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f2gy8jn:focus-within:after{border-style:solid;}", "[data-keyboard-nav] .f1pke3uf:focus-within:after{border-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f1114nks:focus-within:after{border-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1rh66yx:focus-within:after{top:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f19ibq92:focus-within:after{bottom:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .fc3tncn:focus-within:after{left:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f1veb610:focus-within:after{right:calc(0px - 2px - 8px);}"],
71
+ "h": [".frinyyk:hover .fui-Switch-thumb:before{background-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1g8lwx2:hover .fui-Switch-track:before{border-color:var(--colorNeutralStrokeAccessibleHover);}", ".fpfyfb6:hover .fui-Switch-track:after{background-color:var(--colorBrandBackgroundHover);}"],
85
72
  "a": [".f3vtzeg:active .fui-Switch-track:after{background-color:var(--colorBrandBackgroundPressed);}"],
86
73
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
87
74
  });
@@ -90,7 +77,7 @@ const useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
90
77
  */
91
78
 
92
79
 
93
- const useTrackStyles = /*#__PURE__*/react_make_styles_1.__styles({
80
+ const useTrackStyles = /*#__PURE__*/react_1.__styles({
94
81
  "track": {
95
82
  "qhf8xq": "f1euv43f",
96
83
  "a9b677": "fly5x3f",
@@ -184,7 +171,7 @@ const useTrackStyles = /*#__PURE__*/react_make_styles_1.__styles({
184
171
  */
185
172
 
186
173
 
187
- const useThumbWrapperStyles = /*#__PURE__*/react_make_styles_1.__styles({
174
+ const useThumbWrapperStyles = /*#__PURE__*/react_1.__styles({
188
175
  "thumbWrapper": {
189
176
  "qhf8xq": "f1euv43f",
190
177
  "Bhzewxz": "f15twtuk",
@@ -202,7 +189,7 @@ const useThumbWrapperStyles = /*#__PURE__*/react_make_styles_1.__styles({
202
189
  */
203
190
 
204
191
 
205
- const useThumbStyles = /*#__PURE__*/react_make_styles_1.__styles({
192
+ const useThumbStyles = /*#__PURE__*/react_1.__styles({
206
193
  "thumb": {
207
194
  "qhf8xq": "f1euv43f",
208
195
  "a9b677": "fcjrtee",
@@ -274,7 +261,7 @@ const useThumbStyles = /*#__PURE__*/react_make_styles_1.__styles({
274
261
  */
275
262
 
276
263
 
277
- const useActiveRailStyles = /*#__PURE__*/react_make_styles_1.__styles({
264
+ const useActiveRailStyles = /*#__PURE__*/react_1.__styles({
278
265
  "activeRail": {
279
266
  "qhf8xq": "f1euv43f",
280
267
  "oyh7mz": ["fhpx7ww", "f1kctpth"],
@@ -288,7 +275,7 @@ const useActiveRailStyles = /*#__PURE__*/react_make_styles_1.__styles({
288
275
  */
289
276
 
290
277
 
291
- const useInputStyle = /*#__PURE__*/react_make_styles_1.__styles({
278
+ const useInputStyle = /*#__PURE__*/react_1.__styles({
292
279
  "input": {
293
280
  "abs64n": "fk73vx1",
294
281
  "qhf8xq": "f1euv43f",
@@ -313,7 +300,7 @@ const useInputStyle = /*#__PURE__*/react_make_styles_1.__styles({
313
300
  */
314
301
 
315
302
 
316
- const useSwitchStyles = state => {
303
+ const useSwitchStyles_unstable = state => {
317
304
  const {
318
305
  checked,
319
306
  disabled
@@ -324,14 +311,14 @@ const useSwitchStyles = state => {
324
311
  const thumbStyles = useThumbStyles();
325
312
  const activeRailStyles = useActiveRailStyles();
326
313
  const inputStyles = useInputStyle();
327
- state.root.className = react_make_styles_1.mergeClasses(exports.switchClassName + (checked ? ' checked' : ''), rootStyles.root, rootStyles.focusIndicator, !disabled && rootStyles.checked, !disabled && rootStyles.unchecked, disabled ? rootStyles.disabled : rootStyles.enabled, state.root.className);
328
- state.track.className = react_make_styles_1.mergeClasses(trackClassName, trackStyles.track, !disabled && trackStyles.checked, !disabled && trackStyles.unchecked, disabled && trackStyles.disabledChecked, disabled && trackStyles.disabledUnchecked, state.track.className);
329
- state.thumbWrapper.className = react_make_styles_1.mergeClasses(thumbWrapperStyles.thumbWrapper, state.thumbWrapper.className);
330
- state.thumb.className = react_make_styles_1.mergeClasses(thumbClassName, thumbStyles.thumb, !disabled && thumbStyles.checked, !disabled && thumbStyles.unchecked, disabled && thumbStyles.disabledChecked, disabled && thumbStyles.disabledUnchecked, state.thumb.className);
331
- state.activeRail.className = react_make_styles_1.mergeClasses(activeRailStyles.activeRail, state.activeRail.className);
332
- state.input.className = react_make_styles_1.mergeClasses(inputStyles.input, state.input.className);
314
+ state.root.className = react_1.mergeClasses(exports.switchClassName + (checked ? ' checked' : ''), rootStyles.root, rootStyles.focusIndicator, !disabled && rootStyles.checked, !disabled && rootStyles.unchecked, disabled ? rootStyles.disabled : rootStyles.enabled, state.root.className);
315
+ state.track.className = react_1.mergeClasses(trackClassName, trackStyles.track, !disabled && trackStyles.checked, !disabled && trackStyles.unchecked, disabled && trackStyles.disabledChecked, disabled && trackStyles.disabledUnchecked, state.track.className);
316
+ state.thumbWrapper.className = react_1.mergeClasses(thumbWrapperStyles.thumbWrapper, state.thumbWrapper.className);
317
+ state.thumb.className = react_1.mergeClasses(thumbClassName, thumbStyles.thumb, !disabled && thumbStyles.checked, !disabled && thumbStyles.unchecked, disabled && thumbStyles.disabledChecked, disabled && thumbStyles.disabledUnchecked, state.thumb.className);
318
+ state.activeRail.className = react_1.mergeClasses(activeRailStyles.activeRail, state.activeRail.className);
319
+ state.input.className = react_1.mergeClasses(inputStyles.input, state.input.className);
333
320
  return state;
334
321
  };
335
322
 
336
- exports.useSwitchStyles = useSwitchStyles;
323
+ exports.useSwitchStyles_unstable = useSwitchStyles_unstable;
337
324
  //# sourceMappingURL=useSwitchStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/useSwitchStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGa,OAAA,CAAA,eAAA,GAAkB,YAAlB;AACb,MAAM,cAAc,GAAG,GAAG,OAAA,CAAA,eAAe,QAAzC;AACA,MAAM,cAAc,GAAG,GAAG,OAAA,CAAA,eAAe,QAAzC;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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N,CAAiB,SAAjB,GAA6B,OAAA,CAAA,YAAA,CAAa,gBAAgB,CAAC,UAA9B,EAA0C,KAAK,CAAC,UAAN,CAAiB,SAA3D,CAA7B;AAEA,EAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CAAa,WAAW,CAAC,KAAzB,EAAgC,KAAK,CAAC,KAAN,CAAY,SAA5C,CAAxB;AAEA,SAAO,KAAP;AACD,CA/CM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-switch",
3
- "version": "0.0.0-nightlycc44f3625c20211220.1",
3
+ "version": "0.0.0-nightlye0b8e1fa6920220128.1",
4
4
  "description": "Fluent UI React Switch component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,15 +22,13 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
24
  "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-switch/src && yarn docs",
25
- "storybook": "start-storybook",
25
+ "storybook": "node ../../scripts/storybook/runner",
26
26
  "type-check": "tsc -b tsconfig.json"
27
27
  },
28
28
  "devDependencies": {
29
- "@fluentui/babel-make-styles": "0.0.0-nightlycc44f3625c20211220.1",
30
29
  "@fluentui/eslint-plugin": "*",
31
- "@fluentui/jest-serializer-make-styles": "0.0.0-nightlycc44f3625c20211220.1",
32
30
  "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-make-styles": "0.0.0-nightlycc44f3625c20211220.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightlye0b8e1fa6920220128.1",
34
32
  "@fluentui/scripts": "^1.0.0",
35
33
  "@types/enzyme": "3.10.3",
36
34
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -44,10 +42,10 @@
44
42
  "react-test-renderer": "^16.3.0"
45
43
  },
46
44
  "dependencies": {
47
- "@fluentui/react-make-styles": "0.0.0-nightlycc44f3625c20211220.1",
48
- "@fluentui/react-shared-contexts": "0.0.0-nightlycc44f3625c20211220.1",
49
- "@fluentui/react-tabster": "0.0.0-nightlycc44f3625c20211220.1",
50
- "@fluentui/react-utilities": "0.0.0-nightlycc44f3625c20211220.1",
45
+ "@fluentui/react-shared-contexts": "0.0.0-nightlye0b8e1fa6920220128.1",
46
+ "@fluentui/react-tabster": "0.0.0-nightlye0b8e1fa6920220128.1",
47
+ "@fluentui/react-utilities": "0.0.0-nightlye0b8e1fa6920220128.1",
48
+ "@griffel/react": "1.0.0",
51
49
  "tslib": "^2.1.0"
52
50
  },
53
51
  "peerDependencies": {