@fluentui/react-switch 0.0.0-nightlyecca467a8920220110.1 → 0.0.0-nightlyf6116328d620220124.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.
- package/CHANGELOG.json +36 -18
- package/CHANGELOG.md +13 -12
- package/dist/react-switch.d.ts +0 -5
- package/lib/components/Switch/renderSwitch.js +1 -2
- package/lib/components/Switch/renderSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitch.d.ts +1 -5
- package/lib/components/Switch/useSwitch.js +0 -5
- package/lib/components/Switch/useSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/renderSwitch.js +1 -3
- package/lib-commonjs/components/Switch/renderSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitch.d.ts +1 -5
- package/lib-commonjs/components/Switch/useSwitch.js +2 -7
- package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.json
CHANGED
@@ -2,17 +2,23 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Mon,
|
6
|
-
"tag": "@fluentui/react-switch_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Mon, 24 Jan 2022 04:14:09 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v0.0.0-nightlyf6116328d620220124.1",
|
7
|
+
"version": "0.0.0-nightlyf6116328d620220124.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-switch",
|
13
|
-
"commit": "
|
13
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "behowell@microsoft.com",
|
18
|
+
"package": "@fluentui/react-switch",
|
19
|
+
"commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
|
20
|
+
"comment": "Remove component's shorthandProps array"
|
21
|
+
},
|
16
22
|
{
|
17
23
|
"author": "olfedias@microsoft.com",
|
18
24
|
"package": "@fluentui/react-switch",
|
@@ -34,47 +40,53 @@
|
|
34
40
|
{
|
35
41
|
"author": "beachball",
|
36
42
|
"package": "@fluentui/react-switch",
|
37
|
-
"comment": "Bump @fluentui/react-make-styles to v0.0.0-
|
38
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlyf6116328d620220124.1",
|
44
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
39
45
|
},
|
40
46
|
{
|
41
47
|
"author": "beachball",
|
42
48
|
"package": "@fluentui/react-switch",
|
43
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-
|
44
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlyf6116328d620220124.1",
|
50
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"author": "beachball",
|
48
54
|
"package": "@fluentui/react-switch",
|
49
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-
|
50
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightlyf6116328d620220124.1",
|
56
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
51
57
|
},
|
52
58
|
{
|
53
59
|
"author": "beachball",
|
54
60
|
"package": "@fluentui/react-switch",
|
55
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-
|
56
|
-
"commit": "
|
61
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyf6116328d620220124.1",
|
62
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
57
63
|
},
|
58
64
|
{
|
59
65
|
"author": "beachball",
|
60
66
|
"package": "@fluentui/react-switch",
|
61
|
-
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-
|
62
|
-
"commit": "
|
67
|
+
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlyf6116328d620220124.1",
|
68
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
63
69
|
},
|
64
70
|
{
|
65
71
|
"author": "beachball",
|
66
72
|
"package": "@fluentui/react-switch",
|
67
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-
|
68
|
-
"commit": "
|
73
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyf6116328d620220124.1",
|
74
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
69
75
|
},
|
70
76
|
{
|
71
77
|
"author": "beachball",
|
72
78
|
"package": "@fluentui/react-switch",
|
73
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-
|
74
|
-
"commit": "
|
79
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyf6116328d620220124.1",
|
80
|
+
"commit": "7e40e770b133f0e9b5a0ba356e78ea25a8647941"
|
75
81
|
}
|
76
82
|
],
|
77
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
|
+
},
|
78
90
|
{
|
79
91
|
"author": "andredias@microsoft.com",
|
80
92
|
"package": "@fluentui/react-switch",
|
@@ -86,6 +98,12 @@
|
|
86
98
|
"package": "@fluentui/react-switch",
|
87
99
|
"commit": "28ceaaa83cd92a0389c466f0b15b283e3d9b08e4",
|
88
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"
|
89
107
|
}
|
90
108
|
]
|
91
109
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on Mon,
|
3
|
+
This log was last generated on Mon, 24 Jan 2022 04:14:09 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyf6116328d620220124.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightlyf6116328d620220124.1)
|
8
8
|
|
9
|
-
Mon,
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v0.0.0-
|
9
|
+
Mon, 24 Jan 2022 04:14:09 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v0.0.0-nightlyf6116328d620220124.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by email not defined)
|
15
|
+
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
15
16
|
- update styles to not use CSS shorthands ([PR #20844](https://github.com/microsoft/fluentui/pull/20844) by olfedias@microsoft.com)
|
16
17
|
- 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)
|
17
18
|
- 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)
|
18
|
-
- Bump @fluentui/react-make-styles to v0.0.0-
|
19
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-
|
20
|
-
- Bump @fluentui/react-tabster to v0.0.0-
|
21
|
-
- Bump @fluentui/react-utilities to v0.0.0-
|
22
|
-
- Bump @fluentui/babel-make-styles to v0.0.0-
|
23
|
-
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-
|
24
|
-
- Bump @fluentui/react-conformance-make-styles to v0.0.0-
|
19
|
+
- Bump @fluentui/react-make-styles to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
21
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
22
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
23
|
+
- Bump @fluentui/babel-make-styles to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
24
|
+
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
25
|
+
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlyf6116328d620220124.1 ([commit](https://github.com/microsoft/fluentui/commit/7e40e770b133f0e9b5a0ba356e78ea25a8647941) by beachball)
|
25
26
|
|
26
27
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.5)
|
27
28
|
|
package/dist/react-switch.d.ts
CHANGED
@@ -46,11 +46,6 @@ 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.
|
@@ -1,6 +1,5 @@
|
|
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
|
*/
|
@@ -9,7 +8,7 @@ export const renderSwitch = state => {
|
|
9
8
|
const {
|
10
9
|
slots,
|
11
10
|
slotProps
|
12
|
-
} = getSlots(state
|
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;
|
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,YAAY,GAAI,KAAD,IAAuB;AACjD,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,9 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { SwitchProps,
|
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
|
*/
|
@@ -1,10 +1,5 @@
|
|
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
|
*/
|
@@ -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,
|
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,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,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":""}
|
@@ -8,8 +8,6 @@ exports.renderSwitch = void 0;
|
|
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
|
*/
|
@@ -19,7 +17,7 @@ const renderSwitch = state => {
|
|
19
17
|
const {
|
20
18
|
slots,
|
21
19
|
slotProps
|
22
|
-
} = react_utilities_1.getSlots(state
|
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
|
@@ -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
|
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,YAAY,GAAI,KAAD,IAAuB;AACjD,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,YAAA,GAAY,YAAZ","sourceRoot":""}
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { SwitchProps,
|
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
|
*/
|
@@ -3,21 +3,16 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.useSwitch =
|
6
|
+
exports.useSwitch = 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
|
|
15
|
+
|
21
16
|
const useSwitch = (props, ref) => {
|
22
17
|
const {
|
23
18
|
track,
|
@@ -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;;;
|
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;;;AACI,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,iBAAA,CAAA,qBAAA,CAAsB,MAAtB,EAA8B;AAClC,MAAA,GADkC;AAElC,SAAG,KAF+B;AAGlC,MAAA,EAAE,EAAE,iBAAA,CAAA,KAAA,CAAM,SAAN,EAAiB,KAAK,CAAC,EAAvB;AAH8B,KAA9B,CALmB;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,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,SAAA,GAAS,SAAT","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-switch",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyf6116328d620220124.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,15 @@
|
|
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": "
|
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-
|
29
|
+
"@fluentui/babel-make-styles": "0.0.0-nightlyf6116328d620220124.1",
|
30
30
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-
|
31
|
+
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyf6116328d620220124.1",
|
32
32
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-make-styles": "0.0.0-
|
33
|
+
"@fluentui/react-conformance-make-styles": "0.0.0-nightlyf6116328d620220124.1",
|
34
34
|
"@fluentui/scripts": "^1.0.0",
|
35
35
|
"@types/enzyme": "3.10.3",
|
36
36
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -44,10 +44,10 @@
|
|
44
44
|
"react-test-renderer": "^16.3.0"
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
|
-
"@fluentui/react-make-styles": "0.0.0-
|
48
|
-
"@fluentui/react-shared-contexts": "0.0.0-
|
49
|
-
"@fluentui/react-tabster": "0.0.0-
|
50
|
-
"@fluentui/react-utilities": "0.0.0-
|
47
|
+
"@fluentui/react-make-styles": "0.0.0-nightlyf6116328d620220124.1",
|
48
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightlyf6116328d620220124.1",
|
49
|
+
"@fluentui/react-tabster": "0.0.0-nightlyf6116328d620220124.1",
|
50
|
+
"@fluentui/react-utilities": "0.0.0-nightlyf6116328d620220124.1",
|
51
51
|
"tslib": "^2.1.0"
|
52
52
|
},
|
53
53
|
"peerDependencies": {
|