diff --git a/dist/react-you-ui.d.ts b/dist/react-you-ui.d.ts new file mode 100644 index 0000000..3091b72 --- /dev/null +++ b/dist/react-you-ui.d.ts @@ -0,0 +1 @@ +export * from './src/index' diff --git a/dist/src/components/AppBar.d.ts b/dist/src/components/AppBar.d.ts new file mode 100644 index 0000000..931496b --- /dev/null +++ b/dist/src/components/AppBar.d.ts @@ -0,0 +1,11 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type AppBarProps = AriaProps & { + className?: string; + id?: string; + children?: React.ReactNode; + style?: React.CSSProperties; +}; +export declare const AppBar: (props: AppBarProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Box.d.ts b/dist/src/components/Box.d.ts new file mode 100644 index 0000000..0244d59 --- /dev/null +++ b/dist/src/components/Box.d.ts @@ -0,0 +1,26 @@ +import { default as React, CSSProperties, ReactNode } from 'react'; +import { AriaProps } from '../types/aria'; + +export type BoxProps = AriaProps & { + style?: CSSProperties; + children?: ReactNode; + display?: 'flex' | 'block' | 'inline-block' | 'inline' | 'grid' | 'inline-grid' | 'contents' | 'list-item' | 'hidden' | 'initial' | 'inherit'; + flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse'; + flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse'; + justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'; + alignItems?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'; + alignContent?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'baseline' | 'first baseline' | 'last baseline' | 'safe center' | 'unsafe center' | 'left' | 'right' | 'safe left' | 'safe right' | 'unsafe left' | 'unsafe right'; + gap?: string; + rowGap?: string; + columnGap?: string; + flex?: number; + flexGrow?: number; + flexShrink?: number; + flexBasis?: 'auto' | 'content' | 'fit-content' | 'max-content' | 'min-content' | 'fill' | 'fit-content' | 'max-content' | 'min-content' | 'fill' | 'fit-content' | 'max-content' | 'min-content' | 'fill'; + flexFlow?: 'row' | 'row-reverse' | 'column' | 'column-reverse'; + alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'; + order?: number; + id?: string; + className?: string; +}; +export declare const Box: (props: BoxProps) => React.JSX.Element; diff --git a/dist/src/components/Button.d.ts b/dist/src/components/Button.d.ts new file mode 100644 index 0000000..e04bb0d --- /dev/null +++ b/dist/src/components/Button.d.ts @@ -0,0 +1,25 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type ButtonProps = AriaProps & { + variant?: 'filled' | 'filled-tonal' | 'elevated' | 'outlined' | 'text'; + children: React.ReactNode; + disabled?: boolean; + softDisabled?: boolean; + href?: string; + target?: '_blank' | '_parent' | '_self' | '_top'; + type?: 'button' | 'submit' | 'reset'; + value?: string; + onClick?: (e: React.MouseEvent) => void; + onMouseDown?: (e: React.MouseEvent) => void; + onMouseUp?: (e: React.MouseEvent) => void; + onMouseEnter?: (e: React.MouseEvent) => void; + onMouseLeave?: (e: React.MouseEvent) => void; + onFocus?: (e: React.FocusEvent) => void; + onBlur?: (e: React.FocusEvent) => void; + className?: string; + style?: React.CSSProperties; + id?: string; +}; +export declare const Button: ({ variant, children, disabled, softDisabled, href, target, type, value, ...props }: ButtonProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Checkbox.d.ts b/dist/src/components/Checkbox.d.ts new file mode 100644 index 0000000..7062d2f --- /dev/null +++ b/dist/src/components/Checkbox.d.ts @@ -0,0 +1,30 @@ +import { default as React, FormEvent, MouseEvent, FocusEvent } from 'react'; +import { MdCheckbox as MdCheckboxWebComponent } from '@material/web/checkbox/checkbox'; +import { AriaProps } from '../types/aria'; + +type CheckboxProps = AriaProps & { + checked?: boolean; + indeterminate?: boolean; + id?: string; + disabled?: boolean; + hidden?: boolean; + ariaLabel?: string; + ariaLabelledBy?: string; + ariaDescribedBy?: string; + ariaControls?: string; + required?: boolean; + onInput?: (e: FormEvent) => void; + onChange?: (e: FormEvent) => void; + onClick?: (e: MouseEvent) => void; + onMouseDown?: (e: MouseEvent) => void; + onMouseUp?: (e: MouseEvent) => void; + onMouseEnter?: (e: MouseEvent) => void; + onFocus?: (e: FocusEvent) => void; + onBlur?: (e: FocusEvent) => void; + className?: string; + style?: React.CSSProperties; + tabIndex?: number; + name?: string; +}; +export declare const Checkbox: ({ checked, indeterminate, id, disabled, hidden, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaControls, required, onInput, onChange, onClick, onMouseDown, onMouseUp, onMouseEnter, onFocus, onBlur, className, style, tabIndex, name, ...props }: CheckboxProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Chip.d.ts b/dist/src/components/Chip.d.ts new file mode 100644 index 0000000..160f17e --- /dev/null +++ b/dist/src/components/Chip.d.ts @@ -0,0 +1,38 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type ChipSetProps = AriaProps & { + children: React.ReactNode; +}; +export declare const ChipSet: (props: ChipSetProps) => React.JSX.Element; +type AssistChipProps = AriaProps & { + label?: string; + elevated?: boolean; + href?: string; + target?: '_blank' | '_parent' | '_self' | '_top'; + disabled?: boolean; + alwaysFocusable?: boolean; +}; +export declare const AssistChip: (props: AssistChipProps) => React.JSX.Element; +type FilterChipProps = AriaProps & { + elevated?: boolean; + removable?: boolean; + selected?: boolean; + hasSelectedIcon?: boolean; + disabled?: boolean; + alwaysFocusable?: boolean; + label: string; +}; +export declare const FilterChip: (props: FilterChipProps) => React.JSX.Element; +type InputChipProps = AriaProps & { + avatar?: boolean; + href?: string; + target?: '_blank' | '_parent' | '_self' | '_top'; + removeOnly?: boolean; + selected?: boolean; + disabled?: boolean; + alwaysFocusable?: boolean; + label: string; +}; +export declare const InputChip: (props: InputChipProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/CircularProgress.d.ts b/dist/src/components/CircularProgress.d.ts new file mode 100644 index 0000000..1526be4 --- /dev/null +++ b/dist/src/components/CircularProgress.d.ts @@ -0,0 +1,26 @@ +import { default as React } from 'react'; + +type CircularProgressProps = { + value?: number; + max?: number; + fourColor?: boolean; + className?: string; + style?: React.CSSProperties; + id?: string; + color?: string; + size?: string; +}; +export declare const CircularProgress: (props: CircularProgressProps) => React.JSX.Element; +type LinearProgressProps = { + buffer?: number; + value?: number; + max?: number; + fourColor?: boolean; + className?: string; + style?: React.CSSProperties; + id?: string; + color?: string; + size?: string; +}; +export declare const LinearProgress: (props: LinearProgressProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Dialog.d.ts b/dist/src/components/Dialog.d.ts new file mode 100644 index 0000000..f5b8a5a --- /dev/null +++ b/dist/src/components/Dialog.d.ts @@ -0,0 +1,43 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type DialogProps = AriaProps & { + children: React.ReactNode; + quick?: boolean; + returnValue?: string; + noFocusTrap?: boolean; + open?: boolean; + style?: React.CSSProperties; + className?: string; + id?: string; + onClose?: () => void; + onShow?: () => void; + onOpen?: () => void; + onOpened?: () => void; + onClosed?: () => void; + onCancel?: () => void; + fullScreen?: boolean; +}; +export declare const Dialog: (props: DialogProps) => React.JSX.Element; +type DialogTitleProps = AriaProps & { + children: React.ReactNode; + style?: React.CSSProperties; + className?: string; + id?: string; +}; +export declare const DialogTitle: (props: DialogTitleProps) => React.JSX.Element; +type DialogContentProps = AriaProps & { + children: React.ReactNode; + style?: React.CSSProperties; + className?: string; + id?: string; +}; +export declare const DialogContent: (props: DialogContentProps) => React.JSX.Element; +type DialogActionsProps = AriaProps & { + children: React.ReactNode; + style?: React.CSSProperties; + className?: string; + id?: string; +}; +export declare const DialogActions: (props: DialogActionsProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Dropdown.d.ts b/dist/src/components/Dropdown.d.ts new file mode 100644 index 0000000..a12b9bb --- /dev/null +++ b/dist/src/components/Dropdown.d.ts @@ -0,0 +1,26 @@ +import { default as React } from 'react'; + +type SelectProps = { + variant?: 'filled' | 'outlined'; + quick?: boolean; + required?: boolean; + errorText?: string; + label?: string; + noAsterisk?: boolean; + supportingText?: string; + error?: boolean; + menuPositioning?: 'popover' | 'fixed' | 'absolute'; + clampMenuWidth?: boolean; + typeaheadDelay?: number; + menuAlign?: 'start' | 'end'; + value?: string; + selectedIndex?: number; + disabled?: boolean; + name?: string; + ariaLabel?: string; + className?: string; + style?: React.CSSProperties; + children?: React.ReactNode; +}; +export declare const Select: (props: SelectProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/FloatingActionButton.d.ts b/dist/src/components/FloatingActionButton.d.ts new file mode 100644 index 0000000..07941d2 --- /dev/null +++ b/dist/src/components/FloatingActionButton.d.ts @@ -0,0 +1,24 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type FABProps = AriaProps & { + children: React.ReactNode; + className?: string; + id?: string; + variant?: 'surface' | 'primary' | 'secondary' | 'tertiary'; + size?: 'medium' | 'large'; + label?: string; + lowered?: boolean; +}; +export declare const FAB: (props: FABProps) => React.JSX.Element; +type BrandedFABProps = AriaProps & { + children: React.ReactNode; + className?: string; + id?: string; + variant?: 'surface' | 'primary' | 'secondary' | 'tertiary'; + size?: 'medium' | 'large'; + label?: string; + lowered?: boolean; +}; +export declare const BrandedFAB: (props: BrandedFABProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Forms.d.ts b/dist/src/components/Forms.d.ts new file mode 100644 index 0000000..591eb88 --- /dev/null +++ b/dist/src/components/Forms.d.ts @@ -0,0 +1,3 @@ +import { default as React, LabelHTMLAttributes } from 'react'; + +export declare const FormLabel: (props: LabelHTMLAttributes) => React.JSX.Element; diff --git a/dist/src/components/IconButton.d.ts b/dist/src/components/IconButton.d.ts new file mode 100644 index 0000000..0cd9086 --- /dev/null +++ b/dist/src/components/IconButton.d.ts @@ -0,0 +1,27 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type IconButtonProps = AriaProps & { + variant?: 'filled' | 'outlined' | 'filled-tonal' | 'standard'; + disabled?: boolean; + flipIconInRtl?: boolean; + href?: string; + target?: '_blank' | '_self' | '_parent' | '_top'; + ariaLabelSelected?: string; + toggle?: boolean; + selected?: boolean; + type?: 'button' | 'submit' | 'reset'; + value?: string; + name?: string; + form?: HTMLFormElement; + labels?: NodeListOf; + children: React.ReactNode; + style?: React.CSSProperties; + className?: string; + id?: string; + onChange?: (event: Event) => void; + onInput?: (event: Event) => void; + onClick?: (event: Event) => void; +}; +export declare const IconButton: (props: IconButtonProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/List.d.ts b/dist/src/components/List.d.ts new file mode 100644 index 0000000..186d852 --- /dev/null +++ b/dist/src/components/List.d.ts @@ -0,0 +1,18 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type ListProps = AriaProps & { + children: React.ReactNode; +}; +export declare const List: (props: ListProps) => React.JSX.Element; +type ListItemProps = AriaProps & { + children: React.ReactNode; + className?: string; + id?: string; + disabled?: boolean; + type?: 'text' | 'link' | 'button'; + href?: string; + target?: '_blank' | '_self' | '_parent' | '_top'; +}; +export declare const ListItem: (props: ListItemProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Menu.d.ts b/dist/src/components/Menu.d.ts new file mode 100644 index 0000000..e621cad --- /dev/null +++ b/dist/src/components/Menu.d.ts @@ -0,0 +1,49 @@ +import { default as React } from 'react'; + +type MenuProps = { + anchorEl?: HTMLElement | string; + positioning?: 'popover' | 'fixed' | 'absolute' | 'document'; + quick?: boolean; + hasOverflow?: boolean; + open?: boolean; + xOffset?: number; + yOffset?: number; + anchorCorner?: 'start-start' | 'start-end' | 'end-start' | 'end-end'; + menuCorner?: 'start-start' | 'start-end' | 'end-start' | 'end-end'; + noHorizontalFlip?: boolean; + noVerticalFlip?: boolean; + stayOpenOnOutsideClick?: boolean; + stayOpenOnFocusout?: boolean; + skipRestoreFocus?: boolean; + noNavigationWrap?: boolean; + className?: string; + style?: React.CSSProperties; + children?: React.ReactNode; + id?: string; +}; +export declare const Menu: (props: MenuProps) => React.JSX.Element; +type SubMenuProps = { + children?: React.ReactNode; + className?: string; + style?: React.CSSProperties; + id?: string; + anchorCorner?: 'start-start' | 'start-end' | 'end-start' | 'end-end'; + menuCorner?: 'start-start' | 'start-end' | 'end-start' | 'end-end'; + hoverOpenDelay?: number; + hoverCloseDelay?: number; +}; +export declare const SubMenu: (props: SubMenuProps) => React.JSX.Element; +type MenuItemProps = { + children?: React.ReactNode; + className?: string; + style?: React.CSSProperties; + id?: string; + disabled?: boolean; + href?: string; + target?: '_blank' | '_parent' | '_self' | '_top'; + keepOpen?: boolean; + selected?: boolean; + onCloseMenu?: () => void; +}; +export declare const MenuItem: (props: MenuItemProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Paper.d.ts b/dist/src/components/Paper.d.ts new file mode 100644 index 0000000..41455cb --- /dev/null +++ b/dist/src/components/Paper.d.ts @@ -0,0 +1,4 @@ +import { default as React } from 'react'; +import { BoxProps } from './Box'; + +export declare const Paper: ({ children, style, ...props }: BoxProps) => React.JSX.Element; diff --git a/dist/src/components/RadioButton.d.ts b/dist/src/components/RadioButton.d.ts new file mode 100644 index 0000000..0e29649 --- /dev/null +++ b/dist/src/components/RadioButton.d.ts @@ -0,0 +1,19 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type RadioProps = AriaProps & { + checked?: boolean; + value?: string; + required?: boolean; + disabled?: boolean; + name?: string; + ariaLabel?: string; + className?: string; + style?: React.CSSProperties; + id?: string; + iconColor?: string; + selectedIconColor?: string; + iconSize?: string; +}; +export declare const Radio: (props: RadioProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Slider.d.ts b/dist/src/components/Slider.d.ts new file mode 100644 index 0000000..b3d14e8 --- /dev/null +++ b/dist/src/components/Slider.d.ts @@ -0,0 +1,38 @@ +import { default as React, FormEvent } from 'react'; +import { MdSlider as MdSliderWebComponent } from '@material/web/slider/slider'; +import { AriaProps } from '../types/aria'; + +type SliderProps = AriaProps & { + className?: string; + id?: string; + style?: React.CSSProperties; + min?: number; + max?: number; + value?: number; + valueStart?: number; + valueEnd?: number; + valueLabel?: string; + valueLabelStart?: string; + valueLabelEnd?: string; + ariaLabelStart?: string; + ariaLabelTextStart?: string; + ariaLabelEnd?: string; + ariaLabelTextEnd?: string; + ariaLabel?: string; + step?: number; + ticks?: boolean; + labeled?: boolean; + range?: boolean; + disabled?: boolean; + name?: string; + nameStart?: string; + nameEnd?: string; + onChange?: (e: FormEvent) => void; + onInput?: (e: FormEvent) => void; + marks?: boolean; + discrete?: boolean; + withTickMarks?: boolean; + withTicks?: boolean; +}; +export declare const Slider: ({ className, id, style, ...rest }: SliderProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Switch.d.ts b/dist/src/components/Switch.d.ts new file mode 100644 index 0000000..b934e8e --- /dev/null +++ b/dist/src/components/Switch.d.ts @@ -0,0 +1,29 @@ +import { default as React, FormEvent, MouseEvent, FocusEvent } from 'react'; +import { MdSwitch as MdSwitchWebComponent } from '@material/web/switch/switch'; +import { AriaProps } from '../types/aria'; + +type SwitchProps = AriaProps & { + checked?: boolean; + id?: string; + disabled?: boolean; + hidden?: boolean; + ariaLabel?: string; + ariaLabelledBy?: string; + ariaDescribedBy?: string; + ariaControls?: string; + required?: boolean; + onInput?: (e: FormEvent) => void; + onChange?: (e: FormEvent) => void; + onClick?: (e: MouseEvent) => void; + onMouseDown?: (e: MouseEvent) => void; + onMouseUp?: (e: MouseEvent) => void; + onMouseEnter?: (e: MouseEvent) => void; + onFocus?: (e: FocusEvent) => void; + onBlur?: (e: FocusEvent) => void; + className?: string; + style?: React.CSSProperties; + tabIndex?: number; + name?: string; +}; +export declare const Switch: ({ checked, id, disabled, hidden, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaControls, required, onInput, onChange, onClick, onMouseDown, onMouseUp, onMouseEnter, onFocus, onBlur, className, style, tabIndex, name, ...props }: SwitchProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/Tabs.d.ts b/dist/src/components/Tabs.d.ts new file mode 100644 index 0000000..6fbc223 --- /dev/null +++ b/dist/src/components/Tabs.d.ts @@ -0,0 +1,26 @@ +import { default as React, MouseEvent, FormEvent } from 'react'; +import { MdTabs as MdTabsWebComponent } from '@material/web/tabs/tabs'; +import { MdPrimaryTab as MdPrimaryTabWebComponent } from '@material/web/tabs/primary-tab'; +import { MdSecondaryTab as MdSecondaryTabWebComponent } from '@material/web/tabs/secondary-tab'; +import { AriaProps } from '../types/aria'; + +type TabsProps = AriaProps & { + children: React.ReactNode; + className?: string; + style?: React.CSSProperties; + id?: string; + activeTabIndex?: number; + onChange?: (e: FormEvent) => void; +}; +type TabProps = AriaProps & { + children: React.ReactNode; + className?: string; + style?: React.CSSProperties; + id?: string; + selected?: boolean; + variant?: 'primary' | 'secondary'; + onClick?: (e: MouseEvent) => void; +}; +export declare const Tabs: (props: TabsProps) => React.JSX.Element; +export declare const Tab: (props: TabProps) => React.JSX.Element; +export {}; diff --git a/dist/src/components/TextField.d.ts b/dist/src/components/TextField.d.ts new file mode 100644 index 0000000..191cc90 --- /dev/null +++ b/dist/src/components/TextField.d.ts @@ -0,0 +1,41 @@ +import { default as React, FocusEvent, FormEvent } from 'react'; +import { MdFilledTextField as MdFilledTextFieldWebComponent } from '@material/web/textfield/filled-text-field'; +import { MdOutlinedTextField as MdOutlinedTextFieldWebComponent } from '@material/web/textfield/outlined-text-field'; +import { AriaProps } from '../types/aria'; + +export declare const TextField: React.ForwardRefExoticComponent) => void; + onInput?: (e: FormEvent) => void; + onFocus?: (e: FocusEvent) => void; + onBlur?: (e: FocusEvent) => void; +} & React.RefAttributes>; diff --git a/dist/src/components/Typography.d.ts b/dist/src/components/Typography.d.ts new file mode 100644 index 0000000..d72890a --- /dev/null +++ b/dist/src/components/Typography.d.ts @@ -0,0 +1,17 @@ +import { default as React } from 'react'; +import { AriaProps } from '../types/aria'; + +type TypographyProps = AriaProps & { + children: React.ReactNode; + variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "label"; + className?: string; + color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'on-primary' | 'on-secondary' | 'on-tertiary' | 'on-error' | 'scrim' | 'outline' | 'outline-variant' | string; + align?: "left" | "center" | "right"; + style?: React.CSSProperties; + noWrap?: boolean; + id?: string; + size?: "small" | "medium" | "large" | "auto"; + htmlFor?: string; +}; +export declare const Typography: ({ children, variant, className, color, align, style, noWrap, id, size, htmlFor }: TypographyProps) => React.JSX.Element | null; +export {}; diff --git a/dist/src/hooks/useScheme.d.ts b/dist/src/hooks/useScheme.d.ts new file mode 100644 index 0000000..489e070 --- /dev/null +++ b/dist/src/hooks/useScheme.d.ts @@ -0,0 +1,7 @@ +import { default as React } from 'react'; + +export declare function SchemeProvider({ children, scheme }: { + children: React.ReactNode; + scheme: 'light' | 'dark'; +}): React.JSX.Element; +export declare function useScheme(): "dark" | "light"; diff --git a/dist/src/hooks/useTheme.d.ts b/dist/src/hooks/useTheme.d.ts new file mode 100644 index 0000000..653524f --- /dev/null +++ b/dist/src/hooks/useTheme.d.ts @@ -0,0 +1,10 @@ +import { Theme } from '@material/material-color-utilities'; +import { default as React } from 'react'; + +export declare function ThemeProvider({ children, theme, scheme }: { + children: React.ReactNode; + theme: Theme; + scheme: 'dark' | 'light'; +}): React.JSX.Element; +export declare function useTheme(): Theme; +export declare function usePalette(): import('@material/material-color-utilities').Scheme; diff --git a/dist/src/index.d.ts b/dist/src/index.d.ts new file mode 100644 index 0000000..f28ee61 --- /dev/null +++ b/dist/src/index.d.ts @@ -0,0 +1,20 @@ +export { TextField } from './components/TextField'; +export { Button } from './components/Button'; +export { Checkbox } from './components/Checkbox'; +export { Radio } from './components/RadioButton'; +export { Select } from './components/Dropdown'; +export { Switch } from './components/Switch'; +export { Slider } from './components/Slider'; +export { Dialog } from './components/Dialog'; +export { List } from './components/List'; +export { Box } from './components/Box'; +export { Typography } from './components/Typography'; +export { IconButton } from './components/IconButton'; +export { ChipSet, AssistChip, FilterChip, InputChip } from './components/Chip'; +export { FAB, BrandedFAB } from './components/FloatingActionButton'; +export { Tabs, Tab } from './components/Tabs'; +export { CircularProgress } from './components/CircularProgress'; +export { Menu } from './components/Menu'; +export { Paper } from './components/Paper'; +export { FormLabel } from './components/Forms'; +export { AppBar } from './components/AppBar'; diff --git a/dist/src/types/aria.d.ts b/dist/src/types/aria.d.ts new file mode 100644 index 0000000..afc481c --- /dev/null +++ b/dist/src/types/aria.d.ts @@ -0,0 +1,35 @@ +export interface AriaProps { + 'aria-label'?: string; + 'aria-labelledby'?: string; + 'aria-describedby'?: string; + 'aria-controls'?: string; + 'aria-expanded'?: boolean; + 'aria-hidden'?: boolean; + 'aria-invalid'?: boolean; + 'aria-required'?: boolean; + 'aria-disabled'?: boolean; + 'aria-pressed'?: boolean; + 'aria-checked'?: boolean; + 'aria-selected'?: boolean; + 'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'; + 'aria-live'?: 'off' | 'polite' | 'assertive'; + 'aria-atomic'?: boolean; + 'aria-relevant'?: 'additions' | 'removals' | 'text' | 'all'; + 'aria-busy'?: boolean; + 'aria-dropeffect'?: 'copy' | 'move' | 'link' | 'execute' | 'popup' | 'none'; + 'aria-dragged'?: boolean; + 'aria-grabbed'?: boolean; + 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + 'aria-level'?: number; + 'aria-multiline'?: boolean; + 'aria-multiselectable'?: boolean; + 'aria-orientation'?: 'horizontal' | 'vertical'; + 'aria-placeholder'?: string; + 'aria-readonly'?: boolean; + 'aria-sort'?: 'ascending' | 'descending' | 'none' | 'other'; + 'aria-valuemax'?: number; + 'aria-valuemin'?: number; + 'aria-valuenow'?: number; + 'aria-valuetext'?: string; + role?: string; +} diff --git a/dist/src/utils/theme.d.ts b/dist/src/utils/theme.d.ts new file mode 100644 index 0000000..e89e949 --- /dev/null +++ b/dist/src/utils/theme.d.ts @@ -0,0 +1 @@ +export declare function createTheme(accent: string): import('@material/material-color-utilities').Theme; diff --git a/dist/vite.config.d.ts b/dist/vite.config.d.ts new file mode 100644 index 0000000..2c646ae --- /dev/null +++ b/dist/vite.config.d.ts @@ -0,0 +1,2 @@ +declare const _default: import('vite').UserConfig; +export default _default; diff --git a/package-lock.json b/package-lock.json index 2535a26..07e9fbb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "eslint-plugin-react-hooks": "^4.0.0", "typescript": "^5.6.3", "vite": "^5.4.11", - "vite-plugin-dts": "^3.0.0", + "vite-plugin-dts": "^3.9.1", "vite-plugin-top-level-await": "^1.4.4", "vitest": "^1.0.0" }, diff --git a/package.json b/package.json index a0c344a..ca503f6 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "eslint-plugin-react-hooks": "^4.0.0", "typescript": "^5.6.3", "vite": "^5.4.11", - "vite-plugin-dts": "^3.0.0", + "vite-plugin-dts": "^3.9.1", "vite-plugin-top-level-await": "^1.4.4", "vitest": "^1.0.0" } diff --git a/vite.config.ts b/vite.config.ts index 71214a9..b778eb0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,10 +5,14 @@ import inject from '@rollup/plugin-inject'; import { extname, relative, resolve } from 'path'; import { fileURLToPath } from 'url'; import { glob } from 'glob'; +import dts from 'vite-plugin-dts'; export default defineConfig({ plugins: [ react(), + dts({ + insertTypesEntry: true, + }) ], optimizeDeps: { esbuildOptions: { @@ -43,7 +47,11 @@ export default defineConfig({ // lib/nested/foo.ts becomes /project/lib/nested/foo.ts fileURLToPath(new URL(file, import.meta.url)) ]) - ) + ), + jsx: 'react', + output: { + + } }, lib: { entry: resolve(__dirname, 'src/index.ts'),