@fluentui/react-switch 0.0.0-nightly-20220511-0419.1 → 0.0.0-nightly-20220512-0418.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 +19 -13
- package/CHANGELOG.md +10 -9
- package/dist/index.d.ts +17 -18
- package/lib/components/Switch/Switch.types.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-switch_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 12 May 2022 04:32:32 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v0.0.0-nightly-20220512-0418.1",
|
7
|
+
"version": "0.0.0-nightly-20220512-0418.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -25,35 +25,41 @@
|
|
25
25
|
"commit": "eb1084fd607c0d1086f9d465168be5822daa5e40",
|
26
26
|
"comment": "feat: ship rolluped only dts"
|
27
27
|
},
|
28
|
+
{
|
29
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
30
|
+
"package": "@fluentui/react-switch",
|
31
|
+
"commit": "ec6c1a33b3c4cec9422d07bcffc48b85928c22d2",
|
32
|
+
"comment": "Removing SwitchCommons type in @fluentui/react-switch."
|
33
|
+
},
|
28
34
|
{
|
29
35
|
"author": "beachball",
|
30
36
|
"package": "@fluentui/react-switch",
|
31
|
-
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-
|
32
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-20220512-0418.1",
|
38
|
+
"commit": "ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42"
|
33
39
|
},
|
34
40
|
{
|
35
41
|
"author": "beachball",
|
36
42
|
"package": "@fluentui/react-switch",
|
37
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-
|
38
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220512-0418.1",
|
44
|
+
"commit": "ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42"
|
39
45
|
},
|
40
46
|
{
|
41
47
|
"author": "beachball",
|
42
48
|
"package": "@fluentui/react-switch",
|
43
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
44
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220512-0418.1",
|
50
|
+
"commit": "ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42"
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"author": "beachball",
|
48
54
|
"package": "@fluentui/react-switch",
|
49
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
50
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220512-0418.1",
|
56
|
+
"commit": "ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42"
|
51
57
|
},
|
52
58
|
{
|
53
59
|
"author": "beachball",
|
54
60
|
"package": "@fluentui/react-switch",
|
55
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
56
|
-
"commit": "
|
61
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220512-0418.1",
|
62
|
+
"commit": "ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42"
|
57
63
|
}
|
58
64
|
]
|
59
65
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 12 May 2022 04:32:32 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20220512-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightly-20220512-0418.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.9..@fluentui/react-switch_v0.0.0-nightly-
|
9
|
+
Thu, 12 May 2022 04:32:32 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.9..@fluentui/react-switch_v0.0.0-nightly-20220512-0418.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
|
15
15
|
- Updated react-label package version to RC. ([PR #22865](https://github.com/microsoft/fluentui/pull/22865) by esteban.230@hotmail.com)
|
16
16
|
- feat: ship rolluped only dts ([PR #22874](https://github.com/microsoft/fluentui/pull/22874) by martinhochel@microsoft.com)
|
17
|
-
-
|
18
|
-
- Bump @fluentui/react-
|
19
|
-
- Bump @fluentui/react-
|
20
|
-
- Bump @fluentui/react-
|
21
|
-
- Bump @fluentui/react-
|
17
|
+
- Removing SwitchCommons type in @fluentui/react-switch. ([PR #22943](https://github.com/microsoft/fluentui/pull/22943) by Humberto.Morimoto@microsoft.com)
|
18
|
+
- Bump @fluentui/react-label to v0.0.0-nightly-20220512-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42) by beachball)
|
19
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20220512-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42) by beachball)
|
20
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20220512-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42) by beachball)
|
21
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220512-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42) by beachball)
|
22
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220512-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/ed0dd6a9e40d9cfe7e3e822d726d109c935c8d42) by beachball)
|
22
23
|
|
23
24
|
## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.9)
|
24
25
|
|
package/dist/index.d.ts
CHANGED
@@ -23,36 +23,35 @@ export declare const switchClassName: string;
|
|
23
23
|
|
24
24
|
export declare const switchClassNames: SlotClassNames<SwitchSlots>;
|
25
25
|
|
26
|
-
declare type
|
26
|
+
export declare type SwitchOnChangeData = {
|
27
|
+
checked: boolean;
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Switch Props
|
32
|
+
*/
|
33
|
+
export declare type SwitchProps = Omit<ComponentProps<Partial<SwitchSlots>, 'input'>, 'onChange'> & {
|
27
34
|
/**
|
28
35
|
* Defines the controlled checked state of the Switch.
|
29
36
|
* If passed, Switch ignores the `defaultChecked` property.
|
30
37
|
* This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the
|
31
38
|
* correct value based on handling `onChange` events and re-rendering.
|
39
|
+
*
|
32
40
|
* @default false
|
33
41
|
*/
|
34
42
|
checked?: boolean;
|
35
|
-
/**
|
36
|
-
* The position of the label relative to the Switch.
|
37
|
-
*
|
38
|
-
* @default after
|
39
|
-
*/
|
40
|
-
labelPosition: 'above' | 'after' | 'before';
|
41
|
-
};
|
42
|
-
|
43
|
-
export declare type SwitchOnChangeData = {
|
44
|
-
checked: boolean;
|
45
|
-
};
|
46
|
-
|
47
|
-
/**
|
48
|
-
* Switch Props
|
49
|
-
*/
|
50
|
-
export declare type SwitchProps = Omit<ComponentProps<Partial<SwitchSlots>, 'input'>, 'onChange'> & Partial<SwitchCommons> & {
|
51
43
|
/**
|
52
44
|
* Defines whether the Switch is initially in a checked state or not when rendered.
|
45
|
+
*
|
53
46
|
* @default false
|
54
47
|
*/
|
55
48
|
defaultChecked?: boolean;
|
49
|
+
/**
|
50
|
+
* The position of the label relative to the Switch.
|
51
|
+
*
|
52
|
+
* @default after
|
53
|
+
*/
|
54
|
+
labelPosition?: 'above' | 'after' | 'before';
|
56
55
|
/**
|
57
56
|
* Callback to be called when the checked state value changes.
|
58
57
|
*/
|
@@ -87,7 +86,7 @@ export declare type SwitchSlots = {
|
|
87
86
|
/**
|
88
87
|
* State used in rendering Switch
|
89
88
|
*/
|
90
|
-
export declare type SwitchState = ComponentState<SwitchSlots> &
|
89
|
+
export declare type SwitchState = ComponentState<SwitchSlots> & Required<Pick<SwitchProps, 'labelPosition'>>;
|
91
90
|
|
92
91
|
/**
|
93
92
|
* Create the state required to render Switch.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Switch.types.js","sourceRoot":"../src/","sources":["components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type SwitchSlots = {\n /**\n * The root element of the Switch.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Switch>` tag.\n * All other native props will be applied to the primary slot: `input`.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The track and the thumb sliding over it indicating the on and off status of the Switch.\n */\n indicator: NonNullable<Slot<'div'>>;\n\n /**\n * Hidden input that handles the Switch's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on the `<Switch>` tag will be applied to this\n * slot, except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * The Switch's label.\n */\n label?: Slot<typeof Label>;\n};\n\
|
1
|
+
{"version":3,"file":"Switch.types.js","sourceRoot":"../src/","sources":["components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type SwitchSlots = {\n /**\n * The root element of the Switch.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Switch>` tag.\n * All other native props will be applied to the primary slot: `input`.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The track and the thumb sliding over it indicating the on and off status of the Switch.\n */\n indicator: NonNullable<Slot<'div'>>;\n\n /**\n * Hidden input that handles the Switch's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on the `<Switch>` tag will be applied to this\n * slot, except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * The Switch's label.\n */\n label?: Slot<typeof Label>;\n};\n\nexport type SwitchOnChangeData = {\n checked: boolean;\n};\n\n/**\n * Switch Props\n */\nexport type SwitchProps = Omit<ComponentProps<Partial<SwitchSlots>, 'input'>, 'onChange'> & {\n /**\n * Defines the controlled checked state of the Switch.\n * If passed, Switch ignores the `defaultChecked` property.\n * This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the\n * correct value based on handling `onChange` events and re-rendering.\n *\n * @default false\n */\n checked?: boolean;\n\n /**\n * Defines whether the Switch is initially in a checked state or not when rendered.\n *\n * @default false\n */\n defaultChecked?: boolean;\n\n /**\n * The position of the label relative to the Switch.\n *\n * @default after\n */\n labelPosition?: 'above' | 'after' | 'before';\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: SwitchOnChangeData) => void;\n};\n\n/**\n * State used in rendering Switch\n */\nexport type SwitchState = ComponentState<SwitchSlots> & Required<Pick<SwitchProps, 'labelPosition'>>;\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-switch",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20220512-0418.1",
|
4
4
|
"description": "Fluent UI React Switch component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,15 +28,15 @@
|
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220512-0418.1",
|
32
32
|
"@fluentui/scripts": "^1.0.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@fluentui/react-icons": "^2.0.166-rc.3",
|
36
|
-
"@fluentui/react-label": "0.0.0-nightly-
|
37
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
36
|
+
"@fluentui/react-label": "0.0.0-nightly-20220512-0418.1",
|
37
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20220512-0418.1",
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220512-0418.1",
|
39
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220512-0418.1",
|
40
40
|
"@griffel/react": "1.0.3",
|
41
41
|
"tslib": "^2.1.0"
|
42
42
|
},
|