import * as React from 'react'; import './index.less'; declare global { namespace JSX { interface IntrinsicElements { [elemName: string]: any; } } } /** * 样式变体类型 * - separated: 分离式,按钮独立显示(默认) * - capsule: 胶囊式,按钮和数字在一个圆角容器内 */ export declare type NumericStepperVariant = 'separated' | 'capsule'; export interface NumericStepperProps { /** 当前值 */ value?: number; /** 默认值 */ defaultValue?: number; /** 最小值 */ min?: number; /** 最大值 */ max?: number; /** 步长 */ step?: number; /** 是否禁用 */ disabled?: boolean; /** 值变化回调 */ onChange?: (value: number) => void; /** 自定义类名 */ className?: string; theme?: { token?: { colorPrimary?: string; }; }; /** 自定义样式 */ styles?: { container?: React.CSSProperties; }; /** 值为 0 时是否折叠为仅展示加号(隐藏减号与中间数字) */ plusOnlyAtZero?: boolean; horizontalPadding?: number | string; /** 尺寸 */ size?: 'small' | 'middle' | 'large'; /** 按钮形状(仅在 variant='separated' 时生效) */ shape?: 'round' | 'square'; /** 减号按钮的自定义内容 */ minusIcon?: React.ReactNode; /** 加号按钮的自定义内容 */ plusIcon?: React.ReactNode; /** * 样式变体 * - separated: 分离式,按钮独立显示(默认) * - capsule: 胶囊式,按钮和数字在一个圆角容器内 * @default 'separated' */ variant?: NumericStepperVariant; /** * 是否启用输入功能(点击数字弹出键盘) * - 开启时:展示区域 cursor 为 pointer,点击弹出键盘 * - 关闭后:展示区域无边框,点击不会弹出键盘 * @default true */ enableInput?: boolean; /** * 展示区域最大宽度(仅胶囊模式生效) * - 设置后:展示区域最大宽度受限,超出部分截断 * - 不设置:展示区域宽度随内容自适应 */ displayMaxWidth?: number | string; } declare const NumericStepper: React.FC; export default NumericStepper;