@fluentui/react-spinbutton 9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 → 9.74.7-experimental.cli-api.20261006-ccaa611d58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +26 -11
  2. package/dist/index.d.cts +185 -0
  3. package/dist/metadata/api/api-root.json +1 -0
  4. package/dist/metadata/index.json +1 -0
  5. package/lib/SpinButton.js +1 -1
  6. package/lib/SpinButton.js.map +1 -1
  7. package/lib/components/SpinButton/SpinButton.js +5 -5
  8. package/lib/components/SpinButton/SpinButton.js.map +1 -1
  9. package/lib/components/SpinButton/index.js +4 -4
  10. package/lib/components/SpinButton/index.js.map +1 -1
  11. package/lib/components/SpinButton/renderSpinButton.js +1 -1
  12. package/lib/components/SpinButton/useSpinButton.js +7 -7
  13. package/lib/components/SpinButton/useSpinButton.js.map +1 -1
  14. package/lib/components/SpinButton/useSpinButtonStyles.styles.js +2 -2
  15. package/lib/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
  16. package/lib/components/SpinButton/useSpinButtonStyles.styles.raw.js +2 -2
  17. package/lib/index.js +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib/utils/index.js +3 -3
  20. package/lib/utils/index.js.map +1 -1
  21. package/lib-commonjs/{SpinButton.js → SpinButton.cjs} +1 -1
  22. package/lib-commonjs/{SpinButton.js.map → SpinButton.cjs.map} +1 -1
  23. package/lib-commonjs/components/SpinButton/{SpinButton.js → SpinButton.cjs} +3 -3
  24. package/lib-commonjs/components/SpinButton/{SpinButton.js.map → SpinButton.cjs.map} +1 -1
  25. package/lib-commonjs/components/SpinButton/{index.js → index.cjs} +4 -4
  26. package/lib-commonjs/components/SpinButton/{index.js.map → index.cjs.map} +1 -1
  27. package/lib-commonjs/components/SpinButton/{useSpinButton.js → useSpinButton.cjs} +1 -1
  28. package/lib-commonjs/components/SpinButton/{useSpinButton.js.map → useSpinButton.cjs.map} +1 -1
  29. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.cjs.map +1 -0
  30. package/lib-commonjs/{index.js → index.cjs} +1 -1
  31. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  32. package/lib-commonjs/utils/{index.js → index.cjs} +3 -3
  33. package/lib-commonjs/utils/{index.js.map → index.cjs.map} +1 -1
  34. package/package.json +29 -17
  35. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js.map +0 -1
  36. /package/lib-commonjs/components/SpinButton/{SpinButton.types.js → SpinButton.types.cjs} +0 -0
  37. /package/lib-commonjs/components/SpinButton/{SpinButton.types.js.map → SpinButton.types.cjs.map} +0 -0
  38. /package/lib-commonjs/components/SpinButton/{renderSpinButton.js → renderSpinButton.cjs} +0 -0
  39. /package/lib-commonjs/components/SpinButton/{renderSpinButton.js.map → renderSpinButton.cjs.map} +0 -0
  40. /package/lib-commonjs/components/SpinButton/{useSpinButtonStyles.styles.js → useSpinButtonStyles.styles.cjs} +0 -0
  41. /package/lib-commonjs/components/SpinButton/{useSpinButtonStyles.styles.raw.js → useSpinButtonStyles.styles.raw.cjs} +0 -0
  42. /package/lib-commonjs/components/SpinButton/{useSpinButtonStyles.styles.raw.js.map → useSpinButtonStyles.styles.raw.cjs.map} +0 -0
  43. /package/lib-commonjs/utils/{clamp.js → clamp.cjs} +0 -0
  44. /package/lib-commonjs/utils/{clamp.js.map → clamp.cjs.map} +0 -0
  45. /package/lib-commonjs/utils/{getBound.js → getBound.cjs} +0 -0
  46. /package/lib-commonjs/utils/{getBound.js.map → getBound.cjs.map} +0 -0
  47. /package/lib-commonjs/utils/{precision.js → precision.cjs} +0 -0
  48. /package/lib-commonjs/utils/{precision.js.map → precision.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,23 +1,38 @@
1
1
  # Change Log - @fluentui/react-spinbutton
2
2
 
3
- This log was last generated on Tue, 04 Aug 2026 15:10:39 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Tue, 06 Oct 2026 11:40:33 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.74.5-experimental.tabster-v9.20260804-bb909442fe.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0)
7
+ ## [9.74.7-experimental.cli-api.20261006-ccaa611d58.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
8
8
 
9
- Tue, 04 Aug 2026 15:10:39 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.4..@fluentui/react-spinbutton_v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0)
9
+ Tue, 06 Oct 2026 11:40:33 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.5..@fluentui/react-spinbutton_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release 9.74.5-experimental.tabster-v9.20260804-bb909442fe ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
16
- - Bump @fluentui/react-field to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
19
- - Bump @fluentui/react-theme to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
20
- - Bump @fluentui/react-utilities to v9.74.5-experimental.tabster-v9.20260804-bb909442fe.0 ([commit](https://github.com/microsoft/fluentui/commit/7ace6efd4ac88a8dc271641538056e6fc6927456) by beachball)
14
+ - Release 9.74.7-experimental.cli-api.20261006-ccaa611d58 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
+ - Bump @fluentui/keyboard-keys to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-field to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-theme to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.74.7-experimental.cli-api.20261006-ccaa611d58.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
+
22
+ ## [9.6.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.5)
23
+
24
+ Tue, 11 Aug 2026 17:20:14 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.4..@fluentui/react-spinbutton_v9.6.5)
26
+
27
+ ### Patches
28
+
29
+ - Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
30
+ - Bump @fluentui/keyboard-keys to v9.0.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
31
+ - Bump @fluentui/react-field to v9.5.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
32
+ - Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
33
+ - Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
34
+ - Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
35
+ - Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
36
 
22
37
  ## [9.6.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.4)
23
38
 
@@ -0,0 +1,185 @@
1
+ import type { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { DistributiveOmit } from '@fluentui/react-utilities';
4
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
5
+ import type { JSXElement } from '@fluentui/react-utilities';
6
+ import * as React_2 from 'react';
7
+ import type { Slot } from '@fluentui/react-utilities';
8
+ import type { SlotClassNames } from '@fluentui/react-utilities';
9
+
10
+ /**
11
+ * Render the final JSX of SpinButton
12
+ */
13
+ export declare const renderSpinButton_unstable: (state: SpinButtonBaseState) => JSXElement;
14
+
15
+ /**
16
+ * A SpinButton allows someone to incrementally adjust a value in small steps.
17
+ */
18
+ export declare const SpinButton: ForwardRefComponent<SpinButtonProps>;
19
+
20
+ export declare type SpinButtonBaseProps = DistributiveOmit<SpinButtonProps, 'appearance' | 'size'>;
21
+
22
+ export declare type SpinButtonBaseState = DistributiveOmit<SpinButtonState, 'appearance' | 'size'>;
23
+
24
+ export declare type SpinButtonBounds = 'none' | 'min' | 'max' | 'both';
25
+
26
+ export declare type SpinButtonChangeEvent = React_2.MouseEvent<HTMLButtonElement> | React_2.ChangeEvent<HTMLElement> | React_2.FocusEvent<HTMLInputElement> | React_2.KeyboardEvent<HTMLInputElement>;
27
+
28
+ export declare const spinButtonClassNames: SlotClassNames<SpinButtonSlots>;
29
+
30
+ export declare type SpinButtonOnChangeData = {
31
+ value?: number | null;
32
+ displayValue?: string;
33
+ };
34
+
35
+ /**
36
+ * SpinButton Props
37
+ */
38
+ export declare type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & {
39
+ /**
40
+ * Controls the colors and borders of the input.
41
+ * @default 'outline'
42
+ */
43
+ appearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';
44
+ /**
45
+ * Initial value of the control (assumed to be valid). Updates to this prop will not be respected.
46
+ *
47
+ * Use this if you intend for the SpinButton to be an uncontrolled component which maintains its
48
+ * own value. For a controlled component, use `value` instead. (Mutually exclusive with `value`.)
49
+ *
50
+ * Use `null` to indicate the control has no value.
51
+ */
52
+ defaultValue?: number | null;
53
+ /**
54
+ * String representation of `value`.
55
+ *
56
+ * Use this when displaying the value to users as something other than a plain number.
57
+ * For example, when displaying currency values this might be "$1.00" when value is `1`.
58
+ *
59
+ * Only provide this if the SpinButton is a controlled component where you are maintaining its
60
+ * current state and passing updates based on change events. When SpinButton is used as an
61
+ * uncontrolled component this prop is ignored.
62
+ */
63
+ displayValue?: string;
64
+ /**
65
+ * Max value of the control. If not provided, the control has no maximum value.
66
+ */
67
+ max?: number;
68
+ /**
69
+ * Min value of the control. If not provided, the control has no minimum value.
70
+ */
71
+ min?: number;
72
+ /**
73
+ * Callback for when the committed value changes.
74
+ * - User presses the up/down buttons (on single press or every spin)
75
+ * - User presses the up/down arrow keys (on single press or every spin)
76
+ * - User *commits* edits to the input text by focusing away (blurring) or pressing enter.
77
+ * Note that this is NOT called for every key press while the user is editing.
78
+ */
79
+ onChange?: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;
80
+ /**
81
+ * How many decimal places the value should be rounded to.
82
+ *
83
+ * The default is calculated based on the precision of `step`: i.e. if step = 1, precision = 0.
84
+ * step = 0.0089, precision = 4. step = 300, precision = 2. step = 23.00, precision = 2.
85
+ */
86
+ precision?: number;
87
+ /**
88
+ * Size of the input.
89
+ * @default 'medium'
90
+ */
91
+ size?: 'small' | 'medium';
92
+ /**
93
+ * Difference between two adjacent values of the control.
94
+ * This value is used to calculate the precision of the input if no `precision` is given.
95
+ * The precision calculated this way will always be greater than or equal 0.
96
+ * @default 1
97
+ */
98
+ step?: number;
99
+ /**
100
+ * Large difference between two values. This should be greater than `step` and is used
101
+ * when users hit the Page Up or Page Down keys.
102
+ * @default 1
103
+ */
104
+ stepPage?: number;
105
+ /**
106
+ * Current value of the control (assumed to be valid).
107
+ *
108
+ * Only provide this if the SpinButton is a controlled component where you are maintaining its
109
+ * current state and passing updates based on change events; otherwise, use the `defaultValue`
110
+ * property.
111
+ *
112
+ * Use `null` to indicate the control has no value.
113
+ *
114
+ * Mutually exclusive with `defaultValue`.
115
+ */
116
+ value?: number | null;
117
+ };
118
+
119
+ export declare type SpinButtonSlots = {
120
+ /**
121
+ * The root element of SpinButton is a container `<div>`.
122
+ * The root slot receives the `className` and `style` specified on the `<SpinButton>`.
123
+ * All other native props are applied to the primary slot: `input`.
124
+ */
125
+ root: NonNullable<Slot<'span'>>;
126
+ /**
127
+ * Input that displays the current value and accepts direct input from the user.
128
+ * Displayed value is formatted.
129
+ *
130
+ * This is the primary slot.
131
+ */
132
+ input: NonNullable<Slot<'input'>>;
133
+ /**
134
+ * Renders the increment control.
135
+ */
136
+ incrementButton: NonNullable<Slot<'button'>>;
137
+ /**
138
+ * Renders the decrement control.
139
+ */
140
+ decrementButton: NonNullable<Slot<'button'>>;
141
+ };
142
+
143
+ export declare type SpinButtonSpinState = 'rest' | 'up' | 'down';
144
+
145
+ /**
146
+ * State used in rendering SpinButton
147
+ */
148
+ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Required<Pick<SpinButtonProps, 'appearance' | 'size'>> & {
149
+ /**
150
+ * State used to track which direction, if any, SpinButton is currently spinning.
151
+ * @default 'rest'
152
+ */
153
+ spinState: SpinButtonSpinState;
154
+ /**
155
+ * State used to track if the value is at the range bounds of [min-max].
156
+ * @default 'none'
157
+ */
158
+ atBound: SpinButtonBounds;
159
+ };
160
+
161
+ /**
162
+ * Create the state required to render SpinButton.
163
+ *
164
+ * The returned state can be modified with hooks such as useSpinButtonStyles_unstable,
165
+ * before being passed to renderSpinButton_unstable.
166
+ *
167
+ * @param props - props from this instance of SpinButton
168
+ * @param ref - reference to root HTMLElement of SpinButton
169
+ */
170
+ export declare const useSpinButton_unstable: (props: SpinButtonProps, ref: React_2.Ref<HTMLInputElement>) => SpinButtonState;
171
+
172
+ /**
173
+ * Create the base state required to render SpinButton without design-specific props.
174
+ *
175
+ * @param props - props from this instance of SpinButton (without appearance/size)
176
+ * @param ref - reference to root HTMLElement of SpinButton
177
+ */
178
+ export declare const useSpinButtonBase_unstable: (props: SpinButtonBaseProps, ref: React_2.Ref<HTMLInputElement>) => SpinButtonBaseState;
179
+
180
+ /**
181
+ * Apply styling to the SpinButton slots based on the state
182
+ */
183
+ export declare const useSpinButtonStyles_unstable: (state: SpinButtonState) => SpinButtonState;
184
+
185
+ export { }