@fluentui/react-spinbutton 9.0.0-beta.7 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/CHANGELOG.json +597 -1
  2. package/CHANGELOG.md +181 -6
  3. package/README.md +4 -6
  4. package/dist/{react-spinbutton.d.ts → index.d.ts} +47 -66
  5. package/{lib → dist}/tsdoc-metadata.json +0 -0
  6. package/lib/components/SpinButton/SpinButton.js.map +1 -1
  7. package/lib/components/SpinButton/SpinButton.types.js.map +1 -1
  8. package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
  9. package/lib/components/SpinButton/useSpinButton.js +136 -104
  10. package/lib/components/SpinButton/useSpinButton.js.map +1 -1
  11. package/lib/components/SpinButton/useSpinButtonStyles.js +22 -16
  12. package/lib/components/SpinButton/useSpinButtonStyles.js.map +1 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/utils/clamp.js +6 -12
  15. package/lib/utils/clamp.js.map +1 -1
  16. package/lib/utils/getBound.js.map +1 -1
  17. package/lib/utils/precision.js.map +1 -1
  18. package/lib-commonjs/components/SpinButton/SpinButton.js.map +1 -1
  19. package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +1 -1
  20. package/lib-commonjs/components/SpinButton/useSpinButton.js +135 -104
  21. package/lib-commonjs/components/SpinButton/useSpinButton.js.map +1 -1
  22. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js +22 -16
  23. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js.map +1 -1
  24. package/lib-commonjs/index.js.map +1 -1
  25. package/lib-commonjs/utils/clamp.js +10 -16
  26. package/lib-commonjs/utils/clamp.js.map +1 -1
  27. package/lib-commonjs/utils/getBound.js.map +1 -1
  28. package/lib-commonjs/utils/precision.js.map +1 -1
  29. package/package.json +13 -14
  30. package/MIGRATION.md +0 -67
  31. package/lib/SpinButton.d.ts +0 -1
  32. package/lib/components/SpinButton/SpinButton.d.ts +0 -6
  33. package/lib/components/SpinButton/SpinButton.strings.d.ts +0 -2
  34. package/lib/components/SpinButton/SpinButton.strings.js +0 -5
  35. package/lib/components/SpinButton/SpinButton.strings.js.map +0 -1
  36. package/lib/components/SpinButton/SpinButton.types.d.ts +0 -149
  37. package/lib/components/SpinButton/index.d.ts +0 -5
  38. package/lib/components/SpinButton/renderSpinButton.d.ts +0 -5
  39. package/lib/components/SpinButton/useSpinButton.d.ts +0 -12
  40. package/lib/components/SpinButton/useSpinButtonStyles.d.ts +0 -7
  41. package/lib/index.d.ts +0 -2
  42. package/lib/utils/clamp.d.ts +0 -1
  43. package/lib/utils/getBound.d.ts +0 -2
  44. package/lib/utils/index.d.ts +0 -3
  45. package/lib/utils/precision.d.ts +0 -14
  46. package/lib-commonjs/SpinButton.d.ts +0 -1
  47. package/lib-commonjs/components/SpinButton/SpinButton.d.ts +0 -6
  48. package/lib-commonjs/components/SpinButton/SpinButton.strings.d.ts +0 -2
  49. package/lib-commonjs/components/SpinButton/SpinButton.strings.js +0 -11
  50. package/lib-commonjs/components/SpinButton/SpinButton.strings.js.map +0 -1
  51. package/lib-commonjs/components/SpinButton/SpinButton.types.d.ts +0 -149
  52. package/lib-commonjs/components/SpinButton/index.d.ts +0 -5
  53. package/lib-commonjs/components/SpinButton/renderSpinButton.d.ts +0 -5
  54. package/lib-commonjs/components/SpinButton/useSpinButton.d.ts +0 -12
  55. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.d.ts +0 -7
  56. package/lib-commonjs/index.d.ts +0 -2
  57. package/lib-commonjs/utils/clamp.d.ts +0 -1
  58. package/lib-commonjs/utils/getBound.d.ts +0 -2
  59. package/lib-commonjs/utils/index.d.ts +0 -3
  60. package/lib-commonjs/utils/precision.d.ts +0 -14
package/CHANGELOG.md CHANGED
@@ -1,12 +1,187 @@
1
1
  # Change Log - @fluentui/react-spinbutton
2
2
 
3
- This log was last generated on Mon, 25 Apr 2022 09:31:16 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 03 Aug 2022 16:00:28 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0)
8
+
9
+ Wed, 03 Aug 2022 16:00:28 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.18..@fluentui/react-spinbutton_v9.0.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: update spinbutton to stable ([PR #23805](https://github.com/microsoft/fluentui/pull/23805) by seanmonahan@microsoft.com)
15
+ - Bump @fluentui/react-input to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
16
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
17
+ - Bump @fluentui/react-label to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
18
+
19
+ ### Patches
20
+
21
+ - chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
22
+
23
+ ## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.18)
24
+
25
+ Thu, 14 Jul 2022 21:21:04 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.17..@fluentui/react-spinbutton_v9.0.0-beta.18)
27
+
28
+ ### Changes
29
+
30
+ - fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
31
+ - Bump @fluentui/react-input to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
32
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
33
+ - Bump @fluentui/react-label to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
34
+
35
+ ## [9.0.0-beta.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.17)
36
+
37
+ Thu, 14 Jul 2022 17:06:22 GMT
38
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.16..@fluentui/react-spinbutton_v9.0.0-beta.17)
39
+
40
+ ### Changes
41
+
42
+ - chore: Update @fluentui/react-icons dependency to v2.0.175 ([PR #23812](https://github.com/microsoft/fluentui/pull/23812) by ololubek@microsoft.com)
43
+ - fix: decrease number of react renders ([PR #23714](https://github.com/microsoft/fluentui/pull/23714) by seanmonahan@microsoft.com)
44
+ - Bump @fluentui/react-input to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
45
+ - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
46
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
47
+ - Bump @fluentui/react-label to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
48
+
49
+ ## [9.0.0-beta.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.16)
50
+
51
+ Tue, 28 Jun 2022 17:39:52 GMT
52
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.15..@fluentui/react-spinbutton_v9.0.0-beta.16)
53
+
54
+ ### Changes
55
+
56
+ - fix: Use caret dependency range for Griffel ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by lingfangao@hotmail.com)
57
+ - Bump @fluentui/react-input to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
58
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
59
+ - Bump @fluentui/react-label to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
60
+
61
+ ## [9.0.0-beta.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.15)
62
+
63
+ Tue, 28 Jun 2022 15:14:00 GMT
64
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.14..@fluentui/react-spinbutton_v9.0.0-beta.15)
65
+
66
+ ### Changes
67
+
68
+ - Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
69
+ - chore: Update @fluentui/react-icons to latest version ([PR #23459](https://github.com/microsoft/fluentui/pull/23459) by olfedias@microsoft.com)
70
+ - Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
71
+ - fix: Making increment and decrement buttons of SpinButton have 'type=button' instead of 'type=submit'. ([PR #23710](https://github.com/microsoft/fluentui/pull/23710) by Humberto.Morimoto@microsoft.com)
72
+ - Bump @fluentui/keyboard-keys to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
73
+ - Bump @fluentui/react-input to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
74
+ - Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
75
+ - Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
76
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
77
+ - Bump @fluentui/react-label to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
78
+
79
+ ## [9.0.0-beta.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.14)
80
+
81
+ Thu, 23 Jun 2022 14:25:31 GMT
82
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.13..@fluentui/react-spinbutton_v9.0.0-beta.14)
83
+
84
+ ### Changes
85
+
86
+ - Bump @fluentui/react-input to v9.0.0-rc.6 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
87
+ - Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
88
+ - Bump @fluentui/react-label to v9.0.0-rc.6 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
89
+
90
+ ## [9.0.0-beta.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.13)
91
+
92
+ Tue, 31 May 2022 21:28:47 GMT
93
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.12..@fluentui/react-spinbutton_v9.0.0-beta.13)
94
+
95
+ ### Changes
96
+
97
+ - chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
98
+ - Bump @fluentui/react-input to v9.0.0-rc.5 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
99
+ - Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
100
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
101
+ - Bump @fluentui/react-label to v9.0.0-rc.5 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
102
+
103
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.12)
104
+
105
+ Thu, 26 May 2022 21:01:29 GMT
106
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.11..@fluentui/react-spinbutton_v9.0.0-beta.12)
107
+
108
+ ### Changes
109
+
110
+ - Removing additional focus ring in native input for macOS safari. ([PR #23197](https://github.com/microsoft/fluentui/pull/23197) by esteban.230@hotmail.com)
111
+ - Bump @fluentui/react-input to v9.0.0-rc.4 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
112
+ - Bump @fluentui/react-label to v9.0.0-rc.4 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
113
+
114
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.11)
115
+
116
+ Mon, 23 May 2022 18:56:48 GMT
117
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.10..@fluentui/react-spinbutton_v9.0.0-beta.11)
118
+
119
+ ### Changes
120
+
121
+ - BREAKING: update string unions to use spinal-case ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by seanmonahan@microsoft.com)
122
+ - Bump @fluentui/react-input to v9.0.0-rc.3 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
123
+ - Bump @fluentui/react-theme to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
124
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
125
+ - Bump @fluentui/react-label to v9.0.0-rc.3 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
126
+
127
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.10)
128
+
129
+ Mon, 23 May 2022 12:13:40 GMT
130
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.9..@fluentui/react-spinbutton_v9.0.0-beta.10)
131
+
132
+ ### Changes
133
+
134
+ - chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
135
+ - react-spinbutton: update appearance stories ([PR #22980](https://github.com/microsoft/fluentui/pull/22980) by seanmonahan@microsoft.com)
136
+ - appearance story updates ([PR #22995](https://github.com/microsoft/fluentui/pull/22995) by seanmonahan@microsoft.com)
137
+ - widen `value` type to include `null` ([PR #23025](https://github.com/microsoft/fluentui/pull/23025) by seanmonahan@microsoft.com)
138
+ - Updated react-label package version to RC. ([PR #22865](https://github.com/microsoft/fluentui/pull/22865) by esteban.230@hotmail.com)
139
+ - feat: ship rolluped only dts ([PR #22828](https://github.com/microsoft/fluentui/pull/22828) by martinhochel@microsoft.com)
140
+ - react-spinbutton: add aria-valuetext override ([PR #22905](https://github.com/microsoft/fluentui/pull/22905) by seanmonahan@microsoft.com)
141
+ - chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
142
+ - react-spinbutton: use spacing tokens ([PR #22950](https://github.com/microsoft/fluentui/pull/22950) by gcox@microsoft.com)
143
+ - react-spinbutton: remove "strings" prop ([PR #22948](https://github.com/microsoft/fluentui/pull/22948) by seanmonahan@microsoft.com)
144
+ - Update react-input dependency version to release candidate. ([PR #23090](https://github.com/microsoft/fluentui/pull/23090) by seanmonahan@microsoft.com)
145
+ - update stepper clamping behavior ([PR #23004](https://github.com/microsoft/fluentui/pull/23004) by seanmonahan@microsoft.com)
146
+ - react-spinbutton: remove SpinButtonCommons type ([PR #22871](https://github.com/microsoft/fluentui/pull/22871) by seanmonahan@microsoft.com)
147
+ - Bump @fluentui/react-input to v9.0.0-rc.2 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
148
+ - Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
149
+ - Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
150
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
151
+ - Bump @fluentui/react-label to v9.0.0-rc.2 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
152
+
153
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.9)
154
+
155
+ Thu, 05 May 2022 18:26:30 GMT
156
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.8..@fluentui/react-spinbutton_v9.0.0-beta.9)
157
+
158
+ ### Changes
159
+
160
+ - Bump @fluentui/keyboard-keys to v9.0.0-rc.6 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
161
+ - Bump @fluentui/react-input to v9.0.0-beta.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
162
+ - Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
163
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
164
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
165
+ - Bump @fluentui/react-label to v9.0.0-beta.12 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
166
+
167
+ ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.8)
168
+
169
+ Wed, 04 May 2022 13:26:50 GMT
170
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.7..@fluentui/react-spinbutton_v9.0.0-beta.8)
171
+
172
+ ### Changes
173
+
174
+ - remove MIGRATION.md ([PR #22737](https://github.com/microsoft/fluentui/pull/22737) by seanmonahan@microsoft.com)
175
+ - react-spinbutton: remove "inputType" prop ([PR #22652](https://github.com/microsoft/fluentui/pull/22652) by seanmonahan@microsoft.com)
176
+ - Bump @fluentui/keyboard-keys to v9.0.0-rc.5 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
177
+ - Bump @fluentui/react-input to v9.0.0-beta.8 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
178
+ - Bump @fluentui/react-theme to v9.0.0-rc.6 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
179
+ - Bump @fluentui/react-utilities to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
180
+ - Bump @fluentui/react-label to v9.0.0-beta.11 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
181
+
7
182
  ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.7)
8
183
 
9
- Mon, 25 Apr 2022 09:31:16 GMT
184
+ Mon, 25 Apr 2022 09:32:14 GMT
10
185
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.7)
11
186
 
12
187
  ### Changes
@@ -17,7 +192,7 @@ Mon, 25 Apr 2022 09:31:16 GMT
17
192
 
18
193
  ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
19
194
 
20
- Tue, 19 Apr 2022 19:17:29 GMT
195
+ Tue, 19 Apr 2022 19:17:29 GMT
21
196
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
22
197
 
23
198
  ### Changes
@@ -30,7 +205,7 @@ Tue, 19 Apr 2022 19:17:29 GMT
30
205
 
31
206
  ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
32
207
 
33
- Fri, 04 Mar 2022 05:17:40 GMT
208
+ Fri, 04 Mar 2022 05:17:40 GMT
34
209
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
35
210
 
36
211
  ### Changes
@@ -39,7 +214,7 @@ Fri, 04 Mar 2022 05:17:40 GMT
39
214
 
40
215
  ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
41
216
 
42
- Tue, 01 Mar 2022 02:17:40 GMT
217
+ Tue, 01 Mar 2022 02:17:40 GMT
43
218
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.6..@fluentui/react-spinbutton_v9.0.0-beta.6)
44
219
 
45
220
  ### Changes
@@ -48,7 +223,7 @@ Tue, 01 Mar 2022 02:17:40 GMT
48
223
 
49
224
  ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.6)
50
225
 
51
- Fri, 18 Feb 2022 13:35:38 GMT
226
+ Fri, 18 Feb 2022 13:35:38 GMT
52
227
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.5..@fluentui/react-spinbutton_v9.0.0-beta.6)
53
228
 
54
229
  ### Changes
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # @fluentui/react-spinbutton
2
2
 
3
- **SpinButton component for [Fluent UI React](https://aka.ms/fluentui-storybook)**
3
+ **SpinButton component for [Fluent UI React](https://react.fluentui.dev/)**
4
4
 
5
- These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
6
-
7
- SpinButtons are used to allow numeric input bounded between minimum and maximum values with button controls to increment and decrement the input value by some step amount. Values can also be manipulated via the keyboard.
5
+ SpinButtons are used to allow numeric input bounded between minimum and maximum values with buttons to increment and decrement the input value. Values can also be manipulated via the keyboard.
8
6
 
9
7
  ### Usage
10
8
 
@@ -21,7 +19,7 @@ import { SpinButton } from '@fluentui/react-spinbutton';
21
19
  <SpinButton value={value} onChange={onSpinButtonChange}/>
22
20
  ```
23
21
 
24
- See [Fluent UI Storybook](https://aka.ms/fluentui-storybook) for more detailed usage examples.
22
+ See [Fluent UI Storybook](https://react.fluentui.dev/) for more detailed usage examples.
25
23
 
26
24
  Alternatively, run Storybook locally with:
27
25
 
@@ -34,4 +32,4 @@ See [Spec.md](./Spec.md).
34
32
 
35
33
  ### Migration Guide
36
34
 
37
- If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest SpinButton implementation.
35
+ When upgrading to Fluent UI v9 see the [upgrade guide](https://react.fluentui.dev/?path=/docs/concepts-upgrading-from-v8-components-spinbutton-upgrade--page) for guidance on updating to the latest SpinButton implementation.
@@ -1,3 +1,5 @@
1
+ /// <reference types="react" />
2
+
1
3
  import type { ComponentProps } from '@fluentui/react-utilities';
2
4
  import type { ComponentState } from '@fluentui/react-utilities';
3
5
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
@@ -21,22 +23,29 @@ export declare type SpinButtonChangeEvent = React_2.MouseEvent<HTMLButtonElement
21
23
 
22
24
  export declare const spinButtonClassNames: SlotClassNames<SpinButtonSlots>;
23
25
 
24
- export declare type SpinButtonCommons = {
26
+ export declare type SpinButtonOnChangeData = {
27
+ value?: number | null;
28
+ displayValue?: string;
29
+ };
30
+
31
+ /**
32
+ * SpinButton Props
33
+ */
34
+ export declare type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & {
35
+ /**
36
+ * Controls the colors and borders of the input.
37
+ * @default 'outline'
38
+ */
39
+ appearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';
25
40
  /**
26
41
  * Initial value of the control (assumed to be valid). Updates to this prop will not be respected.
27
42
  *
28
43
  * Use this if you intend for the SpinButton to be an uncontrolled component which maintains its
29
44
  * own value. For a controlled component, use `value` instead. (Mutually exclusive with `value`.)
30
- */
31
- defaultValue: number;
32
- /**
33
- * Current value of the control (assumed to be valid).
34
45
  *
35
- * Only provide this if the SpinButton is a controlled component where you are maintaining its
36
- * current state and passing updates based on change events; otherwise, use the `defaultValue`
37
- * property. (Mutually exclusive with `defaultValue`.)
46
+ * Use `null` to indicate the control has no value.
38
47
  */
39
- value: number;
48
+ defaultValue?: number | null;
40
49
  /**
41
50
  * String representation of `value`.
42
51
  *
@@ -47,28 +56,15 @@ export declare type SpinButtonCommons = {
47
56
  * current state and passing updates based on change events. When SpinButton is used as an
48
57
  * uncontrolled component this prop is ignored.
49
58
  */
50
- displayValue: string;
51
- /**
52
- * Min value of the control. If not provided, the control has no minimum value.
53
- */
54
- min: number;
59
+ displayValue?: string;
55
60
  /**
56
61
  * Max value of the control. If not provided, the control has no maximum value.
57
62
  */
58
- max: number;
59
- /**
60
- * Difference between two adjacent values of the control.
61
- * This value is used to calculate the precision of the input if no `precision` is given.
62
- * The precision calculated this way will always be greater than or equal 0.
63
- * @default 1
64
- */
65
- step: number;
63
+ max?: number;
66
64
  /**
67
- * Large difference between two values. This should be greater than `step` and is used
68
- * when users hit the Page Up or Page Down keys.
69
- * @default 1
65
+ * Min value of the control. If not provided, the control has no minimum value.
70
66
  */
71
- stepPage: number;
67
+ min?: number;
72
68
  /**
73
69
  * Callback for when the committed value changes.
74
70
  * - User presses the up/down buttons (on single press or every spin)
@@ -76,48 +72,46 @@ export declare type SpinButtonCommons = {
76
72
  * - User *commits* edits to the input text by focusing away (blurring) or pressing enter.
77
73
  * Note that this is NOT called for every key press while the user is editing.
78
74
  */
79
- onChange: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;
75
+ onChange?: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;
80
76
  /**
81
77
  * How many decimal places the value should be rounded to.
82
78
  *
83
79
  * The default is calculated based on the precision of `step`: i.e. if step = 1, precision = 0.
84
80
  * step = 0.0089, precision = 4. step = 300, precision = 2. step = 23.00, precision = 2.
85
81
  */
86
- precision: number;
87
- /**
88
- * Controls the colors and borders of the input.
89
- * @default 'outline'
90
- */
91
- appearance: 'outline' | 'underline' | 'filledDarker' | 'filledLighter';
82
+ precision?: number;
92
83
  /**
93
84
  * Size of the input.
94
85
  * @default 'medium'
95
86
  */
96
- size: 'small' | 'medium';
87
+ size?: 'small' | 'medium';
97
88
  /**
98
- * Controls which input types update the value.
99
- *
100
- * - 'all': both the spinner buttons and input field are enabled.
101
- * - 'spinners-only': only the spinner buttons are enabled.
102
- * @default all
89
+ * Difference between two adjacent values of the control.
90
+ * This value is used to calculate the precision of the input if no `precision` is given.
91
+ * The precision calculated this way will always be greater than or equal 0.
92
+ * @default 1
103
93
  */
104
- inputType: 'all' | 'spinners-only';
94
+ step?: number;
105
95
  /**
106
- * Strings for localizing text in the control.
96
+ * Large difference between two values. This should be greater than `step` and is used
97
+ * when users hit the Page Up or Page Down keys.
98
+ * @default 1
107
99
  */
108
- strings?: SpinButtonStrings;
109
- };
110
-
111
- export declare type SpinButtonOnChangeData = {
112
- value?: number;
113
- displayValue?: string;
100
+ stepPage?: number;
101
+ /**
102
+ * Current value of the control (assumed to be valid).
103
+ *
104
+ * Only provide this if the SpinButton is a controlled component where you are maintaining its
105
+ * current state and passing updates based on change events; otherwise, use the `defaultValue`
106
+ * property.
107
+ *
108
+ * Use `null` to indicate the control has no value.
109
+ *
110
+ * Mutually exclusive with `defaultValue`.
111
+ */
112
+ value?: number | null;
114
113
  };
115
114
 
116
- /**
117
- * SpinButton Props
118
- */
119
- export declare type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'onChange' | 'size'> & Partial<SpinButtonCommons>;
120
-
121
115
  export declare type SpinButtonSlots = {
122
116
  /**
123
117
  * The root element of SpinButton is a container `<div>`.
@@ -147,7 +141,7 @@ export declare type SpinButtonSpinState = 'rest' | 'up' | 'down';
147
141
  /**
148
142
  * State used in rendering SpinButton
149
143
  */
150
- export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Partial<SpinButtonCommons> & Pick<SpinButtonCommons, 'appearance' | 'size'> & {
144
+ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Required<Pick<SpinButtonProps, 'appearance' | 'size'>> & {
151
145
  /**
152
146
  * State used to track which direction, if any, SpinButton is currently spinning.
153
147
  * @default 'rest'
@@ -160,19 +154,6 @@ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Partial<
160
154
  atBound: SpinButtonBounds;
161
155
  };
162
156
 
163
- export declare type SpinButtonStrings = {
164
- /**
165
- * Label applied to the increment button.
166
- * Can include the token "\{step\}" which will be replaced with the value of the `step` prop.
167
- */
168
- incrementButtonLabel: string;
169
- /**
170
- * Label applied to the decrement button.
171
- * Can include the token "\{step\}" which will be replaced with the value of the `step` prop.
172
- */
173
- decrementButtonLabel: string;
174
- };
175
-
176
157
  /**
177
158
  * Create the state required to render SpinButton.
178
159
  *
File without changes
@@ -1 +1 @@
1
- {"version":3,"sources":["components/SpinButton/SpinButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AACA,SAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useSpinButton_unstable } from './useSpinButton';\nimport { renderSpinButton_unstable } from './renderSpinButton';\nimport { useSpinButtonStyles_unstable } from './useSpinButtonStyles';\nimport type { SpinButtonProps } from './SpinButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * A SpinButton allows someone to incrementally adjust a value in small steps.\n */\nexport const SpinButton: ForwardRefComponent<SpinButtonProps> = React.forwardRef((props, ref) => {\n const state = useSpinButton_unstable(props, ref);\n\n useSpinButtonStyles_unstable(state);\n return renderSpinButton_unstable(state);\n});\n\nSpinButton.displayName = 'SpinButton';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/SpinButton/SpinButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;EAEA,4BAA4B,CAAC,KAAD,CAA5B;EACA,OAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useSpinButton_unstable } from './useSpinButton';\nimport { renderSpinButton_unstable } from './renderSpinButton';\nimport { useSpinButtonStyles_unstable } from './useSpinButtonStyles';\nimport type { SpinButtonProps } from './SpinButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * A SpinButton allows someone to incrementally adjust a value in small steps.\n */\nexport const SpinButton: ForwardRefComponent<SpinButtonProps> = React.forwardRef((props, ref) => {\n const state = useSpinButton_unstable(props, ref);\n\n useSpinButtonStyles_unstable(state);\n return renderSpinButton_unstable(state);\n});\n\nSpinButton.displayName = 'SpinButton';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"SpinButton.types.js","sourceRoot":"../src/","sources":["components/SpinButton/SpinButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n// import { Input } from '@fluentui/react-input';\nimport * as React from 'react';\n\nexport type SpinButtonSlots = {\n /**\n * The root element of SpinButton is a container `<div>`.\n * The root slot receives the `className` and `style` specified on the `<SpinButton>`.\n * All other native props are applied to the primary slot: `input`.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * Input that displays the current value and accepts direct input from the user.\n * Displayed value is formatted.\n *\n * This is the primary slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * Renders the increment control.\n */\n incrementButton: NonNullable<Slot<'button'>>;\n\n /**\n * Renders the decrement control.\n */\n decrementButton: NonNullable<Slot<'button'>>;\n};\n\nexport type SpinButtonCommons = {\n /**\n * Initial value of the control (assumed to be valid). Updates to this prop will not be respected.\n *\n * Use this if you intend for the SpinButton to be an uncontrolled component which maintains its\n * own value. For a controlled component, use `value` instead. (Mutually exclusive with `value`.)\n */\n defaultValue: number;\n\n /**\n * Current value of the control (assumed to be valid).\n *\n * Only provide this if the SpinButton is a controlled component where you are maintaining its\n * current state and passing updates based on change events; otherwise, use the `defaultValue`\n * property. (Mutually exclusive with `defaultValue`.)\n */\n value: number;\n\n /**\n * String representation of `value`.\n *\n * Use this when displaying the value to users as something other than a plain number.\n * For example, when displaying currency values this might be \"$1.00\" when value is `1`.\n *\n * Only provide this if the SpinButton is a controlled component where you are maintaining its\n * current state and passing updates based on change events. When SpinButton is used as an\n * uncontrolled component this prop is ignored.\n */\n displayValue: string;\n\n /**\n * Min value of the control. If not provided, the control has no minimum value.\n */\n min: number;\n\n /**\n * Max value of the control. If not provided, the control has no maximum value.\n */\n max: number;\n\n /**\n * Difference between two adjacent values of the control.\n * This value is used to calculate the precision of the input if no `precision` is given.\n * The precision calculated this way will always be greater than or equal 0.\n * @default 1\n */\n step: number;\n\n /**\n * Large difference between two values. This should be greater than `step` and is used\n * when users hit the Page Up or Page Down keys.\n * @default 1\n */\n stepPage: number;\n\n /**\n * Callback for when the committed value changes.\n * - User presses the up/down buttons (on single press or every spin)\n * - User presses the up/down arrow keys (on single press or every spin)\n * - User *commits* edits to the input text by focusing away (blurring) or pressing enter.\n * Note that this is NOT called for every key press while the user is editing.\n */\n onChange: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;\n\n /**\n * How many decimal places the value should be rounded to.\n *\n * The default is calculated based on the precision of `step`: i.e. if step = 1, precision = 0.\n * step = 0.0089, precision = 4. step = 300, precision = 2. step = 23.00, precision = 2.\n */\n precision: number;\n\n /**\n * Controls the colors and borders of the input.\n * @default 'outline'\n */\n appearance: 'outline' | 'underline' | 'filledDarker' | 'filledLighter';\n\n /**\n * Size of the input.\n * @default 'medium'\n */\n size: 'small' | 'medium';\n\n /**\n * Controls which input types update the value.\n *\n * - 'all': both the spinner buttons and input field are enabled.\n * - 'spinners-only': only the spinner buttons are enabled.\n * @default all\n */\n inputType: 'all' | 'spinners-only';\n\n /**\n * Strings for localizing text in the control.\n */\n strings?: SpinButtonStrings;\n};\n\n/**\n * SpinButton Props\n */\nexport type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'onChange' | 'size'> &\n Partial<SpinButtonCommons>;\n\n/**\n * State used in rendering SpinButton\n */\nexport type SpinButtonState = ComponentState<SpinButtonSlots> &\n Partial<SpinButtonCommons> &\n Pick<SpinButtonCommons, 'appearance' | 'size'> & {\n /**\n * State used to track which direction, if any, SpinButton is currently spinning.\n * @default 'rest'\n */\n spinState: SpinButtonSpinState;\n\n /**\n * State used to track if the value is at the range bounds of [min-max].\n * @default 'none'\n */\n atBound: SpinButtonBounds;\n };\n\nexport type SpinButtonChangeEvent =\n | React.MouseEvent<HTMLButtonElement>\n | React.ChangeEvent<HTMLElement>\n | React.FocusEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>;\n\nexport type SpinButtonOnChangeData = {\n value?: number;\n displayValue?: string;\n};\n\nexport type SpinButtonSpinState = 'rest' | 'up' | 'down';\nexport type SpinButtonBounds = 'none' | 'min' | 'max' | 'both';\n\nexport type SpinButtonStrings = {\n /**\n * Label applied to the increment button.\n * Can include the token \"\\{step\\}\" which will be replaced with the value of the `step` prop.\n */\n incrementButtonLabel: string;\n\n /**\n * Label applied to the decrement button.\n * Can include the token \"\\{step\\}\" which will be replaced with the value of the `step` prop.\n */\n decrementButtonLabel: string;\n};\n"]}
1
+ {"version":3,"file":"SpinButton.types.js","sourceRoot":"../src/","sources":["components/SpinButton/SpinButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n// import { Input } from '@fluentui/react-input';\nimport * as React from 'react';\n\nexport type SpinButtonSlots = {\n /**\n * The root element of SpinButton is a container `<div>`.\n * The root slot receives the `className` and `style` specified on the `<SpinButton>`.\n * All other native props are applied to the primary slot: `input`.\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * Input that displays the current value and accepts direct input from the user.\n * Displayed value is formatted.\n *\n * This is the primary slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * Renders the increment control.\n */\n incrementButton: NonNullable<Slot<'button'>>;\n\n /**\n * Renders the decrement control.\n */\n decrementButton: NonNullable<Slot<'button'>>;\n};\n\n/**\n * SpinButton Props\n */\nexport type SpinButtonProps = Omit<\n ComponentProps<Partial<SpinButtonSlots>, 'input'>,\n 'defaultValue' | 'onChange' | 'size' | 'value'\n> & {\n /**\n * Controls the colors and borders of the input.\n * @default 'outline'\n */\n appearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';\n\n /**\n * Initial value of the control (assumed to be valid). Updates to this prop will not be respected.\n *\n * Use this if you intend for the SpinButton to be an uncontrolled component which maintains its\n * own value. For a controlled component, use `value` instead. (Mutually exclusive with `value`.)\n *\n * Use `null` to indicate the control has no value.\n */\n defaultValue?: number | null;\n\n /**\n * String representation of `value`.\n *\n * Use this when displaying the value to users as something other than a plain number.\n * For example, when displaying currency values this might be \"$1.00\" when value is `1`.\n *\n * Only provide this if the SpinButton is a controlled component where you are maintaining its\n * current state and passing updates based on change events. When SpinButton is used as an\n * uncontrolled component this prop is ignored.\n */\n displayValue?: string;\n\n /**\n * Max value of the control. If not provided, the control has no maximum value.\n */\n max?: number;\n\n /**\n * Min value of the control. If not provided, the control has no minimum value.\n */\n min?: number;\n\n /**\n * Callback for when the committed value changes.\n * - User presses the up/down buttons (on single press or every spin)\n * - User presses the up/down arrow keys (on single press or every spin)\n * - User *commits* edits to the input text by focusing away (blurring) or pressing enter.\n * Note that this is NOT called for every key press while the user is editing.\n */\n onChange?: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;\n\n /**\n * How many decimal places the value should be rounded to.\n *\n * The default is calculated based on the precision of `step`: i.e. if step = 1, precision = 0.\n * step = 0.0089, precision = 4. step = 300, precision = 2. step = 23.00, precision = 2.\n */\n precision?: number;\n\n /**\n * Size of the input.\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n\n /**\n * Difference between two adjacent values of the control.\n * This value is used to calculate the precision of the input if no `precision` is given.\n * The precision calculated this way will always be greater than or equal 0.\n * @default 1\n */\n step?: number;\n\n /**\n * Large difference between two values. This should be greater than `step` and is used\n * when users hit the Page Up or Page Down keys.\n * @default 1\n */\n stepPage?: number;\n\n /**\n * Current value of the control (assumed to be valid).\n *\n * Only provide this if the SpinButton is a controlled component where you are maintaining its\n * current state and passing updates based on change events; otherwise, use the `defaultValue`\n * property.\n *\n * Use `null` to indicate the control has no value.\n *\n * Mutually exclusive with `defaultValue`.\n */\n value?: number | null;\n};\n\n/**\n * State used in rendering SpinButton\n */\nexport type SpinButtonState = ComponentState<SpinButtonSlots> &\n Required<Pick<SpinButtonProps, 'appearance' | 'size'>> & {\n /**\n * State used to track which direction, if any, SpinButton is currently spinning.\n * @default 'rest'\n */\n spinState: SpinButtonSpinState;\n\n /**\n * State used to track if the value is at the range bounds of [min-max].\n * @default 'none'\n */\n atBound: SpinButtonBounds;\n };\n\nexport type SpinButtonChangeEvent =\n | React.MouseEvent<HTMLButtonElement>\n | React.ChangeEvent<HTMLElement>\n | React.FocusEvent<HTMLInputElement>\n | React.KeyboardEvent<HTMLInputElement>;\n\nexport type SpinButtonOnChangeData = {\n value?: number | null;\n displayValue?: string;\n};\n\nexport type SpinButtonSpinState = 'rest' | 'up' | 'down';\nexport type SpinButtonBounds = 'none' | 'min' | 'max' | 'both';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/SpinButton/renderSpinButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;AAClE;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,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,eAAP,EAAsB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAtB,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,eAAP,EAAsB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAtB,CAHF,CADF;AAOD,CAhCM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\n\n/**\n * Render the final JSX of SpinButton\n */\nexport const renderSpinButton_unstable = (state: SpinButtonState) => {\n // Leaving this here for now.\n // This is the approach using react-input's Input component.\n // It has some Typescript problems and feels hacky.\n // const { slots, slotProps } = getSlots<SpinButtonSlots>(state);\n\n // const { contentAfter, ...otherInputSlotProps } = slotProps.input as SpinButtonSlots['input'];\n // const inputContentAfter = {\n // ...contentAfter,\n // children: (\n // <>\n // <slots.incrementButton {...slotProps.incrementButton} />\n // <slots.decrementButton {...slotProps.decrementButton} />\n // </>\n // ),\n // };\n\n // return (\n // <slots.root {...slotProps.root}>\n // <slots.input {...otherInputSlotProps} contentAfter={inputContentAfter}/>\n // </slots.root>\n // );\n\n const { slots, slotProps } = getSlots<SpinButtonSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.incrementButton {...slotProps.incrementButton} />\n <slots.decrementButton {...slotProps.decrementButton} />\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/SpinButton/renderSpinButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,eAAP,EAAsB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAtB,CAFF,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,eAAP,EAAsB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAtB,CAHF,CADF;AAOD,CAhCM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SpinButtonState, SpinButtonSlots } from './SpinButton.types';\n\n/**\n * Render the final JSX of SpinButton\n */\nexport const renderSpinButton_unstable = (state: SpinButtonState) => {\n // Leaving this here for now.\n // This is the approach using react-input's Input component.\n // It has some Typescript problems and feels hacky.\n // const { slots, slotProps } = getSlots<SpinButtonSlots>(state);\n\n // const { contentAfter, ...otherInputSlotProps } = slotProps.input as SpinButtonSlots['input'];\n // const inputContentAfter = {\n // ...contentAfter,\n // children: (\n // <>\n // <slots.incrementButton {...slotProps.incrementButton} />\n // <slots.decrementButton {...slotProps.decrementButton} />\n // </>\n // ),\n // };\n\n // return (\n // <slots.root {...slotProps.root}>\n // <slots.input {...otherInputSlotProps} contentAfter={inputContentAfter}/>\n // </slots.root>\n // );\n\n const { slots, slotProps } = getSlots<SpinButtonSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n <slots.incrementButton {...slotProps.incrementButton} />\n <slots.decrementButton {...slotProps.decrementButton} />\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}