@fluentui/react-spinbutton 9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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 (59) hide show
  1. package/CHANGELOG.md +109 -11
  2. package/dist/index.d.cts +185 -0
  3. package/dist/index.d.ts +15 -2
  4. package/lib/SpinButton.js +1 -1
  5. package/lib/SpinButton.js.map +1 -1
  6. package/lib/components/SpinButton/SpinButton.js +5 -5
  7. package/lib/components/SpinButton/SpinButton.js.map +1 -1
  8. package/lib/components/SpinButton/SpinButton.types.js +1 -1
  9. package/lib/components/SpinButton/SpinButton.types.js.map +1 -1
  10. package/lib/components/SpinButton/index.js +4 -4
  11. package/lib/components/SpinButton/index.js.map +1 -1
  12. package/lib/components/SpinButton/renderSpinButton.js +1 -1
  13. package/lib/components/SpinButton/renderSpinButton.js.map +1 -1
  14. package/lib/components/SpinButton/useSpinButton.js +67 -24
  15. package/lib/components/SpinButton/useSpinButton.js.map +1 -1
  16. package/lib/components/SpinButton/useSpinButtonStyles.styles.js +6 -4
  17. package/lib/components/SpinButton/useSpinButtonStyles.styles.js.map +1 -1
  18. package/lib/components/SpinButton/useSpinButtonStyles.styles.raw.js +6 -3
  19. package/lib/components/SpinButton/useSpinButtonStyles.styles.raw.js.map +1 -1
  20. package/lib/index.js +1 -1
  21. package/lib/index.js.map +1 -1
  22. package/lib/utils/index.js +3 -3
  23. package/lib/utils/index.js.map +1 -1
  24. package/lib-commonjs/{SpinButton.js → SpinButton.cjs} +4 -1
  25. package/lib-commonjs/SpinButton.cjs.map +1 -0
  26. package/lib-commonjs/components/SpinButton/{SpinButton.js → SpinButton.cjs} +3 -3
  27. package/lib-commonjs/components/SpinButton/{SpinButton.js.map → SpinButton.cjs.map} +1 -1
  28. package/lib-commonjs/components/SpinButton/SpinButton.types.cjs +4 -0
  29. package/lib-commonjs/components/SpinButton/SpinButton.types.cjs.map +1 -0
  30. package/lib-commonjs/components/SpinButton/{index.js → index.cjs} +7 -4
  31. package/lib-commonjs/components/SpinButton/index.cjs.map +1 -0
  32. package/lib-commonjs/components/SpinButton/renderSpinButton.cjs.map +1 -0
  33. package/lib-commonjs/components/SpinButton/{useSpinButton.js → useSpinButton.cjs} +62 -16
  34. package/lib-commonjs/components/SpinButton/useSpinButton.cjs.map +1 -0
  35. package/lib-commonjs/components/SpinButton/{useSpinButtonStyles.styles.js → useSpinButtonStyles.styles.cjs} +4 -1
  36. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.cjs.map +1 -0
  37. package/lib-commonjs/components/SpinButton/{useSpinButtonStyles.styles.raw.js → useSpinButtonStyles.styles.raw.cjs} +4 -1
  38. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.raw.cjs.map +1 -0
  39. package/lib-commonjs/{index.js → index.cjs} +4 -1
  40. package/lib-commonjs/index.cjs.map +1 -0
  41. package/lib-commonjs/utils/{index.js → index.cjs} +3 -3
  42. package/lib-commonjs/utils/{index.js.map → index.cjs.map} +1 -1
  43. package/package.json +19 -13
  44. package/lib-commonjs/SpinButton.js.map +0 -1
  45. package/lib-commonjs/components/SpinButton/SpinButton.types.js +0 -6
  46. package/lib-commonjs/components/SpinButton/SpinButton.types.js.map +0 -1
  47. package/lib-commonjs/components/SpinButton/index.js.map +0 -1
  48. package/lib-commonjs/components/SpinButton/renderSpinButton.js.map +0 -1
  49. package/lib-commonjs/components/SpinButton/useSpinButton.js.map +0 -1
  50. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.js.map +0 -1
  51. package/lib-commonjs/components/SpinButton/useSpinButtonStyles.styles.raw.js.map +0 -1
  52. package/lib-commonjs/index.js.map +0 -1
  53. /package/lib-commonjs/components/SpinButton/{renderSpinButton.js → renderSpinButton.cjs} +0 -0
  54. /package/lib-commonjs/utils/{clamp.js → clamp.cjs} +0 -0
  55. /package/lib-commonjs/utils/{clamp.js.map → clamp.cjs.map} +0 -0
  56. /package/lib-commonjs/utils/{getBound.js → getBound.cjs} +0 -0
  57. /package/lib-commonjs/utils/{getBound.js.map → getBound.cjs.map} +0 -0
  58. /package/lib-commonjs/utils/{precision.js → precision.cjs} +0 -0
  59. /package/lib-commonjs/utils/{precision.js.map → precision.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,23 +1,121 @@
1
1
  # Change Log - @fluentui/react-spinbutton
2
2
 
3
- This log was last generated on Thu, 22 Jan 2026 16:12:46 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 09 Jul 2026 17:34:17 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.72.9-experimental.component-base-hooks.20260122-49fc330360.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0)
7
+ ## [9.74.3-experimental.esm.20260709-49ee7a20cf.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
8
8
 
9
- Thu, 22 Jan 2026 16:12:46 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.12..@fluentui/react-spinbutton_v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0)
9
+ Thu, 09 Jul 2026 17:34:17 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.4..@fluentui/react-spinbutton_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release 9.72.9-experimental.component-base-hooks.20260122-49fc330360 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
16
- - Bump @fluentui/react-field to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
19
- - Bump @fluentui/react-theme to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
20
- - Bump @fluentui/react-utilities to v9.72.9-experimental.component-base-hooks.20260122-49fc330360.0 ([commit](https://github.com/microsoft/fluentui/commit/373001c3e19d022ef1fcf745ea96375cf4f3aff1) by beachball)
14
+ - Release 9.74.3-experimental.esm.20260709-49ee7a20cf ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
+ - Bump @fluentui/keyboard-keys to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
16
+ - Bump @fluentui/react-field to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
19
+ - Bump @fluentui/react-theme to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
21
+
22
+ ## [9.6.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.4)
23
+
24
+ Wed, 24 Jun 2026 11:09:56 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.3..@fluentui/react-spinbutton_v9.6.4)
26
+
27
+ ### Patches
28
+
29
+ - fix: move Field control props to base hooks ([PR #36312](https://github.com/microsoft/fluentui/pull/36312) by dmytrokirpa@microsoft.com)
30
+ - fix: remove redundant use no memo directives, and add justification to valid ones ([PR #36224](https://github.com/microsoft/fluentui/pull/36224) by martinhochel@microsoft.com)
31
+ - Bump @fluentui/react-field to v9.5.3 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
32
+ - Bump @fluentui/react-jsx-runtime to v9.4.4 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
33
+ - Bump @fluentui/react-utilities to v9.26.5 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
34
+
35
+ ## [9.6.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.3)
36
+
37
+ Tue, 26 May 2026 09:39:39 GMT
38
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.2..@fluentui/react-spinbutton_v9.6.3)
39
+
40
+ ### Patches
41
+
42
+ - Bump @fluentui/react-field to v9.5.2 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
43
+ - Bump @fluentui/react-jsx-runtime to v9.4.3 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
44
+ - Bump @fluentui/react-utilities to v9.26.4 ([PR #36246](https://github.com/microsoft/fluentui/pull/36246) by beachball)
45
+
46
+ ## [9.6.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.2)
47
+
48
+ Thu, 23 Apr 2026 14:21:12 GMT
49
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.1..@fluentui/react-spinbutton_v9.6.2)
50
+
51
+ ### Patches
52
+
53
+ - Bump @fluentui/react-field to v9.5.1 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
54
+ - Bump @fluentui/react-jsx-runtime to v9.4.2 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
55
+ - Bump @fluentui/react-utilities to v9.26.3 ([PR #36035](https://github.com/microsoft/fluentui/pull/36035) by beachball)
56
+
57
+ ## [9.6.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.1)
58
+
59
+ Wed, 01 Apr 2026 15:52:43 GMT
60
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.6.0..@fluentui/react-spinbutton_v9.6.1)
61
+
62
+ ### Patches
63
+
64
+ - Bump @fluentui/react-field to v9.5.0 ([PR #35912](https://github.com/microsoft/fluentui/pull/35912) by beachball)
65
+
66
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.6.0)
67
+
68
+ Mon, 30 Mar 2026 14:37:41 GMT
69
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.16..@fluentui/react-spinbutton_v9.6.0)
70
+
71
+ ### Minor changes
72
+
73
+ - feat(react-spinbutton): add useSpinButtonBase_unstable hook ([PR #35907](https://github.com/microsoft/fluentui/pull/35907) by dmytrokirpa@microsoft.com)
74
+
75
+ ## [9.5.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.5.16)
76
+
77
+ Wed, 11 Mar 2026 09:22:22 GMT
78
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.15..@fluentui/react-spinbutton_v9.5.16)
79
+
80
+ ### Patches
81
+
82
+ - Bump @fluentui/react-field to v9.4.16 ([PR #35859](https://github.com/microsoft/fluentui/pull/35859) by beachball)
83
+
84
+ ## [9.5.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.5.15)
85
+
86
+ Wed, 25 Feb 2026 13:32:26 GMT
87
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.14..@fluentui/react-spinbutton_v9.5.15)
88
+
89
+ ### Patches
90
+
91
+ - fix: fix read-only functionality ([PR #35761](https://github.com/microsoft/fluentui/pull/35761) by dmytrokirpa@microsoft.com)
92
+ - Bump @fluentui/react-field to v9.4.15 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
93
+ - Bump @fluentui/react-jsx-runtime to v9.4.1 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
94
+ - Bump @fluentui/react-shared-contexts to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
95
+ - Bump @fluentui/react-utilities to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
96
+
97
+ ## [9.5.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.5.14)
98
+
99
+ Thu, 12 Feb 2026 10:46:15 GMT
100
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.13..@fluentui/react-spinbutton_v9.5.14)
101
+
102
+ ### Patches
103
+
104
+ - Bump @fluentui/react-field to v9.4.14 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
105
+ - Bump @fluentui/react-jsx-runtime to v9.4.0 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
106
+
107
+ ## [9.5.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.5.13)
108
+
109
+ Thu, 22 Jan 2026 17:06:40 GMT
110
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-spinbutton_v9.5.12..@fluentui/react-spinbutton_v9.5.13)
111
+
112
+ ### Patches
113
+
114
+ - Bump @fluentui/react-field to v9.4.13 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
115
+ - Bump @fluentui/react-jsx-runtime to v9.3.5 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
116
+ - Bump @fluentui/react-shared-contexts to v9.26.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
117
+ - Bump @fluentui/react-theme to v9.2.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
118
+ - Bump @fluentui/react-utilities to v9.26.1 ([PR #35574](https://github.com/microsoft/fluentui/pull/35574) by beachball)
21
119
 
22
120
  ## [9.5.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-spinbutton_v9.5.12)
23
121
 
@@ -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 { }
package/dist/index.d.ts CHANGED
@@ -1,21 +1,26 @@
1
1
  import type { ComponentProps } from '@fluentui/react-utilities';
2
2
  import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { DistributiveOmit } from '@fluentui/react-utilities';
3
4
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
5
  import type { JSXElement } from '@fluentui/react-utilities';
5
6
  import * as React_2 from 'react';
6
7
  import type { Slot } from '@fluentui/react-utilities';
7
- import { SlotClassNames } from '@fluentui/react-utilities';
8
+ import type { SlotClassNames } from '@fluentui/react-utilities';
8
9
 
9
10
  /**
10
11
  * Render the final JSX of SpinButton
11
12
  */
12
- export declare const renderSpinButton_unstable: (state: SpinButtonState) => JSXElement;
13
+ export declare const renderSpinButton_unstable: (state: SpinButtonBaseState) => JSXElement;
13
14
 
14
15
  /**
15
16
  * A SpinButton allows someone to incrementally adjust a value in small steps.
16
17
  */
17
18
  export declare const SpinButton: ForwardRefComponent<SpinButtonProps>;
18
19
 
20
+ export declare type SpinButtonBaseProps = DistributiveOmit<SpinButtonProps, 'appearance' | 'size'>;
21
+
22
+ export declare type SpinButtonBaseState = DistributiveOmit<SpinButtonState, 'appearance' | 'size'>;
23
+
19
24
  export declare type SpinButtonBounds = 'none' | 'min' | 'max' | 'both';
20
25
 
21
26
  export declare type SpinButtonChangeEvent = React_2.MouseEvent<HTMLButtonElement> | React_2.ChangeEvent<HTMLElement> | React_2.FocusEvent<HTMLInputElement> | React_2.KeyboardEvent<HTMLInputElement>;
@@ -164,6 +169,14 @@ export declare type SpinButtonState = ComponentState<SpinButtonSlots> & Required
164
169
  */
165
170
  export declare const useSpinButton_unstable: (props: SpinButtonProps, ref: React_2.Ref<HTMLInputElement>) => SpinButtonState;
166
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
+
167
180
  /**
168
181
  * Apply styling to the SpinButton slots based on the state
169
182
  */
package/lib/SpinButton.js CHANGED
@@ -1 +1 @@
1
- export { SpinButton, renderSpinButton_unstable, spinButtonClassNames, useSpinButtonStyles_unstable, useSpinButton_unstable } from './components/SpinButton/index';
1
+ export { SpinButton, renderSpinButton_unstable, spinButtonClassNames, useSpinButtonStyles_unstable, useSpinButtonBase_unstable, useSpinButton_unstable } from "./components/SpinButton/index.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SpinButton.ts"],"sourcesContent":["export type {\n SpinButtonBounds,\n SpinButtonChangeEvent,\n SpinButtonOnChangeData,\n SpinButtonProps,\n SpinButtonSlots,\n SpinButtonSpinState,\n SpinButtonState,\n} from './components/SpinButton/index';\nexport {\n SpinButton,\n renderSpinButton_unstable,\n spinButtonClassNames,\n useSpinButtonStyles_unstable,\n useSpinButton_unstable,\n} from './components/SpinButton/index';\n"],"names":["SpinButton","renderSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable","useSpinButton_unstable"],"mappings":"AASA,SACEA,UAAU,EACVC,yBAAyB,EACzBC,oBAAoB,EACpBC,4BAA4B,EAC5BC,sBAAsB,QACjB,gCAAgC"}
1
+ {"version":3,"sources":["../src/SpinButton.ts"],"sourcesContent":["export type {\n SpinButtonBaseProps,\n SpinButtonBaseState,\n SpinButtonBounds,\n SpinButtonChangeEvent,\n SpinButtonOnChangeData,\n SpinButtonProps,\n SpinButtonSlots,\n SpinButtonSpinState,\n SpinButtonState,\n} from './components/SpinButton/index';\nexport {\n SpinButton,\n renderSpinButton_unstable,\n spinButtonClassNames,\n useSpinButtonStyles_unstable,\n useSpinButtonBase_unstable,\n useSpinButton_unstable,\n} from './components/SpinButton/index';\n"],"names":["SpinButton","renderSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable","useSpinButtonBase_unstable","useSpinButton_unstable"],"mappings":"AAWA,SACEA,UAAU,EACVC,yBAAyB,EACzBC,oBAAoB,EACpBC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,sBAAsB,QACjB,mCAAgC"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useSpinButton_unstable } from './useSpinButton';
4
- import { renderSpinButton_unstable } from './renderSpinButton';
5
- import { useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';
6
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
+ import * as React from "react";
3
+ import { useSpinButton_unstable } from "./useSpinButton.js";
4
+ import { renderSpinButton_unstable } from "./renderSpinButton.js";
5
+ import { useSpinButtonStyles_unstable } from "./useSpinButtonStyles.styles.js";
6
+ import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
7
7
  /**
8
8
  * A SpinButton allows someone to incrementally adjust a value in small steps.
9
9
  */ export const SpinButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SpinButton/SpinButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSpinButton_unstable } from './useSpinButton';\nimport { renderSpinButton_unstable } from './renderSpinButton';\nimport { useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';\nimport type { SpinButtonProps } from './SpinButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useSpinButtonStyles_unstable')(state);\n\n return renderSpinButton_unstable(state);\n});\n\nSpinButton.displayName = 'SpinButton';\n"],"names":["React","useSpinButton_unstable","renderSpinButton_unstable","useSpinButtonStyles_unstable","useCustomStyleHook_unstable","SpinButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQR,uBAAuBM,OAAOC;IAE5CL,6BAA6BM;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/SpinButton/SpinButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSpinButton_unstable } from './useSpinButton';\nimport { renderSpinButton_unstable } from './renderSpinButton';\nimport { useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';\nimport type { SpinButtonProps } from './SpinButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useSpinButtonStyles_unstable')(state);\n\n return renderSpinButton_unstable(state);\n});\n\nSpinButton.displayName = 'SpinButton';\n"],"names":["React","useSpinButton_unstable","renderSpinButton_unstable","useSpinButtonStyles_unstable","useCustomStyleHook_unstable","SpinButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,qBAAkB;AACzD,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,kCAA+B;AAG5E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQR,uBAAuBM,OAAOC;IAE5CL,6BAA6BM;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -1 +1 @@
1
- import * as React from 'react';
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SpinButton/SpinButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\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"],"names":["React"],"mappings":"AACA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/SpinButton/SpinButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type * 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 // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\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\nexport type SpinButtonBaseProps = DistributiveOmit<SpinButtonProps, 'appearance' | 'size'>;\nexport type SpinButtonBaseState = DistributiveOmit<SpinButtonState, 'appearance' | 'size'>;\n"],"names":[],"mappings":"AAiKA,WAA2F"}
@@ -1,4 +1,4 @@
1
- export { SpinButton } from './SpinButton';
2
- export { renderSpinButton_unstable } from './renderSpinButton';
3
- export { useSpinButton_unstable } from './useSpinButton';
4
- export { spinButtonClassNames, useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';
1
+ export { SpinButton } from "./SpinButton.js";
2
+ export { renderSpinButton_unstable } from "./renderSpinButton.js";
3
+ export { useSpinButtonBase_unstable, useSpinButton_unstable } from "./useSpinButton.js";
4
+ export { spinButtonClassNames, useSpinButtonStyles_unstable } from "./useSpinButtonStyles.styles.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SpinButton/index.ts"],"sourcesContent":["export { SpinButton } from './SpinButton';\nexport type {\n SpinButtonBounds,\n SpinButtonChangeEvent,\n SpinButtonOnChangeData,\n SpinButtonProps,\n SpinButtonSlots,\n SpinButtonSpinState,\n SpinButtonState,\n} from './SpinButton.types';\nexport { renderSpinButton_unstable } from './renderSpinButton';\nexport { useSpinButton_unstable } from './useSpinButton';\nexport { spinButtonClassNames, useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';\n"],"names":["SpinButton","renderSpinButton_unstable","useSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable"],"mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAU1C,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,oBAAoB,EAAEC,4BAA4B,QAAQ,+BAA+B"}
1
+ {"version":3,"sources":["../src/components/SpinButton/index.ts"],"sourcesContent":["export { SpinButton } from './SpinButton';\nexport type {\n SpinButtonBaseProps,\n SpinButtonBaseState,\n SpinButtonBounds,\n SpinButtonChangeEvent,\n SpinButtonOnChangeData,\n SpinButtonProps,\n SpinButtonSlots,\n SpinButtonSpinState,\n SpinButtonState,\n} from './SpinButton.types';\nexport { renderSpinButton_unstable } from './renderSpinButton';\nexport { useSpinButtonBase_unstable, useSpinButton_unstable } from './useSpinButton';\nexport { spinButtonClassNames, useSpinButtonStyles_unstable } from './useSpinButtonStyles.styles';\n"],"names":["SpinButton","renderSpinButton_unstable","useSpinButtonBase_unstable","useSpinButton_unstable","spinButtonClassNames","useSpinButtonStyles_unstable"],"mappings":"AAAA,SAASA,UAAU,QAAQ,kBAAe;AAY1C,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,0BAA0B,EAAEC,sBAAsB,QAAQ,qBAAkB;AACrF,SAASC,oBAAoB,EAAEC,4BAA4B,QAAQ,kCAA+B"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-utilities';
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of SpinButton
5
5
  */ export const renderSpinButton_unstable = (state)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SpinButton/renderSpinButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } 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): JSXElement => {\n assertSlots<SpinButtonSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.incrementButton />\n <state.decrementButton />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinButton_unstable","state","root","input","incrementButton","decrementButton"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,eAAe;0BACtB,KAACH,MAAMI,eAAe;;;AAG5B,EAAE"}
1
+ {"version":3,"sources":["../src/components/SpinButton/renderSpinButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { SpinButtonBaseState, SpinButtonSlots } from './SpinButton.types';\n\n/**\n * Render the final JSX of SpinButton\n */\nexport const renderSpinButton_unstable = (state: SpinButtonBaseState): JSXElement => {\n assertSlots<SpinButtonSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.incrementButton />\n <state.decrementButton />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSpinButton_unstable","state","root","input","incrementButton","decrementButton"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,eAAe;0BACtB,KAACH,MAAMI,eAAe;;;AAG5B,EAAE"}