@fluentui/react-spinbutton 9.0.0-beta.9 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/CHANGELOG.json +558 -1
  2. package/CHANGELOG.md +163 -2
  3. package/README.md +4 -6
  4. package/dist/index.d.ts +49 -60
  5. package/lib/components/SpinButton/SpinButton.js.map +1 -1
  6. package/lib/components/SpinButton/SpinButton.types.js.map +1 -1
  7. package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
  8. package/lib/components/SpinButton/useSpinButton.js +148 -111
  9. package/lib/components/SpinButton/useSpinButton.js.map +1 -1
  10. package/lib/components/SpinButton/useSpinButtonStyles.js +22 -16
  11. package/lib/components/SpinButton/useSpinButtonStyles.js.map +1 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/utils/clamp.js +6 -12
  14. package/lib/utils/clamp.js.map +1 -1
  15. package/lib/utils/getBound.js.map +1 -1
  16. package/lib/utils/precision.js.map +1 -1
  17. package/lib-commonjs/components/SpinButton/SpinButton.js.map +1 -1
  18. package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +1 -1
  19. package/lib-commonjs/components/SpinButton/useSpinButton.js +146 -110
  20. package/lib-commonjs/components/SpinButton/useSpinButton.js.map +1 -1
  21. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js +22 -16
  22. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.js.map +1 -1
  23. package/lib-commonjs/index.js.map +1 -1
  24. package/lib-commonjs/utils/clamp.js +10 -16
  25. package/lib-commonjs/utils/clamp.js.map +1 -1
  26. package/lib-commonjs/utils/getBound.js.map +1 -1
  27. package/lib-commonjs/utils/precision.js.map +1 -1
  28. package/package.json +13 -14
  29. package/lib/SpinButton.d.ts +0 -1
  30. package/lib/components/SpinButton/SpinButton.d.ts +0 -6
  31. package/lib/components/SpinButton/SpinButton.strings.d.ts +0 -2
  32. package/lib/components/SpinButton/SpinButton.strings.js +0 -5
  33. package/lib/components/SpinButton/SpinButton.strings.js.map +0 -1
  34. package/lib/components/SpinButton/SpinButton.types.d.ts +0 -141
  35. package/lib/components/SpinButton/index.d.ts +0 -5
  36. package/lib/components/SpinButton/renderSpinButton.d.ts +0 -5
  37. package/lib/components/SpinButton/useSpinButton.d.ts +0 -12
  38. package/lib/components/SpinButton/useSpinButtonStyles.d.ts +0 -7
  39. package/lib/index.d.ts +0 -2
  40. package/lib/tsdoc-metadata.json +0 -11
  41. package/lib/utils/clamp.d.ts +0 -1
  42. package/lib/utils/getBound.d.ts +0 -2
  43. package/lib/utils/index.d.ts +0 -3
  44. package/lib/utils/precision.d.ts +0 -14
  45. package/lib-commonjs/SpinButton.d.ts +0 -1
  46. package/lib-commonjs/components/SpinButton/SpinButton.d.ts +0 -6
  47. package/lib-commonjs/components/SpinButton/SpinButton.strings.d.ts +0 -2
  48. package/lib-commonjs/components/SpinButton/SpinButton.strings.js +0 -11
  49. package/lib-commonjs/components/SpinButton/SpinButton.strings.js.map +0 -1
  50. package/lib-commonjs/components/SpinButton/SpinButton.types.d.ts +0 -141
  51. package/lib-commonjs/components/SpinButton/index.d.ts +0 -5
  52. package/lib-commonjs/components/SpinButton/renderSpinButton.d.ts +0 -5
  53. package/lib-commonjs/components/SpinButton/useSpinButton.d.ts +0 -12
  54. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.d.ts +0 -7
  55. package/lib-commonjs/index.d.ts +0 -2
  56. package/lib-commonjs/utils/clamp.d.ts +0 -1
  57. package/lib-commonjs/utils/getBound.d.ts +0 -2
  58. package/lib-commonjs/utils/index.d.ts +0 -3
  59. package/lib-commonjs/utils/precision.d.ts +0 -14
package/CHANGELOG.md CHANGED
@@ -1,12 +1,173 @@
1
1
  # Change Log - @fluentui/react-spinbutton
2
2
 
3
- This log was last generated on Thu, 05 May 2022 18:24:37 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Sep 2022 09:44:43 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.1)
8
+
9
+ Thu, 15 Sep 2022 09:44:43 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0..@fluentui/react-spinbutton_v9.0.1)
11
+
12
+ ### Patches
13
+
14
+ - chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
15
+ - refactor: Replace useMergedEventCallbacks utility with mergeCallbacks ([PR #24152](https://github.com/microsoft/fluentui/pull/24152) by behowell@microsoft.com)
16
+ - Bump @fluentui/react-input to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
17
+ - Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
19
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
20
+ - Bump @fluentui/react-label to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
21
+
22
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0)
23
+
24
+ Wed, 03 Aug 2022 16:04:01 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.18..@fluentui/react-spinbutton_v9.0.0)
26
+
27
+ ### Minor changes
28
+
29
+ - feat: update spinbutton to stable ([PR #23805](https://github.com/microsoft/fluentui/pull/23805) by seanmonahan@microsoft.com)
30
+ - Bump @fluentui/react-input to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
31
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
32
+ - Bump @fluentui/react-label to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
33
+
34
+ ### Patches
35
+
36
+ - chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
37
+
38
+ ## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.18)
39
+
40
+ Thu, 14 Jul 2022 21:21:04 GMT
41
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.17..@fluentui/react-spinbutton_v9.0.0-beta.18)
42
+
43
+ ### Changes
44
+
45
+ - fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
46
+ - Bump @fluentui/react-input to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
47
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
48
+ - Bump @fluentui/react-label to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
49
+
50
+ ## [9.0.0-beta.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.17)
51
+
52
+ Thu, 14 Jul 2022 17:06:22 GMT
53
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.16..@fluentui/react-spinbutton_v9.0.0-beta.17)
54
+
55
+ ### Changes
56
+
57
+ - chore: Update @fluentui/react-icons dependency to v2.0.175 ([PR #23812](https://github.com/microsoft/fluentui/pull/23812) by ololubek@microsoft.com)
58
+ - fix: decrease number of react renders ([PR #23714](https://github.com/microsoft/fluentui/pull/23714) by seanmonahan@microsoft.com)
59
+ - Bump @fluentui/react-input to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
60
+ - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
61
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
62
+ - Bump @fluentui/react-label to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
63
+
64
+ ## [9.0.0-beta.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.16)
65
+
66
+ Tue, 28 Jun 2022 17:39:52 GMT
67
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.15..@fluentui/react-spinbutton_v9.0.0-beta.16)
68
+
69
+ ### Changes
70
+
71
+ - fix: Use caret dependency range for Griffel ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by lingfangao@hotmail.com)
72
+ - Bump @fluentui/react-input to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
73
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
74
+ - Bump @fluentui/react-label to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
75
+
76
+ ## [9.0.0-beta.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.15)
77
+
78
+ Tue, 28 Jun 2022 15:14:00 GMT
79
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.14..@fluentui/react-spinbutton_v9.0.0-beta.15)
80
+
81
+ ### Changes
82
+
83
+ - Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
84
+ - chore: Update @fluentui/react-icons to latest version ([PR #23459](https://github.com/microsoft/fluentui/pull/23459) by olfedias@microsoft.com)
85
+ - Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
86
+ - 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)
87
+ - Bump @fluentui/keyboard-keys to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
88
+ - Bump @fluentui/react-input to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
89
+ - Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
90
+ - Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
91
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
92
+ - Bump @fluentui/react-label to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
93
+
94
+ ## [9.0.0-beta.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.14)
95
+
96
+ Thu, 23 Jun 2022 14:25:31 GMT
97
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.13..@fluentui/react-spinbutton_v9.0.0-beta.14)
98
+
99
+ ### Changes
100
+
101
+ - Bump @fluentui/react-input to v9.0.0-rc.6 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
102
+ - Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
103
+ - Bump @fluentui/react-label to v9.0.0-rc.6 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
104
+
105
+ ## [9.0.0-beta.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.13)
106
+
107
+ Tue, 31 May 2022 21:28:47 GMT
108
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.12..@fluentui/react-spinbutton_v9.0.0-beta.13)
109
+
110
+ ### Changes
111
+
112
+ - chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
113
+ - Bump @fluentui/react-input to v9.0.0-rc.5 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
114
+ - Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
115
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
116
+ - Bump @fluentui/react-label to v9.0.0-rc.5 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
117
+
118
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.12)
119
+
120
+ Thu, 26 May 2022 21:01:29 GMT
121
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.11..@fluentui/react-spinbutton_v9.0.0-beta.12)
122
+
123
+ ### Changes
124
+
125
+ - Removing additional focus ring in native input for macOS safari. ([PR #23197](https://github.com/microsoft/fluentui/pull/23197) by esteban.230@hotmail.com)
126
+ - Bump @fluentui/react-input to v9.0.0-rc.4 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
127
+ - Bump @fluentui/react-label to v9.0.0-rc.4 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
128
+
129
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.11)
130
+
131
+ Mon, 23 May 2022 18:56:48 GMT
132
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.10..@fluentui/react-spinbutton_v9.0.0-beta.11)
133
+
134
+ ### Changes
135
+
136
+ - BREAKING: update string unions to use spinal-case ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by seanmonahan@microsoft.com)
137
+ - Bump @fluentui/react-input to v9.0.0-rc.3 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
138
+ - Bump @fluentui/react-theme to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
139
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
140
+ - Bump @fluentui/react-label to v9.0.0-rc.3 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
141
+
142
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.10)
143
+
144
+ Mon, 23 May 2022 12:13:40 GMT
145
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.9..@fluentui/react-spinbutton_v9.0.0-beta.10)
146
+
147
+ ### Changes
148
+
149
+ - chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
150
+ - react-spinbutton: update appearance stories ([PR #22980](https://github.com/microsoft/fluentui/pull/22980) by seanmonahan@microsoft.com)
151
+ - appearance story updates ([PR #22995](https://github.com/microsoft/fluentui/pull/22995) by seanmonahan@microsoft.com)
152
+ - widen `value` type to include `null` ([PR #23025](https://github.com/microsoft/fluentui/pull/23025) by seanmonahan@microsoft.com)
153
+ - Updated react-label package version to RC. ([PR #22865](https://github.com/microsoft/fluentui/pull/22865) by esteban.230@hotmail.com)
154
+ - feat: ship rolluped only dts ([PR #22828](https://github.com/microsoft/fluentui/pull/22828) by martinhochel@microsoft.com)
155
+ - react-spinbutton: add aria-valuetext override ([PR #22905](https://github.com/microsoft/fluentui/pull/22905) by seanmonahan@microsoft.com)
156
+ - chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
157
+ - react-spinbutton: use spacing tokens ([PR #22950](https://github.com/microsoft/fluentui/pull/22950) by gcox@microsoft.com)
158
+ - react-spinbutton: remove "strings" prop ([PR #22948](https://github.com/microsoft/fluentui/pull/22948) by seanmonahan@microsoft.com)
159
+ - Update react-input dependency version to release candidate. ([PR #23090](https://github.com/microsoft/fluentui/pull/23090) by seanmonahan@microsoft.com)
160
+ - update stepper clamping behavior ([PR #23004](https://github.com/microsoft/fluentui/pull/23004) by seanmonahan@microsoft.com)
161
+ - react-spinbutton: remove SpinButtonCommons type ([PR #22871](https://github.com/microsoft/fluentui/pull/22871) by seanmonahan@microsoft.com)
162
+ - Bump @fluentui/react-input to v9.0.0-rc.2 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
163
+ - Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
164
+ - Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
165
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
166
+ - Bump @fluentui/react-label to v9.0.0-rc.2 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
167
+
7
168
  ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.0.0-beta.9)
8
169
 
9
- Thu, 05 May 2022 18:24:37 GMT
170
+ Thu, 05 May 2022 18:26:30 GMT
10
171
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.0.0-beta.8..@fluentui/react-spinbutton_v9.0.0-beta.9)
11
172
 
12
173
  ### 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.
package/dist/index.d.ts CHANGED
@@ -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,40 +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
- * Strings for localizing text in the control.
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
99
93
  */
100
- strings?: SpinButtonStrings;
101
- };
102
-
103
- export declare type SpinButtonOnChangeData = {
104
- value?: number;
105
- displayValue?: string;
94
+ step?: number;
95
+ /**
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
99
+ */
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;
106
113
  };
107
114
 
108
- /**
109
- * SpinButton Props
110
- */
111
- export declare type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'onChange' | 'size'> & Partial<SpinButtonCommons>;
112
-
113
115
  export declare type SpinButtonSlots = {
114
116
  /**
115
117
  * The root element of SpinButton is a container `<div>`.
@@ -139,7 +141,7 @@ export declare type SpinButtonSpinState = 'rest' | 'up' | 'down';
139
141
  /**
140
142
  * State used in rendering SpinButton
141
143
  */
142
- export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Partial<SpinButtonCommons> & Pick<SpinButtonCommons, 'appearance' | 'size'> & {
144
+ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Required<Pick<SpinButtonProps, 'appearance' | 'size'>> & {
143
145
  /**
144
146
  * State used to track which direction, if any, SpinButton is currently spinning.
145
147
  * @default 'rest'
@@ -152,19 +154,6 @@ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Partial<
152
154
  atBound: SpinButtonBounds;
153
155
  };
154
156
 
155
- export declare type SpinButtonStrings = {
156
- /**
157
- * Label applied to the increment button.
158
- * Can include the token "\{step\}" which will be replaced with the value of the `step` prop.
159
- */
160
- incrementButtonLabel: string;
161
- /**
162
- * Label applied to the decrement button.
163
- * Can include the token "\{step\}" which will be replaced with the value of the `step` prop.
164
- */
165
- decrementButtonLabel: string;
166
- };
167
-
168
157
  /**
169
158
  * Create the state required to render SpinButton.
170
159
  *
@@ -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 * 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/"}