UNPKG

@sikka/hawa

Version:

Modern UI Kit made with Tailwind

62 lines (56 loc) 2.3 kB
import * as React from 'react'; import React__default, { FC } from 'react'; import * as PopoverPrimitive from '@radix-ui/react-popover'; import { CalendarProps } from '../calendar/index.js'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import { P as PositionType } from '../commonTypes-BtF87PmG.js'; import 'react-day-picker'; type DatePickerProps = CalendarProps & { trigger: React.ReactNode; popoverTriggerProps?: PopoverPrimitive.PopoverTriggerProps; popoverContentProps?: PopoverPrimitive.PopoverContentProps; /** * Make sure this is true when DatePickerButton has forceHideHelperText set to true */ required?: boolean; }; declare const DatePicker: React.FC<DatePickerProps>; type LabelProps = { hint?: React.ReactNode; hintSide?: PositionType; htmlFor?: string; required?: boolean; }; declare const buttonVariants: (props?: ({ variant?: "link" | "default" | "combobox" | "light" | "destructive" | "outline" | "secondary" | "ghost" | "neoBrutalism" | null | undefined; size?: "default" | "icon" | "xs" | "sm" | "lg" | "xl" | "heightless" | "smallIcon" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> { asChild?: boolean; centered?: boolean; isLoading?: boolean; label?: string; labelProps?: LabelProps; /** The small red text under the input field to show validation. */ helperText?: any; showHelperText?: boolean; /** * If true, the button will include a label and helper text. This is useful for forms where the button is part of the form. */ asInput?: boolean; } type DatePickerButtonProps = { label?: string; value?: string | React__default.ReactNode; multiple?: boolean; labelProps?: LabelProps; /** The small red text under the input field to show validation. */ helperText?: any; placeholder?: string; showHelperText?: boolean; buttonClassNames?: string; buttonProps?: ButtonProps; }; declare const DatePickerButton: FC<DatePickerButtonProps>; export { DatePicker, DatePickerButton };