@fluentui/react-spinbutton 0.0.0-nightly-20220429-0418.1 → 0.0.0-nightly-20220504-0420.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +29 -15
- package/CHANGELOG.md +16 -15
- package/package.json +9 -9
- 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": "Wed, 04 May 2022 04:33:36 GMT",
|
6
|
+
"tag": "@fluentui/react-spinbutton_v0.0.0-nightly-20220504-0420.1",
|
7
|
+
"version": "0.0.0-nightly-20220504-0420.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,46 @@
|
|
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-20220504-0420.1",
|
32
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
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-20220504-0420.1",
|
38
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
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-20220504-0420.1",
|
44
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
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-20220504-0420.1",
|
50
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
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-20220504-0420.1",
|
56
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
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-20220504-0420.1",
|
62
|
+
"commit": "158bbd218038e21eb173d3fa7efa00c595be789c"
|
63
|
+
}
|
64
|
+
],
|
65
|
+
"none": [
|
66
|
+
{
|
67
|
+
"author": "tristan.watanabe@gmail.com",
|
68
|
+
"package": "@fluentui/react-spinbutton",
|
69
|
+
"commit": "b69511e4262129a92e34f4bff8b2fe1aba44dd38",
|
70
|
+
"comment": "react-spinbutton: Move to new common folder."
|
57
71
|
}
|
58
72
|
]
|
59
73
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,28 +1,29 @@
|
|
1
1
|
# Change Log - @fluentui/react-spinbutton
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Wed, 04 May 2022 04:33:36 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-20220504-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v0.0.0-nightly-20220504-0420.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
|
+
Wed, 04 May 2022 04:33:36 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-20220504-0420.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-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) by beachball)
|
18
|
+
- Bump @fluentui/react-input to v0.0.0-nightly-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) by beachball)
|
19
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) by beachball)
|
20
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) by beachball)
|
21
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) by beachball)
|
22
|
+
- Bump @fluentui/react-label to v0.0.0-nightly-20220504-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/158bbd218038e21eb173d3fa7efa00c595be789c) 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
|
|
25
|
-
Mon, 25 Apr 2022 09:32:14 GMT
|
26
|
+
Mon, 25 Apr 2022 09:32:14 GMT
|
26
27
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.7)
|
27
28
|
|
28
29
|
### Changes
|
@@ -33,7 +34,7 @@ Mon, 25 Apr 2022 09:32:14 GMT
|
|
33
34
|
|
34
35
|
## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
|
35
36
|
|
36
|
-
Tue, 19 Apr 2022 19:17:29 GMT
|
37
|
+
Tue, 19 Apr 2022 19:17:29 GMT
|
37
38
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
|
38
39
|
|
39
40
|
### Changes
|
@@ -46,7 +47,7 @@ Tue, 19 Apr 2022 19:17:29 GMT
|
|
46
47
|
|
47
48
|
## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
|
48
49
|
|
49
|
-
Fri, 04 Mar 2022 05:17:40 GMT
|
50
|
+
Fri, 04 Mar 2022 05:17:40 GMT
|
50
51
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
|
51
52
|
|
52
53
|
### Changes
|
@@ -55,7 +56,7 @@ Fri, 04 Mar 2022 05:17:40 GMT
|
|
55
56
|
|
56
57
|
## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
|
57
58
|
|
58
|
-
Tue, 01 Mar 2022 02:17:40 GMT
|
59
|
+
Tue, 01 Mar 2022 02:17:40 GMT
|
59
60
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
|
60
61
|
|
61
62
|
### Changes
|
@@ -64,7 +65,7 @@ Tue, 01 Mar 2022 02:17:40 GMT
|
|
64
65
|
|
65
66
|
## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
|
66
67
|
|
67
|
-
Fri, 18 Feb 2022 13:35:38 GMT
|
68
|
+
Fri, 18 Feb 2022 13:35:38 GMT
|
68
69
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.5..@fluentui/react-spinbutton_v9.0.0-beta.6)
|
69
70
|
|
70
71
|
### 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-20220504-0420.1",
|
4
4
|
"description": "Fluent UI React SpinButton component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -21,24 +21,24 @@
|
|
21
21
|
"start": "yarn storybook",
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node
|
25
|
-
"storybook": "node
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-spinbutton/src && yarn docs",
|
25
|
+
"storybook": "node ../../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
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-20220504-0420.1",
|
32
|
+
"@fluentui/react-label": "0.0.0-nightly-20220504-0420.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-20220504-0420.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-20220504-0420.1",
|
40
|
+
"@fluentui/react-theme": "0.0.0-nightly-20220504-0420.1",
|
41
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20220504-0420.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.
|