import type { MutableRefObject, ReactNode, RefCallback } from 'react'; import { type StylingProps } from '@dynatrace/strato-components/core'; import type { NumberSpinButtonRef } from '../number-spin-button/types.js'; import type { TextSpinButtonRef } from '../text-spin-button/types.js'; /** * Props for the SpinButtonGroup component. * @internal */ export type SpinButtonGroupProps = { /** If set to `true`, a potential value overflow is applied to a succeeding spinbutton.*/ valueOverflow?: boolean; } & StylingProps; /** * Props for the SpinButtonGroupSeparator component. * @internal */ export type SpinButtonGroupSeparatorProps = { /** * If the trigger key is pressed on a preceding spinbutton, the first spinbutton after the separator is focused. * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values) for possible values */ trigger: string; }; /** Typed access to a potential existing child ref object. */ export type ChildWithRef = ReactNode & { ref: RefCallback | MutableRefObject | undefined; }; /** Supported types of spinbutton handlers within this hook. */ export type SpinButtonHandler = NumberSpinButtonRef | TextSpinButtonRef;