UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

79 lines (70 loc) 2.96 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ComponentPropsWithoutRef, Ref } from 'react'; import { a as InputGroup$1 } from '../InputGroup-aoaZxCLk.mjs'; export { I as InputGroupProps } from '../InputGroup-aoaZxCLk.mjs'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import { b as InputLeadingIcon, c as InputTrailingIcon } from '../InputTrailingIcon-BBp7sE6D.mjs'; export { I as InputLeadingIconProps, a as InputTrailingIconProps } from '../InputTrailingIcon-BBp7sE6D.mjs'; export { a as Input, I as InputProps } from '../Input-g0LpWuv0.mjs'; import '../icon/index.mjs'; interface InputClearButtonProps extends ComponentPropsWithoutRef<'button'> { 'aria-label': string; ref?: Ref<HTMLButtonElement>; } declare const InputClearButton: { ({ className, tabIndex, onClick, ref, ...others }: InputClearButtonProps): react_jsx_runtime.JSX.Element; displayName: string; } & { id: string; }; declare const inputAddonStyles: (props?: ({ asChild?: boolean | null | undefined; intent?: "error" | "alert" | "success" | "neutral" | null | undefined; disabled?: boolean | null | undefined; readOnly?: boolean | null | undefined; design?: "text" | "solid" | "inline" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type InputAddonStylesProps = VariantProps<typeof inputAddonStyles>; interface InputAddonProps extends ComponentPropsWithoutRef<'div'>, Omit<InputAddonStylesProps, 'intent' | 'disabled'> { ref?: Ref<HTMLDivElement>; } type InputLeadingAddonProps = InputAddonProps & { ref?: Ref<HTMLDivElement>; }; declare const InputLeadingAddon: { ({ className, ref, ...others }: InputLeadingAddonProps): react_jsx_runtime.JSX.Element; displayName: string; } & { id: string; }; type InputTrailingAddonProps = InputAddonProps & { ref?: Ref<HTMLDivElement>; }; declare const InputTrailingAddon: { ({ className, ref, ...others }: InputTrailingAddonProps): react_jsx_runtime.JSX.Element; displayName: string; } & { id: string; }; interface InputGroupContextValue { disabled?: boolean; readOnly?: boolean; hasLeadingIcon: boolean; hasTrailingIcon: boolean; hasLeadingAddon: boolean; hasTrailingAddon: boolean; hasClearButton: boolean; state: null | undefined | 'error' | 'alert' | 'success'; isStandalone?: boolean; onClear: () => void; } declare const useInputGroup: () => Partial<InputGroupContextValue>; declare const InputGroup: typeof InputGroup$1 & { LeadingAddon: typeof InputLeadingAddon; TrailingAddon: typeof InputTrailingAddon; LeadingIcon: typeof InputLeadingIcon; TrailingIcon: typeof InputTrailingIcon; ClearButton: typeof InputClearButton; }; export { type InputClearButtonProps, InputGroup, type InputLeadingAddonProps, type InputTrailingAddonProps, useInputGroup };