UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

71 lines (64 loc) 2.43 kB
import * as react from 'react'; import { AllHTMLAttributes, ReactNode } from 'react'; declare enum Variants { Plain = "plain", Transparent = "transparent" } declare const DEFAULT_VARIANT = Variants.Plain; declare enum Orientations { Horizontal = "horizontal", Vertical = "vertical" } declare const DEFAULT_ORIENTATION = Orientations.Horizontal; declare enum Positions { End = "end", Start = "start" } declare const DEFAULT_POSITION = Positions.Start; declare enum Sizes { Large = "large", Medium = "medium", Small = "small" } declare const DEFAULT_SIZE = Sizes.Small; interface TabsProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'defaultValue' | 'dir' | 'value'> { children: ReactNode; tabs: ReactNode; barClassName?: string; defaultTab?: string; dir?: 'ltr' | 'rtl'; disabled?: boolean; fullWidth?: boolean; label?: string; large?: boolean; orientation?: `${Orientations}`; tab?: string; tabsPosition?: `${Positions}`; tabsSize?: `${Sizes}`; variant?: `${Variants}`; withIndicator?: boolean; withSeparator?: boolean; onTabChange?: (newTab: string) => void; } interface TabProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'label' | 'size' | 'type' | 'value'> { name: string; children?: ReactNode; disabled?: boolean; icon?: ReactNode; iconOnly?: boolean; label?: ReactNode; large?: boolean; orientation?: `${Orientations}`; size?: `${Sizes}`; tabsPosition?: `${Positions}`; withIndicator?: boolean; } interface TabContentProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'value'> { children: ReactNode; name: string; forceMount?: boolean; } declare const Tab: react.ForwardRefExoticComponent<TabProps & react.RefAttributes<HTMLButtonElement | null>>; declare const TabContent: react.ForwardRefExoticComponent<TabContentProps & react.RefAttributes<HTMLDivElement | null>>; declare const Tabs: react.ForwardRefExoticComponent<TabsProps & react.RefAttributes<HTMLDivElement | null>>; export { DEFAULT_ORIENTATION as DEFAULT_TABS_ORIENTATION, DEFAULT_POSITION as DEFAULT_TABS_POSITION, DEFAULT_VARIANT as DEFAULT_TABS_VARIANT, DEFAULT_SIZE as DEFAULT_TAB_SIZE, Tab, TabContent, type TabContentProps, type TabProps, Sizes as TabSizes, Tabs, Orientations as TabsOrientations, Positions as TabsPositions, type TabsProps, Variants as TabsVariants };