packages/react-components/react-spinbutton/library/etc/react-spinbutton.api.md
Do not edit this file. It is a report generated by API Extractor.
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { JSXElement } from '@fluentui/react-utilities';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-utilities';
import { SlotClassNames } from '@fluentui/react-utilities';
// @public
export const renderSpinButton_unstable: (state: SpinButtonState) => JSXElement;
// @public
export const SpinButton: ForwardRefComponent<SpinButtonProps>;
// @public (undocumented)
export type SpinButtonBounds = 'none' | 'min' | 'max' | 'both';
// @public (undocumented)
export type SpinButtonChangeEvent = React_2.MouseEvent<HTMLButtonElement> | React_2.ChangeEvent<HTMLElement> | React_2.FocusEvent<HTMLInputElement> | React_2.KeyboardEvent<HTMLInputElement>;
// @public (undocumented)
export const spinButtonClassNames: SlotClassNames<SpinButtonSlots>;
// @public (undocumented)
export type SpinButtonOnChangeData = {
value?: number | null;
displayValue?: string;
};
// @public
export type SpinButtonProps = Omit<ComponentProps<Partial<SpinButtonSlots>, 'input'>, 'defaultValue' | 'onChange' | 'size' | 'value'> & {
appearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';
defaultValue?: number | null;
displayValue?: string;
max?: number;
min?: number;
onChange?: (event: SpinButtonChangeEvent, data: SpinButtonOnChangeData) => void;
precision?: number;
size?: 'small' | 'medium';
step?: number;
stepPage?: number;
value?: number | null;
};
// @public (undocumented)
export type SpinButtonSlots = {
root: NonNullable<Slot<'span'>>;
input: NonNullable<Slot<'input'>>;
incrementButton: NonNullable<Slot<'button'>>;
decrementButton: NonNullable<Slot<'button'>>;
};
// @public (undocumented)
export type SpinButtonSpinState = 'rest' | 'up' | 'down';
// @public
export type SpinButtonState = ComponentState<SpinButtonSlots> & Required<Pick<SpinButtonProps, 'appearance' | 'size'>> & {
spinState: SpinButtonSpinState;
atBound: SpinButtonBounds;
};
// @public
export const useSpinButton_unstable: (props: SpinButtonProps, ref: React_2.Ref<HTMLInputElement>) => SpinButtonState;
// @public
export const useSpinButtonStyles_unstable: (state: SpinButtonState) => SpinButtonState;
// (No @packageDocumentation comment for this package)