import type { CSSProperties, AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ComponentPropsWithRef, } from 'react' import type { Classes } from './styles' export { spacings, SpacingEnum, spacingToRem } from '@toptal/picasso-provider' export type { Sizes, SizeType, SpacingType, PicassoSpacing, } from '@toptal/picasso-provider' export interface BaseProps { /** Classnames applied to root element */ className?: string /** Style applied to root element */ style?: CSSProperties 'data-testid'?: string 'data-private'?: boolean | 'lipsum' } export interface JssProps { classes: Classes } export interface TextLabelProps { /** Defines if the text should be transformed to title case */ titleCase?: boolean } export type StandardProps = BaseProps & Partial // Take all props, excluding props from JssProps // type and other passed props // // example: // OmitInternalProps // OmitInternalProps export type OmitInternalProps = Pick< T, Exclude > type PropsWithOverridableAs = Omit & { as?: T } & ComponentPropsWithRef interface NamedComponent

{ defaultProps?: Partial

displayName?: string } export interface OverridableComponent

extends NamedComponent

{ >>( props: PropsWithOverridableAs ): JSX.Element | null } type BaseEnvironments = 'development' | 'staging' | 'production' type Environments = BaseEnvironments | 'temploy' | 'test' /** T parameter is needed to extend BaseEnvironments with 'temploy' or 'test' */ export type EnvironmentType = | T | BaseEnvironments export type ButtonOrAnchorProps = AnchorHTMLAttributes & ButtonHTMLAttributes export type ColorType = | 'green' | 'red' | 'yellow' | 'light-grey' | 'grey' | 'grey-main-2' | 'dark-grey' | 'black' | 'light-blue' | 'inherit' export interface TransitionProps { /* Callback fired when the component has exited */ onExited?: (node: HTMLElement) => void /* The duration for the transition, in milliseconds */ timeout?: number | { enter?: number; exit?: number; appear?: number } }