@fluentui/react-spinbutton 0.0.0-nightly-20220428-0420.1 → 0.0.0-nightly-20220503-0421.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 +21 -15
- package/CHANGELOG.md +11 -10
- package/dist/{react-spinbutton.d.ts → index.d.ts} +0 -0
- package/package.json +7 -7
- package/MIGRATION.md +0 -67
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-spinbutton",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-spinbutton_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Tue, 03 May 2022 04:34:37 GMT",
|
6
|
+
"tag": "@fluentui/react-spinbutton_v0.0.0-nightly-20220503-0421.1",
|
7
|
+
"version": "0.0.0-nightly-20220503-0421.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -13,6 +13,12 @@
|
|
13
13
|
"commit": "not available",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "seanmonahan@microsoft.com",
|
18
|
+
"package": "@fluentui/react-spinbutton",
|
19
|
+
"commit": "c588d86a250e0e4894e41de2e1df273be9a7c866",
|
20
|
+
"comment": "remove MIGRATION.md"
|
21
|
+
},
|
16
22
|
{
|
17
23
|
"author": "seanmonahan@microsoft.com",
|
18
24
|
"package": "@fluentui/react-spinbutton",
|
@@ -22,38 +28,38 @@
|
|
22
28
|
{
|
23
29
|
"author": "beachball",
|
24
30
|
"package": "@fluentui/react-spinbutton",
|
25
|
-
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
26
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220503-0421.1",
|
32
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
27
33
|
},
|
28
34
|
{
|
29
35
|
"author": "beachball",
|
30
36
|
"package": "@fluentui/react-spinbutton",
|
31
|
-
"comment": "Bump @fluentui/react-input to v0.0.0-nightly-
|
32
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-input to v0.0.0-nightly-20220503-0421.1",
|
38
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
33
39
|
},
|
34
40
|
{
|
35
41
|
"author": "beachball",
|
36
42
|
"package": "@fluentui/react-spinbutton",
|
37
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
38
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220503-0421.1",
|
44
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
39
45
|
},
|
40
46
|
{
|
41
47
|
"author": "beachball",
|
42
48
|
"package": "@fluentui/react-spinbutton",
|
43
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
44
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220503-0421.1",
|
50
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"author": "beachball",
|
48
54
|
"package": "@fluentui/react-spinbutton",
|
49
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
50
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220503-0421.1",
|
56
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
51
57
|
},
|
52
58
|
{
|
53
59
|
"author": "beachball",
|
54
60
|
"package": "@fluentui/react-spinbutton",
|
55
|
-
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-
|
56
|
-
"commit": "
|
61
|
+
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-20220503-0421.1",
|
62
|
+
"commit": "0a280b0835179cafee6022280911ba42ab7baeac"
|
57
63
|
}
|
58
64
|
]
|
59
65
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-spinbutton
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 03 May 2022 04:34:37 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-20220503-0421.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v0.0.0-nightly-20220503-0421.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.7..@fluentui/react-spinbutton_v0.0.0-nightly-
|
9
|
+
Tue, 03 May 2022 04:34:37 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.7..@fluentui/react-spinbutton_v0.0.0-nightly-20220503-0421.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
|
+
- remove MIGRATION.md ([PR #22737](https://github.com/microsoft/fluentui/pull/22737) by seanmonahan@microsoft.com)
|
15
16
|
- react-spinbutton: remove "inputType" prop ([PR #22652](https://github.com/microsoft/fluentui/pull/22652) by seanmonahan@microsoft.com)
|
16
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-input to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
20
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
21
|
-
- Bump @fluentui/react-label to v0.0.0-nightly-
|
17
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
18
|
+
- Bump @fluentui/react-input to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
19
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
20
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
21
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
22
|
+
- Bump @fluentui/react-label to v0.0.0-nightly-20220503-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/0a280b0835179cafee6022280911ba42ab7baeac) by beachball)
|
22
23
|
|
23
24
|
## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.7)
|
24
25
|
|
File without changes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-spinbutton",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20220503-0421.1",
|
4
4
|
"description": "Fluent UI React SpinButton component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,17 +28,17 @@
|
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
32
|
-
"@fluentui/react-label": "0.0.0-nightly-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220503-0421.1",
|
32
|
+
"@fluentui/react-label": "0.0.0-nightly-20220503-0421.1",
|
33
33
|
"@fluentui/scripts": "^1.0.0"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
36
|
"@griffel/react": "1.0.3",
|
37
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
37
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20220503-0421.1",
|
38
38
|
"@fluentui/react-icons": "^2.0.166-rc.3",
|
39
|
-
"@fluentui/react-input": "0.0.0-nightly-
|
40
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
41
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
39
|
+
"@fluentui/react-input": "0.0.0-nightly-20220503-0421.1",
|
40
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220503-0421.1",
|
41
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220503-0421.1",
|
42
42
|
"tslib": "^2.1.0"
|
43
43
|
},
|
44
44
|
"peerDependencies": {
|
package/MIGRATION.md
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
# SpinButton Migration
|
2
|
-
|
3
|
-
## Migration from v8
|
4
|
-
|
5
|
-
- `value: string` => `value: number`. `value` is now a number rather than a string.
|
6
|
-
- `defaultValue: string` => `defaultValue: number`. `defaultValue` is now a number.
|
7
|
-
- `min` => `min`
|
8
|
-
- `max` => `max`
|
9
|
-
- `step` => `step`
|
10
|
-
- `precision` => `precision`
|
11
|
-
- `onChange(event: React.SyntheticEvent<HTMLElement>, newValue? string)` => `onChange(event: SpinButtonChangeEvent, value: SpinButtonOnChangeData)`
|
12
|
-
- `onValidate` => Not supported.
|
13
|
-
- `onIncrement` => use `onChange`.
|
14
|
-
- `onDecrement` => use `onChange`.
|
15
|
-
- `label` => use `Label` control with `htmlFor` and `id`.
|
16
|
-
- `labelPosition` => use `Label` control
|
17
|
-
- `ariaLabel` => use `aria-label` instead.
|
18
|
-
- `ariaDescribedBy` => use `aria-describedby` instead.
|
19
|
-
- `ariaPositionInSet` => use `aria-posinset` instead.
|
20
|
-
- `ariaSetSize` => use `aria-setsize` instead.
|
21
|
-
- `ariaValueNow` => remove, set internally by SpinButton
|
22
|
-
- `ariaValueText` => remove, set internally by SpinButton
|
23
|
-
- `iconProps` => use `Icon` control
|
24
|
-
|
25
|
-
### Migrating Custom Suffixes
|
26
|
-
|
27
|
-
`SpinButton` v9 introduces a new prop called `displayValue` that may be used in conjunction with `value` to display a formatted value in `SpinButton`. To display a value with a custom suffix (or prefix or an entirely different name) just provide the `displayValue` prop to your `SpinButton`:
|
28
|
-
|
29
|
-
```jsx
|
30
|
-
const [value, setValue] = React.useState(0);
|
31
|
-
const [displayValue, setDisplayValue] = React.useState('0 cm');
|
32
|
-
|
33
|
-
const onChange = (e: SpinButtonChangeEvent, data: SpinButtonOnChangeData): void => {
|
34
|
-
if (data.value) {
|
35
|
-
setValue(data.value);
|
36
|
-
setDisplayValue(`${data.value} cm`);
|
37
|
-
}
|
38
|
-
};
|
39
|
-
|
40
|
-
<SpinButton value={value} displayValue={displayValue} onChange={onChange} />;
|
41
|
-
```
|
42
|
-
|
43
|
-
### Migrating onIncrement/onDecrement
|
44
|
-
|
45
|
-
`SpinButton` v9 simply provides a change handler rather than handlers for change, increment and decrement. To handle increment and decrement cases compare the incoming value with the current value:
|
46
|
-
|
47
|
-
```jsx
|
48
|
-
const [value, setValue] = React.useState(0);
|
49
|
-
|
50
|
-
const onChange = (e: SpinButtonChangeEvent, data: SpinButtonOnChangeData): void => {
|
51
|
-
if (data.value) {
|
52
|
-
if (data.value > value) {
|
53
|
-
// onIncrement(e, data);
|
54
|
-
} else {
|
55
|
-
// Don't need an if clause here as onChange only fires when the value changes
|
56
|
-
// so it must be different.
|
57
|
-
// onDecrement(e, data);
|
58
|
-
}
|
59
|
-
}
|
60
|
-
};
|
61
|
-
|
62
|
-
<SpinButton value={value} onChange={onChange} />;
|
63
|
-
```
|
64
|
-
|
65
|
-
## Migration from v0
|
66
|
-
|
67
|
-
v0/Northstar does not have a `SpinButton` equivalent so there are no migration steps.
|